/* ──────────────────────────────────────────────────────────────────────────
   StockerTV Fleet View — Luxury visual redesign
   Glass-morphism panels · lit palette · ambient breathing · cinematic splash
   ────────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* Foundation */
  --bg:           #0A0B0F;
  --bg-elev:      #0e0e16;
  --surface:      #111318;
  --surface-2:    #181826;
  --border:       #1e1e2e;
  --border-soft:  #2a2a3d;
  --text:         #e6e6ee;
  --text-2:       #9e9eb4;
  --text-3:       #6b6b80;

  /* Abstract surface tokens — flip per theme */
  --hairline:       rgba(255, 255, 255, 0.06);
  --hairline-bold:  rgba(255, 255, 255, 0.12);
  --lit-edge-color: rgba(255, 255, 255, 0.1);
  --glass-bg:       rgba(12, 12, 20, 0.65);
  --glass-bg-deep:  rgba(8, 8, 12, 0.5);
  --scrim:          rgba(6, 6, 10, 0.78);
  --vignette-inner: rgba(255, 122, 89, 0.07);
  --vignette-outer: rgba(0, 0, 0, 0.55);
  --body-grad-1:    rgba(255, 122, 89, 0.03);
  --body-grad-2:    rgba(52, 211, 153, 0.02);

  /* Editorial salmon — the identity color. Used sparingly, for interactive + emphasis.
     Blue remains available as a regional/informational cue on the map only. */
  --accent:       #FF7A59;
  --accent-2:     #FFA68C;
  --accent-soft:  rgba(255, 122, 89, 0.16);
  --accent-glow:  rgba(255, 122, 89, 0.45);

  /* Map/regional blue — scoped to geographic signal, not brand */
  --map-blue:     #4a9eff;
  --map-blue-2:   #6db4ff;

  /* Lit palette — softer, richer than Tailwind defaults */
  --green:        #34D399;
  --green-soft:   rgba(52, 211, 153, 0.18);
  --green-glow:   rgba(52, 211, 153, 0.5);

  --red:          #F87171;
  --red-soft:     rgba(248, 113, 113, 0.18);
  --red-glow:     rgba(248, 113, 113, 0.55);

  --amber:        #f59e0b;
  --amber-soft:   rgba(245, 158, 11, 0.18);

  /* Luxury accents — used with restraint, for warmth and atmosphere */
  --gold:         #D4A574;
  --warm-white:   #F5E6D3;
  --purple:       #A78BFA;

  /* Reporter palette (kept for brand associations) */
  --reporter-gerardo: #60A5FA;
  --reporter-liam:    #34D399;
  --reporter-annie:   #f59e0b;
  --reporter-sophia:  #A78BFA;
  --reporter-maya:    #ec4899;

  /* Typography — editorial display voice via Fraunces (variable serif with opsz axis) */
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif:   'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --display: 'Fraunces', 'Geist', 'Space Grotesk', 'Outfit', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-display: 64px;
  --fs-h1:      40px;
  --fs-h2:      24px;
  --fs-body:    15px;
  --fs-meta:    12px;
  --fs-micro:   10px;

  /* Depth — 4 distinct shadow signatures */
  --shadow-l1: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-l2: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-l3: 0 28px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  /* Easing */
  --ease-enter: cubic-bezier(.22, .94, .3, 1);
  --ease-exit:  cubic-bezier(.4, 0, 1, 1);
  --ease-pulse: cubic-bezier(.45, 0, .55, 1);

  /* Layout */
  --rail-width:        320px;
  --topbar-primary-h:  76px;   /* bumped from 56 to accommodate 28px metrics */
  --topbar-health-h:   24px;
  --topbar-h:          calc(var(--topbar-primary-h) + var(--topbar-health-h));
  --ticker-h:          38px;

  /* ── Wave 5 foundation tokens ──────────────────────────────────────────
     Shared by grain overlay (G1), watermark ticker (C4), mastheads (A2/C5),
     Market Open Ceremony (F1), editorial bylines (G6), issue lockups (G3).
     Per-batch specific tokens live alongside their consumers further down. */
  --w5-hairline-thin:   rgba(255, 255, 255, 0.09);
  --w5-grain-base-freq: 0.82;
  --w5-grain-opacity:   0.035;
  --w5-grain-blend:     overlay;
  --w5-watermark-color: rgba(255, 255, 255, 0.045);
  --w5-ceremony-scrim:  rgba(6, 6, 10, 0.86);
  --w5-ceremony-accent: var(--accent);
  --w5-issue-meta:      rgba(158, 158, 180, 0.55);
  --w5-masthead-rule:   rgba(255, 255, 255, 0.22);
  --w5-pullquote-color: rgba(230, 230, 238, 0.92);
}

/* ── Light mode — editorial paper palette ───────────────────────────────
   Activated via <html data-theme="light">. Accent + gold darken to meet
   WCAG AA against paper; hairlines flip to black-at-low-alpha; glass
   surfaces become near-white with soft warmth. The salmon identity is
   preserved (deeper salmon for contrast). */
[data-theme="light"] {
  color-scheme: light;

  /* Foundation — paper tones, not pure white */
  --bg:           #FAF7F2;
  --bg-elev:      #FFFFFF;
  --surface:      #FFFFFF;
  --surface-2:    #F5F0E8;
  --border:       #E6DFD3;
  --border-soft:  #D6CEBE;
  --text:         #1A1815;
  --text-2:       #5A5550;
  --text-3:       #8C857E;

  /* Abstract tokens */
  --hairline:       rgba(26, 24, 21, 0.08);
  --hairline-bold:  rgba(26, 24, 21, 0.16);
  --lit-edge-color: rgba(26, 24, 21, 0.06);
  --glass-bg:       rgba(255, 253, 250, 0.82);
  --glass-bg-deep:  rgba(250, 247, 242, 0.88);
  --scrim:          rgba(26, 24, 21, 0.38);
  --vignette-inner: rgba(209, 79, 43, 0.05);
  --vignette-outer: rgba(26, 24, 21, 0.06);
  --body-grad-1:    rgba(209, 79, 43, 0.02);
  --body-grad-2:    rgba(13, 156, 110, 0.015);

  /* Accent: deeper salmon for contrast on paper (4.8:1 on #FAF7F2 AA) */
  --accent:       #C74B28;
  --accent-2:     #FF7A59;
  --accent-soft:  rgba(199, 75, 40, 0.1);
  --accent-glow:  rgba(199, 75, 40, 0.32);

  /* Semantic — darker for AA on paper */
  --green:        #0D9C6E;
  --green-soft:   rgba(13, 156, 110, 0.12);
  --green-glow:   rgba(13, 156, 110, 0.35);

  --red:          #D93030;
  --red-soft:     rgba(217, 48, 48, 0.12);
  --red-glow:     rgba(217, 48, 48, 0.35);

  /* Amber darkened from #B5770A (4.29:1) to #9D6700 (5.4:1) to pass AA
     for the small 11px threshold labels in stage-12 dual-reveal-pass */
  --amber:        #9D6700;
  --amber-soft:   rgba(157, 103, 0, 0.14);

  /* Gold bronze on paper — 6:1 on #FAF7F2 for eyebrows and achievement text */
  --gold:         #8A5E2B;
  --warm-white:   #2A2520;  /* on light, this means "warm dark headline" */

  /* Reporter palette — darker variants for contrast */
  --reporter-gerardo: #2563EB;
  --reporter-liam:    #0D9C6E;
  --reporter-annie:   #B5770A;
  --reporter-sophia:  #7E3FD6;
  --reporter-maya:    #C4257A;

  /* Shadow scale — on light we use softer, cooler shadows, not big blacks */
  --shadow-l1: 0 1px 2px rgba(26, 24, 21, 0.06);
  --shadow-l2: 0 2px 8px rgba(26, 24, 21, 0.06), 0 1px 3px rgba(26, 24, 21, 0.04);
  --shadow-l3: 0 16px 48px rgba(26, 24, 21, 0.12), 0 0 0 1px rgba(26, 24, 21, 0.05);

  /* Wave 5 overrides for paper mode */
  --w5-hairline-thin:   rgba(26, 24, 21, 0.1);
  --w5-grain-base-freq: 0.94;
  --w5-grain-opacity:   0.022;
  --w5-grain-blend:     multiply;
  --w5-watermark-color: rgba(26, 24, 21, 0.045);
  --w5-ceremony-scrim:  rgba(250, 247, 242, 0.92);
  --w5-issue-meta:      rgba(26, 24, 21, 0.48);
  --w5-masthead-rule:   rgba(26, 24, 21, 0.35);
  --w5-pullquote-color: rgba(26, 24, 21, 0.9);
}

