:root {
  --font-display: 'Aptos Display', 'IBM Plex Sans', 'Source Sans 3', sans-serif;
  --font-body: 'Aptos', 'IBM Plex Sans', 'Source Sans 3', sans-serif;
  --font-mono: 'Berkeley Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Slate ink scale - matches redhelixresearch.com text colors */
  --ink-950: #020617;
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50: #f8fafc;

  /* Paper / page surfaces - clean slate-cool whites */
  --paper-50: #f8fafc;
  --paper-100: #f1f5f9;
  --paper-200: #e2e8f0;

  /* Brand red - exact Red Helix Research tones */
  --accent-primary: #8B2635;
  --accent-soft: #dc2626;
  --accent-deep: #6B1827;
  --accent-darker: #4d0e1c;
  --accent-rose-soft: #fde8eb;
  --accent-rose: #f3c1c8;

  /* Warm amber - Red Helix Research warning tones */
  --accent-gold: #f59e0b;
  --accent-gold-soft: #fef3c7;
  --accent-sand: #fff8e6;
  --accent-amber-ink: #92400e;

  /* Status bands */
  --band-green: #166534;
  --band-green-soft: #dcfce7;
  --band-yellow: #92400e;
  --band-yellow-soft: #fef3c7;
  --band-orange: #c2410c;
  --band-orange-soft: #ffedd5;
  --band-red: #8B2635;
  --band-red-soft: #fde8eb;
  --band-clear: #166534;
  --band-clear-soft: #dcfce7;

  /* Deep red hero surfaces - matches Red Helix hero gradient */
  --surface-ink-deep: #6B1827;
  --surface-ink: #8B2635;
  --surface-ink-elevated: #4d0e1c;
  --hero-gradient: linear-gradient(135deg, #8B2635 0%, #6B1827 100%);
  --hero-gradient-soft: linear-gradient(135deg, rgba(139, 38, 53, 0.92) 0%, rgba(107, 24, 39, 0.96) 100%);

  /* Card surfaces - clean white */
  --surface-card: #ffffff;
  --surface-card-alt: #f8fafc;
  --surface-recessed: #f1f5f9;
  --surface-elevated: #ffffff;
  --surface-overlay: rgba(15, 23, 42, 0.55);

  /* Borders - slate, like Red Helix */
  --border-soft: #e2e8f0;
  --border-softer: #f1f5f9;
  --border-strong: #cbd5e1;
  --border-deep: #94a3b8;
  --border-ink: #4d0e1c;

  /* Shadows - subtle, like Red Helix's 0 1px 3px rgba(0,0,0,0.05) */
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-elevated: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  --shadow-red: 0 8px 18px -10px rgba(139, 38, 53, 0.55);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radii - Red Helix uses 16px on cards */
  --radius-sharp: 2px;
  --radius-soft: 8px;
  --radius-card: 16px;
  --radius-large: 20px;
  --radius-pill: 999px;

  /* Typography */
  --text-display: clamp(2.75rem, 5.4vw, 4.25rem);
  --text-h1: 2rem;
  --text-h2: 1.5rem;
  --text-h3: 1.125rem;
  --text-body: 0.9375rem;
  --text-small: 0.8125rem;
  --text-mono: 0.875rem;
  --text-mono-small: 0.75rem;

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0, 0.13, 1);
  --ease-emphasis: cubic-bezier(0.18, 0.7, 0.2, 1);
  --duration-fast: 120ms;
  --duration-medium: 220ms;
  --duration-slow: 380ms;

  /* Layout */
  --rail-width: 232px;
  --topbar-height: 64px;
  --content-max: 1280px;
  --grain-tint: rgba(139, 38, 53, 0.04);
}

[data-theme="dark"] {
  --ink-950: #f8fafc;
  --ink-900: #f1f5f9;
  --ink-800: #e2e8f0;
  --ink-700: #cbd5e1;
  --ink-600: #94a3b8;
  --ink-500: #64748b;
  --ink-400: #475569;
  --ink-300: #334155;
  --ink-200: #1e293b;
  --ink-100: #0f172a;
  --ink-50: #020617;

  --paper-50: #0a0608;
  --paper-100: #14080b;
  --paper-200: #1c0d11;

  --accent-primary: #d33247;
  --accent-soft: #ef4458;
  --accent-deep: #8B2635;
  --accent-darker: #6B1827;
  --accent-rose-soft: #2a0e13;
  --accent-rose: #4a1a23;

  --accent-gold: #fbbf24;
  --accent-gold-soft: #3b2807;
  --accent-sand: #2a1c08;
  --accent-amber-ink: #fbbf24;

  --band-yellow: #fbbf24;
  --band-yellow-soft: #3b2807;
  --band-red-soft: #2a0e13;
  --band-clear-soft: #0d2716;

  --surface-card: #1a0b0f;
  --surface-card-alt: #210e13;
  --surface-recessed: #14080b;
  --surface-elevated: #2a131a;

  --border-soft: #3a1a22;
  --border-softer: #2a131a;
  --border-strong: #5a2230;
  --border-deep: #8a3344;
  --border-ink: #5a2230;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);

  --grain-tint: rgba(211, 50, 71, 0.06);
}

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