:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #14171c;
  --muted: #5d6673;
  --border: #dfe3e8;
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --accent-soft: #fbe7ea;
  --good: #1a7f4b;
  --bar: #c8102e;
  --bar-track: #eceef2;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #161b22;
    --surface-2: #1e252e;
    --text: #e8ebef;
    --muted: #98a2ae;
    --border: #2a323d;
    --accent: #ff4d5e;
    --accent-ink: #160407;
    --accent-soft: #3a1820;
    --good: #4cc488;
    --bar: #ff4d5e;
    --bar-track: #252c36;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h2 { font-size: 22px; }
h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; font-size: 17px; white-space: nowrap; }
.brand-logo { width: 38px; height: 38px; flex: none; border-radius: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.footer-brand { display: flex; align-items: center; gap: 6px; margin-bottom: 8px !important; color: var(--text); }
.footer-brand img { display: inline-block; border-radius: 6px; }
.nav { display: flex; gap: 20px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--text); }
@media (max-width: 720px) { .nav { display: none; } }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: stretch;
  padding: 40px 0 28px;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 28px; } }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -.02em; }
.lede { color: var(--muted); font-size: 17px; max-width: 560px; margin: 14px 0 22px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  font: inherit; font-weight: 700; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  border: 1px solid transparent; transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-size: 17px; padding: 14px 24px; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { padding: 8px 14px; font-size: 14px; margin-top: 14px; }
.toggles { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.switch { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }
.sims-select { display: flex; gap: 8px; align-items: center; }
select, input[type="search"] {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
}
.progress { height: 6px; background: var(--bar-track); border-radius: 99px; margin-top: 16px; overflow: hidden; max-width: 420px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.updated { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

.champ-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.champ-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--team, var(--accent));
}
.champ-label { margin: 0 0 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.champ-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.champ-main { display: flex; align-items: center; gap: 18px; }
.champ-main img { width: 96px; height: 96px; object-fit: contain; }
.champ-name { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.champ-pct { font-size: 15px; color: var(--muted); margin-top: 2px; }
.champ-pct strong { color: var(--text); font-size: 22px; }
.champ-runners { margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); list-style: none; display: grid; gap: 8px; font-size: 14px; }
.champ-runners li { display: flex; align-items: center; gap: 8px; }
.champ-runners img { width: 22px; height: 22px; object-fit: contain; }
.champ-runners .pct { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.pop { animation: pop .45s ease; }
@keyframes pop { 0% { transform: scale(.94); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }

/* Panels */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin: 0 0 24px;
}
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.panel-head p { margin: 0; font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input { width: 180px; }

.result-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.contenders { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 28px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.contenders li { display: grid; grid-template-columns: 24px 1fr 52px; align-items: center; gap: 10px; font-size: 14px; }
.contenders img { width: 24px; height: 24px; object-fit: contain; }
.contenders .bar-row { display: grid; gap: 3px; }
.contenders .pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

.bar { height: 6px; border-radius: 99px; background: var(--bar-track); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--bar); border-radius: 99px; }

/* Bracket */
.bracket-wrap { min-width: 0; }
.bracket { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.round { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.round-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.match { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.slot { display: grid; grid-template-columns: 20px 22px 1fr auto; gap: 7px; align-items: center; padding: 6px 9px; font-size: 13px; }
.slot + .slot { border-top: 1px solid var(--border); }
.slot img { width: 22px; height: 22px; object-fit: contain; }
.slot .seed { color: var(--muted); font-size: 11px; font-weight: 700; text-align: right; }
.slot .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .sc { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 22px; text-align: right; }
.slot.win .sc { color: var(--good); }
.match-foot { font-size: 11px; color: var(--muted); padding: 4px 9px; border-top: 1px solid var(--border); background: var(--surface); }
.slot.win { font-weight: 800; background: var(--surface); }
.slot.bye { color: var(--muted); font-style: italic; }
.match.final { border-color: var(--accent); }
.trophy { margin-top: 10px; text-align: center; font-weight: 800; font-size: 14px; }
.trophy img { width: 54px; height: 54px; object-fit: contain; margin: 6px auto; }

/* Odds table */
.table-scroll { overflow-x: auto; }
.odds-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.odds-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.odds-table th[data-sort] { cursor: pointer; }
.odds-table th[data-sort]:hover, .odds-table th.sorted { color: var(--text); }
.odds-table th.sorted::after { content: " ▾"; }
.odds-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.odds-table tbody tr { cursor: pointer; }
.odds-table tbody tr:hover { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.team-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.team-cell img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.team-cell .nm { font-weight: 700; }
.team-cell .meta { font-size: 12px; color: var(--muted); }
.rank-tag { font-size: 11px; color: var(--muted); font-weight: 700; margin-right: 3px; }
.ai-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; margin-left: 6px; background: var(--accent-soft); color: var(--accent); }
.pct-cell { min-width: 78px; }
.pct-cell .v { font-weight: 700; }
.pct-cell .bar { margin-top: 4px; }
@media (max-width: 640px) { .hide-sm { display: none; } .odds-table td, .odds-table th { padding: 8px 6px; } }

/* AI */
.ai-summary { font-size: 16px; max-width: 820px; margin: 0 0 18px; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 820px) { .ai-grid { grid-template-columns: 1fr; } }
.ai-field { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.ai-field li { display: flex; gap: 8px; align-items: center; font-size: 14px; background: var(--surface-2); border-radius: 8px; padding: 6px 8px; }
.ai-field img { width: 22px; height: 22px; object-fit: contain; }
.ai-field .seed { font-size: 11px; font-weight: 800; color: var(--muted); width: 16px; text-align: right; }
.ai-pick { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; }
.ai-pick img { width: 48px; height: 48px; object-fit: contain; }
.adj-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.adj-list li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; font-size: 14px; }
.adj-list img { width: 26px; height: 26px; object-fit: contain; }
.adj { font-weight: 800; font-variant-numeric: tabular-nums; }
.adj.up { color: var(--good); }
.adj.down { color: var(--accent); }

/* Method */
.method { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); max-width: 860px; }
.method strong { color: var(--text); }

/* Team dialog */
.team-dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.team-dialog::backdrop { background: rgba(10, 12, 16, .55); }
.dialog-inner { padding: 22px; max-height: 80vh; overflow-y: auto; }
.dlg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dlg-head img { width: 64px; height: 64px; object-fit: contain; }
.dlg-head h2 { font-size: 24px; }
.dlg-close { margin-left: auto; align-self: flex-start; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.dlg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-bottom: 16px; }
.dlg-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; }
.dlg-stats b { display: block; font-size: 18px; }
.dlg-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sched { width: 100%; border-collapse: collapse; font-size: 14px; }
.sched td { padding: 7px 4px; border-bottom: 1px solid var(--border); }
.sched img { width: 22px; height: 22px; object-fit: contain; display: inline-block; vertical-align: middle; margin-right: 6px; }
.sched .res-w { color: var(--good); font-weight: 700; }
.sched .res-l { color: var(--accent); font-weight: 700; }
.ai-note { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }

.site-footer { border-top: 1px solid var(--border); margin-top: 12px; padding: 22px 0 40px; font-size: 13px; color: var(--muted); }
.site-footer p { margin: 0; max-width: 760px; }

.champ-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.contenders .split { display: block; font-size: 11px; color: var(--muted); }
.vegas-note { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; color: var(--muted); }
.vegas-note strong { color: var(--text); }
.sched .pred { font-weight: 700; }
.sched .adj-note { display: inline-block; max-width: 260px; text-align: right; line-height: 1.3; margin-top: 2px; }

.inj-tag { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; margin-left: 6px; background: #fff1d6; color: #9a5b00; }
@media (prefers-color-scheme: dark) { .inj-tag { background: #3a2a10; color: #f0b44c; } }
.inj-box, .notes-box { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }
.notes-box div + div { margin-top: 4px; }
.inj-title { font-weight: 800; margin-bottom: 6px; }
.inj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.inj-list li { line-height: 1.4; }
.inj-list.league { margin-bottom: 8px; }
.inj-list img { width: 20px; height: 20px; display: inline-block; vertical-align: middle; margin-right: 4px; object-fit: contain; }
.inj-list .inj-pts { font-weight: 800; color: var(--accent); margin-left: 6px; }
.inj-box p { margin: 8px 0 0; }
.sched .inj-line { color: #b26b00; }
@media (prefers-color-scheme: dark) { .sched .inj-line { color: #f0b44c; } }

/* Shop */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.shop-card { border: 1px solid var(--border); border-top: 4px solid var(--team, var(--accent)); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.shop-team { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.shop-team img { width: 40px; height: 40px; object-fit: contain; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; font-weight: 600; text-decoration: none; padding: 5px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.disclosure { margin: 12px 0 0; }
.dlg-shop { margin-top: 16px; }
/* Ads */
.ad-slot { margin: 0 0 24px; text-align: center; min-height: 90px; }
.ad-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.site-footer a { color: inherit; }

/* Conference championships */
.conf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .conf-grid { grid-template-columns: 1fr; } }
.conf-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); min-width: 0; }
.conf-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.conf-head h3 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 16px; margin: 0; }
.conf-head .small { text-align: right; }
.cm { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.cm-row { display: grid; grid-template-columns: 28px 1fr auto 30px; gap: 8px; align-items: center; padding: 7px 10px; }
.cm-row + .cm-row { border-top: 1px solid var(--border); }
.cm-row img { width: 28px; height: 28px; object-fit: contain; }
.cm-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-row .p { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cm-row .sc { font-weight: 800; font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; }
.cm-row.win { font-weight: 700; }
.cm-row.win .sc { color: var(--good); }
.cm-foot { font-size: 11px; color: var(--muted); padding: 5px 10px; border-top: 1px solid var(--border); }
.conf-others { margin: 8px 0 0; }
.conf-others ul { margin: 2px 0 0; padding-left: 18px; }
.conf-reach-head { display: grid; grid-template-columns: 1fr 44px 44px; gap: 8px; margin: 12px 0 4px; }
.conf-reach-head span:not(:first-child) { text-align: right; }
.conf-reach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.conf-reach li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 60px 44px 44px; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.conf-reach img { width: 22px; height: 22px; object-fit: contain; }
.conf-reach .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conf-reach .v, .conf-reach .v2 { text-align: right; font-variant-numeric: tabular-nums; }
.conf-reach .v { font-weight: 700; }
