/* ==========================================================================
   CFB Pick'em — design system
   Light/dark via tokens. Accent + status colors validated against surfaces
   (dataviz method); status colors NEVER carry meaning alone — every result
   pairs an icon + word with the color.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* surfaces */
  --bg: #f4f5f7;
  --bg-accent: #eef1f5;
  --card: #ffffff;
  --card-2: #f8f9fb;
  --border: #e3e6ea;
  --border-strong: #cdd3da;

  /* ink */
  --text: #14181e;
  --text-2: #5a6472;
  --text-3: #8a93a0;

  /* brand + status (validated) */
  --accent: #2a78d6;
  --accent-ink: #1e5da8;
  --accent-soft: #e9f1fb;
  --win: #0ca30c;
  --win-ink: #067506;
  --win-soft: #e9f6e9;
  --loss: #d03b3b;
  --loss-ink: #b02f2f;
  --loss-soft: #fbeaea;
  --push: #b98508;
  --push-soft: #fdf4dd;
  --live: #d03b3b;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(20 24 30 / 0.05), 0 4px 16px rgb(20 24 30 / 0.05);
  --shadow-raised: 0 2px 6px rgb(20 24 30 / 0.08), 0 12px 32px rgb(20 24 30 / 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --bg-accent: #12151a;
    --card: #171a1f;
    --card-2: #1d2127;
    --border: #262b33;
    --border-strong: #343b45;

    --text: #eceef1;
    --text-2: #9aa3ae;
    --text-3: #6b7480;

    --accent: #3987e5;
    --accent-ink: #6ba6ec;
    --accent-soft: #17273c;
    --win: #0ca30c;
    --win-ink: #4cc24c;
    --win-soft: #142914;
    --loss: #d03b3b;
    --loss-ink: #e06c6c;
    --loss-soft: #331717;
    --push: #fab219;
    --push-soft: #302811;

    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
    --shadow-raised: 0 2px 6px rgb(0 0 0 / 0.35), 0 12px 32px rgb(0 0 0 / 0.35);
  }
}

/* ------------------------------------------------------------------ reset */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.hidden { display: none !important; }

button { font: inherit; }

/* ----------------------------------------------------------------- header */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.bar {
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.bar .spacer { margin-left: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 6px;
  margin-right: 2px;
  font-weight: 750;
  font-size: 21px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand svg { filter: drop-shadow(0 1px 3px rgb(0 0 0 / 0.25)); }
/* Sized here, not on the SVG's width/height attributes, so the one rule below
   can shrink it for phones. CSS wins over the presentational attributes, which
   stay as the no-stylesheet fallback. */
.brand svg { display: block; width: 40px; height: 40px; }
.brand .yr {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-style: normal;
  font-weight: 750;
  font-size: 10.5px;
  color: var(--accent-ink);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 99px;
  padding: 2.5px 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.brand .yr:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  background: var(--card-2)
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" fill="none" stroke="%238a93a0" stroke-width="1.6" stroke-linecap="round"/></svg>')
    no-repeat right 10px center;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 28px 7px 14px;
  cursor: pointer;
}
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.user-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card-2);
  border-radius: 99px;
  padding: 4px 12px 4px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.15s;
}
.user-chip:hover { border-color: var(--border-strong); }
/* Unverified email: a dot saying the profile panel has something to act on.
   Never the only signal — the panel spells it out with a labelled button. */
.user-chip.needs-verify::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--push);
  border: 2px solid var(--card);
}
.user-chip .balance.neg {
  color: var(--loss-ink);
  background: var(--loss-soft);
}
.user-chip .balance {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--win-ink);
  background: var(--win-soft);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 12px;
}
.avatar-img, .player .avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.avatar .avatar-inner, .avatar-inner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}
label.menu-item { display: block; }

.user-chip .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------ mode toggle */

.mode-toggle {
  display: inline-flex;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}
.mode-toggle button {
  border: 0;
  background: none;
  border-radius: 99px;
  padding: 4px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  color: var(--accent-ink);
  cursor: pointer;
}
.mode-toggle button.on {
  background: var(--accent);
  color: #fff;
}

/* ------------------------------------------------------------------- tabs */

nav.tabs {
  display: inline-flex;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}
