/* F1PODIO - tokens y estilos base. Oscuro por defecto; data-theme="light" invierte. */
:root {
  --bg: #0E0F12;
  --surface: #16181D;
  --surface-2: #1E2128;
  --border: #262A32;
  --border-soft: #1C1F25;
  --text: #F2F3F5;
  --muted: #9AA0AA;
  --accent: #E0143A;
  --accent-strip: #C8102E;
  --on-accent: #FFFFFF;
  --up: #3DDC84;
  --logo-chip: #F2F3F5;
  --logo-chip-border: transparent;
  --font-ui: 'Titillium Web', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme="light"] {
  --bg: #F4F4F2;
  --surface: #FFFFFF;
  --surface-2: #F7F7F5;
  --border: #E2E3E6;
  --border-soft: #ECEDEF;
  --text: #15171B;
  --muted: #5C6370;
  --accent: #C8102E;
  --accent-strip: #C8102E;
  --up: #1B7F3B;
  --logo-chip: #FFFFFF;
  --logo-chip-border: #E2E3E6;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
a:hover { color: var(--accent); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; width: 100%; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { text-decoration: none; font-weight: 900; font-style: italic; font-size: 24px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .wedge { display: inline-block; width: 13px; height: 24px; background: var(--accent); transform: skewX(-18deg); }
.burger, .live-btn { display: none; }
.menu, .ctl { display: contents; }
.ctl-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav { display: flex; gap: 16px; font-weight: 600; flex-wrap: wrap; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: pulse 1.2s ease-in-out infinite; }
.controls { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; padding: 6px 10px; font: 600 13px var(--font-ui); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.on:hover { color: var(--bg); }
select.chip { appearance: none; -webkit-appearance: none; width: 124px; text-overflow: ellipsis; padding-right: 22px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; padding-right: 22px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lang-list { position: absolute; top: calc(100% + 4px); right: 0; z-index: 60; display: flex; flex-direction: column; min-width: 124px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.lang-list a { padding: 8px 10px; border-radius: 4px; font: 600 14px var(--font-ui); color: var(--text); text-decoration: none; }
.lang-list a:hover { background: var(--bg); color: var(--text); }
.lang-list a[aria-current] { color: var(--accent); }

/* franja de estado */
.strip { background: var(--accent-strip); color: var(--on-accent); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 11px; padding-bottom: 11px; }
.strip h1 { margin: 0; font-size: 21px; font-weight: 700; font-style: italic; letter-spacing: -.01em; }
.live-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: .14em; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
.strip .right { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 13px; opacity: .94; flex-wrap: wrap; }
.strip.stale { background: #5C6370; }
.flag { font-weight: 700; padding: 2px 8px; border-radius: 4px; font-size: 12px; letter-spacing: .06em; }
.flag-yellow, .flag-sc, .flag-vsc { background: #FFD600; color: #15171B; }
.flag-red { background: #15171B; color: #FFFFFF; }
.flag-chequered { background: #FFFFFF; color: #15171B; }
.flag-green { background: #1B7F3B; color: #FFFFFF; }

/* layout principal */
main.wrap.page { display: block; }
main.wrap.page > * + * { margin-top: 16px; }
.page-head { border-bottom: 1px solid var(--border); }
.page-head .wrap { padding-top: 18px; padding-bottom: 16px; }
.crumbs { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: '›'; }
.crumbs a { text-decoration: none; padding: 4px 0; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 700; font-style: italic; letter-spacing: -.01em; line-height: 1.15; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.seasons { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.seasons::-webkit-scrollbar { display: none; }
.seasons .chip { flex: none; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two-col .tablebox { padding-bottom: 0; }
.gp-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); text-decoration: none; min-height: 44px; }
.gp-row:last-child { border-bottom: 0; }
.gp-row:hover strong { color: var(--accent); }
.gp-row .round { color: var(--muted); font-size: 13px; }
.gp-main { display: flex; flex-direction: column; min-width: 0; }
.gp-main .muted { font-size: 13px; }
.gp-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.gp-end { display: flex; align-items: center; gap: 8px; min-width: 74px; justify-content: flex-end; }
.gp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 2px 7px; border-radius: 4px; background: var(--border); color: var(--text); white-space: nowrap; }
.tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1s steps(1, end) infinite; }
.tag-live .tag-dot { background: currentColor; }
@keyframes blink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .tag-dot { animation: none; } }
.tag-live { background: var(--accent-strip); color: var(--on-accent); }
.gp-row .tops { margin-left: 0; justify-content: flex-end; }
.circuit-img { display: block; width: 100%; max-height: 170px; object-fit: contain; background: #FFFFFF; border-radius: 6px; margin-bottom: 8px; padding: 6px; }
.drv-link { display: block; color: inherit; text-decoration: none; }
.drv-link:hover .abbr, .drv-plain:hover { color: var(--accent); }
.drv-plain { color: inherit; text-decoration: none; }
.driver-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.driver-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; }
.driver-card:hover { border-color: var(--team, var(--muted)); color: inherit; }
.driver-card img { border-radius: 8px; background: var(--surface-2); flex: none; }
.driver-card-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.driver-card-text strong { font-size: 16px; line-height: 1.15; }
.driver-hero { display: flex; align-items: center; gap: 16px; }
.driver-hero img { width: 120px; height: 120px; border-radius: 10px; background: var(--surface); flex: none; }
.driver-hero h1 { margin: 0; font-size: 32px; }
.driver-team { display: inline-flex; align-items: center; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 14px 12px; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 26px; font-weight: 600; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-sub { font-size: 12px; color: var(--muted); }
.year-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.year-tabs::-webkit-scrollbar { display: none; }
.year-tabs .chip { flex: none; min-height: 36px; font-family: var(--font-mono); }
.year-tabs .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.js .year-panel:not(.on) { display: none; }
.year-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 0; }
.season-sum { margin-left: auto; display: flex; gap: 14px; font-size: 14px; }
.circuit-cell { white-space: normal; min-width: 130px; }
.circuit-cell .name { display: block; }
tr.no-race td { color: var(--muted); }
tr.no-race strong { font-weight: 400; }
.driver-num { margin-left: 12px; font-size: .8em; font-weight: 600; font-style: normal; color: var(--team, var(--muted)); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; }
.guide-card:hover { border-color: var(--accent); color: inherit; }
.guide-card strong { font-size: 18px; line-height: 1.2; }
.guide-card .muted { font-size: 14px; }
.guide-link { display: block; padding: 10px 0; border-bottom: 1px solid var(--border-soft); text-decoration: none; font-weight: 600; }
.guide-link:last-child { border-bottom: 0; }
.prose { font-size: 17px; line-height: 1.6; max-width: 780px; }
.prose section + section { margin-top: 26px; }
.card.prose h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--text); }
.prose h3 { margin: 18px 0 6px; font-size: 18px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose-note { padding: 10px 14px; background: var(--surface-2); border-radius: 8px; font-size: 15px; color: var(--muted); }
.prose-table { margin-bottom: 12px; padding-bottom: 0; }
.prose-table td { white-space: normal; font-size: 15px; vertical-align: top; }
.prose-sources { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--muted); }
.prose-sources p { margin-bottom: 6px; }
.prose-sources ul { margin: 0; }
.terms { margin: 0 0 12px; }
.term { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.term:last-child { border-bottom: 0; }
.term.has-flag { display: flex; gap: 14px; align-items: flex-start; }
.flag-art { flex: none; width: 84px; height: 56px; margin-top: 2px; }
.prose-figure { margin: 14px 0; padding: 14px; background: var(--surface-2); border-radius: 10px; }
.prose-figure figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.figure-art { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; font-family: var(--font-ui); }
.footer-links { display: inline-flex; gap: 14px; }
.news-lead { position: relative; display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 21 / 9; min-height: 300px; background: var(--surface-2); text-decoration: none; }
.news-lead img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-lead::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 15, 18, 0) 30%, rgba(14, 15, 18, .92) 100%); }
.news-lead-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px 28px; color: #FFFFFF; }
.news-lead-text strong { max-width: 860px; font-size: 34px; line-height: 1.12; font-weight: 700; font-style: italic; letter-spacing: -.01em; }
.news-lead-time { font-size: 14px; color: #D5D8DD; }
.news-lead:hover { color: #FFFFFF; }
.news-lead:hover img, .news-card:hover img { transform: scale(1.04); }
.news-source { display: inline-block; padding: 3px 8px; border-radius: 4px; background: var(--accent-strip); color: var(--on-accent); font-size: 12px; font-weight: 700; line-height: 1.3; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.news-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.news-card:hover { border-color: var(--accent); color: inherit; transform: translateY(-2px); }
.news-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2) linear-gradient(115deg, transparent 58%, var(--accent) 58% 68%, transparent 68%); }
.news-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-thumb .news-source { position: absolute; left: 10px; bottom: 10px; }
.news-text { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; min-width: 0; }
.news-text strong { font-size: 16px; line-height: 1.28; font-weight: 600; }
.news-text .muted { font-size: 13px; margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .news-lead img, .news-thumb img, .news-card { transition: none; } .news-lead:hover img, .news-card:hover img { transform: none; } .news-card:hover { transform: none; } }
.cover-art { display: block; width: 100%; height: auto; border-radius: 8px; }
.guide-card .cover-art { margin-bottom: 6px; }
.article-cover { margin-bottom: 20px; }
.term dt { font-weight: 700; }
.term dd { margin: 0; }
.wx-day { display: flex; align-items: center; gap: 10px; }
.wx { flex: none; color: var(--muted); }
.wx_clear { color: #E9A100; }
.wx_rain, .wx_drizzle { color: #3B82D6; }
.wx_storm { color: #8B5CF6; }
.wx-source { margin-top: 8px; font-size: 12px; color: var(--muted); }
.grid-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.grid-item { display: flex; align-items: center; gap: 8px; }
.grid-item:nth-child(even) { transform: translateY(10px); }
.grid-list { padding-bottom: 10px; }
.grid-item .n { color: var(--muted); font-size: 12px; width: 18px; text-align: right; }
.primary { display: flex; flex-direction: column; gap: 16px; }
main.wrap { padding-top: 20px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.primary { flex: 999 1 560px; min-width: 0; }
.aside { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.card h2, .card h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.card .title { font-weight: 700; font-style: italic; font-size: 20px; line-height: 1.1; }
.card .big { font-size: 22px; font-weight: 600; margin-top: 10px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.kv:last-child { border-bottom: 0; }
.kv .n { color: var(--muted); margin-right: 10px; }
.card a.more { display: block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* tabla */
.tablebox { overflow-x: auto; padding: 0 0 10px; }
table { border-collapse: collapse; width: 100%; }
th { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; color: var(--muted); text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); font-size: 15px; vertical-align: middle; white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }
td.pos { font-weight: 900; font-size: 17px; width: 30px; padding-right: 0; font-family: var(--font-mono); }
td.bar { width: 4px; padding: 0; border-left: 4px solid var(--border); }
.drv { display: flex; align-items: center; gap: 10px; }
.logo { width: 28px; height: 22px; border-radius: 4px; background: var(--logo-chip); border: 1px solid var(--logo-chip-border); display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 2px; }
.logo img { max-width: 100%; max-height: 100%; display: block; }
.abbr { font-weight: 700; letter-spacing: .04em; }
.name { color: var(--muted); font-size: 13px; display: block; line-height: 1.1; }
td.team { color: var(--muted); font-size: 13px; }
td.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
td.c { text-align: center; }
.pit { background: var(--border); color: var(--text); border-radius: 4px; padding: 1px 7px; font-size: 12px; font-weight: 700; font-family: var(--font-mono); }
.up { color: var(--up); font-size: 12px; font-weight: 700; }
.dn { color: var(--muted); font-size: 12px; font-weight: 700; }
tr.out td { color: var(--muted); }
tr.out td.bar { opacity: .5; }
.tyre { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--muted); align-items: center; justify-content: center; font-size: 10px; font-weight: 900; font-family: var(--font-mono); color: var(--text); }
.tyre-SOFT { border-color: #E8002D; }
.tyre-MEDIUM { border-color: #FFD600; }
.tyre-HARD { border-color: #F2F3F5; }
:root[data-theme="light"] .tyre-HARD { border-color: #8A8F98; }
.tyre-INTERMEDIATE { border-color: #3DDC84; }
.tyre-WET { border-color: #3671C6; }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 8px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.podium .step { background: var(--surface-2); border-radius: 8px; padding: 12px; }
.podium .step .p { font-size: 11px; color: var(--muted); letter-spacing: .1em; display: flex; align-items: center; gap: 6px; }
.podium .step .p::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--team, var(--border)); }
.podium .step .d { font-weight: 700; font-style: italic; font-size: 18px; }
.podium .step .t { font-size: 13px; color: var(--muted); }

/* calendario del fin de semana */
.sched { display: flex; flex-direction: column; }
.sched .row { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.sched .row:last-child { border-bottom: 0; }
.sched .when { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; min-width: 150px; }
.sched .what { font-weight: 600; }
.sched .row.past { color: var(--muted); }
.sched .row.now .what::after { content: ' ●'; color: var(--accent); }
.slot { border-bottom: 1px solid var(--border-soft); }
.slot:last-child { border-bottom: 0; }
.slot summary { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; padding: 8px 24px 8px 0; cursor: pointer; list-style: none; }
.slot summary::-webkit-details-marker { display: none; }
.slot summary:hover .what { color: var(--accent); }
.slot summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.slot .when, .slot .what { color: var(--muted); }
.tops { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
.top { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.top .n { color: var(--muted); font-size: 12px; }
.top .logo { width: 24px; height: 20px; }
.chev { position: absolute; right: 2px; top: 16px; color: var(--muted); transition: transform .15s ease; }
.slot[open] .chev { transform: rotate(180deg); }
.sess-table { margin: 4px 0 10px; padding: 0; }
.aside .sess-table .name, .aside .sess-table .hide-sm { display: none; }
.aside .sess-table td, .aside .sess-table th { padding-left: 6px; padding-right: 6px; }
.aside .tops { margin-left: 0; }
.countdown { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 600; line-height: 1; margin-top: 12px; }
.countdown small { font-size: 14px; font-weight: 400; color: var(--muted); font-family: var(--font-ui); }

/* footer */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }

@media (max-width: 640px) {
  /* Barra fija: hamburguesa, logo y En vivo. El resto vive en el menú desplegable. */
  html { scroll-padding-top: 66px; }
  .js .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
  html.js body { padding-top: 57px; }
  .site-header .wrap { min-height: 56px; padding-top: 6px; padding-bottom: 6px; gap: 6px; }
  .burger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -11px; background: none; border: 0; border-radius: 6px; color: var(--text); cursor: pointer; }
  .burger .i-close { display: none; }
  .burger[aria-expanded="true"] .i-open { display: none; }
  .burger[aria-expanded="true"] .i-close { display: block; }
  .burger:focus-visible { outline: 2px solid var(--accent); }
  .live-btn { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; min-height: 38px; padding: 0 12px; border-radius: 6px; background: var(--accent-strip); color: var(--on-accent); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }
  .live-btn:hover { color: var(--on-accent); }
  .menu { display: block; width: 100%; padding: 4px 0 12px; }
  .js .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; width: auto; padding: 4px 16px 14px; background: var(--bg); border-bottom: 1px solid var(--border); max-height: calc(100dvh - 57px); overflow-y: auto; }
  .js .menu.open { display: block; }
  .nav { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .nav a { display: flex; align-items: center; min-height: 48px; font-size: 17px; border-bottom: 1px solid var(--border-soft); }
  .controls { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; margin: 6px 0 0; }
  .ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; }
  .ctl-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; color: var(--muted); font-size: 14px; }
  .ctl .chip { min-height: 40px; }
  /* La lista se abre debajo, dentro del menú, sin separar la etiqueta del botón. */
  .ctl:has(.lang-menu) { display: block; position: relative; padding: 7px 0; }
  .ctl:has(.lang-menu) .ctl-label { position: absolute; left: 0; top: 17px; }
  .lang-menu summary { display: flex; width: fit-content; min-height: 40px; margin-left: auto; align-items: center; }
  .lang-list { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  .lang-list a { min-height: 44px; display: flex; align-items: center; font-size: 15px; }
  #theme-toggle { min-width: 44px; min-height: 40px; justify-content: center; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .gp-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .gp-when { grid-column: 2; grid-row: 2; }
  .gp-end { grid-column: 3; grid-row: 1 / span 2; }
  .gp-row .tops { grid-column: 2 / -1; justify-content: flex-start; }
  .page-head h1 { font-size: 22px; }
  .circuit-cell { min-width: 92px; }
  .news-lead { aspect-ratio: 4 / 5; min-height: 0; }
  .news-lead-text { padding: 16px; }
  .news-lead-text strong { font-size: 25px; }
  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .news-card { flex-direction: row; }
  .news-thumb { flex: none; width: 118px; aspect-ratio: auto; min-height: 96px; }
  .news-thumb .news-source { left: 6px; bottom: 6px; font-size: 11px; padding: 2px 5px; }
  .news-text { padding: 10px 12px; }
  .news-text strong { font-size: 15px; }
  th { letter-spacing: .02em; }
  .driver-page .aside { order: -1; }
  .sess-table td, .sess-table th, .circuit-cell, .circuit-cell ~ td { padding-left: 4px; padding-right: 4px; }
  .driver-hero img { width: 88px; height: 88px; }
  .driver-hero h1 { font-size: 24px; }
  .brand { font-size: 21px; }
  select.chip { flex: 0 1 220px; min-width: 0; max-width: 220px; }
  td, th { padding-left: 6px; padding-right: 6px; }
  td { font-size: 14px; }
  td.pos { font-size: 15px; width: 24px; padding-right: 4px; }
  .hide-sm, .hide-xs { display: none; }
  .name { display: none; }
  .kv .name { display: block; }
  .logo { width: 24px; height: 20px; }
  .drv { gap: 7px; }
  .pit { padding: 1px 5px; }
  .strip h1 { font-size: 19px; }
  .podium { grid-template-columns: 1fr; }
  .tops { margin-left: 0; }
  /* Fin de semana sin sesión en curso: la próxima sesión va primero. Con sesión en vivo, manda la tabla. */
  .mode-between .aside { display: contents; }
  .mode-between .next-card { order: -1; width: 100%; }
  .mode-between .aside > :not(.next-card) { order: 1; width: 100%; }
  .mode-live .next-card { display: none; }
}
