/* ============================================================
   Seen NC — warm-dark editorial theme (working title)
   MOBILE-FIRST. Designed at a 390px phone from the frame out:
   one column, thumb-reachable bottom dock, big tap targets,
   a full-screen detail SHEET (not a side panel). Desktop is the
   SAME single column, just centered in a max-width rail — not a
   separate layout.

   Cousin of the corydickes / IGG family: Fraunces + Hanken
   Grotesk + JetBrains Mono, warm-dark base, dawn-marigold accent,
   sage->clay busyness scale (height carries magnitude, so color
   is redundant / CVD-safe).

   The distinctive layer is the TWO-VOICE copy system — the
   contrast IS the design:
     • VILLAIN voice (.v-*)  loud, lowercase, clay, jittery
     • RELIEF  voice (.r-*)  calm, serif, sage, low
   Brand name is set at runtime from brand.js (one-edit swap).
   ============================================================ */

:root {
  /* --- warm-dark surfaces (espresso / ink) --- */
  --ink-950: #17110d;
  --ink-900: #1c150f;
  --ink-850: #221a13;
  --ink-800: #291f17;
  --ink-750: #32261c;
  --card:    #241c15;
  --card-hi: #2c2219;

  /* --- ink / paper text --- */
  --paper:     #f3ead9;
  --paper-dim: #ccbda6;
  --muted:     #97876f;
  --faint:     #6c5f4c;

  /* --- lines --- */
  --line:      rgba(243, 234, 217, 0.09);
  --line-soft: rgba(243, 234, 217, 0.05);
  --line-hi:   rgba(243, 234, 217, 0.16);

  /* --- dawn-marigold accent --- */
  --amber:      #e8a24e;
  --amber-hi:   #f3b968;
  --amber-deep: #c07a2c;

  /* --- busyness scale (also used as status) --- */
  --sage:  #7fb08a;   /* quiet / good  */
  --sage-hi:#96c6a1;
  --amber-mid: #e0a755; /* moderate */
  --clay:  #d67150;   /* busy */
  --clay-hi:#e2865f;

  --radius: 15px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -22px rgba(0,0,0,0.85);
  --shadow-sm: 0 8px 22px -14px rgba(0,0,0,0.8);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* thumb ergonomics */
  --tap: 44px;                 /* minimum tap target, everywhere */
  --dock-h: 74px;              /* height of the bottom control dock */
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--paper);
  background:
    radial-gradient(120% 60% at 88% -6%, rgba(232,162,78,0.16), transparent 55%),
    radial-gradient(90% 55% at -8% 6%, rgba(214,113,80,0.10), transparent 50%),
    linear-gradient(180deg, var(--ink-900), var(--ink-950));
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overscroll-behavior-y: none;
}

/* film grain / paper tooth */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(232,162,78,0.28); color: var(--paper); }

/* ---------- focus visibility (accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 3px;
  border-radius: 6px;
}
button:focus-visible, .office:focus-visible, .from-picker:focus-within { outline-offset: 2px; }

/* ============================================================
   APP COLUMN — the single mobile column, centered on desktop.
   Bottom padding clears the fixed dock so the last list row and
   footer are never hidden behind it.
   ============================================================ */
.app {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 720px;               /* desktop = same column, just capped */
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 26px);
  padding-bottom: calc(var(--dock-h) + var(--safe-b) + 26px);
}

/* ===================== MASTHEAD / HERO ===================== */
.masthead { padding: 22px 0 4px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { color: var(--amber); display: inline-flex; filter: drop-shadow(0 2px 8px rgba(232,162,78,0.35)); }
.brand__word {
  font-family: var(--serif); font-weight: 600; font-size: 20px;
  letter-spacing: -0.01em;
}
.brand__tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--faint);
  border: 1px solid var(--line-hi); border-radius: 999px;
  padding: 3px 8px; align-self: center;
}

.masthead__lede { padding: 26px 0 4px; }
.masthead__tagline {
  margin: 18px 0 0; font-family: var(--serif); font-style: italic;
  font-size: 15px; color: var(--sage-hi);
}

/* ===================== TRANSACTION SELECTOR ===================== */
.txbar {
  position: relative; z-index: 2;
  margin: 22px 0 0;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  padding: 15px 15px 16px;
}
.txbar__q {
  display: block; margin-bottom: 11px;
  font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--paper);
}
/* horizontal, one-thumb-swipeable chip row on phone */
.txchips {
  display: flex; gap: 8px;
  overflow-x: auto; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  margin: 0 -3px; padding: 3px 3px 5px;
  scrollbar-width: none;
}
.txchips::-webkit-scrollbar { display: none; }
.txchip {
  flex: 0 0 auto; scroll-snap-align: start;
  font-family: var(--sans); font-weight: 600; font-size: 13.5px;
  color: var(--paper-dim); background: var(--card); cursor: pointer;
  border: 1px solid var(--line-hi); border-radius: 999px;
  min-height: var(--tap); padding: 9px 15px;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  transition: border-color .18s, color .18s, background .18s, transform .12s;
}
.txchip:active { transform: scale(0.97); }
.txchip.is-active { color: var(--ink-950); background: linear-gradient(180deg, var(--amber-hi), var(--amber)); border-color: transparent; box-shadow: 0 4px 14px -6px rgba(232,162,78,0.6); }
/* County-restricted chips carry ONE subtle flag (statewide is the silent
   default). A small clay dot + lowercase word, not a loud pill/chip. */
.txchip__scope {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em;
  text-transform: lowercase; color: var(--clay-hi); opacity: 0.9;
}
.txchip__scope::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--clay); flex-shrink: 0;
}
.txchip.is-active .txchip__scope { color: rgba(23,17,13,0.72); }
.txchip.is-active .txchip__scope::before { background: rgba(23,17,13,0.55); }

/* The note reads as ONE clean sentence: normal inline text flow (no flex
   fragmenting the {label}/any spans into pill-like chips), roomy leading. */
.txbar__note {
  margin: 11px 0 0; font-size: 12.5px; line-height: 1.6;
  color: var(--paper-dim);
}
/* Gently-emphasized words — brighter paper, a hair heavier — not loud chips. */
.txbar__note--ok { display: block; }
.txbar__note--ok b { color: var(--paper); font-weight: 600; }
/* Only the county WARNING keeps the icon + panel (its honesty matters). */
.txbar__note--warn {
  display: flex; gap: 9px; align-items: flex-start;
  background: rgba(214,113,80,0.09); border: 1px dashed rgba(214,113,80,0.4);
  border-radius: 12px; padding: 11px 13px;
}
.txbar__note--warn svg { color: var(--clay-hi); flex-shrink: 0; margin-top: 1px; }
.txbar__note--warn b { color: var(--clay-hi); }

