/* ================================================================== */
/*  simplyodds — trading-terminal redesign                              */
/*  Inspired by Kraken Pro / Bloomberg / TradingView                    */
/*  Calm by default. Colour only for state (best / worst / arb / live). */
/* ================================================================== */

/* ── Tokens · DARK (default) ──────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg-0:       #0a0c10;        /* page background, deepest */
  --bg-1:       #10141b;        /* panels */
  --bg-2:       #161b24;        /* cards / nested panels */
  --bg-3:       #1d2330;        /* cells / chips */
  --line-1:     #1f2530;        /* hairline */
  --line-2:     #2a3140;        /* stronger hairline */
  --text-1:     #e6eaf0;        /* primary text */
  --text-2:     #a4adba;        /* secondary text */
  --text-3:     #6b7585;        /* tertiary / muted */
  --accent:     #3b82f6;        /* blue — active / best price / links */
  --accent-soft:#1e3a8a33;
  --up:         #22c55e;        /* green — up / arb / +EV */
  --up-soft:    #16a34a26;
  --down:       #ef4444;        /* red — down / drift / live */
  --down-soft:  #dc262626;
  --warn:       #f59e0b;        /* amber — outlier / steam */
  --warn-soft:  #d9770622;
  --cta:        #FF9900;        /* Amazon-orange — primary action CTAs only */
  --cta-hover:  #E88B00;
  --cta-text:   #111111;        /* always dark text on orange for max contrast */
  --cta-shadow: 0 1px 0 rgba(0,0,0,.18) inset, 0 1px 0 rgba(255,255,255,.18) inset;
  --shadow-1:   0 1px 0 rgba(255,255,255,.02), 0 1px 3px rgba(0,0,0,.3);
  --shadow-2:   0 4px 16px rgba(0,0,0,.4);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Switzer', 'Inter', system-ui, -apple-system, sans-serif;
  --sans-body: var(--sans);   /* Single sans family across the site. */

  color-scheme: dark;
}

/* ── Tokens · LIGHT ───────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-0:       #eef2f7;
  --bg-1:       #f4f7fb;
  --bg-2:       #ffffff;
  --bg-3:       #e8edf3;
  --line-1:     #d8dee8;
  --line-2:     #c2cad6;
  --text-1:     #1e293b;
  --text-2:     #475569;
  --text-3:     #94a3b8;
  --accent:     #2563eb;
  --accent-soft:#dbeafe;
  --up:         #16a34a;
  --up-soft:    #dcfce7;
  --down:       #dc2626;
  --down-soft:  #fee2e2;
  --warn:       #d97706;
  --warn-soft:  #fef3c7;
  --cta:        #FF9900;
  --cta-hover:  #E88B00;
  --cta-text:   #111111;
  --cta-shadow: 0 1px 0 rgba(0,0,0,.10) inset, 0 1px 0 rgba(255,255,255,.45) inset;
  --shadow-1:   0 1px 0 rgba(15,23,42,.02), 0 1px 2px rgba(15,23,42,.05);
  --shadow-2:   0 4px 14px rgba(30,41,59,.07);

  color-scheme: light;
}

/* ── Base ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(64px + var(--safe-bottom));
  transition: background-color .15s ease, color .15s ease;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── Header ───────────────────────────────────────────────────────── */
.topbar {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-1);
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-top);
}
.topbar-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  max-width: 1640px; margin: 0 auto;
}
.topbar-row--main { justify-content: flex-start; }
.topbar-row--controls {
  border-top: 1px solid var(--line-1);
  padding: 6px 16px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-row--controls::-webkit-scrollbar { display: none; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-dot {
  width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto;
  background: var(--up);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }
.logo-text { font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--text-1); }
.logo-text b { color: var(--accent); font-weight: 700; }

.badge {
  font-family: var(--mono); font-size: 10px;
  padding: 2px 6px; border-radius: 3px;
  border: 1px solid var(--line-2);
  color: var(--text-2); flex: 0 0 auto;
  font-weight: 500;
}
.badge.live {
  color: var(--up); border-color: var(--up);
  background: var(--up-soft);
}

.primary-tabs {
  display: flex; gap: 0;
  margin-left: 12px; flex: 0 0 auto;
}
.primary-tabs button {
  background: transparent; border: none;
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;     /* sit on the topbar bottom border */
  white-space: nowrap;
}
.primary-tabs button:hover { color: var(--text-1); }
.primary-tabs button.active {
  color: var(--text-1); font-weight: 600;
  border-bottom-color: var(--accent);
}

.topbar-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  margin-left: auto;
  white-space: nowrap;
}
.topbar-meta .dot { width: 3px; height: 3px; border-radius: 999px; background: var(--text-3); }

/* Theme toggle */
.theme-btn {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  flex: 0 0 auto;
}
.theme-btn:hover { color: var(--text-1); border-color: var(--line-2); background: var(--bg-3); }
.theme-btn svg { width: 14px; height: 14px; }
.theme-btn .icon-sun  { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="light"] .theme-btn .icon-sun  { display: block; }
[data-theme="light"] .theme-btn .icon-moon { display: none; }

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  width: 30px; height: 30px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
}
.menu-btn span {
  display: block; width: 14px; height: 1.5px;
  background: var(--text-1); border-radius: 1px;
  transition: transform .18s ease, opacity .18s ease;
}
.menu-btn.open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

/* ── Status strip (replaces the old value-prop band) ─────────────── */
.statusbar {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-1);
}
.statusbar-inner {
  max-width: 1640px; margin: 0 auto;
  padding: 6px 16px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--text-2);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.statusbar-inner::-webkit-scrollbar { display: none; }
.sb-item { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.sb-item b { color: var(--text-1); font-weight: 600; }
.sb-item--up b { color: var(--up); }
.sb-sep { color: var(--text-3); flex: 0 0 auto; }
.sb-pulse {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--up); flex: 0 0 auto;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ── Segmented controls ──────────────────────────────────────────── */
.seg {
  display: flex; gap: 0;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 6px;
  overflow: hidden;
  flex: 0 0 auto;
}
.seg button {
  background: transparent; color: var(--text-2);
  border: none; padding: 7px 12px;
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
  border-right: 1px solid var(--line-1);
}
.seg button:last-child { border-right: none; }
.seg button:hover { color: var(--text-1); background: var(--bg-3); }
.seg button.active { background: var(--bg-3); color: var(--text-1); font-weight: 600; }
.seg-compact button { padding: 6px 10px; font-size: 11px; min-height: 30px; }
.format-toggle button { font-family: var(--mono); padding: 6px 8px; font-size: 11px; }

/* ── League picker ───────────────────────────────────────────────── */
.league-pick { position: relative; flex: 0 0 auto; }
.league-pick-btn {
  background: var(--bg-1); border: 1px solid var(--line-1);
  border-radius: 6px; color: var(--text-1);
  padding: 6px 10px; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  min-height: 30px;
}
.league-pick-btn:hover { border-color: var(--line-2); background: var(--bg-3); }
.league-pick-btn .caret { color: var(--text-3); font-size: 10px; }

.league-popover {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: 8px;
  width: 320px; max-height: 60vh; overflow-y: auto;
  z-index: 50; padding: 6px;
  box-shadow: var(--shadow-2);
}
.pop-group {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
  padding: 8px 10px 4px;
}
.pop-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: transparent; border: none; color: var(--text-1);
  padding: 7px 10px; border-radius: 5px;
  text-align: left; font-size: 13px;
}
.pop-item:hover { background: var(--bg-3); }
.pop-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pop-flag { font-size: 14px; line-height: 1; flex: 0 0 auto; }
.pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-count { font-family: var(--mono); font-size: 11px; color: var(--text-3); }

