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

/* The hidden attribute must always win. Class rules that set display (grid, inline-flex, flex)
   otherwise override the UA's [hidden] rule, so an element meant to be invisible still renders.
   That is what painted the replay "no player" notice over every working stream, and would have
   shown the hijack-only "Stay on this page" button on every blocked feed. */
[hidden] { display: none !important; }

/* ═══════════════ DESIGN TOKENS ═══════════════ */

:root {
  --ink: #08090a;
  /* carbon black */
  --ink-2: #0c0d0f;
  --surface: rgba(255,255,255,0.035);
  --surface-2: rgba(255,255,255,0.06);
  --line: rgba(255,255,255,0.09);
  --line-2: rgba(255,255,255,0.16);
  --text: #F5F6F7;
  --muted: #8A8F98;
  --dim: #5C626B;
  --red: #E10600;
  /* F1 signature red */
  --red-deep: #8B0400;
  --red-glow: rgba(225,6,0,.45);
  --green: #00D57E;
  --amber: #FFB020;
  --team: #E10600;
  /* dynamic team accent */
  --team-2: #FF2A22;
  --team-ink: #fff;
  /* legible text/icons ON --team; dark liveries flip this to near-black */
  --r: 18px;
  --r-sm: 10px;
  --r-xs: 6px;
  --blur: 22px;
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-sharp: cubic-bezier(.65,0,.35,1);
  --shadow: 0 24px 70px -20px rgba(0,0,0,.85);
  --maxw: 1240px;
}

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

html {
  scroll-behavior: smooth;
  /* Reserve the scrollbar channel so locking scroll for a modal cannot reflow the page. */
  scrollbar-gutter: stable;
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
}

a {
  touch-action: manipulation;
}

button,
[role="button"],
[role="tab"],
summary,
.btn {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 10002;
  padding: 10px 16px;
  background: var(--team);
  color: var(--team-ink);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

html.lite-motion .grain,
html.lite-motion #speedCanvas {
  display: none;
}

html.lite-motion .scanlines {
  opacity: .2;
}

html.lite-motion .hero-layer,
html.lite-motion .dcard img,
html.lite-motion .shot img {
  will-change: auto;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter',system-ui,-apple-system,sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
}

input,textarea,select,[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

::selection {
  background: var(--team);
  color: var(--team-ink);
}

img {
  display: block;
  max-width: 100%;
}

/* ═══════════════ TYPOGRAPHY ═══════════════ */

.display {
  font-family: 'Archivo',sans-serif;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .92;
  text-transform: uppercase;
  font-style: italic;
}

.eyebrow {
  font-family: 'JetBrains Mono',monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--team);
}

.mono {
  font-family: 'JetBrains Mono',monospace;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════ ATMOSPHERE ═══════════════ */

#speedCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  width: 100%;
  height: 100%;
  /* Its own compositing layer: scrolling never repaints the page behind it. */
  contain: strict;
  will-change: transform;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* no mix-blend-mode: a fullscreen blended layer forces re-compositing on every scroll frame */
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
  opacity: .35;
  background: repeating-linear-gradient(0deg,rgba(0,0,0,.22) 0 1px,transparent 1px 3px);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%,transparent 40%,rgba(0,0,0,.72) 100%);
}

/* ── Cockpit above the atmosphere while a stream is on screen ──
   .vignette/.scanlines/.grain are fixed overlays at z 58–60. While a stream is loaded
   (body.has-stream) the cockpit box is lifted to 61, so the video is shown untouched and
   the rest of the page keeps its texture. Zero-lag: the browser handles it natively.

   A child can never out-stack its own ancestor's stacking context, so EVERY ancestor of
   the player must be accounted for. The chain is:

     body > .view.is-active > section#watch > .stage.rv > .player

   1. .view.is-active  -> opacity:1 + transform:none  => no stacking context  ✓
   2. section#watch    -> `section{z-index:2}` below would create one, so it is
                          neutralised here with z-index:auto. content-visibility:auto
                          (set on .sec further down) also creates one, hence the opt-out.
                          It is the first section below the hero, so the paint-skipping
                          optimisation buys nothing there anyway.                ✓
   3. .stage           -> THIS was the missed one. `.stage{position:relative;z-index:1}`
                          forms a stacking context, which trapped the player at z-index:1
                          in the root context — permanently below the z 58–60 overlays.
                          Lifting .player alone could never work. The lift therefore has
                          to happen on .stage itself (see below).                ✓
   4. .stage.rv        -> the scroll-reveal class animates opacity 0->1 and translateY.
                          A non-1 opacity mid-transition also forms a stacking context, so
                          the reveal is force-settled while a stream is on screen.   ✓ */
#watch {
  scroll-margin-top: 110px;
  z-index: auto;
  content-visibility: visible;
  contain: none;
}

/* Lift the whole cockpit box (stage-bar + player) clear of the atmosphere layers.
   .stage keeps overflow:hidden + border-radius, so it stays a clean framed window and
   the texture resumes immediately outside its edges. */
body.has-stream .stage {
  z-index: 61;
  /* never let a half-finished .rv reveal trap the cockpit in a stacking context */
  opacity: 1;
  transform: none;
  /* scope the transition so force-settling the reveal can't animate into a visible jump */
  transition-property: border-color;
}

/* Kept as a within-.stage ordering guarantee: the iframe and the loader/nostream
   overlays are all absolutely positioned siblings inside .player. */
body.has-stream .player {
  z-index: 61;
}

/* While the cockpit is lifted, an open Session Selector / feed-source menu must
   still float above it — those menus expand downward, straight over the player.
   The deck's own open-state lift below (z 60) would land under the cockpit's 61,
   so re-lift the deck one step higher whenever a menu is open during a stream. */
body.has-stream .deck.has-open-menu,
body.has-stream .deck:focus-within,
body.has-stream .deck:has([aria-expanded="true"]) {
  z-index: 62;
}

/* Top progress bar */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 200;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg,var(--team),#fff);
  box-shadow: 0 0 16px var(--team);
}

/* ═══════════════ NAV ═══════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(20px,5vw,56px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease),border-color .35s var(--ease);
}

/* The frosted layer is its own element and only fades. Animating backdrop-filter (as
   before) forced the browser to re-blur the whole width on every frame of the toggle. */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: rgba(10,10,11,.88);
  transition: opacity .35s var(--ease);
}

/* Backdrop blur is kept on large screens only. On phones it is the single most expensive
   thing under a scrolling page, so small screens get the solid layer instead. */
@media(min-width:901px) {
.nav::before {
    background: rgba(10,10,11,.72);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
  }

}

.nav.stuck::before {
  opacity: 1;
}

.nav.stuck {
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg,var(--team),var(--red-deep));
  display: grid;
  place-items: center;
  box-shadow: 0 6px 22px -6px var(--red-glow);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

/* The mark is a white glyph. On a light livery (Haas) the team-coloured end of
   the gradient is near-white and the mark disappeared into it, so inherit the
   contrast-safe ink rather than hard-coding #fff in the SVG. */
.brand-mark {
  color: var(--team-ink);
}

.brand-mark svg path {
  fill: currentColor;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,transparent 40%,rgba(255,255,255,.55) 50%,transparent 60%);
  transform: translateX(-120%);
  animation: sheen 4.5s var(--ease) infinite;
}

@keyframes sheen {
0%,70% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }

}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text b {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -.04em;
}

.brand-text span {
  font-family: 'JetBrains Mono';
  font-size: .55rem;
  letter-spacing: .3em;
  color: var(--muted);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color .3s var(--ease),background .3s var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--team);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Keep the desktop tab group pinned to the viewport centre. The right-side
   pills (including the variable-width viewer count) must not shift it. */
@media(min-width:901px) {
  .nav-links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    white-space: nowrap;
  }
}

/* Compact the centred links at narrower desktop widths so they stay clear of
   the brand and status pills while retaining the same true-centre alignment. */
@media(min-width:901px) and (max-width:1200px) {
  .nav-links {
    gap: 0;
  }

  .nav-links a {
    font-size: .7rem;
    padding-inline: 7px;
  }

  .nav-right {
    gap: 6px;
  }
}

@media(min-width:901px) and (max-width:980px) {
  .nav-right #badge {
    display: none;
  }
}

@media(max-width:900px) {
.nav-links {
    display: none;
  }

}

/* pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono',monospace;
  font-size: .72rem;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
  transition: transform .25s var(--ease),border-color .25s var(--ease),background-color .25s var(--ease),color .25s var(--ease);
}

.pill:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
}

.pill.live {
  border-color: rgba(225,6,0,.4);
  background: rgba(225,6,0,.1);
  color: #FF6B62;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .64rem;
}

.pill.live .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
  animation: beat 1.6s ease-in-out infinite;
}

.pill.viewer-count[hidden] {
  display: none !important;
}

.pill.viewer-count {
  color: var(--muted);
  cursor: default;
  gap: 6px;
  letter-spacing: .01em;
}

.pill.viewer-count:hover {
  border-color: var(--line);
  transform: none;
}

.viewer-count-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--dim);
}

.viewer-count-label {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}

.pill.viewer-count[data-state="live"] {
  color: var(--green);
  border-color: rgba(0,213,126,.28);
  background: rgba(0,213,126,.08);
}

.pill.viewer-count[data-state="live"] .viewer-count-dot {
  background: var(--green);
  box-shadow: 0 0 8px rgba(0,213,126,.65);
}

.pill.viewer-count[data-state="offline"] .viewer-count-dot {
  background: var(--amber);
}

@keyframes beat {
0%,100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .35;
    transform: scale(.7);
  }

}


.pill.next {
  color: var(--amber);
  border-color: rgba(255,176,32,.28);
  background: rgba(255,176,32,.08);
  max-width: min(480px,100%);
  white-space: normal;
  overflow-wrap: anywhere;
}

.news-status.is-live {
  color: var(--green);
  border-color: rgba(0,213,126,.28);
  background: rgba(0,213,126,.08);
}

.news-status.is-offline {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface);
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-layer {
  position: absolute;
  inset: -8% -4%;
  z-index: -3;
  will-change: transform;
}

.hero-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 45%;
  filter: saturate(1.15) contrast(1.08) brightness(.72);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg,rgba(10,10,11,.86) 0%,rgba(10,10,11,.34) 34%,rgba(10,10,11,.78) 72%,var(--ink) 100%);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(94deg,rgba(10,10,11,.9) 0%,rgba(10,10,11,.35) 46%,transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 130px clamp(16px,4vw,44px) clamp(48px,7vh,84px);
}

.hero-flag {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 6px;
  z-index: 3;
  background: repeating-linear-gradient(180deg,#fff 0 14px,#111 14px 28px);
  opacity: .14;
}

.hero h1 {
  font-size: clamp(3rem,11.5vw,9.5rem);
  margin: 14px 0 6px;
}

.hero h1 .l {
  display: block;
  overflow: hidden;
}

.hero h1 .l>span {
  display: block;
  transform: translateY(110%);
  animation: riseIn 1.05s var(--ease) forwards;
}

.hero h1 .l:nth-child(2)>span {
  animation-delay: .12s;
}

@keyframes riseIn {
to {
    transform: translateY(0);
  }

}

.hero h1 em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 2px var(--team);
}

.hero-sub {
  max-width: 560px;
  color: #C6CAD1;
  font-size: clamp(.92rem,1.6vw,1.06rem);
  margin-top: 22px;
  opacity: 0;
  animation: fadeUp .9s var(--ease) .5s forwards;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  opacity: 0;
  animation: fadeUp .9s var(--ease) .68s forwards;
}

@keyframes fadeUp {
from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }

}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  opacity: 0;
  animation: fadeUp .9s var(--ease) .82s forwards;
}

/* Buttons — one pill, everywhere.
   Round 33b: the watch page's button (a 36px pill, Inter 600, no tracking, no sweep) became the
   site's only button. The old uppercase Archivo / skewed-sweep / glow build is replaced rather than
   layered over, so a button cannot look like two different things on the same page. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.1;
  padding: 0 16px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  background: #ceced912;
  color: var(--rr-fg, #cecfd2);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}

/* A light wash on hover instead of the old red skew sweep: the same weight as the new buttons. */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  opacity: 0;
  transition: opacity .18s var(--ease);
  z-index: -1;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 10px 24px -10px var(--red-glow);
  opacity: 0;
  transition: opacity .24s var(--ease);
}

.btn:hover {
  background: #ffffff1f;
  color: #fff;
  transform: translateY(-1px);
}

.btn:hover::before { opacity: .07; }
.btn:hover::after { opacity: 0; }

.btn:active {
  transform: translateY(0) scale(.98);
}

.btn .btn-ic {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex: none;
}

.btn.primary {
  background: var(--rr-brand, #e10600);
  color: #fff;
  box-shadow: 0 10px 26px -14px var(--red-glow);
}

.btn.primary::before { background: #fff; }

.btn.primary:hover {
  background: #ff2a22;
  color: #fff;
}

.btn.primary:hover::after { opacity: 1; }

.btn.sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn:disabled,.btn[aria-disabled="true"] {
  opacity: .4;
  pointer-events: none;
}

.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  letter-spacing: .28em;
  color: var(--dim);
}

.scroll-hint i {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--team),transparent);
  animation: trail 1.9s ease-in-out infinite;
}

@keyframes trail {
0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }

}

/* ═══════════════ SECTIONS ═══════════════ */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px,5vw,56px);
}

section {
  position: relative;
  z-index: 2;
}

.sec {
  padding: clamp(64px,10vh,120px) 0;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.sec-head h2 {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.8rem,4.6vw,3.1rem);
  letter-spacing: -.04em;
  line-height: .95;
}

.sec-head h2 .accent {
  color: var(--team);
}

.rule {
  height: 1px;
  background: linear-gradient(90deg,var(--team),transparent);
  margin: 12px 0 0;
}

/* Reveal on scroll */
.rv {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .9s var(--ease),transform .9s var(--ease);
}

.rv.in {
  opacity: 1;
  transform: none;
}

.rv.d1 {
  transition-delay: .09s;
}

.rv.d2 {
  transition-delay: .18s;
}

.rv.d3 {
  transition-delay: .27s;
}

/* Card base */
.card {
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: border-color .3s var(--ease),transform .3s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(150deg,rgba(255,255,255,.05),transparent 42%);
}

.card:hover {
  border-color: var(--line-2);
}

/* ═══════════════ CONTROL DECK ═══════════════ */

/* The watch column reads top to bottom like a broadcast page: the window, then the controls, then
   the session picker as one strip, then the sources. Single column, so no card is stretched to the
   height of a taller neighbour. */
