/* ============================================================================
   Second Summit Dashboard — shared design system
   Single source of truth for visual presentation across all templates.
   Loaded by templates/_base.html. Owned by ss-dashboard#107.
   ============================================================================ */

/* ===========================================================================
   1. Tokens
   =========================================================================== */
:root {
  /* Surfaces (dark theme — the only theme) */
  --bg-deep:        #0b1219;
  --bg:             #0f1923;
  --surface:        #1a2a3a;
  --surface-raised: #1e3448;
  --surface-glass:  rgba(15, 25, 35, 0.78);

  /* Borders */
  --border:      #1e3d55;
  --border-soft: rgba(30, 61, 85, 0.55);

  /* Brand */
  --teal:       #378a78;
  --teal-light: #5cbfad;
  --teal-glow:  rgba(92, 191, 173, 0.18);
  --gold:       #c8935a;
  --gold-light: #e0bb7a;
  --gold-glow:  rgba(224, 187, 122, 0.16);
  --accent:     #378a78;

  /* Per-location accents (IBCS UNIFY — same meaning, same look on every chart).
     Single source of truth — every chart that color-codes by location reads
     these via window.locColor(key) declared in _base.html. Adding a location?
     Add a token here, add the key to LOC_KEYS_ALL in _base.html, that's it. */
  --loc-hudson:      #378a78;
  --loc-marlborough: #60a5fa;
  --loc-stafford:    #f59e0b;
  --loc-fairfield:   #a78bfa;
  --loc-murray:      #f87171;
  --loc-twinsburg:   #34d399;
  --loc-poway:       #ec4899;
  --loc-concord:     #fbbf24;
  --loc-brookfield:  #22d3ee;

  /* Text — muted bumped from #7a99b4 to #94aec5 (6.5:1 contrast at small sizes,
     vs prior 4.9:1 which failed AAA on 10–11px copy used pervasively). */
  --text:      #e8edf2;
  --text-soft: #c8d3df;
  --muted:     #94aec5;
  --muted-dim: #6f8aa3;

  /* Status — desaturated slightly so they don't fight the brand accents */
  --green:      #4ade80;
  --green-glow: rgba(74, 222, 128, 0.14);
  --red:        #f87171;
  --red-glow:   rgba(248, 113, 113, 0.14);
  --yellow:     #fbbf24;
  --yellow-glow:rgba(251, 191, 36, 0.14);
  --blue:       #60a5fa;
  --blue-glow:  rgba(96, 165, 250, 0.14);

  /* Typography stacks
     - display: Fraunces — high-variability serif for hero numerics + page titles
     - ui:      Inter    — UI/body workhorse (brand)
     - mono:    JetBrains Mono — IDs, timestamps, code snippets */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-ui:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Spacing scale (4-based) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-14: 56px;

  /* Radius scale (kept small/medium/large only — old codebase had 4/6/8/10/14/16) */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  18px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm:        0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md:        0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg:        0 24px 48px rgba(0, 0, 0, 0.35);
  --shadow-glow-teal: 0 0 24px rgba(92, 191, 173, 0.22);

  /* Motion */
  --ease-out:        cubic-bezier(0.2, 0.6, 0.2, 1);
  --duration-fast:   120ms;
  --duration-base:   200ms;

  /* Focus ring — visible everywhere, on every interactive element */
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--teal-light);

  /* Layout */
  --shell-max: 1320px;
}

/* ===========================================================================
   2. Reset + base
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: 'cv05', 'cv11', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-sm);
}

button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }

img { display: block; max-width: 100%; }

code, .mono { font-family: var(--font-mono); font-size: 12px; }

/* Tabular figures everywhere a number lives — keeps columns lined up. */
.num, td.num, .ad-table td:not(:first-child), .kpi-value, .kpi-mini-value,
.summary-value, .funnel-n, .status-card-value, .ss-capi-value, .kpi-vs,
.proposal-meta strong, table.sess .num, table.shadow-table .num,
.cmp-table td:not(:first-child), .bench-table td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

/* Skip-to-content link — visible on focus only */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface);
  color: var(--teal-light);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  z-index: 1000;
  transition: top var(--duration-fast) var(--ease-out);
}
.skip-link:focus-visible {
  top: var(--sp-3);
  box-shadow: var(--focus-ring);
}

/* Respect motion preferences — pulsing dots, fades, etc. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================================================================
   3. Header / nav
   =========================================================================== */
.header {
  background: linear-gradient(135deg, #0a1520 0%, #1a2a3a 50%, #0f2030 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.logo { display: flex; align-items: center; gap: var(--sp-3); }
.logo-mark {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-glow), var(--surface-raised));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.logo-mark.text-mark { font-weight: 800; font-size: 15px; color: var(--teal-light); letter-spacing: -0.5px; user-select: none; }
.logo-text { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.logo-sub  { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 1px; }

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
  min-width: 200px;
}
.nav-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 7px var(--sp-3);
  border-radius: var(--r-md);
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  border: 1px solid transparent;
  white-space: nowrap;
}
.nav-link:hover { color: var(--teal-light); background: rgba(55, 138, 120, 0.10); }
.nav-link.active {
  color: var(--teal-light);
  background: rgba(55, 138, 120, 0.18);
  border-color: rgba(55, 138, 120, 0.30);
}
/* Locations dropdown — rendered when nav_locations|length > 5 so the header
   row doesn't wrap on tablet (#109). Uses native <details>/<summary> for
   keyboard accessibility without JS. */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown-caret {
  font-size: 9px;
  line-height: 1;
  transition: transform var(--duration-fast) var(--ease-out);
  margin-left: 2px;
}
.nav-dropdown[open] > summary .nav-dropdown-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px;
  min-width: 200px;
  display: grid;
  gap: 2px;
  box-shadow: var(--shadow-md);
  z-index: 110;
}
.nav-dropdown-item {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.nav-dropdown-item:hover  { color: var(--teal-light); background: rgba(55, 138, 120, 0.10); }
.nav-dropdown-item.active {
  color: var(--teal-light);
  background: rgba(55, 138, 120, 0.18);
  border-color: rgba(55, 138, 120, 0.30);
}

/* Modal — used by the admin Reset-Password flow (#109) and any future
   inline dialog. Native HTML <dialog> would be cleaner but Safari support
   gaps make a role="dialog" overlay more portable. */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 22, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--sp-4);
}
.modal-backdrop.open { display: flex; }
.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6) var(--sp-7, var(--sp-6));
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.modal-sub     { color: var(--muted); font-size: 13px; margin-bottom: var(--sp-5); }
.modal-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.modal-actions .btn { flex: 1; }

