:root {
  /* Matte Blue scale (primary brand) */
  --get-blue-950: #0E1F33;
  --get-blue-900: #16304D;
  --get-blue-800: #1F3A5F;
  --get-blue-700: #2A4C77;
  --get-blue-600: #35608F;
  --get-blue-500: #4A7BAA;
  --get-blue-400: #5487B8;
  --get-blue-300: #82A9CE;
  --get-blue-200: #B5CCE3;
  --get-blue-100: #D9E4EF;
  --get-blue-050: #EEF3F8;
  --get-blue-50: var(--get-blue-050);

  /* White Milk (warm whites / surfaces) */
  --milk-000: #FFFFFF;
  --milk-050: #FDFBF7;
  --milk-100: #F7F3EC;
  --milk-200: #EFE9DF;
  /* Card surface (PWA install banner / offline card) — Milk White */
  --surface-card: var(--milk-050);

  /* Ink (text / typography) - High Contrast WCAG AAA/AA */
  --ink-900: #0B131F; /* Primary text: 16.5:1 contrast on milk-050 */
  --ink-700: #1E293B; /* Body text: 12.2:1 contrast on milk-050 */
  --ink-500: #475569; /* Secondary/muted text: 6.8:1 contrast on milk-050 */

  /* Semantic status colors */
  --success: #1E6B47;
  --success-bg: #EAF4EE;
  --success-subtle: #EAF4EE;
  --warning: #9A6208;
  --warning-bg: #FEF7EA;
  --danger: #A63A2E;
  --danger-bg: #FDF0EE;
  --info: #1D607F;
  --info-bg: #EEF7FA;

  /* Accent aliases */
  --accent: var(--get-blue-700);
  --accent-subtle: rgba(42, 76, 119, 0.12);

  /* Structural borders & subtle elevation */
  --border: #E2DBD0;
  --border-strong: #C5BCAD;
  --shadow-sm: 0 1px 2px rgba(31, 58, 95, 0.06);
  --shadow-md: 0 6px 18px rgba(31, 58, 95, 0.08);
  --shadow-lg: 0 18px 48px rgba(31, 58, 95, 0.10);
  --shadow-xl: 0 24px 60px rgba(14, 31, 51, 0.14);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Transitions & Animation */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;
  --transition-fast: 150ms var(--ease);
  --transition-normal: var(--dur) var(--ease);
  --transition-slow: 350ms var(--ease);

  /* Layout */
  --container: 1200px;
  --measure: 68ch;

  /* Typography Stacks (Offline-First / System Fallbacks) */
  --font-display: "Inter Tight", "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Theme semantic aliases */
  --bg-page: var(--milk-050);
  --bg-surface: var(--milk-000);
  --bg-surface-alt: var(--milk-100);
  --bg-body: var(--bg-page);
  --text-main: var(--ink-900);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-primary: var(--text-main);
  --text-secondary: var(--text-body);
  --text-tertiary: var(--text-muted);
  --color-primary: var(--get-blue-800);
  --color-primary-hover: var(--get-blue-700);
  --color-primary-light: var(--get-blue-050);

  /* Theme Toggle Button Tokens (Light Mode default: Text White Milk, Background Matte Blue) */
  --theme-btn-bg: var(--get-blue-800);
  --theme-btn-color: var(--milk-050);
  --theme-btn-border: var(--get-blue-700);
  --theme-btn-hover-bg: var(--get-blue-700);
  --theme-btn-hover-color: var(--milk-000);
  --theme-btn-shadow: var(--shadow-sm);
}

