/* Experience layer — the parts that make this demo feel alive:
 *   1. Live Ring readout + touch reticle
 *   2. Cinematic opening ("12 years in 8 seconds")
 *   3. First-glance explainer, verdict card, share toast
 *   4. Map-first mobile: snapping sheet, edge time rail, swipeable evaluation cards
 */

/* ── 1. Live Ring readout (pointer devices) ───────────────────────────── */
.live-readout {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 232px;
  padding: 11px 13px 10px;
  pointer-events: none;
  background: light-dark(rgb(252 250 245 / 0.96), rgb(11 16 29 / 0.94));
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid color-mix(in srgb, var(--ring-hue) 55%, var(--rule-strong));
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop), 0 0 0 1px rgb(0 0 0 / 0.12), 0 0 32px -6px color-mix(in srgb, var(--ring-hue) 55%, transparent);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms var(--ease-editorial), visibility 0s linear 140ms;
  will-change: transform;
  --ring-hue: light-dark(#bf4325, #ffd37a);
}
.live-readout.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 140ms var(--ease-editorial);
}
.lr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.lr-name {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lr-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--ring-hue);
}
.lr-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ring-hue);
  box-shadow: 0 0 8px var(--ring-hue);
  animation: gv-live-blink 1.2s ease-in-out infinite;
}
@keyframes gv-live-blink {
  50% { opacity: 0.35; }
}
.lr-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--font-serif-en);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lr-price small {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.lr-row {
  font-size: 0.76rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.lr-row.muted { color: var(--ink-muted); }
.lr-row .num { font-weight: 700; color: var(--ink); }
.lr-row .num.pos { color: var(--forest); }
.lr-row .num.neg { color: var(--vermilion); }
.lr-scope {
  display: inline-block;
  margin-inline-start: 4px;
  opacity: 0.8;
}
.lr-diff {
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  font-size: 0.72rem;
  background: var(--paper-sunk);
  color: var(--ink-2);
}
.lr-diff .num { font-weight: 700; margin-inline-end: 3px; }
.lr-diff.up .num { color: var(--vermilion); }
.lr-diff.down .num { color: var(--forest); }
.lr-empty {
  font-size: 0.78rem;
  color: var(--ink-2);
  margin: 4px 0 2px;
}
.lr-cta {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--rule);
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--ring-hue);
}

