/* ============================================================
   Baqgybet — design system "Duel"
   Layers: tokens → reset → base → layout → components → pages → utilities
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* surfaces */
  --bg:        #0F1014;
  --panel:     #16181F;
  --panel-2:   #1C1F29;
  --line:      #262A35;
  --line-soft: #1E222C;

  /* duel accents */
  --red:       #E8394A;
  --red-deep:  #3A1219;
  --ice:       #4CC9F0;
  --ice-deep:  #0F2A36;

  /* text */
  --text:      #EFF1F6;
  --dim:       #9AA2B5;

  /* semantic */
  --up:        #33D488;
  --warn:      #FFC857;

  /* type */
  --font-head: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --fs-12: .75rem;  --fs-13: .8125rem; --fs-14: .875rem; --fs-15: .9375rem;
  --fs-16: 1rem;    --fs-18: 1.125rem; --fs-20: 1.25rem; --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-h1: clamp(2.1rem, 4.6vw, 3.4rem);
  --fs-h2: clamp(1.5rem, 2.6vw, 1.9rem);

  /* spacing (4px grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* shape */
  --skew: 8deg;

  /* elevation */
  --sh-card:  0 10px 30px rgba(0, 0, 0, .35);
  --sh-drop:  0 16px 40px rgba(0, 0, 0, .45);
  --sh-modal: 0 30px 80px rgba(0, 0, 0, .6);

  /* motion */
  --t-fast: .15s ease-out;
  --t-med:  .25s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.55;
  overflow-x: hidden;
}
img, picture, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -.02em; line-height: 1.12; }

:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto; }
}

/* ---------- 3. Layout ---------- */
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--s-6); }

.layout-rail { display: grid; gap: var(--s-6); align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1081px) {
  .layout-rail { grid-template-columns: minmax(0, 1fr) 312px; }
}

section { padding-block: var(--s-12); }
@media (min-width: 768px) { section { padding-block: var(--s-16); } }

.num { font-variant-numeric: tabular-nums; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-14);
  padding: 11px 22px; border: 1px solid transparent;
  transition: transform var(--t-fast), filter var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  min-height: 44px;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { filter: brightness(1.1); }
.btn--ice { background: var(--ice); color: #0A222D; }
.btn--ice:hover { filter: brightness(1.08); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--dim); }
.btn--skew { clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }

/* ---------- 5. Top bars ---------- */
.ncpf-bar {
  background: linear-gradient(90deg, var(--red), #B32B39 49.9%, #2B8FB0 50.1%, var(--ice));
  color: #fff; text-align: center; padding: 10px var(--s-4);
  font-weight: 700; font-size: var(--fs-14); text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.ncpf-bar a { text-decoration: underline; text-underline-offset: 2px; }

.comp-strip {
  background: #0A0B0E; border-bottom: 1px solid var(--line);
  font-size: var(--fs-12); color: var(--dim);
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
  gap: var(--s-2) var(--s-5); padding: 7px var(--s-4);
}
.comp-strip a { text-decoration: underline; text-underline-offset: 2px; }
.comp-strip a:hover { color: var(--text); }
.comp-strip__age {
  color: var(--text); border: 1px solid var(--dim); border-radius: 3px;
  padding: 0 6px; font-weight: 700;
}

/* ---------- 6. Header / nav ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 93%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head__row { display: flex; align-items: center; gap: var(--s-6); height: 62px; }

.logo { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-24); line-height: 1; }
.logo__l { color: var(--red); }
.logo__r { color: var(--ice); }

/* ----- logo intro (rising odds → reveal → glow); sequenced by logo-intro.js ----- */
:root {
  --logo-step: 160ms;      /* per-odds-number duration */
  --logo-reveal: 450ms;    /* logo entrance */
  --logo-glow: 280ms;      /* accent on the ice half */
  --logo-glow-color: rgba(76, 201, 240, .5);
}
[data-logo-intro] { position: relative; display: inline-block; }
.logo__text { display: inline-block; }
.logo__odds {
  position: absolute; inset: 0; display: none; align-items: center;
  color: var(--text); font-weight: 800; will-change: transform, opacity;
}
[data-logo-intro].is-animating .logo__odds { display: inline-flex; }
[data-logo-intro].is-animating .logo__text { opacity: 0; }
.logo__odds.is-step { animation: logo-odds var(--logo-step) ease-out both; }
@keyframes logo-odds {
  0%   { opacity: 0; transform: translateY(12px) scale(.72); }
  55%  { opacity: 1; transform: translateY(0) scale(1.05); }
  100% { opacity: 0; transform: translateY(-9px) scale(1.14); }
}
[data-logo-intro].is-reveal .logo__text {
  animation: logo-reveal var(--logo-reveal) cubic-bezier(.22, .9, .3, 1) both;
}
@keyframes logo-reveal {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
[data-logo-intro].is-glow .logo__r { animation: logo-glow var(--logo-glow) ease-out both; }
@keyframes logo-glow {
  0%   { text-shadow: 0 0 0 transparent; }
  45%  { text-shadow: 0 0 14px var(--logo-glow-color); }
  100% { text-shadow: 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  [data-logo-intro].is-animating .logo__text { opacity: 1; }
  .logo__odds { display: none !important; }
}

.site-nav { display: flex; align-items: center; }
.site-nav__burger { display: grid; place-items: center; width: 44px; height: 44px; color: var(--text); }
.site-nav__menu {
  position: fixed; inset: 0; top: 0; z-index: 70;
  background: var(--bg); padding: var(--s-16) var(--s-6);
  display: none; flex-direction: column; gap: var(--s-4);
  font-weight: 600; font-size: var(--fs-18);
}
.site-nav__menu.is-open { display: flex; }
.site-nav__menu a.is-active { color: var(--ice); }
.drop-caret { width: 16px; height: 16px; vertical-align: -2px; }

.drop {
  display: none;
  padding: var(--s-3) 0 0 var(--s-4);
}
.has-drop.is-open .drop { display: grid; gap: var(--s-2); }
.drop a { display: flex; align-items: center; gap: var(--s-3); color: var(--dim); font-size: var(--fs-15); padding: 6px 0; }
.drop a:hover { color: var(--text); }
.drop svg { width: 17px; height: 17px; color: var(--ice); }

.site-head__cta { margin-left: auto; display: flex; gap: var(--s-3); align-items: center; }
@media (max-width: 480px) {
  .site-head__row { gap: var(--s-3); }
  .site-head__cta { gap: var(--s-2); }
  .site-head__cta .btn { padding-inline: 13px; font-size: var(--fs-13); min-height: 40px; }
  .logo { font-size: var(--fs-20); }
}

@media (min-width: 981px) {
  .site-nav__burger { display: none; }
  .site-nav__menu {
    position: static; display: flex; flex-direction: row; gap: var(--s-6);
    background: none; padding: 0; font-size: var(--fs-15); color: var(--dim);
  }
  .site-nav__menu > li > a:hover { color: var(--text); }
  .site-nav__menu a.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--red); }
  .has-drop { position: relative; }
  /* invisible hover bridge over the gap between the link and the panel,
     so the pointer can travel down without the menu closing */
  .has-drop::after { content: ""; position: absolute; left: -16px; right: -40px; top: 100%; height: 34px; }
  .drop {
    position: absolute; left: -16px; top: calc(100% + 14px);
    background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh-drop);
    padding: var(--s-4); width: 460px;
    grid-template-columns: 1fr 1fr;
  }
  .has-drop:hover .drop, .has-drop:focus-within .drop { display: grid; gap: var(--s-1) var(--s-5); }
  .drop a { padding: 7px 6px; }
}

/* ---------- 7. Duel primitives ---------- */
.duel-strip { position: relative; height: 6px; overflow: hidden; }
.duel-strip::before, .duel-strip::after { content: ""; position: absolute; inset-block: 0; width: 50.5%; }
.duel-strip::before { left: 0; background: var(--red); transform: skewX(-20deg); transform-origin: bottom; }
.duel-strip::after { right: 0; background: var(--ice); transform: skewX(-20deg); transform-origin: top; }

.vs-badge {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
  display: grid; place-items: center; position: relative;
  font-family: var(--font-head); font-weight: 800; font-size: var(--fs-24);
}
.vs-badge small {
  position: absolute; bottom: 13px; font-family: var(--font-body);
  font-size: .58rem; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
}

/* section heading */
.sec-h { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-6); }
.sec-h h2 { font-size: var(--fs-h2); font-weight: 800; text-transform: uppercase; }
.sec-h__ln { flex: 1; height: 2px; background: linear-gradient(90deg, var(--red), var(--ice)); opacity: .8; }
.sec-h a { color: var(--ice); font-weight: 700; font-size: var(--fs-14); white-space: nowrap; }
.sec-h a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 8. Odds + match rows ---------- */
.po {
  background: var(--bg); border: 1px solid var(--line); padding: 7px 14px;
  cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
  text-align: center; min-height: 40px;
}
.po b { font-family: var(--font-head); font-size: var(--fs-16); font-weight: 700; }
.po small { display: block; font-size: .66rem; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.po--red b { color: var(--red); }
.po--ice b { color: var(--ice); }
.po--red:hover { border-color: var(--red); transform: translateY(-1px); }
.po--ice:hover { border-color: var(--ice); transform: translateY(-1px); }
.po.is-sel { background: #fff; border-color: #fff; }
.po.is-sel b, .po.is-sel small { color: #0F1014; }
.po:disabled { opacity: .35; pointer-events: none; }
.race-card.is-jumped .race-card__jump { color: var(--dim); }

.xo {
  font-size: var(--fs-12); border: 1px solid var(--line); color: var(--dim);
  padding: 4px 9px; cursor: pointer; transition: border-color var(--t-fast); min-height: 28px;
}
@media (max-width: 860px) {
  /* comfortable touch targets on mobile */
  .xo { min-height: 40px; padding: 8px 12px; }
  .po { min-height: 44px; }
}
.xo b { color: var(--text); font-weight: 700; }
.xo:hover { border-color: var(--dim); }
.xo.is-sel { background: #fff; border-color: #fff; }
.xo.is-sel, .xo.is-sel b { color: #0F1014; }

/* mirrored head-to-head row */
.mrow {
  display: grid; background: var(--panel); border: 1px solid var(--line);
  margin-bottom: var(--s-3); position: relative; overflow: hidden;
  transition: border-color var(--t-med);
}
.mrow::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity var(--t-med); pointer-events: none;
  background: linear-gradient(90deg, rgba(232, 57, 74, .07), transparent 40% 60%, rgba(76, 201, 240, .07));
}
.mrow:hover { border-color: #3A4054; }
.mrow:hover::before { opacity: 1; }
.mrow__side { padding: var(--s-4) var(--s-5); display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
.mrow__side--r { justify-content: flex-end; text-align: right; }
.mrow__team { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-16); }
.mrow__side small { display: block; color: var(--dim); font-size: var(--fs-12); font-weight: 600; }
.mrow__center {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: var(--s-3) var(--s-2); border-block: 1px dashed var(--line);
}
.mrow__lg { font-size: .69rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mrow__time { font-size: var(--fs-13); font-weight: 600; }
.mrow__xtra { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center; }
@media (min-width: 861px) {
  .mrow { grid-template-columns: 1fr 220px 1fr; }
  .mrow__center { border-block: 0; border-inline: 1px dashed var(--line); }
}

/* expandable markets inside a row */
.mrow__more { grid-column: 1 / -1; border-top: 1px dashed var(--line); }
.mrow__more summary {
  list-style: none; cursor: pointer; text-align: center; padding: var(--s-2);
  font-size: var(--fs-13); font-weight: 700; color: var(--ice);
}
.mrow__more summary::-webkit-details-marker { display: none; }
.mrow__more summary:hover { color: var(--text); }
.mkt-grid { display: grid; gap: var(--s-2); padding: var(--s-3) var(--s-5) var(--s-5); }
@media (min-width: 720px) { .mkt-grid { grid-template-columns: 1fr 1fr; } }
.mkt { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--s-2); font-size: var(--fs-13); color: var(--dim); }
.mkt span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 9. Cards / panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); padding: var(--s-6); }
.panel--red { border-top: 3px solid var(--red); }
.panel--ice { border-top: 3px solid var(--ice); }
.panel h3, .panel .panel-h { font-size: var(--fs-18); text-transform: uppercase; margin-bottom: var(--s-4); }
.panel .it { display: flex; justify-content: space-between; gap: var(--s-3); padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-14); }
.panel .it small { color: var(--dim); }
.panel .it b { font-family: var(--font-head); }
.panel--red .it b { color: var(--red); }
.panel--ice .it b { color: var(--ice); }
.panel .all { display: inline-block; margin-top: var(--s-4); font-weight: 700; font-size: var(--fs-13); border-bottom: 2px solid var(--line); }
.panel .all:hover { border-color: var(--dim); }

/* sports grid */
.sp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 640px) { .sp-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .sp-grid { grid-template-columns: repeat(7, 1fr); } }
.sp {
  background: var(--bg); padding: var(--s-5) var(--s-2); text-align: center;
  font-weight: 600; font-size: var(--fs-13); transition: background var(--t-fast);
}
.sp svg { width: 20px; height: 20px; margin-inline: auto; margin-bottom: var(--s-2); color: var(--dim); transition: color var(--t-fast); }
.sp:hover { background: var(--panel); }
.sp:nth-child(odd):hover svg { color: var(--red); }
.sp:nth-child(even):hover svg { color: var(--ice); }

/* ---------- 10. Bet slip ---------- */
.betslip {
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--red);
  display: none;
}
.betslip__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s-4) var(--s-4); font-family: var(--font-head); font-weight: 800;
  border-bottom: 1px solid var(--line);
}
.betslip__count {
  background: var(--red); color: #fff; border-radius: 20px;
  font-size: var(--fs-12); padding: 2px 9px; font-family: var(--font-body); font-weight: 700;
}
.betslip__body { padding: var(--s-4); }
.betslip__empty { color: var(--dim); font-size: var(--fs-14); }
.betslip__sel { border: 1px solid var(--line); padding: var(--s-3); margin-bottom: var(--s-2); font-size: var(--fs-13); position: relative; }
.betslip__sel-top { display: flex; justify-content: space-between; gap: var(--s-2); font-weight: 700; padding-right: 22px; }
.betslip__sel-top b { color: var(--ice); font-family: var(--font-head); }
.betslip__sel small { color: var(--dim); }
.betslip__sel-x { position: absolute; top: 6px; right: 6px; color: var(--dim); width: 24px; height: 24px; display: grid; place-items: center; }
.betslip__sel-x:hover { color: var(--red); }
.betslip__stake { display: block; margin-top: var(--s-4); font-size: var(--fs-13); color: var(--dim); }
.betslip__stake input {
  width: 100%; margin-top: 4px; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); padding: 10px 12px; font-size: var(--fs-15);
}
.betslip__stake input:focus { outline: 2px solid var(--ice); outline-offset: -1px; }
.betslip__est { display: flex; justify-content: space-between; color: var(--dim); font-size: var(--fs-14); margin-block: var(--s-3); }
.betslip__est b { color: var(--text); font-family: var(--font-head); }
.betslip__cta { width: 100%; }
.betslip__clear { width: 100%; margin-top: var(--s-2); min-height: 36px; font-size: var(--fs-13); }
.betslip__note { padding: 0 var(--s-4) var(--s-4); font-size: .69rem; color: var(--dim); text-align: center; }