* { box-sizing: border-box; }

/* ── Utility: editorial lit-edge hairline ──────────────────────────────
   Apply `.lit-edge` to any relatively-positioned card surface. Produces a
   1px top-edge gradient that reads as "lit from above" — the single depth
   signal replacing heavy drop shadows. */
.lit-edge { position: relative; }
.lit-edge::before {
  content: "";
  position: absolute;
  inset: 0 1px auto 1px;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--lit-edge-color) 18%, var(--lit-edge-color) 82%, transparent);
  pointer-events: none;
}

/* ── Global selection + scrollbar + focus ─────────────────────────────── */
::selection {
  background: rgba(255, 122, 89, 0.25);
  color: #fff;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: var(--r-sm); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.55);
}

/* ── Reduced motion — WCAG 2.3.3 ─────────────────────────────────────────
   Aggressive snap: any user with prefers-reduced-motion: reduce sees every
   CSS animation and transition collapse to ~0ms, which leaves the UI in
   its final state. Procedural JS animations (flight arcs, confetti, etc.)
   are guarded separately in fleet.js via shouldAnimate(). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  /* Ensure splash reveal end-states are visible even when animation is killed */
  .splash-headline-line { opacity: 1 !important; transform: none !important; filter: none !important; }
  .splash-eyebrow, .splash-sub, .splash-footnote { opacity: 1 !important; transform: none !important; }
  .splash-accent-line { width: 240px !important; opacity: 1 !important; }
  .splash-beam, .splash-grid, .splash-nebula { animation: none !important; opacity: 0 !important; }
  /* Bell + kiosk ambient effects off */
  .dot-idle-breath, .ex-halo, .halo-breathe { animation: none !important; }
}

html, body {
  font-variant-numeric: tabular-nums;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
  overflow: hidden;
  height: 100%;
}

/* Ambient corner lighting — breathes slowly */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 600px 400px at 0% 100%, rgba(168, 85, 247, 0.08), transparent 70%),
    radial-gradient(ellipse 500px 350px at 100% 0%, rgba(52, 211, 153, 0.06), transparent 70%);
  background-size: 110% 110%;
  animation: ambient-drift 22s ease-in-out infinite alternate;
}
@keyframes ambient-drift {
  from { background-position: 0% 100%, 100% 0%; }
  to   { background-position: 8% 92%, 92% 8%; }
}
/* Vignette — edge darken above content. Dark theme only; in light mode
   this becomes a very subtle warm edge instead of a dark vignette. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  background: radial-gradient(ellipse at center, transparent 55%, var(--vignette-outer) 100%);
}

/* Reusable brand wordmark — subtle gradient in place of flat text.
   Dark: white→gray. Light: editorial dark headline tone. */
.brand-wordmark {
  background: linear-gradient(180deg, #ffffff 0%, #c4c4d0 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
[data-theme="light"] .brand-wordmark {
  background: linear-gradient(180deg, #1A1815 0%, #3A3530 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

/* ── Topbar — glass morphism (L2) ──────────────────────────────────────── */
.topbar {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--accent-soft);
  box-shadow:
    inset 0 1px 0 var(--lit-edge-color),
    0 1px 0 rgba(255, 122, 89, 0.12),
    var(--shadow-l2);
  height: var(--topbar-h);
  z-index: 30;
}
.topbar-row--primary {
  flex: 0 0 var(--topbar-primary-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}
.topbar-row--health {
  flex: 0 0 var(--topbar-health-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--hairline);
  background: var(--glass-bg-deep);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.3px;
}
.topbar-row--health .hf-dot { color: var(--green); margin-right: 4px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #2a6fd1);
  color: white; font-weight: 700; font-size: 12px;
  font-family: var(--mono); letter-spacing: 0.5px;
  border-radius: var(--r-sm);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 20px var(--accent-soft);
}
.brand-title { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand-sub   { font-size: 11px; color: var(--text-3); font-family: var(--mono); text-transform: uppercase; letter-spacing: 1.4px; }

/* Inline metrics in the center — authoritative 28px values */
.tb-metrics {
  display: flex;
  gap: 28px;
  align-items: center;
}
.tb-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}
.tb-k {
  font-size: 10px;
  color: var(--text-3);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.tb-v {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: -0.02em;
  line-height: 1;
}
.tb-v--green { color: var(--green); }
.tb-v--bump  { animation: tb-bump 400ms var(--ease-enter); }
@keyframes tb-bump {
  0%   { color: var(--accent); transform: translateY(0); }
  30%  { transform: translateY(-2px); }
  100% { color: var(--text); transform: translateY(0); }
}

.topbar-meta { display: flex; gap: 8px; align-items: center; min-width: 320px; justify-content: flex-end; }
.meta-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  letter-spacing: 1.3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.meta-pill--ghost { color: var(--accent); border-color: var(--accent-soft); }

/* LIVE pill — real pulsing dot via inner span */
.meta-pill--live {
  color: #fff;
  border: 1px solid rgba(52, 211, 153, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, #3fd47a 0%, var(--green) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 6px rgba(52, 211, 153, 0.4);
}
.live-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 8px;
  animation: live-breathe 1.8s var(--ease-pulse) infinite;
}
@keyframes live-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7), 0 0 8px rgba(248, 113, 113, 0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(248, 113, 113, 0),   0 0 14px rgba(248, 113, 113, 0.9); }
}

/* ── Button system — gradient + inset highlight ─────────────────────── */
.audit-toggle,
.sound-toggle,
.demo-link {
  appearance: none;
  display: inline-grid;
  place-items: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    color 160ms var(--ease-enter),
    border-color 160ms var(--ease-enter),
    background 160ms var(--ease-enter),
    box-shadow 160ms var(--ease-enter),
    transform 160ms var(--ease-enter);
}
.audit-toggle,
.sound-toggle,
.theme-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%),
    var(--surface-2);
  border: 1px solid var(--border-soft);
  box-shadow:
    inset 0 1px 0 var(--lit-edge-color),
    var(--shadow-l1);
}
.audit-toggle:hover,
.sound-toggle:hover,
.theme-toggle:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%),
    var(--surface-2);
  box-shadow:
    inset 0 1px 0 var(--hairline-bold),
    0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px) scale(1.02);
}

.demo-link {
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #FF6040 0%, var(--accent) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 6px rgba(255, 122, 89, 0.4);
}
.demo-link:hover {
  color: #fff;
  background: linear-gradient(180deg, #FFA68C 0%, #FF6040 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 6px 16px rgba(255, 122, 89, 0.6);
  transform: translateY(-1px) scale(1.02);
}

.sound-toggle { width: 32px; padding: 0; border-radius: 50%; color: var(--text-2); cursor: pointer; }
.sound-toggle-icon { width: 16px; height: 16px; display: block; }
.sound-toggle[data-state="on"]  .sound-toggle-icon--off,
.sound-toggle[data-state="off"] .sound-toggle-icon--on { display: none; }
.sound-toggle[data-state="off"] { color: var(--text-3); }

/* Theme toggle — mirrors sound-toggle shape; shows moon in dark, sun in light */
.theme-toggle {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: 50%;
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-icon { width: 15px; height: 15px; display: block; }
/* Dark mode: show moon. Light mode: show sun. No state attribute needed —
   the [data-theme] on html flips visibility. */
:root[data-theme="dark"]  .theme-toggle-icon--sun,
:root                     .theme-toggle-icon--sun   { display: none; }
:root[data-theme="light"] .theme-toggle-icon--moon  { display: none; }
:root[data-theme="light"] .theme-toggle-icon--sun   { display: block; }

.audit-toggle[aria-pressed="true"] {
  color: var(--amber);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%),
    var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(245, 158, 11, 0.25),
    0 0 14px rgba(245, 158, 11, 0.3);
}

/* ── Stage: map + right rail ────────────────────────────────────────────── */
.stage {
  display: flex;
  height: calc(100vh - var(--topbar-h) - var(--ticker-h));
  min-height: 560px;
  position: relative;
  z-index: 1;
}
.map-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
/* Map vignette — accent glow center + darkened corners */
.map-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 122, 89, 0.07), transparent 60%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 1;
}
/* Slowly drifting scan-line pattern */
.map-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 1px,
    rgba(255, 255, 255, 0.022) 1px,
    rgba(255, 255, 255, 0.022) 2px
  );
  z-index: 10;
  mix-blend-mode: overlay;
  animation: scan-drift 30s linear infinite;
}
@keyframes scan-drift {
  from { background-position-y: 0; }
  to   { background-position-y: 6px; }
}