/* ===================== HOME (ranked list) ===================== */
.home { margin-top: 26px; }
.rail-list__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.rail-list__head h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; font-size: 21px; }
.rail-list__count { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

/* live freshness — stacks under the count on the right of the list head */
.rail-list__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; min-width: 0; }
.rail-list__fresh {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  letter-spacing: 0.02em; white-space: nowrap; line-height: 1;
  display: inline-flex; align-items: center; gap: 5px;
}
.rail-list__fresh:empty { display: none; }
.fresh-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
  background: var(--sage-hi);
  animation: fresh-pulse 2.6s ease-out infinite;
}
.fresh-dot--stale { background: var(--muted); animation: none; box-shadow: none; }
@keyframes fresh-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(122,168,116,0.45); }
  70%  { box-shadow: 0 0 0 5px rgba(122,168,116,0); }
  100% { box-shadow: 0 0 0 0 rgba(122,168,116,0); }
}
/* auto-refresh re-render: suppress the entrance animations so a live
   data swap updates in place instead of flashing / re-animating rows. */
.office--static { animation: none !important; }
.bar--static { animation: none !important; }

.offices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.office {
  position: relative; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 14px;
  min-height: 66px;
  color: var(--paper); font-family: var(--sans);
  transition: transform .16s cubic-bezier(.2,.7,.3,1), border-color .18s, background .18s, box-shadow .18s;
}
.office:active { transform: scale(0.985); background: var(--card-hi); }
.office.is-selected {
  border-color: var(--amber);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: 0 0 0 1px var(--amber), var(--shadow-sm);
}
.office.is-selected::before {
  content: ""; position: absolute; left: -1px; top: 13px; bottom: 13px; width: 3px;
  border-radius: 3px; background: linear-gradient(var(--amber-hi), var(--amber-deep));
}

.office__rank {
  font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--faint);
  text-align: center; letter-spacing: -0.02em;
}
.office.is-selected .office__rank { color: var(--amber); }

.office__body { min-width: 0; }
.office__name { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; }
.office__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 5px; font-size: 12.5px; color: var(--muted);
}
.office__meta .mono { font-family: var(--mono); color: var(--paper-dim); }
.office__dot { color: var(--faint); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
  font-family: var(--mono);
}
.pill--lowconf { background: rgba(151,135,111,0.14); color: var(--paper-dim); border: 1px dashed var(--line-hi); }
.pill--quiet { background: rgba(127,176,138,0.16); color: var(--sage-hi); }
.pill--busy { background: rgba(214,113,80,0.16); color: var(--clay-hi); }
.pill--daytrip {
  background: rgba(127,176,138,0.10); color: var(--sage-hi);
  border: 1px solid rgba(127,176,138,0.3); text-transform: none; letter-spacing: 0.01em;
}
.pill--stayover {
  background: rgba(232,162,78,0.12); color: var(--amber-hi);
  border: 1px solid rgba(232,162,78,0.32); text-transform: none; letter-spacing: 0.01em;
}

/* quietness score badge + micro sparkline */
.office__score { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.score-num { font-family: var(--mono); font-weight: 600; font-size: 20px; line-height: 1; letter-spacing: -0.02em; }
.score-num small { font-size: 10px; color: var(--muted); font-weight: 500; margin-left: 1px; }
.score-cap { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--faint); }
.spark { display: flex; align-items: flex-end; gap: 1.5px; height: 20px; }
.spark i { width: 3px; border-radius: 2px 2px 0 0; background: var(--faint); display: block; }

/* feedBlind list marker — the state's wait feed can't see this big-city office.
   Honest "not measured" (muted/neutral, a clay-tinted eye-off), plus a small
   tappable "why?"; the whole ≥66px row opens the detail explainer. NO score,
   NO busyness bars. Distinct from the generic "no data yet" pill. */
.office__score--feedblind { justify-content: center; gap: 6px; }
.office__notmeasured {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--muted); text-transform: lowercase;
}
.office__notmeasured svg { color: var(--clay); opacity: 0.85; flex-shrink: 0; }
.office__nm-label { white-space: nowrap; }
.office__why {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--amber);
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(232,162,78,0.5);
}
.office:active .office__why { color: var(--amber-hi); }

.rail-list__foot {
  margin: 18px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--faint);
  border-top: 1px dashed var(--line); padding-top: 12px;
}

/* "+ N more offices statewide" — the honest tail on the capped list. */
.office-more {
  margin-top: 4px; padding: 13px 14px;
  font-size: 12px; line-height: 1.5; color: var(--faint);
  text-align: center;
  border: 1px dashed var(--line); border-radius: 12px;
  background: rgba(0,0,0,0.18);
}

/* ===================== COLOPHON ===================== */
.colophon {
  margin: 28px 0 0; padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted);
}
.colophon__dot { color: var(--faint); }
.colophon__mono { font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: 0.05em; }