nav.tabs button {
  border: 0;
  background: none;
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s;
}
nav.tabs button:hover { color: var(--text); }
nav.tabs button.on {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------------------ layout */

main {
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 80px;
}

/* ------------------------------------------------------------- status strip */

.status {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px 16px;
  margin-bottom: 16px;
  position: sticky;
  top: 58px;
  z-index: 30;
}

.status .tiles {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.tile .lbl {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 2px;
}
.tile .big {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.tile .big small { font-size: 14px; font-weight: 650; color: var(--text-3); }
.tile .big.gold { color: #d4a017; }
.ticket-ic { display: block; width: 30px; height: 26px; }
.tile .big.money-pos { color: var(--win-ink); }
.tile .big.money-neg { color: var(--loss-ink); }

.status .spacer { margin-left: auto; }

.saving { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.saving.err { color: var(--loss-ink); }

.btn {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--border-strong); color: var(--text); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* pick progress — thin rounded bar (mark spec: 4px, rounded data end) */
.progress {
  margin-top: 12px;
  height: 4px;
  border-radius: 4px;
  background: var(--bg-accent);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* Desktop: the games list runs two-up so 50+ game weeks aren't a mile of
   scrolling. Mobile keeps the single column untouched. */
@media (min-width: 1000px) {
  #games {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    align-items: start;
  }
  #games .day-head, #games .notice { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------- day groups */

.day-head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  padding: 18px 4px 8px;
}

/* ------------------------------------------------------------------- games */

.game {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}

.game .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.game .meta .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.game .meta .live-lbl { color: var(--loss-ink); font-weight: 700; }

.sides { padding: 6px 8px 8px; }

.side {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
}
.side + .side { margin-top: 2px; }        /* 2px spacer between marks */
.side:hover:not(:disabled) { background: var(--card-2); }
.side:disabled { cursor: default; }

.side .logo {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: contain;
}
.side .logo-fallback {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--bg-accent);
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.side .team {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex: 1;
}
.side .team .name {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side .team .conf {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.side .score {
  font-size: 17px;
  font-weight: 800;
  min-width: 30px;
  text-align: right;
  color: var(--text-2);
}
.side .score.leading { color: var(--text); }

.spread-chip {
  flex: none;
  min-width: 56px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
}

.spread-chip.noline {
  color: var(--text-3);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  border-style: dashed;
}

/* picked */
.side.picked {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.side.picked .team .name { color: var(--accent-ink); }
.side.picked .spread-chip {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pick-mark {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: transparent;
}
.side.picked .pick-mark, .pick-mark.checked {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.side.win .pick-mark.checked  { border-color: var(--win);  background: var(--win); }
.side.loss .pick-mark.checked { border-color: var(--loss); background: var(--loss); }
.side.push .pick-mark.checked { border-color: var(--push); background: var(--push); }

/* graded results — color + icon + word, never color alone */
.result-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 99px;
  padding: 3px 9px;
}
.result-badge.win  { background: var(--win-soft);  color: var(--win-ink); }
.result-badge.loss { background: var(--loss-soft); color: var(--loss-ink); }
.result-badge.push { background: var(--push-soft); color: var(--push); }
.result-badge.void { background: var(--bg-accent); color: var(--text-3); }

.side.win  { background: var(--win-soft); }
.side.loss { background: var(--loss-soft); }
.side.push { background: var(--push-soft); }
.side.win .spread-chip, .side.loss .spread-chip, .side.push .spread-chip {
  background: transparent;
}

/* stakes row */
.stakes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border-top: 1px solid var(--border);
  background: var(--card-2);
  padding: 8px 10px;
}
.stake {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
}
.stake input {
  width: 76px;
  font: inherit;
  font-weight: 650;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
}
.stake input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.stake .to-win { font-size: 11px; color: var(--text-3); }

/* ----------------------------------------------------------------- tables */

.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table-card .table-title {
  padding: 14px 18px 4px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.table-card .table-sub {
  padding: 0 18px 10px;
  font-size: 12.5px;
  color: var(--text-3);
}

.table-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  flex-wrap: wrap;
}
.table-head-row .table-title, .table-head-row .table-sub { padding: 0; }
.table-head-row .table-sub { margin-top: 2px; }

nav.tabs.mini { padding: 2px; }
nav.tabs.mini button { padding: 4px 12px; font-size: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; }
th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
td { border-bottom: 1px solid var(--border); font-weight: 550; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: var(--card-2); }

td.num, th.num { text-align: right; }
td .rank {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
  color: var(--text-3);
  background: var(--bg-accent);
}
td .rank.r1 { background: #d4a017; color: #fff; }   /* gold */
td .rank.r2 { background: #8f98a3; color: #fff; }   /* silver */
td .rank.r3 { background: #b08d57; color: #fff; }   /* bronze */

.player { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.player .dot {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--bg-accent);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* inline win% bar — thin mark, rounded end */
.pctbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.pctbar .track {
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--bg-accent);
  overflow: hidden;
}
.pctbar .track i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.pos { color: var(--win-ink); font-weight: 750; }
.neg { color: var(--loss-ink); font-weight: 750; }

/* -------------------------------------------------------------- dashboard */

.hero-sport {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 28px 30px;
  text-align: center;
  margin-bottom: 16px;
}
/* field: faint yard lines sweeping the hero */
.hero-sport::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(105deg,
      transparent 0 88px,
      color-mix(in srgb, var(--text) 4%, transparent) 88px 90px),
    radial-gradient(900px 320px at 50% -40%,
      color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%);
  pointer-events: none;
}
.hero-sport > * { position: relative; }

.kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 99px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.hero-sport h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 0.98;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
}
.hero-sport h1 span {
  color: var(--accent);
  -webkit-text-stroke: 0;
}
.hero-sport p {
  margin: 0 auto 20px;
  max-width: 460px;
  color: var(--text-2);
  font-size: 15px;
}

.cta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.btn.big { padding: 11px 22px; font-size: 14px; border-radius: 10px; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.hstat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 26px;
  border-right: 1px solid var(--border);
}
.hstat:last-child { border-right: 0; }
.hstat-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hstat-num.gold { color: #d4a017; }
.hstat-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.dash {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
/* Column counts that divide four cards evenly — never an orphan row. */
@media (min-width: 680px)  { .dash { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1440px) { .dash { grid-template-columns: repeat(4, 1fr); } }
.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.dash-card.wide { grid-column: 1 / -1; }

.card-kicker {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-ink);
  margin-bottom: 6px;
}
.dash-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.cicon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
}
.dash-card p { margin: 0 0 10px; font-size: 13.5px; color: var(--text-2); }
.dash-card p:last-child { margin-bottom: 0; }
.dash-card p.fine { font-size: 12.5px; color: var(--text-3); }
.dash-card ul, .dash-card ol.steps { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); }
.dash-card li { margin-bottom: 7px; }
.dash-card li:last-child { margin-bottom: 0; }
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps li {
  position: relative;
  padding-left: 30px;
  counter-increment: step;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.dash-card.soon {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  background: var(--bg-accent);
  box-shadow: none;
}
.soon-tag {
  flex: none;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 4px 10px;
}
.dash-card.soon p { margin: 0; font-size: 13px; color: var(--text-3); }

@media (max-width: 620px) {
  .dash { grid-template-columns: 1fr; }
  .hero-sport { padding: 22px 14px 16px; }
  .kicker { font-size: 10px; padding: 3px 10px; margin-bottom: 10px; }
  .hero-sport h1 { font-size: clamp(26px, 8vw, 34px); }
  .hero-sport p { font-size: 13.5px; margin-bottom: 14px; }
  .cta-row { gap: 8px; margin-bottom: 16px; }
  .cta-row .btn.big { flex: 1; padding: 11px 12px; font-size: 13px; }

  /* Even 2x2 instead of a ragged wrap with stray dividers. */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 0;
    padding-top: 14px;
  }
  .hstat { padding: 0 10px; }
  .hstat:nth-child(2n) { border-right: 0; }
  .hstat-num { font-size: 19px; }
  .hstat-lbl { font-size: 10px; }
}

/* -------------------------------------------------------------- user menu */

.user-menu { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-raised);
  padding: 5px;
  z-index: 50;
}
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.menu-item:hover { background: var(--card-2); }

@media (max-width: 620px) {
  .dash { grid-template-columns: 1fr; }
  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 21px; }
}

/* ----------------------------------------------------------- prize banner */

.prize-banner {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--card);
  border: 1px solid color-mix(in srgb, #d4a017 45%, var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 14px;
  background-image: radial-gradient(500px 140px at 100% 0%,
    color-mix(in srgb, #d4a017 10%, transparent), transparent 70%);
}
.prize-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}
.prize-amount {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #d4a017;
  line-height: 1.1;
}
.prize-banner p { margin: 0; font-size: 13.5px; color: var(--text-2); max-width: 520px; }

@media (max-width: 620px) {
  .prize-banner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ------------------------------------------------------------ enter panel */

.enter-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.enter-panel .ep-title { font-size: 15px; font-weight: 750; }
.enter-panel .ep-sub { font-size: 13px; color: var(--text-2); }
.enter-panel .ep-need { font-weight: 750; color: #d4a017; }
.enter-panel .spacer { margin-left: auto; }
.enter-panel .ep-ok { color: var(--win-ink); font-weight: 700; font-size: 13px; }

/* No ticket: warning tint, and the ticket mark makes the state legible before
   the sentence is read. Never colour alone — the heading says it outright. */
.enter-panel.needs-ticket {
  border-color: color-mix(in srgb, var(--push) 55%, var(--border));
  background: color-mix(in srgb, var(--push-soft) 55%, var(--card));
}
/* Already in the free pool: settled state, not a call to action. */
.enter-panel.is-free {
  border-color: color-mix(in srgb, var(--win) 45%, var(--border));
  background: color-mix(in srgb, var(--win-soft) 55%, var(--card));
}
.enter-panel.is-free .ep-mark { color: var(--win-ink); }

.enter-panel .ep-mark { display: block; color: var(--push); flex: 0 0 auto; }
.enter-panel .ep-mark svg { display: block; width: 40px; height: 33px; }

/* ------------------------------------------------------------- pot banner */

.pot-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid color-mix(in srgb, #d4a017 40%, var(--border));
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 13.5px;
  color: var(--text-2);
}
.pot-banner .pot-amount { font-size: 19px; font-weight: 800; color: #d4a017; }
.pot-banner .pot-payout { font-weight: 650; }
.pot-banner .pot-payout .place { color: var(--text-3); font-size: 12px; }

.admin-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-accent);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
}
.admin-inline .admin-lbl {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-right: 4px;
}
.admin-inline input[type="number"] { width: 90px; }
.admin-inline input[type="text"] { flex: 1; min-width: 140px; }
.admin-inline input {
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 9px;
}

.user-chip .balance {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--win-ink);
  background: var(--win-soft);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 12px;
}

/* ----------------------------------------------------------------- notice */

.notice {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* -------------------------------------------------------- season schedule */

.sched-week {
  border-top: 1px solid var(--border);
}
.sched-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.sched-head:hover { background: var(--card-2); }
.sched-head .cnt { color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.sched-head .arrow {
  margin-left: auto;
  color: var(--text-3);
  transition: transform 0.15s;
}
.sched-week.open .sched-head .arrow { transform: rotate(180deg); }

.sched-games { display: none; padding: 0 10px 10px; }
.sched-week.open .sched-games { display: block; }

.sched-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}
.sched-row:hover { background: var(--card-2); }
.sched-row .when { flex: none; width: 118px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.sched-row .logo, .sched-row .logo-fallback { width: 20px; height: 20px; font-size: 8px; }
.sched-row .matchup {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-row .at { color: var(--text-3); font-weight: 500; }
.sched-row .score { font-weight: 750; font-variant-numeric: tabular-nums; }
.sched-row .spread-chip { min-width: 48px; padding: 3px 7px; font-size: 12px; }

@media (min-width: 1000px) {
  .sched-games { display: none; }
  .sched-week.open .sched-games {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }
}
@media (max-width: 620px) {
  .sched-row .when { width: 84px; }
}

.sub-picks {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 14px 14px !important;
}
.sub-pick {
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--card-2);
  border-radius: 99px;
  padding: 4px 10px;
  white-space: nowrap;
}
.sub-pick small { color: var(--text-3); font-weight: 600; }
.sub-pick.win  { background: var(--win-soft);  color: var(--win-ink);  border-color: transparent; }
.sub-pick.loss { background: var(--loss-soft); color: var(--loss-ink); border-color: transparent; }
.sub-pick.push { background: var(--push-soft); color: var(--push);     border-color: transparent; }

.home-news-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 0;
}
.home-news-head h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.home-news-head a { font-size: 13px; font-weight: 650; color: var(--accent-ink); cursor: pointer; text-decoration: none; }
.home-news-head a:hover { text-decoration: underline; }

/* The home strip shows exactly one row of headlines at any width —
   whatever doesn't fit the row is hidden, never wrapped as a straggler. */
#homeNews {
  grid-template-rows: 1fr;
  grid-auto-rows: 0;
  row-gap: 0;
  overflow: hidden;
}

/* ------------------------------------------------------------------- news */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* Headline carousel — the Home strip only. The News tab is a full list and
   should stay one, so this is scoped to #homeNews rather than .news-grid. */
.news-dots { display: none; }
.news-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: width 0.18s ease, background 0.18s ease;
}
.news-dot.on { width: 18px; border-radius: 99px; background: var(--accent); }
.news-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 700px) {
  #homeNews {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Room for the card shadow, which a clipped scroller would shear off. */
    padding: 2px 2px 6px;
    margin-inline: -2px;
  }
  #homeNews::-webkit-scrollbar { display: none; }
  #homeNews .news-card {
    flex: 0 0 86%;
    scroll-snap-align: start;
  }
  .news-dots { display: flex; justify-content: center; gap: 7px; margin-top: 4px; }
}
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.news-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.news-card .news-body { padding: 12px 14px 14px; }
.news-card h4 { margin: 0 0 6px; font-size: 14.5px; line-height: 1.3; letter-spacing: -0.01em; }
.news-card p { margin: 0 0 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .news-time { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-3); }

/* ----------------------------------------------------------- roster strip */

.roster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.roster .roster-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 9px;
  min-width: 84px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-2);
}
.roster .roster-ava {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
}
.roster .roster-empty {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  padding: 4px 0;
}
.roster .roster-name {
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----------------------------------------------------------------- ledger */

.ledger-balance { font-weight: 800; color: #d4a017; }
.ledger-list {
  max-width: 560px;
  width: 100%;
  margin: 14px auto 0;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ledger-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row .ll { flex: 1; font-weight: 600; }
.ledger-row .lt { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.ledger-row .la { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-row .la.pos { color: var(--win-ink); }
.ledger-row .la.neg { color: var(--loss-ink); }

/* ------------------------------------------------------------ guest mode */

/* Sign-in opened over the site rather than instead of it, so a visitor who
   changes their mind still has the games behind them. */
#auth.as-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  min-height: 0;
  overflow-y: auto;
}
.auth-back {
  display: block;
  margin: -6px 0 14px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-3);
  cursor: pointer;
}
.auth-back:hover { color: var(--accent-ink); }

.guest-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 12px;
}
.guest-bar strong { display: block; font-size: 15px; }
.guest-bar span { font-size: 13px; color: var(--text-2); }
.guest-bar .spacer { margin-left: auto; }

/* A visitor's board is for reading. No hover lift, no pointer, no pick mark. */
#app.guest .side { cursor: default; opacity: 1; }
#app.guest .side:disabled { opacity: 1; }
#app.guest .side .pick-mark { visibility: hidden; }

/* ------------------------------------------------------- analytics chips */

/* Win probability. The meter is a light step of its own hue so the unfilled
   part still reads as part of the bar. Recessive by design — the spread is
   still the number that decides the pick. */
.wp-chip {
  display: inline-grid;
  gap: 4px;
  justify-items: center;
  width: 44px;
  flex: 0 0 auto;
}
.wp-chip .wp-num {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
/* A real track element rather than a pseudo-element behind the chip: the
   negative-z-index trick disappears under the parent's own background. */
.wp-chip .wp-track {
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  overflow: hidden;
}
.wp-chip .wp-track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  min-width: 2px;   /* a 1% favourite still shows something */
}

/* Pool split. A glyph, not just another percentage, so it is never mistaken
   for the win-probability number sitting beside it. */
.pool-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  background: var(--bg-accent);
  border-radius: 99px;
  padding: 3px 8px 3px 6px;
}
.pool-chip svg { width: 12px; height: 12px; opacity: 0.75; }

@media (max-width: 620px) {
  /* Tight rows: the spread and the pick mark matter most. */
  .wp-chip { min-width: 34px; }
  .pool-chip { padding: 2px 6px 2px 5px; font-size: 10.5px; }
  .pool-chip svg { display: none; }
}

/* Enhanced view has room for labels — but not on the same line. The stats take
   a full-width second row so the team name keeps the whole first one; sharing
   the row squeezed long names like "North Dakota State" onto two lines. */
.pc-team { flex-wrap: wrap; }
.pc-stats { display: grid; gap: 6px; flex: 1 0 100%; margin-top: 2px; }
.pc-stat {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}
.pc-stat .pc-k {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  white-space: nowrap;
}
.pc-stat .pc-bar {
  height: 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  overflow: hidden;
}
.pc-stat .pc-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.pc-stat .pc-bar.pool { background: color-mix(in srgb, var(--text-3) 20%, transparent); }
.pc-stat .pc-bar.pool i { background: var(--text-2); }
.pc-stat .pc-v {
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  min-width: 30px;
  text-align: right;
}

/* ------------------------------------------------- commissioner: everyone */

.tab-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 5px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--accent);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.admin-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 10px;
  text-align: center;
}
.admin-stat .v {
  display: block;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: proportional-nums;   /* standalone figures, not a column */
}
.admin-stat .l {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.admin-table { width: 100%; border-collapse: collapse; }
/* IPv6 is long enough to wreck a table on its own — let it break and shrink. */
.admin-table .v-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--text-2);
  word-break: break-all;
  max-width: 190px;
}
.v-hint { color: var(--text-3); font-style: italic; }
.v-pin {
  font-size: 10.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 1px 7px;
  text-decoration: none;
  white-space: nowrap;
}
.v-pin:hover { text-decoration: underline; }
.admin-table .u-email { color: var(--text-2); font-size: 13px; word-break: break-all; }
.admin-table .u-never { color: var(--text-3); }
.admin-table .u-ago { display: block; color: var(--text-3); font-size: 11.5px; }
.u-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }
.u-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 99px;
  padding: 2px 7px;
  white-space: nowrap;
}
.u-tag.new   { color: #fff; background: var(--accent); }
.u-tag.admin { color: var(--accent-ink); background: var(--accent-soft); }
.u-tag.bot   { color: var(--text-2); background: var(--bg-accent); }
.u-tag.ok    { color: var(--win-ink); background: var(--win-soft); }
.u-tag.warn  { color: var(--push); background: var(--push-soft); }

@media (max-width: 760px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  /* Email is the first thing worth losing — the name and status carry the row. */
  .admin-table th:nth-child(2), .admin-table td:nth-child(2) { display: none; }
}
@media (max-width: 520px) {
  .admin-table th:nth-child(4), .admin-table td:nth-child(4) { display: none; }
}

/* --------------------------------------------------------- profile panel */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: min(88dvh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-raised);
  overflow: hidden;
}
.modal-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px 13px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-top span { font-weight: 800; letter-spacing: -0.01em; }
.modal-top .spacer { margin-left: auto; }
.modal-body { padding: 22px 18px 20px; overflow-y: auto; }

