:root {
  --bg: #0a0b0d;
  --bg-2: #0e1013;
  --panel: #121418;
  --panel-2: #171a1f;
  --line: #22262d;
  --line-2: #2c313a;
  --text: #eceef1;
  --muted: #8a919c;
  --faint: #5b626d;
  --red: #e10600;
  --red-2: #ff2b22;
  --green: #22c55e;
  --down: #f43f5e;
  --amber: #f5b400;
  --purple: #a855f7;
  --radius: 14px;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  /* subtle carbon weave */
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(225, 6, 0, 0.09), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 4px);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
.wrap { width: min(1240px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.red { color: var(--red); }
.label {
  font: 600 11px/1 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker {
  margin: 0 0 6px;
  font: 700 12px/1 var(--body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ''; width: 18px; height: 2px; background: var(--red); }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: 0.01em; }
h2 { font-size: clamp(34px, 4.4vw, 52px); font-weight: 800; font-style: italic; text-transform: uppercase; line-height: 0.95; }
h3 { font-size: 26px; font-weight: 700; text-transform: uppercase; }
.up { color: var(--green); }
.down { color: var(--down); }
.mono { font-family: var(--mono); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  font: 700 14px/1 var(--body); letter-spacing: 0.02em;
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 24px -10px rgba(225,6,0,.7); }
.btn-red:hover { background: var(--red-2); }
.btn-ghost { border-color: var(--line-2); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: #444b56; background: rgba(255,255,255,0.05); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn[aria-disabled='true'] { opacity: .45; pointer-events: none; }
.tk { font-family: var(--mono); font-weight: 700; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line-2); color: var(--text);
}
.icon-btn:hover { border-color: #444b56; }

/* ---------- tape ---------- */
.tape {
  height: 30px; overflow: hidden; border-bottom: 1px solid var(--line);
  background: #07080a; font: 500 12px/30px var(--mono); white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tape-track { display: inline-flex; gap: 34px; padding-left: 100%; animation: tape 60s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.tape-item b { color: var(--text); font-weight: 700; }
.tape-item i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; transform: skewX(-12deg); }
@keyframes tape { to { transform: translateX(-100%); } }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 11, 13, 0.78); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 66px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 22px/1 var(--display); font-style: italic; text-transform: uppercase; letter-spacing: .02em; }
.brand b { color: var(--red); }
.brand img { border-radius: 50%; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: none; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: .2s; }
.menu-btn span:first-child { top: 15px; } .menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded='true'] span:first-child { top: 19px; transform: rotate(45deg); }
.menu-btn[aria-expanded='true'] span:last-child { top: 19px; transform: rotate(-45deg); }

.announce { border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(225,6,0,.14), transparent 70%); font-size: 13.5px; }
.announce .wrap { display: flex; gap: 10px; align-items: center; padding: 9px 0; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(225,6,0,.6); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(225,6,0,0); } 100% { box-shadow: 0 0 0 0 rgba(225,6,0,0); } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 34px; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-lines {
  position: absolute; inset: -20% -10% auto auto; width: 70%; height: 140%;
  background: repeating-linear-gradient(105deg, transparent 0 46px, rgba(255,255,255,0.025) 46px 48px);
  mask-image: linear-gradient(90deg, transparent, #000 40%);
}
.hero-glow { position: absolute; right: 8%; top: 12%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(225,6,0,.18), transparent 65%); filter: blur(10px); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-inner > * { min-width: 0; }
.eyebrow { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.chip-sol { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 11px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--text); background: rgba(255,255,255,.03); }
.hero-title { font-size: clamp(68px, 10vw, 138px); font-weight: 800; font-style: italic; line-height: 0.84; letter-spacing: -0.01em; margin-bottom: 20px; }
.hero-sub { font-size: 18px; color: #c4c9d1; max-width: 520px; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.ca {
  display: inline-flex; align-items: center; max-width: 100%;
  border: 1px solid var(--line-2); border-radius: 12px; background: rgba(0,0,0,.35); overflow: hidden;
}
.ca-label { padding: 0 12px; font: 700 11px/40px var(--body); letter-spacing: .14em; color: var(--muted); border-right: 1px solid var(--line-2); }
.ca code { padding: 0 14px; font: 500 13px/40px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ca-copy { border: 0; border-left: 1px solid var(--line-2); background: rgba(255,255,255,.04); height: 40px; padding: 0 14px; font-weight: 700; font-size: 12.5px; }
.ca-copy:hover { background: rgba(255,255,255,.09); }
.ca-wide { flex: 1; }

.hero-side { display: grid; gap: 20px; justify-items: center; }
.coin-stage { position: relative; width: min(340px, 80vw); aspect-ratio: 1; perspective: 900px; }
.coin { width: 100%; height: 100%; border-radius: 50%; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgba(0,0,0,.55)) drop-shadow(0 0 40px rgba(225,6,0,.18)); }
.coin-shadow { position: absolute; left: 18%; right: 18%; bottom: -26px; height: 22px; border-radius: 50%; background: radial-gradient(rgba(0,0,0,.6), transparent 70%); animation: shadow 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) rotateY(10deg); } }
@keyframes shadow { 50% { transform: scale(.85); opacity: .6; } }