/* ============================================================
   BOTTOM DOCK — the thumb zone. Fixed to the bottom, safe-area
   padded, always reachable one-handed. Two big controls:
   Sort/tune (opens the tune sheet) and the origin picker.
   ============================================================ */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(28,21,15,0.82), rgba(23,17,13,0.96));
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border-top: 1px solid var(--line-hi);
  padding-bottom: var(--safe-b);
}
.dock__inner {
  max-width: 720px; margin: 0 auto;
  padding: 10px clamp(14px, 4vw, 22px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch;
}
.dock__btn, .dock__from {
  display: flex; align-items: center; gap: 11px;
  min-height: 54px; padding: 8px 14px;
  background: var(--ink-850); border: 1px solid var(--line-hi);
  border-radius: 14px;
}
.dock__btn { cursor: pointer; color: var(--paper); text-align: left; font-family: var(--sans); transition: border-color .18s, background .18s, transform .12s; }
.dock__btn:active { transform: scale(0.98); background: var(--ink-800); }
.dock__btn svg { color: var(--amber); flex-shrink: 0; }
.dock__col { display: flex; flex-direction: column; min-width: 0; }
.dock__k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.dock__v { font-weight: 700; font-size: 14.5px; color: var(--paper); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__from { flex-direction: column; align-items: stretch; gap: 3px; justify-content: center; padding: 7px 12px; }

/* origin picker — styled <select>, big tap target */
.from-picker {
  position: relative; display: flex; align-items: center; gap: 7px;
}
.from-picker svg { color: var(--amber); flex-shrink: 0; }
.from-picker::after {
  content: ""; width: 7px; height: 7px; margin-left: auto; pointer-events: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}
.from-select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: 14.5px; font-weight: 700; color: var(--paper);
  background: transparent; border: 0; outline: none; padding: 0 4px 0 0;
  width: 100%; min-height: 30px; letter-spacing: -0.01em;
}
/* native option menu paints in OS colors — force legible dark-on-paper */
.from-select option { color: #17110d; background: #f3ead9; font-weight: 600; }

/* ============================================================
   TUNE SHEET — bottom sheet for sort rail + weight slider.
   ============================================================ */
.tune {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.tune[hidden] { display: none; }
.tune__scrim { position: absolute; inset: 0; background: rgba(10,7,4,0.55); backdrop-filter: blur(2px); animation: fade .22s ease both; }
.tune__panel {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border-top: 1px solid var(--line-hi);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  padding: 8px clamp(18px, 5vw, 26px) calc(24px + var(--safe-b));
  max-width: 720px; margin: 0 auto; width: 100%;
  animation: sheet-up .28s cubic-bezier(.2,.8,.3,1) both;
}
.tune__grip { width: 42px; height: 5px; border-radius: 999px; background: var(--line-hi); margin: 8px auto 6px; }
.tune__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tune__head h2 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 0; }
.tune__done {
  font-family: var(--sans); font-weight: 700; font-size: 14px; color: var(--ink-950);
  background: linear-gradient(180deg, var(--amber-hi), var(--amber)); border: 0; cursor: pointer;
  border-radius: 999px; min-height: var(--tap); padding: 8px 20px;
}

.control { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.control + .control { border-top: 1px solid var(--line); }
.control__label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--muted);
}
.control__label-lo { color: var(--faint); text-transform: none; letter-spacing: 0.02em; }

/* segmented sort control — full width, big targets */
.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  background: var(--ink-800); border: 1px solid var(--line);
  border-radius: 14px;
}
.seg {
  font-family: var(--sans); font-size: 13.5px; font-weight: 700;
  color: var(--paper-dim); background: transparent;
  border: 0; min-height: var(--tap); padding: 8px 10px; border-radius: 11px; cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s; white-space: nowrap;
}
.seg:active { color: var(--paper); }
.seg.is-active {
  color: var(--ink-950);
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  box-shadow: 0 4px 14px -6px rgba(232,162,78,0.6);
}

/* weight slider */
.weight__labels { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; font-weight: 600; }
.weight__end { display: flex; flex-direction: column; color: var(--paper-dim); }
.weight__end small { font-weight: 400; font-size: 10.5px; color: var(--muted); letter-spacing: 0.02em; }
.weight__end--right { text-align: right; align-items: flex-end; }
.weight__slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px;
  border-radius: 999px; cursor: pointer; margin: 2px 0;
  background: linear-gradient(90deg, var(--sage) 0%, var(--amber) 52%, var(--clay) 100%);
}
.weight__slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6e8, var(--amber));
  border: 2px solid var(--ink-950);
  box-shadow: 0 3px 12px -2px rgba(0,0,0,0.7), 0 0 0 4px rgba(232,162,78,0.18);
  transition: transform .12s;
}
.weight__slider::-webkit-slider-thumb:active { transform: scale(1.1); }
.weight__slider::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink-950);
  background: radial-gradient(circle at 35% 30%, #fff6e8, var(--amber));
  box-shadow: 0 3px 12px -2px rgba(0,0,0,0.7);
}
.weight__track-note { font-size: 12px; color: var(--muted); font-style: italic; min-height: 16px; }

/* ============================================================
   DETAIL SHEET — full-screen page for one office. Slides up from
   the bottom with a sticky back bar; the body scrolls with
   momentum. This REPLACES the old two-column side panel.
   ============================================================ */
.sheet {
  position: fixed; inset: 0; z-index: 70;
  display: flex; justify-content: center;
}
.sheet[hidden] { display: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(10,7,4,0.5); animation: fade .2s ease both; }
.sheet__panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 720px;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 40% at 100% 0%, rgba(232,162,78,0.08), transparent 55%),
    var(--ink-900);
  box-shadow: var(--shadow);
  animation: sheet-up .3s cubic-bezier(.2,.8,.3,1) both;
}
.sheet__bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px;
  min-height: 56px;
  background: linear-gradient(180deg, rgba(28,21,15,0.96), rgba(28,21,15,0.86));
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.sheet__back {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-weight: 700; font-size: 14.5px; color: var(--paper);
  background: var(--ink-800); border: 1px solid var(--line-hi); cursor: pointer;
  min-height: var(--tap); padding: 8px 15px 8px 11px; border-radius: 999px;
  transition: background .16s, transform .12s;
}
.sheet__back:active { transform: scale(0.97); background: var(--ink-750); }
.sheet__back svg { color: var(--amber); }
.sheet__title {
  font-family: var(--serif); font-weight: 600; font-size: 15.5px; color: var(--paper-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.sheet__body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(28px + var(--safe-b));
}

/* lock background scroll while a sheet (detail or tune) is open */
body.modal-open { overflow: hidden; }

/* ---------- detail hero ---------- */
.detail__hero {
  padding: 22px clamp(18px, 5vw, 30px) 18px;
  border-bottom: 1px solid var(--line); position: relative;
}
.detail__eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--amber); margin: 0 0 8px;
}
.detail__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.75rem, 7vw, 2.2rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
.detail__sub { margin: 8px 0 0; font-size: 13.5px; color: var(--paper-dim); }
.detail__sub .mono { font-family: var(--mono); color: var(--paper); }

.detail__daytrip, .detail__stayover {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 13px;
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: 0.01em;
  border-radius: 999px; padding: 7px 13px;
}
.detail__daytrip { color: var(--sage-hi); background: rgba(127,176,138,0.1); border: 1px solid rgba(127,176,138,0.32); }
.detail__stayover { color: var(--amber-hi); background: rgba(232,162,78,0.1); border: 1px solid rgba(232,162,78,0.34); }
.detail__daytrip svg, .detail__stayover svg { flex-shrink: 0; }