.prof-head { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* The photo IS the upload control. The badge is always visible because a
   hover-only affordance is invisible on the phones most players use. */
.prof-photo {
  position: relative;
  width: 116px;
  height: 116px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.prof-photo .prof-ava {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 800;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.25);
}
.prof-photo .prof-cam {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  background: color-mix(in srgb, #000 58%, transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  opacity: 0;
  transition: opacity 0.15s;
}
.prof-photo .prof-cam svg { width: 26px; height: 26px; }
.prof-photo:hover .prof-cam,
.prof-photo:focus-visible .prof-cam { opacity: 1; }
.prof-photo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prof-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  border: 3px solid var(--card);
}
.prof-badge svg { width: 17px; height: 17px; }

.prof-name {
  margin: 14px 0 2px;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.prof-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 3px 8px;
}
.prof-sub { margin: 0; font-size: 12.5px; color: var(--text-3); }
.prof-link {
  font: inherit;
  font-weight: 650;
  color: var(--accent-ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

/* KPI row. Values use proportional figures: the page sets tabular-nums
   globally, which makes standalone display numbers look loose. */
.prof-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0 0;
}
.prof-stat {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.prof-stat .v {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: proportional-nums;
}
.prof-stat .l {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

/* Meter: track is a light step of the fill's own hue, so state reads across
   the whole bar rather than only where it is filled. */
.prof-meter {
  height: 4px;
  border-radius: 4px;
  margin-top: 8px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  overflow: hidden;
}
.prof-meter i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

.prof-sec {
  margin: 22px 0 8px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}
.prof-rows { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.prof-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.prof-row:last-child { border-bottom: 0; }
.prof-row .k { color: var(--text-3); font-weight: 650; }
.prof-row .v {
  margin-left: auto;
  text-align: right;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 7px;
}
.prof-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 99px;
  padding: 2px 8px;
}
.prof-pill svg { width: 11px; height: 11px; }
.prof-pill.ok { color: var(--win-ink); background: var(--win-soft); }
.prof-pill.warn { color: var(--push); background: var(--push-soft); }

.modal-sheet.modal-sm { max-width: 420px; }
.tk-mark { display: block; width: 56px; margin: 4px auto 16px; color: var(--accent); }
.tk-mark svg { display: block; width: 56px; height: 46px; }
.tk-title {
  margin: 0 0 14px;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-align: center;
}
.tk-copy { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.modal-body .btn.primary.big { display: block; width: 100%; margin-top: 4px; }
.tk-msg { margin: 12px 0 0; font-size: 13px; font-weight: 650; text-align: center; color: var(--loss-ink); min-height: 18px; }
.tk-msg.ok { color: var(--win-ink); }

.modal-body .ledger-list { max-width: none; margin: 0; max-height: 260px; }
.prof-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

@media (max-width: 460px) {
  .prof-stats { grid-template-columns: repeat(2, 1fr); }
  .modal-body { padding: 18px 14px 16px; }
}

/* ---------------------------------------------------------- enhanced view */

.card-mode {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.card-mode-top {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.card-mode-top span { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-progress { flex: 1; margin: 0; }

.deck {
  position: relative;
  flex: 1;
  max-width: 560px;
  width: 100%;
  margin: 12px auto;
}
.pick-card {
  position: absolute;
  inset: 0;
  margin: auto;
  max-height: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  padding: 22px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.pick-card.behind-1 { transform: translateY(14px) scale(0.96); opacity: 0.6; pointer-events: none; }
.pick-card.behind-2 { transform: translateY(26px) scale(0.92); opacity: 0.3; pointer-events: none; }
.pick-card.fly { transform: translateX(120%) rotate(8deg); opacity: 0; }

.pick-card .pc-meta {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 14px;
}
.pc-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--card-2);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pc-team:hover { border-color: var(--border-strong); }
.pc-team.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.pc-team img, .pc-team .logo-fallback { width: 44px; height: 44px; object-fit: contain; flex: none; }
.pc-team .logo-fallback { border-radius: 50%; font-size: 13px; display: grid; place-items: center; background: var(--bg-accent); color: var(--text-3); font-weight: 800; }
.pc-team .pc-name { flex: 1 1 auto; min-width: 0; text-align: left; }
.pc-team .pc-name strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.pc-team .pc-name small { color: var(--text-3); font-weight: 600; }
.pc-team .spread-chip { font-size: 15px; min-width: 62px; padding: 7px 10px; }

.pc-vs {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  letter-spacing: 0.12em;
  padding: 8px 0;
}

.card-mode-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.card-hint { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

.pc-done {
  text-align: center;
  margin: auto;
}
.pc-done h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.pc-done p { margin: 0 0 18px; color: var(--text-2); }

@media (max-width: 620px) {
  .card-hint { display: none; }
  .pick-card { padding: 16px; }
}

/* ---------------------------------------------------------------- line iq */

.liq-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.liq-row:last-of-type { border-bottom: 0; }
.liq-row .matchup { display: flex; align-items: center; gap: 8px; font-weight: 650; flex: 1; min-width: 240px; }
.liq-row .matchup img, .liq-row .matchup .logo-fallback { width: 24px; height: 24px; object-fit: contain; }
.liq-row .matchup .at { color: var(--text-3); font-weight: 500; }
.liq-row input {
  width: 90px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
}
.liq-diff { font-weight: 750; min-width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.liq-diff.good { color: var(--win-ink); }
.liq-diff.bad { color: var(--loss-ink); }
.liq-actions { padding-top: 14px; display: flex; align-items: center; gap: 12px; }
.liq-lb { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.liq-lb .lb-row { display: flex; gap: 10px; padding: 4px 0; font-size: 13.5px; }
.liq-lb .lb-row .rank { width: 24px; height: 24px; font-size: 12px; }
.liq-lb .lb-row .nm { flex: 1; font-weight: 650; }
.liq-lb .lb-row .sc { font-variant-numeric: tabular-nums; font-weight: 750; }

/* ------------------------------------------------------------ empty states */

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-2);
}
.empty .empty-icon { margin-bottom: 12px; opacity: 0.5; }
.empty h3 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.empty p { margin: 0; font-size: 13.5px; color: var(--text-3); }

/* ------------------------------------------------------------------- auth */

#auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1000px 500px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(800px 400px at 0% 110%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    var(--bg);
}

/* Split sign-in: pitch on the left, form on the right. The pitch is the first
   impression on a laptop; on a phone it collapses entirely rather than
   squeezing, and the card's own lockup carries the brand. */
.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 64px;
  align-items: center;
  width: 100%;
  max-width: 960px;
}
.auth-pitch { max-width: 430px; }
.auth-pitch .brand { margin: 0 0 28px; font-size: 25px; gap: 14px; }
.auth-pitch .brand svg { width: 50px; height: 50px; }
.auth-hero {
  margin: 0 0 26px;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.auth-hero span { color: var(--accent); }
.auth-points { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 13px; }
.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-2);
}
.auth-points svg { flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; color: var(--accent); }
.auth-note {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); max-width: 400px; gap: 0; }
  .auth-pitch { display: none; }
}
/* Scoped to .auth-wrap on purpose: the emailed confirmation page is a bare
   .card with no pitch beside it, and still needs its lockup. */
@media (min-width: 901px) {
  .auth-wrap .card .brand { display: none; }
  .auth-wrap .card { padding: 32px; }
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-raised);
  padding: 28px;
}
.card .brand { justify-content: center; margin: 0 0 18px; font-size: 20px; }

/* Reveal toggle. Sighted typo-checking on a phone keyboard is the whole point,
   so it is a real button with a state, not a decorative icon. */
.pw-field { position: relative; }
.pw-field input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-3);
  cursor: pointer;
}
.pw-toggle:hover { color: var(--text-2); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.pw-toggle svg { width: 19px; height: 19px; }
.pw-toggle .eye-slash { display: none; }
.pw-toggle.on { color: var(--accent-ink); }
.pw-toggle.on .eye-slash { display: block; }
.card h2 { margin: 0 0 2px; font-size: 20px; letter-spacing: -0.02em; text-align: center; }
.card p.sub { margin: 0 0 20px; color: var(--text-3); font-size: 13.5px; text-align: center; }
.card label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin: 14px 0 5px;
}
.card input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.15s;
}
.card input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.card .btn.primary { width: 100%; margin-top: 20px; padding: 11px; font-size: 14px; border-radius: 10px; }
.card .alt { text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--text-3); }
.card a { color: var(--accent-ink); font-weight: 650; cursor: pointer; text-decoration: none; }
.card a:hover { text-decoration: underline; }

