/* =============================================================
   Pit Wall — design tokens, base, layout, components
   Aesthetic: editorial newsprint + paddock telemetry
   ============================================================= */

/* --- tokens ------------------------------------------------- */
:root {
  /* paper + ink */
  --paper:       #f1ebdd;
  --paper-2:     #e7e0cf;
  --paper-3:     #d8d0bc;
  --ink:         #0d0d0c;
  --ink-2:       #3d372c;
  --ink-3:       #857c6c;
  --rule:        #c9c1af;
  --rule-soft:   #dcd4c1;

  /* carbon (dark sections) */
  --carbon:      #0a0a09;
  --carbon-2:    #141311;
  --carbon-3:    #1f1d19;

  /* single racing accent */
  --hot:         #d93423;   /* racing red, slightly desaturated vs stock */
  --hot-2:       #f04a36;
  --hot-deep:    #9c2416;

  /* supporting */
  --gold:        #c9962c;
  --green:       #3a7a3f;

  /* type */
  --f-display:   'Instrument Serif', 'Playfair Display', Georgia, serif;
  --f-text:      'Inter', system-ui, sans-serif;
  --f-mono:      'JetBrains Mono', ui-monospace, monospace;

  /* measurements */
  --page-max:    1360px;
  --gutter:      clamp(18px, 3vw, 40px);
  --rule-w:      1px;
}

/* --- reset + base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--f-text);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;

  /* subtle paper grain via layered gradients */
  background-image:
    radial-gradient(circle at 12% 18%, rgba(0,0,0,0.018) 0%, transparent 40%),
    radial-gradient(circle at 88% 72%, rgba(0,0,0,0.02) 0%, transparent 42%);
}

a { color: inherit; text-decoration: none; }
a.u { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
a.u:hover { color: var(--hot); border-color: var(--hot); }

.mono { font-family: var(--f-mono); }
.serif { font-family: var(--f-display); }
.eyebrow {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.accent { color: var(--hot); }

/* --- page shell --------------------------------------------- */
.shell { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

/* --- masthead (top nav + ticker) ---------------------------- */
.masthead {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
}
.masthead-top {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.mast-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.mast-brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 0 3px rgba(217,52,35,0.15);
}
.mast-nav {
  display: flex;
  gap: 26px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.mast-nav a {
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color .15s, border-color .15s;
}
.mast-nav a:hover,
.mast-nav a.is-active { color: var(--ink); border-color: var(--hot); }
.mast-meta {
  text-align: right;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.mast-meta .greet { color: var(--ink-2); font-style: italic; font-family: var(--f-display); font-size: 14px; letter-spacing: 0; text-transform: none; margin-right: 12px; }

/* --- ticker -------------------------------------------------- */
.ticker {
  background: var(--carbon);
  height: 38px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--ink);
  position: relative;
}
.ticker::before, .ticker::after {
  content:''; position: absolute; top:0; bottom:0; width:60px; z-index:2; pointer-events:none;
}
.ticker::before { left:0;  background: linear-gradient(90deg, var(--carbon), transparent); }
.ticker::after  { right:0; background: linear-gradient(-90deg, var(--carbon), transparent); }
.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 52s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 22px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .08em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}
.tick .sym { color: var(--hot-2); font-weight: 600; letter-spacing: .14em; }
.tick .val { color: #fff; font-weight: 600; }
.tick .pts { color: var(--gold); }
.tick-sep { color: rgba(255,255,255,0.2); padding: 0 6px; font-size: 9px; }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- hero ---------------------------------------------------- */
.hero {
  padding: 56px var(--gutter) 28px;
  max-width: var(--page-max);
  margin: 0 auto;
  position: relative;
}
.hero-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  margin-bottom: 36px;
}
.hero-kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-kicker .bar { width: 42px; height: 1.5px; background: var(--hot); }
.hero-title {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-title .l1 {
  display: block;
  font-size: clamp(60px, 10vw, 148px);
  overflow: hidden;
}
.hero-title .l1 > span {
  display: inline-block;
  animation: maskUp 1.1s cubic-bezier(.2,.9,.25,1) both .3s;
}
.hero-title .l2 {
  display: block;
  font-style: italic;
  color: var(--hot);
  font-size: clamp(60px, 10vw, 148px);
  margin-top: -0.08em;
  overflow: hidden;
  padding-bottom: .06em;
}
.hero-title .l2 > span {
  display: inline-block;
  animation: maskUp 1.1s cubic-bezier(.2,.9,.25,1) both .55s;
}
.hero-standfirst {
  max-width: 380px;
  font-family: var(--f-display);
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink-2);
  font-style: italic;
  padding-bottom: 10px;
  animation: fadeUp .9s ease both .9s;
}

.hero-foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding-top: 22px;
  border-top: 1.5px solid var(--ink);
  animation: fadeUp .9s ease both 1.1s;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  background: var(--hot);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.live-badge::before {
  content:''; width: 6px; height: 6px;
  background: #fff; border-radius: 50%;
  animation: blink 1.6s ease infinite;
}
.hero-nav-labels {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--ink-3);
  text-transform: uppercase;
  text-align: center;
}
.hero-nav-labels .sep { color: var(--hot); padding: 0 8px; }
.hero-time {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-2);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.hero-time .sec { color: var(--ink-3); }

/* --- next race block ---------------------------------------- */
.race-hero {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  animation: fadeUp 1.1s ease both 1.3s;
}
.race-card {
  background: var(--carbon);
  color: #fff;
  padding: 48px 52px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--hot);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 52px;
}
.race-card::before {
  content:'';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.018) 0 2px,
      transparent 2px 18px
    );
  pointer-events: none;
}
.race-card > * { position: relative; z-index: 1; }

