/* Curio:City · M1 scrub rig · tokens transcribed from Design-System-v1 (approved 2026-09-14) */

/* ---------- 1.1 Typefaces (amended 5 Oct, Naveen): Tektur display, Tomorrow body ---------- */
@font-face { font-family: 'Tektur'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/tektur-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Tektur'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/tektur-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Tektur'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/tektur-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Tektur'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/tektur-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Tomorrow'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/tomorrow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Tomorrow'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/tomorrow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Tomorrow'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/tomorrow-latin-600-normal.woff2') format('woff2'); }

/* ---------- 1.2 Color tokens ---------- */
:root {
  --ground: #050508;
  --room: #0b0b12;
  --room-raised: #12121c;
  --copy: #f2f0ec;
  --copy-body: rgba(242,240,236,0.88);
  --muted: #9a94ad;
  --line: rgba(134,87,224,0.15);
  --purple: #55369D;
  --purple-lit: #8657E0;
  --yellow: #FFDD4D;
  --red: #F03D2E;
  --support: #cfc9e6;

  /* 4.1 motion tokens */
  --motion-fast: 150ms;
  --motion-base: 250ms;
  --motion-slow: 450ms;
  --motion-cine: 800ms;
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ground); }
body {
  background: var(--ground);
  color: var(--copy);
  font-family: 'Tomorrow', system-ui, sans-serif;
  overscroll-behavior: none;
}

/* ---------- Stage ---------- */
#stage {
  position: fixed; inset: 0;
  overflow: hidden;
  z-index: 0;
  background: var(--ground);
}
.no-js #stage, .static-mode #stage { display: none; }

.layers, .clip { position: absolute; inset: 0; }
.clip {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
  background: var(--ground);
}
.clip.active { opacity: 1; }

/* ---------- Copy windows (z 10) + scrim (z 5) ---------- */
.copy-window {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  /* scroll drives the value; time smooths it (Naveen 12 Oct: no popping) */
  transition: opacity 520ms cubic-bezier(.33,.0,.2,1);
}
.copy-window .street-title { transform: translateY(12px); transition: transform 620ms cubic-bezier(.22,1,.36,1); }
@media (prefers-reduced-motion: reduce) { .copy-window, .copy-window .street-title { transition: none; } }

.scrim {
  position: absolute; z-index: -1; /* sits under the line within the window; window stacks over video */
  left: 50%; top: 50%;
  width: min(124vw, 1400px); height: 60vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.scrim-radial {
  background: radial-gradient(ellipse 50% 50% at center, rgba(5,5,8,0.32) 0%, rgba(5,5,8,0.18) 45%, rgba(5,5,8,0) 72%);
}

/* T2 street in-scene title */
.street-title {
  font-family: 'Tektur', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 64px);
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--copy);
  text-shadow: 0 2px 40px rgba(0,0,0,.8);
  text-align: center;
  max-width: 16ch;
  padding: 0 16px;
}

/* reading dim under the decode block (z 7: above the video, below the copy) */
#read-dim {
  position: absolute; inset: 0;
  background: #050508;
  opacity: 0;
  z-index: 7;
  pointer-events: none;
}

/* dip-to-ground between §2 and §3: resets the eye for the mood change */
#dip {
  position: absolute; inset: 0;
  background: var(--ground);
  opacity: 0;
  z-index: 8;
  pointer-events: none;
}

/* continue hint: appears when the street parks, so the journey reads unfinished */
#continue-hint {
  position: absolute;
  left: 50%; bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid; justify-items: center; gap: 6px;
  z-index: 20;
  opacity: 0;
  transition: opacity var(--motion-base) var(--ease-out);
  pointer-events: none;
}
.hint-label {
  font-family: 'Tomorrow', sans-serif; font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--yellow);
  text-shadow: 0 1px 16px rgba(0,0,0,.8);
}
.hint-chevron {
  filter: drop-shadow(0 0 10px rgba(255,221,77,0.45));
  animation: hintDrift 2.4s var(--ease-in-out) infinite;
}
@keyframes hintDrift {
  0% { transform: translateY(0); opacity: 1; }
  65% { transform: translateY(8px); opacity: 0.25; }
  100% { transform: translateY(8px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hint-chevron { animation: none; }
}

/* ---------- Chrome (z 20) ---------- */
.chrome { position: absolute; z-index: 20; }
.marker {
  left: 24px; bottom: 24px;
  opacity: 0; /* driven by scroll: appears as the §0 card clears */
  font-family: 'Tomorrow', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  display: flex; gap: 8px; align-items: baseline;
}
.marker-num  { font-weight: 600; letter-spacing: 0.20em; color: var(--purple-lit); }
.marker-sep  { color: rgba(242,240,236,0.35); }
.marker-name { font-weight: 500; letter-spacing: 0.12em; color: rgba(242,240,236,0.55); }

@media (max-width: 640px) {
  .marker { left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ---------- §0 title card (z 100 per DS z-scale) ---------- */
#s0 {
  position: absolute; inset: 0;
  z-index: 100;
  display: grid; place-items: center;
  pointer-events: none;
  /* no background: the aerial must fade THROUGH to the plaza video beneath, never to black */
}
.s0-aerial {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform, opacity;
}
/* radial scrim behind the title (DS §3.2 grammar), fades with the title */
.s0-scrim {
  position: absolute; z-index: 1;
  left: 50%; top: 50%;
  width: min(130vw, 1700px); height: 72vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 50% 50% at center, rgba(5,5,8,0.32) 0%, rgba(5,5,8,0.20) 48%, rgba(5,5,8,0) 74%);
  pointer-events: none;
}
/* T1, amended 2026-09-18: white, purple full stop; gradient retired from §0 */
.s0-title {
  position: relative; z-index: 2;
  font-family: 'Tektur', sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 6.2vw, 92px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--copy);
  text-shadow: 0 2px 40px rgba(0,0,0,.8);
  text-align: center;
  max-width: 14ch;
  padding: 0 16px;
}
.s0-stop { color: var(--purple-lit); }

/* city loader (igloo-style, Naveen 5 Oct): ground field, a strip of Tektur glyphs
   that settle left-to-right as chapter 1 buffers, then the city lights up block
   by block and the title decodes into place */
.s0-loader {
  position: absolute; z-index: 4;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 16px;
  transition: opacity 400ms var(--ease-out);
}
.s0-glyphs {
  display: flex; gap: 2px;
  font-family: 'Tektur', monospace; font-weight: 500; font-size: 18px;
  letter-spacing: 0;
}
.s0-glyphs span { display: inline-block; width: 14px; text-align: center; color: rgba(242,240,236,0.28); }
.s0-glyphs span.set { color: var(--yellow); text-shadow: 0 0 12px rgba(255,221,77,0.55); }
.s0-loader-label {
  display: flex; gap: 18px; align-items: baseline;
  font-family: 'Tektur', sans-serif; font-weight: 500;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.26em;
  color: rgba(242,240,236,0.62);
}
.s0-loader-pct { color: var(--yellow); font-variant-numeric: tabular-nums; }
.s0-loader-pct::after { content: '%'; }
#s0.ready .s0-loader { opacity: 0; pointer-events: none; }
#s0:not(.ready) { background: var(--ground); }
.s0-aerial { transition: opacity 900ms var(--ease-out); }
#s0:not(.wake) .s0-aerial { opacity: 0 !important; }
/* city pixel reveal (Naveen r9, igloo-style): a canvas mosaic of the aerial that
   fills block by block and resolves from coarse to fine; the real aerial sits
   beneath and is simply uncovered at the end */
.s0-pixel { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; transition: opacity 500ms var(--ease-out); }
#s0.wake .s0-aerial { opacity: 1; }
/* title: a slow rise after the city is in, then the instruction */
#s0.reveal .s0-title { animation: titleRise 2200ms cubic-bezier(.22,.61,.36,1); }
#s0.reveal .s0-instruction { animation: titleRise 1600ms cubic-bezier(.22,.61,.36,1) 1200ms backwards; }
@keyframes titleRise {
  0%   { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
#s0:not(.reveal) .s0-title, #s0:not(.reveal) .s0-instruction { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) { #s0.reveal .s0-title, #s0.reveal .s0-instruction { animation: none; } }
.s0-title, .s0-instruction { transition: opacity 900ms var(--ease-out); }
#s0:not(.ready) .s0-title, #s0:not(.ready) .s0-instruction { opacity: 0 !important; }

/* long narrative street lines: same face, stepped-down scale so they hold 2–3 lines */
.street-title--wide { max-width: 22ch; }
.street-title--long {
  font-size: clamp(24px, 3.4vw, 50px);
  max-width: 25ch; /* breaks the 1.4 line into three balanced lines */
  text-wrap: balance;
  line-height: 1.18;
}

/* single-line title on desktop (Naveen: "That's where we come in.") */
@media (min-width: 900px) {
  .street-title--oneline { max-width: none; white-space: nowrap; font-size: clamp(30px, 4.1vw, 58px); }
}

/* lower-middle band variant (street copy centred low per 2026-09-29 call) */
.copy-window--band {
  align-items: end;
  padding-bottom: 16vh;
}
.scrim-bottom {
  left: 0; top: auto; bottom: 0; width: 100%; height: 55vh;
  transform: none;
  background: linear-gradient(to top, rgba(5,5,8,0.32) 0%, rgba(5,5,8,0.18) 45%, rgba(5,5,8,0) 100%);
}

/* §3 trio block: T3 word + headline + support, one accent at full volume per beat */
.trio-block { text-align: center; display: grid; gap: 16px; padding: 0 16px; }
.trio-word {
  font-family: 'Tektur', sans-serif; font-weight: 700;
  font-size: clamp(40px, 5.8vw, 82px);
  letter-spacing: -0.015em; line-height: 1.08;
  text-shadow: 0 2px 40px rgba(0,0,0,.8);
}
.trio-word--data { color: var(--purple-lit); }
.trio-word--design { color: var(--yellow); }
.trio-word--disruption { color: var(--red); }
.trio-headline {
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: -0.01em; line-height: 1.2;
  color: var(--copy); text-shadow: 0 2px 40px rgba(0,0,0,.8);
}
.trio-support {
  font-family: 'Tomorrow', sans-serif; font-weight: 400;
  font-size: clamp(16px, 1.6vw, 21px);
  color: #cfc9e6; max-width: 52ch; margin: 0 auto;
}

/* §2.2 decode stop: one centred block over the park (screenplay v10) */
.decode-block {
  display: grid; gap: 16px; justify-items: center;
  text-align: center;
  max-width: 80ch;
  padding: 0 24px;
}
.decode-title {
  max-width: none;
  font-size: clamp(27px, 3.9vw, 60px);
}
.decode-title span { display: block; white-space: nowrap; }
.decode-rule { width: 64px; height: 1px; background: rgba(134,87,224,0.4); }
.decode-copy {
  font-family: 'Tomorrow', sans-serif; font-weight: 400;
  font-size: 17px; line-height: 1.65;
  max-width: 78ch;
  color: var(--copy-body);
  text-shadow: 0 1px 24px rgba(0,0,0,.9);
}
/* stronger scrim for the decode block: it must hold over the fully lit park */
#w7 .scrim-radial {
  width: min(150vw, 2000px); height: 96vh;
  background: radial-gradient(ellipse 50% 50% at center, rgba(5,5,8,0.78) 0%, rgba(5,5,8,0.56) 52%, rgba(5,5,8,0.22) 80%);
}
#w7 .decode-copy { color: var(--copy); text-shadow: 0 1px 18px rgba(0,0,0,.85); }
/* the payoff line: yellow accent + a point up, Inter for air at small size */
.decode-close { margin-top: 12px; }
.decode-close strong {
  font-family: 'Tomorrow', sans-serif; font-weight: 600;
  font-size: 19px; line-height: 1.5;
  color: var(--yellow);
  text-shadow: 0 2px 18px rgba(0,0,0,.95), 0 0 36px rgba(0,0,0,.6);
}
.decode-block .cta-underline { margin-top: 8px; }
/* Conversion CTA (DS amendment, Naveen 2 Oct): filled button carries its own
   surface so it reads over any footage. Deep purple fill, white text, lit edge. */
.cta-underline {
  display: inline-block; margin-top: 28px;
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--copy); text-decoration: none;
  background: rgba(85,54,157,0.86);
  border: 1px solid var(--purple-lit);
  border-radius: 2px; /* hard edge (Naveen 5 Oct: Tektur grammar) */
  padding: 12px 30px 12px 26px;
  box-shadow: 0 4px 36px rgba(134,87,224,0.35);
  position: relative;
  transition: background var(--motion-fast) var(--ease-out),
              transform var(--motion-fast) var(--ease-out),
              box-shadow var(--motion-fast) var(--ease-out);
}
.cta-underline:hover, .cta-underline:focus-visible {
  background: #6244b5;
  transform: translateY(-2px);
  box-shadow: 0 6px 44px rgba(134,87,224,0.5);
}
.cta-underline:active { transform: translateY(0) scale(0.97); }
.cta-underline:focus-visible { outline: 2px solid var(--purple-lit); outline-offset: 4px; }

/* tech tick: a yellow marker in the top-left corner of every button */
.cta-underline::before, .gate-cta::before {
  content: ''; position: absolute; left: -1px; top: -1px;
  width: 8px; height: 8px; background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* fallback decode figure */
.fb-decode { display: grid; gap: 24px; max-width: 62ch; padding: 48px; background: rgba(5,5,8,0.6); }
.fb-decode-copy { font-family: 'Tomorrow', sans-serif; font-size: 16px; line-height: 1.65; color: var(--copy-body); }
.s0-instruction {
  position: absolute; z-index: 2;
  left: 0; right: 0;
  bottom: calc(32px + env(safe-area-inset-bottom));
  text-align: center;
  font-family: 'Tomorrow', sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 1.6vw, 21px);
  color: #cfc9e6;
}

/* ---------- Walk copy block ---------- */
.walk-block { display: grid; gap: 14px; justify-items: center; text-align: center; }
.walk-support {
  font-family: 'Tomorrow', sans-serif; font-weight: 400;
  font-size: clamp(16px, 1.6vw, 21px);
  color: #cfc9e6; text-shadow: 0 1px 20px rgba(0,0,0,.9);
}

/* ---------- Gates (DS §5.1, placement per v10 pp.12/15) ---------- */
.gate {
  position: absolute; z-index: 20;
  left: 48px; bottom: 13vh;
  opacity: 0;
  pointer-events: none;
}
/* edgeless feathered scrim: the text sits on the scene, never on a box (Naveen r5) */
.gate::before {
  content: ''; position: absolute; z-index: -1;
  left: -160px; right: -260px; top: -140px; bottom: -160px;
  background: radial-gradient(ellipse 68% 72% at 30% 66%, rgba(5,5,8,0.66) 0%, rgba(5,5,8,0.34) 48%, rgba(5,5,8,0) 72%);
  pointer-events: none;
}
.gate-hit {
  all: unset; cursor: pointer; display: block;
  padding: 20px 56px 20px 4px;
}
.gate-line {
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: clamp(24px, 2.9vw, 40px);
  letter-spacing: -0.015em; line-height: 1.15;
  color: var(--copy);
  text-shadow: 0 2px 28px rgba(0,0,0,.9);
}
.gate-line-arrow {
  color: var(--yellow);
  display: inline-block;
  margin-left: 10px;
  transition: transform var(--motion-fast) var(--ease-out);
}
.gate-line-arrow svg {
  width: 0.82em; height: 0.48em;
  filter: drop-shadow(0 0 10px rgba(255,221,77,0.55));
}
.gate-hit:hover .gate-line-arrow { transform: translateX(6px); }
/* yellow threshold mark (Naveen r6: a gate should be loud) — the sanctioned
   yellow wayfinding accent, same family as the continue hint */
.gate-rule {
  width: 56px; height: 3px; border-radius: 2px;
  background: var(--yellow);
  box-shadow: 0 0 14px rgba(255,221,77,0.45);
  margin-top: 16px;
}
.gate-sub {
  margin-top: 12px;
  font-family: 'Tomorrow', sans-serif; font-weight: 400;
  font-size: 15px; letter-spacing: 0.01em;
  color: rgba(242,240,236,0.8);
  text-shadow: 0 1px 18px rgba(0,0,0,.9);
}
.gate-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px;
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--copy);
  background: rgba(85,54,157,0.86);
  border: 1px solid var(--purple-lit);
  border-radius: 2px;
  padding: 12px 28px 12px 24px;
  position: relative;
  box-shadow: 0 4px 36px rgba(134,87,224,0.35);
  transition: background var(--motion-fast) var(--ease-out),
              transform var(--motion-fast) var(--ease-out),
              box-shadow var(--motion-fast) var(--ease-out);
}
.gate-arrow { transition: transform var(--motion-fast) var(--ease-out); }
.gate-hit:hover .gate-cta, .gate-hit:focus-visible .gate-cta {
  background: #6244b5;
  transform: translateY(-2px);
  box-shadow: 0 6px 44px rgba(134,87,224,0.5);
}
.gate-hit:hover .gate-arrow { transform: translateX(3px); }
.gate.loading .gate-cta { background: #3e2a74; cursor: progress; animation: gateLoad 1.1s var(--ease-in-out) infinite; }
@keyframes gateLoad { 50% { box-shadow: 0 0 0 6px rgba(255,221,77,0.18), 0 4px 36px rgba(134,87,224,0.35); } }
.gate-hit:focus-visible { outline: 2px solid var(--purple-lit); outline-offset: 4px; }
.gate.pulse .gate-cta { animation: gatePulse 500ms var(--ease-in-out) 2; }
@keyframes gatePulse {
  50% { box-shadow: 0 0 0 9px rgba(134,87,224,0.28), 0 4px 44px rgba(134,87,224,0.6); }
}
@media (max-width: 640px) {
  .gate { left: 16px; right: 16px; bottom: 16vh; }
}

/* ---------- Rooms (DS §5.3, z 40) ---------- */
.room {
  position: fixed; inset: 0; z-index: 40;
  background: var(--room);
  opacity: 0;
  transition: opacity var(--motion-slow) var(--ease-out);
  overflow-y: auto;
}
.room.open { opacity: 1; }
.room-bg {
  position: fixed; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.68); /* brightened, Naveen 2 Oct r4 */
}
.room-bg::after { content: ''; position: absolute; inset: 0; background: rgba(11,11,18,0.20); }
.room::after { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse 80% 70% at center 40%, rgba(11,11,18,0) 0%, rgba(11,11,18,0.42) 100%); pointer-events: none; }
.room-chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 22px 26px;
}
.room-x {
  all: unset; cursor: pointer;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--copy);
  border: 1px solid rgba(242,240,236,0.35);
  border-radius: 2px;
  background: rgba(5,5,8,0.45);
  transition: border-color var(--motion-fast) var(--ease-out),
              color var(--motion-fast) var(--ease-out),
              background var(--motion-fast) var(--ease-out);
}
.room-x:hover { color: var(--purple-lit); border-color: var(--purple-lit); background: rgba(5,5,8,0.7); }
.room-x:focus-visible { outline: 2px solid var(--purple-lit); outline-offset: 3px; }
.room-body {
  position: relative; z-index: 2;
  min-height: 100dvh;
  display: grid; align-content: center; justify-items: center;
  gap: 10px; /* headline sits tight on its sub (Naveen r6) */
  padding: 96px 32px 64px;
}
.room-headline {
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: clamp(26px, 3vw, 42px); letter-spacing: -0.01em;
  color: var(--copy); text-align: center;
}
.room-sub {
  font-family: 'Tomorrow', sans-serif; font-size: 16px; line-height: 1.6;
  color: rgba(242,240,236,0.8); text-align: center; max-width: 62ch;
}