.err { color: var(--loss-ink); font-size: 13px; font-weight: 600; margin-top: 10px; min-height: 18px; text-align: center; }

/* ----------------------------------------------------------------- mobile */

.t-short { display: none; }

@media (max-width: 900px) {
  /* Row 1: brand + mode toggle + wallet chip (right). Row 2: tabs, full width.
     Everything is trimmed so those three genuinely fit one line at 390px. */
  .bar { padding: 8px 12px; gap: 8px; min-height: 0; }
  .brand { font-size: 17px; gap: 9px; margin: 0; }
  .brand svg { width: 32px; height: 32px; }

  .mode-toggle { padding: 2px; }
  .mode-toggle button { padding: 4px 11px; font-size: 11.5px; }

  .user-chip { padding: 3px 8px 3px 3px; font-size: 11.5px; gap: 6px; }
  .user-chip .avatar { width: 22px; height: 22px; font-size: 10px; }
  .user-chip .balance { font-size: 11px; padding: 2px 7px; }

  /* Full basis: tabs always claim their own row, so nothing else wraps. */
  .bar nav.tabs {
    order: 10;
    flex: 0 0 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;                 /* the raw bar looked broken */
    -ms-overflow-style: none;
  }
  .bar nav.tabs::-webkit-scrollbar { display: none; }
  .bar nav.tabs button { white-space: nowrap; padding: 6px 11px; font-size: 12px; }
  /* Centre the strip; when it does overflow, keep it flush-left so the first
     tab is never scrolled out of reach. */
  .bar nav.tabs { justify-content: center; }
  .bar nav.tabs > * { flex: 0 0 auto; }

  /* Short labels so all five fit without a cut-off word. */
  .t-long { display: none; }
  .t-short { display: inline; }
}

