/* =========================================================
   EdgeBook styles
   Every color comes from a variable, so a theme is just a new
   set of variables on <html data-theme="...">.
   ========================================================= */

/* ---------- Theme 1: Midnight Turf (default) ---------- */
:root, [data-theme="turf"] {
  --bg: #070d12; --card: #0f1a23; --card2: #142330; --line: #1b2c3a;
  --text: #eef6fa; --text-soft: #c9d8e2; --muted: #8ba3b5;
  --g1: #18d47b; --g2: #00b4d8;
  --grad: linear-gradient(135deg, var(--g1), var(--g2));
  --accent: #18d47b; --accent-text: #3fe293; --focus: #4cc9f0;
  --btn-bg: linear-gradient(135deg, #18d47b, #00b4d8); --btn-fg: #04140f;
  --btn-radius: 10px; --btn-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 10px rgba(0,180,216,.18);
  --on-logo: #04140f;
  --good: #18d47b; --bad: #ff5d6c; --warn: #ffc93d;
  --on-good: #04140f; --on-bad: #1a0306; --on-warn: #1a1200;
  --sel-bg: rgba(24,212,123,.10); --tip-bg: #10241f; --tip-line: #1f4a3c;
  --glow1: rgba(24,212,123,.10); --glow2: rgba(0,180,216,.10);
  --nav-bg: rgba(7,13,18,.9); --toast-bg: #eef6fa; --toast-fg: #070d12;
  --radius: 16px; color-scheme: dark;
}

/* ---------- Theme 2: Clean Chalk (light) ---------- */
[data-theme="chalk"] {
  --bg: #f4f5f8; --card: #ffffff; --card2: #eef0f4; --line: #dfe2ea;
  --text: #11131a; --text-soft: #2b2f3a; --muted: #565c6b;
  --g1: #ff5a36; --g2: #ff8a5c;
  --grad: linear-gradient(135deg, var(--g1), var(--g2));
  --accent: #ff5a36; --accent-text: #c2381a; --focus: #ff5a36;
  --btn-bg: #11131a; --btn-fg: #ffffff;
  --btn-radius: 999px; --btn-shadow: 0 1px 2px rgba(17,19,26,.18);
  --on-logo: #ffffff;
  --good: #0e7a43; --bad: #c62238; --warn: #8a5a00;
  --on-good: #ffffff; --on-bad: #ffffff; --on-warn: #ffffff;
  --sel-bg: #fff1ec; --tip-bg: #fff4ef; --tip-line: #ffd2c4;
  --glow1: transparent; --glow2: transparent;
  --nav-bg: rgba(255,255,255,.92); --toast-bg: #11131a; --toast-fg: #ffffff;
  --radius: 14px; color-scheme: light;
}

/* ---------- Theme 3: Hardwood Royal (warm dark) ---------- */
[data-theme="hardwood"] {
  --bg: #0e0b10; --card: #19141d; --card2: #221b28; --line: #2d2436;
  --text: #f7f4fa; --text-soft: #ddd3e6; --muted: #a99cb5;
  --g1: #ffb830; --g2: #ff5e3a;
  --grad: linear-gradient(135deg, var(--g1), var(--g2));
  --accent: #ffb830; --accent-text: #ffc457; --focus: #ffb830;
  --btn-bg: linear-gradient(135deg, #ffb830, #ff5e3a); --btn-fg: #1d0b02;
  --btn-radius: 16px; --btn-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 10px rgba(255,94,58,.2);
  --on-logo: #1d0b02;
  --good: #3ddc84; --bad: #ff6b6b; --warn: #ffc24a;
  --on-good: #071a0e; --on-bad: #1f0505; --on-warn: #1f1400;
  --sel-bg: rgba(255,184,48,.10); --tip-bg: #2a1d10; --tip-line: #5a3a14;
  --glow1: rgba(255,184,48,.10); --glow2: rgba(255,94,58,.09);
  --nav-bg: rgba(14,11,16,.9); --toast-bg: #f7f4fa; --toast-fg: #0e0b10;
  --radius: 16px; color-scheme: dark;
}

/* ---------- Theme 4: EdgeBook Classic (the original orange/pink brand) ---------- */
[data-theme="classic"] {
  --bg: #09090c; --card: #15151b; --card2: #1e1e26; --line: #2a2a35;
  --text: #f5f5f7; --text-soft: #d6d6dc; --muted: #9696a3;
  --g1: #ff8a1f; --g2: #ff3d7f;
  --grad: linear-gradient(135deg, var(--g1), var(--g2));
  --accent: #ff8a1f; --accent-text: #ffa04d; --focus: #ff8a1f;
  --btn-bg: linear-gradient(135deg, #ff8a1f, #ff3d7f); --btn-fg: #171116;
  --btn-radius: 12px; --btn-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 10px rgba(255,61,127,.18);
  --on-logo: #171116;
  --good: #2fd27a; --bad: #ff5468; --warn: #ffc93d;
  --on-good: #0b2a18; --on-bad: #1f0509; --on-warn: #1f1600;
  --sel-bg: rgba(255,138,31,.10); --tip-bg: #2a1d0f; --tip-line: #5a3a14;
  --glow1: rgba(255,138,31,.14); --glow2: rgba(255,61,127,.11);
  --nav-bg: rgba(9,9,12,.9); --toast-bg: #f5f5f7; --toast-fg: #09090c;
  --radius: 18px; color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Outfit", system-ui, sans-serif; font-size: 15px; line-height: 1.45;
  /* every number lines up in columns: odds, %, $ */
  font-variant-numeric: tabular-nums;
  background-image: radial-gradient(circle at 10% -10%, var(--glow1), transparent 40%), radial-gradient(circle at 110% 0%, var(--glow2), transparent 40%);
  background-attachment: fixed;
}
button, input, select, textarea { font-family: inherit; font-variant-numeric: tabular-nums; }
a { color: var(--accent-text); }
h1 { font-size: 24px; margin: 0; letter-spacing: -.3px; }
h2 { font-size: 18px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--card); color: var(--text); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico.sm { width: 16px; height: 16px; vertical-align: -3px; }
.muted { color: var(--muted); font-size: 13px; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.small-print { font-size: 12px; margin-top: 10px; }

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.logo-mark { width: 30px; height: 30px; }
.logo-word { font-size: 21px; font-weight: 800; letter-spacing: .2px; }
.logo-word span, .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="chalk"] .logo-word span, [data-theme="chalk"] .grad-text { background: none; color: var(--accent-text); }

/* ---------- layout ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; max-width: 1080px; margin: 0 auto; }
.top-right { display: flex; gap: 8px; align-items: center; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 13px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); color: var(--text); width: 44px; height: 44px; border-radius: 50%; cursor: pointer; transition: border-color .15s, transform .12s; }
.icon-btn:hover { border-color: var(--muted); }
.icon-btn:active { transform: scale(.94); }
.sync { color: var(--muted); font-size: 11px; max-width: 1080px; margin: 6px auto 0; padding: 0 16px; }
main { padding: 10px 16px 110px; max-width: 1080px; margin: 0 auto; outline: none; }
.view { display: none; animation: fadeUp .25s ease; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 2px 14px; gap: 8px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 20px 2px 10px; }
.section-title h2 { margin: 0; }
.section-h { margin: 28px 2px 12px; font-size: 22px; }

/* landing mode hides the app chrome */
body.landing-mode nav.tabs, body.landing-mode .app-only { display: none !important; }
body:not(.landing-mode) .landing-only { display: none !important; }

/* ---------- account menu ---------- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 52px; z-index: 50; width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.menu-link { display: block; padding: 11px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.menu-link:hover { background: var(--card2); }

/* ---------- theme picker ---------- */
.theme-picker { border: none; margin: 0; padding: 0; }
.theme-picker legend { font-weight: 700; font-size: 16px; margin-bottom: 8px; padding: 0; }
.theme-picker.compact legend { font-size: 12px; color: var(--muted); }
.theme-picker.compact label { display: flex; gap: 8px; align-items: center; padding: 8px 6px; margin: 0; font-size: 14px; color: var(--text); cursor: pointer; border-radius: 8px; }
.theme-picker.compact label:hover { background: var(--card2); }
.theme-card { display: flex !important; gap: 12px; align-items: center; padding: 12px; margin: 0 0 8px !important; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--text) !important; font-size: 14px !important; }
.theme-card:hover { border-color: var(--muted); }
.theme-card:has(input:checked) { border-color: var(--accent); background: var(--sel-bg); }
.theme-card b, .theme-card .muted { display: block; }
.swatch { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; border: 1px solid var(--line); }
.theme-card.turf .swatch { background: linear-gradient(135deg, #18d47b 0 50%, #070d12 50%); }
.theme-card.chalk .swatch { background: linear-gradient(135deg, #ff5a36 0 50%, #f4f5f8 50%); }
.theme-card.hardwood .swatch { background: linear-gradient(135deg, #ffb830 0 50%, #0e0b10 50%); }
.theme-card.classic .swatch { background: linear-gradient(135deg, #ff8a1f 0 25%, #ff3d7f 50%, #09090c 50%); }
input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }

/* ---------- live ticker ---------- */
.ticker { display: flex; align-items: center; gap: 6px; max-width: 1080px; margin: 2px auto 0; padding: 0 16px; }
.ticker-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--muted); cursor: pointer; flex-shrink: 0; }
.ticker-btn:hover { color: var(--text); }
.ticker-btn .ico { width: 14px; height: 14px; }
.ticker-view { flex: 1; overflow: hidden; height: 34px; display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: inline-flex; gap: 32px; white-space: nowrap; padding-left: 16px; animation: tick var(--tick-dur, 40s) linear infinite; }
.ticker.paused .ticker-track, .ticker-view:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-track.static { animation: none; }
@keyframes tick { to { transform: translateX(-50%); } }
.t-item { font-size: 13px; font-weight: 600; color: var(--text-soft); display: inline-flex; align-items: center; gap: 6px; }
.t-item .t-odds { color: var(--text); font-weight: 800; }
.t-item .t-when { color: var(--muted); font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- navigation: bottom bar on phones, sidebar on desktop ---------- */
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
nav.tabs .nav-brand { display: none; }
nav.tabs .inner { display: flex; width: 100%; max-width: 560px; }
nav.tabs .inner a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 12px; transition: color .2s, background .2s; }
nav.tabs .inner a:hover { color: var(--text); }
nav.tabs .inner a.active { color: var(--text); }
nav.tabs .inner a.active .ico { stroke: var(--accent-text); }
nav.tabs .inner a.active::after { content: ""; display: block; width: 18px; height: 3px; border-radius: 3px; background: var(--grad); }

@media (min-width: 960px) {
  nav.tabs { top: 0; right: auto; width: 228px; flex-direction: column; justify-content: flex-start; padding: 20px 14px; border-top: none; border-right: 1px solid var(--line); }
  nav.tabs .nav-brand { display: inline-flex; margin: 0 8px 26px; }
  nav.tabs .inner { flex-direction: column; gap: 4px; }
  nav.tabs .inner a { flex: none; flex-direction: row; gap: 12px; justify-content: flex-start; padding: 0 12px; font-size: 15px; }
  nav.tabs .inner a.active { background: var(--card2); }
  nav.tabs .inner a.active::after { display: none; }
  body:not(.landing-mode) .shell { margin-left: 228px; }
  body:not(.landing-mode) .top-brand { visibility: hidden; }
  main { padding-bottom: 40px; }
  .games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
  .games-grid > .card { margin-bottom: 0; }
}

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2 { margin: 0; font-size: 18px; font-weight: 700; }
.card h3 { margin: 0; font-size: 16px; font-weight: 700; }
.link-btn { background: none; border: none; color: var(--accent-text); font-weight: 700; font-size: 14px; cursor: pointer; padding: 8px; min-height: 36px; border-radius: 8px; }
.link-btn:hover { background: var(--card2); }

/* ---------- buttons (all states) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; position: relative; min-height: 44px; padding: 11px 18px; border-radius: var(--btn-radius); border: none; background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--btn-shadow); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s, filter .15s, opacity .15s, border-color .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--muted); filter: none; }
.btn.small { min-height: 36px; padding: 7px 13px; font-size: 13px; }
.btn.good { background: var(--good); color: var(--on-good); box-shadow: none; }
.btn.bad { background: var(--bad); color: var(--on-bad); box-shadow: none; }
.btn.full { width: 100%; margin-top: 12px; }
/* loading: hide the label and spin a ring in the label's color */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading .ico { opacity: 0; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.ghost.is-loading::after { border-color: var(--text); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 44px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (min-width: 720px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.stepper { display: flex; gap: 6px; align-items: center; }
.stepper strong { min-width: 22px; text-align: center; }

/* ---------- chips + segmented control (all states) ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding: 2px; scrollbar-width: none; }
.chips button { min-height: 36px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s, transform .12s; }
.chips button:hover { color: var(--text); border-color: var(--muted); }
.chips button:active { transform: scale(.96); }
.chips button.on, .chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg button { flex: 1; min-height: 40px; background: none; border: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 9px; border-radius: 10px; cursor: pointer; transition: color .15s, background .15s, transform .12s; }
.seg button:hover { color: var(--text); background: var(--card2); }
.seg button:active { transform: scale(.97); }
.seg button.on { background: var(--btn-bg); color: var(--btn-fg); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- lists ---------- */
ul.list { list-style: none; padding: 0; margin: 10px 0 0; }
ul.list li { background: var(--card2); border-radius: 14px; padding: 12px; margin-bottom: 8px; border: 1px solid transparent; transition: border-color .15s, transform .12s; }
ul.list li.tap { cursor: pointer; }
ul.list li.tap:hover { border-color: var(--line); }
ul.list li.tap:active { transform: scale(.98); }
ul.list li.on { border-color: var(--accent); background: var(--sel-bg); }
ul.list li.empty-li { background: none; border: none; padding: 0; }
.li-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--text); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.pill.won, .pill.start { background: var(--good); color: var(--on-good); }
.pill.lost { background: var(--bad); color: var(--on-bad); }
.pill.push { background: var(--warn); color: var(--on-warn); }
.pill.sit { background: var(--line); color: var(--muted); }
.edge { font-weight: 800; font-size: 14px; white-space: nowrap; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 2px; }
.spark { width: 100%; height: 64px; margin-top: 10px; display: block; }
.spark .sp-zero { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; opacity: .6; }
.spark .sp-line { fill: none; stroke: var(--accent-text); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark .sp-area { fill: var(--accent); opacity: .12; }
.spark .sp-dot { fill: var(--accent-text); }
.spark .sp-empty { fill: var(--muted); font-size: 12px; font-family: Outfit, sans-serif; }
.bar { height: 10px; background: var(--card2); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.bar div { height: 100%; background: var(--grad); border-radius: 999px; transition: width .6s ease; }
.bar div.over { background: var(--bad); }

/* ---------- games + verdicts ---------- */
.matchup { display: flex; align-items: center; gap: 8px; }
.vs { color: var(--muted); font-size: 11px; font-weight: 800; }
.verdict { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--card2); border-left: 4px solid var(--muted); }
.verdict.go { border-color: var(--good); background: linear-gradient(90deg, color-mix(in srgb, var(--good) 12%, transparent), var(--card2) 60%); }
.verdict.arb { border-color: var(--warn); background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 12%, transparent), var(--card2) 60%); }
.verdict.pass { border-color: var(--bad); }
.verdict .main { font-size: 17px; font-weight: 800; }
.tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .5px; padding: 3px 9px; border-radius: 999px; margin-bottom: 6px; background: var(--line); color: var(--text); text-transform: uppercase; }
.tag.good { background: var(--good); color: var(--on-good); }
.tag.warn { background: var(--warn); color: var(--on-warn); }
.tag.bad { background: var(--bad); color: var(--on-bad); }
.tag.muted { background: var(--line); color: var(--text); font-size: 11px; }
details.odds { margin-top: 12px; }
details.odds summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; list-style: none; padding: 6px 0; }
details.odds summary::before { content: "▸ "; }
details.odds[open] summary::before { content: "▾ "; }
.books { width: 100%; border-collapse: collapse; margin-top: 8px; }
.books th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px; }
.books td { padding: 3px; }
.books input { padding: 9px; font-size: 15px; border-radius: 10px; min-height: 40px; }
.books input.best { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.live-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; margin: 12px 0 4px; }
.live-meta { flex: 1; min-width: 160px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }
.when { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.when.live { background: var(--bad); color: var(--on-bad); animation: pulse 1.4s infinite; }
.skel { height: 150px; border-radius: var(--radius); margin-bottom: 14px; background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 10px; font-weight: 800; letter-spacing: .3px; border: 2px solid; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.badge.lg { width: 46px; height: 46px; font-size: 13px; border-width: 3px; }
.badge.blank { background: var(--card2); border-color: var(--line); color: var(--muted); font-size: 16px; }

/* ---------- empty / sheets / toast ---------- */
.empty { text-align: center; padding: 22px 10px; }
.empty .ei { font-size: 34px; }
.empty p { color: var(--muted); margin: 6px 0 12px; }
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .2s, visibility .2s; }
.sheet.open { opacity: 1; pointer-events: auto; visibility: visible; }
.sheet .panel { background: var(--card); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; transform: translateY(30px); transition: transform .25s ease; border: 1px solid var(--line); border-bottom: none; }
.sheet.open .panel { transform: none; }
@media (min-width: 960px) { .sheet { align-items: center; } .sheet .panel { border-radius: 20px; border-bottom: 1px solid var(--line); } }
.grabber { width: 42px; height: 5px; background: var(--line); border-radius: 5px; margin: 0 auto 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 20px; }
#toasts { position: fixed; top: 14px; left: 0; right: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--toast-bg); color: var(--toast-fg); font-weight: 700; padding: 10px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: pop .25s ease; transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- landing ---------- */
.hero-grid { display: grid; gap: 18px; margin: 8px 0 18px; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 32px; margin: 30px 0; } }
.eyebrow { color: var(--accent-text); font-weight: 700; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; margin: 0 0 8px; }
.landing h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.08; letter-spacing: -1px; }
.lede { color: var(--text-soft); font-size: 17px; line-height: 1.55; margin: 14px 0 18px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ev-card .ev-big { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.ev-rows { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-top: 10px; font-size: 14px; }
.ev-rows span:nth-child(even) { text-align: right; font-weight: 700; }
.coverage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.coverage .small-print { flex-basis: 100%; margin: 2px 0 0; }
.book-chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; }
.pricing { display: grid; gap: 14px; }
@media (min-width: 720px) { .pricing { grid-template-columns: 1fr 1fr; } }
.plan .price { font-size: 38px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -1px; }
.plan .price span { font-size: 15px; color: var(--muted); font-weight: 600; }
.plan.pro { border-color: var(--accent); }
.ticks { list-style: none; padding: 0; margin: 10px 0 12px; }
.ticks li { padding: 6px 0 6px 26px; position: relative; color: var(--text-soft); line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 10px; height: 6px; border-left: 2.5px solid var(--good); border-bottom: 2.5px solid var(--good); transform: rotate(-45deg); }

/* ---------- learn + misc ---------- */
.learn h2 { display: flex; align-items: center; gap: 10px; }
.num { background: var(--btn-bg); color: var(--btn-fg); width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.learn p, .learn li { line-height: 1.55; color: var(--text-soft); }
.learn ul, .learn ol { padding-left: 20px; margin: 8px 0 0; }
.place { background: var(--card2); border-radius: 12px; padding: 11px 12px; margin-top: 10px; }
.place strong { display: block; margin-bottom: 2px; }
.tip { background: var(--tip-bg); border: 1px solid var(--tip-line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 14px; line-height: 1.5; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 720px) { .team-grid { grid-template-columns: repeat(8, 1fr); } }
.team-grid div { text-align: center; font-size: 11px; color: var(--muted); }
.team-grid .badge { margin: 0 auto 4px; display: flex; }
.clv { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); }
.clv-input { display: flex; gap: 6px; margin-top: 8px; }
.clv-input input { padding: 8px; font-size: 14px; }
.trow { margin-top: 12px; }
.trow .tl { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.tbar { position: relative; height: 12px; background: var(--card2); border-radius: 999px; overflow: hidden; }
.tbar .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tbar .fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; transition: width .6s ease; }
.prob-big { font-size: 34px; font-weight: 800; line-height: 1; }
.meter { height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--bad), var(--card2) 50%, var(--good)); position: relative; margin: 12px 0 4px; }
.meter .dot { position: absolute; top: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); transform: translateX(-50%); transition: left .4s ease; }
.info { background: none; border: 1px solid var(--line); color: var(--muted); width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 800; cursor: pointer; padding: 0; vertical-align: middle; margin-left: 4px; }
.info:hover { color: var(--text); border-color: var(--muted); }
.welcome { border-color: var(--tip-line); background: linear-gradient(160deg, var(--tip-bg), var(--card) 70%); }
.step { display: flex; gap: 12px; align-items: center; background: var(--card2); border-radius: 14px; padding: 12px; margin-top: 8px; cursor: pointer; border: 1px solid transparent; }
.step:hover { border-color: var(--line); }
.step:active { border-color: var(--accent); }
.step .si { font-size: 24px; }
.step.done { opacity: .6; }
.step.done strong::after { content: " ✓"; color: var(--good); }
.confetti { position: fixed; top: -30px; z-index: 70; font-size: 22px; pointer-events: none; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }
.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.08); } }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 10px 4px 0; line-height: 1.5; }

