html[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0d1117;
  --surface:#151b23;
  --surface-2:#111720;
  --surface-soft:#111720;
  --border:#29323d;
  --border-dark:#3a4653;
  --text:#e6edf3;
  --ink:#e6edf3;
  --muted:#9aa7b4;
  --muted-light:#74808c;
  --green:#58c7a0;
  --green-light:#14382f;
  --amber:#e3a64f;
  --amber-light:#392a14;
  --red:#ef8175;
  --red-light:#3a2020;
  --blue:#82afe2;
  --line:#29323d;
}

html[data-theme="dark"] body { background:var(--bg); color:var(--text); }
html[data-theme="dark"] body .thi-observed-ratings,
html[data-theme="dark"] body .thi-observed-ratings .thi-observed-header {
  background:#151b23 !important; color:#e6edf3 !important; border-color:#3a4653 !important;
}
html[data-theme="dark"] body .thi-observed-ratings :is(h1,h2,h3,.thi-observed-title) { color:#f5f8fa !important; }
html[data-theme="dark"] body .thi-observed-ratings :is(p,.thi-observed-description,.team-meta) { color:#b8c5d1 !important; }
html[data-theme="dark"] .site-header { background:rgba(13,17,23,.94); }
html[data-theme="dark"] .nav-item:hover { background:rgba(255,255,255,.06); }
html[data-theme="dark"] .nav-item.active { background:#252d38; color:var(--text); }
html[data-theme="dark"] .brand-mark {
  background:linear-gradient(145deg,#293440,#111820);
  border-color:#465361;
  box-shadow:0 1px 3px rgba(0,0,0,.38);
}
html[data-theme="dark"] a { color:#78c9ac; }

.thi-theme-toggle {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  flex:0 0 auto; min-height:32px; padding:6px 9px;
  border:1px solid var(--border); border-radius:7px;
  background:var(--surface); color:var(--text); cursor:pointer;
  font:700 9px var(--mono); letter-spacing:.04em;
}
.thi-theme-toggle:hover { border-color:var(--border-dark); }
.thi-theme-toggle:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }

html[data-theme="dark"] :is(input,select,textarea) {
  background:#111720 !important; color:var(--text) !important; border-color:var(--border) !important;
}
html[data-theme="dark"] :is(.projection-table,.pv-table,.thi-hub-table,.perf-week-table,.alt-table,.season-schedule-table) thead,
html[data-theme="dark"] #thi-performance-scorecard th {
  background:#111720 !important;
}
html[data-theme="dark"] #view-projections .projection-table thead,
html[data-theme="dark"] #view-projections .projection-table thead tr,
html[data-theme="dark"] #view-projections .projection-table thead th {
  background:#202a35 !important;
  color:#b7c5d3 !important;
  border-color:#3b4857 !important;
  box-shadow:inset 0 -1px 0 #3b4857 !important;
}
html[data-theme="dark"] body #view-projections .table-card .projection-table > thead > tr > th {
  background:#202a35 !important; color:#cbd6df !important; border-color:#465465 !important;
}
html[data-theme="dark"] body #hammer-sticky-projection-header {
  background:#202a35 !important;
  border-color:#465465 !important;
  box-shadow:0 2px 10px rgba(0,0,0,.36) !important;
}
html[data-theme="dark"] body #hammer-sticky-projection-header table,
html[data-theme="dark"] body #hammer-sticky-projection-header thead,
html[data-theme="dark"] body #hammer-sticky-projection-header tr,
html[data-theme="dark"] body #hammer-sticky-projection-header th {
  background:#202a35 !important;
  color:#cbd6df !important;
  border-color:#465465 !important;
}
html[data-theme="dark"] #view-projections .projection-table thead th[data-sort-direction="asc"],
html[data-theme="dark"] #view-projections .projection-table thead th[data-sort-direction="desc"] {
  background:#2a3744 !important;
  color:#f0f5f8 !important;
}
html[data-theme="dark"] :is(.projection-table,.pv-table,.thi-hub-table) tbody tr:hover,
html[data-theme="dark"] .season-schedule-table tbody tr:hover,
html[data-theme="dark"] .projection-table tbody tr.game-row:hover {
  background:#1b232d !important;
}
html[data-theme="dark"] :is(.projection-table,.pv-table,.thi-hub-table,.perf-week-table,.alt-table,.season-schedule-table) td,
html[data-theme="dark"] :is(.metric-row,.analysis-row,.insight-card,.thi-profile-stat,.thi-matchup-metric-row) {
  border-color:var(--border) !important;
}

