/* Shared color tokens and the light/dark toggle. Every page loads this first.
   Light is the default. Dark applies when the device prefers dark and the user has not
   picked light, or when the user picked dark (data-theme on <html>, set by the inline
   head script and /shared/theme.js). */
:root{
  --bg:#f3f5f6; --surface:#ffffff; --fg:#17212b; --muted:#5d6b78; --line:#d8dee3;
  --accent:#1f5f8b; --accent-bg:#e5eef5; --soon-bg:#eceff1;
  --pos:#b3261e; --pos-bg:#fbe9e7; --neg:#2e6b3a; --neg-bg:#e6f2e8; --na-bg:#eceff1;
  --warn:#8a5a00; --warn-bg:#fdf3dc;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#11171c; --surface:#1a2229; --fg:#e4eaef; --muted:#93a1ad; --line:#2c3842;
  --accent:#6fb2e0; --accent-bg:#1b2c3a; --soon-bg:#222c35;
  --pos:#ff8a80; --pos-bg:#3a1f1d; --neg:#86c995; --neg-bg:#1c3122; --na-bg:#25303a;
  --warn:#f2c46b; --warn-bg:#352a14;
  color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#11171c; --surface:#1a2229; --fg:#e4eaef; --muted:#93a1ad; --line:#2c3842;
  --accent:#6fb2e0; --accent-bg:#1b2c3a; --soon-bg:#222c35;
  --pos:#ff8a80; --pos-bg:#3a1f1d; --neg:#86c995; --neg-bg:#1c3122; --na-bg:#25303a;
  --warn:#f2c46b; --warn-bg:#352a14;
  color-scheme:dark}

/* ---------- Toggle button: sun shows in dark mode, moon in light mode ---------- */
.theme-btn{flex:none;display:inline-grid;place-items:center;width:40px;height:40px;padding:0;margin:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--fg);cursor:pointer;-webkit-tap-highlight-color:transparent}
.theme-btn:hover{border-color:var(--accent);color:var(--accent)}
.theme-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.theme-btn svg{width:20px;height:20px;display:block}
.theme-btn .i-sun{display:none}
:root[data-theme="dark"] .theme-btn .i-sun{display:block}
:root[data-theme="dark"] .theme-btn .i-moon{display:none}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .theme-btn .i-sun{display:block}
  :root:not([data-theme="light"]) .theme-btn .i-moon{display:none}
}
/* Reset button in every scorer header (added by /shared/theme.js) */
.reset-top{flex:none;height:40px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--fg);font:inherit;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent}
.reset-top:hover{border-color:var(--accent);color:var(--accent)}
.reset-top:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Right side of a scorer header: verdict pill, then the toggle */
.hdr-r{display:flex;align-items:center;gap:8px;margin-left:auto}
