/* ============================================================
   GRID — F1 Reference 2026
   Editorial / architectural / sports reference
   Cream paper · Ink black · F1 red as pencil edit
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ===== TOKENS ===== */
:root {
  /* Surfaces */
  --paper: #F0EBE0;
  --paper-2: #E8E2D2;
  --card: #FAF6EB;
  --ink: #14130E;
  --ink-2: #5C5A52;
  --ink-3: #918D80;
  --rule: #D8D2C2;
  --rule-strong: #B8B1A0;

  /* Single accent — F1 red, used surgically */
  --red: #E10600;
  --red-dark: #B30500;

  /* Highlight — like a sharpie marker */
  --hl: #F4D72E;

  /* Type families */
  --sans: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', 'Georgia', serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;

  /* Layout grid */
  --col-max: 1280px;
  --col-gutter: 24px;
  --col: calc((100% - var(--col-gutter) * 11) / 12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== BASE ===== */
html, body {
  background: var(--paper);
  color: var(--ink);
}
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
}

::selection { background: var(--ink); color: var(--paper); }

/* Subtle paper grain — barely there */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(20, 19, 14, 0.012) 0.5px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(20, 19, 14, 0.008) 0.5px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  z-index: 1;
  opacity: 0.8;
}

/* ===== UTILITIES ===== */
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; }
.mono { font-family: var(--mono); }
.section-num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); }
.label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rule { height: 1px; background: var(--rule); border: 0; }
.rule-strong { height: 1px; background: var(--ink); border: 0; }

/* ===== LAYOUT WRAPPERS ===== */
.wrap {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.section-block {
  padding: 96px 0;
  position: relative;
}
.section-block + .section-block { border-top: 1px solid var(--rule); }
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .section-block { padding: 56px 0; }
}

/* ============================================================
   NAV (cross-page)
   ============================================================ */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(240, 235, 224, 0.94);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--rule);
}
.nav-mark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-mark .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
  padding: 8px 14px;
  border-radius: 1px;
  transition: color 0.18s var(--ease);
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--red);
}

.nav-toggle { display: none; background: none; border: none; flex-direction: column; gap: 5px; padding: 6px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: 0.25s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .page-nav { padding: 12px 18px; }
  .nav-links {
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px;
    gap: 0;
    transform: translateY(-130%);
    transition: transform 0.35s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 18px; font-size: 12px; width: 100%; }
  .nav-toggle { display: flex; }
}

/* ============================================================
   PAGE HEAD (for non-home pages)
   ============================================================ */
.page-head {
  max-width: 1280px;
  margin: 0 auto;
  padding: 88px 32px 40px;
}
.page-head-grid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 56px;
}
.page-head-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.page-head-issue {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.page-head-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(56px, 9vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.page-head-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.page-head-sub {
  font-family: var(--sans);
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 640px;
}
@media (max-width: 700px) {
  .page-head { padding: 60px 20px 24px; }
}

/* ============================================================
   PAGE NEXT (bottom-of-page nav link)
   ============================================================ */
.page-next {
  max-width: 1280px;
  margin: 64px auto 0;
  padding: 0 32px;
}
.next-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--rule);
  padding: 32px 0;
  transition: padding 0.25s var(--ease);
}
.next-link:hover { padding-left: 12px; }
.next-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.next-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 44px;
  letter-spacing: -0.03em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.next-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.next-title .arrow {
  font-family: var(--mono);
  font-size: 28px;
  color: var(--red);
}
@media (max-width: 700px) { .next-title { font-size: 32px; } }

/* ============================================================
   ROUTE CARDS (on home page)
   ============================================================ */
.route-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.route-card {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 32px 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: background 0.18s var(--ease);
  min-height: 240px;
}
.route-card:hover { background: rgba(20, 19, 14, 0.03); }
.route-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--red);
}
.route-card h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.025em;
  line-height: 1;
}
.route-card h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--red);
}
.route-card p {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  flex: 1;
}
.route-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.route-cta .arrow {
  color: var(--red);
  font-size: 14px;
}
@media (max-width: 1100px) { .route-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .route-grid { grid-template-columns: 1fr; } }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  margin-top: 28px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.18s var(--ease);
}
.read-more:hover { gap: 14px; }
.read-more .arrow { color: var(--red); }

/* ============================================================
   §C — LIVE PAGE (OpenF1)
   ============================================================ */
