@import './button-motion.css';
@import './interaction-guard.css';
@import './session-island.css';
@import './footer-credit.css';
@import './outage.css';

/* ═══════════════ SITE SHELL ═══════════════
   The multi-page chrome: navigation, page frame, footer and the cross-page
   animation. Deliberately separate from app.css so a marketing page (home,
   schedule, teams) does not download the cockpit's player, modal and canvas
   rules.

   Palette follows the reference layout: near-black page, one step lighter for
   cards, two for hover. Text never goes pure white except headlines. */

[hidden] { display: none !important; }

:root {
  --page: #090a0c;
  --card: #121317;
  --card-2: #1b1c20;
  --card-3: #25262b;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --fg: #cecfd2;
  --fg-2: #a9abaf;
  --fg-3: #96999e;
  --fg-4: #7e8188;
  --white: #fff;
  --accent: #E10600;
  --accent-ink: #fff;
  /* The cockpit assigns this per livery; the public pages keep the brand red. */
  --team: #E10600;
  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1280px;
  --ease: cubic-bezier(.22,1,.36,1);
  --shadow-raised: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -24px rgba(0,0,0,.9);
  --font-body: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Archivo', 'Inter', ui-sans-serif, sans-serif;
  /* Zen Dots: the reference's face for a driver's racing number, which is the
     only thing on the site that uses it. Static 400, so weight is never faked. */
  --font-number: 'Zen Dots', 'Archivo', 'Inter', ui-sans-serif, sans-serif;
  --nav-h: 64px;
  /* Every full-width band uses this: the header, the page frame, the footer.
     Wide enough that text never touches the screen edge, capped so the reading
     column stays where it was on a large display. */
  --gutter: clamp(20px, 5vw, 56px);
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  background: var(--page);
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(225, 6, 0, .4); color: #fff; }

body {
  font-family: var(--font-body);
  background: var(--page);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
[role="button"], [role="tab"], summary, .btn {
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }

.wrap {
  width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto; padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--white); color: #000; font-weight: 700;
}
.skip-link:focus { left: 12px; }

/* ═══════════════ DISPLAY FACE ═══════════════
   The same recipe as the cockpit's .display in app.css, so a Grand Prix name looks
   identical on the home page and in the cockpit: Archivo 900, italic, uppercase,
   tight. The self-hosted Archivo is a variable font, so the weight and the oblique
   both come from one file. The silhouette of the <h1> is what the two lines of text
   used to give: two-line rhythm at a fixed 0.92 leading. */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.045em;
  line-height: .92;
  text-transform: uppercase;
}

/* ── Numerical display face ── */
.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* ═══════════════ NAVIGATION ═══════════════ */

.nav {
  position: sticky; top: 0; z-index: 120;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav.stuck { border-bottom-color: var(--line); background: color-mix(in srgb, var(--page) 94%, transparent); }

.nav-inner {
  display: flex; align-items: center; gap: 18px;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  width: 100%;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #8b0400);
  color: #fff; flex: none;
  box-shadow: 0 6px 18px -8px rgba(225,6,0,.9);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: -.01em; color: var(--white);
}

/* Desktop: the menu sits directly left of the counter, which sits left of the
   far-right control, so the order reads logo … menu · counter. */
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: 14px; order: 1; }
.nav-right { order: 2; }

.nav-links a {
  position: relative;
  padding: 8px 12px; border-radius: 9px;
  font-size: 13.5px; font-weight: 550; color: var(--fg-2);
  transition: color .18s var(--ease), background-color .18s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a[aria-current="page"]::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--accent);
}

.nav-right { display: flex; align-items: center; gap: 8px; flex: none; }
.brand { order: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.04);
  font-size: 12px; font-weight: 600; color: var(--fg-2); white-space: nowrap;
}
.pill.live { color: #fff; }
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(225,6,0,.18);
}
.pill.live.is-on .dot { animation: livePulse 2s var(--ease) infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 6px rgba(225,6,0,0); } }

/* Open-page counter: a quiet, live dot beside a tabular figure. It stays hidden
   until the socket reports a number, so a failed connection shows nothing. */
.pill.viewer { gap: 7px; font-variant-numeric: tabular-nums; }
.pill.viewer .dot { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.16); }
.pill.viewer[data-state="connecting"] .dot { background: var(--fg-4); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.pill.viewer[data-state="offline"] { opacity: .75; }
.pill.viewer #viewerCount { color: var(--white); font-weight: 650; }
.pill.viewer .viewer-label { color: var(--fg-3); font-weight: 550; }
@media (max-width: 480px) { .pill.viewer .viewer-label { display: none; } }

.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line-2); place-items: center; gap: 4px;
  align-content: center; justify-items: center;
}
.nav-toggle span {
  display: block; width: 16px; height: 1.5px; border-radius: 2px;
  background: var(--fg); transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  /* Logo left; the counter then the menu hard right. Without this the cluster
     sat beside the logo because the last inline child was the menu panel. */
  .nav-right { margin-left: auto; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 10px var(--gutter) 20px;
    background: var(--page);
    border-bottom: 1px solid var(--line);
    transform-origin: top center;
    display: none;
    margin-right: 0;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { display: flex; animation: menuIn .26s var(--ease) both; }
  .nav-links a { padding: 13px 12px; font-size: 15px; border-radius: 12px; }
  .nav-links a[aria-current="page"] { background: rgba(255,255,255,.06); }
  .nav-links a[aria-current="page"]::after { display: none; }
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ═══════════════ PAGE FRAME ═══════════════ */

main { flex: 1 0 auto; }

/* Block padding only: a shorthand `padding` here would overwrite .wrap's inline
   gutter, which is exactly how the page titles ended up 17px from the edge. */
.page-head { padding-block: 34px 22px; }
@media (min-width: 768px) { .page-head { padding-block: 48px 28px; } }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  font-size: 13px; color: var(--fg-3); margin-bottom: 18px;
}
.crumbs a { color: var(--fg-3); transition: color .18s; }
.crumbs a:hover { color: var(--white); }
.crumbs span[aria-current] { color: var(--fg-2); }
.crumbs .sep { color: var(--fg-4); font-size: 11px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--fg-3);
}
.eyebrow .swatch { width: 3px; height: 12px; border-radius: 2px; background: var(--accent); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--white);
  margin-top: 10px;
}
.page-lede {
  margin-top: 12px; max-width: 62ch;
  font-size: 15.5px; line-height: 1.62; color: var(--fg-2);
}

.section { padding-block: 40px 56px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  letter-spacing: -.01em; color: var(--white);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  position: relative;
}
.card-pad { padding: 20px; }
@media (min-width: 640px) { .card-pad { padding: 26px; } }

/* A hairline highlight along the card's top edge — the reference's "inset-hl". */
.inset-hl::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 12px;
  font-size: 14.5px; font-weight: 650; letter-spacing: .01em;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--white);
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.24); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--white); border-color: var(--white); color: #0b0b0d;
  box-shadow: 0 12px 30px -16px rgba(255,255,255,.5);
}
.btn-primary:hover { background: #e9e9ec; border-color: #e9e9ec; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #f01810; border-color: #f01810; }
.btn svg { width: 16px; height: 16px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  background: rgba(255,255,255,.06); color: var(--fg-2);
  font-size: 12px; font-weight: 550; white-space: nowrap;
}
.tag-accent { background: rgba(225,6,0,.16); color: #ff9d97; }

/* ═══════════════ HOME HERO ═══════════════ */

.hero { position: relative; overflow: hidden; isolation: isolate; }

.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media {
  background: linear-gradient(122deg, #111216 15%, #35363b 32%, #111216 35%, #25262a 51%, #0d0e10 54%, #292a2e 70%, #0d0e10 74%);
}
.hero-glass { display: block; width: 100%; height: 100%; }
.hero-glass[hidden] { display: none; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  /* Keep the animated folds visible while protecting text contrast and the page edge. */
  background: linear-gradient(180deg, rgba(14,15,17,.45), rgba(14,15,17,.55) 48%, rgba(14,15,17,.84) 84%, var(--page));
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px; align-items: start;
  padding-block: 36px 40px;
  min-height: min(76dvh, 660px);
}
@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0,1fr) 360px; gap: 40px 48px; padding-block: 44px 48px; }
  .hero-copy { padding-top: 6px; }
}

/* Below the split the card is a grid item in a single column; it must not be wider
   than the column, or its right edge is pushed off-canvas. */
.hero-card { min-width: 0; max-width: 100%; }
.hero-card-foot { flex-wrap: wrap; }
.hero-card .countdown { gap: 4px; }
.hero-card .countdown .unit .n { font-size: clamp(20px, 7vw, 26px); }
.hero-card .countdown .unit .l { font-size: 10px; letter-spacing: .1em; }

.hero-copy { min-width: 0; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* The hero heading is the cockpit's own: Archivo 900, italic, uppercase, tight.
   Nothing here overrides it, so the home page and the cockpit share one voice. */
.hero h1 {
  font-size: clamp(2.3rem, 9.4vw, 9rem);
  margin: 16px 0 6px;
  max-width: 18ch;
  /* Desktop keeps the two-tone name on one line; phones break before "Grand Prix". */
  overflow-wrap: normal;
  hyphens: none;
  /* The cockpit hero's colour, not the shell's body grey. */
  color: #F5F6F7;
}

/* "Grand Prix" is stroked in the team colour, exactly as the cockpit set it.
   Solid ink for the location, outline for the series name. */
.hero h1 em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 2px var(--team);
}

/* On a narrow screen the two halves are their own lines: nothing outruns the
   gutter, and no word ever splits mid-word while filling the available width. */
.hero h1 .gp-word { display: inline-block; white-space: nowrap; }
@media (max-width: 700px) {
  .hero h1 {
    font-size: clamp(2.6rem, 14.2vw, 5.5rem);
    max-width: 100%;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    padding-right: 4px;
  }
  .hero h1 em { display: block; white-space: nowrap; }
  .hero h1 .gp-place { display: block; }
  .hero h1.is-nowrap-place .gp-place { white-space: nowrap; }
  .hero h1.is-measuring .gp-place,
  .hero h1.is-measuring em { display: inline-block; width: max-content; white-space: nowrap; }
}
@media (max-width: 640px) {
  .hero h1 em { -webkit-text-stroke-width: 1.5px; }
}

/* The place, small and flush with the heading's left edge. */
.hero-place {
  /* Slightly inset from the heading's edge, a deliberate step rather than a flush line. */
  margin-top: 10px;
  margin-left: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-3);
  letter-spacing: .01em;
}

.hero .tag { margin-top: 2px; }