/* §4 bays — reference card grammar (Naveen r5): colored eyebrow, title with
   full stop, rounded hairline card, hover lift, staggered entrance */
.bay-grid { display: grid; gap: 18px; max-width: 1240px; width: 100%; margin-top: 26px; }
.bay-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bay-row--three { grid-template-columns: repeat(3, 1fr); width: 75.5%; margin: 0 auto; }
.bay {
  background: rgba(13,13,21,0.96);
  border: 1px solid rgba(134,87,224,0.16);
  border-radius: 4px;
  padding: 22px 24px;
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out),
              background 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.bay:hover {
  transform: translateY(-6px);
  background: rgba(18,18,28,0.98);
  border-color: rgba(134,87,224,0.55);
  box-shadow: 0 14px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(134,87,224,0.12);
}
.bay-num { font-family: 'Tomorrow', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 0.22em; }
.bay-row .bay:nth-child(3n+1) .bay-num { color: var(--purple-lit); }
.bay-row .bay:nth-child(3n+2) .bay-num { color: var(--yellow); }
.bay-row .bay:nth-child(3n)   .bay-num { color: var(--red); }
.bay-name { font-family: 'Tektur', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.015em; color: var(--copy); margin-top: 8px; }
.bay-copy { font-family: 'Tomorrow', sans-serif; font-size: 13px; line-height: 1.55; color: rgba(242,240,236,0.78); margin-top: 10px; }
/* staggered entrance as the room rises */
.room.open .bay { animation: cardIn 550ms var(--ease-out) backwards; }
.bay-row .bay:nth-child(1) { animation-delay: 80ms; }
.bay-row .bay:nth-child(2) { animation-delay: 140ms; }
.bay-row .bay:nth-child(3) { animation-delay: 200ms; }
.bay-row .bay:nth-child(4) { animation-delay: 260ms; }
.bay-row--three .bay:nth-child(1) { animation-delay: 320ms; }
.bay-row--three .bay:nth-child(2) { animation-delay: 380ms; }
.bay-row--three .bay:nth-child(3) { animation-delay: 440ms; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .room.open .bay, .room.open .cap, .room.open .panel5 { animation: none; } }
@media (max-width: 1000px) { .bay-row { grid-template-columns: repeat(2, 1fr); } .bay-row--three { width: 100%; grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bay-row, .bay-row--three { grid-template-columns: 1fr; } .room-body { align-content: start; } }

/* §5 panel */
.panel5 {
  position: relative;
  width: min(1180px, 94vw);
  background: rgba(8,8,13,0.88);
  border: 1px solid rgba(134,87,224,0.35);
  border-radius: 4px;
  padding: 28px 56px 20px;
  box-shadow: 0 0 80px rgba(85,54,157,0.25);
}
.room.open .panel5 { animation: cardIn 550ms var(--ease-out) backwards 120ms; }
.panel5-top { display: flex; justify-content: flex-end; font-family: 'Tomorrow', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; }
.panel5-page { color: var(--muted); }
.p5-screen { padding: 20px 0 8px; }
.p5-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
.p5-right { border-left: 1px solid var(--line); padding-left: 40px; }
.room-headline--p5 { text-align: left; font-size: clamp(22px, 2.3vw, 32px); }
.p5-copy { font-family: 'Tomorrow', sans-serif; font-size: 15px; line-height: 1.65; color: var(--copy); margin-top: 14px; max-width: 52ch; }
.p5-label { font-family: 'Tomorrow', sans-serif; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--yellow); margin: 18px 0 12px; }
.p5-right .p5-label { margin-top: 0; }
.p5-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.p5-stat { display: flex; align-items: center; gap: 14px; }
.p5-ico { flex: none; width: 28px; height: 28px; color: var(--purple-lit); }
.p5-stat-txt { display: grid; }
.p5-num { font-family: 'Tektur', sans-serif; font-weight: 700; font-size: 24px; color: var(--yellow); font-variant-numeric: tabular-nums; }
.p5-cap { font-family: 'Tomorrow', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(242,240,236,0.72); margin-top: 2px; }
.p5-support { font-family: 'Tomorrow', sans-serif; font-size: 13px; color: rgba(242,240,236,0.75); margin-top: 16px; }
/* channels: two rows of four, taller chips with placeholder icons
   (Naveen r6; real channel logos replace these per v10 when files land) */
.p5-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.p5-chips span {
  display: flex; align-items: center; gap: 11px;
  font-family: 'Tomorrow', sans-serif; font-size: 13.5px; font-weight: 500;
  color: var(--copy);
  background: rgba(18,18,28,0.9);
  border: 1px solid rgba(134,87,224,0.3); border-radius: 2px;
  padding: 14px 18px;
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.p5-chips span:hover { transform: translateY(-2px); border-color: rgba(134,87,224,0.65); background: rgba(24,24,38,0.95); }
.chip-ico { flex: none; width: 19px; height: 19px; color: var(--purple-lit); }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.cap {
  background: rgba(13,13,21,0.96);
  border: 1px solid rgba(134,87,224,0.16);
  border-radius: 4px;
  padding: 16px 18px;
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out),
              background 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.cap:hover {
  transform: translateY(-5px);
  background: rgba(18,18,28,0.98);
  border-color: rgba(134,87,224,0.55);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}
.room.open .cap { animation: cardIn 500ms var(--ease-out) backwards; }
.cap:nth-child(1) { animation-delay: 60ms; } .cap:nth-child(2) { animation-delay: 110ms; }
.cap:nth-child(3) { animation-delay: 160ms; } .cap:nth-child(4) { animation-delay: 210ms; }
.cap:nth-child(5) { animation-delay: 260ms; } .cap:nth-child(6) { animation-delay: 310ms; }
.cap:nth-child(7) { animation-delay: 360ms; } .cap:nth-child(8) { animation-delay: 410ms; }
.cap:nth-child(9) { animation-delay: 460ms; }
.cap-name { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 14px; color: var(--copy); }
.cap-copy { font-family: 'Tomorrow', sans-serif; font-size: 12px; line-height: 1.5; color: rgba(242,240,236,0.74); margin-top: 6px; }
.panel5-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px; margin-top: 8px;
}
.p5-close-line { font-family: 'Tomorrow', sans-serif; font-size: 13.5px; color: var(--copy); }
.panel5-footer .cta-underline { margin-top: 0; padding: 9px 24px; font-size: 13px; white-space: nowrap; }
.p5-arrow {
  all: unset; cursor: pointer;
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  font-size: 26px; color: rgba(242,240,236,0.5);
}
.p5-arrow:hover { color: var(--purple-lit); }
.p5-arrow--prev { left: 6px; }
.p5-arrow--next { right: 6px; }
.p5-dots { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.p5-dot { all: unset; cursor: pointer; width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(242,240,236,0.45); }
.p5-dot.is-on { background: var(--purple-lit); border-color: var(--purple-lit); }
@media (max-width: 900px) {
  .panel5 { padding: 24px 20px; }
  .p5-cols { grid-template-columns: 1fr; gap: 20px; }
  .p5-right { border-left: 0; padding-left: 0; }
  .p5-chips { grid-template-columns: repeat(2, 1fr); }
  .cap-grid { grid-template-columns: 1fr; }
  .panel5-footer { flex-direction: column; align-items: flex-start; }
  .p5-arrow--prev { left: -4px; } .p5-arrow--next { right: -4px; }
}

/* ---------- Virtual track ---------- */
#track { position: relative; width: 100%; height: 400vh; /* set by JS */ pointer-events: none; }
.no-js #track, .static-mode #track { display: none; }

/* ---------- Static / reduced-motion fallback ---------- */
#fallback { display: none; }
.no-js #fallback, .static-mode #fallback { display: block; }
.fb-beat { position: relative; min-height: 100dvh; display: grid; place-items: center; overflow: hidden; }
.fb-beat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fb-beat figcaption { position: relative; z-index: 2; }
.fb-beat figcaption.street-title { background: radial-gradient(ellipse at center, rgba(5,5,8,0.32), rgba(5,5,8,0) 72%); padding: 48px; }
.fb-silent { opacity: 0; }

/* ---------- Debug HUD (debug tooling, outside the site z-scale) ---------- */
#hud {
  position: fixed; top: 16px; left: 16px; z-index: 1000;
  background: rgba(5,5,8,0.82);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px 14px;
  font-family: 'Tomorrow', monospace, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--copy-body);
  min-width: 240px;
  user-select: none;
}
.hud-title { color: var(--purple-lit); font-weight: 600; letter-spacing: 0.18em; margin-bottom: 6px; }
.hud-row { margin: 3px 0; }
.hud-row span { color: var(--copy); font-variant-numeric: tabular-nums; }
#h-sliders label { display: block; margin: 6px 0 2px; color: var(--muted); }
#h-sliders input[type=range] { width: 100%; }
.hud-join { color: var(--yellow); font-weight: 600; opacity: 0; transition: opacity 400ms; }
.hud-join.flash { opacity: 1; transition: none; }

/* copy-window bounds debug outline */
.show-bounds .copy-window { outline: 1px dashed rgba(255,221,77,0.6); outline-offset: -1px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hint { transition: none; }
}

/* ===== §10 city map (25 Oct): pins over the end aerial; one pin per gate, labels = gate lines ===== */
.map-layer { position: absolute; inset: 0; z-index: 21; opacity: 0; pointer-events: none; }
.map-layer.is-on { pointer-events: auto; }
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-route path { fill: none; stroke: rgba(255,255,255,0.55); stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.map-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; padding: 0 0 6px; cursor: pointer; color: #fff; font-family: 'Tomorrow', sans-serif; text-align: center; }
.map-pin-label { font-weight: 600; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; padding: 6px 10px; border-radius: 3px; background: rgba(5,5,8,0.62); border: 1px solid rgba(255,255,255,0.14); transition: background 200ms, border-color 200ms, transform 200ms; }
.map-pin-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--purple-lit); box-shadow: 0 0 0 4px rgba(134,87,224,0.28), 0 0 18px rgba(134,87,224,0.9); position: relative; }
.map-pin-dot::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(134,87,224,0.6); animation: map-pulse 2.4s ease-out infinite; }
.map-pin:hover .map-pin-label, .map-pin:focus-visible .map-pin-label { background: var(--purple); border-color: var(--purple-lit); transform: translateY(-2px); }
.map-pin:focus-visible { outline: none; }
.map-pin--start .map-pin-dot { background: rgba(255,255,255,0.85); box-shadow: 0 0 0 4px rgba(255,255,255,0.18); }
.map-pin--start .map-pin-dot::after { display: none; }
.map-pin--start .map-pin-label { font-weight: 500; opacity: 0.8; }
.map-title { position: absolute; left: 48px; bottom: 13vh; color: #fff; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(22px, 2.6vw, 40px); line-height: 1.05; margin: 0; text-shadow: 0 2px 24px rgba(0,0,0,0.6); }
.map-title small { display: block; font-family: 'Tomorrow', sans-serif; font-weight: 400; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-top: 10px; }
@keyframes map-pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }
@media (max-width: 760px) { .map-pin-label { font-size: 11px; padding: 5px 8px; } .map-title { left: 20px; } }
@media (prefers-reduced-motion: reduce) { .map-pin-dot::after { animation: none; } }

/* ======================================================================
   NAV TEST (25 Oct, thread 5): rail, timed gate rule, push feedback, jump.
   Lives only in main_navtest.css until Naveen signs it off.
   ====================================================================== */

/* ---- timed gate: the yellow rule is the hold's progress ---- */
.gate-rule {
  position: relative; overflow: hidden;
  background: rgba(255,221,77,0.22);
  box-shadow: none;
}
.gate-rule::after {
  content: ''; position: absolute; inset: 0;
  background: var(--yellow);
  box-shadow: 0 0 14px rgba(255,221,77,0.45);
  transform-origin: left center;
  transform: scaleX(var(--fill, 0));
}
.gate.is-released .gate-rule { box-shadow: 0 0 14px rgba(255,221,77,0.45); }
/* a push against the hold is answered: the line lifts, the rule glows */
.gate.nudge .gate-line { animation: navNudge 380ms var(--ease-out); }
.gate.nudge .gate-rule { animation: navGlow 380ms var(--ease-out); }
@keyframes navNudge { 0% { transform: translateY(0); } 35% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
@keyframes navGlow { 0% { box-shadow: none; } 35% { box-shadow: 0 0 22px rgba(255,221,77,0.8); } 100% { box-shadow: none; } }

/* ---- jump: soften out, the gate's park frame dissolves in, sharpen back ---- */
#jump-still {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; pointer-events: none;
  transition: opacity 320ms linear;
}
#jump-still.on { opacity: 1; transition: opacity 240ms linear; }
#stage.jump-out .layers {
  filter: blur(9px) brightness(0.62);
  transform: scale(1.03);
  transition: filter 300ms cubic-bezier(.4,0,1,1), transform 300ms cubic-bezier(.4,0,1,1);
}
#stage.jump-in .layers {
  transition: filter 520ms var(--ease-out), transform 520ms var(--ease-out);
}
#stage.jump-out .copy-window,
#stage.jump-out .gate,
#stage.jump-out #continue-hint,
#stage.jump-out .map-layer { opacity: 0 !important; transition: opacity 200ms linear; }
#stage.jump-in .gate { transition: opacity 450ms var(--ease-out) 120ms; }

/* ---- rail (desktop) ---- */
.rail {
  --row: 36px;
  position: fixed; z-index: 30;
  right: 24px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end;
  opacity: 0; visibility: hidden;
  transition: opacity 450ms var(--ease-out), visibility 0s linear 450ms;
}
.rail.is-on { opacity: 1; visibility: visible; transition: opacity 450ms var(--ease-out); }
/* r3 (Naveen 26 Oct): the rail stays solid off-white (#F2F0EC, the copy colour), never dimmed to grey */
/* when the labels are out, a soft dark wash from the right edge keeps them legible on bright frames */
.rail::before {
  content: ''; position: absolute; z-index: -1;
  right: -24px; top: -220px; bottom: -220px; width: 520px;
  background: radial-gradient(ellipse 100% 50% at 100% 50%, rgba(5,5,8,0.78) 0%, rgba(5,5,8,0.46) 45%, rgba(5,5,8,0) 80%);
  opacity: 0; transition: opacity 300ms var(--ease-out);
  pointer-events: none;
}
.rail:hover::before, .rail:has(:focus-visible)::before { opacity: 0; } /* r5: one pill label, no wash */
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; }
.rail-item { height: var(--row); }
.rail-link, .rail-map {
  position: relative;
  display: flex; align-items: center; justify-content: flex-end;
  height: var(--row); min-width: 44px;
  color: var(--copy); text-decoration: none;
  outline: none;
}
.rail-mark, .rail-map-mark { width: 24px; height: var(--row); display: grid; place-items: center; position: relative; }
/* r5: a subtle ring around the current (yellow) mark */
.rail-mark::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px; border-radius: 50%;
  border: 1px solid rgba(255,221,77,0.6);
  opacity: 0; transform: scale(0.6);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  pointer-events: none;
}
.rail-link.is-here .rail-mark::after { opacity: 1; transform: scale(1); }
.rail-mark::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.25px solid var(--copy);
  background: rgba(5,5,8,0.7);
  box-shadow: 0 0 0 2px rgba(5,5,8,0.35), 0 0 10px rgba(5,5,8,0.75);
  transition: background 250ms var(--ease-out), transform 250ms var(--ease-out), border-color 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}
