:root {
  --black: #050509;
  --ink: #101010;
  --paper: #ffffff;
  --soft: #f4f3f0;
  --line: #dedbd4;
  --muted: #67645e;
  --orange: #ff6b00;
  --orange-dark: #c84f00;
  --green: #006f62;
  --blue: #2858ff;
  --max: 1180px;
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16, 16, 16, 0.04), 0 8px 24px rgba(16, 16, 16, 0.05);
  --shadow-raised: 0 12px 32px rgba(16, 16, 16, 0.1);
  /* Runtime team accents come from scripts/teamColours.js. */
  --tc-unknown: #c7c7c7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

.site-header {
  background: var(--black);
  color: var(--paper);
  border-bottom: 3px solid var(--orange);
}

.topbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: clamp(160px, 22vw, 238px);
  height: auto;
}

.edition {
  color: #cfcac2;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: right;
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: #cfcac2;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover {
  color: #ffffff;
}

.nav a[aria-current="page"] {
  color: #ffffff;
  border-color: var(--orange);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.breaking {
  background: var(--orange);
  color: var(--black);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.breaking .wrap {
  padding-top: 10px;
  padding-bottom: 10px;
}

.hero {
  background: var(--black);
  color: var(--paper);
  padding: clamp(36px, 6vw, 56px) 0 clamp(40px, 6vw, 60px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 32px;
  align-items: end;
}

.kicker {
  display: inline-block;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.08;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(34px, 6.5vw, 72px);
  max-width: 960px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hero p {
  color: #e6e1d8;
  font-size: clamp(16px, 2vw, 21px);
  max-width: 700px;
  margin: 14px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-card {
  border: 1px solid #35322d;
  border-top: 6px solid var(--orange);
  border-radius: 8px;
  padding: 22px;
  background: #151515;
}

.hero-card strong {
  display: block;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  margin-bottom: 12px;
}

.hero-card p {
  margin: 0;
  font-size: 16px;
  color: #f2f0eb;
}

.section {
  padding: clamp(36px, 5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.section.dark {
  background: var(--black);
  color: var(--paper);
  border-bottom: 0;
}

.section.alt {
  background: var(--soft);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.section-head h2 {
  position: relative;
  padding-left: 14px;
  font-size: clamp(24px, 3.4vw, 36px);
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.14em;
  bottom: 0.1em;
  width: 4px;
  border-radius: 2px;
  background: var(--orange);
}

.dark .section-head {
  border-color: #2b2823;
}

.section-head a,
.text-link {
  color: var(--orange-dark);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.section-head a.button {
  color: var(--black);
}

.section-head a.button.secondary {
  color: var(--ink);
}

.dark .section-head a,
.dark .text-link {
  color: var(--orange);
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
}

.lead-story {
  min-height: 360px;
  background:
    linear-gradient(130deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.18)),
    linear-gradient(45deg, #151515 0, #151515 40%, #ff6b00 40%, #ff6b00 48%, #ffffff 48%, #ffffff 52%, #242424 52%);
  color: var(--paper);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.lead-story h3 {
  font-size: clamp(30px, 5vw, 58px);
  max-width: 680px;
}

.lead-story p {
  max-width: 620px;
  color: #e7e2d9;
  font-size: 18px;
  margin: 14px 0 0;
}

.stack {
  display: grid;
  gap: 14px;
}

.story,
.stat-card,
.guide-card,
.page-card,
.notice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

a.page-card,
a.guide-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.page-card:hover,
a.guide-card:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: var(--shadow-raised);
}

.alt .story,
.alt .stat-card,
.alt .guide-card,
.alt .page-card,
.alt .notice {
  background: #fffefa;
}

.story h3,
.guide-card h3,
.page-card h3,
.notice h3 {
  font-size: 23px;
  margin-bottom: 8px;
}

.story p,
.guide-card p,
.page-card p,
.notice p,
.copy p {
  color: var(--muted);
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  border-top: 5px solid var(--orange);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-value {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  line-height: 1;
  margin-top: 10px;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table th,
.table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table th {
  background: var(--soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table tbody tr:hover td {
  background: #fbfaf6;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th.num {
  text-align: right;
}

.flag {
  display: inline-block;
  margin-right: 8px;
  font-size: 1.15em;
  line-height: 1;
  vertical-align: -0.08em;
}

.position {
  font-weight: 900;
  color: var(--orange-dark);
}

.tag {
  display: inline-block;
  background: var(--black);
  color: var(--paper);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.week-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.race-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 6px solid var(--orange);
  border-radius: 8px;
  padding: 24px;
}

.race-panel h3 {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 10px;
}

.race-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffefa;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta-value {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 900;
}

.countdown {
  background: var(--black);
  color: var(--paper);
  padding: 24px;
  border-top: 6px solid var(--orange);
  border-radius: 8px;
}

.countdown-title {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.count-box {
  border: 1px solid #34302a;
  padding: 12px;
}

.count-value {
  display: block;
  color: var(--orange);
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.count-label {
  display: block;
  color: #d8d2c9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 8px;
}

.updated {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.standings-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.page-hero {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: clamp(30px, 5vw, 48px) 0;
}

.page-hero h1 {
  color: var(--ink);
  font-size: clamp(30px, 5.4vw, 58px);
}

.page-hero p {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(15px, 1.8vw, 18px);
  margin: 10px 0 0;
}

.copy {
  max-width: 820px;
}

.copy h2 {
  font-size: 30px;
  margin: 30px 0 10px;
}

.copy p + p {
  margin-top: 14px;
}

.contact-panel {
  background: var(--black);
  color: var(--paper);
  padding: 28px;
  border-top: 6px solid var(--orange);
  border-radius: 8px;
}

.contact-panel p {
  color: #e6e1d8;
  margin: 0 0 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--black);
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 13px;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  background: #ff7d1f;
  box-shadow: 0 6px 16px rgba(255, 107, 0, 0.28);
}

.button:active {
  transform: scale(0.98);
}

.site-footer {
  background: var(--black);
  color: #d9d3ca;
  padding: 28px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand img {
  display: block;
  width: 138px;
  height: auto;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--orange);
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.stats-hero {
  background:
    linear-gradient(130deg, rgba(7, 7, 7, 0.96), rgba(7, 7, 7, 0.84)),
    linear-gradient(90deg, #070707 0%, #141414 48%, #24201d 100%);
  color: var(--paper);
  padding: clamp(32px, 5vw, 52px) 0 clamp(36px, 5vw, 56px);
  border-bottom: 3px solid var(--orange);
}

.stats-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: end;
}

.stats-hero h1 {
  font-size: clamp(32px, 5.6vw, 64px);
}

.stats-hero p {
  color: #e8e2d8;
  font-size: clamp(15px, 1.9vw, 20px);
  max-width: 700px;
  margin: 12px 0 0;
}

.data-note {
  border: 1px solid #35322d;
  border-top: 6px solid var(--orange);
  border-radius: 8px;
  background: #151515;
  padding: 20px;
}

.data-note img,
.loading-card img,
.empty-state img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-bottom: 14px;
}

.data-note strong {
  display: block;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-note p {
  color: #f3ede4;
  font-size: 15px;
  margin-top: 10px;
}

.stats-grid .stat-card,
.driver-stat-card {
  min-height: 100%;
}

.loading-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
}

.stats-error {
  margin-top: 18px;
}

.stats-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stats-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats-controls select,
.stats-controls input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.driver-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.driver-stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  border-radius: 8px;
  padding: 20px;
}

.driver-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.driver-card-head h3 {
  font-size: clamp(24px, 3vw, 34px);
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.active {
  border-color: rgba(0, 111, 98, 0.28);
  color: var(--green);
}

.last-result {
  color: var(--muted);
  margin: 10px 0 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  padding: 12px;
  min-width: 0;
}

.metric dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-transform: uppercase;
}

.metric dd {
  margin: 7px 0 0;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 28px;
  text-align: left;
}

.empty-state h3 {
  font-size: 28px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted);
  margin: 0;
}

.responsive-table {
  overflow-x: auto;
  border-radius: 8px;
}

.stats-table {
  min-width: 980px;
}

.legal-list {
  padding-left: 20px;
}

.legal-list li + li {
  margin-top: 8px;
}

.explorer-hero {
  padding-bottom: 46px;
}

.compact-note p {
  font-size: 14px;
  line-height: 1.45;
}

.stats-explorer-section {
  background: #f7f6f2;
}

.explorer-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(16, 16, 16, 0.08);
  overflow: hidden;
}

.control-bar {
  display: grid;
  grid-template-columns: minmax(145px, 0.9fr) minmax(190px, 1.2fr) minmax(120px, 0.7fr) minmax(150px, 1fr) minmax(180px, 1.15fr);
  gap: 10px;
  padding: 16px;
  background: #111;
  color: var(--paper);
  border-bottom: 3px solid var(--orange);
}

.control-bar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.control-bar span {
  color: #cac5bc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.control-bar select,
.control-bar input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #3a3630;
  border-radius: 6px;
  background: #1b1b1b;
  color: var(--paper);
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
}

.control-bar input::placeholder {
  color: #8d877e;
}

.metric-description {
  margin: 0;
  padding: 12px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.stat-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
  background: #fffefa;
  border-bottom: 1px solid var(--line);
}

.stat-summary-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  border-top: 4px solid var(--orange);
  background: var(--paper);
  padding: 13px;
}

.stat-summary-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.stat-summary-value {
  margin-top: 7px;
  color: var(--ink);
  font-size: clamp(18px, 2.2vw, 27px);
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.stat-summary-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.compact-empty {
  margin: 16px;
}

.leaderboard-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--paper);
}

.leaderboard-table {
  width: 100%;
  min-width: 1840px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--paper);
  border-color: var(--orange);
  color: var(--orange-dark);
  box-shadow: none;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.leaderboard-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #121212;
  color: #f4f1ec;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.leaderboard-table th button {
  font: inherit;
}

.leaderboard-table th.is-selected-metric,
.leaderboard-table td.is-selected-metric {
  background: #fff2e8;
  color: var(--ink);
}

.leaderboard-table th.is-selected-metric {
  color: var(--orange);
}

.leaderboard-row {
  box-shadow:
    inset 4px 0 0 var(--team-colour, var(--orange)),
    inset 5px 0 0 rgba(16, 16, 16, 0.14);
}

.leaderboard-row:hover td {
  background: #fbfaf6;
}

.leaderboard-row:hover td.is-selected-metric {
  background: #ffe8d8;
}

.leaderboard-row.is-open td {
  background: #fffaf5;
}

.rank-cell {
  width: 58px;
  color: var(--orange-dark);
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.driver-cell,
.leaderboard-table .sticky-driver {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 190px;
  max-width: 210px;
  background: var(--paper);
}

.leaderboard-table .sticky-driver {
  z-index: 3;
  background: #121212;
}

.driver-row-button {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.driver-name {
  display: block;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
}

.driver-code {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.team-cell {
  font-weight: 800;
}

.status-cell {
  color: var(--green);
  font-weight: 800;
}

.driver-detail-row[hidden] {
  display: none;
}

.driver-detail-row td {
  padding: 0;
  white-space: normal;
  background: #151515;
}

.driver-detail-panel {
  padding: 18px;
  color: var(--paper);
  border-bottom: 1px solid #2e2a24;
}

.driver-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.driver-detail-head h3 {
  font-size: 24px;
}

.status-chip {
  border: 1px solid #403b34;
  border-radius: 999px;
  color: var(--orange);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-detail-meta {
  margin: 6px 0 14px;
  color: #d7d1c7;
}

.detail-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-metric {
  min-width: 0;
  border: 1px solid #322e28;
  border-radius: 8px;
  padding: 10px;
  background: #1d1d1d;
}

.detail-metric span {
  display: block;
  color: #bdb6aa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-metric strong {
  display: block;
  margin-top: 5px;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.recent-results {
  margin-top: 14px;
  color: #d7d1c7;
}

.recent-results strong {
  display: block;
  color: var(--orange);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-results ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.recent-results p,
.recent-results li {
  margin: 4px 0 0;
  color: #d7d1c7;
}

.stats-lab-section {
  background: #f7f6f2;
}

.quick-action-grid,
.records-library-grid {
  display: grid;
  gap: 14px;
}

.quick-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-action-card,
.record-category-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.quick-action-card {
  border-top: 5px solid var(--orange);
  padding: 18px;
}

.quick-action-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-action-card strong {
  display: block;
  margin-top: 9px;
  font-size: 21px;
  line-height: 1.12;
}

.stats-cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-top: 6px solid var(--orange);
  border-radius: 8px;
  background: var(--paper);
  padding: 24px;
}

.stats-cta-panel h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.96;
}

.stats-cta-panel p {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.stats-cta-actions {
  display: grid;
  gap: 10px;
}

.records-library-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-category-card {
  padding: 18px;
}

.record-category-card h3 {
  margin: 12px 0;
  font-size: 26px;
}

.metric-link-grid {
  display: grid;
  gap: 7px;
}

.metric-link-grid a {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefa;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.metric-link-grid a:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.stats-lab-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.lab-controls,
.lab-results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  min-width: 0;
}

.lab-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: visible;
}

.lab-results {
  overflow: visible;
}

.lab-preset-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #111;
}

.lab-preset-panel button,
.clear-metrics-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.lab-preset-panel button:first-child {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--ink);
}

.clear-metrics-button {
  width: 100%;
  margin-bottom: 10px;
  background: #fffefa;
}

.lab-control-group,
.lab-control-panel {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.lab-control-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 11px;
}

.lab-control-group label {
  display: grid;
  gap: 6px;
}

.lab-control-group span,
.panel-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-control-group select,
.lab-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefa;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-title button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.panel-title strong {
  color: var(--orange-dark);
  font-size: 12px;
  white-space: nowrap;
}

.driver-picker,
.metric-picker {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.driver-picker {
  margin-top: 10px;
}

.picker-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefa;
  padding: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.picker-option input {
  flex: 0 0 auto;
  margin-top: 1px;
}

.picker-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.picker-option:has(input:checked) {
  border-color: var(--orange);
  background: #fff2e8;
}

.picker-option:has(input:disabled) {
  opacity: 0.48;
}

.control-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lab-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #111;
  color: var(--paper);
  border-bottom: 3px solid var(--orange);
}

.lab-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.small-button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}

.lab-results-head h2 {
  font-size: 32px;
}

.lab-results-head p {
  margin: 6px 0 0;
  color: #d7d1c7;
  font-size: 14px;
}

.custom-leaderboard-table {
  min-width: 1120px;
  width: 100%;
  table-layout: auto;
}

.custom-leaderboard-table.is-single-metric-table {
  min-width: 680px;
}

.custom-leaderboard-table th,
.custom-leaderboard-table td {
  max-width: 220px;
  overflow-wrap: anywhere;
}

.custom-leaderboard-table .driver-cell,
.custom-leaderboard-table .sticky-driver {
  min-width: 178px;
  max-width: 190px;
}

.metric-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.metric-sort-button:hover,
.metric-sort-button:focus-visible {
  color: var(--orange);
}

.metric-sort-button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.sort-indicator {
  border: 1px solid rgba(255, 107, 0, 0.5);
  border-radius: 999px;
  color: var(--orange);
  padding: 2px 5px;
  font-size: 10px;
  line-height: 1;
}

.coverage-inline-note {
  margin: 14px 0 0;
  color: #d7d1c7;
  font-size: 13px;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .edition {
    text-align: left;
  }

  .hero-grid,
  .lead-grid,
  .week-module,
  .standings-preview,
  .stats-hero-grid,
  .driver-stats-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid.two,
  .card-grid.four,
  .stats-controls {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .table {
    display: block;
    overflow-x: auto;
  }

  .race-meta {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-bar,
  .stat-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-control {
    grid-column: 1 / -1;
  }

  .leaderboard-table {
    min-width: 1740px;
  }

  .detail-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-action-grid,
  .records-library-grid,
  .stats-cta-panel,
  .stats-lab-shell {
    grid-template-columns: 1fr;
  }

  .lab-controls {
    grid-template-columns: 1fr;
  }

  .lab-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .lab-results-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .wrap,
  .topbar,
  .nav {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav {
    font-size: 12px;
    gap: 8px 12px;
  }

  .lead-story,
  .hero-card,
  .contact-panel,
  .data-note,
  .driver-stat-card {
    padding: 20px;
  }

  .brand-logo {
    width: 168px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .control-bar,
  .stat-summary-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .metric-description {
    padding: 11px 12px;
  }

  .stat-summary-value {
    font-size: 20px;
  }

  .leaderboard-table {
    min-width: 1620px;
    font-size: 12px;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 9px 8px;
  }

  .driver-cell,
  .leaderboard-table .sticky-driver {
    min-width: 158px;
    max-width: 168px;
  }

  .driver-detail-panel {
    padding: 14px;
  }

  .detail-metric-grid {
    grid-template-columns: 1fr;
  }

  .quick-action-card,
  .record-category-card,
  .stats-cta-panel,
  .lab-control-group,
  .lab-control-panel,
  .lab-preset-panel,
  .lab-results-head {
    padding: 12px;
  }

  .quick-action-card strong {
    font-size: 18px;
  }

  .record-category-card h3 {
    font-size: 22px;
  }

  .custom-leaderboard-table {
    min-width: 880px;
  }

  .custom-leaderboard-table.is-single-metric-table {
    min-width: 620px;
  }
}

/* Stats Lab UX repair, compact explorer layout */
.stats-explorer-v2 {
  gap: 20px;
}

.explorer-workbench {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.06);
}

.explorer-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  background: #111;
  color: var(--paper);
  border-bottom: 3px solid var(--orange);
}

.explorer-toolbar h2 {
  margin: 4px 0 4px;
  color: #fff;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.explorer-toolbar p {
  max-width: 680px;
  margin: 0;
  color: #d7d1c7;
  font-size: 14px;
}

.stats-explorer-v2 .lab-preset-panel {
  grid-column: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.stats-explorer-v2 .lab-preset-panel button,
.stats-explorer-v2 .clear-metrics-button,
.stats-explorer-v2 .panel-title button {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #fffefa;
  color: var(--ink);
  padding: 0 13px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.stats-explorer-v2 .lab-preset-panel button:first-child {
  background: var(--orange);
  border-color: var(--orange);
  color: #111;
}

.primary-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfaf6;
}

.primary-filter-grid label,
.filter-drawer label {
  display: grid;
  gap: 7px;
}

.primary-filter-grid span,
.filter-drawer summary span,
.drawer-body .panel-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-filter-grid select,
.primary-filter-grid input,
.stats-explorer-v2 .lab-search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
}

.secondary-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.filter-drawer {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.filter-drawer:last-child {
  border-right: 0;
}

.filter-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 20px;
  cursor: pointer;
  list-style: none;
}

.filter-drawer summary::-webkit-details-marker {
  display: none;
}

.filter-drawer summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--orange-dark);
  font-weight: 900;
}

.filter-drawer[open] summary::after {
  content: "−";
}

.filter-drawer summary em {
  margin-left: auto;
  color: var(--orange-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.drawer-body {
  padding: 0 20px 18px;
}

.single-metric-mode .custom-only {
  display: none;
}

.single-metric-mode .primary-filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.single-metric-mode .primary-filter-grid label:nth-child(5) {
  display: none;
}

.stats-explorer-v2 .driver-picker,
.stats-explorer-v2 .metric-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding: 2px 2px 0;
}

.stats-explorer-v2 .picker-option {
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.stats-explorer-v2 .panel-title {
  margin: 0 0 12px;
}

.stats-explorer-v2 .clear-metrics-button {
  width: auto;
  margin: 0;
}

.stats-explorer-v2 .lab-results {
  overflow: hidden;
  border-radius: 14px;
}

.stats-explorer-v2 .lab-results-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.stats-explorer-v2 .lab-results-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.stats-explorer-v2 .lab-results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stats-explorer-v2 .leaderboard-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--paper);
  scrollbar-color: var(--orange) #e6e0d6;
}

.stats-explorer-v2 .custom-leaderboard-table {
  min-width: 1260px;
  width: max-content;
  table-layout: fixed;
}

.stats-explorer-v2 .custom-leaderboard-table.is-single-metric-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.stats-explorer-v2 .custom-leaderboard-table th,
.stats-explorer-v2 .custom-leaderboard-table td {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-explorer-v2 .custom-leaderboard-table th:nth-child(1),
.stats-explorer-v2 .custom-leaderboard-table td:nth-child(1) {
  width: 64px;
}

.stats-explorer-v2 .custom-leaderboard-table .driver-cell,
.stats-explorer-v2 .custom-leaderboard-table .sticky-driver {
  min-width: 220px;
  width: 220px;
  max-width: 220px;
}

.stats-explorer-v2 .custom-leaderboard-table th:nth-child(3),
.stats-explorer-v2 .custom-leaderboard-table td:nth-child(3) {
  width: 180px;
}

.stats-explorer-v2 .custom-leaderboard-table th:nth-child(4),
.stats-explorer-v2 .custom-leaderboard-table td:nth-child(4) {
  width: 105px;
}

.stats-explorer-v2 .custom-leaderboard-table th:nth-child(n+5),
.stats-explorer-v2 .custom-leaderboard-table td:nth-child(n+5) {
  width: 145px;
}

.stats-explorer-v2 .custom-leaderboard-table.is-single-metric-table th:nth-child(n+5),
.stats-explorer-v2 .custom-leaderboard-table.is-single-metric-table td:nth-child(n+5) {
  width: 180px;
}

.stats-explorer-v2 .metric-sort-button {
  max-width: 100%;
}

.stats-explorer-v2 .sort-indicator {
  padding: 1px 6px;
  font-size: 12px;
}

@media (max-width: 1120px) {
  .explorer-toolbar {
    grid-template-columns: 1fr;
  }

  .stats-explorer-v2 .lab-preset-panel {
    justify-content: flex-start;
  }

  .primary-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .single-metric-mode .primary-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .primary-filter-grid,
  .single-metric-mode .primary-filter-grid,
  .secondary-filter-grid,
  .stats-explorer-v2 .lab-results-head {
    grid-template-columns: 1fr;
  }

  .filter-drawer {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filter-drawer:last-child {
    border-bottom: 0;
  }

  .filter-drawer summary {
    padding: 0 14px;
  }

  .drawer-body,
  .primary-filter-grid,
  .explorer-toolbar,
  .stats-explorer-v2 .lab-results-head {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stats-explorer-v2 .lab-results-actions {
    justify-content: flex-start;
  }

  .stats-explorer-v2 .custom-leaderboard-table,
  .stats-explorer-v2 .custom-leaderboard-table.is-single-metric-table {
    min-width: 760px;
    width: max-content;
  }

  .stats-explorer-v2 .custom-leaderboard-table .driver-cell,
  .stats-explorer-v2 .custom-leaderboard-table .sticky-driver {
    min-width: 170px;
    width: 170px;
    max-width: 170px;
  }
}

.records-head {
  gap: 18px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .section-actions {
    justify-content: flex-start;
  }
}

.metric-link-grid .unavailable-metric,
.record-preview-note {
  display: block;
  min-width: 0;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f7f4ec;
  color: var(--muted);
  padding: 8px 10px;
  font-size: 14px;
}

.stats-preview-notice {
  border-left: 5px solid var(--orange);
  background: #fff9eb;
  color: var(--ink);
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}

.lab-results .stats-preview-notice {
  margin-top: 16px;
}

.record-preview-list {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.record-preview-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefa;
  padding: 8px 10px;
  font-size: 14px;
}

.record-preview-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-preview-value {
  color: var(--orange);
  font-weight: 900;
}

.record-category-unavailable {
  background: #f7f4ec;
}

/* ============================================================
   ENTRANCE redesign layer: mobile-first cards, app-like tables
   ============================================================ */

.hero-card,
.race-panel,
.countdown,
.contact-panel,
.data-note,
.empty-state,
.driver-stat-card,
.quick-action-card,
.record-category-card,
.stats-cta-panel,
.lab-controls,
.lab-results,
.explorer-shell {
  border-radius: var(--radius);
}

.record-category-card,
.quick-action-card,
.stats-cta-panel {
  box-shadow: var(--shadow-card);
}

.stats-preview-notice {
  border-radius: var(--radius-sm);
}

.empty-state {
  text-align: center;
}

.empty-state img {
  margin-left: auto;
  margin-right: auto;
}

.loading-card p {
  color: var(--muted);
}

.updated {
  margin-bottom: 10px;
}

/* Team colour accents on content-table rows (standings, previews).
   Thin bar + dark hairline so very light colours (Haas) stay visible. */
.table .accent-row td:first-child {
  box-shadow:
    inset 4px 0 0 var(--team-colour, var(--tc-unknown)),
    inset 5px 0 0 rgba(16, 16, 16, 0.14);
}

/* Standings: segmented Drivers/Constructors switch.
   Desktop shows both panels side by side; mobile toggles via the control. */
.standings-tab-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented-control {
  display: none;
}

.standings-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.coverage-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12.5px;
}

@media (max-width: 860px) {
  .standings-panels {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: #e9e6df;
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 18px;
  }

  .segmented-control label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }

  #standings-tab-drivers:checked ~ .segmented-control label[for="standings-tab-drivers"],
  #standings-tab-constructors:checked ~ .segmented-control label[for="standings-tab-constructors"] {
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 1px 4px rgba(16, 16, 16, 0.16);
  }

  #standings-tab-drivers:focus-visible ~ .segmented-control label[for="standings-tab-drivers"],
  #standings-tab-constructors:focus-visible ~ .segmented-control label[for="standings-tab-constructors"] {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
  }

  #standings-tab-drivers:checked ~ .standings-panels .standings-panel-constructors,
  #standings-tab-constructors:checked ~ .standings-panels .standings-panel-drivers {
    display: none;
  }

  /* The segmented control already names the visible panel */
  .standings-panel .section-head {
    display: none;
  }
}

/* Winner team shown after the winner name (results archive) */
.winner-team {
  color: var(--muted);
  font-weight: 400;
}

.winner-team::before {
  content: "· ";
}

/* Winner line on completed calendar rounds */
.cal-winner {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

/* Records Library: compact ranked lists inside scannable cards */
.record-category-card {
  padding: 14px 16px 14px;
}

.record-category-card h3 {
  margin: 7px 0 4px;
  font-size: 19px;
}

.record-category-card .tag {
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.11em;
}

.record-preview-list {
  counter-reset: record-rank;
  gap: 0;
  margin-bottom: 8px;
}

.record-preview-list li {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 7px 2px;
  border-bottom: 1px solid #efece5;
  font-size: 13.5px;
}

.record-preview-list li::before {
  counter-increment: record-rank;
  content: counter(record-rank);
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.record-preview-list li:last-child {
  border-bottom: 0;
}

.record-preview-value {
  color: var(--orange-dark);
  font-variant-numeric: tabular-nums;
}

.metric-link-grid {
  gap: 6px;
}

.metric-link-grid a,
.metric-link-grid .unavailable-metric,
.record-preview-note {
  padding: 7px 10px;
  font-size: 13.5px;
}

.stats-preview-notice {
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.45;
}

/* Row status badge (results archive) */
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

tr.is-next .status-badge {
  border-color: rgba(255, 107, 0, 0.45);
  background: #fff2e8;
  color: var(--orange-dark);
}

tr.is-next td {
  background: #fffaf5;
}

/* ------------------------------------------------------------
   Table-to-card transform for content tables on small screens
   ------------------------------------------------------------ */
@media (max-width: 860px) {
  .table.mobile-cards {
    display: block;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .table.mobile-cards thead {
    display: none;
  }

  /* Grouped app-style list: one container, hairline-divided rows */
  .table.mobile-cards tbody {
    display: block;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }

  .table.mobile-cards tr {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas:
      "pos main end"
      "pos sub end"
      "note note note";
    align-items: center;
    column-gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid #efece5;
    min-height: 58px;
  }

  .table.mobile-cards tr:last-child {
    border-bottom: 0;
  }

  .table.mobile-cards tr.accent-row {
    box-shadow:
      inset 4px 0 0 var(--team-colour, var(--tc-unknown)),
      inset 5px 0 0 rgba(16, 16, 16, 0.14);
  }

  .table.mobile-cards td {
    display: block;
    padding: 0;
    border: 0;
  }

  /* Points unit under the number (standings-style rows) */
  .table.mobile-cards .num.cell-end::after {
    content: "PTS";
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.3;
    text-align: right;
  }

  .table.mobile-cards tbody tr:hover td {
    background: transparent;
  }

  .table.mobile-cards .cell-pos {
    grid-area: pos;
    align-self: center;
    color: var(--orange);
    font-size: 19px;
    font-weight: 900;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  .table.mobile-cards .cell-main {
    grid-area: main;
    font-weight: 800;
    font-size: 15.5px;
    line-height: 1.3;
  }

  .table.mobile-cards .cell-sub {
    grid-area: sub;
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
  }

  .table.mobile-cards .cell-end {
    grid-area: end;
    align-self: center;
    justify-self: end;
    font-weight: 900;
    font-size: 17px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .table.mobile-cards .cell-end.cell-date {
    max-width: 92px;
    white-space: normal;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.3;
  }

  .table.mobile-cards .cell-note {
    grid-area: note;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
  }

  .table.mobile-cards .cell-winner::before {
    content: "Winner · ";
    color: var(--muted);
    font-weight: 400;
  }

  .table.mobile-cards tr.is-next .cell-winner::before {
    content: "";
  }

  .table.mobile-cards .cell-status {
    display: none;
  }

  .table.mobile-cards tr.is-next .cell-status {
    display: block;
    grid-area: note;
    margin-top: 8px;
  }

  .table.mobile-cards tr.is-next {
    background: #fff7ef;
    box-shadow: inset 4px 0 0 var(--orange);
  }

  .table.mobile-cards tr.is-next td {
    background: transparent;
  }
}

/* ------------------------------------------------------------
   Stats Explorer: leaderboard becomes stacked metric cards
   ------------------------------------------------------------ */
@media (max-width: 860px) {
  .stats-explorer-v2 .leaderboard-wrap {
    overflow: visible;
    background: transparent;
    padding: 12px 14px 16px;
  }

  .stats-explorer-v2 .custom-leaderboard-table,
  .stats-explorer-v2 .custom-leaderboard-table.is-single-metric-table {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .stats-explorer-v2 .custom-leaderboard-table thead {
    display: none;
  }

  /* Grouped list of leaderboard entries. Each row promotes the
     sorted metric into its header; other metrics stack below. */
  .stats-explorer-v2 .custom-leaderboard-table tbody {
    display: block;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }

  .stats-explorer-v2 .custom-leaderboard-table tr.leaderboard-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank name key"
      "rank team key"
      "metrics metrics metrics";
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #efece5;
    box-shadow:
      inset 4px 0 0 var(--team-colour, var(--tc-unknown)),
      inset 5px 0 0 rgba(16, 16, 16, 0.14);
  }

  .stats-explorer-v2 .custom-leaderboard-table tr.leaderboard-row:last-child {
    border-bottom: 0;
  }

  .stats-explorer-v2 .custom-leaderboard-table tr.leaderboard-row:hover td {
    background: transparent;
  }

  .stats-explorer-v2 .custom-leaderboard-table td {
    display: block;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    width: auto;
  }

  /* Outrank the desktop per-column width rules (which carry an
     :nth-child in their selector) so cards size naturally */
  .stats-explorer-v2 .custom-leaderboard-table td:nth-child(n+1),
  .stats-explorer-v2 .custom-leaderboard-table.is-single-metric-table td:nth-child(n+1) {
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .stats-explorer-v2 .custom-leaderboard-table .rank-cell {
    grid-area: rank;
    align-self: center;
    width: auto;
    font-size: 16px;
    color: var(--orange);
    text-align: left;
  }

  .stats-explorer-v2 .custom-leaderboard-table .driver-cell,
  .stats-explorer-v2 .custom-leaderboard-table .sticky-driver {
    grid-area: name;
    position: static;
    min-width: 0;
    max-width: none;
    width: auto;
    background: transparent;
    font-weight: 800;
    font-size: 16px;
    line-height: 1.25;
  }

  /* No 3-letter driver code line in mobile cards */
  .stats-explorer-v2 .custom-leaderboard-table .driver-code {
    display: none;
  }

  .stats-explorer-v2 .custom-leaderboard-table .team-cell {
    grid-area: team;
    align-self: start;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stats-explorer-v2 .custom-leaderboard-table .status-cell {
    display: none;
  }

  .stats-explorer-v2 .custom-leaderboard-table .team-cell.is-placeholder,
  .stats-explorer-v2 .custom-leaderboard-table .status-cell.is-placeholder {
    display: none;
  }

  /* Stacked secondary metrics: label left, value right, hairline above */
  .stats-explorer-v2 .custom-leaderboard-table .metric-cell:not(.is-selected-metric) {
    grid-area: auto;
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-top: 1px solid #f0ede6;
    font-weight: 800;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
  }

  .stats-explorer-v2 .custom-leaderboard-table .metric-cell:not(.is-selected-metric)::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 0 1 auto;
  }

  /* Sorted metric promoted into the card header, value-first */
  .stats-explorer-v2 .custom-leaderboard-table .metric-cell.is-selected-metric {
    grid-area: key;
    align-self: center;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    background: transparent;
    color: var(--orange-dark);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    text-align: right;
    max-width: 40vw;
  }

  .stats-explorer-v2 .custom-leaderboard-table .metric-cell.is-selected-metric::before {
    content: attr(data-label);
    order: 1;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  /* Compact two-column filter controls on phones */
  .primary-filter-grid,
  .single-metric-mode .primary-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-filter-grid label:has(.lab-search) {
    grid-column: 1 / -1;
  }
}

/* ==============================================================
   ENTRANCE / MOMENTUM SYSTEM
   Scene-led art direction, shared interaction, editorial data UI
   ============================================================== */

:root {
  --black: #050509;
  --graphite: #141412;
  --graphite-2: #1d1c19;
  --ink: #171613;
  --paper: #fffdf8;
  --ivory: #f2eee5;
  --soft: #f5f1e9;
  --white: #ffffff;
  --muted: #69645c;
  --muted-dark: #a39d93;
  --line: #dcd5c9;
  --line-dark: #302e2a;
  --orange: #ff6b00;
  --orange-dark: #b9470c;
  --max: 1320px;
  --reading: 760px;
  --display: "Arial Narrow", "Roboto Condensed", Impact, Haettenschweiler, sans-serif;
  --body: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 5px;
  --radius-sm: 3px;
  --space-scene: clamp(74px, 10vw, 150px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --motion-fast: 180ms;
  --motion-base: 520ms;
  --shadow-card: 0 1px 1px rgba(12, 11, 9, 0.04), 0 16px 42px rgba(12, 11, 9, 0.06);
  --tc-unknown: #c7c7c7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--black);
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-locked { overflow: hidden; }

::selection {
  background: rgba(255, 107, 0, 0.24);
  color: var(--ink);
}

img { display: block; }
button, input, select, textarea { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 58px);
}

.scroll-progress {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.scene-pending {
  opacity: 0;
  transform: translateY(34px);
  clip-path: inset(0 0 7% 0);
}

.scene-pending.is-visible {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out), clip-path 900ms var(--ease-out);
}

body:not(.experience-ready) main { opacity: 0.985; }
body.experience-ready main { animation: page-enter 620ms var(--ease-out) both; }

@keyframes page-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header / navigation */
.site-header {
  position: sticky;
  z-index: 300;
  top: 0;
  background: var(--black);
  color: var(--white);
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  transition: box-shadow var(--motion-fast), background var(--motion-fast);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.topbar {
  max-width: var(--max);
  min-height: 64px;
  margin: 0 auto;
  padding: 13px clamp(20px, 4vw, 58px) 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: min-height var(--motion-fast), padding var(--motion-fast);
}

.is-scrolled .topbar {
  min-height: 54px;
  padding-top: 9px;
  padding-bottom: 7px;
}

.brand-logo {
  width: clamp(150px, 17vw, 208px);
  transition: width var(--motion-fast);
}

.is-scrolled .brand-logo { width: clamp(142px, 15vw, 180px); }

.edition {
  color: var(--muted-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 58px);
  display: flex;
  gap: clamp(16px, 2.2vw, 34px);
  overflow: visible;
  border-top: 1px solid #1d1c1a;
}

.nav a {
  position: relative;
  min-height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  border: 0;
  color: #aaa49a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color var(--motion-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms var(--ease-out);
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--white); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #37342f;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  width: 16px;
  height: 1px;
  display: block;
  background: currentColor;
  transition: transform 300ms var(--ease-out), opacity 200ms;
}

.nav-toggle-lines { position: relative; }
.nav-toggle-lines::before, .nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
.nav-toggle-lines::before { top: -5px; }
.nav-toggle-lines::after { top: 5px; }
.is-nav-open .nav-toggle-lines { background: transparent; }
.is-nav-open .nav-toggle-lines::before { top: 0; transform: rotate(45deg); }
.is-nav-open .nav-toggle-lines::after { top: 0; transform: rotate(-45deg); }

.nav-scrim { display: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* Shared typography / controls */
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.kicker, .eyebrow, .scene-index {
  display: inline-block;
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.scene-index {
  min-width: 34px;
  color: currentColor;
  opacity: 0.48;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--orange);
  border-radius: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
}

.button.primary, .button:not(.secondary):not(.ghost) { background: var(--orange); color: #17110c; }
.button.primary:hover, .button:not(.secondary):not(.ghost):hover { background: #ff7c20; transform: translateY(-2px); }
.button.ghost, .button.secondary { border-color: currentColor; background: transparent; color: inherit; }
.button.ghost:hover, .button.secondary:hover { background: currentColor; color: var(--black); transform: translateY(-2px); }
.button:active { transform: translateY(0); }
button:disabled, .button[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }

.direction-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.direction-link span { transition: transform 250ms var(--ease-out); }
.direction-link:hover span { transform: translate(3px, -3px); }
.direction-link.on-dark { color: var(--orange); }

/* Immersive home */
.scene { position: relative; }
.scene-hero { overflow: hidden; background: var(--black); color: var(--white); }

.home-hero {
  min-height: calc(100svh - 106px);
  display: flex;
  align-items: stretch;
}

.immersive-hero-grid {
  min-height: inherit;
  padding-top: clamp(80px, 11vh, 150px);
  padding-bottom: clamp(90px, 12vh, 160px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.45fr);
  gap: 48px;
  align-items: end;
}

.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { margin-top: 25px; font-size: clamp(72px, 11vw, 176px); line-height: 0.79; }
.hero-copy h1 span, .hero-copy h1 strong { display: block; }
.hero-copy h1 span { color: #f6f1e8; font-weight: 400; }
.hero-copy h1 strong { margin-left: clamp(0px, 8vw, 126px); color: var(--white); }
.hero-copy p { max-width: 630px; margin: 38px 0 0; color: #c5bfb5; font-size: clamp(17px, 1.7vw, 22px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

.hero-manifesto {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 22px 0 0 22px;
  border-top: 1px solid #47433d;
  border-left: 1px solid #47433d;
}
.hero-manifesto span { color: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; }
.hero-manifesto p { margin: 13px 0 0; color: #b6b0a7; font-size: 14px; }

.hero-symbol {
  --parallax-y: 0px;
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -12vw;
  width: min(70vw, 960px);
  opacity: 0.1;
  transform: translateY(calc(-50% + var(--parallax-y))) rotate(-4deg);
  pointer-events: none;
  will-change: transform;
}

.hero-symbol img { width: 100%; }
.hero-trajectory { position: absolute; z-index: 1; inset: 10% 0 auto 0; height: 60%; border-top: 1px solid rgba(255,255,255,0.08); transform: skewY(-12deg); }
.hero-trajectory::after { content: ""; position: absolute; right: 0; bottom: 0; left: 18%; height: 1px; background: var(--orange); opacity: 0.55; }

.scroll-cue {
  position: absolute;
  z-index: 4;
  right: clamp(20px, 4vw, 58px);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #aaa49a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scroll-cue i { position: relative; width: 42px; height: 1px; background: #55514b; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--orange); transform: translateX(-100%); animation: scroll-cue 1.8s var(--ease-in-out) infinite; }
@keyframes scroll-cue { 50%, 100% { transform: translateX(100%); } }

.editorial-ticker { overflow: hidden; border-block: 1px solid var(--line-dark); background: var(--graphite); color: var(--white); }
.ticker-track { width: max-content; display: flex; align-items: center; animation: ticker 34s linear infinite; }
.ticker-track > div { display: contents; }
.ticker-track a, .ticker-track span { padding: 17px 20px; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.ticker-track a { color: var(--white); }
.ticker-track span { color: var(--orange); }
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

.home-race-scene, .championship-scene, .guides-scene { padding: var(--space-scene) 0; background: var(--paper); }
.home-race-scene { background: var(--ivory); }
.scene-heading { display: grid; grid-template-columns: 0.5fr 1fr auto; gap: 32px; align-items: end; margin-bottom: clamp(42px, 6vw, 78px); }
.scene-heading > div:first-child { align-self: start; display: flex; gap: 14px; align-items: center; }
.scene-heading h2 { font-size: clamp(52px, 7.5vw, 110px); }
.scene-heading .direction-link { margin-bottom: 9px; }

.race-stage { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, 0.5fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.race-feature { position: relative; min-height: 470px; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: var(--paper); }
.race-feature::after { content: ""; position: absolute; top: 0; right: -12%; width: 50%; height: 100%; border-left: 1px solid var(--line); transform: skewX(-18deg); pointer-events: none; }
.race-feature-number { color: var(--orange-dark); font-size: 11px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.race-feature-copy { position: relative; z-index: 1; max-width: 780px; }
.race-feature-copy h3 { margin-top: 17px; font-size: clamp(48px, 7vw, 98px); }
.race-feature-copy p { max-width: 520px; margin: 20px 0 0; color: var(--muted); }
.race-facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.race-facts > div { padding: 18px 20px 0 0; }
.race-facts span, .command-race-facts span { display: block; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.race-facts strong, .command-race-facts strong { display: block; margin-top: 5px; font-size: 14px; }

.countdown-stage { padding: clamp(28px, 4vw, 48px); background: var(--black); color: var(--white); }
.countdown-stage .countdown-grid { height: calc(100% - 24px); margin-top: 24px; display: grid; grid-template-columns: 1fr; gap: 0; }
.countdown-stage .countdown-grid > div { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line-dark); }
.countdown-stage .countdown-grid span { color: var(--orange); font-family: var(--display); font-size: clamp(48px, 5vw, 72px); font-weight: 900; line-height: 0.8; }
.countdown-stage small { color: var(--muted-dark); font-size: 9px; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }

.home-discovery-scene { padding: var(--space-scene) 0; background: var(--black); color: var(--white); }
.discovery-layout { display: grid; grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr); gap: clamp(50px, 9vw, 140px); align-items: start; }
.discovery-sticky { position: sticky; top: 150px; }
.discovery-sticky h2 { margin-top: 24px; font-size: clamp(56px, 7vw, 102px); }
.discovery-sticky p { max-width: 400px; margin: 28px 0 0; color: var(--muted-dark); }
.destination-rail, .command-links { border-top: 1px solid var(--line-dark); }
.destination-rail a, .command-links a { display: grid; grid-template-columns: 36px minmax(150px, 0.8fr) minmax(150px, 1fr) auto; gap: 18px; align-items: center; min-height: 104px; padding: 12px 4px; border-bottom: 1px solid var(--line-dark); transition: padding 350ms var(--ease-out), background 250ms; }
.destination-rail a:hover, .command-links a:hover { padding-inline: 15px; background: #11110f; }
.destination-rail a > span, .command-links a > span { color: var(--orange); font-size: 10px; font-weight: 900; }
.destination-rail strong, .command-links strong { font-family: var(--display); font-size: clamp(29px, 3.3vw, 48px); line-height: 1; letter-spacing: -0.02em; }
.destination-rail em, .command-links em { color: var(--muted-dark); font-size: 13px; font-style: normal; }
.destination-rail b, .command-links b { color: var(--orange); font-weight: 400; transition: transform 250ms var(--ease-out); }
.destination-rail a:hover b, .command-links a:hover b { transform: translateX(4px); }

.compact-heading { margin-bottom: 40px; }
.championship-scene { background: var(--paper); }
.editorial-standings { gap: 1px; border: 1px solid var(--line); background: var(--line); }
.editorial-standings .table { border: 0; border-radius: 0; box-shadow: none; }
.updated { margin-bottom: 13px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }

.result-scene { padding: var(--space-scene) 0; overflow: hidden; background: var(--graphite); color: var(--white); }
.result-scene::before { content: ""; position: absolute; top: 25%; right: -15%; width: 60%; height: 1px; background: var(--orange); transform: rotate(-13deg); opacity: 0.45; }
.result-scene-grid { position: relative; display: grid; grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr); gap: clamp(50px, 8vw, 130px); align-items: start; }
.result-intro h2 { margin: 23px 0 38px; font-size: clamp(52px, 7vw, 98px); }
.podium-stage { display: grid; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.podium-stage .stat-card { position: relative; min-height: 150px; padding: 25px 30px 25px 54px; border: 0; border-radius: 0; background: var(--black); color: var(--white); box-shadow: inset 3px 0 0 var(--team-colour, var(--orange)); }
.podium-stage .stat-label { color: var(--muted-dark); }
.podium-stage .stat-value { margin-top: 14px; font-size: clamp(28px, 4vw, 52px); }
.podium-stage p { color: var(--muted-dark); }

.guides-editorial { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: clamp(50px, 8vw, 120px); }
.featured-guide { min-height: 560px; padding: clamp(32px, 5vw, 62px); display: flex; flex-direction: column; justify-content: flex-end; border-left: 3px solid var(--orange); background: var(--ivory); }
.featured-guide h2 { max-width: 760px; margin: 24px 0; font-size: clamp(52px, 7vw, 96px); }
.featured-guide p { max-width: 560px; color: var(--muted); }
.featured-guide .direction-link { align-self: flex-start; margin-top: 38px; }
.guide-index { border-top: 1px solid var(--line); }
.guide-index a { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--line); transition: padding 300ms var(--ease-out); }
.guide-index a:hover { padding-left: 10px; }
.guide-index span { color: var(--orange-dark); font-size: 10px; font-weight: 900; }
.guide-index strong { font-family: var(--display); font-size: 23px; line-height: 1; }
.guide-index em { grid-column: 2; color: var(--muted); font-size: 12px; font-style: normal; }

.stats-product-scene, .f1-stats-spotlight { padding: var(--space-scene) 0; overflow: hidden; background: var(--black); color: var(--white); }
.stats-symbol { --parallax-y: 0px; position: absolute; top: 50%; right: -10vw; width: min(62vw, 830px); opacity: 0.08; transform: translateY(calc(-50% + var(--parallax-y))) rotate(5deg); pointer-events: none; will-change: transform; }
.stats-symbol img { width: 100%; }
.stats-product-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: clamp(50px, 8vw, 120px); align-items: end; }
.stats-product-copy h2 { max-width: 850px; margin-top: 24px; font-size: clamp(58px, 8vw, 116px); }
.stats-product-copy p { max-width: 620px; margin: 30px 0 0; color: var(--muted-dark); font-size: 18px; }
.stats-product-preview { display: grid; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.stats-product-preview .stat-summary-card, .stats-product-preview .stat-card { min-height: 120px; padding: 24px; border: 0; border-radius: 0; background: var(--graphite); color: var(--white); }
.stats-product-preview .stat-summary-value { color: var(--orange); font-family: var(--display); font-size: 36px; }
.stats-product-preview p { color: var(--muted-dark); }

.brand-closing-scene { padding: var(--space-scene) 0; background: var(--orange); color: #17110c; }
.brand-closing-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: clamp(50px, 9vw, 140px); align-items: end; }
.brand-closing-scene .kicker { color: currentColor; opacity: 0.65; }
.brand-closing-scene h2 { margin-top: 22px; font-size: clamp(62px, 9vw, 132px); }
.brand-closing-copy p { max-width: 480px; font-size: 18px; }
.closing-actions { margin-top: 38px; display: grid; gap: 18px; }
.brand-closing-scene .direction-link { color: currentColor; }

/* F1 command centre */
.f1-command-hero { min-height: calc(100svh - 106px); }
.command-hero-grid { min-height: inherit; padding-top: clamp(90px, 13vh, 170px); padding-bottom: 120px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr); gap: 60px; align-items: end; }
.command-hero-grid h1 { margin-top: 28px; font-size: clamp(66px, 10vw, 146px); }
.command-hero-grid h1 strong { color: var(--orange); }
.command-hero-grid > div > p { max-width: 650px; margin: 30px 0 0; color: var(--muted-dark); font-size: 19px; }
.command-symbol { opacity: 0.07; }
.command-status { padding: 23px 0 0 23px; border-top: 1px solid #46423c; border-left: 1px solid #46423c; }
.command-status span { color: var(--orange); font-size: 9px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.command-status strong { display: block; margin-top: 12px; font-family: var(--display); font-size: 25px; }
.command-status p { color: var(--muted-dark); font-size: 13px; }

.command-centre { padding: var(--space-scene) 0; background: var(--ivory); }
.command-grid { display: grid; grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.command-feature { min-height: 760px; padding: clamp(34px, 5vw, 62px); display: flex; flex-direction: column; background: var(--black); color: var(--white); }
.command-round { margin-top: auto; color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.command-feature h2 { margin-top: 18px; font-size: clamp(54px, 7vw, 96px); }
.command-feature > p { color: var(--muted-dark); }
.command-race-facts { margin: 32px 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding-top: 19px; border-top: 1px solid var(--line-dark); }
.command-navigation { background: var(--paper); }
.command-countdown { min-height: 140px; padding: 28px 34px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
.command-countdown > div { display: flex; align-items: baseline; gap: 8px; }
.command-countdown strong { color: var(--orange-dark); font-family: var(--display); font-size: 42px; }
.command-countdown small { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.command-links { border-color: var(--line); }
.command-links a { min-height: 102px; border-color: var(--line); }
.command-links a:hover { background: var(--soft); }
.command-links strong { color: var(--ink); }
.command-links em { color: var(--muted); }

.f1-standings-scene { padding: var(--space-scene) 0; background: var(--paper); }
.spotlight-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(50px, 9vw, 140px); align-items: end; }
.spotlight-grid h2 { margin-top: 24px; font-size: clamp(62px, 8vw, 112px); }
.spotlight-grid p { color: var(--muted-dark); font-size: 19px; }
.spotlight-grid small { display: block; margin-top: 24px; color: var(--muted-dark); }
.f1-guide-band { padding: clamp(64px, 8vw, 110px) 0; background: var(--orange); }
.guide-band-grid { display: grid; grid-template-columns: 40px 1fr auto; gap: 35px; align-items: end; }
.guide-band-grid .kicker { color: var(--ink); opacity: 0.62; }
.guide-band-grid h2 { max-width: 900px; margin-top: 15px; font-size: clamp(40px, 5.5vw, 76px); }
.guide-band-grid .direction-link { color: var(--ink); }

/* Generic editorial / data pages */
.page-hero {
  position: relative;
  min-height: clamp(340px, 48vh, 560px);
  padding: clamp(72px, 9vw, 130px) 0 55px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.page-hero::before { content: "F1 / ENTRANCE"; position: absolute; right: -0.03em; bottom: -0.1em; color: rgba(20,19,17,0.035); font-family: var(--display); font-size: clamp(110px, 20vw, 330px); font-weight: 900; line-height: 0.8; white-space: nowrap; }
.page-hero .wrap { position: relative; }
.page-hero h1 { max-width: 1000px; margin-top: 22px; color: var(--ink); font-size: clamp(58px, 9vw, 126px); }
.page-hero p { max-width: 670px; margin: 23px 0 0; color: var(--muted); font-size: clamp(16px, 1.7vw, 20px); }

.section { padding: clamp(58px, 7vw, 104px) 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.section.alt { background: var(--ivory); }
.section.dark { background: var(--black); color: var(--white); }
.section-head { margin-bottom: 28px; padding-bottom: 15px; display: flex; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.section-head h2 { position: relative; padding-left: 15px; font-size: clamp(34px, 4.5vw, 62px); }
.section-head h2::before { content: ""; position: absolute; top: 0.08em; bottom: 0.08em; left: 0; width: 3px; background: var(--orange); }
.section-head a, .text-link { color: var(--orange-dark); font-size: 10px; font-weight: 900; letter-spacing: 0.11em; text-transform: uppercase; }

.table { border: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.table th { padding: 14px 18px; background: #ece7de; color: #57524b; font-size: 9px; letter-spacing: 0.13em; }
.table td { height: 58px; padding: 13px 18px; }
.table tbody tr { transition: background 180ms; }
.table tbody tr:hover td { background: #faf5ed; }
.table .accent-row td:first-child { box-shadow: inset 3px 0 0 var(--team-colour, var(--tc-unknown)); }
.position { color: var(--orange-dark); font-family: var(--display); font-size: 18px; }
.race-identity { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.race-flag { width: 24px; flex: 0 0 auto; font-size: 18px; text-align: center; }
.cal-winner { display: block; color: var(--muted); font-size: 12px; }
.winner-team { display: block; color: var(--muted); font-size: 12px; }
.status-badge { border-radius: 0; }
.race-journey-table { border-left: 3px solid var(--orange); }
.race-journey-table tbody tr.is-next td, .results-archive-table tbody tr.is-next td { background: #fff3e8; }
.race-journey-table tbody tr.is-next { box-shadow: inset 3px 0 0 var(--orange); }

/* Standings switch is useful at every width */
.standings-switch .segmented-control { width: min(100%, 460px); margin: 0 0 32px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border: 1px solid var(--line); border-radius: 0; background: var(--ivory); }
.standings-switch .segmented-control label { min-height: 46px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
#standings-tab-drivers:checked ~ .segmented-control label[for="standings-tab-drivers"],
#standings-tab-constructors:checked ~ .segmented-control label[for="standings-tab-constructors"] { background: var(--black); color: var(--white); }
.standings-panels { grid-template-columns: 1fr; }
#standings-tab-drivers:checked ~ .standings-panels .standings-panel-constructors,
#standings-tab-constructors:checked ~ .standings-panels .standings-panel-drivers { display: none; }
.standings-panel .section-head { display: none; }
.standings-panel .table { width: 100%; }
.coverage-note { margin-top: 14px; }

/* Editorial roster */
.roster-list { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.roster-item { position: relative; display: grid; grid-template-columns: 55px minmax(220px, 0.9fr) minmax(260px, 1.1fr) 24px; gap: 28px; align-items: center; min-height: 138px; padding: 22px 18px; border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--team-colour, var(--tc-unknown)); transition: padding 350ms var(--ease-out), background 200ms; }
.roster-item:hover { padding-inline: 30px; background: var(--soft); }
.roster-rank { color: var(--orange-dark); font-family: var(--display); font-size: 25px; font-weight: 900; }
.roster-team { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.roster-identity h3 { margin-top: 8px; font-size: clamp(32px, 4vw, 54px); }
.roster-facts { display: grid; grid-template-columns: 0.5fr 1.5fr; gap: 18px; }
.roster-facts p { margin: 0; }
.roster-facts span { display: block; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.roster-facts strong { display: block; margin-top: 4px; font-size: 13px; }
.roster-arrow { color: var(--orange-dark); transition: transform 250ms var(--ease-out); }
.roster-item:hover .roster-arrow { transform: translate(3px, -3px); }

/* Guides are stories, not equal cards */
.guide-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 42px; }
.guide-story-grid .guide-card { min-height: 0; padding: 28px 42px 28px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; transition: padding 300ms var(--ease-out); }
.guide-story-grid .guide-card:nth-child(1) { grid-row: span 2; min-height: 380px; padding: 42px; display: flex; flex-direction: column; justify-content: flex-end; border-left: 3px solid var(--orange); background: var(--black); color: var(--white); }
.guide-story-grid .guide-card:hover { padding-left: 10px; transform: none; box-shadow: none; }
.guide-story-grid .guide-card:nth-child(1):hover { padding-left: 52px; }
.guide-story-grid .guide-card h3 { font-size: clamp(24px, 3vw, 40px); }
.guide-story-grid .guide-card:nth-child(1) h3 { font-size: clamp(42px, 5vw, 68px); }
.guide-story-grid .guide-card p { margin-top: 12px; }
.guide-story-grid .guide-card:nth-child(1) p { color: var(--muted-dark); }

/* Stats Lab / Records */
.stats-page-intro { position: relative; overflow: hidden; padding: clamp(42px, 5vw, 72px) 0 0; border: 0; background: var(--black); }
.stats-page-intro::after { display: none; }
.stats-page-intro h1 { max-width: 880px; font-size: clamp(48px, 6vw, 82px); line-height: 0.93; }
.stats-page-intro p { max-width: 720px; margin-top: 14px; color: var(--muted-dark); font-size: clamp(15px, 1.5vw, 18px); }
.stats-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 36px; }
.stats-intro-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; padding-bottom: 4px; }
.stats-intro-actions .button { min-height: 44px; white-space: nowrap; }
.stats-coverage-line { margin: clamp(28px, 4vw, 46px) 0 0; padding: 14px 0 16px; border-top: 1px solid var(--line-dark); color: var(--muted-dark); font-size: 12px; line-height: 1.5; }
.stats-coverage-line strong { margin-right: 8px; color: var(--orange); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.stats-explorer-intro { display: grid; justify-items: start; }
.stats-explorer-intro .stats-coverage-line { width: 100%; }
.stats-back-link { margin-bottom: 26px; color: var(--muted-dark); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.stats-back-link:hover { color: var(--orange); }
.explorer-hero { padding-top: clamp(28px, 3.5vw, 46px); }
.explorer-hero h1 { max-width: none; font-size: clamp(42px, 4.5vw, 64px); line-height: 0.94; }
.explorer-hero .stats-back-link { margin-bottom: 16px; }
.explorer-hero .stats-coverage-line { margin-top: 22px; }
.stats-library-section { background: var(--ivory); }
.stats-library-section .records-head { margin-bottom: 24px; }
.stats-library-section .records-head h2 { margin-top: 8px; }
.records-library-grid { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); background: var(--paper); }
.record-category-nav { display: none; }
.record-category-card { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); gap: 20px 30px; align-items: start; min-height: 0; padding: 22px 24px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--paper); box-shadow: none; }
.record-category-card:last-child { border-bottom: 0; }
.record-category-card > .tag { display: none; }
.record-category-card h3 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1; }
.record-category-card .metric-link-grid, .record-category-card .record-preview-list, .record-category-card .record-preview-note { grid-column: 2; margin: 0; }
.record-category-card .metric-link-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.record-category-card .metric-link-grid a { display: flex; align-items: center; min-height: 42px; padding: 7px 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.record-category-card .metric-link-grid a::after { content: "\2197"; margin-left: auto; color: var(--muted); }
.record-category-card .metric-link-grid a:hover { padding-left: 7px; background: #fff6ed; color: var(--orange-dark); }
.record-category-card .record-preview-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.record-category-card .record-preview-list li { display: grid; grid-template-columns: auto 1fr; align-content: space-between; gap: 10px; min-height: 86px; padding: 12px; border: 0; border-radius: 0; background: var(--paper); }
.record-category-card .record-preview-name, .record-category-card .record-preview-value { grid-column: 1 / -1; }
.record-category-unavailable, .record-category-card .unavailable-metric { display: none; }
.stats-preview-notice { margin-bottom: 12px; padding: 10px 13px; border: 0; border-left: 3px solid var(--orange); border-radius: 0; background: #fff4e8; box-shadow: none; }

/* Historical Records foundation */
.historical-records-hero::before { content: "F1 / HISTORY"; }
.historical-records-section { min-height: 46vh; background: var(--ivory); }
.historical-records-root { min-width: 0; }
.historical-records-state { max-width: 820px; padding: clamp(30px, 5vw, 62px); border: 1px solid var(--line); border-left: 4px solid var(--orange); background: var(--paper); }
.historical-records-state h2 { margin-top: 14px; font-size: clamp(34px, 5vw, 62px); line-height: 0.98; }
.historical-records-state p { max-width: 680px; margin-top: 18px; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); }
.historical-records-state .button { margin-top: 24px; }
.historical-records-state .historical-records-review-note { padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.historical-records-loading { border-left-color: var(--muted); }
.historical-records-error { border-left-color: #a83224; }
.historical-records-results-head { max-width: 820px; margin-bottom: 34px; }
.historical-records-results-head h2 { margin-top: 14px; font-size: clamp(38px, 5vw, 68px); }
.historical-records-results-head p { margin-top: 14px; color: var(--muted); }
.historical-records-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.historical-record-card { min-width: 0; padding: 26px; background: var(--paper); }
.historical-record-category { color: var(--orange-dark); font-size: 10px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.historical-record-card h3 { margin-top: 11px; font-size: clamp(27px, 3vw, 38px); }
.historical-record-holder { margin-top: 14px; font-size: 18px; font-weight: 800; }
.historical-record-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.historical-record-facts dt { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.historical-record-facts dd { margin: 5px 0 0; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.historical-record-methodology { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.historical-records-more { margin-top: 28px; }

@media (max-width: 620px) {
  .historical-records-state, .historical-record-card { padding: 24px 18px; }
  .historical-record-facts { grid-template-columns: 1fr; }
}

/* Explorer = clear setup -> state -> results */
.stats-explorer-section { padding: 26px 0 clamp(72px, 8vw, 112px); background: var(--ivory); }
.stats-explorer-v2 { gap: 14px; }
.stats-explorer-v2 .explorer-workbench, .stats-explorer-v2 .lab-results { border-radius: 0; box-shadow: none; }
.explorer-toolbar { position: relative; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.explorer-toolbar::before { display: none; }
.explorer-toolbar h2 { color: var(--ink); font-size: 24px; letter-spacing: -0.02em; }
.explorer-toolbar p { color: var(--muted); }
.stats-explorer-v2 .lab-preset-panel button { border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); }
.stats-explorer-v2 .lab-preset-panel button:first-child { border-color: var(--black); background: var(--black); color: var(--white); }
.primary-filter-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 18px 20px; }
.primary-filter-grid label { position: relative; }
.primary-filter-grid select, .primary-filter-grid input, .stats-explorer-v2 .lab-search { min-height: 44px; border-radius: 0; background: var(--paper); }
.single-metric-mode .primary-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.single-metric-mode .primary-filter-grid label:has([data-driver-search]), .single-metric-mode .primary-filter-grid label:has([data-sort-control]), .single-metric-mode .primary-filter-grid label:has([data-direction-control]) { display: none; }
.single-metric-mode .secondary-filter-grid { grid-template-columns: 1fr; }
.filter-drawer { border-radius: 0; }
.stats-explorer-v2 .lab-results-head { position: relative; border-radius: 0; }
.stats-explorer-v2 .lab-results-head::before { display: none; }
.stats-explorer-v2 .lab-results-head .button.secondary { border-color: #5a554e; color: var(--white); }
.stats-explorer-v2 .lab-results-head .button.secondary:hover { background: var(--white); color: var(--black); }
.stats-explorer-v2 .metric-sort-button { min-height: 38px; }
.stats-explorer-v2 .sort-indicator { color: var(--orange-dark); font-size: 15px; }
.stats-explorer-v2 .sort-indicator.is-neutral { color: var(--muted); opacity: 0.55; }
.leaderboard-table th.is-selected-metric, .leaderboard-table td.is-selected-metric { background: #fff2e5; }

/* Supporting editorial pages */
.copy { max-width: var(--reading); }
.copy h2 { margin: 44px 0 13px; font-size: clamp(30px, 4vw, 44px); }
.copy h2:first-child { margin-top: 0; }
.copy p { font-size: 17px; line-height: 1.8; }
.contact-panel { padding: clamp(30px, 5vw, 58px); border: 0; border-left: 3px solid var(--orange); border-radius: 0; background: var(--black); }

/* Footer is the final scene */
.site-footer { position: relative; overflow: hidden; min-height: 520px; padding: 72px 0 40px; border-top: 1px solid var(--line-dark); background: var(--black); color: var(--muted-dark); }
.site-footer::before { content: "ENTRANCE"; position: absolute; right: -0.025em; bottom: -0.09em; left: -0.025em; color: rgba(255,255,255,0.055); font-family: var(--display); font-size: clamp(110px, 20vw, 330px); font-weight: 900; line-height: 0.8; letter-spacing: -0.04em; text-align: center; pointer-events: none; }
.footer-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 0.55fr 1fr; gap: 45px 80px; align-items: start; }
.footer-brand img { width: 190px; }
.footer-grid > div:nth-child(2) { justify-self: end; font-size: 11px; }
.footer-links { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 25px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 12px; }
.footer-contact { grid-column: 1; grid-row: 2; align-self: start; display: grid; gap: 7px; color: var(--white); }
.footer-contact span { color: var(--muted-dark); font-size: 9px; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.footer-contact strong { font-family: var(--display); font-size: clamp(22px, 3vw, 34px); }
.site-footer a { transition: color var(--motion-fast); }
.site-footer a:hover { color: var(--orange); }

@media (min-width: 1500px) {
  .nav, .topbar, .wrap { max-width: 1440px; }
}

@media (max-width: 980px) {
  .stats-intro-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-intro-actions { justify-content: flex-start; }
  .record-category-card .record-preview-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scene-heading { grid-template-columns: 0.4fr 1fr; }
  .scene-heading .direction-link { grid-column: 2; justify-self: start; }
  .race-stage, .stats-product-grid, .result-scene-grid, .guides-editorial, .command-grid { grid-template-columns: 1fr; }
  .countdown-stage .countdown-grid { grid-template-columns: repeat(4, 1fr); }
  .countdown-stage .countdown-grid > div { display: grid; justify-items: center; border-top: 0; border-left: 1px solid var(--line-dark); }
  .countdown-stage .countdown-grid > div:first-child { border-left: 0; }
  .command-feature { min-height: 580px; }
  .discovery-layout { grid-template-columns: 0.8fr 1.2fr; gap: 50px; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 63px; }
  body { overflow-x: hidden; }
  .wrap { padding-inline: 16px; }

  .topbar { min-height: 63px; padding: 10px 16px; position: relative; z-index: 3; }
  .brand-logo, .is-scrolled .brand-logo { width: 150px; }
  .edition { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }

  body:not(.has-nav-toggle) .site-header .nav {
    padding: 0 16px 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
  }

  body:not(.has-nav-toggle) .site-header .nav a {
    min-width: 0;
    min-height: 44px;
    border-bottom: 1px solid var(--line-dark);
  }

  .has-nav-toggle .nav { display: none; }
  .has-nav-toggle .site-header.is-nav-open .nav {
    position: fixed;
    z-index: 2;
    inset: 0;
    padding: 96px 20px 28px;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 0;
    overflow-y: auto;
    background: var(--black);
    border: 0;
  }
  .site-header.is-nav-open { position: fixed; inset: 0 0 auto 0; }
  .site-header.is-nav-open .topbar { border-bottom: 1px solid var(--line-dark); }
  .site-header.is-nav-open .nav a { min-height: 64px; padding: 0 8px 0 45px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-dark); color: var(--white); font-family: var(--display); font-size: clamp(27px, 8vw, 42px); font-weight: 900; letter-spacing: -0.02em; text-transform: none; }
  .site-header.is-nav-open .nav a::before { content: var(--nav-index); position: absolute; left: 8px; color: var(--orange); font-family: var(--body); font-size: 9px; font-weight: 900; letter-spacing: 0.1em; }
  .site-header.is-nav-open .nav a::after { right: auto; bottom: 12px; left: 45px; width: 52px; }

  .home-hero, .f1-command-hero { min-height: calc(100svh - 63px); }
  .immersive-hero-grid, .command-hero-grid { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 96px; gap: 44px; }
  .hero-copy h1 { font-size: clamp(66px, 22vw, 112px); line-height: 0.8; }
  .hero-copy h1 strong { margin-left: 0; }
  .hero-copy p { margin-top: 28px; font-size: 17px; }
  .hero-manifesto, .command-status { max-width: 420px; }
  .hero-symbol { right: -34vw; width: 118vw; opacity: 0.07; }
  .scroll-cue { right: 16px; }

  .scene-heading { grid-template-columns: 1fr auto; gap: 20px; }
  .scene-heading > div:first-child { grid-column: 1 / -1; }
  .scene-heading h2 { font-size: clamp(48px, 14vw, 74px); }
  .scene-heading .direction-link { grid-column: 2; grid-row: 2; align-self: end; margin-bottom: 5px; }
  .race-feature { min-height: 460px; padding: 25px 20px; }
  .race-feature-copy h3 { font-size: clamp(45px, 14vw, 72px); }
  .race-facts { grid-template-columns: 1fr; }
  .race-facts > div { padding: 11px 0; border-top: 1px solid var(--line); }
  .countdown-stage { padding: 25px 20px; }
  .countdown-stage .countdown-grid { grid-template-columns: repeat(2, 1fr); }
  .countdown-stage .countdown-grid > div:nth-child(3) { border-left: 0; }
  .countdown-stage .countdown-grid span { font-size: 48px; }

  .discovery-layout { grid-template-columns: 1fr; }
  .discovery-sticky { position: static; }
  .discovery-sticky h2 { font-size: clamp(54px, 15vw, 78px); }
  .destination-rail a, .command-links a { grid-template-columns: 26px minmax(0, 1fr) auto; min-height: 78px; gap: 10px; }
  .destination-rail strong, .command-links strong { font-size: 30px; }
  .destination-rail em, .command-links em { display: none; }

  .result-intro h2, .stats-product-copy h2, .spotlight-grid h2 { font-size: clamp(52px, 14vw, 78px); }
  .podium-stage .stat-card { min-height: 122px; padding: 22px 20px 22px 28px; }
  .featured-guide { min-height: 440px; padding: 28px 22px; }
  .featured-guide h2 { font-size: clamp(48px, 13vw, 70px); }
  .stats-product-grid, .brand-closing-grid, .spotlight-grid { grid-template-columns: 1fr; }
  .stats-symbol { right: -45vw; width: 150vw; }
  .brand-closing-scene h2 { font-size: clamp(58px, 16vw, 90px); }

  .command-hero-grid h1 { font-size: clamp(60px, 17vw, 92px); }
  .command-feature { min-height: 570px; padding: 28px 20px; }
  .command-feature h2 { font-size: clamp(50px, 14vw, 72px); }
  .command-race-facts { grid-template-columns: 1fr; }
  .command-countdown { align-items: flex-start; flex-direction: column; }
  .guide-band-grid { grid-template-columns: 30px 1fr; }
  .guide-band-grid .direction-link { grid-column: 2; justify-self: start; }

  .page-hero { min-height: 360px; padding: 70px 0 38px; }
  .page-hero h1 { font-size: clamp(52px, 15vw, 76px); }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: clamp(32px, 10vw, 46px); }

  .table.mobile-cards td { height: auto; }
  .table.mobile-cards tbody { border-radius: 0; box-shadow: none; }
  .table.mobile-cards tr { min-height: 65px; padding: 13px 12px; }
  .table.mobile-cards tr.accent-row { box-shadow: inset 3px 0 0 var(--team-colour, var(--tc-unknown)); }
  .table.mobile-cards tr:has(td[colspan]) { display: block; min-height: 62px; padding: 18px 15px; }
  .table.mobile-cards tr:has(td[colspan]) td { display: block; width: 100%; color: var(--muted); font-size: 14px; line-height: 1.5; }
  .table.mobile-cards .race-identity { display: flex; gap: 8px; }
  .classification-table.mobile-cards .cell-note { display: none; }
  .classification-table.mobile-cards tr { grid-template-areas: "pos main end" "pos sub end"; }
  .results-archive-table.mobile-cards .cell-winner::before { content: "Winner · "; }

  .roster-item { grid-template-columns: 36px minmax(0, 1fr) 18px; gap: 12px; min-height: 112px; padding: 18px 14px; }
  .roster-item:hover { padding-inline: 18px; }
  .roster-facts { grid-column: 2; grid-template-columns: 0.6fr 1.4fr; padding-top: 10px; border-top: 1px solid var(--line); }
  .roster-arrow { grid-column: 3; grid-row: 1; }
  .roster-identity h3 { font-size: 31px; }

  .guide-story-grid { grid-template-columns: 1fr; }
  .guide-story-grid .guide-card:nth-child(1) { grid-row: auto; min-height: 330px; }
  .records-library-grid { grid-template-columns: 1fr; }
  .record-category-card { grid-template-columns: 1fr; gap: 16px; padding: 20px 18px; }
  .record-category-card .metric-link-grid, .record-category-card .record-preview-list, .record-category-card .record-preview-note { grid-column: 1; }
  .record-category-card .metric-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .stats-explorer-section .wrap { padding-inline: 10px; }
  .primary-filter-grid, .single-metric-mode .primary-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-explorer-v2 .explorer-workbench, .stats-explorer-v2 .lab-results { border-radius: 0; }
  .stats-explorer-v2 .custom-leaderboard-table tbody { border-radius: 0; box-shadow: none; }
  .stats-explorer-v2 .custom-leaderboard-table tr.leaderboard-row { box-shadow: inset 3px 0 0 var(--team-colour, var(--tc-unknown)); }

  .site-footer { min-height: 500px; padding-top: 55px; }
  .footer-grid { grid-template-columns: 1fr auto; gap: 28px 20px; }
  .footer-grid > div:nth-child(2) { justify-self: end; }
  .footer-links { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 520px) {
  .stats-page-intro { padding-top: 34px; }
  .stats-page-intro h1 { font-size: clamp(44px, 14vw, 62px); }
  .stats-intro-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .stats-intro-actions .button { width: 100%; }
  .stats-library-section { padding-top: 36px; }
  .stats-library-section .records-head { align-items: end; flex-direction: row; gap: 12px; margin-bottom: 16px; }
  .stats-library-section .records-head h2 { font-size: 38px; }
  .stats-library-section .records-head .button { min-height: 40px; padding-inline: 12px; white-space: nowrap; }
  .record-category-card .metric-link-grid, .record-category-card .record-preview-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .hero-manifesto { margin-left: 16px; }
  .scene-heading { grid-template-columns: 1fr; }
  .scene-heading .direction-link { grid-column: 1; grid-row: auto; justify-self: start; }
  .countdown-stage .countdown-grid span { font-size: 42px; }
  .command-countdown > div { width: 100%; display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr; }
  .guide-band-grid { grid-template-columns: 1fr; }
  .guide-band-grid .direction-link { grid-column: 1; }
  .standings-switch .segmented-control { width: 100%; position: sticky; top: 63px; z-index: 20; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .primary-filter-grid, .single-metric-mode .primary-filter-grid { grid-template-columns: 1fr; }
  .primary-filter-grid label:has(.lab-search) { grid-column: auto; }
  .stats-explorer-v2 .lab-preset-panel { display: grid; grid-template-columns: 1fr; width: 100%; }
  .stats-explorer-v2 .lab-preset-panel button { width: 100%; border-radius: 0; }
  .stats-explorer-v2 .lab-results-actions, .stats-explorer-v2 .lab-results-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:nth-child(2) { justify-self: start; }
  .footer-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .scene-pending { opacity: 1; transform: none; clip-path: none; }
}

/* ==============================================================
   APP-INSPIRED F1 CALENDAR / SEMANTIC RACE CARDS
   ============================================================== */

.calendar-shell {
  padding: clamp(48px, 7vw, 92px) 0 clamp(70px, 10vw, 130px);
  background: var(--paper);
}

html.calendar-positioning {
  scroll-behavior: auto !important;
}

html.calendar-positioning .calendar-shell,
html.calendar-positioning .site-footer {
  visibility: hidden;
}

.calendar-page,
.calendar-page main,
.calendar-page .site-header {
  max-width: 100vw;
  overflow-x: clip;
}

.calendar-layout { max-width: 1440px; }

.calendar-header {
  padding-bottom: clamp(26px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}

.calendar-header h1 {
  margin: 14px 0 6px;
  font-size: clamp(66px, 10vw, 132px);
  line-height: 0.82;
}

.calendar-header p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 700;
}

.calendar-progress-panel {
  margin: 14px 0 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--ivory);
}

.calendar-progress-heading {
  margin-bottom: 7px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.calendar-progress-heading h2 {
  margin: 0;
  color: var(--muted);
  font-family: var(--body);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.calendar-progress-heading strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.calendar-progress-track {
  height: 3px;
  overflow: hidden;
  background: var(--line);
}

.calendar-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 500ms var(--ease-out);
}

.calendar-race-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.calendar-race-card {
  position: relative;
  min-height: 180px;
  padding: 20px 18px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 46px;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  transition: border-color 220ms var(--ease-out), transform 220ms var(--ease-out), background 220ms var(--ease-out);
}

.calendar-race-card:hover { z-index: 2; border-color: var(--ink); transform: translateY(-3px); }

.calendar-race-link {
  position: absolute;
  z-index: 3;
  inset: 0;
}

.calendar-race-link:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.calendar-race-card.is-past {
  background: #f3f0e9;
  color: #625f59;
}

.calendar-race-card.is-next {
  border: 2px solid var(--orange);
  background: var(--orange);
  color: var(--black);
  box-shadow: none;
  scroll-margin-top: calc(var(--header-height, 88px) + 10px);
}

.calendar-race-card.is-next .calendar-race-circuit,
.calendar-race-card.is-next .calendar-race-time,
.calendar-race-card.is-next .calendar-previous-hint,
.calendar-race-card.is-next .calendar-date-block span,
.calendar-race-card.is-next .calendar-round span { color: rgba(8,9,13,0.64); }

.calendar-race-card.is-next .calendar-next-badge { background: var(--black); color: var(--white); }

.calendar-date-block {
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  border-right: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.calendar-date-block span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.is-next .calendar-date-block span {
  color: var(--orange-dark);
}

.calendar-date-block strong {
  margin-top: 3px;
  font-family: var(--display);
  font-size: 38px;
  line-height: 1;
}

.calendar-race-details {
  min-width: 0;
}

.calendar-previous-hint {
  margin-bottom: 7px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.calendar-race-title-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.calendar-race-title-line h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: clamp(23px, 2.15vw, 31px);
  line-height: 1;
}

.calendar-next-badge {
  flex: 0 0 auto;
  padding: 5px 7px 4px;
  background: var(--orange);
  color: var(--black);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.calendar-race-title-line:has(.calendar-next-badge) { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.calendar-race-title-line:has(.calendar-next-badge) .calendar-next-badge { grid-column: 1 / -1; justify-self: start; }

.calendar-race-flag {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.calendar-race-circuit {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.calendar-race-time {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-race-winner {
  margin-top: 8px;
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.calendar-round {
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: end;
  border-left: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.calendar-round span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.calendar-round strong {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.calendar-load-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
}

@media (max-width: 1180px) {
  .calendar-race-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .calendar-race-list { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .calendar-shell { padding-top: 40px; }
  .calendar-header h1 { font-size: clamp(54px, 18vw, 74px); }
  .calendar-progress-panel { padding: 9px 11px; }

  .calendar-race-card {
    min-height: 116px;
    padding: 15px 13px;
    grid-template-columns: 54px minmax(0, 1fr) 42px;
    gap: 11px;
  }

  .calendar-date-block {
    min-height: 70px;
  }

  .calendar-date-block strong { font-size: 31px; }
  .calendar-race-title-line { flex-wrap: nowrap; gap: 6px; }
  .calendar-race-title-line h2 { flex: 1 0 calc(100% - 34px); font-size: clamp(21px, 7vw, 28px); }
  .calendar-race-flag { order: -1; font-size: 17px; }
  .calendar-race-circuit { margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; }
  .calendar-race-time { font-size: 9px; line-height: 1.4; }
  .calendar-race-winner { font-size: 10px; line-height: 1.35; }
  .calendar-round { min-height: 62px; }
  .calendar-round strong { font-size: 22px; }
}