.nav-user { font-size: 12px; color: var(--text); font-weight: 600; }
.nav-logout {
  font-size: 12px; color: var(--muted); font-weight: 600;
  text-decoration: none; padding: 7px var(--sp-2); border-radius: var(--r-md);
}
.nav-logout:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); }

.header-right { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.settings-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--sp-2);
  border-radius: var(--r-sm);
  transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}
.settings-link:hover { color: var(--teal-light); background: rgba(55, 138, 120, 0.08); }
.settings-link .gear-icon { font-size: 16px; line-height: 1; }
.settings-link .gear-label { font-weight: 600; font-size: 12px; }

.refresh-badge {
  background: rgba(55, 138, 120, 0.15);
  border: 1px solid rgba(55, 138, 120, 0.30);
  color: var(--teal-light);
  font-size: 11px;
  font-weight: 600;
  padding: 5px var(--sp-3);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  gap: 6px;
}
.refresh-dot {
  width: 6px; height: 6px;
  background: var(--teal-light);
  border-radius: 50%;
  animation: ss-pulse 2s infinite;
}
@keyframes ss-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.week-label { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ===========================================================================
   4. Page shell
   =========================================================================== */
.main {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--sp-10);
}
.main--wide { max-width: 1400px; }

.footer {
  text-align: center;
  padding: var(--sp-8) var(--sp-10);
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

.loading-state {
  text-align: center;
  padding: 80px;
  color: var(--muted);
  font-size: 16px;
}

/* ===========================================================================
   5. Page header / section header
   =========================================================================== */
.page-header { margin-bottom: var(--sp-6); }
.page-title  {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 6px;
  font-variation-settings: "opsz" 36, "SOFT" 30;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--sp-7, var(--sp-8));
  max-width: 880px;
  line-height: 1.6;
}
.page-sub code {
  background: var(--surface-raised);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-soft);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.section-header--block { display: block; }
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.section-title--sm { font-size: 16px; font-weight: 700; font-family: var(--font-ui); letter-spacing: 0; }
.section-sub  { font-size: 13px; color: var(--muted); }

/* page_headline() macro — single computed-conclusion sentence as the first
   body element on a page (#120 / Minto pyramid). Sized larger than chart
   takeaways; sits above the existing hero KPI tile / summary strip. */
.page-headline {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  background: linear-gradient(135deg, rgba(92,191,173,0.06), rgba(224,187,122,0.03));
  border-left: 3px solid var(--teal-light);
  border-radius: var(--r-md);
}
.page-headline-text { flex: 1 1 auto; }
.page-headline-asof {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}

/* ===========================================================================
   6. KPI tile + KPI cell
   ---------------------------------------------------------------------------
   Two distinct uses of "kpi":
     .kpi-tile  — standalone card-shaped tile (replaces .summary-card,
                  .status-card, .ss-capi-tile when used via the macro).
     .kpi       — cell inside .location-kpis (a 4-cell row inside a location
                  card, with left borders between cells, no card chrome).
   The .kpi-label / .kpi-value / .kpi-sub elements are SHARED — they style
   the content area the same way in both contexts; only the wrapper differs.
   =========================================================================== */

/* Standalone tile (component) */
.kpi-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  position: relative;
  overflow: hidden;
}
.kpi-tile--accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}
.kpi-tile--bordered { border-left-width: 3px; }
.kpi-tile--bordered.is-teal   { border-left-color: var(--teal); }
.kpi-tile--bordered.is-blue   { border-left-color: var(--blue); }
.kpi-tile--bordered.is-gold   { border-left-color: var(--gold); }
.kpi-tile--bordered.is-red    { border-left-color: var(--red); }
.kpi-tile--bordered.is-green  { border-left-color: var(--green); }
.kpi-tile--bordered.is-yellow { border-left-color: var(--yellow); }
.kpi-tile--quiet { background: var(--surface-raised); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); }

/* Size variants — these apply to .kpi-tile's value treatment */
.kpi-tile--hero .kpi-value { font-size: 56px; letter-spacing: -0.03em; font-variation-settings: "opsz" 48, "SOFT" 20; }
.kpi-tile--lg   .kpi-value { font-size: 32px; }
.kpi-tile--md   .kpi-value { font-size: 24px; font-family: var(--font-ui); font-weight: 700; letter-spacing: -0.01em; }
.kpi-tile--sm   .kpi-value { font-size: 20px; font-family: var(--font-ui); font-weight: 700; letter-spacing: 0; }
.kpi-tile--xs   .kpi-value { font-size: 18px; font-family: var(--font-ui); font-weight: 700; letter-spacing: 0; }
.kpi-tile--md, .kpi-tile--sm, .kpi-tile--xs { padding: var(--sp-4) var(--sp-5); }
.kpi-tile--quiet .kpi-value { font-size: 22px; font-family: var(--font-ui); font-weight: 800; letter-spacing: -0.01em; }