.deck {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  margin: 16px 0 18px;
}

/* The session picker is a strip, not a card: heading and both selects on one line. */
.deck > .deck-box:first-child {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 14px 16px;
}

.deck > .deck-box:first-child h3 {
  flex: none;
  margin: 0;
  align-self: center;
}

.deck > .deck-box:first-child .selects {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}

.stage-actions {
  margin-bottom: 4px;
}

@media (max-width: 620px) {
  .deck > .deck-box:first-child .selects { grid-template-columns: 1fr; }
}

.deck.has-open-menu,
.deck:focus-within,
.deck:has([aria-expanded="true"]) {
  z-index: 60;
}

@media(max-width:820px) {
  .deck {
    grid-template-columns: 1fr;
  }
}

.deck-box {
  position: relative;
  padding: 22px;
  overflow: visible;
}

.deck-box.has-open-menu,
.deck-box:focus-within,
.deck-box:has([aria-expanded="true"]) {
  z-index: 50;
  overflow: visible;
}

.deck-box h3 {
  font-family: 'JetBrains Mono';
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}

.selects {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

.sel {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.sel.is-open,
.sel:focus-within,
.sel:has([aria-expanded="true"]) {
  z-index: 40;
}

.sel label {
  display: block;
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 42px 14px 16px;
  border-radius: var(--r-sm);
  font-family: 'Inter';
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .25s var(--ease),background-color .25s var(--ease);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='%238A8F98' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

select:hover {
  border-color: var(--line-2);
  background-color: rgba(0,0,0,.55);
}

select:focus {
  outline: none;
  border-color: var(--team);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--team) 18%,transparent);
}

select option {
  background: #111214;
  color: var(--text);
}

select option:disabled {
  color: #4A4F57;
}

/* Branded dropdown shell. The native select remains in the DOM as the
   value source, while the visible menu is keyboard-accessible and styleable. */
.select-shell {
  position: relative;
  width: 100%;
}

.select-shell.is-open,
.select-shell:focus-within,
.select-shell:has([aria-expanded="true"]) {
  z-index: 50;
}

.select-shell>.native-select-source {
  position: absolute!important;
  width: 1px!important;
  height: 1px!important;
  margin: -1px!important;
  padding: 0!important;
  border: 0!important;
  overflow: hidden!important;
  clip: rect(0 0 0 0)!important;
  clip-path: inset(50%)!important;
  white-space: nowrap!important;
  opacity: 0!important;
  pointer-events: none!important;
}

.select-trigger {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(0,0,0,.42);
  color: var(--text);
  font: 600 .88rem 'Inter',sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .28s var(--ease),border-color .28s var(--ease),transform .28s var(--ease);
}

.select-trigger:hover {
  border-color: var(--line-2);
  background: rgba(0,0,0,.58);
  transform: translateY(-1px);
}

.select-trigger:focus-visible {
  outline: 2px solid var(--team);
  outline-offset: 3px;
  border-color: var(--team);
}

.select-trigger:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none;
}

.select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .3s var(--ease),border-color .3s var(--ease);
}

.select-trigger[aria-expanded="true"] {
  border-color: var(--team);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--team) 18%,transparent);
}

.select-trigger[aria-expanded="true"] .select-chevron {
  border-color: var(--team);
  transform: translateY(2px) rotate(225deg);
}

.select-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(14,15,17,.98);
  box-shadow: 0 24px 54px rgba(0,0,0,.72),0 0 0 1px rgba(225,6,0,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: selectMenuIn .22s var(--ease);
}

.select-menu[hidden] {
  display: none;
}

.select-menu.above {
  top: auto;
  bottom: calc(100% + 8px);
}

@keyframes selectMenuIn {
from {
    opacity: 0;
    transform: translateY(-6px) scale(.985);
  }

  to {
    opacity: 1;
    transform: none;
  }

}

.select-option {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--muted);
  font: 600 .8rem 'Inter',sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .2s var(--ease),border-color .2s var(--ease),color .2s var(--ease);
}

.select-option:hover,.select-option:focus-visible {
  color: var(--text);
  background: rgba(225,6,0,.1);
  border-color: rgba(225,6,0,.28);
  outline: none;
}

.select-option[aria-selected="true"] {
  color: #fff;
  background: color-mix(in srgb,var(--team) 16%,transparent);
  border-color: color-mix(in srgb,var(--team) 42%,transparent);
}

.select-option.is-disabled {
  color: var(--dim);
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}

.select-option.is-disabled:hover,.select-option.is-disabled:focus-visible {
  color: var(--dim);
  background: transparent;
  border-color: transparent;
}

/* Source chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  position: relative;
  overflow: hidden;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 11px 20px;
  border-radius: var(--r-sm);
  font-family: 'Archivo';
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .22s var(--ease),border-color .22s var(--ease),color .22s var(--ease),background-color .22s var(--ease);
}

.chip::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--team);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.chip:hover::after {
  transform: scaleX(1);
}

.chip.active {
  color: #fff;
  border-color: var(--team);
  background: color-mix(in srgb,var(--team) 16%,transparent);
  box-shadow: 0 0 26px -8px var(--red-glow);
}

.chip.active::after {
  transform: scaleX(1);
}

/* ═══════════════ PLAYER ═══════════════ */

.stage {
  position: relative;
  z-index: 1;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.95),0 0 100px -40px var(--red-glow);
  transition: border-color .35s var(--ease);
}

.stage:hover {
  border-color: color-mix(in srgb,var(--team) 45%,transparent);
  box-shadow: 0 46px 100px -30px rgba(0,0,0,.95),0 0 130px -35px var(--red-glow);
}

.stage-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}

.tl {
  display: flex;
  gap: 6px;
}

.tl i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2A2C31;
}

.tl i:first-child {
  background: var(--team);
}

.stage-bar .label {
  font-family: 'JetBrains Mono';
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-left: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-override-pill {
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color .3s var(--ease),border-color .3s var(--ease),color .3s var(--ease);
  margin-left: auto;
}

.stage-override-pill.active {
  background: rgba(225,6,0,.12);
  border: 1px solid rgba(225,6,0,.3);
  color: #FF6B62;
}

.stage-override-pill.inactive {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--dim);
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity .7s var(--ease);
}

.player iframe.loaded {
  opacity: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 32px;
  background: radial-gradient(70% 70% at 50% 45%,#141519,#000);
  z-index: 2;
  transition: opacity .45s var(--ease),visibility .45s;
}

.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  position: relative;
}

.spinner::before,.spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.spinner::before {
  border-top-color: var(--team);
  animation: spin .8s linear infinite;
}

.spinner::after {
  inset: 8px;
  border-bottom-color: rgba(255,255,255,.35);
  animation: spin 1.3s linear reverse infinite;
}

@keyframes spin {
to {
    transform: rotate(360deg);
  }

}

.overlay .lt {
  font-family: 'JetBrains Mono';
  font-size: .7rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}

.nostream {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 40px;
  z-index: 3;
  background: radial-gradient(70% 70% at 50% 45%,#141519,#000);
}

.nostream.visible {
  display: flex;
}

.nostream h3 {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: -.03em;
  transition: opacity 1.1s ease,transform 1.1s ease;
}

.nostream p {
  font-size: .9rem;
  color: var(--muted);
  max-width: 400px;
  line-height: 1.75;
  transition: opacity 1.1s ease,transform 1.1s ease;
}

.ns-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.ns-actions[hidden] {
  display: none;
}

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ═══════════════ TELEMETRY STRIP ═══════════════ */

.ticker {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg,rgba(225,6,0,.07),transparent 50%,rgba(225,6,0,.07));
  padding: 13px 0;
  margin: 0;
}

.ticker-track {
  display: flex;
  gap: 56px;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  animation: slide 34s linear infinite;
  -webkit-animation: slide 34s linear infinite;
}

@keyframes slide {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@-webkit-keyframes slide {
  from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
  to { -webkit-transform: translate3d(-50%, 0, 0); transform: translate3d(-50%, 0, 0); }
}

.ticker span {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ticker span::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--team);
  transform: rotate(45deg);
}

/* ═══════════════ DRIVER GALLERY ═══════════════ */

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 16px;
}

/* ── Driver grid (all 22) ── */
.drivers {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
  gap: 14px;
}

@media(max-width:900px) {
.drivers {
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap: 11px;
  }

}

@media(max-width:480px) {
.drivers {
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
  }

}

.dcard {
  position: relative;
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 3/4;
  border: 1px solid var(--line);
  isolation: isolate;
  cursor: pointer;
  background: radial-gradient(120% 80% at 50% 108%,color-mix(in srgb,var(--c,var(--team)) 55%,transparent),transparent 70%),
    linear-gradient(168deg,#1A1C21 0%,#0E0F12 62%,#0A0A0B 100%);
  transition: transform .5s var(--ease),border-color .35s var(--ease);
  /* Each card is its own paint island: hovering one no longer invalidates the whole grid. */
  contain: layout paint;
  backface-visibility: hidden;
  /* Cards below the fold are skipped entirely: their markup is not laid out, painted or even
     downloaded until they come near the viewport, which turns the 22-portrait burst into a
     handful. Safe here because aspect-ratio fixes the card's size without its contents. */
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

/* ── Loading placeholders ──
   The grid and the standings table are filled in after their request resolves. Without a
   placeholder the sections grow by thousands of pixels in a single frame and shove everything
   below them down - the largest layout shift on the site. These blocks reuse the real card and
   row skeletons, so their height is identical to the finished content by construction: no
   magic numbers, no reflow when the data lands. The pulse animates opacity only. */
.dcard.skel,
.row.skel {
  pointer-events: none;
  cursor: default;
  border-color: var(--line);
  background: linear-gradient(168deg,#15171B 0%,#0D0E11 70%);
  animation: skelPulse 1.8s ease-in-out infinite;
}

.dcard.skel {
  position: relative;
  overflow: hidden;
}

.dcard.skel::after,
.row.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,transparent 20%,rgba(255,255,255,.045) 48%,transparent 76%);
}

.row.skel {
  opacity: 1;
  transform: none;
  color: transparent;
  background: rgba(255,255,255,.014);
}

.row.skel .pos,
.row.skel .pts {
  color: transparent;
}

@keyframes skelPulse {
0%,100% {
    opacity: .38;
  }

50% {
    opacity: .62;
  }

}

html.lite-motion .dcard.skel,
html.lite-motion .row.skel {
  animation: none;
  opacity: .42;
}

@media (prefers-reduced-motion: reduce) {
.dcard.skel,
.row.skel {
    animation: none;
    opacity: .42;
  }

}

/* diagonal speed streaks behind the driver */
.dshade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background: repeating-linear-gradient(115deg,
    color-mix(in srgb,var(--c,var(--team)) 22%,transparent) 0 2px,
    transparent 2px 16px);
  mask-image: linear-gradient(180deg,rgba(0,0,0,.9),transparent 62%);
  -webkit-mask-image: linear-gradient(180deg,rgba(0,0,0,.9),transparent 62%);
  transition: opacity .5s var(--ease);
}

.dcard:hover .dshade {
  opacity: .85;
}

.dcard img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  /* No drop-shadow here: a 22px drop-shadow on a 440x587 cut-out is one of the most expensive
     things a phone can rasterise, and it was paid 22 times per grid paint. The same depth now
     comes from a static gradient on .dshadow, which costs nothing extra to draw. */
  filter: saturate(1.02) contrast(1.03);
  transition: transform .6s var(--ease);
}

.dcard.noimg img {
  display: none;
}

.dfall {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 3.4rem;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 2px color-mix(in srgb,var(--c,var(--team)) 75%,transparent);
  text-shadow: 0 0 42px color-mix(in srgb,var(--c,var(--team)) 40%,transparent);
}

.dcard.noimg .dfall {
  display: flex;
}

.dcard .dshadow {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 78%;
  height: 26%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(closest-side,rgba(0,0,0,.72),rgba(0,0,0,.28) 58%,transparent 78%);
  filter: blur(6px);
}

.dcard::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg,transparent 40%,rgba(10,10,11,.58) 66%,rgba(10,10,11,.94) 86%,rgba(10,10,11,.99) 100%);
}

.dcard::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  z-index: 4;
  background: var(--c,var(--team));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--ease);
}

.dcard:hover {
  transform: translateY(-6px);
  border-color: var(--c,var(--team));
}

.dcard:hover::before {
  transform: scaleY(1);
}

.dcard:hover img {
  transform: translateY(-6px) scale(1.045);
}

.dbody {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 13px 14px;
  z-index: 3;
}

.dnum {
  position: absolute;
  top: 9px;
  right: 11px;
  z-index: 3;
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(255,255,255,.4);
  transition: color .35s var(--ease),-webkit-text-stroke-color .35s var(--ease);
}

.dcard:hover .dnum {
  -webkit-text-stroke-color: var(--c,var(--team));
  color: color-mix(in srgb,var(--c,var(--team)) 22%,transparent);
}

.dpos {
  position: absolute;
  top: 9px;
  left: 11px;
  z-index: 3;
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  background: rgba(0,0,0,.62);
  border: 1px solid rgba(255,255,255,.16);
  padding: 3px 7px;
  border-radius: 5px;
}

.dcard.lead .dpos {
  background: var(--c,var(--team));
  border-color: transparent;
  color: var(--c-ink,var(--team-ink));
}

.dcard:focus-visible {
  outline: 2px solid var(--c,var(--team));
  outline-offset: 3px;
}

.dhint {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translate(-50%,-6px);
  z-index: 3;
  font-family: 'JetBrains Mono';
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: rgba(0,0,0,.66);
  border: 1px solid var(--c,var(--team));
  color: #fff;
  padding: 4px 9px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .35s var(--ease),transform .35s var(--ease);
}

.dcard:hover .dhint,.dcard:focus-visible .dhint {
  opacity: 1;
  transform: translate(-50%,0);
}

.fbadge {
  position: absolute;
  top: 38px;
  left: 11px;
  z-index: 3;
  font-family: 'JetBrains Mono';
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(0,0,0,.66);
  border: 1px solid var(--c,var(--team));
  color: #fff;
  padding: 4px 8px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
}

.fbadge[hidden] {
  display: none;
}

.dname {
  font-family: 'Archivo';
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: .95rem;
  letter-spacing: -.03em;
  line-height: 1.05;
}

.dname small {
  display: block;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-size: .66rem;
  letter-spacing: .02em;
  text-transform: none;
  color: #C6CAD1;
  margin-bottom: 2px;
}

