:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;--bg:#081925;--paper:#112a39;--ink:#e3eff5;--teal:#78dcd2;--cyan:#4ed4cd;--muted:#a7bdca;--line:#2b4656;--theme-soft:#193746;--theme-active:#17444b}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] body.broadcast-view{background:transparent}
html[data-theme="dark"] .site-mast{background:#f1f7f8;color:#102f43;border-color:#d0dfe5;color-scheme:light}
html[data-theme="dark"] .site-mast .site-brand{color:#102f43}
html[data-theme="dark"] .site-mast .site-brand strong{color:#476674}
html[data-theme="dark"] .site-mast .logo-on-dark{display:none}
html[data-theme="dark"] .site-mast .site-brand .logo-on-light{display:block}
html[data-theme="dark"] .site-mast .mast-row nav a{color:#3c5a6b}
html[data-theme="dark"] .site-mast .mast-row nav a:hover,html[data-theme="dark"] .site-mast .mast-row nav a[aria-current="page"]{color:#052443;border-bottom-color:#008589}
html[data-theme="dark"] .site-mast .play-mark{color:#007b80}
html[data-theme="dark"] .site-mast .theme-toggle{color:#153f53;border-color:#b8cdd5}
html[data-theme="dark"] .site-mast .theme-toggle:hover{color:#003c4c;background:#deeeef;border-color:#007f86}
html[data-theme="dark"] .site-mast .theme-toggle:focus-visible{outline-color:#00828a}
html[data-theme="dark"] .theme-toggle .theme-icon-moon{display:none}
html[data-theme="dark"] .theme-toggle .theme-icon-sun{display:block}

/* Archive, menus, and protocols. */
html[data-theme="dark"] main>section:not(.broadcast):not(.landing-hero),
html[data-theme="dark"] .report section,
html[data-theme="dark"] :is(.sheet,.chapters,.bar,.catlist,.other-panel,.broadcast-status){background:var(--paper);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] :is(.meta,.event b,.program a,.files a,.report a,.report summary,.warmup-sheet td:nth-child(3),.video-ready){color:var(--teal)}
html[data-theme="dark"] :is(.source,small,.warmup-sheet th,.replay-status,.athlete-options,.movement){color:var(--muted)}
html[data-theme="dark"] :is(td,th,details,.event,.program,.cat-block,.chapters li,.chapters h2,.cat-foot,footer){border-color:var(--line)}
html[data-theme="dark"] .report .export-categories th{background:#1b3646;color:#c1d6e1}
html[data-theme="dark"] .export-categories tbody{--band:#12363b;--edge:#4cbcb6}
html[data-theme="dark"] .export-categories tbody:nth-of-type(even){--band:#1a2f49;--edge:#7d9fc7}
html[data-theme="dark"] .report .export-categories td{color:var(--ink)}
html[data-theme="dark"] .export-categories tbody tr:first-child td{border-top-color:var(--bg)}
html[data-theme="dark"] .schedule-band-0 td{background:#12363b}
html[data-theme="dark"] .schedule-band-1 td{background:#1a2f49}
html[data-theme="dark"] main>p>a{color:var(--teal)}

/* Broadcast tables, selectors, and participant replay controls. */
html[data-theme="dark"] :is(.bar select,.live-tools select,.group-controls select,.controls select,.minor-button,.chapters button,.detail-inner table){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.chapters button:hover,.minor-button:hover,.tabs a:hover:not(.active),.cat-block>summary:hover){background:var(--theme-soft);color:var(--teal)}
html[data-theme="dark"] :is(.cat-block[open]>summary,.chapters button[aria-current="true"],.run-athlete td,.current,.run-score){background:var(--theme-active);color:var(--ink)}
html[data-theme="dark"] :is(.sheet th,.detail-inner th){background:#173242;color:var(--muted)}
html[data-theme="dark"] :is(.group-row th,.warmup-heading){background:#16373d;color:var(--teal)}
html[data-theme="dark"] .detail-row>td{background:#0d2231}
html[data-theme="dark"] .isu-roster details>summary::after{color:var(--teal)}
html[data-theme="dark"] .chapters .whole-program button{background:#17666b;color:white;border-color:#36858b}
html[data-theme="dark"] .chapters .whole-program button:hover{background:#207b7e;color:white}
html[data-theme="dark"] .chapters .whole-program button:disabled{background:#20333f;color:#95a9b4;border-color:var(--line)}
html[data-theme="dark"] .skip{background:var(--paper);color:var(--ink)}