/* Directions CTA — primary, thumb-reachable "take me there" (≥44px) */
.detail__directions {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 15px; min-height: 44px; padding: 11px 20px;
  font-family: var(--sans); font-weight: 700; font-size: 14.5px; letter-spacing: 0.01em;
  color: var(--ink-900); text-decoration: none;
  background: linear-gradient(180deg, var(--amber-hi), var(--amber-deep));
  border-radius: 12px; box-shadow: 0 3px 12px -3px rgba(0,0,0,0.55);
  transition: filter .16s, transform .16s;
}
.detail__directions svg { flex-shrink: 0; }
.detail__directions:active { filter: brightness(1.08); transform: translateY(1px); }
.detail__directions:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.detail__tx-annot {
  margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--paper-dim);
  padding: 9px 11px; border-radius: 10px;
  background: rgba(214,113,80,0.08); border: 1px dashed rgba(214,113,80,0.35);
}
.detail__tx-annot b { color: var(--clay-hi); }

/* "you won't make it today" — top-of-sheet caution override.
   Clay/amber caution tone (on our side, honest), never a scary red.
   Full-bleed block that lands right under the hero, before anything
   sells the trip. Redirect branch carries a sage "take me there" CTA. */
.wontmakeit {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 0; padding: 15px clamp(18px, 5vw, 30px);
  background: rgba(214,113,80,0.11);
  border-bottom: 1px solid var(--line);
  border-left: 4px solid var(--clay);
}
.wontmakeit__icon { color: var(--clay-hi); flex-shrink: 0; margin-top: 1px; }
.wontmakeit__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wontmakeit__text { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--paper); }
.wontmakeit__text b { font-family: var(--mono); color: var(--clay-hi); }
.wontmakeit--redirect { background: rgba(214,113,80,0.09); }
.wontmakeit__cta {
  align-self: flex-start; min-height: var(--tap);
  font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
  color: var(--ink-950); cursor: pointer; border: 0; border-radius: 999px;
  padding: 11px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(180deg, var(--sage-hi), var(--sage));
  box-shadow: 0 6px 18px -8px rgba(127,176,138,0.7); transition: transform .12s;
}
.wontmakeit__cta:active { transform: scale(0.985); }
.wontmakeit__cta:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* arrival caption recolored to the same caution tone when it's a lost cause */
.busy__arrival--warn {
  background: rgba(214,113,80,0.11); border-left-color: var(--clay); color: var(--paper);
}
.busy__arrival--warn b { color: var(--clay-hi); }

/* subtle "too late today" list-row flag (only ever set during open hours) */
.office__late { font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; color: var(--clay-hi); opacity: 0.9; white-space: nowrap; }

/* verdict tiles row — 3 across, holds at 390px */
.verdicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.verdict { background: var(--ink-850); padding: 14px clamp(10px, 3vw, 20px); }
.verdict__k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.verdict__v { font-family: var(--mono); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; margin-top: 4px; line-height: 1; }
.verdict__note { font-size: 10.5px; color: var(--muted); margin-top: 5px; }

/* busyness meter */
.busy { padding: 20px clamp(18px, 5vw, 30px) 22px; border-bottom: 1px solid var(--line); }
.busy__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.busy__head h3 { font-family: var(--serif); font-weight: 600; font-size: 18px; margin: 0; }
.busy__esttag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber); border: 1px solid rgba(232,162,78,0.4); border-radius: 999px; padding: 3px 9px;
}
.busy__readout { margin: 6px 0 8px; font-size: 13px; color: var(--paper-dim); min-height: 20px; }
.busy__readout b { font-family: var(--mono); color: var(--paper); }

/* arrival caption — "around when you'd pull up" (honest, aria-live) */
.busy__arrival {
  margin: 0 0 16px; padding: 8px 11px;
  font-size: 12.5px; line-height: 1.5; color: var(--paper-dim);
  background: rgba(232,162,78,0.07); border-left: 2px solid var(--amber-deep);
  border-radius: 0 8px 8px 0;
}
.busy__arrival:empty { display: none; }
.busy__arrival b { font-family: var(--mono); color: var(--amber-hi); }

.chart { display: grid; grid-template-columns: 1fr; gap: 9px; }
.chart__bars {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  align-items: end; gap: 5px; height: 128px; position: relative; padding-top: 18px;
}
.bar-wrap { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; cursor: pointer; }
.bar { border-radius: 4px 4px 2px 2px; min-height: 4px; transition: filter .18s, opacity .2s; transform-origin: bottom; }
.bar-wrap:active .bar { filter: brightness(1.18); }
.bar-wrap.is-now .bar { box-shadow: 0 0 0 2px var(--ink-850), 0 0 0 3.5px currentColor; }
.bar--q { background: linear-gradient(180deg, var(--sage-hi), var(--sage)); color: var(--sage); }
.bar--m { background: linear-gradient(180deg, var(--amber-hi), var(--amber)); color: var(--amber); }
.bar--b { background: linear-gradient(180deg, var(--clay-hi), var(--clay)); color: var(--clay); }
.bar--lc { background-image: repeating-linear-gradient(135deg, rgba(151,135,111,0.5) 0 4px, rgba(151,135,111,0.14) 4px 8px); color: var(--muted); opacity: 0.85; }
.bar-wrap.is-best .bar::after {
  content: "▾"; position: absolute; top: -17px; left: 50%; transform: translateX(-50%);
  color: var(--sage-hi); font-size: 11px;
}
.chart__axis { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; }
.chart__axis span { font-family: var(--mono); font-size: 9.5px; color: var(--faint); text-align: center; }
.chart__axis span.is-now { color: var(--amber); font-weight: 600; }
.chart__axis span { position: relative; }
.chart__axis span.is-arrival { color: var(--amber-hi); font-weight: 700; }
.chart__axis span.is-arrival .axis-you {
  display: block; margin-top: 2px;
  font-family: var(--sans); font-style: normal; font-weight: 700;
  font-size: 8px; letter-spacing: 0.04em; text-transform: lowercase;
  color: var(--ink-900); background: var(--amber-hi);
  border-radius: 3px; padding: 1px 0; line-height: 1.3;
}

