/* Design tokens: every colour, size and radius used by the UI. Dark is the default; light follows the system or data-theme. */
@layer tokens {
  :root {
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --bg: #14171f;
    --bg-2: #1b1f2a;        /* panels, bars */
    --bg-3: #242a38;        /* raised controls */
    --bg-4: #2f3748;        /* hover */
    --stage: #0f1218;       /* canvas surround */
    --line: #313a4d;
    --text: #e6e9f0;
    --text-dim: #9aa3b6;
    --accent: #5b8cff;
    --accent-2: #3f6fe0;
    --accent-text: #ffffff;
    --danger: #ff6b6b;
    --ok: #4cd08f;
    --shadow: 0 10px 40px rgba(0, 0, 0, .55);

    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 12px;
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
    --bar-h: 44px;
    --dock-w: 292px;
    --tool-w: 88px;
    color-scheme: dark;
  }

  :root[data-theme="light"] {
    --bg: #eef0f5;
    --bg-2: #ffffff;
    --bg-3: #f1f3f8;
    --bg-4: #e3e7f0;
    --stage: #d8dce6;
    --line: #d3d8e4;
    --text: #1c2130;
    --text-dim: #5c667d;
    --accent: #2f62e8;
    --accent-2: #2350c4;
    --shadow: 0 10px 40px rgba(20, 30, 60, .25);
    color-scheme: light;
  }

  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --bg: #eef0f5;
      --bg-2: #ffffff;
      --bg-3: #f1f3f8;
      --bg-4: #e3e7f0;
      --stage: #d8dce6;
      --line: #d3d8e4;
      --text: #1c2130;
      --text-dim: #5c667d;
      --accent: #2f62e8;
      --accent-2: #2350c4;
      --shadow: 0 10px 40px rgba(20, 30, 60, .25);
      color-scheme: light;
    }
  }
}
