/* TIMIflow Design Tokens */
:root {
  /* Background hierarchy */
  --bg: #0c0e13;
  --surface-1: #13161d;
  --surface-2: #1a1e28;
  --surface-3: #212632;
  --border: #282d3a;
  --border-dim: #1e222d;

  /* Text hierarchy */
  --text: #e2e6ef;
  --text-secondary: #b0b8cc;
  --text-dim: #8a93a8;
  --text-muted: #555d72;

  /* Brand — TIMI red (coronary flow, urgency, cardiology) */
  --brand: #ef4444;
  --brand-hover: #dc2626;
  --brand-dim: rgba(239, 68, 68, 0.12);
  --brand-border: rgba(239, 68, 68, 0.25);

  /* Accent — Interactive blue */
  --accent: #4a9eff;
  --accent-hover: #3b8de6;
  --accent-dim: rgba(74, 158, 255, 0.12);
  --accent-border: rgba(74, 158, 255, 0.25);

  /* Feedback */
  --correct: #22c55e;
  --correct-bg: rgba(34, 197, 94, 0.08);
  --correct-border: rgba(34, 197, 94, 0.25);
  --correct-text: #4ade80;

  --incorrect: #ef4444;
  --incorrect-bg: rgba(239, 68, 68, 0.08);
  --incorrect-border: rgba(239, 68, 68, 0.25);
  --incorrect-text: #f87171;

  --flag: #fbbf24;
  --flag-bg: rgba(251, 191, 36, 0.10);
  --flag-border: rgba(251, 191, 36, 0.25);

  /* Category colors (for blueprint heat map / analytics) */
  --cat-cad: #ef4444;
  --cat-hf: #f97316;
  --cat-arr: #eab308;
  --cat-vhd: #22c55e;
  --cat-htn: #06b6d4;
  --cat-vas: #3b82f6;
  --cat-chd: #8b5cf6;
  --cat-per: #ec4899;
  --cat-sys: #f43f5e;
  --cat-pul: #14b8a6;
  --cat-anat: #6366f1;

  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-sm: 0 1px 3px 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);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;

  /* Layout */
  --nav-height: 56px;
  --max-width: 1200px;
  --sidebar-width: 280px;
}

/* Light mode overrides */
html.light,
body.light {
  --bg: #f5f6f8;
  --surface-1: #ffffff;
  --surface-2: #f0f1f4;
  --surface-3: #e5e7ec;
  --border: #d4d7de;
  --border-dim: #e5e7ec;

  --text: #1a1d28;
  --text-secondary: #3a3f4d;
  --text-dim: #6b7280;
  --text-muted: #9ca3af;

  --brand: #dc2626;
  --brand-hover: #b91c1c;
  --brand-dim: rgba(220, 38, 38, 0.08);
  --brand-border: rgba(220, 38, 38, 0.2);

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-dim: rgba(37, 99, 235, 0.08);
  --accent-border: rgba(37, 99, 235, 0.2);

  --correct: #16a34a;
  --correct-bg: rgba(22, 163, 74, 0.06);
  --correct-border: rgba(22, 163, 74, 0.2);
  --correct-text: #15803d;

  --incorrect: #dc2626;
  --incorrect-bg: rgba(220, 38, 38, 0.06);
  --incorrect-border: rgba(220, 38, 38, 0.2);
  --incorrect-text: #b91c1c;

  --flag: #d97706;
  --flag-bg: rgba(217, 119, 6, 0.08);
  --flag-border: rgba(217, 119, 6, 0.2);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}