/* scrubber — big thumb */
.scrub { margin-top: 18px; }
.scrub__labels { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-bottom: 7px; }
.scrub__slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 7px; border-radius: 999px;
  background: var(--ink-750); cursor: pointer;
}
.scrub__slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--amber-deep);
  box-shadow: 0 2px 8px -1px rgba(0,0,0,0.6);
}
.scrub__slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 2px solid var(--amber-deep); }

.lowconf-banner {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 16px; padding: 12px 14px;
  background: rgba(151,135,111,0.09); border: 1px dashed var(--line-hi);
  border-radius: var(--radius-sm); font-size: 12.5px; color: var(--paper-dim); line-height: 1.5;
}
.lowconf-banner svg { color: var(--muted); flex-shrink: 0; margin-top: 1px; }
.lowconf-banner b { color: var(--paper); }

/* real-minutes meter summary + honest confidence footnote */
.busy__summary { margin: 4px 0 6px; font-size: 12px; color: var(--muted); }
.busy__summary:empty { display: none; }
.busy__conf {
  margin: 14px 0 0; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: lowercase; color: var(--faint);
}

/* story strip — stacks on phone */
.story { padding: 20px clamp(18px, 5vw, 30px); border-bottom: 1px solid var(--line); }
.story h3 { font-family: var(--serif); font-weight: 600; font-size: 16px; margin: 0 0 12px; }
.story__steps { display: grid; grid-template-columns: 1fr; gap: 10px; }
.step { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; position: relative; }
.step__n { font-family: var(--mono); font-size: 10px; color: var(--amber); letter-spacing: 0.1em; }
.step__t { font-weight: 600; font-size: 13.5px; margin-top: 5px; }
.step__d { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.story__punch {
  margin-top: 14px; font-size: 13px; line-height: 1.55; color: var(--paper-dim);
  padding-left: 13px; border-left: 2px solid var(--amber);
}
.story__punch b { color: var(--amber-hi); font-weight: 600; }

/* lodging */
.lodging { padding: 20px clamp(18px, 5vw, 30px) 26px; }
.lodging__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.lodging__head h3 { font-family: var(--serif); font-weight: 600; margin: 0; font-size: 17px; }
.lodging__powered { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; color: var(--amber); white-space: nowrap; }
.lodging__sub { font-size: 12px; color: var(--muted); margin: 0 0 15px; }
.lodging__sub .mono { font-family: var(--mono); color: var(--paper-dim); }
.rooms { display: flex; flex-direction: column; gap: 11px; }
.room {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px;
}
.room__name { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.room__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; font-size: 12px; color: var(--muted); }
.room__meta .mono { font-family: var(--mono); }
.stars { color: var(--amber); font-size: 12px; letter-spacing: 1px; }
.room__tag { font-size: 10.5px; color: var(--sage-hi); font-weight: 600; }
.room__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.room__price { font-family: var(--mono); }
.room__price b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.room__price small { color: var(--muted); font-size: 11px; }
.book {
  font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: 0.01em;
  color: var(--ink-950); cursor: pointer; border: 0; border-radius: 999px;
  min-height: var(--tap); padding: 9px 18px; display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  box-shadow: 0 5px 16px -8px rgba(232,162,78,0.7); transition: transform .12s, box-shadow .18s;
}
.book:active { transform: scale(0.97); }
.book.is-booked { background: rgba(127,176,138,0.2); color: var(--sage-hi); box-shadow: none; }
.lodging__soon {
  padding: 16px; border: 1px dashed var(--line-hi); border-radius: var(--radius-sm);
  background: rgba(151,135,111,0.06); font-size: 13px; color: var(--paper-dim); line-height: 1.55;
}
.lodging__disclose { margin: 15px 2px 0; font-size: 10.5px; color: var(--faint); line-height: 1.5; }

/* ============================================================
   ===============  TWO-VOICE COPY SYSTEM  ====================
   ============================================================ */
.v-eyebrow {
  font-family: var(--sans); font-weight: 800; font-size: 12px;
  text-transform: lowercase; letter-spacing: 0.02em;
  color: var(--clay-hi); margin: 0 0 10px;
  display: inline-flex; align-items: center; gap: 8px;
}
.v-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--clay); display: inline-block; }
.v-hot { color: var(--clay-hi); font-weight: 800; }
.onseen { position: relative; white-space: nowrap; color: var(--clay-hi); font-weight: 700; }
.onseen::after { content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 2px; background: var(--clay); transform: rotate(-2.5deg); border-radius: 2px; }

.r-voice { line-height: 1.6; }
.r-strong { color: var(--paper); font-weight: 700; }
.r-hot { color: var(--sage-hi); font-weight: 700; }

/* the hero: villain shout, relief answer */
.hero-villain {
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(2.5rem, 13vw, 4.4rem); line-height: 0.94;
  letter-spacing: -0.035em; margin: 0; color: var(--paper);
  text-wrap: balance;
}
.hero-villain__hit { position: relative; color: var(--clay-hi); display: inline-block; }
.hero-villain__hit::after {
  content: ""; position: absolute; left: -4px; right: -4px; bottom: 0.06em; height: 0.16em;
  background: linear-gradient(90deg, var(--clay), var(--clay-hi));
  transform: rotate(-1.2deg); border-radius: 3px; opacity: 0.55; z-index: -1;
}
.hero-relief {
  margin: 20px 0 0; max-width: 640px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(15px, 4.2vw, 18px); color: var(--paper-dim);
}
.hero-relief b { color: var(--sage-hi); font-weight: 600; }

/* list-row caution when a county-restricted txn is selected */
.office__caution { display: none; margin-top: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em; color: var(--clay-hi); }
.is-county .office__caution { display: block; }

/* villain office row + detail hero */
.office--villain.is-selected { box-shadow: 0 0 0 1px var(--clay), var(--shadow-sm); border-color: var(--clay); }
.office--villain.is-selected::before { background: linear-gradient(var(--clay-hi), var(--clay)); }
.detail__hero--villain {
  background: radial-gradient(130% 60% at 100% 0%, rgba(214,113,80,0.14), transparent 55%), var(--ink-850);
}
.detail__hero--villain .detail__eyebrow { color: var(--clay-hi); text-transform: lowercase; letter-spacing: 0.06em; }

/* ============================================================
   FEED-BLIND EXPLAINER — the honest panel that replaces the quiet
   verdict / busyness meter / time-saved sections for a big-city
   office the state's own wait feed can't see. Warm-dark, a clay/amber
   caution tone (on your side, honest — never an alarmist red).
   ============================================================ */