/* Organic ocean noise — SVG fractalNoise at 1.5% overlay, zero cost */
.map-wrap > .map-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22240%22%20height%3D%22240%22%3E%3Cfilter%20id%3D%22n%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20values%3D%220%200%200%200%201%200%200%200%200%201%200%200%200%200%201%200%200%200%200.6%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22240%22%20height%3D%22240%22%20filter%3D%22url(%23n)%22%20opacity%3D%220.8%22%2F%3E%3C%2Fsvg%3E");
  background-size: 240px 240px;
  mix-blend-mode: overlay;
  opacity: 0.15;
  z-index: 3;
}

/* Traveling grid-pulse — horizontal line sweeping downward every 10s */
.map-grid-pulse {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 89, 0.35) 50%, transparent);
  box-shadow: 0 0 8px rgba(255, 122, 89, 0.3);
  z-index: 4;
  animation: grid-travel 10s linear infinite;
}
@keyframes grid-travel {
  0%   { transform: translateY(0);       opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(100vh);   opacity: 0; }
}

.map-svg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
  position: relative;
  z-index: 2;
}

/* Continents — soft blue edge glow */
.map-continents path {
  fill: rgba(255, 122, 89, 0.14);
  stroke: rgba(110, 110, 130, 0.42);
  stroke-width: 0.25;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgba(255, 122, 89, 0.35));
}

/* Latitude / longitude grid */
.map-grid line {
  stroke: rgba(110, 110, 130, 0.12);
  stroke-width: 0.15;
  stroke-dasharray: 0.8 1.4;
  vector-effect: non-scaling-stroke;
}

/* Region labels */
.map-region-labels .map-region-label {
  fill: rgba(230, 230, 238, 0.15);
  font-family: var(--mono);
  font-size: 3px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-anchor: middle;
  pointer-events: none;
}

/* Exchange dots — tiered sizing, ambient breathing */
.map-dots .ex-dot {
  fill: rgba(230, 230, 238, 0.9);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.15;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
  transition: fill 200ms var(--ease-enter), opacity 600ms var(--ease-enter);
  animation: dot-idle-breath 4s var(--ease-pulse) infinite;
}
@keyframes dot-idle-breath {
  0%, 100% { opacity: 0.90; }
  50%      { opacity: 0.94; }
}
.map-dots .ex-dot--major  { filter: drop-shadow(0 0 1.2px rgba(255, 122, 89, 0.75)); }
.map-dots .ex-dot--region { filter: drop-shadow(0 0 0.8px rgba(255, 122, 89, 0.55)); }
.map-dots .ex-dot--closed { opacity: 0.6; }
.ex-dot-group:hover .ex-dot { fill: var(--accent-2); }

/* Regional spotlight */
.map-dots.region-spotlight-NA    .ex-dot[data-region="NA"],
.map-dots.region-spotlight-EU    .ex-dot[data-region="EU"],
.map-dots.region-spotlight-APAC  .ex-dot[data-region="APAC"],
.map-dots.region-spotlight-LATAM .ex-dot[data-region="LATAM"],
.map-dots.region-spotlight-MEA   .ex-dot[data-region="MEA"] {
  fill: var(--accent-2);
  opacity: 1;
  filter: drop-shadow(0 0 2px var(--accent-glow));
  transition: fill 600ms var(--ease-enter), filter 600ms var(--ease-enter), opacity 600ms var(--ease-enter);
}

/* Ambient breathing halo (tier 0/1) */
.map-dots .ex-halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.15;
  opacity: 0;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
}
.map-dots .ex-halo--breathing {
  animation: halo-breathe 3.2s var(--ease-pulse) infinite;
}
@keyframes halo-breathe {
  0%, 100% { opacity: 0;   transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.6); }
}

/* Hover-triggered ring expansion — always present, animates on group hover */
.map-dots .ex-hover-ring {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 0.3;
  opacity: 0;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}
.ex-dot-group:hover .ex-hover-ring {
  animation: halo-ring-expand 380ms var(--ease-enter) forwards;
}
@keyframes halo-ring-expand {
  0%   { opacity: 0;   transform: scale(1);   stroke-width: 0.35; }
  60%  { opacity: 0.7; transform: scale(2.2); stroke-width: 0.2; }
  100% { opacity: 0;   transform: scale(3);   stroke-width: 0.1; }
}

/* Exchange labels — only shown for major exchanges */
.map-labels text {
  fill: rgba(230, 230, 238, 0.72);
  font-family: var(--mono);
  font-size: 1.7px;
  text-anchor: middle;
  letter-spacing: 0.04px;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

/* Radar pulse rings */
.map-pulses .pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.3;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}
.map-pulses .pulse--bell {
  stroke: var(--green);
  stroke-width: 0.45;
  filter: drop-shadow(0 0 3px var(--green-glow));
}
.map-pulses .pulse--heartbeat {
  stroke: var(--accent-2);
  stroke-width: 0.3;
}

/* Flight arc */
.map-arcs .arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.25;
  stroke-dasharray: 1 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}
.map-arcs .arc.arc--drawn { opacity: 0.55; }
.map-arcs .arc.arc--fading {
  opacity: 0;
  transition: opacity 15s linear;
}

/* Card layer — L1 depth */
.card-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.flight-card {
  position: absolute;
  top: 0; left: 0;
  width: 88px;
  height: 32px;
  margin: -16px 0 0 -44px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow:
    0 0 0 1px var(--accent-soft),
    0 8px 16px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(255, 122, 89, 0.35);
  pointer-events: auto;
  cursor: pointer;
  will-change: transform, opacity;
  opacity: 0;
  transform: translate(0, 0) scale(0.4);
  transition: opacity 280ms var(--ease-enter), transform 280ms var(--ease-enter);
}
.flight-card.flight-card--spawn {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}
.flight-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.flight-card-ticker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--text);
  letter-spacing: 0.2px;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flight-card-reporter {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.flight-card-progress {
  display: flex;
  gap: 1px;
  height: 2px;
}
.flight-card-progress-seg {
  flex: 1;
  background: var(--border);
  border-radius: 1px;
}
.flight-card-progress-seg--done { background: var(--accent); }

/* Hero overlay — top-left of map */
.map-hero {
  position: absolute;
  top: 20px;
  left: 24px;
  pointer-events: none;
  z-index: 6;
  transition: opacity 800ms var(--ease-enter);
}
.map-hero-title {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(245, 230, 211, 0.92);
  line-height: 1;
  text-shadow: 0 0 60px rgba(255, 122, 89, 0.15);
  font-variation-settings: "opsz" 96, "SOFT" 50;
}
.map-hero-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(245, 230, 211, 0.52);        /* warm-white tint */
  margin-top: 10px;
  letter-spacing: 0.5px;
}