.betslip-fab {
  position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 65;
  background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 700;
  padding: 13px 20px; display: flex; gap: var(--s-2); align-items: center;
  box-shadow: var(--sh-drop); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.betslip-fab [data-betslip-count] { background: #fff; color: var(--red); border-radius: 50%; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: var(--fs-12); }

@media (min-width: 1081px) {
  .layout-rail .betslip { display: block; position: sticky; top: 86px; }
  .layout-rail ~ .betslip-fab, .layout-rail .betslip-fab { display: none; }
  .betslip-fab { display: none; }
}
@media (max-width: 1080px) {
  .betslip.is-open {
    display: block; position: fixed; z-index: 75; left: var(--s-4); right: var(--s-4); bottom: var(--s-4);
    max-height: 72vh; overflow: auto; box-shadow: var(--sh-modal);
  }
  .betslip-fab { display: flex; }
}

/* ---------- 11. RG band ---------- */
.rg-band { background: var(--panel); border-block: 1px solid var(--line); border-left: 4px solid var(--red); border-right: 4px solid var(--ice); }
.rg-band__grid { display: grid; gap: var(--s-8); padding-block: var(--s-10); align-items: center; }
@media (min-width: 861px) { .rg-band__grid { grid-template-columns: 1.2fr .8fr; } }
.rg-band__title { font-size: var(--fs-24); text-transform: uppercase; margin-bottom: var(--s-3); }
.rg-band__grid p { color: var(--dim); }
.rg-band__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-4); }
.rg-band__box { background: var(--bg); border: 1px dashed var(--line); padding: var(--s-5); font-size: var(--fs-15); }
.rg-band__box b { color: var(--ice); }
.rg-band__box a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 12. Footer ---------- */
.site-foot { background: #0A0B0E; border-top: 1px solid var(--line); font-size: var(--fs-14); }
.site-foot__cols { display: grid; gap: var(--s-8); padding-block: var(--s-10) var(--s-8); }
@media (min-width: 720px) { .site-foot__cols { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-foot__blurb { color: var(--dim); margin-top: var(--s-3); max-width: 34ch; }
.site-foot__cols h4, .site-foot__cols .f-h {
  font-family: var(--font-head); font-weight: 700;
  font-size: var(--fs-13); text-transform: uppercase; letter-spacing: .1em;
  color: var(--dim); margin-bottom: var(--s-3);
}
.site-foot__cols nav a { display: block; color: var(--dim); padding: 4px 0; }
.site-foot__cols nav a:hover { color: var(--text); }
.site-foot__legal { border-top: 1px solid var(--line); }
.site-foot__legal-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-4); padding-block: var(--s-6); color: var(--dim); font-size: var(--fs-13);
}
.site-foot__legal-grid b { color: var(--text); }
.site-foot__legal-grid a { text-decoration: underline; text-underline-offset: 2px; }
.site-foot__bottom { border-top: 1px solid var(--line); padding: var(--s-4); text-align: center; color: var(--dim); font-size: var(--fs-13); }

/* payment methods strip */
.pay-strip { border-top: 1px solid var(--line); }
.pay-strip__row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding-block: var(--s-4); }
.pay-strip__label { font-size: var(--fs-12); color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.pay-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #EFF1F6; border-radius: 4px; height: 30px; padding: 6px 10px;
}
.pay-chip img { height: 16px; width: auto; display: block; }
.pay-chip--text { font-size: var(--fs-12); font-weight: 800; color: #0F1014; letter-spacing: .02em; gap: 5px; }
.pay-chip--text svg { width: 14px; height: 14px; color: #0F1014; }
.pay-strip__note { font-size: var(--fs-12); color: var(--dim); }
@media (min-width: 720px) { .pay-strip__note { margin-left: auto; } }

.age-badge {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 2px solid var(--ice); border-radius: 50%; color: var(--ice);
  font-weight: 800; font-size: var(--fs-12); margin-right: var(--s-2); vertical-align: middle;
}
.age-badge--lg { width: 52px; height: 52px; font-size: var(--fs-16); margin: 0 auto var(--s-4); }

/* ---------- 13. Age gate ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 11, 14, .92); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: var(--s-4);
}
.age-gate[hidden] { display: none; }
.age-gate__panel {
  position: relative; overflow: hidden; text-align: center;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--sh-modal);
  padding: var(--s-10) var(--s-8); max-width: 470px; width: 100%;
}
.age-gate__halves { position: absolute; inset: 0 0 auto; height: 6px; display: flex; }
.age-gate__halves span:first-child { flex: 1; background: var(--red); }
.age-gate__halves span:last-child { flex: 1; background: var(--ice); }
.age-gate__panel h2 { font-size: var(--fs-24); margin-bottom: var(--s-2); }
.age-gate__panel > p { color: var(--dim); }
.age-gate__actions { display: flex; gap: var(--s-3); justify-content: center; margin-block: var(--s-6) var(--s-5); flex-wrap: wrap; }
.age-gate__under { font-size: var(--fs-13); color: var(--dim); border-top: 1px dashed var(--line); padding-top: var(--s-4); }
.age-gate__under a { text-decoration: underline; }

/* ---------- 14. Cookie consent ---------- */
.consent { position: fixed; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); z-index: 90; display: flex; justify-content: flex-start; pointer-events: none; }
.consent[hidden] { display: none; }
.consent__panel {
  pointer-events: auto; max-width: 480px;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--ice);
  box-shadow: var(--sh-modal); padding: var(--s-5);
}
.consent__panel h2 { font-size: var(--fs-16); margin-bottom: var(--s-2); }
.consent__panel > p { color: var(--dim); font-size: var(--fs-13); }
.consent__panel a { text-decoration: underline; }
.consent__cats { margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.consent__cat { display: flex; gap: var(--s-2); font-size: var(--fs-13); color: var(--dim); align-items: flex-start; }
.consent__cat input { margin-top: 3px; accent-color: var(--ice); }
.consent__cat b { color: var(--text); }
.consent__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-4); }
.consent__actions .btn { min-height: 38px; padding-block: 8px; font-size: var(--fs-13); }