/* KPI cells inside a location card (legacy markup used by JS-rendered location cards) */
.location-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: var(--sp-5) var(--sp-7, var(--sp-6));
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.location-kpis > .kpi { text-align: center; padding: 0 var(--sp-3); position: relative; }
.location-kpis > .kpi + .kpi { border-left: 1px solid var(--border); }
.location-kpis > .kpi .kpi-label { font-size: 10px; letter-spacing: 0.07em; margin-bottom: 6px; }
.location-kpis > .kpi .kpi-value {
  font-size: 24px;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}
.location-kpis > .kpi .kpi-sub { font-size: 11px; margin-top: 4px; }

/* Shared content elements (used by both .kpi-tile and .location-kpis > .kpi) */
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  margin: var(--sp-2) 0 var(--sp-1);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 36, "SOFT" 30;
  font-variant-numeric: tabular-nums;
}
.kpi-value.is-good  { color: var(--green); }
.kpi-value.is-gold  { color: var(--gold-light); }
.kpi-value.is-blue  { color: var(--blue); }
.kpi-value.is-teal  { color: var(--teal-light); }
.kpi-value.is-red   { color: var(--red); }
/* Backward-compat tints (JS-rendered KPI cells use unprefixed names) */
.kpi-value.green { color: var(--green); }
.kpi-value.blue  { color: var(--blue); }
.kpi-value.gold  { color: var(--gold-light); }
.kpi-value.red   { color: var(--red); }
.kpi-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}
.kpi-sub .up   { color: var(--green); font-weight: 700; }
.kpi-sub .down { color: var(--red);   font-weight: 700; }

.kpi-vs { font-size: 11px; font-weight: 600; margin-top: 4px; }
.kpi-vs.great { color: var(--green); }
.kpi-vs.good  { color: var(--teal-light); }
.kpi-vs.warn  { color: var(--yellow); }

/* Grid layouts for groups of standalone tiles */
.kpi-grid          { display: grid; gap: var(--sp-4); }
.kpi-grid--4       { grid-template-columns: repeat(4, 1fr); }
.kpi-grid--5       { grid-template-columns: repeat(5, 1fr); }
.kpi-grid--auto    { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kpi-grid--auto-sm { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* #122 — variance chips on KPI tiles. Each tile can carry up to 2 chips
   (vs prior period, vs target, vs network avg). Direction is favorable-
   correct: green = favorable, red = unfavorable, muted = within tolerance.
   Same chip family as .chip but tuned for the KPI-tile inline slot. */
.kpi-chips {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: 4px;
}
.kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.kpi-chip--favorable {
  background: rgba(74, 222, 128, 0.14);
  color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.30);
}
.kpi-chip--unfavorable {
  background: rgba(248, 113, 113, 0.14);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.30);
}
.kpi-chip--flat {
  background: rgba(148, 174, 197, 0.10);
  color: var(--muted);
  border: 1px solid rgba(148, 174, 197, 0.25);
}
/* Compact variant for dense card rows where each stat already has its own
   value — chip sits inline as a delta indicator, not a standalone metric. */
.kpi-chip--sm {
  padding: 1px 6px;
  font-size: 9px;
  letter-spacing: 0.03em;
  margin-left: 4px;
  vertical-align: middle;
}

/* Inline-rendered KPI cards (.summary-card via innerHTML) use the same
   chip styling via the same class name so JS can render them identically. */
.summary-card .kpi-chips { margin-top: 4px; }

/* ===========================================================================
   7. Unified chip — replaces .chip / .ss-pill / .badge / .vs-badge / .truth-tag
   =========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  line-height: 1.5;
  white-space: nowrap;
}
.chip--muted  { color: var(--muted);      background: rgba(122, 153, 180, 0.16); border-color: rgba(122, 153, 180, 0.20); }
.chip--teal   { color: var(--teal-light); background: var(--teal-glow);          border-color: rgba(92, 191, 173, 0.30); }
.chip--gold   { color: var(--gold-light); background: var(--gold-glow);          border-color: rgba(224, 187, 122, 0.30); }
.chip--green  { color: var(--green);      background: var(--green-glow);         border-color: rgba(74, 222, 128, 0.30); }
.chip--yellow { color: var(--yellow);     background: var(--yellow-glow);        border-color: rgba(251, 191, 36, 0.30); }
.chip--red    { color: var(--red);        background: var(--red-glow);           border-color: rgba(248, 113, 113, 0.30); }
.chip--blue   { color: var(--blue);       background: var(--blue-glow);          border-color: rgba(96, 165, 250, 0.30); }
.chip--ghost  { color: var(--text-soft);  background: transparent;               border-color: var(--border); text-transform: none; letter-spacing: 0; font-weight: 600; }
.chip--sm     { padding: 2px 7px; font-size: 9px; gap: 4px; }

/* Live "WEEK-TO-DATE" badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px var(--sp-2);
  border-radius: var(--r-sm);
  background: var(--teal-glow);
  color: var(--teal-light);
  border: 1px solid rgba(92, 191, 173, 0.40);
  letter-spacing: 0.06em;
  margin-left: 6px;
  vertical-align: middle;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: ss-pulse 1.6s infinite;
  flex: none;
}

/* ===========================================================================
   8. Panel / card / section container
   =========================================================================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
}
.panel--lg { padding: var(--sp-6) var(--sp-7, var(--sp-6)); }
.panel h2 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: var(--sp-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-7, var(--sp-6));
  margin-bottom: var(--sp-7, var(--sp-6));
}
.section-card h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.section-card .section-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: var(--sp-5);
  line-height: 1.55;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-7, var(--sp-6));
}
.chart-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.chart-sub  { font-size: 12px; color: var(--muted); margin-bottom: var(--sp-5); }

/* chart_header() macro — takeaway sentence above static metric label.
   Replaces standalone .chart-title in #119 (BCG/Knaflic: chart titles state
   conclusions, not labels). Old .chart-title kept for any legacy sites. */
