/* Design tokens for ACFC Use Case Manager. Every colour pair used for text is
   checked to WCAG AA in docs/VERIFICATION.md. Light is the default; dark is
   opt-in through data-theme or the system preference. */
:root {
  color-scheme: light;
  --font-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, 'Courier New', monospace;

  --bg: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --surface-3: #e9edf5;
  --surface-sunken: #e4e8f1;
  --border: #dbe1ec;
  --border-strong: #c2cadb;
  --text: #101828;
  --text-2: #3f4a63;
  --text-3: #5a6680;
  --text-inverse: #ffffff;

  --cobalt: #2f47d0;
  --cobalt-strong: #2338b3;
  --cobalt-text: #2b40c4;
  --cobalt-soft: #e9edff;
  --cobalt-soft-2: #d6ddff;
  --cobalt-line: #9aa9f2;

  --teal: #0f8b7f;
  --teal-text: #0b6b61;
  --teal-soft: #daf3ee;

  --amber-text: #8a4b06;
  --amber-soft: #fdf1dc;
  --amber-line: #e7b46a;
  --red: #c4321f;
  --red-text: #a1251b;
  --red-soft: #fdecea;
  --red-line: #ef9f95;

  --focus: #b45309;
  --focus-on-ink: #fbbf24;
  /* Off-state track for switches: 3:1 against every surface (non-text contrast). */
  --control-off: #7d88a1;

  --rail-bg: linear-gradient(180deg, #0c1226 0%, #111a3a 62%, #141d3d 100%);
  --rail-text: #c9d1ea;
  --rail-muted: #96a1c4;
  --rail-hover: #18224a;
  --rail-active: #263480;
  --rail-border: #222c52;

  --code-bg: #f7f8fc;
  --code-gutter: #eef1f8;
  --code-fg: #18213a;
  --code-line: #e9edff;
  --code-selection: #cfd8ff;
  --syn-keyword: #2b40c4;
  --syn-operator: #3a4fd6;
  --syn-string: #0b6b61;
  --syn-number: #9a4a07;
  --syn-comment: #5f6b84;
  --syn-function: #7a2fb8;

  --stage-empty: #d6dceb;
  --stage-fill: #2f47d0;
  --stage-live: #0f8b7f;
  --stage-retired: #9aa4bb;

  --overlay: rgb(9 13 28 / 0.42);
  --shadow-1: 0 1px 2px rgb(16 24 40 / 0.06), 0 1px 1px rgb(16 24 40 / 0.03);
  --shadow-2: 0 10px 28px -6px rgb(16 24 40 / 0.18), 0 2px 6px rgb(16 24 40 / 0.06);
  --shadow-3: 0 28px 72px -12px rgb(9 13 28 / 0.38), 0 6px 18px rgb(9 13 28 / 0.12);
  --header-glow: linear-gradient(180deg, rgb(47 71 208 / 0.07), rgb(47 71 208 / 0) 100%);

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --dur-1: 150ms;
  --dur-2: 200ms;
  --dur-3: 280ms;

  --rail-w: 236px;
  --rail-w-collapsed: 68px;
  --topbar-h: 60px;
  --gutter: 28px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #121a31;
  --surface-2: #0f1630;
  --surface-3: #1a2441;
  --surface-sunken: #0a0f1f;
  --border: #232d4d;
  --border-strong: #33406a;
  --text: #e7ebf6;
  --text-2: #b8c1d9;
  --text-3: #8f9bb9;
  --text-inverse: #ffffff;

  --cobalt: #3f58e6;
  --cobalt-strong: #5068f0;
  --cobalt-text: #a9b7ff;
  --cobalt-soft: #1d2a63;
  --cobalt-soft-2: #26357a;
  --cobalt-line: #4a5fc9;

  --teal: #2bb9a6;
  --teal-text: #5fd7c6;
  --teal-soft: #0f3532;

  --amber-text: #f2b765;
  --amber-soft: #3a2a10;
  --amber-line: #8a6227;
  --red: #f26b5b;
  --red-text: #ff9c92;
  --red-soft: #3d1b1b;
  --red-line: #8f3b33;

  --focus: #fbbf24;
  --control-off: #5d6a94;

  --rail-bg: linear-gradient(180deg, #070b17 0%, #0c1330 62%, #101839 100%);
  --rail-border: #1c2547;

  --code-bg: #0d1327;
  --code-gutter: #0b1022;
  --code-fg: #dde3f3;
  --code-line: #151e3d;
  --code-selection: #2a3a86;
  --syn-keyword: #9fb0ff;
  --syn-operator: #b8c4ff;
  --syn-string: #6bd9c9;
  --syn-number: #f2b765;
  --syn-comment: #8a96b4;
  --syn-function: #d4a8ff;

  --stage-empty: #2a3456;
  --stage-fill: #6d82ff;
  --stage-live: #2bb9a6;
  --stage-retired: #56617f;

  --overlay: rgb(2 4 12 / 0.62);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow-2: 0 14px 32px -8px rgb(0 0 0 / 0.6), 0 2px 6px rgb(0 0 0 / 0.3);
  --shadow-3: 0 30px 80px -10px rgb(0 0 0 / 0.75), 0 8px 20px rgb(0 0 0 / 0.4);
  --header-glow: linear-gradient(180deg, rgb(91 116 255 / 0.1), rgb(91 116 255 / 0) 100%);
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
    --topbar-h: 56px;
  }
}