/* ---------- 15. Forms ---------- */
.field { display: block; margin-bottom: var(--s-4); }
.field > span { display: block; font-size: var(--fs-13); font-weight: 600; color: var(--dim); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  padding: 11px 13px; font-size: var(--fs-15); transition: border-color var(--t-fast);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ice); outline-offset: -1px; }
.field.has-error input { border-color: var(--red); }
.field .field__err, .check .field__err { display: none; color: var(--red); font-size: var(--fs-12); margin-top: 4px; }
.field.has-error .field__err, .check.has-error .field__err { display: block; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-14); color: var(--dim); margin-bottom: var(--s-3); }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--red); flex: none; }
.check a { text-decoration: underline; color: var(--text); }

/* ---------- 16. Tabs ---------- */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: var(--s-5); }
.tab {
  padding: 11px 18px; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-14);
  color: var(--dim); white-space: nowrap; position: relative;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--ice));
}
[data-tab-panel][hidden] { display: none; }

/* ---------- 17. Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 18. Hero (duel) ---------- */
.duel-hero { position: relative; display: grid; border-bottom: 1px solid var(--line); overflow: hidden; padding-block: 0; }
.duel-hero__half { position: relative; padding: var(--s-12) var(--s-6); display: flex; flex-direction: column; justify-content: center; }
.duel-hero__half--l { background: linear-gradient(135deg, var(--red-deep), #1A0C10 70%); }
.duel-hero__half--r { background: linear-gradient(225deg, var(--ice-deep), #0B141A 70%); }
.duel-hero__code { font-size: var(--fs-12); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-bottom: var(--s-3); }
.duel-hero__half--l .duel-hero__code { color: var(--red); }
.duel-hero__half--r .duel-hero__code { color: var(--ice); }
.duel-hero__half h1, .duel-hero__half .duel-hero__team { font-size: var(--fs-h1); font-weight: 800; text-transform: uppercase; line-height: 1; }
.duel-hero__rec { color: var(--dim); font-size: var(--fs-14); margin-block: var(--s-3) var(--s-5); }
.duel-hero__odds {
  display: inline-flex; flex-direction: column; gap: 4px; align-self: flex-start;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); padding: var(--s-3) var(--s-5);
  cursor: pointer; transition: border-color var(--t-fast);
}
.duel-hero__odds small { font-size: .69rem; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.duel-hero__odds b { font-family: var(--font-head); font-size: var(--fs-30); }
.duel-hero__half--l .duel-hero__odds b { color: var(--red); }
.duel-hero__half--r .duel-hero__odds b { color: var(--ice); }
.duel-hero__half--l .duel-hero__odds:hover { border-color: var(--red); }
.duel-hero__half--r .duel-hero__odds:hover { border-color: var(--ice); }
.duel-hero__odds.is-sel { background: #fff; border-color: #fff; }
.duel-hero__odds.is-sel b, .duel-hero__odds.is-sel small { color: #0F1014; }
.duel-hero__vs { display: none; }
.duel-hero__meta {
  grid-column: 1 / -1; text-align: center; padding: var(--s-4);
  color: var(--dim); font-size: var(--fs-13);
  background: linear-gradient(transparent, rgba(10, 11, 14, .9));
}
.duel-hero__meta b { color: var(--text); }
@media (min-width: 861px) {
  .duel-hero { grid-template-columns: 1fr 1fr; min-height: 480px; }
  .duel-hero__half { padding: var(--s-16) var(--s-12); }
  .duel-hero__half--l { clip-path: polygon(0 0, 100% 0, calc(100% - 90px) 100%, 0 100%); z-index: 2; }
  .duel-hero__half--r { margin-left: -90px; padding-left: 150px; align-items: flex-end; text-align: right; }
  .duel-hero__half--r .duel-hero__odds { align-self: flex-end; align-items: flex-end; }
  .duel-hero__vs {
    display: grid; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -60%);
    z-index: 5; box-shadow: 0 0 0 10px rgba(15, 16, 20, .6);
  }
  .duel-hero__meta { position: absolute; inset-inline: 0; bottom: 0; z-index: 6; }
}

/* ---------- 19. Page hero (inner pages) ---------- */
.page-hero { position: relative; border-bottom: 1px solid var(--line); padding-block: var(--s-10); overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 240px at 12% 0%, rgba(232, 57, 74, .12), transparent 65%),
    radial-gradient(560px 240px at 88% 100%, rgba(76, 201, 240, .1), transparent 65%);
}
.page-hero .wrap { position: relative; }
.page-hero h1 { font-size: var(--fs-h1); text-transform: uppercase; }
.page-hero__kick { font-size: var(--fs-12); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ice); margin-bottom: var(--s-3); display: block; }
.page-hero__sub { color: var(--dim); margin-top: var(--s-3); max-width: 62ch; }
.crumbs { font-size: var(--fs-13); color: var(--dim); margin-bottom: var(--s-4); }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin-inline: 6px; opacity: .5; }

/* ---------- 20. Accordion ---------- */
.acc { background: var(--panel); border: 1px solid var(--line); margin-bottom: var(--s-2); }
.acc summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); font-weight: 700; align-items: center;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; color: var(--red); font-family: var(--font-head); font-weight: 800; font-size: var(--fs-18); }
.acc[open] summary::after { content: "–"; color: var(--ice); }
.acc__body { padding: 0 var(--s-5) var(--s-5); color: var(--dim); font-size: var(--fs-15); }
.acc__body a { color: var(--ice); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 21. Page hero grid + art ---------- */
.page-hero__grid { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 861px) { .page-hero__grid { grid-template-columns: 1fr 380px; } }
.page-hero__art { border: 1px solid var(--line); width: 100%; height: auto; }

/* ---------- 22. Outrights ---------- */
.outright-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s-2); }
.outright {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-2);
  background: var(--panel); border: 1px solid var(--line); padding: 10px 14px;
  cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast);
  font-size: var(--fs-14); text-align: left;
}
.outright b { font-family: var(--font-head); color: var(--ice); }
.outright:hover { border-color: var(--ice); transform: translateY(-1px); }
.outright.is-sel { background: #fff; border-color: #fff; color: #0F1014; }
.outright.is-sel b { color: #0F1014; }

/* ---------- 23. Racing ---------- */
.next-jump { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); }
.nj-card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--red); padding: var(--s-4); }
.nj-card .cd { font-family: var(--font-head); font-weight: 800; color: var(--red); font-size: var(--fs-16); }
.nj-card b { display: block; margin-top: 4px; }
.nj-card small { color: var(--dim); font-size: var(--fs-12); }