.dteam {
  font-family: 'JetBrains Mono';
  font-size: .55rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dteam i {
  width: 3px;
  height: 11px;
  background: var(--c,var(--team));
  border-radius: 2px;
  flex-shrink: 0;
}

.dpts {
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  color: var(--c,var(--team));
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: .08em;
}

.shot {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4/5;
  border: 1px solid var(--line);
  cursor: pointer;
  isolation: isolate;
  transition: transform .6s var(--ease),border-color .5s var(--ease),box-shadow .6s var(--ease);
}

.shot img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  position: absolute;
  top: -6%;
  left: 0;
  filter: grayscale(.55) contrast(1.1) brightness(.78);
  transition: transform 1.1s var(--ease),filter .7s var(--ease);
}

.shot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,transparent 30%,rgba(10,10,11,.55) 62%,rgba(10,10,11,.96) 100%);
  transition: opacity .5s;
}

.shot:hover {
  transform: translateY(-8px);
  border-color: var(--team);
  box-shadow: 0 34px 70px -28px rgba(0,0,0,.95),0 0 60px -26px var(--red-glow);
}

.shot:hover img {
  transform: scale(1.09);
  filter: grayscale(0) contrast(1.14) brightness(.92);
}

.shot-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  z-index: 2;
}

.shot-num {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 3.4rem;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,.34);
  transition: color .35s var(--ease),-webkit-text-stroke-color .35s var(--ease);
}

.shot:hover .shot-num {
  -webkit-text-stroke-color: var(--team);
  color: color-mix(in srgb,var(--team) 18%,transparent);
}

.shot-name {
  font-family: 'Archivo';
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: 1.25rem;
  letter-spacing: -.03em;
  margin-top: 8px;
}

.shot-team {
  font-family: 'JetBrains Mono';
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shot-team i {
  width: 3px;
  height: 13px;
  background: var(--c,var(--team));
  border-radius: 2px;
}

.shot-cap {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-family: 'JetBrains Mono';
  font-size: .5rem;
  letter-spacing: .1em;
  color: rgba(255,255,255,.4);
  background: rgba(0,0,0,.5);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ═══════════════ STANDINGS ═══════════════ */

.tabs {
  display: flex;
  gap: 8px;
}

.tab {
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-family: 'Archivo';
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .22s var(--ease),border-color .22s var(--ease),color .22s var(--ease);
}

.tab:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.tab.active {
  background: var(--team);
  border-color: var(--team);
  color: var(--team-ink);
  box-shadow: 0 8px 26px -10px var(--red-glow);
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity .3s;
}

.row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.014);
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease),border-color .25s var(--ease),background-color .25s var(--ease);
  opacity: 0;
  transform: translateX(-16px);
  animation: rowIn .55s var(--ease) forwards;
}

@keyframes rowIn {
to {
    opacity: 1;
    transform: none;
  }

}

.row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--c,var(--team));
  transform: scaleY(0);
  transition: transform .4s var(--ease);
}

.row:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--line-2);
  transform: translateX(6px);
}

.row:hover::before {
  transform: scaleY(1);
}

.row.p1 {
  background: linear-gradient(90deg,color-mix(in srgb,var(--team) 12%,transparent),transparent 60%);
  border-color: color-mix(in srgb,var(--team) 32%,transparent);
}

.pos {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,.22);
  line-height: 1;
}

.row.p1 .pos,.row.p2 .pos,.row.p3 .pos {
  color: var(--text);
}

.row.p1 .pos {
  color: var(--team);
}

.who {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.who b {
  font-family: 'Archivo';
  font-weight: 800;
  font-size: .98rem;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who small {
  font-family: 'JetBrains Mono';
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.pts {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text);
}

.pts small {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-size: .55rem;
  letter-spacing: .18em;
  color: var(--dim);
  margin-left: 5px;
  font-weight: 400;
}

.state {
  color: var(--muted);
  font-family: 'JetBrains Mono';
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 26px;
  text-align: center;
}

/* ═══════════════ NEWS ═══════════════ */

.news-card {
  overflow: hidden;
}

.news-feed {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  padding: 20px;
}

.news-feed>.state {
  grid-column: 1/-1;
}

.news-item {
  position: relative;
  overflow: hidden;
  padding: 19px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.018);
  transition: transform .4s var(--ease),border-color .35s var(--ease),background .35s var(--ease),box-shadow .35s var(--ease);
}

.news-item::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--team);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .4s var(--ease);
}

.news-item:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  background: rgba(255,255,255,.045);
  box-shadow: 0 18px 38px -26px var(--red-glow);
}

.news-item:hover::before {
  transform: scaleY(1);
}

.news-item:first-child {
  grid-column: 1/-1;
  background: linear-gradient(120deg,color-mix(in srgb,var(--team) 10%,transparent),rgba(255,255,255,.018) 48%);
}

.news-item:first-child h3 {
  font-size: clamp(1.1rem,2.5vw,1.5rem);
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.news-tag {
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--team);
}

.news-date {
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  letter-spacing: .08em;
  color: var(--dim);
  white-space: nowrap;
}

.news-item h3 {
  font-family: 'Archivo';
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.news-item p {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.7;
  white-space: pre-line;
}

/* ═══════════════ RACE TIMES ═══════════════ */

.race-times-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.race-times-gp {
  flex: 1 1 260px;
  min-width: 220px;
}

/* Segmented "My time / Track time" pill — photo-style geometry, site colors. */
.seg {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  flex-shrink: 0;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: 'Archivo';
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .22s var(--ease), color .22s var(--ease);
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn.active {
  background: var(--team);
  color: var(--team-ink);
  box-shadow: 0 8px 26px -10px var(--red-glow);
}

.race-times-note {
  margin: 0 0 12px;
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}

.race-times-list {
  border-top: 1px solid var(--line);
}

.rt-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}

.rt-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.rt-day {
  font-family: 'Archivo';
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -.01em;
}

.rt-mon {
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.rt-name {
  font-family: 'Archivo';
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rt-time {
  font-family: 'JetBrains Mono';
  font-size: .82rem;
  color: var(--team);
  white-space: nowrap;
}

.rt-row.is-past .rt-day,
.rt-row.is-past .rt-name {
  color: var(--dim);
}

/* ═══════════════ RACE REPLAYS ═══════════════
   Built out of the site's own controls: .sec-head for the header, .tabs/.tab for filters and
   feeds, .card for the player, .rows/.row for the session list. Only the replay-specific bits
   live here, so the view inherits the theme instead of re-inventing it. */

.rp-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 0 0 18px;
}

.rp-count {
  color: var(--dim);
  font-family: 'JetBrains Mono',monospace;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rp-player {
  margin: 0 0 18px;
  padding: 0;
  overflow: hidden;
}

.rp-stage {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border-bottom: 1px solid var(--line);
}

.rp-frame,
.rp-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.rp-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  font-family: 'JetBrains Mono',monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}

.rp-direct {
  color: var(--accent, #e10600);
  text-transform: none;
  letter-spacing: 0;
  font-size: .78rem;
  text-decoration: underline;
}

.rp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.rp-title {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: -.01em;
}

.rp-sub {
  margin-top: 4px;
  color: var(--dim);
  font-family: 'JetBrains Mono',monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rp-rows {
  gap: 8px;
}

/* Scoped past plain .row so the shared mobile .row columns (34px/42px first track) do not
   squash the event name on a phone. */

/* Rows reuse .row for the frame, bar, hover lift and entrance animation; only the column
   layout changes because a replay needs four fields instead of three. */
.rp-rows .rp-row {
  grid-template-columns: minmax(0,1fr) auto 62px;
  gap: 14px;
  align-items: center;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  --team: var(--red);
}

.rp-rows .rp-row.is-active {
  border-color: color-mix(in srgb,var(--red) 55%,transparent);
  background: color-mix(in srgb,var(--red) 8%,transparent);
}


.rp-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rp-event {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 800;
  font-size: .88rem;
  letter-spacing: .005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-meta-line {
  color: var(--dim);
  font-size: .7rem;
  letter-spacing: .05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-session {
  font-family: 'JetBrains Mono',monospace;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.rp-play {
  justify-self: end;
  font-family: 'Archivo';
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
}

.rp-rows .rp-row:hover .rp-play {
  color: var(--text);
}

.rp-note {
  margin: 20px 0 0;
  color: var(--dim);
  font-size: .72rem;
  line-height: 1.7;
}

@media(max-width:960px) {
  .scroll-hint {
    display: none;
  }
}

@media(max-width:760px) {
.rp-bar {
    margin-bottom: 14px;
    gap: 10px;
  }

  .rp-bar .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    padding-bottom: 2px;
  }

  .rp-bar .tabs::-webkit-scrollbar {
    display: none;
  }

  .rp-bar .tabs .tab {
    flex: 0 0 auto;
  }

  .rp-rows .rp-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 6px 12px;
    padding: 12px 14px;
  }

  .rp-rows .rp-main {
    grid-column: 1;
    grid-row: 1;
  }

  .rp-rows .rp-play {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .rp-rows .rp-session {
    grid-column: 1;
    grid-row: 2;
  }

  .rp-meta {
    padding: 12px 14px;
  }

}

/* ═══════════════ MODALS ═══════════════ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(5,5,6,.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  contain: layout paint;
}

.modal.open {
  display: flex;
  animation: fade .32s var(--ease);
}

@keyframes fade {
from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

.sheet {
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  background: #0E0F11;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  box-shadow: 0 40px 100px rgba(0,0,0,.9);
  animation: pop .42s var(--ease);
  position: relative;
}

.sheet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,var(--team),transparent);
}

@keyframes pop {
from {
    opacity: 0;
    transform: translateY(26px) scale(.97);
  }

  to {
    opacity: 1;
    transform: none;
  }

}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.sheet-head h2 {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.3rem;
  letter-spacing: -.03em;
}

.x {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform .25s var(--ease),border-color .25s var(--ease),color .25s var(--ease),background-color .25s var(--ease);
}

.x:hover {
  border-color: var(--team);
  color: var(--team);
  transform: rotate(90deg);
  background: color-mix(in srgb,var(--team) 10%,transparent);
}

/* Team grid */
@keyframes chip-flash-in {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb,var(--amber) 70%,transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in srgb,var(--amber) 0%,transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.chip.chip-flash {
  animation: chip-flash-in 1s ease-out 3;
  border-color: var(--amber);
}

/* Locked feed chip — members-only source (4K) */
.chip-locked {
  border-style: dashed;
  border-color: color-mix(in srgb,var(--amber) 45%,var(--line));
  color: color-mix(in srgb,var(--amber) 75%,var(--text));
}

.chip-locked:hover {
  border-color: var(--amber);
  color: var(--text);
  background: color-mix(in srgb,var(--amber) 12%,transparent);
}


/* ── Custom livery ─────────────────────────────────────────────────────── */
.livery-custom {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.lc-copy h3 {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 800;
  font-size: .92rem;
  letter-spacing: .01em;
}

.lc-copy p {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.6;
}

.lc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#liveryColorPicker {
  width: 52px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(0,0,0,.4);
  cursor: pointer;
}

#liveryColorPicker::-webkit-color-swatch-wrapper { padding: 0; }
#liveryColorPicker::-webkit-color-swatch { border: 0; border-radius: 7px; }
#liveryColorPicker::-moz-color-swatch { border: 0; border-radius: 7px; }

#liveryColorHex {
  width: 132px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(0,0,0,.4);
  color: var(--text);
  font-family: 'JetBrains Mono',monospace;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#liveryColorHex:focus {
  outline: none;
  border-color: var(--team);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--team) 22%,transparent);
}

#liveryColorHex.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--red) 20%,transparent);
}

.lc-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.lc-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: var(--sw);
  border: 1px solid rgba(255,255,255,.2);
  cursor: pointer;
  transition: transform .2s var(--ease),border-color .2s var(--ease);
}

.lc-swatch:hover,
.lc-swatch:focus-visible {
  transform: translateY(-2px) scale(1.1);
  border-color: #fff;
}

.tcard-custom .tbadge { color: #fff; }

.teams {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(146px,1fr));
  gap: 11px;
}

.tcard {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
  transition: transform .25s var(--ease),border-color .25s var(--ease);
}

.tcard::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s;
  background: linear-gradient(160deg,color-mix(in srgb,var(--tc) 22%,transparent),transparent 65%);
}

.tcard:hover {
  transform: translateY(-4px);
  border-color: var(--tc);
  box-shadow: 0 16px 38px -16px color-mix(in srgb,var(--tc) 60%,transparent);
}

.tcard:hover::before {
  opacity: 1;
}

.tcard.on {
  border-color: var(--tc);
  box-shadow: 0 0 0 1px var(--tc),0 16px 40px -18px var(--tc);
}

.tcard.on::before {
  opacity: 1;
}

.tcard:focus-visible {
  outline: 2px solid var(--team);
  outline-offset: 3px;
}

.tbadge {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: .72rem;
  letter-spacing: .02em;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.8);
}

.tbadge img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.45));
  transition: transform .36s var(--ease);
}

.tbadge.has-logo .tabbr {
  display: none;
}

.tbadge.mark svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.45));
}

.tcard:hover .tbadge img,.tcard.on .tbadge img {
  transform: scale(1.08);
}

.tname {
  font-family: 'Archivo';
  font-weight: 700;
  font-size: .8rem;
  position: relative;
  z-index: 1;
}

.tick {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--tc);
  color: #000;
  font-size: .65rem;
  font-weight: 900;
  display: none;
  place-items: center;
  z-index: 2;
}

.tcard.on .tick {
  display: grid;
}

/* Driver profile */
.driver-sheet {
  max-width: 640px;
}

.dp-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 158px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  isolation: isolate;
  background: radial-gradient(120% 90% at 8% 110%,color-mix(in srgb,var(--dc,var(--team)) 42%,transparent),transparent 65%),
    linear-gradient(160deg,#191B20 0%,#0E0F12 60%,#0A0A0B 100%);
}

.dp-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  background: repeating-linear-gradient(115deg,
    color-mix(in srgb,var(--dc,var(--team)) 20%,transparent) 0 2px,
    transparent 2px 16px);
  mask-image: linear-gradient(180deg,rgba(0,0,0,.9),transparent 70%);
  -webkit-mask-image: linear-gradient(180deg,rgba(0,0,0,.9),transparent 70%);
}

.dp-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  z-index: 2;
  background: var(--dc,var(--team));
}

.dp-info {
  position: relative;
  z-index: 2;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  min-width: 0;
}