/* Mini legend — bottom-left of map */
.map-legend {
  position: absolute;
  bottom: 16px;
  left: 24px;
  pointer-events: none;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(230, 230, 238, 0.35);
  letter-spacing: 0.4px;
  transition: opacity 800ms var(--ease-enter);
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-sep { color: rgba(230, 230, 238, 0.18); }
.legend-dot {
  display: inline-block;
  border-radius: 50%;
  background: rgba(230, 230, 238, 0.65);
}
.legend-dot--major    { width: 8px; height: 8px; box-shadow: 0 0 4px rgba(255, 122, 89, 0.5); }
.legend-dot--regional { width: 4px; height: 4px; }
.legend-dot--minor    { width: 4px; height: 4px; opacity: 0.7; }
.legend-arc {
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  border-top: 1px dashed var(--accent);
  opacity: 0.7;
}

/* AUDIT mode */
.audit-mode .map-wrap .map-svg { opacity: 0.4; }
.audit-mode .map-wrap .map-hero,
.audit-mode .map-wrap .map-legend { opacity: 0.25; }
.audit-mode .rail { opacity: 0.55; }
.audit-mode .news-ticker { opacity: 0.4; }
.audit-mode .flight-card {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 0 20px var(--red-glow);
  animation: flight-card-alarm 1.2s var(--ease-pulse) infinite;
}
@keyframes flight-card-alarm {
  0%, 100% { box-shadow: 0 0 0 1px var(--red), 0 0 16px rgba(248, 113, 113, 0.35); }
  50%      { box-shadow: 0 0 0 1px var(--red), 0 0 28px rgba(248, 113, 113, 0.65); }
}
.audit-mode .feed-list li[data-rewritten="true"] {
  opacity: 1;
  background: rgba(248, 113, 113, 0.08);
  border-left: 2px solid var(--red);
  padding-left: 8px;
}
.audit-mode .feed-list li:not([data-rewritten="true"]) { opacity: 0.4; }

.audit-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(18, 18, 26, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(8px);
}
.audit-toast[hidden] { display: none; }

/* Tooltip — L3 depth */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 100;
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  box-shadow: var(--shadow-l3);
  backdrop-filter: blur(8px);
  max-width: 240px;
  line-height: 1.4;
}
.map-tooltip[hidden] { display: none; }
.map-tooltip .tt-title { color: var(--accent); font-weight: 600; letter-spacing: 0.2px; }
.map-tooltip .tt-sub   { color: var(--text-3); font-size: 11px; margin-top: 4px; }
.map-tooltip .tt-row   { color: var(--text-2); font-size: 11px; margin-top: 4px; }

/* ── Right rail — glass morphism (L2) ──────────────────────────────────── */
.rail {
  width: var(--rail-width);
  flex-shrink: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-left: 1px solid var(--hairline);
  box-shadow:
    inset 1px 0 0 var(--lit-edge-color),
    var(--shadow-l2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 30;
}
.rail-section { padding: 16px; overflow: hidden; display: flex; flex-direction: column; }
.rail-section--feed { flex: 1; min-height: 0; }
.rail-section--reporters { flex: 0 0 auto; }
.rail-head {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-3);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.rail-divider { height: 1px; background: rgba(255, 255, 255, 0.05); margin: 0 16px; }

/* Feed list — Bloomberg-terminal vibe */
.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  flex: 1;
  position: relative;
}
/* Empty state — shows before the first completion arrives. Uses :empty
   so it self-dismisses automatically the moment any <li> is injected. */
.feed-list:empty::before {
  content: "Awaiting first completion…";
  display: block;
  padding: 14px 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  opacity: 0.6;
}
.feed-list:empty::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  margin: 4px 4px 0;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.feed-list li {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  display: grid;
  grid-template-columns: auto auto auto auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  opacity: 0;
  animation: feed-in 520ms var(--ease-enter) forwards;
  transition: transform 200ms var(--ease-enter), background 160ms var(--ease-enter), opacity 160ms var(--ease-enter);
  position: relative;
}
/* Thin left accent bar — only visible on hover */
.feed-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 160ms var(--ease-enter);
}
.feed-list li:hover {
  background: rgba(255, 122, 89, 0.08);
  transform: translateX(2px);
}
.feed-list li:hover::before { opacity: 1; }

/* Thin separators between entries + recency fade */
.feed-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 9px;
  margin-top: -1px;
}
.feed-list li:nth-child(1) { background: rgba(255, 255, 255, 0.02); }
.feed-list li:nth-child(n+3) { opacity: 0.88; }
.feed-list li:nth-child(n+5) { opacity: 0.78; }

.feed-list li.feed-list-item--fresh {
  animation: feed-in 520ms var(--ease-enter) forwards, feed-fresh 1200ms var(--ease-pulse);
}
@keyframes feed-in {
  0%   { opacity: 0; transform: translateX(20px); background: rgba(255, 255, 255, 0.12); }
  40%  { opacity: 1; transform: translateX(0);    background: rgba(255, 255, 255, 0.12); }
  100% { opacity: 1; transform: translateX(0);    background: transparent; }
}
@keyframes feed-fresh {
  0%   { box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35); }
  100% { box-shadow: none; }
}
.feed-tick   { color: var(--green); font-weight: 700; font-size: 12px; }
.feed-reporter-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
/* Ticker symbol — larger + bolder than headline (terminal-style) */
.feed-ticker {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
}
.feed-exchange {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 2px 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.feed-headline { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); font-size: 11px; font-weight: 500; }
.feed-score { font-weight: 700; font-family: var(--mono); font-size: 11px; }
.feed-score--gold  { color: var(--gold); text-shadow: 0 0 8px rgba(212, 165, 116, 0.5); }
.feed-score--green { color: var(--green); }
.feed-score--white { color: var(--text); }
.feed-score--amber { color: var(--amber); }

/* Reporters list */
.reporters-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reporters-list:empty::before {
  content: "Reporter rankings populate after first script…";
  display: block;
  padding: 8px 4px 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  opacity: 0.5;
}
.reporter-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
}
.reporter-row .rname { color: var(--text); font-weight: 600; }
.reporter-row .rbar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.reporter-row .rbar-fill { height: 100%; border-radius: 999px; transition: width 500ms var(--ease-enter); }
.reporter-row[data-k="Gerardo"] .rbar-fill { background: var(--reporter-gerardo); }
.reporter-row[data-k="Liam"]    .rbar-fill { background: var(--reporter-liam); }
.reporter-row[data-k="Annie"]   .rbar-fill { background: var(--reporter-annie); }
.reporter-row[data-k="Sophia"]  .rbar-fill { background: var(--reporter-sophia); }
.reporter-row[data-k="Maya"]    .rbar-fill { background: var(--reporter-maya); }
.reporter-row .rcount { color: var(--text); font-weight: 700; font-size: 11px; }

/* ── Newsroom ticker — glass (L2) ──────────────────────────────────────── */
/* Newsroom ticker — promoted to editorial hero element (Bloomberg-style type mix) */
.news-ticker {
  height: var(--ticker-h);
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--hairline);
  box-shadow:
    inset 0 1px 0 var(--lit-edge-color),
    var(--shadow-l1);
  overflow: hidden;
  position: relative;
  z-index: 30;
  padding: 0;
}
/* Top-edge hairline highlight — the single depth signal */
.news-ticker::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-bold) 20%, var(--hairline-bold) 80%, transparent);
  pointer-events: none;
}
.news-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  white-space: nowrap;
  height: 100%;
  padding: 0 28px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-2);
  animation: news-scroll 80s linear infinite;
}
@keyframes news-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.news-item { display: inline-flex; align-items: center; gap: 10px; }
.news-item-ticker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border: 1px solid rgba(255, 122, 89, 0.22);
  border-radius: 3px;
  background: rgba(255, 122, 89, 0.04);
}
.news-item-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 400;
  color: var(--warm-white);
  letter-spacing: 0.005em;
  font-variation-settings: "opsz" 14, "SOFT" 30;
}
.news-item-sep { color: var(--gold); opacity: 0.45; font-size: 10px; }
.news-item.news-item--active .news-item-ticker {
  background: var(--accent);
  color: #0a0a0f;
  border-color: var(--accent);
}
.news-item.news-item--active .news-item-text {
  color: #fff;
  text-shadow: 0 0 12px var(--accent-glow);
}