.chart-header { margin-bottom: var(--sp-2); }
.chart-takeaway {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.chart-takeaway--loading { color: var(--muted-dim); }
.chart-subtitle {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chart-wrap { position: relative; height: 240px; }
.chart-wrap--md   { height: 220px; }
.chart-wrap--lg   { height: 280px; }
.chart-wrap--hbar { min-height: 220px; }

.charts-row    { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); margin-bottom: var(--sp-10); }
.charts-row--3 { grid-template-columns: repeat(3, 1fr); }

/* #121 — Overview small-multiples grid: location × metric. One tiny line chart
   per cell, y-axis shared within a row (computed in JS). No legend, no axes —
   the column / row headers carry the labels. Scrolls horizontally on narrow
   viewports rather than wrapping cells out of row alignment. */
.sm-wrap {
  margin-bottom: var(--sp-10);
}
.sm-grid {
  display: grid;
  gap: 4px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  overflow-x: auto;
  align-items: stretch;
}
.sm-corner {
  /* Top-left empty cell — placeholder so row-label/col-header alignment works. */
}
.sm-col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  padding: 8px 6px 10px;
  border-bottom: 2px solid var(--loc-color, var(--border));
}
/* #140 — column-header now stacks: name (caps small) / value (Fraunces big) / chip. */
.sm-col-header .sm-col-name {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sm-col-header .sm-col-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.sm-col-header .sm-col-chip { margin-top: 1px; }
.sm-col-header .sm-col-noval {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  font-style: italic;
}
.sm-row-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: right;
  padding: 0 12px 0 4px;
  align-self: center;
  white-space: nowrap;
}
.sm-cell {
  height: 56px;
  position: relative;
  padding: 4px 2px;
  border-radius: var(--r-sm);
}
.sm-cell--alert {
  background: rgba(248, 113, 113, 0.10);
  outline: 1px solid rgba(248, 113, 113, 0.35);
}
.sm-legend {
  margin-top: var(--sp-2);
  text-align: right;
}
.sm-legend-text {
  font-size: 10px;
  color: var(--muted);
  font-style: italic;
}

/* ===========================================================================
   9. Forms / inputs / buttons
   =========================================================================== */
.field-label, label.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

input[type="text"], input[type="password"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(55, 138, 120, 0.20);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  text-decoration: none;
}
.btn:hover { border-color: var(--teal); color: var(--teal-light); }
.btn--primary {
  background: linear-gradient(135deg, var(--teal-light), var(--teal));
  color: var(--bg);
  border-color: transparent;
  font-weight: 700;
  padding: 12px 16px;
  font-size: 13px;
  width: 100%;
}
.btn--primary:hover { filter: brightness(1.08); color: var(--bg); border-color: transparent; }
.btn--primary:active { transform: translateY(1px); }
.btn--confirm { background: rgba(55, 138, 120, 0.20); color: var(--teal-light); border-color: rgba(55, 138, 120, 0.50); }
.btn--confirm:hover { background: rgba(55, 138, 120, 0.32); color: var(--teal-light); }
.btn--override { background: rgba(251, 191, 36, 0.15); color: var(--yellow); border-color: rgba(251, 191, 36, 0.40); }
.btn--override:hover { background: rgba(251, 191, 36, 0.28); color: var(--yellow); border-color: rgba(251, 191, 36, 0.55); }
.btn--danger { color: var(--red); border-color: rgba(248, 113, 113, 0.40); background: rgba(248, 113, 113, 0.08); }
.btn--danger:hover { color: #fca5a5; border-color: var(--red); background: rgba(248, 113, 113, 0.15); }
.btn--sm { padding: 6px 10px; font-size: 11px; }

.row-check { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.row-check input { width: auto; }
.row-check label { margin: 0; text-transform: none; font-size: 13px; color: var(--text); letter-spacing: 0; }

/* ===========================================================================
   10. Date-span chip control (dashboard.html chips)
   =========================================================================== */
.span-control {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-6);
  margin-bottom: var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.span-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-right: 4px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: inherit;
  white-space: nowrap;
}
.chip-btn:hover  { border-color: var(--teal); color: var(--teal-light); background: rgba(55, 138, 120, 0.08); }
.chip-btn.active { border-color: var(--teal); color: var(--teal-light); background: rgba(55, 138, 120, 0.18); }

.custom-range { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-left: auto; }
.custom-range label { font-size: 11px; color: var(--muted); font-weight: 500; }
.custom-range input[type=date] { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-size: 12px; font-family: inherit; padding: 5px var(--sp-2); width: auto; }
.range-apply { font-size: 11px; font-weight: 600; padding: 6px 14px; border-radius: var(--r-sm); border: 1px solid var(--teal); background: rgba(55, 138, 120, 0.15); color: var(--teal-light); cursor: pointer; font-family: inherit; transition: background var(--duration-fast) var(--ease-out); }
.range-apply:hover { background: rgba(55, 138, 120, 0.30); }
.range-error { font-size: 11px; color: var(--red); font-weight: 600; display: none; }

/* Filter bar (overview page) */
.filter-bar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.filter-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 2px; }
.filter-btn {
  padding: 5px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--loc-color, var(--teal));
  color: var(--loc-color, var(--teal));
  background: transparent;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: inherit;
}
.filter-btn.active { background: var(--loc-color, var(--teal)); color: var(--bg); }
.filter-btn:hover { opacity: 0.85; }
.filter-btn-all { border-color: var(--muted); color: var(--muted); --loc-color: var(--muted); }
.filter-btn-all.active { background: var(--muted); color: var(--bg); }

/* ===========================================================================
   11. Location card (dashboard.html primary content)
   =========================================================================== */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(560px, 1fr));
  gap: var(--sp-6);
  margin-bottom: var(--sp-10);
  justify-content: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.location-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.location-card:hover { border-color: var(--teal); }