html[data-theme="dark"] :is(
  .ratings-toggle-button,.conference-filter-select,.summary-filter,
  .thi-roster-group,.thi-metric-guide,.thi-stands-out-header,.thi-standout-card,
  .thi-metric-guide-card,.thi-context-card,.schedule-view-button,
  .perf-period,.perf-stat,.pg-metric,.mobile-projection-card,
  .thi-team-summary,.thi-unit-matchup,.thi-observed-ratings
) { background:var(--surface) !important; color:var(--text) !important; }

html[data-theme="dark"] :is(
  .sample-warning,.thi-rating-reliability,.thi-roster-source-note,
  .thi-roster-group>summary,.thi-availability-empty,.thi-availability-foot,
  .thi-intel-summary article,.thi-intel-panel,.thi-intel-method,
  .thi-resume-item,.thi-cfp-bubble div,.thi-cfp-game-meta,
  .thi-sp-side,.thi-sp-match-card,.thi-gel-excitement,.thi-gel-columns,.thi-gel-edge,
  .research-preview,.completed-row
) { background:var(--surface-soft) !important; }

html[data-theme="dark"] :is(.thi-context-fact,.thi-context-flags,.alt-table td,.season-schedule-table td) {
  border-color:var(--border) !important;
}
html[data-theme="dark"] :is(.thi-context-flag,.schedule-context-chip) {
  background:#392f15 !important; border-color:#6d5a25 !important; color:#f1cd67 !important;
}
html[data-theme="dark"] :is(.thi-metric-guide-subtitle,.thi-standout-copy,.thi-standout-strength) { color:var(--muted) !important; }
html[data-theme="dark"] .thi-standout-copy strong { color:var(--text) !important; }
html[data-theme="dark"] .thi-metric-guide-note { background:#252039 !important; color:#cabcf2 !important; border-color:#514477 !important; }
html[data-theme="dark"] .thi-conf-band { background:#29404a; }
html[data-theme="dark"] .thi-conf-median { background:#9ccce0; }
html[data-theme="dark"] .thi-cfp-round { background:#111720; }
html[data-theme="dark"] .thi-cfp-champion { background:#080c11; }
html[data-theme="dark"] .thi-intel-summary article.featured,
html[data-theme="dark"] .thi-resume-item.featured { background:#153129 !important; border-color:#2f6757; }
html[data-theme="dark"] .thi-watch { background:#15312c; border-color:#2f6256; }
html[data-theme="dark"] .thi-watch strong { color:#73d0b5; }
html[data-theme="dark"] :is(
  .week-tab.active,
  .ratings-toggle-button.active,
  .pv-subtab.active,
  .pv-pos-btn.active,
  .perf-period.active,
  .thi-player-tab.active,
  .thi-hub-sort-button.active,
  .vl-coach-sort.active
) {
  background:#314153 !important;
  border-color:#5b7288 !important;
  color:#f4f7fa !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07) !important;
}
html[data-theme="dark"] :is(button,[role="button"],a,input,select,textarea):focus-visible {
  outline:2px solid #82afe2 !important;
  outline-offset:2px;
}
html[data-theme="dark"] :is(.hammer-fcs-matchup-disclosure,.hammer-fcs-score-withheld) {
  background:#302b1d !important; border-color:#6c6038 !important;
}
html[data-theme="dark"] :is(.hammer-fcs-matchup-disclosure-title,.hammer-fcs-score-withheld-title) { color:#ead58e !important; }
html[data-theme="dark"] :is(.hammer-fcs-matchup-disclosure-copy,.hammer-fcs-score-withheld-copy) { color:#c9bd96 !important; }
html[data-theme="dark"] :is(.hammer-fcs-matchup-disclosure-copy,.hammer-fcs-score-withheld-copy) strong { color:#f2e6b5 !important; }
html[data-theme="dark"] .hammer-fcs-fallback-row { background:#171a19 !important; }
html[data-theme="dark"] .testing-notice-bar {
  background:#302b1d !important; color:#e6d89e !important; border-color:#6c6038 !important;
}
html[data-theme="dark"] .hammer-status-filter-wrap {
  background:#141b23 !important;
  border-color:#344150 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
html[data-theme="dark"] .hammer-status-filter-button {
  background:#1d2631 !important;
  border-color:#3a4858 !important;
  color:#bdc8d3 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
html[data-theme="dark"] body .hammer-status-filter-wrap .hammer-status-filter-button {
  background:#1d2631 !important; border-color:#465668 !important; color:#d1dbe4 !important;
}
html[data-theme="dark"] .hammer-status-filter-button:hover {
  background:#263241 !important;
  border-color:#556779 !important;
  color:#f1f5f8 !important;
}
html[data-theme="dark"] .hammer-status-filter-button.is-active {
  background:#3a5368 !important;
  border-color:#678197 !important;
  color:#fff !important;
}
html[data-theme="dark"] body .hammer-status-filter-wrap .hammer-status-filter-button[data-status="live"] {
  background:#2b1d21 !important;
  border-color:#674047 !important;
  color:#f29a9a !important;
}
html[data-theme="dark"] body .hammer-status-filter-wrap .hammer-status-filter-button[data-status="live"].is-active {
  background:#8f302f !important;
  border-color:#d15f5c !important;
  color:#fff !important;
}
html[data-theme="dark"] body .hammer-status-filter-wrap .hammer-status-filter-button[data-status="live"] .hammer-status-live-dot {
  background:#ef5b55 !important;
  color:#ef5b55 !important;
  box-shadow:0 0 0 2px rgba(239,91,85,.12);
}
html[data-theme="dark"] .hammer-status-count { background:rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .hammer-status-filter-button.is-active .hammer-status-count {
  background:rgba(255,255,255,.16) !important;
}
html[data-theme="dark"] .hammer-day-divider-box {
  background:#322b19 !important;
  border-color:#68582d !important;
  color:#e8cf83 !important;
}

html[data-theme="dark"] body #view-projections .projection-table tbody tr:is(
  .hammer-live-row,
  .hammer-live-pending-row
) {
  background:#241a1e !important;
  color:#edf3f8 !important;
}
html[data-theme="dark"] body #view-projections .projection-table tbody tr:is(
  .hammer-live-row,
  .hammer-live-pending-row
):hover {
  background:#302126 !important;
  box-shadow:inset 3px 0 0 #ef5b55 !important;
}
html[data-theme="dark"] body #view-projections .projection-table tbody tr:is(
  .hammer-final-untracked-row,
  .hammer-final-pending-row,
  .completed-row
) {
  background:#151b23 !important;
  color:#edf3f8 !important;
}
html[data-theme="dark"] body #view-projections .projection-table tbody tr:is(
  .hammer-final-untracked-row,
  .hammer-final-pending-row,
  .completed-row
):hover { background:#1b232d !important; }
html[data-theme="dark"] body #view-projections .projection-table tbody tr:is(
  .hammer-live-row,
  .hammer-live-pending-row,
  .hammer-final-untracked-row,
  .hammer-final-pending-row,
  .completed-row
) :is(.team-name,.line-primary,.hammer-live-score,.hammer-final-score,.final-score) {
  color:#f1f5f8 !important;
}
html[data-theme="dark"] body #view-projections .projection-table tbody tr:is(
  .hammer-live-row,
  .hammer-live-pending-row,
  .hammer-final-untracked-row,
  .hammer-final-pending-row,
  .completed-row
) :is(.team-meta,.line-secondary,.disagreement-note,.signal-record) {
  color:#aebbc7 !important;
}
html[data-theme="dark"] .hammer-live-badge,
html[data-theme="dark"] .hammer-live-pending-label {
  background:#3b2024 !important;
  border-color:#7b4148 !important;
  color:#ff9d9d !important;
}
html[data-theme="dark"] .hammer-live-detail { color:#f08e8e !important; }
html[data-theme="dark"] .hammer-final-untracked-label,
html[data-theme="dark"] .hammer-final-pending-label {
  background:#242e39 !important;
  border-color:#465565 !important;
  color:#cbd5df !important;
}
html[data-theme="dark"] body #view-projections :is(.final-label,.hammer-untracked-status) {
  background:#242e39 !important;
  border-color:#465565 !important;
  color:#d8e1e9 !important;
}

html[data-theme="dark"] .thi-band-elite { background:#0c6049 !important; color:#f2fffb !important; }
html[data-theme="dark"] .thi-band-strong { background:#217353 !important; color:#f2fffb !important; }
html[data-theme="dark"] .thi-band-above { background:#254d3e !important; color:#d7f4e8 !important; }
html[data-theme="dark"] .thi-band-average { background:#29313a !important; color:#d4dbe2 !important; }
html[data-theme="dark"] .thi-band-below { background:#4a3d1f !important; color:#f2d77d !important; }
html[data-theme="dark"] .thi-band-poor { background:#603c23 !important; color:#ffd1a9 !important; }
html[data-theme="dark"] .thi-band-critical { background:#692f30 !important; color:#ffd9d6 !important; }
html[data-theme="dark"] .thi-band-missing { background:#202832 !important; color:#8995a1 !important; }
html[data-theme="dark"] .thi-band-regression { background:#30294a !important; color:#d6c9ff !important; }
html[data-theme="dark"] #hammer-postgame-analytics .hammer-pg-band-elite { background:#0c6049 !important; color:#f2fffb !important; }
html[data-theme="dark"] #hammer-postgame-analytics .hammer-pg-band-strong { background:#217353 !important; color:#f2fffb !important; }
html[data-theme="dark"] #hammer-postgame-analytics .hammer-pg-band-above { background:#254d3e !important; color:#d7f4e8 !important; }
html[data-theme="dark"] #hammer-postgame-analytics .hammer-pg-band-average { background:#29313a !important; color:#d4dbe2 !important; }
html[data-theme="dark"] #hammer-postgame-analytics .hammer-pg-band-below { background:#4a3d1f !important; color:#f2d77d !important; }
html[data-theme="dark"] #hammer-postgame-analytics .hammer-pg-band-poor { background:#603c23 !important; color:#ffd1a9 !important; }
html[data-theme="dark"] #hammer-postgame-analytics .hammer-pg-band-critical { background:#692f30 !important; color:#ffd9d6 !important; }

html[data-theme="dark"] #thi-market-story :is(.thi-market-head,.thi-market-grid,.thi-market-card,.thi-market-empty),
html[data-theme="dark"] #thi-market-story .thi-market-panel,
html[data-theme="dark"] #thi-performance-scorecard :is(.perf-stat,.perf-period),
html[data-theme="dark"] #thi-postgame-panel :is(.pg-metric,.pg-note),
html[data-theme="dark"] #hammer-postgame-analytics :is(.hammer-pg-card,.hammer-pg-row,.hammer-pg-pending) {
  background:var(--surface) !important; color:var(--text) !important;
}
html[data-theme="dark"] #thi-market-story :is(.thi-market-head,.thi-market-empty),
html[data-theme="dark"] #thi-performance-scorecard th,
html[data-theme="dark"] #thi-postgame-panel .pg-note {
  background:var(--surface-soft) !important;
}

html[data-theme="dark"] :is(.status.agree,.status.inline,.result-pending,.grade-na,.tag-neutral) {
  background:#252d38 !important; color:var(--muted) !important; border-color:var(--border-dark) !important;
}
html[data-theme="dark"] .thi-availability-status.out { color:#ffaaa1; border-color:#70403d; background:#3b2222; }
html[data-theme="dark"] .thi-availability-status.doubtful { color:#f4bd75; border-color:#704b25; background:#382719; }
html[data-theme="dark"] .thi-availability-status.questionable { color:#f3d26f; border-color:#6d5a25; background:#392f15; }
html[data-theme="dark"] .thi-availability-status.available { color:#7bd4b4; border-color:#326a59; background:#15352c; }
html[data-theme="dark"] .thi-availability-status.unknown { background:#202833; }

html[data-theme="dark"] .team-logo { background:#f1f3f4; border-color:#4b5662; }
html[data-theme="dark"] .thi-ratings-difference { background:#121923 !important; border-color:#3a4653 !important; }
html[data-theme="dark"] .thi-ratings-difference strong { color:#f1f5f8 !important; }
html[data-theme="dark"] .thi-ratings-difference span,
html[data-theme="dark"] .thi-ratings-difference p { color:#aebbc7 !important; }
html[data-theme="dark"] .thi-player-grade { background:#153b31 !important; color:#7bd4b4 !important; }
html[data-theme="dark"] .thi-player-table th { background:#202a35 !important; color:#bdc9d4 !important; }
html[data-theme="dark"] .thi-player-sort:hover,
html[data-theme="dark"] .thi-player-sort.active { color:#fff !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-metric { border-color:#34404c !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-elite { background:#0e5a44 !important; color:#f1fff9 !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-strong { background:#1d6b4e !important; color:#f1fff9 !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-above { background:#244b3d !important; color:#dff8ed !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-average { background:#2b333d !important; color:#e2e8ed !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-below { background:#59471f !important; color:#ffe8a0 !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-poor { background:#643b2d !important; color:#ffd8c9 !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-critical { background:#6b2d30 !important; color:#ffe0df !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-band-missing { background:#202832 !important; color:#9ba7b3 !important; }
html[data-theme="dark"] .thi-player-table td.thi-player-metric :is(.thi-player-metric-value,.thi-player-metric-label) { color:inherit !important; }
html[data-theme="dark"] .thi-availability-scenario { background:#111720 !important; border-color:#3a4653 !important; }
html[data-theme="dark"] :is(.distribution-track,.win-prob-bar,.thi-intel-prob-track,.vl-dist-track) { background:#303946 !important; }

@media (max-width:900px) {
  .thi-theme-toggle { margin-left:auto; }
  .thi-theme-label { display:none; }
}