/* ── View container ──────────────────────────────────────────────── */
.view { padding: 16px; max-width: 1640px; margin: 0 auto; }
.view-header { margin-bottom: 14px; }
.view-title {
  margin: 0 0 2px; font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  color: var(--text-1);
  display: flex; align-items: baseline; gap: 8px;
}
.view-title-count {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--text-3); letter-spacing: 0;
}
.view-sub { margin: 0; font-size: 12px; color: var(--text-2); }
.loader { padding: 60px; text-align: center; color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.empty { padding: 40px; text-align: center; color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.error { padding: 40px; text-align: center; color: var(--down); font-family: var(--mono); font-size: 12px; }

/* ── Picks · "Opportunities" terminal table ─────────────────────── */
.picks-wrap {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

/* Section headers inside the table (e.g. "Arbs · 8") */
.picks-section {
  background: var(--bg-3);
  border-top: 1px solid var(--line-1);
  padding: 6px 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.picks-section .picks-section-hint { color: var(--text-3); font-weight: 400; letter-spacing: .04em; }
.picks-section:first-child { border-top: none; }
.picks-section b { color: var(--text-1); font-weight: 600; }
.picks-section--up b { color: var(--up); }

/* Opportunity row — fully tabular */
.opp-row {
  display: grid;
  grid-template-columns:
    64px        /* time */
    minmax(120px, 1fr)  /* league */
    minmax(200px, 2fr)   /* match */
    130px       /* market + pick */
    100px       /* best price */
    72px        /* fair */
    72px        /* edge */
    140px;      /* action */
  gap: 10px;
  padding: 9px 12px;
  align-items: center;
  border-top: 1px solid var(--line-1);
  font-size: 12px;
  cursor: pointer;
  transition: background-color .12s ease;
  text-decoration: none; color: inherit;
}
.opp-row:first-of-type { border-top: none; }
.opp-row:hover { background: var(--bg-3); }
.opp-row.is-arb { box-shadow: inset 3px 0 0 0 var(--up); }
.opp-row.is-arb:hover { background: var(--bg-3); }

.opp-time {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-2);
  display: flex; flex-direction: column; gap: 1px;
}
.opp-time-day { color: var(--text-3); font-size: 10px; }
.opp-league {
  font-size: 11px; color: var(--text-2);
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opp-league-flag { font-size: 12px; flex: 0 0 auto; }
.opp-match {
  font-size: 13px; font-weight: 500; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opp-pick {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.opp-pick-side { font-size: 12px; font-weight: 600; color: var(--text-1); }
.opp-pick-market {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-3); letter-spacing: .04em;
  text-transform: uppercase;
}
.opp-price {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  color: var(--text-1);
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.opp-price-book {
  font-size: 9px; font-weight: 500; color: var(--text-2);
  text-transform: uppercase; letter-spacing: .04em;
}
.opp-fair {
  font-family: var(--mono); font-size: 12px;
  color: var(--text-3);
  text-align: right;
}
.opp-edge {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--up); text-align: right;
}
.opp-edge--zero { color: var(--text-3); font-weight: 500; }
.opp-action {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); color: var(--text-1);
  border: 1px solid var(--line-2); border-radius: 5px;
  padding: 6px 8px; font-size: 11px; font-weight: 600;
  text-decoration: none; gap: 4px;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.opp-row.is-arb .opp-action { color: var(--up); border-color: var(--up); background: transparent; }
.opp-row.is-arb .opp-action:hover { background: var(--up); color: #04140b; border-color: var(--up); }
.opp-action:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

/* Arb row · two legs shown stacked under the main row, indented */
.opp-arb-legs {
  grid-column: 3 / -1;
  display: flex; flex-wrap: wrap; gap: 16px;
  padding: 4px 0 0;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-2);
}
.opp-arb-leg {
  display: inline-flex; align-items: center; gap: 6px;
}
.opp-arb-leg-side { color: var(--text-3); text-transform: uppercase; font-size: 10px; letter-spacing: .04em; }
.opp-arb-leg-book { color: var(--text-1); font-weight: 600; }
.opp-arb-leg-price { color: var(--text-1); font-weight: 600; }

/* Cell flash (animation on price tick) */
@keyframes flash-up   { 0% { background: var(--up-soft); }   100% { background: transparent; } }
@keyframes flash-down { 0% { background: var(--down-soft); } 100% { background: transparent; } }
.flash-up   { animation: flash-up   .8s ease-out; }
.flash-down { animation: flash-down .8s ease-out; }

/* ── Fixtures matrix ─────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr 300px;
  gap: 0;
  max-width: 1640px;
  margin: 0 auto;
  min-height: calc(100vh - 110px);
}
.left-rail {
  border-right: 1px solid var(--line-1);
  padding: 14px 12px;
  background: var(--bg-1);
  overflow-y: auto; max-height: calc(100vh - 110px);
  position: sticky; top: 100px;
}
.left-rail h3 {
  margin: 0 0 8px; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); font-family: var(--mono);
  font-weight: 600;
}
.league-tree { list-style: none; margin: 0; padding: 0; }
.league-tree-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 4px; cursor: pointer;
  font-size: 12px; color: var(--text-2);
}
.league-tree-item:hover { background: var(--bg-3); color: var(--text-1); }
.league-tree-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lt-flag { font-size: 13px; flex: 0 0 auto; }
.lt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-count { font-family: var(--mono); font-size: 10px; color: var(--text-3); }

.board { padding: 0; min-width: 0; background: var(--bg-0); }
.flagstrip { display: none; }
.rows { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

/* Matrix help · single-line */
.matrix-help {
  margin: 12px 12px 0;
  padding: 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 6px;
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; color: var(--text-2);
}
.matrix-help b { color: var(--text-1); }
.mh-key {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 3px;
}
.mh-key--best { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }

.row {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 6px;
  overflow: hidden;
}
.row.live { border-color: var(--down); }
.row-h {
  display: grid;
  grid-template-columns: 110px 1fr auto 32px;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-1);
}
.row-meta { display: flex; flex-direction: column; gap: 2px; }
.kickoff { font-family: var(--mono); font-size: 11px; color: var(--text-1); font-weight: 600; }
.row-league { font-family: var(--mono); font-size: 10px; color: var(--text-3); }
.team-block { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.teams { font-weight: 600; font-size: 13px; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.row-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-bestof {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--text-3);
  letter-spacing: .02em;
}
.payout { font-family: var(--mono); font-size: 10px; color: var(--text-3); }
.row.live .kickoff::after {
  content: 'LIVE'; display: inline-block; margin-left: 6px;
  background: var(--down); color: #fff; padding: 1px 5px; border-radius: 2px;
  font-size: 9px; letter-spacing: .08em; font-weight: 700;
}
.flags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.flag {
  font-family: var(--mono); font-size: 9px; letter-spacing: .06em; font-weight: 600;
  padding: 2px 6px; border-radius: 3px;
  text-transform: uppercase;
}
.flag--good { color: var(--up);   background: var(--up-soft); }
.flag--warn { color: var(--warn); background: var(--warn-soft); }
.flag--bad  { color: var(--down); background: var(--down-soft); }
.flag--neutral { color: var(--accent); background: var(--accent-soft); }
.flag--money { color: var(--warn); background: var(--warn-soft); }

.expand {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--line-1); border-radius: 4px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.expand:hover { color: var(--text-1); border-color: var(--line-2); background: var(--bg-3); }

/* Price grid */
.prices { padding: 8px 12px; }
.no-prices { color: var(--text-3); font-size: 11px; text-align: center; padding: 16px; font-family: var(--mono); }
.pgrid-head, .pgrid-row {
  display: grid;
  grid-template-columns: 110px repeat(var(--cols, 3), 1fr) 56px;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
}
.pgrid-head {
  border-bottom: 1px solid var(--line-1);
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3);
  padding: 6px 0;
}
.pgrid-bookhead, .pgrid-payouthead { padding-left: 6px; }
.pgrid-out {
  text-align: right; padding-right: 6px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  min-width: 0;
}
.pgo-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  font-weight: 700; color: var(--text-2);
}
.pgo-sub {
  font-family: var(--sans-body); font-size: 10px; font-weight: 500;
  color: var(--text-3); letter-spacing: 0;
  text-transform: none; line-height: 1.2;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Suggested pick strip above the price grid */
.pgrid-suggest {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 10px;
  margin: 0 0 8px;
  border-radius: 6px;
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  font-size: 12px;
  color: var(--text-1);
}
.pgrid-suggest--pos {
  background: var(--up-soft);
  border-color: color-mix(in oklab, var(--up) 35%, transparent);
}
.pgs-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .1em;
  padding: 2px 6px; border-radius: 3px;
  background: var(--text-1); color: var(--bg-1);
}
.pgrid-suggest--pos .pgs-tag { background: var(--up); color: #04140b; }
.pgs-side { font-weight: 700; color: var(--text-1); }
.pgs-price {
  font-family: var(--mono); font-weight: 700; color: var(--text-1);
  padding: 2px 6px; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.pgs-book { font-size: 11px; color: var(--text-2); }
.pgs-edge {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--text-2);
}
.pgrid-suggest--pos .pgs-edge { color: var(--up); }
.pgs-note {
  flex: 1 1 100%;
  font-size: 11px; color: var(--text-2); line-height: 1.4;
}
@media (max-width: 720px) {
  .pgrid-suggest { gap: 4px 8px; padding: 7px 8px; font-size: 11px; }
  .pgs-price { font-size: 12px; }
  .pgs-book { font-size: 10px; }
}

.pgrid-row {
  border-radius: 4px; transition: background-color .12s ease;
}
.pgrid-row:hover { background: var(--bg-3); }

.pgrid-book {
  padding-left: 6px; min-width: 0;
}
.pgrid-book svg { height: 18px; width: auto; max-width: 90px; }
.pgrid-book a { display: inline-block; }
.pgrid-cell { text-align: right; padding-right: 6px; }
.px {
  display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--text-1); padding: 3px 8px; border-radius: 3px;
  background: transparent; min-width: 52px; text-align: right;
}
.px--best {
  color: var(--accent); font-weight: 700;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.px--na { color: var(--text-3); }
.pgrid-payout { font-family: var(--mono); font-size: 11px; color: var(--text-3); text-align: right; padding-right: 6px; }

/* Drawer / fair line */
.drawer { display: none; padding: 12px; background: var(--bg-3); border-top: 1px solid var(--line-1); }
.row.open .drawer { display: block; }
.drawer-fair h4 { margin: 0 0 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-family: var(--mono); font-weight: 600; }
.fair-bars { display: flex; flex-direction: column; gap: 6px; }
.fair-bar { display: grid; grid-template-columns: 90px 1fr 60px; gap: 10px; align-items: center; }
.fair-bar-lbl { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.fair-bar-track { height: 6px; background: var(--bg-1); border-radius: 3px; overflow: hidden; border: 1px solid var(--line-1); }
.fair-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.fair-bar-pct { font-family: var(--mono); font-size: 11px; color: var(--text-2); text-align: right; }

/* Sidebar / alerts */
.sidebar {
  border-left: 1px solid var(--line-1);
  padding: 14px 12px;
  background: var(--bg-1);
  position: sticky; top: 100px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.sidebar-handle { display: none; }
.sidebar h3 {
  margin: 0 0 10px; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  font-family: var(--mono); font-weight: 600;
}
.alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; max-height: 60vh; overflow-y: auto; }
.alert {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 7px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 5px;
}
.alert:hover { border-color: var(--line-2); background: var(--bg-3); }
.alert-pill {
  flex: 0 0 auto; font-family: var(--mono); font-size: 9px; letter-spacing: .06em; font-weight: 700;
  padding: 2px 5px; border-radius: 3px; text-transform: uppercase;
}
.alert--good .alert-pill    { color: var(--up);     background: var(--up-soft); }
.alert--warn .alert-pill    { color: var(--warn);   background: var(--warn-soft); }
.alert--bad .alert-pill     { color: var(--down);   background: var(--down-soft); }
.alert--money .alert-pill   { color: var(--warn);   background: var(--warn-soft); }
.alert--neutral .alert-pill { color: var(--accent); background: var(--accent-soft); }
.alert-body { min-width: 0; flex: 1; }
.alert-match { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.alert-detail { font-family: var(--mono); font-size: 10px; color: var(--text-2); margin-top: 2px; }
.alert-empty { color: var(--text-3); font-family: var(--mono); font-size: 11px; padding: 16px; text-align: center; }

.legend-wrap { margin-top: 14px; border-top: 1px solid var(--line-1); padding-top: 10px; }
.legend-wrap summary { cursor: pointer; font-size: 11px; color: var(--text-2); padding: 4px 0; }
.legend { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; font-size: 11px; color: var(--text-2); }
.legend-item { display: flex; gap: 10px; align-items: flex-start; }
.legend-item b { color: var(--text-1); }

/* Filter row */
.filter-row { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: thin; margin-bottom: 8px; }
.filter-row button { flex: 0 0 auto; padding: 5px 9px; font-size: 11px; min-height: 28px; }

/* ── Movers (kept simple — same row pattern as opportunities) ───── */
.movers-wrap {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.mover-row {
  display: grid;
  grid-template-columns: 36px 72px minmax(160px, 1.2fr) minmax(220px, 2fr) 140px 1fr 80px;
  gap: 10px;
  padding: 9px 12px;
  align-items: center;
  border-top: 1px solid var(--line-1);
  font-size: 12px;
}
.mover-row:first-child { border-top: none; }
.mover-row:hover { background: var(--bg-3); }
.mover-arrow {
  width: 28px; height: 28px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 800; font-size: 14px;
  background: var(--bg-3); color: var(--text-3);
}
.mover-row.steam .mover-arrow { background: var(--down-soft); color: var(--down); }
.mover-row.drift .mover-arrow { background: var(--accent-soft); color: var(--accent); }
.mover-time { font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.mover-league { font-size: 11px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-match { font-size: 13px; font-weight: 500; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-pick { font-size: 12px; color: var(--text-2); }
.mover-pick b { color: var(--text-1); font-weight: 600; }
.mover-prices { display: flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 12px; }
.mover-from { color: var(--text-3); text-decoration: line-through; }
.mover-arrow-mid { color: var(--text-3); }
.mover-to { color: var(--text-1); font-weight: 700; }
.mover-delta { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; text-align: right; }
.mover-row.steam .mover-delta { color: var(--down); background: var(--down-soft); }
.mover-row.drift .mover-delta { color: var(--accent); background: var(--accent-soft); }

/* ── Mobile bottom tab bar ───────────────────────────────────────── */
.tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-1); border-top: 1px solid var(--line-1);
  padding: 4px 0 var(--safe-bottom);
  z-index: 40;
}
.tabbar button {
  flex: 1; background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0; color: var(--text-3);
  font-size: 10px; font-weight: 500; position: relative;
}
.tabbar button.active { color: var(--accent); }
.tabbar button .tab-count {
  position: absolute; top: 4px; right: 30%;
  background: var(--down); color: #fff;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; min-width: 16px;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.bottom {
  padding: 16px 16px 28px;
  border-top: 1px solid var(--line-1);
  font-size: 11px; color: var(--text-3);
  display: flex; flex-direction: column; gap: 4px; text-align: center;
}
.bottom-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ──────────────────────────────────────────────────────────────── */
/*  Responsive                                                      */
/* ──────────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 1fr 280px; }
  .left-rail { display: none; }
}

@media (max-width: 980px) {
  /* Opportunities table → drop fair + edge-only column to save space */
  .opp-row {
    grid-template-columns:
      72px            /* time */
      minmax(0, 2fr)  /* match */
      120px           /* market + pick */
      90px            /* best price */
      70px            /* edge */
      80px;           /* action */
  }
  .opp-league { display: none; }
  .opp-fair { display: none; }
}

@media (max-width: 880px) {
  .topbar-row--main { flex-wrap: wrap; gap: 8px; }
  .primary-tabs { order: 3; flex: 1 0 100%; margin: 4px 0 0; border-top: 1px solid var(--line-1); padding-top: 4px; }
  .primary-tabs button { flex: 1; padding: 8px; }
  .menu-btn { display: flex; }
  .topbar-row--controls { display: none; flex-wrap: wrap; }
  .topbar-row--controls.open { display: flex; }
  .topbar-meta #bookCount { display: none; }
  .topbar-meta { font-size: 10px; gap: 6px; }

  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 56px; left: 0; right: 0; top: auto;
    max-height: 50vh;
    border-left: none; border-top: 1px solid var(--line-2);
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    transition: transform .22s ease;
    z-index: 35;
    box-shadow: var(--shadow-2);
  }
  body[data-tab="alerts"] .sidebar { transform: translateY(0); }
  .sidebar-handle {
    display: block; width: 36px; height: 3px; background: var(--line-2);
    border-radius: 2px; margin: 4px auto 8px;
  }

  .tabbar { display: flex; }
  .pgrid-head, .pgrid-row {
    grid-template-columns: 70px repeat(var(--cols, 3), 1fr) 40px;
    gap: 3px;
  }
  .pgrid-book svg { height: 14px; max-width: 64px; }
  .px { font-size: 11px; padding: 2px 5px; min-width: 42px; }
  .pgrid-out { font-size: 10px; }

  .row-h { grid-template-columns: 72px 1fr auto 26px; gap: 6px; padding: 9px 10px; }
  .kickoff { font-size: 10px; }
  .teams { font-size: 12px; }

  /* Opportunity table on mobile · two-line cards */
  .picks-wrap { border-radius: 6px; }
  .opp-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    grid-template-areas:
      "time   edge"
      "match  edge"
      "pick   action";
    padding: 10px 12px;
    align-items: center;
  }
  .opp-time   { grid-area: time;  flex-direction: row; gap: 6px; align-items: baseline; }
  .opp-time-day { font-size: 10px; }
  .opp-match  { grid-area: match; font-size: 13px; }
  .opp-pick   { grid-area: pick;  flex-direction: row; gap: 8px; align-items: baseline; }
  .opp-pick-side   { font-size: 12px; }
  .opp-pick-market { font-size: 10px; }
  .opp-price  { display: none; }     /* price merged into pick on mobile */
  .opp-edge   { grid-area: edge;  font-size: 12px; align-self: start; }
  .opp-action { grid-area: action; padding: 5px 8px; font-size: 11px; }
  .opp-row.is-arb {
    background: var(--bg-1);
    border-left: 3px solid var(--up);
  }
  .opp-row.is-arb .opp-arb-legs {
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px dashed var(--line-1);
    margin-top: 4px;
    font-size: 10px;
    gap: 10px;
  }

  .matrix-help { margin: 8px; padding: 8px 10px; flex-wrap: wrap; gap: 8px; font-size: 10px; }
  .mh-key { font-size: 10px; padding: 2px 6px; }

  .mover-row {
    grid-template-columns: 28px 60px 1fr auto;
    grid-template-areas:
      "ar time match  delta"
      "ar lg   prices delta";
    padding: 9px 10px;
    gap: 4px 8px;
  }
  .mover-arrow { grid-area: ar; }
  .mover-time { grid-area: time; }
  .mover-league { grid-area: lg; font-size: 10px; }
  .mover-match { grid-area: match; }
  .mover-pick { display: none; }
  .mover-prices { grid-area: prices; font-size: 11px; }
  .mover-delta { grid-area: delta; }

  .view { padding: 10px; }
  .view-title { font-size: 14px; }
  .view-sub { font-size: 11px; }

  .statusbar-inner { padding: 5px 12px; gap: 10px; font-size: 10px; }
  .statusbar .sb-mobile-hide { display: none; }
  .picks-section-hint { display: none; }
}

@media (max-width: 480px) {
  .topbar-row { padding: 6px 12px; }
  .logo-text { font-size: 13px; }
  .badge { font-size: 9px; padding: 1px 5px; }
  .topbar-meta #updated { display: none; }

  .opp-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "match  edge"
      "pick   action"
      "time   action";
    padding: 9px 10px;
  }
  .opp-time   { font-size: 10px; }
  .opp-match  { font-size: 13px; font-weight: 600; }
  .opp-pick-side { font-size: 12px; }
  .opp-edge { font-size: 13px; }
}

/* ================================================================== */
/*  NEW COMPONENTS · match pages, explainers, calculators, books      */
/* ================================================================== */

/* ── SEO outlet · long-form mode toggle ─────────────────────────── */
.seo-outlet { display: none; }
body.seo-mode .seo-outlet { display: block; }
body.seo-mode .views,
body.seo-mode .opps,
body.seo-mode .three-col,
body.seo-mode .bottom { display: none; }
.seo-loading {
  padding: 60px 16px; text-align: center;
  color: var(--text-2); font-size: 14px;
}

/* ── Mega-nav (top-bar dropdowns) ───────────────────────────────── */
.mega-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: 12px;
}
.mega-item { position: relative; }
.mega-trigger {
  background: transparent; border: 1px solid transparent;
  color: var(--text-2); padding: 5px 10px;
  font-size: 12px; font-weight: 500;
  border-radius: 4px; line-height: 1;
  white-space: nowrap;
  transition: background-color .12s, color .12s, border-color .12s;
}
.mega-trigger:hover,
.mega-item.open > .mega-trigger {
  background: var(--bg-3); color: var(--text-1);
  border-color: var(--line-1);
}
.mega-trigger[aria-expanded="true"] { background: var(--bg-3); color: var(--text-1); }
.mega-panel {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-2); border: 1px solid var(--line-1);
  border-radius: 8px; box-shadow: var(--shadow-2);
  padding: 8px; min-width: 220px; z-index: 50;
  display: none;
}
.mega-item.open > .mega-panel { display: block; }
.mega-panel a {
  display: block; padding: 7px 10px;
  font-size: 12px; color: var(--text-1);
  border-radius: 4px; text-decoration: none;
}
.mega-panel a:hover { background: var(--bg-3); text-decoration: none; }
.mega-panel .mega-all {
  display: block; margin-top: 6px;
  padding: 7px 10px; border-top: 1px solid var(--line-1);
  font-size: 11px; color: var(--accent); font-weight: 600;
}
@media (max-width: 900px) {
  .mega-nav { display: none; }
}

/* ── Row-level summary lines (picks, movers, fixtures) ──────────── */
/* The parents (.opp-match, .teams, .mover-match) use white-space: nowrap +
   ellipsis to keep team names on one line. We override here so the secondary
   summary line is allowed to wrap to 2 lines and ellipsis after that —
   otherwise long context sentences get hard-clipped at the row's right edge. */
.opp-summary,
.row-summary,
.mover-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  font-family: var(--sans-body);
  font-variant-numeric: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  .opp-summary, .row-summary, .mover-summary {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

/* fixture team-name link */
.teams-link {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 600;
}
.teams-link:hover { color: var(--accent); text-decoration: none; }

/* ──────────────────────────────────────────────────────────────── */
/*  MATCH PAGE                                                      */
/* ──────────────────────────────────────────────────────────────── */
.mp-page {
  max-width: 980px; margin: 0 auto;
  padding: 16px 16px 96px;
  font-family: var(--sans-body);
  color: var(--text-1);
}
.mp-breadcrumb {
  font-size: 11px; color: var(--text-3);
  margin-bottom: 12px;
  font-family: var(--sans);
}
.mp-breadcrumb a { color: var(--text-2); }
.mp-breadcrumb a:hover { color: var(--accent); }

.mp-head {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
}
.mp-title {
  font-family: var(--sans);
  font-size: 28px; font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 6px;
  color: var(--text-1);
  line-height: 1.18;
}
@media (max-width: 640px) {
  .mp-head { padding: 16px 16px; border-radius: 10px; }
  .mp-title { font-size: 22px; }
}
.mp-vs { color: var(--text-3); font-weight: 500; margin: 0 6px; }
.mp-meta {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  font-size: 12px; color: var(--text-2);
  font-family: var(--sans);
  margin-bottom: 12px;
}
.mp-league { font-weight: 600; color: var(--text-1); }
.mp-live-badge {
  background: var(--down-soft); color: var(--down);
  padding: 2px 6px; border-radius: 3px;
  font-family: var(--mono); font-size: 10px;
  font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
}
.mp-kick, .mp-venue { color: var(--text-2); }
.mp-summary {
  margin: 12px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 68ch;
}

/* "Why this match" aside */
.mp-why {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 8px;
}
.mp-why h2 {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2);
  margin: 0 0 8px;
}
.mp-why ul {
  margin: 0; padding-left: 18px;
  font-size: 14px; line-height: 1.55;
  color: var(--text-1);
}
.mp-why li { margin-bottom: 4px; }

/* Polymarket fair-line strip */
.mp-poly {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin: 16px 0;
  padding: 12px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 8px;
}
.mp-poly-label {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent);
}
.mp-poly-prob {
  font-family: var(--mono);
  font-size: 13px; font-weight: 600;
  color: var(--text-1);
}

/* Odds table */
.mp-odds { margin: 22px 0; }
.mp-odds-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.mp-odds-head h2 {
  font-family: var(--sans);
  font-size: 16px; font-weight: 700;
  margin: 0; color: var(--text-1);
}
#mpMarketPills {
  display: flex; gap: 4px; flex-wrap: wrap;
}
#mpMarketPills button {
  background: var(--bg-2); border: 1px solid var(--line-1);
  color: var(--text-2);
  padding: 5px 10px; font-size: 11px; font-weight: 500;
  border-radius: 4px;
  font-family: var(--sans);
}
#mpMarketPills button:hover { background: var(--bg-3); color: var(--text-1); }
#mpMarketPills button[aria-pressed="true"],
#mpMarketPills button.active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}

