:root {
  --bg: #faf8f4; --card: #ffffff; --ink: #16181d; --muted: #5d6472; --line: #ebe6dc;
  --mango: #ff9f1c; --mango-deep: #d97706; --mango-soft: #fff3e0;
  --up: #1b8a5a; --up-soft: #e6f5ee; --down: #c2412d; --down-soft: #fdecea;
  --market: #4657c9; --radius: 14px; --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 4px 16px rgba(20, 20, 30, .04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317; --card: #1a1d23; --ink: #eef0f3; --muted: #9aa2b1; --line: #2a2e36;
    --mango-soft: #2b2112; --up-soft: #12261d; --down-soft: #2c1714; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317; --card: #1a1d23; --ink: #eef0f3; --muted: #9aa2b1; --line: #2a2e36;
  --mango-soft: #2b2112; --up-soft: #12261d; --down-soft: #2c1714; --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums; }
a { color: var(--mango-deep); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; margin-top: 1.2em; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.fine { color: var(--muted); font-size: .85rem; }
.scroll { overflow-x: auto; }

/* 21+ bar */
.age-bar { background: #16181d; color: #f3f3f3; font-size: .85rem; display: flex; gap: 12px; align-items: center;
  justify-content: center; padding: 8px 16px; flex-wrap: wrap; text-align: center; }
.age-bar p { margin: 0; }
.age-bar a { color: #ffc46b; }
.age-ok { background: var(--mango); color: #111; border: 0; border-radius: 999px; padding: 4px 12px; font-weight: 600; cursor: pointer; }
.age-bar.done { display: none; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 1.25rem; font-weight: 600; }
.brand b { color: var(--mango-deep); }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--mango-soft); }
.signin { text-decoration: none; background: var(--ink); color: var(--bg); padding: 7px 14px; border-radius: 999px; font-size: .9rem; white-space: nowrap; }
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; }
  .nav { order: 3; width: 100%; margin: 0 -10px; }
  .signin { margin-left: auto; }
}