.rail-link.is-done .rail-mark::before { background: var(--copy); }
.rail-link.is-here .rail-mark::before {
  background: var(--yellow); border-color: var(--yellow);
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(5,5,8,0.35), 0 0 12px rgba(255,221,77,0.85);
}
.rail-link:hover .rail-mark::before { transform: scale(1.3); }
.rail-link:focus-visible .rail-mark::before, .rail-map:focus-visible .rail-map-mark svg {
  outline: 2px solid var(--yellow); outline-offset: 4px;
}
.rail-map { margin-top: 18px; }
.rail-map-mark svg {
  width: 16px; height: 16px; color: var(--copy);
  filter: drop-shadow(0 0 2px rgba(5,5,8,0.9)) drop-shadow(0 0 8px rgba(5,5,8,0.7));
  border-radius: 2px;
}
/* the line between the marks: faint track, filled to where you are */
.rail-line {
  position: absolute; right: 11.25px;
  top: calc(var(--row) / 2); height: calc(var(--row) * 8); /* 9 marks: start + 8 gates (r9) */
  width: 1.5px;
  /* the way ahead: a fine dotted line in the same off-white (echoes the dotted route on the end map) */
  background: repeating-linear-gradient(to bottom, var(--copy) 0 1.5px, transparent 1.5px 5px);
  box-shadow: 0 0 6px rgba(5,5,8,0.7);
  pointer-events: none;
}
/* passed stretches: quiet white */
.rail-line-done {
  position: absolute; left: 0; right: 0; top: 0;
  height: calc(var(--done, 0) * 100%);
  background: var(--copy);
}
/* the stretch being travelled: yellow, a touch thicker, with a glow so it reads on bright frames */
.rail-line-active {
  position: absolute; left: -0.75px; right: -0.75px;
  top: calc(var(--done, 0) * 100%);
  height: calc(var(--act, 0) * 100%);
  background: var(--yellow);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(5,5,8,0.45), 0 0 10px rgba(255,221,77,0.85);
}
/* labels sit outside the hit box, to the left of the mark */
.rail-label {
  /* r5 (Naveen 26 Oct): one label at a time, in an off-white pill, medium weight */
  position: absolute; right: 34px; top: 50%;
  transform: translate(6px, -50%);
  white-space: nowrap;
  font-family: 'Tomorrow', sans-serif; font-weight: 500;
  font-size: 13px; letter-spacing: 0.01em; line-height: 1;
  color: #0b0b12;
  background: rgba(242,240,236,0.94);
  padding: 7px 12px 7px; border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out);
}
.rail-link:hover .rail-label, .rail-link:focus-visible .rail-label,
.rail-map:hover .rail-label, .rail-map:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
.rail-map .rail-label { --i: 8; }
/* touch: the rail is replaced by the mobile control (pending Naveen) */
@media (pointer: coarse) { .rail { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .rail, .rail-label, .rail-mark::before, .rail::before { transition: none; }
}

/* ---- test badge: so the test page is never mistaken for the live build ---- */
.navtest-badge {
  position: fixed; left: 12px; bottom: 10px; z-index: 31;
  font-family: 'Tomorrow', sans-serif; font-size: 11px; letter-spacing: 0.04em;
  color: rgba(242,240,236,0.55); pointer-events: none; margin: 0;
}

/* ---- §0 title: the full stop beats through the brand colours (Naveen 25 Oct) ----
   A bar of three beats (yellow, red, purple) about 0.6 s apart, then a rest:
   on each beat the dot snaps to its colour with a quick swell and glow.
   Starts once the title has risen; stops the moment the visitor scrolls.
   Under 1.3 colour changes a second, far below the flash threshold. */
.s0-stop { display: inline-block; transform-origin: 50% 85%; }
#s0.reveal.beat .s0-stop { animation: stopBeat 2400ms linear 2200ms infinite; }
@keyframes stopBeat {
  0%     { color: var(--yellow); transform: scale(1.55); text-shadow: 0 0 14px rgba(255,221,77,1), 0 0 34px rgba(255,221,77,0.85), 0 2px 40px rgba(0,0,0,.8); }
  7%     { color: var(--yellow); transform: scale(1);    text-shadow: 0 0 10px rgba(255,221,77,0.55), 0 2px 40px rgba(0,0,0,.8); }
  24.9%  { color: var(--yellow); transform: scale(1);    text-shadow: 0 0 10px rgba(255,221,77,0.55), 0 2px 40px rgba(0,0,0,.8); }
  25%    { color: var(--red);    transform: scale(1.55); text-shadow: 0 0 14px rgba(240,61,46,1), 0 0 34px rgba(240,61,46,0.85), 0 2px 40px rgba(0,0,0,.8); }
  32%    { color: var(--red);    transform: scale(1);    text-shadow: 0 0 10px rgba(240,61,46,0.55), 0 2px 40px rgba(0,0,0,.8); }
  49.9%  { color: var(--red);    transform: scale(1);    text-shadow: 0 0 10px rgba(240,61,46,0.55), 0 2px 40px rgba(0,0,0,.8); }
  50%    { color: var(--purple-lit); transform: scale(1.55); text-shadow: 0 0 14px rgba(134,87,224,1), 0 0 34px rgba(134,87,224,0.85), 0 2px 40px rgba(0,0,0,.8); }
  57%    { color: var(--purple-lit); transform: scale(1);    text-shadow: 0 0 10px rgba(134,87,224,0.55), 0 2px 40px rgba(0,0,0,.8); }
  100%   { color: var(--purple-lit); transform: scale(1);    text-shadow: 0 0 10px rgba(134,87,224,0.55), 0 2px 40px rgba(0,0,0,.8); }
}
@media (prefers-reduced-motion: reduce) { #s0.reveal.beat .s0-stop { animation: none; } }


/* ======================================================================
   NAV TEST r5 (26 Oct): gate dashboards (transparent HUD, left side)
   ====================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.gate.hud {
  left: clamp(24px, 3vw, 48px); top: 50%; bottom: auto;
  transform: translateY(-50%);
  width: clamp(400px, 33vw, 540px); /* r6: more room for a summary paragraph (Naveen 26 Oct) */
}
.gate.hud::before { display: none; }
.hud-panel {
  position: relative;
  padding: 24px 28px 18px;
  max-height: calc(100vh - 120px);
  background: linear-gradient(180deg, rgba(10,11,20,0.58), rgba(10,11,20,0.40));
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(242,240,236,0.12);
  border-radius: 3px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.35), inset 0 1px 0 rgba(242,240,236,0.06);
  color: var(--copy);
}
/* a short lit seam on the top edge: the panel is "on" */
.hud-panel::before {
  content: ''; position: absolute; left: 24px; top: -1px; width: 72px; height: 2px;
  background: var(--purple-lit); box-shadow: 0 0 12px rgba(134,87,224,0.9);
}
.hud-corner { position: absolute; width: 12px; height: 12px; border-color: rgba(242,240,236,0.75); border-style: solid; border-width: 0; transition: transform 420ms var(--ease-out), opacity 420ms var(--ease-out); opacity: 0; }
.hud-corner--tl { left: -5px; top: -5px; border-left-width: 1.5px; border-top-width: 1.5px; transform: translate(6px, 6px); }
.hud-corner--tr { right: -5px; top: -5px; border-right-width: 1.5px; border-top-width: 1.5px; transform: translate(-6px, 6px); }
.hud-corner--bl { left: -5px; bottom: -5px; border-left-width: 1.5px; border-bottom-width: 1.5px; transform: translate(6px, -6px); }
.hud-corner--br { right: -5px; bottom: -5px; border-right-width: 1.5px; border-bottom-width: 1.5px; transform: translate(-6px, -6px); }
.gate.hud-in .hud-corner { opacity: 1; transform: none; }

.hud-head {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Tomorrow', sans-serif; font-weight: 500;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(207,201,230,0.72);
}
.hud-id b { color: var(--copy); font-weight: 600; }
.hud-loc { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-live { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.hud-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(240,61,46,0.9); animation: hudLive 2.4s ease-in-out infinite; }
@keyframes hudLive { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.gate.hud .gate-line {
  margin-top: 16px;
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: clamp(24px, 2.1vw, 33px); line-height: 1.08; letter-spacing: -0.01em;
  color: var(--copy); text-shadow: none;
  text-wrap: balance;
}
.gate.hud .gate-sub { margin-top: 8px; font-size: 14.5px; color: rgba(242,240,236,0.78); text-shadow: none; }
.gate.hud .gate-rule { width: 100%; height: 2px; margin: 18px 0 16px; border-radius: 1px; }
/* r6: the summary paragraph: what is inside the gate, in brief */
.hud-summary {
  margin: 0 0 18px; max-width: 62ch;
  font-family: 'Tomorrow', sans-serif; font-weight: 400;
  font-size: 15px; line-height: 1.62; letter-spacing: 0.005em;
  color: rgba(242,240,236,0.86);
}
/* short screens: keep the panel inside the frame; the list is the first thing to give way */
@media (max-height: 860px) { .gate.hud .hud-list { display: none; } }
@media (max-height: 700px) { .hud-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } }

.hud-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid rgba(242,240,236,0.10); border-bottom: 1px solid rgba(242,240,236,0.10); }
.hud-stat { padding: 12px 10px 12px 0; display: flex; flex-direction: column; justify-content: space-between; }
.hud-stat + .hud-stat { padding-left: 12px; border-left: 1px solid rgba(242,240,236,0.10); }
.hud-stat dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(207,201,230,0.66); }
.hud-stat dd { margin: 6px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 21px; font-variant-numeric: tabular-nums; color: var(--copy); white-space: nowrap; }

.hud-list { list-style: none; margin: 12px 0 0; padding: 0; }
.hud-list li {
  position: relative; padding: 7px 0 7px 16px;
  font-family: 'Tomorrow', sans-serif; font-size: 14px; color: rgba(242,240,236,0.88);
  border-bottom: 1px solid rgba(242,240,236,0.06);
}
.hud-list li::before { content: ''; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; background: var(--yellow); }

.hud-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.gate.hud .gate-hit.hud-cta {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px 11px 16px;
  font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--yellow);
  background: rgba(255,221,77,0.08);
  border: 1px solid rgba(255,221,77,0.75);
  border-radius: 2px;
  transition: background var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}
.gate.hud .gate-hit.hud-cta:hover, .gate.hud .gate-hit.hud-cta:focus-visible { background: var(--yellow); color: #0b0b12; box-shadow: 0 0 22px rgba(255,221,77,0.45); }
.gate.hud .gate-hit.hud-cta:focus-visible { outline: 2px solid var(--copy); outline-offset: 3px; }
.gate.hud .gate-cta { all: unset; }
.gate.hud .gate-cta::before { display: none; }
.hud-cta-arrow { width: 16px; height: 10px; transition: transform var(--motion-fast) var(--ease-out); }
.gate.hud .hud-cta:hover .hud-cta-arrow { transform: translateX(4px); }
.gate.hud.pulse .hud-cta { animation: hudPulse 500ms var(--ease-in-out) 2; }
@keyframes hudPulse { 50% { box-shadow: 0 0 26px rgba(255,221,77,0.6); } }
.gate.hud.loading .hud-cta { cursor: progress; }
.hud-next { font-family: 'Tomorrow', sans-serif; font-size: 11px; letter-spacing: 0.06em; color: rgba(207,201,230,0.62); text-align: right; }
.hud-next b { display: block; margin-top: 3px; font-weight: 500; color: rgba(242,240,236,0.86); letter-spacing: 0.01em; font-size: 12.5px; }
.hud-sample { margin: 12px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(240,61,46,0.8); }

/* arrival: modules settle in sequence once the gate is fully on screen */
.gate.hud .hud-r { opacity: 0; transform: translateY(8px); transition: opacity 380ms var(--ease-out), transform 460ms var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }
.gate.hud.hud-in .hud-r { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .gate.hud .hud-r, .hud-corner { transition: none; } .hud-live i { animation: none; } }
@media (max-width: 760px) { .gate.hud { left: 12px; right: 12px; width: auto; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; } .hud-list, .hud-next { display: none; } }

/* ======================================================================
   NAV TEST r5 (26 Oct): the map is the menu
   ====================================================================== */
#map { display: none !important; } /* the end-of-film map now uses the overlay below */
.mapmenu { position: fixed; inset: 0; z-index: 35; background: var(--ground); opacity: 0; transition: opacity 420ms var(--ease-out); }
.mapmenu.is-open { opacity: 1; }
.mapmenu-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.045); transition: transform 1200ms var(--ease-out); }
.mapmenu.is-open .mapmenu-img { transform: scale(1); }
.mapmenu-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,5,8,0.62) 0%, rgba(5,5,8,0.22) 38%, rgba(5,5,8,0) 60%), linear-gradient(0deg, rgba(5,5,8,0.45) 0%, rgba(5,5,8,0) 22%); }
.mapmenu-route { display: none; } /* r6: location pins, no connecting route (Naveen 26 Oct) */
.mapmenu-route path { fill: none; stroke-linecap: round; }
.mapmenu-route-done { stroke: rgba(242,240,236,0.9); stroke-width: 1.5; }
.mapmenu-route-ahead { stroke: rgba(242,240,236,0.75); stroke-width: 1.5; stroke-dasharray: 1.5 7; }

/* r7 (Naveen 26 Oct): bigger pins on named places, a soft district glow under each, a compass; the aerial dims so the map leads */
.mapmenu.is-open .mapmenu-img { filter: brightness(0.78) saturate(0.9); }
.mm-pin {
  all: unset; position: absolute; width: 64px; height: 64px; margin: -54px 0 0 -32px; /* tip on the place */ cursor: pointer;
  display: block;
  opacity: 0; transform: translateY(-12px);
  transition: opacity 360ms var(--ease-out), transform 480ms var(--ease-out);
  transition-delay: calc(var(--k, 0) * 50ms + 200ms);
}
.mapmenu.is-open .mm-pin { opacity: 1; transform: none; }
.mm-pin-svg { position: absolute; left: 13px; top: 6px; width: 38px; height: 50px; overflow: visible; transition: transform 240ms var(--ease-out); filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6)); }
.mm-pin-body { fill: rgba(8,9,16,0.82); stroke: var(--copy); stroke-width: 1.4; transition: fill 220ms, stroke 220ms; }
.mm-pin-num { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 11px; fill: var(--copy); text-anchor: middle; dominant-baseline: central; transition: fill 220ms; }
.mm-pin-dot { fill: var(--copy); transition: fill 220ms; }
.mm-pin-shadow { position: absolute; left: 50%; top: 56px; width: 18px; height: 5px; margin-left: -9px; border-radius: 50%; background: rgba(0,0,0,0.6); filter: blur(1.5px); }
/* the district: a soft glow on the ground at the pin's tip */
.mm-pin-zone { position: absolute; left: 50%; top: 58px; width: 150px; height: 56px; margin: -28px 0 0 -75px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,240,236,0.16), rgba(242,240,236,0) 100%); pointer-events: none; transition: background 260ms; }
.mm-pin.is-here .mm-pin-zone { background: radial-gradient(closest-side, rgba(255,221,77,0.28), rgba(255,221,77,0) 100%); }
.mm-pin:hover .mm-pin-zone, .mm-pin:focus-visible .mm-pin-zone { background: radial-gradient(closest-side, rgba(242,240,236,0.26), rgba(242,240,236,0) 100%); }
/* the place name, under the pin */
.mm-pin-place {
  position: absolute; left: 50%; top: 68px; transform: translateX(-50%);
  white-space: nowrap; pointer-events: none;
  font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--copy);
  text-shadow: 0 0 3px rgba(0,0,0,0.95), 0 1px 10px rgba(0,0,0,0.9);
}
.mm-pin.is-here .mm-pin-place { color: var(--yellow); }
.mm-pin.is-done .mm-pin-body { fill: var(--copy); stroke: var(--copy); }
.mm-pin.is-done .mm-pin-num, .mm-pin.is-done .mm-pin-dot { fill: #0b0b12; }
.mm-pin.is-here .mm-pin-body { fill: var(--yellow); stroke: var(--yellow); }
.mm-pin.is-here .mm-pin-num, .mm-pin.is-here .mm-pin-dot { fill: #0b0b12; }
.mm-pin.is-here .mm-pin-svg { filter: drop-shadow(0 0 12px rgba(255,221,77,0.7)) drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.mm-pin-ring { position: absolute; left: 50%; top: 0; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%; border: 1px solid rgba(242,240,236,0.7); opacity: 0; transform: scale(0.7); transition: opacity 260ms var(--ease-out), transform 300ms var(--ease-out); pointer-events: none; }
.mm-pin.is-here .mm-pin-ring { opacity: 1; transform: none; border-color: rgba(255,221,77,0.65); }
.mm-pin:hover .mm-pin-ring, .mm-pin:focus-visible .mm-pin-ring { opacity: 1; transform: scale(1.06); }
.mm-pin:hover .mm-pin-svg, .mm-pin:focus-visible .mm-pin-svg { transform: translateY(-4px); }
.mm-pin:focus-visible .mm-pin-ring { border-color: var(--yellow); }
.mapmenu-compass { position: absolute; right: 32px; bottom: calc(24px + env(safe-area-inset-bottom)); width: 40px; height: 40px; color: var(--copy); font-family: 'Tektur', sans-serif; opacity: 0.85; }

.mapmenu-name { position: absolute; left: clamp(24px, 4vw, 64px); top: clamp(84px, 12vh, 140px); max-width: 46vw; pointer-events: none; } /* sits in the night sky, clear of the route */
.mapmenu-kicker { margin: 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--yellow); }
.mapmenu-title { margin: 14px 0 0; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(36px, 4.4vw, 68px); line-height: 1.02; letter-spacing: -0.02em; color: var(--copy); text-shadow: 0 2px 30px rgba(0,0,0,0.6); }
.mapmenu-sub { margin: 14px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 16px; color: rgba(242,240,236,0.82); }
.mapmenu-name.swap > * { animation: mmSwap 380ms var(--ease-out) both; }
.mapmenu-name.swap .mapmenu-title { animation-delay: 40ms; }
.mapmenu-name.swap .mapmenu-sub { animation-delay: 80ms; }
@keyframes mmSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.mapmenu-legend { position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 22px; font-family: 'Tomorrow', sans-serif; font-size: 12px; color: rgba(242,240,236,0.85); }
.mapmenu-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { width: 11px; height: 15px; display: inline-block; }
.lg path { stroke-width: 1.5; }
.lg--here path { fill: var(--yellow); stroke: var(--yellow); }
.lg--done path { fill: var(--copy); stroke: var(--copy); }
.lg--todo path { fill: rgba(5,5,8,0.6); stroke: var(--copy); }
.mapmenu-close {
  all: unset; cursor: pointer; position: absolute; right: 24px; top: 22px;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 13px; color: var(--copy);
}
.mapmenu-close svg { width: 44px; height: 44px; padding: 13px; box-sizing: border-box; border-radius: 50%; border: 1px solid rgba(242,240,236,0.6); background: rgba(5,5,8,0.4); transition: background 200ms, color 200ms; }
.mapmenu-close:hover svg, .mapmenu-close:focus-visible svg { background: var(--copy); color: #0b0b12; }
.mapmenu.is-end .mapmenu-close { display: none; }
@media (prefers-reduced-motion: reduce) { .mapmenu, .mapmenu-img, .mm-pin { transition: none; } .mapmenu-name.swap > * { animation: none; } }


/* ======================================================================
   NAV TEST r8 (26 Oct): scroll captions in the interface family
   Clean type over the scene (no glass): Tektur 600 like the gate lines,
   the dashboard's corner brackets, a yellow line that fills through the
   moment, an edgeless falloff for legibility. Left column; data-pos.
   ====================================================================== */
.copy-window.cap-hud { display: block; }
.cap-box {
  position: absolute; left: clamp(24px, 3vw, 48px); top: 50%;
  transform: translateY(-50%);
  padding: 20px 26px 22px;
  max-width: min(46vw, 640px);
}
.copy-window.cap-hud[data-pos="low"] .cap-box { top: auto; bottom: 17vh; transform: none; }
.cap-hud .scrim.cap-fall {
  position: absolute; z-index: -1;
  left: -160px; right: -160px; top: -120px; bottom: -120px;
  width: auto; height: auto; transform: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(5,5,8,0.42), rgba(5,5,8,0.18) 50%, rgba(5,5,8,0) 76%);
}
.copy-window.cap-hud .street-title {
  font-family: 'Tektur', sans-serif; font-weight: 600;
  font-size: clamp(30px, 2.9vw, 50px); line-height: 1.1; letter-spacing: -0.012em;
  text-align: left; max-width: 15ch; padding: 0; white-space: normal;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0,0,0,0.7);
}
.cap-hud .walk-support { text-align: left; margin-top: 12px; }
.cap-bar { position: relative; margin-top: 18px; height: 2px; width: 100%; border-radius: 1px; background: rgba(255,221,77,0.22); }
.cap-bar i { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--f, 0)); background: var(--yellow); box-shadow: 0 0 12px rgba(255,221,77,0.55); }
.cap-hud.cap-in .hud-corner { opacity: 1; transform: none; }
@media (max-width: 760px) { .cap-box { left: 12px; right: 12px; max-width: none; } }


/* ======================================================================
   NAV TEST r9 (26 Oct, Naveen)
   ====================================================================== */
/* captions centred; short ones on one line, long ones on two balanced lines */
.copy-window.cap-hud[data-pos^="center"] .cap-box { left: 0; right: 0; margin-inline: auto; width: fit-content; max-width: 92vw; top: 50%; transform: translateY(-50%); text-align: center; }
.copy-window.cap-hud[data-pos="center-low"] .cap-box { top: auto; bottom: 15vh; transform: none; }
.copy-window.cap-hud[data-pos^="center"] .street-title { text-align: center; margin: 0 auto; }
.copy-window.cap-hud[data-lines="1"] .street-title { white-space: nowrap; max-width: none; }
.copy-window.cap-hud[data-lines="2"] .street-title { max-width: var(--cw, 24ch); text-wrap: balance; }
.copy-window.cap-hud[data-pos^="center"] .walk-support { text-align: center; }

