:root {
  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;

  /* Spacing (4px grid) */
  --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;

  /* Radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;

  /* Borders */
  --border-1: 1px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 120ms;
  --dur-2: 180ms;
  --dur-3: 240ms;

  /* Brand accent (single source of blue) */
  --accent-500: #3B82F6;
  --accent-600: #2563EB;
  --accent-700: #1D4ED8;

  /* Semantic colours */
  --success: #16A34A;
  --warning: #D97706;
  --danger:  #DC2626;
  --info:    #0EA5E9;

  /* Light tokens (rarely used if you default dark, but kept for completeness) */
  --page: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F1F3F7;
  --text: #0B1220;
  --text-2: #374151;
  --muted: #6B7280;
  --border: #E5E7EB;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 10px 26px rgba(15, 23, 42, 0.12);
  --shadow-3: 0 20px 60px rgba(15, 23, 42, 0.16);

  /* "Edge" dark background used for hero/top bars if needed */
  --bg: #0B1220;
}

/* Dark theme (DEFAULT in your HTML via data-theme="dark") */
:root[data-theme="dark"] {
  --page: #0B1220;
  --surface: #0F172A;
  --surface-2: #111C33;
  --text: #E5E7EB;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --border: rgba(148, 163, 184, 0.18);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 10px 26px rgba(0, 0, 0, 0.38);
  --shadow-3: 0 20px 60px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
  /* Optional explicit hook */
}
