/* ==========================================================================
   Hacksaw City Leaderboard — BetCity promo page
   Brand tokens mirror affiliate-page/styles.css so the two pages sit together.
   ========================================================================== */

@font-face {
  font-family: 'Anton';
  src: url('fonts/anton-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --canvas: #111111;
  --surface: #1a1a1a;
  --surface-2: #202020;
  --surface-3: #262626;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f4f4f2;
  --muted: #b3b3af;
  --dim: #8a8a86;

  --magenta: #EC008C;
  --red: #FF003F;
  --blue: #00AEEF;
  --cyan: #00FFFF;
  --orange-a: #EF4136;
  --orange-b: #F7941D;
  --green-a: #00AE00;
  --green-b: #00FF00;
  --gold: #F7C948;

  --grad-primary: linear-gradient(120deg, #EC008C, #FF003F);
  --grad-info: linear-gradient(120deg, #00AEEF, #00FFFF);
  --grad-warm: linear-gradient(120deg, #EF4136, #F7941D);
  --grad-gold: linear-gradient(120deg, #F7C948, #F7941D);

  --display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --body: 'Montserrat', -apple-system, 'Helvetica Neue', Arial, sans-serif;

  --max: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0;
}

a { color: inherit; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* The sticky header would otherwise cover the top of whatever an in-page
   anchor jumps to. 64px header + 12px breathing room. */
section[id] { scroll-margin-top: 76px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #000; padding: 10px 16px;
  border-radius: var(--radius-sm); font-weight: 700; transition: top .15s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

/* ---------- Test-data banner ------------------------------------------ */

/* Deliberately loud. A rehearsal board must never be mistaken for real
   standings, and the banner is driven by a marker column in the export
   rather than a flag someone has to remember to pass. */
.test-banner {
  position: sticky; top: 0; z-index: 120;
  padding: 10px 20px; text-align: center;
  background: repeating-linear-gradient(45deg, #F7941D, #F7941D 14px, #111 14px, #111 28px);
  color: #fff; font-size: 12.5px; font-weight: 600;
  border-bottom: 2px solid #F7941D;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .95);
}
.test-banner strong { letter-spacing: .12em; text-transform: uppercase; }
/* The banner wraps to two lines on a phone, so its height cannot be hard-coded
   here — app.js measures it and sets --banner-h. Defaults to 0 so the header
   sits flush at the top whenever the banner is hidden. */

/* ---------- Header ---------------------------------------------------- */

/* Sticky: inside the iframe this is the only navigation, because the parent
   BetCity page supplies the site chrome above the frame. */
.site-header {
  position: sticky; top: var(--banner-h, 0px); z-index: 100;
  background: rgba(17, 17, 17, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand-mark {
  font-family: var(--display); font-size: 16px; letter-spacing: .02em;
  text-transform: uppercase; white-space: nowrap;
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bm-short { display: none; }
.brand-sep { width: 1px; height: 22px; background: var(--line-strong); }
.brand-partner { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; }
.header-nav { display: flex; gap: 22px; margin-left: auto; }
.header-nav a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; }
.header-nav a:hover { color: var(--ink); }
.header-cta { margin-left: auto; }
.header-nav + .header-cta { margin-left: 20px; }

@media (max-width: 860px) {
  .header-nav { display: none; }
  .brand-sep, .brand-partner { display: none; }
}

/* The full wordmark plus the Play CTA is wider than a 375px phone, so the
   sticky bar drops to the short form rather than pushing the button off-screen. */
@media (max-width: 600px) {
  .bm-long { display: none; }
  .bm-short { display: inline; }
  .brand-mark { font-size: 15px; }
}

/* ---------- Buttons --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 0;
  font-family: var(--body); font-size: 14px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: 0 6px 22px rgba(236, 0, 140, .30); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(236, 0, 140, .42); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost:active { transform: scale(.98); }
.btn-sm { padding: 9px 18px; font-size: 12px; }

/* ---------- Hero ------------------------------------------------------ */

.hero {
  position: relative; overflow: hidden;
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 460px at 12% -10%, rgba(236, 0, 140, .26), transparent 62%),
    radial-gradient(760px 420px at 88% 8%, rgba(0, 174, 239, .18), transparent 60%),
    var(--canvas);
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 180px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .35));
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

.status-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 16px 7px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.status-pill[data-state="live"] { border-color: rgba(0, 255, 0, .5); color: var(--green-b); }
.status-pill[data-state="live"] .status-dot { background: var(--green-b); box-shadow: 0 0 0 0 rgba(0, 255, 0, .6); animation: pulse 2s infinite; }
.status-pill[data-state="upcoming"] { border-color: rgba(0, 174, 239, .5); color: var(--cyan); }
.status-pill[data-state="upcoming"] .status-dot { background: var(--cyan); }
.status-pill[data-state="closed"] { border-color: rgba(247, 148, 29, .5); color: var(--orange-b); }
.status-pill[data-state="closed"] .status-dot { background: var(--orange-b); }
.status-pill[data-state="final"] { border-color: rgba(247, 201, 72, .55); color: var(--gold); }
.status-pill[data-state="final"] .status-dot { background: var(--gold); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 255, 0, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(0, 255, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

.hero h1 {
  font-size: clamp(42px, 8.4vw, 92px);
  margin: 18px 0 0;
}
.hero h1 .line-2 {
  display: block;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-strap { font-size: clamp(15px, 2.2vw, 19px); color: var(--muted); margin: 14px 0 0; max-width: 46ch; font-weight: 500; }

.hero-prize {
  font-family: var(--display); font-size: clamp(28px, 5.4vw, 50px); line-height: 1.04;
  text-transform: uppercase; margin: 26px 0 0; max-width: 15ch;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 0; }

/* ---------- Countdown ------------------------------------------------- */

.countdown {
  margin: 30px 0 0; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  max-width: 520px;
}
.countdown-label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.countdown-units { display: flex; gap: 10px; margin: 12px 0 0; }
.cd-unit { flex: 1; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 6px; }
.cd-num { font-family: var(--display); font-size: clamp(26px, 6vw, 38px); line-height: 1; display: block; font-variant-numeric: tabular-nums; }
.cd-unit-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 700; margin-top: 6px; display: block; }
.countdown-sub { font-size: 12px; color: var(--dim); margin: 12px 0 0; }

/* ---------- 2x flash (hero) ------------------------------------------- */

.hero-flash {
  display: flex; align-items: center; gap: 16px;
  margin: 26px 0 0; padding: 16px 18px; max-width: 620px;
  border-radius: var(--radius); text-decoration: none;
  background: linear-gradient(120deg, rgba(236, 0, 140, .16), rgba(247, 148, 29, .10));
  border: 1px solid rgba(236, 0, 140, .40);
  transition: transform .15s ease, border-color .15s ease;
}
.hero-flash:hover { transform: translateY(-2px); border-color: var(--magenta); }
.flash-copy { font-size: 13px; color: var(--ink); line-height: 1.55; }
.flash-go { margin-left: auto; color: var(--magenta); font-size: 20px; flex-shrink: 0; }
@media (max-width: 520px) {
  .flash-copy { font-size: 12.5px; }
  .flash-go { display: none; }
}

/* ---------- Sections -------------------------------------------------- */

.section { padding: 62px 0; border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 30px; }
.section-eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--magenta); font-weight: 800; }
.section h2 { font-size: clamp(28px, 5vw, 42px); margin: 10px 0 0; }
.section-lede { color: var(--muted); margin: 12px 0 0; max-width: 62ch; }

/* ---------- Fact strip ------------------------------------------------ */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.fact-k { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 800; }
.fact-v { font-family: var(--display); font-size: 27px; margin: 8px 0 0; line-height: 1.05; }
.fact-n { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.fact-accent { border-color: rgba(236, 0, 140, .38); background: linear-gradient(180deg, rgba(236, 0, 140, .10), var(--surface) 62%); }
.fact-link { display: block; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.fact-link:hover { transform: translateY(-2px); border-color: var(--magenta); }
.fact-go { display: block; margin-top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--magenta); }
.fact-accent .fact-v { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Leaderboard ----------------------------------------------- */

.lb-meta {
  display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px;
}
.lb-meta b { color: var(--ink); font-weight: 700; }
.lb-meta span { color: var(--muted); }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 18px; border-radius: var(--radius);
  background: rgba(0, 174, 239, .07); border: 1px solid rgba(0, 174, 239, .28);
  font-size: 13.5px; line-height: 1.55; color: var(--ink);
  margin-bottom: 20px;
}
.notice-icon { flex-shrink: 0; font-size: 15px; line-height: 1.4; }
.notice strong { color: var(--cyan); }
.notice.notice-warm { background: rgba(247, 148, 29, .07); border-color: rgba(247, 148, 29, .30); }
.notice.notice-warm strong { color: var(--orange-b); }
.notice.notice-rg { background: rgba(236, 0, 140, .07); border-color: rgba(236, 0, 140, .30); }
.notice.notice-rg strong { color: var(--magenta); }

/* Podium */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.podium-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 16px 18px; text-align: center;
}
.podium-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--line-strong); }
.podium-card[data-rank="1"] { border-color: rgba(247, 201, 72, .40); background: linear-gradient(180deg, rgba(247, 201, 72, .09), var(--surface) 62%); }
.podium-card[data-rank="1"]::before { background: var(--grad-gold); }
.podium-card[data-rank="2"]::before { background: linear-gradient(120deg, #d9d9d9, #9a9a9a); }
.podium-card[data-rank="3"]::before { background: linear-gradient(120deg, #cd7f32, #a86423); }
.podium-rank { font-family: var(--display); font-size: 15px; letter-spacing: .1em; color: var(--muted); }
.podium-card[data-rank="1"] .podium-rank { color: var(--gold); }
.podium-player { font-size: 16px; font-weight: 800; margin: 10px 0 0; word-break: break-all; }
.podium-turnover { font-size: 12px; color: var(--muted); margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.podium-prize { font-family: var(--display); font-size: 26px; margin: 12px 0 0; color: var(--ink); }
.podium-prize-note { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; margin-top: 2px; }

@media (max-width: 620px) {
  .podium { grid-template-columns: 1fr; gap: 10px; }
  .podium-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; text-align: left; padding: 16px; }
  .podium-prize { margin: 0; font-size: 22px; text-align: right; }
  .podium-prize-note { text-align: right; }
  .podium-player { margin: 0; }
}

/* Search */
.lb-search { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.lb-search input {
  flex: 1; min-width: 200px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 12px 20px; color: var(--ink); font-family: var(--body);
  /* 16px is a hard floor: iOS Safari zooms the whole page when a focused
     input is smaller, which on the leaderboard search is the one interaction
     players use most. */
  font-size: 16px;
}
.lb-search input::placeholder { color: var(--dim); }
.lb-search input:focus { border-color: var(--blue); outline: none; }

/* Table */
.lb-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.lb { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
table.lb th {
  text-align: left; padding: 13px 16px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); font-weight: 800;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  position: sticky; top: 0;
}
table.lb td { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
table.lb tbody tr:last-child td { border-bottom: 0; }
table.lb tbody tr:hover { background: rgba(255, 255, 255, .028); }
.col-rank { width: 74px; }
.col-turnover, .col-prize { text-align: right; font-variant-numeric: tabular-nums; }
th.col-turnover, th.col-prize { text-align: right; }
.cell-rank { font-family: var(--display); font-size: 19px; color: var(--muted); }
tr[data-rank="1"] .cell-rank, tr[data-rank="2"] .cell-rank, tr[data-rank="3"] .cell-rank { color: var(--gold); }
.cell-player { font-weight: 700; word-break: break-all; }
.cell-points { display: block; font-weight: 800; font-size: 15px; }
.cell-turnover { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; white-space: nowrap; }
.cell-prize { font-weight: 800; color: var(--green-b); }
.cell-prize.none { color: var(--dim); font-weight: 600; }

.move { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 800; vertical-align: middle; }
.move.up { color: var(--green-b); }
.move.down { color: var(--red); }
.move.same { color: var(--dim); }
.move.new { color: var(--cyan); }

tr.cutline td { border-bottom: 2px solid var(--magenta) !important; }
.cutline-row td {
  background: rgba(236, 0, 140, .07); text-align: center;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--magenta);
  padding: 9px 16px;
}
tr.is-match td { background: rgba(0, 255, 255, .10) !important; box-shadow: inset 3px 0 0 var(--cyan); }

/* The board publishes position and movement only until the 2x can be applied;
   the header cell has to disappear with the column. */
table.lb.no-figures .col-turnover { display: none; }

.th-short { display: none; }

/* Most BetCity players are on a phone. At 375px the default table would push
   the prize column — the one players actually care about — off-screen, so the
   four columns are tightened to fit instead of scrolling sideways. */
@media (max-width: 560px) {
  table.lb { min-width: 0; font-size: 13px; }
  table.lb th, table.lb td { padding: 11px 7px; }
  table.lb th:first-child, table.lb td:first-child { padding-left: 12px; }
  table.lb th:last-child, table.lb td:last-child { padding-right: 12px; }
  .col-rank { width: 42px; }
  .cell-rank { font-size: 16px; }
  .cell-player { font-size: 12.5px; }
  .cell-points { font-size: 13px; }
  .cell-turnover { font-size: 9.5px; }
  .th-long { display: none; }
  .th-short { display: inline; }
  .move { margin-left: 5px; font-size: 10px; }
  .cutline-row td { font-size: 10px; letter-spacing: .08em; }
}

/* 320px handsets are still out there. Without this the table overflows its
   wrapper again and the prize column - the one players care about - is pushed
   off-screen. */
@media (max-width: 360px) {
  table.lb { font-size: 12px; }
  table.lb th, table.lb td { padding: 10px 4px; }
  table.lb th:first-child, table.lb td:first-child { padding-left: 9px; }
  table.lb th:last-child, table.lb td:last-child { padding-right: 9px; }
  .col-rank { width: 34px; }
  .cell-rank { font-size: 15px; }
  .cell-player { font-size: 11.5px; }
  .cell-points { font-size: 12px; }
  .cell-turnover { font-size: 9px; }
}

.lb-foot { display: flex; justify-content: center; margin-top: 18px; }
.lb-empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.lb-empty .lb-empty-title { font-family: var(--display); font-size: 24px; color: var(--ink); margin-bottom: 10px; }

/* ---------- Prize table ----------------------------------------------- */

.prize-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.prize-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden;
}
.prize-card[data-tier="1"] { border-color: rgba(247, 201, 72, .38); background: linear-gradient(180deg, rgba(247, 201, 72, .08), var(--surface) 58%); }
.prize-pos { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.prize-amt { font-family: var(--display); font-size: 34px; margin: 10px 0 0; line-height: 1; }
.prize-card[data-tier="1"] .prize-amt { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prize-sub { font-size: 12px; color: var(--dim); margin: 8px 0 0; }

.prize-total {
  margin-top: 14px; padding: 18px 22px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.prize-total .k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.prize-total .v { font-family: var(--display); font-size: 32px; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Steps ----------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-n {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad-primary);
  display: grid; place-items: center; font-family: var(--display); font-size: 18px; color: #fff;
}
.step h3 { font-size: 17px; margin: 14px 0 0; }
.step p { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.55; }

/* ---------- BetCity Exclusives ----------------------------------- */

.section-exclusives {
  background:
    radial-gradient(760px 340px at 20% 0%, rgba(236, 0, 140, .14), transparent 64%),
    radial-gradient(620px 300px at 85% 10%, rgba(247, 148, 29, .09), transparent 60%),
    var(--canvas);
}

.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

/* Five titles across one row makes each one too small to read the artwork, and
   auto-fit would leave a stretched orphan. Three then two, with the pair centred.
   The :nth-last-child guard means the rule only fires when there are exactly
   five — add a sixth exclusive and it falls back to two clean rows of three. */
@media (min-width: 900px) {
  .ex-grid { grid-template-columns: repeat(6, 1fr); }
  .ex-card { grid-column: span 2; }
  .ex-card:nth-child(4):nth-last-child(2) { grid-column: 2 / span 2; }
}
.ex-card {
  position: relative; display: block; text-decoration: none; overflow: hidden;
  border-radius: var(--radius); border: 1px solid rgba(236, 0, 140, .34);
  background: var(--surface);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.ex-card:hover { transform: translateY(-4px); border-color: var(--magenta); box-shadow: 0 12px 34px rgba(236, 0, 140, .26); }
.ex-thumb { position: relative; aspect-ratio: 3 / 2; background: var(--surface-2); overflow: hidden; }
.ex-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-thumb .fallback {
  position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  font-family: var(--display); font-size: 16px; color: var(--muted);
  background: linear-gradient(140deg, var(--surface-2), var(--surface-3));
}
.ex-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px 5px 8px; border-radius: 999px;
  background: var(--grad-warm); color: #fff;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800;
  box-shadow: 0 3px 12px rgba(239, 65, 54, .38);
}
.ex-tag b { font-family: var(--display); font-size: 13px; letter-spacing: 0; }
.ex-body { padding: 16px 18px 18px; }
.ex-name { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.ex-sub { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--magenta); font-weight: 800; margin-top: 6px; }


/* ---------- Games ----------------------------------------------------- */

.games-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.games-toolbar input {
  flex: 1; min-width: 190px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 11px 20px; color: var(--ink); font-family: var(--body);
  font-size: 16px;   /* see .lb-search input - avoids iOS zoom-on-focus */
}
.games-toolbar input::placeholder { color: var(--dim); }
.games-toolbar input:focus { border-color: var(--blue); outline: none; }
.chip {
  padding: 9px 16px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line-strong); color: var(--muted);
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
  font-family: var(--body); transition: border-color .15s, color .15s;
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--grad-primary); border-color: transparent; color: #fff; }
.chip-hot { border-color: rgba(236, 0, 140, .45); color: var(--ink); }
.chip-hot[aria-pressed="true"] { background: var(--grad-warm); }

/* One scrolling row rather than a 55-tile grid: the catalogue was ~2,700px of
   page on its own. Snap points keep it tidy on a phone; the arrows only appear
   where there is a pointer to use them. */
.rail-wrap { position: relative; }
.game-rail {
  display: flex; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
}
.game-rail::-webkit-scrollbar { display: none; }
/* A fixed 158px tile happens to fit exactly twice on a 375px phone, leaving no
   partial tile at the edge - so nothing tells the player the row scrolls, and
   53 of the 55 games stay hidden. A proportional basis always leaves roughly
   40% of the next tile showing, at any handset width. */
.game-rail > .game { flex: 0 0 clamp(114px, 41%, 158px); scroll-snap-align: start; }
.game-rail:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; border-radius: var(--radius-sm); }

.rail-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(26, 26, 26, .94); border: 1px solid var(--line-strong);
  color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0 2px 3px 0;
  transition: border-color .15s ease, opacity .15s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .55);
}
.rail-btn:hover { border-color: var(--magenta); color: var(--magenta); }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
.rail-prev { left: -8px; }
.rail-next { right: -8px; }
@media (hover: none), (max-width: 700px) { .rail-btn { display: none; } }

.game {
  position: relative; display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; transition: transform .16s ease, border-color .16s ease;
}
.game:hover { transform: translateY(-3px); border-color: var(--magenta); }
.game-thumb { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
/* The fallback sits underneath and only shows through when the thumbnail is
   missing — the image needs its own stacking context to cover the positioned
   fallback, otherwise the placeholder paints over every loaded tile. */
.game-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.game-thumb .fallback {
  position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; padding: 10px; text-align: center;
  font-family: var(--display); font-size: 14px; color: var(--muted);
  background: linear-gradient(140deg, var(--surface-2), var(--surface-3));
}
.game-name { padding: 10px 11px 12px; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.game-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 4px 9px; border-radius: 999px;
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: #fff;
}
.game-badge.fav { background: var(--grad-warm); }
.game-badge.new { background: var(--grad-info); color: #04202a; }
.game-badge.ex { background: var(--grad-warm); box-shadow: 0 3px 10px rgba(239, 65, 54, .40); }
.game.is-exclusive { border-color: rgba(236, 0, 140, .34); }
.game.is-exclusive:hover { border-color: var(--magenta); }
.games-count { font-size: 12px; color: var(--dim); margin-top: 16px; }

/* ---------- Accordion (T&Cs / FAQ) ------------------------------------ */

.acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.acc details { border-bottom: 1px solid var(--line); }
.acc details:last-child { border-bottom: 0; }
.acc summary {
  padding: 16px 20px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 14.5px;
  display: flex; align-items: center; gap: 12px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; margin-left: auto; font-family: var(--display); font-size: 20px; color: var(--muted); flex-shrink: 0; }
.acc details[open] summary::after { content: '–'; color: var(--magenta); }
.acc summary:hover { background: var(--surface-2); }
.acc-num { font-family: var(--display); font-size: 13px; color: var(--magenta); min-width: 20px; flex-shrink: 0; }
.acc-body { padding: 0 20px 20px 52px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.acc-body p { margin: 0 0 12px; }
.acc-body p:last-child { margin-bottom: 0; }
.acc-body ul { margin: 0 0 12px; padding-left: 20px; }
.acc-body li { margin-bottom: 7px; }
.acc-body .cl { color: var(--dim); font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
.acc-body strong { color: var(--ink); }
@media (max-width: 620px) { .acc-body { padding-left: 20px; } }

.tc-head {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.tc-ref { font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }

/* ---------- Footer ---------------------------------------------------- */

.site-footer { padding: 44px 0 56px; background: var(--canvas); font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.footer-links { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-bottom: 26px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }
.rg-block { border-top: 1px solid var(--line); padding-top: 24px; }
.rg-badges { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.rg-18 {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink);
  display: grid; place-items: center; font-family: var(--display); font-size: 15px; color: var(--ink); flex-shrink: 0;
}
.rg-badges .rg-txt { font-weight: 800; color: var(--ink); font-size: 13px; }
.rg-block p { margin: 0 0 12px; }
.licence { color: var(--dim); }

/* ---------- Touch devices --------------------------------------------- */

/* Keyed on pointer type rather than width, so a small tablet gets the same
   treatment. Desktop density is untouched. */
@media (pointer: coarse) {
  /* 44px is the Apple HIG / Material minimum; several controls sat at 35-37px. */
  .chip,
  .btn-sm {
    min-height: 44px;
    padding-top: 0; padding-bottom: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .lb-search input,
  .games-toolbar input { min-height: 44px; }

  /* Footer links were 21px tall - below even the WCAG 2.2 AA 24px floor. */
  .footer-links { gap: 4px 22px; }
  .footer-links a { display: inline-block; padding: 7px 0; }

  .brand { min-height: 44px; }

  /* 10px uppercase labels are hard work on a low-end handset. */
  .fact-k,
  .cd-unit-label,
  .podium-prize-note { font-size: 11px; }
}

/* ---------- Utility --------------------------------------------------- */

/* Several panels below carry display:flex/grid, which outranks the user-agent
   [hidden] { display: none } rule. Without this the leaderboard would show its
   empty meta strip, podium and both status notices at once. */
[hidden] { display: none !important; }

.hide { display: none !important; }

/* Utility classes replacing inline style attributes, so a strict
   style-src CSP on the parent site cannot break the layout. */
.link-cyan { color: var(--cyan); }
.m0   { margin: 0; }
.mt22 { margin-top: 22px; }
.mt24 { margin-top: 24px; }
.mb0  { margin-bottom: 0; }