.next-card { width: 100%; max-width: 400px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.next-head { display: flex; justify-content: space-between; align-items: center; }
.round { font: 600 11.5px/1 var(--mono); color: var(--muted); }
.next-name { font: 700 24px/1.1 var(--display); text-transform: uppercase; margin: 8px 0 2px; }
.next-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown div { background: #0b0c0f; border: 1px solid var(--line); border-radius: 10px; text-align: center; padding: 8px 0 6px; }
.countdown b { display: block; font: 700 26px/1 var(--mono); }
.countdown span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.countdown.live b { color: var(--red); }

.stats { margin-top: 46px; display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(18,20,24,.7); overflow: hidden; }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.stat:last-child { border-right: 0; }
.stat b { font: 700 22px/1.1 var(--mono); }
.stat em { font: 600 12.5px/1 var(--mono); font-style: normal; }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 26px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-sub { color: var(--muted); max-width: 560px; margin: 10px 0 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); gap: 10px; }

.seg { display: inline-flex; padding: 4px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: #22262d; color: var(--text); }

/* ---------- race center ---------- */
.race-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.race-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); font: 600 12px/1 var(--body); background: var(--panel); }
.badge .sw { width: 10px; height: 10px; border-radius: 2px; }
.flag-GREEN .sw { background: var(--green); }
.flag-YELLOW .sw, .flag-DOUBLE\ YELLOW .sw { background: var(--amber); }
.flag-RED .sw { background: var(--red); }
.flag-SC .sw, .flag-VSC .sw { background: var(--amber); }
.flag-CHEQUERED .sw { background: repeating-conic-gradient(#fff 0 25%, #000 0 50%) 50% / 6px 6px; }

.tower-panel { overflow: hidden; }
.tower-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.session-line { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.status-pill { padding: 5px 10px; border-radius: 6px; font: 800 11px/1 var(--body); letter-spacing: .14em; background: #22262d; color: var(--muted); }
.status-pill.live { background: var(--red); color: #fff; }
.status-pill.finished { background: #1f2a22; color: var(--green); }
.lap-count { font: 700 15px/1 var(--mono); }
.lap-count span { color: var(--muted); font-weight: 500; }
.tower-scroll { overflow-x: auto; }
.tower { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.tower th { text-align: left; font: 600 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tower td { padding: 0 10px; height: 38px; border-bottom: 1px solid rgba(255,255,255,0.035); white-space: nowrap; }
.tower tbody tr { transition: background .3s; }
.tower tbody tr:hover { background: rgba(255,255,255,.025); }
.tower tr.gain { animation: gain 1.4s; }
.tower tr.lose { animation: lose 1.4s; }
@keyframes gain { from { background: rgba(34,197,94,.16); } }
@keyframes lose { from { background: rgba(244,63,94,.14); } }
.tower .pos { width: 46px; font: 700 15px/1 var(--mono); text-align: center; }
.tower tr:nth-child(1) .pos { color: #f5d06b; }
.tower .drv { display: flex; align-items: center; gap: 10px; height: 38px; }
.tower .bar { width: 4px; height: 22px; border-radius: 2px; flex: none; }
.tower .code { font: 800 16px/1 var(--display); letter-spacing: .04em; }
.tower .tname { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.tower .t { font-family: var(--mono); font-size: 13px; text-align: right; }
.tower th.r { text-align: right; }
.tower .t.pb { color: var(--purple); font-weight: 700; }
.tyre { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--mono); color: var(--muted); }
.tyre i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid; display: grid; place-items: center; font: 800 8.5px/1 var(--body); font-style: normal; color: var(--text); background: #0b0c0f; }
.tyre .SOFT { border-color: #e10600; } .tyre .MEDIUM { border-color: #f5c518; } .tyre .HARD { border-color: #e8e8e8; }
.tyre .INTERMEDIATE { border-color: #2fb24c; } .tyre .WET { border-color: #2a7fff; } .tyre .UNKNOWN { border-color: #555; }
.tk-chip { display: inline-block; padding: 3px 7px; border-radius: 6px; font: 700 11px/1 var(--mono); border: 1px solid; opacity: .95; }
.tk-chip:hover { opacity: 1; filter: brightness(1.2); }
.tower-foot { padding: 10px 16px; font-size: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.tower .tower-sub { height: 34px; font: 600 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.02); }
.tower-empty { padding: 34px 20px; text-align: center; }
.tower-empty h4 { font-size: 26px; text-transform: uppercase; font-style: italic; margin-bottom: 6px; }
.tower-empty p { color: var(--muted); margin: 0 auto 16px; max-width: 520px; }

.race-side { display: grid; gap: 18px; }
.stream-frame { aspect-ratio: 16/9; background: #000; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.stream-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.race-layout.has-stream { grid-template-columns: minmax(0, 1fr) 420px; }

.ontrack { list-style: none; margin: 0; padding: 6px 0; }
.ontrack li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 7px 16px; font-size: 13.5px; }
.ontrack .p { font: 700 13px/1 var(--mono); color: var(--muted); }
.ontrack .n { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ontrack .n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ontrack .sw { width: 4px; height: 16px; border-radius: 2px; flex: none; }

.rc { list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow: auto; }
.rc li { padding: 9px 16px; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 12.5px; display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.rc li:last-child { border-bottom: 0; }
.rc .when { font: 500 11.5px/1.5 var(--mono); color: var(--faint); }
.rc .msg { line-height: 1.45; }
.rc .f-YELLOW { border-left: 3px solid var(--amber); }
.rc .f-RED { border-left: 3px solid var(--red); }
.rc .f-GREEN, .rc .f-CLEAR { border-left: 3px solid var(--green); }
.rc .f-BLUE { border-left: 3px solid #2a7fff; }
.rc .f-CHEQUERED { border-left: 3px solid #fff; }

.weather { display: grid; grid-template-columns: repeat(4, 1fr); }
.weather div { padding: 14px 12px; border-right: 1px solid var(--line); display: grid; gap: 6px; }
.weather div:last-child { border-right: 0; }
.weather b { font: 700 16px/1 var(--mono); }

/* ---------- movers ---------- */
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mover { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; cursor: pointer; transition: border-color .2s; }
.mover:hover { border-color: var(--line-2); }
.mover::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c, #555); }
.mover .tag { font: 700 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.mover .tm { font: 800 30px/1 var(--display); text-transform: uppercase; font-style: italic; margin: 6px 0 4px; }
.mover .big { font: 700 30px/1 var(--mono); text-align: right; }
.mover .meta { display: flex; gap: 16px; color: var(--muted); font: 500 12.5px/1 var(--mono); flex-wrap: wrap; }
.mover.empty { cursor: default; color: var(--muted); grid-template-columns: 1fr; }

/* ---------- team tokens ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.team {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s;
}
.team:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.team-top { position: relative; padding: 16px 16px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 62%); }
.team-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent); }
.team-row { display: flex; align-items: center; gap: 12px; }
.team-av { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--c); color: #0b0c0f; font: 800 15px/1 var(--display); overflow: hidden; }
.team-av img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font: 800 22px/1 var(--display); text-transform: uppercase; font-style: italic; }
.team-tk { font: 600 12.5px/1 var(--mono); color: var(--muted); margin-top: 5px; }
.champ { margin-left: auto; text-align: right; }
.champ b { display: block; font: 800 26px/1 var(--display); font-style: italic; }
.champ span { font: 500 11px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.team-row > div:nth-child(2) { min-width: 0; }
.team-body { padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; flex: 1; }
.kv { display: grid; gap: 4px; }
.kv b { font: 700 15px/1 var(--mono); }
.team-foot { display: flex; gap: 8px; padding: 0 16px 16px; }
.team-foot .btn { flex: 1; }
.team.soon .team-body { opacity: .5; }
.soon-tag { display: inline-block; margin-left: 8px; vertical-align: middle; white-space: nowrap; font: 700 10px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; padding: 4px 6px; border-radius: 5px; font-size: 9px !important; background: rgba(0,0,0,.45); border: 1px solid var(--line-2); color: var(--muted); }
.spark { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: #1d2026; overflow: hidden; }
.spark i { display: block; height: 100%; background: var(--c); }

/* ---------- paddock vs market ---------- */
.pvm { padding: 22px; }
.pvm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pvm-head p.small { max-width: 300px; margin: 0; }
.pvm-rows { display: grid; gap: 6px; }
.pvm-row { display: grid; grid-template-columns: 170px 1fr 70px 1fr 110px; gap: 14px; align-items: center; font-size: 13.5px; }
.pvm-row .nm { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pvm-row .nm i { width: 4px; height: 16px; border-radius: 2px; }
.pvm-bar { height: 8px; border-radius: 4px; background: #1b1e24; overflow: hidden; }
.pvm-bar i { display: block; height: 100%; border-radius: 4px; }
.pvm-bar.left { transform: scaleX(-1); }
.pvm-row .rk { text-align: center; font: 700 12.5px/1 var(--mono); color: var(--muted); }
.pvm-row .verdict { font: 600 12px/1 var(--mono); text-align: right; }
.pvm-legend { display: grid; grid-template-columns: 170px 1fr 70px 1fr 110px; gap: 14px; font: 600 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.pvm-legend span:nth-child(2) { text-align: right; }

/* ---------- fee engine ---------- */
:root { --buy: #e10600; --hold: #f5b400; }
.fx-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.fx-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
.fx-split { padding: 0; overflow: hidden; }
.fx-halves { display: grid; grid-template-columns: 70fr 30fr; min-height: 200px; }
.fx-half { position: relative; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; overflow: hidden; }
.fx-half.buy { background: linear-gradient(160deg, rgba(225,6,0,.28), rgba(225,6,0,.06)); border-right: 1px solid var(--line); }
.fx-half.hold { background: linear-gradient(160deg, rgba(245,180,0,.2), rgba(245,180,0,.04)); }
.fx-half::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(255,255,255,.025) 22px 23px); }
.fx-pct { position: absolute; top: 14px; left: 20px; font: 800 72px/1 var(--display); font-style: italic; }
.fx-half.buy .fx-pct { color: var(--buy); }
.fx-half.hold .fx-pct { color: var(--hold); font-size: 56px; }
.fx-half h4 { font-size: 24px; text-transform: uppercase; font-style: italic; position: relative; }
.fx-half p { margin: 0; color: #c4c9d1; font-size: 13.5px; position: relative; }
.fx-bars { padding: 16px 20px 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.fx-bar-row { display: grid; grid-template-columns: 60px 1fr 110px; gap: 12px; align-items: center; }
.fx-bar-row .mono { text-align: right; }
.fx-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #1b1e24; }
.fx-bar i { display: block; height: 100%; transition: width .6s; }
.fx-bar .b { background: var(--buy); }
.fx-bar .h { background: var(--hold); }
.fx-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fx-stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 16px; display: grid; gap: 5px; align-content: start; position: relative; overflow: hidden; }
.fx-stat::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); }
.fx-stat.buy::after { background: var(--buy); }
.fx-stat.hold::after { background: var(--hold); }
.fx-stat b { font: 700 24px/1.1 var(--mono); }
.fx-stat em { font: 500 13px/1 var(--mono); font-style: normal; color: var(--muted); }
.fx-stat small { font-size: 12px; color: var(--faint); }
.fx-wallet { margin-top: 18px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.fx-wallet code { font: 500 13px/1 var(--mono); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 200px; }
.fx-wallet .ca-copy { border: 1px solid var(--line-2); border-radius: 8px; height: 32px; }
.fx-feed { margin-top: 18px; }
.fx-feed ul { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.fx-feed li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 14px; align-items: center; padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 13.5px; }
.fx-feed li:last-child { border-bottom: 0; }
.fx-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 800 13px/1 var(--display); background: #1b1e24; color: var(--muted); }
.fx-ic.fee { color: var(--green); background: rgba(34,197,94,.1); }
.fx-ic.buyback { color: var(--buy); background: rgba(225,6,0,.12); }
.fx-ic.holder_sol, .fx-ic.holder_tokens { color: var(--hold); background: rgba(245,180,0,.1); }
.fx-ic.burn { color: #ff7a45; background: rgba(255,122,69,.1); }
.fx-ic.sell { color: var(--down); background: rgba(244,63,94,.12); }
.fx-what b { font-weight: 600; }
.fx-what div { color: var(--muted); font-size: 12px; margin-top: 2px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.fx-amt { font: 700 13.5px/1 var(--mono); text-align: right; white-space: nowrap; }
.fx-when { font: 500 12px/1 var(--mono); color: var(--faint); white-space: nowrap; }
.fx-when a:hover { color: var(--text); }

/* public draws */
.gwp { margin-top: 18px; }
.gwp-draw { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.gwp-draw.voided { opacity: .5; }
.gwp-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.gwp-top b { font: 800 19px/1 var(--display); text-transform: uppercase; font-style: italic; }
.gwp-top .m { color: var(--muted); font-size: 12.5px; }
.gwp-top .links { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.gwp-top .links a:hover { color: var(--text); }
.gwp-wins { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.gwp-win { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0e1013; font: 500 12.5px/1.3 var(--mono); }
.gwp-win .paid { color: var(--hold); font-weight: 700; white-space: nowrap; }
.gwp-win .paid a { color: inherit; }
.gwp-win .pending { color: var(--faint); }
.gwp-how { padding: 12px 16px; font-size: 13px; color: var(--muted); }
.gwp-how summary { cursor: pointer; }
.gwp-how p { margin: 8px 0 0; max-width: 760px; }
.vbadge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 5px; background: rgba(34,197,94,.12); color: var(--green); font: 700 10.5px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; margin-left: 6px; }

/* ---------- standings ---------- */
.standings-layout > * { min-width: 0; }
.standings-layout > .panel { overflow-x: auto; }
.standings-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.podium-panel { padding: 20px; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 8px; margin-top: 16px; }
.pod { text-align: center; }
.pod .code { font: 800 22px/1 var(--display); }
.pod .pts { font: 500 12px/1 var(--mono); color: var(--muted); margin: 4px 0 8px; }
.pod .step { border-radius: 10px 10px 0 0; display: grid; place-items: center; font: 800 34px/1 var(--display); font-style: italic; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, #15171b), #15171b); border-top: 3px solid var(--c); }
.pod.p1 .step { height: 130px; } .pod.p2 .step { height: 96px; } .pod.p3 .step { height: 72px; }
.podium-title { font: 700 20px/1.1 var(--display); text-transform: uppercase; }
.podium-sub { margin-top: 2px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 600 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.035); }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; font-family: var(--mono); }
.table .p { font: 700 13px/1 var(--mono); width: 40px; }
.table .who { display: flex; align-items: center; gap: 10px; }
.table .who i { width: 4px; height: 18px; border-radius: 2px; }
.table .who small { color: var(--muted); margin-left: 4px; }
.ptsbar { width: 120px; height: 6px; background: #1b1e24; border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 10px; }
.ptsbar i { display: block; height: 100%; }

/* ---------- calendar ---------- */
.cal { mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); padding-left: 24px; padding-right: 24px; display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.cal-item { scroll-snap-align: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel); display: grid; gap: 4px; }
.cal-item .rd { font: 600 11px/1 var(--mono); color: var(--faint); }
.cal-item .nm { font: 700 17px/1.05 var(--display); text-transform: uppercase; }
.cal-item .dt { font: 500 12px/1 var(--mono); color: var(--muted); margin-top: 4px; }
.cal-item.done { opacity: .5; }
.cal-item.next { border-color: var(--red); background: linear-gradient(180deg, rgba(225,6,0,.14), var(--panel)); opacity: 1; }
.cal-item .win { font-size: 11.5px; color: var(--muted); }

/* ---------- buy ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; position: relative; overflow: hidden; }
.steps .n { font: 800 44px/1 var(--display); font-style: italic; color: transparent; -webkit-text-stroke: 1px #3a404a; }
.steps h4 { font-size: 22px; text-transform: uppercase; margin: 10px 0 6px; }
.steps p { color: var(--muted); margin: 0; font-size: 14px; }
.buy-bar { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0 30px; background: #08090b; }
.footer-inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand b { font: 800 20px/1 var(--display); text-transform: uppercase; font-style: italic; }
.footer-brand p { margin: 4px 0 0; }
.footer-links { display: flex; gap: 18px; color: var(--muted); font-size: 14px; margin-left: auto; }
.footer-links a:hover { color: var(--text); }
.socials { display: flex; gap: 8px; }
.disclaimer { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.disclaimer p { margin: 0 0 8px; max-width: 900px; }

/* ---------- drawer ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60; backdrop-filter: blur(3px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg-2); border-left: 1px solid var(--line); z-index: 61; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); overflow-y: auto; }
.drawer.open { transform: none; }
.drawer-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-size: 22px; line-height: 1; z-index: 2; }
.d-hero { padding: 26px 22px 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); border-bottom: 1px solid var(--line); }
.d-hero .team-name { font-size: 36px; }
.d-price { display: flex; align-items: baseline; gap: 12px; margin-top: 16px; }
.d-price b { font: 700 30px/1 var(--mono); }
.d-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.d-grid > div { background: var(--bg-2); padding: 14px 16px; display: grid; gap: 6px; }
.d-grid b { font: 700 15px/1 var(--mono); }
.d-chart { height: 420px; border-bottom: 1px solid var(--line); background: #000; }
.d-chart iframe { width: 100%; height: 100%; border: 0; }
.d-section { padding: 18px 22px; display: grid; gap: 12px; }
.d-drivers { display: grid; gap: 8px; }
.d-drivers div { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: #1d2026; border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; transition: .25s; z-index: 80; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { background: linear-gradient(90deg, #15171b, #1c1f25, #15171b); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .race-layout, .race-layout.has-stream { grid-template-columns: 1fr; }
  .race-side { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr 1fr; }
  .standings-layout { grid-template-columns: 1fr; }
  .fx-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; top: 96px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 20px 16px; display: none; }
  .nav-links.open { display: flex; }
  .menu-btn { display: block; }
  .nav-cta { margin-left: auto; }
  .hero { padding-top: 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 22px; }
  .hero-side { display: contents; }
  .coin-stage { order: -1; width: 180px; justify-self: center; }
  .next-card { max-width: none; }
  .hero-title { font-size: clamp(54px, 16vw, 96px); }
  .movers { grid-template-columns: 1fr; }
  .race-side { grid-template-columns: 1fr; }
  .pvm-row, .pvm-legend { grid-template-columns: 110px 1fr 46px 1fr 74px; gap: 8px; font-size: 12px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: 0 !important; }
  .steps { grid-template-columns: 1fr; }
  .brand span { display: none; }
  #navX { display: none; }
  .d-grid { grid-template-columns: 1fr 1fr; }
  .weather { grid-template-columns: 1fr 1fr; }
  .weather div:nth-child(2) { border-right: 0; }
  .weather div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pvm-row .verdict, .pvm-legend span:last-child { display: none; }
  .pvm-row, .pvm-legend { grid-template-columns: 96px 1fr 40px 1fr; }
  .table .hs, .ptsbar { display: none; }
  .fx-stat b { font-size: 19px; } .fx-stat { padding: 14px; }
  .fx-pct { font-size: 52px; } .fx-half.hold .fx-pct { font-size: 38px; }
  .fx-half { padding: 16px; } .fx-half p { display: none; }
  .fx-feed li { grid-template-columns: 30px 1fr auto; } .fx-when { display: none; }
  .fx-bar-row { grid-template-columns: 50px 1fr 84px; }
  .table td, .table th { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
