/*
 * Design tokens. Committed dark look, painted explicitly — never follows the
 * OS theme. Change colors here, not in components.
 */
:root {
  /* Native parts such as autofill and scrollbars follow the scheme, not painted colours. */
  color-scheme: dark;

  --bg: #0D141F;             /* page & phone ground */
  --surface: #16202E;        /* expanded panels, chips ground */
  --raised: #1C2938;         /* pressed/hover */
  --line: #1D2A3A;           /* hairlines between rows */
  --ink: #ECF3F9;            /* primary text */
  --ink-soft: #B9C8D6;       /* secondary text */
  --muted: #7E92A7;          /* labels, captions */
  --faint: #566d84;          /* axis labels, footnotes */
  --accent: #6FB9E8;         /* brand blue */
  --accent-bright: #8FD0F4;  /* highlights, pegged bars, medians */
  --bar: #58A9DC;            /* snowfall bars */
  --bar-track: #1E2C3C;
  --grade-a: #7ECB96;
  --grade-b: #DCB365;
  --grade-c: #DE8B72;

  /* No webfonts — system stack, with Japanese faces for the ja locale. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;

  /* Roles over the palette above, never new colours. */
  --text-secondary: var(--ink-soft);
  --text-caption: var(--muted);
  --text-placeholder: var(--muted);
  --control-edge: var(--muted);
  --status-warning: var(--grade-b);
  --status-error: var(--grade-c);
  --focus-ring: var(--accent);
  --focus-gap: var(--bg);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Pills stay 999px. */
  --radius-notice: 8px;
  --radius-control: 10px;
  --radius-preset: 12px;
  --radius-panel: 14px;
  --radius-sheet: 24px;

  /* Rem, so type follows the reader's root text size. */
  --type-body: .875rem;
  --type-page: 1.25rem;
  --type-section: 1.125rem;
  --type-caption: .75rem;
  --type-metric: 1.25rem;
  --type-snowfall: 4rem;
}

@media (max-width: 360px) {
  :root {
    --type-page: 1.125rem;
  }
}
