:root {
  --black: #0b0b0b;
  --surface: #121212;
  --surface-raised: #181818;
  --line: #303030;
  --line-gold: #665a22;
  --gold: #cfb53b;
  --gold-bright: #e3cd63;
  --ink: #f4f2ea;
  --muted: #aaa99f;
  --positive: #78c89a;
  --negative: #ef8b82;
  --radius: 10px;
  --space: clamp(1rem, 2vw, 1.5rem);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { background: var(--black); color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--black); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: var(--gold-bright); text-underline-offset: 3px; }
a:hover { color: #fff1a5; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; }
h1 { font-size: clamp(2rem, 5vw, 4.75rem); max-width: 15ch; }
h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); }
code { padding: .15rem .4rem; border: 1px solid var(--line); background: #080808; border-radius: 4px; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 999; padding: .75rem 1rem; background: var(--gold); color: #000; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }

.beta-banner { border-bottom: 1px solid var(--line-gold); background: #1b190f; color: #ddd5a7; }
.beta-banner-inner { width: min(calc(100% - 2rem), var(--max)); min-height: 28px; margin: auto; display: flex; align-items: center; justify-content: center; gap: .55rem; font-size: .72rem; }
.beta-banner-inner strong { flex: 0 0 auto; color: var(--gold-bright); font-size: .68rem; letter-spacing: .12em; }
.beta-banner-inner p { margin: 0; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 11, .96); border-bottom: 1px solid var(--line); }
.nav-shell { width: min(calc(100% - 2rem), var(--max)); min-height: 58px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--gold); text-decoration: none; font-size: .92rem; font-weight: 900; letter-spacing: .08em; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.35rem); }
.nav-links > a, .nav-link-button, .account-menu > summary { color: #dad8cf; text-decoration: none; font: inherit; }
.nav-links > a:hover, .nav-link-button:hover, .account-menu > summary:hover { color: var(--gold-bright); }
.nav-form { margin: 0; }
.nav-link-button, .text-button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.account-menu { position: relative; margin: 0; }
.account-menu summary { display: flex; align-items: center; gap: .4rem; cursor: pointer; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.12rem) rotate(45deg); transition: transform .15s ease; }
.account-menu summary:hover, .account-menu[open] summary { color: var(--gold-bright); }
.account-menu[open] summary::after { transform: translateY(.12rem) rotate(225deg); }
.account-menu-popover { position: absolute; z-index: 30; top: calc(100% + .75rem); right: 0; width: max-content; min-width: 190px; padding: .4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.account-menu-popover a, .account-menu-popover .nav-link-button { display: flex; width: 100%; min-height: 40px; align-items: center; padding: .55rem .7rem; border-radius: 4px; color: #dad8cf; text-align: left; text-decoration: none; }
.account-menu-popover a:hover, .account-menu-popover .nav-link-button:hover { background: rgba(255, 255, 255, .05); color: var(--gold-bright); }
.account-menu-logout { margin: .25rem 0 0; padding-top: .25rem; border-top: 1px solid var(--line); }
.nav-toggle { display: none; }

.page-shell { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem) 0; }
.compact-page-shell { padding-top: clamp(1rem, 2vw, 1.5rem); }
.site-footer { width: min(calc(100% - 2rem), var(--max)); margin: 1.25rem auto 0; padding: 1.25rem 0; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; }
.site-footer p { margin: 0; }
.eyebrow { margin-bottom: .8rem; color: var(--gold); font-size: .75rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); }