/* gate 1: centred glass screens coming up over the decode aerial */
.gate.hud.hud-center { left: 50%; top: 50%; bottom: auto; width: min(1000px, 78vw); transform: translate(-50%, -50%); }
.hud-center .hud-main { padding: 24px 40px 24px; text-align: center; transform: translateY(22px) scale(0.985); transition: transform 700ms var(--ease-out); }
.gate.hud-center.hud-in .hud-main { transform: none; }
.hud-center .hud-head { text-align: left; }
.gate.hud .gate-line.hud-display {
  margin-top: 22px;
  font-family: 'Tektur', sans-serif; font-weight: 700;
  font-size: clamp(40px, 4.6vw, 82px); line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: initial;
}
.hud-center .hud-summary { margin: 20px auto 22px; max-width: 66ch; font-size: 16.5px; text-wrap: balance; }
.hud-center .gate-rule { margin: 0; }
.hud-screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.hud-panel.hud-mini { padding: 15px 18px 16px; text-align: left; }
.hud-panel.hud-mini::before { width: 28px; left: 18px; }
.gate.hud .hud-mini.hud-r { transform: translateY(28px); transition-duration: 420ms, 620ms; }
.gate.hud.hud-in .hud-mini.hud-r { transform: none; }
.hud-mini-k { margin: 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(207,201,230,0.72); }
.hud-mini-v { margin: 7px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--copy); }
.hud-center .hud-sample { text-align: center; }

/* the trio as glass screens rising, one per beat */
.copy-window.glass-win { display: grid; place-items: center; }
.glass-screen {
  position: relative; display: grid; gap: 14px; justify-items: center; text-align: center;
  min-width: min(660px, 84vw); padding: 34px 48px 34px;
  background: linear-gradient(180deg, rgba(10,11,20,0.56), rgba(10,11,20,0.38));
  -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
  border: 1px solid rgba(242,240,236,0.12); border-radius: 3px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.35), inset 0 1px 0 rgba(242,240,236,0.06);
}
.glass-screen::before { content: ''; position: absolute; left: 50%; top: -1px; width: 88px; height: 2px; margin-left: -44px; box-shadow: 0 0 12px currentColor; }
#w8a .glass-screen::before { background: var(--purple-lit); color: rgba(134,87,224,0.9); }
#w8b .glass-screen::before { background: var(--yellow); color: rgba(255,221,77,0.8); }
#w8c .glass-screen::before { background: var(--red); color: rgba(240,61,46,0.85); }
.glass-win.cap-in .hud-corner { opacity: 1; transform: none; }
.glass-win .trio-word { font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(52px, 6.4vw, 108px); line-height: 1; letter-spacing: 0.02em; text-shadow: 0 0 30px rgba(0,0,0,0.35); }
.glass-win .trio-headline { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(22px, 2.1vw, 34px); line-height: 1.15; color: var(--copy); text-shadow: none; }
.glass-win .trio-support { font-family: 'Tomorrow', sans-serif; font-weight: 400; font-size: 16.5px; color: rgba(242,240,236,0.82); text-shadow: none; }

/* ======================================================================
   NAV TEST r10 (26 Oct): the interface screen ("iface")
   Gate 1, the trio modules and the rooms. More transparency, a faint
   grid and scan lines, tick rulers, big corner brackets, a system bar,
   a reticle with live readouts, small graphs; the frame draws itself
   open on arrival and a scan line sweeps it once. Our palette only.
   ====================================================================== */
.iface { --if-line: rgba(242,240,236,0.22); --if-dim: rgba(207,201,230,0.62); --if-acc: var(--purple-lit); }
.if-frame {
  position: relative;
  background: linear-gradient(180deg, rgba(12,14,26,0.30), rgba(12,14,26,0.16));
  -webkit-backdrop-filter: blur(9px) saturate(1.2); backdrop-filter: blur(9px) saturate(1.2);
  border: 1px solid var(--if-line);
  box-shadow: inset 0 0 60px rgba(134,87,224,0.08), inset 0 1px 0 rgba(242,240,236,0.08), 0 30px 90px rgba(0,0,0,0.30);
  color: var(--copy);
  clip-path: inset(0 50% 0 50%);
  transition: clip-path 620ms cubic-bezier(.7,0,.2,1);
}
.iface.hud-in .if-frame, .iface.cap-in .if-frame, .room.open .room--iface-frame, .room--iface.open .if-frame { clip-path: inset(-40px -40px -40px -40px); }
/* faint grid + scan lines inside the glass */
.if-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0.9;
  background:
    repeating-linear-gradient(0deg, rgba(242,240,236,0.028) 0 1px, transparent 1px 3px),
    linear-gradient(rgba(242,240,236,0.045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(242,240,236,0.045) 1px, transparent 1px) 0 0 / 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 50% 50%, #000 40%, transparent 100%); mask-image: radial-gradient(ellipse 85% 80% at 50% 50%, #000 40%, transparent 100%);
}
/* one scan sweep on arrival */
.if-scan { position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(134,87,224,0) 0%, rgba(134,87,224,0.10) 70%, rgba(242,240,236,0.5) 99%, rgba(242,240,236,0) 100%); }
.iface.hud-in .if-scan, .iface.cap-in .if-scan, .room--iface.open .if-scan { animation: ifScan 1100ms cubic-bezier(.4,0,.2,1) 380ms 1 both; }
@keyframes ifScan { 0% { opacity: 1; transform: translateY(-90px); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--scan-h, 600px)); } }
/* tick rulers on the top and bottom edges */
.if-ruler { position: absolute; left: 22px; right: 22px; height: 7px; pointer-events: none; opacity: 0.55;
  background: repeating-linear-gradient(90deg, rgba(242,240,236,0.7) 0 1px, transparent 1px 12px); }
.if-ruler--t { top: -8px; } .if-ruler--b { bottom: -8px; }
/* corner brackets, big, with a lit tick */
.if-c { position: absolute; width: 26px; height: 26px; border: 0 solid var(--copy); pointer-events: none; transition: transform 520ms var(--ease-out) 200ms; }
.if-c--tl { left: -7px; top: -7px; border-left-width: 2px; border-top-width: 2px; }
.if-c--tr { right: -7px; top: -7px; border-right-width: 2px; border-top-width: 2px; }
.if-c--bl { left: -7px; bottom: -7px; border-left-width: 2px; border-bottom-width: 2px; }
.if-c--br { right: -7px; bottom: -7px; border-right-width: 2px; border-bottom-width: 2px; }
.if-c--tl::after { content: ''; position: absolute; left: 6px; top: 6px; width: 5px; height: 5px; background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.8); }
/* side coordinates, vertical */
.if-coord { position: absolute; top: 50%; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.22em; color: var(--if-dim); white-space: nowrap; pointer-events: none; }
.if-coord--l { left: -14px; transform: translate(-100%, -50%) rotate(180deg); writing-mode: vertical-rl; }
.if-coord--r { right: -14px; transform: translate(100%, -50%); writing-mode: vertical-rl; }
/* the system bar */
.if-bar { display: flex; align-items: center; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--if-line);
  font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--if-dim);
  background: linear-gradient(90deg, rgba(134,87,224,0.14), rgba(134,87,224,0) 60%); }
.if-sys b { color: var(--copy); font-weight: 600; }
.if-seg { display: inline-flex; gap: 3px; }
.if-seg i { width: 10px; height: 4px; background: rgba(242,240,236,0.18); }
.if-seg i:nth-child(-n+5) { background: var(--purple-lit); box-shadow: 0 0 6px rgba(134,87,224,0.8); }
.if-seg--3 i { width: 26px; } .if-seg--3 i:nth-child(-n+5) { background: rgba(242,240,236,0.18); box-shadow: none; }
.if-seg--3 i.on { background: var(--if-acc); box-shadow: 0 0 8px var(--if-acc); }
.if-loc { flex: 1; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.if-bar .hud-live { color: var(--copy); }

.if-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 34px; padding: 26px 30px 24px; align-items: center; }
.if-main { text-align: left; }
.if-kicker { margin: 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--yellow); }
.if-kicker::before { content: ''; display: inline-block; width: 18px; height: 1px; margin-right: 10px; vertical-align: middle; background: var(--yellow); }
.if-text { margin: 18px 0 20px; max-width: 58ch; font-family: 'Tomorrow', sans-serif; font-size: 16px; line-height: 1.62; color: rgba(242,240,236,0.88); text-shadow: 0 1px 14px rgba(0,0,0,0.7); }

/* reticle */
.if-side { display: grid; justify-items: center; gap: 16px; }
.if-ret { position: relative; width: 210px; height: 210px; }
.ret { width: 100%; height: 100%; overflow: visible; }
.ret circle, .ret path { fill: none; stroke: rgba(242,240,236,0.55); stroke-width: 1; }
.ret-r0 { stroke: rgba(242,240,236,0.18) !important; }
.ret-r1 { stroke-dasharray: 2 6; }
.ret-r2 { stroke-dasharray: 40 10 4 10; stroke: rgba(134,87,224,0.9) !important; stroke-width: 1.5 !important; }
.ret-r3 { stroke: rgba(242,240,236,0.25) !important; }
.ret-arc { stroke: var(--copy) !important; stroke-width: 2.5 !important; }
.ret-arc--y { stroke: var(--yellow) !important; }
.ret-ticks path { stroke: rgba(242,240,236,0.35); }
.ret-x { stroke: rgba(242,240,236,0.4) !important; }
.ret-spin-a { transform-origin: 120px 120px; animation: retSpin 24s linear infinite; }
.ret-spin-b { transform-origin: 120px 120px; animation: retSpin 38s linear infinite reverse; }
@keyframes retSpin { to { transform: rotate(360deg); } }
.if-ret-read { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; }
.if-ret-read .if-count { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 34px; line-height: 1; color: var(--copy); font-variant-numeric: tabular-nums; }
.if-ret-read small { margin-top: 6px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--if-dim); }
.if-read { display: grid; grid-template-columns: repeat(3, auto); gap: 18px; margin: 0; }
.if-read dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--if-dim); }
.if-read dd { margin: 4px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 15px; color: var(--copy); font-variant-numeric: tabular-nums; }
.if-ok { color: #8be0a4 !important; }

/* small graph modules */
.if-mods { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--if-line); }
.if-mod { position: relative; padding: 14px 22px 16px; }
.if-mod + .if-mod { border-left: 1px solid var(--if-line); }
.if-mod-k { margin: 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--if-dim); }
.if-mod-v { margin: 6px 0 10px; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 15px; color: var(--copy); }
.if-spark { display: block; width: 100%; height: 22px; }
.if-spark rect { fill: rgba(242,240,236,0.55); transform-origin: 50% 100%; transform-box: fill-box; }
.if-spark rect:last-child { fill: var(--yellow); }
.iface.hud-in .if-spark rect, .iface.cap-in .if-spark rect { animation: ifBar 700ms var(--ease-out) both; animation-delay: calc(700ms + var(--i) * 45ms); }
@keyframes ifBar { from { transform: scaleY(0.05); } to { transform: scaleY(1); } }

/* ---- gate 1: centred frame, left-aligned content, big headline ---- */
.gate.hud.iface--gate { left: 50%; top: 50%; bottom: auto; width: min(1180px, 86vw); transform: translate(-50%, -50%); }
.gate.hud.iface--gate .if-display { margin: 14px 0 0; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(40px, 4.3vw, 78px); line-height: 1.03; letter-spacing: -0.02em; color: var(--copy); text-align: left; text-shadow: 0 2px 30px rgba(0,0,0,0.55); }
.gate.hud.iface--gate .gate-rule { width: 100%; margin: 0; }
.iface--gate .hud-sample { position: absolute; right: 22px; bottom: -26px; margin: 0; }
.iface--gate .if-frame { --scan-h: 620px; }

/* ---- trio: centred frame, left-aligned module, a visual per word ---- */
.copy-window.iface--trio { display: grid; place-items: center; }
.iface--trio .if-frame { width: min(920px, 84vw); --scan-h: 340px; }
.iface--data { --if-acc: var(--purple-lit); } .iface--design { --if-acc: var(--yellow); } .iface--disruption { --if-acc: var(--red); }
.iface--trio .if-bar { background: linear-gradient(90deg, color-mix(in srgb, var(--if-acc) 22%, transparent), transparent 60%); }
.iface--trio .if-body { grid-template-columns: minmax(0, 1fr) 220px; padding: 26px 30px 28px; }
.iface--trio .trio-word { margin: 0; text-align: left; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(52px, 5.8vw, 100px); line-height: 0.95; letter-spacing: 0.01em; text-shadow: 0 0 30px rgba(0,0,0,0.35); }
.iface--trio .trio-headline { margin: 14px 0 0; text-align: left; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(22px, 2.15vw, 34px); /* r38: 34 (Naveen) */ line-height: 1.15; color: var(--copy); text-shadow: 0 1px 16px rgba(0,0,0,0.6); }
.iface--trio .trio-support { margin: 10px 0 0; max-width: none; text-align: left; font-family: 'Tomorrow', sans-serif; font-size: 16px; color: rgba(242,240,236,0.85); text-shadow: 0 1px 14px rgba(0,0,0,0.6); }
.if-spark--big { height: 120px; }
.if-spark--big rect { fill: color-mix(in srgb, var(--purple-lit) 70%, white 10%); }
.if-vis { width: 220px; height: 136px; overflow: visible; }
.v-frame { fill: none; stroke: rgba(242,240,236,0.45); stroke-width: 1; }
.v-guide { fill: none; stroke: rgba(242,240,236,0.5); stroke-width: 1; stroke-dasharray: 3 4; }
.v-guide--dim { stroke: rgba(242,240,236,0.25); }
.v-fill { fill: rgba(255,221,77,0.16); stroke: var(--yellow); stroke-width: 1.5; }
.v-dot { fill: none; stroke: var(--yellow); stroke-width: 2; }
.v-ring { fill: none; stroke: rgba(242,240,236,0.5); stroke-width: 1; }
.v-ring--dim { stroke: rgba(242,240,236,0.25); stroke-dasharray: 3 5; }
.v-brk { fill: none; stroke: var(--red); stroke-width: 2.5; }
.v-core { fill: var(--red); }
.iface--disruption.cap-in .v-lock { transform-origin: 100px 62px; animation: vLock 900ms var(--ease-out) 500ms both; }
@keyframes vLock { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.iface--design.cap-in .v-fill { animation: vFill 900ms var(--ease-out) 500ms both; }
@keyframes vFill { from { opacity: 0; transform: scale(0.6); transform-origin: 2px 2px; } to { opacity: 1; transform: none; } }

/* ---- rooms as a large glass dashboard over their own gate ---- */
.room.room--iface { background: transparent; }
.room--iface .room-bg { display: none; }
.room--iface::after { background: radial-gradient(ellipse 85% 75% at center 45%, rgba(5,5,8,0.05) 0%, rgba(5,5,8,0.45) 100%); }
.room--iface .room-chrome { z-index: 5; }
.room.room--iface { display: grid; place-items: center; overflow: hidden; }
.room--iface .room-body.if-frame {
  position: relative; margin: 0; width: min(1240px, 92vw); max-height: 88vh; min-height: 0; overflow: hidden auto;
  padding: 0 0 28px; display: block; text-align: left; justify-items: initial; align-content: initial;
  --scan-h: 760px;
}
.room--iface .if-bar { position: sticky; top: 0; z-index: 3; background: linear-gradient(90deg, rgba(134,87,224,0.18), rgba(12,14,26,0.6) 60%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.room--iface .bay-grid { max-width: none; width: auto; margin-top: 0; }
.room--iface .bay-row--three { width: auto; margin: 0; grid-template-columns: repeat(3, 1fr); }
.room--iface .bay-name { font-weight: 600; }
.room--iface .if-ruler { display: none; } /* the frame scrolls; rulers would ride inside */
.room--iface .room-body .if-kicker { margin: 26px 30px 0; }
.room--iface .room-headline { margin: 12px 30px 0; text-align: left; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(30px, 3vw, 48px); }
.room--iface .room-sub { margin: 10px 30px 22px; text-align: left; max-width: 64ch; color: rgba(242,240,236,0.82); }
.room--iface .bay-grid { margin: 0 30px; display: grid; gap: 12px; }
.room--iface .bay-row { gap: 12px; }
.room--iface .bay {
  position: relative; text-align: left;
  background: rgba(12,14,26,0.34); border: 1px solid var(--if-line); border-radius: 0;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(242,240,236,0.06);
}
.room--iface .bay::before { content: ''; position: absolute; left: -1px; top: -1px; width: 10px; height: 10px; border-left: 2px solid var(--copy); border-top: 2px solid var(--copy); }
.room--iface .bay::after { content: ''; position: absolute; right: 12px; top: 14px; width: 6px; height: 6px; background: var(--purple-lit); box-shadow: 0 0 8px rgba(134,87,224,0.9); }
.room--iface .bay-num { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.18em; color: var(--yellow); }
.room--iface .bay-name { font-family: 'Tektur', sans-serif; font-weight: 600; }
.room--iface .room-x { position: fixed; right: 26px; top: 22px; }
@media (prefers-reduced-motion: reduce) {
  .if-frame { clip-path: none !important; transition: none; }
  .ret-spin-a, .ret-spin-b, .if-scan, .if-spark rect { animation: none !important; }
}
@media (max-width: 900px) { .if-body { grid-template-columns: 1fr; } .if-side { display: none; } .if-mods { grid-template-columns: 1fr; } .if-mod + .if-mod { border-left: 0; border-top: 1px solid var(--if-line); } .if-coord { display: none; } }

/* ---- r10: terminal and live graph around gate 1; command line in each trio module ---- */
.if-term, .if-wave {
  position: absolute; z-index: 2;
  background: rgba(8,9,16,0.46); border: 1px solid var(--if-line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: 'Tomorrow', sans-serif; color: rgba(242,240,236,0.86);
}
.if-term { left: -72px; bottom: -176px; width: 360px; }
.if-wave { right: -56px; top: -86px; width: 290px; }
.if-term-bar { display: flex; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--if-line); font-size: 9.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--if-dim); }
.if-term-bar span:first-child::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--purple-lit); box-shadow: 0 0 6px rgba(134,87,224,0.9); vertical-align: 1px; }
.if-term-out { margin: 0; padding: 9px 12px 11px; min-height: 112px; font-family: 'Tomorrow', ui-monospace, monospace; font-size: 11.5px; line-height: 1.55; white-space: pre; color: rgba(242,240,236,0.9); }
.if-term-out .d { color: rgba(207,201,230,0.62); }
.if-term-out .y { color: var(--yellow); }
.if-wave svg { display: block; width: 100%; height: 64px; padding: 6px 8px 8px; box-sizing: border-box; overflow: visible; }
.w-grid { fill: none; stroke: rgba(242,240,236,0.08); stroke-width: 1; }
.w-line { fill: none; stroke: var(--copy); stroke-width: 1.4; stroke-dasharray: 600; stroke-dashoffset: 600; }
.w-line--b { stroke: var(--purple-lit); stroke-width: 1.2; }
.iface.hud-in .w-line { animation: wDraw 1600ms var(--ease-out) 700ms forwards; }
@keyframes wDraw { to { stroke-dashoffset: 0; } }
.if-cmd { display: flex; align-items: center; gap: 4px; padding: 9px 30px 11px; border-top: 1px solid var(--if-line); font-family: 'Tomorrow', ui-monospace, monospace; font-size: 12px; letter-spacing: 0.02em; color: rgba(242,240,236,0.78); background: rgba(8,9,16,0.22); }
.if-cmd-p { color: var(--if-acc); font-weight: 600; }
.if-caret { width: 7px; height: 13px; margin-left: 2px; background: var(--if-acc); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .w-line { stroke-dashoffset: 0; animation: none !important; } .if-caret { animation: none; } }
@media (max-width: 1200px) { .if-term, .if-wave { display: none; } }

