:root {
  --bg: #efe9da;
  --bg-alt: #e8e1ce;
  --bg-card: #f7f3e9;
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --muted: #6b6356;
  --rule: rgba(26,26,26,0.12);
  --rule-strong: rgba(26,26,26,0.25);
  --accent-race: #b73e2c;
  --accent-slow: #2a5b8f;
  --accent-fit: #4a7a3d;
  --accent-miss: #c98e2a;
  --accent-ahead: #6b6356;

  --serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(6px);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--sans);
  font-size: 13px;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-race);
  border-radius: 50%;
  margin: 0 8px 2px 0;
  vertical-align: middle;
}

.topnav {
  display: flex;
  gap: 20px;
  color: var(--muted);
  align-items: baseline;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.topnav a:hover { color: var(--ink); }

.lang-switch {
  display: inline-flex;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a.active { color: var(--ink); font-weight: 600; }
.lang-switch a:hover { color: var(--ink); }

/* ===== Layout ===== */
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 56px;
}

/* ===== Sidebar (left) ===== */
.sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 48px 0;
  font-family: var(--sans);
  font-size: 13px;
}

.sidebar h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 14px;
}

/* ---- Monthly timeline ticks ---- */
.ticks {
  margin-bottom: 24px;
  padding: 4px 0 10px;
  font-family: var(--sans);
}

.ticks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* The vertical thin guide line runs behind all dots. */
.ticks-list::before {
  content: '';
  position: absolute;
  left: 5px;   /* center of the 4px dot */
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--rule);
  pointer-events: none;
}

.tick {
  position: relative;
  min-height: 10px;   /* ~monthly row pitch */
}

.tick-link, .tick-inactive {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1px 0 1px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 11.5px;
  line-height: 1.2;
  transition: color 0.15s;
}

.tick-link:hover { color: var(--ink); }

.tick-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rule-strong);
  flex-shrink: 0;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.tick-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.9;
}

/* Major anchor ticks (known period boundaries) — bigger dot + dark text. */
.tick.is-major .tick-dot {
  width: 7px; height: 7px;
  background: var(--bg);
  border-color: var(--ink-soft);
}
.tick.is-major .tick-label {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.tick.is-future {
  margin-top: 10px;
}
.tick.is-future .tick-dot {
  background: var(--bg);
  border-color: var(--rule-strong);
  width: 5px; height: 5px;
}
.tick.is-future .tick-label {
  color: var(--muted);
}

/* "Now" marker — pulsing blue ring. */
.tick.is-now .tick-dot {
  background: var(--accent-slow);
  border-color: var(--accent-slow);
  box-shadow: 0 0 0 3px rgba(42,91,143,0.18);
  animation: tick-pulse 2s infinite;
}
.tick.is-now .tick-label {
  color: var(--accent-slow);
  font-weight: 600;
}
@keyframes tick-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(42,91,143,0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(42,91,143,0.06); }
}

/* Active scroll state — highlighted via JS by adding .is-active to the tick. */
.tick.is-active .tick-dot {
  background: var(--accent-race);
  border-color: var(--accent-race);
  transform: scale(1.25);
}
.tick.is-active .tick-label {
  color: var(--ink);
  font-weight: 500;
}

/* Folded TOC — preserved below ticks but compressed by default-open <details>. */
.toc-fold {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12.5px;
}
.toc-fold > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 4px 0;
  user-select: none;
}
.toc-fold > summary::-webkit-details-marker { display: none; }
.toc-fold > summary::after {
  content: '−';
  float: right;
  font-family: var(--mono);
  color: var(--muted);
}
.toc-fold:not([open]) > summary::after { content: '+'; }

.toc { list-style: none; padding: 0; margin: 0 0 32px; }
.toc li { margin-bottom: 9px; }
.toc a {
  color: var(--ink-soft);
  text-decoration: none;
  display: block;
  padding: 2px 0 2px 12px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  line-height: 1.45;
}
.toc a:hover { color: var(--ink); border-left-color: var(--rule-strong); }
.toc a.active {
  color: var(--ink);
  border-left-color: var(--accent-race);
  font-weight: 500;
}

.toc .toc-meta {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Main content ===== */
main {
  padding: 48px 0 120px;
  max-width: 660px;
}

/* ===== Right side rail (dashboard + status timeline) ===== */
.rail {
  position: sticky;
  top: 64px;
  align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 32px 0;
  font-family: var(--sans);
  font-size: 11px;
}

.rail h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 16px;
}