.dp-eyebrow {
  font-family: 'JetBrains Mono';
  font-size: .56rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.dp-name {
  font-family: 'Archivo';
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: clamp(1.5rem,5vw,2.1rem);
  letter-spacing: -.03em;
  line-height: 1.02;
}

.dp-name small {
  display: block;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .02em;
  text-transform: none;
  color: #C6CAD1;
  margin-bottom: 3px;
}

.dp-team {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono';
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dp-team img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.5));
}

.dp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.dp-pos {
  font-family: 'JetBrains Mono';
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  background: var(--dc,var(--team));
  color: var(--dc-ink,var(--team-ink));
  padding: 4px 9px;
  border-radius: 5px;
}

.dp-pill {
  font-family: 'JetBrains Mono';
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--text);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.16);
  padding: 4px 9px;
  border-radius: 5px;
}

.dp-photo {
  position: relative;
  z-index: 1;
  min-height: 215px;
  background: linear-gradient(180deg,transparent 30%,color-mix(in srgb,var(--dc,var(--team)) 26%,transparent));
}

.dp-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  filter: saturate(1.02) contrast(1.03) drop-shadow(0 18px 22px rgba(0,0,0,.6));
}

.dp-fall {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 3rem;
  color: transparent;
  -webkit-text-stroke: 2px color-mix(in srgb,var(--dc,var(--team)) 75%,transparent);
}

.dp-photo.noimg img {
  display: none;
}

.dp-photo.noimg .dp-fall {
  display: flex;
}

.dp-sec {
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dp-sec::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.dp-tiles {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 9px;
}

.dp-tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  background: rgba(255,255,255,.02);
  transition: border-color .35s var(--ease);
}

.dp-tile b {
  display: block;
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -.02em;
}

.dp-tile span {
  font-family: 'JetBrains Mono';
  font-size: .53rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dp-tile.hl {
  border-color: var(--dc,var(--team));
  box-shadow: 0 0 26px -12px var(--dc,var(--team));
}

.dp-tile.hl b {
  color: var(--dc,var(--team));
}

.dp-tiles.skel .dp-tile {
  height: 64px;
  border-color: transparent;
  background: linear-gradient(100deg,rgba(255,255,255,.045) 30%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.045) 70%);
  background-size: 200% 100%;
  animation: dpShimmer 1.1s linear infinite;
}

@keyframes dpShimmer {
to {
    background-position: -200% 0;
  }

}

.dp-note {
  font-family: 'JetBrains Mono';
  font-size: .58rem;
  color: var(--dim);
  margin-top: 9px;
  letter-spacing: .04em;
}

.dp-bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.dp-fact {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.015);
  min-width: 0;
}

.dp-fact small {
  display: block;
  font-family: 'JetBrains Mono';
  font-size: .52rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 3px;
}

.dp-fact b {
  font-size: .82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

#dpFollow.on {
  border-color: var(--dc,var(--team));
  color: #fff;
  background: color-mix(in srgb,var(--dc,var(--team)) 30%,transparent);
}

@media(max-width:560px) {
.dp-card {
    grid-template-columns: 1fr;
  }

  .dp-photo {
    min-height: 190px;
    order: -1;
  }

  .dp-tiles {
    grid-template-columns: repeat(2,1fr);
  }

}

@media(prefers-reduced-motion:reduce) {
.dp-tiles.skel .dp-tile {
    animation: none;
  }

}

/* Results rows */
.rrow {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: linear-gradient(90deg,color-mix(in srgb,var(--race-team,var(--team)) 24%,transparent),rgba(255,255,255,.014) 76%);
  position: relative;
  overflow: hidden;
  transition: transform .22s var(--ease),border-color .22s var(--ease);
}

.rrow::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--race-team,var(--team));
  opacity: .9;
  box-shadow: 0 0 18px -5px var(--race-team,var(--team));
}

.rrow:hover {
  border-color: var(--line-2);
  background: linear-gradient(90deg,color-mix(in srgb,var(--race-team,var(--team)) 32%,transparent),rgba(255,255,255,.045) 78%);
  transform: translateX(5px);
}

.content-fade-target {
  opacity: 1;
  transition: opacity .18s ease-out;
}

.content-fade-target.content-fading-out {
  opacity: 0;
}

@media(prefers-reduced-motion:reduce) {
  .content-fade-target {
    transition: none!important;
  }

  .content-fade-target.content-fading-out {
    opacity: 1!important;
  }
}

#sessionsResultsLoading.results-fade-in,
#sessionsResults.results-fade-in {
  animation: resultsFadeIn .36s ease-out both;
}

@keyframes resultsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rrow .pos {
  font-size: 1.15rem;
}

.rtime {
  font-family: 'JetBrains Mono';
  font-size: .76rem;
  font-weight: 500;
  color: var(--amber);
  text-align: right;
}

/* ═══════════════ ACCORDIONS / LEGAL ═══════════════ */

.acc-item {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  overflow: hidden;
  background: rgba(255,255,255,.014);
  transition: border-color .25s var(--ease),background-color .25s var(--ease);
}

.acc-item:hover {
  border-color: var(--line-2);
  background: rgba(255,255,255,.04);
}

.acc-item.active {
  border-color: color-mix(in srgb,var(--team) 42%,transparent);
}

.acc-q {
  width: 100%;
  background: none;
  border: 0;
  color: var(--text);
  font-family: 'Inter';
  font-size: .9rem;
  font-weight: 600;
  padding: 17px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: color .3s;
}

.acc-q:hover {
  color: var(--team);
}

.ic {
  width: 18px;
  height: 18px;
  position: relative;
  flex-shrink: 0;
  transition: transform .4s var(--ease);
}

.ic::before,.ic::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: var(--team);
  border-radius: 2px;
  transition: opacity .3s var(--ease),transform .3s var(--ease);
}

.ic::before {
  width: 12px;
  height: 2px;
}

.ic::after {
  width: 2px;
  height: 12px;
}

.acc-item.active .ic {
  transform: rotate(180deg);
}

.acc-item.active .ic::after {
  opacity: 0;
}

.acc-item {
  contain: layout paint;
}

/* grid-template-rows 0fr -> 1fr animates to the natural height without measuring in JS
   and without animating max-height (which relaid out the panel every frame). */
.acc-a {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows .42s var(--ease);
}

.acc-item.active .acc-a {
  grid-template-rows: 1fr;
}

.acc-a-in {
  min-height: 0;
  /* No bottom padding here. A grid item's padding is added to the automatic minimum size of
     its track, so `grid-template-rows: 0fr` could never reach 0 while the padding existed -
     every collapsed row stayed 18px tall and leaked a sliver of its first line. The closing
     gap now comes from the last child's margin, which the 0fr track ignores. */
  padding: 0 20px;
  font-size: .86rem;
  line-height: 1.85;
  color: #B8BDC5;
}

.acc-a-in > :last-child {
  margin-bottom: 18px;
}

.acc-a-in p {
  margin-bottom: 11px;
}

.acc-a-in ul {
  list-style: none;
  margin: 0 0 11px;
}

.acc-a-in li {
  padding: 5px 0 5px 18px;
  position: relative;
}

.acc-a-in li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 5px;
  height: 5px;
  background: var(--team);
  transform: rotate(45deg);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: fadeUp .55s var(--ease);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 26px 6px;
}

.panel-head h2 {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.25rem;
  letter-spacing: -.03em;
}

.stamp {
  font-family: 'JetBrains Mono';
  font-size: .6rem;
  letter-spacing: .16em;
  color: var(--dim);
  padding: 0 26px 14px;
  text-transform: uppercase;
}

.acc-wrap {
  padding: 0 26px 24px;
}

/* ═══════════════ PERFORMANCE + RESPONSIVE HARDENING ═══════════════ */

.hero-layer picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-layer picture>img {
  width: 100%;
  height: 100%;
}

/* These used to use content-visibility: auto with estimated placeholder heights. When a
   section rendered, the estimate was replaced by its real height and everything below it
   jumped (0.49 cumulative layout shift). Sections now paint normally and only long, uniform
   list rows skip off-screen work - their intrinsic size is exact, so nothing moves. */
.sec,footer {
  contain: layout style;
}

/* Paint-skipping for long lists. Rendering hints only - these items carry no
   entrance animations, so output is pixel-identical with less render work. */
.rrow {
  content-visibility: auto;
  contain-intrinsic-size: auto 58px;
}

.news-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 170px;
}

.race-time-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 210px;
}

.radio-rc-list>li {
  content-visibility: auto;
  contain-intrinsic-size: auto 46px;
}

button,a,select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,a:focus-visible,select:focus-visible {
  outline: 2px solid var(--team);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(10,10,11,.78);
  color: var(--text);
  cursor: pointer;
  place-content: center;
  gap: 4px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease),opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.stage-bar .label {
  min-width: 0;
}

#freef1Toast {
  padding-bottom: env(safe-area-inset-bottom);
  padding-right: env(safe-area-inset-right);
}

@media(max-width:900px) {
.nav {
    gap: 10px;
    padding: 12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));
  }

  .nav.stuck {
    padding: 9px max(12px,env(safe-area-inset-right)) 9px max(12px,env(safe-area-inset-left));
    background: rgba(10,10,11,.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .nav-right {
    gap: 6px;
    margin-left: auto;
  }

  .nav-toggle {
    display: grid;
  }

  .nav .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: max(12px,env(safe-area-inset-left));
    right: max(12px,env(safe-area-inset-right));
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(10,10,11,.98);
    box-shadow: 0 24px 60px rgba(0,0,0,.72);
    transform: translateY(-8px) scale(.98);
    transform-origin: top;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s,transform .25s var(--ease),visibility .2s;
  }

  .nav .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 14px;
    font-size: .82rem;
  }

  .nav-links a::after {
    left: 14px;
    right: auto;
    width: 34px;
  }

  .hero-layer {
    will-change: auto;
  }

  .stage-bar {
    padding: 10px 12px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .stage-bar .label {
    flex: 1 1 180px;
  }

  .stage-override-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

}

@media(max-width:640px) {
:root {
    --r: 14px;
    --blur: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-text b {
    font-size: 1rem;
  }

  .pill {
    padding: 7px 9px;
    font-size: .66rem;
  }

  .pill.live {
    display: none!important;
  }

  .hero {
    min-height: max(680px,100svh);
  }

  .hero-inner {
    padding-top: 100px;
    padding-bottom: 74px;
  }

  .hero h1 {
    font-size: clamp(2.8rem,17vw,5.4rem);
  }

  .hero-sub {
    line-height: 1.65;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    align-items: stretch;
  }

  .hero-meta .pill {
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.45;
  }

  .hero-meta .pill.next {
    width: 100%;
  }

  .sec {
    padding: 64px 0;
  }

  .sec-head {
    margin-bottom: 24px;
  }

  .deck-box {
    padding: 17px;
  }

  .sel {
    min-width: 100%;
  }

  select {
    font-size: 16px;
    min-height: 48px;
  }

  .chips {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .chip {
    min-height: 46px;
    padding: 10px 8px;
  }

  /* An odd last broadcaster takes the whole row instead of leaving a hole. Never the tab bar: this
     rule matched All (third of three), stretched it full width and dropped it under English/Other. */
  .chips:not(.tabs) .chip:last-child:nth-child(odd) {
    grid-column: 1/-1;
  }

  .news-feed {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .news-item:first-child {
    grid-column: auto;
  }

  .player {
    min-height: 0;
  }

  .nostream {
    padding: 22px;
  }

  .nostream h3 {
    font-size: 1.2rem;
  }

  .nostream p {
    font-size: .82rem;
  }

  .stage-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stage-actions .btn {
    width: 100%;
    padding-inline: 10px;
  }

  .drivers {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px;
  }

  .dcard {
    border-radius: 9px;
  }

  .dbody {
    padding: 10px;
  }

  .dname {
    font-size: .82rem;
  }

  .dnum {
    font-size: 1.5rem;
  }

  .dteam {
    font-size: .49rem;
  }

  .dpts {
    font-size: .52rem;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    min-height: 44px;
    flex: 1;
    padding: 9px 13px;
    white-space: nowrap;
  }

  .modal {
    padding: max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
    /* Centred, with equal breathing room above and below. It used to be pinned to the bottom
       edge (align-items: flex-end), which left a 125px hole above the sheet on a phone. */
    align-items: center;
  }

  .sheet {
    max-height: min(92svh,780px);
    border-radius: 16px;
    padding: 17px;
    overscroll-behavior: contain;
  }

  .sheet-head {
    position: sticky;
    top: -17px;
    z-index: 5;
    margin: -17px -17px 16px;
    padding: 17px;
    background: #0E0F11;
    border-bottom: 1px solid var(--line);
  }

  .x {
    width: 44px;
    height: 44px;
  }

  .panel-head {
    padding: 19px 17px 6px;
  }

  .stamp {
    padding: 0 17px 12px;
  }

  .acc-wrap {
    padding: 0 12px 18px;
  }

  .acc-q {
    min-height: 52px;
    padding: 14px;
    font-size: .86rem;
  }

  .acc-a-in {
    padding: 0 14px;
  }

  .acc-a-in > :last-child {
    margin-bottom: 16px;
  }

  .rrow {
    grid-template-columns: 34px minmax(0,1fr);
    padding: 10px;
    gap: 9px;
  }

  .rtime {
    grid-column: 2;
    text-align: left;
    white-space: normal;
  }

  .race-time-item {
    padding: 15px 14px;
  }

  .race-time-top {
    align-items: flex-start;
  }

  .race-time-title {
    font-size: .92rem;
  }

  .race-time-status {
    font-size: .52rem;
    padding: 5px 7px;
  }

  .race-time-sessions {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px;
  }

  .race-time-session {
    padding: 8px 7px;
  }

  .race-time-session time {
    font-size: .55rem;
  }

  .scanlines {
    opacity: .2;
  }

  .grain {
    opacity: .02;
  }

  .vignette {
    background: radial-gradient(130% 95% at 50% 38%,transparent 35%,rgba(0,0,0,.68) 100%);
  }

  .scroll-hint {
    display: none;
  }

}

@media(max-width:430px) {
.brand-text {
    display: none;
  }

  .nav-right .pill {
    font-size: .61rem;
    padding-inline: 8px;
  }

  #clock {
    display: none;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .hero h1 {
    font-size: clamp(2.65rem,18vw,4.3rem);
    overflow-wrap: anywhere;
  }

  .hero h1 em {
    -webkit-text-stroke-width: 1.25px;
  }

  .stage-actions {
    grid-template-columns: 1fr;
  }

  .teams {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .row {
    grid-template-columns: 34px minmax(0,1fr) auto;
    padding: 10px 8px;
  }

  .who b {
    font-size: .86rem;
  }

  .who small {
    font-size: .52rem;
  }

  .pts {
    font-size: .95rem;
  }

  .pts small {
    display: none;
  }

  .tip {
    width: calc(100% - 24px);
    padding: 18px;
  }

  .dots {
    max-width: 145px;
    flex-wrap: wrap;
  }

}

@media(hover:none) {
.card:hover,.stage:hover,.dcard:hover,.shot:hover,.row:hover,.rrow:hover,.tcard:hover,.btn:hover,.chip:hover,.pill:hover {
    transform: none;
  }

  .dcard img,.shot img {
    will-change: auto;
  }

}

@media(prefers-reduced-motion:reduce) {
html {
    scroll-behavior: auto;
  }

  #speedCanvas {
    display: none;
  }

  .ticker-track, .brand-mark::after, .pill.live .dot {
    animation: none!important;
  }

  .hero h1 .l>span,.hero-sub,.hero-meta,.hero-cta,.dcard,.row {
    opacity: 1;
    transform: none;
    animation: none!important;
  }

}

/* ═══════════════ VIEWS (home / news / info) ═══════════════ */

.view {
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .42s var(--ease),transform .42s var(--ease);
}

.view.is-active {
  opacity: 1;
  transform: none;
}

.view.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
  transition-duration: .26s;
  pointer-events: none;
}

.view[hidden] {
  display: none;
}

body.view-swapping {
  overflow-x: hidden;
}

/* Sub pages start below the fixed header and fill the viewport so the footer never floats mid-screen. */
.sub-sec {
  padding-top: clamp(120px,16vh,168px);
  min-height: calc(100svh - 240px);
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-family: 'JetBrains Mono',monospace;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  transition: color .3s var(--ease),border-color .3s var(--ease),transform .3s var(--ease);
}

.back-home+.eyebrow {
  display: block;
}

.back-home .arr {
  display: inline-block;
  transition: transform .35s var(--ease);
}

.back-home:hover {
  color: var(--text);
  border-color: var(--team);
  transform: translateX(-2px);
}

.back-home:hover .arr {
  transform: translateX(-4px);
}

.nav-links a.current {
  color: var(--text);
}

.nav-links a.current::after {
  transform: scaleX(1);
}

@media(prefers-reduced-motion:reduce) {
.view,.view.is-leaving {
    transition: none;
    transform: none;
  }

}

/* ═══════════════ DISCORD VIEW ═══════════════ */

.discord-card {
  padding: clamp(34px,6vw,64px) 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
}

.discord-glow {
  position: absolute;
  inset: auto 0 -40% 0;
  height: 70%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%,rgba(88,101,242,.28),transparent 62%);
}

.discord-badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  color: #5865F2;
}