.live-card {
  border: 1px solid var(--rule);
  background: var(--paper-tint);
  padding: 32px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.live-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}
.live-card-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 8px;
}
.live-card-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 36px;
  letter-spacing: -0.025em;
  line-height: 1;
}
.live-card-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.live-card-side { text-align: right; }
.live-card-side .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.live-card-side .v {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
}
.live-card-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.live-card-meta > div {
  border-left: 2px solid var(--rule);
  padding-left: 12px;
}
.live-card-meta .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.live-card-meta .v {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
}
.live-card-meta .v.large {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
}
@media (max-width: 800px) {
  .live-card-meta { grid-template-columns: 1fr 1fr; }
}

.live-empty {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-3);
  font-style: italic;
  padding: 32px 0;
  text-align: center;
}
.live-error {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  padding: 16px;
  border: 1px dashed var(--red);
  background: rgba(225, 6, 0, 0.04);
}

.live-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px;
  flex: 1;
}
.live-pulse {
  display: flex;
  gap: 8px;
}
.live-pulse span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: livepulse 1.4s ease-in-out infinite;
}
.live-pulse span:nth-child(2) { animation-delay: 0.2s; }
.live-pulse span:nth-child(3) { animation-delay: 0.4s; }
@keyframes livepulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.7); }
  40% { opacity: 1; transform: scale(1); }
}
.live-loading-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* Positions */
.live-positions {
  border-top: 1px solid var(--ink);
}
.live-pos-row {
  display: grid;
  grid-template-columns: 48px 36px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  transition: background 0.15s var(--ease);
}
.live-pos-row.head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
}
.live-pos-row .pos {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.live-pos-row.head .pos { font-family: var(--mono); font-size: 10px; font-weight: 400; }
.live-pos-row .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}
.live-pos-row .name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.live-pos-row .name .team {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
  display: block;
}
.live-pos-row .team-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.live-pos-row .gap {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
}
.live-pos-row.podium-1 { background: rgba(225, 6, 0, 0.04); }
.live-pos-row.podium-1 .pos { color: var(--red); font-size: 22px; }

