/* ============================================================
   IsalGraph Design Tokens
   ============================================================ */

:root {
  /* Background layers */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-surface: #1a2235;
  --bg-surface-hover: #243049;
  --bg-code: #0d1117;

  /* Text */
  --text-primary: #e8ecf4;
  --text-secondary: #8b97b0;
  --text-tertiary: #7a8599;
  --text-inverse: #0a0e17;

  /* Accent — IsalGraph signature colors */
  --accent-primary: #38bdf8;
  --accent-secondary: #a78bfa;
  --accent-tertiary: #34d399;
  --accent-warm: #fb923c;

  /* Instruction colors */
  --color-movement-fwd: #60a5fa;
  --color-movement-bwd: #c084fc;
  --color-structural-v: #34d399;
  --color-structural-c: #fbbf24;
  --color-noop: #64748b;

  /* Borders */
  --border-subtle: rgba(139, 151, 176, 0.12);
  --border-default: rgba(139, 151, 176, 0.2);
  --border-accent: rgba(56, 189, 248, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);

  /* Spacing scale (4px base) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-display: 'Space Mono', 'JetBrains Mono', monospace;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  --leading-tight: 1.2;
  --leading-normal: 1.6;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Z-index layers */
  --z-nav: 100;
  --z-modal: 200;
  --z-tooltip: 300;
}

/* Light mode overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #e2e8f0;
  --bg-code: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #6b7a8d;
  --text-inverse: #f8fafc;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-default: rgba(15, 23, 42, 0.15);
  --border-accent: rgba(56, 189, 248, 0.3);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.1);
}