.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin-top: 20px; font-size: 14px; color: var(--fg-2);
}
.hero-meta .divider { width: 1px; height: 14px; background: var(--line-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero-rail {
  display: flex; flex-direction: column;
  gap: 12px; min-width: 0;
}

.hero-card {
  border-radius: var(--radius); background: color-mix(in srgb, var(--card) 88%, transparent);
  box-shadow: var(--shadow-raised); position: relative; overflow: hidden;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.hero-card-body { padding: 18px; }
.hero-card .next-name {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.015em;
  line-height: 1.12;
}
/* The session sits directly under the name, clearly subordinate to it. */
.hero-card .next-session {
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: .02em;
  color: var(--fg-3);
}
.hero-card .next-session.is-live { color: #ff9d97; }

/* Swap the card's little title for the name: one name, one session, no repeat. */
.hero-card .next-gp { display: none; }
.countdown { display: flex; gap: 8px; margin-top: 16px; }
.countdown .unit { flex: 1; text-align: center; }
.countdown .unit .n {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 26px; color: var(--white); font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.countdown .unit .l {
  display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--fg-4);
}
.hero-watch {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 650; font-size: 13px; color: var(--white);
  padding: 6px 12px; border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line-2);
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.hero-watch:hover { background: #fff; border-color: #fff; color: #0b0b0d; }

.hero-card-foot {
  padding: 14px 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--fg-3);
}

/* Session strip under the hero: the weekend at a glance. */
/* The weekend block closes the hero: a labelled surface holding the five sessions,
   directly under the up-next card so the two read as one column. */
.hero-week {
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero-week-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 0 2px 11px;
}
.hero-week-head span:last-child { font-size: 12px; color: var(--fg-4); }

/* The rail is card-width, so the weekend is two columns of sessions with the fifth
   spanning both: nothing is orphaned and the block closes flush. On a wide screen
   the rail is wider and it fits four across, still with the fifth spanning two. */
.session-strip {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.session-tile:nth-child(5) { grid-column: span 2; }
.session-tile {
  background: color-mix(in srgb, var(--card-2) 92%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 12px; border: 1px solid var(--line);
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
  display: flex; flex-direction: column; gap: 3px;
}
.session-tile:hover { background: var(--card-3); }
.session-tile .name { font-size: 12px; font-weight: 650; color: var(--fg-3); letter-spacing: .01em; }
.session-tile .when { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; color: var(--white); }
.session-tile .day { font-size: 11px; color: var(--fg-4); }
.session-tile.next { border-color: rgba(225,6,0,.45); background: rgba(225,6,0,.09); }
.session-tile.done { opacity: .55; }
.session-tile.live { border-color: var(--accent); background: rgba(225,6,0,.14); }

/* ═══════════════ SCHEDULE ═══════════════ */

.sc-hero-head { position: relative; z-index: 20; }
.sc-hero-row { display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 1024px) {
  .sc-hero-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
}
.sc-hero-copy { max-width: 46rem; min-width: 0; }
.sc-cal-actions { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sc-cal-menu { position: relative; display: inline-block; }
.sc-cal-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: var(--white); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.sc-cal-btn:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.26); }
.sc-cal-btn.sc-cal-icon {
  width: 40px; padding: 0; justify-content: center; flex: none;
  text-decoration: none;
}
.sc-cal-btn.sc-cal-icon:hover {
  color: var(--white);
  background: rgba(88,101,242,.22);
  border-color: rgba(88,101,242,.5);
}
.sc-cal-pop {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 220px; padding: 6px; border-radius: 12px;
  background: #1b1d22; border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px rgba(0,0,0,.65);
  transform-origin: top left;
  animation: scPopIn .18s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes scPopIn {
  from { opacity: 0; transform: translate3d(0, -6px, 0) scale(.98); }
  to { opacity: 1; transform: none; }
}
.sc-cal-pop[hidden] { display: none !important; }
.sc-cal-pop a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--fg);
  transition: background-color .12s var(--ease), color .12s var(--ease);
}
.sc-cal-pop a:hover { background: rgba(255,255,255,.07); color: var(--white); }

.sc-next-wrap { width: 100%; }
@media (min-width: 1024px) { .sc-next-wrap { max-width: 340px; flex: none; } }
.sc-next-card { padding: 20px; }
.sc-next-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--fg-3); }
.sc-next-title { margin: 4px 0 0; font-size: 18px; font-weight: 700; color: var(--white); line-height: 1.25; }
.sc-next-clock {
  margin: 12px 0 0; font-family: var(--font-number);
  font-size: clamp(1.45rem, 3.2vw, 1.875rem); line-height: 1.05;
  color: var(--white); letter-spacing: -.01em;
}
.sc-next-when { margin: 8px 0 0; font-size: 12px; color: var(--fg-3); }

.sc-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.sc-tz-note { margin: 0; font-size: 14px; color: var(--fg-3); }
.sc-tz-note b { color: var(--fg-2); font-weight: 600; }
.sc-lozenge {
  display: inline-flex; align-items: center; flex: none;
  height: 20px; padding: 0 6px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; line-height: 1;
}
.sc-lozenge-sprint { background: #533f04; color: #fbd779; }

.sc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sc-featured:not([hidden]) { margin-bottom: 24px; }
.sc-featured[hidden] { display: none; }
.sc-item { min-width: 0; }
.sc-card {
  overflow: hidden;
  transition: background-color .16s var(--ease), opacity .16s var(--ease), box-shadow .16s var(--ease);
}
.sc-card.is-done { opacity: .78; }
.sc-card.is-done:hover, .sc-card.is-done.is-open { opacity: 1; }
.sc-card.is-next {
  background: #18212f;
  box-shadow: inset 0 0 0 1px rgba(102,157,241,.45), var(--shadow-raised);
}
.sc-card.is-next:hover { background: #1d2839; }

.sc-row {
  width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left;
  cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px;
}
@media (min-width: 640px) { .sc-row { gap: 16px; padding: 16px; } }

.sc-rnd { display: none; width: 48px; flex: none; text-align: center; }
@media (min-width: 640px) {
  .sc-rnd { display: flex; flex-direction: column; align-items: center; }
}
.sc-rnd-label { font-size: 10px; font-weight: 600; letter-spacing: .14em; color: var(--fg-3); line-height: 1.1; }
.sc-rnd-num { margin-top: 3px; font-family: var(--font-number); font-size: 24px; line-height: 1.1; color: var(--white); }

.sc-thumb {
  position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9;
  border-radius: 6px; overflow: hidden; background: var(--card-2);
}
@media (min-width: 640px) { .sc-thumb { width: 144px; } }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sc-main { flex: 1; min-width: 0; }
.sc-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.sc-flag-atlas { display: inline-block; background-repeat: no-repeat; }
.sc-flag { width: 20px; height: 15px; border-radius: 2px; flex: none; object-fit: cover; }
.sc-gp-name {
  margin: 0; font-size: 16px; font-weight: 600; color: var(--white); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
@media (min-width: 640px) { .sc-gp-name { font-size: 18px; } }
.sc-venue {
  margin: 3px 0 0; font-size: 13.5px; color: var(--fg-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 640px) { .sc-mobile-rnd { display: none; } }
.sc-mobile-meta {
  margin-top: 8px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 8px;
}
@media (min-width: 640px) { .sc-mobile-meta { display: none; } }

.sc-aside { display: none; flex: none; text-align: right; }
@media (min-width: 640px) { .sc-aside { display: block; } }
.sc-dates { margin: 0; font-size: 14px; font-weight: 600; color: var(--fg-2); }
.sc-status { margin-top: 5px; display: flex; align-items: center; justify-content: flex-end; }

.sc-winner { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.sc-wbar { height: 15px; }
.sc-wname { font-weight: 600; color: var(--white); }
.sc-trophy { width: 16px; height: 16px; color: #fbbf24; flex: none; }
.sc-badge-live {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 7px; border-radius: 4px;
  background: var(--accent); color: var(--white);
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
}
.sc-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--white); flex: none; }
.sc-kind { font-size: 13.5px; color: var(--fg-3); }

.sc-chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex: none; margin-left: 2px;
  color: var(--fg-3); border-radius: 6px;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), color .16s var(--ease), background-color .16s var(--ease);
}
.sc-row:hover .sc-chev { color: var(--white); background: rgba(255,255,255,.05); }
.sc-card.is-open .sc-chev { transform: rotate(180deg); color: var(--white); }

.sc-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s cubic-bezier(.16, 1, .3, 1);
}
.sc-card.is-open .sc-drawer {
  grid-template-rows: 1fr;
}
.sc-drawer-clip {
  min-height: 0;
  overflow: hidden;
}
.sc-drawer-inner {
  border-top: 1px solid var(--line); padding: 14px 16px 16px;
  background: rgba(0,0,0,.18);
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  transition: opacity .18s cubic-bezier(.4, 0, .2, 1), transform .22s cubic-bezier(.4, 0, .2, 1);
}
.sc-card.is-open .sc-drawer-inner {
  opacity: 1;
  transform: none;
  transition: opacity .26s cubic-bezier(.16, 1, .3, 1) .03s, transform .32s cubic-bezier(.16, 1, .3, 1);
}
.sc-sess-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (min-width: 760px) {
  .sc-sess-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
}
.sc-sess-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 11px; border-radius: 8px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  font-size: 13px;
  opacity: 0;
  transform: translate3d(0, -5px, 0);
  transition: opacity .15s cubic-bezier(.4, 0, .2, 1), transform .18s cubic-bezier(.4, 0, .2, 1);
}
.sc-card.is-open .sc-sess-row {
  opacity: 1;
  transform: none;
  transition: opacity .24s cubic-bezier(.16, 1, .3, 1), transform .28s cubic-bezier(.16, 1, .3, 1);
}
.sc-card.is-open .sc-sess-row:nth-child(1) { transition-delay: .025s; }
.sc-card.is-open .sc-sess-row:nth-child(2) { transition-delay: .05s; }
.sc-card.is-open .sc-sess-row:nth-child(3) { transition-delay: .075s; }
.sc-card.is-open .sc-sess-row:nth-child(4) { transition-delay: .1s; }
.sc-card.is-open .sc-sess-row:nth-child(5) { transition-delay: .125s; }
@media (min-width: 760px) {
  .sc-sess-row { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 10px 12px; }
}
.sc-sess-row.is-active {
  background: rgba(102,157,241,.1); border-color: rgba(102,157,241,.4);
}
.sc-sess-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; color: var(--white); }
.sc-sess-time { font-size: 12.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.sc-sess-time b { color: var(--fg); font-weight: 600; }
.sc-sess-pill {
  display: inline-flex; align-items: center; height: 17px; padding: 0 5px;
  border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.sc-sess-pill.is-live { background: var(--accent); color: var(--white); }
.sc-sess-pill.is-next { background: rgba(102,157,241,.22); color: #9ec5ff; }
.sc-sess-pill.is-done { background: rgba(255,255,255,.07); color: var(--fg-3); }

.sc-drawer-foot {
  margin-top: 12px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 10px;
}
.sc-drawer-winner { margin: 0; font-size: 13px; color: var(--fg-3); }
.sc-drawer-winner a { color: var(--white); font-weight: 600; }
.sc-drawer-winner a:hover { text-decoration: underline; }
.sc-drawer-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.sc-drawer-link {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.07); border: 1px solid var(--line-strong); color: var(--fg);
  transition: background-color .14s var(--ease), color .14s var(--ease);
}
.sc-drawer-link:hover { background: rgba(255,255,255,.12); color: var(--white); }
.sc-drawer-link.is-primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.sc-drawer-link.is-primary:hover { background: #ff1e17; }

.sc-about { margin-top: 56px; padding-bottom: 12px; }
.sc-about-title { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 600; letter-spacing: -.01em; color: var(--white); }
.sc-about-copy { margin-top: 14px; max-width: 48rem; display: grid; gap: 12px; font-size: 14px; line-height: 1.65; color: var(--fg-2); }
.sc-about-copy p { margin: 0; }

/* ═══════════════ TEAMS ═══════════════ */

.team-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0,1fr));
}
@media (min-width: 700px) { .team-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1080px) { .team-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

.team-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-raised);
  padding: 18px; min-height: 148px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background-color .18s var(--ease);
}
.team-card:hover { background: var(--card-2); }
.team-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 20% 110%, color-mix(in srgb, var(--tc) 34%, transparent), transparent 68%);
  pointer-events: none;
}
.team-card .t-logo { width: 92px; height: 26px; object-fit: contain; object-position: left center; opacity: .95; }
.team-card .t-top { display: flex; align-items: center; gap: 10px; }
.team-card .t-bar { width: 3px; height: 24px; border-radius: 2px; background: var(--tc); flex: none; }
.team-card .t-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: inline-grid; place-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.07);
  color: var(--fg-2);
  transition: color .16s var(--ease), background-color .16s var(--ease), border-color .16s var(--ease);
}
.team-card .t-ico svg { width: 18px; height: 18px; display: block; }
.team-card:hover .t-ico {
  color: var(--white);
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.14);
}
.team-card .t-name {
  font-family: var(--font-display); font-size: 16.5px; font-weight: 700;
  color: var(--white); letter-spacing: -.01em;
}
.team-card .t-sub { font-size: 12px; color: var(--fg-3); margin-top: 3px; }

/* ═══════════════ PLACEHOLDER (parts still to come) ═══════════════ */

.pending {
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 34px 22px; text-align: center; color: var(--fg-3);
  background: rgba(255,255,255,.015);
}
.pending h2 {
  font-family: var(--font-display); font-size: 17px; color: var(--fg);
  letter-spacing: -.01em; margin-bottom: 6px;
}
.pending p { font-size: 13.5px; max-width: 46ch; margin-inline: auto; }

/* ═══════════════ FOOTER ═══════════════ */

.footer {
  flex: none; margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #0b0c0e;
  padding: 34px 0 26px;
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: 26px 40px;
  justify-content: space-between; align-items: flex-start;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.footer-nav a {
  padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--fg-2);
  transition: color .18s, background-color .18s, border-color .18s;
}
.footer-nav a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.footer-nav a.footer-discord {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; margin-left: 2px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: var(--fg-2);
}
.footer-nav a.footer-discord:hover {
  color: var(--white);
  background: rgba(88,101,242,.22);
  border-color: rgba(88,101,242,.48);
}
.footer-bottom {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
  font-size: 12px; color: var(--fg-4);
}
.footer-bottom a { color: var(--fg-3); }
.footer-bottom a:hover { color: var(--white); }