/* Fastest lap + Weather (split) */
.live-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.live-fast-card, .live-weather-card {
  border: 1px solid var(--rule);
  padding: 24px;
  background: var(--paper-tint);
}
.live-fast-driver {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.live-fast-driver .name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.025em;
}
.live-fast-driver .num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-3);
}
.live-fast-time {
  font-family: var(--mono);
  font-size: 36px;
  color: var(--red);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.live-fast-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.live-fast-detail .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.live-fast-detail .v {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  margin-top: 2px;
}

.live-weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.live-weather-grid > div {
  border-left: 2px solid var(--rule);
  padding-left: 12px;
}
.live-weather-grid .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.live-weather-grid .v {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink);
}
.live-weather-grid .d {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
@media (max-width: 900px) {
  .live-split { grid-template-columns: 1fr; }
}

/* Race control */
.live-control {
  border: 1px solid var(--rule);
  background: var(--paper-tint);
  max-height: 480px;
  overflow-y: auto;
}
.live-control-item {
  display: grid;
  grid-template-columns: 100px 80px 1fr;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  align-items: baseline;
}
.live-control-item:last-child { border-bottom: 0; }
.live-control-item .time {
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.live-control-item .flag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  text-align: center;
  align-self: flex-start;
}
.live-control-item .flag.green { background: #2A7E2A; color: #fff; }
.live-control-item .flag.yellow { background: #F4D72E; color: var(--ink); }
.live-control-item .flag.red { background: var(--red); color: #fff; }
.live-control-item .flag.blue { background: #1F6FD0; color: #fff; }
.live-control-item .flag.chequered { background: var(--ink); color: #fff; }
.live-control-item .flag.other { background: var(--ink-3); color: var(--paper); }
.live-control-item .msg {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}

/* Meta footer of live page */
.live-meta-card {
  border: 1px solid var(--rule);
  padding: 20px 24px;
  background: var(--paper-tint);
}
.live-meta-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  align-items: center;
  gap: 24px;
}
.live-meta-row .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.live-meta-row .v {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.live-meta-row .v a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.live-refresh {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.live-refresh:hover { background: var(--red); }
.live-refresh:disabled { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 800px) {
  .live-meta-row { grid-template-columns: 1fr 1fr; }
  .live-refresh { grid-column: span 2; }
}

/* ============================================================
   HERO / COVER
   ============================================================ */
.cover {
  padding: 72px 0 96px;
  position: relative;
  z-index: 2;
}
.cover-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 48px;
}
.cover-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  line-height: 1.8;
}
.cover-meta div { display: flex; gap: 24px; }
.cover-meta span:first-child { color: var(--ink-3); width: 110px; }

.cover-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(56px, 10vw, 160px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 0;
}
.cover-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.04em;
}
.cover-title .red-dot {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  background: var(--red);
  border-radius: 50%;
  vertical-align: 0.18em;
  margin-left: 0.05em;
}

.cover-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.3;
  color: var(--ink-2);
  max-width: 720px;
  margin-top: 40px;
}

.cover-bottom {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.cover-stat .label { margin-bottom: 6px; }
.cover-stat .v {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.cover-stat .sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  margin-top: 6px;
}
@media (max-width: 720px) {
  .cover { padding: 32px 0 56px; }
  .cover-top { grid-template-columns: 1fr; align-items: start; }
  .cover-meta div { gap: 12px; }
  .cover-bottom { grid-template-columns: repeat(2, 1fr); }
  .cover-sub { font-size: 22px; margin-top: 28px; }
}

/* ============================================================
   SECTION HEADER (consistent across sections)
   ============================================================ */
.sec-head {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.sec-head .num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  padding-top: 8px;
}
.sec-head .title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.sec-head .title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.sec-head .desc {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  padding-top: 8px;
  max-width: 460px;
}
@media (max-width: 720px) {
  .sec-head {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 32px;
  }
}

/* ============================================================
   §01 — 2026 vs 2025 COMPARISON TABLE
   ============================================================ */
.compare {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.compare > div {
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
}
.compare > div:nth-child(-n+3) {
  border-bottom: 1px solid var(--ink);
}
.compare > div:nth-last-child(-n+3) {
  border-bottom: none;
}
.compare-col-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.compare-key {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.compare-key .sub {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.compare-old { color: var(--ink-2); font-size: 14px; }
.compare-new {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.compare-new .arrow {
  display: inline-block;
  margin-right: 6px;
  color: var(--red);
  font-family: var(--mono);
}
@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; }
  .compare > div { border-bottom: 1px solid var(--rule); padding: 16px 20px; }
  .compare > div:nth-child(3n+1) { border-top: 1px solid var(--ink); padding-top: 24px; }
  .compare > div:first-child { border-top: none; }
}

/* ============================================================
   §02 — ANATOMY OF A CAR (technical diagram)
   ============================================================ */
.anatomy-wrap {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 40px 32px;
  position: relative;
}
.anatomy-svg {
  width: 100%;
  height: auto;
  max-height: 480px;
  display: block;
  margin: 0 auto;
}
.anatomy-callouts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  padding: 8px;
  border-radius: 2px;
  transition: background 0.15s var(--ease);
}
.callout:hover { background: var(--paper-2); }
.callout.active { background: var(--paper-2); }
.callout.active .callout-num {
  background: var(--red);
  color: var(--paper);
  border-color: var(--red);
}
.callout-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.callout-text .name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
}
.callout-text .desc {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
  margin-top: 3px;
}
@media (max-width: 720px) {
  .anatomy-callouts { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .anatomy-wrap { padding: 24px 16px; }
}

/* ============================================================
   §03 — TEAMS TABLE
   ============================================================ */
.teams-table {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.tt-row {
  display: grid;
  grid-template-columns: 32px 24px 1fr 1.2fr 0.6fr 0.6fr 0.6fr 24px;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  cursor: pointer;
  transition: background 0.12s var(--ease);
}
.tt-row:last-child { border-bottom: none; }
.tt-row:hover { background: var(--paper-2); }
.tt-row.head {
  cursor: default;
  border-bottom: 1px solid var(--ink);
  padding: 12px 0;
}
.tt-row.head:hover { background: transparent; }
.tt-row.head > div {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* Right-align the numeric header to match its right-aligned data cell */
.tt-row.head > div:nth-child(7) { text-align: right; }
.tt-pos {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.tt-swatch {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  position: relative;
  background: var(--team-c);
}
.tt-swatch::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 2px;
}
.tt-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.tt-name .full {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.tt-drivers {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.tt-drivers .num {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 1px 5px;
  font-size: 10px;
  margin-right: 4px;
  border-radius: 2px;
}
.tt-engine, .tt-base, .tt-titles {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.tt-titles { text-align: right; }
.tt-titles strong { font-weight: 500; color: var(--ink); font-size: 14px; }
.tt-arrow {
  font-family: var(--mono);
  color: var(--ink-3);
  text-align: right;
  transition: transform 0.15s var(--ease), color 0.15s var(--ease);
}
.tt-row:hover .tt-arrow { color: var(--red); transform: translateX(3px); }

@media (max-width: 900px) {
  .tt-row {
    grid-template-columns: 18px 18px 1fr auto;
    gap: 10px;
  }
  .tt-row.head { display: none; }
  .tt-engine, .tt-base, .tt-drivers, .tt-arrow { display: none; }
  .tt-pos { font-size: 11px; }
  .tt-name { font-size: 14px; }
  .tt-swatch { width: 18px; height: 18px; }
}

/* ============================================================
   §04 — DRIVERS TABLE
   ============================================================ */
.drv-filters {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  font-family: var(--mono);
}
.drv-filter {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  background: var(--card);
  transition: all 0.12s var(--ease);
}
.drv-filter:hover { color: var(--ink); border-color: var(--ink-3); }
.drv-filter.active {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.drv-table { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.drv-row {
  display: grid;
  grid-template-columns: 32px 40px 1fr 1fr 0.6fr 0.6fr 0.6fr 24px;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  cursor: pointer;
  transition: background 0.12s var(--ease);
}
.drv-row:hover { background: var(--paper-2); }
.drv-row:last-child { border-bottom: none; }
.drv-row.head { cursor: default; border-bottom: 1px solid var(--ink); padding: 10px 0; }
.drv-row.head:hover { background: transparent; }
.drv-row.head > div {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* Right-align the numeric headers (Titles, Wins, Age) to match data alignment */
.drv-row.head > div:nth-child(5),
.drv-row.head > div:nth-child(6),
.drv-row.head > div:nth-child(7) { text-align: right; }
.drv-num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
}
.drv-flag { font-size: 18px; line-height: 1; }
.drv-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.drv-team {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.drv-team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.drv-titles, .drv-wins, .drv-age {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
}
.drv-titles strong, .drv-wins strong { font-weight: 500; color: var(--ink); font-size: 13px; }
.drv-arrow { color: var(--ink-3); font-family: var(--mono); text-align: right; transition: color 0.15s var(--ease); }
.drv-row:hover .drv-arrow { color: var(--red); }
.drv-row.champion .drv-name::after {
  content: '★';
  margin-left: 6px;
  color: var(--red);
  font-size: 11px;
  vertical-align: 3px;
}
.drv-row.rookie .drv-name::after {
  content: 'R';
  margin-left: 6px;
  font-family: var(--mono);
  background: var(--red);
  color: var(--paper);
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  vertical-align: 3px;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .drv-row { grid-template-columns: 24px 22px 1fr auto auto; gap: 10px; }
  .drv-row.head { display: none; }
  .drv-team, .drv-titles, .drv-arrow { display: none; }
  .drv-name { font-size: 13px; }
}

/* ============================================================
   §05 — CALENDAR / TRACKS
   ============================================================ */
.cal-filters {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.cal-filter {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  background: var(--card);
}
.cal-filter:hover { color: var(--ink); border-color: var(--ink-3); }
.cal-filter.active { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.cal-cell {
  padding: 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 0.15s var(--ease);
}
.cal-cell:hover { background: var(--card); }
.cal-cell .cal-round {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.cal-cell .cal-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.cal-cell .cal-track-svg {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-cell .cal-track-svg svg {
  width: 100%;
  height: 100%;
  max-width: 200px;
}
.cal-cell .cal-track-path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
}
.cal-cell:hover .cal-track-path { stroke: var(--red); }
.cal-cell .cal-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  margin-top: 12px;
  line-height: 1.2;
}
.cal-cell .cal-city {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.cal-cell .cal-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-2);
}
.cal-cell .cal-meta .lbl { color: var(--ink-3); margin-right: 4px; }
.cal-cell.sprint::before {
  content: 'SPRINT';
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--red);
  background: var(--paper);
  padding: 2px 5px;
  border: 1px solid var(--red);
}
@media (max-width: 960px) { .cal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .cal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cal-grid { grid-template-columns: 1fr; } }

/* ============================================================
   §06 — RACE WEEKEND DIAGRAM
   ============================================================ */
.weekend {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 40px 32px;
}
.weekend-days {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  position: relative;
  margin-bottom: 32px;
}
.weekend-day {
  padding: 0 16px;
  position: relative;
}
.weekend-day + .weekend-day { border-left: 1px solid var(--rule); }
.weekend-day-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.weekend-day-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.weekend-day-name em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.weekend-sessions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.weekend-session {
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: baseline;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.weekend-session:hover {
  border-color: var(--ink);
  background: var(--paper);
}
.weekend-session.active {
  border-color: var(--red);
  background: var(--card);
}
.weekend-session.active .ws-code { color: var(--red); }
.ws-code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
.ws-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
}
.ws-duration {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.weekend-detail {
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
}
.weekend-detail .label { margin-bottom: 8px; }
.weekend-detail h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.weekend-detail h4 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.weekend-detail p {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 640px;
  margin-top: 12px;
}
.weekend-detail .meta-list {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.8;
  padding-top: 4px;
}
.weekend-detail .meta-list div { display: grid; grid-template-columns: 80px 1fr; }
.weekend-detail .meta-list .k { color: var(--ink-3); }
@media (max-width: 720px) {
  .weekend { padding: 24px 16px; }
  .weekend-days { grid-template-columns: 1fr; gap: 16px; }
  .weekend-day + .weekend-day { border-left: 0; border-top: 1px solid var(--rule); padding-top: 16px; }
  .weekend-detail { grid-template-columns: 1fr; gap: 12px; }
}

/* ============================================================
   §07 — ACTIVE AERO
   ============================================================ */
.aero-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.aero-display {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 32px;
  min-height: 360px;
  position: relative;
}
.aero-modes {
  display: flex;
  gap: 0;
  border: 1px solid var(--rule);
  margin-bottom: 20px;
  background: var(--card);
}
.aero-mode {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}
.aero-mode + .aero-mode { border-left: 1px solid var(--rule); }
.aero-mode .am-name { color: var(--ink); font-weight: 500; }
.aero-mode .am-sub { color: var(--ink-3); font-size: 10px; }
.aero-mode.active { background: var(--ink); color: var(--paper); }
.aero-mode.active .am-name, .aero-mode.active .am-sub { color: var(--paper); }
.aero-info h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.aero-info h4 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.aero-info p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.aero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.aero-stats > div {
  padding: 12px 16px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.aero-stats > div:nth-child(2n) { border-right: 0; }
.aero-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
.aero-stats .label { font-size: 9px; }
.aero-stats .v {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.aero-stats .delta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.aero-stats .delta.gain { color: var(--red); }
@media (max-width: 900px) {
  .aero-wrap { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================================
   §08 — TYRES CHART
   ============================================================ */
.tyres-chart {
  border: 1px solid var(--ink);
  background: var(--card);
}
.tyres-chart-head {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tyres-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
}
.tyres-row:last-child { border-bottom: 0; }
.tyres-row .tyre-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tyres-row .tyre-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--tyre-c);
}
.tyres-row .tyre-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.tyres-row .bar-cell { display: flex; align-items: center; gap: 12px; padding-right: 24px; }
.tyres-row .bar {
  flex: 1;
  height: 4px;
  background: var(--paper-2);
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.tyres-row .bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
  border-radius: 2px;
}
.tyres-row .bar-val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  min-width: 22px;
}
.tyres-row .tyre-use {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
@media (max-width: 720px) {
  .tyres-chart-head { display: none; }
  .tyres-row {
    grid-template-columns: 90px 1fr 1fr;
    padding: 12px 14px;
    gap: 8px;
  }
  .tyres-row .tyre-use { grid-column: 1 / -1; padding-top: 4px; color: var(--ink-3); font-size: 10px; }
  .tyres-row .bar-cell { padding-right: 0; }
}

/* ============================================================
   §09 — STRATEGY SIMULATOR
   ============================================================ */
.strat {
  border: 1px solid var(--rule);
  background: var(--card);
  padding: 32px;
}
.strat-intro { margin-bottom: 24px; }
.strat-intro h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.strat-intro p {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 600px;
}
.strat-stints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.strat-stint {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 14px 16px;
}
.strat-stint .label { margin-bottom: 8px; }
.strat-stint select {
  width: 100%;
  padding: 6px 8px;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--card);
  border: 1px solid var(--rule);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.strat-stint .stint-laps {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.strat-stint .stint-laps .unit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 4px;
  letter-spacing: 0.04em;
}
.strat-stint input[type="range"] {
  width: 100%;
  margin-top: 10px;
  appearance: none;
  background: transparent;
}
.strat-stint input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--rule-strong);
}
.strat-stint input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--rule-strong);
}
.strat-stint input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
  margin-top: -6px;
  cursor: pointer;
}
.strat-stint input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  border: 0;
}
.strat-bar {
  height: 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  margin-bottom: 24px;
  overflow: hidden;
}
.strat-bar-seg {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.strat-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
}
.strat-result > div {
  padding: 16px;
  border-right: 1px solid var(--rule);
}
.strat-result > div:last-child { border-right: 0; }
.strat-result .label { margin-bottom: 6px; }
.strat-result .v {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.strat-result .v.warning { color: var(--red); }
@media (max-width: 720px) {
  .strat { padding: 20px 16px; }
  .strat-stints { grid-template-columns: 1fr; }
  .strat-result { grid-template-columns: 1fr; }
  .strat-result > div { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* ============================================================
   §10 — PIT STOP REACTION
   ============================================================ */
.pit {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.pit-stage {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 32px;
  position: relative;
}
.pit-car-svg { width: 100%; max-width: 480px; margin: 0 auto; display: block; }
.pit-side h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.pit-side p {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 24px;
}
.pit-meters {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.pit-meters > div {
  padding: 16px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pit-meters > div:nth-child(2n) { border-right: 0; }
.pit-meters > div:nth-last-child(-n+2) { border-bottom: 0; }
.pit-meters .label { margin-bottom: 6px; font-size: 9px; }
.pit-meters .v {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pit-meters .v.red { color: var(--red); }
.pit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  border: 1px solid var(--ink);
  transition: all 0.15s var(--ease);
}
.pit-btn:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
.pit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pit-status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 12px;
  text-align: center;
  letter-spacing: 0.02em;
  min-height: 18px;
}
.pit-status.win { color: var(--red); }
.pit-status.meh { color: var(--ink-2); }
.pit-status.bad { color: var(--ink-3); }

.wheel-target circle {
  transition: fill 0.1s var(--ease);
  cursor: pointer;
}
.wheel-target.ready circle.indicator { fill: var(--red); }
.wheel-target.done circle.indicator { fill: var(--ink); }

@media (max-width: 900px) { .pit { grid-template-columns: 1fr; } }

/* ============================================================
   §11 — FLAGS REFERENCE
   ============================================================ */
.flags-ref {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.flag-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flag-swatch {
  width: 100%;
  height: 56px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.flag-cell .flag-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.flag-cell .flag-desc {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
}
@media (max-width: 720px) { .flags-ref { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   §12 — STANDINGS
   ============================================================ */
.standings-list {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.st-row {
  display: grid;
  grid-template-columns: 30px 1fr 90px 1.5fr 60px;
  gap: 16px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  cursor: pointer;
  transition: background 0.12s var(--ease);
}
.st-row:last-child { border-bottom: 0; }
.st-row:hover { background: var(--paper-2); }
.st-row.head {
  cursor: default;
  border-bottom: 1px solid var(--ink);
  padding: 10px 8px;
}
.st-row.head:hover { background: transparent; }
.st-row.head > div {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.st-pos {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}
.st-pos.top { color: var(--red); font-weight: 500; }
.st-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.st-name .team {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 1px;
}
.st-team-stripe {
  height: 18px;
  position: relative;
  background: transparent;
}
.st-team-stripe .st-fill {
  height: 100%;
  background: var(--team-c);
}
.st-pts {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.st-pts .unit {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 2px;
}
.st-bar {
  height: 4px;
  background: var(--paper-2);
  position: relative;
}
.st-bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
@media (max-width: 720px) {
  .st-row { grid-template-columns: 22px 1fr 70px; }
  .st-row.head { display: none; }
  .st-team-stripe, .st-bar { display: none; }
}

/* ============================================================
   §13 — HISTORY ERAS
   ============================================================ */
.eras {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.era {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px;
  position: relative;
}
.era-range {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.era-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-top: 4px;
  margin-bottom: 12px;
  line-height: 1.1;
}
.era-name em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.era-desc {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.era-stat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.era-stat .k { color: var(--ink-3); display: block; font-size: 10px; margin-bottom: 2px; }
@media (max-width: 1100px) { .eras { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .eras { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .eras { grid-template-columns: 1fr; } }

/* ============================================================
   §00 — WHAT IS FORMULA 1 (primer)
   ============================================================ */
.primer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--rule);
}
.primer-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 28px 24px;
  position: relative;
}
.primer-cell .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 12px;
}
.primer-cell h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 10px;
}
.primer-cell h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.primer-cell p {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}
@media (max-width: 1100px) { .primer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .primer-grid { grid-template-columns: 1fr; } }

/* ============================================================
   §14 — GLOSSARY
   ============================================================ */
.gloss-search {
  width: 100%;
  max-width: 480px;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--rule);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  outline: none;
  transition: border-color 0.15s var(--ease);
}
.gloss-search:focus { border-color: var(--ink); }
.gloss-search::placeholder { color: var(--ink-3); }

.gloss-list {
  border-top: 1px solid var(--ink);
}
.gloss-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.gloss-term {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.gloss-def {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
@media (max-width: 720px) {
  .gloss-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 19, 14, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-panel {
  background: var(--paper);
  border: 1px solid var(--ink);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 36px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--rule);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { color: var(--red); border-color: var(--red); }

.detail-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 20px;
}
.detail-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.detail-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.detail-title em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.detail-badge {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 56px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--red);
}
.detail-badge .sub {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: right;
}
.detail-story {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 16px;
}
.detail-pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  border-left: 2px solid var(--red);
  padding: 4px 0 4px 16px;
  margin-bottom: 24px;
}
.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-bottom: 20px;
}
.detail-meta > div {
  padding: 12px 16px;
  border-right: 1px solid var(--rule);
}
.detail-meta > div:last-child { border-right: 0; }
.detail-meta .label { font-size: 9px; }
.detail-meta .v {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  margin-top: 4px;
}
.detail-drv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.detail-drv-item {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--rule);
  cursor: pointer;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  transition: border-color 0.15s var(--ease);
}
.detail-drv-item:hover { border-color: var(--ink); }
.detail-drv-num {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.detail-drv-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
}
.detail-drv-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

@media (max-width: 600px) {
  .modal-panel { padding: 24px 20px; }
  .detail-head { grid-template-columns: 1fr; align-items: start; }
  .detail-badge { font-size: 40px; }
  .detail-title { font-size: 28px; }
  .detail-meta { grid-template-columns: 1fr; }
  .detail-meta > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .detail-drv { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--ink);
  padding: 48px 0 32px;
  margin-top: 24px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
}
.footer-lock {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
}
.footer-lock em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.footer-lock .red-dot {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  background: var(--red);
  border-radius: 50%;
  vertical-align: 0.18em;
  margin-left: 0.05em;
}
.footer-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  text-align: right;
  line-height: 1.8;
  letter-spacing: 0.02em;
}
.footer-meta a { color: var(--ink); border-bottom: 1px solid var(--rule-strong); }
.footer-meta a:hover { color: var(--red); border-color: var(--red); }
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .footer-lock { font-size: 24px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   v3 LAYOUT FIX — class names introduced in multi-page rewrite.
   Appended last so these win over earlier conflicting rules.
   ============================================================ */

/* Self-contained sections — max-width + horizontal padding built in */
.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 32px;
  border-top: 0;
}
.section-block + .section-block { border-top: 1px solid var(--rule); }
@media (max-width: 720px) {
  .section-block { padding: 48px 20px; }
}

/* ===== COVER (home) ===== */
.cover {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 32px 32px;
}
.cover-grid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 56px;
}
.cover-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  line-height: 1.4;
}
.cover-meta span { width: auto; color: var(--ink-3); }
.cover-issue {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.cover-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(64px, 11vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 36px 0;
}
.cover-title .line { display: block; }
.cover-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cover-sub {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 56px 0;
}
.cover-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--ink);
  padding-top: 24px;
}
.cover-stats > div { display: flex; flex-direction: column; }
.cover-stats .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cover-stats .v {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(36px, 4.5vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.cover-stats .d {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-top: 8px;
}
@media (max-width: 800px) {
  .cover-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.cover-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 56px;
}
.cover-divider .rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
  border: 0;
}
.cover-divider .caret {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-3);
}

/* ===== SECTION HEADER (the new layout) ===== */
.sec-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
  align-items: end;
}
.sec-left {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}
.sec-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.sec-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
}
.sec-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.sec-lede {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 500px;
  margin: 0;
}
@media (max-width: 880px) {
  .sec-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ===== FOOTER ===== */
.page-foot {
  max-width: 1280px;
  margin: 96px auto 0;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rule);
  gap: 24px;
}
.foot-mark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 16px;
  color: var(--ink);
}
.foot-meta {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.foot-meta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .page-foot {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
  }
  .foot-meta { justify-content: flex-start; gap: 16px; }
}

/* ===== COMPARE TABLE HEAD ===== */
.compare-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 14px 24px;
  border-bottom: 1px solid var(--ink);
}

/* ===== ANATOMY (the-car) ===== */
.anatomy-card {
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  padding: 32px;
}
.anatomy-svg-wrap > svg { width: 100%; height: auto; display: block; }
.anatomy-svg-wrap { margin-bottom: 24px; }
.anatomy-callouts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}
.callout {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.callout:hover, .callout.active { background: rgba(225, 6, 0, 0.05); }
.callout-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.callout.active .callout-num { background: var(--red); color: var(--paper); border-color: var(--red); }
.callout-text .name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
}
.callout-text .desc {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.45;
}
@media (max-width: 880px) { .anatomy-callouts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .anatomy-callouts { grid-template-columns: 1fr; } }

/* ===== ACTIVE AERO ===== */
.aero-explain {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.aero-display {
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  padding: 24px;
}
.aero-display > svg { width: 100%; height: auto; display: block; }
.aero-side { display: flex; flex-direction: column; gap: 20px; }
.aero-modes { display: flex; gap: 8px; }
.aero-mode {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  color: var(--ink-2);
  transition: all 0.18s var(--ease);
  border-radius: 0;
}
.aero-mode span {
  display: block;
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0.04em;
}
.aero-mode:hover { color: var(--ink); }
.aero-mode.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.aero-mode.active span { color: rgba(240, 235, 224, 0.6); }
.aero-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.aero-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.aero-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}
.aero-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.aero-specs > div { border-left: 2px solid var(--rule); padding-left: 12px; }
.aero-specs .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.aero-specs .v {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
}
.aero-specs .d {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}
.aero-specs .d.gain { color: var(--red); }
@media (max-width: 960px) {
  .aero-explain { grid-template-columns: 1fr; }
}

/* ===== STRATEGY ===== */
.strat-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.strat-out {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}
.strat-out > div {
  border-left: 2px solid var(--rule);
  padding-left: 12px;
}
.strat-out .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.strat-out .v {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.strat-out .v.warning { color: var(--red); }

/* ===== PIT STOP ===== */
.pit-arena {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}
.pit-car {
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  padding: 24px;
}
.pit-car-svg { width: 100%; height: auto; display: block; }
.pit-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pit-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.pit-display > div {
  border-left: 2px solid var(--rule);
  padding-left: 12px;
}
.pit-display .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.pit-display .v {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink);
}
.pit-display .v.red { color: var(--red); }
.pit-verdict {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Pit stop wheel target — make rects red when ready, green when done */
.wheel-target { cursor: pointer; }
.wheel-target rect { transition: fill 0.2s var(--ease); }
.wheel-target.ready rect { fill: var(--red); }
.wheel-target.done rect { fill: #2A7E2A; }
.wheel-target:not(.ready):not(.done):hover rect { fill: #2A2520; }
@media (max-width: 880px) {
  .pit-arena { grid-template-columns: 1fr; }
}

/* ============================================================
   §02 — LATEST RESULT (home page, OpenF1-powered)
   ============================================================ */
.latest-card {
  border: 1px solid var(--rule);
  background: var(--paper-tint);
  padding: 32px;
  min-height: 200px;
}
.latest-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}
.latest-session {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.latest-session em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.latest-session .eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--red);
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 6px;
}
.latest-circuit {
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}
.latest-circuit .k {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.latest-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.podium-cell {
  border-left: 3px solid var(--ink-3);
  padding: 12px 18px;
  background: var(--paper);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s var(--ease);
}
.podium-cell:hover { transform: translateY(-2px); }
.podium-cell.p1 {
  border-left-width: 5px;
  background: linear-gradient(to right, rgba(225, 6, 0, 0.05), var(--paper) 60%);
}
.podium-pos {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.podium-pos .big {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.podium-cell.p1 .podium-pos .big { color: var(--red); font-size: 40px; }
.podium-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.podium-team {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.latest-meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.latest-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 800px) {
  .latest-head { grid-template-columns: 1fr; align-items: start; }
  .latest-circuit { text-align: left; }
  .latest-podium { grid-template-columns: 1fr; }
}