.mp-odds-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 8px; overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
}
.mp-odds-table th,
.mp-odds-table td {
  padding: 9px 10px;
  text-align: right;
  border-bottom: 1px solid var(--line-1);
}
.mp-odds-table th {
  background: var(--bg-1);
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2);
}
.mp-odds-table tr:last-child td { border-bottom: 0; }
.mp-odds-table tbody tr:hover { background: var(--bg-3); }
.mp-th-book {
  text-align: left !important;
  font-family: var(--sans) !important;
  font-weight: 600; color: var(--text-1) !important;
  font-size: 12px !important; text-transform: none !important;
  letter-spacing: 0 !important;
}
.mp-best {
  background: var(--up-soft);
  color: var(--up);
  font-weight: 700;
}
/* Best-price cell + badge on the match detail page (Bet365 1.23, Poly 14.29, etc.) */
.mp-td-price { font-family: var(--mono); font-weight: 500; color: var(--text-1); }
.mp-td-price .mp-price { font-family: var(--mono); }
.mp-td-price.is-best {
  background: var(--up-soft);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--up) 45%, transparent);
}
.mp-td-price.is-best .mp-price {
  color: var(--up);
  font-weight: 700;
}
.mp-best-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-family: var(--sans);
  font-size: 10px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: #04140b;
  background: var(--up);
  border-radius: 3px;
  vertical-align: middle;
}
.mp-empty {
  padding: 24px 14px; text-align: center;
  color: var(--text-3); font-size: 13px;
  background: var(--bg-2); border: 1px solid var(--line-1);
  border-radius: 8px;
}