/* ═══════════════ PAGE TRANSITIONS ═══════════════
   Two layers, same feel as the source-chip switch: content lifts and fades in
   from 10px, and lifts out on the way. View Transitions do the cross-page
   fade where the browser supports them; the .is-leaving class is the fallback
   for everyone else, and both collapse under reduced-motion. */

@view-transition { navigation: auto; }

body:not(.theater) > .nav { view-transition-name: site-nav; }
::view-transition-group(site-nav) {
  animation-duration: .22s;
  animation-timing-function: cubic-bezier(.16, 1, .3, 1);
  z-index: 200;
}
::view-transition-old(site-nav),
::view-transition-new(site-nav) {
  animation-duration: .14s;
}

@media (min-width: 901px) {
  .nav-links a[aria-current="page"]::after { view-transition-name: nav-active-bar; }
  ::view-transition-group(nav-active-bar) {
    animation-duration: .26s;
    animation-timing-function: cubic-bezier(.16, 1, .3, 1);
    z-index: 201;
  }
}

::view-transition-old(root) {
  animation: pageOut .16s cubic-bezier(.4, 0, .2, 1) both;
}
::view-transition-new(root) {
  animation: pageIn .26s cubic-bezier(.16, 1, .3, 1) .02s both;
}
@keyframes pageOut { to { opacity: 0; transform: translate3d(0, -4px, 0) scale(.996); } }
@keyframes pageIn { from { opacity: 0; transform: translate3d(0, 7px, 0); } to { opacity: 1; transform: none; } }

body.is-leaving main { animation: pageOut .12s cubic-bezier(.4, 0, .2, 1) both; pointer-events: none; }

/* Staggered entrance for the page's own blocks. */
.rise { animation: riseIn .38s cubic-bezier(.16, 1, .3, 1) both; }
.rise-1 { animation-delay: .025s; }
.rise-2 { animation-delay: .055s; }
.rise-3 { animation-delay: .085s; }
@keyframes riseIn { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
  .rise { opacity: 1; }
}

/* ═══════════════ DRIVER GRID ═══════════════
   2 / 3 / 4 / 5 columns is the reference's rhythm. Each card is a portrait well
   washed in the team's colour with the driver's number faint in the corner, and
   the name plate overlaps the bottom of the well instead of sitting under it. */
.driver-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .driver-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .driver-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .driver-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.driver-note { margin-top: 16px; font-size: 12.5px; color: var(--fg-4); }

.driver-card {
  position: relative; display: flex; flex-direction: column;
  overflow: hidden; isolation: isolate;
  border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.driver-card:hover { background: var(--card-2); border-color: var(--line-2); transform: translateY(-2px); }

/* The well: a team-coloured glow from the floor, a dark-to-darker sky, and the
   cut-out standing on it. Its 4:5 ratio is what keeps a 2-up phone grid sane. */
.driver-portrait {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background:
    radial-gradient(90% 80% at 50% 100%, color-mix(in srgb, var(--team) 34%, transparent), transparent 70%),
    linear-gradient(180deg, #111217, #0b0c0f);
}
/* The cut-outs are roughly 1:2.9 and the well is 4:5, so the portrait is sized by
   width, anchored just below the top edge, and the well crops it at the shins —
   the same framing as the reference. The fade hides the crop. */
.driver-portrait img {
  position: absolute; inset-inline: 0; top: 10px; z-index: 1; margin-inline: auto;
  width: 86%; height: auto; max-width: none; max-height: none;
  transition: transform .5s var(--ease);
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.55));
}
.driver-card:hover .driver-portrait img { transform: scale(1.03); }
.driver-plate {
  position: absolute; top: 14px; right: 16px; z-index: 0;
  font-family: var(--font-number); font-size: 2.15rem; line-height: 1;
  font-weight: 400; letter-spacing: 0;
  color: rgba(255,255,255,.13);
  font-variant-numeric: tabular-nums;
}
.driver-fade {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2; height: 96px; pointer-events: none;
  background: linear-gradient(to top, var(--card) 8%, color-mix(in srgb, var(--card) 55%, transparent) 55%, transparent);
}
/* Gradients switch discretely, so crossfade a second layer instead of swapping
   background-image mid-hover. This keeps the portrait-to-body seam stable. */
.driver-fade::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--card-2) 8%, color-mix(in srgb, var(--card-2) 55%, transparent) 55%, transparent);
  opacity: 0; transition: opacity .2s var(--ease);
}
.driver-card:hover .driver-fade::after { opacity: 1; }

.driver-body { position: relative; z-index: 3; margin-top: -40px; padding: 0 16px 16px; }
/* Cover the clipped portrait edge with the actual card colour. The overlap
   prevents a subpixel compositing seam when the portrait scales on hover. */
.driver-body::before {
  content: ''; position: absolute; z-index: -1; inset: 30px 0 0;
  background: var(--card); transition: background-color .2s var(--ease);
  pointer-events: none;
}
.driver-card:hover .driver-body::before { background: var(--card-2); }
.driver-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); }
.driver-meta .flag { border-radius: 3px; outline: 1px solid rgba(255,255,255,.14); width: 20px; height: 15px; object-fit: cover; }
.driver-standing { font-weight: 650; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.driver-name { margin-top: 6px; line-height: 1.15; }
.driver-first { display: block; font-size: 13px; color: var(--fg-2); }
.driver-last { display: block; font-size: 18px; font-weight: 700; color: var(--white); letter-spacing: -.01em; }
.driver-team {
  display: flex; align-items: center; gap: 8px; margin-top: 5px;
  font-size: 12px; color: var(--fg-3);
}
.driver-swatch { width: 3px; height: 12px; border-radius: 999px; flex: none; }
@media (max-width: 400px) {
  .driver-body { padding: 0 12px 13px; margin-top: -32px; }
  .driver-body::before { top: 22px; }
  .driver-last { font-size: 16px; }
  .driver-first { font-size: 12px; }
}

/* ═══════════════ TABLES ═══════════════ */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fg-4); padding: 0 12px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.045); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background-color .15s var(--ease); }
.tbl tbody tr:hover { background: rgba(255,255,255,.03); }
.tbl .t-pos { width: 62px; }
.tbl .t-team { color: var(--fg-3); font-size: 13px; }
.tbl .t-num { text-align: right; white-space: nowrap; }
.tbl .t-num.pts { color: var(--white); font-size: 15px; }
.tbl .t-empty { text-align: center; color: var(--fg-3); padding: 34px 12px; }

.pos-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 7px; border-radius: 7px;
  background: rgba(255,255,255,.06); color: var(--fg);
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tbl tbody tr:first-child .pos-badge { background: rgba(225,6,0,.16); color: #ff9d97; }

.who { display: inline-flex; align-items: center; gap: 10px; }
.who-bar { width: 3px; height: 26px; border-radius: 2px; flex: none; background: var(--fg-4); }
.who b { display: block; font-weight: 600; color: var(--white); font-size: 14px; line-height: 1.25; }
.who small {
  display: block; font-size: 10.5px; letter-spacing: .1em; color: var(--fg-4);
  font-weight: 600; margin-top: 1px;
}
a.who:hover b { text-decoration: underline; text-underline-offset: 2px; }

#standingsBody { transition: opacity .2s var(--ease); }

/* ── Segmented control (Drivers / Constructors) ── */
.seg {
  display: inline-flex; gap: 3px; padding: 3px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 11px;
}
.seg-btn {
  padding: 7px 14px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--fg-3);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.seg-btn:hover { color: var(--white); }
.seg-btn.active { background: var(--card-3); color: var(--white); }

/* ── Teams page: bigger cards than the home shortcut grid ── */
.team-grid-lg { grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width: 560px) { .team-grid-lg { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1080px) { .team-grid-lg { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.team-grid-lg .team-card { min-height: 176px; padding: 20px; gap: 14px; }
.team-card { gap: 12px; justify-content: flex-start; }
.team-card .t-meta {
  display: flex; align-items: center; gap: 10px; margin-top: auto;
  font-size: 12.5px; color: var(--fg-3);
}

/* ═══════════════ DRIVER PROFILE ═══════════════
   One driver, one page: a team-tinted hero with the cut-out and the season's
   numbers, then the results table with the teammate and form beside it. The
   tint is `--team`, set on .dp-hero by the page, defaulting to grey. */

.dp-hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #111218, var(--page));
}
.dp-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(58% 78% at 78% 32%, color-mix(in srgb, var(--team) 22%, transparent), transparent 68%);
}
.dp-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
  align-items: end; padding-block: 26px 0;
}
@media (min-width: 1024px) {
  .dp-hero-grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; padding-block: 34px 0; }
}
.dp-intro { min-width: 0; padding-bottom: 30px; }
.dp-tags {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; font-size: 14px; color: var(--fg-2);
}
.dp-tags .flag { border-radius: 3px; outline: 1px solid rgba(255,255,255,.14); width: 20px; height: 15px; object-fit: cover; }
.dp-dot { color: var(--fg-4); }
.dp-team-link { display: inline-flex; align-items: center; gap: 8px; transition: color .18s var(--ease); }
.dp-team-link:hover { color: var(--white); }

.dp-name { margin-top: 12px; line-height: .95; letter-spacing: -.015em; }
.dp-first { display: block; font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 600; color: var(--fg-2); }
.dp-last { display: block; font-size: clamp(2.6rem, 8vw, 4.5rem); font-weight: 650; color: var(--white); letter-spacing: -.025em; }
.dp-number {
  margin-top: 12px; font-family: var(--font-number); font-weight: 400;
  font-size: clamp(2.4rem, 6.4vw, 3.6rem); line-height: 1;
  color: var(--team); letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* Stat cards: label on top, number loud, a quiet note under. Six of them, three
   across on a phone once they fit, two rows on a desktop's left column. */
.dp-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px;
}
@media (min-width: 640px) { .dp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .dp-stats { gap: 12px; max-width: 640px; } }
.dp-stat {
  padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.dp-stat-label { font-size: 11.5px; font-weight: 650; color: var(--fg-3); }
.dp-stat-value { margin-top: 6px; font-size: clamp(1.35rem, 3.4vw, 1.75rem); font-weight: 650; color: var(--white); line-height: 1.1; font-variant-numeric: tabular-nums; }
.dp-stat-note { margin-top: 3px; font-size: 11.5px; color: var(--fg-4); min-height: 1em; }

.dp-portrait {
  position: relative; justify-self: center;
  width: 100%; max-width: 340px; height: 380px; overflow: hidden;
}
@media (min-width: 640px) { .dp-portrait { height: 480px; } }
@media (min-width: 1024px) { .dp-portrait { max-width: 400px; height: 560px; } }
/* Anchored at the top: the figure is 2.9× tall, so the well crops the feet and the
   fade under it makes that deliberate. Anchoring at the floor would show only legs. */
.dp-portrait img { position: absolute; inset-inline: 0; top: 0; margin-inline: auto; width: 100%; height: auto; }
.dp-portrait-fade {
  position: absolute; inset-inline: 0; bottom: 0; height: 120px; pointer-events: none;
  background: linear-gradient(to top, var(--page), transparent);
}

/* ── Body: results on the left, context on the right ── */
.dp-body {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px;
  padding-block: 26px 56px;
}
@media (min-width: 1080px) {
  .dp-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 26px 32px; align-items: start; }
  .dp-side { position: sticky; top: calc(var(--nav-h) + 18px); }
}
.dp-main { display: grid; gap: 22px; min-width: 0; content-start: }
.dp-panel { padding: 22px; }
@media (min-width: 640px) { .dp-panel { padding: 26px; } }
.dp-panel-title { font-size: 19px; font-weight: 700; color: var(--white); letter-spacing: -.01em; }
.dp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
@media (min-width: 640px) { .dp-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dp-facts > div { padding: 11px 12px; border-radius: 10px; background: var(--card-2); }
.dp-facts dt { font-size: 11.5px; color: var(--fg-3); }
.dp-facts dd { margin-top: 3px; font-size: 13.5px; font-weight: 600; color: var(--white); }
.dp-prose { margin-top: 18px; display: grid; gap: 12px; font-size: 14.5px; line-height: 1.65; color: var(--fg-2); max-width: 74ch; }

.dp-section { display: grid; gap: 12px; }
.dp-section-note { margin-top: 4px; font-size: 12.5px; color: var(--fg-4); }
.dp-table-card { padding: 6px; overflow: hidden; }
.dp-table { font-size: 13.5px; }
.dp-table thead th:first-child, .dp-table tbody td:first-child { padding-left: 14px; }
.dp-rnd { color: var(--fg-4); font-variant-numeric: tabular-nums; width: 46px; }
.dp-gp { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--white); }
.dp-gp .flag { border-radius: 3px; outline: 1px solid rgba(255,255,255,.14); width: 20px; height: 15px; object-fit: cover; flex: none; }
.dp-dim { color: var(--fg-3); }
.dp-finish { color: var(--white); font-weight: 600; }
.dp-finish.is-win { color: var(--white); }
.dp-points { color: var(--white); font-weight: 700; }
@media (max-width: 560px) {
  .dp-table th, .dp-table td { padding: 10px 8px; }
  .dp-gp { gap: 7px; font-size: 13px; }
  .dp-sprint-col { display: none; }
}