.race-card { background: var(--panel); border: 1px solid var(--line); margin-bottom: var(--s-3); }
.race-card__head { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line-soft); }
.race-card__no { font-family: var(--font-head); font-weight: 800; color: var(--red); }
.race-card__track { font-family: var(--font-head); font-weight: 700; }
.race-card__meta { color: var(--dim); font-size: var(--fs-13); }
.race-card__jump { margin-left: auto; font-family: var(--font-head); font-weight: 800; color: var(--ice); font-size: var(--fs-15); }
.runner { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: var(--s-3); padding: 9px var(--s-5); border-bottom: 1px solid var(--line-soft); font-size: var(--fs-14); }
.runner:last-child { border-bottom: none; }
.runner__no { color: var(--dim); font-weight: 700; }
.runner__name { font-weight: 600; }
.race-card details { border-top: 1px dashed var(--line); }
.race-card details summary { list-style: none; cursor: pointer; text-align: center; padding: var(--s-2); font-size: var(--fs-13); font-weight: 700; color: var(--ice); }
.race-card details summary::-webkit-details-marker { display: none; }

.disclosure { border: 1px dashed var(--line); padding: var(--s-5); color: var(--dim); font-size: var(--fs-13); }
.partner-badges { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.partner-badge {
  border: 1px solid var(--line); padding: 8px 14px; font-size: var(--fs-12);
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
}
.partner-badge b { color: var(--ice); }

/* ---------- 24. Auth (duel split) ---------- */
.auth-grid { display: grid; gap: var(--s-6); align-items: start; padding-block: var(--s-10); }
@media (min-width: 981px) { .auth-grid { grid-template-columns: 1.1fr .9fr; } }
.auth-form { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--red); padding: var(--s-8); }
.auth-side { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--ice); padding: var(--s-8); }
.auth-side h2 { font-size: var(--fs-18); margin-bottom: var(--s-4); }
.auth-side .row { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-14); color: var(--dim); }
.auth-side .row:last-child { border-bottom: none; }
.auth-side .row svg { flex: none; width: 18px; height: 18px; color: var(--ice); margin-top: 2px; }
.auth-side .row b { color: var(--text); }
.form-grid-2 { display: grid; gap: 0 var(--s-4); }
@media (min-width: 640px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }
.form-actions { margin-top: var(--s-5); display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.notice-box { background: var(--bg); border: 1px dashed var(--line); padding: var(--s-4); font-size: var(--fs-13); color: var(--dim); margin-bottom: var(--s-5); }
.notice-box b { color: var(--text); }
.notice-box a { color: var(--ice); text-decoration: underline; }
.step-box { border: 1px solid var(--line); border-left: 3px solid var(--ice); padding: var(--s-4); margin-block: var(--s-5); }
.step-box h3 { font-size: var(--fs-15); margin-bottom: var(--s-2); }
.step-box p { font-size: var(--fs-13); color: var(--dim); margin-bottom: var(--s-3); }
fieldset { border: none; margin: 0; padding: 0; }
legend { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-16); margin-bottom: var(--s-4); }
.form-done { border: 1px solid var(--up); background: rgba(51, 212, 136, .06); padding: var(--s-5); }
.form-done b { color: var(--up); }
.form-errbox { border: 1px solid var(--red); background: rgba(232, 57, 74, .06); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-5); font-size: var(--fs-14); }
.form-errbox b { color: var(--red); }
.form-errbox ul { list-style: disc; padding-left: var(--s-5); margin-top: var(--s-2); color: var(--dim); }