/* Title row + actions (Watch / Share) — P1 + P5a + P5c */
.mp-titlerow {
  display: flex; align-items: flex-start; gap: 12px;
  flex-wrap: wrap;
}
.mp-titlerow .mp-title { flex: 1 1 auto; margin: 0; }
.mp-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-self: flex-start;
  margin-top: 4px;
}
.mp-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  background: var(--bg-2); color: var(--text-2);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.mp-action:hover { background: var(--bg-3, var(--bg-2)); color: var(--text-1); border-color: var(--line-2, var(--line-1)); }
.mp-action svg { display: block; }
.mp-action.is-watched {
  background: rgba(36, 184, 99, 0.12);
  color: var(--up);
  border-color: rgba(36, 184, 99, 0.4);
}
.mp-action.is-watched svg { fill: currentColor; }
.mp-action.is-flash {
  background: rgba(36, 184, 99, 0.12);
  color: var(--up);
  border-color: rgba(36, 184, 99, 0.4);
}
@media (max-width: 600px) {
  .mp-action-label { display: none; }
  .mp-action { padding: 8px; }
}

/* Value verdict — P1 plain-English 'why this side' line */
.mp-verdict {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-1);
  border-radius: 10px;
  background: var(--bg-2);
}
.mp-verdict--pos {
  border-color: rgba(36, 184, 99, 0.45);
  background: rgba(36, 184, 99, 0.06);
}
.mp-verdict-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.mp-verdict-tag {
  font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3);
}
.mp-verdict--pos .mp-verdict-tag { color: var(--up); }
.mp-verdict-edge {
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  color: var(--up);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(36, 184, 99, 0.12);
}
.mp-verdict-line {
  font-size: 14px; line-height: 1.5;
  color: var(--text-1);
  margin: 0;
}
.mp-verdict-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  padding: 8px 14px;
  background: var(--up); color: #04140b;
  border: none; border-radius: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  text-decoration: none;
}
.mp-verdict-cta:hover { filter: brightness(1.05); text-decoration: none; }
.mp-verdict-note {
  margin-top: 8px;
  font-size: 11px; color: var(--text-3);
}