.hero { padding: clamp(1rem, 3.5vw, 3rem) 0; border-bottom: 1px solid var(--line); background-image: linear-gradient(90deg, rgba(207,181,59,.07) 1px, transparent 1px), linear-gradient(rgba(207,181,59,.05) 1px, transparent 1px); background-size: 64px 64px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero-copy { max-width: 65ch; color: #c4c2b9; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .7rem 1.15rem; border: 1px solid var(--gold); border-radius: 5px; background: var(--gold); color: #0b0b0b; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--gold-bright); color: #000; }
.button-secondary { background: transparent; color: var(--gold-bright); }
.button-small { min-height: 36px; padding: .4rem .75rem; }
.button-block { width: 100%; }
.js .no-js-submit { display: none; }
.trust-list { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; padding: 0; color: var(--muted); list-style: none; font-size: .9rem; }
.trust-list li::before { content: "✓"; margin-right: .45rem; color: var(--gold); }

.score-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; }
.score-strip div { padding: 1rem; display: flex; gap: .65rem; align-items: baseline; border-right: 1px solid var(--line); }
.score-strip div:last-child { border: 0; }
.score-strip strong { color: var(--gold); font-family: ui-monospace, monospace; }
.score-strip span { color: var(--muted); font-size: .9rem; }

.section-grid, .prediction-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: var(--space); margin: clamp(1.25rem, 3vw, 2.5rem) 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space); }
.panel-feature { border-top: 3px solid var(--gold); }
.panel-heading, .page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.25rem; margin-bottom: 1rem; }
.page-heading { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.page-heading h1 { max-width: 22ch; margin-bottom: .35rem; font-size: clamp(1.85rem, 3.5vw, 3rem); }
.page-heading p { color: var(--muted); margin: 0; }
.compact-page-heading { align-items: center; gap: 1rem; margin-bottom: .75rem; padding-bottom: .75rem; }
.compact-page-heading .eyebrow { margin-bottom: .25rem; }
.compact-page-heading h1 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
.compact-page-heading p { font-size: .95rem; }
.notice, .callout, .correlation-warning { padding: .75rem 1rem; border-left: 3px solid var(--gold); background: #1b190f; color: #ddd5a7; }
.empty-state { padding: clamp(1.5rem, 4vw, 3rem); text-align: center; color: var(--muted); }
.empty-state h1, .empty-state h2, .empty-state h3 { max-width: none; color: var(--ink); }

.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .8rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: #cfcdc3; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
th[data-sort] { cursor: pointer; }
tbody tr:hover { background: rgba(255,255,255,.025); }
td small { display: block; max-width: 38ch; margin-top: .25rem; color: var(--muted); }
.rank-cell { color: var(--gold); font: 800 1.15rem ui-monospace, monospace; }
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.result-badge { display: inline-grid; width: 1.7rem; height: 1.7rem; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 900; }
.result-win { color: var(--positive); }
.result-loss { color: var(--negative); }
.result-tie { color: var(--muted); }
.table-tools, .search-form { margin: 1rem 0; }
.table-tools label, .search-form > label { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .85rem; }
.search-form > div { display: flex; gap: .65rem; }

.matchup-card { text-align: center; }
.matchup-teams, .matchup-title { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.matchup-teams b, .matchup-title > b { color: var(--gold); font-size: .75rem; }
.matchup-teams .team-identity, .matchup-title .team-identity { justify-content: center; }
.forecast-number { color: var(--gold-bright); font: 900 clamp(3rem, 8vw, 5.5rem)/1 ui-monospace, monospace; letter-spacing: -.08em; }
.pick-summary { max-width: none; margin: 1.5rem 0; color: var(--gold-bright); font-size: clamp(2rem, 5vw, 3.5rem); }
.metric-list { margin: 1.5rem 0; }
.metric-list div, .contribution-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.metric-list dt { color: var(--muted); }
.metric-list dd { margin: 0; font-weight: 700; text-align: right; }
.matchup-header { margin-bottom: 1.25rem; text-align: center; }
.matchup-title h1 { max-width: none; margin: 0; font-size: clamp(1.5rem, 4vw, 3rem); }
.team-heading-link { color: inherit; text-decoration-color: transparent; }
.team-heading-link:hover { color: var(--gold-bright); text-decoration-color: currentColor; }
.final-result { display: flex; width: fit-content; align-items: center; gap: .75rem; margin: 1.25rem auto; padding: .6rem 1rem; border: 1px solid var(--line-gold); border-radius: 999px; background: #1b190f; }
.final-result strong { color: var(--gold-bright); font: 900 1.2rem ui-monospace, monospace; }
.final-result span { font-weight: 800; }
.prediction-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.prediction-card .panel-heading { align-items: center; }
.status-pill { display: inline-block; padding: .2rem .5rem; border: 1px solid var(--line-gold); border-radius: 999px; color: var(--gold-bright); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.status-market { border-color: #65759a; color: #aabff0; }
.status-muted { border-color: #555; color: #bbb; }
.status-live { border-color: var(--negative); color: var(--negative); }
.status-delayed { border-color: #9a7b45; color: #e5bd72; }
.board-filters form { min-width: min(540px, 62vw); display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); align-items: end; gap: .6rem; }
.board-filters form > div { min-width: 0; }
.board-filters form label { display: block; }
.game-discovery { margin: 0 0 var(--space); }
.game-discovery-summary { position: relative; min-height: 44px; padding-left: 1.35rem; display: flex; align-items: center; list-style: none; }
.game-discovery-summary::-webkit-details-marker { display: none; }
.game-discovery-summary::before { content: ""; position: absolute; left: .1rem; top: 50%; width: .45rem; height: .45rem; border-right: 2px solid var(--gold-bright); border-bottom: 2px solid var(--gold-bright); transform: translateY(-50%) rotate(-45deg); transition: transform .15s ease; }
.game-discovery[open] > .game-discovery-summary::before { transform: translateY(-50%) rotate(45deg); }
.game-discovery-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.game-discovery-title { color: var(--ink); font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.game-discovery-body { padding-top: 1rem; }
.game-count { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.game-discovery form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: .75rem; }
.game-discovery-actions { display: flex; min-height: 44px; align-items: center; gap: .75rem; }
.game-discovery-actions .button { min-height: 44px; }
.game-discovery-help { margin: .85rem 0 0; color: var(--muted); font-size: .8rem; }
.matchup-model-picker { max-width: 520px; margin: 0 auto var(--space); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .75rem; }
.matchup-model-picker label { grid-column: 1 / -1; }
.slate-navigation { display: flex; justify-content: center; margin-bottom: var(--space); }
.slate-navigation-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.compact-page-shell .slate-navigation { margin-bottom: .65rem; }
.compact-page-shell .callout { margin-bottom: .65rem; padding: .55rem .8rem; }
.compact-page-shell .game-discovery { margin-bottom: .75rem; padding: .65rem .9rem; }
.matchup-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: clamp(.75rem, 2vw, var(--space)); }
.matchup-board-card { min-width: 0; display: flex; flex-direction: column; gap: .4rem; padding: 1rem; }
.matchup-board-card.game-live { border-color: #8f443e; box-shadow: inset 3px 0 0 var(--negative); }
.game-card-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .6rem; }
.game-card-heading > div { min-width: 0; display: grid; }
.event-label { color: var(--gold-bright); font-weight: 800; }
.game-kickoff { color: var(--muted); font-size: .82rem; }
.team-identity { display: inline-flex; min-width: 0; align-items: center; gap: .55rem; color: inherit; text-decoration: none; vertical-align: middle; }
.team-identity .team-name { min-width: 0; }
.team-logo { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; object-fit: contain; }
.team-identity-medium .team-logo { width: 2.25rem; height: 2.25rem; }
.team-identity-large { gap: .8rem; }
.team-identity-large .team-logo { width: clamp(3rem, 7vw, 4.5rem); height: clamp(3rem, 7vw, 4.5rem); }
.team-logo-fallback { display: inline-grid; place-items: center; border: 1px solid var(--line-gold); border-radius: 50%; background: #1b190f; color: var(--gold-bright); font-size: .62rem; font-weight: 900; letter-spacing: -.02em; }
.team-identity-medium .team-logo-fallback { font-size: .78rem; }
.team-identity-large .team-logo-fallback { font-size: 1.1rem; }
.board-team-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: 0 .65rem; border: 1px solid var(--line); border-radius: 5px; }
.game-card-team { min-width: 0; min-height: 44px; display: flex; flex-direction: column; justify-content: center; color: var(--ink); font-weight: 800; text-decoration: none; }
.game-card-team-name { min-width: 0; display: flex; align-items: center; line-height: 1.15; }
.game-card-team small { display: inline-grid; width: 1.5rem; height: 1.5rem; flex: 0 0 auto; place-items: center; margin-right: .35rem; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.game-card-conference { margin: .08rem 0 0 2.05rem; color: var(--muted); font-size: .68rem; font-weight: 500; line-height: 1.15; }
.game-card-team-seeded .game-card-conference { margin-left: 3.9rem; }
.board-team-row > strong { min-width: 2ch; color: var(--ink); font: 900 1.4rem ui-monospace, monospace; text-align: right; }
.board-team-row.game-winner { border-color: var(--line-gold); background: #1b190f; }
.game-card-winner { margin-left: .5rem; color: var(--positive); font-size: .65rem; text-transform: uppercase; }
.game-card-meta { display: grid; gap: .2rem; padding: .05rem .1rem 0; }
.game-market-line { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .78rem; }
.game-market-line span { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.game-market-line strong { color: #c5c5c5; font-weight: 700; }
.game-picks { display: grid; gap: .15rem; color: var(--muted); font-size: .8rem; }
.game-picks strong { color: var(--gold-bright); }
.game-detail-link { min-height: 44px; margin-top: auto; display: flex; align-items: center; }
.weekly-prediction-form { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(320px, 1fr); gap: 2rem; margin-bottom: var(--space); }
.weekly-prediction-form form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: .75rem; }
.weekly-prediction-form form > div { margin: 0; }
.weekly-pick-summary { max-width: none; margin: .75rem 0; color: var(--gold-bright); text-align: center; }
.live-update-note { display: flex; align-items: center; gap: .55rem; color: var(--muted); }
.live-dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--negative); box-shadow: 0 0 0 .25rem rgba(239,139,130,.15); }
details { margin-top: 1rem; }
summary { cursor: pointer; font-weight: 700; }

.method-section { padding: clamp(1.25rem, 3vw, 2.5rem) 0; border-top: 1px solid var(--line); }
.method-grid, .metric-cards, .team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space); }
.method-grid article, .metric-cards article, .team-tile, .formula-card { padding: 1rem; border: 1px solid var(--line); background: #0f0f0f; }
.method-grid p { color: var(--muted); }
.metric-cards { margin-bottom: var(--space); }
.metric-cards span { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.metric-cards strong { color: var(--gold-bright); font: 800 2rem ui-monospace, monospace; }
.results-filters { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)) auto; align-items: end; gap: .75rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.compact-page-shell .results-filters { gap: .6rem; margin-bottom: 1rem; padding: 1rem; }
.results-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 1rem; }
.compact-page-shell .results-section-heading { margin: .75rem 0 .65rem; }
.results-section-heading h2, .results-section-heading p { margin-bottom: 0; }
.results-section-heading > p { max-width: 54ch; color: var(--muted); text-align: right; }
.results-summary strong { font-family: inherit; font-size: clamp(1.65rem, 4vw, 2.3rem); }
.compact-page-shell .results-summary { gap: .65rem; margin-bottom: 1rem; }
.compact-page-shell .results-summary article { padding: .8rem 1rem; }
.results-table td { min-width: 150px; }
.results-table td:first-child { min-width: 250px; }
.results-table .status-pill { white-space: nowrap; }
.results-matchup { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-weight: 800; }

.auth-layout { display: grid; grid-template-columns: 1fr minmax(320px, .65fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); min-height: 50vh; }
.auth-layout h1 { font-size: clamp(2rem, 5vw, 3.75rem); }
.narrow { max-width: 720px; margin-inline: auto; }
.legal-document { max-width: 820px; }
.legal-document > section { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.legal-document > section:first-of-type { border-top: 0; }
.legal-document h2 { margin-bottom: .8rem; font-size: clamp(1.25rem, 2.5vw, 1.65rem); }
.legal-document h3 { margin: 1.25rem 0 .55rem; font-size: 1.05rem; letter-spacing: 0; }
.legal-document p, .legal-document li { max-width: 76ch; }
.legal-document li + li { margin-top: .35rem; }
.legal-effective-date { color: var(--muted); }
.legal-note { padding: 1rem; border-left: 3px solid var(--gold); background: #1b190f; color: #ddd5a7; }
.legal-contact { font-style: normal; }
.form-panel form > div { margin-bottom: 1rem; }
.allauth-panel form > p { margin-bottom: 1rem; }
.allauth-panel h1 { max-width: none; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.allauth-panel h2 { margin-top: 1.5rem; }
.allauth-panel form > button, .allauth-panel form + button, .allauth-panel section button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; margin: .35rem .5rem .35rem 0; padding: .7rem 1.15rem; border: 1px solid var(--gold); border-radius: 5px; background: var(--gold); color: #0b0b0b; font: inherit; font-weight: 800; cursor: pointer; }
.allauth-panel > ul, .allauth-panel section > ul { padding-left: 0; list-style: none; }
.allauth-panel > ul li, .allauth-panel section > ul li { margin: .6rem 0; }
.allauth-panel section { padding-top: 1rem; border-top: 1px solid var(--line); }
.signup-honeypot { position: fixed; inset-inline-start: -10000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.account-settings-grid { align-items: start; }
.account-security-panel p { color: var(--muted); }
.account-action-list { display: grid; gap: .65rem; }
.account-action-list a { padding: .75rem; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); text-decoration: none; }
.account-action-list a:hover { border-color: var(--gold); color: var(--gold-bright); }
label { display: inline-block; margin-bottom: .35rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid #4a4a4a; border-radius: 5px; background: #0c0c0c; color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; min-height: auto; margin: 0 .5rem 0 0; padding: 0; border: 0; background: transparent; accent-color: var(--gold); vertical-align: middle; }
.allauth-panel input[type="radio"] + label { max-width: calc(100% - 2rem); margin-bottom: 0; overflow-wrap: anywhere; vertical-align: middle; }
.allauth-panel input[type="radio"] + label strong { display: inline-block; margin-left: .35rem; }
.helptext, .form-foot { display: block; color: var(--muted); font-size: .82rem; }
.errorlist { color: var(--negative); }

.builder-layout { display: grid; grid-template-columns: minmax(220px, .32fr) minmax(0, 1fr); gap: var(--space); }
.builder-update-note { margin: 0 0 var(--space); color: var(--muted); font-size: .88rem; }
.builder-update-note strong { color: var(--ink); }
.model-saved-panel { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: var(--space); border-color: var(--line-gold); }
.model-saved-panel h2, .model-saved-panel p, .model-saved-panel .button-row { margin-bottom: 0; }
.model-saved-panel .button-row { margin-top: 0; }
.preset-rail { align-self: start; position: sticky; top: 76px; }
.preset-list, .run-list { margin: 0; padding: 0; list-style: none; }
.preset-list li, .run-list li { border-bottom: 1px solid var(--line); }
.preset-list a, .run-list a { display: block; padding: .7rem 0; text-decoration: none; }
.preset-list strong, .preset-list small { display: block; }
.preset-list small { margin-top: .15rem; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.preset-list span, .run-list span { display: block; color: var(--muted); font-size: .8rem; }
.preset-list a[aria-current="page"] { color: #fff; }
.builder-mode-heading { margin-bottom: 1rem; }
.builder-mode-heading h2 { margin: .25rem 0; }
.builder-mode-heading p { margin: 0; color: var(--muted); }
.builder-mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.builder-mode-tab { min-height: 112px; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.builder-mode-tab strong, .builder-mode-tab span { display: block; }
.builder-mode-tab span { margin-top: .35rem; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.builder-mode-tab:hover, .builder-mode-tab:focus-visible, .builder-mode-tab.is-active { border-color: var(--gold); background: #1b190f; }
.builder-mode-tab.is-active strong { color: var(--gold-bright); }
.builder-mode-notice, .mode-downgrade-warning { margin: 1rem 0; padding: .9rem 1rem; border: 1px solid var(--line-gold); background: #15140e; }
.builder-mode-notice { color: var(--muted); }
.builder-mode-notice strong { color: var(--ink); }
.mode-downgrade-warning h3, .mode-downgrade-warning p { margin-bottom: .5rem; }
.mode-downgrade-warning label { display: flex; align-items: flex-start; margin: .8rem 0 0; }
.mode-downgrade-warning input { flex: 0 0 auto; margin-top: .2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.weight-summary { position: sticky; top: 70px; z-index: 5; margin: 1.25rem 0; padding: .8rem 1rem; display: flex; align-items: center; gap: 1rem; background: #1b190f; border: 1px solid var(--line-gold); }
.weight-summary strong { color: var(--gold-bright); font-family: ui-monospace, monospace; }
.weight-summary .text-button { margin-left: auto; color: var(--gold-bright); }
.factor-group { margin: 1.25rem 0; padding: 0; border: 0; }
.factor-group legend { width: 100%; padding-bottom: .45rem; border-bottom: 1px solid var(--line-gold); color: var(--gold); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.factor-group legend output { float: right; color: var(--muted); font-size: .72rem; letter-spacing: normal; text-transform: none; }
.factor-group-intro { max-width: 70ch; margin: .65rem 0 0; color: var(--muted); }
.factor-discovery { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(180px, .35fr); gap: .75rem 1rem; align-items: end; margin: 1rem 0; padding: 1rem; border: 1px solid var(--line-gold); border-radius: var(--radius); background: #15140e; }
.factor-discovery div { display: grid; gap: .3rem; }
.factor-discovery label { font-weight: 800; }
.factor-discovery p { grid-column: 1 / -1; margin: 0; }
.advanced-factor-group { border: 1px solid var(--line); border-radius: var(--radius); }
.advanced-factor-group summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; cursor: pointer; }
.advanced-factor-group summary span, .advanced-factor-group summary small { display: block; }
.advanced-factor-group summary strong { color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.advanced-factor-group summary small { max-width: 62ch; margin-top: .25rem; color: var(--muted); }
.advanced-factor-group summary output { flex: 0 0 auto; color: var(--gold-bright); font-size: .8rem; }
.advanced-factor-group fieldset { margin: 0; padding: 0 1rem .5rem; border: 0; }
.factor-correlation-warning { margin: 0 1rem .35rem; padding: .75rem; color: var(--muted); background: #15140e; border-left: 3px solid var(--gold); }
.factor-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .5fr); align-items: center; gap: 1.25rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.factor-row p { margin: 0; color: var(--muted); font-size: .86rem; }
.behavior-control-row input, .behavior-control-row select { width: 100%; max-width: 24rem; }
.factor-control { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(6rem, auto); align-items: center; gap: .75rem; }
.factor-reading { display: grid; justify-items: end; line-height: 1.2; }
.factor-reading output { color: var(--ink); font: 800 1rem ui-monospace, monospace; }
.factor-control strong { color: var(--gold-bright); font-size: .78rem; text-align: right; }
.factor-control input[type="range"] { min-height: 28px; padding: 0; accent-color: var(--gold); }
.factor-control .errorlist { grid-column: 1 / -1; }
.run-panel { margin-top: var(--space); display: grid; grid-template-columns: .6fr 1fr; gap: 1.25rem; }
.inline-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; align-items: end; }
.danger-zone { margin-top: 1rem; text-align: right; }
.danger { color: var(--negative); }
.factor-story-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space); }
.factor-story h2 { max-width: none; margin: .9rem 0 .4rem; font-size: 1.2rem; }
.factor-story p { color: var(--muted); }
.technical-details { margin-top: var(--space); }

.team-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.team-tile { display: flex; flex-direction: column; min-height: 110px; justify-content: space-between; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.team-tile .team-identity { font-weight: 800; }
.schedule-matchup { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.team-tile:hover { border-color: var(--gold); }
.team-tile span { color: var(--gold-bright); font-size: .85rem; }
.pagination { display: flex; justify-content: center; gap: 1.25rem; margin: 1.25rem 0; color: var(--muted); }
.message-stack { position: fixed; z-index: 50; top: 84px; right: 1rem; width: min(420px, calc(100% - 2rem)); }
.message { margin-bottom: .5rem; padding: .8rem 1rem; border: 1px solid var(--line-gold); background: #19170d; box-shadow: 0 8px 30px #000; }
.message-error { border-color: #8f443e; }

@media (pointer: fine) and (hover: hover) {
  html.football-cursor-enabled, .football-cursor-enabled body, .football-cursor-enabled a, .football-cursor-enabled button, .football-cursor-enabled label, .football-cursor-enabled select, .football-cursor-enabled summary, .football-cursor-enabled input[type="range"], .football-cursor-enabled input[type="checkbox"], .football-cursor-enabled input[type="radio"] { cursor: url("../images/football.ed641188fb2d.svg") 11 4, pointer; }
  .football-cursor-enabled input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), .football-cursor-enabled textarea { cursor: text; }
}
.tap-football { position: fixed; z-index: 100; width: 30px; height: 30px; pointer-events: none; background: url("../images/football.ed641188fb2d.svg") center/contain no-repeat; transform: translate(-50%, -50%); animation: football-pop .55s ease-out forwards; }
@keyframes football-pop { from { opacity: .9; scale: .7; } to { opacity: 0; scale: 1.4; rotate: 25deg; } }

@media (max-width: 800px) {
  .nav-toggle { min-height: 44px; display: inline-flex; align-items: center; padding: .4rem .7rem; border: 1px solid var(--line); background: transparent; color: var(--ink); }
  .nav-links { display: none; position: absolute; inset: 58px 0 auto 0; padding: .75rem 1rem; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); }
  .nav-links.is-open { display: flex; }
  .account-menu { width: 100%; }
  .account-menu summary { padding: .25rem 0; }
  .account-menu-popover { position: static; width: 100%; margin-top: .5rem; box-shadow: none; }
  .section-grid, .auth-layout, .builder-layout, .run-panel, .weekly-prediction-form, .results-filters { grid-template-columns: 1fr; }
  .model-saved-panel { align-items: flex-start; flex-direction: column; }
  .weekly-prediction-form form { grid-template-columns: 1fr; }
  .preset-rail { position: static; }
  .builder-mode-tabs { grid-template-columns: 1fr; }
  .builder-mode-tab { min-height: auto; }
  .score-strip { grid-template-columns: 1fr 1fr; }
  .score-strip div:nth-child(2) { border-right: 0; }
  .score-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .method-grid, .metric-cards { grid-template-columns: 1fr; }
  .inline-form, .form-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .page-heading { flex-direction: column; }
  .compact-page-heading { gap: .65rem; }
  .results-section-heading { align-items: flex-start; flex-direction: column; }
  .results-section-heading > p { text-align: left; }
  .board-filters { width: 100%; }
  .board-filters form { min-width: 0; grid-template-columns: 1fr; }
  .compact-page-shell .board-filters form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-page-shell .results-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .75rem; }
  .compact-page-shell .results-filters > div:first-of-type { grid-column: 1 / -1; }
  .game-discovery form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-search-field, .game-discovery-actions { grid-column: 1 / -1; }
  .matchup-model-picker { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .beta-banner-inner { width: min(calc(100% - 1rem), var(--max)); min-height: 0; padding: .3rem 0; display: block; line-height: 1.3; }
  .beta-banner-inner strong { margin-right: .45rem; }
  .beta-banner-inner p { display: inline; }
  .page-shell { width: min(calc(100% - 1rem), var(--max)); }
  .factor-row { grid-template-columns: 1fr; }
  .factor-discovery { grid-template-columns: 1fr; }
  .factor-discovery p { grid-column: auto; }
  .matchup-title { grid-template-columns: 1fr; }
  .matchup-title > b { padding: .3rem; }
  .search-form > div { flex-direction: column; }
  .board-filters { grid-template-columns: 1fr; }
  .game-discovery-heading { gap: .5rem; }
  .game-discovery-title { font-size: 1.05rem; white-space: nowrap; }
  .game-count { font-size: .75rem; }
  .game-discovery form { grid-template-columns: 1fr; }
  .game-search-field, .game-discovery-actions { grid-column: auto; }
  .slate-navigation-controls { gap: .65rem; text-align: center; }
  .matchup-board-card { gap: .35rem; padding: .75rem; }
  .game-card-heading { gap: .4rem; }
  .status-pill { max-width: 9rem; line-height: 1.2; text-align: center; }
  .schedule-table { min-width: 680px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tap-football { display: none; }
}