/* ── Side column ── */
.dp-side { display: grid; gap: 14px; min-width: 0; }
.dp-side-card { padding: 18px; }
.dp-side-title { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); }
.dp-muted { margin-top: 10px; font-size: 13px; color: var(--fg-4); }

.dp-battle { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 10px; margin-top: 14px; }
.dp-battle-side { display: grid; gap: 2px; min-width: 0; }
.dp-battle-side b { font-size: 22px; font-weight: 700; color: var(--white); line-height: 1.1; }
.dp-battle-side small { font-size: 11px; color: var(--fg-4); }
.dp-battle-name { font-size: 13px; font-weight: 600; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.dp-battle-side { text-align: right; transition: color .18s var(--ease); }
a.dp-battle-side:hover .dp-battle-name { color: var(--white); }
.dp-vs { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--fg-4); text-transform: uppercase; }
.dp-battle-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-3); }

.dp-form-strip { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; margin-top: 14px; }
.dp-form-chip {
  display: grid; gap: 2px; place-items: center; padding: 9px 4px;
  border-radius: 9px; background: var(--card-2); border: 1px solid var(--line);
}
.dp-form-chip b { font-size: 14px; font-weight: 700; color: var(--fg-2); }
.dp-form-chip small { font-size: 9.5px; letter-spacing: .04em; color: var(--fg-4); }
.dp-form-chip.is-win { background: color-mix(in srgb, var(--accent) 18%, var(--card-2)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dp-form-chip.is-win b { color: #ff9d97; }
.dp-form-chip.is-podium { background: color-mix(in srgb, #c8cdd4 14%, var(--card-2)); }
.dp-form-chip.is-podium b { color: var(--white); }
.dp-form-chip.is-points b { color: var(--white); }
.dp-form-note { margin-top: 10px; font-size: 12px; color: var(--fg-4); }

.dp-next-card { display: grid; gap: 3px; margin-top: 12px; transition: opacity .18s var(--ease); }
.dp-next-card:hover { opacity: .85; }
.dp-next-round { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-4); }
.dp-next-card b { font-size: 15px; color: var(--white); line-height: 1.3; }
.dp-next-meta { font-size: 12px; color: var(--fg-3); }

.dp-side-links { display: grid; gap: 8px; }
.dp-side-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--fg-2);
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.dp-side-link:hover { background: var(--card-2); border-color: var(--line-2); color: var(--white); }
.dp-side-link span:last-child { color: var(--fg-4); }

.dp-empty { text-align: center; padding: 28px 12px; color: var(--fg-3); font-size: 13.5px; }
.dp-empty a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; }

/* ═══════════════ STANDINGS ═══════════════
   Two leader cards, a tab row, then the table. The table carries more than a
   grid used to: a team bar, a face or a logo, wins and the gap to the leader. */

.st-leaders {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
}
@media (min-width: 900px) { .st-leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.st-leader {
  position: relative; display: flex; overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.st-leader:hover { transform: translateY(-2px); border-color: var(--line-2); }
.st-leader-driver {
  align-items: flex-end; gap: 20px; padding: 20px 20px 0;
  background:
    radial-gradient(110% 100% at 100% 100%, color-mix(in srgb, var(--team) 27%, transparent), transparent 60%),
    var(--card);
}
.st-leader-portrait {
  position: relative; width: 128px; height: 192px; flex: none; overflow: hidden;
}
.st-leader-portrait img { position: absolute; inset-inline: 0; top: 0; width: 100%; height: auto; }
.st-leader-body { min-width: 0; }
.st-leader-driver .st-leader-body { padding-bottom: 20px; }
.st-leader-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 650; line-height: 16px; letter-spacing: .02em; color: var(--fg-3);
}
.st-trophy {
  width: 16px; height: 16px; flex: none;
  color: #fbbf24; color: oklch(82.8% .189 84.429);
}
.st-leader-name {
  margin-top: 4px; font-size: clamp(1.25rem, 2.4vw, 1.5rem); font-weight: 600;
  color: var(--white); letter-spacing: -.015em; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
}
.st-leader-team { font-size: 14px; line-height: 20px; color: var(--fg-3); margin-top: 2px; }
.st-leader-points {
  display: flex; align-items: baseline; gap: 5px; margin-top: 8px;
  font-size: clamp(1.55rem, 3vw, 1.875rem); font-weight: 700; color: var(--white); line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.st-pts { font-size: 14px; font-weight: 600; color: var(--fg-3); }

.st-leader-constructor {
  flex-direction: column; align-items: flex-start; justify-content: space-between;
  padding: 20px;
  background:
    radial-gradient(110% 100% at 100% 0%, color-mix(in srgb, var(--team) 25%, transparent), transparent 60%),
    var(--card);
}
.st-leader-constructor .st-leader-body { align-self: flex-start; text-align: left; }
.st-leader-car {
  display: block; width: 78%; max-width: 380px; height: auto;
  margin-top: 12px; margin-left: auto; align-self: flex-end;
}

.st-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-top: 30px;
}
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tab {
  height: 36px; padding: 0 14px; border-radius: 999px; flex: none;
  font-size: 14px; font-weight: 600; color: var(--fg-2); background: rgba(255,255,255,.06);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.tab:hover { color: var(--white); }
.tab.active { color: var(--page); background: var(--white); }

/* Segmented sliding pill for Drivers ↔ Constructors on Standings */
#standingsTabs {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  isolation: isolate;
  overflow: hidden;
}
#standingsTabs::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 2);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}
#standingsTabs:has(.tab:nth-of-type(2).active)::before {
  transform: translateX(100%);
}
#standingsTabs .tab {
  position: relative;
  z-index: 1;
  height: 34px;
  padding: 0 18px;
  background: transparent;
  text-align: center;
  transition: color .2s var(--ease);
}
#standingsTabs .tab.active {
  background: transparent;
  color: var(--page);
}

.st-updated { font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }

.st-card { margin-top: 14px; padding: 4px; overflow: hidden; }
#standingsPanel .table-wrap {
  transition: opacity .12s var(--ease), transform .12s var(--ease);
}
#standingsPanel .table-wrap.is-leaving {
  opacity: 0;
  transform: translateX(calc(var(--st-dir, 1) * -12px));
}
#standingsPanel .table-wrap.is-entering {
  animation: stTableEnter .28s cubic-bezier(.22, 1, .36, 1) both;
}
#standingsPanel .table-wrap.is-entering tbody tr {
  animation: stRowIn .26s cubic-bezier(.22, 1, .36, 1) both;
}
#standingsPanel .table-wrap.is-entering tbody tr:nth-child(2) { animation-delay: .015s; }
#standingsPanel .table-wrap.is-entering tbody tr:nth-child(3) { animation-delay: .03s; }
#standingsPanel .table-wrap.is-entering tbody tr:nth-child(4) { animation-delay: .045s; }
#standingsPanel .table-wrap.is-entering tbody tr:nth-child(5) { animation-delay: .06s; }
#standingsPanel .table-wrap.is-entering tbody tr:nth-child(n+6) { animation-delay: .075s; }