/* Where-to-bet strip — appears above each market table */
.mp-where {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 8px;
}
.mp-where-text {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 13px;
  color: var(--text-2);
}
.mp-where-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3);
}
.mp-where-side { color: var(--text-1); font-weight: 600; }
.mp-where-price {
  font-family: var(--mono);
  color: var(--up); font-weight: 700;
}
.mp-where-book { color: var(--text-3); }
.mp-where-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--cta);
  color: var(--cta-text);
  border: 1px solid var(--cta-hover);
  border-radius: 6px;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--cta-shadow);
  transition: background-color .12s ease, transform .12s ease;
}
.mp-where-cta:hover { background: var(--cta-hover); color: var(--cta-text); text-decoration: none; transform: translateY(-1px); }
.mp-where-cta:active { transform: translateY(0); }
.mp-where-cta .book-logo,
.mp-where-cta img.book-logo {
  height: 20px; width: 20px;
  object-fit: contain;
  filter: brightness(0) saturate(100%); /* logos render dark on the orange */
  opacity: .88;
  display: inline-block;
  flex: 0 0 auto;
}

/* ── Bookmaker CTA — reusable button for any "go to bookmaker" exit ── */
.book-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px;
  background: var(--cta); color: var(--cta-text);
  border: 1px solid var(--cta-hover);
  border-radius: 6px;
  font-family: var(--sans); font-size: 13px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  box-shadow: var(--cta-shadow);
  transition: background-color .12s ease, transform .12s ease;
  min-height: 36px;
}
.book-cta:hover { background: var(--cta-hover); color: var(--cta-text); text-decoration: none; transform: translateY(-1px); text-decoration: none; }
.book-cta:active { transform: translateY(0); }
.book-cta .book-logo {
  /* On orange CTA: render mark inside a fixed mini tile so every book looks identical. */
  height: 20px; width: 20px;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
  opacity: .88;
  display: inline-block;
  flex: 0 0 auto;
}
.book-cta .book-cta-arrow { opacity: .65; font-weight: 600; }
.book-cta--lg { padding: 11px 18px; font-size: 14px; min-height: 42px; }
.book-cta--sm { padding: 6px 10px; font-size: 12px; min-height: 30px; }

/* Brand-logo chip used in the 10-book grid "Book" column */
.book-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--text-1);
}
.book-chip .book-logo {
  /* Fixed 24x24 swatch so every chip aligns in tables/grids. */
  height: 24px; width: 24px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}
.book-chip .book-name { line-height: 1; }
[data-theme="dark"] .book-chip .book-logo { filter: none; }
[data-theme="light"] .book-chip .book-logo { filter: none; }
.mp-odds-note {
  margin-top: 8px;
  font-size: 11px; color: var(--text-3);
  font-family: var(--sans);
}

/* Form & league context — NWG "Quick Facts" two-card pattern.
   Sits high on the match page so form is visible without scrolling. */
.mp-context { margin: 18px 0 22px; }
.mp-context-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px;
}
.mp-context-head h2 {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-2);
  margin: 0;
}
.mp-context-sub {
  font-family: var(--sans);
  font-size: 11px; color: var(--text-3);
  letter-spacing: .02em;
}
.mp-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mp-team-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
  transition: border-color .12s ease, transform .12s ease;
}
.mp-team-card:hover { border-color: var(--line-2); }
.mp-team-card-head {
  font-family: var(--sans);
  font-weight: 700; font-size: 15px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-1);
  color: var(--text-1);
  letter-spacing: -.005em;
}
.mp-team-card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
  font-family: var(--sans);
  min-height: 28px;
}
.mp-team-card-row + .mp-team-card-row { border-top: 1px dashed var(--line-1); }
.mp-team-card-row > span:first-child {
  color: var(--text-3);
  font-size: 12px; font-weight: 500;
  letter-spacing: .01em;
}
.mp-team-card-row > b {
  color: var(--text-1); font-weight: 600;
  font-family: var(--mono); font-size: 13px;
}
.mp-team-card-row .mp-tcr-em {
  color: var(--text-3); font-style: normal; font-weight: 400;
  font-family: var(--sans); font-size: 11px;
  margin-left: 4px;
}
.mp-team-card-row--form { padding: 8px 0; }

/* Form pills — visible W/D/L badges, right-aligned. */
.mp-form {
  display: inline-flex; gap: 4px;
}
.mp-form-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  border-radius: 5px;
  color: #fff;
  letter-spacing: 0;
  box-shadow: 0 1px 0 rgba(0,0,0,.18) inset;
}
.mp-form-pill.mp-form-W { background: var(--up); }
.mp-form-pill.mp-form-D { background: #d97706; }   /* amber — reads as a third category, neither win nor loss */
.mp-form-pill.mp-form-L { background: var(--down); }
[data-theme="light"] .mp-form-pill.mp-form-D { background: #f59e0b; }

/* Legacy selectors kept as fallback for any older render path. */
.mp-form span:not(.mp-form-pill) {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  border-radius: 5px; color: #fff;
}
.mp-form-W { background: var(--up); }
.mp-form-D { background: #d97706; }
.mp-form-L { background: var(--down); }

/* FAQ */
.mp-faq, .lf-faq { margin: 24px 0; }
.mp-faq h2, .lf-faq h2 {
  font-family: var(--sans);
  font-size: 16px; font-weight: 700;
  margin: 0 0 12px;
}
.mp-faq-list { display: flex; flex-direction: column; gap: 6px; }
.mp-faq-item, .lf-faq-item {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 6px;
  padding: 10px 14px;
}
.mp-faq-item summary, .lf-faq-item summary {
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600; font-size: 14px;
  color: var(--text-1);
  list-style: none;
}
.mp-faq-item summary::-webkit-details-marker,
.lf-faq-item summary::-webkit-details-marker { display: none; }
.mp-faq-item summary::after,
.lf-faq-item summary::after {
  content: '+'; float: right;
  color: var(--text-3); font-weight: 400;
}
.mp-faq-item[open] summary::after,
.lf-faq-item[open] summary::after { content: '−'; }
.mp-faq-item p, .lf-faq-item p {
  margin: 8px 0 0;
  font-size: 14px; line-height: 1.6;
  color: var(--text-2);
  max-width: 65ch;
}

/* Related matches */
.mp-related { margin: 24px 0; }
.mp-related h2 {
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2);
  margin: 0 0 10px;
}
.mp-related ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.mp-related a {
  display: block; padding: 8px 12px;
  background: var(--bg-2); border: 1px solid var(--line-1);
  border-radius: 6px;
  font-size: 13px; color: var(--text-1);
  text-decoration: none;
}
.mp-related a:hover { background: var(--bg-3); border-color: var(--accent); text-decoration: none; }

/* Sticky CTA (mobile) */
.mp-sticky-cta {
  display: none;
  position: fixed; left: 0; right: 0;
  bottom: var(--safe-bottom);
  background: var(--bg-2);
  border-top: 1px solid var(--line-1);
  padding: 10px 14px;
  z-index: 40;
  box-shadow: 0 -4px 12px rgba(0,0,0,.08);
}
.mp-sticky-cta a {
  display: block; text-align: center;
  background: var(--cta); color: var(--cta-text);
  border: 1px solid var(--cta-hover);
  padding: 12px 14px;
  border-radius: 6px;
  box-shadow: var(--cta-shadow);
  font-family: var(--sans);
  font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.mp-sticky-cta a:hover { background: var(--cta-hover); color: var(--cta-text); text-decoration: none; }
@media (max-width: 720px) {
  .mp-sticky-cta { display: block; }
  .mp-page { padding-bottom: 96px; }
}

/* Soft-410 (expired) state */
.mp-page--gone { opacity: .8; }
.mp-page--gone .mp-head {
  border-color: var(--down);
}
.mp-page--gone .mp-summary {
  border-left-color: var(--down);
  background: var(--down-soft);
}

/* ──────────────────────────────────────────────────────────────── */
/*  LONG-FORM / EXPLAINER                                           */
/* ──────────────────────────────────────────────────────────────── */
.lf-article {
  max-width: 720px; margin: 0 auto;
  padding: 20px 16px 80px;
  font-family: var(--sans-body);
  color: var(--text-1);
}
.lf-breadcrumb {
  font-family: var(--sans);
  font-size: 11px; color: var(--text-3);
  margin-bottom: 16px;
}
.lf-breadcrumb a { color: var(--text-2); }
.lf-head { margin-bottom: 24px; }
.lf-head h1 {
  font-family: var(--sans);
  font-size: 28px; font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--text-1);
}
.lf-lede {
  font-size: 17px; line-height: 1.55;
  color: var(--text-2);
  margin: 0;
  max-width: 65ch;
}
.lf-tldr {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 24px 0;
}
.lf-tldr h2 {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
  margin: 0 0 6px;
}
.lf-tldr p, .lf-tldr ul {
  margin: 0; font-size: 15px; line-height: 1.55;
  color: var(--text-1);
}
.lf-toc {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 20px 0;
}
.lf-toc h2 {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2);
  margin: 0 0 8px;
}
.lf-toc ol {
  margin: 0; padding-left: 22px;
  font-family: var(--sans);
  font-size: 13px; line-height: 1.7;
}
.lf-toc a { color: var(--text-1); }
.lf-toc a:hover { color: var(--accent); }

.lf-section {
  margin: 28px 0;
  max-width: 65ch;
}
.lf-section h2 {
  font-family: var(--sans);
  font-size: 20px; font-weight: 700;
  letter-spacing: -.005em;
  margin: 0 0 10px;
  color: var(--text-1);
}
.lf-section h3 {
  font-family: var(--sans);
  font-size: 16px; font-weight: 600;
  margin: 18px 0 6px;
  color: var(--text-1);
}
.lf-section p {
  font-size: 17px; line-height: 1.7;
  color: var(--text-1);
  margin: 0 0 14px;
}
.lf-section ul, .lf-section ol {
  font-size: 17px; line-height: 1.65;
  padding-left: 22px;
  margin: 0 0 14px;
}
.lf-section li { margin-bottom: 6px; }
.lf-section a { color: var(--accent); text-decoration: underline; }
.lf-section a.tools-card,
.lf-section a.tools-card:hover { text-decoration: none; }
.lf-section a.tools-card h3,
.lf-section a.tools-card p { text-decoration: none; }

.lf-formula {
  background: var(--bg-3);
  border: 1px solid var(--line-1);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 14px 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-1);
  overflow-x: auto;
}