/* ---------- 25. Legal pages ---------- */
.legal-grid { display: grid; gap: var(--s-8); align-items: start; padding-block: var(--s-10); }
@media (min-width: 981px) { .legal-grid { grid-template-columns: 260px 1fr; } }
.toc { position: sticky; top: 86px; background: var(--panel); border: 1px solid var(--line); padding: var(--s-5); font-size: var(--fs-14); }
.toc h2 { font-size: var(--fs-13); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin-bottom: var(--s-3); }
.toc a { display: block; color: var(--dim); padding: 5px 0 5px 14px; position: relative; }
.toc a::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%) skewX(-20deg); width: 4px; height: 14px; background: transparent; }
.toc a:hover { color: var(--text); }
.toc a:hover::before { background: var(--red); }
.legal-body { max-width: 76ch; }
.legal-body h2 { font-size: var(--fs-20); margin: var(--s-8) 0 var(--s-3); scroll-margin-top: 96px; padding-left: var(--s-3); border-left: 3px solid var(--red); }
.legal-body h2:nth-of-type(even) { border-left-color: var(--ice); }
.legal-body h3 { font-size: var(--fs-16); margin: var(--s-5) 0 var(--s-2); }
.legal-body p, .legal-body li { color: var(--dim); font-size: var(--fs-15); margin-bottom: var(--s-3); }
.legal-body ul { padding-left: var(--s-5); list-style: disc; }
.legal-body a { color: var(--ice); text-decoration: underline; text-underline-offset: 2px; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); margin-block: var(--s-4); }
.legal-body th, .legal-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; color: var(--dim); }
.legal-body th { color: var(--text); background: var(--panel); }
.legal-meta { color: var(--dim); font-size: var(--fs-13); border: 1px dashed var(--line); padding: var(--s-3) var(--s-4); display: inline-block; }
.table-scroll { overflow-x: auto; }

