/* Slipstream — view-specific styles in the F1 visual language. */

/* ---- Home hero ---- */
.hero {
  position: relative; height: 330px; margin-bottom: 16px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(to bottom, #14151d 0%, #0b0b0f 78%);
}
/* F1 square-grid motif, fading toward the bottom */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(125% 95% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(125% 95% at 50% 0%, #000 0%, transparent 72%);
}
/* Red accent slash, top-right */
.hero::after {
  content: ""; position: absolute; top: 0; right: 0; width: 90px; height: 6px;
  background: var(--accent); clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-stage { position: absolute; inset: 0; }
.three-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-mute); font-size: 13px;
}
.hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 20px;
  background: linear-gradient(to top, rgba(11, 11, 15, 0.96) 10%, rgba(11, 11, 15, 0));
  pointer-events: none;
}
.wordmark { font-size: 40px; font-weight: 900; letter-spacing: 0.01em; text-transform: uppercase; line-height: 0.95; }
.tagline {
  color: var(--text-dim); margin-top: 7px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding-left: 13px; position: relative;
}
.tagline::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px;
  background: var(--accent); clip-path: polygon(40% 0, 100% 0, 60% 100%, 0 100%);
}

/* ---- Home quick stats (broadcast number blocks) ---- */
.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card {
  position: relative; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 10px 13px; text-align: center; overflow: hidden;
}
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.stat-num { font-size: 26px; font-weight: 900; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 10px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-top: 7px; }

/* ---- Home big nav cards (angular, with chevron) ---- */
.home-actions { display: flex; flex-direction: column; gap: 10px; }
.big-btn {
  position: relative; display: block; padding: 17px 44px 17px 18px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.12s ease, border-color 0.15s, background 0.15s;
}
.big-btn::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent);
  opacity: 0; transition: opacity 0.15s;
}
.big-btn::after {
  content: "\203A"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1;
}
.big-btn:active { transform: scale(0.99); border-color: var(--accent); background: var(--bg-elev-2); }
.big-btn:active::before { opacity: 1; }
.big-btn-title { font-weight: 800; font-size: 16px; letter-spacing: 0.02em; text-transform: uppercase; }
.big-btn-sub { color: var(--text-dim); font-size: 12.5px; margin-top: 2px; font-weight: 600; }

/* ---- Misc ---- */
.dev-note {
  margin-top: 16px; font-size: 11px; color: var(--text-mute); line-height: 1.6;
  letter-spacing: 0.02em; border-top: 1px solid var(--line-soft); padding-top: 12px;
}

/* ---- Garage: team tile with livery badge ---- */
.team-tile { padding: 10px; align-items: center; gap: 12px; }
.team-tile .tile-main { padding: 0; }
.livery-badge {
  width: 50px; height: 50px; flex: 0 0 auto; position: relative; overflow: hidden;
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.08);
}
.livery-badge-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; }
.livery-badge-em { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 9px; }

