@import url("https://fonts.googleapis.com/css2?family=Georama:wght@400;500;600;700&display=swap");

.compact-section { padding-top: 28px; padding-bottom: 28px; }
.season-scoring p { margin: 0; padding: 18px 22px; color: var(--muted, #9ba8ba); line-height: 1.6; font-size: 15px; }

:root {
  color-scheme: dark;
  --bg: #050608;
  --surface: #101419;
  --surface-2: #171c22;
  --surface-3: #20262d;
  --line: #303841;
  --line-soft: #20262c;
  --text: #eef2f5;
  --muted: #9ba6b0;
  --muted-2: #717c86;
  --orange: #ff9900;
  --orange-light: #ffad33;
  --orange-deep: #e98200;
  --orange-soft: rgba(255, 153, 0, .12);
  --podium-gold: #ffd166;
  --podium-silver: #d9e1e8;
  --podium-bronze: #d68a55;
  --fastest-lap: #d497ff;
  --font-ui: "Georama", "Segoe UI", Arial, Helvetica, sans-serif;
  --font-data: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-weight: 400; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.shell { width: min(var(--max), 100%); margin: auto; padding-inline: clamp(22px, 5vw, 76px); }

.site-header { height: 76px; background: rgba(5, 6, 8, .94); border-bottom: 1px solid var(--line); display: flex; align-items: center; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--orange), rgba(255,153,0,.08) 55%, transparent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 28px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .16em; white-space: nowrap; }
.brand-logo { display: block; width: 120px; height: auto; max-height: 34px; object-fit: contain; }
.brand-mark { background: linear-gradient(180deg, var(--orange-light), var(--orange-deep)); color: #111; padding: 8px 10px; font-size: 18px; letter-spacing: -.06em; box-shadow: 0 0 28px rgba(255,153,0,.22); }
.site-nav { display: flex; gap: clamp(14px, 1.7vw, 28px); align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.site-nav a { position: relative; padding-block: 8px; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--orange); transition: right .18s ease; }
.site-nav a:hover, .site-nav a[aria-current=page] { color: var(--text); }
.site-nav a:hover::after, .site-nav a[aria-current=page]::after { right: 0; }
.header-action { border: 1px solid #4a535d; background: var(--surface); color: var(--text); border-radius: 8px; padding: 10px 16px; font-size: 12px; font-weight: 700; cursor: pointer; }
.header-action:hover { border-color: var(--orange); color: var(--orange-light); }
.mobile-nav-toggle, .mobile-nav { display: none; }
.stats-auth-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.stats-auth-overlay[data-auth-pending] .stats-auth-card { visibility: hidden; opacity: 0; }
.stats-auth-overlay[hidden] { display: none; }
.stats-auth-card { position: relative; width: min(500px, 100%); padding: 34px 32px 28px; border: 1px solid rgba(255,153,0,.42); border-radius: 16px; background: radial-gradient(circle at top, rgba(255,153,0,.14), transparent 42%), rgba(8,11,15,.99); box-shadow: 0 30px 90px rgba(0,0,0,.72); text-align: center; }
.stats-auth-card h2 { margin: 0; font-size: 26px; text-transform: uppercase; letter-spacing: .025em; }
.stats-auth-card p { margin: 12px auto 0; max-width: 390px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.stats-auth-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 17px; border: 1px solid rgba(255,153,0,.52); border-radius: 50%; background: rgba(255,153,0,.11); color: var(--orange-light); font-size: 34px; line-height: 1; }
.stats-auth-close { position: absolute; top: 11px; right: 11px; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 20px; cursor: pointer; }
.stats-auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 23px; }
.stats-auth-actions button { min-height: 44px; border-radius: 9px; padding: 9px 12px; font: 800 12px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.stats-auth-primary { border: 1px solid rgba(255,153,0,.65); background: linear-gradient(180deg, var(--orange-light), var(--orange-deep)); color: #111; }
.stats-auth-secondary { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.055); color: var(--text); }
.stats-auth-card small { display: block; margin-top: 14px; color: #ffabab; }

.breadcrumbs { padding-top: 30px; color: var(--muted-2); font: 700 10px var(--font-data); text-transform: uppercase; letter-spacing: .12em; position: relative; z-index: 2; }
.breadcrumbs span { margin: 0 9px; color: #4d5761; }
.breadcrumbs a:hover { color: var(--orange-light); }
.hero { background: radial-gradient(circle at 82% 28%, rgba(255,153,0,.14), transparent 25%), linear-gradient(125deg, #050608, #11161c 72%, #080a0d); overflow: hidden; position: relative; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .28; background: repeating-linear-gradient(115deg, transparent 0 82px, rgba(255,255,255,.025) 83px 84px); }
.hero-inner { min-height: 480px; padding-top: 56px; padding-bottom: 58px; display: grid; grid-template-columns: 1.3fr .8fr; gap: 8vw; align-items: end; position: relative; z-index: 2; }
.hero.compact .hero-inner { min-height: 350px; }
.hero.entity-hero .hero-inner { align-items: start; }
.hero.event-hero .hero-inner { align-items: start; }
.home-hero .hero-inner { min-height: 430px; align-items: start; padding-top: 56px; }
.home-hero .hero-side { align-self: start; }
.eyebrow { margin: 0 0 18px; color: var(--orange-light); font: 750 12px var(--font-ui); text-transform: uppercase; letter-spacing: .08em; }
.eyebrow.red { color: var(--orange); }
h1 { font-size: clamp(46px, 5.75vw, 86px); font-weight: 700; line-height: .88; letter-spacing: -.045em; text-transform: uppercase; margin: 0; max-width: 920px; }
h1 em { font-style: normal; color: var(--orange-light); -webkit-text-stroke: 0; }
.entity-name { display: block; font-size: .72em; line-height: .96; letter-spacing: -.055em; }
.lead { font-size: 17px; line-height: 1.65; color: #b7c0c9; max-width: 680px; margin: 32px 0 0; }
.hero-side { border-top: 2px solid var(--orange); background: rgba(5,6,8,.2); }
.hero-stat { padding: 20px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.hero-stat strong { font-size: 36px; letter-spacing: -.06em; color: var(--orange-light); }
.hero-stat span { font: 700 12px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; color: var(--muted); text-align: right; }
.hero-stat.season-champions { display: grid; gap: 9px; align-items: stretch; }
.hero-stat.season-champions > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; }
.hero-stat.season-champions strong { font-size: 17px; letter-spacing: -.025em; text-align: right; }
.hero-stat.season-champions span { color: var(--muted); font-size: 12px; text-align: left; }
.track-shape { position: absolute; width: 520px; height: 520px; right: -190px; top: 60px; border: 42px solid rgba(255,153,0,.08); border-radius: 47% 53% 37% 63%; transform: rotate(22deg); opacity: .95; box-shadow: inset 0 0 0 1px rgba(255,173,51,.14), 0 0 80px rgba(255,153,0,.06); }

.section { padding-block: 72px; background: var(--bg); }
.section.alt { background: #0a0d11; border-block: 1px solid var(--line-soft); }
.section.dark { background: linear-gradient(145deg, #0a0d11, #11161c); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.section-heading h2 { font-size: clamp(34px, 4vw, 58px); font-weight: 700; line-height: .94; letter-spacing: -.06em; text-transform: uppercase; margin: 0; }
.section-heading p:last-child { max-width: 500px; color: var(--muted); line-height: 1.6; }
.text-link { color: var(--orange-light); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; border-bottom: 2px solid var(--orange); padding-bottom: 5px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 65px rgba(0,0,0,.22); }
.constructor-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.constructor-stat-grid .stat-card { padding: 20px; }
.constructor-stat-grid .stat-card strong { font-size: clamp(29px, 3.4vw, 42px); }
.constructor-stat-grid .stat-card span { margin-top: 6px; font-size: 10px; }
.stat-card { padding: 24px; border-left: 1px solid var(--line); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; left: 0; right: 65%; bottom: 0; height: 3px; background: var(--orange); }
.stat-card:first-child { border-left: 0; }
.stat-card strong { display: block; font-size: 38px; letter-spacing: -.06em; color: var(--text); }
.stat-card span { display: block; color: var(--muted); margin-top: 8px; font: 700 11px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.archive-card { background: linear-gradient(145deg, var(--surface), #0d1116); border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-height: 190px; display: flex; flex-direction: column; transition: .18s transform, .18s border-color, .18s box-shadow; }
.archive-card:hover { transform: translateY(-3px); border-color: var(--orange); box-shadow: 0 16px 45px rgba(0,0,0,.25), 0 0 0 1px rgba(255,153,0,.08); }
.card-kicker { color: var(--orange-light); font: 750 12px var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.archive-card h3 { font-size: 25px; letter-spacing: -.035em; margin: 17px 0 8px; }
.archive-card p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.card-arrow, .row-link { background: linear-gradient(180deg, var(--orange-light), var(--orange-deep)); color: #101214; box-shadow: 0 6px 20px rgba(255,153,0,.18); }
.card-arrow { margin-top: auto; align-self: flex-end; width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; font-size: 18px; }

.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.24); }
.statistics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.statistics-table table { width: 100%; min-width: 0; table-layout: fixed; }
.statistics-table th:first-child, .statistics-table td:first-child { width: 66px; }
.statistics-table th:last-child, .statistics-table td:last-child { width: 86px; text-align: right; }
.statistics-rate-table .table-scroll { overflow: hidden; }
.statistics-rate-table .table-meta { align-items: center; }
.statistics-rate-table th, .statistics-rate-table td { padding-inline: 10px; }
.statistics-rate-table th:first-child, .statistics-rate-table td:first-child { width: 52px; }
.statistics-rate-table th:nth-child(2), .statistics-rate-table td:nth-child(2) { width: 31%; }
.statistics-rate-table th:nth-child(3), .statistics-rate-table td:nth-child(3) { width: 14%; }
.statistics-rate-table th, .statistics-rate-table td { text-align: center; }
.statistics-rate-table th:nth-child(2), .statistics-rate-table td:nth-child(2) { text-align: left; }
.statistics-rate-table th:nth-child(4), .statistics-rate-table td:nth-child(4), .statistics-rate-table th:nth-child(5), .statistics-rate-table td:nth-child(5) { width: 21.5%; text-align: center; }
.statistics-rate-links { display: inline-flex; align-items: center; justify-content: flex-end; gap: 14px; white-space: nowrap; }
.statistics-rate-links a { color: var(--orange-light); font: 700 11px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.statistics-rate-links a:hover { color: var(--text); }
.engine-season-summary table { width: 100%; min-width: 0; table-layout: fixed; }
.engine-season-summary th:first-child, .engine-season-summary td:first-child { width: 88px; }
.engine-season-summary th:nth-child(2), .engine-season-summary td:nth-child(2) { width: 34%; }
.standings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.standings-grid.single { grid-template-columns: minmax(0, 1fr); }
.standings-grid > .table-card, .standings-grid .table-scroll { min-width: 0; }
.standings-grid .table-scroll { overflow-x: hidden; }
.standings-grid table { width: 100%; min-width: 0; table-layout: fixed; }
.standings-grid .standing-position { width: 42px; }
.standings-grid .standing-points { width: 62px; }
.standings-grid .standing-gap { width: 66px; }
.standing-disqualified td { color: #a8b0b9; background: rgba(105, 45, 40, .16); }
.standing-disqualified td:first-child { color: #e07b6d; font-weight: 800; }
.standing-status { color: #e07b6d; font-size: .84em; font-weight: 700; }
.season-championship.disqualified { color: #e07b6d; }
.standings-grid th, .standings-grid td { padding: 14px 12px; }
.standings-grid th { color: var(--orange-light); font-size: 14px; }
.standings-grid th:nth-last-child(-n+2), .standings-grid td:nth-last-child(-n+2) { text-align: right; }
.standings-grid th:last-child, .standings-grid td:last-child { text-align: left; padding-left: 6px; }
.standings-grid .table-meta > span:first-child { color: var(--orange-light); font: 800 15px var(--font-ui); letter-spacing: .02em; }
.standings-grid .table-meta { padding-left: 12px; padding-right: 12px; }
.table-meta { padding: 16px 21px; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font: 700 12px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 800px; }
th { text-align: left; background: #0b0e12; color: var(--orange-light); padding: 15px 20px; font: 800 14px var(--font-ui); text-transform: uppercase; letter-spacing: .04em; }
td { padding: 18px 20px; border-top: 1px solid var(--line-soft); font-size: 14px; font-weight: 500; color: #dce2e7; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #161c22; }
.year-link { font-size: 20px; font-weight: 700; color: var(--text); }
.year-link:hover { color: var(--orange-light); }
.gp-event-link { display: flex; flex-direction: column; gap: 7px; min-width: 230px; }
.gp-event-name { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.25; letter-spacing: -.015em; }
.gp-event-link small { color: var(--muted); font: 750 11px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; }
.gp-event-link:hover .gp-event-name { color: var(--orange-light); }
.gp-flag { flex: 0 0 auto; width: 24px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 3px 10px rgba(0,0,0,.3); }
.status { display: inline-block; border-radius: 999px; padding: 6px 9px; font: 800 9px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; background: var(--surface-3); color: var(--muted); border: 1px solid #39434d; }
.status.official { background: var(--orange-soft); color: var(--orange-light); border-color: rgba(255,153,0,.35); }
.status.scheduled { background: #151a20; color: #89949f; }
.current-event { background: linear-gradient(90deg, rgba(255,153,0,.14), rgba(255,153,0,.025)); }
.current-event td { border-top-color: rgba(255,153,0,.34); }
.current-event .gp-event-name { color: var(--orange-light); }
.current-event .status.scheduled { background: rgba(255,153,0,.14); color: var(--orange-light); border-color: rgba(255,153,0,.48); }
.row-link { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 6px; font-size: 18px; }

.decade { margin-top: 46px; }
.decade:first-child { margin-top: 0; }
.decade-title { font: 750 14px var(--font-ui); color: var(--orange); text-transform: uppercase; letter-spacing: .035em; margin-bottom: 14px; }
.year-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.year-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 12px; font-size: 20px; font-weight: 700; text-align: center; }
.year-tile:hover { background: var(--orange); border-color: var(--orange); color: #111; }
.alpha-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.alpha-nav a { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; font: 850 11px ui-monospace, monospace; }
.alpha-nav a:hover { background: var(--orange); border-color: var(--orange); color: #111; }
.gp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gp-row { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.gp-row:hover { border-color: var(--orange); background: #131920; }
.gp-row strong { display: block; font-size: 17px; }
.gp-row small { display: block; color: var(--muted); margin-top: 6px; }
.gp-row b { font-size: 28px; color: var(--orange-light); }

.entity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.entity-row { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 88px; }
.entity-row:hover { border-color: var(--orange); background: #131920; }
.entity-row strong { display: block; font-size: 16px; line-height: 1.25; }
.entity-row small { display: block; color: var(--muted); margin-top: 7px; line-height: 1.35; }
.entity-row b { color: var(--orange-light); font: 850 11px ui-monospace, monospace; text-align: right; white-space: nowrap; }
.driver-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.driver-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; font: 850 8px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.driver-badge.champion { color: #111; background: var(--orange); border-color: var(--orange); }
.driver-badge.winner { color: var(--orange-light); background: var(--orange-soft); border-color: rgba(255,153,0,.42); }
.driver-badge.active { color: #8ee7a8; background: rgba(55,184,92,.1); border-color: rgba(89,211,124,.38); }
.driver-legend { padding-block: 16px; background: #0a0d11; border-bottom: 1px solid var(--line-soft); }
.driver-legend .shell { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.driver-legend .shell > span:first-child { margin-right: 4px; color: var(--muted); font: 700 12px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.driver-key-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.driver-title-history { width: 100%; margin: 16px 0; padding: 18px 22px; border: 1px solid var(--line); border-top: 2px solid var(--orange); background: linear-gradient(110deg,#11161c,#17130e); display: flex; align-items: baseline; gap: 18px; }
.driver-title-history strong { color: var(--text); font-size: clamp(16px,1.45vw,20px); line-height: 1.35; font-weight: 650; }
.driver-key-stat { min-height: 178px; padding: 22px; border: 1px solid rgba(255,153,0,.42); border-top: 4px solid var(--orange); border-radius: 10px; background: radial-gradient(circle at 85% 15%, rgba(255,153,0,.16), transparent 32%), linear-gradient(145deg, #14191f, #0b0e12); display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 18px 55px rgba(0,0,0,.22); }
.driver-key-stat span { color: var(--orange-light); font: 750 11px var(--font-ui); text-transform: uppercase; letter-spacing: .06em; }
.driver-key-stat strong { color: var(--text); font-size: clamp(60px, 5.8vw, 86px); line-height: .82; letter-spacing: -.08em; }
.metric-rate { font: 700 .25em/1 var(--font-ui); letter-spacing: 0; color: var(--muted); vertical-align: .18em; white-space: nowrap; }
.stat-link { color: inherit; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.stat-link:hover { color: inherit; transform: translateY(-3px); border-color: var(--orange-light); box-shadow: 0 22px 62px rgba(0,0,0,.32), 0 0 0 1px rgba(255,153,0,.14); }
.season-tone-0 td { background: rgba(255,255,255,.018); }
.season-tone-1 td { background: rgba(255,255,255,.045); }
.champion-season td { background: #3d352b !important; }
.champion-season .season-year-cell { color: var(--orange-light); font-weight: 800; }
.season-year-cell { white-space: nowrap; vertical-align: middle; }
.season-year-cell > span:first-child { display: inline-block; min-width: 37px; }
/* Il selettore generico qui sopra prevaleva sul contenitore con la livrea. */
.season-year-cell > span.season-year-identity { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.season-year-label { display: inline-flex; align-items: center; gap: 7px; }
.season-year-cell .season-champion-badge { display: inline-flex; align-items: center; margin-left: 10px; }
.season-year-label .driver-badge.champion { margin-left: 0; transform: none; align-self: center; }
.season-summary-card .driver-badge.champion { display: inline-flex; min-height: 18px; margin-left: 10px; padding: 3px 5px; color: var(--orange-light); background: rgba(255,153,0,.13); border-color: rgba(255,153,0,.42); font-size: 7px; line-height: 1; vertical-align: middle; transform: translateY(-1px); }
.season-summary-card th:nth-child(n+3), .summary-number-cell, .summary-championship-cell { text-align: center; }
.season-summary-card th { color: var(--orange-light); }
.season-driver-list { min-width: 165px; }
.season-driver { display: block; margin: 2px 0; }
.season-driver-number { display: inline-block; min-width: 31px; margin-right: 7px; color: var(--orange-light); font: 750 12px var(--font-data); }
.driver-secondary-stats { margin-bottom: 18px; }
.driver-secondary-stats .stat-card { display: flex; flex-direction: column; justify-content: space-between; }
.driver-secondary-stats .stat-card span { order: 1; }
.driver-secondary-stats .stat-card strong { order: 2; }
.driver-secondary-stats .stat-card .metric-rate { order: initial; }
.driver-secondary-stats .metric-rate { font-size: .38em; }
.life-detail { display: block; margin-top: 6px; color: var(--orange-light); }
.constructor-season-summary table { table-layout: fixed; }
.constructor-season-summary col.summary-year { width: 14%; }
.constructor-season-summary col.summary-driver { width: 28%; }
.constructor-season-summary col.summary-gp { width: 7%; }
.constructor-season-summary col.summary-wins, .constructor-season-summary col.summary-podiums { width: 8%; }
.constructor-season-summary col.summary-poles, .constructor-season-summary col.summary-fastest { width: 7%; }
.constructor-season-summary col.summary-points { width: 9%; }
.constructor-season-summary col.summary-championship { width: 12%; }
.constructor-season-total td { color: var(--orange-light); font: 800 14px var(--font-ui); text-transform: uppercase; letter-spacing: .03em; }
.constructor-season-total td:first-child { text-align: right; }
.constructor-season-total td:nth-child(2), .constructor-season-total td:nth-child(3) { text-align: center; }
.season-championship { font-weight: 750; }
.season-championship.gold { color: var(--podium-gold); }
.season-championship.silver { color: var(--podium-silver); }
.season-championship.bronze { color: var(--podium-bronze); }
.season-championship.standard { color: #89939d; }
.season-championship.unavailable { color: var(--muted-2); }
.driver-season-champion { margin-left: 12px !important; }
.entity-link { font-weight: 600; }
.entity-link:hover, .result-meta a:hover { color: var(--orange-light); }
.career-event-name { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.25; min-width: 250px; }
.career-event-name:hover { color: var(--orange-light); }
.career-event-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 34px; color: var(--muted-2); font-size: 10px; line-height: 1.35; }
.career-event-meta time { color: var(--muted); font: 700 10px var(--font-data); text-transform: uppercase; letter-spacing: .04em; }
.career-event-meta a:hover { color: var(--orange-light); }
.career-grid { color: var(--text); font-weight: 500; }
.career-grid.pole { color: var(--podium-gold); font-weight: 700; text-shadow: 0 0 18px rgba(255,209,102,.18); }
.career-finish-stack { display: inline-flex; align-items: center; gap: 7px; }
.career-finish { color: #87929c; font-size: 20px; font-weight: 700; line-height: 1; }
.career-finish.gold { color: var(--podium-gold); }
.career-finish.silver { color: var(--podium-silver); }
.career-finish.bronze { color: var(--podium-bronze); }
.fastest-lap-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--fastest-lap); font: 700 9px var(--font-data); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.fastest-lap-badge > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px rgba(212,151,255,.4); }
.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; background: var(--line); border: 1px solid var(--line); }
.fact-grid > div { min-height: 98px; padding: 18px; background: #0b0e12; display: flex; flex-direction: column; gap: 10px; }
.fact-grid span { color: var(--muted); font: 700 11px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.fact-grid strong { color: var(--text); font-size: 16px; line-height: 1.35; }

.record-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--surface); }
.record { padding: 28px; min-height: 220px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.record:first-child { border-left: 0; }
.record span { color: var(--muted); font: 700 12px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.record h3 { margin: 24px 0 8px; font-size: 22px; }
.record strong { font-size: 58px; color: var(--orange-light); letter-spacing: -.06em; margin-top: auto; }
.notice { border-left: 4px solid var(--orange); background: var(--surface); padding: 18px 20px; color: var(--muted); line-height: 1.55; }
.empty-state { padding: 48px; text-align: center; color: var(--muted); }
.result-pos { font-size: 20px; font-weight: 700; color: var(--orange-light); }
.result-driver-line, .result-driver-link { display: inline-flex; align-items: center; gap: 7px; }
.result-driver-line { flex-wrap: wrap; }
.driver-flag { flex: 0 0 auto; width: 20px; height: 14px; object-fit: cover; border-radius: 1px; box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 2px 7px rgba(0,0,0,.26); }
.constructor-identity { display: inline-flex; align-items: center; gap: 7px; }
.constructor-colours { display: inline-flex; flex: 0 0 auto; align-items: stretch; gap: 3px; width: 15px; height: 30px; transform: skewX(-15deg); }
.constructor-colours::before, .constructor-colours::after { content: ""; flex: 1; border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4), 0 0 0 1px rgba(250,250,250,.10); }
.constructor-colours::before { background: var(--team-primary); }
.constructor-colours::after { background: var(--team-secondary); }
.result-meta { display: block; color: var(--muted-2); font-size: 12px; margin-top: 4px; }
.result-note { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 7px; max-width: 34rem; }
.load-more { width: 100%; padding: 18px; border: 0; border-top: 1px solid var(--line); background: #0c1014; color: var(--orange-light); font: 750 12px var(--font-ui); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.load-more:hover { background: var(--orange); color: #111; }
.hidden-row { display: none; }
.source-note { font-size: 11px; color: var(--muted-2); margin-top: 18px; line-height: 1.5; }
.source-note a { color: var(--orange-light); text-decoration: underline; text-underline-offset: 3px; }
.session-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 34px; }
.session-nav a { padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: 700 12px var(--font-ui); text-transform: uppercase; letter-spacing: .04em; }
.session-nav a:hover { border-color: var(--orange); color: #111; background: var(--orange); }
.session-block { scroll-margin-top: 96px; margin-top: 52px; }
.session-block:first-of-type { margin-top: 0; }
.session-block-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.session-block h3 { margin: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.045em; text-transform: uppercase; }
.session-block-heading > span { color: var(--muted); font: 700 12px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.session-table { border: 1px solid var(--line); }
.session-table table { min-width: 760px; }
.race-table-meta { justify-content: flex-end; }
.retirement-reason { color: var(--muted); font-size: 12px; line-height: 1.35; min-width: 150px; }
.session-source { margin: 10px 2px 0; }
.grid-session-block { margin-top: 52px; scroll-margin-top: 96px; }
.grid-session-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.grid-session-heading .eyebrow { margin-bottom: 8px; }
.grid-session-heading h3 { margin: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.045em; text-transform: uppercase; }
.grid-session-heading > span { color: var(--muted); font: 700 12px var(--font-ui); text-transform: uppercase; letter-spacing: .035em; }
.starting-grid { padding: 22px 0; }
.starting-grid-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 56px; position: relative; padding-bottom: 14px; }
.starting-grid-slots::before { content: ""; position: absolute; top: 0; bottom: 14px; left: 50%; width: 1px; background: linear-gradient(transparent, var(--orange), transparent); opacity: .55; }
.grid-slot { min-height: 94px; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(120px, .7fr); align-items: center; gap: 14px; padding: 18px 20px; background: linear-gradient(145deg, var(--surface), #0d1116); border: 1px solid var(--line); border-radius: 9px; position: relative; }
.starting-grid-slots > .grid-slot:nth-child(odd) { margin-right: 24px; }
.starting-grid-slots > .grid-slot:nth-child(even) { margin-left: 24px; transform: translateY(14px); }
.grid-slot:hover { border-color: var(--orange); background: #131920; }
.grid-slot.did-not-start { border-color: rgba(255,153,0,.38); }
.grid-slot.grid-slot-placeholder { visibility: hidden; pointer-events: none; }
.grid-position { color: var(--orange-light); font-size: 22px; font-weight: 750; letter-spacing: -.04em; }
.grid-driver, .grid-constructor { min-width: 0; }
.grid-driver .entity-link, .grid-constructor .entity-link { display: block; font-weight: 700; }
.grid-driver .result-driver-link { display: inline-flex; gap: 5px; }
.grid-penalty-note { margin-top: 5px; }
.grid-pitlane { padding-top: 18px; }
.grid-pitlane h4 { margin: 0 0 16px; color: var(--orange); text-align: center; font-size: 15px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.grid-pitlane-list { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.grid-pitlane-list .grid-slot { box-sizing: border-box; width: calc((100% - 56px) / 2); grid-template-columns: minmax(0, 1fr) minmax(180px, .72fr); margin-inline: 0; }
.grid-pitlane-list .grid-driver { grid-column: 1; }
.grid-pitlane-list .grid-constructor { grid-column: 2; text-align: left; }
.grid-pitlane-list .grid-position { display: none; }
.grid-dns-list .grid-slot { grid-template-columns: auto minmax(0, 1fr) minmax(180px, .72fr); }
.grid-dns-list .grid-position { display: block; }
.grid-dns-list .grid-driver { grid-column: 2; }
.grid-dns-list .grid-constructor { grid-column: 3; }
.grid-dns { padding-top: 34px; }
.grid-withdrawn { padding-top: 24px; }
.grid-withdrawn h4 { color: var(--muted); }
.grid-withdrawn-list .grid-slot { border-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.grid-number, .grid-engine { display: block; color: var(--muted-2); font-size: 11px; line-height: 1.35; margin-top: 4px; }
.grid-slot .status { justify-self: end; }

.event-quick-nav { position: fixed; z-index: 18; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: stretch; overflow: hidden; border: 1px solid #303941; border-radius: 12px; background: rgba(10, 13, 17, .94); box-shadow: 0 12px 38px rgba(0,0,0,.42); backdrop-filter: blur(14px); }
.event-quick-nav-link { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 0; border-left: 1px solid #303941; background: transparent; color: var(--text); font: 700 12px var(--font-ui); cursor: pointer; }
.event-quick-nav-link:first-child { border-left: 0; }
.event-quick-nav-link:hover { background: var(--orange); color: #111; }
.event-quick-nav-link.is-disabled { color: #58616a; cursor: default; }
.event-quick-nav-link.is-disabled:hover { background: transparent; color: #58616a; }
.site-scroll-top { position: fixed; z-index: 18; right: 22px; bottom: 22px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid #303941; border-radius: 12px; background: rgba(10, 13, 17, .94); color: var(--orange-light); box-shadow: 0 12px 38px rgba(0,0,0,.42); backdrop-filter: blur(14px); font: 700 12px var(--font-ui); cursor: pointer; }
.site-scroll-top:hover { background: var(--orange); color: #111; }

.footer { background: #030405; color: #68737d; padding-block: 28px; border-top: 1px solid var(--line-soft); }
.footer-inner { display: flex; justify-content: space-between; gap: 22px; font: 750 10px ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em; }
.footer-inner span:first-child { color: var(--orange); }
.search-panel { position: fixed; inset: 0; background: rgba(0,0,0,.86); z-index: 50; padding: 8vh 20px; backdrop-filter: blur(10px); }
.search-box { max-width: 820px; margin: auto; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--orange); border-radius: 10px; padding: 28px; box-shadow: 0 25px 90px #000; }
.search-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.search-head h2 { margin: 0; font-size: 26px; }
.search-close { border: 0; background: transparent; color: var(--muted); font-size: 26px; cursor: pointer; }
.search-close:hover { color: var(--orange); }
.search-input { width: 100%; margin-top: 22px; padding: 16px; border: 1px solid #46515c; border-radius: 6px; background: #080b0e; color: var(--text); font-size: 18px; }
.search-input::placeholder { color: #68737d; }
.search-results { margin-top: 16px; max-height: 55vh; overflow: auto; }
.search-result { display: flex; justify-content: space-between; gap: 20px; padding: 15px 4px; border-top: 1px solid var(--line); }
.search-result:hover strong { color: var(--orange-light); }
.search-result small { color: var(--muted); }
[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .hero-side { max-width: 620px; }
  .card-grid, .gp-grid, .entity-grid { grid-template-columns: repeat(2, 1fr); }
  .statistics-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .constructor-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .constructor-stat-grid .stat-card:nth-child(n) { border-top: 0; }
  .constructor-stat-grid .stat-card:not(:first-child) { border-left: 1px solid var(--line); }
  .stat-card:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat-card:nth-child(4) { border-top: 1px solid var(--line); }
  .year-grid { grid-template-columns: repeat(5, 1fr); }
  .record-grid { grid-template-columns: 1fr; }
  .record { border-left: 0; border-top: 1px solid var(--line); }
  .record:first-child { border-top: 0; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .driver-key-stats { grid-template-columns: 1fr 1fr; }
  .driver-key-stat.titles { grid-column: 1 / -1; min-height: 150px; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .mobile-nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid #4a535d; border-radius: 8px; padding: 8px 11px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; }
  .mobile-nav-toggle:hover, .mobile-nav-toggle[aria-expanded=true] { border-color: var(--orange); color: var(--orange-light); }
  .mobile-nav { position: absolute; top: 76px; left: 0; right: 0; z-index: 19; padding: 14px clamp(22px, 5vw, 76px) 18px; border-bottom: 1px solid var(--line); background: rgba(5,6,8,.98); box-shadow: 0 18px 45px rgba(0,0,0,.38); }
  .mobile-nav:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
  .mobile-nav a { padding: 11px 0; color: var(--muted); font-size: 14px; font-weight: 650; }
  .mobile-nav a[aria-current=page] { color: var(--orange-light); }
}

@media (max-width: 720px) {
  .stats-auth-card { padding: 28px 20px 22px; }
  .stats-auth-actions { grid-template-columns: 1fr; }
.standings-grid { grid-template-columns: 1fr; }
  .standings-grid table { width: 100%; min-width: 0; table-layout: fixed; }
  .standings-grid .standing-position { width: 42px; }
  .standings-grid .standing-points { width: 58px; }
  .standings-grid .standing-gap { width: 68px; }
  .standings-grid th, .standings-grid td { padding: 12px 10px; }
  .standings-grid th { font-size: 12px; letter-spacing: .02em; white-space: nowrap; overflow-wrap: normal; }
.standings-grid td { font-size: 13px; }
  .standings-grid th:nth-last-child(-n+2), .standings-grid td:nth-last-child(-n+2) { text-align: center; }
  .standings-grid th:last-child, .standings-grid td:last-child { padding-left: 5px; white-space: nowrap; }
  .table-scroll { overflow-x: hidden; }
  .table-scroll table { min-width: 100%; table-layout: fixed; }
  .table-scroll th, .table-scroll td { padding: 11px 21px; overflow-wrap: normal; word-break: normal; }
  .statistics-table th, .statistics-table td { padding: 12px 21px; }
  .statistics-table th:first-child, .statistics-table td:first-child { width: 48px; }
  .statistics-table th:last-child, .statistics-table td:last-child { width: 96px; text-align: center; }
  .statistics-rate-links { gap: 9px; font-size: 10px; }
  .statistics-rate-table thead, .statistics-rate-table table, .statistics-rate-table tbody { display: block; min-width: 0; }
  .statistics-rate-table thead { display: none; }
  .statistics-rate-table tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 8px; padding: 15px 21px; border-top: 1px solid var(--line-soft); }
  .statistics-rate-table tr:first-child { border-top: 0; }
  .statistics-rate-table td, .statistics-rate-table td:first-child, .statistics-rate-table td:last-child { width: auto !important; min-width: 0; padding: 0; border: 0; text-align: left; }
  .statistics-rate-table td:nth-child(1) { grid-column: 1 / 4; }
  .statistics-rate-table td:nth-child(2) { grid-column: 4 / 7; text-align: left; white-space: nowrap; }
  .statistics-rate-table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted-2); font: 700 9px var(--font-data); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
  .statistics-rate-table td:nth-child(3) { grid-column: 1 / 3; }
  .statistics-rate-table td:nth-child(4) { grid-column: 3 / 5; }
  .statistics-rate-table td:nth-child(5) { grid-column: 5 / 7; }
  .engine-season-summary thead, .engine-season-summary table, .engine-season-summary tbody { display: block; min-width: 0; }
  .engine-season-summary tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; padding: 16px; border-top: 1px solid var(--line-soft); }
  .engine-season-summary tr:first-child { border-top: 0; }
  .engine-season-summary td { min-width: 0; padding: 0; border: 0; font-size: 14px; }
  .engine-season-summary td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted-2); font: 700 10px var(--font-ui); text-transform: uppercase; letter-spacing: .05em; }
  .engine-season-summary td:nth-child(1), .engine-season-summary td:nth-child(2) { grid-column: 1 / -1; }
  .race-table .table-scroll { overflow: visible; }
  .race-table table, .race-table tbody { display: block; min-width: 0; }
  .race-table thead { display: none; }
  .race-table tr.race-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(76px, auto); grid-template-areas: "position driver points" "position constructor time" "position grid laps" "position retirement retirement"; column-gap: 10px; row-gap: 6px; padding: 16px 14px; border-top: 1px solid var(--line-soft); }
  .race-table tr.race-row:first-child { border-top: 0; }
  .race-table tr.race-row:hover { background: transparent; }
  .race-table tr.race-row td { min-width: 0; padding: 0; border: 0; overflow-wrap: normal; word-break: normal; }
  .race-table tr.race-row td:nth-child(1) { grid-area: position; align-self: start; }
  .race-table tr.race-row td:nth-child(2) { grid-area: driver; }
  .race-table tr.race-row td:nth-child(3) { grid-area: constructor; }
  .race-table tr.race-row td:nth-child(4) { grid-area: grid; }
  .race-table tr.race-row td:nth-child(5) { grid-area: laps; }
  .race-table tr.race-row td:nth-child(6) { grid-area: time; }
  .race-table tr.race-row td:nth-child(7) { grid-area: retirement; }
  .race-table tr.race-row td:nth-child(8) { grid-area: points; }
  .race-table tr.race-row td:nth-child(4), .race-table tr.race-row td:nth-child(5), .race-table tr.race-row td:nth-child(6), .race-table tr.race-row td:nth-child(8) { color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; }
  .race-table tr.race-row td:nth-child(n+4)::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted-2); font: 700 9px var(--font-data); letter-spacing: .06em; text-transform: uppercase; }
  .race-table tr.race-row td:nth-child(7) { display: none; max-width: none; color: var(--muted); font-size: 12px; }
  .race-table tr.race-row.has-retirement td:nth-child(7) { display: block; padding-top: 2px; }
  .race-table .result-driver-line { gap: 6px; line-height: 1.2; }
  .race-table .result-driver-link { gap: 6px; min-width: 0; }
  .race-table .constructor-identity { gap: 6px; min-width: 0; }
  .race-table .constructor-identity .entity-link { min-width: 0; }
  .header-action { padding: 9px 11px; }
  .hero-inner { min-height: 540px; padding-top: 46px; }
  .hero.compact .hero-inner { min-height: 420px; }
  h1 { font-size: clamp(44px, 15vw, 70px); }
  .section { padding-block: 62px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .card-grid, .gp-grid, .entity-grid { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { flex-direction: column; }
  .stat-card { padding: 21px; }
  .stat-card strong { font-size: 36px; }
  .constructor-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .constructor-stat-grid .stat-card:nth-child(3), .constructor-stat-grid .stat-card:nth-child(5) { border-left: 0; border-top: 1px solid var(--line); }
  .constructor-stat-grid .stat-card:nth-child(4) { border-top: 1px solid var(--line); }
  .fact-grid { grid-template-columns: 1fr; }
  .driver-key-stats { grid-template-columns: 1fr; }
  .driver-key-stat.titles { grid-column: auto; }
  .driver-key-stat { min-height: 150px; }
  .gp-event-link { min-width: 210px; }
  .grid-session-heading { align-items: flex-start; flex-direction: column; }
  .session-block-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .starting-grid { padding: 10px 0; }
  .starting-grid-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; padding-bottom: 8px; }
  .starting-grid-slots::before { bottom: 8px; left: 50%; opacity: .35; }
  .grid-slot, .starting-grid-slots > .grid-slot:nth-child(odd), .starting-grid-slots > .grid-slot:nth-child(even) { margin-inline: 0; }
  .starting-grid-slots > .grid-slot:nth-child(even) { transform: translateY(8px); }
  .grid-slot { min-height: 70px; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; padding: 12px 10px; }
  .grid-position { align-self: start; font-size: 19px; }
  .grid-driver .entity-link, .grid-constructor .entity-link { display: inline; white-space: nowrap; font-size: 12px; }
  .grid-driver .result-driver-link { display: inline-flex; gap: 4px; }
  .grid-number, .grid-engine { display: inline; margin: 0; font-size: 11px; white-space: nowrap; }
  .grid-number { margin-left: 4px; }
  .grid-engine::before { content: " - "; }
  .grid-constructor { grid-column: 2; }
  .grid-slot .status { grid-column: 2; justify-self: start; }
  .grid-pitlane { padding-top: 10px; }
  .grid-pitlane-list { gap: 8px; }
  .grid-pitlane-list .grid-slot { width: 100%; grid-template-columns: minmax(0, 1fr); }
  .grid-pitlane-list .grid-constructor, .grid-pitlane-list .grid-slot .status { grid-column: 1; }
  .grid-dns-list .grid-slot { grid-template-columns: auto minmax(0, 1fr); }
  .grid-dns-list .grid-driver, .grid-dns-list .grid-constructor { grid-column: 2; }
  .grid-dns { padding-top: 22px; }
  .event-quick-nav { bottom: 14px; }
  .event-quick-nav-link, .site-scroll-top { min-height: 42px; padding: 0 11px; font-size: 11px; }
  .site-scroll-top { right: 14px; bottom: 14px; }

  .event-list-table thead { display: none; }
  .event-list-table, .event-list-table tbody { display: block; min-width: 0; }
  .event-list-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 18px; padding: 18px 16px; border-top: 1px solid var(--line-soft); }
  .event-list-table tr:first-child { border-top: 0; }
  .event-list-table td { min-width: 0; padding: 0; border: 0; }
  .event-list-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted-2); font: 700 10px var(--font-ui); text-transform: uppercase; letter-spacing: .05em; }
  .event-list-season td:nth-child(1), .event-list-season td:nth-child(2), .event-list-gp td:nth-child(1), .event-list-gp td:nth-child(2), .circuit-event-table td:nth-child(1), .circuit-event-table td:nth-child(2) { grid-column: 1 / -1; }
  .event-list-season td:nth-child(1)::before { display: none; }
  .event-list-season .gp-event-link { min-width: 0; }
  .event-list-season .gp-event-name { font-size: 16px; }
  .event-list-season td:nth-child(5) { align-self: end; }
  .event-list-season td:nth-child(6), .event-list-gp td:last-child, .circuit-event-table td:last-child { align-self: end; justify-self: end; }
  .event-list-gp td:nth-child(1), .circuit-event-table td:nth-child(1) { display: flex; align-items: baseline; justify-content: space-between; }
  .event-list-gp td:nth-child(1)::before, .circuit-event-table td:nth-child(1)::before { margin: 0; }
  .event-list-gp .year-link, .circuit-event-table .year-link { font-size: 20px; }

  .career-results-table thead, .season-summary-card thead { display: none; }
  .career-results-table, .career-results-table tbody, .season-summary-card table, .season-summary-card tbody { display: block; min-width: 0; }
  .career-results-table tr { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 5px 10px; padding: 14px 12px; border-top: 1px solid var(--line-soft); }
  .career-results-table tr:first-child { border-top: 0; }
  .career-results-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .career-results-table td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .career-results-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .career-results-table td:nth-child(3) { grid-column: 2; grid-row: 2; color: var(--muted); font-size: 12px; }
  .career-results-table td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .career-results-table td:nth-child(5) { grid-column: 2; grid-row: 3; }
  .career-results-table td:nth-child(6) { grid-column: 3; grid-row: 3; text-align: right; }
  .career-results-table td:nth-child(7) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .career-results-table td:nth-child(n+4):not(:last-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted-2); font: 700 9px var(--font-ui); text-transform: uppercase; letter-spacing: .04em; }
  .career-results-table .career-event-name { min-width: 0; font-size: 14px; }
  .career-results-table .career-event-meta { margin-left: 0; font-size: 10px; }
  .career-results-table .year-link { font-size: 16px; }
  .career-results-table .career-finish { font-size: 17px; }
  .career-results-table .row-link { width: 30px; height: 30px; }

  .season-summary-card .table-scroll { overflow: visible; }
  .season-summary-card tbody { border-top: 1px solid var(--line-soft); }
  .season-summary-card tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; padding: 16px; border-top: 1px solid var(--line-soft); }
  .season-summary-card tbody:first-of-type tr:first-child { border-top: 0; }
  .season-summary-card td { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; padding: 5px 0; border: 0; text-align: right !important; font-size: 14px; }
  .season-summary-card tr.season-tone-0, .season-summary-card tbody.season-tone-0 tr { background: rgba(255,255,255,.018); }
  .season-summary-card tr.season-tone-1, .season-summary-card tbody.season-tone-1 tr { background: rgba(255,255,255,.045); }
  .season-summary-card tr.champion-season, .season-summary-card tbody .champion-season { background: #3d352b; }
  .season-summary-card .season-tone-0 td, .season-summary-card .season-tone-1 td, .season-summary-card .champion-season td { background: transparent !important; }
  .season-summary-card td::before { content: attr(data-label); flex: 0 1 auto; color: var(--muted-2); font: 700 10px var(--font-ui); text-align: left; text-transform: uppercase; letter-spacing: .04em; }
  .season-summary-card td:nth-child(1), .season-summary-card td:nth-child(2) { grid-column: 1 / -1; }
  .driver-season-summary td:nth-child(1), .driver-season-summary td:nth-child(2) { grid-column: 1 / -1; justify-content: flex-start; text-align: left !important; }
  .season-summary-card .season-year-cell { align-items: center; }
  .season-summary-card .season-year-cell > span:first-child { margin-left: 0; }
  .season-summary-card .season-year-cell .driver-badge { margin-left: 8px; }
  .season-summary-card .season-driver-number { min-width: auto; margin-right: 5px; }
  .season-summary-card .summary-driver-cell { justify-content: flex-start; flex-wrap: wrap; }
  .season-summary-card .summary-driver-cell::before { width: 100%; }
  .season-summary-card .constructor-season-total { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season-summary-card .constructor-season-total td:first-child { grid-column: 1 / -1; }
  .season-summary-card .constructor-season-total { margin-top: 5px; padding-top: 10px; border-top-color: rgba(255, 173, 51, .25); }
  .season-summary-card .constructor-season-total td { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .archive-card, .site-nav a::after, tbody tr { transition: none; }
}