.location-header {
  padding: var(--sp-6) var(--sp-7, var(--sp-6)) var(--sp-5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(55, 138, 120, 0.06), transparent);
}
.location-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 24, "SOFT" 30;
}
.location-period { font-size: 12px; color: var(--muted); margin-top: 4px; }
.location-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--teal-glow);
  color: var(--teal-light);
  border: 1px solid rgba(55, 138, 120, 0.25);
}

/* WTD pulse dot used inside live-badge variants */
.wtd-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: ss-pulse 1.6s infinite;
  flex: none;
  display: inline-block;
}

/* WTD KPI row (mini variant) */
.wtd-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.kpi-mini { text-align: center; padding: 0 var(--sp-3); }
.kpi-mini + .kpi-mini { border-left: 1px solid var(--border); }
.kpi-mini-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.kpi-mini-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi-mini-value.green { color: var(--green); }
.kpi-mini-value.blue  { color: var(--blue); }
.kpi-mini-value.gold  { color: var(--gold-light); }

/* Pipeline / funnel */
.pipeline { padding: var(--sp-5) var(--sp-7, var(--sp-6)); border-bottom: 1px solid var(--border); }
.pipeline-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--sp-3);
}
.funnel-steps { display: flex; align-items: center; gap: 0; }
.funnel-step {
  flex: 1;
  text-align: center;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 10px var(--sp-2);
  position: relative;
}
.funnel-step:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.funnel-step:last-child  { border-radius: 0 var(--r-md) var(--r-md) 0; }
.funnel-step + .funnel-step { border-left: none; }
.funnel-step.active { background: rgba(55, 138, 120, 0.12); border-color: rgba(55, 138, 120, 0.35); }
.funnel-n {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.funnel-n.green { color: var(--green); }
.funnel-n.blue  { color: var(--blue); }
.funnel-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.funnel-pct { font-size: 10px; color: var(--teal-light); margin-top: 2px; font-weight: 600; }

/* Ad table (inside location card) */
.ad-table-section { padding: var(--sp-5) var(--sp-7, var(--sp-6)) var(--sp-6); }
.ad-table { width: 100%; border-collapse: collapse; }
.ad-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}
.ad-table th:not(:first-child) { text-align: right; }
.ad-table td  { padding: 10px 0; border-bottom: 1px solid rgba(30, 61, 85, 0.5); font-size: 13px; }
.ad-table tr:last-child td { border-bottom: none; }
.ad-table td:not(:first-child) { text-align: right; }
.ad-name-cell { display: flex; align-items: center; gap: var(--sp-2); }
.ad-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ad-dot.winner { background: var(--green); box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }
.ad-dot.rising { background: var(--yellow); }
.ad-dot.normal { background: var(--muted); }
.ad-dot.paused { background: var(--red); }

.badge-winner  { font-size: 9px; font-weight: 700; color: var(--green);  background: rgba(74, 222, 128, 0.10); border: 1px solid rgba(74, 222, 128, 0.25); padding: 2px 6px; border-radius: 4px; }
.badge-pause   { font-size: 9px; font-weight: 700; color: var(--red);    background: rgba(248, 113, 113, 0.10); border: 1px solid rgba(248, 113, 113, 0.25); padding: 2px 6px; border-radius: 4px; }
.badge-warning { font-size: 9px; font-weight: 700; color: var(--yellow); background: rgba(251, 191, 36, 0.10);  border: 1px solid rgba(251, 191, 36, 0.25);  padding: 2px 6px; border-radius: 4px; }
.val-green { color: var(--green); font-weight: 700; }
.val-red   { color: var(--red); }
.val-muted { color: var(--muted); }

.approx-mark { color: var(--yellow); font-weight: 700; margin-left: 2px; cursor: help; }
.approx-footnote {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-top: var(--sp-4);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.approx-footnote .approx-mark { font-style: normal; cursor: default; }

/* ===========================================================================
   11b. Hero KPI — single primary metric per page
   ---------------------------------------------------------------------------
   The page anchor. One giant value (Fraunces, 80px on desktop) + delta chip
   + inline sparkline + supporting context line. Used at the top of the
   per-location dashboard to give the eye somewhere to land.
   =========================================================================== */
.hero-kpi {
  background:
    radial-gradient(ellipse at top right, rgba(92, 191, 173, 0.10), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(224, 187, 122, 0.06), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-10);
  margin-bottom: var(--sp-6);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 1.2fr);
  gap: var(--sp-8);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-value {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 0.9;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.hero-value.is-good { color: var(--green); }
.hero-value.is-bad  { color: var(--red); }
.hero-delta-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}
.hero-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hero-delta.is-good {
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid rgba(74, 222, 128, 0.30);
}
.hero-delta.is-bad {
  color: var(--red);
  background: var(--red-glow);
  border: 1px solid rgba(248, 113, 113, 0.30);
}
.hero-delta.is-flat {
  color: var(--muted);
  background: rgba(122, 153, 180, 0.12);
  border: 1px solid rgba(122, 153, 180, 0.30);
}
.hero-context {
  font-size: 13px;
  color: var(--muted);
}
.hero-context strong {
  color: var(--text-soft);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hero-spark {
  position: relative;
  height: 88px;
  width: 100%;
}
.hero-spark-caption {
  font-size: 10px;
  color: var(--muted);
  margin-top: var(--sp-2);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

@media (max-width: 700px) {
  .hero-kpi {
    grid-template-columns: 1fr;
    padding: var(--sp-6) var(--sp-5);
    gap: var(--sp-4);
  }
  .hero-spark { height: 60px; }
}

/* ===========================================================================
   11c. Info tip — accessible inline tooltip / methodology explainer
   ---------------------------------------------------------------------------
   A small `?` circle that reveals a tooltip on hover or keyboard focus.
   Used to inline methodology that previously lived in page-bottom footnotes
   ("Warm" funnel step, booking-rate thresholds, the `*` reconstructed mark,
   etc). Tooltip is positioned above on desktop, below on mobile, and
   announced via aria-describedby for SRs.
   =========================================================================== */
.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid currentColor;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-ui);
  line-height: 1;
  cursor: help;
  position: relative;
  opacity: 0.7;
  transition: opacity var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.info-tip:hover, .info-tip:focus-visible {
  opacity: 1;
  color: var(--teal-light);
  outline: none;
  box-shadow: var(--focus-ring);
}
.info-tip > .info-tip-icon { pointer-events: none; }
.info-tip > .info-tip-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 8px 12px;
  background: var(--bg-deep);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-out);
  z-index: 50;
  text-align: left;
  white-space: normal;
}
.info-tip > .info-tip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--border) transparent transparent transparent;
}
.info-tip:hover > .info-tip-bubble,
.info-tip:focus-visible > .info-tip-bubble {
  opacity: 1;
}
.info-tip.info-tip--below > .info-tip-bubble {
  bottom: auto;
  top: calc(100% + 8px);
}
.info-tip.info-tip--below > .info-tip-bubble::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent var(--border) transparent;
}