.discord-mark {
  width: clamp(72px,12vw,104px);
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(88,101,242,.45));
}

.discord-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(0,0,0,.45);
  color: var(--text);
}

.discord-favicon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 6px 18px rgba(225,6,0,.35);
}

.discord-brand b {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -.03em;
}

.discord-title {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.5rem,3.6vw,2.2rem);
  letter-spacing: -.02em;
  margin-top: 6px;
}

.discord-text {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.65;
  max-width: 520px;
}

.discord-text b {
  color: var(--text);
}

.discord-join {
  --team: #5865F2;
  --team-2: #7983F5;
  margin-top: 8px;
  padding: 17px 34px;
  font-size: .88rem;
  gap: 12px;
  text-decoration: none;
}

.discord-join:hover {
  box-shadow: 0 18px 40px -14px rgba(88,101,242,.75);
}

.discord-url {
  font-size: .66rem;
  color: var(--dim);
  letter-spacing: .08em;
}

@media(max-width:520px) {
.discord-badge {
    flex-direction: column;
    gap: 14px;
  }

  .discord-card {
    padding: 34px 18px;
  }

}

/* Unread Help badge: pin it to the top-right corner of the Help nav link. */
.help-nav-link { position: relative; }
.help-nav-link .help-notification-dot {
  position: absolute; top: 5px; right: 6px; z-index: 2;
  display: block; width: 8px; height: 8px; margin: 0; border-radius: 50%;
  background: #ff3931; box-shadow: 0 0 12px rgba(255, 57, 49, .85);
}
.help-notification-dot[hidden] { display: none !important; }

/* ── 4K join nudge ───────────────────────────────────────────────── */
.jn-copy {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.jn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.jn-actions .btn { text-decoration: none; }
.jn-optout {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  letter-spacing: .06em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.jn-optout input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent, #e10600);
  cursor: pointer;
  margin: 0;
}

/* ── Feed tabs: English / Other / All ── */
/* A grid, not a wrapping flex row, so every tab is the same width and height at every width. As
   flex items they were sized to their own label (English 87px, Other 76px, All 54px). */
.chips.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* The tab bar is a filter, not a feed: it must not compete with the chips below it. */
.chips.tabs .chip {
  padding: 7px 10px;
  text-align: center;
  font-size: .68rem;
  letter-spacing: .12em;
  background: transparent;
  border-color: transparent;
  color: var(--dim);
}

.chips.tabs .chip::after {
  display: none;
}

.chips.tabs .chip:hover {
  transform: none;
  color: var(--text);
  border-color: var(--line);
}

.chips.tabs .chip.active {
  color: #fff;
  border-color: var(--line-2);
  background: rgba(0,0,0,.5);
}

/* ── Specials: onboards and the data channel, set apart from the broadcasters ── */
.special-row {
  /* #links is a flex row on desktop but a TWO-COLUMN GRID on phones, so the specials block is a grid
     item there and was confined to one half-width column (141px inside a 328px card) with every
     chip bleeding off the right edge. Span the grid, and claim a full basis in the flex case. */
  grid-column: 1 / -1;
  flex: 1 0 100%;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}

.special-head {
  width: 100%;
  font-family: 'Archivo';
  font-weight: 700;
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

.chip-special {
  border-style: dashed;
  border-color: var(--line-2);
}

/* A small driver-cam tag, so a special is never read as another broadcaster. */
.chip-special::before {
  content: 'ONBD';
  margin-right: 8px;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: .56rem;
  letter-spacing: .1em;
  color: var(--team);
  border: 1px solid currentColor;
  vertical-align: 1px;
}

.chip-special.chip-data::before {
  content: 'DATA';
}

/* A weelo feed is a full programme, not a camera on one car: it gets its own tag so nobody opens
   'International Feed' expecting an onboard. */
.chip-special.chip-feed::before {
  content: 'FEED';
}

.chip-special.is-down {
  opacity: .48;
  border-style: dotted;
}

.chip-special.is-down:hover {
  transform: none;
  color: var(--muted);
  border-color: var(--line-2);
}

.chip-special.is-down:hover::after {
  transform: scaleX(0);
}

@media (max-width: 760px) {
  .chips.tabs {
    /* Equal columns in one row, never a wrap: three tabs share the width evenly and a fourth would
       too. minmax(0,1fr) keeps them identical even when one label is longer. */
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
  }

  .chips.tabs .chip {
    padding: 10px 4px;
    letter-spacing: .04em;
    font-size: .68rem;
  }

  /* One chip per line on a phone. `minmax(0,1fr)` and not `1fr`: a grid column sized to its
     content takes the width of the longest label, so the row ran past the card and every chip
     bled off the right edge. The chips themselves must be width-capped and free to wrap — without
     this the label is a single unbreakable run ('INTERNATIONAL FEED' at .09em tracking) and it
     overflows the chip's own box, which `overflow: hidden` then clipped. */
  .special-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .special-row .chip {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    letter-spacing: .05em;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
  }

  /* Room for the tag on the first line, and the label wraps under itself rather than pushing the
     chip wider than the grid column. */
  .special-row .chip::before {
    margin-right: 6px;
  }
}

/* A tile chip in the picker (kept for the tab's picker; the grid itself is drawn by .mvx). */
.chip-mv.picked {
  color: #ff5a5f;
  border-color: rgba(255, 90, 95, .62);
  background: rgba(255, 90, 95, .12);
}

/* ═══════════════ MULTI-VIEWER (weelo feeds) ═══════════════ */

/* One row of equal buttons: "next to each other and the same size", on every width. */
@media (min-width: 761px) {
  .stage-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }
}

/* The button sits in .stage-actions, where every .btn is stretched: an inline SVG with only a
   viewBox will happily grow, so it is pinned to icon size and the button keeps its row height. */
#mvToggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: center;
  line-height: 1;
}

/* Every button in this row is .btn.sm, and a weelo chip row can change the row's font metrics, so
   the shared height is stated once here instead of being inherited from whichever text is longest. */
.stage-actions .btn {
  min-height: 48px;
}

@media (max-width: 760px) {
  .stage-actions .btn {
    min-height: 36px;
  }
}

/* 12px, the text's own line box: a 14px icon made this button two pixels taller than its neighbours
   on phones, where .btn height comes from its content rather than a fixed row. */
#mvToggle svg {
  display: block;
  width: 12px;
  height: 12px;
  flex: none;
}

#mvToggle.primary {
  background: var(--accent, #e10600);
  border-color: var(--accent, #e10600);
  color: #fff;
}

.theater-online { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.theater-online[hidden] { display: none; }
.theater-online i { width: 6px; height: 6px; border-radius: 999px; background: #4ade80; box-shadow: 0 0 0 3px #4ade8026; }
.theater-online b { font-weight: 700; }

.player.is-parked > iframe,
.player.is-parked > video,
.wplayer.is-parked .wplayer-stage > iframe,
.wplayer.is-parked .wplayer-stage > video { visibility: hidden; }

/* ════════════════════════════════════════════════════════════════════════════════
   WATCH — the rerace-style layout
   A 16:9 window with a hairline ring, one pill action row, grouped source buttons
   and a 340px rail whose first card sits level with the top of the window.
   ════════════════════════════════════════════════════════════════════════════════ */

:root {
  --rr-brand: #e10600;
  --rr-ink-950: #0e0f11;
  --rr-ink-900: #0a0b0d;
  --rr-ink-850: #18191d;
  --rr-ink-800: #212227;
  --rr-fg: #cecfd2;
  --rr-fg-2: #a9abaf;
  --rr-fg-3: #96999e;
  --rr-ring: 0 0 0 1px #ffffff0a;
  --rr-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* First section on the page now: clear the fixed header, then breathe. */
.watch-sec { padding-top: calc(64px + clamp(22px, 3.4vw, 40px)); }

/* The cockpit loads app.css, not layout.css, so the shared public header and footer
   rules live here too. Keep both blocks identical to layout.css. */
/* ═══════════════ HEADER ═══════════════ */

nav.nav {
  --page: #090a0c;
  --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;
  --font-display: 'Archivo', 'Inter', ui-sans-serif, sans-serif;
  --nav-h: 64px;
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 56px);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  display: block;
  padding: 0;
  font-family: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  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.nav::before { content: none; display: none; }
nav.nav.stuck {
  padding: 0;
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

nav.nav .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%;
}

nav.nav .brand { display: inline-flex; align-items: center; gap: 10px; flex: none; order: 0; }
nav.nav .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);
}
nav.nav .brand-mark svg { width: 18px; height: 18px; }
nav.nav .brand-mark svg path { fill: currentColor; }
nav.nav .brand-mark::after { content: none; animation: none; }
nav.nav .brand-text {
  display: block;
  font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 15px;
  letter-spacing: -.01em; line-height: 1.5; color: var(--white);
}

nav.nav .nav-links {
  position: static; inset: auto; transform: none;
  display: flex; align-items: center; gap: 2px;
  margin-left: auto; margin-right: 14px; order: 1;
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  opacity: 1; visibility: visible; pointer-events: auto;
}
nav.nav .nav-right { display: flex; align-items: center; gap: 8px; flex: none; margin-left: 0; order: 2; }

nav.nav .nav-links a {
  position: relative; display: inline-block; min-height: 0;
  padding: 8px 12px; border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px; font-weight: 550;
  letter-spacing: normal; text-transform: none;
  color: var(--fg-2);
  transition: color .18s var(--ease), background-color .18s var(--ease);
  white-space: nowrap;
}
nav.nav .nav-links a::after { content: none; display: none; }
nav.nav .nav-links a:hover { color: var(--white); background: rgba(255,255,255,.05); }
nav.nav .nav-links a[aria-current="page"],
nav.nav .nav-links a.current { color: var(--white); }
nav.nav .nav-links a[aria-current="page"]::after,
nav.nav .nav-links a.current::after {
  content: ''; display: block;
  position: absolute; left: 12px; right: 12px; width: auto; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--accent);
  transform: none; transition: none;
}
nav.nav .nav-links a[hidden] { display: none; }

nav.nav .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-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.5;
  letter-spacing: normal; color: var(--fg-2); white-space: nowrap;
  transform: none;
}
nav.nav .pill[hidden] { display: none; }
nav.nav .pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(225,6,0,.18);
}
nav.nav .pill.viewer { gap: 7px; color: #fff; font-variant-numeric: tabular-nums; }
nav.nav .pill.viewer .dot { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.16); }
nav.nav .pill.viewer[data-state="connecting"] .dot { background: var(--fg-4); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
nav.nav .pill.viewer[data-state="offline"] { opacity: .75; }
nav.nav .pill.viewer #viewerCount { color: var(--white); font-weight: 650; }
nav.nav .pill.viewer .viewer-label { color: var(--fg-3); font-weight: 550; }
@media (max-width: 480px) { nav.nav .pill.viewer .viewer-label { display: none; } }

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

@media (max-width: 900px) {
  nav.nav .nav-toggle { display: grid; }
  nav.nav .nav-right { margin-left: auto; }
  nav.nav .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;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }
  nav.nav .nav-links.open { display: flex; animation: menuIn .26s var(--ease) both; }
  nav.nav .nav-links a { padding: 13px 12px; font-size: 15px; border-radius: 12px; }
  nav.nav .nav-links a[aria-current="page"],
  nav.nav .nav-links a.current { background: rgba(255,255,255,.06); }
  nav.nav .nav-links a[aria-current="page"]::after,
  nav.nav .nav-links a.current::after { display: none; }
}

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

/* ═══════════════ CROSS-DOCUMENT VIEW TRANSITIONS ═══════════════ */
@view-transition { navigation: auto; }

body:not(.theater) > nav.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.nav .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; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  nav.nav .nav-links.open { animation: none; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
  }
}

/* ═══════════════ 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); }


/* The cockpit's palette is its own (different --line, different brand mark), so the
   public footer's tokens are re-declared on the footer itself rather than retuning
   the whole page for one band. */