.feedblind {
  margin: 0; padding: 20px clamp(18px, 5vw, 30px) 24px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(214,113,80,0.13), transparent 62%), var(--ink-850);
  border-bottom: 1px solid var(--line); border-left: 4px solid var(--clay);
}
.feedblind__head { display: flex; gap: 12px; align-items: flex-start; }
.feedblind__icon { color: var(--clay-hi); flex-shrink: 0; display: inline-flex; margin-top: 3px; }
.feedblind__icon svg { width: 22px; height: 22px; }
.feedblind__heading { min-width: 0; }
.feedblind__eyebrow {
  margin: 0; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--clay-hi);
}
.feedblind__label {
  margin: 4px 0 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.35rem, 6vw, 1.65rem); line-height: 1.08; letter-spacing: -0.01em; color: var(--paper);
}
.feedblind__explain {
  margin: 15px 0 0; font-size: 14px; line-height: 1.62; color: var(--paper-dim);
}

/* ============================================================
   TIME-SAVED CALCULATOR — the conversion moment (proof, not ad)
   ============================================================ */
.calc {
  padding: 22px clamp(18px, 5vw, 30px) 24px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 100% at 0% 0%, rgba(127,176,138,0.07), transparent 55%);
}
.calc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.calc__eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--sage-hi); }
.calc__eyebrow.v-eyebrow { font-family: var(--sans); color: var(--clay-hi); text-transform: lowercase; letter-spacing: 0.02em; }
.calc__eyebrow.v-eyebrow::before { background: var(--clay); }
.calc__tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-hi); border-radius: 999px; padding: 3px 9px; }
.calc__hero { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 4px; }
.calc__big { font-family: var(--serif); font-weight: 800; font-size: clamp(2.8rem, 12vw, 3.6rem); line-height: 0.9; letter-spacing: -0.03em; color: var(--sage-hi); }
.calc__big-unit { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); line-height: 1.2; }
.calc__sentence { margin: 8px 0 18px; font-size: 15px; line-height: 1.55; color: var(--paper); font-family: var(--serif); }
.calc__sentence .v-hot, .calc__sentence .r-hot { font-family: var(--sans); }

.ledger { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: stretch; }
.ledger__col { border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); }
.ledger__col--bad { background: rgba(214,113,80,0.08); border-color: rgba(214,113,80,0.28); }
.ledger__col--good { background: rgba(127,176,138,0.09); border-color: rgba(127,176,138,0.3); }
.ledger__where { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.ledger__col--bad .ledger__where { color: var(--clay-hi); }
.ledger__col--good .ledger__where { color: var(--sage-hi); }
.ledger__num { font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 1; letter-spacing: -0.02em; color: var(--paper); margin-top: 2px; }
.ledger__num small { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.ledger__cap { font-size: 11px; color: var(--muted); line-height: 1.4; }
.ledger__vs { display: none; }
.calc__foot { margin: 14px 2px 0; font-size: 10.5px; line-height: 1.5; color: var(--faint); }

.calc--trap { background: radial-gradient(120% 100% at 0% 0%, rgba(214,113,80,0.1), transparent 55%); }
.calc__trap-line { margin: 14px 0 10px; font-size: 15px; line-height: 1.55; color: var(--paper); }
.calc__trap-line .v-hot { font-style: italic; }
.calc__trap-line b { color: var(--paper); }
.calc__trap-fix { margin: 0 0 16px; font-family: var(--serif); font-size: 14.5px; color: var(--paper-dim); padding-left: 13px; border-left: 2px solid var(--sage); }
.calc__trap-fix b { color: var(--sage-hi); }
.calc__cta, .cta-btn {
  font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
  color: var(--ink-950); cursor: pointer; border: 0; border-radius: 999px;
  min-height: var(--tap); padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(180deg, var(--sage-hi), var(--sage));
  box-shadow: 0 6px 18px -8px rgba(127,176,138,0.7); transition: transform .12s, box-shadow .18s;
  text-decoration: none; width: 100%;
}
.calc__cta:active, .cta-btn:active { transform: scale(0.985); }

/* ===================== ENTRANCE ANIM ===================== */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes growbar { from { transform: scaleY(0.02); } to { transform: scaleY(1); } }
.masthead__lede h1 { animation: rise .6s cubic-bezier(.2,.7,.3,1) both; }
.hero-relief { animation: rise .6s .1s cubic-bezier(.2,.7,.3,1) both; }
.v-eyebrow { animation: rise .6s .04s cubic-bezier(.2,.7,.3,1) both; }
.office { animation: rise .42s cubic-bezier(.2,.7,.3,1) both; }
.bar { animation: growbar .5s cubic-bezier(.2,.8,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   WIDER SCREENS — incidental. Same single column, just a touch
   more room. A few blocks that stay cramped at 390px earn a grid.
   Desktop hover affordances are additive, never required.
   ============================================================ */
@media (min-width: 620px) {
  .story__steps { grid-template-columns: repeat(3, 1fr); }
  .ledger { grid-template-columns: 1fr auto 1fr; }
  .ledger__vs { display: flex; align-self: center; font-family: var(--mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; }
}
@media (hover: hover) and (pointer: fine) {
  .office:hover { transform: translateY(-2px); border-color: var(--line-hi); background: var(--card-hi); box-shadow: var(--shadow-sm); }
  .txchip:hover { color: var(--paper); border-color: var(--paper-dim); }
  .seg:hover { color: var(--paper); }
  .dock__btn:hover { border-color: var(--paper-dim); }
  .from-picker:hover svg { color: var(--amber-hi); }
  .book:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(232,162,78,0.8); }
  .calc__cta:hover, .cta-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(127,176,138,0.8); }
  .room:hover { border-color: var(--line-hi); background: var(--card-hi); }
  .sheet__back:hover { background: var(--ink-750); }
}

/* ============================================================
   =============  FLAGSHIP: worst-dmv.html  ===================
   The QR-traffic landing. MOBILE-FIRST too — a stranger in a hot
   car scanning a water-bottle label reads this on a phone.
   ============================================================ */
.wd { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 26px) 60px; }
.wd-top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 0 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.wd-top .brand__word { font-size: 19px; }
.wd-top__loc { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--clay-hi); }

.wd-hero { padding: clamp(36px, 11vw, 80px) 0 clamp(30px, 8vw, 56px); position: relative; }
.wd-hero__badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--clay-hi); border: 1px solid rgba(214,113,80,0.45); border-radius: 999px; padding: 7px 13px;
  background: rgba(214,113,80,0.08); line-height: 1.3;
}
.wd-hero__badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 10px 1px var(--clay); flex-shrink: 0; }
.wd-hero h1 {
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(2.7rem, 15vw, 6rem); line-height: 0.9; letter-spacing: -0.04em;
  margin: 0; color: var(--paper); text-wrap: balance;
  animation: rise .7s cubic-bezier(.2,.7,.3,1) both;
}
.wd-hero h1 .hero-villain__hit { color: var(--clay-hi); }
.wd-hero__sub {
  margin: 22px 0 0; max-width: 620px; font-family: var(--serif); font-size: clamp(15px, 4.4vw, 20px);
  color: var(--paper-dim); line-height: 1.55;
  animation: rise .7s .12s cubic-bezier(.2,.7,.3,1) both;
}
.wd-hero__sub b { color: var(--clay-hi); font-weight: 600; }
.wd-hero__meta {
  margin-top: 26px; display: grid; grid-template-columns: 1fr; gap: 16px;
  animation: rise .7s .2s cubic-bezier(.2,.7,.3,1) both;
}
.wd-stat { display: flex; align-items: baseline; gap: 12px; }
.wd-stat__n { font-family: var(--serif); font-weight: 800; font-size: clamp(1.7rem, 7vw, 2.4rem); color: var(--clay-hi); line-height: 1; letter-spacing: -0.02em; flex-shrink: 0; }
.wd-stat__l { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

.wd-sec { padding: clamp(34px, 8vw, 64px) 0; border-top: 1px solid var(--line); }
.wd-sec__eyebrow {
  font-family: var(--sans); font-weight: 800; font-size: 13px; text-transform: lowercase;
  color: var(--clay-hi); margin: 0 0 16px; display: inline-flex; align-items: center; gap: 9px;
}
.wd-sec__eyebrow.is-relief { color: var(--sage-hi); }
.wd-sec__eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; border-radius: 2px; }
.wd-sec h2 {
  font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 6.4vw, 2.8rem);
  line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--paper); text-wrap: balance;
}

