:root {
  color-scheme: dark;
  --font-base: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "Source Code Pro", Menlo, Consolas, monospace;

  --color-bg: #0b0d10;
  --color-surface: rgba(18, 22, 29, 0.85);
  --color-surface-muted: rgba(18, 22, 29, 0.7);
  --color-border: rgba(125, 196, 255, 0.12);
  --color-border-strong: rgba(125, 196, 255, 0.2);
  --color-text-primary: #f4f6fb;
  --color-text-secondary: rgba(244, 246, 251, 0.7);
  --color-text-muted: rgba(244, 246, 251, 0.6);
  --color-primary: #7dc4ff;
  --color-primary-hover: rgba(125, 196, 255, 0.15);
  --color-focus-ring: rgba(125, 196, 255, 0.7);
  --color-placeholder: rgba(244, 246, 251, 0.7);
  --color-table-even: rgba(255, 255, 255, 0.02);
  --color-table-head: rgba(255, 255, 255, 0.06);
  --color-shadow-soft: rgba(0, 0, 0, 0.35);

  --space-xs: 0.35rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1.25rem;
  --space-xl: 2rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

:root[data-mode="live"] {
  --color-primary: #8ef9d0;
  --color-primary-hover: rgba(142, 249, 208, 0.18);
  --color-border: rgba(142, 249, 208, 0.12);
  --color-border-strong: rgba(142, 249, 208, 0.24);
  --color-focus-ring: rgba(142, 249, 208, 0.65);
}

/* Light Mode Overrides (triggered by global-header.js) */
html[data-theme='light'],
body.light {
  color-scheme: light;
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-surface-muted: #f3f4f6;
  --color-border: #e5e7eb;
  --color-border-strong: #d1d5db;
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-primary: #2563eb;
  --color-primary-hover: rgba(37, 99, 235, 0.1);
  --color-focus-ring: rgba(37, 99, 235, 0.5);
  --color-placeholder: #9ca3af;
  --color-table-even: #f9fafb;
  --color-table-head: #f3f4f6;
  --color-shadow-soft: rgba(0, 0, 0, 0.05);
}

html[data-theme='light'][data-mode="live"],
body.light[data-mode="live"] {
  --color-primary: #059669;
  --color-primary-hover: rgba(5, 150, 105, 0.1);
  --color-border: rgba(5, 150, 105, 0.2);
  --color-border-strong: rgba(5, 150, 105, 0.3);
  --color-focus-ring: rgba(5, 150, 105, 0.5);
}
