/*
  Design tokens — navy brand ramp, neutrals, semantic colours, type, space.
  Themes: prefers-color-scheme default; override via [data-theme].
*/
:root {
  color-scheme: light dark;

  --brand-50: #e8eef5;
  --brand-100: #c5d4e6;
  --brand-200: #9bb4d0;
  --brand-300: #6f93b8;
  --brand-400: #4a759e;
  --brand-500: #2f5a82;
  --brand-600: #1e4266;
  --brand-700: #16304a;
  --brand-800: #0f2438;
  --brand-900: #0b1b2b;

  --neutral-0: #ffffff;
  --neutral-50: #f5f7fa;
  --neutral-100: #eef2f6;
  --neutral-200: #e3eaf1;
  --neutral-300: #c6d3de;
  --neutral-400: #9aafc0;
  --neutral-500: #6b7f92;
  --neutral-600: #4a5d6e;
  --neutral-700: #334556;
  --neutral-800: #1f2d3d;
  --neutral-900: #0f1720;

  --success-500: #12a55c;
  --success-100: #eaf9f0;
  --warning-500: #b45309;
  --warning-100: #fef3c7;
  --danger-500: #b42318;
  --danger-100: #fff1f0;
  --info-500: #1d6fb8;
  --info-100: #e8f2fb;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  --font-sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 43, 0.06);
  --shadow-md: 0 12px 32px rgba(11, 27, 43, 0.08);
  --focus-ring: 0 0 0 3px rgba(18, 165, 92, 0.35);

  --bg: var(--neutral-100);
  --surface: var(--neutral-0);
  --text: var(--neutral-800);
  --muted: var(--neutral-500);
  --line: var(--neutral-200);
  --ink: var(--brand-900);
  --ink-2: var(--brand-700);
  --accent: #2ed573;
  --accent-deep: var(--success-500);
  --danger: var(--danger-500);
  --topbar-fg: #ffffff;
  --topbar-muted: #a8bccc;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a121a;
    --surface: #122033;
    --text: #e8eef5;
    --muted: #9aafc0;
    --line: #1e3348;
    --ink: #e8eef5;
    --ink-2: #c5d4e6;
    --topbar-fg: #e8eef5;
    --topbar-muted: #9aafc0;
    --success-100: #0d2e1c;
    --warning-100: #3b2a0a;
    --danger-100: #3a1412;
    --info-100: #0e2438;
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a121a;
  --surface: #122033;
  --text: #e8eef5;
  --muted: #9aafc0;
  --line: #1e3348;
  --ink: #e8eef5;
  --ink-2: #c5d4e6;
  --topbar-fg: #e8eef5;
  --topbar-muted: #9aafc0;
  --success-100: #0d2e1c;
  --warning-100: #3b2a0a;
  --danger-100: #3a1412;
  --info-100: #0e2438;
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: var(--neutral-100);
  --surface: var(--neutral-0);
  --text: var(--neutral-800);
  --muted: var(--neutral-500);
  --line: var(--neutral-200);
  --ink: var(--brand-900);
  --ink-2: var(--brand-700);
  --topbar-fg: #ffffff;
  --topbar-muted: #a8bccc;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
