/* Visual refresh layered over the original component styles. */
:root {
  --background: #eef0f3;
  --surface: #ffffff;
  --surface-alt: #f4f5f7;
  --border: #d8dbe1;
  --border-strong: #c4c8d0;
  --text: #111318;
  --text-secondary: #484e59;
  --text-muted: #6f7682;
  --accent: #e32636;
  --accent-dark: #b91625;
  --accent-light: #fff0f1;
  --accent-rgb: 227, 38, 54;
  --accent-gradient-end: #bd1725;
  --max-width: 1240px;
  --header-height: 68px;
  --radius-sm: 8px;
  --radius-md: 13px;
  --radius-lg: 20px;
  --shadow-small: 0 1px 2px rgba(16, 18, 24, .05), 0 8px 22px rgba(16, 18, 24, .055);
  --shadow-medium: 0 20px 50px rgba(16, 18, 24, .12);
}

html { background: #111318; }

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(var(--accent-rgb), .06), transparent 25rem),
    linear-gradient(180deg, #fafafa 0, var(--background) 27rem);
  font-size: 15px;
}

body.f2-mode {
  --accent: #1677ff;
  --accent-dark: #0759c7;
  --accent-light: #eaf3ff;
  --accent-rgb: 22, 119, 255;
  --accent-gradient-end: #0759c7;
  background:
    radial-gradient(circle at 88% 8%, rgba(22,119,255,.09), transparent 25rem),
    linear-gradient(180deg, #fafafa 0, var(--background) 27rem);
}
body.f3-mode {
  --accent: #c95300;
  --accent-dark: #9f3f00;
  --accent-light: #fff1e7;
  --accent-rgb: 201, 83, 0;
  --accent-gradient-end: #9f3f00;
  background:
    radial-gradient(circle at 88% 8%, rgba(201,83,0,.1), transparent 25rem),
    linear-gradient(180deg, #fafafa 0, var(--background) 27rem);
}

body.academy-mode {
  --accent: #7b2cff;
  --accent-dark: #5718bd;
  --accent-light: #f3ebff;
  --accent-rgb: 123, 44, 255;
  --accent-gradient-end: #5718bd;
}
html.f2-account { background: #f7f9fc; }
html.f3-account { background: #fff8f3; }
html.academy-account { background: #fbf8ff; }

body.f2-mode :focus-visible { outline-color: rgba(var(--accent-rgb), .25); }
body.f2-mode .search:focus,
body.f2-mode .global-search input:focus {
  border-color: rgba(var(--accent-rgb), .55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .08);
}
body.f2-mode .race-filters input:focus,
body.f2-mode .race-filters select:focus {
  border-color: rgba(var(--accent-rgb), .5);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08);
}
body.f2-mode .entity-card:hover,
body.f2-mode .analysis-tool-card:hover,
body.f2-mode .about-feature:hover,
body.f2-mode .history-card:hover,
body.f2-mode .circuit-race-card:hover,
body.f2-mode .constructor-driver-card:hover,
body.f2-mode .race-archive-card:hover {
  border-color: rgba(var(--accent-rgb), .32);
}
body.f2-mode .back-link:hover,
body.f2-mode .pagination button:hover:not(:disabled),
body.f2-mode .session-variant.active { border-color: rgba(var(--accent-rgb), .3); }
body.f2-mode .calendar-race.map-active { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1); }
body.f2-mode .career-timeline-item.champion .timeline-marker i { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14); }
body.f2-mode .history-card.champion {
  border-color: rgba(var(--accent-rgb), .25);
  background: linear-gradient(145deg, var(--accent-light), #fff);
}
body.f2-mode .history-card.champion::after { border-color: rgba(var(--accent-rgb), .07); }
body.f2-mode .hero:not(.series-home-hero)::after {
  border-color: rgba(var(--accent-rgb), .14);
  background:
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(17,19,24,.025) 17px 18px),
    linear-gradient(135deg, rgba(var(--accent-rgb), .09), transparent 58%);
}
body.f2-mode .button.primary { box-shadow: 0 10px 24px rgba(var(--accent-rgb), .2); }
body.f2-mode .metric::after { border-color: rgba(var(--accent-rgb), .055); }
body.f2-mode .season-champion {
  background: linear-gradient(135deg, var(--accent), var(--accent-gradient-end));
}
body.f2-mode .analysis-hero::after { border-color: rgba(var(--accent-rgb), .18); }
body.f2-mode .game-card-featured::after { border-color: rgba(var(--accent-rgb), .22); }
body.f2-mode .game-card-featured:hover { border-color: rgba(var(--accent-rgb), .7); }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), .25);
  outline-offset: 3px;
}

.container { width: min(var(--max-width), calc(100% - 64px)); }

.site-header {
  background: rgba(250, 250, 251, .86);
  border-bottom-color: rgba(17, 19, 24, .12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  backdrop-filter: blur(20px) saturate(150%);
}

.brand {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.065em;
}

.brand::before {
  width: 7px;
  height: 24px;
  margin-right: 11px;
  background: var(--accent);
  border-radius: 2px;
  content: "";
  transform: skewX(-13deg);
}

.series-switcher {
  display: inline-flex;
  gap: 3px;
  margin-left: 18px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
}
.series-switcher a {
  min-width: 38px;
  padding: 7px 9px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}
.series-switcher a.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(17,19,24,.12); }

.nav-link { padding: 10px 13px; border-radius: 9px; }

.dropdown-toggle { gap: 9px; }
.f2-direct-nav { display: flex; }
.monitor-page { max-width: var(--max-width); }
.monitor-page .stats-grid { margin: 10px 0 60px; }
.monitor-page table td:first-child { font-weight: 700; }
.monitor-page table a { color: var(--accent-dark); }
.chevron {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--text-muted);
  transform: rotate(45deg);
  transform-origin: 65% 65%;
  transition: color .18s ease, transform .2s ease;
}
.nav-dropdown.is-open .chevron { color: var(--text); transform: rotate(225deg); }
.nav-dropdown.is-open .dropdown-toggle { background: var(--surface-alt); color: var(--text); }

.dropdown-menu {
  top: calc(100% + 12px);
  width: 286px;
  padding: 8px;
  border-color: rgba(17, 19, 24, .09);
  border-radius: 16px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 22px 55px rgba(16,18,24,.14), 0 2px 8px rgba(16,18,24,.05);
  backdrop-filter: blur(18px);
  transform: translateY(-7px) scale(.985);
  transform-origin: top right;
  transition: opacity .1s ease, transform .1s ease, visibility 0s linear .1s;
}

.nav-dropdown.is-open .dropdown-menu { transform: translateY(0) scale(1); }