/* ======================================================================
   NAV TEST r11 (26 Oct): "projected light" type for the interface, and a
   balanced gate 1. No interface prints pure white: headlines are light
   through glass (white to lavender with a faint purple glow), body text
   is lavender-tinted, labels dimmer; yellow stays the accent.
   ====================================================================== */
.iface, .gate.hud, .room--iface {
  --ink-hi: #F3F0FF; --ink: rgba(222,216,245,0.86); --ink-lo: rgba(176,168,214,0.72); --ink-glow: rgba(134,87,224,0.45);
}
/* headlines: light through glass */
.gate.hud.iface--gate .if-display, .iface--trio .trio-headline, .room--iface .room-headline,
.gate.hud:not(.iface) .gate-line, .room--iface .bay-name, .if-mod-v, .if-read dd, .if-ret-read .if-count, .gate.hud .hud-stat dd {
  background: linear-gradient(180deg, #ffffff 0%, #ebe6fb 45%, #bdb4e2 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 12px var(--ink-glow)) drop-shadow(0 1px 0 rgba(0,0,0,0.35));
}
/* body and labels */
.if-text, .iface--trio .trio-support, .room--iface .room-sub, .room--iface .bay-copy, .gate.hud .gate-sub, .gate.hud .hud-summary, .gate.hud .hud-list li { color: var(--ink); text-shadow: 0 0 10px rgba(134,87,224,0.18), 0 1px 10px rgba(0,0,0,0.55); }
.if-bar, .if-mod-k, .if-read dt, .if-ret-read small, .if-term-bar, .if-coord, .gate.hud .hud-head, .gate.hud .hud-stat dt, .hud-next { color: var(--ink-lo); }
.if-sys b, .if-bar .hud-live, .gate.hud .hud-id b { color: var(--ink-hi); }
.if-term-out { color: var(--ink); } .if-term-out .d { color: var(--ink-lo); }
.if-cmd { color: var(--ink); }
.ret circle, .ret path { stroke: rgba(205,196,240,0.55); }
.if-spark rect { fill: rgba(205,196,240,0.5); }
.w-line { stroke: rgba(236,232,252,0.9); }

/* ---- gate 1, balanced: bigger frame, one column split carried top to bottom ---- */
.gate.hud.iface--gate { width: min(1380px, 90vw); }
.iface--gate .if-frame { --scan-h: 760px; }
.iface--gate .if-body { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 0; padding: 0; align-items: stretch; }
.iface--gate .if-main { padding: 34px 40px 30px; }
.iface--gate .if-side { padding: 26px 30px 24px; border-left: 1px solid var(--if-line); display: grid; grid-template-rows: auto auto 1fr; justify-items: center; align-content: start; gap: 16px; }
.iface--gate .if-ret { width: 190px; height: 190px; }
.iface--gate .if-read { width: 100%; grid-template-columns: repeat(3, 1fr); text-align: center; }
.iface--gate .if-wave { position: static; width: 100%; background: rgba(8,9,16,0.30); align-self: end; }
.iface--gate .if-wave svg { height: 58px; }
.gate.hud.iface--gate .if-display { font-size: clamp(38px, 3.4vw, 74px); white-space: nowrap; } /* always two lines, never an orphan */
.iface--gate .if-text { margin: 20px 0 24px; max-width: 60ch; font-size: 16.5px; }
.if-foot { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); border-top: 1px solid var(--if-line); }
.iface--gate .if-mods { border-top: 0; }
.iface--gate .if-mod { padding: 16px 24px 18px; }
.iface--gate .if-term { position: static; width: auto; border: 0; border-left: 1px solid var(--if-line); background: rgba(8,9,16,0.34); -webkit-backdrop-filter: none; backdrop-filter: none; }
.iface--gate .if-term-out { min-height: 0; padding: 8px 14px 10px; font-size: 11px; line-height: 1.5; }
.iface--gate .hud-sample { bottom: -24px; }
.iface--gate .if-coord--l { left: -16px; } .iface--gate .if-coord--r { right: -16px; }
@media (max-width: 1200px) { .iface--gate .if-term { display: block; } }
@media (max-width: 900px) { .if-foot { grid-template-columns: 1fr; } .iface--gate .if-term { display: none; } .iface--gate .if-body { grid-template-columns: 1fr; } }

/* ---- r12: live interface (after arrival, everywhere) ---- */
.if-live .if-spark rect { animation: none !important; transition: transform 700ms cubic-bezier(.45,0,.25,1); }
.if-live .w-line { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; }
.if-bar .if-seg:not(.if-seg--3) i:nth-child(-n+5) { background: rgba(242,240,236,0.18); box-shadow: none; }
.if-bar .if-seg:not(.if-seg--3) i.lit { background: var(--purple-lit); box-shadow: 0 0 6px rgba(134,87,224,0.8); }
.if-scan.again { animation: ifScan 1100ms cubic-bezier(.4,0,.2,1) 0ms 1 both !important; }
.if-ret-read .if-count { font-size: 38px; }
/* continuous small motion in the trio visuals */
.iface--design.cap-in .v-dot { animation: vDrift 6s ease-in-out 1.4s infinite alternate; }
@keyframes vDrift { from { transform: translate(0, 0); } to { transform: translate(-46px, -32px); } }
.iface--disruption.cap-in .v-core { transform-origin: 100px 62px; animation: vPulse 1.6s ease-in-out 1.4s infinite; }
@keyframes vPulse { 50% { transform: scale(1.8); opacity: 0.55; } }
.iface--disruption.cap-in .v-ring--dim { transform-origin: 100px 62px; animation: retSpin 14s linear infinite; }
.hud-live i { animation: hudLive 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .if-live .if-spark rect { transition: none; } .v-dot, .v-core, .v-ring--dim { animation: none !important; } }

/* ======================================================================
   NAV TEST r13 (26 Oct): gates 02–08 in the gate 1 language, and the
   room as a console (list left, detail right).
   ====================================================================== */
/* ---- gate dashboards ---- */
.gate.hud.iface--dash { left: clamp(28px, 3.2vw, 56px); top: 50%; bottom: auto; transform: translateY(-50%); width: clamp(440px, 34vw, 580px); }
.iface--dash .if-frame { --scan-h: 720px; }
.iface--dash .if-bar { padding: 11px 20px; gap: 12px; }
.iface--dash .if-pad { padding: 22px 26px 4px; }
.gate.hud.iface--dash .if-head { margin: 12px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(28px, 2.3vw, 40px); line-height: 1.06; letter-spacing: -0.012em; text-wrap: balance; }
.gate.hud.iface--dash .if-sub { margin-top: 8px; font-size: 14.5px; }
.gate.hud.iface--dash .gate-rule { width: 100%; height: 2px; margin: 16px 0 14px; }
.iface--dash .if-text { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; max-width: none; }
.if-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--if-line); border-bottom: 1px solid var(--if-line); }
.if-stat { padding: 12px 14px 12px 26px; min-width: 0; }
.if-stat + .if-stat { border-left: 1px solid var(--if-line); padding-left: 14px; }
.if-stat dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-lo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.if-stat dd { margin: 5px 0 8px; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 20px; white-space: nowrap;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px var(--ink-glow)); }
.if-stat .if-spark { height: 16px; }
.if-list { list-style: none; margin: 0; padding: 8px 26px 4px; display: grid; grid-template-columns: 1fr; }
.if-list li { position: relative; padding: 7px 0 7px 18px; font-family: 'Tomorrow', sans-serif; font-size: 13.5px; color: var(--ink); border-bottom: 1px dashed rgba(242,240,236,0.10); }
.if-list li:last-child { border-bottom: 0; }
.if-list li::before { content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-left: 1.5px solid var(--yellow); border-top: 1.5px solid var(--yellow); }
.if-act { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 26px 16px; }
.gate.hud.iface--dash .hud-cta { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px 11px 16px;
  font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--yellow);
  background: rgba(255,221,77,0.08); border: 1px solid rgba(255,221,77,0.75); transition: background var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast); }
.gate.hud.iface--dash .hud-cta:hover, .gate.hud.iface--dash .hud-cta:focus-visible { background: var(--yellow); color: #0b0b12; box-shadow: 0 0 22px rgba(255,221,77,0.45); }
.gate.hud.iface--dash .hud-cta:focus-visible { outline: 2px solid var(--ink-hi); outline-offset: 3px; }
.gate.hud.iface--dash .gate-cta { all: unset; }
.gate.hud.iface--dash .gate-cta::before { display: none; }
.iface--dash .hud-next { color: var(--ink-lo); }
.iface--dash .if-cmd { padding: 8px 26px 10px; }
.iface--dash .hud-sample { position: absolute; left: 26px; bottom: -24px; margin: 0; }
.gate.hud.iface--dash.pulse .hud-cta { animation: hudPulse 500ms var(--ease-in-out) 2; }
@media (max-height: 900px) { .iface--dash .if-list { display: none; } }
@media (max-height: 740px) { .iface--dash .if-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .iface--dash .if-cmd { display: none; } }

/* ---- room console ---- */
.room--console .room-body.if-frame { width: min(1380px, 92vw); padding: 0; }
.if-close { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding: 5px 10px 5px 12px; border: 1px solid rgba(242,240,236,0.35); color: var(--ink-hi); font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; transition: background 150ms, color 150ms, border-color 150ms; }
.if-close svg { width: 12px; height: 12px; }
.if-close:hover, .if-close:focus-visible { background: var(--yellow); color: #0b0b12; border-color: var(--yellow); }
.cn-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.cn-left { padding: 28px 30px 24px; border-right: 1px solid var(--if-line); }
.room--console .room-headline { margin: 12px 0 0; text-align: left; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(32px, 3vw, 52px); line-height: 1.04; }
.room--console .room-sub { margin: 10px 0 20px; text-align: left; font-size: 15px; }
.cn-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--if-line); }
.cn-row { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 44px 1fr 90px; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--if-line); position: relative; transition: background 160ms; }
.cn-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: transparent; transition: background 160ms, box-shadow 160ms; }
.cn-num { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; color: var(--ink-lo); }
.cn-name { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 17px; color: var(--ink); }
.cn-meter { height: 3px; background: rgba(242,240,236,0.12); position: relative; overflow: hidden; }
.cn-meter i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0.35); background: rgba(205,196,240,0.6); transition: transform 500ms var(--ease-out), background 160ms; }
.cn-row:hover, .cn-row:focus-visible { background: rgba(134,87,224,0.10); }
.cn-row.is-on { background: linear-gradient(90deg, rgba(255,221,77,0.10), rgba(255,221,77,0) 70%); }
.cn-row.is-on::before { background: var(--yellow); box-shadow: 0 0 10px rgba(255,221,77,0.7); }
.cn-row.is-on .cn-num { color: var(--yellow); }
.cn-row.is-on .cn-name { color: var(--ink-hi); }
.cn-row.is-on .cn-meter i { transform: scaleX(1); background: var(--yellow); }
.cn-row:focus-visible { outline: 1px solid var(--yellow); outline-offset: -1px; }
.cn-right { display: grid; grid-template-rows: auto 1fr; }
.cn-top { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 22px; padding: 22px 30px; border-bottom: 1px solid var(--if-line); }
.cn-ret { width: 200px; height: 200px; overflow: visible; }
.cn-ring, .cn-ring3 { fill: none; stroke: rgba(205,196,240,0.35); stroke-width: 1; }
.cn-ring3 { stroke-dasharray: 2 6; }
.cn-ring2 { fill: none; stroke: rgba(134,87,224,0.85); stroke-width: 1.5; stroke-dasharray: 40 10 4 10; }
.cn-node circle { fill: rgba(8,9,16,0.85); stroke: rgba(205,196,240,0.7); stroke-width: 1.2; transition: fill 200ms, stroke 200ms; }
.cn-node text { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 7.5px; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.cn-node.is-on circle { fill: var(--yellow); stroke: var(--yellow); filter: drop-shadow(0 0 6px rgba(255,221,77,0.8)); }
.cn-node.is-on text { fill: #0b0b12; }
.cn-count { margin: 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 46px; line-height: 1; background: linear-gradient(180deg, #fff, #bdb4e2); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 12px var(--ink-glow)); }
.cn-count small { font-size: 20px; }
.cn-cap { margin: 8px 0 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-lo); }
.cn-detail { padding: 24px 30px 26px; }
.cn-dname { margin: 10px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(26px, 2.2vw, 38px); line-height: 1.08;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 12px var(--ink-glow)); }
.cn-dcopy { margin: 12px 0 16px; max-width: 60ch; font-family: 'Tomorrow', sans-serif; font-size: 15.5px; line-height: 1.62; color: var(--ink); }
.cn-chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cn-chips li { padding: 5px 9px; border: 1px solid var(--if-line); background: rgba(12,14,26,0.4); font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11.5px; letter-spacing: 0.04em; color: var(--ink); }
.cn-graph { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 14px; }
.cn-graph span { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.cn-graph .if-spark { height: 28px; }
.cn-detail.swap > * { animation: mmSwap 360ms var(--ease-out) both; }
.cn-detail.swap > *:nth-child(2) { animation-delay: 30ms; } .cn-detail.swap > *:nth-child(3) { animation-delay: 60ms; } .cn-detail.swap > *:nth-child(4) { animation-delay: 90ms; } .cn-detail.swap > *:nth-child(5) { animation-delay: 120ms; }
.room--console .if-cmd { border-top: 1px solid var(--if-line); }
@media (max-width: 900px) { .cn-body { grid-template-columns: 1fr; } .cn-left { border-right: 0; } .cn-top { display: none; } }
@media (prefers-reduced-motion: reduce) { .cn-detail.swap > * { animation: none; } }
/* r13 fix: the console's close lives in the system bar, not in the old fixed corner style */
.room--iface .room-x.if-close { position: static; width: auto; height: auto; border-radius: 0; background: transparent; flex: none; display: inline-flex; color: var(--ink-hi); border: 1px solid rgba(242,240,236,0.35); }
.room--iface .room-x.if-close:hover { background: var(--yellow); color: #0b0b12; border-color: var(--yellow); }
.room--iface .room-x.if-close:focus-visible { background: transparent; color: var(--ink-hi); outline: 1px solid var(--yellow); outline-offset: 2px; }
.room--console .if-bar .if-loc { flex: 1 1 auto; }
.cn-top { border-bottom-color: rgba(242,240,236,0.18); }
.cn-right { grid-template-rows: auto auto; align-content: start; }

/* ============ r14 rooms 03–08 (Naveen 26 Oct): same language as the Services
   console, a different instrument in each room ============ */
.room--iface .if-bar .if-loc { flex: 1 1 auto; }
.rm .room-body.if-frame { width: min(1380px, 92vw); padding: 0; --scan-h: 900px; }
.rm .if-kicker { margin: 0; }
.rm .room-headline { margin: 10px 0 0; text-align: left; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(30px, 2.7vw, 48px); line-height: 1.04; }
.rm .room-sub { margin: 0; text-align: left; font-size: 15px; line-height: 1.6; max-width: 56ch; }
.rm .if-cmd { border-top: 1px solid var(--if-line); }
.rm-sample { position: absolute; left: calc(50% - min(690px, 46vw) + 4px); bottom: max(calc(6vh - 26px), 8px); margin: 0; font-family: 'Tomorrow', sans-serif; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(240,61,46,0.85); z-index: 6; }
.rm-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; gap: 40px; padding: 26px 30px 22px; border-bottom: 1px solid var(--if-line); }
.rm-split { display: grid; }

/* shared switch list */
.sw-list { list-style: none; margin: 0; padding: 0; }
.sw-btn { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--if-line); position: relative; transition: background 160ms; }
.sw-btn::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: transparent; transition: background 160ms, box-shadow 160ms; }
.sw-n { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; color: var(--ink-lo); }
.sw-t { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 15.5px; line-height: 1.25; color: var(--ink); }
.sw-d { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-lo); }
.sw-btn:hover, .sw-btn:focus-visible { background: rgba(134,87,224,0.10); }
.sw-btn.is-on { background: linear-gradient(90deg, rgba(255,221,77,0.10), rgba(255,221,77,0) 70%); }
.sw-btn.is-on::before { background: var(--yellow); box-shadow: 0 0 10px rgba(255,221,77,0.7); }
.sw-btn.is-on .sw-n { color: var(--yellow); }
.sw-btn.is-on .sw-t { color: var(--ink-hi); }
.sw-btn:focus-visible { outline: 1px solid var(--yellow); outline-offset: -1px; }
.sw-out { padding: 26px 30px; min-width: 0; }
.sw-name { margin: 10px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(24px, 2vw, 36px); line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 12px var(--ink-glow)); }
.sw-copy { margin: 12px 0 0; max-width: 58ch; font-family: 'Tomorrow', sans-serif; font-size: 15.5px; line-height: 1.62; color: var(--ink); }
.sw-out.swap > * { animation: mmSwap 360ms var(--ease-out) both; }
.sw-out.swap > *:nth-child(2) { animation-delay: 30ms; } .sw-out.swap > *:nth-child(3) { animation-delay: 60ms; } .sw-out.swap > *:nth-child(4) { animation-delay: 90ms; } .sw-out.swap > *:nth-child(5) { animation-delay: 120ms; }

/* 03 · the platform: KPI strip, capability switcher, channels */
.pg-kpis { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--if-line); }
.pg-kpi { padding: 16px 20px 14px; }
.pg-kpi + .pg-kpi { border-left: 1px solid var(--if-line); }
.pg-num { margin: 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(28px, 2.3vw, 40px); line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px var(--ink-glow)); }
.pg-cap { margin: 6px 0 10px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.pg-kpi .if-spark { height: 18px; }
.pg-note { margin: 0; padding: 9px 30px; border-bottom: 1px solid var(--if-line); font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-lo); background: rgba(8,9,16,0.22); }
.pg-note::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 10px; background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.8); vertical-align: 1px; }
.rm--pg .rm-split { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr) minmax(0, 0.8fr); }
.rm--pg .sw-list { border-right: 1px solid var(--if-line); }
.rm--pg .sw-btn { padding: 8px 14px; grid-template-columns: 40px 1fr; }
.rm--pg .sw-t { font-size: 14px; }
.pg-side { padding: 26px 26px; border-left: 1px solid var(--if-line); }
.pg-side .if-kicker { margin-bottom: 14px; }
.pg-close { margin: 4px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 14px; line-height: 1.6; color: var(--ink); }