.lf-empty {
  padding: 60px 16px; text-align: center;
  color: var(--text-3);
}

/* ──────────────────────────────────────────────────────────────── */
/*  TOOLS / CALCULATORS                                             */
/* ──────────────────────────────────────────────────────────────── */
.tool-wrap {
  max-width: 720px; margin: 0 auto;
  padding: 20px 16px 80px;
  font-family: var(--sans-body);
}
.tool-wrap .lf-breadcrumb { margin-bottom: 16px; }
.tool-wrap h1 {
  font-family: var(--sans);
  font-size: 24px; font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 8px;
  color: var(--text-1);
}
.tool-wrap > p {
  font-size: 15px; color: var(--text-2);
  margin: 0 0 20px; line-height: 1.55;
  max-width: 65ch;
}
/* ── Calculator tool pages ──────────────────────────────────────────── */
.tool-page { max-width: 880px; margin: 0 auto; padding: 0 16px 64px; }
.tool-page .lf-head h1 { font-family: var(--sans); font-weight: 700; font-size: 28px; letter-spacing: -0.01em; margin: 4px 0 8px; color: var(--text-1); }
.tool-page .lf-lede { font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--text-2); margin: 0 0 20px; max-width: 65ch; }
.tool-page .lf-section { margin: 28px 0 0; }
.tool-page .lf-section h2 { font-family: var(--sans); font-size: 16px; font-weight: 700; color: var(--text-1); margin: 0 0 10px; letter-spacing: -0.005em; }
.tool-page .lf-section p,
.tool-page .lf-section li { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--text-1); max-width: 65ch; }
.tool-page .lf-section ol { padding-left: 20px; margin: 8px 0 0; }
.tool-page .lf-section ol li { margin-bottom: 6px; }
.tool-page .lf-faq { margin-top: 32px; }
.tool-page .lf-faq-item { border-top: 1px solid var(--line-1); padding: 12px 0; }
.tool-page .lf-faq-item summary { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--text-1); cursor: pointer; }
.tool-page .lf-faq-item p { font-family: var(--sans); font-size: 14px; color: var(--text-2); margin: 8px 0 0; }
.tool-page .lf-breadcrumb { font-family: var(--sans); font-size: 12px; color: var(--text-3); margin: 16px 0 4px; display: flex; gap: 6px; align-items: center; }
.tool-page .lf-breadcrumb a { color: var(--text-2); text-decoration: none; }
.tool-page .lf-breadcrumb a:hover { color: var(--accent); }
.tool-page .mp-related { margin-top: 28px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: 8px; }
.tool-page .mp-related h2 { margin: 0 0 8px; }
.tool-page .mp-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tool-page .mp-related a { font-family: var(--sans); font-size: 13px; padding: 6px 10px; border: 1px solid var(--line-1); border-radius: 999px; color: var(--text-1); text-decoration: none; background: var(--bg-1); }
.tool-page .mp-related a:hover { border-color: var(--accent); color: var(--accent); }

/* Form card — clean card with grid-laid label+input rows */
.tool-form-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 12px;
  padding: 20px;
  margin: 8px 0 0;
  box-shadow: var(--shadow-1, 0 1px 2px rgba(0,0,0,.04));
}
.tool-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
  align-items: end;
}
.tool-form--grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tool-form--grid4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tool-form > label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.tool-form > label input,
.tool-form > label select,
.tool-form input[type="number"],
.tool-form input[type="text"],
.tool-form select {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  text-transform: none;
  letter-spacing: 0;
}
.tool-form input:focus,
.tool-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(59,130,246,.15));
}
.tool-btn {
  background: var(--cta, #FF9900);
  color: #1a1a1a;
  border: 1px solid var(--cta, #FF9900);
  padding: 11px 18px;
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: filter .12s, transform .04s;
  white-space: nowrap;
  align-self: end;
  height: 42px;
}
.tool-btn:hover { filter: brightness(1.06); }
.tool-btn:active { transform: translateY(1px); }
.tool-btn--ghost {
  background: var(--bg-1);
  color: var(--text-1);
  border: 1px solid var(--line-2);
  font-weight: 600;
}
.tool-btn--ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.tool-btnrow {
  grid-column: 1 / -1;
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 4px;
}

/* Legacy compact form used in older calculators */
.tool-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tool-row:last-child { margin-bottom: 0; }
.tool-row label {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  min-width: 140px;
}
.tool-input {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  width: 160px;
  outline: none;
}
.tool-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, rgba(59,130,246,.15)); }