.race-round-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--hot-2);
  padding: 7px 13px;
  border: 1px solid rgba(217,52,35,0.45);
  background: rgba(217,52,35,0.10);
  margin-bottom: 18px;
}
.race-round-pill .flag { font-size: 16px; }

.race-title {
  font-family: var(--f-display);
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 20px;
}
.race-title em { font-style: italic; color: var(--hot-2); }

.race-circuit {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}
.race-circuit strong { color: #fff; font-weight: 500; }

.race-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.13);
}
.race-stat-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.race-stat-val {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.race-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.countdown-head {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.countdown-head::before {
  content:''; width: 7px; height: 7px;
  background: var(--hot); border-radius: 50%;
  animation: pulseDot 1.8s ease infinite;
}
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cd-cell {
  background: var(--carbon-3);
  padding: 22px 6px 14px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
}
.cd-num {
  font-family: var(--f-mono);
  font-size: clamp(32px, 3.8vw, 44px);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cd-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 12px;
}
.race-cta {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: border-color .2s, background .2s;
}
.race-cta:hover { border-color: var(--hot); background: rgba(217,52,35,0.1); }
.race-cta .arr { color: var(--hot-2); }

/* --- section headings (editorial) --------------------------- */
.sec-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 20px;
  margin: 56px 0 20px;
}
.sec-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--hot);
  font-weight: 600;
}
.sec-title {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
.sec-title em { font-style: italic; color: var(--hot); }
.sec-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.sec-rule {
  height: 1px;
  background: var(--ink);
  max-width: var(--page-max);
  margin: 0 auto;
}

/* --- calendar strip ----------------------------------------- */
.cal-wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.cal-strip-wrap {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--paper-2);
  overflow: hidden;
}
.cal-progress {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(0,0,0,0.1);
  z-index: 3;
}
.cal-progress-fill {
  height: 100%;
  background: var(--hot);
  transform-origin: left;
  transform: scaleX(0);
  animation: barGrow 1.6s cubic-bezier(.3,.9,.3,1) both 1.8s;
}
.cal-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  overflow-x: auto;
  scrollbar-width: thin;
}
.cal-strip::-webkit-scrollbar { height: 3px; }
.cal-strip::-webkit-scrollbar-thumb { background: var(--ink); }