/* ===========================================================================
   12. Summary cards (overview page tiles)
   =========================================================================== */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-10);
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-6);
  position: relative;
  overflow: hidden;
}
.summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}
.summary-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.summary-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  margin: var(--sp-2) 0 var(--sp-1);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 36, "SOFT" 30;
  font-variant-numeric: tabular-nums;
}
.summary-value.good { color: var(--green); }
.summary-value.gold { color: var(--gold-light); }
.summary-value.blue { color: var(--blue); }
.summary-delta { font-size: 12px; color: var(--muted); font-weight: 500; }
.summary-delta .up   { color: var(--green); font-weight: 700; }
.summary-delta .down { color: var(--red);   font-weight: 700; }

.summary-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-9, var(--sp-8)); }

/* Overview "loc-card" — per-location summary cards on the overview page */
.loc-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-left-width: 3px;
}
.loc-card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.loc-card-city  { font-size: 12px; color: var(--muted); margin: 2px 0 var(--sp-3); }
.loc-card-week  { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: var(--sp-2); }
.loc-card-stat  { font-size: 13px; color: var(--text); margin-top: 6px; display: flex; justify-content: space-between; gap: var(--sp-2); }
.loc-card-stat .k { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.loc-card-stat.muted { color: var(--muted); font-size: 12px; }

/* Highlights grid (overview page) */
.highlights-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4) 18px;
}
.highlight-card-metric { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--sp-3); }
.highlight-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.highlight-row:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.highlight-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; margin-bottom: 5px; display: inline-block; }
.badge-top   { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.badge-watch { background: rgba(248, 113, 113, 0.12); color: var(--red); }
.highlight-loc-name { font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 5px; }
.highlight-loc-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.highlight-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.highlight-trend { font-size: 11px; font-weight: 600; margin-top: 4px; }
.trend-good    { color: var(--green); }
.trend-bad     { color: var(--red); }
.trend-neutral { color: var(--muted); }
.trend-nodata  { color: var(--muted); font-style: italic; font-size: 10px; margin-top: 4px; }
.highlight-avg-note { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ===========================================================================
   13. Tables (comparison table, sessions table, shadow-mode table, etc.)
   =========================================================================== */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-table th,
.cmp-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(30, 61, 85, 0.6);
}
.cmp-table th:first-child,
.cmp-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
}
.cmp-table thead th { font-size: 11px; font-weight: 600; color: var(--muted); }
.cmp-table td.col-band-0, .cmp-table th.col-band-0 { background: rgba(55, 138, 120, 0.07); }
.cmp-table td.col-band-1, .cmp-table th.col-band-1 { background: rgba(96, 165, 250, 0.07); }
.cmp-table td.col-band-2, .cmp-table th.col-band-2 { background: rgba(245, 158, 11, 0.07); }
.cmp-table td.col-band-3, .cmp-table th.col-band-3 { background: rgba(167, 139, 250, 0.07); }
.cmp-table td.col-band-4, .cmp-table th.col-band-4 { background: rgba(248, 113, 113, 0.07); }
.cmp-table td.col-band-5, .cmp-table th.col-band-5 { background: rgba(45, 212, 191, 0.07); }
.cmp-table td.col-band-6, .cmp-table th.col-band-6 { background: rgba(236, 72, 153, 0.07); }
.cmp-table td.col-band-7, .cmp-table th.col-band-7 { background: rgba(251, 191, 36, 0.07); }
.cmp-table td.col-band-8, .cmp-table th.col-band-8 { background: rgba(34, 211, 238, 0.07); }
.cmp-table th.loc-head { color: var(--text); font-size: 12px; font-weight: 700; border-left: 3px solid var(--group-color, var(--border)); }
.cmp-table td.loc-group-start { border-left: 3px solid var(--group-color, var(--border)) !important; }
.cmp-table .cell-zero { color: var(--muted); }
.col-hidden { display: none !important; }