/* ---- Animated dashboard ---- */
.dashboard {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 16px 18px;
  margin-bottom: 24px;
  overflow: hidden;
  transition: box-shadow 0.35s, border-color 0.35s;
}
.dashboard::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--rule);
  transition: background 0.35s;
}
.dashboard[data-tint="fit"]::before     { background: var(--accent-fit); }
.dashboard[data-tint="partial"]::before { background: var(--accent-miss); }
.dashboard[data-tint="miss"]::before    { background: var(--accent-race); }
.dashboard[data-tint="now"]::before     { background: var(--accent-slow); }
.dashboard[data-tint="ahead"]::before   { background: var(--muted); }

.dashboard[data-tint="now"] {
  box-shadow: 0 0 0 3px rgba(42,91,143,0.12);
  border-color: rgba(42,91,143,0.35);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.dash-period {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-weight: 600;
  transition: opacity 0.25s;
}

.dash-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0,0,0,0.04);
  color: var(--muted);
  transition: background 0.35s, color 0.35s;
}
.dash-status-pill[data-tone="fit"]     { background: rgba(74,122,61,0.12);  color: var(--accent-fit); }
.dash-status-pill[data-tone="partial"] { background: rgba(201,142,42,0.14); color: #876010; }
.dash-status-pill[data-tone="miss"]    { background: rgba(183,62,44,0.12);  color: var(--accent-race); }
.dash-status-pill[data-tone="now"]     { background: rgba(42,91,143,0.16);  color: var(--accent-slow); }
.dash-status-pill[data-tone="ahead"]   { background: rgba(107,99,86,0.12);  color: var(--ink-soft); }

.dash-capability {
  margin-bottom: 14px;
}
.dash-capability-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.dash-capability-value {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
}
.dash-capability-track {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.06);
}
.dash-capability-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-slow) 0%, color-mix(in oklab, var(--accent-slow) 75%, white) 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1), background 0.4s;
}
.dashboard[data-tint="fit"]     .dash-capability-fill { background: var(--accent-fit); }
.dashboard[data-tint="partial"] .dash-capability-fill { background: var(--accent-miss); }
.dashboard[data-tint="miss"]    .dash-capability-fill { background: var(--accent-race); }
.dashboard[data-tint="ahead"]   .dash-capability-fill { background: var(--muted); }

.dash-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-stat {
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 3px;
  animation: dash-stat-in 0.35s ease both;
}
@keyframes dash-stat-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dash-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 2px;
}
.dash-stat-value {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.rail-track {
  position: relative;
  padding-left: 16px;
  border-left: 1px solid var(--rule);
}

.rail-item {
  position: relative;
  padding: 0 0 18px 0;
  color: var(--muted);
  line-height: 1.4;
}

.rail-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--rule-strong);
}

.rail-item.fit::before { background: var(--accent-fit); border-color: var(--accent-fit); }
.rail-item.partial::before { background: var(--accent-miss); border-color: var(--accent-miss); }
.rail-item.miss::before { background: var(--accent-race); border-color: var(--accent-race); }
.rail-item.now::before {
  background: var(--accent-slow); border-color: var(--accent-slow);
  box-shadow: 0 0 0 4px rgba(42,91,143,0.18);
}
.rail-item.ahead::before { background: var(--bg); border-color: var(--rule-strong); }

.rail-item .rail-date {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1px;
}

.rail-item.now .rail-date { color: var(--accent-slow); font-weight: 600; }

/* ===== Hero ===== */
.hero { padding-top: 8px; }

.hero-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}

.hero-meta .sep { margin: 0 10px; opacity: 0.4; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--ink);
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-race);
  font-weight: 500;
}

.hero-lede {
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 580px;
}

.hero-byline {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}

.hero-byline strong {
  color: var(--ink);
  font-weight: 500;
}

/* ===== Translation notice ===== */
.tr-notice {
  background: rgba(201,142,42,0.12);
  border: 1px solid rgba(201,142,42,0.35);
  color: #876010;
  font-family: var(--sans);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 4px;
  margin: 0 0 24px;
}

/* ===== Body typography ===== */
section { margin-bottom: 56px; scroll-margin-top: 80px; }

h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 64px 0 8px;
  color: var(--ink);
}

h2 .h2-date {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-race);
  margin-bottom: 8px;
}

h2 + .h2-sub {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 28px;
}

h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  color: var(--ink);
}

p { margin: 0 0 18px; }

p strong, li strong { font-weight: 600; color: var(--ink); }

a {
  color: var(--accent-slow);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgba(42,91,143,0.4);
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--accent-slow); }

ul, ol { padding-left: 1.4em; margin: 0 0 22px; }
li { margin-bottom: 8px; }

blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent-race);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.55;
}

blockquote cite {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-alt);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}

/* ===== Comparison cards (forecast vs reality) ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0 28px;
  font-family: var(--sans);
}

.compare > div {
  padding: 18px 20px;
  border-radius: 4px;
  font-size: 14.5px;
  line-height: 1.55;
}

.compare .forecast {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-race);
}

.compare .reality {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-fit);
}

.compare .reality.partial { border-left-color: var(--accent-miss); }
.compare .reality.miss { border-left-color: var(--accent-race); }

.compare .label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.compare .forecast .label { color: var(--accent-race); }
.compare .reality .label { color: var(--accent-fit); }
.compare .reality.partial .label { color: var(--accent-miss); }
.compare .reality.miss .label { color: var(--accent-race); }

/* ===== Verdict pill ===== */
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.verdict::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.verdict.fit { background: rgba(74,122,61,0.12); color: var(--accent-fit); }
.verdict.fit::before { background: var(--accent-fit); }

.verdict.partial { background: rgba(201,142,42,0.14); color: #876010; }
.verdict.partial::before { background: var(--accent-miss); }

.verdict.miss { background: rgba(183,62,44,0.12); color: var(--accent-race); }
.verdict.miss::before { background: var(--accent-race); }

.verdict.ahead { background: rgba(107,99,86,0.12); color: var(--ink-soft); }
.verdict.ahead::before { background: var(--accent-ahead); }

/* ===== Expandable ===== */
details {
  margin: 22px 0;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 14.5px;
}

details > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

details > summary::-webkit-details-marker { display: none; }

details > summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.2s;
}

details[open] > summary { border-bottom: 1px solid var(--rule); }
details[open] > summary::after { content: '−'; }

details .details-body {
  padding: 14px 18px 18px;
  color: var(--ink-soft);
  line-height: 1.6;
}

details .details-body p:last-child { margin-bottom: 0; }

/* ===== Stat grid ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 28px 0;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.stat {
  background: var(--bg-card);
  padding: 18px 16px;
  font-family: var(--sans);
}

.stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--ink);
}

.stat-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* ===== Hero timeline visual ===== */
.timeline-hero {
  margin: 36px 0 56px;
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.timeline-hero h4 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 24px;
}

.tl-svg-wrap { position: relative; }

.legend-row {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-row span::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-row .lg-fit::before { background: var(--accent-fit); }
.legend-row .lg-partial::before { background: var(--accent-miss); }
.legend-row .lg-miss::before { background: var(--accent-race); }
.legend-row .lg-ahead::before { background: var(--accent-ahead); }
.legend-row .lg-now::before { background: var(--accent-slow); box-shadow: 0 0 0 3px rgba(42,91,143,0.2); }

/* ===== Pull quote ===== */
.pullquote {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  margin: 56px -20px;
  padding: 0 20px;
  position: relative;
}

.pullquote::before, .pullquote::after {
  display: block;
  content: '';
  width: 36px;
  height: 1px;
  background: var(--rule-strong);
  margin: 24px auto;
}

.pullquote span { color: var(--accent-race); font-style: normal; font-weight: 500; }

/* ===== Footnotes ===== */
sup.fn {
  font-family: var(--sans);
  font-size: 0.7em;
  font-weight: 500;
  color: var(--accent-slow);
  margin: 0 1px;
  cursor: help;
}

/* ===== Two endings (Race vs Slowdown) ===== */

.endings {
  margin: 80px 0 56px;
  scroll-margin-top: 80px;
}

.endings-head { margin-bottom: 28px; }

.endings-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.endings-title {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}

.endings-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  max-width: 600px;
}

.endings-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--rule);
  overflow: hidden;
}

.endings-tab {
  position: relative;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink-soft);
  transition: background 0.22s, color 0.22s, transform 0.22s;
}

.endings-tab:hover { color: var(--ink); }

.endings-tab::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: transparent;
  transition: background 0.22s;
}

.endings-tab.is-active {
  background: var(--bg);
  color: var(--ink);
  transform: translateY(-1px);
}

.endings-tab.is-race.is-active::before   { background: var(--accent-race); }
.endings-tab.is-slow.is-active::before   { background: var(--accent-slow); }
.endings-tab.is-fit.is-active::before    { background: var(--accent-fit); }

.endings-tab-label {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 4px;
  color: inherit;
}

.endings-tab.is-race .endings-tab-label      { color: var(--accent-race); }
.endings-tab.is-slow .endings-tab-label      { color: var(--accent-slow); }
.endings-tab:not(.is-active) .endings-tab-label { opacity: 0.6; }
.endings-tab.is-active .endings-tab-label    { opacity: 1; }