/* ---------- 26. Hero slider ---------- */
.hero-slider { position: relative; }
.hero-slide { display: none; }
.hero-slide.is-current { display: grid; animation: slide-in .5s ease-out; }
@keyframes slide-in { from { opacity: 0; } to { opacity: 1; } }
.slider-nav {
  position: absolute; z-index: 7; bottom: 52px; left: 50%; transform: translateX(-50%);
  display: flex; gap: var(--s-3); align-items: center;
}
.slider-arrow {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--dim); background: rgba(15, 16, 20, .7); transition: var(--t-fast);
}
.slider-arrow:hover { color: var(--text); border-color: var(--dim); }
/* dots: 34×24 hit area, 4px visual bar inside */
.slider-dot { position: relative; width: 34px; height: 24px; background: transparent; }
.slider-dot::before {
  content: ""; position: absolute; left: 5px; right: 5px; top: 10px; height: 4px;
  background: var(--line); transform: skewX(-20deg); transition: background var(--t-fast);
}
.slider-dot.is-on::before { background: linear-gradient(90deg, var(--red), var(--ice)); }
@media (max-width: 860px) { .slider-nav { position: static; transform: none; justify-content: center; padding: var(--s-3); } }

/* ---------- 27. Utilities ---------- */
.u-dim { color: var(--dim); }
.u-center { text-align: center; }
.u-mt-2 { margin-top: var(--s-2); } .u-mt-4 { margin-top: var(--s-4); } .u-mt-6 { margin-top: var(--s-6); }
.u-mb-4 { margin-bottom: var(--s-4); } .u-mb-6 { margin-bottom: var(--s-6); }
.u-hide { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- 28. 2026-07 edits: event photos, operator box, BetStop ---------- */

/* Hero slider — event photo behind each duel slide */
.duel-hero__bg { position: absolute; inset: 0; z-index: 0; }
.duel-hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.duel-hero__half { z-index: 1; }
@media (max-width: 860px) { .duel-hero__meta { position: relative; z-index: 1; } } /* keep above the photo on mobile (desktop is already absolute, z6) */
/* halves become translucent glass over the photo (were opaque gradients) */
.duel-hero__half--l { background: linear-gradient(135deg, rgba(46, 13, 20, .78), rgba(20, 10, 13, .35) 70%); }
.duel-hero__half--r { background: linear-gradient(225deg, rgba(12, 34, 44, .78), rgba(9, 16, 21, .35) 70%); }

/* Homepage sport tiles — each code with its own duel photo */
.sp--photo { position: relative; overflow: hidden; min-height: 96px; display: grid; align-items: end; }
.sp__bg { position: absolute; inset: 0; }
.sp__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med); }
.sp--photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 16, 20, .18), rgba(15, 16, 20, .82) 82%);
}
.sp__label { position: relative; z-index: 1; display: block; padding-bottom: 2px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.sp--photo .sp__label svg { color: #fff; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6)); }
.sp--photo:hover .sp__bg img { transform: scale(1.06); }
.sp--photo:hover::after { background: linear-gradient(180deg, rgba(15, 16, 20, .05), rgba(15, 16, 20, .72) 82%); }

/* Photo header inside a .panel (racing / outrights strips) */
.panel__pic { position: relative; margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-6)) var(--s-4); border-bottom: 1px solid var(--line); overflow: hidden; }
.panel__pic img { width: 100%; height: 120px; object-fit: cover; display: block; }

