    :root {
      color-scheme: light;
      --app-bg: #f5f5f7;
      /* The window behind the content panel: the sidebar's surface. A step
         darker than the panel so the panel reads as lifted off it. */
      --sidebar-bg: #e7e7ec;
      --material-opacity: 94%;
      --surface: #ffffff;
      --surface-soft: #eeeef1;
      --surface-inset: #e9e9ed;
      --line: rgba(60, 60, 67, .14);
      --line-soft: rgba(60, 60, 67, .08);
      --ink: #1d1d1f;
      --secondary: #55555b;
      --tertiary: #606067;
      --track: #d8d8dd;
      --switch-track: #85858f;
      --control-line: #777780;
      --hover: rgba(0, 0, 0, .035);
      --pressed: rgba(0, 0, 0, .075);
      --accent: #0058b8;
      --accent-fill: #0058b8;
      --green: #176f30;
      --orange: #984700;
      --warning-fill: #984700;
      --red: #bd0013;
      --danger-fill: #bd0013;
      --purple: #8944ab;
      --cyan: #006a92;
      --shadow: 0 10px 30px rgba(0, 0, 0, .12);

      /* Spacing — the macOS 4/8pt grid. Spacing does not change with the
         colour mode, so the scale is defined once, here, and `:root.dark`
         overrides only colour.

         `--space-tight` is the one deliberate step off that grid. It is the
         optical icon-to-label gap, and it is the most-used value in the app;
         snapping it to 8px loosens every control that pairs a glyph with a
         word. It is named rather than rounded so the exception is visible. */
      --space-half: 2px;
      --space-1: 4px;
      --space-tight: 6px;
      --space-2: 8px;
      --space-3: 12px;
      --space-4: 16px;
      --space-5: 20px;
      --space-6: 24px;
      --space-8: 32px;
      --space-10: 40px;
    }
    :root.dark {
      color-scheme: dark;
      --app-bg: #1a1a1c;
      --sidebar-bg: #111113;
      --surface: #242426;
      --surface-soft: #2c2c2e;
      --surface-inset: #202022;
      --line: rgba(255, 255, 255, .1);
      --line-soft: rgba(255, 255, 255, .055);
      --ink: #f5f5f7;
      --secondary: #b8b8bf;
      --tertiary: #adadb5;
      --track: #3a3a3c;
      --switch-track: #85858f;
      --control-line: #909099;
      --hover: rgba(255, 255, 255, .045);
      --pressed: rgba(255, 255, 255, .1);
      --accent: #65b4ff;
      --accent-fill: #0062cc;
      --green: #30d158;
      --orange: #ff9f0a;
      --warning-fill: #984700;
      --red: #ff8179;
      --danger-fill: #b52330;
      --purple: #d69bff;
      --cyan: #64d2ff;
      --shadow: 0 14px 38px rgba(0, 0, 0, .38);
    }
    :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root { --material-opacity: 100%; }
}