footer.footer {
  --line: rgba(255,255,255,.08);
  --fg-2: #a9abaf;
  --fg-3: #96999e;
  --fg-4: #7e8188;
  --white: #fff;
}
/* The footer sits on the public 1280px frame with the public font stack, not the
   cockpit's 1240px one, so the band matches the other pages beat for beat. */
footer.footer { font-family: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif; line-height: 1.5; color: #cecfd2; }
footer.footer .wrap {
  width: 100%; max-width: calc(1280px + clamp(20px, 5vw, 56px) * 2);
  margin-inline: auto; padding-inline: clamp(20px, 5vw, 56px);
}

footer.footer .brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--red), #8b0400);
  color: #fff; box-shadow: 0 6px 18px -8px rgba(225,6,0,.9);
}
footer.footer .brand-mark svg { width: 18px; height: 18px; }
/* The cockpit mark runs a sheen sweep; the public footer mark does not. */
footer.footer .brand-mark::after { content: none; animation: none; }
footer.footer .brand-text {
  display: block; font-family: 'Archivo', 'Inter', ui-sans-serif, sans-serif;
  font-style: normal; font-weight: 700; font-size: 15px;
  letter-spacing: -.01em; color: var(--white); line-height: 1.5;
}
footer.footer svg { max-width: 100%; }
footer.footer a { color: inherit; text-decoration: none; }
footer.footer .footer-top p { color: var(--fg-4); font-size: 12.5px; margin-top: 10px; max-width: 34ch; }

/* The public footer is 40px off the content; on the cockpit the section's own
   bottom padding is the gap, so the margin is dropped rather than doubled. */
body[data-page="cockpit"] footer.footer { margin-top: 0; }

.wrap.watch-grid {
  max-width: 1600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px 26px;
  align-items: start;
}

/* The head spans the page; the window and the rail start on the row below it, so the rail's first
   card is level with the top of the player by construction rather than by arithmetic. */
.watch-head { grid-column: 1 / -1; }

.watch-main { grid-column: 1; min-width: 0; display: grid; gap: 18px; }

.watch-side { grid-column: 2; }

/* The head above the window is the site's own section head, unchanged: mono eyebrow, italic Archivo
   900 title at the same clamp, red accent, gradient rule. Callers get the original sizes. */
.watch-head { margin-bottom: 0; align-items: flex-start; gap: 10px; min-height: 0; }

.watch-head h2 {
  font-family: 'Archivo';
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4.6vw, 3.1rem);
  letter-spacing: -.04em;
  line-height: .95;
  margin: 0;
}

.watch-head h2 .accent { color: var(--team); }
.watch-head .rule { margin: 10px 0 0; }

/* ── the window ── */
.wplayer {
  position: relative;
  width: 100%;
  border-radius: 16px;
  background: #000;
  box-shadow: var(--rr-ring);
  overflow: hidden;
  transition: border-radius .3s var(--ease), box-shadow .3s var(--ease);
}

.wplayer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  background: var(--rr-ink-900);
  border-bottom: 1px solid #ffffff0a;
}

.wplayer-dot { display: inline-flex; align-items: center; }
.wplayer-dot i {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--rr-brand);
  animation: rrPulse 2.4s ease-in-out infinite;
}

@keyframes rrPulse {
  0%, 100% { box-shadow: 0 0 0 3px #e1060022; }
  50% { box-shadow: 0 0 0 6px #e1060010; }
}

.wplayer-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 11.5px 'JetBrains Mono', monospace;
  letter-spacing: .04em;
  color: #7c7f85;
  text-transform: uppercase;
}

.wplayer-live {
  flex: none;
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: #ffffff0d;
  color: var(--rr-fg-3);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

.wplayer-live.active { background: #f8716824; color: #fd9891; }

/* Full column width right up to the side cards, maintaining a true 16:9 stage. */
.wplayer-stage { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }

/* The frame fills the stage: it used to be appended to the card instead, which laid it out at the
   browser's default 300x150 in the top-left and left the rest of the box black. */
.wplayer-stage > iframe,
.wplayer-stage > video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.wplayer-stage iframe,
.wplayer-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Every source switch shows the loader for a tick, and the loader fades its own frame in, so a
   switch reads as a change rather than a blank flash. */
#loader:not([hidden]) { animation: rrFade .3s var(--ease); }

@keyframes rrFade {
  from { opacity: .4; }
  to { opacity: 1; }
}

/* ── the action row ── */
.wplayer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--rr-ink-850);
  box-shadow: var(--rr-ring);
}

.watch-session-info {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 260px;
}

.watch-session-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--rr-fg-3);
}

.watch-session-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffffff40;
  flex: none;
}
.watch-session-dot.is-live {
  background: var(--team, #e10600);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team, #e10600) 26%, transparent);
}
.watch-session-dot.is-next {
  background: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .2);
}

#watchSessionBadge { color: #fff; }
.watch-session-sep { opacity: .5; }
#watchSessionCountdown {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--rr-fg-2, #b6b8be);
  font-variant-numeric: tabular-nums;
}

.watch-session-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  min-width: 0;
}

.watch-session-title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
}

.watch-session-meta {
  font-size: 12.5px;
  color: var(--rr-fg-3);
}

.wplayer-actions-main {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 1 auto;
}
@media (max-width: 720px) {
  .wplayer-actions-main { justify-content: flex-start; width: 100%; }
}

#mvToggle svg, #theaterBtn svg { width: 15px; height: 15px; flex: none; }

/* A pressed toggle reads as a switch, not as a hover. */
.btn[aria-pressed="true"] {
  background: #1c2b42;
  color: #fff;
  box-shadow: inset 0 0 0 2px #669df1;
}

/* ── the animated tab slider ── */
.wtabs {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  /* Equal columns, so the ink is one column wide and needs no measurement at all. */
  grid-auto-columns: 1fr;
  width: 288px;
  max-width: 100%;
  padding: 3px;
  border-radius: 999px;
  background: #ffffff0a;
  isolation: isolate;
}

/* Three equal columns, so the ink is one column wide and slides by whole columns. It is a pseudo
   element on the bar and is moved by :has(), so it is never re-created and the spring survives
   every redraw. */
.wtabs::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 999px;
  background: #ffffff1f;
  box-shadow: inset 0 1px 0 #ffffff0f;
  transition: transform .42s var(--rr-spring);
}

.wtabs:has(.chip:nth-of-type(2).active)::before { transform: translateX(100%); }
.wtabs:has(.chip:nth-of-type(3).active)::before { transform: translateX(200%); }

.wtabs .chip {
  position: relative;
  z-index: 1;
  height: 30px;
  min-width: 0;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--rr-fg-3);
  font: 600 13px 'Inter', system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  transition: color .24s var(--ease);
}