/* ── Drill-down modal — L3 depth ───────────────────────────────────────── */
.drill-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--scrim);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 40px 24px;
  animation: drill-in 300ms var(--ease-enter);
}
.drill-modal[hidden] { display: none; }
@keyframes drill-in { from { opacity: 0; } to { opacity: 1; } }
.drill-modal-stage {
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 80px);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-l3), 0 0 60px rgba(255, 122, 89, 0.12);
  animation: drill-stage-in 400ms var(--ease-enter);
  display: flex; flex-direction: column; gap: 16px;
}
@keyframes drill-stage-in {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.drill-modal-close {
  position: fixed; top: 24px; right: 24px; z-index: 301;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer;
  transition: background 160ms var(--ease-enter), color 160ms var(--ease-enter), transform 160ms var(--ease-enter);
}
.drill-modal-close:hover { background: var(--accent); color: white; transform: scale(1.05); }
.drill-head {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.drill-head-ticker { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; }
.drill-head-name   { font-size: 16px; font-weight: 600; flex: 1; color: var(--text); }
.drill-head-reporter {
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
  padding: 4px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px;
  text-transform: uppercase; letter-spacing: 1px;
}
.drill-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  min-height: 280px;
}
.drill-step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-family: var(--mono);
  min-height: 128px;
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0.32;
  transition: opacity 200ms var(--ease-enter), border-color 200ms var(--ease-enter), background 200ms var(--ease-enter);
}
.drill-step--active {
  opacity: 1;
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 122, 89, 0.08), var(--bg-elev));
  box-shadow: 0 0 0 1px var(--accent-soft), 0 4px 18px rgba(255, 122, 89, 0.18);
}
.drill-step--done { opacity: 1; border-color: var(--green-soft); }
.drill-step--done .drill-step-icon { color: var(--green); }
.drill-step-head { display: flex; align-items: center; justify-content: space-between; }
.drill-step-num  { font-size: var(--fs-micro); color: var(--text-3); letter-spacing: 1.3px; }
.drill-step-name { font-size: 11px; color: var(--text); font-weight: 600; line-height: 1.22; }
.drill-step-icon { font-size: 12px; color: var(--text-3); }

.drill-step-body {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--text-2);
  line-height: 1.35;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 400ms var(--ease-enter) 120ms, transform 400ms var(--ease-enter) 120ms;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.drill-step--active .drill-step-body,
.drill-step--done   .drill-step-body { opacity: 1; transform: translateY(0); }

.ds-row { display: flex; align-items: center; gap: 4px; font-size: var(--fs-micro); }
.ds-row--big { font-size: 11px; }
.ds-row--wrap { flex-wrap: wrap; }
.ds-row--red { color: var(--red); }
.ds-k { color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; font-size: var(--fs-micro); }
.ds-v { color: var(--text); font-weight: 600; }
.ds-v--accent { color: var(--accent); }
.ds-v--green  { color: var(--green); }
.ds-v--red    { color: var(--red); }
.ds-muted { color: var(--text-3); }
.ds-sep { color: var(--text-3); }
.ds-check { color: var(--green); font-weight: 700; }
.ds-check--accent { color: var(--accent); }
.ds-check--green { color: var(--green); }
.ds-arrow { color: var(--text-3); font-weight: 700; }
.ds-headline {
  color: var(--text);
  font-size: var(--fs-micro);
  font-weight: 600;
  line-height: 1.3;
  font-family: var(--sans);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ds-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ds-bullets li {
  font-size: var(--fs-micro);
  color: var(--text-2);
  padding-left: 8px;
  position: relative;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.ds-chip {
  display: inline-block;
  font-size: var(--fs-micro);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  letter-spacing: 0.2px;
}
.ds-gate {
  display: inline-block;
  font-size: var(--fs-micro);
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: var(--r-sm);
  padding: 2px 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.ds-reporter-dot {
  display: inline-grid;
  place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  color: white;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}
.ds-script {
  font-family: var(--sans);
  font-size: var(--fs-micro);
  color: var(--text);
  line-height: 1.3;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.drill-foot {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 1.4px; text-align: right;
}

/* Keyboard shortcut help — L3 */
.kbd-help {
  position: fixed;
  bottom: 52px;
  right: 28px;
  z-index: 150;
  min-width: 260px;
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  box-shadow: var(--shadow-l3);
  backdrop-filter: blur(10px);
  animation: kbd-help-in 300ms var(--ease-enter);
}
.kbd-help[hidden] { display: none; }
@keyframes kbd-help-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kbd-help-title {
  font-size: var(--fs-micro);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.kbd-help-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
}
.kbd-help-list dt {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--mono);
  background: var(--surface-2);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  justify-self: start;
  border: 1px solid var(--border);
  font-size: 11px;
}
.kbd-help-list dd { color: var(--text-2); margin: 0; align-self: center; }

/* Completion spark + dock ring */
.dock-spark {
  position: fixed;
  width: 4px; height: 4px;
  background: var(--accent-2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 30;
  box-shadow: 0 0 6px var(--accent-glow);
  transform: translate(-50%, -50%);
}
.dock-ring {
  position: fixed;
  width: 12px; height: 12px;
  border: 2px solid var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 30;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--green-glow);
}

/* ── Bell event — editorial announcement on UTC open/close ────────────────
   ~2.5s sequence: map dims, Fraunces lockup slides in below topbar, radar
   expands 3×, chime plays, then the map re-saturates and the lockup exits. */
.bell-lockup {
  position: fixed;
  top: calc(var(--topbar-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--ease-enter), transform 500ms var(--ease-enter);
  text-align: center;
  min-width: 320px;
}
.bell-lockup[hidden] { display: none; }
.bell-lockup--shown { opacity: 1; transform: translateX(-50%) translateY(0); }

.bell-lockup-name {
  display: block;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--warm-white);
  line-height: 1;
  font-variation-settings: "opsz" 96, "SOFT" 50;
  text-shadow: 0 0 60px rgba(255, 122, 89, 0.3);
}
.bell-lockup-verb {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-variation-settings: "opsz" 48, "SOFT" 100;
}
.bell-lockup-time {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* Map dim during bell — peripheral UI recedes, the bell is the only signal */
.map-svg { transition: opacity 600ms var(--ease-enter), filter 600ms var(--ease-enter); }
.map-hero,
.map-legend { transition: opacity 600ms var(--ease-enter); }
.map-wrap.map-wrap--bell-dim .map-svg {
  opacity: 0.5;
  filter: saturate(0.6);
}
.map-wrap.map-wrap--bell-dim .map-hero,
.map-wrap.map-wrap--bell-dim .map-legend {
  opacity: 0.3;
}

/* ── Welcome splash — cinematic opening ────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  display: grid;
  place-items: center;
  pointer-events: auto;
  transition: background 800ms var(--ease-enter), opacity 600ms var(--ease-enter);
  overflow: hidden;
}
.splash[hidden] { display: none; }
.splash.splash--reveal-map { background: rgba(10, 10, 15, 0.94); }
.splash.splash--exit { opacity: 0; }

/* Nebula — slowly drifting radial gradients behind everything */
.splash-nebula {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 500px at 30% 30%, rgba(255, 122, 89, 0.1), transparent 60%),
    radial-gradient(ellipse 600px 400px at 75% 70%, rgba(168, 85, 247, 0.07), transparent 60%),
    radial-gradient(ellipse 500px 300px at 50% 90%, rgba(52, 211, 153, 0.04), transparent 60%);
  animation: nebula-drift 36s var(--ease-pulse) infinite alternate;
}
@keyframes nebula-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-24px, -12px) scale(1.06); }
}

/* Dot grid — drifts upward */
.splash-grid {
  position: absolute;
  inset: -40px 0 0 0;
  background-image: radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.3) 1px, transparent 1.5px);
  background-size: 40px 40px;
  opacity: 0.08;
  pointer-events: none;
  animation: splash-grid-drift 80s linear infinite;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000, transparent 100%);
}
@keyframes splash-grid-drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-40px); }
}

/* Light beam — sweeps horizontally after title lands */
.splash-beam {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 89, 0.5), transparent);
  box-shadow: 0 0 8px rgba(255, 122, 89, 0.6);
  opacity: 0;
  left: -30%;
  animation: beam-sweep 500ms var(--ease-enter) 3000ms forwards;
  pointer-events: none;
}
@keyframes beam-sweep {
  0%   { left: -30%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.splash-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--warm-white);
  opacity: 0;
  letter-spacing: 0.3em;
  animation: splash-fade-in 700ms var(--ease-enter) 600ms forwards;
}

