/*
 * Design tokens, DA "production" v2: the single source of colours for the
 * app. Values from pilotage-design-v2/HANDOFF.md (its table is the
 * reference when mockups differ slightly).
 *
 * Theme: <html data-theme="dark|light"> when the user picked one (cookie),
 * otherwise the system preference; dark by default.
 */

:root {
  --font-ui: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 8px;       /* Buttons, fields, list items. */
  --radius-card: 12px; /* Cards. */
  --radius-pill: 999px;
  --ease: 120ms ease;
}

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0D12;
  --sidebar: #0E1117;
  --surface: #12151C;
  --surface-2: #161A22;
  --column: #0F1218;
  --input: #0E1117;
  --border: #232834;
  --border-strong: #363D4D;
  --hover: rgba(255, 255, 255, 0.045);
  --active: rgba(34, 195, 221, 0.12);
  --text: #E7EAF0;
  --muted: #8C95A8;
  --accent: #22C3DD;
  --accent-text: #5DD6E8;
  --on-accent: #03181C;
  --accent-soft: rgba(34, 195, 221, 0.12);
  --accent-line: rgba(34, 195, 221, 0.45);
  --track: #262C38;
  --danger: #F7899A;
  --danger-soft: rgba(247, 137, 154, 0.08);
  --danger-line: rgba(247, 137, 154, 0.35);
  --success: #4ADE9B;
  --project-1: #22C3DD;
  --project-2: #A78BFA;
  --project-3: #F2B35A;
  --wave: #4A5468;
  --shadow: none;
}

/* Light theme: explicit choice. Keep identical to the block below. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F8FA;
  --sidebar: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --column: #F1F3F6;
  --input: #FFFFFF;
  --border: #E3E6EC;
  --border-strong: #C9CED8;
  --hover: rgba(16, 24, 40, 0.04);
  --active: rgba(14, 143, 168, 0.10);
  --text: #111827;
  --muted: #5B6474;
  --accent: #0E8FA8;
  --accent-text: #0B7488;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(14, 143, 168, 0.10);
  --accent-line: rgba(14, 143, 168, 0.45);
  --track: #E3E6EC;
  --danger: #C2334D;
  --danger-soft: rgba(194, 51, 77, 0.06);
  --danger-line: rgba(194, 51, 77, 0.30);
  --success: #15803D;
  --project-1: #0E8FA8;
  --project-2: #7357E0;
  --project-3: #B7791F;
  --wave: #B3BAC7;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* Light theme: system preference, when no choice is stored. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #F7F8FA;
    --sidebar: #F2F4F7;
    --surface: #FFFFFF;
    --surface-2: #F8F9FB;
    --column: #F1F3F6;
    --input: #FFFFFF;
    --border: #E3E6EC;
    --border-strong: #C9CED8;
    --hover: rgba(16, 24, 40, 0.04);
    --active: rgba(14, 143, 168, 0.10);
    --text: #111827;
    --muted: #5B6474;
    --accent: #0E8FA8;
    --accent-text: #0B7488;
    --on-accent: #FFFFFF;
    --accent-soft: rgba(14, 143, 168, 0.10);
    --accent-line: rgba(14, 143, 168, 0.45);
    --track: #E3E6EC;
    --danger: #C2334D;
    --danger-soft: rgba(194, 51, 77, 0.06);
    --danger-line: rgba(194, 51, 77, 0.30);
    --success: #15803D;
    --project-1: #0E8FA8;
    --project-2: #7357E0;
    --project-3: #B7791F;
    --wave: #B3BAC7;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  }
}