/* Narrow phones: the wordmark is the first thing to go so brand, mode toggle
   and wallet chip stay on one line with the chip pinned right. Scoped to the
   app bar — the sign-in card and the emailed confirmation page have room for
   it and are the two places the name matters most. */
@media (max-width: 480px) {
  .bar .brand-name { display: none; }
  .bar { gap: 6px; padding: 8px 10px; }
  .mode-toggle button { padding: 4px 10px; }
  .bar nav.tabs button { padding: 6px 9px; font-size: 11.5px; }
}

@media (max-width: 620px) {
  .bar { gap: 8px; }
  .user-chip #userName { display: none; }   /* avatar + ticket count only */
  .brand { font-size: 15px; }
  .brand .yr { display: none; }
  .status { top: 52px; padding: 12px 14px 14px; }
  .status .tiles { gap: 18px; }
  .tile .big { font-size: 19px; }
  .side { padding: 8px 6px; gap: 8px; }
  .side .team .conf { display: none; }
  .side .logo, .side .logo-fallback { width: 24px; height: 24px; }
  .spread-chip { min-width: 50px; font-size: 12.5px; }
  th, td { padding: 9px 8px; font-size: 13.5px; }
  .pctbar .track { width: 44px; }
  .rb-word { display: none; }   /* icon still distinguishes results without color */
}