.wtabs .chip::after { display: none; }
.wtabs .chip:hover { color: #fff; transform: none; border-color: transparent; }
.wtabs .chip.active { color: #fff; background: transparent; border-color: transparent; box-shadow: none; }

/* ── sources: the same pill language as the action row, one per line ── */
/* ── sources: compact horizontal wrapping pills ── */
.wsources {
  padding: 18px;
  border-radius: 20px;
  background: var(--rr-ink-850);
  box-shadow: var(--rr-ring);
}

.wsources-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.wsources-title-wrap { display: inline-flex; align-items: baseline; gap: 10px; }
.wsources-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.wsources-count { font-size: 11.5px; color: var(--rr-fg-3); }

.wsource-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Every source pill enters smoothly on tab switch; background 3-min refreshes skip re-animating. */
.wsource-list > button.chip,
.wsource-list .special-row button.chip {
  animation: fadeUp .28s var(--ease) backwards;
}

.wsource-list.is-quiet > button.chip,
.wsource-list.is-quiet .special-row button.chip {
  animation: none;
}

.wsource-list > *:nth-child(2), .wsource-list .special-row button.chip:nth-child(2) { animation-delay: .015s; }
.wsource-list > *:nth-child(n+4), .wsource-list .special-row button.chip:nth-child(n+4) { animation-delay: .03s; }
.wsource-list > *:nth-child(n+7), .wsource-list .special-row button.chip:nth-child(n+7) { animation-delay: .045s; }

.wsource-list > button.chip,
.wsource-list .special-row button.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 36px;
  height: auto;
  padding: 6px 13px;
  border: 0;
  border-radius: 999px;
  background: #ffffff0b;
  box-shadow: inset 0 0 0 1px #ffffff16;
  color: var(--rr-fg);
  font: 600 13px/1.15 'Inter', system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}

.wsource-list > button.chip::after,
.wsource-list .special-row button.chip::after { display: none; }

.wsource-list > button.chip:hover,
.wsource-list .special-row button.chip:hover {
  background: #ffffff14;
  box-shadow: inset 0 0 0 1px #ffffff2b;
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.wsource-list > button.chip.active,
.wsource-list .special-row button.chip.active {
  background: color-mix(in srgb, var(--team, #e10600) 17%, #1a1c22);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px var(--team, #e10600);
}

.wsource-list > button.chip:active,
.wsource-list .special-row button.chip:active { transform: translateY(0) scale(.985); }

.src-pill-title { color: inherit; }
.src-pill-sub {
  font-size: 11px;
  font-weight: 500;
  color: #ffffff75;
  letter-spacing: .01em;
}
.wsource-list button.chip.active .src-pill-sub { color: #ffffffba; }

.src-pill-tag {
  display: inline-grid;
  place-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
}
.src-pill-tag.is-4k {
  background: rgba(250, 204, 21, .16);
  color: #fde047;
}
.wsource-list button.chip.active .src-pill-tag.is-4k {
  background: rgba(250, 204, 21, .24);
  color: #fef08a;
}
.src-pill-tag.is-stripped {
  background: rgba(52, 211, 153, .15);
  color: #6ee7b7;
  text-transform: uppercase;
  font-size: 9.5px;
  letter-spacing: .05em;
}
.wsource-list button.chip.active .src-pill-tag.is-stripped {
  background: rgba(52, 211, 153, .24);
  color: #a7f3d0;
}

@media (max-width: 440px) {
  .wsource-list .special-row button.chip {
    max-width: 100%;
    flex-wrap: wrap;
    white-space: normal;
  }
}

/* A quiet lead dot on standard broadcaster pills, lit in the active team accent when playing. */
.wsource-list button.chip:not(.chip-special):not(.has-tag)::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff38;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.wsource-list button.chip.active:not(.chip-special):not(.has-tag)::before {
  background: var(--team, #e10600);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team, #e10600) 28%, transparent);
}

/* The specials keep their order and their tag, in their own wrapping row under the broadcasters. */
.wsource-list .special-row {
  flex: 1 0 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid #ffffff12;
}

.wsource-list .special-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--rr-fg-3);
  text-transform: none;
}

/* ONBD / DATA / FEED micro-badge inside special pills. */
.wsource-list .special-row button.chip::before {
  content: 'ONBD';
  flex: none;
  display: inline-grid;
  place-items: center;
  height: 18px;
  padding: 0 5px;
  margin: 0;
  border: 0;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1;
  color: var(--team);
  background: #ffffff12;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}

.wsource-list .special-row button.chip.chip-data::before { content: 'DATA'; color: #669df1; background: #669df124; }
.wsource-list .special-row button.chip.chip-feed::before { content: 'FEED'; color: #cbd5e1; background: #ffffff14; }

.wsource-list .special-row button.chip.is-down { opacity: .48; }
.wsource-list .special-row button.chip.is-down:hover { opacity: .78; }

/* ── the rail ── */
.watch-side {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.side-card {
  display: grid;
  gap: 6px;
  animation: fadeUp .45s var(--ease) backwards;
  padding: 16px;
  /* A button in the rail is a card, not a control: the UA border and chrome are stripped. */
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  width: auto;
  text-align: left;
  font: inherit;
  cursor: pointer;
  border-radius: 20px;
  background: var(--rr-ink-850);
  box-shadow: var(--rr-ring);
  color: var(--rr-fg);
  text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}

.side-h { margin: 0; font-size: 12px; font-weight: 650; color: var(--rr-fg-3); }
.side-sub { margin: 0; font: 500 11.5px 'JetBrains Mono', monospace; letter-spacing: .06em; color: var(--rr-fg-3); text-transform: uppercase; }
.side-now { margin: 0; font: 650 15px 'Inter', system-ui, sans-serif; color: #fff; text-transform: none; }

.side-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.side-list li {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--rr-fg-2);
  animation: fadeUp .5s var(--ease) backwards;
}
.side-list li b { color: #fff; font-weight: 650; }
.side-list li:nth-child(2) { animation-delay: .05s; }
.side-list li:nth-child(3) { animation-delay: .1s; }

.side-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-link:hover { background: var(--rr-ink-800); transform: translateY(-1px); }
.side-link b { display: block; color: #fff; font-size: 14px; }
.side-link small { color: var(--rr-fg-3); font-size: 12px; }
.side-link svg { width: 16px; height: 16px; color: var(--rr-fg-3); flex: none; transition: transform .2s var(--ease); }
.side-link:hover svg { transform: translate(2px, -2px); }

/* ═══════════════ THEATER MODE ═══════════════ */

/* Everything stays: the window, the action row, the session pickers and the whole source list. The
   page's own chrome steps out and the watch section animates up to fill the screen. */
body.theater { overflow: hidden; }

body.theater .view.is-active > section:not(#watch),
body.theater .nav,
body.theater .ticker { display: none; }

body.theater #watch {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 0;
  background: #0a0b0d;
  animation: theaterIn .34s var(--ease);
}

@keyframes theaterIn {
  from { opacity: 0; transform: scale(.988); }
  to { opacity: 1; transform: none; }
}

body.theater .watch-sec { padding: 0; }

body.theater .wrap.watch-grid {
  display: block;
  width: 100%;
  max-width: none;
  height: 100vh;
  padding: 12px 16px;
}

body.theater .watch-head { display: none; }

/* The window and its controls are centred in what space is left of the source rail. */
body.theater .watch-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: calc(100vh - 24px);
  padding-right: 348px;
}

body.theater .wplayer {
  width: min(100%, calc((100vh - 200px) * 16 / 9));
  transition: width .34s var(--ease);
  border-radius: 12px;
  box-shadow: 0 0 0 1px #ffffff14, 0 40px 90px -40px #000;
  animation: theaterWindow .4s var(--ease);
}

@keyframes theaterWindow {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

body.theater .wplayer-bar { background: #0b0c0e; }

/* Single bar in theater: active/next session on the left, controls on the right. */
body.theater .wplayer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  width: min(100%, calc((100vh - 150px) * 16 / 9));
  max-width: 100%;
  padding: 10px 16px;
  animation: fadeUp .4s var(--ease) .06s backwards;
}

@media (min-width: 1101px) {
  body.theater .wplayer-actions-main { flex-wrap: nowrap; flex: none; }
}

/* Theater is for watching: livery and race times stay on the main cockpit view. */
/* Sources hidden: the rail leaves and the window and controls take the full width back. */
body.theater.theater-no-sources .wsources { display: none; }
body.theater.theater-no-sources .watch-main { padding-right: 0; }
body.theater.theater-no-sources .wplayer { width: min(100%, calc((100vh - 150px) * 16 / 9)); }
body.theater.theater-no-sources .wplayer-actions { width: min(100%, calc((100vh - 150px) * 16 / 9)); }

body.theater #sessionsBtn,
body.theater #teamSelectBtn,
body.theater #raceTimesBtn,
body.theater #radioRcBtn { display: none; }

/* Only in theater. The rule sits after the generic .btn rules, so it wins on its own. */
body:not(.theater) #sourcesToggle { display: none; }

/* Every source stays, in a rail pinned to the right edge of the theater. It is out of the flow, so
   a long list can never push the window or the controls off the screen. */
body.theater .wsources {
  position: absolute;
  top: 12px;
  right: 16px;
  bottom: 12px;
  width: 320px;
  overflow: auto;
  padding: 14px;
  animation: fadeUp .4s var(--ease) .1s backwards;
  scrollbar-width: thin;
}

body.theater .wsources-head h2 { font-size: 16px; }

body.theater .watch-side { display: none; }

/* A phone has no room for a side rail: one column, the window first, the sources under it. */
@media (max-width: 1100px) {
  body.theater .wrap.watch-grid { overflow: auto; }

  body.theater .watch-main {
    height: auto;
    padding-right: 0;
    justify-content: flex-start;
  }

  body.theater .wplayer { width: 100%; }

  /* Full-width control rows, like the rest of the page's phone layout; the row itself must be free
     to take the column's width first. */
  body.theater .wplayer-actions { width: 100%; }
  body.theater .watch-selects { width: 100%; }
  body.theater .wplayer-actions-main { flex: none; flex-direction: column; align-items: stretch; }
  body.theater .wplayer-actions-main .btn { width: 100%; }

  body.theater .wsources {
    position: static;
    width: auto;
    overflow: visible;
  }
}

body.theater #theaterBtn { background: #1c2b42; box-shadow: inset 0 0 0 2px #669df1; }

/* One column below 1100px. The rail must drop its grid-column too: left at "2" it created an
   implicit second column, which squeezed the player to 114px and pushed the rail on top of it. */
@media (max-width: 1100px) {
  .wrap.watch-grid { grid-template-columns: minmax(0, 1fr); }
  .watch-side { grid-column: 1; position: static; margin-top: 0; }
  .watch-main { grid-column: 1; }
}

@media (max-width: 760px) {
  .watch-h1 { font-size: 22px; }
  .watch-head { min-height: 30px; }
  .wplayer, .wplayer-stage { border-radius: 12px; }
  .wplayer-actions { gap: 10px; }
  .wplayer-actions-main { gap: 6px; }
  .watch-selects { flex: 1 1 100%; }
  .wsources-head h2 { font-size: 18px; }
  .wtabs { min-width: 0; width: 100%; }
  .wtabs .chip { padding: 0 8px; }
  body.theater .wplayer { width: 100vw; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wplayer-dot i, .side-list li, .side-card, .wsource-list > button.chip,
  .wsource-list .special-row button.chip { animation: none; }
  .wtabs::before { transition: none; }
}

/* ── The hero keeps its own pair ──
   The rest of the site moved to the pill, but "Enter the Cockpit" and the session button are the
   front door and were asked to stay exactly as they were: uppercase Archivo, the red box, the dark
   box beside it, the rising red sweep. */
.hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn.hero-btn {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  height: auto;
  padding: 15px 30px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  gap: 10px;
  transition: transform .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}

.btn.hero-btn::before {
  background: var(--team);
  opacity: 1;
  transform: translateX(-101%) skewX(-14deg) scale(1.3);
  transition: transform .45s var(--ease);
}

.btn.hero-btn:hover {
  border-color: var(--team);
  color: #fff;
  background: var(--surface);
  transform: translateY(-2px);
}

.btn.hero-btn:hover::before { opacity: 1; transform: translateX(0) skewX(-14deg) scale(1.3); }

.btn.hero-btn:active { transform: translateY(0) scale(.985); }

.btn.hero-btn.primary {
  background: var(--team);
  border-color: var(--team);
  color: var(--team-ink);
  box-shadow: 0 12px 34px -12px var(--red-glow);
}

.btn.hero-btn.primary::before { background: #fff; }

.btn.hero-btn.primary:hover { color: var(--ink); background: var(--team); }

/* ════════════════════════════════════════════════════════════════════════════════
   MULTIVIEWER — full-viewport theater (Rerace design language)
   56px top bar with centered Grid/Focus segmented control, GPU-positioned 12px
   tiles with frosted handles and round audio/focus/remove tools, and a docked
   360px rounded #111216 "Add streams" library drawer (bottom sheet on mobile).
   ════════════════════════════════════════════════════════════════════════════════ */

html.has-mvx,
html.has-mvx body {
  overflow: hidden;
}

.mvx {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: #000;
  color: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr) auto;
  animation: mvx-in .22s cubic-bezier(.22, 1, .36, 1) both;
}

.mvx[hidden] {
  display: none !important;
}

@keyframes mvx-in {
  from { opacity: 0; transform: scale(.992); }
  to { opacity: 1; transform: none; }
}

.mvx-top {
  grid-column: 1 / -1;
  position: relative;
  height: 56px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #000;
  z-index: 3;
}

.mvx-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mvx-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e10600;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, .24);
  flex: none;
}

.mvx-brand-title {
  font: 600 15px/1 'Inter', system-ui, sans-serif;
  letter-spacing: -.015em;
  color: #fff;
  white-space: nowrap;
}

.mvx-count {
  font: 500 12.5px/1 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: #8b8d93;
  white-space: nowrap;
}

.mvx-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #a3a6ad;
  font: 500 11.5px/1 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mvx-online[hidden] {
  display: none !important;
}

.mvx-online i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .2);
}

.mvx-online b {
  color: #fff;
  font-weight: 600;
}

.mvx-seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

@media (min-width: 768px) {
  .mvx-seg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

.mvx-seg button {
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #a9abaf;
  font: 600 13px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

.mvx-seg button:hover {
  color: #fff;
}

.mvx-seg button[aria-pressed="true"] {
  background: #fff;
  color: #000;
}

.mvx-seg button svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.mvx-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.mvx-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: 600 13px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.mvx-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.mvx-btn:hover {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.mvx-btn:active {
  transform: scale(.96);
}

.mvx-icon-btn {
  width: 38px;
  padding: 0;
}

.mvx-add {
  background: #fff;
  color: #000;
  font-weight: 650;
}

.mvx-add:hover {
  background: #e6e7ea;
  color: #000;
}

.mvx-add.is-open {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

/* ── Stage & GPU-positioned 16:9 tiles ── */
.mvx-stage {
  grid-area: 2 / 1;
  position: relative;
  overflow: hidden;
  margin: 0 8px 8px;
  min-width: 0;
  min-height: 0;
}

.mvx-stage.is-empty::after {
  content: 'Add a feed to start watching';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8b8d93;
  font: 500 14px 'Inter', system-ui, sans-serif;
  pointer-events: none;
}

.mvx-stage.is-empty.no-streams::after { content: 'No streams found'; }

.mvx-tiles {
  position: absolute;
  inset: 0;
}

.mvx-tile {
  position: absolute;
  top: 0;
  left: 0;
  background: #0b0c10;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease;
}

.mvx-tile.has-audio,
.mvx-tile.is-main {
  box-shadow: 0 0 0 2px #e10600;
  z-index: 1;
}

.mvx-tile iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0b0c10;
}

.mvx.is-dragging .mvx-tile iframe {
  pointer-events: none;
}

.mvx-tile.is-lifted {
  z-index: 8;
  transition: box-shadow .15s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .75), 0 0 0 2px rgba(255, 255, 255, .5);
}

.mvx-tile.is-target {
  box-shadow: 0 0 0 2px #fff;
}

.mvx-tile-load {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.mvx-tile.is-loading .mvx-tile-load {
  opacity: 1;
}

.mvx-spin {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, .16);
  border-top-color: #fff;
  animation: mvx-spin .75s linear infinite;
}

@keyframes mvx-spin {
  to { transform: rotate(360deg); }
}

/* ── Tile chrome: frosted top-left drag handle + top-right round glass tools ── */
.mvx-tile-bar {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.mvx-tile-bar > * {
  pointer-events: auto;
}

.mvx-handle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(68%, 290px);
  min-width: 0;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: grab;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.mvx-handle:active {
  cursor: grabbing;
}

.mvx-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mvx-name-t {
  font: 600 12px/1.2 'Inter', system-ui, sans-serif;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvx-name-s {
  font: 500 10.5px/1.2 'Inter', system-ui, sans-serif;
  color: rgba(255, 255, 255, .64);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvx-off-msg {
  font: 600 10px/1 'JetBrains Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fbbf24;
}

.mvx-off-msg[hidden] {
  display: none !important;
}

.mvx-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.mvx-avatar.is-lg {
  width: 48px;
  height: 48px;
}

.mvx-avatar-driver {
  position: relative;
  background: #1b1d24;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.mvx-avatar-init {
  font: 700 10px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .55);
}

.mvx-avatar.is-lg .mvx-avatar-init {
  font-size: 13px;
}

.mvx-avatar-driver img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mvx-avatar-logo {
  width: 34px;
  height: 24px;
  border-radius: 7px;
  background: #fff;
  color: #111;
  padding: 0 3px;
}

.mvx-avatar-logo svg {
  width: 24px;
  height: 12px;
  display: block;
}

.mvx-avatar-logo.is-sky {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.5px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 8px;
  letter-spacing: -.03em;
}

.mvx-avatar-logo.is-sky b {
  color: #0b1f4d;
  font-weight: 800;
}

.mvx-avatar-logo.is-sky i {
  font-style: normal;
  color: #e10600;
  font-weight: 800;
}

.mvx-avatar-icon {
  background: rgba(255, 255, 255, .1);
  color: #e4e5e9;
}

.mvx-avatar-icon svg {
  width: 15px;
  height: 15px;
}

.mvx-avatar-icon.is-tracker {
  background: rgba(16, 185, 129, .18);
  color: #34d399;
}

.mvx-avatar-icon.is-data {
  background: rgba(56, 189, 248, .18);
  color: #38bdf8;
}

.mvx-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.mvx-tool {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, .88);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.mvx-tool svg {
  width: 15px;
  height: 15px;
}

.mvx-tool:hover {
  background: rgba(0, 0, 0, .82);
  color: #fff;
  transform: scale(1.06);
}

.mvx-tool.is-on {
  background: #e10600;
  color: #fff;
  box-shadow: none;
}

.mvx-tool.is-on:hover {
  background: #c70500;
}

.mvx-tile.is-big [data-mvx-big] {
  display: none;
}

.mvx-tile.is-small .mvx-handle {
  padding: 3px;
}

.mvx-tile.is-small .mvx-name {
  display: none;
}

.mvx-tile.is-small:hover .mvx-handle {
  padding: 4px 10px 4px 4px;
}

.mvx-tile.is-small:hover .mvx-name {
  display: flex;
}

.mvx-tile.is-small .mvx-tool {
  width: 28px;
  height: 28px;
}

.mvx-tile.is-small .mvx-tools {
  gap: 4px;
}

/* ── Right-hand docked "Add streams" drawer (360px card, bottom sheet on mobile) ── */
.mvx-library {
  grid-area: 2 / 2;
  width: 360px;
  margin: 0 8px 8px 0;
  background: #111216;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  animation: mvx-lib-in .22s cubic-bezier(.22, 1, .36, 1) both;
}

.mvx-library[hidden] {
  display: none !important;
}

@keyframes mvx-lib-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}

.mvx-lib-top {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex: none;
}

.mvx-lib-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mvx-lib-title {
  margin: 0;
  font: 600 15px/1.2 'Inter', system-ui, sans-serif;
  color: #fff;
}

.mvx-lib-head .mvx-icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
}

.mvx-search {
  height: 40px;
  padding: 0 10px 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b8d93;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
  transition: box-shadow .18s ease, background-color .18s ease;
}

.mvx-search:focus-within {
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  color: #fff;
}

.mvx-search > svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.mvx-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 500 13px/1.2 'Inter', system-ui, sans-serif;
}

.mvx-search input::placeholder {
  color: #7c7f87;
}

.mvx-search input::-webkit-search-cancel-button {
  display: none;
}

.mvx-search-clear {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mvx-search-clear[hidden] {
  display: none !important;
}

.mvx-search-clear svg {
  width: 11px;
  height: 11px;
}

.mvx-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mvx-filters::-webkit-scrollbar {
  display: none;
}

.mvx-filters button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #a9abaf;
  font: 600 12px/1 'Inter', system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

.mvx-filters button:hover {
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.mvx-filters button[aria-selected="true"] {
  background: #fff;
  color: #000;
}

.mvx-lib-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mvx-lib-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(225, 6, 0, .14);
  color: #fca5a5;
  font: 500 12px/1.4 'Inter', system-ui, sans-serif;
}

.mvx-lib-note[hidden] {
  display: none !important;
}

.mvx-lib-ev {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mvx-lib-evh {
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mvx-series-chip {
  padding: 3px 7px;
  border-radius: 6px;
  background: #e10600;
  color: #fff;
  font: 700 10.5px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .04em;
  flex: none;
}

.mvx-lib-evname {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 13px/1.25 'Inter', system-ui, sans-serif;
  color: #f3f4f6;
}

.mvx-lib-gh {
  margin: 8px 2px 2px;
  font: 600 11px/1.2 'Inter', system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7c7f87;
}

.mvx-lib-list,
.mvx-lib-faces {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mvx-lib-list {
  display: grid;
  gap: 4px;
}

.mvx-lib-faces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 6px;
}

.mvx-feed {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease;
}

.mvx-feed:hover:not(:disabled) {
  background: rgba(255, 255, 255, .09);
}

.mvx-feed:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.mvx-feed.is-on {
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.mvx-feed-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mvx-feed-t {
  font: 600 13px/1.2 'Inter', system-ui, sans-serif;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvx-feed-s {
  font: 500 11.5px/1.2 'Inter', system-ui, sans-serif;
  color: #8b8d93;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mvx-feed-off {
  color: #fbbf24;
  font: 600 10px/1 'JetBrains Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mvx-feed-strip {
  display: inline-grid;
  place-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(52, 211, 153, .16);
  color: #6ee7b7;
  font: 700 9px/1 'JetBrains Mono', monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: middle;
}

.mvx-feed-ic {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: #d4d6dc;
  display: grid;
  place-items: center;
  flex: none;
  transition: background-color .16s ease, color .16s ease;
}

.mvx-feed-ic svg {
  width: 13px;
  height: 13px;
}

.mvx-feed.is-on .mvx-feed-ic {
  background: #fff;
  color: #000;
}

/* Portrait card variant for driver onboard cameras */
.mvx-feed-face {
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  text-align: center;
}

.mvx-feed-face .mvx-feed-t {
  font-size: 12px;
  max-width: 100%;
}

.mvx-feed-face .mvx-feed-ic {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
}

.mvx-feed-face .mvx-feed-ic svg {
  width: 12px;
  height: 12px;
}

.mvx-lib-empty {
  margin: 24px 0;
  text-align: center;
  color: #8b8d93;
  font: 500 13px/1.45 'Inter', system-ui, sans-serif;
}

.mvx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .mvx-top {
    height: 50px;
    padding: 0 8px 0 12px;
    gap: 6px;
  }

  .mvx-brand-title {
    font-size: 13.5px;
  }

  .mvx-online,
  .mvx-seg span,
  .mvx-add span {
    display: none;
  }

  .mvx-seg button {
    height: 30px;
    padding: 0 10px;
  }

  .mvx-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
  }

  .mvx-icon-btn {
    width: 34px;
    padding: 0;
  }

  .mvx-actions {
    gap: 4px;
  }

  .mvx-stage {
    margin: 0 6px 6px;
  }

  .mvx-library {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    grid-area: auto;
    width: 100%;
    height: min(78vh, 620px);
    margin: 0;
    border-radius: 20px 20px 0 0;
    z-index: 12;
    box-shadow: 0 -24px 64px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1);
    animation: mvx-sheet-in .22s cubic-bezier(.22, 1, .36, 1) both;
  }

  @keyframes mvx-sheet-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
  }
}



/* Cockpit controls: shared directory-style surfaces and restrained motion. */
#watch .watch-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
#watch .watch-head .eyebrow::before { content: ''; width: 3px; height: 13px; border-radius: 4px; background: var(--team, #e10600); }
#watch .watch-head h2 { margin-top: 13px; }
#watch .watch-head .rule { display: none; }
#watch .wplayer { border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px #ffffff1c, 0 20px 65px #0005; }
#watch .wplayer-bar { background: #15161a; border-bottom: 1px solid #ffffff12; }
#watch .wplayer-actions, #watch .wsources, #watch .side-card { border: 1px solid #ffffff17; background: #151619; box-shadow: 0 14px 35px #0002; }
#watch .wplayer-actions { border-radius: 18px; }
#watch .wsources { border-radius: 18px; padding: 20px; }
#watch .wsources-head h2 { font-size: 17px; letter-spacing: -.025em; }
#watch .wsources-count { padding: 4px 7px; border-radius: 6px; background: #ffffff0b; }
#watch .wtabs { background: #0d0e10; border: 1px solid #ffffff12; }
#watch .wtabs::before { background: #f5f5f6; box-shadow: 0 3px 12px #0005; }
#watch .wtabs .chip.active { color: #121316; }
#watch .wtabs .chip:focus-visible, #watch .wsource-list .chip:focus-visible, #watch .side-link:focus-visible, #watch .wplayer-actions .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#watch .wsource-list > button.chip, #watch .wsource-list .special-row button.chip { min-height: 38px; border-radius: 10px; background: #ffffff08; box-shadow: inset 0 0 0 1px #ffffff19; }
#watch .wsource-list > button.chip:hover, #watch .wsource-list .special-row button.chip:hover { background: #ffffff13; box-shadow: inset 0 0 0 1px #ffffff38; }
#watch .wsource-list > button.chip.active, #watch .wsource-list .special-row button.chip.active { background: color-mix(in srgb, var(--team, #e10600) 15%, #1a1b1e); box-shadow: inset 0 0 0 1px var(--team, #e10600); }
#watch .wplayer-actions .btn { border: 1px solid #ffffff16; background: #ffffff0b; transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
#watch .wplayer-actions .btn:hover { border-color: #ffffff38; background: #ffffff16; }
#watch .side-card { border-radius: 18px; }
#watch .side-card:not(.side-link) { cursor: default; }
#watch .side-h { color: #9b9da5; font-weight: 600; }
#watch .side-link:hover { background: #1d1f24; border-color: #ffffff32; transform: translateY(-2px); }
#watch .side-link svg { padding: 7px; width: 32px; height: 32px; border: 1px solid #ffffff19; border-radius: 10px; background: #ffffff08; }
@media (max-width: 760px) { #watch .wsources { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { #watch .wplayer-actions .btn, #watch .side-link, #watch .side-link svg, #watch .wsource-list .chip, #watch .wtabs::before { animation: none; transition: none; } }

/* The two cockpit menus use the same quiet cards and white selected pill. */
#raceTimesOverlay .sheet, #teamSelectOverlay .sheet { border: 1px solid #ffffff24; border-radius: 22px; background: #151619; box-shadow: 0 28px 90px #000b; }
#raceTimesOverlay .sheet::before, #teamSelectOverlay .sheet::before { opacity: .65; }
#raceTimesOverlay .sheet-head h2, #teamSelectOverlay .sheet-head h2 { font-family: 'Inter', system-ui, sans-serif; font-style: normal; font-weight: 800; text-transform: none; letter-spacing: -.035em; }
#raceTimesOverlay .sheet-head .x, #teamSelectOverlay .sheet-head .x { border: 1px solid #ffffff1a; background: #ffffff0a; border-radius: 10px; transition: background-color .2s, transform .2s; }
#raceTimesOverlay .sheet-head .x:hover, #teamSelectOverlay .sheet-head .x:hover { background: #ffffff1a; transform: rotate(90deg); }
#raceTimesOverlay .seg { border: 1px solid #ffffff15; background: #0d0e10; border-radius: 999px; }
#raceTimesOverlay .seg-btn { border-radius: 999px; text-transform: none; letter-spacing: 0; }
#raceTimesOverlay .seg-btn.active { color: #151619; background: #f4f4f5; }
#raceTimesOverlay .select-trigger, #raceTimesOverlay select { border-radius: 11px; }
#raceTimesOverlay .select-menu { border-radius: 14px; background: #191a1e; }
#teamSelectOverlay .livery-custom { border-radius: 16px; }
@media (prefers-reduced-motion: reduce) { #raceTimesOverlay .sheet-head .x, #teamSelectOverlay .sheet-head .x { transition: none; } }

/* Cockpit refresh: a restrained illuminated console, scoped to the main live cockpit. */
body[data-page="cockpit"] #watch .watch-head .eyebrow::before {
  width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 16px var(--team, #e10600);
  animation: cockpitBeacon 2.8s ease-in-out infinite;
}
body[data-page="cockpit"] #watch .wplayer {
  box-shadow: 0 0 0 1px #ffffff24, 0 22px 70px #0009, 0 0 44px color-mix(in srgb, var(--team, #e10600) 12%, transparent);
}
body[data-page="cockpit"] #watch .wplayer-bar {
  position: relative;
  background: linear-gradient(105deg, #1e1b20 0%, #15161c 48%, #111217 100%);
}
body[data-page="cockpit"] #watch .wplayer-bar::after {
  content: ''; position: absolute; inset: auto 0 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, var(--team, #e10600), transparent 42%);
  opacity: .8;
}
body[data-page="cockpit"] #watch .wplayer-actions,
body[data-page="cockpit"] #watch .wsources,
body[data-page="cockpit"] #watch .side-card {
  background: linear-gradient(145deg, #202127, #14151a 70%);
  border-color: #ffffff20;
  box-shadow: 0 18px 40px #0004, inset 0 1px #ffffff09;
}
body[data-page="cockpit"] #watch .wplayer-actions { padding: 15px 18px; }
body[data-page="cockpit"] #watch .watch-session-eyebrow { letter-spacing: .1em; }
body[data-page="cockpit"] #watch .watch-session-dot.is-live { box-shadow: 0 0 12px #f87168a8; }
body[data-page="cockpit"] #watch .wsources-head h2 { letter-spacing: -.035em; }
body[data-page="cockpit"] #watch .wsources-count { color: #c5c7d2; background: #ffffff12; }
body[data-page="cockpit"] #watch .wtabs { border-radius: 14px; }
body[data-page="cockpit"] #watch .wsource-list > button.chip,
body[data-page="cockpit"] #watch .wsource-list .special-row button.chip {
  transition: transform .22s var(--ease), background-color .22s var(--ease), box-shadow .22s var(--ease), color .22s var(--ease);
}
body[data-page="cockpit"] #watch .wsource-list > button.chip:hover,
body[data-page="cockpit"] #watch .wsource-list .special-row button.chip:hover {
  transform: translateY(-2px); box-shadow: inset 0 0 0 1px #ffffff44, 0 6px 18px #0004;
}
body[data-page="cockpit"] #watch .wsource-list > button.chip.active,
body[data-page="cockpit"] #watch .wsource-list .special-row button.chip.active {
  background: linear-gradient(130deg, color-mix(in srgb, var(--team, #e10600) 25%, #22232b), #202128);
  box-shadow: inset 0 0 0 1px var(--team, #e10600), 0 4px 18px color-mix(in srgb, var(--team, #e10600) 15%, transparent);
}
body[data-page="cockpit"] #watch .wplayer-actions .btn:hover { transform: translateY(-2px); }
body[data-page="cockpit"] #watch .wplayer-actions .btn:active { transform: scale(.97); }
body[data-page="cockpit"] #watch .side-link { transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease); }
body[data-page="cockpit"] #watch .side-link:hover { transform: translateY(-3px); border-color: #ffffff45; box-shadow: 0 16px 34px #0006; }
body[data-page="cockpit"] #watch .side-link:hover svg { transform: translate(3px, -3px) rotate(5deg); }
body[data-page="cockpit"]:not(.theater) #watch .wplayer { animation: cockpitRise .5s var(--ease) both; }
body[data-page="cockpit"]:not(.theater) #watch .wplayer-actions { animation: cockpitRise .5s var(--ease) .06s both; }
body[data-page="cockpit"]:not(.theater) #watch .wsources { animation: cockpitRise .5s var(--ease) .12s both; }
@keyframes cockpitRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cockpitBeacon { 0%, 100% { opacity: .65; } 50% { opacity: 1; box-shadow: 0 0 20px var(--team, #e10600); } }
@media (prefers-reduced-motion: reduce) {
  body[data-page="cockpit"] #watch .watch-head .eyebrow::before,
  body[data-page="cockpit"]:not(.theater) #watch .wplayer,
  body[data-page="cockpit"]:not(.theater) #watch .wplayer-actions,
  body[data-page="cockpit"]:not(.theater) #watch .wsources { animation: none; }
  body[data-page="cockpit"] #watch .wplayer-actions .btn,
  body[data-page="cockpit"] #watch .wsource-list > button.chip,
  body[data-page="cockpit"] #watch .wsource-list .special-row button.chip,
  body[data-page="cockpit"] #watch .side-link,
  body[data-page="cockpit"] #watch .side-link svg { transition: none; animation: none; }
  body[data-page="cockpit"] #watch .wplayer-actions .btn:hover,
  body[data-page="cockpit"] #watch .wsource-list > button.chip:hover,
  body[data-page="cockpit"] #watch .wsource-list .special-row button.chip:hover,
  body[data-page="cockpit"] #watch .side-link:hover,
  body[data-page="cockpit"] #watch .side-link:hover svg { transform: none; }
}

/* Keep broadcasts and backups distinct without moving or reloading players. */
.wsource-list .source-tier-heading {
  flex: 1 0 100%; grid-column: 1 / -1; width: 100%; min-width: 0;
  margin: 9px 0 0; padding-top: 12px; border-top: 1px solid #ffffff12;
  color: var(--rr-fg-3); font-size: 11.5px; font-weight: 650; letter-spacing: .02em;
}
.wsource-list .source-tier-heading:first-child { margin: 0; padding: 0; border: 0; }
.wsource-list .auto-provider-tag { background: #ffffff17; color: #d6d8e0; font-size: 9px; letter-spacing: .04em; }
.wsource-list .auto-stream-status { flex: 1 0 100%; grid-column: 1 / -1; margin: 0 0 6px; color: var(--rr-fg-3); font-size: 12px; line-height: 1.5; }

/* The 16:9 stage is short on phones. Keep longer offline messages and every
   action reachable instead of clipping them behind the player's edges. */
@media (max-width: 600px) {
  .wplayer-stage .nostream {
    justify-content: flex-start;
    gap: 6px;
    padding: 10px 12px;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
    scrollbar-width: thin;
  }
  .wplayer-stage .nostream::before,
  .wplayer-stage .nostream::after { content: ''; flex: 1 0 0; }
  .wplayer-stage .nostream > * { flex-shrink: 0; max-width: 100%; }
  .wplayer-stage .nostream h3 { font-size: 1rem; line-height: 1.15; overflow-wrap: anywhere; }
  .wplayer-stage .nostream p { font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
  .wplayer-stage .ns-actions { width: 100%; gap: 6px; margin-top: 2px; }
}

/* Long provider/session labels must not give the nested grid a min-content
   width wider than the phone, which makes mobile browsers zoom the page out. */
@media (max-width: 1100px) {
  body[data-page="cockpit"] .watch-main { grid-template-columns: minmax(0, 1fr); }
  body[data-page="cockpit"] #watch .wsource-list > button.chip,
  body[data-page="cockpit"] #watch .wsource-list .special-row button.chip {
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body[data-page="cockpit"] #watch .src-pill-title,
  body[data-page="cockpit"] #watch .src-pill-sub { min-width: 0; overflow-wrap: anywhere; }
}

/* Theater's narrow source rail needs multi-line names and provider details;
   otherwise a long PPV session title clips its broadcaster/language label. */
body[data-page="cockpit"].theater #watch .wsource-list > button.chip,
body[data-page="cockpit"].theater #watch .wsource-list .special-row button.chip {
  max-width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  white-space: normal;
  overflow-wrap: anywhere;
}
body[data-page="cockpit"].theater #watch .src-pill-title,
body[data-page="cockpit"].theater #watch .src-pill-sub {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