.cal-cell {
  padding: 22px 16px 18px;
  border-right: 1px solid var(--rule-soft);
  background: var(--paper);
  min-height: 156px;
  display: flex;
  flex-direction: column;
  transition: background .25s;
  cursor: pointer;
  color: inherit;
}
.cal-cell:last-child { border-right: none; }
.cal-cell:hover { background: var(--paper-3); }
.cal-cell.done { background: var(--paper-2); }
.cal-cell.done .cal-circuit { color: var(--ink-2); }
.cal-cell.next {
  background: var(--carbon);
  color: #fff;
}
.cal-cell.next .cal-country { color: rgba(255,255,255,0.55); }
.cal-cell.next .cal-circuit { color: #fff; }
.cal-cell.next .cal-date    { color: rgba(255,255,255,0.75); }

.cal-rnum {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-3);
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cal-cell.next .cal-rnum { color: var(--hot-2); font-weight: 700; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.cal-cell:not(.done):not(.next) .cal-dot { opacity: 0; }
.cal-cell.next .cal-dot { background: var(--hot); animation: pulseDot 1.6s ease infinite; }

.cal-flag { font-size: 22px; line-height: 1; margin-bottom: 10px; }
.cal-country {
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 500;
}
.cal-circuit {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin-bottom: auto;
}
.cal-date {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 14px;
  font-weight: 500;
}
.cal-winner {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--gold);
  margin-top: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-winner::before {
  content:''; display: inline-block;
  width: 9px; height: 9px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* --- main 3-col grid ---------------------------------------- */
.main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.main-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.col {
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}
.col:last-child { border-right: none; }

.col-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}
.col-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--hot);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.col-title {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
.col-title em { font-style: italic; color: var(--hot); }
.col-sub {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-top: 10px;
}

/* --- driver row --------------------------------------------- */
.d-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 15px 24px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
  transition: background .2s, transform .2s;
  opacity: 0;
  animation: rowSlide .6s cubic-bezier(.25,.9,.3,1) both;
}
.d-row::before {
  content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--team-color, var(--ink-3));
}
.d-row:hover { background: var(--paper-2); transform: translateX(3px); }
.d-row.leader {
  background: linear-gradient(90deg, rgba(201,150,44,0.12), transparent 70%);
}
.d-row.leader .d-pos::before {
  content:'★';
  color: var(--gold);
  margin-right: 4px;
}
.d-pos {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.d-info { display: flex; flex-direction: column; gap: 4px; }
.d-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.d-name {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.d-code {
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--team-color, var(--ink-3));
  padding: 3px 6px;
  letter-spacing: .06em;
}

/* Dark-team code pill — mercedes / haas get `color: var(--ink)` for legibility
   against their paper-tone team hex. Mirrors `.driver-code-pill.is-dark`
   and the mobile app's `DARK_TEAM_CODES` set. */
.d-code.is-dark { color: var(--ink); }

.d-meta {
  font-size: 11px;
  color: var(--ink-3);
}
.d-meta .gap {
  color: var(--ink-2);
  font-family: var(--f-mono);
  font-size: 10px;
  margin-left: 6px;
}
.d-pts-wrap { text-align: right; }
.d-pts {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.d-pts-sub {
  font-family: var(--f-mono);
  font-size: 8.5px;
  color: var(--ink-3);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* --- constructor row ---------------------------------------- */
.c-row {
  padding: 15px 24px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
  transition: background .2s;
  opacity: 0;
  animation: rowSlide .6s cubic-bezier(.25,.9,.3,1) both;
}
.c-row:hover { background: var(--paper-2); }
.c-row::before {
  content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--team-color);
}
.c-top {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
}
.c-pos {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.c-name {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.c-name .new {
  font-family: var(--f-mono);
  font-size: 8px;
  background: var(--hot);
  color: #fff;
  padding: 2px 5px;
  letter-spacing: .15em;
  font-weight: 700;
}
.c-pu { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.c-pts {
  font-family: var(--f-mono);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.c-bar {
  height: 3px;
  background: var(--paper-3);
  position: relative;
  margin-top: 8px;
  overflow: hidden;
}
.c-bar-fill {
  height: 100%;
  background: var(--team-color);
  transform-origin: left;
  transform: scaleX(0);
  animation: barGrow 1.4s cubic-bezier(.3,.9,.3,1) both;
}

/* --- podium + news ------------------------------------------ */
.podium-block {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--rule);
}
.podium-head {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}
.podium-list { display: flex; flex-direction: column; gap: 6px; }
.pod-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  transition: transform .2s;
}
.pod-row:hover { transform: translateX(3px); }
.pod-row.p1 { background: linear-gradient(90deg, rgba(201,150,44,0.18), transparent); }
.pod-row.p2 { background: linear-gradient(90deg, rgba(130,130,130,0.13), transparent); }
.pod-row.p3 { background: linear-gradient(90deg, rgba(176,108,48,0.13), transparent); }
.pod-badge {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 7px 0;
  color: #fff;
  letter-spacing: .04em;
}
.p1 .pod-badge { background: var(--gold); }
.p2 .pod-badge { background: #909090; }
.p3 .pod-badge { background: #b06c30; }
.pod-name {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}
.pod-team {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 3px;
}
.pod-time {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 500;
}

.news { padding: 0; }
.news-item {
  padding: 18px 24px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
  transition: background .2s, padding-left .2s;
}
.news-item:last-child { border-bottom: none; }
.news-item::before {
  content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--hot); transition: width .25s;
}
.news-item:hover { background: var(--paper-2); padding-left: 30px; }
.news-item:hover::before { width: 3px; }
.news-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.news-kicker {
  font-family: var(--f-mono);
  font-size: 8.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 3px 7px;
  background: var(--hot);
  color: #fff;
  font-weight: 600;
}
.news-item.neutral .news-kicker { background: var(--ink); }
.news-num {
  font-family: var(--f-mono);
  font-size: 9px;
  color: var(--ink-3);
  font-weight: 500;
}
.news-headline {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--ink);
}
.news-item.lead .news-headline { font-size: 19px; font-weight: 500; }
.news-body {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* --- stats ribbon ------------------------------------------- */
.ribbon {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.ribbon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
  background: var(--carbon);
}
.stat {
  padding: 28px 24px 26px;
  border-right: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: background .3s;
}
.stat:last-child { border-right: none; }
.stat:hover { background: var(--carbon-2); }
.stat::after {
  content:''; position: absolute; bottom: 0; left: 0;
  height: 2px; width: 0; background: var(--hot);
  transition: width .5s;
}
.stat:hover::after { width: 100%; }
.stat-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}
.stat-big {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 400;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.stat-big em { font-style: italic; color: var(--hot-2); }
.stat-big .sub-unit {
  font-family: var(--f-mono);
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0;
  margin-left: 4px;
}
.stat-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.58);
}

/* --- footer -------------------------------------------------- */
.footer {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 48px var(--gutter) 52px;
}
.footer-inner {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.f-note, .f-right {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.f-right { text-align: right; }
.f-brand {
  font-family: var(--f-display);
  font-size: 18px;
  font-style: italic;
  color: var(--ink);
  text-align: center;
}
.f-brand em { color: var(--hot); font-weight: 500; }
.f-dot {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--hot);
  margin: 0 10px;
  border-radius: 50%;
  position: relative; top: -2px;
}

/* --- detail page (race.html) -------------------------------- */
.detail-hero {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 60px var(--gutter) 32px;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 30px;
  transition: color .2s;
}
.detail-back:hover { color: var(--hot); }
.detail-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 16px;
}
.detail-title {
  font-family: var(--f-display);
  font-size: clamp(56px, 8vw, 120px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.detail-title em { font-style: italic; color: var(--hot); }
.detail-sub {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-2);
  max-width: 640px;
  line-height: 1.35;
}

.detail-facts {
  max-width: var(--page-max);
  margin: 40px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.detail-fact {
  padding: 22px 20px;
  border-right: 1px solid var(--rule);
}
.detail-fact:last-child { border-right: none; }
.df-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.df-val {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
.df-val.mono { font-family: var(--f-mono); font-size: 22px; font-weight: 500; }

/* --- responsive --------------------------------------------- */
@media (max-width: 1024px) {
  .race-card { grid-template-columns: 1fr; gap: 36px; padding: 36px 32px; }
  .main-grid { grid-template-columns: 1fr; }
  .col { border-right: none; border-bottom: 1px solid var(--rule); }
  .col:last-child { border-bottom: none; }
  .ribbon-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.08); }
  .stat:nth-child(4) { border-right: none; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .detail-fact:nth-child(2) { border-right: none; }
  .detail-fact:nth-child(3), .detail-fact:nth-child(4) { border-top: 1px solid var(--rule); }
  .detail-fact:nth-child(4) { border-right: none; }
}
@media (max-width: 760px) {
  .masthead-top { grid-template-columns: 1fr; gap: 10px; }
  .mast-meta { text-align: left; }
  .mast-nav { flex-wrap: wrap; gap: 16px; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-foot { grid-template-columns: 1fr; gap: 14px; }
  .hero-nav-labels, .hero-time { text-align: left; }
  .race-stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .f-right { text-align: center; }
}
@media (max-width: 520px) {
  .hero { padding-top: 32px; }
  .cd-num { font-size: 28px; }
  .cd-cell { padding: 16px 6px 10px; }
  .race-card { padding: 28px 22px; }
  .race-stats { grid-template-columns: 1fr; gap: 16px; }
}

/* --- keyframes ---------------------------------------------- */
@keyframes maskUp {
  0%   { clip-path: inset(100% 0 0 0); transform: translateY(20px); }
  100% { clip-path: inset(0 0 0 0); transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rowSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(var(--to, 1)); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.3); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* --- stale chip (PRD §13) ----------------------------------- */
.stale-chip {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--carbon);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  border: 1px solid var(--hot);
  z-index: 4;
}
.stale-chip[hidden] { display: none; }
.stale-chip .stale-dot {
  width: 7px; height: 7px;
  background: var(--hot);
  border-radius: 50%;
  animation: pulseDot 1.6s ease-in-out infinite;
}
.ticker { position: relative; }

/* --- opens colophon (PRD §15) ------------------------------- */
.footer-colophon {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 10px var(--gutter) 22px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  text-align: right;
  border-top: 1px dashed var(--rule-soft);
}
.footer-colophon[hidden] { display: none; }
.footer-colophon span { color: var(--ink); font-weight: 600; }

/* --- not-found state (race/driver detail pages) ------------- */
.nf-wrap {
  max-width: 760px;
  margin: 80px auto;
  padding: 0 var(--gutter);
  text-align: center;
}
.nf-kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--hot);
  text-transform: uppercase;
}
.nf-title {
  font-family: var(--f-display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
  margin: 18px 0;
}
.nf-title em { color: var(--hot); font-style: italic; }
.nf-body {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 28px;
}
.nf-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
}
.nf-back:hover { background: var(--ink); color: var(--paper); }

/* --- reduced motion (WCAG, PRD §14) ------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track { animation: none !important; }
  .stale-chip .stale-dot { animation: none !important; }
}
body.reduced-motion .ticker-track { animation: none !important; }

/* --- Detail pages · v1.1 DriverDetail / RaceDetail ---------- */

/* Code pill — mirrors mobile's DARK_TEAM_CODES handling.
   Pages set `--pill-bg` inline to teamColor[driver.team]; dark teams
   (mercedes, haas) get `color: var(--ink)` via the .is-dark modifier. */
.driver-code-pill {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 7px;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  background: var(--pill-bg, var(--ink-3));
  color: var(--paper);
  vertical-align: middle;
  border-radius: 2px;
}
.driver-code-pill.is-dark { color: var(--ink); }

/* Finishing-position badge on § Results rows. */
.result-badge {
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.result-badge.is-p1     { color: var(--gold); font-style: italic; }
.result-badge.is-podium { color: var(--hot); font-style: italic; }
.result-badge.is-dnf    {
  color: var(--ink-3);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
}

/* Paddock Note — display-italic pull quote that breaks out of
   .main-grid as its own full-width strip. */
.paddock-note {
  max-width: var(--page-max);
  margin: 48px auto 0;
  padding: 40px var(--gutter) 52px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper-2);
}
.paddock-note .pn-kicker {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--hot);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.paddock-note blockquote {
  margin: 0;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 28px;
  line-height: 1.4;
  color: var(--ink);
  max-width: 780px;
}
.paddock-note .pn-byline {
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