/* 04 · clients: sector tabs, logo wall, stats */
.cl-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--if-line); padding: 0 30px; }
.cl-tab { all: unset; cursor: pointer; padding: 12px 16px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 150ms, border-color 150ms; }
.cl-tab:hover { color: var(--ink-hi); }
.cl-tab.is-on { color: var(--yellow); border-bottom-color: var(--yellow); }
.cl-tab:focus-visible { outline: 1px solid var(--yellow); outline-offset: -3px; }
.cl-wall { list-style: none; margin: 0; padding: 22px 30px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.cl-tile { position: relative; height: 92px; display: grid; place-items: center; border: 1px solid var(--if-line); background: rgba(12,14,26,0.34); transition: opacity 300ms, background 200ms, border-color 200ms; }
.cl-tile::before { content: ''; position: absolute; left: -1px; top: -1px; width: 9px; height: 9px; border-left: 2px solid var(--copy); border-top: 2px solid var(--copy); }
.cl-logo { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.cl-sec { position: absolute; left: 10px; bottom: 7px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.cl-tile:hover { background: rgba(134,87,224,0.14); border-color: rgba(242,240,236,0.4); }
.cl-tile.is-off { opacity: 0.18; }
.cl-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--if-line); }
.cl-stats > div { padding: 14px 30px; }
.cl-stats > div + div { border-left: 1px solid var(--if-line); }
.cl-stats dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.cl-stats dd { margin: 4px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 28px; line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px var(--ink-glow)); }

/* 05 · the reel: big player, film list */
.rm--rl .rm-split { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.rl-side { border-left: 1px solid var(--if-line); padding: 26px 0 0; }
.rl-side .if-kicker, .rl-side .room-headline { padding: 0 26px; }
.rl-side .room-headline { margin-bottom: 20px; }
.rl-side .sw-list { border-top: 1px solid var(--if-line); }
.rl-side .sw-btn { grid-template-columns: 34px 1fr auto; padding: 12px 22px 12px 26px; }
.rl-player { position: relative; aspect-ratio: 16 / 9; margin: 0 0 20px; border: 1px solid var(--if-line); background:
  linear-gradient(180deg, rgba(85,54,157,0.28), rgba(8,9,16,0.55)),
  repeating-linear-gradient(0deg, rgba(242,240,236,0.035) 0 1px, transparent 1px 4px); display: grid; place-items: center; overflow: hidden; }
.rl-player::before, .rl-player::after { content: ''; position: absolute; width: 22px; height: 22px; border: 0 solid var(--copy); }
.rl-player::before { left: 10px; top: 10px; border-left-width: 2px; border-top-width: 2px; }
.rl-player::after { right: 10px; bottom: 10px; border-right-width: 2px; border-bottom-width: 2px; }
.rl-play { width: 86px; height: 86px; border-radius: 50%; border: 1px solid rgba(255,221,77,0.7); background: rgba(255,221,77,0.10); box-shadow: 0 0 30px rgba(255,221,77,0.25); position: relative; cursor: pointer; transition: background 200ms, transform 200ms; }
.rl-play::after { content: ''; position: absolute; left: 34px; top: 27px; border-left: 26px solid var(--yellow); border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.rl-player:hover .rl-play { background: rgba(255,221,77,0.2); transform: scale(1.05); }
.rl-tc { position: absolute; left: 18px; bottom: 14px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; color: var(--ink); }
.rl-hint { position: absolute; right: 18px; top: 14px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.rm--rl .sw-out { padding: 26px 30px 24px; }
.rm--rl .sw-name { font-size: clamp(22px, 1.7vw, 30px); }
.rm--rl .sw-copy { margin-top: 8px; }

/* 06 · case files: index, file with metric bars */
.rm--cf .rm-split { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); }
.rm--cf .sw-list { border-right: 1px solid var(--if-line); }
.rm--cf .sw-btn { grid-template-columns: 58px 1fr; grid-template-rows: auto auto; row-gap: 3px; padding: 14px 16px; }
.rm--cf .sw-btn .sw-d { grid-column: 2; }
.rm--cf .sw-btn .sw-n { grid-row: 1 / span 2; }
.cf-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 20px 0 0; border-top: 1px solid var(--if-line); }
.cf-cols > div { padding: 14px 18px 0 0; }
.cf-cols > div + div { padding-left: 18px; border-left: 1px solid var(--if-line); }
.cf-cols p { margin: 0; font-family: 'Tomorrow', sans-serif; font-size: 14px; line-height: 1.58; color: var(--ink); }
.cf-cols .cf-k { margin-bottom: 6px; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.cf-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 0; }
.cf-m { padding: 14px 16px; border: 1px solid var(--if-line); background: rgba(12,14,26,0.34); position: relative; }
.cf-m::before { content: ''; position: absolute; left: -1px; top: -1px; width: 9px; height: 9px; border-left: 2px solid var(--copy); border-top: 2px solid var(--copy); }
.cf-m dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.cf-m dd { margin: 6px 0 10px; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 34px; line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px var(--ink-glow)); }
.cf-bar { display: block; height: 3px; background: rgba(242,240,236,0.12); overflow: hidden; }
.cf-bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--v)); background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.6); animation: cfBar 900ms var(--ease-out) 200ms both; }
@keyframes cfBar { from { transform: scaleX(0); } }

/* 07 · manifesto: principle index, one principle large */
.rm--mf .rm-split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr); min-height: min(560px, 62vh); }
.mf-side { padding: 26px 0 0; border-right: 1px solid var(--if-line); }
.mf-side .if-kicker, .mf-side .room-headline { padding: 0 26px; }
.mf-side .room-headline { margin-bottom: 20px; }
.mf-side .sw-list { border-top: 1px solid var(--if-line); }
.mf-side .sw-btn { grid-template-columns: 40px 1fr; padding: 11px 26px; }
.rm--mf .sw-out { position: relative; padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.mf-num { position: absolute; right: 30px; top: 6px; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: 220px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(205,196,240,0.22); pointer-events: none; }
.mf-name { font-size: clamp(36px, 3.4vw, 60px); line-height: 1.04; max-width: 14ch; }
.mf-copy { font-size: 18px; max-width: 44ch; margin-top: 18px; }

/* 08 · contact: the form, three channel cards */
.rm--ct .rm-split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.ct-form-wrap { padding: 26px 30px 26px; border-right: 1px solid var(--if-line); }
.ct-form-wrap .room-sub { margin: 10px 0 0; }
.ct-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 22px; }
.ct-form label { display: grid; gap: 6px; }
.ct-form label > span { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.ct-form input, .ct-form select, .ct-form textarea { all: unset; box-sizing: border-box; width: 100%; padding: 11px 12px; border: 1px solid var(--if-line); background: rgba(8,9,16,0.36); font-family: 'Tomorrow', sans-serif; font-size: 14.5px; color: var(--ink-hi); transition: border-color 150ms, background 150ms; }
.ct-form select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-lo) 50%), linear-gradient(135deg, var(--ink-lo) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.ct-form select option { background: #14121f; color: #f2f0ec; }
.ct-form textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.ct-form input:focus, .ct-form select:focus, .ct-form textarea:focus { border-color: var(--yellow); background: rgba(255,221,77,0.05); }
.ct-wide { grid-column: 1 / -1; }
.ct-actions { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
.ct-send { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 16px; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--yellow); background: rgba(255,221,77,0.08); border: 1px solid rgba(255,221,77,0.7); transition: background 160ms, color 160ms; }
.ct-send .hud-cta-arrow { width: 24px; height: 14px; }
.ct-send:hover { background: var(--yellow); color: #0b0b12; }
.ct-send:focus-visible { outline: 2px solid var(--ink-hi); outline-offset: 3px; }
.ct-status { margin: 0; font-family: 'Tomorrow', sans-serif; font-size: 13px; color: var(--ink); }
.ct-status.is-err { color: #ff8a7e; }
.ct-side { display: grid; grid-template-rows: repeat(3, auto); align-content: start; }
.ct-card { padding: 22px 26px; border-bottom: 1px solid var(--if-line); }
.ct-card:last-child { border-bottom: 0; }
.ct-big { margin: 10px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.15; color: var(--ink-hi); word-break: break-word; }
.ct-verify { color: rgba(255,138,126,0.9); }
.ct-note { margin: 8px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 13px; color: var(--ink); }
.ct-note .hud-live { color: var(--ink-hi); }
.ct-copy { all: unset; cursor: pointer; margin-top: 12px; display: inline-block; padding: 6px 10px; border: 1px solid rgba(242,240,236,0.35); font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-hi); transition: background 150ms, color 150ms; }
.ct-copy:hover { background: var(--yellow); color: #0b0b12; border-color: var(--yellow); }
.ct-copy:focus-visible { outline: 1px solid var(--yellow); outline-offset: 2px; }

@media (max-width: 900px) {
  .rm-head { grid-template-columns: 1fr; gap: 12px; }
  .pg-kpis { grid-template-columns: repeat(2, 1fr); }
  .rm--pg .rm-split, .rm--rl .rm-split, .rm--cf .rm-split, .rm--mf .rm-split, .rm--ct .rm-split { grid-template-columns: 1fr; }
  .pg-side, .rl-side { border-left: 0; } .ct-form-wrap, .mf-side, .rm--cf .sw-list, .rm--pg .sw-list { border-right: 0; }
  .cl-wall { grid-template-columns: repeat(3, 1fr); } .cl-stats { grid-template-columns: repeat(2, 1fr); }
  .cf-cols, .cf-metrics, .ct-form { grid-template-columns: 1fr; } .cf-cols > div + div { padding-left: 0; border-left: 0; }
  .mf-num { font-size: 120px; }
}
@media (prefers-reduced-motion: reduce) { .sw-out.swap > *, .cf-bar i { animation: none; } }
/* r14 fixes */
.rm { --if-line: rgba(242,240,236,0.18); }
.rm--pg .rm-head { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.rm--pg .room-headline { font-size: clamp(28px, 2.3vw, 42px); }
.rm .if-scan { animation-name: rmScan !important; }
@keyframes rmScan { 0% { opacity: 1; top: -90px; } 85% { opacity: 1; } 100% { opacity: 0; top: calc(100% - 90px); } }
.rm .room-body .if-kicker { margin: 0; }
.rm-sample { position: static; margin: 0 0 0 auto; padding-left: 20px; }
.rm .if-cmd { padding-right: 30px; }
.rm--pg .sw-out { align-self: start; }
.rm .room-body > .if-c { display: none; } /* clipped by the scrolling frame anyway; kept out of the scroll height */
.ct-tel { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 150ms, color 150ms; }
.ct-tel:hover { color: var(--yellow); border-bottom-color: var(--yellow); }
.ct-tel:focus-visible { outline: 1px solid var(--yellow); outline-offset: 3px; }
.ct-temp { margin: 8px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(240,61,46,0.85); }

/* ============ r15 (Naveen 26 Oct): bigger frames, live rooms, the manifesto ============ */
.room--iface { --if-line: rgba(242,240,236,0.18); }          /* dividers in every room, Services included */
.rm .room-body.if-frame { width: min(1500px, 94vw); max-height: 90vh; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 03 · packets travel the channel chips; a pulse runs down the detail edge; the strip is a ticker */
.rm--pg .cn-chips li { position: relative; overflow: hidden; }
.room.open .rm--pg .cn-chips li::after, .rm--pg.open .cn-chips li::after { content: ''; position: absolute; left: -10px; bottom: 0; width: 10px; height: 2px; background: var(--yellow); box-shadow: 0 0 6px rgba(255,221,77,0.9); animation: pgPacket 2.6s linear infinite; }
.rm--pg.open .cn-chips li:nth-child(2)::after { animation-delay: .35s; } .rm--pg.open .cn-chips li:nth-child(3)::after { animation-delay: .7s; } .rm--pg.open .cn-chips li:nth-child(4)::after { animation-delay: 1.05s; }
.rm--pg.open .cn-chips li:nth-child(5)::after { animation-delay: 1.4s; } .rm--pg.open .cn-chips li:nth-child(6)::after { animation-delay: 1.75s; } .rm--pg.open .cn-chips li:nth-child(7)::after { animation-delay: 2.1s; } .rm--pg.open .cn-chips li:nth-child(8)::after { animation-delay: 2.45s; }
@keyframes pgPacket { 0% { transform: translateX(0); } 60%, 100% { transform: translateX(160px); } }
.rm--pg .sw-out { position: relative; }
.rm--pg .sw-out::before { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 64px; background: linear-gradient(180deg, transparent, var(--yellow), transparent); opacity: 0; }
.rm--pg.open .sw-out::before { animation: pgFlow 3.2s ease-in-out infinite; }
@keyframes pgFlow { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(260px); } }
.pg-note { padding: 0; overflow: hidden; white-space: nowrap; }
.pg-note::before { display: none; }
.pg-tick { display: inline-flex; animation: pgTick 38s linear infinite; }
.pg-run { display: inline-flex; }
.pg-it { padding: 9px 34px 9px 0; }
.pg-it::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 10px 0 0; background: rgba(205,196,240,0.6); vertical-align: 1px; }
.pg-it--real::before { background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.8); }
.pg-it b { font-weight: 500; color: var(--ink-hi); }
@keyframes pgTick { to { transform: translateX(-50%); } }

/* 04 · the sync highlight */
.cl-tile::after { content: 'SYNC'; position: absolute; right: 9px; top: 7px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 8.5px; letter-spacing: 0.18em; color: var(--yellow); opacity: 0; transition: opacity 250ms; }
.cl-tile.sync { border-color: rgba(255,221,77,0.65); background: rgba(255,221,77,0.06); box-shadow: inset 0 0 22px rgba(255,221,77,0.10); }
.cl-tile.sync::after { opacity: 1; }
.cl-tile.sync::before { border-color: var(--yellow); }
.cl-tile { transition: opacity 300ms, background 300ms, border-color 300ms, box-shadow 300ms; }

/* 05 · the player runs a muted preview */
.rl-main { min-width: 0; padding: 26px 30px 0; }
.rm--rl .rl-main .sw-out { padding: 0 0 22px; }
.rl-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.rl-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,16,0.35), rgba(8,9,16,0) 30%, rgba(8,9,16,0) 65%, rgba(8,9,16,0.7)); }
.rl-play { all: unset; z-index: 2; width: 86px; height: 86px; border-radius: 50%; border: 1px solid rgba(255,221,77,0.7); background: rgba(8,9,16,0.35); box-shadow: 0 0 30px rgba(255,221,77,0.25); position: relative; cursor: pointer; transition: background 200ms, transform 200ms; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.rl-play:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.rl-hint { z-index: 2; }
.rl-rec { position: absolute; left: 18px; top: 14px; z-index: 2; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-hi); display: inline-flex; align-items: center; gap: 7px; }
.rl-rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(240,61,46,0.9); animation: rlRec 1.2s steps(2) infinite; }
@keyframes rlRec { 50% { opacity: 0.2; } }
.rl-ctl { position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 2; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; }
.rl-ctl .rl-tc { position: static; }
.rl-dur { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; color: var(--ink-lo); }
.rl-bar { height: 3px; background: rgba(242,240,236,0.18); overflow: hidden; }
.rl-bar i { display: block; height: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(0); transition: transform 260ms linear; box-shadow: 0 0 8px rgba(255,221,77,0.7); }
.rl-vu { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.rl-vu i { width: 3px; height: 16px; background: rgba(205,196,240,0.75); transform-origin: bottom; transform: scaleY(0.2); transition: transform 240ms; }
.rl-vu i:nth-child(n+7) { background: var(--yellow); }
.rl-player::before, .rl-player::after { z-index: 2; }

/* 06 · trend chart draws on every case */
.cf-chart { margin: 18px 0 0; }
.cf-chart .cf-k { margin: 0 0 6px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.cf-chart svg { display: block; width: 100%; height: 64px; overflow: visible; border-bottom: 1px solid var(--if-line); }
.cf-line { fill: none; stroke: var(--yellow); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 600; stroke-dashoffset: 600; animation: cfDraw 1400ms var(--ease-out) 300ms forwards; filter: drop-shadow(0 0 4px rgba(255,221,77,0.6)); }
.cf-area { fill: rgba(134,87,224,0.16); opacity: 0; animation: cfFade 900ms ease 900ms forwards; }
.cf-pt { fill: var(--yellow); opacity: 0; animation: cfFade 400ms ease 1600ms forwards, cfBlink 1.6s ease-in-out 2s infinite; }
@keyframes cfDraw { to { stroke-dashoffset: 0; } }
@keyframes cfFade { to { opacity: 1; } }
@keyframes cfBlink { 50% { opacity: 0.25; } }

/* 08 · heartbeat, readouts, cursor */
.ct-hb { margin: 10px 0 0; height: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.ct-hb svg { width: 200%; height: 40px; animation: ctHb 2.4s linear infinite; }
.ct-ecg { fill: none; stroke: var(--yellow); stroke-width: 1.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(255,221,77,0.7)); }
@keyframes ctHb { to { transform: translateX(-50%); } }
.ct-reads { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 22px; margin: 10px 0 0; }
.ct-reads dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.ct-reads dd { margin: 3px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 16px; color: var(--ink-hi); }
.ct-on::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 8px rgba(94,224,138,0.9); animation: rlRec 1.6s ease-in-out infinite; }
.rm--ct .ct-side { grid-template-rows: none; }
.rm--ct .ct-card { padding: 18px 26px; }
.ct-msg { position: relative; }
.ct-cur { position: absolute; left: 13px; top: 32px; width: 8px; height: 16px; background: var(--yellow); opacity: 0; pointer-events: none; }
.rm--ct.open .ct-msg textarea:placeholder-shown:not(:focus) + .ct-cur { opacity: 1; animation: rlRec 1s steps(2) infinite; }

/* ---------- 07 · the manifesto: one continuous transmission ---------- */
.rm--mf .room-body.if-frame { display: grid; grid-template-rows: auto 1fr auto; height: 90vh; max-height: 90vh; overflow: hidden; }
.mf2 { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); min-height: 0; }
.mf2-side { padding: 28px 28px; border-right: 1px solid var(--if-line); display: flex; flex-direction: column; gap: 0; }
.mf2-side .room-headline { margin-top: 12px; font-size: clamp(30px, 2.4vw, 42px); }
.mf2-note { margin: 14px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.mf2-read { margin: 28px 0 0; display: grid; gap: 14px; }
.mf2-read dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.mf2-read dd { margin: 4px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 22px; color: var(--ink-hi); }
.mf2-at { color: var(--yellow); }
.mf2-sig::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.9); animation: rlRec 1.4s ease-in-out infinite; vertical-align: 2px; }
.mf2-meter { margin: 22px 0 0; width: 3px; flex: 1 1 auto; min-height: 80px; background: rgba(242,240,236,0.12); position: relative; overflow: hidden; }
.mf2-meter i { position: absolute; inset: 0; background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.7); transform-origin: top; transform: scaleY(0); transition: transform 400ms var(--ease-out); }
.mf2-spark { margin-top: 18px; height: 28px; }
.mf2-scroll { position: relative; min-height: 0; overflow-y: auto; padding: 8vh 56px 34vh 40px; scrollbar-width: thin; scrollbar-color: rgba(205,196,240,0.3) transparent; outline: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 84%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 84%, transparent 100%); }
.mf2-scroll:focus-visible { box-shadow: inset 0 0 0 1px var(--yellow); }
.mf-l { position: relative; margin: 0 0 14px; padding-left: 56px; max-width: 980px; font-family: 'Tektur', sans-serif; font-weight: 500; font-size: clamp(19px, 1.45vw, 25px); line-height: 1.42; }
.mf-ln { position: absolute; left: 0; top: 0.45em; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: 0.14em; color: rgba(176,168,214,0.35); transition: color 400ms; }
.mf-l.on .mf-ln { color: var(--yellow); }
.mf-tx { background-image: linear-gradient(90deg, #F6F3FF 0%, #E4DEF9 46%, rgba(205,196,240,0.2) 54%, rgba(205,196,240,0.2) 100%); background-size: 220% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; transition: background-position 1200ms cubic-bezier(.3,.6,.2,1); }
.mf-l.on .mf-tx { background-position: 0 0; }
.mf-l.on { filter: drop-shadow(0 0 10px rgba(134,87,224,0.35)); }
.mf-l--big { margin: 22px 0 18px; font-weight: 700; font-size: clamp(32px, 2.8vw, 52px); line-height: 1.08; }
.mf-l--big .mf-ln { top: 1.2em; }
.mf-l--big + .mf-l--big { margin-top: -6px; }
/* ampersands glow; "over & over & over" pulse in rhythm */
.mf-amp { -webkit-text-fill-color: rgba(255,221,77,0.25); color: rgba(255,221,77,0.25); transition: -webkit-text-fill-color 400ms, color 400ms; }
.mf-l.on .mf-amp { -webkit-text-fill-color: var(--yellow); color: var(--yellow); text-shadow: 0 0 14px rgba(255,221,77,0.7); animation: mfAmp 2.4s ease-in-out infinite; display: inline-block; }
.mf-l.on .mf-amp:nth-of-type(2) { animation-delay: .25s; } .mf-l.on .mf-amp:nth-of-type(3) { animation-delay: .5s; } .mf-l.on .mf-amp:nth-of-type(4) { animation-delay: .75s; }
@keyframes mfAmp { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.35); } }
/* the em dashes are handmade */
.mf-dash { display: inline-block; width: 1.25em; height: 0.5em; margin: 0 0.12em; vertical-align: 0.12em; }
.mf-dash svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mf-dash path { fill: none; stroke: var(--yellow); stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 80; stroke-dashoffset: 80; opacity: 0.35; filter: drop-shadow(0 0 4px rgba(255,221,77,0.6)); }
.mf-l.on .mf-dash path { opacity: 1; animation: mfDash 900ms cubic-bezier(.5,0,.3,1) 650ms forwards; }
@keyframes mfDash { to { stroke-dashoffset: 0; } }
/* the chain: each line catches the last word of the one before */
.mf-carry, .mf-catch { display: inline-block; }
.mf-carry.flash { animation: mfFlash 900ms ease both; }
@keyframes mfFlash { 0% { -webkit-text-fill-color: var(--yellow); text-shadow: 0 0 16px rgba(255,221,77,0.8); } 100% { -webkit-text-fill-color: inherit; } }
.mf-l.on .mf-catch { animation: mfCatch 800ms cubic-bezier(.3,.7,.2,1) both; -webkit-text-fill-color: #F6F3FF; }
@keyframes mfCatch { 0% { transform: translateY(-0.9em); opacity: 0; -webkit-text-fill-color: var(--yellow); } 60% { -webkit-text-fill-color: var(--yellow); } 100% { transform: none; opacity: 1; } }
/* bulls-eye becomes sunny side up */
.mf-tg { position: relative; }
.mf-target { position: absolute; right: 2%; top: 50%; width: clamp(110px, 10vw, 170px); height: auto; transform: translateY(-50%); overflow: visible; pointer-events: none; }
.mf-ring { fill: none; stroke: rgba(205,196,240,0.5); stroke-width: 1.4; stroke-dasharray: 330; stroke-dashoffset: 330; transition: stroke-dashoffset 1100ms cubic-bezier(.5,0,.3,1), stroke 600ms, opacity 600ms; }
.mf-ring--2 { stroke-dasharray: 190; stroke-dashoffset: 190; }
.mf-cross { fill: none; stroke: var(--yellow); stroke-width: 1.6; opacity: 0; transition: opacity 500ms 400ms; }
.mf-dot { fill: var(--yellow); opacity: 0; transition: opacity 300ms 700ms; }
.mf-yolk { fill: var(--yellow); transform-origin: 80px 80px; transform: scale(0); transition: transform 900ms cubic-bezier(.3,1.5,.5,1) 200ms; filter: drop-shadow(0 0 12px rgba(255,221,77,0.7)); }
.mf-white { fill: rgba(246,243,255,0.9); transform-origin: 80px 80px; transform: scale(0.4) rotate(-20deg); opacity: 0; transition: transform 900ms cubic-bezier(.3,1.3,.5,1), opacity 500ms; }
.mf-tg.t1 .mf-ring { stroke-dashoffset: 0; }
.mf-tg.t1 .mf-cross, .mf-tg.t1 .mf-dot { opacity: 1; }
.mf-tg.t1 .mf-target { animation: mfAim 3.5s ease-in-out 1.2s infinite; }
@keyframes mfAim { 50% { transform: translateY(-50%) rotate(8deg); } }
.mf-tg.t2 .mf-cross, .mf-tg.t2 .mf-dot { opacity: 0; transition-delay: 0s; }
.mf-tg.t2 .mf-ring { opacity: 0; }
.mf-tg.t2 .mf-white { opacity: 1; transform: none; }
.mf-tg.t2 .mf-yolk { transform: scale(1); }
.mf-tg.t2 .mf-target { animation: none; }
/* the grid reports live */
.if-frame.mf-pulse .if-grid { animation: mfGrid 1400ms ease-out; }
@keyframes mfGrid { 0% { opacity: 0.9; filter: none; } 25% { opacity: 1; filter: brightness(3.2) drop-shadow(0 0 6px rgba(134,87,224,0.8)); } 100% { opacity: 0.9; filter: none; } }
/* the ending */
.mf-end { margin: 46px 0 0 56px; opacity: 0; transform: translateY(14px); transition: opacity 700ms, transform 900ms var(--ease-out); }
.mf-end.on { opacity: 1; transform: none; }
.mf-word { margin: 0; font-family: 'Tektur', sans-serif; font-weight: 700; font-size: clamp(64px, 6.4vw, 120px); line-height: 1; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 22px var(--ink-glow)); }
.mf-ps { margin: 22px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 14px; letter-spacing: 0.02em; color: var(--ink-lo); }
.mf-caret { display: inline-block; width: 8px; height: 15px; margin-left: 6px; vertical-align: -2px; background: var(--yellow); animation: rlRec 1s steps(2) infinite; }
.mf2-hint { position: sticky; bottom: 0; margin: 0; padding: 0 0 6px 56px; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-lo); transition: opacity 400ms; }
.mf2-hint span { display: inline-block; color: var(--yellow); animation: mfHint 1.6s ease-in-out infinite; }
.mf2-hint.off { opacity: 0; }
@keyframes mfHint { 50% { transform: translateY(4px); } }
@media (max-width: 900px) {
  .mf2 { grid-template-columns: 1fr; } .mf2-side { display: none; }
  .mf2-scroll { padding: 6vh 20px 34vh 14px; } .mf-l { padding-left: 34px; } .mf-end { margin-left: 34px; }
  .mf-target { position: relative; right: auto; top: auto; transform: none; margin: 0 0 10px 34px; width: 110px; display: block; }
  .mf-tg.t1 .mf-target { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-tick, .ct-hb svg, .rm--pg .cn-chips li::after, .rm--pg .sw-out::before, .mf-l.on .mf-amp, .mf-tg .mf-target { animation: none !important; }
  .mf-tx { transition: none; }
}
.mf2 { position: relative; }
.mf2-hint { position: absolute; left: calc(min(300px, 100%) + 96px); bottom: 14px; padding: 0; pointer-events: none; }
@media (max-width: 900px) { .mf2-hint { left: 48px; } }
.cf-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.rl-rec { left: 44px; top: 16px; }
/* r16 fix (Naveen 26 Oct, "I couldnt enter any room"): a closed room is gone, not an invisible layer over the page */
.room[hidden] { display: none !important; }
/* r16 trio reading stop: the line under each card is its 4 s hold */
.if-hold { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 0 30px 10px; }
.if-hold i { display: block; height: 2px; background: rgba(242,240,236,0.14); position: relative; overflow: hidden; }
.if-hold i::after { content: ''; position: absolute; inset: 0; background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.7); transform-origin: left; transform: scaleX(var(--fill, 0)); }
.if-hold span { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-lo); transition: color 300ms; }
.iface--trio.is-released .if-hold span { color: var(--yellow); }
.iface--trio.is-released .if-hold span::after { content: ' · continue'; }
.iface--trio.nudge .if-hold i { animation: holdNudge 420ms ease; }
@keyframes holdNudge { 40% { box-shadow: 0 0 14px rgba(255,221,77,0.9); transform: scaleY(2); } }
.if-hold span::before { content: 'Reading'; }
.iface--trio.is-released .if-hold span::before { content: 'Scroll on'; }
.iface--trio.is-released .if-hold span::after { content: none; }