/* ---------- tools ---------- */
.tool-lede { margin: -4px 2px 12px; font-size: 14px; }
.calc-grid { display: grid; gap: 14px; }
@media (min-width: 860px) { .calc-grid { grid-template-columns: 1fr 1fr; } .calc-grid > .card { margin-bottom: 0; } }
.calc-sub { margin: 4px 0 0; }
.calc-out { margin-top: 12px; background: var(--card2); border-radius: 12px; padding: 10px 12px; min-height: 44px; }
.calc-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.calc-row b { text-align: right; }
.calc-out .verdict { margin-top: 10px; }
#tools-seg button { font-size: 13px; padding: 9px 4px; }

/* ---------- colorful ticker ---------- */
.badge.xs { width: 22px; height: 22px; font-size: 7.5px; border-width: 1.5px; box-shadow: none; letter-spacing: 0; }
.t-at { color: var(--muted); font-weight: 700; margin: 0 2px; }
.t-sport { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; color: #111; letter-spacing: .4px; }
/* sport colors are content, like team colors, so they stay the same in every theme */
.t-sport.s-nfl { background: #4ade80; } .t-sport.s-nba { background: #fb923c; } .t-sport.s-nhl { background: #7dd3fc; }
.t-sport.s-mlb { background: #fca5a5; } .t-sport.s-ncaaf { background: #fde047; }
.t-live { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--bad); color: var(--on-bad); }
.t-live .live-dot { background: currentColor; width: 6px; height: 6px; }

/* ---------- value colors: blue = good, yellow = fair, red = bad ----------
   Fixed colors (they mean the same thing in every theme). Always paired with a text label. */
:root { --val-good: #4c9bff; --val-fair: #ffc93d; --val-bad: #ff5d6c; }
.val-pill { display: inline-flex; align-items: center; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: #0a0a0a; white-space: nowrap; letter-spacing: .3px; }
.val-pill.v-good { background: var(--val-good); } .val-pill.v-fair { background: var(--val-fair); } .val-pill.v-bad { background: var(--val-bad); }
.t-item { padding-left: 10px; border-left: 3px solid transparent; }
.t-item.v-good { border-left-color: var(--val-good); } .t-item.v-fair { border-left-color: var(--val-fair); } .t-item.v-bad { border-left-color: var(--val-bad); }
.verdict.fair { border-color: var(--warn); background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 10%, transparent), var(--card2) 60%); }
ul.list li.value-row { border-left: 4px solid var(--line); }
ul.list li.value-row.v-good { border-left-color: var(--val-good); } ul.list li.value-row.v-fair { border-left-color: var(--val-fair); } ul.list li.value-row.v-bad { border-left-color: var(--val-bad); }
.why-pass { border-color: color-mix(in srgb, var(--val-fair) 45%, var(--line)); }
.section-sub { font-weight: 700; margin: 4px 2px 8px; color: var(--text-soft); }

.chips.wrap { flex-wrap: wrap; overflow: visible; }

/* ---------- spreads + totals rows ---------- */
.lines { display: grid; gap: 8px; margin-top: 10px; }
.line-row { display: flex; align-items: center; gap: 10px; background: var(--card2); border-radius: 12px; padding: 10px 12px; border-left: 4px solid var(--line); }
.line-row.v-good { border-left-color: var(--val-good); } .line-row.v-fair { border-left-color: var(--val-fair); } .line-row.v-bad { border-left-color: var(--val-bad); }
.line-main { flex: 1; min-width: 0; }
.line-label { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-right: 6px; }
.chips button[aria-disabled="true"] { opacity: .55; }

/* ---------- plan ---------- */
.plan-badge { display: inline-block; margin: 6px 0; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--line); color: var(--text); letter-spacing: .4px; text-transform: uppercase; }
.plan-badge.pro { background: var(--btn-bg); color: var(--btn-fg); }
.menu-account .btn { margin-top: 6px; }
.upgrade-card { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }

/* ---------- player props ---------- */
.props-btn { margin-top: 10px; }
#props-body .chips { margin: 10px 0 2px; }
#props-body ul.list li strong { white-space: normal; }

/* ---------- bet coach ---------- */
.coach-block { background: var(--card2); border-radius: 14px; padding: 12px; margin-top: 10px; border-left: 4px solid transparent; }
.coach-block.v-good { border-left-color: var(--val-good); } .coach-block.v-fair { border-left-color: var(--val-fair); } .coach-block.v-bad { border-left-color: var(--val-bad); }
.coach-block h3 { margin: 0; font-size: 15px; }
.coach-block p { margin: 6px 0 0; }
.coach-why, .coach-tips { margin: 6px 0 0; padding-left: 18px; color: var(--text-soft); font-size: 14px; line-height: 1.5; }
.sim-result { font-size: 26px; font-weight: 800; margin-top: 10px; }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: 12px 0 8px; }
.hist span { flex: 1; border-radius: 4px 4px 0 0; }
.hist .up { background: var(--good); } .hist .down { background: var(--bad); opacity: .85; }

