/* Dark theme from the OS preference - DERIVED, DO NOT HAND-EDIT.
 *
 * tokens.css keys dark off [data-theme="dark"] because the design system is
 * built for apps that ship a toggle. This site has no toggle and no palette
 * machinery, so the same declarations are restated here under
 * prefers-color-scheme. Nothing else can do it: a media query cannot set an
 * attribute, and CSS has no way to re-apply another rule's declarations.
 *
 * A head script would be the other way to bridge it, and is what
 * brewmdm-website does. Not here: this site's CSP is `script-src 'none'` and
 * the page is deliberately script-free (see AGENTS.md), so the bridge is
 * static CSS instead.
 *
 * Every declaration below is a verbatim copy of the [data-theme="dark"] block
 * in tokens.css. Re-derive it, never retype it, and
 * tests/test_site_contract.py compares the two declaration-by-declaration so a
 * token added upstream cannot be dark in one place and light in the other.
 *
 * `:not([data-theme="light"])` keeps an explicit light choice winning under an
 * OS dark preference, and the higher specificity keeps this file - which loads
 * after tokens.css - from being overridden by the light :root block.
 */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg-canvas: oklch(0.195 0.01 227);
    --color-bg-surface: oklch(0.225 0.011 227);
    --color-bg-raised: oklch(0.26 0.012 227);
    --color-bg-hover: oklch(0.245 0.012 227);
    --color-bg-selected: oklch(0.28 0.014 227);
    --color-bg-track: oklch(0.36 0.012 227);
    --color-bg-inverse: oklch(0.245 0.012 227);
    --color-bg-accent: #66aecb;
    --color-bg-accent-soft: #1f2f38;
    --color-fg-default: oklch(0.92 0.006 227);
    --color-fg-soft: oklch(0.8 0.01 227);
    --color-fg-muted: oklch(0.7 0.015 227);
    --color-fg-faint: oklch(0.55 0.015 227); /** Decorative/disabled/placeholder only - exempt from AA text checks. */
    --color-fg-on-accent: #0e161b;
    --color-fg-on-inverse: oklch(0.92 0.006 227);
    --color-border-default: oklch(0.31 0.012 227);
    --color-border-strong: oklch(0.4 0.014 227);
    --color-status-ok: #5fae7f;
    --color-status-warn: #c9a04a;
    --color-status-fail: #d97b64;
    --color-accent-hover: #7cbcd6;
  }
}