main { padding: 24px 0 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.note { background: var(--mango-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }

/* chips */
.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6em; padding: 2px 6px;
  border-radius: 7px; background: var(--team); color: var(--team-ink); font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
.chip.sm { font-size: .7rem; min-width: 2.4em; padding: 1px 5px; }
.chip.lg { font-size: 1rem; padding: 4px 10px; }
.chip.xl { font-size: 1.3rem; padding: 10px 12px; min-width: 3.4em; border-radius: 12px; }

/* hero */
.hero { padding: 16px 0 28px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); max-width: 16ch; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 18px; }
.hero-stats div, .kpis div { display: flex; flex-direction: column; }
.hero-stats b, .kpis b { font-size: 1.6rem; }
.hero-stats span, .kpis span { color: var(--muted); font-size: .85rem; max-width: 22ch; }
.kpis { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; }

/* week grid */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 24px; }
.gc { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.gc:hover { transform: translateY(-2px); border-color: var(--mango); }
.gc-top { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.gc-teams { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; gap: 6px; }
.gc-teams .nm { font-weight: 600; }
.at { color: var(--muted); font-weight: 400; }
.gc-pick { display: flex; justify-content: space-between; font-size: .9rem; }
.mkt { color: var(--market); }
.live { color: var(--down); font-weight: 600; }
.meter { height: 6px; background: var(--line); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--team); }

/* picker */
.pick-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.pick-form label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; font-size: .85rem; color: var(--muted); }
select, input { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%; }
.swap { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 1.1rem; }
.go, .btn { background: var(--mango); color: #16181d; border: 0; font-weight: 700; border-radius: 10px; padding: 11px 20px; cursor: pointer; font-size: 1rem; text-decoration: none; display: inline-block; }
.go:hover, .btn:hover { background: #ffb547; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.danger { background: var(--down); color: #fff; }

/* matchup */
.mh { margin-bottom: 18px; }
.mh-teams { display: flex; align-items: center; gap: 14px; }
.mh-names { flex: 1; text-align: center; }
.mh-names h1 { font-size: clamp(1.3rem, 3.4vw, 2rem); margin-bottom: .25em; }
.mh-sub { color: var(--muted); margin: 0; font-size: .9rem; }
@media (max-width: 560px) { .mh-teams .chip.xl { display: none; } }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 920px) { .grid { grid-template-columns: 1fr; } }
.side { position: sticky; top: 76px; }
@media (max-width: 920px) { .side { position: static; } }

.verdict { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
@media (max-width: 640px) { .verdict { grid-template-columns: 1fr; } }
.pick-label { text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; color: var(--muted); }
.pick-team { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 6px 0; }
.pick-prob .big { font-size: 2.6rem; font-weight: 800; color: var(--ink); }
.pbar { margin-bottom: 12px; }
.pbar-label { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.pbar-track { display: flex; height: 32px; border-radius: 9px; overflow: hidden; background: var(--line); }
.seg { display: flex; align-items: center; padding: 0 10px; font-size: .82rem; font-weight: 700; white-space: nowrap;
  background: var(--team); color: var(--team-ink); min-width: 0; overflow: hidden; }
.seg.b { justify-content: flex-end; }
.pbar.market .seg { opacity: .72; }
.agree { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }

.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .reasons { grid-template-columns: 1fr; } }
.reasons ol { margin: 0; padding-left: 1.2em; }
.reasons li { margin-bottom: .55em; }
.tag { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; margin-right: 6px; vertical-align: 2px; }
.tag.up { background: var(--up-soft); color: var(--up); }
.tag.down { background: var(--down-soft); color: var(--down); }
.pro { border-top: 3px solid var(--up); }
.con { border-top: 3px solid var(--down); }

table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
thead th { color: var(--muted); font-weight: 500; font-size: .8rem; }
.lines td, .lines thead th:not(:first-child) { text-align: right; }
.cmp td { text-align: center; width: 30%; }
.cmp th { text-align: center; color: var(--muted); font-weight: 500; font-size: .85rem; }
.rk { color: var(--muted); font-size: .72rem; vertical-align: 1px; }
.res.w { color: var(--up); font-weight: 700; }
.res.l { color: var(--down); font-weight: 700; }
.sim { padding-left: 1.1em; }
.books { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.books-title { font-weight: 600; margin-right: 4px; }
.book { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; text-decoration: none; color: var(--ink); font-size: .9rem; }
.book:hover { border-color: var(--mango); }
.books .fine { width: 100%; margin: 4px 0 0; }
.method { margin-top: 4px; }

.mu { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mu > .chip, .inj > .chip { align-self: flex-start; }
.mu:last-of-type { border-bottom: 0; }
.mu-name { font-weight: 600; }
.pos { color: var(--muted); font-weight: 400; font-size: .8rem; }
.mu-line { font-size: .88rem; }
.mu-vs, .mu-note { font-size: .8rem; color: var(--muted); }
.inj { display: flex; gap: 10px; margin-bottom: 10px; }
.inj ul { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.inj li { margin-bottom: 3px; }
.inj p { margin: 0; }
.st { font-size: .68rem; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; font-weight: 700; }
.st.out { background: var(--down-soft); color: var(--down); }
.st.doubtful { background: var(--mango-soft); color: var(--mango-deep); }
.st.questionable { background: var(--line); color: var(--muted); }
.reg { font-size: .7rem; color: var(--mango-deep); }

.cal td:last-child { width: 40%; }
.calbar { position: relative; height: 18px; }
.calbar span { position: absolute; left: 0; height: 8px; border-radius: 4px; }
.calbar .pred { top: 0; background: var(--mango); opacity: .45; }
.calbar .act { top: 10px; background: var(--mango-deep); }

.page-head { margin: 8px 0 20px; }
.prose { max-width: 760px; }
.prose li { margin-bottom: .5em; }
.steps li { margin-bottom: 1em; }
.tip .btn { font-size: 1.1rem; }

/* account */
.acct { max-width: 520px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 9px; border-radius: 10px; cursor: pointer; font: inherit; }
.tabs button[aria-selected="true"] { background: var(--mango-soft); border-color: var(--mango); font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.form small { color: var(--muted); }
.form .check { flex-direction: row; align-items: center; gap: 8px; }
.form .check input { width: auto; }
.msg { min-height: 1.4em; margin: 10px 0 0; font-size: .9rem; }
.msg.err { color: var(--down); }

.foot { border-top: 1px solid var(--line); background: var(--card); padding: 24px 0 32px; font-size: .9rem; }
.foot .rg { max-width: 80ch; }