/* Result card — clear hierarchy with grid rows */
.tool-result { margin-top: 18px; }
.tool-result-card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-left: 4px solid var(--text-3);
  border-radius: 12px;
  padding: 18px 20px;
  font-family: var(--sans);
  color: var(--text-1);
}
.tool-result-card.is-good { border-left-color: var(--up, #16a34a); background: linear-gradient(180deg, rgba(22,163,74,.03), transparent 60%), var(--bg-1); }
.tool-result-card.is-bad  { border-left-color: var(--down, #dc2626); background: linear-gradient(180deg, rgba(220,38,38,.03), transparent 60%), var(--bg-1); }
.tool-result-card.is-warn { border-left-color: var(--cta, #FF9900); }
.tool-result-h {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 6px;
}
.tool-result-card.is-good .tool-result-h { color: var(--up, #16a34a); }
.tool-result-card.is-bad  .tool-result-h { color: var(--down, #dc2626); }
.tool-result-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-1);
  font-size: 14px;
}
.tool-result-row:first-of-type { border-top: none; padding-top: 4px; }
.tool-result-row > span:first-child {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
}
.tool-result-row > b {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  text-align: center;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.tool-result-row > span:last-child {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tool-result-row > span:only-child {
  grid-column: 1 / -1;
  text-align: left;
}
.tool-result-total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 2px solid var(--line-2) !important;
}
.tool-result-total > span:first-child {
  font-weight: 700;
  color: var(--text-1);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.tool-result-total > b {
  font-size: 22px;
  color: var(--text-1);
}
.tool-result-card.is-good .tool-result-total > b { color: var(--up, #16a34a); }
.tool-result-card.is-bad  .tool-result-total > b { color: var(--down, #dc2626); }

/* Empty state */
.tool-empty {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-3);
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  text-align: center;
}

@media (max-width: 640px) {
  .tool-page { padding: 0 12px 64px; }
  .tool-page .lf-head h1 { font-size: 22px; }
  .tool-form-card { padding: 16px; border-radius: 10px; }
  .tool-form { grid-template-columns: 1fr; gap: 12px; }
  .tool-btn { width: 100%; }
  .tool-result-card { padding: 14px 16px; }
  .tool-result-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label value" "suffix suffix";
    row-gap: 2px;
  }
  .tool-result-row > span:first-child { grid-area: label; }
  .tool-result-row > b { grid-area: value; text-align: right; }
  .tool-result-row > span:last-child { grid-area: suffix; text-align: left; color: var(--text-3); font-size: 12px; }
  .tool-result-row > span:only-child { grid-area: label; }
  .tool-result-total > b { font-size: 20px; }
}

/* Tools index grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.tools-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text-1);
  transition: border-color .12s, transform .12s;
  display: block;
}
.tools-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.tools-card h3 {
  font-family: var(--sans);
  font-size: 14px; font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-1);
}
.tools-card p {
  font-size: 12px; color: var(--text-2);
  margin: 0; line-height: 1.45;
}

/* ──────────────────────────────────────────────────────────────── */
/*  BOOKMAKER PAGES                                                 */
/* ──────────────────────────────────────────────────────────────── */
.book-page {
  max-width: 820px; margin: 0 auto;
  padding: 20px 16px 80px;
  font-family: var(--sans-body);
  color: var(--text-1);
}
.book-page .lf-breadcrumb { margin-bottom: 16px; }
.book-page h1 {
  font-family: var(--sans);
  font-size: 26px; font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 8px;
}
.book-page > p {
  font-size: 16px; line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 20px;
  max-width: 65ch;
}
.book-page table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  overflow: hidden;
  margin: 16px 0;
  font-family: var(--sans);
  font-size: 13px;
}
.book-page th, .book-page td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-1);
}
.book-page th {
  background: var(--bg-1);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-2);
}
.book-page tr:last-child td { border-bottom: 0; }

/* ──────────────────────────────────────────────────────────────── */
/*  Mobile pass — long-form & tools                                 */
/* ──────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .mp-page { padding: 12px 12px 96px; }
  .mp-title { font-size: 18px; }
  .mp-summary { font-size: 14px; padding: 10px 12px; }
  .mp-context-grid { grid-template-columns: 1fr; }
  .mp-odds-table { font-size: 11px; }
  .mp-odds-table th, .mp-odds-table td { padding: 7px 6px; }

  .lf-article { padding: 16px 14px 60px; }
  .lf-head h1 { font-size: 22px; }
  .lf-lede { font-size: 15px; }
  .lf-section p, .lf-section ul, .lf-section ol { font-size: 15px; }

  .tool-wrap { padding: 16px 14px 60px; }
  .tool-wrap h1 { font-size: 20px; }
  .tool-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .tool-row label { min-width: 0; }
  .tool-input { width: 100%; }
}

/* Cached-data indicator — subtle muted ribbon while fresh data loads */
body.cached-stale .opps,
body.cached-stale .three-col,
body.cached-stale #picksGrid,
body.cached-stale #moversGrid,
body.cached-stale #rows {
  opacity: .92;
  transition: opacity .25s ease;
}
body.cached-stale #sbTick {
  color: var(--warn);
}

/* ──────────────────────────────────────────────────────────────── */
/*  LEAGUE / MARKET / COMPARE HUB PAGES                             */
/* ──────────────────────────────────────────────────────────────── */
.league-hub, .market-hub, .compare-page {
  max-width: 1080px; margin: 0 auto;
  padding: 20px 16px 80px;
  font-family: var(--sans-body);
  color: var(--text-1);
}
.league-hub h1, .market-hub h1, .compare-page h1 {
  font-family: var(--sans);
  font-size: 28px; font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 8px;
}
.league-flag { display: inline-block; margin-right: 6px; font-size: 24px; vertical-align: -2px; }
.lf-sub {
  color: var(--text-2);
  font-size: 13px;
  margin: 4px 0 12px;
}
.lh-table-wrap {
  /* The outer wrap is now a NON-scrolling container that holds the
     explanatory "why we recommend" strip + the scrolling inner div.
     Scrolling happens on .lh-table-scroll so the strip stays visible. */
  margin-top: 6px;
  border: 1px solid var(--line-1);
  border-radius: 8px;
  background: var(--bg-2);
  overflow: hidden;
}
.lh-why {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-1);
  font-size: 13px; line-height: 1.5;
  color: var(--text-2);
}
.lh-why strong {
  color: var(--text-1); font-weight: 600;
  margin-right: 2px;
}
.lh-why em {
  font-style: normal; color: var(--text-1); font-weight: 600;
}
.lh-why-swatch {
  display: inline-block;
  width: 16px; height: 16px;
  background: var(--accent-soft, rgba(75,134,255,.18));
  border: 1px solid var(--accent);
  border-radius: 3px;
  vertical-align: text-bottom;
  margin: 0 2px;
}
.lh-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Fixes BTTS table cut-off on desktop: when the table outgrows its
     container, the inner div scrolls instead of clipping. */
}
.lh-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans-body);
  font-size: 14px;
}
.lh-table thead th {
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
  position: sticky; top: 0;
}
.lh-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-1);
  vertical-align: middle;
}
.lh-table tbody tr:last-child td { border-bottom: 0; }
.lh-table tbody tr:hover { background: var(--bg-3, var(--bg-1)); }
.lh-table .lh-num { text-align: right; font-variant-numeric: tabular-nums; }
.lh-table .lh-time { white-space: nowrap; color: var(--text-2); font-size: 13px; }
.lh-table .lh-league { white-space: nowrap; color: var(--text-2); font-size: 13px; }
.lh-table .lh-league a { color: var(--accent); text-decoration: none; }
.lh-table .lh-league a:hover { text-decoration: underline; }
.lh-table .lh-match a {
  color: var(--text-1);
  text-decoration: none;
  font-weight: 500;
}
.lh-table .lh-match a:hover { color: var(--accent); }
.lh-table .lh-vs { color: var(--text-2); margin: 0 4px; font-weight: 400; }
.lh-table .lh-best {
  background: var(--accent-soft, rgba(75, 134, 255, 0.06));
  font-weight: 600;
}
.lh-table .lh-price { font-weight: 600; }
.lh-table .lh-book {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-2);
  margin-top: 2px;
}
.lh-related {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 14px;
}
.lh-related li { margin: 0; }
.lh-related a {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
.lh-related a:hover { text-decoration: underline; }

/* Comparison page H2H grid */
.cmp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 18px;
}
.cmp-card {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 14px 16px;
}
.cmp-card h3 {
  font-family: var(--sans);
  font-size: 16px; font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-1);
}
.cmp-card p {
  font-size: 13px; color: var(--text-2);
  margin: 0 0 10px; line-height: 1.5;
}
.cmp-card .tool-btn {
  display: inline-block;
  font-size: 13px;
  padding: 6px 12px;
}
.cmp-table thead th[colspan] {
  text-align: center;
}

@media (max-width: 720px) {
  .league-hub, .market-hub, .compare-page {
    padding: 16px 12px 60px;
  }
  .league-hub h1, .market-hub h1, .compare-page h1 { font-size: 22px; }
  .lh-table { font-size: 13px; }
  .lh-table thead th, .lh-table tbody td { padding: 8px 8px; }
  .lh-table .lh-book { font-size: 10px; }
  .cmp-grid { grid-template-columns: 1fr; }
}

/* "feature" tools-card variant for the flagship link */
.tools-card--feature {
  background: var(--accent-soft, rgba(75, 134, 255, 0.08));
  border-color: var(--accent);
}
.tools-card--feature h3 { color: var(--accent); }

/* mega-all (footer link in dropdown) gets accent */
.mega-panel a.mega-all {
  color: var(--accent);
  font-weight: 600;
  border-top: 1px solid var(--line-1);
  margin-top: 4px;
  padding-top: 8px;
}

/* ── First-run onboarding modal (P4) ────────────────────────────────────── */
.onb-overlay {
  position: fixed; inset: 0;
  background: rgba(8, 10, 14, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  opacity: 0;
  transition: opacity 200ms ease;
  padding: 16px;
}
.onb-overlay[hidden] { display: none; }
.onb-overlay.is-visible { opacity: 1; }
[data-theme="light"] .onb-overlay { background: rgba(20, 24, 32, 0.45); }

.onb-card {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 14px;
  padding: 28px 26px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transform: translateY(8px);
  transition: transform 220ms ease;
}
.onb-overlay.is-visible .onb-card { transform: translateY(0); }

.onb-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-1);
  color: var(--text-3);
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.onb-close:hover { background: var(--bg-2); color: var(--text-1); }

