/* The page's colours, type and spacing, named by the job they do, so dark and light swap in one place.

   Dark is the page's own look (the owner, 21 Nov 2026: "make the dark mode default"); light is there for whoever picks
   it under Settings, kept in that browser (lib/theme.js). Quiet greys with one accent (the blue), and the chart colours
   apart from it: the eight categorical slots are the validated default palette, used in this fixed order and never
   cycled, and stepped for each surface rather than flipped. Status colours (good, warning, critical) are kept for state
   alone and always come with a word. */

:root {
  color-scheme: dark;
  --page: #0f0f10;
  --surface: #19191b;
  --surface-sunk: #151517;
  --surface-hover: #222225;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --ink-3: #8b8a85;
  --line: #2a2a2d;
  --line-strong: #3a3a3e;
  --ring: rgba(255, 255, 255, 0.1);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-lift: 0 16px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);

  --accent: #3987e5;
  --accent-ink: #86b6ef;
  --accent-soft: #16263b;
  --button-ink: #f0efec;
  --button-text: #14161f;

  --good: #0ca30c;
  --good-ink: #0ca30c;
  --good-soft: #142614;
  --warning: #fab219;
  --warning-ink: #fab219;
  --warning-soft: #2e2512;
  --critical: #d03b3b;
  --critical-ink: #e66767;
  --critical-soft: #331a1a;

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #0ca30c;
  --series-7: #9085e9;
  --series-other: #6d6c67;
  --series-quiet: #45443f;
  --meter-track: #16304f;

  --grid: #252527;
  --axis: #383835;
  --axis-text: #898781;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-small: 10px;
  --gap: 16px;
  --gutter: 32px;
  --sidebar: 232px;
}

:root[data-theme='light'] {
  color-scheme: light;
  --page: #f6f6f4;
  --surface: #ffffff;
  --surface-sunk: #fafaf8;
  --surface-hover: #f3f3f0;
  --ink: #14161f;
  --ink-2: #4d5260;
  --ink-3: #8a8e98;
  --line: #e8e7e3;
  --line-strong: #d7d6d0;
  --ring: rgba(20, 22, 31, 0.08);
  --shadow: 0 1px 2px rgba(20, 22, 31, 0.04), 0 1px 1px rgba(20, 22, 31, 0.03);
  --shadow-lift: 0 12px 32px rgba(20, 22, 31, 0.12), 0 2px 6px rgba(20, 22, 31, 0.06);

  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-soft: #ebf3fd;
  --button-ink: #14161f;
  --button-text: #ffffff;
  --good-ink: #006300;
  --good-soft: #e9f6e9;
  --warning-ink: #855400;
  --warning-soft: #fdf4e0;
  --critical-ink: #b42727;
  --critical-soft: #fcecec;

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #6250d6;
  --series-other: #a3a29b;
  --series-quiet: #c9c8c1;
  --meter-track: #cde2fb;

  --grid: #eeede9;
  --axis: #c3c2b7;
}

@media (max-width: 860px) {
  :root {
    --gutter: 16px;
    --gap: 12px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

.noscript {
  padding: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.numbers {
  font-variant-numeric: tabular-nums;
}