/* Editorial headline — Fraunces display, blur-lift reveal by line */
.splash-headline {
  font-family: var(--display);
  font-size: clamp(40px, 6.2vw, 80px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0;
  text-align: center;
  color: var(--warm-white);
  text-shadow: 0 0 80px rgba(255, 122, 89, 0.18);
  font-variation-settings: "opsz" 144, "SOFT" 60;
  max-width: 920px;
  padding: 0 24px;
}
.splash-headline-line {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(8px);
  animation: splash-headline-rise 1100ms var(--ease-enter) forwards;
}
.splash-headline-line:nth-child(1) { animation-delay: 1100ms; }
.splash-headline-line:nth-child(2) { animation-delay: 1900ms; }
.splash-headline-line--accent em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  text-shadow: 0 0 40px rgba(255, 122, 89, 0.35);
}
@keyframes splash-headline-rise {
  0%   { opacity: 0; transform: translateY(14px); filter: blur(8px); }
  40%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* Editorial footnote — UTC timestamp + standing dek */
.splash-footnote {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  animation: splash-sub-in 700ms var(--ease-enter) 4100ms forwards;
}
.splash-footnote-ts { color: var(--warm-white); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.splash-footnote-sep { color: var(--text-3); opacity: 0.5; }
.splash-footnote-label { color: var(--text-2); }

.splash-accent-line {
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
  box-shadow: 0 0 12px var(--accent-glow);
  border-radius: 999px;
  margin: 4px 0;
  animation: splash-line-in 800ms var(--ease-enter) 2700ms forwards;
}
@keyframes splash-line-in {
  from { width: 0; opacity: 0; }
  to   { width: 240px; opacity: 1; }
}

.splash-sub {
  font-family: var(--mono);
  font-size: var(--fs-body);
  color: rgba(255, 122, 89, 0.72);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: splash-sub-in 700ms var(--ease-enter) 3500ms forwards;
}
@keyframes splash-sub-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.splash-sub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
  animation: splash-sub-dot-pulse 1.6s var(--ease-pulse) infinite;
}
@keyframes splash-sub-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6), 0 0 8px var(--green-glow); transform: scale(1); }
  50%      { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0),  0 0 18px rgba(52, 211, 153, 0.9); transform: scale(1.2); }
}

@keyframes splash-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cinematic page-load reveal */
body.fleet-loading .map-continents path,
body.fleet-loading .map-dots,
body.fleet-loading .map-region-labels text,
body.fleet-loading .map-hero,
body.fleet-loading .map-legend,
body.fleet-loading .map-labels,
body.fleet-loading .tb-metric,
body.fleet-loading .news-ticker {
  opacity: 0;
  transition: opacity 600ms var(--ease-enter);
}
body.fleet-loading .rail {
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 500ms var(--ease-enter), transform 500ms var(--ease-enter);
}
body.fleet-loading.fleet-cont-in .map-continents path { opacity: 1; transition: opacity 800ms var(--ease-enter); }
body.fleet-loading.fleet-dots-in .map-dots { opacity: 1; }
body.fleet-loading.fleet-dots-in .ex-dot[data-region="NA"]    { animation: dot-pop 380ms var(--ease-enter) 0ms   both, dot-idle-breath 4s var(--ease-pulse) 380ms infinite; }
body.fleet-loading.fleet-dots-in .ex-dot[data-region="EU"]    { animation: dot-pop 380ms var(--ease-enter) 150ms both, dot-idle-breath 4s var(--ease-pulse) 530ms infinite; }
body.fleet-loading.fleet-dots-in .ex-dot[data-region="APAC"]  { animation: dot-pop 380ms var(--ease-enter) 300ms both, dot-idle-breath 4s var(--ease-pulse) 680ms infinite; }
body.fleet-loading.fleet-dots-in .ex-dot[data-region="LATAM"] { animation: dot-pop 380ms var(--ease-enter) 450ms both, dot-idle-breath 4s var(--ease-pulse) 830ms infinite; }
body.fleet-loading.fleet-dots-in .ex-dot[data-region="MEA"]   { animation: dot-pop 380ms var(--ease-enter) 600ms both, dot-idle-breath 4s var(--ease-pulse) 980ms infinite; }
@keyframes dot-pop { from { opacity: 0; } to { opacity: 0.9; } }

body.fleet-loading.fleet-labels-in .map-region-labels text,
body.fleet-loading.fleet-labels-in .map-hero,
body.fleet-loading.fleet-labels-in .map-legend,
body.fleet-loading.fleet-labels-in .map-labels { opacity: 1; transition: opacity 700ms var(--ease-enter); }

body.fleet-loading.fleet-rail-in .rail { opacity: 1; transform: translateX(0); }
body.fleet-loading.fleet-rail-in .tb-metric,
body.fleet-loading.fleet-rail-in .news-ticker { opacity: 1; }

/* ── 4K secondary display ──────────────────────────────────────────────── */
@media (min-width: 2560px) {
  :root {
    --rail-width: 400px;
    --topbar-primary-h: 88px;
    --ticker-h: 40px;
  }
  .tb-v { font-size: 34px; }
  .tb-k { font-size: 11px; }
}

/* ── Responsive breakpoints ────────────────────────────────────────────
   Design-system scale: 480 / 768 / 1024. The fleet view is map-first, so
   the map stays visible at every width — the right rail collapses below
   it on tablets, some topbar metrics hide on phones, and the splash
   headline scales down. The map is tight on phones but readable. */

/* Tablet landscape + small laptops */
@media (max-width: 1024px) {
  .stage { flex-direction: column; height: auto; min-height: 0; }
  .map-wrap { min-height: 62vh; flex: 0 0 auto; }
  .rail {
    width: 100%;
    flex: 0 0 auto;
    max-height: 40vh;
    min-height: 260px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .tb-metrics { gap: 18px; }
  .tb-v { font-size: 22px; }
  .tb-k { font-size: 10px; }
  .bell-lockup-name { font-size: 36px; }
}

/* Tablet portrait + phones landscape */
@media (max-width: 768px) {
  .topbar-row--primary { padding: 0 12px; gap: 10px; flex-wrap: wrap; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 11px; }
  .brand-title { font-size: 14px; }
  .brand-sub { font-size: 10px; letter-spacing: 1px; }
  /* Hide the wide metrics row on phones — LIVE + clock + toggles still visible */
  .tb-metrics { display: none; }
  .topbar-meta { gap: 6px; flex-wrap: wrap; }
  .demo-link, .audit-toggle { padding: 4px 10px; font-size: 10px; }
  .meta-pill { font-size: 10px; padding: 4px 8px; }
  .map-wrap { min-height: 58vh; }
  .rail { max-height: 42vh; }
  .rail-section { padding: 12px; }
  .news-ticker-track { font-size: 12px; gap: 24px; padding: 0 16px; }
  .news-item { gap: 8px; }
  .news-item-ticker { font-size: 10px; padding: 2px 5px; }
  .news-item-text { font-size: 13px; }
  .map-hero-title { font-size: 28px; }
  .map-hero-sub { font-size: 11px; }
  .map-legend { font-size: 10px; gap: 10px; }
  .bell-lockup { top: calc(var(--topbar-h) + 10px); }
  .bell-lockup-name { font-size: 30px; }
  .bell-lockup-verb { font-size: 18px; }
  .bell-lockup-time { font-size: 10px; letter-spacing: 0.18em; }
  .splash-footnote { flex-wrap: wrap; justify-content: center; }
}

/* Phones */
@media (max-width: 480px) {
  .splash-headline { font-size: 36px; line-height: 1.12; padding: 0 16px; }
  .splash-eyebrow { letter-spacing: 0.22em; font-size: 10px; }
  .splash-footnote { font-size: 9.5px; gap: 8px; }
  .map-hero { top: 12px; left: 14px; }
  .map-hero-title { font-size: 22px; }
  .map-legend {
    bottom: 8px; left: 12px; right: 12px;
    flex-wrap: wrap;
    font-size: 9.5px;
    gap: 8px;
  }
  .legend-sep { display: none; }
  .topbar-row--health { font-size: 10px; padding: 0 8px; }
  .bell-lockup-name { font-size: 24px; }
  .bell-lockup-verb { font-size: 15px; }
}

/* ── Light-mode specific overrides ──────────────────────────────────────
   Elements whose hardcoded values don't flip cleanly via token substitution.
   Kept in one block so future token passes have a single place to audit. */
[data-theme="light"] body::before {
  /* Dark ambient gradient disappears into paper — a much lighter warm wash */
  background-image:
    radial-gradient(ellipse 600px 400px at 0% 100%, rgba(199, 75, 40, 0.04), transparent 70%),
    radial-gradient(ellipse 500px 350px at 100% 0%, rgba(13, 156, 110, 0.025), transparent 70%);
}
[data-theme="light"] .splash-nebula,
[data-theme="light"] .splash-grid,
[data-theme="light"] .splash-beam {
  /* Decorative dark-mode atmosphere — invisible/unhelpful on paper */
  opacity: 0 !important;
}
[data-theme="light"] .map-continents path {
  fill: rgba(199, 75, 40, 0.08);
  stroke: rgba(26, 24, 21, 0.22);
}
[data-theme="light"] .map-grid line { stroke: rgba(26, 24, 21, 0.08); }
[data-theme="light"] .map-region-label { fill: rgba(26, 24, 21, 0.35); }
[data-theme="light"] .map-label { fill: rgba(26, 24, 21, 0.65); stroke: rgba(255, 255, 255, 0.85); }
[data-theme="light"] .map-hero-sub { color: rgba(26, 24, 21, 0.55); }
[data-theme="light"] .map-legend { color: rgba(26, 24, 21, 0.45); }
[data-theme="light"] .map-legend .legend-sep { color: rgba(26, 24, 21, 0.25); }
[data-theme="light"] .brand-mark {
  /* Keep white-on-salmon for brand recognition even on paper */
  color: #FFFFFF;
}
[data-theme="light"] .tb-v { color: var(--text); }
[data-theme="light"] .tb-v--green { color: var(--green); }
[data-theme="light"] .news-item-text,
[data-theme="light"] .map-hero-title {
  /* On paper these are near-dark editorial tone via --warm-white override */
  color: var(--warm-white);
}
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(26, 24, 21, 0.12); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(26, 24, 21, 0.24); }
[data-theme="light"] ::selection { background: rgba(199, 75, 40, 0.18); color: var(--text); }
/* Theme toggle button colors handled inline in its own rule via tokens */