/* ── Touch reticle: the ring stays put, the city moves beneath it ─────── */
.reticle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 14;
  width: 0;
  height: 0;
  pointer-events: none;
  --ring-hue: light-dark(#bf4325, #ffd37a);
}
.reticle[hidden] { display: none; }
.reticle-cross {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ring-hue);
  background: light-dark(rgb(255 255 255 / 0.85), rgb(6 10 20 / 0.7));
  box-shadow: 0 0 0 2px light-dark(rgb(255 255 255 / 0.9), rgb(6 10 20 / 0.85)), 0 0 16px var(--ring-hue);
}
.reticle-cross::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--ring-hue);
}
.reticle-chip {
  position: absolute;
  bottom: 20px;
  left: 0;
  transform: translateX(-50%);
  pointer-events: auto;
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px 12px;
  width: max-content;
  min-width: 216px;
  max-width: min(310px, calc(100vw - 84px));
  padding: 8px 8px 8px 13px;
  text-align: start;
  font-family: var(--font-body);
  color: var(--ink);
  background: light-dark(rgb(252 250 245 / 0.97), rgb(11 16 29 / 0.95));
  backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--ring-hue) 55%, var(--rule-strong));
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop), 0 0 28px -8px var(--ring-hue);
  cursor: pointer;
}
html[dir="rtl"] .reticle-chip { padding: 8px 13px 8px 8px; }
.reticle-chip:empty { display: none; }
.reticle-chip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: inherit;
  border-right: 1px solid color-mix(in srgb, var(--ring-hue) 55%, var(--rule-strong));
  border-bottom: 1px solid color-mix(in srgb, var(--ring-hue) 55%, var(--rule-strong));
}
.rc-name {
  grid-column: 1;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rc-price {
  grid-column: 1;
  font-family: var(--font-serif-en);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}
.rc-price small {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.rc-sub {
  grid-column: 1;
  font-size: 0.71rem;
  color: var(--ink-muted);
  white-space: nowrap;
}
.rc-sub .pos { color: var(--forest); font-weight: 700; }
.rc-sub .neg { color: var(--vermilion); font-weight: 700; }
.rc-cta {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: var(--r-sm);
  background: var(--vermilion);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.reticle-chip:disabled { cursor: default; }
.reticle-chip:disabled .rc-sub { grid-column: 1 / -1; white-space: normal; }

/* ── 3a. Share chip + toast ───────────────────────────────────────────── */
#btnShare { gap: 6px; }
.share-label { font-size: 0.74rem; }
@media (max-width: 1280px) {
  .share-label { display: none; }
}
.gv-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + var(--edge) + 22px);
  z-index: 60;
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 220ms var(--ease-editorial), transform 220ms var(--ease-editorial);
}
.gv-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── 2. Opening title card → the 2014–2025 rise ───────────────────────── */
body.is-intro .sheet,
body.is-intro .bottom-dock,
body.is-intro .mini-legend,
body.is-intro .mode-nav,
body.is-intro .masthead-actions,
body.is-intro .time-rail,
body.is-intro .maplibregl-control-container {
  opacity: 0;
  pointer-events: none;
}
body.is-intro .sheet { transform: translateY(18px); }
body.is-intro .bottom-dock { transform: translateX(-50%) translateY(18px); }
.sheet,
.bottom-dock,
.mini-legend,
.mode-nav,
.masthead-actions,
.maplibregl-control-container {
  transition: opacity 620ms var(--ease-editorial), transform 620ms var(--ease-editorial);
}
.bottom-dock { transition-delay: 90ms; }
.mini-legend { transition-delay: 160ms; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 19;
  pointer-events: none;
  color: var(--ink);
  transition: opacity 650ms var(--ease-editorial);
}
.intro[hidden] { display: none; }
.intro.is-leaving { opacity: 0; }
.intro-scrim {
  position: absolute;
  inset: 0;
  background: var(--paper);
  transition: background-color 900ms ease, opacity 900ms ease;
}
.intro.is-playing .intro-scrim {
  background:
    linear-gradient(to top, light-dark(rgb(244 241 234 / 0.94), rgb(7 10 18 / 0.92)) 0%, transparent 46%),
    radial-gradient(ellipse at 50% 40%, transparent 40%, light-dark(rgb(244 241 234 / 0.5), rgb(5 8 15 / 0.62)) 100%);
}
.intro-title-block {
  position: absolute;
  inset-inline-start: clamp(20px, 5vw, 72px);
  bottom: clamp(28px, 9vh, 96px);
  max-width: min(620px, calc(100vw - 40px));
}
.intro-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vermilion);
  margin-bottom: 10px;
  animation: gv-rise 700ms var(--ease-editorial) 80ms backwards;
}
.intro-title {
  margin: 0 0 12px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.9rem, 4.4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  animation: gv-rise 800ms var(--ease-editorial) 160ms backwards;
}
html[lang="ar"] .intro-title {
  font-family: "Amiri", "IBM Plex Sans Arabic", serif;
  font-weight: 700;
  line-height: 1.32;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
}
.intro-sub {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  line-height: 1.6;
  color: var(--ink-2);
  animation: gv-rise 800ms var(--ease-editorial) 260ms backwards;
}
.intro-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.intro-status::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--vermilion), transparent);
  background-size: 200% 100%;
  animation: gv-shimmer 1.1s linear infinite;
}
@keyframes gv-shimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}
.intro.is-playing .intro-status { display: none; }

