/* ── Light Theme ──────────────────────────────────────────────── */
[data-theme="light"] {
  /* Primary palette — indigo */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-active: #3730a3;
  --color-primary-text: #ffffff;
  --color-primary-subtle: rgba(79, 70, 229, 0.06);

  /* Secondary */
  --color-secondary: #6b7280;
  --color-secondary-hover: #4b5563;

  /* Backgrounds — warmer whites */
  --color-background: #fafaf9;
  --color-surface: #ffffff;
  --color-surface-hover: #f5f5f4;
  --color-surface-elevated: #ffffff;
  --color-sidebar-bg: #fafaf9;
  --color-input-bg: #ffffff;

  /* Text — zinc hierarchy */
  --color-text: #18181b;
  --color-text-secondary: #71717a;
  --color-text-muted: #a1a1aa;
  --color-text-inverse: #ffffff;

  /* Borders — warmer grays */
  --color-border: #e4e4e7;
  --color-border-light: #f4f4f5;
  --color-border-focus: #4f46e5;

  /* Status */
  --color-error: #ef4444;
  --color-error-bg: #fef2f2;
  --color-error-text: #dc2626;
  --color-success: #22c55e;
  --color-success-bg: #f0fdf4;
  --color-success-text: #16a34a;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-text: #d97706;

  /* Shadows — refined layered system */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 2px 8px rgba(79, 70, 229, 0.2);
  --shadow-primary-lg: 0 4px 16px rgba(79, 70, 229, 0.25);

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(79, 70, 229, 0.15);

  /* Message bubbles */
  --color-msg-user-bg: #eef2ff;
  --color-msg-user-text: #18181b;
  --color-msg-assistant-bg: #ffffff;
  --color-msg-assistant-text: #18181b;
  --color-msg-assistant-border: #e4e4e7;

  /* Thinking trace */
  --color-thinking-bg: #fafaf9;
  --color-thinking-border: #e4e4e7;
  --color-thinking-header-bg: #f5f5f4;
  --color-thinking-text: #71717a;
  --color-thinking-accent: #7c3aed;

  /* Tool calls */
  --color-tool-bg: #fafaf9;
  --color-tool-border: #e4e4e7;
  --color-tool-output-bg: #f5f5f4;

  /* Token counter */
  --color-token-bg: #fafaf9;
  --color-token-text: #71717a;

  /* Context bar */
  --color-context-bar-bg: #e4e4e7;
  --color-context-bar-low: #22c55e;
  --color-context-bar-mid: #f59e0b;
  --color-context-bar-high: #ef4444;

  /* Collection chips */
  --color-chip-bg: #eef2ff;
  --color-chip-text: #4f46e5;
  --color-chip-hover: #e0e7ff;

  /* Badge */
  --color-badge-bg: #f4f4f5;
  --color-badge-text: #71717a;

  /* Modal */
  --color-overlay: rgba(0, 0, 0, 0.5);
  --color-modal-bg: #ffffff;

  /* Scrollbar */
  --color-scrollbar-track: transparent;
  --color-scrollbar-thumb: #d4d4d8;
  --color-scrollbar-thumb-hover: #a1a1aa;

  /* Reference panel */
  --color-reference-bg: #ffffff;
  --color-reference-highlight: rgba(79, 70, 229, 0.08);

  /* Passage highlight */
  --color-passage-highlight: rgba(255, 213, 79, 0.4);
  --color-passage-highlight-active: rgba(255, 152, 0, 0.6);

  /* Spinner */
  --color-spinner: #4f46e5;

  /* Gradient and glass */
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --gradient-surface: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.5);
}