/* ──────────────────────────────────────────────────────────────────────────
   Wave 5 · Batch 2 — Iconography (A3 reporter, A4 dingbats)
   Stage glyphs (A1) only live on the pipeline page; not included here.
   All glyphs use currentColor and inherit from theme tokens.
   ────────────────────────────────────────────────────────────────────────── */

/* A3 · Reporter marks — framed Fraunces italic monograms. Used in feed rail,
   drill modal byline, stage 7 (pipeline only). Styled generically here so
   either page's byline patterns can consume them. */
.w5-reporter-mark {
  display: inline-flex;
  width: 36px;
  height: 28px;
  color: var(--text-3);
  vertical-align: middle;
  flex: 0 0 auto;
  margin-right: 6px;
}
.w5-reporter-mark svg { display: block; width: 100%; height: 100%; }
[data-theme="light"] .w5-reporter-mark { color: var(--text-2); }

/* A4 · Regional dingbats — Fraunces italic glyphs positioned at arc apexes.
   Rendered by fleet.js map layer (wired in Batch 5 data-viz pass). */
.w5-region-dingbat {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-variation-settings: "opsz" 24;
  opacity: 0.7;
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* ──────────────────────────────────────────────────────────────────────────
   Wave 5 · Batch 3 — Typography (C3, C4 on fleet page)
   C1/C2/C5/C7 live on the pipeline page.
   ────────────────────────────────────────────────────────────────────────── */

/* C3 · Drill-modal drop cap — applied by wave5-typography.js on modal open */
.w5-dropcap {
  font-family: var(--serif);
  float: left;
  font-size: 80px;
  line-height: 0.86;
  font-weight: 700;
  font-variation-settings: "opsz" 144;
  color: var(--accent);
  padding: 6px 12px 0 0;
  font-style: italic;
}
.w5-has-dropcap { clear: both; }

/* C4 · Watermark Fraunces italic behind the news ticker */
.w5-ticker-watermark {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.w5-ticker-watermark-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--serif);
  font-style: italic;
  font-size: 220px;
  line-height: 1;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  color: var(--w5-watermark-color);
  letter-spacing: -0.03em;
  animation: w5-watermark-scroll 800s linear infinite;
}
@keyframes w5-watermark-scroll {
  0%   { transform: translate(0%, -50%); }
  100% { transform: translate(-50%, -50%); }
}
.news-ticker { position: relative; }
.news-ticker-track { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .w5-ticker-watermark-track { animation: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Wave 5 · Batch 4 — Premium signals (G1, G2, G3, G7)
   All four ship identically on fleet + pipeline pages.
   ────────────────────────────────────────────────────────────────────────── */

/* G1 · feTurbulence grain overlay — different base freq per theme */
.w5-grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: var(--w5-grain-opacity);
  mix-blend-mode: var(--w5-grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
[data-theme="light"] .w5-grain {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.94' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* G2 · Paper fibre — light mode only. SVG turbulence at lower frequency, higher octaves */
.w5-paper-fiber {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0; /* toggled on for light theme */
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='480' height='480'><filter id='p'><feTurbulence type='turbulence' baseFrequency='0.42' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.68  0 0 0 0 0.58  0 0 0 0 0.42  0 0 0 0.65 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>");
  background-size: 480px 480px;
}
[data-theme="light"] .w5-paper-fiber { opacity: 0.08; }

/* ──────────────────────────────────────────────────────────────────────────
   Wave 5 · Batch 5 — Data visualization (D3 crosshair)
   D1 Nightingale rose lives at /today.html (self-contained).
   D2 telemetry rail, D4 reporter polylines, D5 heat-grid are scaffolded
   here; actual wiring into the map + pipeline renders deferred.
   ────────────────────────────────────────────────────────────────────────── */

/* D3 · Shift-hold Bloomberg crosshair */
.w5-crosshair {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0;
  transition: opacity 160ms var(--ease-enter);
}
.w5-crosshair.is-armed { opacity: 1; }
.w5-ch-line {
  position: absolute;
  background: var(--accent);
  opacity: 0.5;
  box-shadow: 0 0 6px var(--accent-glow);
}
.w5-ch-line--h { left: 0; right: 0; height: 1px; top: 50%; }
.w5-ch-line--v { top: 0; bottom: 0; width: 1px; left: 50%; }
.w5-ch-readout {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  background: rgba(12, 12, 20, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-soft);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.w5-ch-readout--lat  { left: 18px; }
.w5-ch-readout--lng  { top: 24px; }
.w5-ch-readout--utc  { bottom: 24px; right: 24px; }
.w5-ch-readout--near { top: 24px; right: 24px; }
[data-theme="light"] .w5-ch-readout { background: rgba(255, 253, 250, 0.92); border-color: var(--accent); }

/* D2 · Pipeline telemetry rail (scaffold — consumer: pipeline page only).
   Defined here for symmetry; no-op on fleet. */
.w5-telemetry-rail {
  position: fixed;
  top: var(--topbar-h, 100px);
  left: 12px;
  width: 88px;
  bottom: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 8px 6px;
  display: none; /* opt-in via .has-w5-telemetry on root */
}
.has-w5-telemetry .w5-telemetry-rail { display: flex; flex-direction: column; gap: 6px; }

/* D5 · Stage-14 compliance heat-grid (scaffold) */
.w5-heat-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  padding: 16px 0;
}
.w5-heat-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--surface-2);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 260ms var(--ease-enter), transform 260ms var(--ease-enter);
}
.w5-heat-cell.is-in   { opacity: 1; transform: scale(1); }
.w5-heat-cell--pass   { background: var(--green-soft); }
.w5-heat-cell--warn   { background: var(--amber-soft); }
.w5-heat-cell--fail   { background: var(--red-soft); }

/* ──────────────────────────────────────────────────────────────────────────
   Wave 5 · Batch 6 — Motion (B1 curator, B2 magnetic dots, B6 elastic, B7 shimmer)
   ────────────────────────────────────────────────────────────────────────── */

/* B1 · Curator idle mode — full-viewport Fraunces pull-quote overlay */
.w5-curator {
  position: fixed; inset: 0;
  z-index: 9500;
  display: flex; justify-content: center; align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms var(--ease-enter);
  background: radial-gradient(circle at center, rgba(10,11,15,0.35), rgba(10,11,15,0));
}
.w5-curator.is-active { opacity: 1; }
.w5-curator-quote {
  max-width: 880px;
  padding: 0 48px;
  text-align: center;
}
.w5-curator-mark {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: 96px; line-height: 0.6;
  color: var(--accent); opacity: 0.75;
  font-variation-settings: "opsz" 144;
  margin-bottom: -18px;
}
.w5-curator-text {
  display: block;
  font-family: var(--serif); font-style: italic;
  font-size: 64px; line-height: 1.14;
  font-variation-settings: "opsz" 96;
  font-weight: 500; letter-spacing: -0.012em;
  color: var(--w5-pullquote-color);
}
.w5-curator-attr {
  display: block; margin-top: 36px;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--w5-issue-meta);
}
/* Map slow-orbits during curator mode. 90° sweep over 120s, cosmetic only. */
.w5-curator-active .map-svg {
  animation: w5-curator-orbit 120s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes w5-curator-orbit {
  0%   { filter: hue-rotate(0deg) saturate(0.88); }
  50%  { filter: hue-rotate(6deg)  saturate(0.8); }
  100% { filter: hue-rotate(0deg) saturate(0.88); }
}
@media (prefers-reduced-motion: reduce) {
  .w5-curator { display: none !important; }
  .w5-curator-active .map-svg { animation: none; }
}

/* B6 · Elastic modal close/open */
.drill-modal.w5-elastic-opening,
.stage-modal.w5-elastic-opening,
.avatar-modal.w5-elastic-opening {
  animation: w5-elastic-in 240ms cubic-bezier(.2, 1.4, .3, 1);
}
.drill-modal.w5-elastic-closing,
.stage-modal.w5-elastic-closing,
.avatar-modal.w5-elastic-closing {
  animation: w5-elastic-out 280ms cubic-bezier(.5, 1.8, .55, .95);
}
@keyframes w5-elastic-in {
  0%   { transform: scale(0.96) translateY(8px); opacity: 0; }
  70%  { transform: scale(1.02) translateY(-2px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes w5-elastic-out {
  0%   { transform: scale(1) translateY(0); opacity: 1; }
  30%  { transform: scale(1.01) translateY(-4px); }
  100% { transform: scale(0.92) translateY(8px); opacity: 0; }
}

/* B7 · Metric shimmer — chromatic aberration on digit change */
.w5-shimmer {
  position: relative;
  animation: w5-shimmer-ca 140ms linear;
}
@keyframes w5-shimmer-ca {
  0%   { text-shadow: 0 0 0 transparent; color: inherit; }
  50%  { text-shadow: -0.5px 0 0 rgba(255, 122, 89, 0.7), 0.5px 0 0 rgba(74, 158, 255, 0.6); }
  100% { text-shadow: 0 0 0 transparent; color: inherit; }
}
[data-theme="light"] .w5-shimmer {
  animation-name: w5-shimmer-ca-light;
}
@keyframes w5-shimmer-ca-light {
  0%   { text-shadow: 0 0 0 transparent; }
  50%  { text-shadow: -0.5px 0 0 rgba(199, 75, 40, 0.65), 0.5px 0 0 rgba(37, 99, 235, 0.55); }
  100% { text-shadow: 0 0 0 transparent; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Wave 5 · Batch 8 — Wow moments (F1 ceremony, F1b minor flash, F3 cold open)
   ────────────────────────────────────────────────────────────────────────── */

/* F1 · Market Open Ceremony — full-screen 3.2s scrim + 180pt masthead */
.w5-ceremony {
  position: fixed; inset: 0; z-index: 9900;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--ease-enter);
}
.w5-ceremony.is-active { opacity: 1; }
.w5-ceremony-scrim {
  position: absolute; inset: 0;
  background: var(--w5-ceremony-scrim);
  backdrop-filter: blur(6px);
  transition: backdrop-filter 500ms;
}
.w5-ceremony-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 0 48px; text-align: center;
}
.w5-ceremony-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 24px;
}
.w5-ceremony-masthead {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(80px, 14vw, 180px);
  font-variation-settings: "opsz" 144;
  line-height: 0.95;
  letter-spacing: -0.028em;
  color: var(--text);
  max-width: 1200px;
}
.w5-ceremony-sub {
  margin-top: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-variation-settings: "opsz" 36;
  color: var(--text-2);
  max-width: 640px;
}
.w5-ceremony.is-reduced .w5-ceremony-masthead { font-size: clamp(48px, 8vw, 96px); }
@media (prefers-reduced-motion: reduce) {
  .w5-ceremony { transition: opacity 200ms linear; }
}

/* F1b · Minor bell flash — compact top-right lockup, 700ms */
.w5-bell-flash {
  position: fixed;
  top: calc(var(--topbar-h, 100px) + 24px);
  right: 24px;
  z-index: 9850;
  font-family: var(--serif);
  font-size: 60px;
  font-weight: 600;
  font-variation-settings: "opsz" 96;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 260ms var(--ease-enter), transform 260ms var(--ease-enter);
  pointer-events: none;
}
.w5-bell-flash.is-active {
  opacity: 0.95;
  transform: translateY(0) scale(1);
}
.w5-bell-flash-label { display: block; }

/* F3 · Letter-flight cold open — per-letter flight path + variable-font land */
.w5-lf-letter {
  display: inline-block;
  opacity: 0;
  font-variation-settings: "opsz" 9, "wght" 400;
  transform: translate(
    calc(var(--w5-lf-from-x, 0px) - 50vw),
    calc(var(--w5-lf-from-y, 0px) - 50vh)
  ) scale(0.6);
  filter: blur(6px);
  transition:
    opacity 720ms cubic-bezier(.22, .94, .3, 1) var(--w5-lf-delay, 0ms),
    transform 820ms cubic-bezier(.18, .9, .25, 1.05) var(--w5-lf-delay, 0ms),
    filter 520ms cubic-bezier(.22, .94, .3, 1) var(--w5-lf-delay, 0ms),
    font-variation-settings 720ms cubic-bezier(.22, .94, .3, 1) var(--w5-lf-delay, 0ms);
}
.splash-headline-line--accent .w5-lf-letter.w5-lf-flying {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  filter: blur(0);
  font-variation-settings: "opsz" 144, "wght" 700;
}
@media (prefers-reduced-motion: reduce) {
  .w5-lf-letter {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    font-variation-settings: "opsz" 144, "wght" 700;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Wave 5 · Batch 9 — Precision pass (G5) + editorial byline (G6)
   Global opentype features, tightened display letter-spacing, refined
   shadow opacities. Individually invisible; collectively the difference
   between polished and expensive.
   ────────────────────────────────────────────────────────────────────────── */

/* G5 · Global OpenType features — kerning, ligatures, contextual alternates */
html, body, button, input, select, textarea {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* G5 · Display-scale letter-spacing refinement */
.splash-headline-line,
.w5-ceremony-masthead,
.map-hero-title,
.w5-pullquote-text,
.w5-curator-text {
  letter-spacing: -0.012em;
  font-kerning: normal;
}

/* G6 · Editorial byline — applied to any pull-quote attribution slot */
.w5-byline {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--w5-issue-meta);
}
.w5-byline-reporter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  font-variation-settings: "opsz" 24;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent-2);
}

/* ──────────────────────────────────────────────────────────────────────────
   Exchange info modal — opens on click of any exchange dot.
   Mirrors the drill-modal aesthetic: dark scrim, Fraunces masthead,
   mono eyebrow + keys, Fraunces italic locale, hairline meta grid.
   First-class in both dark and light modes via token inheritance.
   ────────────────────────────────────────────────────────────────────────── */
.exchange-modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--scrim);
  backdrop-filter: blur(10px) saturate(120%);
  z-index: 9400;
  padding: 24px;
}
.exchange-modal[hidden] { display: none; }
.exchange-modal-stage {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-bold);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-l3);
  padding: 44px 48px;
}
.exchange-modal-close {
  position: fixed;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 180ms var(--ease-enter),
              border-color 180ms var(--ease-enter),
              background 180ms var(--ease-enter);
}
.exchange-modal-close:hover {
  color: var(--text);
  border-color: var(--hairline-bold);
  background: var(--surface);
}
.em-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 18px;
}
.em-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 42px;
  font-variation-settings: "opsz" 72;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: var(--text);
}
.em-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  font-variation-settings: "opsz" 24;
  color: var(--text-2);
  margin-bottom: 28px;
}
.em-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.em-k {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-3);
  margin-bottom: 6px;
}
.em-v {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  font-variation-settings: "opsz" 36;
  color: var(--text);
}
@media (max-width: 560px) {
  .exchange-modal-stage { padding: 32px 24px; }
  .em-title { font-size: 34px; }
  .em-meta { grid-template-columns: 1fr; gap: 16px; }
}