.wd-pain { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
.wd-pain__card { background: rgba(214,113,80,0.06); border: 1px solid rgba(214,113,80,0.22); border-radius: var(--radius); padding: 18px; }
.wd-pain__q { font-family: var(--sans); font-weight: 800; font-size: 16px; letter-spacing: -0.01em; color: var(--clay-hi); margin: 0 0 8px; text-transform: lowercase; }
.wd-pain__d { font-size: 13.5px; line-height: 1.55; color: var(--paper-dim); margin: 0; }

.wd-escape { background: radial-gradient(120% 60% at 100% 0%, rgba(127,176,138,0.08), transparent 60%); }
.wd-escape h2 { color: var(--paper); }
.wd-escape__lead { max-width: 640px; font-family: var(--serif); font-size: clamp(15px, 4.4vw, 18px); color: var(--paper-dim); line-height: 1.6; margin: 0 0 24px; }
.wd-escape__lead b { color: var(--sage-hi); font-weight: 600; }
.wd-routes { display: grid; grid-template-columns: 1fr; gap: 14px; }
.wd-route {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line-hi); border-radius: var(--radius);
  padding: 20px; transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.wd-route:active { transform: scale(0.99); border-color: var(--sage); background: var(--card-hi); }
.wd-route__name { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; color: var(--paper); }
.wd-route__cty { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.wd-route__stats { display: flex; gap: 20px; margin-top: 16px; }
.wd-route__stat b { display: block; font-family: var(--mono); font-weight: 600; font-size: 18px; color: var(--sage-hi); }
.wd-route__stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); font-family: var(--mono); }
.wd-route__go { margin-top: 16px; font-weight: 700; font-size: 13.5px; color: var(--sage-hi); display: inline-flex; align-items: center; gap: 6px; }

.wd-proof { border: 1px solid var(--line-hi); border-radius: 20px; padding: clamp(20px, 6vw, 40px); background: var(--ink-850); box-shadow: var(--shadow); }
.wd-proof .calc__hero { margin-top: 8px; }
.wd-proof .ledger { margin-top: 8px; }

.wd-finish { text-align: center; padding-bottom: clamp(48px, 11vw, 92px); }
.wd-finish h2 { max-width: 720px; margin: 0 auto 10px; }
.wd-finish__sub { max-width: 520px; margin: 0 auto 24px; color: var(--paper-dim); font-family: var(--serif); font-size: 15.5px; }
.wd-finish .cta-btn { font-size: 16px; padding: 15px 28px; width: auto; }
.wd-foot {
  border-top: 1px solid var(--line); padding: 24px 0 0; font-size: 12px; color: var(--muted);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.wd-foot .colophon__mono { width: 100%; margin-top: 4px; }

@media (min-width: 620px) {
  .wd-hero__meta { grid-template-columns: repeat(3, 1fr); }
  .wd-stat { flex-direction: column; gap: 6px; }
  .wd-pain { grid-template-columns: repeat(2, 1fr); }
  .wd-routes { grid-template-columns: repeat(2, 1fr); }
  .wd-foot .colophon__mono { width: auto; margin-left: auto; margin-top: 0; }
}
@media (hover: hover) and (pointer: fine) {
  .wd-route:hover { transform: translateY(-3px); border-color: var(--sage); background: var(--card-hi); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.8); }
}

/* ============================================================
   LANGUAGE PILL — a floating "retell"-style cycling control
   (mirrors the .retell pill on corydickes.com: rounded mono pill,
   accent ↻ icon that spins on change, a one-time hint bubble).
   Placed TOP-RIGHT so it never fights the bottom dock's thumb zone
   on index.html (worst-dmv.html has no dock). Hidden while a
   full-screen sheet/modal is open.
   ============================================================ */
.langpill-wrap {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 50;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .2s ease;
}
body.modal-open .langpill-wrap { opacity: 0; pointer-events: none; }