.intro-year-block {
  position: absolute;
  inset-inline-end: clamp(20px, 5vw, 72px);
  bottom: clamp(28px, 9vh, 96px);
  text-align: end;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms var(--ease-editorial), transform 500ms var(--ease-editorial);
}
.intro.is-playing .intro-year-block {
  opacity: 1;
  transform: none;
}
.intro-year {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(4rem, 13vw, 10.5rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-shadow: 0 6px 40px light-dark(rgb(244 241 234 / 0.9), rgb(0 0 0 / 0.75));
}
.intro-year.tick { animation: gv-year-tick 360ms var(--ease-editorial); }
@keyframes gv-year-tick {
  from { opacity: 0.35; transform: translateY(0.08em); }
  to   { opacity: 1; transform: none; }
}
.intro-ticks {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin: 12px 0 10px;
  direction: ltr;
}
.intro-ticks i {
  width: clamp(10px, 1.5vw, 20px);
  height: 3px;
  border-radius: 2px;
  background: var(--rule-strong);
  transition: background-color 300ms, box-shadow 300ms;
}
.intro-ticks i.on {
  background: var(--vermilion);
  box-shadow: 0 0 10px color-mix(in srgb, var(--vermilion) 60%, transparent);
}
.intro-caption {
  min-height: 1.6em;
  font-size: clamp(0.86rem, 1.2vw, 1.02rem);
  font-weight: 600;
  color: var(--ink-2);
}
.intro-caption.swap { animation: gv-rise 420ms var(--ease-editorial); }
.intro.is-outro .intro-caption {
  color: var(--vermilion);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
}
.intro-skip {
  position: absolute;
  top: calc(var(--edge) + 9px);
  inset-inline-end: calc(var(--edge) + 14px);
  pointer-events: auto;
  appearance: none;
  padding: 6px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule-strong);
  background: var(--paper-glass);
  backdrop-filter: blur(10px);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 400ms, color var(--t-fast), border-color var(--t-fast);
}
.intro.is-playing .intro-skip { opacity: 1; }
.intro-skip:hover { color: var(--ink); border-color: var(--vermilion); }

/* Loading veil (shared links, repeat views, reduced motion): the same card, no choreography */
html[data-intro="veil"] .intro-year-block,
html[data-intro="veil"] .intro-skip { display: none; }
html[data-intro="veil"] .intro-title { font-size: clamp(1.5rem, 3vw, 2.3rem); }

/* Stations switch on at their opening year */
.map-station-pin.intro-pop { animation: gv-station-pop 700ms var(--ease-editorial); }
@keyframes gv-station-pop {
  0%   { transform: scale(0.2); opacity: 0; }
  55%  { transform: scale(1.9); opacity: 1; }
  100% { transform: scale(1); }
}
.map-station-pin.intro-hidden { visibility: hidden; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .intro-kicker, .intro-title, .intro-sub, .intro-year.tick, .intro-caption.swap,
  .map-station-pin.intro-pop { animation: none; }
}

/* ── 3b. First-glance card + map hint ─────────────────────────────────── */
.hero-first { padding: 14px 15px 12px; }
.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--vermilion);
  margin-bottom: 6px;
}
.hero-first-title {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.32;
  color: var(--ink);
  text-wrap: balance;
}
html[lang="en"] .hero-first-title { font-weight: 600; font-size: 1.32rem; line-height: 1.2; }
.hero-first-sub {
  margin: 0 0 11px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.hero-key {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--paper-elevated) 80%, transparent);
  border: 1px solid var(--rule);
  font-size: 0.74rem;
  color: var(--ink-2);
}
.hero-key strong { color: var(--ink); }
.hero-key-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
  flex-shrink: 0;
}
.hero-key-bars i {
  width: 5px;
  border-radius: 1px 1px 0 0;
  background: var(--ink-muted);
}
.hero-key-bars i:nth-child(1) { height: 5px; }
.hero-key-bars i:nth-child(2) { height: 9px; }
.hero-key-bars i:nth-child(3) { height: 13px; }
.hero-key-bars i:nth-child(4) { height: 18px; background: var(--vermilion); }
.hero-key-ramp {
  flex: 1;
  min-width: 40px;
  height: 6px;
  border-radius: 999px;
}
.hero-links {
  display: flex;
  gap: 14px;
  margin-top: 9px;
  font-size: 0.72rem;
}

