/* ===========================================================================
   simplyodds v2 — Polymarket-inspired probability-first design system.
   One sans (Switzer), one mono (JetBrains Mono), one accent (#7C3AED).
   =========================================================================== */

/* ── Fonts ────────────────────────────────────────────────────────────────── */
@import url('https://api.fontshare.com/v2/css?f[]=switzer@400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  /* type */
  --sans: "Switzer", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* ink — Polymarket-like, mostly neutrals + one accent */
  --ink-0: #0a0a0b;       /* main text */
  --ink-1: #2a2a2e;       /* secondary text */
  --ink-2: #5b5b63;       /* tertiary text */
  --ink-3: #8a8a93;       /* hint */
  --ink-4: #b8b8c0;       /* faint */

  --bg-0: #ffffff;        /* page */
  --bg-1: #f7f7f8;        /* subtle surface */
  --bg-2: #f0f0f2;        /* hover */
  --bg-3: #e7e7eb;        /* divider strong */
  --line: #ebebef;        /* divider */
  --line-2: #d8d8de;      /* divider stronger */

  /* accent */
  --accent: #7C3AED;
  --accent-soft: #f3eafe;
  --accent-ink: #ffffff;

  /* state */
  --up:   #16a34a;
  --up-soft: #ecfdf3;
  --down: #dc2626;
  --down-soft: #fef2f2;
  --warn: #f59e0b;

  /* bookmaker CTA — orange, kept from prior locked-in user rule */
  --cta: #FF9900;
  --cta-hover: #e88a00;
  --cta-ink: #1a1300;

  /* shape */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* shadow — used sparingly */
  --shadow-1: 0 1px 2px rgba(15,15,30,.04), 0 1px 0 rgba(15,15,30,.02);
  --shadow-2: 0 4px 16px rgba(15,15,30,.06), 0 1px 0 rgba(15,15,30,.03);
  --shadow-pop: 0 12px 32px rgba(15,15,30,.10);

  /* layout */
  --content-max: 1120px;
  --rail: 240px;
  --header-h: 60px;

  /* type sizes */
  --t-display: 36px;
  --t-h1: 28px;
  --t-h2: 22px;
  --t-h3: 17px;
  --t-body: 15px;
  --t-sm: 13px;
  --t-xs: 11px;
}

/* ── Reset (lightweight) ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink-0);
  background: var(--bg-0);
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
input, select { font: inherit; color: inherit; }

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

/* numeric — wherever we show prices/percentages */
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.so-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.so-header__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex; align-items: center; gap: 16px;
}
.so-logo { display: inline-flex; align-items: center; }
.so-logo svg { height: 24px; width: auto; }

.so-nav { display: flex; gap: 4px; margin-left: 18px; }
.so-nav a {
  padding: 6px 10px; border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 500; color: var(--ink-1);
}
.so-nav a:hover { background: var(--bg-2); color: var(--ink-0); }
.so-nav a.is-active { color: var(--accent); background: var(--accent-soft); }

.so-header__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Mode toggle (Simple / Pro) — single source of truth via [data-mode] on <html> */
.mode-toggle {
  display: inline-flex; align-items: center; gap: 0;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 3px;
  font-size: var(--t-xs); font-weight: 600;
}
.mode-toggle button {
  padding: 5px 12px; border-radius: var(--r-pill);
  color: var(--ink-2); letter-spacing: .02em; text-transform: uppercase;
  transition: color .12s, background .12s;
}
.mode-toggle button:hover { color: var(--ink-0); }
html[data-mode="simple"] .mode-toggle [data-mode-target="simple"],
html[data-mode="pro"]    .mode-toggle [data-mode-target="pro"] {
  background: var(--ink-0); color: #fff;
}

/* ── Layout shell ────────────────────────────────────────────────────────── */
/* Hard guard: nothing should ever push the document wider than the viewport */
html, body { max-width: 100%; overflow-x: hidden; }
.so-main { padding: 24px 20px 80px; }
.so-container { max-width: var(--content-max); margin: 0 auto; min-width: 0; }
.so-grid {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: 28px;
  min-width: 0;
}
/* Grid items default to min-width:auto which lets intrinsic content blow out
   the track width. Force every grid child to be allowed to shrink. */