.onb-eyebrow {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.onb-title {
  font-family: var(--sans);
  font-size: 22px; font-weight: 700;
  color: var(--text-1);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.onb-points {
  list-style: none; padding: 0; margin: 0 0 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.onb-points li {
  display: flex; gap: 12px; align-items: flex-start;
}
.onb-points li > div {
  display: flex; flex-direction: column; gap: 3px;
}
.onb-points li > div b {
  font-size: 14px; color: var(--text-1); font-weight: 600;
}
.onb-points li > div span {
  font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.onb-num {
  flex: 0 0 24px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 12px; font-weight: 700;
  margin-top: 1px;
}

.onb-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line-1);
}
.onb-cta {
  padding: 10px 22px;
  background: var(--cta); color: var(--cta-text);
  border: 1px solid var(--cta-hover); border-radius: 8px;
  box-shadow: var(--cta-shadow);
  font-family: var(--sans); font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: filter 120ms ease;
}
.onb-cta:hover { filter: brightness(1.08); }
.onb-link {
  font-family: var(--sans); font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
}
.onb-link:hover { color: var(--text-1); text-decoration: underline; }

body.onb-open { overflow: hidden; }

@media (max-width: 480px) {
  .onb-card { padding: 24px 20px 18px; }
  .onb-title { font-size: 19px; }
  .onb-actions { flex-direction: column-reverse; align-items: stretch; }
  .onb-cta { width: 100%; padding: 12px; }
  .onb-link { text-align: center; }
}

/* ── My matches rail (P5a-rail) ─────────────────────────────────────────── */
.watch-rail {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 10px;
}
.watch-rail-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.watch-rail-tag {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.watch-rail-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.watch-rail-track {
  display: flex; gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.watch-rail-card {
  flex: 0 0 220px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}
.watch-rail-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.watch-rail-time {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  color: var(--accent);
}
.watch-rail-league {
  font-family: var(--sans);
  font-size: 10px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3);
}
.watch-rail-teams {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Best-of-today digest (P5b) ─────────────────────────────────────────── */
.seo-page--digest { max-width: 760px; margin: 0 auto; padding: 24px 18px 60px; }
.dg-head { margin: 12px 0 28px; }
.dg-eyebrow {
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  letter-spacing: .04em;
}
.dg-head h1 {
  font-family: var(--sans);
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin: 6px 0 10px;
  line-height: 1.15;
}
.dg-lede {
  font-size: 16px; line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}
.dg-section { margin-top: 36px; }
.dg-section h2 {
  font-family: var(--sans);
  font-size: 18px; font-weight: 700;
  color: var(--text-1);
  margin: 0 0 6px;
}
.dg-section-lede {
  font-size: 13px; color: var(--text-3);
  margin: 0 0 14px;
}
.dg-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
  counter-reset: dg;
}
.dg-card {
  position: relative;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 10px;
  counter-increment: dg;
}
.dg-card::before {
  content: counter(dg);
  position: absolute; top: 14px; right: 16px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
}
.dg-card--arb { border-left: 3px solid var(--up); }
.dg-card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 12px;
  margin-bottom: 6px;
}
.dg-edge {
  font-family: var(--mono);
  font-size: 13px; font-weight: 700;
  color: var(--up);
  padding: 2px 6px;
  background: rgba(36, 184, 99, 0.12);
  border-radius: 4px;
}
.dg-when { color: var(--text-2); }
.dg-league { color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-size: 10px; font-weight: 600; }
.dg-card-title {
  font-family: var(--sans);
  font-size: 16px; font-weight: 600;
  margin: 0 0 6px;
}
.dg-card-title a {
  color: var(--text-1);
  text-decoration: none;
}
.dg-card-title a:hover { color: var(--accent); }
.dg-card-body {
  font-size: 14px; line-height: 1.5;
  color: var(--text-2);
  margin: 0;
}
.dg-card-ctx {
  margin-top: 6px;
  font-size: 12px; color: var(--text-3);
  font-style: italic;
}
.dg-empty {
  padding: 30px 20px; text-align: center;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 10px;
}
.dg-empty h2 { margin: 0 0 8px; }
.dg-empty p { color: var(--text-2); margin: 0; }
.dg-method { padding-top: 24px; border-top: 1px solid var(--line-1); }
.dg-method p {
  font-size: 13px; color: var(--text-2); line-height: 1.6;
  margin: 0 0 10px;
}
.dg-method a { color: var(--accent); }

.view-header-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view-cta {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--line-1);
  border-radius: 6px;
  transition: background 120ms ease;
}
.view-cta:hover { background: var(--bg-2); text-decoration: none; }

/* ============================================================
   NWG-style opportunity cards (May 2026 clarity rewrite)
   Replaces grid-row layout with single-purpose cards that
   answer: WHAT is the bet? HOW MUCH do I stake? WHY does it work?
   ============================================================ */
.opp-card {
  display: block !important;
  grid-template-columns: none !important;
  padding: 18px 20px 16px !important;
  margin: 10px 0;
  background: var(--bg-1) !important;
  border: 1px solid var(--line-1) !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -16px rgba(0,0,0,.18);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  color: var(--text-1);
  text-decoration: none;
}
.opp-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-3) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 12px 32px -16px rgba(0,0,0,.22);
}
.opp-card.is-arb { border-left: 4px solid var(--up) !important; }
.opp-card.is-ev  { border-left: 4px solid #FF9900 !important; }

.opp-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.opp-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.opp-tag {
  display: inline-flex; align-items: center;
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  padding: 4px 9px; border-radius: 999px; text-transform: uppercase;
  white-space: nowrap;
}
.opp-tag--arb { background: rgba(34,197,94,.14); color: var(--up); border: 1px solid rgba(34,197,94,.28); }
.opp-tag--ev  { background: rgba(255,153,0,.14);  color: #FF9900;  border: 1px solid rgba(255,153,0,.32); }
.opp-card-time   { font-family: var(--mono, ui-monospace, Menlo, monospace); font-size: 12px; color: var(--text-2); }
.opp-card-league { font-size: 12px; color: var(--text-2); }
.opp-card-edge {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 22px; font-weight: 800; line-height: 1;
  color: var(--up); text-align: right; white-space: nowrap;
}
.opp-card.is-ev .opp-card-edge { color: #FF9900; }
.opp-card-edge small {
  display: block; font-size: 10px; font-weight: 600;
  color: var(--text-3); letter-spacing: .05em; text-transform: uppercase;
  margin-top: 2px;
}
.opp-card-title {
  font-size: 18px; font-weight: 700; line-height: 1.25;
  letter-spacing: -.01em; color: var(--text-1);
  margin: 2px 0 6px;
}
.opp-card-explain {
  font-size: 14px; line-height: 1.55; color: var(--text-2);
  margin: 0 0 12px;
}
.opp-card-explain b { color: var(--text-1); font-weight: 600; }

/* Instruction strip: pill-shaped legs with brand colour swatch */
.opp-arb-legs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px; border-radius: 10px;
  background: var(--bg-2);
  border: 1px dashed var(--line-1);
}
.opp-arb-leg, .opp-ev-instr {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px 7px 7px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-left: 4px solid var(--bk, #2b2f3a);
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.opp-ev-instr {
  margin: 4px 0 12px;
  padding: 10px 12px;
  font-size: 13.5px;
  background: var(--bg-2);
}
.opp-arb-leg-stake, .opp-ev-instr .opp-arb-leg-stake {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-weight: 700; color: var(--text-1);
  background: rgba(255,153,0,.12); color: #FF9900;
  padding: 2px 7px; border-radius: 4px;
}
.opp-card.is-arb .opp-arb-leg-stake {
  background: rgba(34,197,94,.14); color: var(--up);
}
.opp-arb-leg-side  { font-weight: 700; color: var(--text-1); text-transform: none; font-size: 13px; letter-spacing: 0; }
.opp-arb-leg-on    { color: var(--text-3); font-size: 11px; }
.opp-arb-leg-book  { display: inline-flex; align-items: center; }
.opp-arb-leg-book svg { height: 20px; width: auto; display: block; }
.opp-arb-leg-price { font-family: var(--mono, ui-monospace, Menlo, monospace); color: var(--text-2); font-size: 12.5px; }
.opp-arb-leg-return{ color: var(--text-3); font-size: 12px; margin-left: 4px; }

/* ── Coming-soon badge (used on /telegram and roadmap items) ───── */
.badge-soon {
  display: inline-block; vertical-align: middle;
  margin-left: 10px;
  padding: 2px 8px;
  background: var(--warn-soft, rgba(245, 158, 11, .14));
  border: 1px solid var(--warn, #f59e0b);
  color: var(--warn, #f59e0b);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}

/* ── Brand logo swatch ────────────────────────────────────────────
   ONE size, EVERYWHERE the brand mark appears. A fixed-aspect tile
   with the logo contained inside. This is what made logos look
   unbalanced before — different aspect ratios = different visual sizes.
   The white inner pad guarantees every mark is legible on its brand
   colour. Heights are component-driven via --logo-h (default 28px). */
.book-logo-img {
  --logo-h: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--logo-h); height: var(--logo-h);
  background: #fff; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  padding: 4px;
  flex: 0 0 auto;
}
.book-logo-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block; filter: none;
}
/* Tight variant — inline in dense tables / opportunity rows */
.book-logo-img--xs { --logo-h: 20px; border-radius: 4px; padding: 3px; }
.book-logo-img--sm { --logo-h: 24px; border-radius: 5px; padding: 3px; }
.book-logo-img--md { --logo-h: 28px; }
.book-logo-img--lg { --logo-h: 36px; border-radius: 7px; padding: 5px; }

.opp-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line-1);
  font-size: 12px; color: var(--text-3);
}
.opp-card-cta {
  font-weight: 600; color: var(--accent, #3b82f6);
}

/* ============================================================
   Breadcrumbs / "threading"
   Sits below the header on every interior page.
   ============================================================ */
.crumbs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
  max-width: 1200px; margin: 0 auto;
}
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent, #3b82f6); text-decoration: underline; }
.crumbs .crumb-sep { color: var(--text-3); opacity: .5; }
.crumbs .crumb-current { color: var(--text-1); font-weight: 600; }

/* ============================================================
   Logo + header tweaks
   ============================================================ */
.logo-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-link img { height: 28px; width: auto; display: block; }

/* ============================================================
   Mobile cut-off fixes
   ============================================================ */
@media (max-width: 640px) {
  .opp-card { padding: 14px 14px 12px !important; }
  .opp-card-title { font-size: 16px; }
  .opp-card-edge { font-size: 18px; }
  .opp-arb-leg, .opp-ev-instr {
    flex-wrap: wrap; white-space: normal; font-size: 12.5px;
  }
  .opp-card-explain { font-size: 13.5px; }
  /* Allow horizontal scroll on any wide table */
  .table-wrap, .compare-wrap, .book-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Stop bottom tab bar from overlapping last card */
  main, #app, .view {
    padding-bottom: 80px !important;
  }
  /* Watch/share full-width labels not tiny icons */
  .mp-actions .mp-action, .mp-actions a, .mp-actions button {
    min-width: 0; flex: 1 1 auto;
  }
  .mp-actions .mp-action-label { display: inline !important; }
  /* Segmented control no truncation */
  .market-tabs, .seg-control { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .market-tabs::-webkit-scrollbar, .seg-control::-webkit-scrollbar { display: none; }
}

/* Match-page verdict: plain-English instruction strip */
.mp-verdict-instr {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-left: 4px solid var(--up);
  border-radius: 10px;
  font-size: 14px;
}
.mp-verdict-stake {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-weight: 800; padding: 4px 9px; border-radius: 5px;
  background: rgba(34,197,94,.16); color: var(--up);
}
.mp-verdict-on, .mp-verdict-at { color: var(--text-3); font-size: 12px; }
.mp-verdict-side  { font-weight: 700; color: var(--text-1); }
.mp-verdict-price { font-family: var(--mono, ui-monospace, Menlo, monospace); font-weight: 700; color: var(--text-1); font-size: 15px; }
.mp-verdict-book  { color: var(--text-2); font-size: 13px; }
.mp-verdict-return { color: var(--text-3); font-size: 12.5px; margin-left: auto; white-space: nowrap; }
@media (max-width: 640px) {
  .mp-verdict-instr { font-size: 13px; }
  .mp-verdict-return { margin-left: 0; width: 100%; }
}