/* Explicit Light Mode Override */
[data-theme="light"] {
  --bg-page: var(--milk-050);
  --bg-surface: var(--milk-000);
  --bg-surface-alt: var(--milk-100);
  --bg-body: var(--bg-page);
  --text-main: var(--ink-900);
  --text-body: var(--ink-700);
  --text-muted: var(--ink-500);
  --text-primary: var(--text-main);
  --text-secondary: var(--text-body);
  --text-tertiary: var(--text-muted);
  --border: #E2DBD0;
  --border-strong: #C5BCAD;
  --shadow-sm: 0 1px 2px rgba(31, 58, 95, 0.06);
  --shadow-md: 0 6px 18px rgba(31, 58, 95, 0.08);
  --shadow-lg: 0 18px 48px rgba(31, 58, 95, 0.10);
  --shadow-xl: 0 24px 60px rgba(14, 31, 51, 0.14);
  --color-primary: var(--get-blue-800);
  --color-primary-hover: var(--get-blue-700);
  --color-primary-light: var(--get-blue-050);
  --accent: var(--get-blue-700);
  --accent-subtle: rgba(42, 76, 119, 0.12);
  --success-subtle: #EAF4EE;
  --get-blue-200: #B5CCE3;
  --get-blue-300: #82A9CE;
  --get-blue-400: #5487B8;
  --get-blue-50: var(--get-blue-050);

  /* Light Mode: Text White Milk, Background Matte Blue */
  --theme-btn-bg: var(--get-blue-800);
  --theme-btn-color: var(--milk-050);
  --theme-btn-border: var(--get-blue-700);
  --theme-btn-hover-bg: var(--get-blue-700);
  --theme-btn-hover-color: var(--milk-000);
  --theme-btn-shadow: var(--shadow-sm);
}

/* System Dark Mode (when not explicitly light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: var(--get-blue-950);
    --bg-surface: #14253B;
    --surface-card: #14253B;
    --bg-surface-alt: #1B314D;
    --bg-body: var(--bg-page);
    --text-main: #FFFFFF;
    --text-body: #E2E8F0;
    --text-muted: #CBD5E1;
    --text-primary: var(--text-main);
    --text-secondary: var(--text-body);
    --text-tertiary: var(--text-muted);
    --border: #233C5B;
    --border-strong: #3B5B84;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.40);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.50);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.55);
    --color-primary: #6BA3DB;
    --color-primary-hover: #93C5FD;
    --color-primary-light: #16304D;
    --accent: #6BA3DB;
    --accent-subtle: rgba(107, 163, 219, 0.18);
    --success: #34D399;
    --success-bg: rgba(52, 211, 153, 0.15);
    --success-subtle: rgba(52, 211, 153, 0.15);
    --warning: #FBBF24;
    --warning-bg: rgba(251, 191, 36, 0.15);
    --danger: #F87171;
    --danger-bg: rgba(248, 113, 113, 0.15);
    --info: #38BDF8;
    --info-bg: rgba(56, 189, 248, 0.15);
    --get-blue-200: #CBD5E1;
    --get-blue-300: #93C5FD;
    --get-blue-400: #6BA3DB;
    --get-blue-50: #16304D;

    /* Dark Mode: Text Matte Blue, Background White Milk */
    --theme-btn-bg: var(--milk-050);
    --theme-btn-color: var(--get-blue-800);
    --theme-btn-border: var(--border-strong);
    --theme-btn-hover-bg: var(--milk-000);
    --theme-btn-hover-color: var(--get-blue-900);
    --theme-btn-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* Explicit Dark Mode Override */
[data-theme="dark"] {
  --bg-page: var(--get-blue-950);
  --bg-surface: #14253B;
  --surface-card: #14253B;
  --bg-surface-alt: #1B314D;
  --bg-body: var(--bg-page);
  --text-main: #FFFFFF;
  --text-body: #E2E8F0;
  --text-muted: #CBD5E1;
  --text-primary: var(--text-main);
  --text-secondary: var(--text-body);
  --text-tertiary: var(--text-muted);
  --border: #233C5B;
  --border-strong: #3B5B84;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.50);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.55);
  --color-primary: #6BA3DB;
  --color-primary-hover: #93C5FD;
  --color-primary-light: #16304D;
  --accent: #6BA3DB;
  --accent-subtle: rgba(107, 163, 219, 0.18);
  --success: #34D399;
  --success-bg: rgba(52, 211, 153, 0.15);
  --success-subtle: rgba(52, 211, 153, 0.15);
  --warning: #FBBF24;
  --warning-bg: rgba(251, 191, 36, 0.15);
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.15);
  --info: #38BDF8;
  --info-bg: rgba(56, 189, 248, 0.15);
  --get-blue-200: #CBD5E1;
  --get-blue-300: #93C5FD;
  --get-blue-400: #6BA3DB;
  --get-blue-50: #16304D;

  /* Dark Mode: Text Matte Blue, Background White Milk */
  --theme-btn-bg: var(--milk-050);
  --theme-btn-color: var(--get-blue-800);
  --theme-btn-border: var(--border-strong);
  --theme-btn-hover-bg: var(--milk-000);
  --theme-btn-hover-color: var(--get-blue-900);
  --theme-btn-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
