/* Analytics page (13 Nov 2026): Hannah's approved mock-ups 6, 7 v2, 8 and 9
 * (.tmp/mockups-dashboard-2026-11-13: analytics-mock.css, analytics-compact.css,
 * analytics-quality.css, analytics-nearby.css), on home.css's tokens and
 * pieces (strip, cards, the map). No tabs (rejected twice). */
.an-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.an-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.an-strip { margin-bottom: 16px; }
.an-sub { color: var(--w-muted); font-size: 12.5px; margin: 2px 0 12px; }
.an-bars { display: flex; flex-direction: column; gap: 12px; }
.an-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.an-bar-row .lab { color: var(--w-ink); font-size: 13.5px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar-row .val { color: var(--w-ink); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-bar-row .val small { color: var(--w-muted); font-weight: 500; margin-left: 6px; }
.an-track { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--w-accent) 8%, var(--w-surface)); overflow: hidden; }
.an-track i { display: block; height: 100%; border-radius: 99px; background: var(--w-accent); }
.an-empty { color: var(--w-muted); font-size: 13px; margin: 0; }
.hm-card.an-map { margin-bottom: 16px; }

/* What the map is showing, and the way back */
.an-focus { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px;
  color: var(--w-muted); font-size: 13px; }
.an-focus b { color: var(--w-ink); }
.an-focus button { font: 600 12.5px/1.2 var(--w-font); color: var(--w-accent); background: none; border: 1px solid var(--w-border);
  border-radius: 99px; padding: 4px 10px; cursor: pointer; }
.an-focus button[hidden] { display: none; }
.an-focus button:hover { border-color: var(--w-accent); }

/* Top places / Top trades rows are buttons that drive the map */
button.an-bar-row { width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; margin: -6px -8px;
  border-radius: 8px; cursor: pointer; font: inherit; box-sizing: content-box; }
button.an-bar-row:hover { background: color-mix(in srgb, var(--w-accent) 5%, var(--w-surface)); }
button.an-bar-row.is-on { background: color-mix(in srgb, var(--w-accent) 9%, var(--w-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w-accent) 35%, transparent); }
button.an-bar-row:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 1px; }
.an-hint { color: var(--w-muted); font-size: 12px; margin: 12px 0 0; }

/* Top places sits beside the map; one small menu per card picks the order. */
.an-map .hm-body { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; }
.cp-mapcol { min-width: 0; }
.cp-side { min-width: 0; padding-left: 28px; border-left: 1px solid var(--w-border); }
.aq-row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.aq-row-head .hm-select { flex: none; }

/* Nearby, not searched yet (full width since 15 Nov 2026; see the end) */
.nb-card { margin-bottom: 0; }
.nb-rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.nb-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0;
  border-top: 1px solid var(--w-border); text-decoration: none; min-width: 0; }
.nb-row:first-child { border-top: 0; }
.nb-text { min-width: 0; display: grid; gap: 3px; }
.nb-text b { color: var(--w-ink); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-go { display: inline-flex; align-items: center; gap: 6px; color: var(--w-accent); font-weight: 600; font-size: 13px; white-space: nowrap; }
.nb-go .hp-go { stroke: var(--w-accent); width: 15px; height: 15px; }
.nb-row:hover .nb-go { text-decoration: underline; }
.nb-row:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 2px; border-radius: 6px; }

/* Nothing found yet */
.an-start { max-width: 640px; }
.an-start h2 { margin-bottom: 6px; }

@media (max-width: 860px) {
  .an-grid { grid-template-columns: minmax(0, 1fr); }
  .an-map .hm-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cp-side { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--w-border); }
}
@media (max-width: 520px) {
  .nb-go { font-size: 0; gap: 0; }
  .nb-go .hp-go { width: 17px; height: 17px; }
  .nb-text .hp-loc { white-space: normal; }
}

/* ---------- 15 Nov 2026, approved second pass ----------
 * The map leads the page; the bar chart over time is gone (Home's graph
 * shows the same days). Solid blue is kept for one thing per card: the
 * leader of a ranked list, the row you clicked, the darkest state.
 * Everything else is a pale tint. */
.an-track { background: color-mix(in srgb, var(--w-ink) 5%, var(--w-surface)); }
.an-track i { background: color-mix(in srgb, var(--w-accent) 30%, var(--w-surface)); }
/* ranked lists (Top places, Top trades): the first row leads */
button.an-bar-row:first-child .an-track i { background: var(--w-accent); }
/* once a row is picked, only the picked row is solid */
.an-bars:has(button.an-bar-row.is-on) button.an-bar-row:not(.is-on) .an-track i { background: color-mix(in srgb, var(--w-accent) 30%, var(--w-surface)); }
button.an-bar-row.is-on .an-track i { background: var(--w-accent); }

/* the pair under the map ends level: the shorter card spreads its rows */
.an-pair { align-items: stretch; }
.an-pair > .hp { display: flex; flex-direction: column; }
#an-have { flex: 1; justify-content: space-between; }

/* Nearby, not searched yet closes the page, towns two across */
.nb-wide { margin-bottom: 0; }
@media (min-width: 861px) {
  .nb-wide .nb-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .nb-wide .nb-row:nth-child(2) { border-top: 0; }
}