/* ------------------------------------------------------------- house bots */

.bots-sub { font-size: 13px; color: var(--text-3); }

.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.bot-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bot-head { display: flex; gap: 12px; align-items: center; }
.bot-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.bot-avatar {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
}
.bot-avatar svg { width: 26px; height: 26px; }
.bot-avatar-bobby { color: var(--accent-ink); background: var(--accent-soft); }
.bot-avatar-ricky { color: var(--loss-ink); background: var(--loss-soft); }
.bot-badge {
  /* Uppercased in CSS so the markup reads "AI Agent" but the chip still looks
     like the label it replaced. Tighter tracking than the old three-letter
     word needed. */
  font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-3);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 1px 5px;
}
.bot-tag { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); }
.bot-record { font-size: 14px; color: var(--text-2); }
.bot-record strong { font-variant-numeric: tabular-nums; color: var(--text); }
.bot-chat-btn:disabled { opacity: 0.55; cursor: default; }

/* inline tile chat: a small terminal that lives on the card */
.bot-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
  padding: 10px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
/* a scrollable flex column shrinks its children before it scrolls —
   never compress a message or a ticket, scroll instead */
.bot-log > * { flex-shrink: 0; }
.bot-msg {
  max-width: 88%;
  padding: 7px 11px;
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bot-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bot-msg.assistant {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bot-msg.err-msg { color: var(--loss-ink); border-color: var(--loss); }
/* composer: one rounded container — input on top, controls below */
.bot-composer {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--card);
  transition: border-color 0.15s;
}
.bot-composer:focus-within { border-color: var(--accent); }
.bot-composer .bot-input {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  padding: 10px 12px 2px;
  margin: 0;
  box-shadow: none;
}
.bot-composer .bot-input::placeholder { color: var(--text-3); }
.bot-composer .bot-input:disabled { opacity: 0.6; }
.bot-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px 12px;
}
.bot-composer-hint { font-size: 11px; color: var(--text-3); }
.bot-send {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.bot-send svg { width: 15px; height: 15px; }
.bot-send:hover { background: var(--accent-ink); }
.bot-send:disabled { background: var(--border-strong); color: var(--text-3); cursor: default; }

/* the bots' weekly betting card */
.bot-action-head {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: 6px;
}
.bot-act {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px;
  padding: 4px 0;
  border-top: 1px solid var(--border);
}
.bot-act:first-of-type { border-top: 0; }
.act-kind { flex: none; font-weight: 700; white-space: nowrap; }
.act-detail { flex: 1; color: var(--text-2); min-width: 0; }
.act-tag {
  flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--text-3);
}
.bot-act.act-win  .act-tag { color: var(--win-ink); }
.bot-act.act-loss .act-tag { color: var(--loss-ink); }
.bot-act.act-push .act-tag { color: var(--push); }

/* bet-slip ticket in bot chat */
.bot-slip {
  align-self: flex-start;
  width: 94%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
  font-size: 12.5px;
}
.bot-slip-head {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.07em;
  padding: 6px 11px;
}
.bot-slip-leg { padding: 7px 11px 6px; border-top: 1px dashed var(--border-strong); }
.bot-slip-leg:first-of-type { border-top: 0; }
.bot-slip-leg .lg-pick { font-weight: 750; }
.bot-slip-leg .lg-game { color: var(--text-3); font-size: 11.5px; margin-top: 1px; }
.bot-slip-leg .lg-why  { color: var(--text-2); font-size: 11.5px; margin-top: 2px; }
.bot-slip-foot {
  display: flex;
  justify-content: space-between;
  padding: 7px 11px;
  border-top: 1px solid var(--border-strong);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  background: var(--card-2);
}