.endings-tab-tagline {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.endings-panels {
  position: relative;
  margin-top: 0;
  border: 1px solid var(--rule);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--bg);
  overflow: hidden;
}

.ending-panel {
  padding: 32px 28px 28px;
  animation: ending-fade 0.45s ease;
}
.ending-panel[hidden] { display: none; }

@keyframes ending-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ending-panel.is-race    { border-top: 3px solid var(--accent-race); margin-top: -1px; }
.ending-panel.is-slow    { border-top: 3px solid var(--accent-slow); margin-top: -1px; }

.ending-summary {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 26px;
  max-width: 620px;
}
.ending-summary p { margin: 0 0 14px; }
.ending-summary p:last-child { margin-bottom: 0; }

.ending-track {
  position: relative;
  margin: 24px 0 26px;
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}

.ending-event {
  position: relative;
  padding: 4px 0 16px;
  line-height: 1.5;
}

.ending-event::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--rule-strong);
}

.ending-panel.is-race .ending-event::before {
  background: var(--accent-race);
  border-color: var(--accent-race);
}
.ending-panel.is-slow .ending-event::before {
  background: var(--accent-slow);
  border-color: var(--accent-slow);
}

.ending-event-date {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 10px;
  min-width: 80px;
}

.ending-event-text {
  font-size: 14.5px;
  color: var(--ink-soft);
}

.ending-tracker {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.ending-tracker p { margin: 0; }

.ending-tracker-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

@media (max-width: 760px) {
  .endings-title { font-size: 26px; }
  .endings-tabs { grid-template-columns: 1fr; }
  .ending-panel { padding: 22px 18px; }
  .ending-event-date { display: block; margin-bottom: 2px; min-width: 0; }
}

/* ===== Daily signals ===== */
.signals {
  margin: 64px 0 56px;
  padding: 32px 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.signals-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.signals-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--ink);
}
.signals-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.signal {
  padding-left: 18px;
  border-left: 2px solid var(--rule);
  position: relative;
}
.signal::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-slow);
}
.signal-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.signal-date { color: var(--ink-soft); font-weight: 500; }
.signal-topic {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
}
.signal-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 2px 0 10px;
  color: var(--ink);
}
.signal-body {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.signal-body p { margin: 0 0 10px; }
.signal-body p:last-child { margin-bottom: 0; }
.signal-sources {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
}
.signal-sources li { display: inline; margin: 0; }
.signal-sources li::after { content: ' · '; color: var(--rule-strong); }
.signal-sources li:last-child::after { content: ''; }
.signal-sources a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-strong); }
.signal-sources a:hover { color: var(--ink); }
.signal-affects {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.signal-affects a { color: var(--muted); }
.signal-affects a:hover { color: var(--accent-slow); }

@media (max-width: 760px) {
  .signals { padding: 22px 18px; }
  .signals-title { font-size: 20px; }
  .signal-title { font-size: 16px; }
  .signal-body { font-size: 14.5px; }
}

/* ===== Footer ===== */
.foot {
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.foot a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-strong); }
.foot a:hover { color: var(--ink); }

.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

.foot-grid h5 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 0 0 10px;
}

.foot-version {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

/* ===== SPA navigation overlay ===== */

.spa-spinner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0, var(--accent-slow) 50%, transparent 100%);
  background-size: 200% 100%;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.spa-spinner.visible {
  opacity: 1;
  animation: spa-shimmer 1s linear infinite;
}
@keyframes spa-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.spa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: 90vw;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 13px;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.2,0.8,0.3,1), opacity 0.25s;
  z-index: 9998;
}
.spa-toast.visible {
  opacity: 0.96;
  transform: translateX(-50%) translateY(0);
}

/* Smooth cross-fade on main content swaps */
main, aside.rail, aside.sidebar {
  animation: spa-fadein 0.35s ease;
}
@keyframes spa-fadein {
  from { opacity: 0.1; transform: translateY(4px); }
  to   { opacity: 1;   transform: translateY(0);   }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .rail { display: none; }
}

@media (max-width: 760px) {
  .layout { padding: 0 20px; }
  .topbar-inner { padding: 12px 20px; }
  .topnav { display: none; }
  .hero h1 { font-size: 38px; }
  .hero-lede { font-size: 18px; }
  h2 { font-size: 26px; }
  h3 { font-size: 19px; }
  body { font-size: 17px; }
  .compare { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .pullquote { font-size: 22px; margin: 40px 0; }
  main { padding: 24px 0 80px; }
}