/* ---- Livery editor (3D car customizer) ---- */
.livery-editor { padding-bottom: 88px; }
.car-stage {
  position: sticky; top: calc(var(--header-h) + var(--safe-top)); z-index: 50;
  height: 280px; margin-bottom: 18px; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: radial-gradient(120% 100% at 50% 0%, #1a1d28 0%, #0a0b0f 72%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* ---- Tracks ---- */
.track-tile { padding: 10px; align-items: center; gap: 12px; }
.track-tile .tile-main { padding: 0; }
.plan-thumb { width: 54px; height: 54px; flex: 0 0 auto; background: var(--bg-elev-2); border-radius: var(--radius-sm); }
.plan-thumb-road { fill: none; stroke: var(--text-dim); stroke-linejoin: round; stroke-linecap: round; }

.template-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.template-chip {
  padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-elev-2); color: var(--text);
}
.template-chip:active { transform: scale(0.96); border-color: var(--accent); }

.track-editor { padding-bottom: 88px; }
.track-stage {
  position: relative; height: 240px; margin-bottom: 16px; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: radial-gradient(120% 100% at 50% 0%, #16181f 0%, #0a0b0f 75%);
}
.plan-wrap { display: flex; justify-content: center; margin-bottom: 8px; }
.plan-svg {
  width: 100%; max-width: 420px; aspect-ratio: 1; display: block; touch-action: none;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.plan-road { fill: none; stroke: #2b2e38; stroke-linejoin: round; stroke-linecap: round; }
.plan-center { fill: none; stroke: var(--text-mute); stroke-width: 0.5; stroke-dasharray: 2 2; }
.plan-pt { fill: #fff; stroke: var(--bg); stroke-width: 0.6; cursor: grab; }
.plan-pt.is-sel { fill: var(--accent-soft); }
.plan-sf { fill: var(--accent); }
.plan-hint { font-size: 11px; color: var(--text-mute); text-align: center; margin-bottom: 16px; letter-spacing: 0.02em; }

/* ---- Track editor v2: zoom, constraints, gravel ---- */
.plan-stage { position: relative; width: 100%; max-width: 420px; }
.plan-svg { cursor: grab; }
.plan-svg.is-panning { cursor: grabbing; }
.plan-zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.plan-zoom button {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line);
  background: rgba(11, 11, 15, 0.72); color: var(--text); font-weight: 700; font-size: 15px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.plan-zoom button:hover { background: rgba(11, 11, 15, 0.92); border-color: var(--text-mute); }
.plan-pt.is-tight { fill: #f5a623; stroke: #e10600; stroke-width: 0.9; animation: tight-pulse 0.9s infinite; }
@keyframes tight-pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
.plan-bank-hint { stroke: #6fd0ff; stroke-width: 0.5; stroke-linecap: round; fill: none; }
.plan-gravel { fill: #c2b280; opacity: 0.5; stroke: none; }
.plan-gravel-preview { fill: #c2b280; opacity: 0.32; stroke: #e0b13a; stroke-width: 0.9; stroke-dasharray: 2 1.5; }
.node-header { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.gravel-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.gravel-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 12px; color: var(--text-dim); background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.gravel-item .gi-swatch { width: 12px; height: 12px; border-radius: 3px; background: #c2b280; flex: none; }
.gravel-item .gi-label { flex: 1; }
.gravel-item button { margin-left: auto; background: none; border: none; color: var(--text-mute); cursor: pointer; font-size: 14px; }
.gravel-item button:hover { color: var(--accent-soft); }
.gravel-add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.tight-warn { font-size: 11px; color: #f5a623; text-align: center; margin-bottom: 8px; min-height: 14px; }

/* ---- Race broadcast ---- */
/* Break out of the 760px content column: fill the whole area between the header and the nav bar,
   at any resolution, so the broadcast scales to the display (header + nav stay visible). */
.race-screen {
  position: fixed; z-index: 1;
  top: calc(var(--header-h) + var(--safe-top) + 8px);
  bottom: calc(var(--nav-h) + var(--safe-bot) + 8px);
  left: 10px; right: 10px;
  overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(120% 100% at 50% 0%, #16181f 0%, #0a0b0f 78%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}
.race-stage { position: absolute; inset: 0; }
.race-flag {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: none;
  padding: 6px 18px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: #0a0b0f;
  background: #f5c518; border-radius: 100px; z-index: 6;
}
.race-screen.is-yellow .race-flag { display: block; animation: flag-pulse 0.9s ease-in-out infinite; }
.race-screen.is-yellow { box-shadow: inset 0 0 0 3px rgba(245, 197, 24, 0.6); }
@keyframes flag-pulse { 0%, 100% { opacity: 0.78; } 50% { opacity: 1; } }
.race-hud { position: absolute; inset: 0; pointer-events: none; }
.race-hud > * { pointer-events: auto; }
.race-top { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: center; }
.race-lap {
  background: rgba(11, 11, 15, 0.7); border: 1px solid var(--line); border-radius: 100px; padding: 5px 16px;
  font-weight: 800; letter-spacing: 0.08em; font-size: 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.race-weather {
  position: absolute; top: 12px; left: 12px; padding: 5px 12px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff;
  background: rgba(11, 11, 15, 0.7); border: 1px solid var(--line); border-radius: 100px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.timing-tower { position: absolute; top: 46px; left: 10px; display: flex; flex-direction: column; gap: 2px; width: 132px; max-height: calc(100% - 96px); overflow: hidden; }
.tt-row { display: flex; align-items: center; gap: 5px; padding: 3px 5px; font-size: 11px; border-radius: 4px; background: rgba(11, 11, 15, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tt-row.is-player { background: rgba(225, 6, 0, 0.3); }
.tt-row.is-dnf { opacity: 0.5; }
.tt-pos { width: 14px; text-align: center; font-weight: 800; color: var(--text-dim); }
.tt-bar { width: 4px; height: 14px; border-radius: 1px; flex: 0 0 auto; }
.tt-name { flex: 1; min-width: 0; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-gap { font-size: 10px; color: var(--text-dim); flex: 0 0 auto; white-space: nowrap; }
/* constructor badge beside the abbreviation (timing tower + results) */
.tt-logo { flex: 0 0 auto; display: block; border-radius: 4px; }
.tt-logo.has-em { object-fit: cover; background: #0e1014; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.tt-logo.gen { object-fit: fill; }
.timing-tower .tt-logo { width: 16px; height: 16px; }
.results-row .tt-logo { width: 20px; height: 20px; border-radius: 5px; }
.race-ticker { position: absolute; top: 46px; right: 10px; width: 146px; display: flex; flex-direction: column; gap: 4px; }
.ticker-line { background: rgba(11, 11, 15, 0.62); border-left: 2px solid var(--accent); border-radius: 3px; padding: 4px 7px; font-size: 10.5px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* live track minimap (in place of the event ticker) */
.race-minimap { position: absolute; top: 46px; right: 10px; width: 128px; height: 128px; padding: 9px; box-sizing: border-box; background: rgba(11, 11, 15, 0.55); border: 1px solid var(--line); border-radius: 10px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.race-minimap-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mm-road { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-linejoin: round; stroke-linecap: round; }
.mm-sf { fill: #fff; }
.mm-dot { stroke: rgba(0, 0, 0, 0.55); }
.race-controls { position: absolute; bottom: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; }
.race-ctrl { width: 40px; height: 34px; flex: 0 0 auto; border-radius: 8px; border: 1px solid var(--line); background: rgba(11, 11, 15, 0.72); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; }
.race-progress { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.14); border-radius: 3px; overflow: hidden; }
.race-progress-fill { height: 100%; width: 0; background: var(--accent); }

.race-gauges {
  position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); display: none;
  align-items: baseline; gap: 7px; padding: 7px 16px;
  background: rgba(11, 11, 15, 0.6); border: 1px solid var(--line); border-radius: 10px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.race-gauges b { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; line-height: 1; }
.race-gauges span { font-size: 10px; color: var(--text-dim); letter-spacing: 0.12em; }

/* Team-radio flyout (F1 broadcast style) */
.radio-flyout {
  position: absolute; right: 10px; top: 48%; width: 178px; z-index: 60;
  transform: translateX(125%); opacity: 0;
  transition: transform 0.34s cubic-bezier(0.22, 0.91, 0.36, 1), opacity 0.25s ease;
  background: rgba(11, 11, 15, 0.84); border: 1px solid var(--line);
  border-left: 4px solid var(--radio-col, #e10600); border-radius: 8px; padding: 10px 12px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-2);
}
.radio-flyout.is-in { transform: translateX(0); opacity: 1; }
.radio-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.radio-name { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--radio-col, #fff); }
.radio-bars { display: flex; align-items: center; gap: 2px; height: 15px; }
.radio-bars i { display: block; width: 2px; height: 100%; background: var(--radio-col, #fff); opacity: 0.85; transform: scaleY(0.3); transform-origin: center; }
.radio-flyout.is-in .radio-bars i { animation: radio-wave 0.8s ease-in-out infinite; }
@keyframes radio-wave { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
.radio-text { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.42; text-transform: uppercase; letter-spacing: 0.01em; }

.race-results { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 5, 8, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.race-results-card { width: 100%; max-width: 460px; max-height: 92%; overflow-y: auto; padding: 18px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.results-title { font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 12px; }
.results-list { display: flex; flex-direction: column; gap: 3px; }
.results-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; background: var(--bg-elev-2); font-size: 12.5px; }
.results-row.is-player { background: rgba(225, 6, 0, 0.22); }
.rr-pos { width: 18px; text-align: center; font-weight: 800; }
.rr-name { flex: 1; font-weight: 700; }
.rr-team { color: var(--text-dim); font-size: 11px; }
.rr-time { color: var(--text-dim); }
.results-actions { display: flex; gap: 10px; margin-top: 16px; }
.results-actions .btn { flex: 1; }

/* ---- Cockpit driver-ID lower-third (onboard only) ---- */
.cockpit-id {
  position: absolute; left: 12px; bottom: 60px; z-index: 5; display: none; align-items: stretch;
  border-radius: 7px; overflow: hidden; font-weight: 700;
  background: rgba(11, 12, 16, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.cid-num { display: flex; align-items: center; justify-content: center; min-width: 42px; padding: 0 8px; font-size: 22px; font-weight: 900; color: #fff; background: var(--cid-col, #e10600); }
.cid-main { display: flex; flex-direction: column; justify-content: center; padding: 6px 14px 6px 11px; }
.cid-name { display: flex; align-items: baseline; gap: 6px; line-height: 1.05; }
.cid-first { font-size: 11px; color: var(--text-dim); font-weight: 600; }
.cid-last { font-size: 16px; font-weight: 800; color: #fff; }
.cid-team { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.cid-team img { width: 16px; height: 11px; border-radius: 2px; object-fit: cover; }

/* ---- Position / overtake banner (slides down from the top) ---- */
.pos-banner {
  position: absolute; top: 50px; left: 50%; z-index: 6; display: flex; align-items: stretch;
  border-radius: 7px; overflow: hidden; pointer-events: none; opacity: 0;
  transform: translate(-50%, -150%);
  background: rgba(11, 12, 16, 0.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 0.3s;
}
.pos-banner.is-in { transform: translate(-50%, 0); opacity: 1; }
.pb-pos { display: flex; align-items: center; justify-content: center; min-width: 44px; font-size: 24px; font-weight: 900; color: #fff; background: var(--pb-col, #e10600); }
.pos-banner .tt-logo { align-self: center; margin-left: 10px; }
.pb-main { display: flex; flex-direction: column; justify-content: center; padding: 7px 14px 7px 10px; }
.pb-name { font-size: 16px; line-height: 1.05; }
.pb-first { color: var(--text-dim); font-weight: 600; font-size: 13px; }
.pb-last { color: #fff; font-weight: 800; }
.pb-team { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.pb-num { display: flex; align-items: center; justify-content: center; min-width: 46px; font-size: 26px; font-weight: 900; color: rgba(255, 255, 255, 0.85); border-left: 1px solid var(--line); padding: 0 10px; }

/* ---- Driver highlight (portrait + headline + career, slides up) ---- */
.driver-hl {
  position: absolute; left: 50%; bottom: 60px; z-index: 6; display: flex; align-items: stretch;
  border-radius: 9px; overflow: hidden; pointer-events: none; opacity: 0;
  transform: translate(-50%, 160%); border: 1px solid var(--line);
  background: rgba(11, 12, 16, 0.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 0.3s;
}
.driver-hl.is-in { transform: translate(-50%, 0); opacity: 1; }
.hl-portrait { width: 62px; height: 62px; flex: 0 0 auto; background: #15171d; position: relative; overflow: hidden; }
.hl-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hl-portrait::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--hl-col, #e10600); }
.hl-main { display: flex; flex-direction: column; justify-content: center; padding: 8px 18px 8px 13px; min-width: 200px; }
.hl-headline { font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hl-col, #e10600); }
.hl-name { font-size: 16px; line-height: 1.1; margin-top: 1px; }
.hl-last { font-weight: 800; color: #fff; }
.hl-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ---- Results redesign (broadcast table + winner portrait) ---- */
.r2-card { max-width: 840px; width: 96%; padding: 0; overflow: hidden; }
.r2-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 2px solid var(--accent); }
.r2-h-title { font-size: 19px; font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase; }
.r2-h-winner { font-size: 19px; font-weight: 900; color: var(--text-dim); letter-spacing: 0.06em; }
.r2-body { display: flex; }
.r2-table { flex: 1; min-width: 0; padding: 9px 12px 12px; display: flex; flex-direction: column; gap: 1px; }
.r2-row { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 4px; font-size: 13px; }
.r2-row:nth-child(odd) { background: rgba(255, 255, 255, 0.025); }
.r2-row.is-player { background: rgba(225, 6, 0, 0.18); }
.r2-pos { width: 22px; text-align: center; font-weight: 800; flex: 0 0 auto; }
.r2-flag { width: 20px; flex: 0 0 auto; display: flex; }
.r2-flag img { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }
.r2-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r2-first { color: var(--text-dim); font-weight: 600; }
.r2-last { font-weight: 800; }
.r2-flmark { color: #b14cff; }
.r2-team { width: 132px; flex: 0 0 auto; color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r2-time { width: 62px; flex: 0 0 auto; text-align: right; color: var(--text-dim); }
.r2-pts { width: 38px; flex: 0 0 auto; text-align: right; font-weight: 800; }
.r2-winner { width: 244px; flex: 0 0 auto; position: relative; background: #0c0d12; overflow: hidden; }
.r2-wimg { width: 100%; height: 100%; min-height: 230px; object-fit: cover; object-position: center top; display: block; }
.r2-wempty { background: linear-gradient(160deg, #1a1d28, #0a0b0f); }
.r2-wgrad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 11, 15, 0.96) 6%, transparent 48%), linear-gradient(to right, rgba(10, 11, 15, 0.55), transparent 32%); }
.r2-wlabel { position: absolute; left: 16px; right: 16px; bottom: 16px; }
.r2-wfirst { font-size: 15px; color: var(--text-dim); font-weight: 600; line-height: 1; }
.r2-wlast { font-size: 30px; font-weight: 900; color: #fff; line-height: 0.95; }
.r2-wteam { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 5px; font-weight: 700; }
.r2-fastlap { padding: 9px 20px; font-size: 11.5px; color: #b14cff; letter-spacing: 0.06em; font-weight: 700; border-top: 1px solid var(--line); }
.r2-fastlap b { color: #fff; }
.r2-card .results-actions { padding: 12px 20px 16px; margin-top: 0; }
@media (max-width: 640px) {
  .r2-body { flex-direction: column-reverse; }
  .r2-winner { width: 100%; }
  .r2-wimg { min-height: 150px; max-height: 180px; }
  .r2-team { display: none; }
}