.so-grid > * { min-width: 0; }
@media (max-width: 880px) { .so-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ── Page intro ──────────────────────────────────────────────────────────── */
.page-eyebrow {
  font-size: var(--t-xs); font-weight: 600; color: var(--ink-2);
  letter-spacing: .08em; text-transform: uppercase;
}
.page-title { font-size: var(--t-display); font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 4px; }
.page-sub   { color: var(--ink-2); font-size: var(--t-body); max-width: 56ch; }

@media (max-width: 600px) { :root { --t-display: 28px; } }

/* ── Rail ────────────────────────────────────────────────────────────────── */
.rail { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
.rail h3 { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2);
  letter-spacing: .08em; text-transform: uppercase; margin: 18px 0 8px; }
.rail h3:first-child { margin-top: 0; }
.rail-list { display: flex; flex-direction: column; }
.rail-list a {
  padding: 7px 10px; border-radius: var(--r-sm);
  font-size: var(--t-sm); color: var(--ink-1);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.rail-list a:hover { background: var(--bg-2); color: var(--ink-0); }
.rail-list a.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.rail-list a .count { color: var(--ink-3); font-size: var(--t-xs); }

@media (max-width: 880px) {
  .rail { position: static; min-width: 0; max-width: 100%; }
  .rail-list {
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    gap: 6px; padding-bottom: 4px;
    max-width: 100%; min-width: 0;
    scrollbar-width: none;
  }
  .rail-list::-webkit-scrollbar { display: none; }
  .rail-list a { flex: 0 0 auto; white-space: nowrap; }
  .rail h3 { display: none; }
}

/* ── Match list ──────────────────────────────────────────────────────────── */
.match-list { display: flex; flex-direction: column; gap: 10px; }

/* MatchRow — the single most important component */
.match-row {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 80px 1fr 180px 110px;
  gap: 14px;
  align-items: center;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.match-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.match-row a, .match-row a:hover { color: inherit; text-decoration: none; }

.mr-when {
  font-size: var(--t-xs); color: var(--ink-2);
  display: flex; flex-direction: column; gap: 2px;
}
.mr-when .day { font-weight: 600; color: var(--ink-0); text-transform: uppercase; letter-spacing: .04em; }
.mr-when .time { font-family: var(--mono); }

.mr-teams { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mr-teams .league { font-size: var(--t-xs); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.mr-teams .title  { font-size: var(--t-h3); font-weight: 600; color: var(--ink-0); }

/* ── ProbabilityBar — the "fair line" visualization ──────────────────────── */
.pbar {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  min-width: 0;
}
.pbar__track {
  display: flex;
  width: 100%;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.pbar__fill {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink-2) 22%, transparent);
  transition: width .2s ease;
  position: relative;
}
.pbar__fill + .pbar__fill { box-shadow: inset 1px 0 0 rgba(255,255,255,.6); }
[data-theme="dark"] .pbar__fill + .pbar__fill { box-shadow: inset 1px 0 0 rgba(0,0,0,.4); }
/* Distinct colours per outcome so 1/X/2 proportions are visually readable */
.pbar__fill--home { background: #2563eb; }
.pbar__fill--draw { background: #94a3b8; }
.pbar__fill--away { background: #f97316; }
/* The best-value segment gets a subtle accent ring instead of a colour swap */
.pbar__fill.is-best { box-shadow: inset 0 0 0 2px var(--accent); }
.pbar__fill-pct {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 11px; font-weight: 700;
  color: #ffffff;
  letter-spacing: .02em;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  white-space: nowrap;
}
.pbar__legend {
  display: flex; gap: 14px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .02em;
}
.pbar__leg {
  display: inline-flex; gap: 6px; align-items: center;
}
.pbar__leg-swatch {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--ink-3);
}
.pbar__leg--home .pbar__leg-swatch { background: #2563eb; }
.pbar__leg--draw .pbar__leg-swatch { background: #94a3b8; }
.pbar__leg--away .pbar__leg-swatch { background: #f97316; }
.pbar__leg-key {
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: .06em;
}
.pbar__leg-val {
  font-weight: 600;
  color: var(--ink-1);
  font-size: 12px;
}
.pbar__leg.is-best .pbar__leg-key,
.pbar__leg.is-best .pbar__leg-val { color: var(--accent); }
.pbar--empty .pbar__track { background: var(--bg-2); }

/* Verdict — one sentence in plain English */
.mr-verdict {
  font-size: var(--t-xs); color: var(--ink-2);
  display: flex; flex-direction: column; gap: 2px;
  text-align: right;
}
.mr-verdict .edge { color: var(--up); font-weight: 700; font-family: var(--mono); }

/* Pro-only inline cells under each prob-bar segment */
.pbar-meta {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px;
  margin-top: 4px;
}
.pbar-meta__cell {
  display: flex; flex-direction: column; align-items: center; padding: 4px 6px;
  font-size: 10px; color: var(--ink-3); letter-spacing: .02em;
}
.pbar-meta__cell .price { font-family: var(--mono); font-weight: 600; color: var(--ink-1); font-size: var(--t-xs); }
.pbar-meta__cell .book  { text-transform: uppercase; letter-spacing: .04em; }

/* Pro is OFF by default in Simple mode */
html[data-mode="simple"] .pro-only { display: none !important; }
html[data-mode="pro"]    .simple-only { display: none !important; }

/* ── Match page ──────────────────────────────────────────────────────────── */
.mp { display: flex; flex-direction: column; gap: 24px; }
.mp-hero {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px;
  background: linear-gradient(180deg, #fdfcff 0%, #ffffff 60%);
}
.mp-bc { font-size: var(--t-xs); color: var(--ink-2); margin-bottom: 8px; }
.mp-bc a:hover { color: var(--accent); }
.mp-bc span + span:before { content: "/"; padding: 0 6px; color: var(--ink-4); }
.mp-title { font-size: var(--t-h1); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.mp-when  { font-size: var(--t-sm); color: var(--ink-2); }
.mp-pbar  { margin-top: 16px; }
.mp-pbar .pbar { height: 44px; font-size: var(--t-body); }
.mp-pbar .pbar__seg { font-weight: 600; }
.mp-pbar-cap {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px;
  margin-top: 6px;
}
.mp-pbar-cap div {
  text-align: center; font-size: var(--t-xs); color: var(--ink-2);
}
.mp-pbar-cap div b { color: var(--ink-0); display: block; font-size: var(--t-sm); font-weight: 600; }

/* ────────────────────────────────────────────────────────────────────────────
   Match-page verdict block
   ────────────────────────────────────────────────────────────────────────────
   Design rules:
   • Vertical single-column layout, never flex-row (children stack reliably).
   • Max content width 68ch — readable measure, avoids text overlap.
   • Background colour ENCODES meaning:
       High confidence  → accent-soft (the brand positive tint)
       Medium / outlier → neutral surface, no celebratory colour
       Speculative      → neutral surface with a quiet warning border
     We never use the value-positive purple on a speculative pick — that would
     be misencoding meaning, which the design system forbids.
   • One CTA, placed at the end of the block, not floated right.
*/
.mp-verdict {
  display: grid; gap: 10px;
  margin-top: 16px; padding: 16px 18px;
  background: var(--bg-1, #fff); border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--t-body);
  max-width: 760px;
}
.mp-verdict > * { max-width: 68ch; }
.mp-verdict p { margin: 0; color: var(--ink-0); line-height: 1.55; }
.mp-verdict p b { color: var(--ink-0); font-weight: 600; }
.mp-verdict p.mp-ev {
  font-size: var(--t-sm, 14px);
  color: var(--ink-1);
}
.mp-verdict p.mp-ev .mp-ev-row {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: var(--t-xs, 12px);
  font-family: var(--sans);
}

/* High confidence — celebrate */
.mp-verdict.is-high {
  background: var(--accent-soft);
  border-color: rgba(255, 153, 0, 0.30);
}
.mp-verdict.is-high p b { color: var(--accent); }

/* Medium confidence — calm amber, no shouting */
.mp-verdict.is-medium {
  background: rgba(217, 138, 0, 0.05);
  border-color: rgba(217, 138, 0, 0.35);
}

/* Speculative — quiet, neutral, no value-positive colour */
.mp-verdict.is-speculative,
.mp-verdict.is-marginal {
  background: var(--bg-1, #fff);
  border-color: var(--line);
}
.mp-verdict.is-marginal .mp-verdict-tag { color: var(--ink-2); }

/* Inner hierarchy inside the verdict block.
   tag → headline → body → note → CTA (one direction down the page) */
.mp-verdict-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0;
}
.mp-verdict.is-high    .mp-verdict-tag { color: var(--accent); }
.mp-verdict.is-medium  .mp-verdict-tag { color: #B07000; }
.mp-verdict-head {
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-0);
  margin: 0;
}
.mp-verdict-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-1);
  margin: 0;
}
.mp-verdict-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  font-style: italic;
  margin: 0;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

/* Medium / Speculative / Marginal CTA — quiet, line border, not orange */
.mp-cta.mp-cta--is-medium,
.mp-cta.mp-cta--is-marginal,
.mp-cta.mp-cta--is-speculative {
  background: transparent !important;
  color: var(--ink-0) !important;
  border: 1px solid var(--line-2);
  box-shadow: none;
  font-weight: 600;
}
.mp-cta.mp-cta--is-medium:hover,
.mp-cta.mp-cta--is-marginal:hover,
.mp-cta.mp-cta--is-speculative:hover {
  border-color: var(--ink-1);
  background: var(--bg-2, rgba(0,0,0,0.02)) !important;
  color: var(--ink-0) !important;
  transform: none;
}

/* Generic muted CTA modifier — used by book-ladder rows that aren't best */
.cta--muted {
  background: transparent !important;
  color: var(--ink-1) !important;
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.cta--muted:hover {
  border-color: var(--ink-2);
  color: var(--ink-0) !important;
}

.mp-verdict .num.up,
.num.up { color: var(--up); }
.num.down { color: var(--down); }
.mp-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-md);
  background: var(--cta) !important; color: var(--cta-ink) !important;
  font-weight: 700; font-size: var(--t-body); letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 2px 8px rgba(255,153,0,0.18);
  text-decoration: none;
}
.mp-cta:hover { background: var(--cta-hover) !important; color: var(--cta-ink) !important; transform: translateY(-1px); }
.mp-cta .arrow { font-size: 16px; }

/* Book ladder */
.mp-books {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.mp-books header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-1);
}
.mp-books header h2 { margin: 0; font-size: var(--t-h3); font-weight: 600; }
.mp-books header .hint { font-size: var(--t-xs); color: var(--ink-2); }
.mp-books__list { display: flex; flex-direction: column; }
.mp-book-row {
  display: grid;
  grid-template-columns: 30px 1fr 90px 90px 90px 110px;
  gap: 12px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--line);
  font-size: var(--t-sm);
}
.mp-book-row:first-child { border-top: 0; }
.mp-book-row.is-best { background: var(--accent-soft); }
.mp-book-row .logo {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.book-logo-wrap {
  position: relative; display: block; width: 100%; height: 100%;
}
.book-logo-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 4px; background: transparent;
  border-radius: var(--r-sm);
}
.book-tile {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: var(--r-sm);
}
.mp-book-row .book-name { font-weight: 600; color: var(--ink-0); }
.mp-book-row .price, .mp-book-row .implied, .mp-book-row .delta { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.mp-book-row .delta.up   { color: var(--up); font-weight: 600; }
.mp-book-row .delta.down { color: var(--down); }
.mp-book-row .cta {
  justify-self: end;
  background: transparent; color: var(--ink-1);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 6px 12px; font-weight: 600; font-size: var(--t-xs); letter-spacing: .02em;
}
.mp-book-row.is-best .cta { background: var(--cta) !important; color: var(--cta-ink) !important; border-color: var(--cta) !important; }
.mp-book-row .cta:hover { border-color: var(--accent); color: var(--accent); }
.mp-book-row.is-best .cta:hover { background: var(--cta-hover) !important; color: var(--cta-ink) !important; border-color: var(--cta-hover) !important; }

@media (max-width: 700px) {
  .match-row { grid-template-columns: 60px 1fr; grid-template-areas: "when teams" "pbar pbar" "verdict verdict"; gap: 10px; }
  .match-row .mr-when { grid-area: when; }
  .match-row .mr-teams { grid-area: teams; }
  .match-row .pbar    { grid-area: pbar; }
  .match-row .mr-verdict { grid-area: verdict; text-align: left; }
  .mp-book-row { grid-template-columns: 28px 1fr 70px 70px; gap: 8px; padding: 10px 12px; }
  .mp-book-row .implied, .mp-book-row .cta { display: none; }
}

/* ── Filters row (above match list) ──────────────────────────────────────── */
.filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 18px 0 14px;
}
.filters .seg {
  display: inline-flex; background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 3px;
}
.filters .seg button {
  padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600;
  color: var(--ink-2); letter-spacing: .02em; text-transform: uppercase;
}
.filters .seg button:hover { color: var(--ink-0); }
.filters .seg button.is-active { background: var(--ink-0); color: #fff; }
.filters .seg-soft button.is-active { background: var(--accent-soft); color: var(--accent); }

/* ── Empty / loading states ──────────────────────────────────────────────── */
.so-empty {
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 40px 24px; text-align: center; color: var(--ink-2);
  background: var(--bg-1);
}
.so-empty h3 { margin: 0 0 4px; color: var(--ink-0); font-size: var(--t-h3); font-weight: 600; }
.so-loading {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2); font-size: var(--t-sm);
}
.so-loading::before {
  content: ""; width: 12px; height: 12px;
  border-radius: 50%; border: 2px solid var(--bg-3); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.match-row.is-skeleton { pointer-events: none; }
.match-row.is-skeleton > * { height: 22px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.so-footer {
  margin-top: 60px; padding: 30px 20px;
  border-top: 1px solid var(--line);
  font-size: var(--t-sm); color: var(--ink-2);
}
.so-footer__inner {
  max-width: var(--content-max); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px;
}
.so-footer h4 { font-size: var(--t-xs); font-weight: 600; color: var(--ink-1);
  letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.so-footer a:hover { color: var(--accent); }
.so-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.so-footer__legal { grid-column: 1 / -1; padding-top: 18px; margin-top: 8px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--t-xs); }
@media (max-width: 700px) { .so-footer__inner { grid-template-columns: 1fr 1fr; } }

/* Badges */
.badge-soon {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

/* Compact, the eight-col odds grid (Pro view inside .mp-books) */
.pro-odds-grid {
  display: grid; grid-template-columns: repeat(10, 1fr);
  gap: 1px; background: var(--line); padding: 1px;
}
.pro-odds-grid > * { background: #fff; padding: 8px 6px; text-align: center; font-size: var(--t-xs); }
.pro-odds-grid .head { background: var(--bg-1); font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }

/* ── Pro mode panels (match page) ─────────────────────────────────────────── */
.pro-section { margin-top: 28px; }
.pro-section__header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.pro-section__header h2 {
  font-size: var(--t-lg); font-weight: 700; letter-spacing: -.01em; margin: 0;
}
.pro-section__header .hint { font-size: var(--t-xs); color: var(--ink-2); }
.pro-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 760px) { .pro-grid { grid-template-columns: 1fr; } }
.pro-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; background: #fff;
}
.pro-card h3 {
  font-size: var(--t-body); font-weight: 700; margin: 0 0 12px;
  letter-spacing: -.005em;
}
.pro-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
  font-size: var(--t-sm); margin: 0;
}
.pro-row:last-child { border-bottom: 0; }
.pro-row span { color: var(--ink-2); }
.pro-row b { color: var(--ink-0); }
.pro-hint {
  margin: 10px 0 0; font-size: var(--t-xs); color: var(--ink-2); line-height: 1.5;
}
.pro-table { display: block; margin-top: 4px; }
.pro-thead, .pro-trow {
  display: grid; grid-template-columns: 1.4fr .8fr .7fr .7fr .7fr;
  gap: 8px; padding: 7px 0; font-size: var(--t-xs);
  border-bottom: 1px dashed var(--line);
  align-items: center;
}
.pro-thead {
  color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.pro-trow:last-child { border-bottom: 0; }
.pro-trow span:first-child { color: var(--ink-0); font-weight: 500; }

/* ─────────────────────────────────────────────────────────────────────────
   V2 COMPAT LAYER — reskin v1 page renderers (.lf-*, .tool-*, .lh-*,
   .tools-*, .mp-related) into the v2 design language.
   Applied via .v2-compat wrapper from main.js.
   ───────────────────────────────────────────────────────────────────────── */
.v2-compat { padding: 32px 0 80px; }
.v2-compat .v2-compat-sink { display: block; }

/* Breadcrumbs */
.v2-compat .lf-breadcrumb {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: var(--t-xs); color: var(--ink-2);
  margin: 0 0 22px;
}
.v2-compat .lf-breadcrumb a {
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.v2-compat .lf-breadcrumb a:hover { color: var(--accent); }
.v2-compat .lf-breadcrumb span:not([aria-current]) { color: var(--ink-3, #b5b5b5); }
.v2-compat .lf-breadcrumb [aria-current] { color: var(--ink-0); font-weight: 600; }

/* Article container + heads */
.v2-compat .lf-article { max-width: 880px; }
.v2-compat .lf-article.league-hub,
.v2-compat .lf-article.market-hub { max-width: 1080px; }

.v2-compat .lf-head { margin: 0 0 28px; }
.v2-compat .lf-head h1 {
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.1; letter-spacing: -0.02em; font-weight: 700;
  color: var(--ink-0); margin: 0 0 10px;
}
.v2-compat .lf-lede {
  font-size: var(--t-lg); color: var(--ink-1); line-height: 1.5;
  margin: 0; max-width: 64ch;
}

/* Sections + sub-heads */
.v2-compat .lf-section { margin: 36px 0; }
.v2-compat .lf-section h2 {
  font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 14px; color: var(--ink-0);
}
.v2-compat .lf-section h3 {
  font-size: var(--t-lg); font-weight: 600; margin: 22px 0 10px; color: var(--ink-0);
}
.v2-compat .lf-section p { color: var(--ink-1); line-height: 1.6; margin: 0 0 12px; }
.v2-compat .lf-section ul,
.v2-compat .lf-section ol { color: var(--ink-1); line-height: 1.6; padding-left: 22px; margin: 0 0 12px; }
.v2-compat .lf-section li { margin-bottom: 6px; }
.v2-compat .lf-sub { color: var(--ink-2); font-size: var(--t-sm); margin: -6px 0 14px; }

/* TLDR */
.v2-compat .lf-tldr {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 14px 18px;
  color: var(--ink-0);
  font-size: var(--t-body);
  line-height: 1.55;
  margin: 0 0 24px;
}

/* FAQ */
.v2-compat .lf-faq { margin: 36px 0; }
.v2-compat .lf-faq h2 {
  font-size: var(--t-xl); font-weight: 700; margin: 0 0 14px;
}
.v2-compat .lf-faq-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.v2-compat .lf-faq-item:last-child { border-bottom: 1px solid var(--line); }
.v2-compat .lf-faq-item summary {
  cursor: pointer; font-weight: 600; color: var(--ink-0);
  font-size: var(--t-body); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.v2-compat .lf-faq-item summary::-webkit-details-marker { display: none; }
.v2-compat .lf-faq-item summary::after {
  content: '+'; font-weight: 400; color: var(--ink-2); font-size: 20px;
}
.v2-compat .lf-faq-item[open] summary::after { content: '−'; color: var(--accent); }
.v2-compat .lf-faq-item p { margin: 10px 0 0; color: var(--ink-1); line-height: 1.6; }

/* Formula blocks */
.v2-compat .lf-formula {
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-family: var(--mono); font-size: var(--t-sm);
  color: var(--ink-0); margin: 12px 0;
}

/* Empty state */
.v2-compat .lf-empty,
.v2-compat .tool-empty {
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  padding: 24px 20px;
  color: var(--ink-2);
  text-align: center;
}

/* TOC */
.v2-compat .lf-toc {
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin: 0 0 24px;
}
.v2-compat .lf-toc h2 { font-size: var(--t-sm); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; color: var(--ink-2); }
.v2-compat .lf-toc ul { padding: 0; list-style: none; margin: 0; }
.v2-compat .lf-toc a { color: var(--ink-1); text-decoration: none; }
.v2-compat .lf-toc a:hover { color: var(--accent); }

/* Related */
.v2-compat .mp-related {
  margin-top: 32px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-soft, #fafafa);
}
.v2-compat .mp-related h2 { font-size: var(--t-body); margin: 0 0 10px; color: var(--ink-0); }
.v2-compat .mp-related ul { padding: 0; list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.v2-compat .mp-related a { color: var(--accent); text-decoration: none; font-weight: 500; font-size: var(--t-sm); }
.v2-compat .mp-related a:hover { text-decoration: underline; }

/* Tools grid */
.v2-compat .tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin: 18px 0;
}
.v2-compat .tools-card {
  display: block; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fff; color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.v2-compat .tools-card:hover {
  border-color: var(--accent); transform: translateY(-1px);
}
.v2-compat .tools-card h3 {
  margin: 0 0 6px; font-size: var(--t-body); color: var(--ink-0); font-weight: 600;
}
.v2-compat .tools-card p {
  margin: 0; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.5;
}
.v2-compat .tools-card--feature {
  background: var(--accent-soft); border-color: var(--accent);
}

/* Tool form + result */
.v2-compat .tool-form-card {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px 22px; margin: 18px 0 24px;
  background: #fff;
}
.v2-compat .tool-form {
  display: grid; gap: 14px;
}
.v2-compat .tool-form label {
  display: block; font-size: var(--t-sm); color: var(--ink-1);
  font-weight: 600; margin-bottom: 4px;
}
.v2-compat .tool-form input,
.v2-compat .tool-form select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; color: var(--ink-0);
  font-family: var(--sans); font-size: var(--t-body);
  font-variant-numeric: tabular-nums;
}
.v2-compat .tool-form input:focus,
.v2-compat .tool-form select:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.v2-compat .tool-btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.v2-compat .tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font-weight: 600; font-size: var(--t-sm); cursor: pointer;
}
.v2-compat .tool-btn:hover { background: var(--accent-hover, #6928d9); border-color: var(--accent-hover, #6928d9); }
.v2-compat .tool-btn[data-variant="ghost"],
.v2-compat .tool-btn.ghost {
  background: transparent; color: var(--ink-1); border-color: var(--line-2);
}
.v2-compat .tool-btn[data-variant="ghost"]:hover,
.v2-compat .tool-btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.v2-compat .tool-result {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.v2-compat .tool-result-card {
  background: var(--accent-soft); border-radius: var(--r-md);
  padding: 14px 16px;
}
.v2-compat .tool-result-h {
  font-size: var(--t-xs); color: var(--ink-2); text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600; margin: 0 0 6px;
}
.v2-compat .tool-result-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.v2-compat .tool-result-row:last-child { border-bottom: 0; }
.v2-compat .tool-result-row b {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  color: var(--ink-0); font-weight: 700;
}

/* League hub specific */
.v2-compat .league-flag { font-size: 28px; margin-right: 6px; vertical-align: -3px; }
.v2-compat .lh-table-wrap {
  border: 1px solid var(--line); border-radius: var(--r-md);
  margin: 16px 0; overflow: hidden;
}
.v2-compat .lh-table-scroll { overflow-x: auto; }
.v2-compat .lh-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--t-sm); background: #fff;
}
.v2-compat .lh-table th,
.v2-compat .lh-table td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.v2-compat .lh-table th {
  background: var(--bg-soft, #fafafa);
  font-weight: 600; color: var(--ink-2);
  font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em;
}
.v2-compat .lh-table tr:last-child td { border-bottom: 0; }
.v2-compat .lh-match { font-weight: 500; color: var(--ink-0); }
.v2-compat .lh-vs { color: var(--ink-2); margin: 0 4px; font-weight: 400; }
.v2-compat .lh-time { color: var(--ink-2); font-family: var(--mono); font-size: var(--t-xs); white-space: nowrap; }
.v2-compat .lh-num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-1); }
.v2-compat .lh-num.lh-best,
.v2-compat .lh-price.lh-best { color: var(--accent); font-weight: 700; background: var(--accent-soft); }

/* Stacked best-price cell: big decimal price on top, small book name + exit link under it. */
.v2-compat .lh-cell-stack {
  padding: 10px 14px;
  vertical-align: middle;
  background: var(--accent-soft);
  text-align: right;
}
.v2-compat .lh-cell-stack .lh-price {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-base, 15px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  background: transparent;
}
.v2-compat .lh-cell-stack .lh-book {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: var(--t-xs, 11px);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.v2-compat .lh-cell-stack .lh-book:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Legacy (non-stacked) lh-book chip — only used in old templates if any remain. */
.v2-compat .lh-book:not(a) {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; font-size: var(--t-xs); color: var(--ink-1);
}

/* Book exit links — used anywhere we mention an operator in body copy or chips. */
.book-link {
  color: inherit;
  text-decoration: none;
}
.book-link--inline {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.book-link--inline:hover {
  text-decoration: underline;
}
.book-link--bare {
  color: inherit;
  text-decoration: none;
}
.book-link--bare:hover {
  filter: brightness(0.95);
}
.v2-compat .lh-why {
  background: var(--bg-soft, #fafafa); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 16px; margin: 12px 0;
  font-size: var(--t-sm); color: var(--ink-1);
}
.v2-compat .lh-why-swatch {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 3px; vertical-align: -1px; margin-right: 6px;
  background: var(--accent-soft); border: 1px solid var(--accent);
}
.v2-compat .lh-related { margin-top: 24px; }

/* Book page */
.v2-compat .book-page { max-width: 880px; }

/* ─── Book CTA bar (used on review + promo pages) ──────────────────────── */
.v2-compat .book-cta-bar {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 16px 18px;
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.v2-compat .book-cta-bar__brand {
  display: flex; align-items: center; gap: 14px;
  min-width: 240px; flex: 1 1 240px;
}
.v2-compat .book-cta-bar__logo {
  width: 56px; height: 56px;
  border-radius: var(--r-sm, 6px);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.v2-compat .book-cta-bar__logo .book-tile { width: 100%; height: 100%; display: block; border-radius: inherit; }
.v2-compat .book-cta-bar__logo .book-logo-wrap { width: 100%; height: 100%; display: block; position: relative; }
.v2-compat .book-cta-bar__logo .book-logo-img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.v2-compat .book-cta-bar__text { display: flex; flex-direction: column; gap: 2px; }
.v2-compat .book-cta-bar__text strong { font-size: var(--t-md, 16px); color: var(--ink-0); }
.v2-compat .book-cta-bar__bonus { color: var(--ink-1); font-size: var(--t-sm, 14px); }
.v2-compat .book-cta-bar__actions {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.v2-compat .book-cta-bar__code {
  font-family: var(--mono); font-size: var(--t-sm, 14px); font-weight: 600;
  padding: 8px 14px;
  background: #fff;
  border: 1px dashed var(--ink-2);
  border-radius: var(--r-sm, 6px);
  color: var(--ink-0);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 120ms ease;
}
.v2-compat .book-cta-bar__code:hover { border-color: var(--accent); color: var(--accent); }
.v2-compat .book-cta-bar__code.is-copied { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.v2-compat .book-cta-bar__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  background: #FF9900 !important;
  color: #1a1300 !important;
  font-weight: 700;
  border-radius: var(--r-sm, 6px);
  text-decoration: none;
  transition: filter 120ms ease;
}
.v2-compat .book-cta-bar__btn:hover { filter: brightness(0.95); }
.v2-compat .book-cta-bar__rg {
  flex-basis: 100%;
  margin: 6px 0 0 0;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}
.v2-compat .book-cta-bar__rg a { color: var(--ink-1); text-decoration: underline; }

/* ─── Learn end-of-article CTA cards ── */
.v2-compat .learn-endcta { margin-top: 32px; }
.v2-compat .learn-endcta__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.v2-compat .learn-endcta__card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px;
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}
.v2-compat .learn-endcta__card:hover { border-color: var(--accent); transform: translateY(-1px); }
.v2-compat .learn-endcta__card strong { color: var(--ink-0); font-size: var(--t-md, 16px); }
.v2-compat .learn-endcta__card span { color: var(--ink-2); font-size: var(--t-sm, 14px); line-height: 1.5; }

/* ─── Books index grid (rebuilt) ──────────────────────────────────────── */
.v2-compat .books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.v2-compat .book-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.v2-compat .book-card:hover { border-color: var(--accent); box-shadow: 0 1px 8px rgba(124,58,237,0.08); }
.v2-compat .book-card__head { display: flex; align-items: center; gap: 14px; }
.v2-compat .book-card__logo {
  width: 56px; height: 56px;
  border-radius: var(--r-sm, 6px);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.v2-compat .book-card__logo .book-tile { width: 100%; height: 100%; display: block; border-radius: inherit; }
.v2-compat .book-card__logo .book-logo-wrap { width: 100%; height: 100%; display: block; position: relative; }
.v2-compat .book-card__logo .book-logo-img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.v2-compat .book-card__name h3 { margin: 0 0 2px 0; font-size: var(--t-md, 17px); color: var(--ink-0); }
.v2-compat .book-card__name p { margin: 0; color: var(--ink-2); font-size: var(--t-sm, 13px); line-height: 1.4; }
.v2-compat .book-card__bonus {
  padding: 8px 12px;
  background: var(--accent-soft);
  border-radius: var(--r-sm, 6px);
  color: var(--accent);
  font-weight: 600;
  font-size: var(--t-sm, 14px);
}
.v2-compat .book-card__code {
  font-size: var(--t-sm, 13px);
  color: var(--ink-1);
}
.v2-compat .book-card__code-val {
  font-family: var(--mono);
  font-weight: 700;
  background: #fff;
  border: 1px dashed var(--ink-2);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0.03em;
  color: var(--ink-0);
}
.v2-compat .book-card__actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.v2-compat .book-card__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px;
  background: #FF9900 !important;
  color: #1a1300 !important;
  font-weight: 700;
  border-radius: var(--r-sm, 6px);
  text-decoration: none;
  transition: filter 120ms ease;
}
.v2-compat .book-card__btn:hover { filter: brightness(0.95); }
.v2-compat .book-card__links {
  display: flex; gap: 14px;
  font-size: var(--t-sm, 13px);
}
.v2-compat .book-card__links a { color: var(--ink-1); text-decoration: none; }
.v2-compat .book-card__links a:hover { color: var(--accent); text-decoration: underline; }

/* ─── Promo-code page styling ────────────────────────────────────────── */
.v2-compat .book-promo-page h1 .book-code-inline {
  font-family: var(--mono);
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.v2-compat .book-spec-table {
  width: 100%; border-collapse: collapse;
  margin: 12px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.v2-compat .book-spec-table th,
.v2-compat .book-spec-table td {
  padding: 10px 14px;
  text-align: left;
  font-size: var(--t-sm, 14px);
  border-bottom: 1px solid var(--line);
}
.v2-compat .book-spec-table tr:last-child th,
.v2-compat .book-spec-table tr:last-child td { border-bottom: 0; }
.v2-compat .book-spec-table th {
  width: 30%;
  background: var(--bg-soft, #fafafa);
  color: var(--ink-1);
  font-weight: 600;
}
.v2-compat .book-spec-table td { color: var(--ink-0); }

/* ─── FAQ styling (used across review / promo / telegram) ───────────── */
.v2-compat .lf-faq { margin: 8px 0 0; }
.v2-compat .lf-faq dt {
  font-weight: 600; color: var(--ink-0);
  margin-top: 14px;
  font-size: var(--t-md, 16px);
}
.v2-compat .lf-faq dd {
  margin: 4px 0 0 0;
  color: var(--ink-1);
  line-height: 1.55;
}
.v2-compat .lf-faq dd code,
.v2-compat .tg-cmd-row code {
  background: var(--bg-soft, #fafafa);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ink-0);
}

/* ─── Telegram page ─────────────────────────────────────────────────── */
.v2-compat .tg-page { max-width: 880px; }
.v2-compat .tg-cta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}
.v2-compat .tg-cta {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.v2-compat .tg-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.v2-compat .tg-cta--primary {
  background: #229ED9; color: #fff;
}
.v2-compat .tg-cta--secondary {
  background: #fff; color: var(--ink-0);
  border: 1px solid var(--line);
}
.v2-compat .tg-cta__icon { font-size: 28px; line-height: 1; }
.v2-compat .tg-cta__text { display: flex; flex-direction: column; gap: 2px; }
.v2-compat .tg-cta__text strong { font-size: var(--t-md, 16px); }
.v2-compat .tg-cta__text small { font-size: var(--t-sm, 13px); opacity: 0.85; }

.v2-compat .tg-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.v2-compat .tg-type-card {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.v2-compat .tg-type-card__icon { font-size: 22px; line-height: 1; margin-bottom: 8px; }
.v2-compat .tg-type-card h3 { margin: 0 0 4px 0; font-size: var(--t-md, 16px); color: var(--ink-0); }
.v2-compat .tg-type-card p { margin: 0; color: var(--ink-1); font-size: var(--t-sm, 14px); line-height: 1.5; }

.v2-compat .tg-msg-preview {
  margin: 14px 0;
  padding: 16px 18px;
  background: #f0f4f7;
  border-left: 3px solid #229ED9;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: var(--t-sm, 13px);
  color: var(--ink-0);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}

.v2-compat .tg-cmd-table {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 12px 0;
  background: #fff;
}
.v2-compat .tg-cmd-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-sm, 14px);
  align-items: center;
}
.v2-compat .tg-cmd-row:last-child { border-bottom: 0; }
.v2-compat .tg-cmd-row--head {
  background: var(--bg-soft, #fafafa);
  color: var(--ink-1);
  font-weight: 600;
  font-size: var(--t-xs, 12px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .v2-compat .tg-cmd-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ── More markets (Totals/BTTS/Spread) ────────────────────────────────────── */
.mp-markets { margin-top: 32px; }
.mp-markets__header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-markets__header h2 { margin: 0; font-size: var(--t-h3); font-weight: 600; }
.mp-markets__header .hint { font-size: var(--t-xs); color: var(--ink-2); }
.mp-mk {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  overflow: hidden;
}
.mp-mk > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-size: var(--t-body);
  user-select: none;
}
.mp-mk > summary::-webkit-details-marker { display: none; }
.mp-mk > summary::after {
  content: "›";
  font-size: 20px;
  color: var(--ink-3);
  transform: rotate(90deg);
  transition: transform .15s ease;
  flex: 0 0 auto;
}
.mp-mk[open] > summary::after { transform: rotate(-90deg); }
.mp-mk[open] > summary { border-bottom: 1px solid var(--line); }
.mp-mk > summary b { font-weight: 600; color: var(--ink-0); }
.mp-mk-line { font-size: var(--t-sm); color: var(--ink-2); margin-left: 8px; }

.mp-mk-table { display: flex; flex-direction: column; }
.mp-mk-head, .mp-mk-row {
  display: grid;
  grid-template-columns: 36px 1.4fr repeat(var(--mk-cols, 2), 1fr);
  align-items: center;
  padding: 10px 18px;
  gap: 12px;
}
.mp-mk-logo {
  width: 36px; height: 36px;
  border-radius: var(--r-sm, 6px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.mp-mk-logo .book-link--bare { display: block; width: 100%; height: 100%; }
.mp-mk-logo .book-logo-wrap { width: 100%; height: 100%; display: block; position: relative; }
.mp-mk-logo .book-tile { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: var(--r-sm, 6px); }
.mp-mk-logo .book-logo-img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.mp-mk-head .mp-mk-logo { background: transparent; }
.mp-mk-note {
  padding: 12px 18px;
  background: var(--bg-soft, #fafafa);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-1);
  max-width: 68ch;
  line-height: 1.5;
}
.mp-mk-note p { margin: 0 0 6px; }
.mp-mk-note p:last-child { margin-bottom: 0; }
.mp-mk-value { color: var(--ink-0); font-weight: 600; }

.mp-mk-row { border-top: 1px solid var(--line); }
.mp-mk-head {
  background: var(--bg-soft, #fafafa);
  font-size: var(--t-xs);
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.mp-mk-head-cell { text-align: right; }
.mp-mk-book { font-size: var(--t-sm); color: var(--ink-0); font-weight: 500; }
.mp-mk-cell {
  text-align: right;
  font-size: var(--t-body);
  color: var(--ink-0);
  padding: 6px 8px;
  border-radius: var(--r-sm, 6px);
  text-decoration: none;
  display: inline-block;
  min-width: 56px;
  justify-self: end;
  transition: background .12s ease;
}
.mp-mk-cell:hover { background: var(--bg-soft, #f5f6f7); }
.mp-mk-cell.is-best {
  background: var(--accent-soft, #fff4e0);
  color: var(--accent, #FF9900);
  font-weight: 600;
}
.mp-mk-cell.is-best:hover { background: var(--accent-soft, #ffe6c2); }
@media (max-width: 640px) {
  .mp-mk-head, .mp-mk-row {
    grid-template-columns: 28px 1.1fr repeat(var(--mk-cols, 2), 1fr);
    padding: 8px 10px; gap: 8px;
  }
  .mp-mk-logo { width: 28px; height: 28px; }
  .mp-mk-logo .book-logo-img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
  .mp-mk-book { font-size: var(--t-xs); }
  .mp-mk-note { padding: 10px 12px; font-size: 12px; }
}

/* Date input filter (between day chips and edge chips) */
.filters .filter-date {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 8px);
  background: #fff;
  font-size: var(--t-sm);
  color: var(--ink-1);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.filters .filter-date:hover { border-color: var(--ink-3); }
.filters .filter-date input[type="date"] {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 0;
  outline: 0;
  cursor: pointer;
  min-width: 130px;
}
.filters .filter-date input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }
.filters .filter-date input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
@media (max-width: 640px) {
  .filters .filter-date input[type="date"] { min-width: 110px; font-size: var(--t-xs); }
}

/* ============================================================
   Match page — confidence-aware verdict (Speculative / Medium / High)
   ============================================================ */
.mp-confidence-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 8px 0 !important;
}
.mp-confidence-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: var(--t-xs, 12px); font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid transparent;
  line-height: 1.4;
}
.mp-confidence-chip.is-high {
  background: rgba(34, 139, 60, 0.12);
  color: var(--up, #228b3c);
  border-color: rgba(34, 139, 60, 0.30);
}
.mp-confidence-chip.is-medium {
  background: rgba(217, 138, 0, 0.14);
  color: #a86700;
  border-color: rgba(217, 138, 0, 0.32);
}
.mp-confidence-chip.is-speculative {
  background: rgba(180, 50, 50, 0.10);
  color: #a83232;
  border-color: rgba(180, 50, 50, 0.30);
}
.mp-confidence-lead {
  font-size: var(--t-sm, 14px);
  color: var(--ink-2);
  font-weight: 500;
}

.mp-caveats {
  margin: 10px 0 0 0;
  padding-left: 20px;
  font-size: var(--t-sm, 14px);
  color: var(--ink-1);
  line-height: 1.5;
}
.mp-caveats li { margin: 4px 0; }
.mp-caveats li b.num { font-family: var(--mono); color: var(--ink-0); }

.mp-disclaimer {
  margin: 10px 0 0 0 !important;
  font-size: var(--t-sm, 14px);
  font-style: italic;
  color: var(--ink-2);
}

/* CTA variants by confidence */
.mp-cta.mp-cta--is-high {
  /* keep the orange default */
}
.mp-cta.mp-cta--is-medium {
  background: var(--bg-1) !important;
  color: var(--ink-0) !important;
  border: 1px solid var(--accent, #FF9900);
  box-shadow: none;
}
.mp-cta.mp-cta--is-medium:hover {
  background: var(--accent-soft, #fff3df) !important;
  color: var(--ink-0) !important;
}
.mp-cta.mp-cta--is-speculative {
  background: transparent !important;
  color: var(--ink-1) !important;
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 600;
}
.mp-cta.mp-cta--is-speculative:hover {
  background: var(--bg-1) !important;
  color: var(--ink-0) !important;
  border-color: var(--ink-2);
}

@media (max-width: 700px) {
  .mp-cta { width: 100%; justify-content: center; }
}

/* ── Mobile pass (≤ 720px) ───────────────────────────────────────────────────
   Goals:
   • Header never wraps. Logo + scrolling nav + mode toggle stay on one line.
   • League rail (already horizontal-scroll on mobile) bleeds edge-to-edge so
     users can SEE there's more to swipe to.
   • Filters row stays one wrap-friendly group with smaller pills.
   • Match hero stays readable. Verdict block tightens padding, CTA full-width.
   • Book ladder + other markets keep their existing 700px stack rules.
*/
@media (max-width: 720px) {
  /* Header: hamburger + logo + (no inline nav) + mode toggle */
  .so-header__inner {
    gap: 10px;
    padding: 0 12px;
  }
  .so-logo svg { height: 20px; }
  /* Hide the desktop horizontal nav entirely on mobile — we use the drawer */
  .so-nav { display: none; }
  .so-header__right { gap: 6px; flex: 0 0 auto; margin-left: auto; }
  .mode-toggle { font-size: 11px; }
  .mode-toggle button { padding: 4px 9px; }

  /* Page intro */
  .so-main { padding: 18px 14px 60px; }
  .page-title { font-size: 26px; line-height: 1.2; }
  .page-sub { font-size: 14px; }

  /* League rail — bleed edges so the cut-off hint is visible */
  .rail-list {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .rail-list a { scroll-snap-align: start; }

  /* Filters row */
  .filters { gap: 6px; margin: 14px 0 12px; }
  .filters .seg { padding: 2px; }
  .filters .seg button { padding: 5px 9px; font-size: 11px; letter-spacing: .01em; }

  /* Match page hero */
  .mp-hero { padding: 14px 0 4px; }
  .mp-title { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
  .mp-when { font-size: 12px; }
  .mp-bc { font-size: 11px; }

  /* Probability bar caption row — wrap nicely on narrow screens */
  .mp-pbar { margin-top: 14px; }
  .mp-pbar .pbar { height: 38px; }
  .mp-pbar-cap {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
  }
  .mp-pbar-cap div {
    text-align: center;
    font-size: 12px;
  }
  .mp-pbar-cap div b { font-size: 13px; }

  /* Verdict block tightens up */
  .mp-verdict {
    margin-top: 14px;
    padding: 14px;
    gap: 8px;
  }
  .mp-verdict > * { max-width: 100%; }
  .mp-verdict-head { font-size: 15px; line-height: 1.35; }
  .mp-verdict-body { font-size: 13px; }
  .mp-verdict-note { font-size: 12px; }
  .mp-verdict-tag { font-size: 11px; }
  .mp-ev { font-size: 13px; }

  /* Book ladder rows — already collapse at 700px, just tighten the header */
  .mp-books header { padding: 12px 14px; gap: 8px; flex-wrap: wrap; }
  .mp-books header h2 { font-size: 15px; }
  .mp-books header .hint { font-size: 11px; flex: 1 1 100%; }

  /* More markets: keep tables tight */
  .mp-markets { margin-top: 18px; }
}

/* Very narrow phones (≤ 380px) — belt-and-braces */
@media (max-width: 380px) {
  .mode-toggle button { padding: 4px 7px; font-size: 10px; }
  .page-title { font-size: 22px; }
  .mp-title { font-size: 19px; }
}

/* ── Hamburger button ───────────────────────────────────────────────────────────────────────────
   Hidden on desktop, visible ≤720px. Sits before the logo for thumb-reach. */
.so-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -6px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--ink-0);
  cursor: pointer;
}
.so-hamburger:hover { background: var(--bg-2); }
.so-hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 720px) {
  .so-hamburger { display: inline-flex; }
}

/* ── Drawer + backdrop ───────────────────────────────────────────────────────────────────────────── */
.so-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(82vw, 320px);
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 80;
  transform: translateX(-100%);
  transition: transform .22s ease-out;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.10);
}
.so-drawer.is-open { transform: translateX(0); }
.so-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  min-height: var(--header-h);
}
.so-drawer__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; border: 0; border-radius: var(--r-sm);
  color: var(--ink-0); cursor: pointer;
}
.so-drawer__close:hover { background: var(--bg-2); }
.so-drawer__nav {
  display: flex; flex-direction: column;
  padding: 12px 8px;
  flex: 1;
}
.so-drawer__nav a {
  display: flex; align-items: center;
  padding: 14px 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-0);
  text-decoration: none;
  border-radius: var(--r-sm);
}
.so-drawer__nav a:hover { background: var(--bg-2); }
.so-drawer__nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.so-drawer__foot {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.so-drawer__legal {
  margin: 0;
  font-size: 12px;
  color: var(--ink-2);
}

.so-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  z-index: 70;
  opacity: 0;
  transition: opacity .22s ease-out;
}
.so-drawer-backdrop.is-open { opacity: 1; }

/* Desktop: drawer never opens via CSS, but defensively hide it */
@media (min-width: 721px) {
  .so-drawer, .so-drawer-backdrop { display: none !important; }
}

/* ===========================================================================
   Phase 1: Multi-market match page — .mp-nav, .mp-preview, .mp-mkt
   =========================================================================== */

/* ── Sticky in-page nav ──────────────────────────────────────────────────────────── */
.mp-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: var(--bg-0);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 4px;
  padding: 8px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mp-nav::-webkit-scrollbar { display: none; }
.mp-nav__pill {
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-1);
  border: 1px solid var(--line);
  background: var(--bg-0);
  transition: background .15s, color .15s;
}
.mp-nav__pill:hover { background: var(--bg-2); color: var(--ink-0); }
.mp-nav__pill.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ── Editorial preview block ─────────────────────────────────────────────────── */
.mp-preview {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--bg-1);
  border-radius: var(--r-md);
  border-left: 3px solid var(--accent);
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--ink-1);
}
.mp-preview p { margin: 0; }
.mp-preview .up { color: var(--up); }

/* ── Market section (.mp-mkt) ──────────────────────────────────────────────────── */
.mp-mkt {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-top: 16px;
  overflow: hidden;
}

/* Section header */
.mp-mkt__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.mp-mkt__head-text {}
.mp-mkt__head h2 {
  font-size: var(--t-h3);
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
  color: var(--ink-0);
}
.mp-mkt__sub {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}

/* Only-at pill */
.mp-mkt__only {
  display: inline-block;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 2px;
}

/* Best-price summary row */
.mp-mkt__best {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 16px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}
.mp-mkt__best-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--t-sm);
}
.mp-mkt__best-label {
  color: var(--ink-2);
}
.mp-mkt__best-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--cta);
  text-decoration: none;
}
.mp-mkt__best-price:hover { text-decoration: underline; }
.mp-mkt__best-book {
  color: var(--ink-3);
  font-size: var(--t-xs);
}

/* Table wrapper (horizontal scroll on mobile) */
.mp-mkt__table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mp-mkt__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
  min-width: 320px;
}
.mp-mkt__table th {
  padding: 6px 12px;
  font-size: var(--t-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-3);
  text-align: right;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}
.mp-mkt__th-book { text-align: left; }
.mp-mkt__table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background .1s;
}
.mp-mkt__table tbody tr:last-child { border-bottom: 0; }
.mp-mkt__table tbody tr:hover { background: var(--bg-1); }

.mp-mkt__book-cell { padding: 8px 12px; }
.mp-mkt__book-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-mkt__book-inner .book-tile { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; }
.mp-mkt__book-inner .book-logo-wrap { width: 20px; height: 20px; flex-shrink: 0; }
.mp-mkt__book-inner .book-logo-img { width: 20px; height: 20px; object-fit: contain; }

.mp-mkt__cell {
  padding: 8px 12px;
  text-align: right;
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.mp-mkt__cell a {
  color: var(--ink-1);
  text-decoration: none;
  font-weight: 500;
}
.mp-mkt__cell a:hover { color: var(--cta); text-decoration: underline; }
.mp-mkt__cell.is-best a { color: var(--cta); font-weight: 700; }
.mp-mkt__cell.is-empty { color: var(--ink-4); }

/* Ladder table variant */
.mp-mkt__table--ladder .mp-mkt__ladder-hdp {
  padding: 6px 12px;
  text-align: left;
  color: var(--ink-1);
  font-weight: 600;
}
.mp-mkt__ladder-book {
  display: block;
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-family: var(--sans);
  font-weight: 400;
  white-space: nowrap;
}

/* Collapsible alt-lines block */
.mp-mkt__alt {
  border-top: 1px solid var(--line);
  padding: 0;
}
.mp-mkt__alt summary {
  padding: 8px 16px;
  font-size: var(--t-sm);
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.mp-mkt__alt summary::-webkit-details-marker { display: none; }
.mp-mkt__alt summary::before { content: '▶ '; font-size: 10px; }
.mp-mkt__alt[open] summary::before { content: '▼ '; }
.mp-mkt__alt summary:hover { color: var(--ink-0); background: var(--bg-1); }

/* Sub-tabs */
.mp-mkt__tabs-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px;
}
.mp-mkt__tabs-bar::-webkit-scrollbar { display: none; }
.mp-mkt__tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.mp-mkt__tab:hover { color: var(--ink-0); }
.mp-mkt__tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.mp-mkt__pane { }
.mp-mkt__pane.is-hidden { display: none; }

/* Team sub-label inside team-cards pane */
.mp-mkt__team-sub { margin-top: 4px; }
.mp-mkt__team-label {
  display: block;
  padding: 6px 16px 2px;
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-3);
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}

/* Correct-score grid */
.mp-cs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
  padding: 12px 16px;
}
.mp-cs__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-0);
  transition: border-color .1s;
}
.mp-cs__cell:hover { border-color: var(--cta); }
.mp-cs__label {
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink-0);
  font-family: var(--mono);
}
.mp-cs__price {
  font-size: 13px;
  font-weight: 600;
  color: var(--cta);
  text-decoration: none;
}
.mp-cs__price:hover { text-decoration: underline; }
.mp-cs__book {
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Goals-in-match rows */
.mp-mkt__gim {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mp-mkt__gim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-sm);
}
.mp-mkt__gim-row:last-child { border-bottom: 0; }
.mp-mkt__gim-label { flex: 1; color: var(--ink-1); }
.mp-mkt__gim-price { color: var(--cta); font-weight: 600; text-decoration: none; }
.mp-mkt__gim-price:hover { text-decoration: underline; }
.mp-mkt__gim-book { color: var(--ink-3); font-size: var(--t-xs); }

/* ── Mobile overrides for .mp-nav and .mp-mkt ─────────────────────────────────── */
@media (max-width: 540px) {
  .mp-nav {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
    scroll-snap-type: x proximity;
  }
  .mp-nav__pill { scroll-snap-align: start; }
  .mp-mkt { border-radius: var(--r-sm); }
  .mp-mkt__head { padding: 10px 12px 8px; }
  .mp-mkt__head h2 { font-size: 15px; }
  .mp-mkt__best { padding: 6px 12px; gap: 6px 12px; }
  .mp-mkt__book-cell { padding: 7px 8px; }
  .mp-mkt__cell { padding: 7px 8px; }
  .mp-cs__grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; padding: 8px; }
  .mp-preview { margin-top: 10px; padding: 10px 12px; font-size: 12px; }
}

/* ============================================================================
   Phase 2 — Player Props: .mp-pp__* and player page layout
   ============================================================================ */

/* ── Player props teaser grid (match page section) ─────────────────────────── */
.mp-pp {
  /* Inherits .mp-mkt card styling */
}

.mp-pp__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 12px 14px;
}

.mp-pp__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
  cursor: pointer;
}

.mp-pp__card:hover {
  background: var(--bg-2);
  border-color: var(--accent);
  box-shadow: var(--shadow-1);
}

/* Photo or initials avatar */
.mp-pp__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

/* Initials avatar fallback */
.mp-pp__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.65 0.15 var(--avatar-hue, 250deg));
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  font-family: var(--sans);
  letter-spacing: .03em;
  border-radius: 50%;
  flex-shrink: 0;
}

.mp-pp__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-0);
  text-align: center;
  line-height: 1.3;
}

.mp-pp__role {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.4;
}

.mp-pp__price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}

.mp-pp__lbl {
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
}

.mp-pp__price .num {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--cta);
  line-height: 1;
}

.mp-pp__book {
  font-size: 10px;
  color: var(--ink-2);
}

/* Show-more button */
.mp-pp__show-more {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  padding: 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--bg-1);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background .1s, color .1s;
}
.mp-pp__show-more:hover { background: var(--bg-2); color: var(--ink-0); }

/* Match + Player page max-width container */
.mp-page {
  max-width: var(--content-max, 1200px);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .mp-page { padding: 0 14px; }
}

/* Player auto-text narrative block */
.player-narrative {
  margin: 24px 0 8px;
  padding: 18px 22px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.player-narrative h2 {
  font-size: var(--t-h3, 18px);
  margin: 0 0 10px;
  color: var(--ink-0);
}
.player-narrative p {
  margin: 0 0 10px;
  line-height: 1.65;
  color: var(--ink-1);
  font-size: var(--t-body, 15px);
}
.player-narrative p:last-child { margin-bottom: 0; }
.player-narrative .num {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.player-narrative__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.player-narrative__stat { display: flex; flex-direction: column; }
.player-narrative__stat strong {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  color: var(--ink-0);
  line-height: 1.2;
}
.player-narrative__stat span {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 2px;
}

/* ── Player page layout (.player-page) ─────────────────────────────────────── */
.player-page {
  /* Extends .mp-page */
}

.player-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding: 28px 0 24px;
  align-items: flex-start;
}

.player-hero__media {
  flex-shrink: 0;
}

.player-hero__photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Large initials avatar on player page */
.player-hero .mp-pp__avatar--initials {
  width: 200px !important;
  height: 200px !important;
  font-size: 56px;
}

.player-hero__name {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-0);
  line-height: 1.2;
  margin: 0 0 6px;
}

.player-hero__subtitle {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 12px;
}

.player-hero__attr {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
}
.player-hero__attr a {
  color: var(--ink-3);
  text-decoration: underline;
}

/* Player bio — verbatim Wikipedia extract */
.player-bio {
  background: var(--bg-1);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-1);
}

/* Upcoming fixtures grid */
.player-fixtures {
  margin-top: 24px;
}

.player-fixtures__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 12px 14px;
}

.player-fixture-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-fixture-card__date {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}

.player-fixture-card__match {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-0);
  line-height: 1.25;
}

.player-fixture-card__league {
  font-size: 11px;
  color: var(--ink-3);
}

.player-fixture-card__hl {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.player-fixture-card__mkt {
  font-size: 11px;
  color: var(--ink-2);
}

.player-fixture-card__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cta);
  text-decoration: none;
}
.player-fixture-card__link:hover { text-decoration: underline; }