.map-hint {
  position: fixed;
  top: calc(var(--masthead-h) + var(--edge) + 18px);
  left: 50%;
  z-index: 13;
  transform: translateX(-50%);
  padding: 8px 17px;
  border-radius: var(--r-pill);
  background: light-dark(rgb(23 22 20 / 0.9), rgb(255 211 122 / 0.96));
  color: light-dark(#fff, #1a1305);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 10px 34px rgb(0 0 0 / 0.4);
  animation: gv-hint-in 600ms var(--ease-editorial) 500ms backwards, gv-hint-bob 2.4s ease-in-out 1.2s infinite;
}
.map-hint[hidden] { display: none; }
@keyframes gv-hint-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
@keyframes gv-hint-bob {
  50% { transform: translateX(-50%) translateY(4px); }
}

/* ── 3c. Verdict summary card ─────────────────────────────────────────── */
.deck-tabs { display: none; }
.summary-card {
  border: 0;
  padding: 0;
  margin: 8px 0 12px;
  background: none;
}
.price-pos { margin: 12px 0 12px; }
.price-pos-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-bottom: 7px;
}
.price-pos-head strong { color: var(--ink); font-size: 0.82rem; white-space: nowrap; }
.price-pos-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, light-dark(#d7e0ea, #24344d), light-dark(#83b8a6, #3a7d7c), light-dark(#dca058, #d99b4e), light-dark(#bf4325, #ef6f53));
}
html[dir="rtl"] .price-pos-track {
  background: linear-gradient(to left, light-dark(#d7e0ea, #24344d), light-dark(#83b8a6, #3a7d7c), light-dark(#dca058, #d99b4e), light-dark(#bf4325, #ef6f53));
}
.price-pos-track i {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-inline-start: -7px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--paper-elevated);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.45);
  transform: translateY(-50%);
}
.price-pos-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 0.69rem;
  color: var(--ink-faint);
}
.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.verdict-col {
  padding: 10px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  background: var(--paper-elevated);
}
.verdict-col.pros { border-color: color-mix(in srgb, var(--forest) 30%, var(--rule)); background: linear-gradient(160deg, var(--forest-soft), transparent 70%), var(--paper-elevated); }
.verdict-col.cons { border-color: color-mix(in srgb, var(--ochre) 32%, var(--rule)); background: linear-gradient(160deg, var(--ochre-soft), transparent 70%), var(--paper-elevated); }
.verdict-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.verdict-col.pros .verdict-col-title { color: var(--forest); }
.verdict-col.cons .verdict-col-title { color: var(--ochre); }
.verdict-item {
  position: relative;
  padding-inline-start: 13px;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.verdict-item + .verdict-item { margin-top: 5px; }
.verdict-item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
.verdict-col.pros .verdict-item::before { background: var(--forest); opacity: 1; }
.verdict-col.cons .verdict-item::before { background: var(--ochre); opacity: 1; }
.verdict-item .num { font-weight: 700; color: var(--ink); }
.verdict-item.none { color: var(--ink-faint); padding-inline-start: 0; }
.verdict-item.none::before { display: none; }
.verdict-note {
  margin-top: 7px;
  font-size: 0.69rem;
  color: var(--ink-faint);
}

/* ── 4. Map-first phones (≤ 980px) ────────────────────────────────────── */
.sheet-head { display: none; }
.time-rail { display: none; }

@media (max-width: 980px) {
  :root {
    --masthead-h: 76px;
    --edge: 10px;
    --dock-h: 50px;
  }

  /* Two-row masthead: sign-off + actions, then the demo's own name as a separate element */
  .masthead {
    height: auto;
    min-height: var(--masthead-h);
    flex-wrap: wrap;
    align-content: center;
    padding: 7px 10px 6px;
    row-gap: 3px;
    column-gap: 8px;
  }
  .brand-cluster { display: contents; }
  .gv-lab { order: 1; flex-shrink: 0; }
  .masthead-actions { order: 2; }
  .demo-home-btn {
    order: 3;
    flex-basis: 100%;
    padding: 0 2px;
    text-align: start;
    font-size: 0.76rem;
    line-height: 1.5;
  }
  .gv-lab { gap: 10px; }
  .gv-lab img { height: 24px; }
  .gv-lab i { height: 18px; }
  .gv-lab b { font-size: 16px; }
  .masthead-actions { gap: 5px; }
  .icon-chip { height: 32px; min-width: 32px; padding: 0 8px; font-size: 0.72rem; }
  .ask-trigger { width: 32px; height: 32px; }
  .maplibregl-ctrl-top-left { display: none; }

  /* Sheet: three snap heights, dragged by its header */
  .sheet {
    top: auto;
    max-height: none;
    height: var(--sheet-h, 50dvh);
    bottom: calc(var(--dock-h) + var(--edge) + 8px);
    border-radius: 22px;
    transition: height 340ms var(--ease-editorial), opacity 620ms var(--ease-editorial), transform 620ms var(--ease-editorial);
  }
  body.sheet-peek { --sheet-h: 150px; }
  body.sheet-half { --sheet-h: 50dvh; }
  body.sheet-full { --sheet-h: calc(100dvh - var(--masthead-h) - var(--dock-h) - var(--edge) * 3 - 14px); }
  body.sheet-dragging .sheet { transition: none; }
  body.sheet-dragging { user-select: none; }

  .sheet-head {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 0 10px 8px;
    touch-action: none;
    cursor: grab;
  }
  .sheet-grab {
    appearance: none;
    display: grid;
    place-items: center;
    width: 100%;
    height: 20px;
    padding: 0;
    border: 0;
    background: none;
    cursor: grab;
  }
  .sheet-grab i {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--rule-strong);
  }
  .sheet-head-slot .mode-nav {
    display: flex;
    width: 100%;
    order: 0;
  }
  .sheet-head-slot .mode-btn {
    flex: 1;
    padding: 7px 6px;
    font-size: 0.76rem;
    text-align: center;
  }
  .sheet-scroll { padding: 4px 14px 16px; }
  body.sheet-peek .sheet-scroll { overflow: hidden; }
  body.sheet-peek .sheet-footer { display: none; }
  body.sheet-peek .sheet::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 30px;
    pointer-events: none;
    background: linear-gradient(to top, light-dark(#fcfaf5, #0f1524), transparent);
  }
  .site-crumbs { display: none !important; }
  .site-title { font-size: 1.16rem !important; }
  .hero-first { padding: 11px 13px 10px; margin-bottom: 10px; }
  body.sheet-peek .hero-first { background: none; border-color: transparent; padding: 2px 2px 0; }
  body.sheet-peek .hero-eyebrow { display: none; }

  /* Dock: five lens pills, full width */
  .bottom-dock {
    left: var(--edge);
    right: var(--edge);
    transform: none;
    max-width: none;
    padding: 5px;
    overflow: visible;
    justify-content: center;
  }
  body.is-intro .bottom-dock { transform: translateY(18px); }
  .bottom-dock.is-lens-only .dock-sep,
  .bottom-dock.is-lens-only .dock-seg,
  .bottom-dock.is-lens-only .dock-time { display: none; }
  .bottom-dock.is-lens-only .dock-lenses { width: 100%; gap: 2px; }
  .bottom-dock.is-lens-only .dock-pill {
    flex: 1;
    justify-content: center;
    gap: 5px;
    padding: 9px 4px;
    font-size: 0.75rem;
  }

  /* Time on the edge */
  .time-rail {
    position: fixed;
    right: var(--edge);
    top: calc(var(--masthead-h) + var(--edge) + 12px);
    z-index: 16;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 42px;
    height: min(300px, calc(100dvh - var(--masthead-h) - var(--dock-h) - var(--sheet-h, 50dvh) - var(--edge) * 3 - 44px));
    min-height: 150px;
    padding: 9px 0 6px;
    background: var(--paper-glass);
    backdrop-filter: blur(18px) saturate(1.2);
    border: 1px solid var(--rule);
    border-radius: 22px;
    box-shadow: var(--shadow-sheet), var(--glass-rim);
    touch-action: none;
    transition: height 340ms var(--ease-editorial), opacity 620ms var(--ease-editorial);
  }
  .time-rail[hidden] { display: none; }
  .rail-year {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink);
  }
  .rail-base {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--ink-faint);
  }
  .rail-track {
    position: relative;
    flex: 1;
    width: 100%;
    cursor: ns-resize;
    touch-action: none;
  }
  .rail-line,
  .rail-fill {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 4px;
    margin-left: -2px;
    border-radius: 4px;
  }
  .rail-line { top: 8px; background: var(--rule-strong); }
  .rail-fill {
    height: calc((100% - 16px) * var(--rail-frac, 1));
    background: var(--vermilion);
    box-shadow: 0 0 10px color-mix(in srgb, var(--vermilion) 55%, transparent);
  }
  .rail-thumb {
    position: absolute;
    left: 50%;
    bottom: calc(8px + (100% - 16px) * var(--rail-frac, 1));
    width: 20px;
    height: 20px;
    margin: 0 0 -10px -10px;
    border-radius: 50%;
    background: var(--vermilion);
    border: 3px solid light-dark(#fcfaf5, #12192b);
    box-shadow: 0 3px 10px rgb(0 0 0 / 0.45);
    transition: transform var(--t-fast);
  }
  .time-rail.is-dragging .rail-thumb { transform: scale(1.25); }
  .time-rail.is-dim .rail-fill,
  .time-rail.is-dim .rail-thumb { background: var(--ink-muted); box-shadow: none; }
  .rail-play {
    appearance: none;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--rule-strong);
    background: var(--paper-elevated);
    color: var(--ink);
    cursor: pointer;
  }
  .rail-play .ic-pause,
  .rail-play[data-playing="true"] .ic-play { display: none; }
  .rail-play[data-playing="true"] .ic-pause { display: block; }

  /* Evaluation as swipeable cards */
  .deck-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    position: sticky;
    top: -4px;
    z-index: 3;
    margin: 4px -14px 8px;
    padding: 6px 14px;
    background: light-dark(#fcfaf5, #0f1524);
  }
  .deck-tabs::-webkit-scrollbar { display: none; }
  .deck-tab {
    appearance: none;
    flex-shrink: 0;
    padding: 6px 13px;
    border-radius: var(--r-pill);
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
  }
  .deck-tab[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }
  .site-deck {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    margin-inline: -14px;
    padding-inline: 14px;
    scroll-padding-inline: 14px;
  }
  .site-deck::-webkit-scrollbar { display: none; }
  .site-deck > .pillar-block {
    flex: 0 0 100%;
    min-width: 0;
    margin-top: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .site-deck > .summary-card { margin: 0; }
  .chart-svg text { font-size: 12px; }

  .map-hint { top: calc(var(--masthead-h) + var(--edge) + 12px); font-size: 0.74rem; }
  .intro-title-block { bottom: clamp(150px, 30vh, 260px); }
  .intro-year-block { bottom: clamp(26px, 6vh, 60px); }
  .intro-skip { top: calc(var(--edge) + 9px); }
}

/* Phones: lift the whole type scale one notch so nothing in the sheet falls under ~11px */
@media (max-width: 640px) {
  html { font-size: 17px; }
  /* Five actions fit beside the brand; tilt is still available with a two-finger drag */
  #btn3D { display: none; }
  .gv-lab img { height: 22px; }
  .gv-lab b { font-size: 15px; }
  .gv-lab { gap: 8px; }
  .masthead-actions { gap: 4px; }
  .icon-chip { height: 30px; min-width: 30px; padding: 0 7px; font-size: 0.66rem; }
  .ask-trigger { width: 30px; height: 30px; }
  .verdict-grid { grid-template-columns: 1fr; }
}

/* ── 5. New-metro simulator: say what it answers before asking for input ─ */
.sim-title { text-wrap: balance; line-height: 1.34; }
.sim-explain {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.62;
  color: var(--ink-2);
}
.sim-steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.sim-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule);
  background: var(--paper-elevated);
  font-size: 0.8rem;
  color: var(--ink);
}
.sim-step-n {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--forest-soft);
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}
.sim-steps li:first-child { border-color: color-mix(in srgb, var(--forest) 34%, var(--rule)); }
.sim-examples-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}