.dropdown-title { padding: 10px 12px 8px; color: var(--text-muted); font-size: 9px; letter-spacing: .18em; }
.dropdown-menu a {
  position: relative;
  padding: 12px 13px;
  border-radius: 10px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.dropdown-menu a + a { margin-top: 2px; }
.dropdown-menu a:hover { background: var(--accent-light); color: var(--accent-dark); transform: translateX(2px); }
.dropdown-menu a span { font-size: 13px; font-weight: 780; }
.dropdown-menu a small { margin-top: 4px; color: var(--text-muted); line-height: 1.25; }

.hero {
  position: relative;
  isolation: isolate;
  padding: 112px 0 96px;
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: 64px;
  right: 2%;
  width: min(38vw, 470px);
  aspect-ratio: 1.7;
  border: 1px solid rgba(var(--accent-rgb), .14);
  border-radius: 36px 8px 36px 8px;
  background:
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(17,19,24,.025) 17px 18px),
    linear-gradient(135deg, rgba(var(--accent-rgb),.09), transparent 58%);
  content: "";
  transform: skewX(-10deg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  font-size: 10px;
  letter-spacing: .2em;
}

.eyebrow::before {
  width: 23px;
  height: 2px;
  background: currentColor;
  content: "";
}

.hero h1 {
  max-width: 920px;
  margin-bottom: 25px;
  font-size: clamp(52px, 7.5vw, 94px);
  line-height: .96;
  letter-spacing: -.065em;
}

.hero h1 span { color: var(--accent); }
.hero-copy { max-width: 650px; color: var(--text-secondary); font-size: 18px; line-height: 1.65; }
.hero-actions { margin-top: 36px; }

.button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 750;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button.primary { box-shadow: 0 10px 24px rgba(var(--accent-rgb), .2); }

.stats-grid { gap: 14px; }

.metric {
  position: relative;
  overflow: hidden;
  padding: 25px 27px;
  border-color: rgba(17, 19, 24, .08);
  border-radius: 16px;
  box-shadow: var(--shadow-small);
}

.metric::after {
  position: absolute;
  right: -15px;
  bottom: -25px;
  width: 70px;
  height: 70px;
  border: 12px solid rgba(var(--accent-rgb), .055);
  border-radius: 50%;
  content: "";
}

.metric span { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.metric strong { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; }

.feature-grid { gap: 16px; padding-top: 18px; padding-bottom: 110px; }

.feature {
  min-height: 230px;
  padding: 28px;
  border-color: rgba(17, 19, 24, .08);
  border-radius: 18px;
  box-shadow: var(--shadow-small);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.feature:hover {
  border-color: rgba(var(--accent-rgb), .35);
  box-shadow: 0 18px 42px rgba(16, 18, 24, .09);
  transform: translateY(-5px);
}

.feature-kicker { color: var(--accent); font-weight: 850; }
.feature h2 { margin-top: auto; font-size: 25px; letter-spacing: -.035em; }
.feature .arrow { color: var(--accent); font-size: 24px; }

.page { min-height: calc(100vh - var(--header-height) - 120px); padding-top: 64px; padding-bottom: 90px; }

.page-head {
  align-items: end;
  margin-bottom: 42px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.page-head h1, .detail-hero h1 {
  letter-spacing: -.055em;
  line-height: 1;
}

.page-head h1 { font-size: clamp(45px, 7vw, 72px); }
.page-head p { max-width: 540px; margin-bottom: 0; color: var(--text-secondary); font-size: 17px; }

.search {
  min-width: min(330px, 100%);
  height: 48px;
  padding: 0 17px 0 45px;
  border-color: var(--border);
  border-radius: 12px;
  background-color: var(--surface);
  background-image: linear-gradient(45deg, transparent 45%, var(--text-muted) 46% 54%, transparent 55%), radial-gradient(circle, transparent 45%, var(--text-muted) 46% 55%, transparent 56%);
  background-position: 24px 27px, 17px 17px;
  background-size: 8px 8px, 13px 13px;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-small);
}

.search:focus { border-color: rgba(var(--accent-rgb),.55); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.08); }

.entity-grid { gap: 15px; }

.browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -17px 0 22px;
}

.browser-count { color: var(--text-muted); font-size: 12px; font-weight: 700; }
.sort-control { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sort-control select { min-width: 145px; height: 39px; padding: 0 34px 0 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }

.entity-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 23px;
  border-color: var(--border);
  border-radius: 15px;
  box-shadow: var(--shadow-small);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.entity-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleY(.55);
  transition: opacity .2s ease, transform .2s ease;
}

.entity-card:hover { border-color: rgba(var(--accent-rgb),.28); box-shadow: 0 14px 34px rgba(16,18,24,.09); transform: translateY(-3px); }
.entity-card:hover::before { opacity: 1; transform: scaleY(1); }
.entity-card h3 { font-size: 19px; letter-spacing: -.025em; }
.entity-card p { color: var(--text-secondary); }
.entity-card .number { margin-top: auto; color: var(--text); font-size: 12px; font-weight: 750; }
.driver-browser-card { min-height: 125px; padding: 17px 18px; }
.driver-card-name { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.driver-card-name h3 { margin: 0; line-height: 1.15; }
.driver-card-flag { flex: 0 0 auto; width: 25px; height: 18px; border: 1px solid rgba(17,19,24,.12); border-radius: 3px; object-fit: cover; box-shadow: 0 1px 2px rgba(17,19,24,.08); }
.driver-browser-card p { margin: 7px 0 13px; font-size: 10px; }
.driver-browser-card .number { margin-top: 0; font-size: 10px; }
.f2-driver-card { position: relative; min-height: 190px; }
.f1-achievement-card { position: relative; }
.f1-achievement-card:has(.f2-driver-title) h3 { max-width: calc(100% - 115px); }
.f1-achievement-card:has(.f2-driver-title) .driver-card-name { padding-top: 18px; }
.f1-achievement-card:has(.f2-driver-title) > h3 { padding-top: 18px; }
.f1-achievement-card.f2-driver-card-memorial { min-height: 140px; }
.f1-achievement-card.f2-driver-card-memorial .driver-card-name { padding-top: 25px; }
.f1-achievement-card.f2-driver-card-memorial:has(.f2-driver-title) .driver-card-name { padding-top: 29px; }
.f2-driver-card:has(.f2-driver-title) .driver-card-name { padding-top: 12px; }
.f2-driver-team { margin-top: auto; color: var(--text-secondary); font-size: 11px; font-weight: 750; }
.f2-driver-card-record { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.f2-driver-card-record span { padding: 5px 7px; border-radius: 6px; background: var(--surface-alt); color: var(--text-muted); font-size: 8px; }
.f2-driver-card-record strong { color: var(--text); font-size: 9px; }
.f2-driver-title { position: absolute; top: 0; right: 18px; padding: 5px 8px; border-radius: 0 0 7px 7px; background: var(--accent); color: #fff; font-size: 7px; font-style: normal; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.f2-driver-card-memorial {
  border-color: rgba(35, 39, 48, .3);
  background: linear-gradient(145deg, #fff 48%, #f0f2f5);
}
.f2-driver-card-memorial::before { background: #242934; opacity: 1; transform: scaleY(1); }
.f2-driver-card-memorial .driver-card-name { padding-top: 25px; }
.f2-driver-card-memorial:hover { border-color: rgba(35, 39, 48, .52); }
.f2-driver-memorial {
  position: absolute;
  top: 0;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 0 0 7px 7px;
  background: #242934;
  color: #fff;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.f2-driver-memorial small { color: #c9ced8; font-size: 7px; letter-spacing: .04em; }
.memorial-ribbon { position: relative; width: 8px; height: 12px; transform: rotate(-8deg); }
.memorial-ribbon::before,
.memorial-ribbon::after { position: absolute; top: 0; left: 3px; width: 3px; height: 12px; border-radius: 3px; background: #d9dde4; content: ""; transform: rotate(24deg); }
.memorial-ribbon::after { transform: rotate(-24deg); }

/* Formula 1 driver archive */
.drivers-page-head { display: block; margin-bottom: 20px; }
.drivers-page-head p { max-width: 720px; }
.driver-browser { margin-bottom: 20px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.driver-browser-primary { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.driver-browser-primary h2 { margin: 4px 0 0; font-size: clamp(25px,3vw,34px); letter-spacing: -.04em; }
.driver-view { display: flex; flex-wrap: nowrap; }
.driver-filter-grid { display: grid; grid-template-columns: minmax(240px,1.6fr) repeat(4,minmax(125px,.75fr)) auto; align-items: end; gap: 9px; }
.driver-filter-grid label { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.driver-filter-grid label > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.driver-filter-grid select { width: 100%; height: 44px; padding: 0 34px 0 11px; border: 1px solid var(--border); border-radius: 9px; background: #f8f9fa; color: var(--text); font-size: 11px; font-weight: 700; }
.driver-search-field .search { width: 100%; min-width: 0; height: 44px; box-shadow: none; }
.driver-clear { min-height: 44px; white-space: nowrap; }
.driver-browser-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px 0 14px; }
.driver-letters { display: flex; overflow-x: auto; gap: 3px; padding: 2px; scrollbar-width: thin; }
.driver-letters button { display: grid; min-width: 25px; height: 27px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font-size: 8px; font-weight: 850; }
.driver-letters button:first-child { min-width: 35px; }
.driver-letters button:hover:not(:disabled), .driver-letters button.active { background: var(--accent); color: #fff; }
.driver-letters button:disabled { cursor: default; opacity: .25; }
.driver-archive-grid { grid-template-columns: repeat(4,minmax(0,1fr)); scroll-margin-top: 90px; }
.driver-archive-grid > .loading-state, .driver-archive-grid > .driver-empty-state, .driver-archive-grid > .error { grid-column: 1 / -1; }
.f1-driver-archive-card { display: flex; min-height: 126px; flex-direction: column; padding: 15px 16px; }
.driver-card-skeleton { overflow: hidden; gap: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); pointer-events: none; }
.driver-card-skeleton > * { display: block; height: 9px; margin: 0; border-radius: 999px; background: linear-gradient(90deg,#eceef1 20%,#f7f8f9 38%,#eceef1 56%); background-size: 220% 100%; animation: driver-card-loading 1.15s ease-in-out infinite; }
.driver-card-skeleton > i { width: 58%; height: 17px; }
.driver-card-skeleton > b { width: 42%; }
.driver-card-skeleton > span { width: 68%; margin-top: 5px; }
.driver-card-skeleton > em { width: 82%; margin-top: 7px; }
@keyframes driver-card-loading { to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .driver-card-skeleton > * { animation: none; } }
.f1-driver-archive-card:has(.f2-driver-title) .driver-card-name { padding-top: 10px; }
.f1-driver-archive-card.f2-driver-card-memorial { min-height: 126px; }
.f1-driver-archive-card.f2-driver-card-memorial .driver-card-name { padding-top: 21px; }
.f1-driver-archive-card.f2-driver-card-memorial:has(.f2-driver-title) .driver-card-name { padding-top: 23px; }
.f1-driver-archive-card p { margin: 4px 0 6px; }
.driver-card-context { display: flex; min-width: 0; align-items: center; gap: 7px; color: var(--text-muted); font-size: 9px; }
.driver-card-context > span { white-space: nowrap; }
.driver-card-context > strong { overflow: hidden; color: var(--text-secondary); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.driver-permanent-number { margin-left: auto; padding: 3px 5px; border-radius: 5px; background: #20232a; color: #fff; font-size: 8px; font-weight: 900; }
.f1-driver-archive-card .f2-driver-card-record { margin-top: 8px; padding-top: 0; }
.junior-driver-archive-card .driver-card-context > span { flex: 0 0 auto; }
.junior-driver-archive-card .driver-card-context > strong { margin-left: auto; text-align: right; }
.driver-empty-state { padding: 55px 24px; border: 1px dashed var(--border); border-radius: 15px; text-align: center; }
.driver-empty-state h2 { margin: 7px 0; font-size: 28px; letter-spacing: -.04em; }
.driver-empty-state p { margin: 0 0 20px; color: var(--text-muted); }

@media (max-width: 1100px) {
  .driver-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .driver-search-field { grid-column: span 2; }
  .driver-archive-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .driver-browser { padding: 18px; }
  .driver-browser-primary { align-items: stretch; flex-direction: column; }
  .driver-view { width: 100%; }
  .driver-view .standings-mode-button { flex: 1; }
  .driver-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .driver-search-field { grid-column: 1 / -1; }
  .driver-clear { width: 100%; }
  .driver-browser-toolbar { align-items: stretch; flex-direction: column; }
  .driver-letters { width: 100%; }
  .driver-archive-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .f1-driver-archive-card { min-height: 120px; }
}

@media (max-width: 460px) {
  .drivers-page-head { margin-bottom: 14px; }
  .driver-browser { margin-right: -2px; margin-left: -2px; padding: 15px; }
  .driver-filter-grid { grid-template-columns: 1fr; }
  .driver-filter-grid > *, .driver-search-field { grid-column: auto; }
  .driver-archive-grid { grid-template-columns: 1fr; }
  .f1-driver-archive-card { min-height: 112px; padding: 13px 15px; }
  .f1-driver-archive-card .driver-card-name h3 { font-size: 17px; }
  .f1-driver-archive-card .f2-driver-card-record { margin-top: 6px; padding-top: 0; }
}

.entity-card .circuit-card-copy { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 120px; padding-right: 38%; }
.circuit-card-map { position: absolute; z-index: 0; top: 18px; right: 15px; width: 38%; height: 112px; object-fit: contain; opacity: .16; transition: opacity .2s ease, transform .2s ease; }
.entity-card:hover .circuit-card-map { opacity: .27; transform: scale(1.04); }

/* F1 circuit archive: shared browsing controls, compact track-led cards. */
.circuits-page .circuit-archive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); scroll-margin-top: 90px; }
.circuit-archive-grid > .circuit-empty-state { grid-column: 1 / -1; padding: 30px; text-align: center; }
.circuits-page .circuit-archive-card { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px; }
.circuit-card-layout { display: grid; place-items: center; height: 90px; color: var(--text-muted); font-size: 11px; }
.circuits-page .circuit-card-map { position: static; width: 100%; max-width: 200px; height: 90px; opacity: .8; }
.circuits-page .circuit-archive-card:hover .circuit-card-map { opacity: 1; }
.circuits-page .circuit-card-heading h3 { margin: 0; font-size: 18px; line-height: 1.2; }
.circuits-page .circuit-card-heading p { margin: 5px 0 0; font-size: 12px; line-height: 1.4; }
.circuit-card-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--text-secondary); font-size: 11px; }
.circuit-card-record { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; }
.circuit-card-record strong { font-weight: 750; }
.circuit-card-record > span { color: var(--text-muted); }
.circuit-card-skeleton { border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.circuit-card-skeleton > * { display: block; height: 12px; width: 65%; border-radius: 4px; background: var(--surface-alt); animation: circuit-loading 1.4s ease-in-out infinite alternate; }
.circuit-card-skeleton > i { width: 100%; height: 90px; }
.circuit-card-skeleton > b { width: 80%; height: 20px; }
.circuit-card-skeleton > em { width: 90%; margin-top: 10px; }
@keyframes circuit-loading { to { opacity: .4; } }
@media (max-width: 1180px) { .circuits-page .circuit-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .circuits-page .circuit-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .circuits-page .circuit-archive-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .circuit-card-skeleton > * { animation: none; } }

.detail-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 45px;
  padding: 52px;
  border: 0;
  border-radius: 22px;
  background: #17191f;
  color: #fff;
  box-shadow: 0 25px 60px rgba(16,18,24,.16);
}

.detail-hero::after {
  position: absolute;
  top: -80px;
  right: -70px;
  width: 330px;
  height: 260px;
  border: 38px solid rgba(var(--accent-rgb),.2);
  border-radius: 50%;
  content: "";
}
body.f2-mode .detail-hero::after { border-color: rgba(22,119,255,.2); }

.detail-hero h1 { position: relative; z-index: 1; font-size: clamp(42px, 7vw, 76px); }
.detail-hero h1, #season-year { color: #fff; }
.detail-hero .detail-sub { position: relative; z-index: 1; color: #b9bdc6; font-size: 16px; }

.section { margin-top: 46px; }
.section-title, .section-heading { margin-bottom: 18px; }
.section-title span, .section-note { color: var(--text-muted); letter-spacing: .13em; }

.standings, .race-list, .championship-table-wrap {
  overflow: hidden;
  border-color: rgba(17,19,24,.09);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

table { width: 100%; border-collapse: collapse; }
table th { padding: 13px 16px; background: #f2f3f5; color: var(--text-muted); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
table td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
table tbody tr { transition: background .14s ease; }
table tbody tr:nth-child(even) { background: rgba(244,245,247,.55); }
table tbody tr:hover { background: #eceff3; }
table tbody tr:last-child td { border-bottom: 0; }

.standing, .race { padding: 15px 18px; transition: background .15s ease; }
.standing:hover, .race:hover { background: #fafafb; }
.winner { border-radius: 999px; background: var(--accent-light); color: var(--accent-dark); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  margin-bottom: 22px;
  padding: 8px 11px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,.76);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 1px 3px rgba(17,19,24,.04);
  transition: color .15s ease, transform .15s ease, border-color .15s ease, background .15s ease;
}

.back-link span { color: var(--accent); font-size: 19px; line-height: 1; }
.back-link:hover { border-color: rgba(var(--accent-rgb),.3); background: #fff; color: var(--text); transform: translateX(-3px); }

.season-overview {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.65fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 72px;
  border: 1px solid rgba(17,19,24,.09);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.season-champion {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 170px;
  padding: 30px 34px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-gradient-end));
  color: #fff;
}

.season-champion::after {
  position: absolute;
  right: -55px;
  bottom: -70px;
  width: 170px;
  height: 170px;
  border: 26px solid rgba(255,255,255,.1);
  border-radius: 50%;
  content: "";
}

.season-champion .summary-label,
.season-fact > span {
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.season-champion .summary-label { color: rgba(255,255,255,.72); }
.season-champion strong { position: relative; z-index: 1; font-size: clamp(27px, 3vw, 40px); line-height: 1.05; letter-spacing: -.045em; }
.season-champion small { position: relative; z-index: 1; margin-top: 9px; color: rgba(255,255,255,.75); font-size: 13px; }

.season-facts { display: grid; grid-template-columns: .7fr .8fr 1.35fr 1.35fr; }
.season-fact { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 26px; border-right: 1px solid var(--border); }
.season-fact:last-child { border-right: 0; }
.season-fact > span { color: var(--text-muted); }
.season-fact strong { overflow: hidden; color: var(--text); font-size: clamp(21px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.035em; text-overflow: ellipsis; }
.season-fact small { margin-top: 7px; color: var(--text-muted); }
.podium-fact strong { font-size: clamp(17px, 1.65vw, 23px); }

.standings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 17px;
  margin: -4px 0 17px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,.65);
  color: var(--text-secondary);
  font-size: 11px;
}

.standings-legend > div { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend-swatch { width: 13px; height: 13px; border: 1px solid rgba(17,19,24,.1); border-radius: 3px; }
.legend-markers { padding-left: 4px; }
.legend-markers sup, .legend-markers sub, .result-marker, .sprint-points { color: var(--accent-dark); font-size: 9px; font-weight: 900; }

.standings-mode {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #eceef1;
}

.f2-standings-mode-row { display: flex; justify-content: flex-end; margin: -8px 0 12px; }

.standings-mode-button {
  min-width: 72px;
  padding: 8px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}

.standings-mode-button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 5px rgba(17,19,24,.12);
}

.championship-table-wrap { position: relative; isolation: isolate; overflow-x: auto; }
.championship-table th, .championship-table td { height: 40px; padding: 7px 9px; border-color: var(--border); }
.championship-table thead th { background: #17191f; color: #d9dce2; }
.championship-table thead th:first-child, .championship-table thead th:nth-child(2) { color: #fff; }
.championship-table .name-column a { color: var(--text); font-weight: 750; }
.championship-table .has-points { background: #eef8f0; }

#driver-table { font-variant-numeric: tabular-nums; }
#driver-table .position-column { position: sticky; left: 0; z-index: 4; width: 48px; min-width: 48px; }
#driver-table .name-column {
  position: sticky;
  left: 48px;
  z-index: 4;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  white-space: nowrap;
  box-shadow: 7px 0 12px -12px rgba(17,19,24,.6);
}
#driver-table .name-column a,
#driver-table .name-column a:visited,
#driver-table .name-column a:hover,
#driver-table .name-column a:active { color: #111318; }
#driver-table thead .position-column, #driver-table thead .name-column { z-index: 7; background: #17191f; }
#driver-table tbody .position-column { background: #f4f5f7; }
#driver-table tbody .name-column { background: #fff; }
#driver-table .race-column { min-width: 56px; color: #fff; font-size: 10px; letter-spacing: .06em; }
#driver-table .race-point { position: relative; z-index: 1; min-width: 56px; color: #24262c; font-size: 12px; font-weight: 750; white-space: nowrap; }
#driver-table .race-point > span { display: inline-block; min-width: 14px; }
.championship-table .result-marker { position: relative; top: -.2em; margin-left: 1px; }
.championship-table .pole-position::after { content: 'PP'; position: relative; bottom: -.25em; margin-left: 1px; color: var(--accent-dark); font-size: 9px; font-weight: 900; }
#driver-table .sprint-points { position: relative; bottom: -.25em; margin-left: 1px; }
#driver-table[data-value-mode="position"] .sprint-points { display: none; }
#driver-table .points-column { position: sticky; right: 0; z-index: 4; width: 72px; min-width: 72px; background: #fff; box-shadow: -7px 0 12px -12px rgba(17,19,24,.65); }
#driver-table thead .points-column { z-index: 7; background: #17191f; }
.championship-table .result-win, .legend-swatch.result-win { background: #fff1ad; }
.championship-table .result-podium, .legend-swatch.result-podium { background: #ffe0ad; }
.championship-table .result-points, .legend-swatch.result-points { background: #dff4e2; }
.championship-table .result-finish, .legend-swatch.result-finish { background: #e8ecfb; }
.championship-table .result-retired, .legend-swatch.result-retired { background: #f6dcea; }
.championship-table .result-disqualified, .legend-swatch.result-disqualified { background: #17191f; color: #fff; }
#driver-table .race-point.result-disqualified,
#driver-table .race-point.result-disqualified .result-value,
#driver-table .race-point.result-disqualified .sprint-points { color: #fff; }
.championship-table .result-disqualified.pole-position::after { color: #fff; }
.championship-table .result-empty { background: #f6f7f8; color: #a7abb2; }
#driver-table tbody tr:hover .name-column,
#driver-table tbody tr:hover .position-column,
#driver-table tbody tr:hover .points-column { filter: brightness(.975); }

#constructor-table { font-variant-numeric: tabular-nums; }
#constructor-table .position-column { position: sticky; left: 0; z-index: 4; width: 48px; min-width: 48px; }
#constructor-table .name-column {
  position: sticky;
  left: 48px;
  z-index: 4;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  white-space: nowrap;
  box-shadow: 7px 0 12px -12px rgba(17,19,24,.6);
}
#constructor-table .name-column a,
#constructor-table .name-column a:visited,
#constructor-table .name-column a:hover,
#constructor-table .name-column a:active { color: #111318; }
#constructor-table thead .position-column,
#constructor-table thead .name-column { z-index: 7; background: #17191f; }
#constructor-table tbody .position-column { background: #f4f5f7; }
#constructor-table tbody .name-column { background: #fff; }
#constructor-table .race-column,
#constructor-table .race-point { min-width: 56px; white-space: nowrap; }
#constructor-table .constructor-points { color: #24262c; font-weight: 750; }
#constructor-table .constructor-points.result-win { background: #fff1ad; }
#constructor-table .constructor-points.result-podium { background: #ffe0ad; }
#constructor-table .constructor-points.result-points { background: #dff4e2; }
#constructor-table .constructor-points.result-finish { background: #e8ecfb; }
#constructor-table .constructor-points.result-empty { background: #f6f7f8; }
#constructor-table .sprint-points { position: relative; bottom: -.25em; margin-left: 1px; }
#constructor-table .race-point { position: relative; z-index: 1; }
#constructor-table .points-column { position: sticky; right: 0; z-index: 4; width: 72px; min-width: 72px; background: #fff; box-shadow: -7px 0 12px -12px rgba(17,19,24,.65); }
#constructor-table thead .points-column { z-index: 7; background: #17191f; }

#driver-table .name-column > a,
#driver-table .driver-name,
#constructor-table .name-column > a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 620px) {
  #driver-table .name-column,
  #constructor-table .name-column {
    width: 168px;
    min-width: 168px;
    max-width: 168px;
  }
}

.season-map {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  min-height: 310px;
  border: 1px solid rgba(17,19,24,.09);
  border-radius: 17px;
  background: linear-gradient(180deg, #f9fafb, #eef1f4);
  box-shadow: var(--shadow-small);
}

.season-map-loading { display: grid; min-height: 310px; place-items: center; color: var(--text-muted); }
.season-map-svg { display: block; width: 100%; height: auto; }
.map-ocean { fill: #f7f9fb; stroke: #d9dde3; stroke-width: 1; }
.map-country { fill: #dfe3e8; stroke: #fff; stroke-width: .6; }
.calendar-route { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .72; }
.calendar-stop { cursor: pointer; outline: none; }
.calendar-stop .calendar-stop-hit { fill: transparent; stroke: none; pointer-events: all; }
.calendar-stop .calendar-stop-marker { fill: #17191f; stroke: #fff; stroke-width: 2; transition: r .15s ease, fill .15s ease; }
.calendar-stop text { fill: #fff; font-size: 7px; font-weight: 850; pointer-events: none; }
.calendar-stop:hover .calendar-stop-marker, .calendar-stop:focus .calendar-stop-marker { r: 11px; fill: var(--accent); }

.season-map-tooltip {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  width: 220px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(23,25,31,.96);
  color: #fff;
  box-shadow: 0 12px 30px rgba(17,19,24,.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity .15s ease, transform .15s ease;
}

.season-map-tooltip.visible { opacity: 1; transform: translateY(0); }
.season-map-tooltip strong { color: #ff6b77; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.season-map-tooltip span { margin-top: 3px; font-size: 13px; font-weight: 750; }
.season-map-tooltip small { margin-top: 3px; color: #b9bdc6; }

.calendar-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calendar-race { min-width: 0; padding: 13px 15px; border-radius: 12px; border-color: rgba(17,19,24,.08); box-shadow: var(--shadow-small); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.calendar-race:hover { border-color: rgba(var(--accent-rgb),.3); transform: translateX(3px); }
.calendar-race.map-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.1); }
.calendar-round { color: var(--accent); font-weight: 850; }
.calendar-date { font-size: 11px; }
.calendar-name strong { font-size: 13px; }
.calendar-name span { font-size: 11px; }
.calendar-laps span { font-size: 16px; }

.error { border-radius: 12px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination[hidden] { display: none; }
.pagination-pages { display: flex; align-items: center; gap: 5px; }
.pagination button { display: grid; min-width: 34px; height: 34px; padding: 0 8px; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-secondary); font-size: 10px; font-weight: 800; box-shadow: 0 1px 2px rgba(17,19,24,.03); }
.pagination button:hover:not(:disabled) { border-color: rgba(var(--accent-rgb),.35); color: var(--accent-dark); }
.pagination button.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.pagination button:disabled { cursor: default; opacity: .35; }
.pagination-gap { width: 20px; color: var(--text-muted); font-size: 11px; text-align: center; }
.pagination-count { margin-left: 8px; color: var(--text-muted); font-size: 9px; }

.footer {
  padding: 46px 0 42px;
  border-top: 0;
  background: #17191f;
  color: #8e939d;
}

.footer-content { display: grid; gap: 28px; }
.footer-main { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr); align-items: start; gap: 70px; }
.footer-primary { display: flex; flex-direction: column; }
.footer-brand { width: max-content; color: #fff; font-size: 23px; font-weight: 900; letter-spacing: -.055em; }
.footer-brand span { color: var(--accent); }
.footer-primary p { max-width: 280px; margin: 12px 0 0; color: #8e939d; font-size: 10px; line-height: 1.6; }
.footer-navigation { display: grid; grid-template-columns: repeat(2,minmax(150px,1fr)); gap: 28px; }
.footer-link-group { display: grid; align-content: start; justify-items: start; gap: 9px; }
.footer-link-group h2 { margin: 0 0 5px; color: #fff; font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.footer-link-group a { color: #b9bdc6; font-size: 12px; line-height: 1.45; }
.footer-link-group a:hover { color: #fff; }
.footer-link-group a:focus-visible { border-radius: 2px; outline: 2px solid var(--accent); outline-offset: 4px; }
.footer-legal { display: grid; gap: 8px; }
.footer-legal p { margin: 0; color: #777d88; font-size: 9px; line-height: 1.55; }
.footer-legal p:first-child { color: #b9bdc6; font-weight: 700; }
.footer-legal a { color: #b9bdc6; text-decoration: underline; text-decoration-color: rgba(185,189,198,.35); text-underline-offset: 2px; }
.footer-legal a:hover { color: #fff; }
.footer-policy-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
.footer-policy-links a, .footer-policy-links button { border: 0; padding: 0; background: none; color: #b9bdc6; font: inherit; font-size: 10px; text-decoration: underline; text-decoration-color: rgba(185,189,198,.35); text-underline-offset: 2px; cursor: pointer; }
.footer-policy-links a:hover, .footer-policy-links button:hover { color: #fff; }

@media (max-width: 520px) {
  .footer-navigation { grid-template-columns: 1fr; gap: 24px; }
  .footer-link-group { gap: 4px; }
  .footer-link-group a { display: inline-flex; min-height: 36px; align-items: center; }
}

/* Rich database detail pages */
/* F1 constructor archive: compact cards with separate season and career context. */
.constructors-page .constructor-archive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); scroll-margin-top: 90px; }
.constructors-page .constructor-archive-card { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 18px; border-top: 3px solid var(--accent); }
.constructors-page .constructor-champion-card { position: relative; padding-top: 34px; }
.constructors-page .constructor-champion-badge { max-width: calc(100% - 36px); font-size: 8px; }
.constructor-card-heading h3 { margin: 0; font-size: 21px; line-height: 1.15; }
.constructor-card-heading p { margin: 6px 0 0; font-size: 12px; line-height: 1.4; }
.constructor-card-heading .constructor-full-name { color: var(--text-secondary); }
.constructor-card-years { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.constructor-card-label { display: block; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.constructor-season-snapshot { padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.constructor-season-snapshot > strong { display: block; margin-top: 6px; font-size: 15px; }
.constructor-season-snapshot p { margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.constructor-card-record { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 7px; font-size: 11px; color: var(--text-secondary); }
.constructor-card-record strong { color: var(--text); font-size: 15px; }
.constructor-archive-grid > .constructor-empty-state { grid-column: 1 / -1; padding: 30px; text-align: center; }
.constructor-card-skeleton { border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.constructor-card-skeleton > * { display: block; height: 15px; width: 65%; border-radius: 4px; background: var(--surface-alt); animation: circuit-loading 1.4s ease-in-out infinite alternate; }
.constructor-card-skeleton > i { width: 75%; height: 25px; }
.constructor-card-skeleton > b { height: 40px; width: 90%; }
.constructor-card-skeleton > em { height: 55px; width: 100%; }
@media (max-width: 1180px) { .constructors-page .constructor-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .constructors-page .constructor-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .constructors-page .constructor-archive-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .constructor-card-skeleton > * { animation: none; } }
/* Constructor detail: compact records, selective cards and complete grouped race history. */
.constructor-detail-page .constructor-profile-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 320px); gap: 30px; align-items: center; min-height: 230px; }
.constructor-detail-page .constructor-profile-hero > div, .constructor-current-season { position: relative; z-index: 1; min-width: 0; }
.constructor-detail-page .constructor-profile-hero h1 { margin: 0; font-size: clamp(36px, 5vw, 58px); overflow-wrap: anywhere; }
.constructor-profile-hero .detail-sub { margin: 12px 0; }
.constructor-current-season { display: grid; gap: 12px; padding-left: 26px; border-left: 1px solid rgba(255,255,255,.2); font-size: 13px; color: #d2d5dc; }
.constructor-current-season > strong { color: #fff; font-size: 22px; }
.constructor-current-season > span:not(.eyebrow) { margin-top: 4px; font-size: 11px; }
.constructor-current-season a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.constructor-section-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.constructor-section-nav a { color: var(--text-secondary); font-size: 13px; font-weight: 750; }
.constructor-section-nav a:hover { color: var(--accent); }
.constructor-plain-section { margin-top: 32px; scroll-margin-top: 95px; }
.constructor-record-section { margin-top: 25px; scroll-margin-top: 95px; }
.constructor-plain-section .section-heading { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); align-items: flex-end; }
.constructor-plain-section h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.035em; }
.constructor-stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; }
.constructor-stat-strip > div { min-width: 0; padding: 12px 18px; border-right: 1px solid var(--border); }
.constructor-stat-strip > div:first-child { padding-left: 0; }
.constructor-stat-strip > div:last-child { border-right: 0; }
.constructor-stat-strip dt { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.constructor-stat-strip dd { margin: 8px 0 0; font-size: clamp(22px, 2.5vw, 32px); font-weight: 800; font-variant-numeric: tabular-nums; }
.constructor-timeline-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; }
.constructor-timeline-controls label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-secondary); }
.constructor-timeline-controls select { min-width: 145px; }
.constructor-detail-page .constructor-career-timeline { position: relative; padding: 8px 18px 14px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.constructor-detail-page .constructor-career-timeline .career-timeline-item { min-height: 185px; }
.constructor-detail-filters { display: grid; grid-template-columns: minmax(160px, 1fr) 150px minmax(150px, 210px) auto; gap: 12px; align-items: end; margin: 18px 0; }
.constructor-detail-filters label { display: grid; gap: 7px; color: var(--text-secondary); font-size: 12px; min-width: 0; }
.constructor-detail-filters input, .constructor-detail-filters select { width: 100%; min-width: 0; }
.constructor-detail-page .constructor-driver-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.constructor-detail-page .constructor-driver-card { min-height: 0; padding: 15px; }
.constructor-detail-page .constructor-driver-card > strong { margin-top: 8px; }
.constructor-detail-page .constructor-driver-record { margin-top: 9px; }
.constructor-detail-page .constructor-chassis-card { min-height: 0; }
.constructor-detail-page .chassis-card-heading { padding: 16px 16px 10px; }
.constructor-detail-page .chassis-card-heading h3 { font-size: 18px; }
.constructor-detail-page .chassis-card-heading a { color: var(--text); }
.constructor-detail-page .chassis-engine-block { padding: 12px 16px; }
.constructor-detail-page .chassis-engine-block p { font-size: 12px; line-height: 1.5; margin-bottom: 0; }
.constructor-detail-page .empty-state { grid-column: 1 / -1; }
.constructor-history-table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
.constructor-history-table { width: 100%; min-width: 780px; border-collapse: collapse; table-layout: fixed; }
.constructor-history-table th, .constructor-history-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: middle; }
.constructor-history-table thead th { color: var(--text-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.constructor-history-table th:nth-child(1) { width: 85px; }
.constructor-history-table th:nth-child(2) { width: 25%; }
.constructor-history-table th:nth-child(4) { width: 70px; text-align: right; }
.constructor-history-table tbody > tr:hover { background: var(--surface-alt); }
.constructor-history-table a { color: var(--text); font-weight: 700; }
.constructor-history-table a:hover { color: var(--accent); }
.constructor-history-table td > small, .constructor-history-table th > small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 10px; font-weight: 500; }
.constructor-history-table .result-points-total { text-align: right; font-size: 13px; }
.constructor-race-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; }
.constructor-race-result { display: grid; grid-template-columns: minmax(90px, 1fr) 46px 42px 46px; align-items: center; gap: 6px; min-width: 0; }
.constructor-race-result > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.constructor-race-result > span, .constructor-race-result > b { color: var(--text-muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.constructor-race-result > strong { justify-self: start; }
.constructor-race-result > small { grid-column: 1 / -1; overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.constructor-history-table .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.constructor-detail-page [role="status"]:not(:empty) { margin: 12px 0; font-size: 13px; color: var(--text-secondary); }
@media (max-width: 1000px) { .constructor-stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .constructor-stat-strip > div:nth-child(3n) { border-right: 0; } .constructor-stat-strip > div { padding: 14px; } .constructor-stat-strip > div:first-child { padding-left: 14px; } }
@media (max-width: 820px) { .constructor-detail-page .constructor-profile-hero { grid-template-columns: 1fr; gap: 22px; } .constructor-current-season { padding: 18px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.2); } .constructor-detail-page .constructor-driver-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .constructor-detail-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .constructor-race-results { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .constructor-detail-page .constructor-driver-grid { grid-template-columns: 1fr; } .constructor-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .constructor-stat-strip > div:nth-child(3n) { border-right: 1px solid var(--border); } .constructor-stat-strip > div:nth-child(2n) { border-right: 0; } .constructor-detail-filters { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .constructor-detail-page .circuit-detail-skeleton { animation: none; } }
/* Circuit detail follows the race page's section labels and selective card surfaces. */
.circuit-detail-page .circuit-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: center; gap: 28px; min-height: 250px; }
.circuit-detail-page .circuit-detail-hero h1 { margin-top: 0; font-size: clamp(34px, 5vw, 58px); overflow-wrap: anywhere; }
.circuit-detail-hero > div, .circuit-detail-hero > figure { position: relative; z-index: 1; }
.circuit-detail-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; color: #c5c8ce; font-size: 13px; }
.circuit-detail-meta a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.circuit-detail-hero figure { margin: 0; text-align: center; color: #c5c8ce; font-size: 11px; }
.circuit-detail-hero figure img { display: block; width: 100%; height: 190px; object-fit: contain; filter: invert(1); }
.circuit-detail-hero figcaption { margin-top: 10px; }
.circuit-facts-section { margin-top: 25px; }
.circuit-facts dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.circuit-facts dl > div { min-width: 0; padding: 20px 22px; border-right: 1px solid var(--border); }
.circuit-facts dl > div:last-child { border-right: 0; }
.circuit-facts dt { margin-bottom: 8px; color: var(--text-muted); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.circuit-facts dd { margin: 0; font-size: clamp(22px, 2.5vw, 32px); font-weight: 800; letter-spacing: -.035em; }
.circuit-facts-section > p { margin-top: 12px; }
.circuit-plain-section { margin-top: 42px; }
.circuit-plain-section h2 { margin: 0; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; }
.circuit-plain-section .section-heading { align-items: flex-end; margin-bottom: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.circuit-record-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.circuit-record-columns > div:not(.circuit-detail-skeleton) { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.circuit-record-columns h3 { padding: 17px 20px; border-bottom: 1px solid var(--border); font-size: 14px; margin: 0; }
.circuit-record-columns ol { list-style: none; margin: 0; padding: 0 20px; }
.circuit-record-columns li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.circuit-record-columns li:last-child { border-bottom: 0; }
.circuit-record-columns li a { color: var(--text); font-weight: 700; }
.circuit-record-columns > div > p { padding: 0 20px; }
.circuit-record-columns li span { white-space: nowrap; color: var(--text-secondary); }
.circuit-history-filters { display: grid; grid-template-columns: minmax(200px, 1fr) 150px 165px auto; gap: 12px; align-items: end; margin: 20px 0; }
.circuit-history-filters label { display: grid; gap: 7px; font-size: 12px; color: var(--text-secondary); }
.circuit-history-filters input, .circuit-history-filters select { width: 100%; min-width: 0; }
.circuit-history-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.circuit-history-table { width: 100%; min-width: 740px; border-collapse: collapse; font-size: 13px; }
.circuit-history-table .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.circuit-history-table th { text-align: left; font-size: 11px; color: var(--text-muted); }
.circuit-history-table th, .circuit-history-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); }
.circuit-history-table small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.circuit-history-table td:last-child { font-variant-numeric: tabular-nums; }
.circuit-history-table a { color: var(--text); font-weight: 700; }
.circuit-history-empty { padding: 25px 0; text-align: center; }
.circuit-detail-page #circuit-races { scroll-margin-top: 90px; }
.circuit-scheduled-list { display: grid; margin-top: 12px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.circuit-scheduled-list a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 700; }
.circuit-scheduled-list a:last-child { border-bottom: 0; }
.circuit-scheduled-list a > span:last-child { color: var(--text-secondary); }
.circuit-detail-skeleton { min-height: 90px; border-radius: 12px; background: var(--surface-alt); animation: circuit-loading 1.4s ease-in-out infinite alternate; }
.circuit-hero-placeholder { min-height: 250px; }
.circuit-history-placeholder { min-height: 300px; }
.circuit-detail-page #circuit-load-status:not(:empty) { margin-bottom: 14px; font-size: 13px; color: var(--text-secondary); }
@media (max-width: 850px) { .circuit-detail-page .circuit-detail-hero { grid-template-columns: minmax(0, 1fr) 220px; } .circuit-history-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 850px) { .circuit-facts dl > div { padding: 17px 14px; } }
@media (max-width: 600px) { .circuit-facts dl > div { border-bottom: 1px solid var(--border); } .circuit-facts dl > div:nth-child(even) { border-right: 0; } .circuit-facts dl > div:last-child { grid-column: 1 / -1; border-bottom: 0; } }
@media (max-width: 600px) { .circuit-detail-page .circuit-detail-hero { grid-template-columns: 1fr; gap: 18px; } .circuit-detail-hero figure img { height: 145px; } .circuit-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .circuit-record-columns { grid-template-columns: 1fr; gap: 24px; } .circuit-history-filters { grid-template-columns: 1fr; } .circuit-plain-section .section-heading { align-items: flex-start; gap: 12px; flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .circuit-detail-skeleton { animation: none; } }
.detail-section { margin-top: 42px; padding: 28px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.58); box-shadow: 0 1px 2px rgba(17,19,24,.025); }
.detail-section > .section-heading { margin-bottom: 22px; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.detail-section .section-heading h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.04em; }

.profile-hero { display: flex; align-items: flex-end; justify-content: space-between; min-height: 310px; gap: 30px; }
.profile-hero-copy { position: relative; z-index: 2; min-width: 0; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; color: #b9bdc6; font-size: 12px; }
.profile-meta span { position: relative; }
.profile-meta span + span::before { position: absolute; left: -12px; color: var(--accent); content: "·"; }
.profile-number, .profile-monogram { position: relative; z-index: 1; color: rgba(255,255,255,.09); font-size: clamp(110px, 19vw, 230px); font-weight: 900; line-height: .72; letter-spacing: -.09em; }
.profile-monogram { font-size: clamp(90px, 15vw, 180px); }
.driver-profile-hero { min-height: 285px; }
.driver-profile-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.driver-profile-badges > * { padding: 6px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; background: rgba(255,255,255,.07); color: #fff; font-size: 8px; font-weight: 850; font-style: normal; letter-spacing: .07em; text-transform: uppercase; }
.driver-profile-badges > strong { border-color: rgba(var(--accent-rgb),.48); background: rgba(var(--accent-rgb),.18); }
.driver-plain-section { padding: 0; border: 0; background: transparent; box-shadow: none; }
.driver-detail-page .driver-plain-section { padding: 0; }
.circuit-coordinate { position: relative; z-index: 2; display: grid; gap: 5px; padding: 17px 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); color: #d9dce2; font-variant-numeric: tabular-nums; font-size: 12px; }
.circuit-hero-visual { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 22px; align-self: stretch; }
.circuit-hero-map { width: clamp(220px, 28vw, 360px); height: 225px; object-fit: contain; filter: invert(1); opacity: .82; }

.detail-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: #fff; box-shadow: var(--shadow-small); }
.detail-stat { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 135px; padding: 22px; border-right: 1px solid var(--border); }
.detail-stat:last-child { border-right: 0; }
.detail-stat span { margin-bottom: 12px; color: var(--text-muted); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.detail-stat strong { color: var(--text); font-size: clamp(25px, 3vw, 38px); line-height: 1; letter-spacing: -.045em; }
.detail-stat > small { margin-top: 8px; color: var(--text-muted); font-size: 8px; }
.detail-stat.highlight { background: linear-gradient(145deg, #fff6f6, #fff); }
.detail-stat.highlight::before { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent); content: ""; }

.history-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.history-card { position: relative; display: flex; flex-direction: column; min-height: 125px; padding: 19px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-small); transition: transform .17s ease, border-color .17s ease; }
.career-timeline { display: flex; overflow-x: auto; padding: 8px 2px 18px; scroll-padding-left: 2px; scroll-snap-type: x proximity; }
.career-timeline-item { position: relative; display: flex; min-width: 185px; min-height: 190px; flex: 1 0 185px; flex-direction: column; padding: 30px 14px 15px; border-bottom: 1px solid var(--border); color: var(--text); scroll-snap-align: start; transition: background .16s ease; }
.constructor-career-timeline .career-timeline-item { min-width: 220px; flex-basis: 220px; min-height: 225px; }
.career-timeline-item:hover { background: var(--surface-alt); }
.timeline-marker { position: absolute; top: 9px; right: 0; left: 0; height: 2px; background: var(--border); }
.timeline-marker i { position: absolute; top: -5px; left: 14px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #8c929d; box-shadow: 0 0 0 1px var(--border); }
.career-timeline-item:first-child .timeline-marker { left: 14px; }
.career-timeline-item:last-child .timeline-marker { right: calc(100% - 20px); }
.career-timeline-item.champion .timeline-marker i { background: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.14); }
.timeline-year { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.career-timeline-item > strong { margin-top: 8px; font-size: 13px; }
.career-timeline-item > small { margin-top: 4px; color: var(--text-muted); }
.timeline-context { margin-top: 16px; color: var(--text-secondary); font-size: 9px; font-weight: 750; line-height: 1.45; }
.timeline-people { margin-top: 7px; color: var(--text-muted); font-size: 8px; line-height: 1.45; }
.career-timeline-item > em { margin-top: auto; padding-top: 12px; color: var(--accent); font-size: 7px; font-style: normal; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.f2-career-item { min-width: 215px; min-height: 230px; flex-basis: 215px; }
.f2-season-record { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.f2-season-record span { padding: 4px 6px; border-radius: 5px; background: var(--surface-alt); color: var(--text-muted); font-size: 8px; font-weight: 750; }
.f2-driver-results .f2-result-award { margin-left: 2px; color: var(--accent-dark); font-size: 8px; font-weight: 900; }
.history-card:hover { border-color: rgba(var(--accent-rgb),.35); transform: translateY(-2px); }
.history-card.champion { border-color: rgba(var(--accent-rgb),.25); background: linear-gradient(145deg, var(--accent-light), #fff); }
.history-card.champion::after { position: absolute; right: -22px; bottom: -32px; width: 82px; height: 82px; border: 13px solid rgba(var(--accent-rgb),.07); border-radius: 50%; content: ""; }
.history-year { color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.history-card strong { margin-top: auto; font-size: 17px; letter-spacing: -.025em; }
.history-card small { margin-top: 4px; color: var(--text-muted); }

.detail-results table th, .detail-results table td { vertical-align: middle; }
.detail-results table td:nth-child(2) { min-width: 250px; }
.detail-results table td:nth-child(2) small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.detail-results table a { color: var(--text); font-weight: 700; }
.detail-results table a:hover { color: var(--accent-dark); }
.finish-position { display: inline-grid; min-width: 30px; height: 28px; place-items: center; border-radius: 7px; background: #eef0f3; font-weight: 800; }
.finish-position.podium { background: #fff0bc; }
.result-points-total { font-weight: 850; }
.driver-stat-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.driver-stat-grid .detail-stat { min-height: 115px; border-bottom: 1px solid var(--border); }
.driver-stat-grid .detail-stat:nth-child(4n) { border-right: 0; }
.driver-stat-grid .detail-stat:nth-last-child(-n+4) { border-bottom: 0; }
.driver-timeline-heading { align-items: flex-end; }
.driver-timeline-actions { display: flex; align-items: center; gap: 6px; }
.driver-timeline-actions .section-note { margin-right: 7px; }
.driver-timeline-actions button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-weight: 850; }
.driver-timeline-actions button:hover:not(:disabled) { border-color: rgba(var(--accent-rgb),.4); color: var(--accent-dark); }
.driver-timeline-actions button:disabled { opacity: .32; }
.driver-timeline-card { overflow: hidden; padding: 16px 17px 0; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.driver-season-item { min-width: 235px; min-height: 245px; flex-basis: 235px; }
.driver-season-item.current .timeline-marker i { background: #20232a; box-shadow: 0 0 0 3px rgba(32,35,42,.12); }
.driver-season-record { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.driver-season-record span { padding: 4px 6px; border-radius: 5px; background: var(--surface-alt); color: var(--text-muted); font-size: 8px; font-weight: 750; }
.driver-result-filters { display: grid; grid-template-columns: minmax(230px,1fr) 150px 160px auto; align-items: end; gap: 9px; margin-bottom: 12px; }
.driver-result-filters label { display: grid; min-width: 0; gap: 7px; }
.driver-result-filters label > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.driver-result-filters input, .driver-result-filters select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; background: #f8f9fa; color: var(--text); font-size: 11px; font-weight: 700; }
.driver-result-filters button { min-height: 42px; }
.driver-results-section > .browser-count { margin: 4px 0 13px; }
.driver-results-section table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.driver-results-section table th { position: sticky; z-index: 1; top: 0; background: #fff; }
.driver-results-section table td:nth-child(5) small { display: block; max-width: 105px; margin-top: 4px; color: var(--text-muted); font-size: 8px; line-height: 1.3; }
.finish-position.retired { background: #eceef1; color: var(--text-muted); }
.driver-result-movement { font-weight: 850; }
.driver-result-movement.gain { color: #16834a; }
.driver-result-movement.loss { color: #b52b36; }
.driver-result-awards { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.driver-result-awards span { padding: 3px 5px; border-radius: 4px; background: var(--accent-light); color: var(--accent-dark); font-size: 7px; font-weight: 850; }
.driver-result-cards { display: none; }
.driver-detail-skeleton > div { display: grid; width: min(520px,70%); gap: 15px; }
.driver-detail-skeleton b, .driver-detail-skeleton span, .driver-detail-skeleton em,
.driver-stat-skeleton::after, .driver-timeline-skeleton i, .driver-results-skeleton i { display: block; border-radius: 999px; background: linear-gradient(90deg,#30333a 20%,#3b3e46 38%,#30333a 56%); background-size: 220% 100%; animation: driver-card-loading 1.15s ease-in-out infinite; content: ""; }
.driver-detail-skeleton b { width: 72%; height: 44px; }
.driver-detail-skeleton span { width: 58%; height: 12px; }
.driver-detail-skeleton em { width: 46%; height: 10px; }
.driver-stat-skeleton::after { width: 65%; height: 28px; background: linear-gradient(90deg,#eceef1 20%,#f7f8f9 38%,#eceef1 56%); background-size: 220% 100%; }
.driver-timeline-skeleton { gap: 8px; }
.driver-timeline-skeleton i { min-width: 220px; height: 210px; border-radius: 11px; background: linear-gradient(90deg,#eceef1 20%,#f7f8f9 38%,#eceef1 56%); background-size: 220% 100%; }
.driver-results-skeleton { display: grid; gap: 8px; padding: 8px 0; }
.driver-results-skeleton i { width: 100%; height: 48px; border-radius: 7px; background: linear-gradient(90deg,#eceef1 20%,#f7f8f9 38%,#eceef1 56%); background-size: 220% 100%; }
.circuit-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.circuit-race-card { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 17px; min-height: 112px; padding: 17px 19px; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-small); transition: border-color .17s ease, transform .17s ease; }
.circuit-race-card:hover { border-color: rgba(var(--accent-rgb),.3); transform: translateY(-2px); }
.circuit-race-year { color: var(--accent); font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.circuit-race-copy { display: flex; flex-direction: column; min-width: 0; }
.circuit-race-copy strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.circuit-race-copy > span { margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.circuit-race-copy small { margin-top: 8px; color: var(--text-secondary); }
.circuit-race-copy small a { font-weight: 750; }
.text-link { display: inline-flex; gap: 6px; color: var(--text-secondary); font-size: 11px; font-weight: 750; white-space: nowrap; }
.text-link:hover { color: var(--accent); }

.constructor-driver-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.constructor-driver-card { display: flex; min-height: 150px; flex-direction: column; padding: 18px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #fff; color: var(--text); box-shadow: var(--shadow-small); transition: transform .16s ease,border-color .16s ease; }
.constructor-driver-card:hover { border-color: rgba(var(--accent-rgb),.32); transform: translateY(-2px); }
.constructor-driver-years { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .09em; }
.constructor-driver-card > strong { margin-top: auto; font-size: 16px; letter-spacing: -.025em; }
.constructor-driver-card > span { margin-top: 4px; color: var(--text-secondary); font-size: 10px; }
.constructor-driver-record { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.constructor-driver-record small { padding: 4px 6px; border-radius: 5px; background: #f0f1f3; color: var(--text-muted); font-size: 8px; font-weight: 750; }
.constructor-chassis-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.constructor-chassis-card { display: flex; min-height: 205px; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-small); }
.chassis-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px; border-bottom: 1px solid var(--border); background: #f8f9fa; }
.chassis-card-heading span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.chassis-card-heading h3 { margin: 5px 0 0; font-size: 17px; line-height: 1.15; letter-spacing: -.03em; }
.chassis-card-heading > small { flex: 0 0 auto; color: var(--text-muted); font-size: 9px; }
.chassis-engine-block { padding: 17px 20px 20px; }
.chassis-engine-block > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.chassis-engine-block ul { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.chassis-engine-block li, .chassis-engine-block p { margin: 0; color: var(--text-secondary); font-size: 10px; line-height: 1.4; }
.chassis-engine-block li::before { margin-right: 7px; color: var(--accent); content: "•"; }
.chassis-browser-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.chassis-browser-card { min-height: 270px; }
.chassis-constructor { padding: 10px 20px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 9px; font-weight: 750; }
.chassis-constructor a { color: var(--text-secondary); }
.chassis-constructor a:hover { color: var(--accent-dark); }
.engine-manufacturer-list { margin: 8px 0 16px !important; color: var(--text) !important; font-weight: 750; }

/* F1 chassis archive: exact seasons and compact, performance-led cards. */
.chassis-page .chassis-archive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); scroll-margin-top: 90px; }
.chassis-page .chassis-archive-card { display: flex; min-height: 0; flex-direction: column; gap: 12px; padding: 18px; border-top: 3px solid var(--accent); }
.chassis-page .chassis-card-heading { display: block; padding: 0; border: 0; background: transparent; }
.chassis-page .chassis-card-heading > span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .07em; }
.chassis-page .chassis-card-heading h3 { margin: 7px 0 0; font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
.chassis-archive-constructor { min-height: 18px; font-size: 12px; font-weight: 700; }
.chassis-archive-constructor a { color: var(--text-secondary); }
.chassis-archive-constructor a:hover { color: var(--accent); }
.chassis-archive-engine { padding: 11px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chassis-archive-engine p { margin: 6px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.4; }
.chassis-archive-performance { margin-top: auto; }
.chassis-archive-performance > small { display: block; margin-top: 8px; color: var(--text-muted); font-size: 9px; line-height: 1.35; }
.chassis-archive-grid > .chassis-empty-state { grid-column: 1 / -1; padding: 30px; text-align: center; }
.chassis-card-skeleton { min-height: 230px; padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
.chassis-card-skeleton > * { display: block; height: 15px; width: 65%; margin-bottom: 15px; border-radius: 4px; background: var(--surface-alt); animation: circuit-loading 1.4s ease-in-out infinite alternate; }
.chassis-card-skeleton > i { width: 75%; height: 24px; }
.chassis-card-skeleton > b { width: 50%; }
.chassis-card-skeleton > em { width: 100%; height: 55px; }
@media (max-width: 1180px) { .chassis-page .chassis-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .chassis-page .chassis-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .chassis-page .chassis-archive-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .chassis-card-skeleton > * { animation: none; } }

.junior-chassis-page-head { margin-bottom: 28px; }
.junior-chassis-page-head h1 { margin-bottom: 8px; }
.junior-chassis-page-head p { max-width: 620px; }
.junior-technical-chassis-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,420px),1fr)); gap: 16px; }
.junior-technical-chassis-card { overflow: hidden; border: 1px solid rgba(var(--accent-rgb),.16); border-radius: 18px; background: #fff; box-shadow: 0 16px 40px rgba(19,25,35,.08); transition: transform .18s ease,box-shadow .18s ease; }
.junior-technical-chassis-card:hover { box-shadow: 0 20px 48px rgba(19,25,35,.12); transform: translateY(-3px); }
.junior-technical-chassis-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--border); background: #f8f9fa; }
.junior-technical-chassis-card > header span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .11em; }
.junior-technical-chassis-card > header h2 { margin: 5px 0 3px; font-size: 24px; letter-spacing: -.04em; }
.junior-technical-chassis-card > header p { margin: 0; color: var(--text-secondary); font-size: 10px; }
.junior-technical-chassis-card > header > strong { padding: 6px 8px; border-radius: 6px; background: var(--accent-light); color: var(--accent-dark); font-size: 8px; letter-spacing: .1em; }
.junior-chassis-quick-specs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--border); }
.junior-chassis-quick-specs > div { min-width: 0; padding: 14px; border-right: 1px solid var(--border); }
.junior-chassis-quick-specs > div:last-child { border-right: 0; }
.junior-chassis-quick-specs span, .junior-chassis-quick-specs small { display: block; color: var(--text-muted); font-size: 8px; }
.junior-chassis-quick-specs span { margin-bottom: 5px; font-weight: 850; letter-spacing: .1em; }
.junior-chassis-quick-specs strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.junior-chassis-quick-specs small { margin-top: 3px; line-height: 1.3; }
.junior-chassis-specification-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; padding: 22px; }
.junior-chassis-specification-groups h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: -.01em; }
.junior-chassis-specification-groups dl { display: grid; gap: 9px; margin: 0; }
.junior-chassis-specification-groups dl > div { display: grid; gap: 2px; }
.junior-chassis-specification-groups dt { color: var(--text-muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.junior-chassis-specification-groups dd { margin: 0; color: var(--text-secondary); font-size: 10px; line-height: 1.45; }
.junior-technical-chassis-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 22px 22px; }
.junior-technical-chassis-card > footer a { flex: 0 0 auto; color: var(--accent-dark); font-size: 9px; font-weight: 800; }

@media (max-width: 620px) {
  .junior-chassis-quick-specs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .junior-chassis-quick-specs > div:nth-child(2) { border-right: 0; }
  .junior-chassis-quick-specs > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .junior-chassis-specification-groups { grid-template-columns: 1fr; }
  .junior-technical-chassis-card > footer { align-items: flex-start; flex-direction: column; }
}

/* Race archive and session results */
.races-page .page-head { margin-bottom: 32px; }
.race-filters { display: grid; grid-template-columns: 1.5fr .65fr 1fr auto; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-small); }
.race-filters label { display: grid; gap: 7px; }
.race-filters label > span { color: var(--text-muted); font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.race-filters input, .race-filters select { width: 100%; height: 43px; padding: 0 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-alt); color: var(--text); font: inherit; font-size: 12px; }
.race-filters input:focus, .race-filters select:focus { border-color: rgba(var(--accent-rgb),.5); outline: 0; box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.08); }
.race-filters .button { height: 43px; }
.race-browser-heading { display: flex; justify-content: space-between; margin: 30px 2px 13px; }
.race-browser-heading strong { font-size: 13px; }
.race-browser-heading span { color: var(--text-muted); font-size: 11px; }
.race-archive { display: grid; gap: 8px; }
.race-archive-card { display: grid; grid-template-columns: 82px minmax(0,1fr) auto 28px; align-items: center; gap: 20px; min-height: 98px; padding: 15px 20px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-small); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.race-archive-card:hover { border-color: rgba(var(--accent-rgb),.3); box-shadow: 0 10px 28px rgba(16,18,24,.08); transform: translateY(-2px); }
.race-archive-date { display: flex; flex-direction: column; padding-right: 17px; border-right: 1px solid var(--border); }
.race-archive-date strong { color: var(--accent); font-size: 20px; letter-spacing: -.04em; }
.race-archive-date span { margin-top: 2px; color: var(--text-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.race-archive-copy h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.race-archive-copy p { margin: 5px 0 0; color: var(--text-secondary); font-size: 11px; }
.race-archive-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; color: var(--text-secondary); font-size: 11px; }
.race-archive-meta small { padding: 4px 7px; border-radius: 5px; background: var(--accent-light); color: var(--accent-dark); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.race-card-arrow { color: var(--text-muted); font-size: 17px; transition: color .15s ease, transform .15s ease; }
.race-archive-card:hover .race-card-arrow { color: var(--accent); transform: translateX(3px); }
:is(.f1-race-filters, .junior-race-filters) {
  grid-template-columns: minmax(0,1fr) auto;
  gap: 13px 16px;
}
:is(.f1-race-filters, .junior-race-filters) .race-filter-primary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.4fr .55fr 1fr;
  gap: 10px;
}
:is(.f1-race-filters, .junior-race-filters) .race-more-filters { display: block; border-top: 1px solid var(--border); padding-top: 13px; }
:is(.f1-race-filters, .junior-race-filters) .race-filter-advanced { display: grid; grid-template-columns: repeat(3,minmax(120px,1fr)); gap: 10px; }
:is(.f1-race-filters, .junior-race-filters) .race-more-filters summary { display: none; }
:is(.f1-race-filters, .junior-race-filters) .race-clear-filters { align-self: end; }
:is(.f1-race-filters, .junior-race-filters) .race-clear-filters:disabled { cursor: default; opacity: .35; }
.race-active-filters { display: flex; min-height: 31px; flex-wrap: wrap; gap: 7px; margin: 12px 2px 0; }
.race-active-filters:empty { min-height: 0; margin-top: 0; }
.race-active-filters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(var(--accent-rgb),.2);
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  text-transform: capitalize;
}
.race-active-filters button:hover { border-color: var(--accent); }
.race-active-filters button span { font-size: 13px; line-height: 1; }
.races-page .race-browser-heading { margin-top: 26px; }
.races-page .race-archive { gap: 34px; }
.race-season-group { min-width: 0; }
.race-season-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--border);
}
.race-season-heading > div { display: flex; align-items: center; gap: 11px; }
.race-season-heading h2 { margin: 0; color: var(--text); font-size: 28px; letter-spacing: -.045em; }
.race-season-heading span { padding: 5px 7px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.race-season-heading > small { color: var(--text-muted); font-size: 10px; font-weight: 750; }
.race-season-list { display: grid; gap: 6px; }
.race-season-subheading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 3px 1px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.race-season-subheading:not(:first-child) { margin-top: 8px; }
.race-season-subheading small { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 999px; background: var(--surface-alt); font-size: 8px; }
:is(.f1-race-archive-card, .series-race-archive-card) {
  grid-template-columns: 50px minmax(0,1fr) minmax(155px,.65fr) 210px;
  gap: 16px;
  min-height: 74px;
  padding: 10px 15px;
  border-radius: 10px;
}
:is(.f1-race-archive-card, .series-race-archive-card) .race-archive-date { padding-right: 13px; }
:is(.f1-race-archive-card, .series-race-archive-card) .race-archive-date strong { font-size: 17px; font-variant-numeric: tabular-nums; }
:is(.f1-race-archive-card, .series-race-archive-card) .race-archive-copy h3 { overflow: hidden; margin: 0; font-size: 14px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
:is(.f1-race-archive-card, .series-race-archive-card) .race-archive-copy p { overflow: hidden; margin: 3px 0 0; color: var(--text-secondary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.race-archive-winner { display: flex; min-width: 0; flex-direction: column; }
.race-archive-winner span { color: var(--text-muted); font-size: 7px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.race-archive-winner strong { overflow: hidden; margin-top: 3px; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.race-archive-winner small { overflow: hidden; margin-top: 2px; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
:is(.f1-race-archive-card, .series-race-archive-card) .race-archive-meta { gap: 4px; }
:is(.f1-race-archive-card, .series-race-archive-card) .race-archive-meta > div { display: flex; justify-content: flex-end; gap: 4px; }
:is(.f1-race-archive-card, .series-race-archive-card) .race-archive-meta small { display: inline-flex; }
:is(.f1-race-archive-card, .series-race-archive-card) .race-status-badge { background: var(--surface-alt); color: var(--text-muted); }
:is(.f1-race-archive-card, .series-race-archive-card)[data-status="upcoming"] { border-left: 3px solid var(--accent); background: linear-gradient(90deg, var(--accent-light), var(--surface) 16%); }
:is(.f1-race-archive-card, .series-race-archive-card)[data-status="upcoming"] .race-status-badge,
.series-race-archive-card[data-status="in-progress"] .race-status-badge { background: var(--accent); color: #fff; }
.series-race-archive-card[data-status="in-progress"] { border-left: 3px solid var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb),.08), var(--shadow-small); }
:is(.f1-race-archive-card, .series-race-archive-card)[data-status="no-result"] .race-status-badge { background: #f6dcea; color: #8a294f; }
.race-archive-loading,
.race-archive-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
}
.race-archive-loading { font-size: 11px; font-weight: 750; }
.race-archive-empty strong { color: var(--text); font-size: 16px; }
.race-archive-empty p { margin: 0 0 8px; font-size: 11px; }
.race-archive-empty .button { min-height: 40px; }
.race-season-pagination { margin-top: 34px; }
@media (max-width: 1100px) {
  :is(.f1-race-filters, .junior-race-filters) .race-filter-primary { grid-template-columns: 1.2fr .6fr 1fr; }
  :is(.f1-race-archive-card, .series-race-archive-card) { grid-template-columns: 48px minmax(0,1fr) minmax(135px,.7fr) 170px; }
}
@media (max-width: 700px) {
  .races-page .page-head { margin-bottom: 22px; }
  :is(.f1-race-filters, .junior-race-filters) { display: block; padding: 14px; }
  :is(.f1-race-filters, .junior-race-filters) .race-filter-primary {
    display: grid;
    grid-template-columns: 100px minmax(0,1fr);
    gap: 10px;
  }
  :is(.f1-race-filters, .junior-race-filters) .race-filter-primary .race-search-filter { grid-column: 1 / -1; }
  :is(.f1-race-filters, .junior-race-filters) .race-more-filters { display: block; margin-top: 11px; border-top: 1px solid var(--border); }
  :is(.f1-race-filters, .junior-race-filters) .race-more-filters summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 43px;
    color: var(--text);
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    list-style: none;
    text-transform: uppercase;
  }
  :is(.f1-race-filters, .junior-race-filters) .race-more-filters summary::-webkit-details-marker { display: none; }
  :is(.f1-race-filters, .junior-race-filters) .race-more-filters summary::after { color: var(--accent); content: '+'; font-size: 18px; }
  :is(.f1-race-filters, .junior-race-filters) .race-more-filters[open] summary::after { content: '−'; }
  :is(.f1-race-filters, .junior-race-filters) .race-more-filters summary span:not(:empty) { display: grid; width: 20px; height: 20px; margin-left: auto; margin-right: 10px; place-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: 9px; }
  :is(.f1-race-filters, .junior-race-filters) .race-filter-advanced { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 2px 0 11px; }
  :is(.f1-race-filters, .junior-race-filters) .race-clear-filters { width: 100%; margin-top: 10px; }
  :is(.f1-race-filters, .junior-race-filters) .race-clear-filters:disabled { display: none; }
  .race-active-filters { margin-top: 9px; }
  .races-page .race-browser-heading { margin-top: 22px; }
  .races-page .race-archive { gap: 27px; }
  .race-season-heading h2 { font-size: 24px; }
  .races-page :is(.f1-race-archive-card, .series-race-archive-card) {
    grid-template-columns: 42px minmax(0,1fr) 91px;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    min-height: 90px;
    padding: 10px 11px;
  }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-date { grid-row: 1 / 3; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-copy { min-width: 0; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-winner { grid-column: 2; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-winner span,
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-winner small { display: none; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-winner strong { margin-top: 0; color: var(--text-secondary); font-size: 9px; font-weight: 700; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-meta { display: flex; grid-column: 3; grid-row: 1 / 3; justify-content: center; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-meta > div { flex-wrap: wrap; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-meta small { padding: 3px 5px; }
}
@media (max-width: 380px) {
  :is(.f1-race-filters, .junior-race-filters) .race-filter-primary { grid-template-columns: 88px minmax(0,1fr); }
  .races-page :is(.f1-race-archive-card, .series-race-archive-card) { grid-template-columns: 38px minmax(0,1fr) 78px; gap: 4px 8px; }
  :is(.f1-race-archive-card, .series-race-archive-card) .race-archive-meta { font-size: 9px; }
}
.f2-race-archive-card .race-archive-meta,
.junior-race-archive-card .race-archive-meta { gap: 4px; }
.f2-race-archive-card .race-archive-meta small,
.junior-race-archive-card .race-archive-meta small { color: var(--text-muted); font-style: normal; }
.f2-race-archive-card .race-archive-meta em,
.junior-race-archive-card .race-archive-meta em { color: var(--accent); font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.series-race-archive-card .race-status-badge { background: var(--surface-alt); color: var(--text-muted); }
.series-race-archive-card[data-status="upcoming"] .race-status-badge,
.series-race-archive-card[data-status="in-progress"] .race-status-badge { background: var(--accent); color: #fff; }
.series-race-archive-card[data-status="no-result"] .race-status-badge,
.series-race-archive-card .race-cancelled-badge { background: #f6dcea; color: #8a294f; }
.race-session-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 55px 0 16px; }
.race-session-header h2 { margin: 0; font-size: clamp(27px,3vw,38px); letter-spacing: -.04em; }
.race-session-tabs { flex-wrap: wrap; }
.f2-session-header, .junior-session-header { margin-bottom: 16px; }
.f2-session-tabs, .junior-session-tabs { display: flex; overflow-x: auto; gap: 7px; margin-bottom: 14px; padding: 2px 1px 10px; scroll-snap-type: x proximity; }
.f2-session-tab, .junior-session-tab { display: flex; min-width: 145px; min-height: 58px; flex-direction: column; justify-content: center; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); font-size: 10px; font-weight: 850; line-height: 1.2; text-align: left; scroll-snap-align: start; }
.f2-session-tab small, .junior-session-tab small { margin-top: 5px; color: var(--text-muted); font-size: 8px; font-weight: 650; }
.f2-session-tab:hover, .junior-session-tab:hover { border-color: rgba(var(--accent-rgb),.35); }
.f2-session-tab.active, .junior-session-tab.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.f2-session-tab.active small, .junior-session-tab.active small { color: rgba(255,255,255,.72); }
.f2-session-tab.cancelled:not(.active), .junior-session-tab.cancelled:not(.active) { border-color: #d8b8bd; background: #fff4f5; color: #7f2531; }
.f2-session-results, .junior-session-results { min-height: 150px; }
.f2-session-results .session-results-table td:nth-child(2) small,
.junior-session-results .session-results-table td:nth-child(2) small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.f2-session-award, .junior-session-award { display: inline-grid; min-width: 21px; height: 17px; margin: 4px 0 0 4px; place-items: center; border-radius: 4px; background: var(--accent-light); color: var(--accent-dark); font-size: 7px; font-weight: 900; }
.f2-cancelled-session, .junior-cancelled-session { padding: 42px; text-align: center; }
.f2-cancelled-session strong, .junior-cancelled-session strong { color: var(--accent); font-size: 26px; letter-spacing: -.03em; }
.f2-cancelled-session p, .junior-cancelled-session p { max-width: 520px; margin: 9px auto 0; color: var(--text-muted); font-size: 12px; }
.session-variants { display: flex; gap: 6px; min-height: 34px; margin-bottom: 10px; }
.session-variant { padding: 7px 11px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text-muted); font-size: 10px; font-weight: 750; }
.session-variant.active { border-color: rgba(var(--accent-rgb),.28); background: var(--accent-light); color: var(--accent-dark); }
.race-hero-facts { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.race-hero-facts span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(255,255,255,.06); color: #d9dce2; font-size: 10px; text-transform: capitalize; }
.session-results-table td { height: 55px; }
.session-results-table td:nth-child(2) small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 9px; }
.session-results-table a { color: var(--text); font-weight: 700; }

/* Formula 1 race detail */
.race-detail-page { max-width: var(--max-width); }
.race-page-navigation { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.race-round-navigation { display: grid; grid-template-columns: repeat(2,minmax(0,220px)); gap: 8px; }
.race-round-navigation a { display: flex; min-height: 58px; flex-direction: column; justify-content: center; padding: 9px 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.race-round-navigation a:hover { border-color: rgba(var(--accent-rgb),.4); transform: translateY(-1px); }
.race-round-navigation a:last-child { text-align: right; }
.race-round-navigation span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.race-round-navigation strong { overflow: hidden; margin-top: 4px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.race-detail-loading { min-height: 320px; }

.race-detail-hero { display: grid; min-height: 320px; grid-template-columns: minmax(0,1fr) minmax(210px,300px); align-items: end; gap: 42px; margin-bottom: 24px; }
.race-detail-hero::after { top: -115px; right: -95px; width: 390px; height: 390px; border-width: 46px; }
.race-detail-hero-copy, .race-hero-highlight { position: relative; z-index: 2; }
.race-detail-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.race-detail-kicker a { color: #d9dce2; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.race-detail-hero h1 { margin: 0 0 13px; font-size: clamp(42px,6vw,68px); line-height: .96; letter-spacing: -.055em; }
.race-detail-hero .detail-sub a { color: #fff; font-weight: 750; }
.detail-official-name { position: relative; z-index: 2; max-width: 680px; margin-top: 10px; color: #858b96; font-size: 10px; }
.race-status-badge { display: inline-flex; align-items: center; width: max-content; min-height: 24px; padding: 5px 8px; border-radius: 999px; background: #343944; color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.race-status-badge.completed { background: #dff4e6; color: #17633a; }
.race-status-badge.in-progress { background: #fff0c7; color: #7a5200; }
.race-status-badge.upcoming { background: var(--accent-light); color: var(--accent-dark); }
.race-status-badge.no-result { background: #f6dcea; color: #8a294f; }
.race-hero-highlight { display: flex; min-height: 150px; flex-direction: column; justify-content: flex-end; padding: 22px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.065); backdrop-filter: blur(8px); }
.race-hero-highlight span { color: #9da3af; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.race-hero-highlight strong { margin-top: 8px; color: #fff; font-size: clamp(20px,2.5vw,30px); line-height: 1.08; letter-spacing: -.035em; }
.race-hero-highlight small { margin-top: 7px; color: #b9bdc6; font-size: 10px; }

.race-overview { margin-top: 18px; }
.race-summary-grid { display: grid; grid-template-columns: minmax(250px,.72fr) minmax(0,1.5fr); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.race-podium-card { padding: 28px; background: #17191f; color: #fff; }
.race-podium-card .eyebrow { color: #9298a3; }
.race-podium-card ol { display: grid; gap: 4px; margin: 20px 0 0; padding: 0; list-style: none; }
.race-podium-card li { display: grid; grid-template-columns: 35px minmax(0,1fr); align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.race-podium-card li:last-child { border-bottom: 0; }
.race-podium-card li > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 12px; font-weight: 900; }
.race-podium-card li:first-child > span { background: #e9bd43; color: #241d0b; }
.race-podium-card a { color: #fff; font-size: 13px; font-weight: 800; }
.race-podium-card small { display: block; overflow: hidden; margin-top: 3px; color: #9298a3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.race-summary-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.race-summary-facts > div { display: flex; min-height: 118px; flex-direction: column; justify-content: center; padding: 22px 25px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.race-summary-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.race-summary-facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.race-summary-facts span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.race-summary-facts strong { margin-top: 7px; color: var(--text); font-size: 16px; line-height: 1.15; }
.race-summary-facts small { margin-top: 5px; color: var(--text-muted); font-size: 9px; }

.race-session-results[hidden] { display: none; }
.race-detail-page .race-session-header { align-items: center; }
.race-detail-page .race-session-tabs { display: flex; gap: 5px; }
.junior-detail-session-tabs .standings-mode-button.cancelled:not(.active) { border-color: #d8b8bd; background: #fff4f5; color: #7f2531; }
.race-detail-page .session-variants:empty { display: none; }
.race-results-panel { min-height: 120px; }
.race-results-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.race-results-table-wrap table { min-width: 760px; }
.race-results-table-wrap th { white-space: nowrap; }
.race-results-table-wrap td { white-space: nowrap; }
.race-results-table-wrap td:nth-child(2) { min-width: 190px; white-space: normal; }
.race-results-table-wrap tbody tr.retired, .race-results-table-wrap tbody tr.did-not-start, .race-results-table-wrap tbody tr.disqualified { color: var(--text-muted); }
.race-results-table-wrap tbody tr.disqualified { background: #fff1f2; }
.finish-position.retired, .finish-position.did-not-start { background: #eceef1; color: #69707b; }
.finish-position.disqualified { background: #f6dce0; color: #932f3b; }
.result-marker { display: inline-grid; min-width: 23px; height: 18px; margin-left: 5px; place-items: center; border-radius: 5px; font-size: 7px; font-weight: 900; vertical-align: middle; }
.result-marker.pole { background: #23262d; color: #fff; }
.result-marker.fastest { background: #eadffc; color: #62309b; }
.grid-movement { display: inline-flex; min-width: 27px; justify-content: center; padding: 3px 5px; border-radius: 5px; font-size: 8px; font-weight: 900; }
.grid-movement.gained { background: #e4f5e8; color: #147441; }
.grid-movement.lost { background: #fbe8e9; color: #b21d2a; }
.session-result-cards { display: none; }
.session-result-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow-small); }

@media (max-width: 900px) {
  .race-detail-hero { grid-template-columns: 1fr; gap: 25px; }
  .race-hero-highlight { min-height: 112px; }
  .race-summary-grid { grid-template-columns: 1fr; }
  .race-summary-facts > div { border-left: 0; }
  .race-summary-facts > div:nth-child(even) { border-left: 1px solid var(--border); }
}

@media (max-width: 700px) {
  .race-page-navigation { align-items: stretch; flex-direction: column; }
  .race-page-navigation .back-link { margin-bottom: 0; }
  .race-round-navigation { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .race-round-navigation a { min-width: 0; }
  .race-round-navigation strong { font-size: 9px; }
  .race-detail-hero { min-height: 0; padding: 30px 24px; }
  .race-detail-hero h1 { font-size: clamp(37px,12vw,54px); }
  .race-detail-kicker { align-items: flex-start; flex-direction: column; }
  .race-hero-highlight { padding: 18px; }
  .race-summary-facts { grid-template-columns: 1fr; }
  .race-summary-facts > div, .race-summary-facts > div:nth-child(even) { min-height: 98px; border-right: 0; border-bottom: 1px solid var(--border); border-left: 0; }
  .race-summary-facts > div:last-child { grid-column: auto; border-bottom: 0; }
  .race-detail-page .race-session-header { align-items: stretch; margin-top: 40px; }
  .race-detail-page .race-session-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 5px; }
  .race-detail-page .race-session-tabs .standings-mode-button { min-width: 94px; flex: 1 0 auto; }
  .race-results-table-wrap { display: none; }
  .session-result-cards { display: grid; gap: 9px; }
  .session-result-card-head { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 14px; }
  .session-result-card-head a { color: var(--text); font-size: 13px; font-weight: 800; }
  .session-result-card-head small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; font-weight: 600; }
  .session-result-card .finish-position { width: 34px; }
  .session-result-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; border-top: 1px solid var(--border); }
  .session-result-card dl > div { padding: 11px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .session-result-card dl > div:nth-child(even) { border-right: 0; }
  .session-result-card dl > div:nth-last-child(-n+2) { border-bottom: 0; }
  .session-result-card dt { color: var(--text-muted); font-size: 7px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
  .session-result-card dd { margin: 5px 0 0; font-size: 10px; font-weight: 750; }
}

@media (max-width: 430px) {
  .race-round-navigation { grid-template-columns: 1fr; }
  .race-round-navigation > span:empty { display: none; }
}

/* Season simulator */
.simulator-page { max-width: var(--max-width); }
.simulator-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; min-height: 285px; padding: 48px 52px; overflow: hidden; border-radius: 22px; background: #17191f; color: #fff; box-shadow: 0 25px 60px rgba(16,18,24,.16); }
.simulator-hero::after { position: absolute; top: -100px; right: -80px; width: 360px; height: 360px; border: 42px solid rgba(var(--accent-rgb),.18); border-radius: 50%; content: ""; }
.simulator-hero > div:first-child { position: relative; z-index: 2; }
.simulator-hero h1 { max-width: 800px; margin-bottom: 18px; color: #fff; font-size: clamp(45px,7vw,78px); line-height: .98; letter-spacing: -.06em; }
.simulator-hero p { max-width: 620px; margin: 0; color: #b9bdc6; font-size: 17px; }
.simulator-hero-mark { position: relative; z-index: 1; color: rgba(255,255,255,.09); font-size: 180px; font-weight: 900; line-height: .7; }

.simulator-controls { position: relative; z-index: 3; display: grid; grid-template-columns: .65fr 2fr auto; align-items: end; gap: 14px; margin: -27px 30px 0; padding: 20px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: 0 16px 38px rgba(17,19,24,.12); }
.simulator-controls label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.simulator-controls label > span { color: var(--text-muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.simulator-controls select { width: 100%; height: 46px; padding: 0 38px 0 13px; border: 1px solid var(--border); border-radius: 9px; background: #f8f9fa; color: var(--text); font-size: 13px; font-weight: 650; }
.simulator-controls .button { white-space: nowrap; }
.simulator-controls button:disabled { cursor: wait; opacity: .65; transform: none; }

.simulation-explanation { margin: 20px 30px 0; padding: 13px 17px; border-left: 3px solid var(--accent); background: rgba(255,255,255,.55); color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.simulation-explanation strong { color: var(--text); }
.simulator-results { margin-top: 70px; }
.simulation-heading-actions { display: flex; align-items: center; gap: 16px; }
.simulation-summary { display: grid; grid-template-columns: .75fr 1.25fr; overflow: hidden; margin-bottom: 17px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.simulation-champion, .simulation-outcome { display: flex; flex-direction: column; justify-content: center; min-height: 145px; padding: 25px 30px; }
.simulation-champion { position: relative; overflow: hidden; background: linear-gradient(135deg,var(--accent),var(--accent-gradient-end)); color: #fff; }
.simulation-champion::after { position: absolute; right: -40px; bottom: -60px; width: 140px; height: 140px; border: 22px solid rgba(255,255,255,.1); border-radius: 50%; content: ""; }
.simulation-summary span { margin-bottom: 8px; font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.simulation-champion span { color: rgba(255,255,255,.7); }
.simulation-summary strong { position: relative; z-index: 1; font-size: clamp(22px,3vw,34px); line-height: 1.05; letter-spacing: -.04em; }
.simulation-summary small { position: relative; z-index: 1; margin-top: 8px; color: inherit; opacity: .7; }
.simulation-outcome { border-left: 1px solid var(--border); }
.simulation-outcome > span { color: var(--success); }
.simulation-outcome.changed > span { color: var(--accent); }

.simulation-table td { height: 62px; }
.simulation-table tbody tr.simulated-leader { background: #fff8f0; }
.simulation-table tbody tr.simulated-leader td:first-child { box-shadow: inset 4px 0 var(--accent); }
.simulation-position { width: 70px; font-size: 18px; font-weight: 900; text-align: center; }
.simulation-table td:nth-child(2) a { display: flex; flex-direction: column; color: var(--text); }
.simulation-table td:nth-child(2) strong { font-size: 14px; }
.simulation-table td:nth-child(2) small, .simulation-table td:nth-child(4) small, .simulated-points small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; }
.simulated-points { font-size: 17px; font-weight: 900; }
.original-result { margin-right: 7px; font-weight: 800; }
.position-change { display: inline-flex; min-width: 47px; justify-content: center; padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 850; }
.position-change.up { background: #e4f5e8; color: #147441; }
.position-change.down { background: #fbe8e9; color: #b21d2a; }
.position-change.same { background: #eef0f3; color: var(--text-muted); }

/* Accounts */
.account-link { margin-left: 6px; border: 1px solid var(--border); background: #fff; }
.account-page { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(360px,.75fr); align-items: center; gap: 70px; }
.account-intro h1 { max-width: 680px; margin-bottom: 24px; font-size: clamp(54px,8vw,94px); line-height: .94; letter-spacing: -.065em; }
.account-intro p { max-width: 590px; color: var(--text-secondary); font-size: 18px; line-height: 1.65; }
.account-auth, .account-profile { overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: #fff; box-shadow: 0 22px 55px rgba(17,19,24,.11); }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 6px; border-bottom: 1px solid var(--border); background: #f4f5f7; }
.account-tabs button { padding: 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 800; }
.account-tabs button.active { background: #fff; color: var(--text); box-shadow: 0 2px 7px rgba(17,19,24,.09); }
.account-form { display: grid; gap: 18px; padding: 30px; }
.account-form[hidden] { display: none; }
.account-form label { display: grid; gap: 7px; }
.account-form label > span { color: var(--text-muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.account-form input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; background: #fafafa; color: var(--text); }
.account-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.08); outline: 0; }
.account-form small { color: var(--text-muted); }
.account-form .account-legal-check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.account-form .account-legal-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); }
.account-form .account-legal-check span { color: var(--text-muted); font-size: 12px; font-weight: 500; line-height: 1.55; letter-spacing: 0; text-transform: none; }
.account-form .account-legal-check a { color: var(--accent); font-weight: 750; }
.account-message { min-height: 22px; padding: 0 30px 22px; color: var(--accent-dark); font-size: 12px; }
.account-profile { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 22px; padding: 30px; }
.account-profile[hidden] { display: none; }
.account-avatar { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 15px; background: var(--accent); color: #fff; font-size: 22px; font-weight: 900; }
.account-profile span { color: var(--text-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.account-profile h2 { margin: 4px 0 0; letter-spacing: -.035em; }
.account-profile p { margin: 3px 0 0; color: var(--text-secondary); }
.account-profile .button { grid-column: 1 / -1; }
.points-system-manager { grid-column: 1 / -1; margin-top: 25px; padding-top: 55px; border-top: 1px solid var(--border); }
.points-system-manager[hidden] { display: none; }
.saved-systems { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.saved-system-card { display: flex; min-height: 130px; flex-direction: column; align-items: flex-start; padding: 19px; border: 1px solid var(--border); border-radius: 13px; background: #fff; color: var(--text); text-align: left; box-shadow: var(--shadow-small); transition: transform .16s ease,border-color .16s ease; }
.saved-system-card:hover { border-color: rgba(var(--accent-rgb),.35); transform: translateY(-2px); }
.saved-system-card .system-visibility { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.saved-system-card strong { margin-top: auto; font-size: 17px; }
.saved-system-card small { margin-top: 4px; color: var(--text-muted); }
.points-system-form { margin-top: 17px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.points-system-form[hidden] { display: none; }
.points-form-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 25px; border-bottom: 1px solid var(--border); background: #f7f8f9; }
.points-form-heading span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.points-form-heading h3 { margin: 4px 0 0; font-size: 23px; letter-spacing: -.035em; }
.points-form-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; padding: 25px; }
.points-form-grid label { display: grid; align-content: start; gap: 7px; }
.points-form-grid label.wide { grid-column: 1 / -1; }
.points-form-grid label > span { color: var(--text-muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.points-form-grid input:not([type="checkbox"]), .points-form-grid select { width: 100%; height: 45px; padding: 0 13px; border: 1px solid var(--border); border-radius: 9px; background: #fafafa; }
.points-form-grid input:disabled { background: #eceef1; color: var(--text-muted); cursor: not-allowed; opacity: .62; }
.points-form-grid small { color: var(--text-muted); }
.points-checkbox { grid-template-columns: auto 1fr; align-items: center; }
.points-checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }
.points-checkbox span { letter-spacing: 0 !important; text-transform: none !important; }
.points-form-actions { display: flex; gap: 10px; padding: 0 25px 25px; }
.points-system-form .account-message { padding-bottom: 20px; }
#delete-system-button[hidden] { display: none; }
#cancel-system-button { padding: 0; border: 0; background: transparent; }

.points-library-page { max-width: var(--max-width); }
.points-library-page [hidden] { display: none !important; }
.points-library-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; padding: 50px 52px; border-radius: 22px; background: #17191f; color: #fff; box-shadow: 0 25px 60px rgba(16,18,24,.16); }
.points-library-hero h1 { margin: 0 0 16px; color: #fff; font-size: clamp(48px,7vw,78px); line-height: .95; letter-spacing: -.06em; }
.points-library-hero p { max-width: 620px; margin: 0; color: #b9bdc6; font-size: 16px; }
.points-library-hero .button { flex: 0 0 auto; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; }
.points-login-prompt { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin: 22px 30px 0; padding: 20px 22px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-small); }
.points-login-prompt[hidden] { display: none; }
.points-login-prompt > div { display: flex; flex-direction: column; gap: 4px; }
.points-login-prompt strong { font-size: 14px; }
.points-login-prompt span { color: var(--text-muted); font-size: 11px; }
.points-library-manager { margin-top: 66px; padding-top: 0; border-top: 0; }
.points-community { margin-top: 66px; padding-top: 55px; border-top: 1px solid var(--border); }
.public-system-card { cursor: default; }
.public-system-card:hover { border-color: var(--border); transform: none; }

/* Analysis */
.analysis-page, .analysis-detail-page { max-width: var(--max-width); }
.analysis-hero { position: relative; min-height: 330px; padding: 62px 55px; overflow: hidden; border-radius: 22px; background: #17191f; color: #fff; box-shadow: 0 25px 60px rgba(16,18,24,.16); }
.analysis-hero::after { position: absolute; right: -80px; bottom: -150px; width: 430px; height: 430px; border: 55px solid rgba(var(--accent-rgb),.18); border-radius: 50%; content: ""; }
.analysis-hero h1 { position: relative; z-index: 1; max-width: 820px; margin: 0 0 20px; color: #fff; font-size: clamp(52px,8vw,94px); line-height: .91; letter-spacing: -.07em; }
.analysis-hero p { position: relative; z-index: 1; max-width: 620px; margin: 0; color: #b9bdc6; font-size: 17px; line-height: 1.6; }
.analysis-tool-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-top: 20px; }
.analysis-tool-card { display: flex; min-height: 290px; flex-direction: column; padding: 28px; overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: #fff; color: var(--text); box-shadow: var(--shadow-small); transition: transform .18s ease,border-color .18s ease; }
.analysis-tool-card:hover { border-color: rgba(var(--accent-rgb),.3); transform: translateY(-3px); }
.analysis-tool-card > span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.analysis-tool-card h2 { margin: auto 0 12px; font-size: 30px; letter-spacing: -.045em; }
.analysis-tool-card p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.analysis-tool-card strong { margin-top: 23px; font-size: 11px; }
.database-overview-hero::after { right: -40px; bottom: -210px; width: 520px; height: 520px; border-width: 1px; background: repeating-linear-gradient(90deg,transparent 0 29px,rgba(255,255,255,.035) 30px),repeating-linear-gradient(0deg,transparent 0 29px,rgba(255,255,255,.035) 30px); border-radius: 50%; }
.database-overview-stats { position: relative; z-index: 2; margin: -35px 24px 0; background: #fff; }
.database-overview-page .analysis-tool-grid { margin-top: 28px; }
.analysis-detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin: 20px 0 50px; }
.analysis-detail-head h1 { max-width: 800px; margin: 0 0 15px; font-size: clamp(48px,7vw,82px); line-height: .94; letter-spacing: -.065em; }
.analysis-detail-head p { margin: 0; color: var(--text-secondary); font-size: 16px; }
.analysis-detail-head label, .race-analysis-selectors label { display: grid; flex: 1; gap: 7px; min-width: 175px; }
.analysis-detail-head label > span { color: var(--text-muted); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.analysis-detail-head select { height: 46px; padding: 0 38px 0 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); font-weight: 700; }
.race-analysis-selectors { display: flex; gap: 10px; width: min(480px,100%); }
.analysis-summary-strip { display: grid; grid-template-columns: repeat(4,1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.analysis-summary-strip > div { display: flex; min-height: 125px; flex-direction: column; justify-content: center; padding: 20px 23px; border-right: 1px solid var(--border); }
.analysis-summary-strip > div:last-child { border-right: 0; }
.analysis-summary-strip span { color: var(--text-muted); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.analysis-summary-strip strong { margin-top: 10px; font-size: 23px; letter-spacing: -.035em; }
.analysis-summary-strip small { margin-top: 4px; color: var(--text-secondary); }
.analysis-chart-section { margin-top: 65px; }
.analysis-chart-section > .section-heading, .simulator-results > .section-heading { padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.analysis-visualization-menu { margin-top: 26px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-small); }
.analysis-visualization-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 1px 3px 13px; }
.analysis-visualization-heading strong { color: var(--text-secondary); font-size: 11px; font-weight: 650; }
.analysis-visualization-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; padding: 5px; border-radius: 12px; background: var(--surface-alt); }
.analysis-visualization-tabs button { position: relative; min-width: 0; padding: 12px 13px 11px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text-secondary); font: inherit; text-align: left; cursor: pointer; transition: color .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease; }
.analysis-visualization-tabs button::before { position: absolute; top: 7px; bottom: 7px; left: 0; width: 3px; border-radius: 4px; background: var(--accent); content: ''; opacity: 0; transform: scaleY(.4); transition: opacity .16s ease,transform .16s ease; }
.analysis-visualization-tabs button:hover { color: var(--text); background: rgba(255,255,255,.6); }
.analysis-visualization-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.analysis-visualization-tabs button.active { border-color: rgba(17,19,24,.09); background: #fff; color: var(--text); box-shadow: 0 2px 9px rgba(16,18,24,.08); }
.analysis-visualization-tabs button.active::before { opacity: 1; transform: scaleY(1); }
.analysis-visualization-tabs span,.analysis-visualization-tabs small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analysis-visualization-tabs span { font-size: 11px; font-weight: 800; }
.analysis-visualization-tabs small { margin-top: 3px; color: var(--text-muted); font-size: 8px; font-weight: 650; letter-spacing: .03em; }
.analysis-visualization-workspace { margin-top: 18px; }
.analysis-visualization-workspace .analysis-chart-section { margin-top: 0; }
.analysis-visualization-workspace > [hidden] { display: none; }
.analysis-bars { display: grid; gap: 7px; }
.analysis-bar-row { display: grid; grid-template-columns: 30px minmax(140px,220px) minmax(120px,1fr) 70px; align-items: center; gap: 13px; min-height: 43px; padding: 5px 13px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.analysis-rank { color: var(--text-muted); font-size: 11px; text-align: center; }
.analysis-bar-row a { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.analysis-bar-track { height: 10px; overflow: hidden; border-radius: 20px; background: #eceef1; }
.analysis-bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),var(--accent-gradient-end)); }
.constructor-bars .analysis-bar-track span { background: linear-gradient(90deg,#252832,#777d89); }
.analysis-bar-row > strong { font-size: 12px; text-align: right; }
.movement-chart { display: grid; gap: 7px; }
.movement-row { display: grid; grid-template-columns: minmax(140px,220px) 92px minmax(180px,1fr) 42px; align-items: center; gap: 14px; min-height: 46px; padding: 5px 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.movement-row a { color: var(--text); font-size: 12px; font-weight: 750; }
.movement-grid { color: var(--text-muted); font-size: 10px; }
.movement-axis { position: relative; display: flex; height: 10px; align-items: center; justify-content: center; }
.movement-axis i { position: absolute; width: 1px; height: 20px; background: var(--border-strong); }
.movement-axis span { position: absolute; height: 8px; border-radius: 10px; }
.movement-axis .positive { left: 50%; background: #43a86f; }
.movement-axis .negative { right: 50%; background: var(--accent); }
.movement-row > strong { font-size: 11px; text-align: right; }
.movement-row > strong.up { color: #147441; }.movement-row > strong.down { color: var(--accent-dark); }
.records-switch { width: max-content; margin: -25px 0 30px auto; }
.record-category-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 13px; }
.record-card { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.record-card-title { padding: 22px 24px 17px; border-bottom: 1px solid var(--border); background: #f8f9fa; }
.record-card-title span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.record-card-title h2 { margin: 5px 0 0; font-size: 25px; letter-spacing: -.04em; }
.record-card ol { margin: 0; padding: 8px; list-style: none; }
.record-card li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; min-height: 48px; padding: 7px 10px; border-radius: 8px; }
.record-card li:first-child { background: var(--accent-light); }
.record-card li > span { color: var(--text-muted); font-size: 10px; text-align: center; }
.record-card li a { color: var(--text); font-size: 12px; font-weight: 750; }
.record-card li strong { font-size: 14px; }

/* Interactive season analysis */
.season-progression-section { margin-top: 55px; }
.progression-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.progression-driver { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-muted); font-size: 10px; font-weight: 700; opacity: .58; transition: opacity .15s ease,border-color .15s ease,background .15s ease; }
.progression-driver i { width: 17px; height: 3px; background: var(--driver-color); border-radius: 3px; }
.progression-driver.active { border-color: rgba(17,19,24,.18); background: #f8f9fa; color: var(--text); opacity: 1; }
.chart-grid line { stroke: #e4e6ea; stroke-width: 1; }
.chart-grid text { fill: var(--text-muted); font-size: 10px; }
.chart-series path { fill: none; stroke: var(--series-color); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-series circle { fill: #fff; stroke: var(--series-color); stroke-width: 2; opacity: .75; }
.chart-series circle:hover { r: 6; opacity: 1; }
.season-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.season-analysis-grid .analysis-chart-section { min-width: 0; }
.compact-chart { min-height: 280px; }
.distribution-bar { display: flex; height: 54px; overflow: hidden; border-radius: 10px; background: #e8eaee; box-shadow: inset 0 0 0 1px rgba(17,19,24,.06); }
.distribution-bar span { min-width: 2px; transition: filter .15s ease; }
.distribution-bar span:hover { filter: brightness(.85); }
.distribution-legend { display: grid; gap: 4px; margin-top: 14px; }
.distribution-legend > div { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 30px; padding: 3px 6px; border-bottom: 1px solid #eceef1; }
.distribution-legend i { width: 8px; height: 8px; border-radius: 3px; }
.distribution-legend span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.distribution-legend strong { font-size: 10px; }
.average-position-table td { height: 48px; }
.average-position-table a { color: var(--text); font-weight: 750; }
.average-position-table td:not(:first-child), .average-position-table th:not(:first-child) { text-align: right; }
.analysis-tooltip { position: fixed; z-index: 1000; display: flex; min-width: 160px; max-width: 280px; flex-direction: column; padding: 11px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(17,19,24,.96); color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.24); opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .1s ease,transform .1s ease; }
.analysis-tooltip.visible { opacity: 1; transform: translateY(0); }
.analysis-tooltip strong { font-size: 12px; }
.analysis-tooltip span { margin-top: 4px; color: #b9bdc6; font-size: 9px; line-height: 1.35; }
.analysis-tooltip b { margin-top: 7px; color: #ff727d; font-size: 11px; }
[data-chart-tooltip] { cursor: help; }
.results-heatmap-wrap { overflow-x: auto; padding-bottom: 5px; }
.results-heatmap { display: grid; grid-template-columns: minmax(145px,1.4fr) repeat(var(--rounds),minmax(39px,1fr)); min-width: max(100%,calc(150px + var(--rounds) * 40px)); gap: 3px; }
.heatmap-corner, .heatmap-round { display: grid; height: 34px; place-items: center; color: var(--text-muted); font-size: 9px; font-weight: 800; }
.heatmap-corner { justify-content: start; padding-left: 11px; text-transform: uppercase; }
.heatmap-driver { display: flex; min-width: 0; height: 37px; align-items: center; overflow: hidden; padding: 0 11px; border-radius: 6px; background: #fff; color: var(--text); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.heatmap-cell { display: grid; height: 37px; place-items: center; border-radius: 6px; color: #414650; font-size: 9px; font-weight: 800; }
.heatmap-cell.winner { background: #f6cf65; color: #473500; }.heatmap-cell.podium { background: #f8e6ae; }.heatmap-cell.points { background: #dcefe1; color: #17623b; }.heatmap-cell.finish { background: #e8ebef; }.heatmap-cell.retired { background: #f4d9dc; color: #9f2430; }.heatmap-cell.absent { background: rgba(255,255,255,.42); }
.heatmap-key { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.heatmap-key span { padding: 5px 8px; border-radius: 6px; color: var(--text-secondary); font-size: 8px; font-weight: 750; }
.heatmap-key .winner { background: #f6cf65; }.heatmap-key .podium { background: #f8e6ae; }.heatmap-key .points { background: #dcefe1; }.heatmap-key .finish { background: #e8ebef; }.heatmap-key .retired { background: #f4d9dc; }

/* Race analysis */
.race-flow-chart { overflow-x: auto; padding: 13px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.race-flow-chart svg { display: block; width: 100%; min-width: 850px; height: auto; }
.flow-heading { fill: var(--text-muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.flow-labels text { fill: var(--text); font-size: 10px; font-weight: 700; }
.flow-labels .flow-position { fill: var(--text-muted); font-weight: 850; }
.race-flow-line { fill: none; stroke: var(--flow-color); stroke-width: 3; stroke-linecap: round; opacity: .78; cursor: pointer; transition: opacity .15s ease,stroke-width .15s ease; }
.race-flow-line:hover, .race-flow-line:focus { stroke-width: 6; opacity: 1; outline: 0; }
.race-flow-line.muted { opacity: .1; }
.race-analysis-table td { height: 53px; white-space: nowrap; }
.race-analysis-table td:nth-child(2) small, .race-analysis-table td:nth-child(5) small { display: block; margin-top: 2px; color: var(--accent-dark); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.race-analysis-table a { color: var(--text); font-weight: 750; }
.race-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.race-analysis-grid .analysis-chart-section { min-width: 0; }
.contribution-chart, .attrition-chart { display: grid; gap: 6px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-small); }
.contribution-row, .attrition-row { display: grid; grid-template-columns: minmax(95px,145px) minmax(100px,1fr) 38px; align-items: center; gap: 10px; min-height: 31px; }
.contribution-row a, .attrition-row a { overflow: hidden; color: var(--text); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.contribution-track, .attrition-track { display: flex; height: 9px; overflow: hidden; border-radius: 8px; background: #eceef1; }
.contribution-track span { min-width: 1px; filter: brightness(.98); }
.contribution-track span + span { filter: brightness(.72); }
.attrition-track span { height: 100%; border-radius: inherit; background: #68707d; }
.attrition-track span.retired { background: var(--accent); }
.contribution-row > strong, .attrition-row > strong { font-size: 9px; text-align: right; }
.weekend-conversion-chart { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-small); }
.conversion-head, .conversion-row { display: grid; grid-template-columns: minmax(170px,1fr) repeat(3,100px); align-items: center; gap: 8px; padding: 0 18px; }
.conversion-head { height: 40px; background: #f4f5f7; color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.conversion-row { position: relative; min-height: 48px; border-top: 1px solid var(--border); }
.conversion-row > a { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 10px; font-weight: 750; }
.conversion-row > a i { width: 12px; height: 3px; border-radius: 3px; }
.conversion-row > span { position: relative; z-index: 1; font-size: 10px; font-weight: 750; text-align: center; }
.conversion-line { position: absolute; z-index: 0; right: 24px; bottom: 5px; left: max(195px,calc(100% - 314px)); height: 2px; background: #eceef1; opacity: .55; }
.conversion-line i { position: absolute; height: 2px; border-radius: 2px; }

.comparison-picker { display: grid; grid-template-columns: minmax(190px,1fr) 42px minmax(190px,1fr) auto; align-items: end; gap: 13px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.comparison-picker label { display: grid; gap: 7px; }
.comparison-picker label > span { color: var(--text-muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.comparison-picker select { width: 100%; }
.comparison-picker button { min-height: 43px; padding: 0 19px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.comparison-picker button:hover { filter: brightness(.92); }
.comparison-versus { display: grid; height: 43px; place-items: center; color: var(--text-muted); font-size: 9px; font-weight: 900; }
.comparison-driver-heads { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin-top: 25px; padding: 28px; border: 1px solid var(--border); border-radius: 16px; background: #17191f; color: #fff; }
.comparison-driver-heads > div { color: rgba(255,255,255,.45); font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.comparison-driver-heads a { color: #fff; }
.comparison-driver-heads a:last-child { text-align: right; }
.comparison-driver-heads span { color: rgba(255,255,255,.55); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.comparison-driver-heads h2 { margin: 5px 0 0; font-size: clamp(22px,3vw,38px); letter-spacing: -.04em; }
.comparison-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); }
.comparison-workspace { margin-top: 18px; }
.comparison-workspace > [hidden] { display: none; }
.comparison-scorecard { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.comparison-metric { display: grid; grid-template-columns: 1fr minmax(150px,.8fr) 1fr; align-items: center; min-height: 68px; padding: 0 25px; border-bottom: 1px solid var(--border); text-align: center; }
.comparison-metric:last-child { border-bottom: 0; }
.comparison-metric span { color: var(--text-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.comparison-metric strong { color: var(--text-secondary); font-size: 18px; }
.comparison-metric strong:first-child { text-align: left; }
.comparison-metric strong:last-child { text-align: right; }
.comparison-metric strong.leader { color: var(--accent); font-size: 23px; }
.teammate-summary { display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.teammate-summary > div { display: flex; min-height: 115px; flex-direction: column; justify-content: center; padding: 19px 22px; border-right: 1px solid var(--border); }
.teammate-summary > div:last-child { border-right: 0; }
.teammate-summary span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.teammate-summary strong { margin-top: 8px; font-size: 25px; }
.teammate-summary small { margin-top: 3px; color: var(--text-secondary); }
.battle-score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.battle-score { padding: 22px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.battle-score-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.battle-score-heading span { font-size: 12px; font-weight: 800; }
.battle-score-heading small { color: var(--text-muted); font-size: 8px; }
.battle-score-numbers { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 12px; margin-top: 22px; }
.battle-score-numbers strong { font-size: 24px; }
.battle-score-numbers strong:last-child { text-align: right; }
.battle-score-track { display: flex; height: 12px; overflow: hidden; border-radius: 20px; background: #242730; }
.battle-score-track i { height: 100%; border-right: 2px solid #fff; background: var(--accent); }
.battle-score-names { display: flex; justify-content: space-between; margin-top: 9px; color: var(--text-muted); font-size: 8px; font-weight: 750; }
.battle-metrics { margin-bottom: 0; }
.battle-season-list { display: grid; gap: 10px; }
.battle-season-card { display: grid; grid-template-columns: minmax(170px,.8fr) 1.6fr auto; align-items: center; gap: 25px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-small); }
.battle-season-card > div > span { color: var(--accent); font-size: 10px; font-weight: 900; }
.battle-season-card h3 { margin: 3px 0; font-size: 16px; }
.battle-season-card small { color: var(--text-muted); }
.battle-season-card dl { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; }
.battle-season-card dl > div { padding: 3px 14px; border-left: 1px solid var(--border); }
.battle-season-card dt { color: var(--text-muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.battle-season-card dd { margin: 5px 0 0; font-size: 15px; font-weight: 800; }
.battle-season-card > a { color: var(--accent); font-size: 9px; font-weight: 800; white-space: nowrap; }
.scenario-hero { margin-top: 20px; }
.scenario-controls { position: relative; z-index: 2; display: grid; grid-template-columns: .65fr 1.1fr 1.25fr auto; align-items: end; gap: 12px; margin: -28px 22px 0; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.scenario-controls label,.scenario-race-choice { display: grid; gap: 7px; }
.scenario-controls label > span,.scenario-race-choice > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.scenario-controls select,.scenario-race-choice select { width: 100%; }
.scenario-controls button { min-height: 43px; padding: 0 17px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-alt); color: var(--text); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.scenario-workspace { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.75fr); align-items: start; gap: 18px; margin-top: 30px; }
.scenario-editor,.scenario-outlook { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.scenario-editor > .section-heading,.scenario-outlook > .section-heading { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.scenario-race-choice { width: min(330px,55%); }
.scenario-race-meta { display: flex; align-items: baseline; gap: 10px; padding: 17px 3px 12px; }
.scenario-race-meta span { color: var(--accent); font-size: 9px; font-weight: 900; }
.scenario-race-meta strong { font-size: 14px; }
.scenario-race-meta small { margin-left: auto; color: var(--text-muted); }
.scenario-driver-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scenario-driver-grid label { display: grid; grid-template-columns: minmax(0,1fr) 98px; align-items: center; gap: 10px; min-height: 55px; padding: 7px 8px 7px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.scenario-driver-grid label > span { min-width: 0; }
.scenario-driver-grid strong,.scenario-driver-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scenario-driver-grid strong { font-size: 10px; }
.scenario-driver-grid small { min-height: 12px; margin-top: 2px; color: var(--text-muted); font-size: 7px; }
.scenario-driver-grid select { width: 100%; height: 36px; }
.f3-mode .scenario-driver-grid label { grid-template-columns: minmax(0,1fr) 184px; }
.scenario-position-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.scenario-position-heading { display: grid; grid-template-columns: minmax(0,1fr) 87px 87px; gap: 5px; padding: 0 10px 6px 13px; color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.scenario-position-heading span:first-child { text-align: left; }
.scenario-leader,.scenario-clinch { display: flex; min-height: 105px; flex-direction: column; justify-content: center; padding: 17px 4px; border-bottom: 1px solid var(--border); }
.scenario-leader span,.scenario-clinch span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.scenario-leader strong,.scenario-clinch strong { margin-top: 7px; font-size: 25px; letter-spacing: -.03em; }
.scenario-leader small,.scenario-clinch small { margin-top: 3px; color: var(--text-secondary); }
.scenario-standing-list { margin-top: 10px; }
.scenario-standing-list a { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 48px; padding: 5px 3px; border-bottom: 1px solid var(--border); color: var(--text); }
.scenario-standing-list a:last-child { border-bottom: 0; }
.scenario-standing-list b { color: var(--text-muted); font-size: 9px; text-align: center; }
.scenario-standing-list span { min-width: 0; }
.scenario-standing-list strong,.scenario-standing-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scenario-standing-list strong { font-size: 10px; }
.scenario-standing-list small { margin-top: 2px; color: var(--text-muted); font-size: 7px; }
.scenario-standing-list em { font-size: 11px; font-style: normal; font-weight: 850; }
.circuit-analysis-selectors { display: flex; gap: 10px; width: min(530px,100%); }
.circuit-analysis-selectors label { display: grid; flex: 1; gap: 7px; }
.circuit-analysis-selectors label > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.circuit-analysis-selectors select { width: 100%; }
.circuit-analysis-page .analysis-visualization-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
.circuit-performance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.circuit-performance-grid .analysis-chart-section,.circuit-analysis-page [data-circuit-panel] > .analysis-chart-section { margin-top: 0; }
.circuit-trend-stats { display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; margin-top: 15px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-small); }
.circuit-trend-stats > div { display: flex; min-height: 110px; flex-direction: column; justify-content: center; padding: 18px 21px; border-right: 1px solid var(--border); }
.circuit-trend-stats > div:last-child { border-right: 0; }
.circuit-trend-stats span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.circuit-trend-stats strong { margin-top: 7px; font-size: 24px; }
.circuit-trend-stats small { margin-top: 3px; color: var(--text-secondary); }
.circuit-margin-chart { margin-top: 14px; }
.circuit-movement-list,.circuit-reliability-list { display: grid; gap: 6px; margin-top: 14px; }
.circuit-movement-list a,.circuit-reliability-list a { display: grid; grid-template-columns: minmax(140px,220px) minmax(130px,1fr) 65px; align-items: center; gap: 13px; min-height: 48px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text); }
.circuit-movement-list a > span,.circuit-reliability-list a > span { overflow: hidden; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.circuit-movement-list small,.circuit-reliability-list small { display: block; overflow: hidden; margin-top: 2px; color: var(--text-muted); font-size: 7px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.circuit-movement-list a > div,.circuit-reliability-list a > div { position: relative; height: 9px; overflow: hidden; border-radius: 10px; background: #eceef1; }
.circuit-movement-list i,.circuit-reliability-list i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.circuit-movement-list i.negative { margin-left: auto; background: #68707d; }
.circuit-movement-list strong,.circuit-reliability-list strong { font-size: 10px; text-align: right; }
.circuit-reliability-list a { grid-template-columns: minmax(130px,210px) minmax(130px,1fr) 55px 40px; }
.circuit-reliability-list em { color: var(--text-muted); font-size: 8px; font-style: normal; text-align: right; }
.season-comparison-heads a small { display: block; margin-top: 5px; color: rgba(255,255,255,.58); font-size: 9px; }
.season-comparison-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
.comparison-chart-heading { display: flex; justify-content: center; gap: 25px; margin-bottom: 10px; color: var(--text-secondary); font-size: 9px; font-weight: 750; }
.comparison-chart-heading span { display: flex; align-items: center; gap: 7px; }
.comparison-chart-heading i { width: 18px; height: 3px; border-radius: 4px; background: var(--accent); }
body.f2-mode .season-comparison-chart .chart-grid + .chart-series { --series-color: var(--accent) !important; }
.comparison-chart-heading span:last-child i { background: #252832; }
.season-comparison-chart { min-height: 350px; }
.comparison-method-note { max-width: 720px; margin: 12px auto 0; color: var(--text-muted); font-size: 9px; line-height: 1.6; text-align: center; }
.competition-index-head { display: grid; grid-template-columns: 130px 1fr 130px; align-items: center; gap: 20px; margin-bottom: 14px; padding: 21px 25px; border: 1px solid var(--border); border-radius: 15px; background: #17191f; color: #fff; }
.competition-index-head > div { text-align: center; }
.competition-index-head > div:last-child { border-left: 1px solid rgba(255,255,255,.12); }
.competition-index-head > div:first-child { border-right: 1px solid rgba(255,255,255,.12); }
.competition-index-head span { display: block; color: rgba(255,255,255,.6); font-size: 9px; font-weight: 850; }
.competition-index-head strong { display: block; margin-top: 3px; font-size: 40px; }
.competition-index-head p { margin: 0; color: #b9bdc6; font-size: 10px; line-height: 1.55; text-align: center; }
.comparison-index-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-bottom: 15px; }
.comparison-index-card { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.comparison-index-card > span { color: var(--text-secondary); font-size: 9px; font-weight: 800; }
.comparison-index-card > div { display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 8px; margin-top: 11px; }
.comparison-index-card > div strong { font-size: 9px; }
.comparison-index-card i { display: block; height: 7px; overflow: hidden; border-radius: 8px; background: #eceef1; }
.comparison-index-card i b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.comparison-index-card > div:nth-of-type(2) i b { background: #252832; }
.comparison-index-card small { display: block; margin-top: 12px; color: var(--text-muted); font-size: 7px; line-height: 1.45; }
.records-explorer-controls { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.records-primary-controls { display: grid; grid-template-columns: auto minmax(220px,1fr) auto auto; align-items: end; gap: 14px; padding: 18px; }
.records-primary-controls label,.records-advanced-filters label { display: grid; gap: 7px; }
.records-primary-controls label > span,.records-advanced-filters label > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.records-primary-controls select,.records-advanced-filters select,.records-advanced-filters input { width: 100%; }
.records-primary-controls > button,.records-advanced-filters > button { min-height: 43px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.records-primary-controls > button.save-record-button { border: 1px solid var(--border); background: #fff; color: var(--text); }
.records-filter-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 13px 18px; border: 0; border-top: 1px solid var(--border); background: var(--surface-alt); color: var(--text); font: inherit; cursor: pointer; }
.records-filter-toggle span { font-size: 9px; font-weight: 800; }
.records-filter-toggle small { color: var(--text-muted); font-size: 8px; }
.records-advanced-filters { display: grid; grid-template-columns: .55fr .55fr 1fr 1fr .8fr 1.15fr auto; align-items: end; gap: 10px; padding: 16px 18px 18px; border-top: 1px solid var(--border); }
.records-advanced-filters[hidden] { display: none; }
.records-sprint-toggle { display: flex !important; min-height: 43px; grid-template-columns: auto 1fr; align-items: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; }
.records-sprint-toggle input { width: auto; }
.records-sprint-toggle > span { letter-spacing: normal !important; text-transform: none !important; }
.records-sprint-toggle strong,.records-sprint-toggle small { display: block; }
.records-sprint-toggle strong { color: var(--text); font-size: 8px; }
.records-sprint-toggle small { margin-top: 2px; color: var(--text-muted); font-size: 7px; font-weight: 500; }
.save-record-panel { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(230px,1fr) auto auto; align-items: end; gap: 12px; padding: 17px 18px; border-top: 1px solid var(--border); background: #fff8f8; }
.save-record-panel[hidden] { display: none; }
.save-record-panel > div span,.save-record-panel label > span { display: block; color: var(--text-muted); font-size: 7px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.save-record-panel > div strong { display: block; margin-top: 4px; font-size: 11px; }
.save-record-panel label { display: grid; gap: 6px; }
.save-record-panel input { width: 100%; }
.save-record-panel button { min-height: 43px; padding: 0 16px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text); font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.save-record-panel button[type="submit"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.save-record-panel > small { grid-column: 2 / -1; color: var(--accent); font-size: 8px; }
.personal-record-book { margin-top: 45px; }
.saved-records { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 17px; }
.saved-record-card { display: flex; min-height: 150px; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-small); }
.saved-record-card a { display: flex; flex: 1; flex-direction: column; padding: 18px; color: var(--text); }
.saved-record-card a > span { color: var(--accent); font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.saved-record-card a > strong { margin-top: 12px; font-size: 14px; }
.saved-record-card a > small { margin-top: 7px; color: var(--text-muted); font-size: 8px; line-height: 1.5; }
.saved-record-card button { padding: 9px 18px; border: 0; border-top: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted); font: inherit; font-size: 8px; font-weight: 750; text-align: left; cursor: pointer; }
.record-explorer-summary { display: grid; grid-template-columns: repeat(3,1fr); overflow: hidden; margin-top: 18px; border: 1px solid var(--border); border-radius: 15px; background: #17191f; }
.record-explorer-summary > a { display: flex; min-height: 125px; flex-direction: column; justify-content: center; padding: 20px 24px; border-right: 1px solid rgba(255,255,255,.12); color: #fff; }
.record-explorer-summary > a:last-child { border-right: 0; }
.record-explorer-summary span { color: rgba(255,255,255,.5); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.record-explorer-summary strong { margin-top: 8px; font-size: 18px; }
.record-explorer-summary b { margin-top: 8px; color: #fff; font-size: 22px; }
.record-explorer-summary b small { color: rgba(255,255,255,.5); font-size: 8px; font-weight: 600; }
.record-explorer-results { margin-top: 30px; }
.record-explorer-results > .section-heading { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.record-ranking { overflow: hidden; margin-top: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-small); }
.record-ranking-head,.record-ranking-row { display: grid; grid-template-columns: 48px minmax(180px,1fr) 110px 75px 75px 75px 110px; align-items: center; gap: 8px; padding: 0 17px; }
.record-ranking-head { min-height: 40px; background: var(--surface-alt); color: var(--text-muted); font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.record-ranking-row { min-height: 58px; border-top: 1px solid var(--border); color: var(--text); }
.record-ranking-row:hover { background: #fafafa; }
.record-ranking-row > b { color: var(--text-muted); font-size: 11px; text-align: center; }
.record-ranking-row.podium-record > b { color: var(--accent); font-size: 15px; }
.record-ranking-row > span { font-size: 9px; }
.record-ranking-row > span strong,.record-ranking-row > span small { display: block; }
.record-ranking-row > span strong { font-size: 11px; }
.record-ranking-row > span small { margin-top: 2px; color: var(--text-muted); font-size: 7px; }
.record-ranking-row > em { color: var(--accent); font-size: 13px; font-style: normal; font-weight: 850; text-align: right; }
.builder-hero { margin-top: 20px; }
.builder-details { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.5fr .55fr; gap: 12px; margin: -28px 22px 0; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow-small); }
.builder-details label,.builder-race-picker label,.builder-points-choice { display: grid; gap: 7px; }
.builder-race-picker label[hidden] { display: none; }
.builder-details label > span,.builder-race-picker label > span,.builder-points-choice > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.builder-details input,.builder-details select,.builder-race-picker select,.builder-points-choice select { width: 100%; }
.builder-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(340px,.7fr); align-items: start; gap: 16px; margin-top: 28px; }
.builder-panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-small); }
.builder-panel > .section-heading { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.builder-race-picker { display: grid; grid-template-columns: .55fr 1.4fr auto; align-items: end; gap: 10px; padding: 16px 0; }
body.f2-mode .builder-race-picker,body.f3-mode .builder-race-picker { grid-template-columns: .45fr 1fr 1fr auto; }
.builder-race-picker button,.builder-actions > button { min-height: 43px; padding: 0 17px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.builder-calendar { display: grid; gap: 6px; }
.builder-calendar-race { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 59px; padding: 7px 9px 7px 13px; border: 1px solid var(--border); border-radius: 9px; }
.builder-calendar-race > b { color: var(--accent); font-size: 10px; }
.builder-calendar-race > span { min-width: 0; }
.builder-calendar-race strong,.builder-calendar-race small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-calendar-race strong { font-size: 10px; }
.builder-calendar-race small { margin-top: 3px; color: var(--text-muted); font-size: 7px; }
.builder-calendar-race > div { display: flex; gap: 4px; }
.builder-calendar-race button { width: 29px; height: 29px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-alt); color: var(--text); cursor: pointer; }
.builder-calendar-race button:disabled { opacity: .35; }
.builder-points-choice { margin-top: 16px; }
.builder-field-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 21px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.builder-field-heading strong { font-size: 10px; }
.builder-field-heading button { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 8px; font-weight: 750; cursor: pointer; }
.builder-field-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; max-height: 205px; overflow-y: auto; padding-top: 8px; }
.builder-field-list label { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 4px; font-size: 8px; }
.builder-field-list label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.builder-field-list > small { color: var(--text-muted); font-size: 8px; }
.builder-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 20px; }
.builder-actions > button:nth-child(2) { border: 1px solid var(--border); background: #fff; color: var(--text); }
.builder-actions > small { grid-column: 1 / -1; min-height: 16px; color: var(--text-muted); font-size: 8px; }
.builder-actions > small a { color: var(--accent); }
.builder-results { margin-top: 32px; }
.builder-results > .section-heading { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.builder-results #builder-results { margin-top: 14px; }
.driver-form-selectors { display: flex; gap: 9px; width: min(650px,100%); }
.driver-form-selectors label { display: grid; flex: 1; gap: 7px; }
.driver-form-selectors label:first-child { flex: 1.4; }
.driver-form-selectors label > span { color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.driver-form-selectors select { width: 100%; }
.driver-form-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
.driver-form-page [data-form-panel] > .analysis-chart-section { margin-top: 0; }
.form-trend-chart { margin-top: 14px; }
.form-average-line line { stroke: #68707d; stroke-width: 1.5; stroke-dasharray: 7 5; }
.form-average-line rect { fill: #68707d; }
.form-average-line text { fill: #fff; font-size: 9px; font-weight: 750; }
.form-metric-switch { flex-shrink: 0; }
.form-points-strip { display: flex; align-items: end; gap: 3px; height: 90px; margin-top: 11px; padding: 9px 12px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.form-points-strip a { display: flex; min-width: 20px; height: 100%; flex: 1 0 20px; flex-direction: column; align-items: center; justify-content: flex-end; color: var(--text-muted); }
.form-points-strip a i { display: block; width: 70%; height: max(2px,var(--points)); max-height: 63px; border-radius: 3px 3px 0 0; background: var(--accent); }
.form-points-strip a span { margin: 4px 0 3px; font-size: 6px; }
.form-teammate-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
.form-teammate-grid > a { padding: 19px; border: 1px solid var(--border); border-radius: 13px; background: #fff; color: var(--text); box-shadow: var(--shadow-small); }
.form-teammate-grid > a > span { color: var(--accent); font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.form-teammate-grid h3 { margin: 8px 0 17px; font-size: 17px; }
.form-teammate-grid dl { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; }
.form-teammate-grid dl > div { border-left: 1px solid var(--border); padding-left: 10px; }
.form-teammate-grid dl > div:first-child { border-left: 0; padding-left: 0; }
.form-teammate-grid dt { color: var(--text-muted); font-size: 6px; font-weight: 800; text-transform: uppercase; }
.form-teammate-grid dd { margin: 5px 0 0; font-size: 12px; font-weight: 850; }
.form-circuit-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.form-circuit-columns > div { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow-small); }
.form-circuit-columns h3 { margin: 0; padding: 14px 16px; background: var(--surface-alt); font-size: 10px; }
.form-circuit-columns a { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 51px; padding: 5px 14px; border-top: 1px solid var(--border); color: var(--text); }
.form-circuit-columns a > b { color: var(--text-muted); font-size: 8px; }
.form-circuit-columns a > span { min-width: 0; overflow: hidden; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.form-circuit-columns small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 7px; font-weight: 500; }
.form-circuit-columns a > strong { color: var(--accent); font-size: 10px; }

@media (max-width: 800px) {
  .comparison-picker { grid-template-columns: 1fr; }
  .comparison-versus { height: auto; }
  .comparison-picker button { width: 100%; }
  .comparison-driver-heads { gap: 10px; padding: 22px 17px; }
  .teammate-summary { grid-template-columns: 1fr; }
  .teammate-summary > div { min-height: 90px; border-right: 0; border-bottom: 1px solid var(--border); }
  .teammate-summary > div:last-child { border-bottom: 0; }
  .battle-score-grid { grid-template-columns: 1fr; }
  .battle-season-card { grid-template-columns: 1fr; gap: 15px; }
  .battle-season-card dl > div:first-child { border-left: 0; padding-left: 0; }
  .scenario-controls { grid-template-columns: 1fr; margin-right: 10px; margin-left: 10px; }
  .scenario-workspace { grid-template-columns: 1fr; }
  .scenario-driver-grid { grid-template-columns: 1fr; }
  .scenario-race-choice { width: 100%; }
  .circuit-analysis-selectors { flex-direction: column; }
  .circuit-performance-grid { grid-template-columns: 1fr; }
  .circuit-trend-stats { grid-template-columns: 1fr; }
  .circuit-trend-stats > div { min-height: 90px; border-right: 0; border-bottom: 1px solid var(--border); }
  .circuit-trend-stats > div:last-child { border-bottom: 0; }
  .database-overview-stats { margin-right: 10px; margin-left: 10px; }
  .competition-index-head { grid-template-columns: 80px 1fr 80px; padding: 18px 12px; }
  .comparison-index-grid { grid-template-columns: 1fr 1fr; }
  .records-primary-controls,.records-advanced-filters { grid-template-columns: 1fr; }
  .save-record-panel { grid-template-columns: 1fr; }
  .save-record-panel > small { grid-column: auto; }
  .saved-records { grid-template-columns: 1fr; }
  .record-explorer-summary { grid-template-columns: 1fr; }
  .record-explorer-summary > a { min-height: 95px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .record-explorer-summary > a:last-child { border-bottom: 0; }
  .record-ranking { overflow-x: auto; }
  .record-ranking-head,.record-ranking-row { min-width: 760px; }
  .builder-details,.builder-layout,.builder-race-picker { grid-template-columns: 1fr; }
  .builder-details { margin-right: 10px; margin-left: 10px; }
  .driver-form-selectors { flex-direction: column; }
  .form-teammate-grid,.form-circuit-columns { grid-template-columns: 1fr; }
  .analysis-visualization-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .analysis-visualization-tabs { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .analysis-visualization-tabs button { min-width: 135px; scroll-snap-align: start; }
  .chassis-browser-grid { grid-template-columns: repeat(2,1fr); }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .constructor-driver-grid { grid-template-columns: repeat(2,1fr); }
  .constructor-chassis-grid { grid-template-columns: repeat(2,1fr); }
  .race-analysis-grid { grid-template-columns: 1fr; }
  .season-analysis-grid { grid-template-columns: 1fr; }
  .analysis-tool-grid { grid-template-columns: 1fr; }
  .analysis-tool-card { min-height: 220px; }
  .analysis-detail-head { align-items: stretch; flex-direction: column; }
  .analysis-summary-strip { grid-template-columns: 1fr 1fr; }
  .analysis-summary-strip > div:nth-child(2) { border-right: 0; }
  .analysis-summary-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .race-filters { grid-template-columns: 1fr 1fr; }
  .race-filters label:first-child { grid-column: span 2; }
  .race-session-header { align-items: flex-start; flex-direction: column; }
  .container { width: min(100% - 34px, var(--max-width)); }
  .main-nav { gap: 0; }
  .nav-link-disabled { display: none; }
  .hero { padding: 78px 0 70px; }
  .hero::after { opacity: .5; }
  .hero h1 { font-size: clamp(48px, 14vw, 72px); }
  .page { padding-top: 42px; }
  .page-head { align-items: stretch; }
  .search { width: 100%; min-width: 0; }
  .detail-hero { padding: 36px 28px; }
  .season-overview { grid-template-columns: 1fr; }
  .season-champion { min-height: 145px; }
  .season-facts { grid-template-columns: 1fr 1fr; }
  .season-fact { min-height: 112px; border-bottom: 1px solid var(--border); }
  .season-fact:nth-child(2) { border-right: 0; }
  .season-fact:nth-last-child(-n+2) { border-bottom: 0; }
  .calendar-list { grid-template-columns: 1fr; }
  .profile-hero { min-height: 260px; }
  .profile-number, .profile-monogram { position: absolute; right: 22px; bottom: 28px; }
  .detail-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-stat { border-bottom: 1px solid var(--border); }
  .detail-stat:nth-child(3n) { border-right: 0; }
  .detail-stat:nth-last-child(-n+3) { border-bottom: 0; }
  .history-grid { grid-template-columns: repeat(2, 1fr); }
  .circuit-history-grid { grid-template-columns: 1fr; }
  .simulator-controls { grid-template-columns: 1fr 1fr; }
  .simulator-controls label:nth-child(2) { grid-column: span 1; }
  .simulator-controls .button { align-self: end; }
  .account-page { grid-template-columns: 1fr; gap: 35px; }
  .saved-systems { grid-template-columns: repeat(2,1fr); }
  .points-form-grid { grid-template-columns: repeat(2,1fr); }
}

/* Account community library */
.community-library {
  grid-column: 1 / -1;
  margin-top: 25px;
  padding: 55px 0 8px;
  border-top: 1px solid var(--border);
}
.community-library[hidden] { display: none; }
.community-library .section-heading p {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.community-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.community-search { flex: 1; max-width: 390px; }
.community-search > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.community-search input { width: 100%; }
.community-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.community-type-filter button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--surface-alt);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}
.community-type-filter button:hover { border-color: var(--border-strong); color: var(--text); }
.community-type-filter button.active { background: var(--text); color: #fff; }
.community-results-summary { margin: 18px 0 10px; color: var(--text-muted); font-size: 11px; font-weight: 750; }
.community-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.community-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.community-card:hover { border-color: rgba(var(--accent-rgb),.35); box-shadow: 0 14px 34px rgba(16,18,24,.09); transform: translateY(-2px); }
.community-card > span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.community-card > strong { margin: 13px 0 4px; color: var(--text); font-size: 17px; line-height: 1.25; }
.community-card > small { color: var(--text-muted); font-size: 11px; }
.community-card > p { margin: 15px 0 20px; color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.community-card > b { margin-top: auto; color: var(--text); font-size: 12px; }

@media (max-width: 900px) {
  .community-toolbar { align-items: stretch; flex-direction: column; }
  .community-search { width: 100%; max-width: none; }
  .community-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .community-results { grid-template-columns: 1fr; }
}

/* Games */
.games-hero {
  max-width: 920px;
  padding: 24px 0 68px;
}
.games-hero h1 {
  margin: 14px 0 24px;
  font-size: clamp(54px, 8vw, 94px);
  line-height: .94;
  letter-spacing: -.065em;
}
.games-hero h1 span { color: var(--accent); }
.games-hero p {
  max-width: 690px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.65;
}
.games-library { padding: 54px 0 20px; border-top: 1px solid var(--border); }
.games-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; margin-top: 28px; }
.game-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.game-card-featured { position: relative; color: #fff; background: #17191f; }
.game-card-featured::after {
  position: absolute;
  top: -100px;
  right: -75px;
  width: 300px;
  height: 300px;
  border: 45px solid rgba(var(--accent-rgb),.22);
  border-radius: 50%;
  content: "";
}
.game-card-featured:hover { border-color: rgba(var(--accent-rgb),.7); }
.game-card-number { position: relative; z-index: 1; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.game-card-copy { position: relative; z-index: 1; margin-top: auto; }
.game-card-copy > span { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.game-card-copy h3 { margin: 8px 0 12px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.05em; }
.game-card-copy p { max-width: 530px; margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.game-card-featured .game-card-copy p { color: #adb2bc; }
.game-card > strong { position: relative; z-index: 1; margin-top: 25px; color: inherit; font-size: 13px; }
.game-card-upcoming { background: var(--surface-alt); }
.game-card-upcoming .game-card-number,
.game-card-upcoming .game-card-copy > span,
.game-card-upcoming > strong { color: var(--text-muted); }
.quiz-placeholder {
  display: grid;
  grid-template-columns: auto minmax(0, 720px);
  align-items: center;
  justify-content: center;
  gap: clamp(35px, 7vw, 90px);
  min-height: 520px;
  margin-top: 24px;
  padding: 60px;
  border-radius: 22px;
  background: #17191f;
  color: #fff;
  box-shadow: 0 25px 60px rgba(16,18,24,.16);
}
.quiz-placeholder-mark {
  display: grid;
  width: clamp(120px, 18vw, 210px);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: var(--accent);
  font-size: clamp(70px, 12vw, 140px);
  font-weight: 900;
}
.quiz-placeholder h1 { margin: 12px 0 20px; color: #fff; font-size: clamp(50px, 8vw, 88px); line-height: .95; letter-spacing: -.06em; }
.quiz-placeholder p { margin: 0 0 25px; color: #adb2bc; font-size: 17px; line-height: 1.7; }
.quiz-placeholder > div:last-child > span { color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 800px) {
  .games-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 280px; }
  .quiz-placeholder { grid-template-columns: 1fr; justify-items: start; min-height: auto; padding: 38px 28px; }
  .quiz-placeholder-mark { width: 105px; }
}

/* Quiz library and World Champions game */
.quizzes-hero { padding-bottom: 58px; }
.quiz-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 28px; }
.quiz-choice-card {
  display: flex;
  min-height: 265px;
  flex-direction: column;
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.quiz-choice-card:hover { border-color: rgba(var(--accent-rgb),.35); box-shadow: 0 18px 42px rgba(16,18,24,.09); transform: translateY(-3px); }
.quiz-choice-card > span { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .11em; }
.quiz-choice-card h3 { margin: auto 0 11px; color: var(--text); font-size: 29px; letter-spacing: -.04em; }
.quiz-choice-card p { margin: 0 0 24px; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.quiz-choice-card > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.quiz-choice-card small { color: var(--text-muted); font-size: 10px; }
.quiz-choice-card strong { color: var(--text); font-size: 12px; }
.f2-race-winners-table th:nth-child(1),
.f2-race-winners-table td:nth-child(1),
.f2-race-winners-table th:nth-child(3),
.f2-race-winners-table td:nth-child(3),
.f2-race-winners-table th:nth-child(4),
.f2-race-winners-table td:nth-child(4) { width: 18%; }
.f2-race-winners-table th:nth-child(2),
.f2-race-winners-table td:nth-child(2) { width: 46%; }
.quiz-game-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 50px;
  margin: 23px 0 30px;
  padding-bottom: 31px;
  border-bottom: 1px solid var(--border);
}
.quiz-game-head h1 { margin: 12px 0 17px; font-size: clamp(47px,7vw,76px); line-height: .95; letter-spacing: -.06em; }
.quiz-game-head p { max-width: 660px; margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 1.65; }
.quiz-score { min-width: 190px; padding: 20px; border-radius: 14px; background: #17191f; color: #fff; }
.quiz-score span { display: block; color: #aeb3bd; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.quiz-score strong { display: block; margin: 7px 0 4px; font-size: 30px; letter-spacing: -.04em; }
.quiz-score small { color: #aeb3bd; font-size: 10px; }
.quiz-guess-form {
  position: sticky;
  z-index: 5;
  top: calc(var(--header-height) + 12px);
  margin-bottom: 34px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 36px rgba(16,18,24,.1);
  backdrop-filter: blur(10px);
}
.quiz-guess-form > label { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.quiz-guess-form > div { display: flex; gap: 9px; }
.quiz-guess-form input { min-width: 0; flex: 1; font-size: 16px; }
.quiz-guess-form button { padding: 0 24px; border: 0; border-radius: 10px; background: var(--text); color: #fff; cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.quiz-guess-form button:hover { background: var(--accent); }
.quiz-guess-form button:disabled { cursor: wait; opacity: .55; }
.quiz-guess-form > p { min-height: 19px; margin: 9px 0 0; color: var(--text-muted); font-size: 12px; }
.quiz-guess-form > p.is-correct { color: #157347; }
.quiz-guess-form > p.is-incorrect { color: var(--accent); }
.quiz-table-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 18px; }
.quiz-table-heading h2 { margin: 6px 0 0; font-size: 31px; letter-spacing: -.04em; }
.guessed-drivers { display: flex; max-width: 60%; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.guessed-drivers span { padding: 6px 9px; border-radius: 999px; background: #e7f6ec; color: #146c3b; font-size: 10px; font-weight: 750; }
.champions-quiz-table { table-layout: fixed; }
.champions-quiz-table th:first-child,
.champions-quiz-table td:first-child { width: 18%; }
.champions-quiz-table th:nth-child(2),
.champions-quiz-table td:nth-child(2) { width: 41%; }
.champions-quiz-table tbody tr { transition: background .2s ease; }
.champions-quiz-table tbody tr.is-revealed { background: #f0faf3; }
.quiz-driver-cell span:not(.quiz-empty-answer) { color: #146c3b; font-weight: 800; }
.quiz-empty-answer { display: block; width: min(190px,75%); height: 13px; border-radius: 4px; background: #eceef1; }

@media (max-width: 800px) {
  .quiz-library-grid { grid-template-columns: 1fr; }
  .quiz-game-head { grid-template-columns: 1fr; gap: 25px; }
  .quiz-score { width: 100%; }
  .quiz-table-heading { align-items: start; flex-direction: column; }
  .guessed-drivers { max-width: none; justify-content: flex-start; }
  .champions-quiz-table { min-width: 620px; }
}

/* Keep the World Champions board dense and visible while playing. */
.champions-quiz-page { padding-top: 30px; }
.champions-quiz-page > .back-link { margin-bottom: 8px; }
.champions-quiz-page .quiz-game-head {
  align-items: center;
  margin: 10px 0 14px;
  padding-bottom: 16px;
}
.champions-quiz-page .quiz-game-head h1 {
  margin: 7px 0 9px;
  font-size: clamp(39px, 5vw, 58px);
}
.champions-quiz-page .quiz-game-head p { font-size: 14px; line-height: 1.5; }
.champions-quiz-page .quiz-score { min-width: 180px; padding: 13px 16px; }
.champions-quiz-page .quiz-score strong { display: inline-block; margin: 5px 8px 0 0; font-size: 24px; }
.champions-quiz-page .quiz-guess-form {
  margin-bottom: 18px;
  padding: 12px 14px 9px;
}
.champions-quiz-page .quiz-guess-form > label { margin-bottom: 5px; }
.champions-quiz-page .quiz-guess-form input,
.champions-quiz-page .quiz-guess-form button { min-height: 40px; }
.champions-quiz-page .quiz-guess-form > p { min-height: 16px; margin-top: 5px; }
.champions-quiz-page .quiz-table-heading { margin-bottom: 9px; }
.champions-quiz-page .quiz-table-heading h2 { font-size: 25px; }
.champions-quiz-page .champions-quiz-table th { padding: 9px 13px; }
.champions-quiz-page .champions-quiz-table td { padding: 8px 13px; font-size: 12px; line-height: 1.25; }
.champions-quiz-page .quiz-empty-answer { height: 10px; }

@media (max-width: 800px) {
  .champions-quiz-page { padding-top: 22px; }
  .champions-quiz-page .quiz-game-head { gap: 13px; }
  .champions-quiz-page .quiz-game-head p { font-size: 13px; }
  .champions-quiz-page .quiz-score { padding: 10px 13px; }
  .champions-quiz-page .champions-quiz-table { min-width: 0; table-layout: fixed; }
  .champions-quiz-page .champions-quiz-table th:first-child,
  .champions-quiz-page .champions-quiz-table td:first-child { width: 18%; }
  .champions-quiz-page .champions-quiz-table th:nth-child(2),
  .champions-quiz-page .champions-quiz-table td:nth-child(2) { width: 38%; }
  .champions-quiz-page .champions-quiz-table th,
  .champions-quiz-page .champions-quiz-table td { padding-right: 7px; padding-left: 7px; overflow-wrap: anywhere; }
}

@media (max-width: 520px) {
  .chassis-browser-grid { grid-template-columns: 1fr; }
  .pagination { gap: 4px; }
  .pagination-pages { gap: 3px; }
  .pagination button { min-width: 36px; height: 36px; padding: 0 7px; }
  .pagination-count { display: none; }
  .pagination-gap { width: 12px; }
  .constructor-driver-grid, .constructor-chassis-grid { grid-template-columns: 1fr; }
  .conversion-head, .conversion-row { grid-template-columns: minmax(115px,1fr) repeat(3,52px); padding-right: 8px; padding-left: 8px; }
  .conversion-line { display: none; }
  .progression-legend { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
  .progression-driver { flex: 0 0 auto; }
  .analysis-hero { min-height: 390px; padding: 40px 27px; }
  .analysis-tool-card { min-height: 240px; }
  .race-analysis-selectors { flex-direction: column; }
  .analysis-bar-row { grid-template-columns: 24px minmax(100px,1fr) 55px; }
  .analysis-bar-track { display: none; }
  .movement-row { grid-template-columns: minmax(110px,1fr) 75px 35px; }
  .movement-axis { display: none; }
  .record-category-grid { grid-template-columns: 1fr; }
  .points-library-hero { align-items: flex-start; flex-direction: column; padding: 36px 27px; }
  .points-login-prompt { align-items: stretch; flex-direction: column; margin-right: 10px; margin-left: 10px; }
  .race-filters { grid-template-columns: 1fr; }
  .race-filters label:first-child { grid-column: auto; }
  .race-archive-card { grid-template-columns: 62px minmax(0,1fr) 20px; gap: 12px; padding: 13px; }
  .race-archive-date { padding-right: 10px; }
  .race-archive-meta { display: none; }
  .race-session-tabs { width: 100%; }
  .race-session-tabs .standings-mode-button { flex: 1; min-width: 0; padding: 8px 6px; }
  .container { width: min(100% - 24px, var(--max-width)); }
  .brand { font-size: 21px; }
  .hero { padding-top: 60px; }
  .hero-copy { font-size: 16px; }
  .hero-actions { display: grid; }
  .button { justify-content: center; }
  .feature-grid { padding-bottom: 70px; }
  .feature { min-height: 190px; }
  .detail-hero { border-radius: 16px; }
  .browser-toolbar { align-items: stretch; flex-direction: column; }
  .sort-control { justify-content: space-between; }
  .season-overview { margin-bottom: 55px; }
  .season-facts { grid-template-columns: 1fr; }
  .season-fact { min-height: 92px; border-right: 0; border-bottom: 1px solid var(--border) !important; }
  .season-fact:last-child { border-bottom: 0 !important; }
  .standings-legend { gap: 8px 13px; }
  .season-map { min-height: 230px; border-radius: 13px; }
  .season-map-loading { min-height: 230px; }
  .detail-section { margin-top: 32px; padding: 18px; border-radius: 14px; }
  .profile-hero { min-height: 280px; align-items: flex-start; }
  .profile-meta { display: grid; gap: 7px; }
  .profile-meta span + span::before { display: none; }
  .profile-number, .profile-monogram { right: 25px; bottom: 24px; font-size: 92px; }
  .circuit-coordinate { display: none; }
  .circuit-hero-visual { position: absolute; right: 18px; bottom: 18px; align-self: auto; opacity: .28; }
  .circuit-hero-map { width: 165px; height: 145px; }
  .detail-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-stat { min-height: 105px; padding: 17px; }
  .detail-stat:nth-child(3n) { border-right: 1px solid var(--border); }
  .detail-stat:nth-child(2n) { border-right: 0; }
  .detail-stat:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .detail-stat:nth-last-child(-n+2) { border-bottom: 0; }
  .history-grid { grid-template-columns: 1fr 1fr; }
  .circuit-race-card { grid-template-columns: 54px minmax(0,1fr); }
  .circuit-race-card .text-link { grid-column: 2; }
  .simulator-hero { min-height: 310px; padding: 36px 27px; }
  .simulator-hero-mark { position: absolute; right: 20px; bottom: 35px; font-size: 100px; }
  .simulator-controls { grid-template-columns: 1fr; margin: -18px 10px 0; padding: 16px; }
  .simulator-controls .button { width: 100%; }
  .simulation-explanation { margin-right: 10px; margin-left: 10px; }
  .simulation-summary { grid-template-columns: 1fr; }
  .simulation-outcome { border-top: 1px solid var(--border); border-left: 0; }
  .simulation-table th:nth-child(4), .simulation-table td:nth-child(4) { display: none; }
  .account-page { display: block; }
  .account-intro { margin-bottom: 36px; }
  .account-intro h1 { font-size: 52px; }
  .saved-systems, .points-form-grid { grid-template-columns: 1fr; }
  .points-form-grid label.wide { grid-column: auto; }
  .builder-field-heading button { min-height: 36px; padding: 6px 0 6px 12px; }
  .footer-policy-links a,
  .footer-policy-links button { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* =========================================================
   READABILITY PASS
   Wider data workspaces and a consistent minimum type scale.
   ========================================================= */

:root { --max-width: 1480px; }

body { font-size: 16px; line-height: 1.62; }
.container { width: min(var(--max-width), calc(100% - 72px)); }
.page { padding-top: 52px; padding-bottom: 88px; }
.page p, .hero-copy, .analysis-hero p, .analysis-detail-head p { max-width: 68ch; font-size: 15px; line-height: 1.7; }

.nav-link, .dropdown-menu a span { font-size: 14px; }
.dropdown-title { font-size: 11px; }
.dropdown-menu a small { font-size: 12px; line-height: 1.4; }

main.page .eyebrow { font-size: 12px; letter-spacing: .13em; }
main.page .section-note { font-size: 12px; line-height: 1.45; }
main.page label > span { font-size: 11px; line-height: 1.35; }
main.page small { font-size: 11px; line-height: 1.45; }
main.page button, main.page input, main.page select, main.page textarea { font-size: 13px; }
main.page input, main.page select, main.page textarea { min-height: 45px; }

table { font-size: 13px; line-height: 1.45; }
table th { padding: 14px 16px; font-size: 12px; line-height: 1.3; }
table td { padding: 14px 16px; }
.analysis-tool-card p, .entity-card p, .feature p, .saved-system-card small,
.simulation-explanation { font-size: 14px; line-height: 1.65; }
.analysis-tool-card > span, .analysis-tool-card strong, .feature-kicker,
.detail-stat span, .metric span, .history-year, .timeline-year { font-size: 11px; }
.analysis-tool-card strong, .text-link { font-size: 13px; }

.analysis-summary-strip span, .simulation-summary span, .scenario-leader span,
.scenario-clinch span, .record-explorer-summary span, .teammate-summary span,
.circuit-trend-stats span { font-size: 11px; }
.analysis-summary-strip small, .simulation-summary small, .scenario-leader small,
.scenario-clinch small, .record-explorer-summary small, .teammate-summary small,
.circuit-trend-stats small { font-size: 12px; }

.analysis-visualization-heading strong { font-size: 13px; }
.analysis-visualization-tabs span { font-size: 13px; }
.analysis-visualization-tabs small { font-size: 11px; }
.standings-mode-button, .session-variant, .pagination button { font-size: 12px; }
.pagination-count, .pagination-gap { font-size: 11px; }

.analysis-bar-row a, .analysis-bar-row > strong, .movement-row a,
.contribution-row a, .attrition-row a, .conversion-row > a,
.conversion-row > span, .scenario-standing-list strong,
.circuit-movement-list a > span, .circuit-reliability-list a > span { font-size: 13px; }
.analysis-rank, .scenario-standing-list b, .scenario-standing-list em,
.circuit-movement-list strong, .circuit-reliability-list strong { font-size: 12px; }

.timeline-context, .timeline-people, .career-timeline-item > em,
.constructor-driver-years, .constructor-driver-card > span,
.constructor-driver-record small, .chassis-card-heading span,
.chassis-card-heading > small, .chassis-engine-block > span,
.chassis-engine-block li, .chassis-engine-block p, .chassis-constructor { font-size: 11px; line-height: 1.5; }

.race-filters label > span, .race-browser-heading span, .race-archive-date span,
.race-archive-copy p, .race-archive-meta, .race-archive-meta small,
.race-hero-facts span, .session-results-table td:nth-child(2) small { font-size: 12px; }

.record-ranking-head { min-height: 45px; font-size: 11px; }
.record-ranking-row { min-height: 64px; }
.record-ranking-row > b, .record-ranking-row > span,
.record-ranking-row > span strong, .record-ranking-row > em { font-size: 13px; }
.record-ranking-row > span small { font-size: 11px; }

.builder-calendar-race strong, .builder-field-heading strong,
.builder-field-list label, .scenario-driver-grid strong,
.form-circuit-columns a > span, .form-teammate-grid dt { font-size: 12px; }
.builder-calendar-race small, .builder-field-list > small,
.scenario-driver-grid small, .form-circuit-columns small,
.form-points-strip a span { font-size: 10px; }
.builder-actions > small, .account-message, .save-record-panel > small { font-size: 12px; }

.progression-legend button, .heatmap-driver, .heatmap-cell, .heatmap-round,
.interactive-chart svg text, .race-flow-chart svg text { font-size: 11px; }
.analysis-tooltip { font-size: 12px; line-height: 1.45; }

.footer-primary p, .footer-legal p { max-width: 72ch; font-size: 12px; line-height: 1.6; }

.legal-page { padding-bottom: clamp(70px, 10vw, 140px); }
.legal-hero { max-width: 840px; padding: clamp(50px, 8vw, 100px) 0 clamp(34px, 5vw, 64px); }
.legal-hero h1 { margin: 12px 0 10px; font-size: clamp(42px, 7vw, 78px); letter-spacing: -.065em; }
.legal-hero p { margin: 0; color: var(--text-muted); font-size: 13px; }
.legal-layout { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 820px); align-items: start; gap: clamp(36px, 7vw, 100px); }
.legal-index { position: sticky; top: 100px; display: grid; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.72); }
.legal-index strong { margin-bottom: 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.legal-index a { color: var(--text-muted); font-size: 12px; }
.legal-index a:hover { color: var(--accent); }
.legal-document { min-width: 0; }
.legal-document section { scroll-margin-top: 110px; padding: 0 0 34px; margin: 0 0 34px; border-bottom: 1px solid var(--border); }
.legal-document section:last-child { border-bottom: 0; }
.legal-document h2 { margin: 0 0 14px; font-size: clamp(23px, 3vw, 32px); letter-spacing: -.035em; }
.legal-document p, .legal-document li { color: #3f4652; font-size: 15px; line-height: 1.75; }
.legal-document p { margin: 0 0 14px; }
.legal-document ul { display: grid; gap: 10px; margin: 0; padding-left: 20px; }
.legal-document a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.legal-document code { padding: 2px 5px; border-radius: 4px; background: #e8ebf0; font-size: .9em; }

.privacy-banner { position: fixed; z-index: 10000; right: clamp(12px, 3vw, 34px); bottom: clamp(12px, 3vw, 34px); left: clamp(12px, 3vw, 34px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 22px 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: #14171d; box-shadow: 0 20px 60px rgba(0,0,0,.28); color: #fff; }
.privacy-banner-copy strong { display: block; margin-bottom: 6px; font-size: 16px; }
.privacy-banner-copy p { max-width: 790px; margin: 0; color: #bdc2cc; font-size: 12px; line-height: 1.6; }
.privacy-banner-copy a { color: #fff; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.privacy-banner-actions { display: flex; gap: 10px; }
.privacy-banner .button { white-space: nowrap; }

@media (max-width: 760px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-index { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-index strong { grid-column: 1 / -1; }
  .privacy-banner { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
  .privacy-banner-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .privacy-banner .button { width: 100%; }
}

@media (max-width: 420px) {
  .legal-index { grid-template-columns: 1fr; }
  .privacy-banner-actions { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .container { width: min(100% - 28px, var(--max-width)); }
  .page { padding-top: 34px; padding-bottom: 64px; }
  body { font-size: 15px; }
  table { font-size: 12px; }
}

@media (max-width: 520px) {
  .brand { width: 32px; overflow: hidden; font-size: 0; }
  .brand::after { color: var(--text); content: "R"; font-size: 21px; font-weight: 900; }
  .brand span { display: none; }
  .brand::before { width: 5px; height: 21px; margin-right: 7px; }
  .nav { gap: 5px; }
  .main-nav { flex: 1; justify-content: flex-end; }
  .nav-link { padding: 8px 6px; font-size: 11px; }
  .dropdown-toggle { gap: 5px; }
  .account-link { margin-left: 0; }
  .nav-dropdown .dropdown-menu { position: fixed; top: calc(var(--header-height) - 4px); right: 14px; left: 14px; width: auto; max-height: calc(100vh - var(--header-height) - 12px); overflow-y: auto; transform: translateY(8px); }
  .nav-dropdown.is-open .dropdown-menu { transform: translateY(0); }
}

/* Header dropdowns are intentionally click-driven. */
.nav-dropdown .dropdown-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.nav-dropdown:not(.is-open):hover .dropdown-menu,
.nav-dropdown:not(.is-open):focus-within .dropdown-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-7px) scale(.985);
}
.nav-dropdown.is-open .dropdown-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

/* Instant, static header-menu interaction. */
.chevron,
.nav-dropdown:hover .chevron,
.nav-dropdown:focus-within .chevron,
.nav-dropdown.is-open .chevron {
  transform: rotate(45deg);
  transition: none;
}
.nav-dropdown .dropdown-menu,
.nav-dropdown:not(.is-open):hover .dropdown-menu,
.nav-dropdown:not(.is-open):focus-within .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
  transform: none;
  transition: none;
}

/* Season archive search and champion labels. */
.season-jump {
  width: min(100%, 360px);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.season-jump > label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.season-jump-controls { display: flex; gap: 8px; }
.season-jump-controls input { min-width: 0; flex: 1; }
.season-jump-controls button {
  min-height: 45px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--surface);
  cursor: pointer;
  font-weight: 800;
}
.season-jump-controls button:hover { background: var(--accent); }
.season-jump > small {
  display: block;
  min-height: 17px;
  margin-top: 7px;
  color: var(--accent);
}
.season-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  margin-bottom: 22px;
}
.season-card-heading .season-year { margin-bottom: 0; }
.season-card-champion {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 3px;
  max-width: 55%;
  color: var(--text-muted);
  line-height: 1.35;
  text-align: right;
}
.season-card-champion span {
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.season-card-champion strong {
  color: var(--text);
  font-size: 12px;
}
.season-card-champion.has-champion strong {
  color: var(--accent);
}
@media (max-width: 800px) {
  .season-jump { width: 100%; }
}

/* About */
.about-page { max-width: var(--max-width); }
.about-hero {
  max-width: 860px;
  padding: 12px 0 58px;
}
.about-hero h1 {
  max-width: 800px;
  margin: 14px 0 22px;
  font-size: clamp(50px, 7vw, 82px);
  line-height: .96;
  letter-spacing: -.06em;
}
.about-hero h1 span { color: var(--accent); }
.about-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.6;
}
.about-section {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1.22fr);
  gap: clamp(42px, 7vw, 108px);
  padding: 58px 0;
  border-top: 1px solid var(--border);
}
.about-section-number {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
}
.about-page h2 {
  margin: 0;
  font-size: clamp(31px, 3.8vw, 46px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.about-copy { display: grid; gap: 18px; }
.about-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.72;
}
.about-section-heading > p {
  max-width: 420px;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}
.about-method-steps {
  display: grid;
  border-top: 1px solid var(--border);
}
.about-method-steps article {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.about-method-steps article > span,
.about-independence > span {
  padding-top: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
}
.about-method-steps h3,
.about-principles-grid h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.025em;
}
.about-method-steps p,
.about-principles-grid p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}
.about-principles-section {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1.22fr);
  gap: clamp(42px, 7vw, 108px);
  padding: 58px 0;
  border-top: 1px solid var(--border);
}
.about-principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border-radius: 18px;
  background: #17191f;
  color: #fff;
}
.about-principles-grid article {
  min-height: 178px;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, .11);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}
.about-principles-grid article:nth-child(2n) { border-right: 0; }
.about-principles-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
.about-principles-grid article > span {
  display: block;
  margin-bottom: 32px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
}
.about-principles-grid p { color: #aeb3bd; }
.about-independence {
  display: grid;
  grid-template-columns: minmax(250px, .78fr) minmax(0, 1.22fr);
  gap: clamp(42px, 7vw, 108px);
  align-items: start;
  margin-top: 4px;
  padding: 25px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.about-independence p {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 800px) {
  .about-hero { padding: 4px 0 44px; }
  .about-hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .about-section,
  .about-principles-section,
  .about-independence { grid-template-columns: 1fr; gap: 28px; }
  .about-section,
  .about-principles-section { padding: 44px 0; }
  .about-method-steps article { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
  .about-independence { gap: 12px; padding: 22px; }
}

@media (max-width: 560px) {
  .about-principles-grid { grid-template-columns: 1fr; }
  .about-principles-grid article,
  .about-principles-grid article:nth-child(2n),
  .about-principles-grid article:nth-last-child(-n + 2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
  }
  .about-principles-grid article:last-child { border-bottom: 0; }
  .about-principles-grid article > span { margin-bottom: 20px; }
}

/* Multi-column championship quiz board. */
.champions-quiz-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, max-content));
  align-items: start;
  justify-content: start;
  gap: 10px;
}
.quiz-column-table {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.quiz-column-table .champions-quiz-table { width: auto; border: 0; }
.quiz-column-table .champions-quiz-table th,
.quiz-column-table .champions-quiz-table td { border-right: 1px solid var(--border); }
.quiz-column-table .champions-quiz-table th:last-child,
.quiz-column-table .champions-quiz-table td:last-child { border-right: 0; }
.quiz-column-table .champions-quiz-table th:first-child,
.quiz-column-table .champions-quiz-table td:first-child { width: 20%; }
.quiz-column-table .champions-quiz-table th:nth-child(2),
.quiz-column-table .champions-quiz-table td:nth-child(2) { width: 43%; }
.quiz-column-table .champions-quiz-table th:nth-child(3),
.quiz-column-table .champions-quiz-table td:nth-child(3) { width: 37%; }

@media (max-width: 800px) {
  .champions-quiz-page .quiz-column-table { max-width: 100%; }
}

.quiz-column-table .champions-quiz-table {
  width: auto;
  min-width: 0;
  table-layout: auto;
}
.quiz-column-table .champions-quiz-table th:first-child,
.quiz-column-table .champions-quiz-table td:first-child {
  width: 1%;
  white-space: nowrap;
}
.quiz-column-table .champions-quiz-table th:nth-child(3),
.quiz-column-table .champions-quiz-table td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
}
.quiz-column-table .champions-quiz-table th:nth-child(2),
.quiz-column-table .champions-quiz-table td:nth-child(2) { width: 1%; white-space: nowrap; }
.quiz-column-table .f2-race-winners-table th,
.quiz-column-table .f2-race-winners-table td { width: 1%; white-space: nowrap; }
.f2-champions-board,
.f2-winners-board { display: flex; flex-wrap: nowrap; overflow-x: auto; }
.f2-champions-board .quiz-column-table,
.f2-winners-board .quiz-column-table { width: auto; max-width: none; flex: 1 1 0; }
.f2-champions-board .champions-quiz-table,
.f2-winners-board .f2-race-winners-table { width: 100%; table-layout: fixed; }
.f2-champions-board.is-measuring .quiz-column-table,
.f2-winners-board.is-measuring .quiz-column-table { flex: 0 0 auto; }
.f2-champions-board.is-measuring .champions-quiz-table,
.f2-winners-board.is-measuring .f2-race-winners-table { width: max-content; table-layout: auto; }
.f2-champions-board .champions-quiz-table th,
.f2-champions-board .champions-quiz-table td,
.f2-winners-board .f2-race-winners-table th,
.f2-winners-board .f2-race-winners-table td { width: auto; white-space: nowrap; }
.quiz-driver-cell { position: relative; }
.quiz-column-sizer { visibility: hidden; white-space: pre; }
.quiz-answer-overlay {
  position: absolute;
  inset: 50% auto auto 13px;
  max-width: calc(100% - 26px);
  transform: translateY(-50%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quiz-empty-answer.quiz-answer-overlay { width: calc(100% - 26px); }
.f2-champions-board .champions-quiz-table th:nth-child(1),
.f2-champions-board .champions-quiz-table td:nth-child(1),
.f2-winners-board .f2-race-winners-table th:nth-child(1),
.f2-winners-board .f2-race-winners-table td:nth-child(1) { width: var(--quiz-col-1); }
.f2-champions-board .champions-quiz-table th:nth-child(2),
.f2-champions-board .champions-quiz-table td:nth-child(2),
.f2-winners-board .f2-race-winners-table th:nth-child(2),
.f2-winners-board .f2-race-winners-table td:nth-child(2) { width: var(--quiz-col-2); }
.f2-champions-board .champions-quiz-table th:nth-child(3),
.f2-champions-board .champions-quiz-table td:nth-child(3),
.f2-winners-board .f2-race-winners-table th:nth-child(3),
.f2-winners-board .f2-race-winners-table td:nth-child(3) { width: var(--quiz-col-3); }
.f2-winners-board .f2-race-winners-table th:nth-child(4),
.f2-winners-board .f2-race-winners-table td:nth-child(4) { width: var(--quiz-col-4); }
.f2-winners-board .f2-race-winners-table th:nth-child(5),
.f2-winners-board .f2-race-winners-table td:nth-child(5) { width: var(--quiz-col-5); }
.f2-winners-board .f2-race-winners-table th,
.f2-winners-board .f2-race-winners-table td { text-align: center; }
.f2-winners-board .quiz-answer-overlay { right: 0; left: 0; max-width: none; text-align: center; }
.f2-winners-board .quiz-empty-answer.quiz-answer-overlay { right: auto; left: 12.5%; width: 75%; margin: 0; }
.race-winners-quiz-page .dynamic-quiz-board .champions-quiz-table th,
.race-winners-quiz-page .dynamic-quiz-board .champions-quiz-table td { text-align: center; }
.race-winners-quiz-page .dynamic-quiz-board .quiz-answer-overlay { right: 0; left: 0; max-width: none; text-align: center; }
.race-winners-quiz-page .dynamic-quiz-board .quiz-empty-answer.quiz-answer-overlay { right: auto; left: 12.5%; width: 75%; margin: 0; }
.quiz-nation { font-size: 10px; font-weight: 750; }

/* Shared content-measured layout for every quiz board. */
.dynamic-quiz-board { display: flex; flex-wrap: nowrap; overflow-x: auto; }
.dynamic-quiz-board .quiz-column-table { width: auto; max-width: none; flex: 1 1 0; }
.dynamic-quiz-board .champions-quiz-table { width: 100%; table-layout: fixed; }
.dynamic-quiz-board.is-measuring .quiz-column-table { flex: 0 0 auto; }
.dynamic-quiz-board.is-measuring .champions-quiz-table { width: max-content; table-layout: auto; }
.dynamic-quiz-board .champions-quiz-table th,
.dynamic-quiz-board .champions-quiz-table td { white-space: nowrap; }
.dynamic-quiz-board .champions-quiz-table th:nth-child(1),
.dynamic-quiz-board .champions-quiz-table td:nth-child(1) { width: var(--quiz-col-1); }
.dynamic-quiz-board .champions-quiz-table th:nth-child(2),
.dynamic-quiz-board .champions-quiz-table td:nth-child(2) { width: var(--quiz-col-2); }
.dynamic-quiz-board .champions-quiz-table th:nth-child(3),
.dynamic-quiz-board .champions-quiz-table td:nth-child(3) { width: var(--quiz-col-3); }
.dynamic-quiz-board .champions-quiz-table th:nth-child(4),
.dynamic-quiz-board .champions-quiz-table td:nth-child(4) { width: var(--quiz-col-4); }
.dynamic-quiz-board .champions-quiz-table th:nth-child(5),
.dynamic-quiz-board .champions-quiz-table td:nth-child(5) { width: var(--quiz-col-5); }

/* Homepage product overview */
.home-hero { padding-top: 52px; padding-bottom: 48px; }
.home-hero h1 { max-width: 980px; font-size: clamp(56px,6.5vw,78px); }
.home-hero .hero-actions { margin-top: 28px; }
.series-home-hero { min-height: 455px; display: flex; align-items: center; overflow: hidden; }
.series-home-hero-copy { position: relative; z-index: 1; width: min(820px, 76%); }
.series-home-hero::after {
  /* Share the original F1 anchor; headline wrapping must not move the artwork. */
  top: calc(146.55px + clamp(80.64px, 9.36vw, 112.32px));
  right: clamp(-90px, 2vw, 30px);
  width: min(39vw, 480px);
  aspect-ratio: 1.25;
  border-width: 1px 34px 34px 1px;
  border-color: rgba(var(--accent-rgb), .2);
  border-radius: 58px 12px 58px 12px;
  background:
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(17,19,24,.03) 17px 18px),
    linear-gradient(135deg, rgba(var(--accent-rgb),.16), rgba(var(--accent-rgb),.025) 62%);
  background-clip: padding-box;
  transform: translateY(-50%) skewX(-10deg) rotate(-3deg);
}

/* Let desktop copy overlap the artwork; retain clipping on smaller screens. */
@media (min-width: 981px) {
  .series-home-hero { overflow: visible; }
}

.series-snapshot {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  gap: clamp(35px, 6vw, 80px);
  align-items: center;
  padding-top: 30px;
  padding-bottom: 62px;
  border-bottom: 1px solid var(--border);
}
.series-snapshot-intro h2 { max-width: 390px; margin: 8px 0 0; font-size: clamp(29px, 3.5vw, 43px); line-height: 1.02; letter-spacing: -.045em; }
body[data-series-home] .series-snapshot {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 32px;
}
body[data-series-home] .series-snapshot-intro h2 {
  max-width: none;
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .2em;
}
.series-snapshot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.76); box-shadow: var(--shadow-small); }
.series-snapshot-item { display: flex; min-width: 0; min-height: 126px; flex-direction: column; justify-content: flex-end; padding: 20px; color: var(--text); }
.series-snapshot-item + .series-snapshot-item { border-left: 1px solid var(--border); }
a.series-snapshot-item { transition: background .16s ease; }
a.series-snapshot-item:hover { background: var(--accent-light); }
.series-snapshot-item > span { overflow: hidden; color: var(--text-muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.series-snapshot-item > strong { display: block; overflow: hidden; margin: 12px 0 6px; color: var(--text); font-size: clamp(17px, 1.7vw, 24px); line-height: 1.05; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.series-snapshot-item > small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.home-platform { padding-top: 78px; padding-bottom: 90px; scroll-margin-top: var(--header-height); }
.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
}
.home-section-head h2,
.home-archive h2,
.home-community h2 {
  margin: 9px 0 0;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -.05em;
}
.home-section-head > p {
  max-width: 390px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}
.home-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.home-path-card {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  padding: 31px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.home-path-card::after {
  position: absolute;
  top: -85px;
  right: -75px;
  width: 225px;
  height: 225px;
  border: 34px solid rgba(var(--accent-rgb),.07);
  border-radius: 50%;
  content: "";
}
body.f2-mode .home-path-card::after { border-color: rgba(22,119,255,.08); }
body.f2-mode .home-path-card:hover { border-color: rgba(22,119,255,.38); }
body.f2-mode .home-path-analysis::after,
body.f2-mode .home-path-games::after { border-color: rgba(22,119,255,.22); }
body.f2-mode .home-path-simulator { background: #eef5ff; }

.f2-data-note,
.series-data-note { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 750; }
.f2-data-note::before,
.series-data-note::before { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); content: ""; box-shadow: 0 0 0 4px var(--accent-light); }
.f2-preview-card { cursor: default; }
.f2-preview-card > strong { color: var(--text-muted); }
.f2-season-table .driver-name small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 9px; font-weight: 600; }
.f2-season-table .race-column .cancelled-label { display: block; margin-top: 2px; color: #ff9b9b; font-size: 7px; letter-spacing: 0; text-transform: uppercase; }
.f2-season-table .race-column.cancelled-session { background: #3a2024; }
.f2-calendar-sessions { display: flex; min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.f2-calendar-sessions span { padding: 5px 8px; border-radius: 7px; background: var(--accent-light); color: var(--accent-dark); font-size: 9px; font-weight: 750; }
.f2-calendar-sessions span.cancelled-session { background: #ffe5e5; color: #9f2028; }
.f2-calendar-race { grid-template-columns: 55px 115px minmax(180px,1fr) minmax(220px,1fr); }
.f2-calendar-race .calendar-name small { margin-top: 3px; color: var(--text-muted); font-size: 10px; }
@media (max-width: 720px) {
  .f2-calendar-race { grid-template-columns: 45px 1fr; gap: 2px 6px; padding: 12px; }
  .f2-calendar-race .calendar-round { grid-row: 1 / 4; padding-left: 2px; }
  .f2-calendar-race .calendar-name { padding: 4px 0; }
  .f2-calendar-sessions { grid-column: 2; justify-content: flex-start; }
}
.home-path-card:hover { border-color: rgba(var(--accent-rgb),.35); box-shadow: 0 20px 46px rgba(16,18,24,.1); transform: translateY(-4px); }
.home-path-card > span { position: relative; z-index: 1; color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.home-path-card > div { position: relative; z-index: 1; max-width: 510px; margin-top: auto; }
.home-path-card h3 { margin: 0 0 13px; color: var(--text); font-size: clamp(29px,3vw,40px); line-height: 1.05; letter-spacing: -.045em; }
.home-path-card p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.home-path-card > strong { position: relative; z-index: 1; margin-top: 25px; color: var(--text); font-size: 12px; }
.home-path-analysis,
.home-path-games { background: #17191f; color: #fff; }
.home-path-analysis::after,
.home-path-games::after { border-color: rgba(var(--accent-rgb),.2); }
.home-path-analysis h3,
.home-path-games h3,
.home-path-analysis > strong,
.home-path-games > strong { color: #fff; }
.home-path-analysis p,
.home-path-games p { color: #aeb3bd; }
.home-path-simulator { background: #f5f0f0; }
.series-tools { padding-bottom: 90px; }
.series-tools-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 15px; }
.series-tool-card { position: relative; display: flex; min-height: 280px; flex-direction: column; overflow: hidden; padding: 29px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-small); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.series-tool-card:hover { border-color: rgba(var(--accent-rgb), .38); box-shadow: 0 20px 46px rgba(16,18,24,.1); transform: translateY(-4px); }
.series-tool-card > span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.series-tool-card h3 { max-width: 360px; margin: auto 0 12px; color: var(--text); font-size: clamp(25px, 2.6vw, 36px); line-height: 1.03; letter-spacing: -.045em; }
.series-tool-card p { max-width: 410px; margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
.series-tool-card > strong { margin-top: 24px; color: var(--text); font-size: 11px; }
.series-tool-featured { border-color: #262a32; background: linear-gradient(140deg, rgba(var(--accent-rgb), .25), transparent 52%), #17191f; }
.series-tool-featured::after { position: absolute; top: -95px; right: -85px; width: 255px; height: 255px; border: 40px solid rgba(var(--accent-rgb), .24); border-radius: 50%; content: ""; }
.series-tool-featured h3, .series-tool-featured > strong { color: #fff; }
.series-tool-featured p { color: #afb4bd; }
.series-text-link { display: inline-flex; gap: 8px; margin-top: 24px; color: var(--accent); font-size: 12px; font-weight: 800; }
.home-archive {
  display: grid;
  grid-template-columns: minmax(300px,.8fr) minmax(0,1.2fr);
  align-items: center;
  gap: clamp(45px,7vw,100px);
  padding-top: 80px;
  padding-bottom: 80px;
  border-top: 1px solid var(--border);
}
.home-archive-copy p { max-width: 510px; margin: 20px 0 0; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.home-archive .stats-grid { width: 100%; margin: 0; padding: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
.home-archive .metric { min-height: 132px; }
.home-community {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 100px;
  padding: 45px 48px;
  border-radius: 21px;
  background: #17191f;
  color: #fff;
  box-shadow: 0 25px 60px rgba(16,18,24,.15);
}
.home-community h2 { color: #fff; }
.home-community p { max-width: 660px; margin: 17px 0 0; color: #aeb3bd; font-size: 15px; line-height: 1.65; }
.home-community .button { flex: 0 0 auto; }
.home-community.home-community-compact { gap: 28px; padding: 28px 32px; margin-bottom: 60px; border-radius: 18px; }
.home-community-compact h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -.035em; }
.home-community-compact p { max-width: 600px; margin: 10px 0 0; font-size: 14px; }
.home-account-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 18px; }
.home-account-signin { color: #d6d8de; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.home-account-signin:hover { color: #fff; }
.home-account-signin:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }

@media (max-width: 800px) {
  .home-hero { padding-top: 46px; padding-bottom: 42px; }
  .home-hero h1 { font-size: clamp(46px,13vw,58px); }
  .series-home-hero { min-height: 430px; }
  .series-home-hero-copy { width: 100%; }
  .series-home-hero::after { right: -170px; width: 390px; opacity: .55; }
  .series-snapshot { grid-template-columns: 1fr; gap: 24px; padding-bottom: 52px; }
  .series-snapshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .series-snapshot-item:nth-child(3) { border-left: 0; }
  .series-snapshot-item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .home-platform { padding-top: 55px; padding-bottom: 65px; }
  .home-section-head { align-items: start; flex-direction: column; gap: 15px; }
  .home-path-grid, .home-archive { grid-template-columns: 1fr; }
  .home-path-card { min-height: 270px; padding: 26px; }
  .series-tools { padding-bottom: 65px; }
  .series-tools-grid { grid-template-columns: 1fr; }
  .series-tool-card { min-height: 245px; padding: 26px; }
  .home-archive { gap: 35px; padding-top: 60px; padding-bottom: 60px; }
  .home-community { align-items: flex-start; flex-direction: column; margin-bottom: 70px; padding: 34px 28px; }
  .home-community.home-community-compact { padding: 26px 24px; gap: 22px; }
}

@media (max-width: 520px) {
  .series-switcher { gap: 1px; margin-right: 5px; padding: 2px; }
  .series-switcher a { min-width: 32px; padding: 7px 5px; font-size: 9px; }
  .series-home-hero { min-height: 400px; }
  .series-home-hero::after { right: -230px; opacity: .42; }
  .series-snapshot-grid { grid-template-columns: 1fr; }
  .series-snapshot-item + .series-snapshot-item { border-top: 1px solid var(--border); border-left: 0; }
  .series-snapshot-item { min-height: 105px; }
  .home-archive .stats-grid { grid-template-columns: 1fr 1fr; }
  .home-archive .metric { min-height: 105px; padding: 18px; }
}

/* Cross-site clarity and responsive navigation */
.mobile-nav-toggle {
  display: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.mobile-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}
.mobile-nav-toggle span + span { margin-top: 5px; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.global-search {
  position: relative;
  width: clamp(190px,18vw,250px);
  margin-right: 5px;
}
.global-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.global-search input:focus { border-color: rgba(var(--accent-rgb),.55); outline: 0; box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.08); }
.global-search-icon {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 14px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  pointer-events: none;
}
.global-search-icon::after { position: absolute; right: -5px; bottom: -3px; width: 6px; height: 2px; border-radius: 2px; background: var(--text-muted); content: ""; transform: rotate(45deg); }
.global-search-results {
  position: absolute;
  z-index: 1100;
  top: calc(100% + 9px);
  left: 0;
  width: min(390px,calc(100vw - 32px));
  max-height: min(560px,calc(100vh - var(--header-height) - 30px));
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.99);
  box-shadow: var(--shadow-medium);
}
.global-search-results[hidden] { display: none; }
.global-search-group + .global-search-group { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); }
.global-search-group-title { padding: 7px 12px 5px; color: var(--text-muted); font-size: 8px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.global-search-result { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; gap: 2px 10px; padding: 10px 12px; border-radius: 9px; color: var(--text); }
.global-search-result:hover,
.global-search-result:focus,
.global-search-result.is-active { background: var(--surface-alt); outline: 0; }
.global-search-result > span { grid-row: span 2; align-self: center; color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.global-search-result > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result > small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result > em { display: flex; grid-row: 1 / 3; grid-column: 3; align-items: center; gap: 3px; font-style: normal; }
.global-search-result > em i { padding: 3px 5px; border-radius: 4px; background: var(--accent-light); color: var(--accent-dark); font-size: 7px; font-style: normal; font-weight: 850; white-space: nowrap; }
.global-search-all { display: flex; justify-content: space-between; margin-top: 6px; padding: 11px 12px; border-top: 1px solid var(--border); color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.global-search-all:hover,
.global-search-all.is-active { background: var(--accent-light); }
.global-search-empty { padding: 18px; color: var(--text-muted); font-size: 12px; line-height: 1.5; text-align: center; }
.detail-official-name { margin-top: 9px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }

/* Global search results */
.search-page { padding-top: 58px; padding-bottom: 110px; }
.search-page-hero { padding-bottom: 42px; border-bottom: 1px solid var(--border); }
.search-page-hero h1 { max-width: 900px; margin: 0; font-size: clamp(48px, 7vw, 82px); line-height: .95; letter-spacing: -.06em; }
.search-page-hero > p { max-width: 680px; margin: 22px 0 0; color: var(--text-secondary); font-size: 16px; line-height: 1.7; }
.search-page-form { display: grid; grid-template-columns: minmax(260px, 1fr) 210px auto; gap: 12px; align-items: end; margin-top: 34px; }
.search-page-form label { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.search-page-form label > span { color: var(--text-muted); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.search-page-form input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.search-page-form input:focus { border-color: rgba(var(--accent-rgb), .6); outline: 0; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .09); }
.search-page-status { padding: 28px 0 17px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.search-result-group { padding: 28px 0 38px; }
.search-result-group + .search-result-group { border-top: 1px solid var(--border); }
.search-result-group-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.search-result-group-head h2 { margin: 0; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.045em; }
.search-result-group-head > span { color: var(--text-muted); font-size: 11px; }
.search-result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.search-result-card { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 14px; align-items: center; min-height: 116px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-small); transition: border-color .16s ease, transform .16s ease; }
.search-result-card:hover { border-color: rgba(var(--accent-rgb), .4); transform: translateY(-2px); }
.search-result-card > div:first-child { min-width: 0; }
.search-result-card > div:first-child > span { color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.search-result-card h3 { overflow: hidden; margin: 7px 0 5px; color: var(--text); font-size: 18px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.search-result-card p { overflow: hidden; margin: 0; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-card > strong { color: var(--accent); }
.search-result-series { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.search-result-series span { padding: 4px 6px; border-radius: 5px; background: var(--accent-light); color: var(--accent-dark); font-size: 8px; font-weight: 850; white-space: nowrap; }

@media (max-width: 720px) {
  .global-search-result { grid-template-columns: 65px minmax(0,1fr); }
  .global-search-result > em { display: none; }
  .search-page { padding-top: 38px; padding-bottom: 75px; }
  .search-page-form { grid-template-columns: 1fr; }
  .search-page-form .button { width: 100%; }
  .search-result-list { grid-template-columns: 1fr; }
  .search-result-card { grid-template-columns: minmax(0,1fr) 16px; }
  .search-result-series { grid-column: 1; grid-row: 2; justify-content: flex-start; }
}
.nav-link.active,
.dropdown-toggle.active { background: var(--surface-alt); color: var(--text); }
.dropdown-menu a.active { background: var(--accent-light); color: var(--accent-dark); }
.records-primary-controls .records-switch { margin: 0; }
.analysis-visualization-workspace,
.analysis-chart-section { min-width: 0; }
.race-analysis-selectors label,
.race-analysis-selectors select { min-width: 0; max-width: 100%; }
.race-flow-chart { width: 100%; max-width: 100%; }

/* One consistent native dropdown treatment across every tool and database page. */
select:not([multiple]) {
  min-height: 44px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  appearance: none;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.25 5.25 3.75 3.5 3.75-3.5' stroke='%236f7682' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  box-shadow: 0 1px 2px rgba(16,18,24,.04), inset 0 1px 0 rgba(255,255,255,.72);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

select:not([multiple]):hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb), .48);
  background-color: #fff;
}

select:not([multiple]):focus:not(:disabled),
select:not([multiple]):focus-visible:not(:disabled) {
  border-color: rgba(var(--accent-rgb), .68);
  outline: 0;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .1), 0 1px 2px rgba(16,18,24,.04);
}

select option,
select optgroup {
  background: #fff;
  color: var(--text);
  font: inherit;
}

select optgroup { font-weight: 800; }

select[multiple] {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

button:disabled,
input:disabled,
select:disabled { cursor: not-allowed; opacity: .62; }
.section-heading { gap: 20px; }
h1, h2, h3, [id] { scroll-margin-top: calc(var(--header-height) + 20px); }

@media (forced-colors: active) {
  select:not([multiple]) {
    padding-right: 12px;
    appearance: auto;
    background-image: none;
  }
}

@media (max-width: 800px) {
  .site-header .nav { position: relative; }
  .mobile-nav-toggle { display: block; margin-left: auto; }
  .series-switcher { margin-right: 8px; margin-left: auto; }
  .main-nav {
    position: fixed;
    z-index: 1001;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    height: calc(100dvh - var(--header-height));
    max-height: none;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 14px max(28px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    background: rgba(255,255,255,.99);
    box-shadow: 0 18px 40px rgba(17,19,24,.15);
  }
  .main-nav.is-open { display: flex; }
  .main-nav > * { flex: 0 0 auto; }
  body.mobile-nav-open { overflow: hidden; }
  .main-nav > .nav-link,
  .main-nav > .nav-dropdown,
  .main-nav .dropdown-toggle { width: 100%; }
  .main-nav > .nav-link,
  .main-nav .dropdown-toggle {
    display: inline-flex;
    min-height: 46px;
    justify-content: space-between;
    padding: 11px 13px;
    font-size: 13px;
  }
  .main-nav .account-link { margin: 4px 0 0; justify-content: center; border-color: var(--text); background: var(--text); color: #fff; }
  .global-search { order: -1; width: 100%; margin: 0 0 5px; }
  .global-search input { height: 46px; font-size: 13px; }
  .global-search-icon { top: 15px; }
  .global-search-results { position: static; width: 100%; max-height: 320px; margin-top: 5px; box-shadow: none; }
  .nav-dropdown .dropdown-menu,
  .nav-dropdown:not(.is-open):hover .dropdown-menu,
  .nav-dropdown:not(.is-open):focus-within .dropdown-menu,
  .nav-dropdown.is-open .dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    max-height: none;
    margin: 3px 0 6px;
    overflow: visible;
    visibility: visible;
    border-radius: 11px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav-dropdown.is-open .dropdown-menu { display: block; }
  .nav-dropdown.is-open .dropdown-menu {
    max-height: min(52dvh, 470px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .dropdown-menu a { min-height: 48px; align-items: flex-start; justify-content: center; }
  .mobile-nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .mobile-nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .mobile-nav-toggle span { transition: transform .16s ease, opacity .16s ease; }
  .records-primary-controls .records-switch { width: 100%; }
  .records-primary-controls .records-switch .standings-mode-button { flex: 1; }
  .database-overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: -22px; }
  .database-overview-stats .metric { min-height: 112px; }
}

@media (max-width: 520px) {
  .brand { width: auto; overflow: visible; font-size: 21px; }
  .brand::after { content: none; }
  .brand span { display: inline; }
  .brand::before { width: 6px; height: 22px; margin-right: 9px; }
  .dynamic-quiz-board .quiz-column-table {
    flex: 0 0 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .dynamic-quiz-board .champions-quiz-table { min-width: 430px; }
  .race-winners-quiz-page .dynamic-quiz-board .champions-quiz-table,
  .f2-winners-board .f2-race-winners-table { min-width: 540px; }
  .container { width: min(100% - 28px, var(--max-width)); }
  .page-head h1 { font-size: clamp(42px,14vw,58px); }
  .analysis-detail-head h1 { font-size: clamp(40px,13vw,56px); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading .button { width: 100%; justify-content: center; }
}

@media (max-width: 340px) {
  .brand {
    width: 32px;
    flex: 0 0 32px;
    overflow: hidden;
    font-size: 0;
  }
  .brand::after { color: var(--text); content: "R"; font-size: 21px; font-weight: 900; }
  .brand span { display: none; }
  .brand::before { width: 5px; height: 21px; margin-right: 7px; }
  .series-switcher { margin-right: 4px; }
}

@media (max-width: 900px) {
  .driver-result-filters { grid-template-columns: minmax(220px,1fr) repeat(2,minmax(130px,.6fr)); }
  .driver-result-filters button { grid-column: 3; }
}

@media (max-width: 760px) {
  .driver-profile-hero { min-height: 265px; }
  .driver-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .driver-stat-grid .detail-stat, .driver-stat-grid .detail-stat:nth-child(4n) { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .driver-stat-grid .detail-stat:nth-child(2n) { border-right: 0; }
  .driver-stat-grid .detail-stat:nth-last-child(-n+2) { border-bottom: 0; }
  .driver-timeline-heading { align-items: flex-start; }
  .driver-timeline-actions { align-items: flex-end; }
  .driver-timeline-actions .section-note { display: none; }
  .driver-result-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .driver-result-filters label:first-child { grid-column: 1 / -1; }
  .driver-result-filters button { grid-column: auto; }
  .driver-results-section table { display: none; }
  .driver-result-cards { display: grid; gap: 8px; }
  .driver-result-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
  .driver-result-card > div:first-child { display: grid; min-width: 0; gap: 4px; }
  .driver-result-card > div:first-child > span { color: var(--accent); font-size: 8px; font-weight: 850; text-transform: uppercase; }
  .driver-result-card > div:first-child strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .driver-result-card > div:first-child small { color: var(--text-muted); font-size: 9px; }
  .driver-result-card > b { align-self: start; }
  .driver-result-card-meta { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 5px; }
  .driver-result-card-meta span { padding: 4px 6px; border-radius: 5px; background: var(--surface-alt); color: var(--text-muted); font-size: 8px; font-weight: 750; }
  .driver-result-card > .driver-result-awards { grid-column: 1 / -1; margin-top: 0; }
}

@media (max-width: 460px) {
  .driver-profile-badges { padding-right: 68px; }
  .driver-result-filters { grid-template-columns: 1fr; }
  .driver-result-filters label:first-child { grid-column: auto; }
  .driver-season-item { min-width: 220px; flex-basis: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .driver-detail-skeleton *, .driver-stat-skeleton::after, .driver-timeline-skeleton i, .driver-results-skeleton i { animation: none; }
}