.langpill {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--paper); background: rgba(28, 21, 15, 0.84); backdrop-filter: blur(10px);
  border: 1px solid var(--line-hi); border-radius: 999px;
  min-height: var(--tap); padding: 10px 16px; cursor: pointer;
  box-shadow: var(--shadow-sm); user-select: none;
  transition: border-color .22s, transform .22s, background .22s;
}
.langpill:active { transform: translateY(0); }
.langpill:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 3px; }
.langpill .rt-ico {
  color: var(--amber-hi); font-size: 15px; line-height: 1; display: inline-block;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.langpill.spin .rt-ico { transform: rotate(360deg); }
.langpill .rt-txt { color: var(--muted); white-space: nowrap; }
.langpill .rt-txt b { color: var(--paper); font-weight: 600; }

.langpill-hint {
  max-width: 220px; font-family: var(--mono); font-size: 10px; line-height: 1.55; letter-spacing: 0.03em;
  color: var(--muted); background: rgba(28, 21, 15, 0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line-hi); border-right: 2px solid var(--amber);
  border-radius: 11px; padding: 10px 13px; box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(-8px) scale(.98);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.2,1); pointer-events: none;
}
.langpill-hint b { color: var(--paper); font-weight: 500; }
.langpill-hint.show { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .langpill:hover { border-color: var(--amber-hi); transform: translateY(-2px); background: rgba(41, 31, 23, 0.9); }
}
@media (prefers-reduced-motion: reduce) {
  .langpill .rt-ico { transition: none; }
  .langpill-hint { transition: opacity .3s; }
}

/* ============================================================
   RETURN-TO-TAB SUPPORT TOAST — the "keep it free" prompt.
   Slides up ABOVE the bottom dock, thumb-reachable, dismissible.
   Sits above the detail sheet (z70) since the user usually returns
   with the sheet still open after tapping Directions.
   ============================================================ */
.support-toast {
  position: fixed; z-index: 80;
  left: clamp(12px, 4vw, 20px); right: clamp(12px, 4vw, 20px);
  bottom: calc(var(--dock-h) + var(--safe-b) + 12px);
  max-width: 520px; margin: 0 auto;
  background: linear-gradient(180deg, var(--ink-800), var(--ink-850));
  border: 1px solid var(--line-hi);
  border-left: 3px solid var(--sage);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 46px 16px 16px;
  animation: toast-up .34s cubic-bezier(.2,.8,.3,1) both;
}
.support-toast.is-leaving { animation: toast-down .28s ease both; }
@keyframes toast-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-down { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(12px); } }

.support-toast__x {
  position: absolute; top: 6px; right: 6px;
  width: var(--tap); height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--muted);
  border-radius: 999px; transition: color .16s, background .16s;
}
.support-toast__x:active { transform: scale(0.94); }
.support-toast__head {
  font-family: var(--serif); font-weight: 700; font-size: 16px;
  color: var(--paper); margin: 0 0 5px; letter-spacing: -0.01em;
}
.support-toast__text {
  margin: 0 0 14px; font-size: 12.8px; line-height: 1.55; color: var(--paper-dim);
}
.support-toast__text b { color: var(--sage-hi); font-weight: 600; }
.support-toast__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.support-toast__cta {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 8px 18px; text-decoration: none;
  font-family: var(--sans); font-weight: 700; font-size: 13.5px; letter-spacing: 0.01em;
  color: var(--ink-950); border-radius: 999px;
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  box-shadow: 0 5px 16px -8px rgba(232,162,78,0.7);
  transition: transform .12s, box-shadow .18s;
}
.support-toast__cta:active { transform: scale(0.97); }
.support-toast__soon {
  font-family: var(--mono); font-weight: 500; font-size: 8.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: rgba(23,17,13,0.62);
  margin-top: 1px;
}
.support-toast__chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 8px 16px; text-decoration: none;
  font-family: var(--sans); font-weight: 700; font-size: 13px;
  color: var(--sage-hi); border: 1px solid rgba(127,176,138,0.35);
  background: rgba(127,176,138,0.08); border-radius: 999px;
  transition: background .16s, border-color .16s, transform .12s;
}
.support-toast__chip:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .support-toast__x:hover { color: var(--paper); background: var(--ink-750); }
  .support-toast__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(232,162,78,0.8); }
  .support-toast__chip:hover { border-color: var(--sage); background: rgba(127,176,138,0.14); }
}

/* ---- return-to-tab support MODAL (blocking, must-dismiss; replaces old bottom toast) ---- */
.support-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
.support-modal__scrim { position: absolute; inset: 0; background: rgba(10,7,4,0.66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: support-fade .26s ease both; }
.support-modal__card { position: relative; z-index: 1; width: 100%; max-width: 360px; background: linear-gradient(180deg, var(--card-hi), var(--card)); border: 1px solid var(--line-hi); border-radius: 18px; padding: 30px 22px 18px; box-shadow: var(--shadow); animation: support-pop .3s cubic-bezier(.2,.8,.2,1) both; }
.support-modal.is-leaving .support-modal__scrim { animation: support-fade .2s ease reverse both; }
.support-modal.is-leaving .support-modal__card { animation: support-pop .2s ease reverse both; }
.support-modal__x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--muted); border-radius: 999px; cursor: pointer; }
.support-modal__head { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 1.42rem; line-height: 1.12; color: var(--paper); }
.support-modal__text { margin: 0 0 20px; font-size: 15px; color: var(--paper-dim); line-height: 1.55; }
.support-modal__text b { color: var(--sage-hi); font-weight: 600; }
.support-modal__actions { display: flex; flex-direction: column; gap: 10px; }
.support-modal__cta { border: 0; width: 100%; cursor: pointer; font-family: var(--sans); display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; text-decoration: none; text-align: center; font-weight: 700; font-size: 15px; color: var(--ink-950); border-radius: 12px; background: linear-gradient(180deg, var(--amber-hi), var(--amber)); box-shadow: 0 8px 20px -8px rgba(232,162,78,0.7); }
.support-modal__soon { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(23,17,13,0.62); }
.support-modal__chip { display: flex; align-items: center; justify-content: center; min-height: 46px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--paper); border: 1px solid var(--line-hi); border-radius: 12px; }
.support-modal__later { margin: 12px auto 0; display: block; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-family: var(--sans); font-size: 13px; }
@keyframes support-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes support-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
body.support-open { overflow: hidden; }
@media (hover: hover) { .support-modal__x:hover { color: var(--paper); background: var(--ink-750); } .support-modal__cta:hover { transform: translateY(-1px); } .support-modal__chip:hover { border-color: var(--sage); background: rgba(127,176,138,0.14); } .support-modal__later:hover { color: var(--paper-dim); } }
@media (prefers-reduced-motion: reduce) { .support-modal__scrim, .support-modal__card { animation: none !important; } }