/* Legal pages: let the body column shrink below its table's intrinsic width,
   so .table-scroll can actually scroll instead of stretching the page on mobile */
.legal-grid > * { min-width: 0; }
/* single-column layout (<981px): the TOC must scroll away with the page,
   otherwise the sticky panel covers the text on phones */
@media (max-width: 980px) { .toc { position: static; } }

/* Operator information card — framed, on a panel background */
.op-box-row { padding-top: var(--s-8); }
.op-box {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--red);
  padding: var(--s-6); box-shadow: var(--sh-card);
}
.legal-body .op-box { margin-block: var(--s-4) var(--s-6); }
.op-box__kick {
  font-size: var(--fs-12); font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ice); margin-bottom: var(--s-4);
}
.op-box__grid { display: grid; gap: var(--s-4) var(--s-6); }
@media (min-width: 640px) { .op-box__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 981px) { .op-box-row .op-box__grid { grid-template-columns: repeat(4, 1fr); } }
.op-box__item dt { font-size: var(--fs-12); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin-bottom: 2px; }
.op-box__item dd { font-size: var(--fs-15); color: var(--text); margin: 0; }
.op-box__item dd b { font-family: var(--font-head); }

/* BetStop logo chip in the footer (official teal logo needs a light backing) */
.betstop-chip {
  display: inline-flex; align-items: center; margin-top: var(--s-4);
  background: #fff; border: 1px solid var(--line); padding: 7px 12px; transition: box-shadow var(--t-fast);
}
.betstop-chip:hover { box-shadow: 0 0 0 2px var(--ice); }
.betstop-chip img { height: 28px; width: auto; display: block; }
