@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-normal-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-normal-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-italic-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-italic-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-400-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-600-latin-ext.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-600-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF, U+FFFD;
}

:root {
  --bg: #080b12;
  --bg-2: #0d121d;
  --surface: #121826;
  --surface-2: #171f31;
  --ink: #f3efe6;
  --muted: #a2adbf;
  --dim: #738096;
  --line: rgba(243, 239, 230, 0.11);
  --line-strong: rgba(243, 239, 230, 0.22);

  /* Signature physics palette */
  --core: #f4b942;        /* PREM straight & core gold */
  --core-ink: #110d04;
  --brach: #2dd4bf;       /* Brachistochrone emerald teal */
  --textbook: #60a5fa;    /* Uniform 42m12s textbook blue */
  --coriolis: #fb7185;    /* Coriolis drift coral */
  --pressure: #e879f9;    /* Core pressure curve */
  --ocean: #38bdf8;
  --ocean-deep: #0b1930;
  --land-fill: #242d3d;
  --land-anti: #34d399;

  --accent: var(--core);
  --nav-bg: rgba(8, 11, 18, 0.86);
  --nav-ink: #f3efe6;
  --nav-muted: #98a4b8;
  --nav-h: 48px;
  --col: 1120px;
  --prose: 68ch;

  --to-top-bg: #171f31;
  --to-top-fg: #f3efe6;

  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.48);
  --r: 12px;
  --r-sm: 8px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="light"] {
  --bg: #f6f2e9;
  --bg-2: #ede7da;
  --surface: #fffdf8;
  --surface-2: #f3eee2;
  --ink: #151820;
  --muted: #4b5565;
  --dim: #667082;
  --line: rgba(21, 24, 32, 0.12);
  --line-strong: rgba(21, 24, 32, 0.26);

  --core: #b45309;
  --core-ink: #ffffff;
  --brach: #0f766e;
  --textbook: #1d4ed8;
  --coriolis: #be123c;
  --pressure: #7e22ce;
  --ocean: #0369a1;
  --ocean-deep: #dbeafe;
  --land-fill: #d8d1c2;
  --land-anti: #059669;

  --accent: var(--core);
  --nav-bg: rgba(246, 242, 233, 0.90);
  --nav-ink: #151820;
  --nav-muted: #4b5565;
  --to-top-bg: #151820;
  --to-top-fg: #f6f2e9;
  --shadow-lg: 0 20px 50px rgba(21, 24, 32, 0.10);
}

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background: var(--bg);
}
html[data-theme="light"] { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
a:hover { opacity: 0.88; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button, input, select {
  font: inherit;
  color: inherit;
}

.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;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: var(--core-ink);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------------- Top navigation bar (standard site bar) ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  padding-top: var(--browser-safe-top, env(safe-area-inset-top, 0px));
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-nav-in {
  max-width: var(--col);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--nav-ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--core);
  box-shadow: 0 0 10px var(--core);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover {
  color: var(--nav-ink);
  background: var(--surface-2);
}
.lang-pill {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--nav-ink);
  text-decoration: none;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--nav-ink);
  cursor: pointer;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn svg[hidden] { display: none; }

/* ---------------- Layout & Hero ---------------- */
.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  padding: 22px 0 18px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--core);
  margin: 0 0 8px;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.1vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  max-width: 24ch;
}
.standfirst {
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 18px;
}

/* Interactive Workbench Grid (Above the fold at 1440x900) */
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.stage-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.stage-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.leg-sw {
  width: 11px;
  height: 3px;
  border-radius: 2px;
}
.leg-sw.diam { background: var(--core); height: 4px; }
.leg-sw.straight { background: var(--textbook); }
.leg-sw.brach { background: var(--brach); }
.leg-sw.unif { background: var(--muted); opacity: 0.65; }

.stage-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11.4;
  min-height: 340px;
  background: radial-gradient(circle at 50% 52%, rgba(244, 185, 66, 0.08), transparent 64%);
}
.stage-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stage-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 92px;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--core);
  background: var(--core);
  color: var(--core-ink);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.btn-play:hover { filter: brightness(1.06); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); }

.scrub-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}
.scrub-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--core);
  cursor: pointer;
  min-width: 0;
}
.mono-clock {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  min-width: 68px;
  text-align: right;
}

/* Control & Live Verdict Panel */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.14s;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip.active {
  background: var(--core);
  border-color: var(--core);
  color: var(--core-ink);
  font-weight: 600;
}

.route-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.field input[type="text"],
.field input[type="search"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink);
  font-size: 14px;
}
.field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ac-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  margin-top: 4px;
  max-height: 230px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.ac-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.sel { background: var(--surface-2); }