/* ============ r17 the map in the interface language (Naveen 26 Oct) ============ */
.mapmenu { --ink-hi: #F3F0FF; --ink: rgba(222,216,245,0.86); --ink-lo: rgba(176,168,214,0.72); --ink-glow: rgba(134,87,224,0.45); --if-line: rgba(242,240,236,0.18); --if-dim: rgba(207,201,230,0.62); }
.mapmenu-shade { background: linear-gradient(90deg, rgba(5,5,8,0.55) 0%, rgba(5,5,8,0.12) 30%, rgba(5,5,8,0) 55%), linear-gradient(0deg, rgba(5,5,8,0.4) 0%, rgba(5,5,8,0) 22%), linear-gradient(180deg, rgba(5,5,8,0.45) 0%, rgba(5,5,8,0) 14%); }
.mm-grid { opacity: 0.55; -webkit-mask-image: radial-gradient(ellipse 90% 85% at 55% 55%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 90% 85% at 55% 55%, #000 30%, transparent 100%); }
.mm-scan { position: absolute; left: 0; right: 0; top: 0; height: 120px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(134,87,224,0) 0%, rgba(134,87,224,0.08) 70%, rgba(242,240,236,0.32) 99%, rgba(242,240,236,0) 100%); }
.mapmenu.is-open .mm-scan { animation: mmScan 7s cubic-bezier(.4,0,.2,1) 400ms infinite; }
@keyframes mmScan { 0% { opacity: 1; transform: translateY(-120px); } 16% { opacity: 1; } 20%, 100% { opacity: 0; transform: translateY(100vh); } }
/* system bar across the top */
.mm-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 4; padding: 14px 28px; background: linear-gradient(90deg, rgba(134,87,224,0.22), rgba(12,14,26,0.55) 55%, rgba(12,14,26,0.35)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink-lo); }
.mm-bar .if-sys b { color: var(--ink-hi); }
.mm-bar .if-loc { flex: 1 1 auto; text-align: right; color: var(--ink); }
.mm-bar .hud-live { color: var(--ink-hi); }
.mapmenu .mapmenu-close.if-close { position: static; width: auto; height: auto; border-radius: 0; background: transparent; border: 1px solid rgba(242,240,236,0.35); color: var(--ink-hi); }
.mapmenu .mapmenu-close.if-close:hover { background: var(--yellow); color: #0b0b12; border-color: var(--yellow); }
.mapmenu .mapmenu-close.if-close svg { width: 12px; height: 12px; }
.mapmenu-name, .mapmenu-legend { display: none; }
.mm-bar .if-seg i { transition: background 200ms; }
/* the route list, a glass column on the left */
.mm-list { position: absolute; left: 28px; top: 84px; z-index: 3; width: 300px; padding: 20px 0 16px; border: 1px solid var(--if-line);
  background: linear-gradient(180deg, rgba(12,14,26,0.42), rgba(12,14,26,0.24)); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 0 50px rgba(134,87,224,0.08), 0 24px 70px rgba(0,0,0,0.35);
  clip-path: inset(0 0 100% 0); transition: clip-path 620ms cubic-bezier(.7,0,.2,1) 120ms; }
.mapmenu.is-open .mm-list { clip-path: inset(-20px -20px -20px -20px); }
.mm-c { position: absolute; width: 18px; height: 18px; border: 0 solid var(--copy); pointer-events: none; }
.mm-c--tl { left: -5px; top: -5px; border-left-width: 2px; border-top-width: 2px; }
.mm-c--tl::after { content: ''; position: absolute; left: 5px; top: 5px; width: 4px; height: 4px; background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.8); }
.mm-c--br { right: -5px; bottom: -5px; border-right-width: 2px; border-bottom-width: 2px; }
.mm-list-k { padding: 0 20px; }
.mm-list-t { margin: 8px 0 14px; padding: 0 20px; font-family: 'Tomorrow', sans-serif; font-size: 13px; color: var(--ink); }
.mm-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--if-line); }
.mm-row { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 30px 1fr 10px; grid-template-rows: auto auto; column-gap: 8px; row-gap: 1px; align-items: center; padding: 8px 18px 8px 20px; border-bottom: 1px solid var(--if-line); position: relative; transition: background 160ms; }
.mm-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: transparent; transition: background 160ms; }
.mm-row-n { grid-row: 1 / span 2; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-lo); }
.mm-row-t { font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-row-d { grid-column: 2; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.mm-row-st { grid-column: 3; grid-row: 1 / span 2; width: 7px; height: 7px; border: 1px solid rgba(242,240,236,0.6); border-radius: 50%; }
.mm-row.is-done .mm-row-st { background: var(--copy); border-color: var(--copy); }
.mm-row.is-here .mm-row-st { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.9); animation: rlRec 1.4s ease-in-out infinite; }
.mm-row.is-here .mm-row-n, .mm-row.is-here .mm-row-t { color: var(--yellow); }
.mm-row:hover, .mm-row:focus-visible, .mm-row.is-hot { background: linear-gradient(90deg, rgba(255,221,77,0.10), rgba(255,221,77,0) 75%); }
.mm-row.is-hot::before, .mm-row:focus-visible::before { background: var(--yellow); box-shadow: 0 0 10px rgba(255,221,77,0.7); }
.mm-row.is-hot .mm-row-t { color: var(--ink-hi); }
.mm-row:focus-visible { outline: 1px solid var(--yellow); outline-offset: -1px; }
.mm-legend { display: flex; gap: 14px; padding: 12px 20px 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-lo); }
.mm-legend span::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; border: 1px solid rgba(242,240,236,0.6); vertical-align: -1px; }
.mm-legend .lg-here::before { background: var(--yellow); border-color: var(--yellow); }
.mm-legend .lg-done::before { background: var(--copy); border-color: var(--copy); }
/* pins: glass heads, numbers, a slow pulse, the place as a tag */
.mm-pin-body { fill: rgba(12,14,26,0.62); stroke: rgba(242,240,236,0.85); stroke-width: 1.3; }
.mm-pin-svg { filter: drop-shadow(0 0 8px rgba(134,87,224,0.55)) drop-shadow(0 4px 10px rgba(0,0,0,0.6)); }
.mm-pin-num { font-family: 'Tomorrow', sans-serif; font-weight: 600; font-size: 9px; letter-spacing: 0.04em; }
.mm-pin-zone { top: 50px; background: radial-gradient(closest-side, rgba(134,87,224,0.22), rgba(134,87,224,0) 100%); }
.mm-pin-pulse { position: absolute; left: 50%; top: 52px; width: 34px; height: 12px; margin: -6px 0 0 -17px; border-radius: 50%; border: 1px solid rgba(242,240,236,0.55); opacity: 0; pointer-events: none; }
.mapmenu.is-open .mm-pin-pulse { animation: mmPulse 3.2s ease-out infinite; animation-delay: calc(var(--k) * 0.35s); }
@keyframes mmPulse { 0% { opacity: 0.8; transform: scale(0.4); } 70%, 100% { opacity: 0; transform: scale(2.4); } }
.mm-pin.is-here .mm-pin-pulse { border-color: var(--yellow); }
.mm-pin-place { top: 64px; padding: 3px 7px; background: rgba(12,14,26,0.55); border: 1px solid rgba(242,240,236,0.18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.16em; color: var(--ink); text-shadow: none; }
.mm-pin.is-here .mm-pin-place { color: #0b0b12; background: var(--yellow); border-color: var(--yellow); }
.mm-pin.is-hot .mm-pin-ring { opacity: 1; transform: scale(1.06); border-color: var(--yellow); }
.mm-pin.is-hot .mm-pin-svg { transform: translateY(-4px); }
.mm-pin.is-hot .mm-pin-body { stroke: var(--yellow); }
.mm-pin.is-hot .mm-pin-place { border-color: rgba(255,221,77,0.7); color: var(--ink-hi); }
.mapmenu.has-hot .mm-pin:not(.is-hot):not(.is-here) { opacity: 0.55; }
/* the data card beside a pin */
.mm-card { position: absolute; z-index: 5; width: 340px; padding: 18px 20px 16px; pointer-events: none; opacity: 0; transform: translateY(6px);
  border: 1px solid var(--if-line); background: linear-gradient(180deg, rgba(12,14,26,0.62), rgba(12,14,26,0.42)); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: inset 0 0 50px rgba(134,87,224,0.10), 0 24px 70px rgba(0,0,0,0.45);
  clip-path: inset(0 100% 0 0); transition: opacity 200ms, transform 300ms var(--ease-out), clip-path 380ms cubic-bezier(.7,0,.2,1); }
.mm-card.to-left { clip-path: inset(0 0 0 100%); }
.mm-card.on { opacity: 1; transform: none; pointer-events: auto; clip-path: inset(-20px -60px -20px -60px); }
.mm-lead { position: absolute; top: var(--ly, 50%); left: -34px; width: 34px; height: 1px; background: linear-gradient(90deg, var(--yellow), rgba(255,221,77,0.3)); }
.mm-lead::before { content: ''; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.9); }
.mm-card.to-left .mm-lead { left: auto; right: -34px; background: linear-gradient(270deg, var(--yellow), rgba(255,221,77,0.3)); }
.mm-card.to-left .mm-lead::before { left: auto; right: -3px; }
.mm-card-k { margin: 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--yellow); }
.mm-card-t { margin: 8px 0 0; font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 26px; line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, #ebe6fb 45%, #bdb4e2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px var(--ink-glow)); }
.mm-card-s { margin: 6px 0 0; font-family: 'Tomorrow', sans-serif; font-size: 14px; line-height: 1.5; color: var(--ink); }
.mm-card-r { display: grid; grid-template-columns: auto 1fr; gap: 18px; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px solid var(--if-line); }
.mm-card-r dt { font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-lo); }
.mm-card-r dd { margin: 3px 0 0; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 12.5px; letter-spacing: 0.04em; color: var(--ink-hi); white-space: nowrap; }
.mm-card-st.st-you-are-here { color: var(--yellow); }
.mm-card-st.st-ahead { color: var(--ink); }
.mm-card-go { all: unset; cursor: pointer; margin-top: 14px; display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 12px; border: 1px solid rgba(255,221,77,0.7); background: rgba(255,221,77,0.08); color: var(--yellow); font-family: 'Tektur', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; transition: background 160ms, color 160ms; }
.mm-card-go svg { width: 20px; height: 12px; }
.mm-card-go:hover { background: var(--yellow); color: #0b0b12; }
.mapmenu-compass { color: var(--ink); }
@media (max-width: 900px) { .mm-list { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 42vh; overflow: auto; } .mm-card { display: none; } .mm-bar .if-seg, .mm-bar .if-loc { display: none; } }
@media (prefers-reduced-motion: reduce) { .mapmenu.is-open .mm-scan, .mapmenu.is-open .mm-pin-pulse { animation: none; } .mm-list, .mm-card { transition: none; } }
.mapmenu .mapmenu-close.if-close svg { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.mapmenu .mapmenu-close.if-close:hover svg { background: transparent; color: inherit; }
.mm-bar .if-seg i.lit { background: var(--yellow); }
/* r18 map fine-tuning (Naveen: proper placement, distance and a connection line; nothing overlaps) */
.mm-lead { display: none; }
.mm-leader { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; opacity: 0; transition: opacity 160ms; }
.mm-leader.on { opacity: 1; }
.mm-leader-l { stroke: var(--yellow); stroke-width: 1.2; stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200); filter: drop-shadow(0 0 4px rgba(255,221,77,0.7)); }
.mm-leader.on .mm-leader-l { animation: mmLead 320ms cubic-bezier(.4,0,.2,1) forwards; }
@keyframes mmLead { to { stroke-dashoffset: 0; } }
.mm-leader-a { fill: var(--yellow); filter: drop-shadow(0 0 6px rgba(255,221,77,0.9)); }
.mm-leader-b { fill: none; stroke: var(--yellow); stroke-width: 1.2; }
.mm-card { width: 330px; transition: opacity 220ms 120ms, transform 300ms var(--ease-out) 120ms, clip-path 380ms cubic-bezier(.7,0,.2,1) 160ms; }
.mm-pin:hover .mm-pin-svg, .mm-pin:focus-visible .mm-pin-svg, .mm-pin.is-hot .mm-pin-svg { transform: none; } /* the pin stays put when its card opens */
.mm-list { overflow: hidden auto; scrollbar-width: thin; scrollbar-color: rgba(205,196,240,0.3) transparent; }
.mm-list.is-compact { padding: 14px 0 10px; }
.mm-list.is-compact .mm-list-t, .mm-list.is-compact .mm-legend { display: none; }
.mm-list.is-compact .mm-row { grid-template-rows: auto; padding: 6px 16px 6px 18px; }
.mm-list.is-compact .mm-row-d { display: none; }
.mm-list.is-compact .mm-row-n { grid-row: auto; }
.mm-list.is-compact .mm-row-st { grid-row: auto; }
.mm-list.is-compact .mm-list-k { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .mm-leader.on .mm-leader-l { animation: none; stroke-dashoffset: 0; } }
.mm-card.is-compact { width: 280px; padding: 14px 16px 12px; }
.mm-card.is-compact .mm-card-t { font-size: 21px; }
.mm-card.is-compact .mm-card-s { font-size: 13px; }
.mm-card.is-compact .mm-card-r { display: none; }
.mm-card.is-compact .mm-card-go { margin-top: 10px; padding: 7px 12px 7px 10px; font-size: 11px; }
/* r19 (Naveen 26 Oct: the list takes too much space): the route becomes a slim strip, the rail's own language */
.mm-list { left: 22px; top: 76px; width: 46px; padding: 10px 0; overflow: visible; max-height: none !important; border-color: rgba(242,240,236,0.14);
  background: linear-gradient(180deg, rgba(12,14,26,0.40), rgba(12,14,26,0.22)); }
.mm-list.is-compact { padding: 10px 0; }
.mm-list-k, .mm-list-t, .mm-legend { display: none !important; }
.mm-list .mm-c { width: 10px; height: 10px; }
.mm-list .mm-c--tl::after { left: 3px; top: 3px; width: 3px; height: 3px; }
.mm-rows { border-top: 0; position: relative; }
.mm-rows::before { content: ''; position: absolute; left: 50%; top: 18px; bottom: 18px; width: 1px; margin-left: 6px; background: repeating-linear-gradient(180deg, rgba(242,240,236,0.45) 0 2px, transparent 2px 5px); }
.mm-row, .mm-list.is-compact .mm-row { display: grid; grid-template-columns: 1fr 12px; grid-template-rows: auto; align-items: center; column-gap: 4px; width: 46px; height: 32px; padding: 0 7px 0 6px; border-bottom: 0; }
.mm-row::before { width: 2px; }
.mm-row-n, .mm-list.is-compact .mm-row-n { grid-row: auto; font-size: 9.5px; letter-spacing: 0.08em; text-align: right; }
.mm-row-d, .mm-list.is-compact .mm-row-d { display: none; }
.mm-row-st, .mm-list.is-compact .mm-row-st { grid-row: auto; grid-column: 2; position: relative; z-index: 1; width: 7px; height: 7px; justify-self: center; background: #10111c; }
.mm-row.is-done .mm-row-st { background: var(--copy); }
.mm-row:hover, .mm-row:focus-visible, .mm-row.is-hot { background: rgba(255,221,77,0.10); }
.mm-row.is-hot .mm-row-n { color: var(--yellow); }
.mm-row.is-hot .mm-row-st { transform: scale(1.3); }
/* the gate line appears as one pill beside the strip, only on the row under the pointer */
.mm-row-t { position: absolute; left: 56px; top: 50%; transform: translate(-6px, -50%); max-width: none; overflow: visible;
  font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 13px; line-height: 1; letter-spacing: 0.01em; white-space: nowrap;
  color: #0b0b12; background: rgba(242,240,236,0.94); padding: 7px 12px; border-radius: 999px; box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none; transition: opacity 160ms var(--ease-out), transform 200ms var(--ease-out); }
.mm-row:hover .mm-row-t, .mm-row:focus-visible .mm-row-t { opacity: 1; transform: translate(0, -50%); }
.mm-row.is-here .mm-row-t { color: #0b0b12; }
@media (max-width: 900px) {
  .mm-list { left: 50%; right: auto; top: auto; bottom: 12px; width: auto; transform: translateX(-50%); padding: 0 8px; }
  .mm-rows { display: flex; }
  .mm-rows::before { left: 18px; right: 18px; top: 50%; bottom: auto; width: auto; height: 1px; margin: 4px 0 0; background: repeating-linear-gradient(90deg, rgba(242,240,236,0.45) 0 2px, transparent 2px 5px); }
  .mm-row { width: 36px; height: 44px; grid-template-columns: 1fr; grid-template-rows: auto auto; justify-items: center; padding: 6px 0; }
  .mm-row-n { text-align: center; } .mm-row-st { grid-column: 1; }
  .mm-row-t { display: none; }
}
.mapmenu.is-open .mm-list { clip-path: inset(-20px -900px -20px -20px); }
.mm-row, .mm-list.is-compact .mm-row { height: 34px; }
.mm-row-t { z-index: 6; }
@media (max-width: 900px) { .mapmenu.is-open .mm-list { clip-path: none; } }
.mm-list .mm-row .mm-row-t, .mm-list .mm-row.is-hot .mm-row-t, .mm-list .mm-row.is-here .mm-row-t { color: #0b0b12; }
.mm-list .mm-row.is-here .mm-row-t { background: var(--yellow); }
/* r25 grade preview state on the test badge */
.navtest-badge[data-grade]::after { content: ' · ' attr(data-grade); }


/* ======================================================================
   NAV TEST r29 (26 Oct, Naveen: "captions still look plain"): cap-x
   preview on w12 and w13 only. A: the gates' scan passes across the line
   as it decodes; B: a live ruler + distance to the next gate; C: one
   accent word underlined, filling with the moment.
   ====================================================================== */
.cap-x { --ink-hi: #F3F0FF; --ink-lo: rgba(176,168,214,0.72); }
.cap-x .cap-box { overflow: visible; }
/* A. scan: a vertical beam riding the decode front, purple wake, off-white edge */
.cap-x .cap-scan { position: absolute; top: -18px; bottom: -18px; left: 0; width: 72px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(134,87,224,0) 0%, rgba(134,87,224,0.10) 60%, rgba(134,87,224,0.26) 100%);
  -webkit-mask: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); mask: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  transform: translateX(-72px); }
.cap-x .cap-scan::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 1.5px; background: #F3F0FF; box-shadow: 0 0 10px rgba(134,87,224,0.9), 0 0 3px rgba(243,240,255,0.9); }
.cap-x.cap-in .cap-scan { animation: capScan 640ms linear 0ms 1 both; }
@keyframes capScan { 0% { opacity: 1; transform: translateX(-72px); } 88% { opacity: 1; } 100% { opacity: 0; transform: translateX(calc(var(--bw, 600px) - 20px)); } }
/* C (r30, Naveen: "two yellow lines is not good"): no underline; the accent word resolves last and settles with a soft purple glow */
.cap-x .cap-key { display: inline-block; color: #F3F0FF; animation: capKey 900ms var(--ease-out) both; }
@keyframes capKey { 0% { text-shadow: 0 0 2px rgba(243,240,255,0.9), 0 0 34px rgba(134,87,224,1), 0 2px 24px rgba(0,0,0,0.7); } 100% { text-shadow: 0 0 1px rgba(243,240,255,0.5), 0 0 18px rgba(134,87,224,0.75), 0 2px 24px rgba(0,0,0,0.7); } }
/* B. telemetry under the line: label · moving ruler · distance */
.cap-x .cap-bar { margin-top: 18px; }
.cap-tel { display: flex; align-items: center; gap: 14px; margin-top: 9px; width: 100%;
  font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-lo); white-space: nowrap; opacity: 0; transform: translateY(-4px); transition: opacity 420ms var(--ease-out) 420ms, transform 420ms var(--ease-out) 420ms; }
.cap-x.cap-in .cap-tel { opacity: 1; transform: none; }
.cap-tel b { color: var(--ink-hi); font-weight: 600; }
.cap-ruler { flex: 1; height: 1px; min-width: 40px; opacity: 0.5; align-self: center;
  background: repeating-linear-gradient(90deg, rgba(242,240,236,0.8) 0 1px, transparent 1px 4px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.cap-tel-r .cap-m { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.cap-tel-r::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 8px; vertical-align: 1px; border-radius: 50%;
  background: var(--yellow); box-shadow: 0 0 8px rgba(255,221,77,0.8); animation: capBlink 1.6s ease-in-out infinite; }
@keyframes capBlink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .cap-x .cap-scan { display: none; } .cap-tel-r::before { animation: none; } }
@media (max-width: 760px) { .cap-tel-l { display: none; } }


/* ======================================================================
   NAV TEST r31 (26 Oct, Naveen: "supporting elements ... to give the
   interface feel"): the viewfinder field on cap-x captions. The brackets
   frame an instrument: tick rulers on the top and bottom edges that travel
   with the scroll, a faint grid surface, the district's coordinates, an
   8-step district bar and a running timecode. Everything 30-55 %, no glass.
   ====================================================================== */
.cap-x .cap-box { padding: 30px 40px 28px; }
.cap-x .cap-grid { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 700ms var(--ease-out) 120ms;
  background-image: linear-gradient(rgba(242,240,236,0.11) 1px, transparent 1px), linear-gradient(90deg, rgba(242,240,236,0.11) 1px, transparent 1px);
  background-size: 22px 22px; background-position: var(--rx, 0) var(--gy, 0);
  -webkit-mask: radial-gradient(ellipse 62% 70% at 50% 50%, #000 30%, transparent 100%); mask: radial-gradient(ellipse 62% 70% at 50% 50%, #000 30%, transparent 100%); }
.cap-x .cap-rule { position: absolute; left: 22px; right: 22px; height: 7px; pointer-events: none; opacity: 0.62;
  background: repeating-linear-gradient(90deg, rgba(242,240,236,0.9) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, rgba(242,240,236,0.9) 0 1px, transparent 1px 50px);
  background-size: 100% 3px, 100% 7px; background-repeat: repeat-x; background-position: var(--rx, 0) 0, var(--rx, 0) 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  transform: scaleX(0); transition: transform 700ms var(--ease-out) 150ms; }
.cap-x .cap-rule--t { top: -4px; }
.cap-x .cap-rule--b { bottom: -4px; transform-origin: center; background-position: var(--rx, 0) 4px, var(--rx, 0) 0; }
.cap-x.cap-in .cap-rule { transform: scaleX(1); }
.cap-x.cap-in .cap-grid { opacity: 1; }
.cap-rd, .cap-steps { position: absolute; font-family: 'Tomorrow', sans-serif; font-weight: 500; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(207,201,230,0.62); white-space: nowrap; opacity: 0; transition: opacity 500ms var(--ease-out) 520ms; pointer-events: none; }
.cap-x.cap-in .cap-rd, .cap-x.cap-in .cap-steps { opacity: 1; }
.cap-rd b { color: #F3F0FF; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.cap-rd--tl { left: 2px; top: -24px; }
.cap-rd--br { right: 2px; bottom: -24px; }
.cap-rd-dot { display: inline-block; width: 5px; height: 5px; margin-right: 8px; vertical-align: 1px; border: 1px solid rgba(243,240,255,0.8); border-radius: 50%; }
.cap-steps { right: 2px; top: -23px; display: flex; align-items: center; gap: 3px; }
.cap-steps i { width: 10px; height: 4px; background: rgba(242,240,236,0.16); }
.cap-steps i.on { background: rgba(242,240,236,0.7); }
.cap-steps i.to { background: var(--purple-lit); box-shadow: 0 0 6px rgba(134,87,224,0.9); animation: capBlink 1.6s ease-in-out infinite; }
.cap-steps em { font-style: normal; margin-left: 8px; color: #F3F0FF; }
@media (prefers-reduced-motion: reduce) { .cap-x .cap-rule, .cap-x .cap-grid { transition: none; } .cap-steps i.to { animation: none; } }
@media (max-width: 760px) { .cap-rd--tl, .cap-rd--br { display: none; } }


/* ======================================================================
   NAV TEST r33 (26 Oct, Naveen: "use something similar in opening caption"):
   the §0 title inside the caption viewfinder. The frame is placed on the
   title by JS (s0VfPlace); it fades with the title; the yellow line fills
   as the visitor scrolls the title away; the full stop keeps its beat.
   ====================================================================== */
.s0-vf { position: absolute; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 600ms var(--ease-out); }
.s0-vf .hud-corner { width: 18px; height: 18px; border-color: rgba(242,240,236,0.8); }
.s0-vf.cap-in .hud-corner { opacity: 1; transform: none; }
.s0-vf .cap-grid { z-index: 0; background-size: 28px 28px; }
.s0-vf .cap-rule--t { top: -4px; } .s0-vf .cap-rule--b { bottom: -4px; }
.s0-vf .cap-rd--tl { top: -26px; } .s0-vf .cap-steps { top: -25px; } .s0-vf .cap-rd--br { bottom: -26px; }
.s0-vf-foot { position: absolute; left: var(--fx, 4%); right: var(--fx, 4%); bottom: 18px; }
.s0-vf .cap-bar { margin-top: 0; }
.s0-vf .cap-tel { font-size: 11px; }
.s0-vf.cap-in .cap-scan { animation: capScan 900ms linear 0ms 1 both; }
#s0:not(.reveal) .s0-vf { opacity: 0 !important; }
@media (max-width: 760px) { .s0-vf .cap-rd--tl, .s0-vf .cap-rd--br { display: none; } }


/* ======================================================================
   NAV TEST r34 (26 Oct): title material test, opening title only.
   ?title=light  projected light: scanlines inside the letters, a lit top
                 edge, ~90 % fill so the city reads through, a soft glow.
   ?title=glass  frosted glass: the aerial, blurred and lifted, seen through
                 the letters, a bright hairline edge, a soft shadow.
   Default (no param) = the current solid title. The full stop keeps its beat.
   ====================================================================== */
#s0.t-light .s0-title { /* r35: brighter (Naveen: "bit dull"): white body, lighter scanlines, a stronger violet halo */
  text-shadow: none;
  background-image:
    repeating-linear-gradient(180deg, rgba(40,20,90,0.11) 0 1px, rgba(40,20,90,0) 1px 3px),
    linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 45%, #F1ECFF 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.9)) drop-shadow(0 0 9px rgba(170,135,255,0.6)) drop-shadow(0 0 30px rgba(134,87,224,0.5)) drop-shadow(0 2px 22px rgba(0,0,0,0.55));
}
#s0.t-glass .s0-title {
  text-shadow: none;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.30) 44%, rgba(255,255,255,0.16) 56%, rgba(255,255,255,0.30) 100%),
    url('../img/s0_aerial_v2_1920_frost.jpg');
  background-size: 100% 100%, cover; background-position: 0 0, center; background-attachment: scroll, fixed;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.7);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.25)) drop-shadow(0 6px 26px rgba(0,0,0,0.7));
}
#s0.t-light .s0-stop, #s0.t-glass .s0-stop { -webkit-text-fill-color: currentColor; -webkit-text-stroke: 0; }


/* ======================================================================
   NAV TEST r36 (26 Oct, Naveen: "follow that for all scroll captions except
   the trio but reduce the glow a little"): projected-light type on every
   cap-x caption line. Same body and scanlines as the title, a smaller halo.
   The accent word paints its own light with a little more violet glow.
   ====================================================================== */
.cap-x .street-title.cap-text {
  text-shadow: none;
  background-image:
    repeating-linear-gradient(180deg, rgba(40,20,90,0.11) 0 1px, rgba(40,20,90,0) 1px 3px),
    linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 45%, #F1ECFF 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.7)) drop-shadow(0 0 6px rgba(170,135,255,0.38)) drop-shadow(0 0 20px rgba(134,87,224,0.28)) drop-shadow(0 2px 18px rgba(0,0,0,0.6));
}
.cap-x .cap-key { /* r36b (Naveen: "glow in 1 word" not a good idea): the word lands last in the decode, then reads exactly like the rest */
  display: inline; background: none; color: inherit; -webkit-text-fill-color: transparent; text-shadow: none; animation: none;
}


/* ======================================================================
   NAV TEST r37 (26 Oct, Naveen: "avoid the glow. Keep it more white with
   scan lines everywhere"): title and captions are plain white light with
   scanlines; no halo, only a dark falloff shadow for legibility.
   ====================================================================== */
#s0.t-light .s0-title, .cap-x .street-title.cap-text {
  background-image:
    repeating-linear-gradient(180deg, rgba(5,5,8,0.16) 0 1px, rgba(5,5,8,0) 1px 3px),
    linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 100%);
  /* a subtle neutral bloom for readability (Naveen: "a subtle glow, if required for readability"), no colour */
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.22)) drop-shadow(0 2px 18px rgba(0,0,0,0.62));
}