@keyframes stTableEnter {
  from { opacity: 0; transform: translateX(calc(var(--st-dir, 1) * 14px)); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes stRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #standingsTabs::before,
  #standingsPanel .table-wrap,
  #standingsPanel .table-wrap.is-entering,
  #standingsPanel .table-wrap.is-entering tbody tr {
    transition: none !important;
    animation: none !important;
  }
}
.st-tbl { font-size: 14px; }
.st-tbl th {
  padding: 10px 12px; border-bottom: 2px solid var(--line-2);
  font-size: 12px; font-weight: 650; letter-spacing: 0;
  text-transform: none; color: var(--fg-2);
}
.st-tbl td { height: 56px; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.045); }
.st-tbl th:first-child, .st-tbl td:first-child { padding-left: 16px; }
.st-tbl th:last-child, .st-tbl td:last-child { width: 88px; padding-right: 18px; }
.st-tbl tbody tr:last-child td { border-bottom: 0; }
.st-pos { width: 48px; color: var(--fg-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.st-tbl .st-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-wins-col { width: 84px; color: var(--fg-2); }
.st-gap-col { width: 96px; color: var(--fg-2); }
.st-points { color: var(--white); font-weight: 700; }
.st-team-col { color: var(--fg-2); }

/* Team bar + face + two-line name. The bar is the livery, exactly as a card. */
.st-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-bar { width: 3px; height: 28px; border-radius: 3px; background: var(--team, #666); flex: none; align-self: center; }
.st-face {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--card-3); object-fit: cover; object-position: top center;
}
.st-logotile {
  width: 32px; height: 32px; flex: none; border-radius: 8px;
  background: var(--card-2); display: grid; place-items: center;
}
.st-logo { width: 20px; height: 20px; object-fit: contain; }
.st-who-text { min-width: 0; display: grid; }
.st-name {
  font-weight: 600; color: var(--white); font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-sub { font-size: 11.5px; color: var(--fg-3); display: none; }
a.st-who:hover .st-name { text-decoration: underline; text-underline-offset: 2px; }

/* Below md the team column collapses into each row's second line, as the
   reference does, so the table never needs a horizontal scroll. */
@media (max-width: 900px) {
  .st-team-col { display: none; }
  .st-sub { display: block; }
  .st-tbl th, .st-tbl td { padding-inline: 10px; }
}
@media (max-width: 640px) {
  .st-wins-col { display: none; }
  /* No ellipsis on a phone: the name wraps before it is cut. */
  .st-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
  .st-tbl td { height: auto; padding-block: 10px; }
  .st-who { gap: 9px; }
  .st-pos { width: 30px; padding-right: 0; }
  .st-gap-col, .st-tbl th:last-child, .st-tbl td:last-child { width: auto; }
  .st-tbl th, .st-tbl td, .st-tbl th:first-child, .st-tbl td:first-child, .st-tbl th:last-child, .st-tbl td:last-child { padding-inline: 8px; }
  .st-leader-driver { padding: 16px 16px 0; gap: 14px; }
  .st-leader-driver .st-leader-body { padding-bottom: 16px; }
  .st-leader-portrait { width: 104px; height: 156px; }
  .st-leader-constructor { padding: 16px; }
  .st-points, .st-gap-col { font-size: 13.5px; }
}

/* ═══════════════ TEAMS GRID ═══════════════
   All 11 constructors: top-right team glow, 44px neutral logo tile, championship
   position in Zen Dots, the 2026 car across the middle, and face chips for the
   two race drivers at the foot. */

.tm-grid {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 768px) { .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .tm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tm-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  padding: 20px;
  background:
    radial-gradient(90% 90% at 100% 0%, color-mix(in srgb, var(--team) 22%, transparent), transparent 60%),
    var(--card);
  transition: transform .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.tm-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tm-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-logo-box {
  width: 44px; height: 44px; flex: none; border-radius: 8px;
  background: rgba(206, 206, 217, .07); display: grid; place-items: center;
}
.tm-logo { width: 28px; height: 28px; object-fit: contain; }
.tm-name {
  font-size: 18px; line-height: 24px; font-weight: 700; color: var(--white);
  letter-spacing: -.01em;
}
.tm-meta { font-size: 12px; line-height: 16px; color: var(--fg-3); margin-top: 2px; }
.tm-pos {
  font-family: var(--font-number); font-weight: 400;
  font-size: 30px; line-height: 1; color: rgba(255, 255, 255, .15);
  flex: none; user-select: none;
}
.tm-car {
  margin-block: 20px; width: 100%; height: auto;
  transition: transform .5s var(--ease);
}
.tm-card:hover .tm-car { transform: translateX(4px); }
.tm-drivers { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.tm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px 0 0; border-radius: 6px;
  background: rgba(206, 206, 217, .07); color: var(--fg-2);
  font-size: 12px; font-weight: 500; line-height: 16px; white-space: nowrap;
}
.tm-chip-face {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  object-fit: cover; object-position: top center; background: var(--card-3);
}

/* ═══════════════ CONSTRUCTOR PROFILE ═══════════════ */

.tp-hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #111218, var(--page));
}
.tp-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 90% at 70% 30%, color-mix(in srgb, var(--team) 22%, transparent), transparent 65%);
}
.tp-hero-inner { padding-block: 28px 36px; }
@media (min-width: 640px) { .tp-hero-inner { padding-block: 34px 40px; } }
.tp-head { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.tp-logo-box {
  width: 64px; height: 64px; flex: none; border-radius: 10px;
  background: rgba(206, 206, 217, .07); display: grid; place-items: center;
}
.tp-logo-box img { width: 40px; height: 40px; object-fit: contain; }
.tp-entry { font-size: 12px; font-weight: 650; letter-spacing: .02em; color: var(--fg-3); }
.tp-title {
  margin-top: 2px; font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.05;
  font-weight: 650; letter-spacing: -.02em; color: var(--white);
}
.tp-car {
  display: block; width: 100%; max-width: 896px; height: auto;
  margin: 30px auto 0;
}
.tp-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin-top: 30px;
}
@media (min-width: 640px) { .tp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1024px) { .tp-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.tp-drivers-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
}
@media (min-width: 560px) { .tp-drivers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tp-finishes { color: var(--fg-2); font-variant-numeric: tabular-nums; }
.tp-finishes.is-win { color: var(--white); font-weight: 600; }

.tp-mini-card { padding: 16px 14px 8px; overflow: hidden; }
.tp-mini-card .dp-side-title {
  padding-inline: 6px; margin-bottom: 10px;
  font-size: 14px; font-weight: 700; color: var(--white);
  text-transform: none; letter-spacing: 0;
}
.tp-mini-tbl { font-size: 13.5px; }
.tp-mini-tbl th {
  padding: 6px 8px 8px; font-size: 11.5px; font-weight: 650;
  letter-spacing: 0; text-transform: none; color: var(--fg-3);
}
.tp-mini-tbl td { padding: 8px; }
.tp-mini-tbl tr.is-current td { background: rgba(255, 255, 255, .04); }
.tp-mini-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tp-mini-name {
  font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.tp-mini-who:hover .tp-mini-name { text-decoration: underline; text-underline-offset: 2px; }

/* ═══════════════ LIVE TIMING ═══════════════ */

.lt-hero-row {
  display: flex; flex-direction: column; gap: 16px;
}
@media (min-width: 1024px) {
  .lt-hero-row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
}
.lt-hero-copy { min-width: 0; }
.lt-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.lt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-4); flex: none; }
.lt-dot.is-live { background: var(--accent); box-shadow: 0 0 0 3px rgba(225,6,0,.22); }
.lt-dot.is-idle { background: #4bce97; }
.lt-dot.is-connecting, .lt-dot.is-error { background: #facc15; }
.lt-sub { margin-top: 6px; max-width: none; font-size: 14.5px; color: var(--fg-3); }

.lt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: none; }
.lt-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 650; line-height: 1;
  transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.lt-btn-primary { background: var(--accent); color: var(--white); border: 1px solid var(--accent); }
.lt-btn-primary:hover { background: #ff1e17; border-color: #ff1e17; }
.lt-btn-glass {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: var(--white);
}
.lt-btn-glass:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); }
.lt-btn.lt-btn-icon {
  width: 40px; padding: 0; justify-content: center; flex: none;
}
.lt-btn.lt-btn-icon:hover {
  color: var(--white);
  background: rgba(88,101,242,.22);
  border-color: rgba(88,101,242,.5);
}

.lt-bar {
  margin-top: 20px; display: grid; gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) { .lt-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lt-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.lt-track {
  display: flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 650;
}
.lt-track.flag-idle { background: var(--card); color: var(--fg-2); border: 1px solid var(--line); box-shadow: var(--shadow-raised); }
.lt-track.flag-green { background: rgba(75,206,151,.14); color: #7ee2b8; border: 1px solid rgba(75,206,151,.3); }
.lt-track.flag-yellow { background: rgba(251,200,40,.15); color: #fcd34d; border: 1px solid rgba(251,200,40,.32); }
.lt-track.flag-sc { background: #fbc828; color: #191a1d; }
.lt-track.flag-red { background: var(--accent); color: var(--white); }

.lt-clock-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 46px; padding: 10px 16px; border-radius: var(--radius-sm);
}
.lt-clock-label { font-size: 12px; font-weight: 650; color: var(--fg-3); }
.lt-clock { font-family: var(--font-number); font-size: 17px; color: var(--white); line-height: 1; }

.lt-weather-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  min-height: 46px; padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--fg-2);
}
@media (min-width: 1024px) { .lt-weather-card { grid-column: span 2; } }
.lt-w-item { display: inline-flex; align-items: center; gap: 6px; }
.lt-w-item svg { color: var(--fg-3); flex: none; }
.lt-w-item b { color: var(--white); font-weight: 650; }
.lt-rain-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: rgba(56,189,248,.16); color: #7dd3fc; font-size: 11.5px; font-weight: 700;
}
.lt-muted { font-size: 13px; color: var(--fg-3); }

.lt-sessions-bar { margin-top: 16px; }

.lt-grid {
  margin-top: 20px; display: grid; gap: 24px;
  grid-template-columns: minmax(0, 1fr); align-items: start;
}
@media (min-width: 1200px) {
  .lt-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}

.lt-tower-card { min-width: 0; overflow: hidden; }
.lt-tower-scroll {
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent;
}
.lt-tower-scroll::-webkit-scrollbar { height: 6px; }
.lt-tower-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }

.lt-skeletons { display: grid; gap: 8px; padding: 16px; }
.lt-skel { height: 36px; border-radius: 8px; background: rgba(255,255,255,.04); }
.lt-empty { margin: 0; padding: 36px 20px; text-align: center; font-size: 14px; color: var(--fg-3); }

.lt-tower-head {
  position: sticky; top: 0; z-index: 4;
  display: grid; align-items: center; height: 40px; padding: 0 8px;
  background: var(--card); border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3);
}
.lt-cell-head { text-align: right; padding-right: 12px; }
.lt-tower-rows { position: relative; }
.lt-tower-row {
  position: absolute; left: 0; right: 0; height: 44px; padding: 0 8px;
  display: grid; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.045);
  font-size: 13.5px;
  transition: transform .55s var(--ease), background-color .28s var(--ease), opacity .2s var(--ease);
}
.lt-tower-row:hover, .lt-tower-row:hover .lt-pin { background-color: var(--card-2); }
.lt-tower-row.is-out { opacity: .48; }
.lt-tower-row.flash-up, .lt-tower-row.flash-up .lt-pin { background-color: rgba(75,206,151,.14); }
.lt-tower-row.flash-down, .lt-tower-row.flash-down .lt-pin { background-color: rgba(248,113,104,.14); }

.lt-pin {
  position: sticky; left: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; align-self: stretch;
  background: var(--card);
  transition: background-color .28s var(--ease), box-shadow .2s var(--ease);
}
.lt-pin-2 { justify-content: flex-start; left: 40px; padding-left: 8px; gap: 9px; min-width: 0; }
.lt-tower-scroll.is-scrolled .lt-pin-2 { box-shadow: 8px 0 12px -6px rgba(0,0,0,.65); }