.table-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-7, var(--sp-6)); margin-bottom: var(--sp-10); }
.table-section h2 { font-size: 17px; font-weight: 700; font-family: var(--font-display); color: var(--text); margin-bottom: var(--sp-4); letter-spacing: -0.005em; }
.table-controls  { display: flex; align-items: center; gap: var(--sp-5); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.table-controls label { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: var(--sp-2); margin: 0; text-transform: none; letter-spacing: 0; }
.table-controls select { background: var(--surface-raised); width: auto; padding: 5px 10px; }
.table-subtitle { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 10px; }

/* Generic data table (used in shadow_mode, proposals, meta_ads pages) */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(30, 61, 85, 0.6); vertical-align: top; }
.data-table th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.data-table th.num, .data-table td.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .mono { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.data-table .payload-preview { font-family: var(--font-mono); font-size: 12px; color: var(--text); white-space: pre-wrap; word-break: break-word; max-width: 520px; }

/* ===========================================================================
   14. Specialty modules — keep them in here so they get shared too
   =========================================================================== */
/* Booking A/B arm grid */
.ss-arm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.ss-arm-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; }
.ss-arm-card .ss-arm-key { font-size: 13px; font-weight: 700; color: var(--teal-light); letter-spacing: 0.05em; margin-bottom: 10px; }
.ss-arm-card .ss-arm-stat { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0; font-size: 12px; }
.ss-arm-card .ss-arm-stat .v { font-weight: 700; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.ss-arm-card .ss-arm-meta { color: var(--muted); font-size: 11px; margin-top: var(--sp-2); }

/* CAPI tile grid */
.ss-capi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.ss-capi-tile { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px 20px; }
.ss-capi-tile .ss-capi-label { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: var(--sp-2); }
.ss-capi-tile .ss-capi-value { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.ss-capi-tile .ss-capi-sub { font-size: 11px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.ss-capi-tile .ss-capi-snippet { font-family: var(--font-mono); font-size: 11px; color: var(--text); background: var(--bg); padding: 6px 8px; border-radius: 6px; margin-top: var(--sp-2); word-break: break-all; }

/* Status row (shadow-mode) */
.status-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-8); }
.status-card { background: var(--surface); border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--r-md); padding: var(--sp-4) 18px; }
.status-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--sp-2); }
.status-card-value { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.status-card-sub { font-size: 11px; color: var(--muted); }

/* Proposal heatmap */
.heatmap { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; align-items: end; height: 90px; margin-bottom: var(--sp-2); }
.heat-cell { background: var(--teal-glow); border-radius: 4px 4px 0 0; position: relative; min-height: 4px; transition: background var(--duration-fast) var(--ease-out); }
.heat-cell.zero { background: rgba(122, 153, 180, 0.08); }
.heat-cell:hover { background: rgba(92, 191, 173, 0.45); }
.heat-cell .tip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 6px; background: var(--bg-deep); color: var(--text); font-size: 11px; padding: 4px 8px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--duration-fast) var(--ease-out); border: 1px solid var(--border); }
.heat-cell:hover .tip { opacity: 1; }
.heat-labels { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; font-size: 10px; color: var(--muted); text-align: center; }

/* Proposal card */
.proposal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-7, var(--sp-6)); margin-bottom: var(--sp-6); }
.proposal-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: 18px; }
.proposal-slug { font-size: 16px; font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.proposal-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.proposal-meta strong { color: var(--text); font-weight: 600; }

details.sessions { margin-top: var(--sp-4); }
details.sessions summary { font-size: 12px; color: var(--muted); cursor: pointer; padding: 6px 0; user-select: none; }
details.sessions summary:hover { color: var(--teal-light); }
details.sessions[open] summary { color: var(--text); font-weight: 600; }
table.sess { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
table.sess th, table.sess td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(30, 61, 85, 0.6); vertical-align: top; }
table.sess th { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
table.sess tr:last-child td { border-bottom: none; }
table.sess .num  { text-align: right; }
table.sess .mono { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.sec-list { font-size: 11px; color: var(--muted); }
.sec-list span { display: inline-block; background: var(--teal-glow); color: var(--teal-light); padding: 1px 6px; border-radius: 8px; margin: 1px 3px 1px 0; }

/* Meta ads warehouse summary card override */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); }
.summary-grid .summary-card { padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-raised); }
.summary-grid .summary-card::before { display: none; }
.summary-grid .summary-card .name { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; font-weight: 600; }
.summary-grid .summary-card .loc { font-size: 16px; font-weight: 700; margin-bottom: var(--sp-3); color: var(--text); }
.summary-grid .summary-card .metric { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12px; }
.summary-grid .summary-card .metric .label { color: var(--muted); }
.summary-grid .summary-card .metric .value { font-family: var(--font-mono); color: var(--gold-light); font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-grid .summary-card .metric.headline .value { color: var(--teal-light); font-size: 14px; }

.warning { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.40); color: var(--yellow); padding: 14px 18px; border-radius: var(--r-md); margin-bottom: var(--sp-4); font-size: 13px; }
.empty   { color: var(--muted); padding: var(--sp-6); text-align: center; }
.no-data { padding: 48px; text-align: center; color: var(--muted); font-style: italic; }

.truth-tag        { font-size: 9px; color: var(--teal-light); border: 1px solid rgba(92, 191, 173, 0.35); padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.meta-claimed-tag { font-size: 9px; color: var(--yellow);     border: 1px solid rgba(251, 191, 36, 0.35); padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.data-trust-note  { color: var(--muted); font-size: 11px; margin-top: var(--sp-2); line-height: 1.5; }

.flash { padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; font-weight: 600; margin-bottom: var(--sp-4); border: 1px solid; }
.flash.success { background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.40); color: var(--green); }
.flash.error   { background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.35); color: var(--red); }

/* Pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-4) 0; }
.pagination a {
  color: var(--teal-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.pagination a.disabled { color: var(--muted); pointer-events: none; opacity: 0.5; }
.pagination .count     { color: var(--muted); font-size: 12px; font-family: var(--font-mono); }

/* Review queue rows */
.queue-row {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  display: grid;
  grid-template-columns: 80px 1fr 320px;
  gap: var(--sp-4);
  align-items: start;
}
.queue-row .thumb,
.queue-row .thumb-placeholder { width: 80px; height: 80px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); object-fit: cover; display: block; }
.queue-row .thumb-placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 10px; text-align: center; }
.queue-row .context .ad-title    { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.queue-row .context .ad-meta     { font-size: 11px; color: var(--muted); margin-bottom: var(--sp-2); }
.queue-row .context .ad-meta code{ font-family: var(--font-mono); background: var(--surface); padding: 1px 6px; border-radius: 4px; font-size: 10px; }
.queue-row .context .ad-headline { font-size: 13px; color: var(--gold-light); margin-bottom: 4px; }
.queue-row .context .ad-primary  { font-size: 12px; color: var(--muted); line-height: 1.55; }
.queue-row .decision { display: flex; flex-direction: column; gap: var(--sp-2); }
.queue-row .decision .tag-row {
  display: flex; align-items: center; gap: var(--sp-2); font-size: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--sp-2) 10px;
}
.queue-row .decision .tag-row .dim {
  font-family: var(--font-mono); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; min-width: 130px;
}
.queue-row .decision .tag-row .val {
  font-family: var(--font-mono); color: var(--teal-light); font-weight: 700; font-size: 12px;
  background: rgba(55, 138, 120, 0.15); padding: 2px 8px; border-radius: 4px;
}
.queue-row .decision .tag-row .conf { font-family: var(--font-mono); color: var(--yellow); font-size: 11px; margin-left: auto; }
.queue-row .decision .rationale { font-size: 11px; color: var(--muted); line-height: 1.55; font-style: italic; border-left: 2px solid var(--border); padding-left: 10px; }
.queue-row .decision form.actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.queue-row .decision form.actions select { font-size: 11px; padding: 4px 8px; flex: 1 1 130px; min-width: 0; width: auto; }

/* Admin user table styling */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.user-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.user-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 var(--sp-2) 10px 0; border-bottom: 1px solid var(--border); }
.user-table td { padding: 12px var(--sp-2) 12px 0; border-bottom: 1px solid rgba(30, 61, 85, 0.45); vertical-align: top; }
.user-table tr:last-child td { border-bottom: none; }
.user-table .mono { font-family: var(--font-mono); font-size: 12px; color: var(--gold-light); }
.user-table .badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); background: rgba(55, 138, 120, 0.20); color: var(--teal-light); border: 1px solid rgba(55, 138, 120, 0.35); }
.user-table .badge.admin { background: rgba(224, 187, 122, 0.12); color: var(--gold-light); border-color: rgba(200, 147, 90, 0.35); }

/* Toast */
#toast {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  padding: var(--sp-4) 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  max-width: 360px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  display: none;
}
#toast.show { display: block; }
#toast.ok   { background: rgba(74, 222, 128, 0.15); border: 1px solid rgba(74, 222, 128, 0.40); color: var(--green); }
#toast.err  { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.35); color: var(--red); }

/* LTV section program-card */
.ltv-section          { margin-top: var(--sp-2); }
.ltv-data-note        { font-size: 12px; color: var(--muted); margin-top: var(--sp-4); padding: 0 2px; }
.ltv-program-card     { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-7, var(--sp-6)); margin-bottom: var(--sp-2); }
.chart-wrap--ltv-hbar { min-height: 220px; }

/* Hint / muted helper text */
.hint { font-size: 12px; color: var(--muted); margin-top: var(--sp-2); line-height: 1.55; }
.mut  { color: var(--muted); font-size: 12px; }

/* ===========================================================================
   15. Login card
   =========================================================================== */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px var(--sp-8) var(--sp-8);
  box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-7, var(--sp-6)); }
.login-brand-text { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.login-brand-sub  { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.login-hint       { margin-top: var(--sp-5); font-size: 12px; color: var(--muted); text-align: center; line-height: 1.55; }

/* Change-password page */
.cp-wrap { max-width: 440px; margin: 0 auto; padding: var(--sp-10) var(--sp-6); }
.cp-back { display: inline-block; margin-bottom: var(--sp-5); color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.cp-back:hover { color: var(--teal-light); }
.cp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-7, var(--sp-6)); }
.cp-msg  { margin-top: var(--sp-4); font-size: 13px; font-weight: 600; min-height: 1.2em; }
.cp-msg.err { color: var(--red); }
.cp-msg.ok  { color: var(--green); }
.cp-user { font-size: 12px; color: var(--muted); margin-bottom: var(--sp-4); }

/* ===========================================================================
   16. Responsive breakpoints
   =========================================================================== */
@media (max-width: 1100px) {
  .summary-strip   { grid-template-columns: repeat(2, 1fr); }
  .summary-cards   { grid-template-columns: 1fr; }
  .locations-grid  { grid-template-columns: 1fr; }
  .charts-row      { grid-template-columns: 1fr; }
  .kpi-grid--4     { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid--5     { grid-template-columns: repeat(2, 1fr); }
  .location-kpis   { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .location-kpis > .kpi + .kpi { border-left: none; }
  .wtd-kpis        { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .kpi-mini + .kpi-mini { border-left: none; }
  .status-row      { grid-template-columns: repeat(2, 1fr); }
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .main            { padding: var(--sp-5); }
  .header          { padding: var(--sp-3) var(--sp-5); }
  .span-control    { flex-direction: column; align-items: stretch; }
  .custom-range    { margin-left: 0; }
}
@media (max-width: 700px) {
  .page-title      { font-size: 24px; }
  .summary-value   { font-size: 26px; }
  .kpi-value       { font-size: 26px; }
  .kpi--hero .kpi-value { font-size: 40px; }
  .location-kpis   { grid-template-columns: 1fr; }
  .status-row      { grid-template-columns: 1fr; }
  .summary-strip   { grid-template-columns: 1fr; }
  .charts-row      { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
  .heatmap, .heat-labels { grid-template-columns: repeat(6, 1fr); }
  .heat-labels span:nth-child(n+7) { display: none; }
  .heat-cell:nth-child(n+7) { display: none; }
  .queue-row { grid-template-columns: 1fr; }
  .queue-row .thumb, .queue-row .thumb-placeholder { width: 100%; height: auto; aspect-ratio: 1; }
}