.ac-sub {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.verdict-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px;
}
.verdict-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.verdict-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0 0 6px;
}
.verdict-lead {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}
.race-bars {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.rbar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  font-size: 13px;
}
.rbar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}
.rbar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.28s ease;
}
.rbar-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.t-cell {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.t-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.t-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 2px;
}

.share-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.share-strip .btn-share {
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.share-strip .btn-share:hover { border-color: var(--accent); }

/* ---------------- Narrative & Analytical Sections ---------------- */
.band {
  padding: 46px 0 18px;
  border-top: 1px solid var(--line);
  margin-top: 34px;
}
.section-kicker {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--core);
  margin: 0 0 6px;
}
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.38rem, 2.3vw, 1.9rem);
  line-height: 1.18;
  margin: 0 0 12px;
  max-width: 30ch;
}
.prose {
  max-width: var(--prose);
  color: var(--muted);
  margin: 0 0 20px;
}
.prose strong { color: var(--ink); font-weight: 600; }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  overflow: hidden;
}
.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.chart-readout {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.chart-readout strong { color: var(--ink); }

.svg-chart {
  width: 100%;
  height: auto;
  display: block;
  touch-action: pan-y;
}

.split-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.stat-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.1;
}
.stat-lbl {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 5px;
}

/* Antipode Atlas */
.atlas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 16px;
  align-items: start;
}
.map-canvas-wrap {
  position: relative;
  width: 100%;
  background: var(--bg-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.map-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
}
.atlas-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.antipode-detail {
  margin-top: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

/* Data Table */
.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.table-controls input[type="search"] {
  flex: 1;
  min-width: 210px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th, td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
  cursor: pointer;
}
td.num, th.num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
tr.row-pick { cursor: pointer; }
tr.row-pick:hover { background: var(--surface-2); }
.badge-land {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.16);
  color: var(--land-anti);
}
.badge-sea {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  background: rgba(56, 189, 248, 0.13);
  color: var(--ocean);
}

.sources-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-top: 22px;
}
.sources-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
}
.sources-box li { margin-bottom: 6px; }

/* ---------------- Reading Rail ---------------- */
.rail {
  display: none;
}
@media (min-width: 1360px) {
  .rail {
    position: fixed;
    top: 50%;
    right: max(12px, calc((100vw - var(--col)) / 2 - 54px));
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px;
  }
  .rail-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
  }
  .rail-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    background: transparent;
    transition: all 0.16s;
  }
  .rail-item.active .rail-dot,
  .rail-item:hover .rail-dot {
    border-color: var(--core);
    background: var(--core);
    transform: scale(1.22);
  }
  .rail-label {
    position: absolute;
    right: 20px;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.14s;
  }
  .rail-item:hover .rail-label,
  .rail-item:focus-visible .rail-label {
    opacity: 1;
  }
}

/* ---------------- Footer Contract ---------------- */
.site-foot {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 26px 20px 64px;
  color: var(--muted);
  font-size: 14px;
}
.site-foot-in {
  max-width: var(--col);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}
.site-foot-in a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.site-foot-in a:hover { color: var(--core); text-decoration: underline; }

/* ---------------- Responsive Breakpoints ---------------- */
@media (max-width: 980px) {
  .workbench { grid-template-columns: 1fr; }
  .atlas-grid { grid-template-columns: 1fr; }
  .split-2 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 14px; }
  .site-nav-in { padding: 0 12px; gap: 6px; }
  .nav-link { white-space: nowrap; font-size: 12px; padding: 5px 7px; }
  .nav-link.hide-sm { display: none; }
  .route-pickers { grid-template-columns: 1fr; }
  .stage-canvas-wrap { aspect-ratio: 4 / 3.35; min-height: 270px; }
  .stage-controls { flex-wrap: wrap; }
  .scrub-wrap { width: 100%; order: 3; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-box { padding: 10px 11px; }
  h1 { font-size: 1.62rem; }
}
@media (max-width: 390px) {
  .site-nav-in { padding: 0 10px; gap: 4px; }
  .brand { font-size: 13px; gap: 6px; }
  .nav-right { gap: 4px; }
  .nav-link { font-size: 11.5px; padding: 4px 5px; }
  .lang-pill { font-size: 11px; padding: 4px 6px; }
  .icon-btn { width: 30px; height: 30px; }
}
@media (max-width: 360px) {
  .stat-row { grid-template-columns: 1fr; }
  .telemetry-grid { grid-template-columns: 1fr; }
}