.lt-pos { font-weight: 700; color: var(--fg-2); font-size: 13px; }
.lt-drv { color: inherit; }
.lt-drv:hover .lt-tla { text-decoration: underline; text-underline-offset: 2px; }
.lt-tbar { width: 3px; height: 22px; border-radius: 999px; flex: none; }
.lt-tla { width: 36px; flex: none; font-weight: 700; color: var(--white); letter-spacing: .01em; }
.lt-lname {
  font-size: 12px; color: var(--fg-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lt-cell {
  text-align: right; padding-right: 12px;
  color: var(--fg-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.lt-cell.t-fastest { color: #c084fc !important; font-weight: 650; }
.lt-cell.t-pb { color: #4bce97 !important; font-weight: 600; }
.lt-tail { color: var(--fg-3); }

.lt-tyre-cell { display: flex; align-items: center; justify-content: flex-end; }
.lt-tyre-wrap { display: inline-flex; align-items: center; gap: 6px; }
.lt-tyre {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #101114; border: 2.5px solid currentColor;
  font-size: 10px; font-weight: 800; line-height: 1; color: #bbb;
}
.lt-tyre-S { color: #ff4b3e; }
.lt-tyre-M { color: #facc15; }
.lt-tyre-H { color: #f5f5f5; }
.lt-tyre-I { color: #22c55e; }
.lt-tyre-W { color: #3b82f6; }
.lt-tyre-age { min-width: 14px; font-size: 11.5px; color: var(--fg-3); text-align: right; }

.lt-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.lt-panel { padding: 18px; }
.lt-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lt-panel-title { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--white); }
.lt-count { font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }

.lt-rc-list, .lt-radio-list {
  list-style: none; margin: 12px 0 0; padding: 0 4px 0 0;
  display: grid; gap: 8px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.lt-rc-list { max-height: 420px; }
.lt-radio-list { max-height: 340px; }

.lt-rc-item {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
}
.lt-rc-meta { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.lt-rc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--fg-4); }
.lt-rc-dot.is-red { background: #ef4444; }
.lt-rc-dot.is-amber { background: #fbbf24; }
.lt-rc-dot.is-green { background: #10b981; }
.lt-rc-dot.is-blue { background: #38bdf8; }
.lt-rc-dot.is-white { background: #ffffff; }
.lt-rc-msg { margin: 5px 0 0; font-size: 13px; line-height: 1.4; color: var(--fg); }

.lt-radio-row {
  --p: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 8px; border-radius: 10px;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.lt-radio-row.is-active {
  background: color-mix(in srgb, var(--team) 15%, var(--card));
  border-color: color-mix(in srgb, var(--team) 45%, var(--line));
}
.lt-radio-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; flex: none;
  background: rgba(255,255,255,.1); color: var(--white);
  transition: background-color .16s var(--ease), transform .16s var(--ease);
}
.lt-radio-btn:hover { background: var(--accent); transform: scale(1.05); }
.lt-radio-row.is-playing .lt-radio-btn { background: var(--accent); }
.lt-ico-play, .lt-ico-pause { display: grid; place-items: center; }
.lt-ico-pause, .lt-radio-row.is-playing .lt-ico-play { display: none; }
.lt-radio-row.is-playing .lt-ico-pause { display: grid; }

.lt-radio-face {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  object-fit: cover; object-position: top;
  background: linear-gradient(180deg, #2a2d36, #15161b);
  box-shadow: 0 0 0 2px var(--team);
}
.lt-radio-face-text {
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: var(--white);
}
.lt-radio-body { flex: 1; min-width: 0; display: block; }
.lt-radio-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lt-radio-who {
  font-size: 13px; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lt-radio-who span { color: var(--fg-3); font-weight: 400; }
.lt-radio-when { font-size: 11px; color: var(--fg-3); flex: none; font-variant-numeric: tabular-nums; }
.lt-radio-track {
  position: relative; display: block; height: 4px; margin-top: 7px;
  border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; cursor: pointer;
}
.lt-radio-fill {
  position: absolute; inset: 0; width: 100%; border-radius: inherit;
  background: var(--team); transform-origin: left center;
  transform: scaleX(var(--p));
  transition: transform .2s linear;
}
.lt-radio-row:not(.is-active) .lt-radio-fill { transform: scaleX(0); }
.lt-radio-time { display: block; min-height: 13px; margin-top: 3px; font-size: 10.5px; color: var(--fg-3); line-height: 1.2; }

.lt-info-grid {
  margin-top: 56px; padding-bottom: 16px;
  display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1024px) {
  .lt-info-grid { grid-template-columns: 1.2fr 1fr; gap: 48px; }
}
.lt-prose h2, .lt-faq h2 {
  margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 600; letter-spacing: -.01em; color: var(--white);
}
.lt-prose h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 650; color: var(--white); }
.lt-prose p { margin: 12px 0 0; font-size: 14px; line-height: 1.65; color: var(--fg-2); }
.lt-prose ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.6; color: var(--fg-2); }

.lt-faq-list { margin-top: 14px; border-top: 1px solid var(--line); }
.lt-faq-item { border-bottom: 1px solid var(--line); }
.lt-faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0; font-size: 15.5px; font-weight: 600; color: var(--white);
}
.lt-faq-item summary::-webkit-details-marker { display: none; }
.lt-chev { color: var(--fg-3); flex: none; transition: transform .22s var(--ease); }
.lt-faq-item[open] .lt-chev { transform: rotate(180deg); }
.lt-faq-a { padding: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--fg-2); max-width: 68ch; }

/* Next-session timing card: compact status, local time, four timing tiles, full-width action. */
.hero-card { padding: 20px; border-radius: 16px; background: var(--card); }
.hero-card .hero-card-head { padding: 0; min-height: 24px; border: 0; }
.hero-card .next-label { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px; background: #1c2b42; color: #85b8ff; font-size: 11px; line-height: 16px; font-weight: 700; text-transform: uppercase; }
.hero-card .next-round { color: #96999e; font-size: 12px; line-height: 16px; }
.hero-card .next-round.is-live { color: #ff9d97; }
.hero-card .hero-card-body { padding: 16px 0 0; }
.hero-card .next-name { font: 600 20px/24px var(--font-body); letter-spacing: -.015em; }
.hero-card .next-session { margin-top: 5px; font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0; color: #ced0d4; }
.hero-card .next-local { margin: 2px 0 0; color: #96999e; font-size: 13px; line-height: 20px; }
.hero-card .countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.hero-card .countdown .unit { min-width: 0; padding: 10px 2px 8px; border-radius: 10px; background: #0a0b0d; box-shadow: inset 0 0 0 1px #e3e4f212; }
.hero-card .countdown .unit .n { display: flex; justify-content: center; align-items: center; overflow: hidden; font-family: var(--font-number); font-size: clamp(20px, 2.3vw, 28px); font-weight: 400; letter-spacing: -.04em; line-height: 36px; color: #fff; }
.hero-card .count-digit { display: inline-block; }
.hero-card .countdown .unit .l { margin-top: 0; color: #96999e; font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0; text-transform: lowercase; }
.hero-card .hero-card-foot { padding: 20px 0 0; border: 0; display: block; }
.hero-card .hero-watch { width: 100%; min-height: 36px; justify-content: center; padding: 0 14px; border: 0; border-radius: 999px; color: #ced0d4; background: #ceced912; font-size: 14px; }
.hero-card .hero-watch svg { width: 16px; height: 16px; }
.hero-card .hero-watch:hover { color: #fff; background: #ffffff1c; }
.hero-card .hero-watch:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 380px) { .hero-card { padding: 16px; } .hero-card .countdown { gap: 5px; } .hero-card .countdown .unit .n { font-size: 20px; } }

/* Weekend schedule: a vertically stacked local-time timeline. */
.hero-week { padding: 20px; border: 0; border-radius: 16px; background: #18191d; box-shadow: none; }
.hero-week-head { align-items: center; min-height: 24px; padding: 0; }
.hero-week-head .week-label { display: inline-flex; align-items: center; min-height: 20px; padding: 0 6px; border-radius: 6px; background: #e3e4f21f; color: #cecfd2; font-size: 11px; line-height: 16px; font-weight: 700; text-transform: uppercase; }
.hero-week-head #heroWeekNote { color: #96999e; font-size: 12px; line-height: 16px; }
.session-strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.session-row { min-width: 0; min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 6px; border-radius: 12px; }
.session-row.next { background: #1c2b42; }
.session-row.live { background: #3d1b1a; }
.session-row.done { opacity: .55; }
.session-day { flex: none; display: grid; place-content: center; width: 38px; height: 38px; border-radius: 10px; background: #e3e4f20d; color: #cecfd2; text-align: center; line-height: 1; }
.session-day span { font-size: 10px; line-height: 10px; font-weight: 650; text-transform: uppercase; }
.session-day b { margin-top: 2px; font-size: 15px; line-height: 15px; font-weight: 700; }
.session-row.next .session-day { background: #85b8ff24; color: #669df1; }
.session-row.live .session-day { background: #f8716824; color: #ff9d97; }
.session-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.session-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 14px; line-height: 20px; font-weight: 650; }
.session-time { color: #96999e; font-size: 12px; line-height: 16px; }
.session-relative { flex: none; color: #85b8ff; font-size: 12px; line-height: 16px; font-weight: 650; white-space: nowrap; }
.session-row.live .session-relative { color: #ff9d97; }
@media (max-width: 380px) { .hero-week { padding: 16px; } .session-row { gap: 8px; padding-right: 6px; } }

/* Live Timing's session selector: JellyRadio-style chips, without affecting
   the tabs used by standings and the rest of the site. */
.lt-sessions-bar { overflow-x: auto; scrollbar-width: thin; overscroll-behavior-inline: contain; }
#ltSessionTabs.tabs { --jr-pad-x: 18px; display: flex; width: max-content; min-width: 100%; overflow: visible; align-items: center; gap: 8px; padding: 8px var(--jr-pad-x); box-sizing: border-box; }
#ltSessionTabs .tab { position: relative; display: inline-flex; flex: 0 0 auto; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 18px; background: transparent; color: inherit; transform-origin: center; touch-action: manipulation; cursor: pointer; }
#ltSessionTabs .jr-skin { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 18px; background: #27272a; color: #f5f5f5; font: 500 13px/1 'Inter', system-ui, sans-serif; white-space: nowrap; transition: background-color .2s ease, color .2s ease, transform .16s ease; }
#ltSessionTabs .tab.active .jr-skin { background: #f5f5f5; color: #18181b; }
#ltSessionTabs .tab:not(.active):hover .jr-skin { background: #3c3c40; }
#ltSessionTabs .tab:active .jr-skin { transform: scale(.97); }
#ltSessionTabs .tab:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { #ltSessionTabs .jr-skin { transition: none; } #ltSessionTabs .tab:active .jr-skin { transform: none; } }

/* Preserve navigation cards; gently lift and glow on hover. */
.explore-cards .team-card {
  transition: transform .55s cubic-bezier(.22,1,.36,1), box-shadow .55s ease, background-color .55s var(--ease);
}
.explore-cards .team-card::before { transition: filter .55s ease; }
.explore-cards .team-card .t-ico { transition: color .55s ease, background-color .55s ease, border-color .55s ease; }
@media (hover: hover) {
  .explore-cards .team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--tc) 24%, transparent), var(--shadow-raised);
  }
  .explore-cards .team-card:hover::before { filter: brightness(1.35); }
}
@media (prefers-reduced-motion: reduce) {
  .explore-cards .team-card, .explore-cards .team-card::before, .explore-cards .team-card .t-ico { transition: none; }
  .explore-cards .team-card:hover { transform: none; }
}

/* The selected championship leader or row responds before the profile opens. */
@media (prefers-reduced-motion: no-preference) {
  .st-leader.is-opening-profile, .st-who.is-opening-profile {
    animation: profileOpen .36s cubic-bezier(.22,1,.36,1) both;
    position: relative;
    z-index: 1;
  }
  .st-leader.is-opening-profile { box-shadow: 0 10px 36px color-mix(in srgb, var(--team, #aaa) 28%, transparent); }
}
@keyframes profileOpen {
  0% { transform: scale(1); opacity: 1; }
  45% { transform: scale(.98); opacity: 1; }
  100% { transform: scale(1.025); opacity: .78; }
}

/* Driver profile: a more legible, compact race-dashboard treatment. */
.dp-hero { background: linear-gradient(145deg, #15161c, #0d0e12 78%); }
.dp-glow { background: radial-gradient(55% 90% at 82% 38%, color-mix(in srgb, var(--team) 25%, transparent), transparent 70%); }
.dp-eyebrow, .dp-kicker { font-size: 10px; font-weight: 750; letter-spacing: .14em; color: var(--fg-3); text-transform: uppercase; }
.dp-eyebrow { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.dp-eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--team); box-shadow: 0 0 12px var(--team); }
.dp-tags { margin-top: 10px; }
.dp-name { margin-top: 14px; }
.dp-last { font-weight: 800; letter-spacing: -.045em; }
.dp-number { font-size: clamp(2rem, 5vw, 3rem); margin-top: 10px; }
.dp-stats { gap: 8px; margin-top: 24px; }
.dp-stat { position: relative; min-width: 0; padding: 14px; border-radius: 12px; background: color-mix(in srgb, #1b1d22 88%, transparent); border-color: rgba(255,255,255,.08); }
.dp-icon { display: block; width: 16px; height: 16px; flex: none; }
.dp-stat-label { display: flex; align-items: center; gap: 7px; min-height: 18px; }
.dp-stat-label .dp-icon { color: var(--team); }
.dp-stat-value { margin-top: 9px; }
.dp-body { gap: 18px; }
.dp-main { gap: 20px; }
.dp-panel, .dp-side-card, .dp-table-card { border: 1px solid var(--line); background: linear-gradient(145deg, #191a1f, #141519); border-radius: 16px; }
.dp-panel { padding: 22px; }
.dp-kicker { margin-bottom: 7px; color: #e8706a; }
.dp-facts { gap: 8px; }
.dp-facts > div { border: 1px solid rgba(255,255,255,.045); background: rgba(255,255,255,.035); min-width: 0; }
.dp-facts dd { overflow-wrap: anywhere; }
.dp-side { gap: 10px; }
.dp-side-card { padding: 18px; }
.dp-side-title { display: flex; align-items: center; gap: 9px; }
.dp-side-title .dp-icon { color: #ee7772; }
.dp-link-label { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.dp-link-label .dp-icon { color: var(--fg-3); }
.dp-side-link { border-radius: 11px; }
@media (min-width: 640px) { .dp-panel { padding: 26px; } }
@media (max-width: 400px) { .dp-stat { padding: 12px; } .dp-stat-label { font-size: 11px; gap: 5px; } }

/* Keep result headings and their values aligned, including the flag/name pair. */
.dp-table th, .dp-table td, .dp-table .t-num { text-align: center; }
.dp-table thead th:first-child, .dp-table tbody td:first-child { padding-left: 12px; padding-right: 12px; }
.dp-gp { justify-content: center; }
@media (max-width: 560px) {
  .dp-table thead th:first-child, .dp-table tbody td:first-child { padding-left: 8px; padding-right: 8px; }
}
/* Reserve a fixed flag gutter in every race cell, with a matching gutter on
   the other side so race names stay centered under the heading. */
.dp-gp { display: grid; grid-template-columns: 20px minmax(0, 1fr) 20px; width: 100%; gap: 6px; }
.dp-gp .flag { grid-column: 1; }
.dp-gp > span { grid-column: 2; text-align: center; }
/* Inter's line box sits visually high beside the outline icons. */
.dp-stat-label > span { transform: translateY(1.5px); }

/* Profile layout follows the race dossier: team context and standings alongside
   the season, with the head-to-head comparison beneath the results. */
.dp-team-card { display: grid; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: radial-gradient(100% 120% at 90% 0, color-mix(in srgb, var(--team) 23%, transparent), transparent 65%), #17181d; transition: border-color .2s var(--ease), transform .2s var(--ease); }
.dp-team-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.dp-team-kicker { color: var(--fg-3); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.dp-team-card strong { margin-top: 5px; font-size: 18px; color: var(--white); }
.dp-team-card img { display: block; width: 100%; height: 90px; object-fit: contain; margin: 4px 0; }
.dp-team-card img[hidden] { display: none; }
.dp-team-more, .dp-standings-more { color: var(--fg-3); font-size: 12px; }
.dp-team-more span, .dp-standings-more span { float: right; }
.dp-standings-card { padding: 18px 12px 12px; }
.dp-standings-card .dp-side-title { padding: 0 6px 10px; }
.dp-standing-row { display: grid; grid-template-columns: 18px 3px minmax(0,1fr) auto; align-items: center; gap: 9px; min-width: 0; padding: 9px 6px; border-top: 1px solid rgba(255,255,255,.05); border-radius: 5px; }
.dp-standing-row:hover, .dp-standing-row.is-current { background: rgba(255,255,255,.06); }
.dp-standing-row strong, .dp-standing-name b { font-size: 12px; color: var(--white); }
.dp-standing-pos, .dp-standing-name small { color: var(--fg-3); font-size: 11px; }
.dp-standing-bar { width: 3px; height: 25px; border-radius: 2px; }
.dp-standing-name { display: grid; min-width: 0; gap: 2px; }
.dp-standing-name b, .dp-standing-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-standings-more { display: block; margin: 10px 6px 2px; }
.dp-main #dpTeammateCard { padding: 22px; }
.dp-main .dp-battle-side { background: rgba(255,255,255,.045); border-radius: 10px; text-align: center; padding: 14px 10px; }
.dp-main .dp-battle-side:hover:is(a) { background: rgba(255,255,255,.08); }
@media (min-width: 1080px) { .dp-side { position: static; } }

/* Driver dossier: restrained, spacious cards and the reference's hierarchy. */
body[data-page="driver"] .dp-hero { border: 0; background: var(--page); }
body[data-page="driver"] .dp-glow { background: radial-gradient(52% 75% at 82% 51%, color-mix(in srgb, var(--team) 23%, transparent), transparent 72%); }
body[data-page="driver"] .dp-hero-grid { padding-top: 48px; }
body[data-page="driver"] .dp-tags { margin-top: 22px; }
body[data-page="driver"] .dp-first { font-size: clamp(1.7rem, 3vw, 2.25rem); }
body[data-page="driver"] .dp-last { font-size: clamp(2.9rem, 6vw, 4.5rem); font-weight: 700; letter-spacing: -.035em; }
body[data-page="driver"] .dp-number { font-size: clamp(3rem, 5vw, 3.75rem); margin-top: 18px; }
body[data-page="driver"] .dp-stats { max-width: none; gap: 10px; margin-top: 30px; }
body[data-page="driver"] .dp-stat { min-height: 122px; padding: 20px; border-radius: 20px; background: var(--card); border: 0; box-shadow: none; }
body[data-page="driver"] .dp-stat-label { font-size: 12px; }
body[data-page="driver"] .dp-stat-label > span { transform: none; }
body[data-page="driver"] .dp-stat-value { margin-top: 9px; font-size: 28px; }
body[data-page="driver"] .dp-stat-note { margin-top: 7px; font-size: 12px; }
body[data-page="driver"] .dp-portrait { height: 570px; max-width: 400px; }
body[data-page="driver"] .dp-body { padding-top: 24px; }
body[data-page="driver"] .dp-main { gap: 30px; }
body[data-page="driver"] .dp-panel, body[data-page="driver"] .dp-side-card, body[data-page="driver"] .dp-table-card { background: var(--card); border: 0; border-radius: 20px; box-shadow: none; }
body[data-page="driver"] .dp-panel { padding: 28px; }
body[data-page="driver"] .dp-panel-title { font-size: 20px; }
body[data-page="driver"] .dp-facts > div { background: var(--card-2); border: 0; border-radius: 8px; }
body[data-page="driver"] .dp-prose { font-size: 15px; }
body[data-page="driver"] .dp-section .section-title { font-size: 28px; }
body[data-page="driver"] .dp-section-note { display: none; }
body[data-page="driver"] .dp-side-title { font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--white); text-transform: none; }
body[data-page="driver"] .dp-standing-row { grid-template-columns: 30px 3px 32px minmax(0,1fr) auto; gap: 10px; }
body[data-page="driver"] .dp-standing-photo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: top; background: #303136; }
body[data-page="driver"] .dp-standing-row.is-current { background: transparent; }
body[data-page="driver"] .dp-team-card { border-radius: 20px; }
body[data-page="driver"] .dp-battle-side { border-radius: 5px; }
body[data-page="driver"] .dp-battle-note { display: none; }
/* Explicit centred alignment and flag gutters remain as requested. */
@media (max-width: 639px) {
  body[data-page="driver"] .dp-hero-grid { padding-top: 28px; }
  body[data-page="driver"] .dp-stat { min-height: 108px; padding: 16px; }
  body[data-page="driver"] .dp-portrait { height: 380px; }
  body[data-page="driver"] .dp-panel { padding: 20px; }
}

/* Results table follows the reference: sentence-case headings, a left-aligned
   race column with fixed flag positions, and right-aligned numeric results. */
body[data-page="driver"] .dp-table-card { padding: 4px; }
body[data-page="driver"] .dp-table { font-size: 14px; }
body[data-page="driver"] .dp-table th { padding: 8px 12px; text-align: left; font-size: 12px; font-weight: 650; text-transform: none; letter-spacing: 0; color: #96999e; border-bottom: 2px solid rgba(227,228,242,.12); }
body[data-page="driver"] .dp-table td { padding: 8px 12px; height: 48px; text-align: left; border-bottom: 1px solid rgba(227,228,242,.07); }
body[data-page="driver"] .dp-table tbody tr:last-child td { border-bottom: 0; }
body[data-page="driver"] .dp-table .t-num { text-align: right; }
body[data-page="driver"] .dp-rnd { width: auto; }
body[data-page="driver"] .dp-gp { display: flex; width: 100%; justify-content: flex-start; gap: 8px; text-align: left; font-size: 14px; }
body[data-page="driver"] .dp-gp > span { text-align: left; }
body[data-page="driver"] .dp-gp .flag { width: 20px; height: 14px; }
@media (max-width: 639px) { body[data-page="driver"] .dp-sprint-col { display: none; } }

/* Reference-style compact standings table alongside the profile. */
body[data-page="driver"] .dp-standings-card { padding: 0; overflow: hidden; }
body[data-page="driver"] .dp-standings-card .dp-side-title { padding: 20px 16px 5px; }
.dp-standings-wrap { padding: 4px; }
.dp-standings-table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 14px; }
.dp-standings-table th { padding: 8px 12px; border-bottom: 2px solid rgba(227,228,242,.12); font-size: 12px; font-weight: 650; color: #96999e; text-align: left; }
.dp-standings-table td { padding: 8px 12px; height: 53px; border-bottom: 1px solid rgba(227,228,242,.07); vertical-align: middle; }
.dp-standings-table tr:last-child td { border-bottom: 0; }
.dp-standings-table th:last-child, .dp-standings-table td:last-child { text-align: right; }
body[data-page="driver"] .dp-standing-row { display: table-row; }
.dp-standing-pos { width: 40px; font-weight: 650; color: var(--fg-2); }
.dp-standing-points { color: var(--white); font-weight: 650; font-variant-numeric: tabular-nums; }
.dp-standing-driver { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dp-standing-driver:hover .dp-standing-name b { text-decoration: underline; text-underline-offset: 2px; }
.dp-standing-name { flex: 1; }
.dp-standing-name b { font-size: 14px; font-weight: 600; }
.dp-standing-name small { font-size: 12px; }

/* Icons and labels share a centered line box; the tiny optical adjustment
   accounts for the typeface's cap-height within that line box. */
body[data-page="driver"] .dp-label-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; color: var(--fg-3); }
body[data-page="driver"] .dp-stat-label, body[data-page="driver"] .dp-fact-label, body[data-page="driver"] .dp-heading-icon { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
body[data-page="driver"] .dp-stat-label > span, body[data-page="driver"] .dp-fact-label > span, body[data-page="driver"] .dp-heading-icon > span { transform: translateY(1px); min-width: 0; }
body[data-page="driver"] .dp-stat-label .dp-label-icon { color: var(--team); }
body[data-page="driver"] .dp-heading-icon .dp-label-icon { width: 19px; height: 19px; flex-basis: 19px; }
body[data-page="driver"] .dp-fact-label .dp-label-icon { width: 14px; height: 14px; flex-basis: 14px; }
@media (max-width: 400px) { body[data-page="driver"] .dp-stat-label, body[data-page="driver"] .dp-fact-label { gap: 6px; } }

/* A race win keeps the same numeric colour as other finishes. */
.dp-win-trophy { display: inline-block; width: 15px; height: 15px; margin-right: 6px; color: #f5c84c; vertical-align: -3px; }

/* Team profiles use the same restrained race-dossier treatment as drivers. */
body[data-page="team"] .tp-hero { border: 0; background: var(--page); }
body[data-page="team"] .tp-hero-inner { padding-top: 48px; }
body[data-page="team"] .tp-stats { gap: 10px; }
body[data-page="team"] .tp-stats .dp-stat { min-height: 96px; padding: 20px; border: 0; border-radius: 20px; box-shadow: none; background: var(--card); }
body[data-page="team"] .tp-stats .dp-stat-label { font-size: 12px; }
body[data-page="team"] .tp-stats .dp-stat-value { margin-top: 9px; font-size: 28px; }
body[data-page="team"] .dp-body { padding-top: 24px; }
body[data-page="team"] .dp-main { gap: 30px; }
body[data-page="team"] .dp-panel, body[data-page="team"] .dp-table-card, body[data-page="team"] .tp-mini-card { border: 0; border-radius: 20px; box-shadow: none; background: var(--card); }
body[data-page="team"] .dp-panel { padding: 28px; }
body[data-page="team"] .dp-facts > div { background: var(--card-2); border: 0; border-radius: 8px; }
body[data-page="team"] .dp-prose { font-size: 15px; }
body[data-page="team"] .dp-section .section-title { font-size: 28px; }
body[data-page="team"] .dp-table-card { padding: 4px; }
body[data-page="team"] .dp-table { font-size: 14px; }
body[data-page="team"] .dp-table th { padding: 8px 12px; text-align: left; font-size: 12px; font-weight: 650; text-transform: none; letter-spacing: 0; color: #96999e; border-bottom: 2px solid rgba(227,228,242,.12); }
body[data-page="team"] .dp-table td { padding: 8px 12px; height: 48px; text-align: left; border-bottom: 1px solid rgba(227,228,242,.07); }
body[data-page="team"] .dp-table tbody tr:last-child td { border-bottom: 0; }
body[data-page="team"] .dp-table .t-num { text-align: right; }
body[data-page="team"] .dp-rnd { width: auto; }
body[data-page="team"] .dp-gp { display: flex; width: 100%; justify-content: flex-start; gap: 8px; text-align: left; font-size: 14px; }
body[data-page="team"] .dp-gp > span { text-align: left; }
body[data-page="team"] .dp-gp .flag { width: 20px; height: 14px; }
body[data-page="team"] .tp-mini-card { padding: 16px 4px 4px; }
body[data-page="team"] .tp-mini-card .dp-side-title { padding: 4px 12px 0; margin-bottom: 8px; }
body[data-page="team"] .tp-mini-tbl { font-size: 14px; }
body[data-page="team"] .tp-mini-tbl th { padding: 8px 12px; font-size: 12px; border-bottom: 2px solid rgba(227,228,242,.12); }
body[data-page="team"] .tp-mini-tbl td { padding: 8px 12px; height: 53px; border-bottom: 1px solid rgba(227,228,242,.07); }
body[data-page="team"] .tp-mini-tbl tr:last-child td { border-bottom: 0; }
body[data-page="team"] .tp-mini-tbl tr.is-current td { background: transparent; }
body[data-page="team"] .tp-mini-who { gap: 12px; }
@media (min-width: 1080px) { body[data-page="team"] .dp-side { position: static; } }
@media (max-width: 639px) {
  body[data-page="team"] .tp-hero-inner { padding-top: 28px; }
  body[data-page="team"] .tp-stats .dp-stat { min-height: 90px; padding: 16px; }
  body[data-page="team"] .dp-panel { padding: 20px; }
}

/* Individual Grand Prix weekends. */
.sc-quick-toggle { display: block; margin: 0 16px 12px auto; padding: 5px 9px; border-radius: 8px; color: var(--fg-2); font-size: 12px; font-weight: 600; }
.sc-quick-toggle:hover { color: var(--white); background: rgba(255,255,255,.06); }
.gp-page { padding-top: 35px; padding-bottom: 70px; }
.gp-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 20px; margin: 20px 0 30px; padding: clamp(28px,5vw,60px); background: radial-gradient(75% 130% at 100% 20%, #401316, transparent 68%), linear-gradient(130deg,#16171c,#0e0f12); border: 1px solid var(--line); }
.gp-hero-content { max-width: 850px; }
.gp-eyebrow { color: #ff918a; font-size: 11px; font-weight: 750; letter-spacing: .13em; }
.gp-hero h1 { display: flex; align-items: center; gap: 16px; margin-top: 14px; font-size: clamp(2rem,5vw,3.7rem); line-height: 1.08; letter-spacing: -.035em; color: var(--white); }
.gp-flag { width: 46px; height: 32px; object-fit: cover; border-radius: 5px; flex: none; outline: 1px solid #ffffff30; }
.gp-year { color: var(--fg-2); }
.gp-hero-content > p:not(.gp-eyebrow) { margin-top: 15px; font-size: 15px; color: var(--fg-2); }
.gp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.gp-action { display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--white); font-size: 13px; font-weight: 700; transition: background .2s, transform .2s; }
.gp-action:hover { background: #ffffff18; transform: translateY(-2px); }
.gp-action-primary { background: var(--accent); border-color: var(--accent); }
.gp-action-primary:hover { background: #f21911; }
.gp-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 22px; }
@media (min-width: 1000px) { .gp-layout { grid-template-columns: minmax(0,1fr) 320px; gap: 28px; align-items: start; } }
.gp-main { display: grid; gap: 30px; min-width: 0; }
.gp-panel { padding: 24px; border: 1px solid var(--line); }
.gp-panel h2 { color: var(--white); font-size: 20px; line-height: 1.2; }
.gp-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.gp-panel-head > span { color: var(--fg-3); font-size: 12px; }
.gp-sessions { list-style: none; margin-top: 16px; }
.gp-sessions li { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.gp-session-number { color: var(--fg-3); font-size: 12px; }
.gp-session-name { font-size: 14px; font-weight: 650; color: var(--white); }
.gp-sessions time { text-align: right; color: var(--fg-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.gp-section-heading { margin-bottom: 12px; }
.gp-section-heading > span { color: var(--fg-3); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.gp-section-heading h2 { color: var(--white); margin-top: 4px; font-size: 24px; }
.gp-result-card { padding: 18px; color: var(--fg-2); font-size: 14px; }
.gp-result-card:has(table) { padding: 4px; }
.gp-table { min-width: 520px; font-size: 14px; }
.gp-table th { padding: 8px 12px; font-size: 12px; text-transform: none; letter-spacing: 0; border-bottom: 2px solid var(--line-2); }
.gp-table td { padding: 8px 12px; height: 53px; }
.gp-table .gp-result-number { text-align: right; white-space: nowrap; }
.gp-result-driver { display: inline-flex; align-items: center; gap: 10px; min-width: 150px; }
.gp-result-driver img { width: 32px; height: 32px; object-fit: cover; object-position: top; border-radius: 50%; background: var(--card-2); }
.gp-result-driver span { display: grid; }
.gp-result-driver b { color: var(--white); font-size: 13px; }
.gp-result-driver small { color: var(--fg-3); font-size: 11px; }
.gp-result-driver:hover b { text-decoration: underline; }
.gp-side { display: grid; gap: 12px; }
.gp-circuit-image { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; margin: 15px 0; background: var(--card-2); }
.gp-side h3 { color: var(--white); font-size: 15px; }
.gp-side p { color: var(--fg-3); font-size: 13px; margin-top: 5px; }
.gp-return { border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; color: var(--fg-2); font-size: 13px; font-weight: 600; }
.gp-return:hover { color: var(--white); background: var(--card); }
@media (max-width: 520px) { .gp-page { padding-top: 22px; } .gp-hero { padding: 26px 20px; } .gp-hero h1 { gap: 10px; font-size: 2rem; } .gp-flag { width: 32px; height: 23px; } .gp-panel { padding: 18px; } .gp-sessions li { grid-template-columns: 22px minmax(0,1fr) auto; gap: 7px; } .gp-sessions time { font-size: 12px; } }
.gp-main { grid-template-columns: minmax(0,1fr); }
.gp-results, .gp-result-card { min-width: 0; }
.gp-weather .gp-weather-temp { color: var(--white); font-size: 30px; font-weight: 750; line-height: 1; margin-top: 16px; }
.gp-weather .gp-weather-source { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; }
.gp-scroll-hint { display: none; margin: 8px 10px 3px; color: var(--fg-3); font-size: 11px; }
@media (max-width: 600px) { .gp-scroll-hint { display: block; } }
/* Grand Prix: compact race overview and data cards */
.gp-page { padding-top: 38px; }
.gp-hero { overflow: visible; display: grid; grid-template-columns: minmax(0,1fr) minmax(270px, 30%); gap: 24px; align-items: center; margin: 24px 0 46px; padding: 0; border: 0; border-radius: 0; background: none; }
.gp-eyebrow { color: var(--fg-3); font-size: 12px; letter-spacing: 0; text-transform: none; }
.gp-status { display: inline-block; margin-left: 6px; padding: 3px 7px; border-radius: 6px; background: var(--card-2); color: var(--fg-2); font-weight: 500; }
.gp-hero h1 { margin-top: 18px; gap: 16px; font-size: clamp(28px,3vw,40px); line-height: 1.15; letter-spacing: -.025em; }
.gp-year { color: inherit; }.gp-title-muted { color: var(--fg-3); }
.gp-hero-content > p:not(.gp-eyebrow) { max-width: 680px; margin-top: 13px; line-height: 1.55; font-size: 16px; }
.gp-actions { margin-top: 24px; }.gp-action { min-height: 43px; border: 0; border-radius: 24px; padding: 0 18px; background: var(--card-2); color: var(--fg-2); gap: 8px; }.gp-action svg { width: 16px; height: 16px; }
.gp-winner { position: relative; display: flex; align-items: flex-end; min-height: 196px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(ellipse at 100% 100%,color-mix(in srgb,var(--team) 28%,transparent),transparent 70%); }
.gp-winner[hidden] { display: none; }.gp-winner img { align-self: flex-end; width: 40%; height: 185px; object-fit: contain; object-position: center bottom; }.gp-winner-copy { display: grid; gap: 4px; padding: 20px 12px 22px 0; color: var(--fg-2); font-size: 13px; }.gp-winner-copy strong { color: var(--white); font-size: 23px; line-height: 1.2; }.gp-winner-label { margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.gp-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, 26.5%); gap: 30px; align-items: start; }.gp-main { display: grid; gap: 36px; }.gp-side { display: grid; gap: 14px; }
.gp-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }.gp-panel, .gp-championship { padding: 22px; border: 0; border-radius: 20px; background: var(--card); }.gp-panel h2,.gp-championship h2 { font-size: 14px; color: var(--white); }.gp-panel-head > span { font-size: 12px; }.gp-sessions { margin-top: 14px; }.gp-sessions li { display: flex; justify-content: space-between; gap: 12px; min-height: 61px; padding: 10px 0; border-top: 1px solid var(--line); }.gp-sessions li:first-child { border-top: 0; }.gp-session-copy { display: grid; gap: 2px; }.gp-session-name { font-size: 14px; }.gp-sessions time { text-align: left; font-size: 12px; }.gp-session-status { color: var(--fg-3); font-size: 12px; white-space: nowrap; }
.gp-weather { position: relative; }.gp-weather #gpWeather > p { margin-top: 5px; color: var(--fg-2); font-size: 13px; }.gp-weather #gpWeather .gp-weather-temp { margin-top: 20px; font-size: 29px; color: var(--white); }.gp-weather-temp small { margin-left: 2px; font-size: 14px; color: var(--fg-3); }.gp-weather-controls { position: absolute; right: 20px; top: 58px; display: flex; padding: 3px; border-radius: 20px; background: var(--card-2); }.gp-weather-controls button { padding: 5px 9px; border: 0; border-radius: 20px; background: none; color: var(--fg-2); cursor: pointer; font-size: 12px; }.gp-weather-controls button[aria-pressed=true] { color: #85b9ff; background: #20324b; }.gp-weather-days { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 14px; }.gp-weather-days div { display: grid; gap: 5px; padding: 12px 5px; text-align: center; border-radius: 4px; background: #090a0c; font-size: 12px; color: var(--fg-2); }.gp-weather-days b { color: var(--white); }.gp-weather-days em { color: var(--fg-3); font-style: normal; font-weight: 400; }.gp-weather-days small { color: #85b9ff; }.gp-weather .gp-weather-source { border: 0; padding: 0; line-height: 1.5; }.gp-weather-observed { font-size: 11px!important; }
.gp-section-heading h2 { font-size: 21px; }.gp-section-heading > span { color: var(--fg-3); }.gp-result-card { border-radius: 18px; overflow: hidden; }.gp-championship { padding: 20px 16px; }.gp-championship .gp-standings-note { font-size: 11px; margin: 6px 0; }.gp-champ-table { width: 100%; font-size: 13px; }.gp-champ-table th,.gp-champ-table td { padding: 8px 5px; border-bottom: 1px solid var(--line); }.gp-champ-table th { text-align: left; font-size: 12px; color: var(--fg-3); }.gp-champ-table th:last-child,.gp-champ-table td:last-child { text-align: right; }.gp-champ-driver { display: flex; align-items: center; gap: 9px; }.gp-champ-driver .team-bar { width: 3px; height: 28px; background: var(--team); border-radius: 3px; }.gp-champ-driver img { width: 32px; height: 32px; border-radius: 50%; background: var(--card-2); object-fit: cover; object-position: top; }.gp-champ-driver span:last-child { display: grid; }.gp-champ-driver b { color: var(--white); }.gp-champ-driver small { color: var(--fg-3); }.gp-all-standings { display: block; padding-top: 14px; color: var(--fg-2); font-size: 12px; }
.gp-circuit-guide { overflow: hidden; border-radius: 20px; background: var(--card); }.gp-circuit-guide > img { display: block; width: 100%; max-height: 320px; object-fit: cover; }.gp-circuit-body { padding: 24px; }.gp-circuit-body h2 { color: var(--white); font-size: 22px; }.gp-circuit-body p { margin-top: 10px; color: var(--fg-2); font-size: 14px; line-height: 1.6; }.gp-circuit-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 20px; }.gp-circuit-facts div { padding: 14px; border-radius: 8px; background: var(--card-2); }.gp-circuit-facts dt { color: var(--fg-3); font-size: 11px; }.gp-circuit-facts dd { margin-top: 6px; color: var(--white); font-size: 13px; }.gp-round-nav { display: flex; gap: 12px; }.gp-round-nav a { display: grid; gap: 5px; flex: 1; padding: 18px; border-radius: 14px; background: var(--card); }.gp-round-nav a[hidden] { display: none; }.gp-round-nav small { color: var(--fg-3); }.gp-round-nav b { font-size: 14px; }
@media (max-width: 800px) { .gp-layout { grid-template-columns: minmax(0,1fr); }.gp-side { grid-row: auto; }.gp-hero { grid-template-columns: minmax(0,1fr); }.gp-winner { max-width: 440px; }.gp-overview { grid-template-columns: minmax(0,1fr); }.gp-main { gap: 28px; } }
@media (max-width: 520px) { .gp-hero { padding: 0; margin-bottom: 28px; }.gp-hero h1 { font-size: 29px; }.gp-hero-content > p:not(.gp-eyebrow) { font-size: 14px; }.gp-panel { padding: 20px; }.gp-sessions li { display: flex; }.gp-circuit-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }.gp-round-nav { flex-direction: column; } }
/* The reference uses vector flags and a cropped upper-body winner portrait. */
.gp-flag { width: 44px; height: 32px; object-fit: fill; border-radius: 4px; }
.gp-status { display: inline-flex; align-items: center; gap: 4px; margin-left: 5px; padding: 3px 6px; border-radius: 6px; background: #212225; color: #aaaab1; font-size: 12px; line-height: 1.25; }
.gp-status svg { width: 13px; height: 13px; color: #a5cb73; }
.gp-winner { align-items: flex-end; }
.gp-winner img { position: absolute; left: 5%; top: 17px; width: 34%; height: auto; max-width: none; object-fit: initial; }
.gp-winner-copy { position: relative; z-index: 1; margin-left: 41%; }
.gp-winner-label { display: flex; align-items: center; gap: 8px; }
.gp-winner-label svg { width: 16px; height: 16px; color: #ffc400; flex: none; }
.gp-session-status { display: inline-flex; align-items: center; gap: 4px; }
.gp-session-status svg { width: 15px; height: 15px; }
/* Keep the round label and its status on the same visual centre line. */
.gp-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; line-height: 1.25; }
.gp-status { margin-left: 0; }
.gp-flag { width: 46px; height: 30px; flex-shrink: 0; object-fit: fill; outline: 1px solid #ffffff30; }
.gp-result-driver .gp-result-ribbon { display: block; width: 3px; height: 29px; flex: none; border-radius: 3px; background: var(--team); }
/* Team-profile icons follow the driver-profile alignment and team accent. */
body[data-page="team"] .dp-label-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; color: var(--fg-3); }
body[data-page="team"] .dp-stat-label, body[data-page="team"] .dp-fact-label, body[data-page="team"] .dp-heading-icon { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
body[data-page="team"] .dp-stat-label > span, body[data-page="team"] .dp-fact-label > span, body[data-page="team"] .dp-heading-icon > span { transform: translateY(1px); min-width: 0; }
body[data-page="team"] .dp-stat-label .dp-label-icon { color: var(--team); }
body[data-page="team"] .dp-heading-icon .dp-label-icon { width: 19px; height: 19px; flex-basis: 19px; }
body[data-page="team"] .dp-fact-label .dp-label-icon { width: 14px; height: 14px; flex-basis: 14px; }
@media (max-width: 400px) { body[data-page="team"] .dp-stat-label, body[data-page="team"] .dp-fact-label { gap: 6px; } }
