:root {
  color-scheme: dark;

  /* Base palette — warm dark, not pure black */
  --bg-primary: #1a1a1e;
  --bg-secondary: #222226;
  --bg-tertiary: #2a2a2e;
  --bg-elevated: #323236;

  /* Text — never pure white */
  --text-primary: #d4d4d8;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Accents — warm gold palette */
  --accent-primary: #c4a05a;
  --accent-secondary: #8aad6b;
  --accent-warm: #c4956a;

  /* Borders — barely visible */
  --border-subtle: #2e2e33;
  --border-visible: #3a3a40;

  /* Functional */
  --loading-bar: #c4a05a;
  --error: #c07070;
  --success: #70a070;

  /* Dimensions */
  --chrome-height: 110px;
  --sidebar-width: 340px;
  --tab-height: 36px;
  --address-bar-height: 40px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Motion — intentional, varied curves */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 320ms;
  --duration-enter: 400ms;

  /* Typography */
  --font-ui: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-reader: Charter, Georgia, serif;

  /* ═══════════════════════════════════════
     Semantic surfaces, shadows & overlays
     ═══════════════════════════════════════ */
  --overlay-bg: rgba(0, 0, 0, 0.55);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --shadow-color-strong: rgba(0, 0, 0, 0.3);
  --inset-highlight: rgba(255, 255, 255, 0.04);

  --glass-gradient-start: rgba(50, 50, 54, 0.97);
  --glass-gradient-end: rgba(34, 34, 38, 0.97);

  --surface-hover: rgba(255, 255, 255, 0.04);
  --surface-active: rgba(255, 255, 255, 0.07);
  --surface-elevated: rgba(0, 0, 0, 0.14);
  --surface-glass: rgba(255, 255, 255, 0.02);

  --status-success: #84d19a;
  --status-success-bg: rgba(132, 209, 154, 0.12);
  --status-error: #ff8e8e;
  --status-error-bg: rgba(255, 142, 142, 0.12);
  --status-warning: #ffb074;
  --status-warning-bg: rgba(255, 161, 103, 0.12);
  --status-info: #22c55e;
  --status-info-bg: rgba(34, 197, 94, 0.12);

  --kbd-bg: rgba(255, 255, 255, 0.06);
  --kbd-border: rgba(255, 255, 255, 0.08);
  --kbd-shadow: rgba(0, 0, 0, 0.15);
  --code-bg: rgba(255, 255, 255, 0.06);
  --code-block-bg: rgba(0, 0, 0, 0.22);

  --scrollbar-thumb: rgba(255, 255, 255, 0.08);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.14);

  --border-glass: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(196, 160, 90, 0.45);

  --button-primary-fg: #1a1a1e;
  --button-primary-hover-bg: #d4b06a;

  /* Status colors - info/blue and link */
  --status-info-blue: #60a5fa;
  --status-info-blue-hover: #93c5fd;
  --status-warning-amber: #fbbf24;
  --status-warning-amber-bg: rgba(251, 191, 36, 0.1);
  --status-warning-amber-border: rgba(251, 191, 36, 0.3);
  --status-warning-amber-hover-bg: rgba(251, 191, 36, 0.2);
  --status-muted-gray: #9ca3af;
  --status-muted-gray-bg: rgba(156, 163, 175, 0.1);
  --status-muted-gray-border: rgba(156, 163, 175, 0.2);
  --status-muted-gray-hover-bg: rgba(156, 163, 175, 0.2);
  --status-allow-green: #86efac;
  --status-deny-red: #fca5a5;
  --surface-popup-bg: #1e1e24;
  --text-popup: #e0e0e0;
}

[data-theme="light"] {
  color-scheme: light;

  --bg-primary: #f8f7f5;
  --bg-secondary: #efeeec;
  --bg-tertiary: #e5e4e2;
  --bg-elevated: #dbd9d7;

  --text-primary: #1c1c1e;
  --text-secondary: #555558;
  --text-muted: #8e8e93;

  --accent-primary: #8a6d2f;
  --accent-secondary: #5a7a42;
  --accent-warm: #8a5e3a;

  --border-subtle: #d4d3d1;
  --border-visible: #c0bfbd;

  --loading-bar: #8a6d2f;
  --error: #b04040;
  --success: #408040;

  /* Semantic surfaces, shadows & overlays */
  --overlay-bg: rgba(0, 0, 0, 0.25);
  --shadow-color: rgba(0, 0, 0, 0.12);
  --shadow-color-strong: rgba(0, 0, 0, 0.18);
  --inset-highlight: rgba(255, 255, 255, 0.4);

  --glass-gradient-start: rgba(219, 217, 215, 0.97);
  --glass-gradient-end: rgba(239, 238, 236, 0.97);

  --surface-hover: rgba(0, 0, 0, 0.04);
  --surface-active: rgba(0, 0, 0, 0.07);
  --surface-elevated: rgba(0, 0, 0, 0.06);
  --surface-glass: rgba(0, 0, 0, 0.02);

  --status-success: #5a9a5a;
  --status-success-bg: rgba(90, 154, 90, 0.10);
  --status-error: #d05050;
  --status-error-bg: rgba(208, 80, 80, 0.10);
  --status-warning: #c07040;
  --status-warning-bg: rgba(192, 112, 64, 0.10);
  --status-info: #3a9a3a;
  --status-info-bg: rgba(58, 154, 58, 0.10);

  --kbd-bg: rgba(0, 0, 0, 0.05);
  --kbd-border: rgba(0, 0, 0, 0.08);
  --kbd-shadow: rgba(0, 0, 0, 0.1);
  --code-bg: rgba(0, 0, 0, 0.05);
  --code-block-bg: rgba(0, 0, 0, 0.06);

  --scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);

  --border-glass: rgba(0, 0, 0, 0.06);
  --border-focus: rgba(138, 109, 47, 0.45);

  --button-primary-fg: #f8f7f5;
  --button-primary-hover-bg: #7c622a;

  /* Status colors - info/blue and link (light) */
  --status-info-blue: #3b82f6;
  --status-info-blue-hover: #2563eb;
  --status-warning-amber: #d97706;
  --status-warning-amber-bg: rgba(217, 119, 6, 0.1);
  --status-warning-amber-border: rgba(217, 119, 6, 0.3);
  --status-warning-amber-hover-bg: rgba(217, 119, 6, 0.2);
  --status-muted-gray: #6b7280;
  --status-muted-gray-bg: rgba(107, 114, 128, 0.08);
  --status-muted-gray-border: rgba(107, 114, 128, 0.2);
  --status-muted-gray-hover-bg: rgba(107, 114, 128, 0.16);
  --status-allow-green: #22c55e;
  --status-deny-red: #ef4444;
  --surface-popup-bg: #ffffff;
  --text-popup: #1c1c1e;
}