/* All markets section */
.player-markets {
  margin-top: 24px;
}

.player-markets__section {
  margin-bottom: 24px;
}

.player-markets__section h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-0);
  margin: 0 0 10px;
  padding: 0 14px;
}

.player-markets__fixture-group {
  margin-bottom: 14px;
}

.player-markets__fixture-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 6px 14px;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Best-row highlight in markets table */
.mp-mkt__table tbody tr.is-best-row td {
  background: var(--up-soft);
}

/* FAQ on player page */
.player-faq {
  margin-top: 24px;
}

/* ── Mobile overrides for player pages ─────────────────────────────────────── */
@media (max-width: 640px) {
  .player-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
  }
  .player-hero__media {
    display: flex;
    justify-content: center;
  }
  .player-hero__photo,
  .player-hero .mp-pp__avatar--initials {
    width: 120px !important;
    height: 120px !important;
  }
  .player-hero .mp-pp__avatar--initials {
    font-size: 32px !important;
  }
  .player-hero__name {
    font-size: 20px;
    text-align: center;
  }
  .player-hero__subtitle { text-align: center; }
  .player-fixtures__grid {
    grid-template-columns: 1fr;
  }
  /* Player props grid: 2 columns on mobile */
  .mp-pp__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 10px;
  }
  .mp-pp__card {
    padding: 10px 8px 8px;
  }
  .mp-pp__avatar,
  .mp-pp__avatar--initials {
    width: 60px !important;
    height: 60px !important;
    font-size: 18px !important;
  }
  .mp-pp__price .num { font-size: 16px; }
}