/* ---------- fantasy lineup ---------- */
.lineup-card { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.lineup-slots { display: grid; gap: 6px; margin-top: 10px; }
.slot { display: flex; align-items: center; gap: 10px; background: var(--card2); border-radius: 10px; padding: 8px 10px; }
.slot-pos { font-size: 11px; font-weight: 800; min-width: 34px; text-align: center; padding: 3px 0; border-radius: 6px; background: var(--btn-bg); color: var(--btn-fg); }
.slot-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- sign in ---------- */
.auth-card { max-width: 440px; margin: 16px auto 8px; padding: 24px 20px; }
.auth-card h1 { font-size: 28px; line-height: 1.1; margin: 4px 0 8px; }
.checkline { display: flex !important; gap: 10px; align-items: flex-start; font-size: 13px !important; color: var(--muted); margin: 16px 0 4px !important; cursor: pointer; font-weight: 400 !important; }
.checkline input { width: 20px; min-height: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 18px 0 4px; }
.code-inputs input { text-align: center; font-size: 24px; font-weight: 800; padding: 0; min-height: 54px; }
.menu-account { padding: 6px 6px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.menu-account b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.signed-in .signed-out-only { display: none !important; }
.top-right .btn { white-space: nowrap; }
body[data-view="signin"] .top-signin, body[data-view="signin"] #open-app { display: none; }
@media (max-width: 420px) { .top-signin { display: none; } }
code { background: var(--card2); padding: 1px 5px; border-radius: 6px; font-size: .92em; }

/* ---------- show the math ---------- */
details.math { margin-top: 10px; }
details.math summary { cursor: pointer; color: var(--accent-text); font-size: 13px; font-weight: 700; padding: 6px 0; list-style: none; }
details.math summary::before { content: "▸ "; }
details.math[open] summary::before { content: "▾ "; }
.math-grid { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 6px 0 0; font-size: 13px; }
.math-grid dt { color: var(--muted); }
.math-grid dd { margin: 0; text-align: right; font-weight: 700; }
.stale { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); color: var(--text); }
.stale::before { content: "⚠ "; }
.error-card { border-color: var(--bad); }
.error-card h3 { margin: 0 0 4px; }

/* ---------- probability highlight: fair win chance above 50% (not a buy signal) ---------- */
ul.list li.prob-hot { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: linear-gradient(100deg, color-mix(in srgb, var(--g1) 10%, var(--card2)), color-mix(in srgb, var(--g2) 6%, var(--card2))); animation: probGlow 2.2s ease-in-out infinite; }
.prob-flag { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.prob-flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes probGlow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 10%, transparent); } 50% { box-shadow: 0 0 16px 2px color-mix(in srgb, var(--accent) 22%, transparent); } }

/* ---------- reduced motion: no scrolling, no pulsing ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker-track { animation: none !important; }
  .live-dot, .when.live { animation: none !important; }
  ul.list li.prob-hot { animation: none !important; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
}
