:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --gridline: #e1e0d9;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-track: #cde2fb;
  --accent-cs: #9333ea;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --heat-1: #cde2fb;
  --heat-2: #6da7ec;
  --heat-3: #2a78d6;
  --heat-4: #184f95;
  --ops-grey: #e9e8e3;
}

/* Follows the OS/browser setting only — no manual toggle. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --gridline: #2c2c2a;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --accent-track: #184f95;
    --accent-cs: #c084fc;
    --good: #0ca30c;
    --warning: #fab219;
    --critical: #e66767;
    --heat-1: #184f95;
    --heat-2: #2a78d6;
    --heat-3: #5598e7;
    --heat-4: #86b6ef;
    --ops-grey: #232322;
  }
}

* { box-sizing: border-box; }

/* Chrome's native autofill (saved names/passwords/addresses) paints its own
   background and can silently override an input's text colour — on a dark
   surface that has produced literally invisible autofilled text on other
   products in this portfolio (Handy's login field). Forcing both the
   background (via the inset box-shadow trick, since background-color alone
   can't beat the autofill layer) and the text colour back to this page's
   own tokens keeps autofilled text exactly as readable as typed text, in
   both themes. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text-primary);
  caret-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0px 1000px var(--page) inset;
  box-shadow: 0 0 0px 1000px var(--page) inset;
  transition: background-color 9999s ease-in-out 0s;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--text-primary);
  min-height: 100vh;
}
