/* The Plus Side — tip-off stats. Layout: a top bar, then one centered column (max 72rem) of cards. */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --ink: #0d1421;
  --muted: #5b6577;
  --line: #dde2ea;
  --accent: #2b50e8;
  --accent-soft: #e5eafd;
  --plus: #0b8f52;
  --miss: #c93c3c;
  --bar-other: #c9d0dc;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1a; --surface: #121a2a; --ink: #e9edf5; --muted: #95a1b6; --line: #253149;
    --accent: #7d97ff; --accent-soft: #1c2747; --plus: #3dd68c; --miss: #ff7a7a; --bar-other: #34415c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f1a; --surface: #121a2a; --ink: #e9edf5; --muted: #95a1b6; --line: #253149;
  --accent: #7d97ff; --accent-soft: #1c2747; --plus: #3dd68c; --miss: #ff7a7a; --bar-other: #34415c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }

/* top bar */
.bar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar .wrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 1.6rem; height: 1.6rem; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; }
.brand small { font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--muted); text-transform: none; letter-spacing: 0; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 500; padding: .3rem .6rem; border-radius: 6px; }
.nav a:hover { color: var(--ink); background: var(--bg); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

main.wrap { padding-block: 1.75rem 3rem; display: flex; flex-direction: column; gap: 2rem; }

/* type */
.eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: 1.6rem; text-transform: uppercase; letter-spacing: .02em; }
h3 { font-size: 1.25rem; }
.lede { color: var(--muted); max-width: 62ch; margin: .5rem 0 0; }
.note { color: var(--muted); font-size: .875rem; max-width: 70ch; margin: .35rem 0 0; }
.num { font-variant-numeric: tabular-nums; }

/* blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; min-width: 0; }
.section { display: flex; flex-direction: column; gap: .9rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.section-head > div { min-width: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); }
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.tile .label { color: var(--muted); font-size: .85rem; }
.tile .big { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .sub { color: var(--muted); font-size: .8rem; }

/* hero */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.hero > div { min-width: 0; }
.record { display: flex; gap: .6rem; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: baseline; gap: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.pill b { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* game card */
.game { display: flex; flex-direction: column; gap: .85rem; }
.game-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; color: var(--muted); font-size: .85rem; }
.matchline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: .5rem; }
.matchline .t { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.matchline .t.home { text-align: right; }
.matchline .at { color: var(--muted); font-size: .8rem; padding-bottom: .25rem; }
.matchline .p { display: block; font-family: var(--font-body); font-weight: 600; font-size: .95rem; color: var(--muted); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.matchline .fav .p { color: var(--accent); }
.split { display: flex; height: .55rem; border-radius: 999px; overflow: hidden; background: var(--bar-other); }
.split span { display: block; height: 100%; }
.split .a { background: var(--bar-other); }
.split .fav { background: var(--accent); }
.tipline { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.picks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.picks li { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .5rem; align-items: center; }
.picks .rank { font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.picks .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picks .who small { color: var(--muted); margin-left: .35rem; }
.picks .pct { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.picks li:first-child .pct { color: var(--accent); }
.subhead { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
details.more summary { cursor: pointer; color: var(--accent); font-size: .875rem; font-weight: 500; }
details.more[open] summary { margin-bottom: .6rem; }
.lineups { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 420px) { .lineups { grid-template-columns: 1fr; } }

/* chips */
.chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: .05rem .5rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.chip.hit { color: var(--plus); }
.chip.miss { color: var(--miss); }
.chip.pending { color: var(--muted); }

/* tables */
.scroll { overflow-x: auto; }
.scroll.tall { max-height: 34rem; overflow-y: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.data th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-weight: 600; font-size: .8rem; text-align: right; padding: .45rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
table.data td { text-align: right; padding: .45rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data .l { text-align: left; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--bg); }
th button.sort { all: unset; cursor: pointer; }
th button.sort:focus-visible { outline: 2px solid var(--accent); border-radius: 3px; }
th[aria-sort="descending"] button.sort::after { content: " ↓"; }
th[aria-sort="ascending"] button.sort::after { content: " ↑"; }

/* controls */
.controls { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.controls label { font-size: .85rem; color: var(--muted); }
select, input[type="search"] {
  font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem;
}
input[type="search"] { width: min(100%, 15rem); }

.empty { color: var(--muted); padding: 1rem 0; }
.prose { max-width: 66ch; }
.prose p, .prose li { color: var(--ink); }
.prose h2 { margin-top: 1.5rem; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer .wrap { padding-block: 1.25rem 2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .game { animation: rise .35s ease-out both; }
  @keyframes rise { from { transform: translateY(6px); opacity: .001; } to { transform: none; opacity: 1; } }
}

@media (max-width: 640px) {
  .bar { position: static; }
  .bar .wrap { gap: .4rem; }
  .nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .big { font-size: 2rem; }
}

/* fair odds under a pick's percentage */
.picks .pct { text-align: right; }
.picks .pct .fair { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--muted); line-height: 1.1; }
.valuelink { font-size: .85rem; font-weight: 500; }
