/* ================================================================
   Bayes.ai — Unified Theme
   Shared variables, reset, and common component styles.
   Include via <link rel="stylesheet" href="bayes-theme.css" />
   ================================================================ */

/* ── 1. CSS Variables (Light / Default) ── */
:root {
  /* Brand */
  --dark-blue: #0a0a14;
  --light-blue: #2196f3;
  --accent-blue: #2196f3;
  --btn-blue: #1976d2;
  --btn-blue-hover: #1565c0;
  --orange: #f57c00;
  --orange-hover: #e65100;

  /* Text */
  --text-primary: #0a0a0a;
  --text-secondary: #4a5568;
  --text-tertiary: #78879a;
  --text-muted: #5a6a7e;

  /* Status */
  --error-red: #ef4444;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  /* Surfaces */
  --bg-page: #f0f4f8;
  --bg-white: #ffffff;
  --bg-light: #e8eef4;
  --bg-hover: #dce4ed;
  --bg-card-header: #f3f7fb;
  --bg-surface: #f2f5f9;
  --bg-panel: #ffffff;

  /* Border */
  --border: #b0bec5;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.14), 0 2px 4px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.12);

  /* Geometry */
  --radius: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Motion */
  --transition: 0.2s ease;

  /* Typography */
  --font-sans: 'Lato', sans-serif;
  --font-mono: 'Inconsolata', monospace;

  /* Report domain colors */
  --time-color: #E74C3C;
  --resource-color: #3498DB;
  --cost-color: #27AE60;
  --risk-color: #F39C12;
  --crossplan-color: #9333ea;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(33,150,243,0.35);
  --overlay-bg: rgba(0,0,0,0.48);

  /* Component tokens (light defaults) */
  --text-heading: #000000;
  --code-bg: #dce4ed;
  --code-fg: inherit;
  --canvas-dot: #b0bec5;
  --table-band-even: #ffffff;
  --table-band-odd: #edf2f7;
  --table-band-even-hover: #dce4ed;
  --table-band-odd-hover: #d0dae6;
  --table-band-even-sel: #bbdefb;
  --table-band-odd-sel: #a8d2f5;
  --table-row-sel: #bbdefb;
  --cal-hover: #dce4ed;
  --cal-today: #bbdefb;
  --cal-today-hover: #90caf9;
  --cal-weekend: #e8eef4;
  --cal-weekend-hover: #dce4ed;
  --cal-selected: #90caf9;
  --cal-pill-mix-base: #ffffff;
  --scenario-active-bg: #bbdefb;
  --gantt-grid: #b0bec5;
  --or-group-bg: #e3f2fd;
  --or-group-hover: #bbdefb;
  --or-group-sel: #90caf9;
  --or-type-badge-bg: #bbdefb;
  --or-type-badge-fg: #0d47a1;
  --or-type-badge-border: #1976d2;
  --badge-ok-bg: #c8e6c9;
  --badge-ok-fg: #1b5e20;
  --badge-warn-bg: #fff9c4;
  --badge-warn-fg: #7c6200;
  --badge-err-bg: #ffcdd2;
  --badge-err-fg: #b71c1c;
  --hint-bg: #e3f2fd;
  --hint-fg: #0d47a1;
  --hint-border: #1976d2;
  --hint-bottleneck-bg: #ffcdd2;
  --hint-bottleneck-fg: #b71c1c;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #e3f2fd;
  --hint-info-fg: #0d47a1;
  --hint-info-border: #2196f3;
  --chat-system-bg: #e3f2fd;
  --chat-system-fg: #0d47a1;
  --chip-bg: #bbdefb;
  --chip-fg: #0d47a1;
  --sched-status-done-bg: #c8e6c9;
  --sched-status-done-fg: #1b5e20;
  --sched-status-prog-bg: #bbdefb;
  --sched-status-prog-fg: #0d47a1;
  --sched-status-btn-bg: #ffcdd2;
  --sched-status-btn-fg: #b71c1c;
  --sched-badge-yes-bg: #bbdefb;
  --sched-badge-yes-fg: #0d47a1;
  --sched-badge-no-bg: #e8eef4;
  --sched-badge-no-fg: #6b7280;
  --sched-risk-green-bg: #c8e6c9;
  --sched-risk-green-fg: #1b5e20;
  --sched-risk-amber-bg: #fff9c4;
  --sched-risk-amber-fg: #7c6200;
  --sched-risk-red-bg: #ffcdd2;
  --sched-risk-red-fg: #b71c1c;
  --sched-dep-fg: #0a0a0a;
  --chat-action-bg: #e8f5e9;
  --chat-action-border: #a5d6a7;
  --chat-action-fg: #1b5e20;
  --chat-action-err-bg: #ffcdd2;
  --chat-action-err-border: #ef9a9a;
  --chat-action-err-fg: #b71c1c;
  --chat-action-pend-bg: #e3f2fd;
  --chat-action-pend-border: #90caf9;
  --chat-action-pend-fg: #0d47a1;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: var(--accent-blue);
  --kanban-scope-fg: var(--accent-blue);
  --kanban-scope-bg: rgba(33,150,243,0.08);
  --tab-objectives-fg: var(--accent-blue);
  --tab-objectives-border: var(--btn-blue);
  --tab-plan-fg: var(--accent-blue);
  --tab-plan-border: var(--btn-blue);
  --tab-schedule-fg: var(--accent-blue);
  --tab-schedule-border: var(--btn-blue);

  /* Task node header */
  --node-task-header: #0a0a14;

  /* Toolbar */
  --toolbar-bg: var(--dark-blue);
  --toolbar-fg: #fff;
  --toolbar-border: rgba(255,255,255,0.06);
  --toolbar-muted: rgba(255,255,255,0.4);
  --toolbar-link: #90b8d8;
  --toolbar-link-hover: #fff;
  --toolbar-btn-bg: rgba(255,255,255,0.08);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1);
  --toolbar-icon-fg: rgba(255,255,255,0.7);
  --toolbar-icon-fg-hover: #fff;

  /* Canvas edges */
  --edge-default: #78909c;
  --edge-seq: #10b981;
  --edge-or: #f59e0b;
  --edge-preview: #90a4ae;
  --edge-delete-bg: #0a0a14;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #10b981;
  --node-port-seq-stroke: #059669;
  --node-port-or: #f59e0b;
  --node-port-or-stroke: #d97706;
  --node-bottleneck: #ef4444;
  --node-progress-track: #b0bec5;
  --node-progress-fill: #1976d2;
  --node-success-badge: #22c55e;
  --node-info-badge: #1976d2;

  /* Gantt bars */
  --gantt-seg-1: #10b981;
  --gantt-seg-2: #1976d2;
  --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #f59e0b;
  --gantt-seg-5: #ef4444;
  --gantt-seg-6: #0d9488;
  --gantt-seg-7: #ec4899;
  --gantt-bar-done: #78909c;
  --gantt-bar-normal: #10b981;
  --gantt-bar-bottleneck: #ef4444;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #1976d2;
  --hist-bar-duration: #1976d2;
  --hist-p10: #22c55e;
  --hist-p50: #f59e0b;
  --hist-p90: #ef4444;

  /* Inputs */
  --input-bg: var(--bg-white);
  --input-fg: var(--text-primary);
  --input-border: var(--border);
  --input-focus-border: #1976d2;

  /* Chat */
  --chat-user-bg: #1976d2;
  --chat-user-fg: #fff;
  --chat-code-bg: #0a0a14;
  --chat-code-fg: #e0e4e8;
}

/* ── 2. Dark Mode ── */
[data-mode="dark"] {
  --bg-page: #050508;
  --bg-white: #0c0c10;
  --bg-light: #1a1a24;
  --bg-hover: #1a1a22;
  --bg-card-header: #121218;
  --bg-surface: #131318;
  --bg-panel: #0c0c10;

  --text-primary: #f0f2f5;
  --text-secondary: #8e9aae;
  --text-tertiary: #6e7a92;
  --text-muted: #7c889e;

  --border: #2a2a36;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.28);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.35);

  --light-blue: #64b5f6;
  --btn-blue: #42a5f5;
  --btn-blue-hover: #2196f3;
  --orange: #ffa726;
  --orange-hover: #fb8c00;

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(100,181,246,0.3);
  --overlay-bg: rgba(0,0,0,0.72);

  /* Component tokens (dark) */
  --text-heading: #f0f2f5;
  --code-bg: rgba(255,255,255,0.07);
  --code-fg: #e0e6ef;
  --canvas-dot: #2a2a36;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(100,181,246,0.10);
  --table-band-odd-sel: rgba(100,181,246,0.14);
  --table-row-sel: rgba(100,181,246,0.08);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(100,181,246,0.10);
  --cal-today-hover: rgba(100,181,246,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(100,181,246,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(100,181,246,0.12);
  --gantt-grid: #2a2a36;
  --or-group-bg: rgba(100,181,246,0.06);
  --or-group-hover: rgba(100,181,246,0.12);
  --or-group-sel: rgba(100,181,246,0.18);
  --or-type-badge-bg: rgba(100,181,246,0.12);
  --or-type-badge-fg: #90caf9;
  --or-type-badge-border: #42a5f5;
  --badge-ok-bg: rgba(102,187,106,0.12);
  --badge-ok-fg: #81c784;
  --badge-warn-bg: rgba(255,202,40,0.12);
  --badge-warn-fg: #ffd54f;
  --badge-err-bg: rgba(239,83,80,0.10);
  --badge-err-fg: #ef9a9a;
  --hint-bg: rgba(100,181,246,0.08);
  --hint-fg: #90caf9;
  --hint-border: #42a5f5;
  --hint-bottleneck-bg: rgba(239,83,80,0.08);
  --hint-bottleneck-fg: #ef9a9a;
  --hint-bottleneck-border: #f87171;
  --hint-info-bg: rgba(100,181,246,0.08);
  --hint-info-fg: #90caf9;
  --hint-info-border: #64b5f6;
  --chat-system-bg: rgba(100,181,246,0.10);
  --chat-system-fg: #90caf9;
  --chip-bg: rgba(100,181,246,0.12);
  --chip-fg: #90caf9;
  --sched-status-done-bg: rgba(102,187,106,0.10);
  --sched-status-done-fg: #81c784;
  --sched-status-prog-bg: rgba(100,181,246,0.10);
  --sched-status-prog-fg: #90caf9;
  --sched-status-btn-bg: rgba(239,83,80,0.10);
  --sched-status-btn-fg: #ef9a9a;
  --sched-badge-yes-bg: rgba(100,181,246,0.10);
  --sched-badge-yes-fg: #90caf9;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(102,187,106,0.10);
  --sched-risk-green-fg: #81c784;
  --sched-risk-amber-bg: rgba(255,202,40,0.10);
  --sched-risk-amber-fg: #ffd54f;
  --sched-risk-red-bg: rgba(239,83,80,0.10);
  --sched-risk-red-fg: #ef9a9a;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(102,187,106,0.08);
  --chat-action-border: rgba(102,187,106,0.18);
  --chat-action-fg: #81c784;
  --chat-action-err-bg: rgba(239,83,80,0.08);
  --chat-action-err-border: rgba(239,83,80,0.18);
  --chat-action-err-fg: #ef9a9a;
  --chat-action-pend-bg: rgba(100,181,246,0.08);
  --chat-action-pend-border: rgba(100,181,246,0.18);
  --chat-action-pend-fg: #90caf9;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #64b5f6;
  --kanban-scope-fg: #64b5f6;
  --kanban-scope-bg: rgba(100,181,246,0.12);
  --tab-objectives-fg: #64b5f6;
  --tab-objectives-border: #42a5f5;
  --tab-plan-fg: #64b5f6;
  --tab-plan-border: #42a5f5;
  --tab-schedule-fg: #64b5f6;
  --tab-schedule-border: #42a5f5;

  /* Task node header (dark) */
  --node-task-header: #1e2030;

  /* Toolbar (dark) */
  --toolbar-bg: #020204;
  --toolbar-fg: #f0f0f4;
  --toolbar-border: #1a1a22;
  --toolbar-muted: rgba(240,240,244,0.35);
  --toolbar-link: #6090c0;
  --toolbar-link-hover: #f0f0f4;
  --toolbar-btn-bg: rgba(255,255,255,0.06);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08);
  --toolbar-icon-fg: rgba(240,240,244,0.6);
  --toolbar-icon-fg-hover: #f0f0f4;

  /* Edge tokens (dark) */
  --edge-default: #4a5568;
  --edge-seq: #34d399;
  --edge-or: #fbbf24;
  --edge-preview: #3a4558;
  --edge-delete-bg: #0c0c10;

  /* Node tokens (dark) */
  --node-text: #fff;
  --node-port-seq: #34d399;
  --node-port-seq-stroke: #10b981;
  --node-port-or: #fbbf24;
  --node-port-or-stroke: #d97706;
  --node-bottleneck: #f87171;
  --node-progress-track: #1a1a22;
  --node-progress-fill: #2196f3;
  --node-success-badge: #4ade80;
  --node-info-badge: #2196f3;

  /* Gantt (dark) */
  --gantt-seg-1: #34d399;
  --gantt-seg-2: #2196f3;
  --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24;
  --gantt-seg-5: #f87171;
  --gantt-seg-6: #22d3ee;
  --gantt-seg-7: #f472b6;
  --gantt-bar-done: #4a5568;
  --gantt-bar-normal: #34d399;
  --gantt-bar-bottleneck: #f87171;
  --gantt-bar-text: #fff;

  /* Histogram (dark) */
  --hist-bar: #2196f3;
  --hist-bar-duration: #2196f3;
  --hist-p10: #4ade80;
  --hist-p50: #fbbf24;
  --hist-p90: #f87171;

  /* Inputs (dark) */
  --input-bg: #0c0c10;
  --input-fg: #f0f0f4;
  --input-border: #1a1a22;
  --input-focus-border: #2196f3;

  /* Chat (dark) */
  --chat-user-bg: #2196f3;
  --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.07);
  --chat-code-fg: #f0f0f4;
}

/* ── 3. Special Themes ── */

/* ================================================================
   Solaris Theme — Warm, optimistic, forward momentum
   Amber/gold accents on cream (light) or deep charcoal (dark).
   ================================================================ */

/* ── Light Mode ── */
[data-special="solaris"] {
  --bg-page: #f5f0e8;
  --bg-white: #fdf9f3;
  --bg-light: #f0ebe1;
  --bg-hover: #e8e0d2;
  --bg-card-header: #f8f4ec;
  --bg-surface: #f0ebe1;
  --bg-panel: #fdf9f3;
  --text-primary: #3d3425;
  --text-secondary: #7d7060;
  --text-tertiary: #948978;
  --text-muted: #7a6e5c;
  --border: #d9ceb8;

  --light-blue: #d4940a;
  --btn-blue: #c2850a;
  --btn-blue-hover: #a87208;
  --orange: #e8720a;
  --orange-hover: #cc6308;

  --shadow-sm: 0 1px 4px rgba(120,90,40,0.08), 0 1px 2px rgba(120,90,40,0.06);
  --shadow-md: 0 4px 14px rgba(120,90,40,0.1), 0 2px 4px rgba(120,90,40,0.06);
  --shadow-lg: 0 8px 24px rgba(120,90,40,0.12);
  --shadow-modal: 0 20px 60px rgba(80,60,20,0.18), 0 4px 16px rgba(80,60,20,0.1);

  --error-red: #dc2626;
  --success-green: #16a34a;
  --warning-amber: #d97706;

  --focus-ring: 0 0 0 3px rgba(212,148,10,0.3);
  --overlay-bg: rgba(60,50,30,0.45);

  /* Component tokens (solaris-light) */
  --text-heading: #2e2518;
  --code-bg: #e8e0d2;
  --code-fg: inherit;
  --canvas-dot: #c8bca6;
  --table-band-even: #fdf9f3;
  --table-band-odd: #f0ebe1;
  --table-band-even-hover: #e8e0d2;
  --table-band-odd-hover: #e0d7c7;
  --table-band-even-sel: #f0deb0;
  --table-band-odd-sel: #e8d5a4;
  --table-row-sel: #f0deb0;
  --cal-hover: #e8e0d2;
  --cal-today: #f5e4b8;
  --cal-today-hover: #edd8a0;
  --cal-weekend: #f0ebe1;
  --cal-weekend-hover: #e8e0d2;
  --cal-selected: #edd8a0;
  --cal-pill-mix-base: #fdf9f3;
  --scenario-active-bg: #f5e4b8;
  --gantt-grid: #d9ceb8;
  --or-group-bg: #fef6e0;
  --or-group-hover: #fdefc6;
  --or-group-sel: #fce4a0;
  --or-type-badge-bg: #fdefc6;
  --or-type-badge-fg: #7c4a00;
  --or-type-badge-border: #d4940a;
  --badge-ok-bg: #d1fae5;
  --badge-ok-fg: #065f46;
  --badge-warn-bg: #fef3c7;
  --badge-warn-fg: #92400e;
  --badge-err-bg: #fee2e2;
  --badge-err-fg: #991b1b;
  --hint-bg: #fef3c7;
  --hint-fg: #92400e;
  --hint-border: #d4940a;
  --hint-bottleneck-bg: #fee2e2;
  --hint-bottleneck-fg: #991b1b;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #f5e4b8;
  --hint-info-fg: #7c4a00;
  --hint-info-border: #d4940a;
  --chat-system-bg: #fef3c7;
  --chat-system-fg: #92400e;
  --chip-bg: #f5e4b8;
  --chip-fg: #7c4a00;
  --sched-status-done-bg: #d1fae5;
  --sched-status-done-fg: #065f46;
  --sched-status-prog-bg: #f5e4b8;
  --sched-status-prog-fg: #7c4a00;
  --sched-status-btn-bg: #fee2e2;
  --sched-status-btn-fg: #991b1b;
  --sched-badge-yes-bg: #f5e4b8;
  --sched-badge-yes-fg: #7c4a00;
  --sched-badge-no-bg: #f0ebe1;
  --sched-badge-no-fg: #6b7280;
  --sched-risk-green-bg: #d1fae5;
  --sched-risk-green-fg: #065f46;
  --sched-risk-amber-bg: #fef3c7;
  --sched-risk-amber-fg: #92400e;
  --sched-risk-red-bg: #fee2e2;
  --sched-risk-red-fg: #991b1b;
  --sched-dep-fg: #3d3425;
  --chat-action-bg: #e0f8ea;
  --chat-action-border: #a7f3d0;
  --chat-action-fg: #065f46;
  --chat-action-err-bg: #fee2e2;
  --chat-action-err-border: #fecaca;
  --chat-action-err-fg: #991b1b;
  --chat-action-pend-bg: #f5e4b8;
  --chat-action-pend-border: #e0c878;
  --chat-action-pend-fg: #7c4a00;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #d4940a;
  --kanban-scope-fg: #d4940a;
  --kanban-scope-bg: rgba(212,148,10,0.08);
  --tab-objectives-fg: #d4940a;
  --tab-objectives-border: #c2850a;
  --tab-plan-fg: #d4940a;
  --tab-plan-border: #c2850a;
  --tab-schedule-fg: #d4940a;
  --tab-schedule-border: #c2850a;
  --node-task-header: #2e2518;

  /* Toolbar */
  --toolbar-bg: #3d2a10;
  --toolbar-fg: #fdf9f3;
  --toolbar-border: #5a4020;
  --toolbar-muted: #b0a590;
  --toolbar-link: #d4940a;
  --toolbar-link-hover: #fdf9f3;
  --toolbar-btn-bg: rgba(255,255,255,0.12);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.2);
  --toolbar-btn-border: rgba(255,255,255,0.18);
  --toolbar-icon-fg: #d4940a;
  --toolbar-icon-fg-hover: #fdf9f3;

  /* Canvas edges */
  --edge-default: #b0a590;
  --edge-seq: #16a34a;
  --edge-or: #d97706;
  --edge-preview: #c8bca6;
  --edge-delete-bg: #3d3425;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #16a34a;
  --node-port-seq-stroke: #0d7a34;
  --node-port-or: #d97706;
  --node-port-or-stroke: #a65d04;
  --node-bottleneck: #dc2626;
  --node-progress-track: #d9ceb8;
  --node-progress-fill: #c2850a;
  --node-success-badge: #16a34a;
  --node-info-badge: #c2850a;

  /* Gantt bars */
  --gantt-seg-1: #16a34a; --gantt-seg-2: #2563eb; --gantt-seg-3: #9333ea;
  --gantt-seg-4: #d97706; --gantt-seg-5: #dc2626; --gantt-seg-6: #0891b2; --gantt-seg-7: #db2777;
  --gantt-bar-done: #a89070;
  --gantt-bar-normal: #16a34a;
  --gantt-bar-bottleneck: #dc2626;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #2563eb;
  --hist-bar-duration: #2563eb;
  --hist-p10: #16a34a;
  --hist-p50: #d97706;
  --hist-p90: #dc2626;

  /* Inputs */
  --input-bg: var(--bg-white);
  --input-fg: var(--text-primary);
  --input-border: var(--border);
  --input-focus-border: #c2850a;

  /* Chat */
  --chat-user-bg: #c2850a;
  --chat-user-fg: #fff;
  --chat-code-bg: #2e2518;
  --chat-code-fg: #ddd5c4;
}

/* ── Dark Mode ── */
[data-special="solaris"][data-mode="dark"] {
  --bg-page: #1a1814;
  --bg-white: #242018;
  --bg-light: #2c2720;
  --bg-hover: #362f25;
  --bg-card-header: #2a261e;
  --bg-surface: #2c2720;
  --bg-panel: #242018;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #3d352a;

  --light-blue: #e8a820;
  --btn-blue: #d4960e;
  --btn-blue-hover: #c08608;
  --orange: #e8780e;
  --orange-hover: #d06a08;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.3);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(232,168,32,0.25);
  --overlay-bg: rgba(10,8,5,0.7);

  /* Component tokens (solaris-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.07);
  --code-fg: #dcd4ca;
  --canvas-dot: #3d352a;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(232,168,32,0.12);
  --table-band-odd-sel: rgba(232,168,32,0.15);
  --table-row-sel: rgba(232,168,32,0.1);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(232,168,32,0.1);
  --cal-today-hover: rgba(232,168,32,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(232,168,32,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(232,168,32,0.12);
  --gantt-grid: #3d352a;
  --or-group-bg: rgba(245,158,11,0.06);
  --or-group-hover: rgba(245,158,11,0.12);
  --or-group-sel: rgba(245,158,11,0.18);
  --or-type-badge-bg: rgba(245,158,11,0.12);
  --or-type-badge-fg: #fcd34d;
  --or-type-badge-border: #d97706;
  --badge-ok-bg: rgba(74,222,128,0.12);
  --badge-ok-fg: #6ee7b7;
  --badge-warn-bg: rgba(251,191,36,0.12);
  --badge-warn-fg: #fcd34d;
  --badge-err-bg: rgba(248,113,113,0.1);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(232,168,32,0.08);
  --hint-fg: #fcd34d;
  --hint-border: #d97706;
  --hint-bottleneck-bg: rgba(248,113,113,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: rgba(232,168,32,0.08);
  --hint-info-fg: #fcd34d;
  --hint-info-border: #e8a820;
  --chat-system-bg: rgba(232,168,32,0.1);
  --chat-system-fg: #fcd34d;
  --chip-bg: rgba(232,168,32,0.12);
  --chip-fg: #fcd34d;
  --sched-status-done-bg: rgba(74,222,128,0.1);
  --sched-status-done-fg: #6ee7b7;
  --sched-status-prog-bg: rgba(232,168,32,0.1);
  --sched-status-prog-fg: #fcd34d;
  --sched-status-btn-bg: rgba(248,113,113,0.1);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(232,168,32,0.1);
  --sched-badge-yes-fg: #fcd34d;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(74,222,128,0.1);
  --sched-risk-green-fg: #6ee7b7;
  --sched-risk-amber-bg: rgba(251,191,36,0.1);
  --sched-risk-amber-fg: #fcd34d;
  --sched-risk-red-bg: rgba(248,113,113,0.1);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(74,222,128,0.08);
  --chat-action-border: rgba(74,222,128,0.18);
  --chat-action-fg: #6ee7b7;
  --chat-action-err-bg: rgba(248,113,113,0.08);
  --chat-action-err-border: rgba(248,113,113,0.18);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(232,168,32,0.08);
  --chat-action-pend-border: rgba(232,168,32,0.18);
  --chat-action-pend-fg: #fcd34d;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #e8a820;
  --kanban-scope-fg: #e8a820;
  --kanban-scope-bg: rgba(232,168,32,0.12);
  --tab-objectives-fg: #e8a820;
  --tab-objectives-border: #d4960e;
  --tab-plan-fg: #e8a820;
  --tab-plan-border: #d4960e;
  --tab-schedule-fg: #e8a820;
  --tab-schedule-border: #d4960e;
  --node-task-header: #362f25;

  /* Toolbar */
  --toolbar-bg: #1a1814;
  --toolbar-fg: #ddd5c4;
  --toolbar-border: #3d352a;
  --toolbar-muted: #857a66;
  --toolbar-link: #e8a820;
  --toolbar-link-hover: #ddd5c4;
  --toolbar-btn-bg: rgba(255,255,255,0.1);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.16);
  --toolbar-btn-border: rgba(255,255,255,0.14);
  --toolbar-icon-fg: #e8a820;
  --toolbar-icon-fg-hover: #ddd5c4;

  /* Canvas edges */
  --edge-default: #6e6352;
  --edge-seq: #4ade80;
  --edge-or: #fbbf24;
  --edge-preview: #3d352a;
  --edge-delete-bg: #242018;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #4ade80;
  --node-port-seq-stroke: #16a34a;
  --node-port-or: #fbbf24;
  --node-port-or-stroke: #d97706;
  --node-bottleneck: #f87171;
  --node-progress-track: #3d352a;
  --node-progress-fill: #d4960e;
  --node-success-badge: #4ade80;
  --node-info-badge: #d4960e;

  /* Gantt bars */
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #6e6352;
  --gantt-bar-normal: #4ade80;
  --gantt-bar-bottleneck: #f87171;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #60a5fa;
  --hist-bar-duration: #60a5fa;
  --hist-p10: #4ade80;
  --hist-p50: #fbbf24;
  --hist-p90: #f87171;

  /* Inputs */
  --input-bg: #2c2720;
  --input-fg: #ddd5c4;
  --input-border: #3d352a;
  --input-focus-border: #d4960e;

  /* Chat */
  --chat-user-bg: #d4960e;
  --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.07);
  --chat-code-fg: #ddd5c4;
}

/* ================================================================
   Redwood Theme — Earthy, grounded, trustworthy
   Terracotta, warm browns, muted sage greens. Copper accent highlights.
   ================================================================ */

/* ── Light Mode ── */
[data-special="redwood"] {
  /* Surfaces */
  --bg-page: #f3ece6;
  --bg-white: #faf6f2;
  --bg-light: #ebe4de;
  --bg-hover: #ede4db;
  --bg-card-header: #f4efe9;
  --bg-surface: #f7f1eb;
  --bg-panel: #faf6f2;

  /* Text */
  --text-primary: #3b2f26;
  --text-secondary: #806e60;
  --text-tertiary: #918273;
  --text-muted: #7a6b5c;

  /* Border */
  --border: #d9cec3;

  /* Brand (terracotta / copper) */
  --light-blue: #c46d3d;
  --btn-blue: #b8622f;
  --btn-blue-hover: #a35528;
  --orange: #d48b2c;
  --orange-hover: #bf7c24;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(59,47,38,0.06), 0 1px 2px rgba(59,47,38,0.08);
  --shadow-md: 0 4px 12px rgba(59,47,38,0.08), 0 2px 4px rgba(59,47,38,0.06);
  --shadow-lg: 0 8px 24px rgba(59,47,38,0.10);
  --shadow-modal: 0 20px 60px rgba(59,47,38,0.20), 0 4px 16px rgba(59,47,38,0.10);

  /* Status */
  --error-red: #dc3545;
  --success-green: #22915a;
  --warning-amber: #e09a18;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(184,98,47,0.18);
  --overlay-bg: rgba(59,47,38,0.45);

  /* Component tokens */
  --text-heading: #2c2118;
  --code-bg: #ede4db;
  --code-fg: inherit;
  --canvas-dot: #c9bdb1;

  /* Table */
  --table-band-even: #faf6f2;
  --table-band-odd: #f3ece6;
  --table-band-even-hover: #ede4db;
  --table-band-odd-hover: #e7ddd2;
  --table-band-even-sel: #f5e6d6;
  --table-band-odd-sel: #f0ddca;
  --table-row-sel: #f5e6d6;

  /* Calendar */
  --cal-hover: #f5e6d6;
  --cal-today: #f0ddca;
  --cal-today-hover: #e8d0b8;
  --cal-weekend: #f0e8e0;
  --cal-weekend-hover: #e8ddd2;
  --cal-selected: #e8d0b8;
  --cal-pill-mix-base: #faf6f2;

  /* Scenario */
  --scenario-active-bg: #f5e6d6;
  --gantt-grid: #d9cec3;

  /* OR groups */
  --or-group-bg: #fdf5e6;
  --or-group-hover: #f9ebd0;
  --or-group-sel: #f2dfb8;
  --or-type-badge-bg: #f9ebd0;
  --or-type-badge-fg: #7a5a1e;
  --or-type-badge-border: #c98a2e;

  /* Badges */
  --badge-ok-bg: #dceee2;
  --badge-ok-fg: #2d5e3e;
  --badge-warn-bg: #f9ebd0;
  --badge-warn-fg: #7a5a1e;
  --badge-err-bg: #f5e0e0;
  --badge-err-fg: #8c2626;

  /* Hints */
  --hint-bg: #f9ebd0;
  --hint-fg: #7a5a1e;
  --hint-border: #c98a2e;
  --hint-bottleneck-bg: #f5e0e0;
  --hint-bottleneck-fg: #8c2626;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #f0ddca;
  --hint-info-fg: #8c5a28;
  --hint-info-border: #c46d3d;

  /* Chat */
  --chat-system-bg: #f9ebd0;
  --chat-system-fg: #7a5a1e;
  --chip-bg: #edddd0;
  --chip-fg: #8c5a28;

  /* Schedule status */
  --sched-status-done-bg: #dceee2;
  --sched-status-done-fg: #2d5e3e;
  --sched-status-prog-bg: #f0ddca;
  --sched-status-prog-fg: #8c5a28;
  --sched-status-btn-bg: #f5e0e0;
  --sched-status-btn-fg: #8c2626;

  /* Schedule badges */
  --sched-badge-yes-bg: #edddd0;
  --sched-badge-yes-fg: #8c5a28;
  --sched-badge-no-bg: #ede4db;
  --sched-badge-no-fg: #7a6b5c;

  /* Schedule risk */
  --sched-risk-green-bg: #dceee2;
  --sched-risk-green-fg: #2d5e3e;
  --sched-risk-amber-bg: #f9ebd0;
  --sched-risk-amber-fg: #7a5a1e;
  --sched-risk-red-bg: #f5e0e0;
  --sched-risk-red-fg: #8c2626;
  --sched-dep-fg: #4a3d32;

  /* Chat actions */
  --chat-action-bg: #e5f0e8;
  --chat-action-border: #b8d4bf;
  --chat-action-fg: #2d5e3e;
  --chat-action-err-bg: #f5e0e0;
  --chat-action-err-border: #e0b8b8;
  --chat-action-err-fg: #8c2626;
  --chat-action-pend-bg: #f0ddca;
  --chat-action-pend-border: #d4bb96;
  --chat-action-pend-fg: #8c5a28;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #c46d3d;
  --kanban-scope-fg: #c46d3d;
  --kanban-scope-bg: rgba(196,109,61,0.08);
  --tab-objectives-fg: #c46d3d;
  --tab-objectives-border: #b8622f;
  --tab-plan-fg: #c46d3d;
  --tab-plan-border: #b8622f;
  --tab-schedule-fg: #c46d3d;
  --tab-schedule-border: #b8622f;
  --node-task-header: #2c2118;

  /* Toolbar */
  --toolbar-bg: #2c2118;
  --toolbar-fg: #faf6f2;
  --toolbar-border: #4a3d32;
  --toolbar-muted: #a89888;
  --toolbar-link: #c46d3d;
  --toolbar-link-hover: #faf6f2;
  --toolbar-btn-bg: rgba(255,255,255,0.12);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.2);
  --toolbar-btn-border: rgba(255,255,255,0.18);
  --toolbar-icon-fg: #c46d3d;
  --toolbar-icon-fg-hover: #faf6f2;

  /* Canvas edges */
  --edge-default: #a89888;
  --edge-seq: #16a34a;
  --edge-or: #d97706;
  --edge-preview: #c9bdb1;
  --edge-delete-bg: #3b2f26;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #16a34a;
  --node-port-seq-stroke: #0d7a34;
  --node-port-or: #d97706;
  --node-port-or-stroke: #a65d04;
  --node-bottleneck: #ef4444;
  --node-progress-track: #d9cec3;
  --node-progress-fill: #b8622f;
  --node-success-badge: #16a34a;
  --node-info-badge: #b8622f;

  /* Gantt bars */
  --gantt-seg-1: #16a34a; --gantt-seg-2: #2563eb; --gantt-seg-3: #8b5cf6;
  --gantt-seg-4: #d97706; --gantt-seg-5: #ef4444; --gantt-seg-6: #0891b2; --gantt-seg-7: #db2777;
  --gantt-bar-done: #8c7a6b;
  --gantt-bar-normal: #16a34a;
  --gantt-bar-bottleneck: #ef4444;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #2563eb;
  --hist-bar-duration: #2563eb;
  --hist-p10: #16a34a;
  --hist-p50: #d97706;
  --hist-p90: #ef4444;

  /* Inputs */
  --input-bg: var(--bg-white);
  --input-fg: var(--text-primary);
  --input-border: var(--border);
  --input-focus-border: #b8622f;

  /* Chat */
  --chat-user-bg: #b8622f;
  --chat-user-fg: #fff;
  --chat-code-bg: #2c2118;
  --chat-code-fg: #e0d5cb;
}

/* ── Dark Mode ── */
[data-special="redwood"][data-mode="dark"] {
  /* Surfaces */
  --bg-page: #1a1310;
  --bg-white: #26201b;
  --bg-light: #2c2520;
  --bg-hover: #382f28;
  --bg-card-header: #2c241e;
  --bg-surface: #2c2520;
  --bg-panel: #26201b;

  /* Text */
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;

  /* Border */
  --border: #3e342c;

  /* Brand (terracotta / copper) */
  --light-blue: #d9875a;
  --btn-blue: #cc7a4c;
  --btn-blue-hover: #b86e42;
  --orange: #dea04a;
  --orange-hover: #cc9240;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.20);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.30), 0 2px 4px rgba(0,0,0,0.20);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.50), 0 4px 16px rgba(0,0,0,0.35);

  /* Status */
  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(204,122,76,0.28);
  --overlay-bg: rgba(0,0,0,0.60);

  /* Component tokens */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.08);
  --code-fg: #dcd4ca;
  --canvas-dot: #4a3f36;

  /* Table */
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(204,122,76,0.10);
  --table-band-odd-sel: rgba(204,122,76,0.14);
  --table-row-sel: rgba(204,122,76,0.08);

  /* Calendar */
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(204,122,76,0.10);
  --cal-today-hover: rgba(204,122,76,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(204,122,76,0.15);
  --cal-pill-mix-base: var(--bg-white);

  /* Scenario */
  --scenario-active-bg: rgba(204,122,76,0.12);
  --gantt-grid: #3e342c;

  /* OR groups */
  --or-group-bg: rgba(222,160,74,0.08);
  --or-group-hover: rgba(222,160,74,0.15);
  --or-group-sel: rgba(222,160,74,0.22);
  --or-type-badge-bg: rgba(222,160,74,0.12);
  --or-type-badge-fg: #f0c870;
  --or-type-badge-border: #b88830;

  /* Badges */
  --badge-ok-bg: rgba(94,201,122,0.12);
  --badge-ok-fg: #7ee8a0;
  --badge-warn-bg: rgba(222,160,74,0.12);
  --badge-warn-fg: #f0c870;
  --badge-err-bg: rgba(240,112,112,0.12);
  --badge-err-fg: #f8a0a0;

  /* Hints */
  --hint-bg: rgba(222,160,74,0.10);
  --hint-fg: #f0c870;
  --hint-border: #b88830;
  --hint-bottleneck-bg: rgba(240,112,112,0.10);
  --hint-bottleneck-fg: #f8a0a0;
  --hint-bottleneck-border: #e05050;
  --hint-info-bg: rgba(217,135,90,0.10);
  --hint-info-fg: #e8a878;
  --hint-info-border: #cc7a4c;

  /* Chat */
  --chat-system-bg: rgba(222,160,74,0.12);
  --chat-system-fg: #f0c870;
  --chip-bg: rgba(217,135,90,0.12);
  --chip-fg: #e8a878;

  /* Schedule status */
  --sched-status-done-bg: rgba(94,201,122,0.12);
  --sched-status-done-fg: #7ee8a0;
  --sched-status-prog-bg: rgba(217,135,90,0.12);
  --sched-status-prog-fg: #e8a878;
  --sched-status-btn-bg: rgba(240,112,112,0.12);
  --sched-status-btn-fg: #f8a0a0;

  /* Schedule badges */
  --sched-badge-yes-bg: rgba(217,135,90,0.12);
  --sched-badge-yes-fg: #e8a878;
  --sched-badge-no-bg: rgba(255,255,255,0.06);
  --sched-badge-no-fg: var(--text-secondary);

  /* Schedule risk */
  --sched-risk-green-bg: rgba(94,201,122,0.12);
  --sched-risk-green-fg: #7ee8a0;
  --sched-risk-amber-bg: rgba(222,160,74,0.12);
  --sched-risk-amber-fg: #f0c870;
  --sched-risk-red-bg: rgba(240,112,112,0.12);
  --sched-risk-red-fg: #f8a0a0;
  --sched-dep-fg: var(--text-primary);

  /* Chat actions */
  --chat-action-bg: rgba(94,201,122,0.10);
  --chat-action-border: rgba(94,201,122,0.20);
  --chat-action-fg: #7ee8a0;
  --chat-action-err-bg: rgba(240,112,112,0.10);
  --chat-action-err-border: rgba(240,112,112,0.20);
  --chat-action-err-fg: #f8a0a0;
  --chat-action-pend-bg: rgba(217,135,90,0.10);
  --chat-action-pend-border: rgba(217,135,90,0.20);
  --chat-action-pend-fg: #e8a878;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #d9875a;
  --kanban-scope-fg: #d9875a;
  --kanban-scope-bg: rgba(217,135,90,0.12);
  --tab-objectives-fg: #d9875a;
  --tab-objectives-border: #cc7a4c;
  --tab-plan-fg: #d9875a;
  --tab-plan-border: #cc7a4c;
  --tab-schedule-fg: #d9875a;
  --tab-schedule-border: #cc7a4c;
  --node-task-header: #382f28;

  /* Toolbar */
  --toolbar-bg: #1a1310;
  --toolbar-fg: #e0d5cb;
  --toolbar-border: #3e342c;
  --toolbar-muted: #6e5f52;
  --toolbar-link: #d9875a;
  --toolbar-link-hover: #e0d5cb;
  --toolbar-btn-bg: rgba(255,255,255,0.1);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.16);
  --toolbar-btn-border: rgba(255,255,255,0.14);
  --toolbar-icon-fg: #d9875a;
  --toolbar-icon-fg-hover: #e0d5cb;

  /* Canvas edges */
  --edge-default: #6e5f52;
  --edge-seq: #4ade80;
  --edge-or: #fbbf24;
  --edge-preview: #3e342c;
  --edge-delete-bg: #26201b;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #4ade80;
  --node-port-seq-stroke: #16a34a;
  --node-port-or: #fbbf24;
  --node-port-or-stroke: #d97706;
  --node-bottleneck: #f87171;
  --node-progress-track: #3e342c;
  --node-progress-fill: #cc7a4c;
  --node-success-badge: #4ade80;
  --node-info-badge: #cc7a4c;

  /* Gantt bars */
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #6e5f52;
  --gantt-bar-normal: #4ade80;
  --gantt-bar-bottleneck: #f87171;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #60a5fa;
  --hist-bar-duration: #60a5fa;
  --hist-p10: #4ade80;
  --hist-p50: #fbbf24;
  --hist-p90: #f87171;

  /* Inputs */
  --input-bg: #2c2520;
  --input-fg: #e0d5cb;
  --input-border: #3e342c;
  --input-focus-border: #cc7a4c;

  /* Chat */
  --chat-user-bg: #cc7a4c;
  --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.07);
  --chat-code-fg: #e0d5cb;
}
/* ================================================================
   Neon Terminal — Special Theme Fragment
   Hacker/dev aesthetic: phosphor green on near-black.
   Thin glowing borders, monospace energy.
   ================================================================ */

/* ── Light mode: light terminal feel ── */
[data-special="neon-terminal"] {
  /* Core surfaces — off-white with faint green tint */
  --bg-page: #eef2ed;
  --bg-white: #f7faf6;
  --bg-light: #e4eae3;
  --bg-hover: #e4ebe3;
  --bg-card-header: #eff4ee;
  --bg-surface: #f0f4ef;
  --bg-panel: #f7faf6;

  /* Text — dark with green undertone */
  --text-primary: #1a2e1a;
  --text-secondary: #5a7a5a;
  --text-tertiary: #6a8a6a;
  --text-muted: #5f7e5f;

  /* Border — thin green tint */
  --border: #c2d4c0;

  /* Brand — phosphor green */
  --light-blue: #22c55e;
  --btn-blue: #16a34a;
  --btn-blue-hover: #15803d;
  --orange: #4ade80;
  --orange-hover: #22c55e;

  /* Shadows — green-tinted */
  --shadow-sm: 0 1px 3px rgba(22,163,74,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(22,163,74,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(22,163,74,0.10);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(22,163,74,0.10);

  /* Status */
  --error-red: #dc2626;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  /* Focus / overlay */
  --focus-ring: 0 0 0 3px rgba(34,197,94,0.20);
  --overlay-bg: rgba(26,46,26,0.45);

  /* Component tokens */
  --text-heading: #0f2510;
  --code-bg: #e2ede0;
  --code-fg: #1a2e1a;
  --canvas-dot: #b0c8ae;
  --table-band-even: #f7faf6;
  --table-band-odd: #eff4ee;
  --table-band-even-hover: #e4ebe3;
  --table-band-odd-hover: #dce5da;
  --table-band-even-sel: #dcf5dc;
  --table-band-odd-sel: #d0eed0;
  --table-row-sel: #dcf5dc;
  --cal-hover: #e8f5e8;
  --cal-today: #dcf5dc;
  --cal-today-hover: #c6eec6;
  --cal-weekend: #f2f5f1;
  --cal-weekend-hover: #e8f5e8;
  --cal-selected: #c6eec6;
  --cal-pill-mix-base: #f7faf6;
  --scenario-active-bg: #dcf5dc;
  --gantt-grid: #c2d4c0;
  --or-group-bg: #fefce8;
  --or-group-hover: #fef9c3;
  --or-group-sel: #fef08a;
  --or-type-badge-bg: #fef9c3;
  --or-type-badge-fg: #854d0e;
  --or-type-badge-border: #eab308;
  --badge-ok-bg: #dcfce7;
  --badge-ok-fg: #14532d;
  --badge-warn-bg: #fef9c3;
  --badge-warn-fg: #854d0e;
  --badge-err-bg: #fef2f2;
  --badge-err-fg: #991b1b;
  --hint-bg: #ecfdf5;
  --hint-fg: #065f46;
  --hint-border: #16a34a;
  --hint-bottleneck-bg: #fee2e2;
  --hint-bottleneck-fg: #991b1b;
  --hint-bottleneck-border: #dc2626;
  --hint-info-bg: #dcf5dc;
  --hint-info-fg: #14532d;
  --hint-info-border: #22c55e;
  --chat-system-bg: #ecfdf5;
  --chat-system-fg: #065f46;
  --chip-bg: #d1fae5;
  --chip-fg: #065f46;
  --sched-status-done-bg: #dcfce7;
  --sched-status-done-fg: #14532d;
  --sched-status-prog-bg: #d1fae5;
  --sched-status-prog-fg: #065f46;
  --sched-status-btn-bg: #fee2e2;
  --sched-status-btn-fg: #991b1b;
  --sched-badge-yes-bg: #dcfce7;
  --sched-badge-yes-fg: #14532d;
  --sched-badge-no-bg: #f0f4ef;
  --sched-badge-no-fg: #6b8a6b;
  --sched-risk-green-bg: #dcfce7;
  --sched-risk-green-fg: #14532d;
  --sched-risk-amber-bg: #fef9c3;
  --sched-risk-amber-fg: #854d0e;
  --sched-risk-red-bg: #fee2e2;
  --sched-risk-red-fg: #991b1b;
  --sched-dep-fg: #374a37;
  --chat-action-bg: #ecfdf5;
  --chat-action-border: #a7f3d0;
  --chat-action-fg: #065f46;
  --chat-action-err-bg: #fef2f2;
  --chat-action-err-border: #fecaca;
  --chat-action-err-fg: #991b1b;
  --chat-action-pend-bg: #f0fdf4;
  --chat-action-pend-border: #bbf7d0;
  --chat-action-pend-fg: #166534;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #22c55e;
  --kanban-scope-fg: #22c55e;
  --kanban-scope-bg: rgba(34,197,94,0.08);
  --tab-objectives-fg: #22c55e;
  --tab-objectives-border: #16a34a;
  --tab-plan-fg: #22c55e;
  --tab-plan-border: #16a34a;
  --tab-schedule-fg: #22c55e;
  --tab-schedule-border: #16a34a;
  --node-task-header: #0f2510;

  /* Toolbar */
  --toolbar-bg: #0f2510;
  --toolbar-fg: #f7faf6;
  --toolbar-border: #1e4020;
  --toolbar-muted: #7a9a7a;
  --toolbar-link: #22c55e;
  --toolbar-link-hover: #f7faf6;
  --toolbar-btn-bg: rgba(255,255,255,0.12);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.2);
  --toolbar-btn-border: rgba(255,255,255,0.18);
  --toolbar-icon-fg: #22c55e;
  --toolbar-icon-fg-hover: #f7faf6;

  /* Canvas edges */
  --edge-default: #7a9a7a;
  --edge-seq: #16a34a;
  --edge-or: #f59e0b;
  --edge-preview: #b0c8ae;
  --edge-delete-bg: #1a2e1a;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #16a34a;
  --node-port-seq-stroke: #0d7a34;
  --node-port-or: #f59e0b;
  --node-port-or-stroke: #d97706;
  --node-bottleneck: #dc2626;
  --node-progress-track: #c2d4c0;
  --node-progress-fill: #16a34a;
  --node-success-badge: #16a34a;
  --node-info-badge: #16a34a;

  /* Gantt bars */
  --gantt-seg-1: #16a34a; --gantt-seg-2: #3b82f6; --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #f59e0b; --gantt-seg-5: #dc2626; --gantt-seg-6: #06b6d4; --gantt-seg-7: #db2777;
  --gantt-bar-done: #6b8a6b;
  --gantt-bar-normal: #16a34a;
  --gantt-bar-bottleneck: #dc2626;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #16a34a;
  --hist-bar-duration: #16a34a;
  --hist-p10: #06b6d4;
  --hist-p50: #f59e0b;
  --hist-p90: #dc2626;

  /* Inputs */
  --input-bg: var(--bg-white);
  --input-fg: var(--text-primary);
  --input-border: var(--border);
  --input-focus-border: #16a34a;

  /* Chat */
  --chat-user-bg: #16a34a;
  --chat-user-fg: #fff;
  --chat-code-bg: #0f2510;
  --chat-code-fg: #c8f0c8;
}

/* ── Dark mode: classic dark terminal ── */
[data-special="neon-terminal"][data-mode="dark"] {
  /* Core surfaces — near-black with faint green */
  --bg-page: #080c08;
  --bg-white: #0e150e;
  --bg-light: #182818;
  --bg-hover: #1a281a;
  --bg-card-header: #141e14;
  --bg-surface: #121a12;
  --bg-panel: #0e150e;

  /* Text — phosphor green palette */
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;

  /* Border — thin glowing green */
  --border: #1e3a1e;

  /* Brand — bright phosphor green */
  --light-blue: #4ade80;
  --btn-blue: #22c55e;
  --btn-blue-hover: #16a34a;
  --orange: #86efac;
  --orange-hover: #4ade80;

  /* Shadows — green glow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 0 4px rgba(34,197,94,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 0 8px rgba(34,197,94,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5), 0 0 16px rgba(34,197,94,0.06);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(34,197,94,0.08);

  /* Status — bright pastels */
  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  /* Focus / overlay */
  --focus-ring: 0 0 0 3px rgba(74,222,128,0.25);
  --overlay-bg: rgba(0,0,0,0.65);

  /* Component tokens */
  --text-heading: #ece6de;
  --code-bg: rgba(74,222,128,0.08);
  --code-fg: #dcd4ca;
  --canvas-dot: #2a4a2a;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(74,222,128,0.10);
  --table-band-odd-sel: rgba(74,222,128,0.13);
  --table-row-sel: rgba(74,222,128,0.08);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(74,222,128,0.10);
  --cal-today-hover: rgba(74,222,128,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(74,222,128,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(74,222,128,0.10);
  --gantt-grid: #1e3a1e;
  --or-group-bg: rgba(250,204,21,0.08);
  --or-group-hover: rgba(250,204,21,0.14);
  --or-group-sel: rgba(250,204,21,0.20);
  --or-type-badge-bg: rgba(250,204,21,0.12);
  --or-type-badge-fg: #fde047;
  --or-type-badge-border: #ca8a04;
  --badge-ok-bg: rgba(74,222,128,0.12);
  --badge-ok-fg: #86efac;
  --badge-warn-bg: rgba(251,191,36,0.12);
  --badge-warn-fg: #fde047;
  --badge-err-bg: rgba(248,113,113,0.12);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(74,222,128,0.08);
  --hint-fg: #86efac;
  --hint-border: #16a34a;
  --hint-bottleneck-bg: rgba(248,113,113,0.10);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: rgba(74,222,128,0.08);
  --hint-info-fg: #86efac;
  --hint-info-border: #22c55e;
  --chat-system-bg: rgba(74,222,128,0.10);
  --chat-system-fg: #86efac;
  --chip-bg: rgba(74,222,128,0.12);
  --chip-fg: #86efac;
  --sched-status-done-bg: rgba(74,222,128,0.12);
  --sched-status-done-fg: #86efac;
  --sched-status-prog-bg: rgba(134,239,172,0.10);
  --sched-status-prog-fg: #a8e8a8;
  --sched-status-btn-bg: rgba(248,113,113,0.12);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(74,222,128,0.12);
  --sched-badge-yes-fg: #86efac;
  --sched-badge-no-bg: rgba(255,255,255,0.06);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(74,222,128,0.12);
  --sched-risk-green-fg: #86efac;
  --sched-risk-amber-bg: rgba(251,191,36,0.12);
  --sched-risk-amber-fg: #fde047;
  --sched-risk-red-bg: rgba(248,113,113,0.12);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(74,222,128,0.08);
  --chat-action-border: rgba(74,222,128,0.18);
  --chat-action-fg: #86efac;
  --chat-action-err-bg: rgba(248,113,113,0.08);
  --chat-action-err-border: rgba(248,113,113,0.18);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(134,239,172,0.08);
  --chat-action-pend-border: rgba(134,239,172,0.18);
  --chat-action-pend-fg: #a8e8a8;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #4ade80;
  --kanban-scope-fg: #4ade80;
  --kanban-scope-bg: rgba(74,222,128,0.12);
  --tab-objectives-fg: #4ade80;
  --tab-objectives-border: #22c55e;
  --tab-plan-fg: #4ade80;
  --tab-plan-border: #22c55e;
  --tab-schedule-fg: #4ade80;
  --tab-schedule-border: #22c55e;
  --node-task-header: #1a281a;

  /* Toolbar */
  --toolbar-bg: #080c08;
  --toolbar-fg: #c8f0c8;
  --toolbar-border: #1e3a1e;
  --toolbar-muted: #4a8a4a;
  --toolbar-link: #4ade80;
  --toolbar-link-hover: #c8f0c8;
  --toolbar-btn-bg: rgba(74,222,128,0.1);
  --toolbar-btn-bg-hover: rgba(74,222,128,0.18);
  --toolbar-btn-border: rgba(74,222,128,0.2);
  --toolbar-icon-fg: #4ade80;
  --toolbar-icon-fg-hover: #c8f0c8;

  /* Canvas edges */
  --edge-default: #4a8a4a;
  --edge-seq: #4ade80;
  --edge-or: #fbbf24;
  --edge-preview: #1e3a1e;
  --edge-delete-bg: #0e150e;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #4ade80;
  --node-port-seq-stroke: #16a34a;
  --node-port-or: #fbbf24;
  --node-port-or-stroke: #ca8a04;
  --node-bottleneck: #f87171;
  --node-progress-track: #1e3a1e;
  --node-progress-fill: #22c55e;
  --node-success-badge: #4ade80;
  --node-info-badge: #22c55e;

  /* Gantt bars */
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #4a8a4a;
  --gantt-bar-normal: #4ade80;
  --gantt-bar-bottleneck: #f87171;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #22c55e;
  --hist-bar-duration: #22c55e;
  --hist-p10: #22d3ee;
  --hist-p50: #fbbf24;
  --hist-p90: #f87171;

  /* Inputs */
  --input-bg: #121a12;
  --input-fg: #c8f0c8;
  --input-border: #1e3a1e;
  --input-focus-border: #22c55e;

  /* Chat */
  --chat-user-bg: #22c55e;
  --chat-user-fg: #fff;
  --chat-code-bg: rgba(74,222,128,0.08);
  --chat-code-fg: #a8e8a8;
}
/* ================================================================
   Paper & Ink — Minimalist Theme
   Pure black-on-white clarity. Single muted steel-blue accent
   for interactive elements. High contrast, generous whitespace.
   ================================================================ */

/* ── Light Mode ── */
[data-special="paper-ink"] {
  /* Core surfaces */
  --bg-page: #ffffff;
  --bg-white: #ffffff;
  --bg-light: #f2f2f2;
  --bg-hover: #f5f5f5;
  --bg-card-header: #f7f7f7;
  --bg-surface: #fafafa;
  --bg-panel: #ffffff;

  /* Text */
  --text-primary: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #838383;
  --text-muted: #737373;

  /* Border */
  --border: #d4d4d4;

  /* Brand — muted steel blue */
  --light-blue: #5b7e9e;
  --btn-blue: #4a7190;
  --btn-blue-hover: #3d6080;
  --orange: #6b7e8e;
  --orange-hover: #5a6d7d;

  /* Shadows — subtle, barely there */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-modal: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);

  /* Status */
  --error-red: #dc2626;
  --success-green: #16a34a;
  --warning-amber: #e09a10;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(74,113,144,0.18);
  --overlay-bg: rgba(0,0,0,0.3);

  /* Component tokens */
  --text-heading: #0a0a0a;
  --code-bg: #f2f2f2;
  --code-fg: #1a1a1a;
  --canvas-dot: #d0d0d0;

  /* Table banding */
  --table-band-even: #ffffff;
  --table-band-odd: #fafafa;
  --table-band-even-hover: #f0f0f0;
  --table-band-odd-hover: #ececec;
  --table-band-even-sel: #e8eff5;
  --table-band-odd-sel: #e1e9f1;
  --table-row-sel: #e8eff5;

  /* Calendar */
  --cal-hover: #f0f0f0;
  --cal-today: #eaf0f6;
  --cal-today-hover: #dce5ee;
  --cal-weekend: #f7f7f7;
  --cal-weekend-hover: #efefef;
  --cal-selected: #dce5ee;
  --cal-pill-mix-base: white;

  /* Scenario / Gantt */
  --scenario-active-bg: #eaf0f6;
  --gantt-grid: #e0e0e0;

  /* OR-group */
  --or-group-bg: #f5f5f0;
  --or-group-hover: #eeeee8;
  --or-group-sel: #e5e5dc;
  --or-type-badge-bg: #eeeee8;
  --or-type-badge-fg: #5a5a4a;
  --or-type-badge-border: #b0b0a0;

  /* Badges */
  --badge-ok-bg: #e6f2ec;
  --badge-ok-fg: #1a5c38;
  --badge-warn-bg: #f5f0e0;
  --badge-warn-fg: #6b5a1f;
  --badge-err-bg: #f5e6e6;
  --badge-err-fg: #8b1a1a;

  /* Hints */
  --hint-bg: #f5f0e0;
  --hint-fg: #6b5a1f;
  --hint-border: #c8b870;
  --hint-bottleneck-bg: #f5e6e6;
  --hint-bottleneck-fg: #8b1a1a;
  --hint-bottleneck-border: #c53030;
  --hint-info-bg: #eaf0f6;
  --hint-info-fg: #3d6080;
  --hint-info-border: #5b7e9e;

  /* Chat */
  --chat-system-bg: #f5f0e0;
  --chat-system-fg: #6b5a1f;

  /* Chips */
  --chip-bg: #e8eff5;
  --chip-fg: #3d6080;

  /* Schedule status */
  --sched-status-done-bg: #e6f2ec;
  --sched-status-done-fg: #1a5c38;
  --sched-status-prog-bg: #e8eff5;
  --sched-status-prog-fg: #3d6080;
  --sched-status-btn-bg: #f5e6e6;
  --sched-status-btn-fg: #8b1a1a;

  /* Schedule badges */
  --sched-badge-yes-bg: #e8eff5;
  --sched-badge-yes-fg: #3d6080;
  --sched-badge-no-bg: #f0f0f0;
  --sched-badge-no-fg: #808080;

  /* Schedule risk */
  --sched-risk-green-bg: #e6f2ec;
  --sched-risk-green-fg: #1a5c38;
  --sched-risk-amber-bg: #f5f0e0;
  --sched-risk-amber-fg: #6b5a1f;
  --sched-risk-red-bg: #f5e6e6;
  --sched-risk-red-fg: #8b1a1a;

  /* Schedule dependency */
  --sched-dep-fg: #1a1a1a;

  /* Chat actions */
  --chat-action-bg: #eef5f0;
  --chat-action-border: #c8ddd0;
  --chat-action-fg: #1a5c38;
  --chat-action-err-bg: #f5eeee;
  --chat-action-err-border: #ddc8c8;
  --chat-action-err-fg: #8b1a1a;
  --chat-action-pend-bg: #eef2f7;
  --chat-action-pend-border: #c8d5e0;
  --chat-action-pend-fg: #3d6080;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #5b7e9e;
  --kanban-scope-fg: #5b7e9e;
  --kanban-scope-bg: rgba(91,126,158,0.08);
  --tab-objectives-fg: #5b7e9e;
  --tab-objectives-border: #4a7190;
  --tab-plan-fg: #5b7e9e;
  --tab-plan-border: #4a7190;
  --tab-schedule-fg: #5b7e9e;
  --tab-schedule-border: #4a7190;
  --node-task-header: #0a0a0a;

  /* Toolbar */
  --toolbar-bg: #1a1a1a;
  --toolbar-fg: #f5f5f5;
  --toolbar-border: #333333;
  --toolbar-muted: #9a9a9a;
  --toolbar-link: #5b7e9e;
  --toolbar-link-hover: #f5f5f5;
  --toolbar-btn-bg: rgba(255,255,255,0.12);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.2);
  --toolbar-btn-border: rgba(255,255,255,0.18);
  --toolbar-icon-fg: #8aa0b4;
  --toolbar-icon-fg-hover: #f5f5f5;

  /* Canvas edges */
  --edge-default: #9a9a9a;
  --edge-seq: #16a34a;
  --edge-or: #e8960a;
  --edge-preview: #d0d0d0;
  --edge-delete-bg: #1a1a1a;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #16a34a;
  --node-port-seq-stroke: #0f7a35;
  --node-port-or: #e8960a;
  --node-port-or-stroke: #b07808;
  --node-bottleneck: #dc2626;
  --node-progress-track: #d4d4d4;
  --node-progress-fill: #2563eb;
  --node-success-badge: #16a34a;
  --node-info-badge: #2563eb;

  /* Gantt bars */
  --gantt-seg-1: #16a34a; --gantt-seg-2: #2563eb; --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #e8960a; --gantt-seg-5: #dc2626; --gantt-seg-6: #0891b2; --gantt-seg-7: #c026a0;
  --gantt-bar-done: #9a9a9a;
  --gantt-bar-normal: #16a34a;
  --gantt-bar-bottleneck: #dc2626;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #2563eb;
  --hist-bar-duration: #2563eb;
  --hist-p10: #16a34a;
  --hist-p50: #e8960a;
  --hist-p90: #dc2626;

  /* Inputs */
  --input-bg: var(--bg-white);
  --input-fg: var(--text-primary);
  --input-border: var(--border);
  --input-focus-border: #4a7190;

  /* Chat */
  --chat-user-bg: #4a7190;
  --chat-user-fg: #fff;
  --chat-code-bg: #1a1a1a;
  --chat-code-fg: #e0e0e0;
}

/* ── Dark Mode ── */
[data-special="paper-ink"][data-mode="dark"] {
  /* Core surfaces — near-black with warm grey undertone */
  --bg-page: #121212;
  --bg-white: #1c1c1c;
  --bg-light: #222222;
  --bg-hover: #2a2a2a;
  --bg-card-header: #1f1f1f;
  --bg-surface: #222222;
  --bg-panel: #1c1c1c;

  /* Text — high contrast off-white */
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;

  /* Border */
  --border: #3a3a3a;

  /* Brand — muted steel blue, brighter for dark */
  --light-blue: #7da0be;
  --btn-blue: #6b92b0;
  --btn-blue-hover: #7da0be;
  --orange: #8a9caa;
  --orange-hover: #9aacba;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-modal: 0 12px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.35);

  /* Status — brighter pastels */
  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(125,160,190,0.25);
  --overlay-bg: rgba(0,0,0,0.55);

  /* Component tokens */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.08);
  --code-fg: #dcd4ca;
  --canvas-dot: #4a4a4a;

  /* Table banding */
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(107,146,176,0.10);
  --table-band-odd-sel: rgba(107,146,176,0.14);
  --table-row-sel: rgba(107,146,176,0.08);

  /* Calendar */
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(107,146,176,0.10);
  --cal-today-hover: rgba(107,146,176,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(107,146,176,0.15);
  --cal-pill-mix-base: var(--bg-white);

  /* Scenario / Gantt */
  --scenario-active-bg: rgba(107,146,176,0.10);
  --gantt-grid: #3a3a3a;

  /* OR-group */
  --or-group-bg: rgba(200,190,140,0.08);
  --or-group-hover: rgba(200,190,140,0.14);
  --or-group-sel: rgba(200,190,140,0.20);
  --or-type-badge-bg: rgba(200,190,140,0.12);
  --or-type-badge-fg: #d4cc90;
  --or-type-badge-border: #a09050;

  /* Badges */
  --badge-ok-bg: rgba(92,204,128,0.10);
  --badge-ok-fg: #7ddca0;
  --badge-warn-bg: rgba(224,176,64,0.10);
  --badge-warn-fg: #e0c060;
  --badge-err-bg: rgba(240,112,112,0.10);
  --badge-err-fg: #f0a0a0;

  /* Hints */
  --hint-bg: rgba(224,176,64,0.10);
  --hint-fg: #e0c060;
  --hint-border: #a09050;
  --hint-bottleneck-bg: rgba(240,112,112,0.10);
  --hint-bottleneck-fg: #f0a0a0;
  --hint-bottleneck-border: #c05050;
  --hint-info-bg: rgba(107,146,176,0.10);
  --hint-info-fg: #90b8d8;
  --hint-info-border: #6b92b0;

  /* Chat */
  --chat-system-bg: rgba(224,176,64,0.10);
  --chat-system-fg: #e0c060;

  /* Chips */
  --chip-bg: rgba(107,146,176,0.12);
  --chip-fg: #90b8d8;

  /* Schedule status */
  --sched-status-done-bg: rgba(92,204,128,0.10);
  --sched-status-done-fg: #7ddca0;
  --sched-status-prog-bg: rgba(107,146,176,0.10);
  --sched-status-prog-fg: #90b8d8;
  --sched-status-btn-bg: rgba(240,112,112,0.10);
  --sched-status-btn-fg: #f0a0a0;

  /* Schedule badges */
  --sched-badge-yes-bg: rgba(107,146,176,0.12);
  --sched-badge-yes-fg: #90b8d8;
  --sched-badge-no-bg: rgba(255,255,255,0.06);
  --sched-badge-no-fg: var(--text-secondary);

  /* Schedule risk */
  --sched-risk-green-bg: rgba(92,204,128,0.10);
  --sched-risk-green-fg: #7ddca0;
  --sched-risk-amber-bg: rgba(224,176,64,0.10);
  --sched-risk-amber-fg: #e0c060;
  --sched-risk-red-bg: rgba(240,112,112,0.10);
  --sched-risk-red-fg: #f0a0a0;

  /* Schedule dependency */
  --sched-dep-fg: var(--text-primary);

  /* Chat actions */
  --chat-action-bg: rgba(92,204,128,0.08);
  --chat-action-border: rgba(92,204,128,0.18);
  --chat-action-fg: #7ddca0;
  --chat-action-err-bg: rgba(240,112,112,0.08);
  --chat-action-err-border: rgba(240,112,112,0.18);
  --chat-action-err-fg: #f0a0a0;
  --chat-action-pend-bg: rgba(107,146,176,0.08);
  --chat-action-pend-border: rgba(107,146,176,0.18);
  --chat-action-pend-fg: #90b8d8;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #7da0be;
  --kanban-scope-fg: #7da0be;
  --kanban-scope-bg: rgba(125,160,190,0.12);
  --tab-objectives-fg: #7da0be;
  --tab-objectives-border: #6b92b0;
  --tab-plan-fg: #7da0be;
  --tab-plan-border: #6b92b0;
  --tab-schedule-fg: #7da0be;
  --tab-schedule-border: #6b92b0;
  --node-task-header: #2a2a2a;

  /* Toolbar */
  --toolbar-bg: #121212;
  --toolbar-fg: #e8e8e8;
  --toolbar-border: #3a3a3a;
  --toolbar-muted: #6e6e6e;
  --toolbar-link: #7da0be;
  --toolbar-link-hover: #e8e8e8;
  --toolbar-btn-bg: rgba(255,255,255,0.1);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.16);
  --toolbar-btn-border: rgba(255,255,255,0.14);
  --toolbar-icon-fg: #7da0be;
  --toolbar-icon-fg-hover: #e8e8e8;

  /* Canvas edges */
  --edge-default: #6e6e6e;
  --edge-seq: #4ade80;
  --edge-or: #fbbf24;
  --edge-preview: #3a3a3a;
  --edge-delete-bg: #1c1c1c;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #4ade80;
  --node-port-seq-stroke: #22c55e;
  --node-port-or: #fbbf24;
  --node-port-or-stroke: #d99e0a;
  --node-bottleneck: #f87171;
  --node-progress-track: #3a3a3a;
  --node-progress-fill: #60a5fa;
  --node-success-badge: #4ade80;
  --node-info-badge: #60a5fa;

  /* Gantt bars */
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #6e6e6e;
  --gantt-bar-normal: #4ade80;
  --gantt-bar-bottleneck: #f87171;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #60a5fa;
  --hist-bar-duration: #60a5fa;
  --hist-p10: #4ade80;
  --hist-p50: #fbbf24;
  --hist-p90: #f87171;

  /* Inputs */
  --input-bg: #222222;
  --input-fg: #e8e8e8;
  --input-border: #3a3a3a;
  --input-focus-border: #6b92b0;

  /* Chat */
  --chat-user-bg: #6b92b0;
  --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.08);
  --chat-code-fg: #e8e8e8;
}
/* ================================================================
   Aurora Theme — Wonder, creative ambition
   Purple-to-teal-to-green gradient accent palette.
   Dark: shifting cool-spectrum accents on dark surfaces.
   Light: soft pastel washes.
   ================================================================ */

/* ── Light Mode ── */
[data-special="aurora"] {
  --bg-page: #f0eef6;
  --bg-white: #f9f7fd;
  --bg-light: #ebe8f4;
  --bg-hover: #e0dced;
  --bg-card-header: #f1eef8;
  --bg-surface: #ebe8f4;
  --bg-panel: #f9f7fd;
  --text-primary: #2a2440;
  --text-secondary: #6b6386;
  --text-tertiary: #877fa0;
  --text-muted: #6e6588;
  --border: #cfc8e0;

  --light-blue: #7c6bc4;
  --btn-blue: #6a58b4;
  --btn-blue-hover: #574898;
  --orange: #1a9e8a;
  --orange-hover: #148274;

  --shadow-sm: 0 1px 4px rgba(80,50,140,0.08), 0 1px 2px rgba(80,50,140,0.06);
  --shadow-md: 0 4px 14px rgba(80,50,140,0.1), 0 2px 4px rgba(80,50,140,0.06);
  --shadow-lg: 0 8px 24px rgba(80,50,140,0.12);
  --shadow-modal: 0 20px 60px rgba(40,20,80,0.18), 0 4px 16px rgba(40,20,80,0.1);

  --error-red: #ef4444;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  --focus-ring: 0 0 0 3px rgba(124,107,196,0.3);
  --overlay-bg: rgba(30,20,50,0.45);

  /* Component tokens (aurora-light) */
  --text-heading: #1e1836;
  --code-bg: #e0dced;
  --code-fg: inherit;
  --canvas-dot: #c0b8d4;
  --table-band-even: #f9f7fd;
  --table-band-odd: #ebe8f4;
  --table-band-even-hover: #e0dced;
  --table-band-odd-hover: #d6d0e6;
  --table-band-even-sel: #d8d0f0;
  --table-band-odd-sel: #cec4ea;
  --table-row-sel: #d8d0f0;
  --cal-hover: #e0dced;
  --cal-today: #dcd4f2;
  --cal-today-hover: #cec4ea;
  --cal-weekend: #ebe8f4;
  --cal-weekend-hover: #e0dced;
  --cal-selected: #cec4ea;
  --cal-pill-mix-base: #f9f7fd;
  --scenario-active-bg: #d8d0f0;
  --gantt-grid: #cfc8e0;
  --or-group-bg: #e8e2f8;
  --or-group-hover: #ddd4f4;
  --or-group-sel: #cec4ea;
  --or-type-badge-bg: #ddd4f4;
  --or-type-badge-fg: #4a3690;
  --or-type-badge-border: #7c6bc4;
  --badge-ok-bg: #d1fae5;
  --badge-ok-fg: #065f46;
  --badge-warn-bg: #fef3c7;
  --badge-warn-fg: #92400e;
  --badge-err-bg: #fee2e2;
  --badge-err-fg: #991b1b;
  --hint-bg: #e8e2f8;
  --hint-fg: #4a3690;
  --hint-border: #7c6bc4;
  --hint-bottleneck-bg: #fee2e2;
  --hint-bottleneck-fg: #991b1b;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #d8f0ee;
  --hint-info-fg: #0e5e54;
  --hint-info-border: #1a9e8a;
  --chat-system-bg: #e8e2f8;
  --chat-system-fg: #4a3690;
  --chip-bg: #dcd4f2;
  --chip-fg: #4a3690;
  --sched-status-done-bg: #d1fae5;
  --sched-status-done-fg: #065f46;
  --sched-status-prog-bg: #d8f0ee;
  --sched-status-prog-fg: #0e5e54;
  --sched-status-btn-bg: #fee2e2;
  --sched-status-btn-fg: #991b1b;
  --sched-badge-yes-bg: #dcd4f2;
  --sched-badge-yes-fg: #4a3690;
  --sched-badge-no-bg: #ebe8f4;
  --sched-badge-no-fg: #6b7280;
  --sched-risk-green-bg: #d1fae5;
  --sched-risk-green-fg: #065f46;
  --sched-risk-amber-bg: #fef3c7;
  --sched-risk-amber-fg: #92400e;
  --sched-risk-red-bg: #fee2e2;
  --sched-risk-red-fg: #991b1b;
  --sched-dep-fg: #2a2440;
  --chat-action-bg: #d8f0ee;
  --chat-action-border: #a0e0d6;
  --chat-action-fg: #0e5e54;
  --chat-action-err-bg: #fee2e2;
  --chat-action-err-border: #fecaca;
  --chat-action-err-fg: #991b1b;
  --chat-action-pend-bg: #e8e2f8;
  --chat-action-pend-border: #cec4ea;
  --chat-action-pend-fg: #4a3690;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #7c6bc4;
  --kanban-scope-fg: #7c6bc4;
  --kanban-scope-bg: rgba(124,107,196,0.08);
  --tab-objectives-fg: #7c6bc4;
  --tab-objectives-border: #6a58b4;
  --tab-plan-fg: #7c6bc4;
  --tab-plan-border: #6a58b4;
  --tab-schedule-fg: #7c6bc4;
  --tab-schedule-border: #6a58b4;
  --node-task-header: #1e1836;

  /* Toolbar */
  --toolbar-bg: #1e1836;
  --toolbar-fg: #f9f7fd;
  --toolbar-border: #352e58;
  --toolbar-muted: #9e96b4;
  --toolbar-link: #7c6bc4;
  --toolbar-link-hover: #f9f7fd;
  --toolbar-btn-bg: rgba(255,255,255,0.12);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.2);
  --toolbar-btn-border: rgba(255,255,255,0.18);
  --toolbar-icon-fg: #a08ae0;
  --toolbar-icon-fg-hover: #f9f7fd;

  /* Canvas edges */
  --edge-default: #9e96b4;
  --edge-seq: #16a34a;
  --edge-or: #f59e0b;
  --edge-preview: #c0b8d4;
  --edge-delete-bg: #2a2440;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #16a34a;
  --node-port-seq-stroke: #0d7a34;
  --node-port-or: #f59e0b;
  --node-port-or-stroke: #b47a08;
  --node-bottleneck: #ef4444;
  --node-progress-track: #cfc8e0;
  --node-progress-fill: #7c3aed;
  --node-success-badge: #16a34a;
  --node-info-badge: #7c3aed;

  /* Gantt bars */
  --gantt-seg-1: #16a34a; --gantt-seg-2: #7c3aed; --gantt-seg-3: #14b8a6;
  --gantt-seg-4: #f59e0b; --gantt-seg-5: #ef4444; --gantt-seg-6: #3b82f6; --gantt-seg-7: #db2777;
  --gantt-bar-done: #9e96b4;
  --gantt-bar-normal: #16a34a;
  --gantt-bar-bottleneck: #ef4444;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #7c3aed;
  --hist-bar-duration: #7c3aed;
  --hist-p10: #16a34a;
  --hist-p50: #f59e0b;
  --hist-p90: #ef4444;

  /* Inputs */
  --input-bg: var(--bg-white);
  --input-fg: var(--text-primary);
  --input-border: var(--border);
  --input-focus-border: #6a58b4;

  /* Chat */
  --chat-user-bg: #6a58b4;
  --chat-user-fg: #fff;
  --chat-code-bg: #1e1836;
  --chat-code-fg: #d4cfe6;
}

/* ── Dark Mode ── */
[data-special="aurora"][data-mode="dark"] {
  --bg-page: #0e0c18;
  --bg-white: #16132a;
  --bg-light: #1e1a34;
  --bg-hover: #28233e;
  --bg-card-header: #1c1830;
  --bg-surface: #1e1a34;
  --bg-panel: #16132a;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #302a4e;

  --light-blue: #a78bfa;
  --btn-blue: #8b6cf0;
  --btn-blue-hover: #7c5ce0;
  --orange: #34d9b8;
  --orange-hover: #28bfa2;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.3);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(167,139,250,0.25);
  --overlay-bg: rgba(6,4,14,0.7);

  /* Component tokens (aurora-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.07);
  --code-fg: #dcd4ca;
  --canvas-dot: #302a4e;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(167,139,250,0.12);
  --table-band-odd-sel: rgba(167,139,250,0.15);
  --table-row-sel: rgba(167,139,250,0.1);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(167,139,250,0.1);
  --cal-today-hover: rgba(167,139,250,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(167,139,250,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(167,139,250,0.12);
  --gantt-grid: #302a4e;
  --or-group-bg: rgba(139,108,240,0.08);
  --or-group-hover: rgba(139,108,240,0.14);
  --or-group-sel: rgba(139,108,240,0.20);
  --or-type-badge-bg: rgba(139,108,240,0.12);
  --or-type-badge-fg: #c4b5fc;
  --or-type-badge-border: #8b6cf0;
  --badge-ok-bg: rgba(52,217,184,0.12);
  --badge-ok-fg: #6ee7c4;
  --badge-warn-bg: rgba(251,191,36,0.12);
  --badge-warn-fg: #fcd34d;
  --badge-err-bg: rgba(248,113,113,0.1);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(167,139,250,0.08);
  --hint-fg: #c4b5fc;
  --hint-border: #8b6cf0;
  --hint-bottleneck-bg: rgba(248,113,113,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: rgba(52,217,184,0.08);
  --hint-info-fg: #6ee7c4;
  --hint-info-border: #34d9b8;
  --chat-system-bg: rgba(167,139,250,0.1);
  --chat-system-fg: #c4b5fc;
  --chip-bg: rgba(167,139,250,0.12);
  --chip-fg: #c4b5fc;
  --sched-status-done-bg: rgba(52,217,184,0.1);
  --sched-status-done-fg: #6ee7c4;
  --sched-status-prog-bg: rgba(167,139,250,0.1);
  --sched-status-prog-fg: #c4b5fc;
  --sched-status-btn-bg: rgba(248,113,113,0.1);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(167,139,250,0.1);
  --sched-badge-yes-fg: #c4b5fc;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(52,217,184,0.1);
  --sched-risk-green-fg: #6ee7c4;
  --sched-risk-amber-bg: rgba(251,191,36,0.1);
  --sched-risk-amber-fg: #fcd34d;
  --sched-risk-red-bg: rgba(248,113,113,0.1);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(52,217,184,0.08);
  --chat-action-border: rgba(52,217,184,0.18);
  --chat-action-fg: #6ee7c4;
  --chat-action-err-bg: rgba(248,113,113,0.08);
  --chat-action-err-border: rgba(248,113,113,0.18);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(167,139,250,0.08);
  --chat-action-pend-border: rgba(167,139,250,0.18);
  --chat-action-pend-fg: #c4b5fc;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #a78bfa;
  --kanban-scope-fg: #a78bfa;
  --kanban-scope-bg: rgba(167,139,250,0.12);
  --tab-objectives-fg: #a78bfa;
  --tab-objectives-border: #8b6cf0;
  --tab-plan-fg: #a78bfa;
  --tab-plan-border: #8b6cf0;
  --tab-schedule-fg: #a78bfa;
  --tab-schedule-border: #8b6cf0;
  --node-task-header: #1e1838;

  /* Toolbar */
  --toolbar-bg: #0e0c18;
  --toolbar-fg: #d4cfe6;
  --toolbar-border: #302a4e;
  --toolbar-muted: #5e5678;
  --toolbar-link: #a78bfa;
  --toolbar-link-hover: #d4cfe6;
  --toolbar-btn-bg: rgba(167,139,250,0.1);
  --toolbar-btn-bg-hover: rgba(167,139,250,0.18);
  --toolbar-btn-border: rgba(167,139,250,0.2);
  --toolbar-icon-fg: #a78bfa;
  --toolbar-icon-fg-hover: #d4cfe6;

  /* Canvas edges */
  --edge-default: #5e5678;
  --edge-seq: #4ade80;
  --edge-or: #fbbf24;
  --edge-preview: #302a4e;
  --edge-delete-bg: #16132a;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #4ade80;
  --node-port-seq-stroke: #16a34a;
  --node-port-or: #fbbf24;
  --node-port-or-stroke: #d97706;
  --node-bottleneck: #f87171;
  --node-progress-track: #302a4e;
  --node-progress-fill: #a78bfa;
  --node-success-badge: #4ade80;
  --node-info-badge: #a78bfa;

  /* Gantt bars */
  --gantt-seg-1: #4ade80; --gantt-seg-2: #a78bfa; --gantt-seg-3: #5eead4;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #60a5fa; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #5e5678;
  --gantt-bar-normal: #4ade80;
  --gantt-bar-bottleneck: #f87171;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #a78bfa;
  --hist-bar-duration: #a78bfa;
  --hist-p10: #4ade80;
  --hist-p50: #fbbf24;
  --hist-p90: #f87171;

  /* Inputs */
  --input-bg: #1e1a34;
  --input-fg: #d4cfe6;
  --input-border: #302a4e;
  --input-focus-border: #8b6cf0;

  /* Chat */
  --chat-user-bg: #8b6cf0;
  --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.07);
  --chat-code-fg: #d4cfe6;
}
/* ================================================================
   Sakura Theme — Gentle, refined elegance
   Soft pinks and blush tones with warm gray text.
   Cherry blossom palette. Light airy; dark dusty rose on charcoal.
   ================================================================ */

/* ── Light Mode ── */
[data-special="sakura"] {
  --bg-page: #faf5f5;
  --bg-white: #fefbfb;
  --bg-light: #f5eced;
  --bg-hover: #efe3e5;
  --bg-card-header: #f9f3f4;
  --bg-surface: #f5eced;
  --bg-panel: #fefbfb;
  --text-primary: #3d2b33;
  --text-secondary: #826874;
  --text-tertiary: #94808a;
  --text-muted: #7a6570;
  --border: #e0ced3;

  --light-blue: #d4728a;
  --btn-blue: #c2607a;
  --btn-blue-hover: #a84e68;
  --orange: #d4728a;
  --orange-hover: #bf5e76;

  --shadow-sm: 0 1px 4px rgba(120,60,80,0.08), 0 1px 2px rgba(120,60,80,0.06);
  --shadow-md: 0 4px 14px rgba(120,60,80,0.1), 0 2px 4px rgba(120,60,80,0.06);
  --shadow-lg: 0 8px 24px rgba(120,60,80,0.12);
  --shadow-modal: 0 20px 60px rgba(80,30,50,0.18), 0 4px 16px rgba(80,30,50,0.1);

  --error-red: #ef4444;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  --focus-ring: 0 0 0 3px rgba(212,114,138,0.3);
  --overlay-bg: rgba(60,30,40,0.45);

  /* Component tokens (sakura-light) */
  --text-heading: #2e1a22;
  --code-bg: #efe3e5;
  --code-fg: inherit;
  --canvas-dot: #d4c0c6;
  --table-band-even: #fefbfb;
  --table-band-odd: #f5eced;
  --table-band-even-hover: #efe3e5;
  --table-band-odd-hover: #e8d8dc;
  --table-band-even-sel: #f5d0d8;
  --table-band-odd-sel: #edc4ce;
  --table-row-sel: #f5d0d8;
  --cal-hover: #efe3e5;
  --cal-today: #f8d8e0;
  --cal-today-hover: #f0c8d2;
  --cal-weekend: #f5eced;
  --cal-weekend-hover: #efe3e5;
  --cal-selected: #f0c8d2;
  --cal-pill-mix-base: #fefbfb;
  --scenario-active-bg: #f8d8e0;
  --gantt-grid: #e0ced3;
  --or-group-bg: #fef0f3;
  --or-group-hover: #fce0e6;
  --or-group-sel: #f8c8d2;
  --or-type-badge-bg: #fce0e6;
  --or-type-badge-fg: #7a2040;
  --or-type-badge-border: #d4728a;
  --badge-ok-bg: #d1fae5;
  --badge-ok-fg: #065f46;
  --badge-warn-bg: #fef3c7;
  --badge-warn-fg: #92400e;
  --badge-err-bg: #fee2e2;
  --badge-err-fg: #991b1b;
  --hint-bg: #fce0e6;
  --hint-fg: #7a2040;
  --hint-border: #d4728a;
  --hint-bottleneck-bg: #fee2e2;
  --hint-bottleneck-fg: #991b1b;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #f8d8e0;
  --hint-info-fg: #7a2040;
  --hint-info-border: #d4728a;
  --chat-system-bg: #fce0e6;
  --chat-system-fg: #7a2040;
  --chip-bg: #f8d8e0;
  --chip-fg: #7a2040;
  --sched-status-done-bg: #d1fae5;
  --sched-status-done-fg: #065f46;
  --sched-status-prog-bg: #f8d8e0;
  --sched-status-prog-fg: #7a2040;
  --sched-status-btn-bg: #fee2e2;
  --sched-status-btn-fg: #991b1b;
  --sched-badge-yes-bg: #f8d8e0;
  --sched-badge-yes-fg: #7a2040;
  --sched-badge-no-bg: #f5eced;
  --sched-badge-no-fg: #6b7280;
  --sched-risk-green-bg: #d1fae5;
  --sched-risk-green-fg: #065f46;
  --sched-risk-amber-bg: #fef3c7;
  --sched-risk-amber-fg: #92400e;
  --sched-risk-red-bg: #fee2e2;
  --sched-risk-red-fg: #991b1b;
  --sched-dep-fg: #3d2b33;
  --chat-action-bg: #e0f8ea;
  --chat-action-border: #a7f3d0;
  --chat-action-fg: #065f46;
  --chat-action-err-bg: #fee2e2;
  --chat-action-err-border: #fecaca;
  --chat-action-err-fg: #991b1b;
  --chat-action-pend-bg: #f8d8e0;
  --chat-action-pend-border: #e8b0c0;
  --chat-action-pend-fg: #7a2040;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #d4728a;
  --kanban-scope-fg: #d4728a;
  --kanban-scope-bg: rgba(212,114,138,0.08);
  --tab-objectives-fg: #d4728a;
  --tab-objectives-border: #c2607a;
  --tab-plan-fg: #d4728a;
  --tab-plan-border: #c2607a;
  --tab-schedule-fg: #d4728a;
  --tab-schedule-border: #c2607a;
  --node-task-header: #2e1a22;

  /* Toolbar */
  --toolbar-bg: #3d1828;
  --toolbar-fg: #fefbfb;
  --toolbar-border: #5a2840;
  --toolbar-muted: #b09aa2;
  --toolbar-link: #d4728a;
  --toolbar-link-hover: #fefbfb;
  --toolbar-btn-bg: rgba(255,255,255,0.12);
  --toolbar-btn-bg-hover: rgba(255,255,255,0.2);
  --toolbar-btn-border: rgba(255,255,255,0.18);
  --toolbar-icon-fg: #d4728a;
  --toolbar-icon-fg-hover: #fefbfb;

  /* Canvas edges */
  --edge-default: #b09aa2;
  --edge-seq: #16a34a;
  --edge-or: #f59e0b;
  --edge-preview: #d4c0c6;
  --edge-delete-bg: #3d2b33;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #16a34a;
  --node-port-seq-stroke: #0d7a34;
  --node-port-or: #f59e0b;
  --node-port-or-stroke: #b47a08;
  --node-bottleneck: #ef4444;
  --node-progress-track: #e0ced3;
  --node-progress-fill: #c2607a;
  --node-success-badge: #16a34a;
  --node-info-badge: #c2607a;

  /* Gantt bars */
  --gantt-seg-1: #16a34a; --gantt-seg-2: #2563eb; --gantt-seg-3: #8b5cf6;
  --gantt-seg-4: #f59e0b; --gantt-seg-5: #ef4444; --gantt-seg-6: #0ea5c8; --gantt-seg-7: #db2777;
  --gantt-bar-done: #8a6e78;
  --gantt-bar-normal: #16a34a;
  --gantt-bar-bottleneck: #ef4444;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #2563eb;
  --hist-bar-duration: #2563eb;
  --hist-p10: #16a34a;
  --hist-p50: #f59e0b;
  --hist-p90: #ef4444;

  /* Inputs */
  --input-bg: var(--bg-white);
  --input-fg: var(--text-primary);
  --input-border: var(--border);
  --input-focus-border: #c2607a;

  /* Chat */
  --chat-user-bg: #c2607a;
  --chat-user-fg: #fff;
  --chat-code-bg: #2e1a22;
  --chat-code-fg: #ddd0d5;
}

/* ── Dark Mode ── */
[data-special="sakura"][data-mode="dark"] {
  --bg-page: #1a1418;
  --bg-white: #241c22;
  --bg-light: #2c222a;
  --bg-hover: #362a32;
  --bg-card-header: #281e26;
  --bg-surface: #2c222a;
  --bg-panel: #241c22;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #3d2e36;

  --light-blue: #e88aa4;
  --btn-blue: #d47890;
  --btn-blue-hover: #c06880;
  --orange: #e88aa4;
  --orange-hover: #d47890;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.3);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(232,138,164,0.25);
  --overlay-bg: rgba(10,5,8,0.7);

  /* Component tokens (sakura-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.07);
  --code-fg: #dcd4ca;
  --canvas-dot: #3d2e36;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(232,138,164,0.12);
  --table-band-odd-sel: rgba(232,138,164,0.15);
  --table-row-sel: rgba(232,138,164,0.1);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(232,138,164,0.1);
  --cal-today-hover: rgba(232,138,164,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(232,138,164,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(232,138,164,0.12);
  --gantt-grid: #3d2e36;
  --or-group-bg: rgba(212,120,144,0.06);
  --or-group-hover: rgba(212,120,144,0.12);
  --or-group-sel: rgba(212,120,144,0.18);
  --or-type-badge-bg: rgba(212,120,144,0.12);
  --or-type-badge-fg: #f4b8cc;
  --or-type-badge-border: #d47890;
  --badge-ok-bg: rgba(74,222,128,0.12);
  --badge-ok-fg: #6ee7b7;
  --badge-warn-bg: rgba(251,191,36,0.12);
  --badge-warn-fg: #fcd34d;
  --badge-err-bg: rgba(248,113,113,0.1);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(232,138,164,0.08);
  --hint-fg: #f4b8cc;
  --hint-border: #d47890;
  --hint-bottleneck-bg: rgba(248,113,113,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: rgba(232,138,164,0.08);
  --hint-info-fg: #f4b8cc;
  --hint-info-border: #e88aa4;
  --chat-system-bg: rgba(232,138,164,0.1);
  --chat-system-fg: #f4b8cc;
  --chip-bg: rgba(232,138,164,0.12);
  --chip-fg: #f4b8cc;
  --sched-status-done-bg: rgba(74,222,128,0.1);
  --sched-status-done-fg: #6ee7b7;
  --sched-status-prog-bg: rgba(232,138,164,0.1);
  --sched-status-prog-fg: #f4b8cc;
  --sched-status-btn-bg: rgba(248,113,113,0.1);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(232,138,164,0.1);
  --sched-badge-yes-fg: #f4b8cc;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(74,222,128,0.1);
  --sched-risk-green-fg: #6ee7b7;
  --sched-risk-amber-bg: rgba(251,191,36,0.1);
  --sched-risk-amber-fg: #fcd34d;
  --sched-risk-red-bg: rgba(248,113,113,0.1);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(74,222,128,0.08);
  --chat-action-border: rgba(74,222,128,0.18);
  --chat-action-fg: #6ee7b7;
  --chat-action-err-bg: rgba(248,113,113,0.08);
  --chat-action-err-border: rgba(248,113,113,0.18);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(232,138,164,0.08);
  --chat-action-pend-border: rgba(232,138,164,0.18);
  --chat-action-pend-fg: #f4b8cc;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #e88aa4;
  --kanban-scope-fg: #e88aa4;
  --kanban-scope-bg: rgba(232,138,164,0.12);
  --tab-objectives-fg: #e88aa4;
  --tab-objectives-border: #d47890;
  --tab-plan-fg: #e88aa4;
  --tab-plan-border: #d47890;
  --tab-schedule-fg: #e88aa4;
  --tab-schedule-border: #d47890;
  --node-task-header: #38282e;

  /* Toolbar */
  --toolbar-bg: #1a1418;
  --toolbar-fg: #ddd0d5;
  --toolbar-border: #3d2e36;
  --toolbar-muted: #6e5a62;
  --toolbar-link: #e88aa4;
  --toolbar-link-hover: #ddd0d5;
  --toolbar-btn-bg: rgba(232,138,164,0.1);
  --toolbar-btn-bg-hover: rgba(232,138,164,0.18);
  --toolbar-btn-border: rgba(232,138,164,0.2);
  --toolbar-icon-fg: #e88aa4;
  --toolbar-icon-fg-hover: #ddd0d5;

  /* Canvas edges */
  --edge-default: #6e5a62;
  --edge-seq: #4ade80;
  --edge-or: #fbbf24;
  --edge-preview: #3d2e36;
  --edge-delete-bg: #241c22;

  /* Canvas nodes */
  --node-text: #fff;
  --node-port-seq: #4ade80;
  --node-port-seq-stroke: #16a34a;
  --node-port-or: #fbbf24;
  --node-port-or-stroke: #d97706;
  --node-bottleneck: #f87171;
  --node-progress-track: #3d2e36;
  --node-progress-fill: #d47890;
  --node-success-badge: #4ade80;
  --node-info-badge: #d47890;

  /* Gantt bars */
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #6e5a62;
  --gantt-bar-normal: #4ade80;
  --gantt-bar-bottleneck: #f87171;
  --gantt-bar-text: #fff;

  /* Histogram */
  --hist-bar: #60a5fa;
  --hist-bar-duration: #60a5fa;
  --hist-p10: #4ade80;
  --hist-p50: #fbbf24;
  --hist-p90: #f87171;

  /* Inputs */
  --input-bg: #2c222a;
  --input-fg: #ddd0d5;
  --input-border: #3d2e36;
  --input-focus-border: #d47890;

  /* Chat */
  --chat-user-bg: #d47890;
  --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.07);
  --chat-code-fg: #ddd0d5;
}

/* ================================================================
   Harvest Theme — Autumn warmth, cozy productivity
   Burnt orange, deep burgundy, golden yellow.
   Rich and saturated on warm cream (light) or dark espresso (dark).
   ================================================================ */

/* ── Light Mode ── */
[data-special="harvest"] {
  --bg-page: #f6efe4;
  --bg-white: #fdf8f1;
  --bg-light: #f0e6d8;
  --bg-hover: #e6d9c6;
  --bg-card-header: #f7f0e6;
  --bg-surface: #f0e6d8;
  --bg-panel: #fdf8f1;
  --text-primary: #3b2316;
  --text-secondary: #7a5c48;
  --text-tertiary: #8e7a66;
  --text-muted: #836952;
  --border: #d4c0a8;

  --light-blue: #c4520a;
  --btn-blue: #8b1a2b;
  --btn-blue-hover: #721524;
  --orange: #d4650e;
  --orange-hover: #b8570a;

  --shadow-sm: 0 1px 4px rgba(90,40,20,0.08), 0 1px 2px rgba(90,40,20,0.06);
  --shadow-md: 0 4px 14px rgba(90,40,20,0.1), 0 2px 4px rgba(90,40,20,0.06);
  --shadow-lg: 0 8px 24px rgba(90,40,20,0.12);
  --shadow-modal: 0 20px 60px rgba(60,20,10,0.18), 0 4px 16px rgba(60,20,10,0.1);

  --error-red: #dc2626;
  --success-green: #16a34a;
  --warning-amber: #d97706;

  --focus-ring: 0 0 0 3px rgba(196,82,10,0.3);
  --overlay-bg: rgba(50,20,10,0.45);

  /* Component tokens (harvest-light) */
  --text-heading: #2c1508;
  --code-bg: #e6d9c6;
  --code-fg: inherit;
  --canvas-dot: #c8b498;
  --table-band-even: #fdf8f1;
  --table-band-odd: #f0e6d8;
  --table-band-even-hover: #e6d9c6;
  --table-band-odd-hover: #ddd0bb;
  --table-band-even-sel: #f5d8b8;
  --table-band-odd-sel: #edccaa;
  --table-row-sel: #f5d8b8;
  --cal-hover: #e6d9c6;
  --cal-today: #fae0b8;
  --cal-today-hover: #f2d4a0;
  --cal-weekend: #f0e6d8;
  --cal-weekend-hover: #e6d9c6;
  --cal-selected: #f2d4a0;
  --cal-pill-mix-base: #fdf8f1;
  --scenario-active-bg: #fae0b8;
  --gantt-grid: #d4c0a8;
  --or-group-bg: #fef0d8;
  --or-group-hover: #fde6c0;
  --or-group-sel: #fcd8a0;
  --or-type-badge-bg: #fde6c0;
  --or-type-badge-fg: #7c3600;
  --or-type-badge-border: #c4520a;
  --badge-ok-bg: #d1fae5;
  --badge-ok-fg: #065f46;
  --badge-warn-bg: #fef3c7;
  --badge-warn-fg: #92400e;
  --badge-err-bg: #fee2e2;
  --badge-err-fg: #991b1b;
  --hint-bg: #fef0d8;
  --hint-fg: #7c3600;
  --hint-border: #c4520a;
  --hint-bottleneck-bg: #fee2e2;
  --hint-bottleneck-fg: #991b1b;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #f5d8b8;
  --hint-info-fg: #7c3600;
  --hint-info-border: #c4520a;
  --chat-system-bg: #fef0d8;
  --chat-system-fg: #7c3600;
  --chip-bg: #f5d8b8;
  --chip-fg: #7c3600;
  --sched-status-done-bg: #d1fae5;
  --sched-status-done-fg: #065f46;
  --sched-status-prog-bg: #fae0b8;
  --sched-status-prog-fg: #7c3600;
  --sched-status-btn-bg: #fee2e2;
  --sched-status-btn-fg: #991b1b;
  --sched-badge-yes-bg: #f5d8b8;
  --sched-badge-yes-fg: #7c3600;
  --sched-badge-no-bg: #f0e6d8;
  --sched-badge-no-fg: #6b7280;
  --sched-risk-green-bg: #d1fae5;
  --sched-risk-green-fg: #065f46;
  --sched-risk-amber-bg: #fef3c7;
  --sched-risk-amber-fg: #92400e;
  --sched-risk-red-bg: #fee2e2;
  --sched-risk-red-fg: #991b1b;
  --sched-dep-fg: #3b2316;
  --chat-action-bg: #e0f8ea;
  --chat-action-border: #a7f3d0;
  --chat-action-fg: #065f46;
  --chat-action-err-bg: #fee2e2;
  --chat-action-err-border: #fecaca;
  --chat-action-err-fg: #991b1b;
  --chat-action-pend-bg: #fae0b8;
  --chat-action-pend-border: #e0c070;
  --chat-action-pend-fg: #7c3600;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #c4520a;
  --kanban-scope-fg: #c4520a;
  --kanban-scope-bg: rgba(196,82,10,0.08);
  --tab-objectives-fg: #c4520a;
  --tab-objectives-border: #8b1a2b;
  --tab-plan-fg: #c4520a;
  --tab-plan-border: #8b1a2b;
  --tab-schedule-fg: #c4520a;
  --tab-schedule-border: #8b1a2b;
  --node-task-header: #2c1508;

  --toolbar-bg: #3b2316; --toolbar-fg: #fdf8f1; --toolbar-border: rgba(255,255,255,0.08);
  --toolbar-muted: rgba(253,248,241,0.4); --toolbar-link: #c9a882; --toolbar-link-hover: #fdf8f1;
  --toolbar-btn-bg: rgba(255,255,255,0.08); --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1); --toolbar-icon-fg: rgba(253,248,241,0.65); --toolbar-icon-fg-hover: #fdf8f1;
  --edge-default: #9a8070; --edge-seq: #16a34a; --edge-or: #c4520a; --edge-preview: #9a8070; --edge-delete-bg: #3b2316;
  --node-text: #fff; --node-port-seq: #16a34a; --node-port-seq-stroke: #0d7a30;
  --node-port-or: #c4520a; --node-port-or-stroke: #a34008;
  --node-bottleneck: #ef4444; --node-progress-track: #d9c8b4; --node-progress-fill: #8b1a2b;
  --node-success-badge: #22c55e; --node-info-badge: #8b1a2b;
  --gantt-seg-1: #16a34a; --gantt-seg-2: #8b1a2b; --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #c4520a; --gantt-seg-5: #ef4444; --gantt-seg-6: #0891b2; --gantt-seg-7: #c026d3;
  --gantt-bar-done: #8a7a68; --gantt-bar-normal: #16a34a; --gantt-bar-bottleneck: #ef4444; --gantt-bar-text: #fff;
  --hist-bar: #1e56a0; --hist-bar-duration: #1e56a0; --hist-p10: #22c55e; --hist-p50: #c4520a; --hist-p90: #ef4444;
  --input-bg: var(--bg-white); --input-fg: var(--text-primary); --input-border: var(--border); --input-focus-border: #8b1a2b;
  --chat-user-bg: #8b1a2b; --chat-user-fg: #fff;
  --chat-code-bg: #3b2316; --chat-code-fg: #f0dcc8;
}

/* ── Dark Mode ── */
[data-special="harvest"][data-mode="dark"] {
  --bg-page: #1c1410;
  --bg-white: #261c14;
  --bg-light: #30241a;
  --bg-hover: #3a2c20;
  --bg-card-header: #2c2218;
  --bg-surface: #30241a;
  --bg-panel: #261c14;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #423226;

  --light-blue: #e07030;
  --btn-blue: #c43050;
  --btn-blue-hover: #a82844;
  --orange: #e87838;
  --orange-hover: #d06830;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.3);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(224,112,48,0.25);
  --overlay-bg: rgba(10,6,4,0.7);

  /* Component tokens (harvest-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.07);
  --code-fg: #dcd4ca;
  --canvas-dot: #423226;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(224,112,48,0.12);
  --table-band-odd-sel: rgba(224,112,48,0.15);
  --table-row-sel: rgba(224,112,48,0.1);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(224,112,48,0.1);
  --cal-today-hover: rgba(224,112,48,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(224,112,48,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(224,112,48,0.12);
  --gantt-grid: #423226;
  --or-group-bg: rgba(232,120,56,0.06);
  --or-group-hover: rgba(232,120,56,0.12);
  --or-group-sel: rgba(232,120,56,0.18);
  --or-type-badge-bg: rgba(232,120,56,0.12);
  --or-type-badge-fg: #fbb87a;
  --or-type-badge-border: #c4520a;
  --badge-ok-bg: rgba(74,222,128,0.12);
  --badge-ok-fg: #6ee7b7;
  --badge-warn-bg: rgba(251,191,36,0.12);
  --badge-warn-fg: #fcd34d;
  --badge-err-bg: rgba(248,113,113,0.1);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(224,112,48,0.08);
  --hint-fg: #fbb87a;
  --hint-border: #c4520a;
  --hint-bottleneck-bg: rgba(248,113,113,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: rgba(224,112,48,0.08);
  --hint-info-fg: #fbb87a;
  --hint-info-border: #e07030;
  --chat-system-bg: rgba(224,112,48,0.1);
  --chat-system-fg: #fbb87a;
  --chip-bg: rgba(224,112,48,0.12);
  --chip-fg: #fbb87a;
  --sched-status-done-bg: rgba(74,222,128,0.1);
  --sched-status-done-fg: #6ee7b7;
  --sched-status-prog-bg: rgba(224,112,48,0.1);
  --sched-status-prog-fg: #fbb87a;
  --sched-status-btn-bg: rgba(248,113,113,0.1);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(224,112,48,0.1);
  --sched-badge-yes-fg: #fbb87a;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(74,222,128,0.1);
  --sched-risk-green-fg: #6ee7b7;
  --sched-risk-amber-bg: rgba(251,191,36,0.1);
  --sched-risk-amber-fg: #fcd34d;
  --sched-risk-red-bg: rgba(248,113,113,0.1);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(74,222,128,0.08);
  --chat-action-border: rgba(74,222,128,0.18);
  --chat-action-fg: #6ee7b7;
  --chat-action-err-bg: rgba(248,113,113,0.08);
  --chat-action-err-border: rgba(248,113,113,0.18);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(224,112,48,0.08);
  --chat-action-pend-border: rgba(224,112,48,0.18);
  --chat-action-pend-fg: #fbb87a;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #e07030;
  --kanban-scope-fg: #e07030;
  --kanban-scope-bg: rgba(224,112,48,0.12);
  --tab-objectives-fg: #e07030;
  --tab-objectives-border: #c43050;
  --tab-plan-fg: #e07030;
  --tab-plan-border: #c43050;
  --tab-schedule-fg: #e07030;
  --tab-schedule-border: #c43050;
  --node-task-header: #382818;

  --toolbar-bg: #140e0a; --toolbar-fg: #e0d0c0; --toolbar-border: #362820;
  --toolbar-muted: rgba(224,208,192,0.35); --toolbar-link: #a89078; --toolbar-link-hover: #e0d0c0;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(224,208,192,0.6); --toolbar-icon-fg-hover: #e0d0c0;
  --edge-default: #6a5848; --edge-seq: #4ade80; --edge-or: #e07030; --edge-preview: #5a4838; --edge-delete-bg: #261c14;
  --node-text: #fff; --node-port-seq: #4ade80; --node-port-seq-stroke: #22c55e;
  --node-port-or: #e07030; --node-port-or-stroke: #c45818;
  --node-bottleneck: #f87171; --node-progress-track: #362820; --node-progress-fill: #c43050;
  --node-success-badge: #4ade80; --node-info-badge: #c43050;
  --gantt-seg-1: #4ade80; --gantt-seg-2: #c43050; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #e07030; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #6a5848; --gantt-bar-normal: #4ade80; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #5a9ae0; --hist-bar-duration: #5a9ae0; --hist-p10: #4ade80; --hist-p50: #e07030; --hist-p90: #f87171;
  --input-bg: #261c14; --input-fg: #e0d0c0; --input-border: #362820; --input-focus-border: #c43050;
  --chat-user-bg: #c43050; --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.07); --chat-code-fg: #e0d0c0;
}

/* ================================================================
   Cyberpunk — Special Theme Fragment
   Bold, electric, high-energy, futuristic.
   Hot magenta and electric cyan on deep black.
   Harsh neon accent borders, high saturation.
   ================================================================ */

/* ── Light mode: vivid magenta/cyan accents on white ── */
[data-special="cyberpunk"] {
  /* Core surfaces — white/light gray with faint magenta tint */
  --bg-page: #f0ecf2;
  --bg-white: #faf7fc;
  --bg-light: #e8e4ea;
  --bg-hover: #e8e0ed;
  --bg-card-header: #f4f0f7;
  --bg-surface: #f3eff6;
  --bg-panel: #faf7fc;

  /* Text — deep dark with cool undertone */
  --text-primary: #1a0e24;
  --text-secondary: #5c4570;
  --text-tertiary: #7a6390;
  --text-muted: #6d5582;

  /* Border — magenta tint */
  --border: #d4b8e0;

  /* Brand — hot magenta / electric cyan */
  --light-blue: #06b6d4;
  --btn-blue: #d946ef;
  --btn-blue-hover: #c026d3;
  --orange: #06b6d4;
  --orange-hover: #0891b2;

  /* Shadows — magenta-tinted */
  --shadow-sm: 0 1px 3px rgba(217,70,239,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(217,70,239,0.10), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(217,70,239,0.12);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.15), 0 4px 16px rgba(217,70,239,0.12);

  /* Status */
  --error-red: #dc2626;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  /* Focus / overlay */
  --focus-ring: 0 0 0 3px rgba(217,70,239,0.25);
  --overlay-bg: rgba(26,14,36,0.50);

  /* Component tokens */
  --text-heading: #12081c;
  --code-bg: #ede0f4;
  --code-fg: #1a0e24;
  --canvas-dot: #c4a8d4;
  --table-band-even: #faf7fc;
  --table-band-odd: #f3eff6;
  --table-band-even-hover: #e8e0ed;
  --table-band-odd-hover: #dfd4e8;
  --table-band-even-sel: #f0d8fa;
  --table-band-odd-sel: #e8ccf4;
  --table-row-sel: #f0d8fa;
  --cal-hover: #f0e4f6;
  --cal-today: #f0d8fa;
  --cal-today-hover: #e4c0f2;
  --cal-weekend: #f5f0f8;
  --cal-weekend-hover: #f0e4f6;
  --cal-selected: #e4c0f2;
  --cal-pill-mix-base: #faf7fc;
  --scenario-active-bg: #e4f0fa;
  --gantt-grid: #d4b8e0;
  --or-group-bg: #fef3ff;
  --or-group-hover: #fde6ff;
  --or-group-sel: #fad4ff;
  --or-type-badge-bg: #e0f8fc;
  --or-type-badge-fg: #155e75;
  --or-type-badge-border: #06b6d4;
  --badge-ok-bg: #dcfce7;
  --badge-ok-fg: #14532d;
  --badge-warn-bg: #fef9c3;
  --badge-warn-fg: #854d0e;
  --badge-err-bg: #fef2f2;
  --badge-err-fg: #991b1b;
  --hint-bg: #f0e0fa;
  --hint-fg: #6b21a8;
  --hint-border: #d946ef;
  --hint-bottleneck-bg: #fee2e2;
  --hint-bottleneck-fg: #991b1b;
  --hint-bottleneck-border: #dc2626;
  --hint-info-bg: #e0f8fc;
  --hint-info-fg: #155e75;
  --hint-info-border: #06b6d4;
  --chat-system-bg: #f0e0fa;
  --chat-system-fg: #6b21a8;
  --chip-bg: #e8d0f4;
  --chip-fg: #6b21a8;
  --sched-status-done-bg: #dcfce7;
  --sched-status-done-fg: #14532d;
  --sched-status-prog-bg: #e0f8fc;
  --sched-status-prog-fg: #155e75;
  --sched-status-btn-bg: #fee2e2;
  --sched-status-btn-fg: #991b1b;
  --sched-badge-yes-bg: #dcfce7;
  --sched-badge-yes-fg: #14532d;
  --sched-badge-no-bg: #f3eff6;
  --sched-badge-no-fg: #6d5582;
  --sched-risk-green-bg: #dcfce7;
  --sched-risk-green-fg: #14532d;
  --sched-risk-amber-bg: #fef9c3;
  --sched-risk-amber-fg: #854d0e;
  --sched-risk-red-bg: #fee2e2;
  --sched-risk-red-fg: #991b1b;
  --sched-dep-fg: #3a2848;
  --chat-action-bg: #f0e0fa;
  --chat-action-border: #d8b4f0;
  --chat-action-fg: #6b21a8;
  --chat-action-err-bg: #fef2f2;
  --chat-action-err-border: #fecaca;
  --chat-action-err-fg: #991b1b;
  --chat-action-pend-bg: #e0f8fc;
  --chat-action-pend-border: #a5f3fc;
  --chat-action-pend-fg: #155e75;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #06b6d4;
  --kanban-scope-fg: #06b6d4;
  --kanban-scope-bg: rgba(6,182,212,0.08);
  --tab-objectives-fg: #06b6d4;
  --tab-objectives-border: #d946ef;
  --tab-plan-fg: #06b6d4;
  --tab-plan-border: #d946ef;
  --tab-schedule-fg: #06b6d4;
  --tab-schedule-border: #d946ef;
  --node-task-header: #12081c;

  --toolbar-bg: #1a0a24; --toolbar-fg: #f8f0fc; --toolbar-border: rgba(255,255,255,0.08);
  --toolbar-muted: rgba(248,240,252,0.4); --toolbar-link: #c080e0; --toolbar-link-hover: #f8f0fc;
  --toolbar-btn-bg: rgba(255,255,255,0.08); --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1); --toolbar-icon-fg: rgba(248,240,252,0.65); --toolbar-icon-fg-hover: #f8f0fc;
  --edge-default: #9080a0; --edge-seq: #06b6d4; --edge-or: #d946ef; --edge-preview: #9080a0; --edge-delete-bg: #1a0a24;
  --node-text: #fff; --node-port-seq: #06b6d4; --node-port-seq-stroke: #0891b2;
  --node-port-or: #d946ef; --node-port-or-stroke: #c026d3;
  --node-bottleneck: #ef4444; --node-progress-track: #d8d0e0; --node-progress-fill: #d946ef;
  --node-success-badge: #22d3ee; --node-info-badge: #d946ef;
  --gantt-seg-1: #06b6d4; --gantt-seg-2: #d946ef; --gantt-seg-3: #8b5cf6;
  --gantt-seg-4: #f59e0b; --gantt-seg-5: #ef4444; --gantt-seg-6: #4ade80; --gantt-seg-7: #ec4899;
  --gantt-bar-done: #8a7a9a; --gantt-bar-normal: #06b6d4; --gantt-bar-bottleneck: #ef4444; --gantt-bar-text: #fff;
  --hist-bar: #d946ef; --hist-bar-duration: #d946ef; --hist-p10: #22d3ee; --hist-p50: #f59e0b; --hist-p90: #ef4444;
  --input-bg: var(--bg-white); --input-fg: var(--text-primary); --input-border: var(--border); --input-focus-border: #d946ef;
  --chat-user-bg: #d946ef; --chat-user-fg: #fff;
  --chat-code-bg: #1a0a24; --chat-code-fg: #e8d8f0;
}

/* ── Dark mode: classic cyberpunk dark ── */
[data-special="cyberpunk"][data-mode="dark"] {
  /* Core surfaces — deep black with faint magenta undertone */
  --bg-page: #0a0610;
  --bg-white: #110c18;
  --bg-light: #1e1630;
  --bg-hover: #221a2e;
  --bg-card-header: #181024;
  --bg-surface: #16101f;
  --bg-panel: #110c18;

  /* Text — bright neon-touched palette */
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;

  /* Border — neon magenta edge */
  --border: #2e1a40;

  /* Brand — hot magenta / electric cyan */
  --light-blue: #22d3ee;
  --btn-blue: #e879f9;
  --btn-blue-hover: #d946ef;
  --orange: #22d3ee;
  --orange-hover: #06b6d4;

  /* Shadows — neon magenta glow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35), 0 0 6px rgba(217,70,239,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45), 0 0 10px rgba(217,70,239,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.55), 0 0 20px rgba(217,70,239,0.08);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.65), 0 0 40px rgba(217,70,239,0.10);

  /* Status — bright pastels */
  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  /* Focus / overlay */
  --focus-ring: 0 0 0 3px rgba(232,121,249,0.30);
  --overlay-bg: rgba(0,0,0,0.70);

  /* Component tokens */
  --text-heading: #ece6de;
  --code-bg: rgba(217,70,239,0.10);
  --code-fg: #dcd4ca;
  --canvas-dot: #2e1a40;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(232,121,249,0.10);
  --table-band-odd-sel: rgba(232,121,249,0.14);
  --table-row-sel: rgba(232,121,249,0.08);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(232,121,249,0.12);
  --cal-today-hover: rgba(232,121,249,0.20);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(232,121,249,0.18);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(34,211,238,0.10);
  --gantt-grid: #2e1a40;
  --or-group-bg: rgba(34,211,238,0.08);
  --or-group-hover: rgba(34,211,238,0.14);
  --or-group-sel: rgba(34,211,238,0.22);
  --or-type-badge-bg: rgba(34,211,238,0.12);
  --or-type-badge-fg: #67e8f9;
  --or-type-badge-border: #0891b2;
  --badge-ok-bg: rgba(74,222,128,0.12);
  --badge-ok-fg: #86efac;
  --badge-warn-bg: rgba(251,191,36,0.12);
  --badge-warn-fg: #fde047;
  --badge-err-bg: rgba(248,113,113,0.12);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(232,121,249,0.08);
  --hint-fg: #e879f9;
  --hint-border: #d946ef;
  --hint-bottleneck-bg: rgba(248,113,113,0.10);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: rgba(34,211,238,0.08);
  --hint-info-fg: #67e8f9;
  --hint-info-border: #06b6d4;
  --chat-system-bg: rgba(232,121,249,0.10);
  --chat-system-fg: #e879f9;
  --chip-bg: rgba(232,121,249,0.14);
  --chip-fg: #e879f9;
  --sched-status-done-bg: rgba(74,222,128,0.12);
  --sched-status-done-fg: #86efac;
  --sched-status-prog-bg: rgba(34,211,238,0.10);
  --sched-status-prog-fg: #67e8f9;
  --sched-status-btn-bg: rgba(248,113,113,0.12);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(74,222,128,0.12);
  --sched-badge-yes-fg: #86efac;
  --sched-badge-no-bg: rgba(255,255,255,0.06);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(74,222,128,0.12);
  --sched-risk-green-fg: #86efac;
  --sched-risk-amber-bg: rgba(251,191,36,0.12);
  --sched-risk-amber-fg: #fde047;
  --sched-risk-red-bg: rgba(248,113,113,0.12);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(232,121,249,0.08);
  --chat-action-border: rgba(232,121,249,0.20);
  --chat-action-fg: #e879f9;
  --chat-action-err-bg: rgba(248,113,113,0.08);
  --chat-action-err-border: rgba(248,113,113,0.20);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(34,211,238,0.08);
  --chat-action-pend-border: rgba(34,211,238,0.20);
  --chat-action-pend-fg: #67e8f9;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #22d3ee;
  --kanban-scope-fg: #22d3ee;
  --kanban-scope-bg: rgba(34,211,238,0.12);
  --tab-objectives-fg: #22d3ee;
  --tab-objectives-border: #e879f9;
  --tab-plan-fg: #22d3ee;
  --tab-plan-border: #e879f9;
  --tab-schedule-fg: #22d3ee;
  --tab-schedule-border: #e879f9;
  --node-task-header: #1e1430;

  --toolbar-bg: #050310; --toolbar-fg: #e8d8f0; --toolbar-border: #200e30;
  --toolbar-muted: rgba(232,216,240,0.35); --toolbar-link: #a060c0; --toolbar-link-hover: #e8d8f0;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(232,216,240,0.6); --toolbar-icon-fg-hover: #e8d8f0;
  --edge-default: #5a3870; --edge-seq: #22d3ee; --edge-or: #e879f9; --edge-preview: #4a2860; --edge-delete-bg: #110c18;
  --node-text: #fff; --node-port-seq: #22d3ee; --node-port-seq-stroke: #06b6d4;
  --node-port-or: #e879f9; --node-port-or-stroke: #d946ef;
  --node-bottleneck: #f87171; --node-progress-track: #200e30; --node-progress-fill: #e879f9;
  --node-success-badge: #67e8f9; --node-info-badge: #e879f9;
  --gantt-seg-1: #22d3ee; --gantt-seg-2: #e879f9; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #4ade80; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #5a3870; --gantt-bar-normal: #22d3ee; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #e879f9; --hist-bar-duration: #e879f9; --hist-p10: #67e8f9; --hist-p50: #fbbf24; --hist-p90: #f87171;
  --input-bg: #110c18; --input-fg: #e8d8f0; --input-border: #200e30; --input-focus-border: #e879f9;
  --chat-user-bg: #d946ef; --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.06); --chat-code-fg: #e8d8f0;
}
/* ================================================================
   Greenhouse Theme — Growth-oriented, alive, organic
   Lush greens (forest, mint, sage) with earthy brown anchors.
   Sun-dappled cream (light) or deep forest floor (dark).
   ================================================================ */

/* ── Light Mode ── */
[data-special="greenhouse"] {
  --bg-page: #f2f5ec;
  --bg-white: #fafcf6;
  --bg-light: #e8ede0;
  --bg-hover: #dce4d0;
  --bg-card-header: #f2f6ec;
  --bg-surface: #e8ede0;
  --bg-panel: #fafcf6;
  --text-primary: #1a2e14;
  --text-secondary: #4a6840;
  --text-tertiary: #648058;
  --text-muted: #5a7250;
  --border: #bccaae;

  --light-blue: #2d7a3e;
  --btn-blue: #1b6b2e;
  --btn-blue-hover: #155a24;
  --orange: #7a5c2e;
  --orange-hover: #644a22;

  --shadow-sm: 0 1px 4px rgba(30,60,20,0.08), 0 1px 2px rgba(30,60,20,0.06);
  --shadow-md: 0 4px 14px rgba(30,60,20,0.1), 0 2px 4px rgba(30,60,20,0.06);
  --shadow-lg: 0 8px 24px rgba(30,60,20,0.12);
  --shadow-modal: 0 20px 60px rgba(20,40,10,0.18), 0 4px 16px rgba(20,40,10,0.1);

  --error-red: #dc2626;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  --focus-ring: 0 0 0 3px rgba(45,122,62,0.3);
  --overlay-bg: rgba(20,40,10,0.45);

  /* Component tokens (greenhouse-light) */
  --text-heading: #122810;
  --code-bg: #dce4d0;
  --code-fg: inherit;
  --canvas-dot: #b0be9e;
  --table-band-even: #fafcf6;
  --table-band-odd: #e8ede0;
  --table-band-even-hover: #dce4d0;
  --table-band-odd-hover: #d0dac2;
  --table-band-even-sel: #c6e4b8;
  --table-band-odd-sel: #b8d8a8;
  --table-row-sel: #c6e4b8;
  --cal-hover: #dce4d0;
  --cal-today: #c6e8c0;
  --cal-today-hover: #b2dca8;
  --cal-weekend: #e8ede0;
  --cal-weekend-hover: #dce4d0;
  --cal-selected: #b2dca8;
  --cal-pill-mix-base: #fafcf6;
  --scenario-active-bg: #c6e8c0;
  --gantt-grid: #bccaae;
  --or-group-bg: #daf0d0;
  --or-group-hover: #c8e8b8;
  --or-group-sel: #b0dc9c;
  --or-type-badge-bg: #c8e8b8;
  --or-type-badge-fg: #1a4a10;
  --or-type-badge-border: #2d7a3e;
  --badge-ok-bg: #d1fae5;
  --badge-ok-fg: #065f46;
  --badge-warn-bg: #fef3c7;
  --badge-warn-fg: #92400e;
  --badge-err-bg: #fee2e2;
  --badge-err-fg: #991b1b;
  --hint-bg: #daf0d0;
  --hint-fg: #1a4a10;
  --hint-border: #2d7a3e;
  --hint-bottleneck-bg: #fee2e2;
  --hint-bottleneck-fg: #991b1b;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #c6e8c0;
  --hint-info-fg: #1a4a10;
  --hint-info-border: #2d7a3e;
  --chat-system-bg: #daf0d0;
  --chat-system-fg: #1a4a10;
  --chip-bg: #c6e8c0;
  --chip-fg: #1a4a10;
  --sched-status-done-bg: #d1fae5;
  --sched-status-done-fg: #065f46;
  --sched-status-prog-bg: #c6e8c0;
  --sched-status-prog-fg: #1a4a10;
  --sched-status-btn-bg: #fee2e2;
  --sched-status-btn-fg: #991b1b;
  --sched-badge-yes-bg: #c6e8c0;
  --sched-badge-yes-fg: #1a4a10;
  --sched-badge-no-bg: #e8ede0;
  --sched-badge-no-fg: #6b7280;
  --sched-risk-green-bg: #d1fae5;
  --sched-risk-green-fg: #065f46;
  --sched-risk-amber-bg: #fef3c7;
  --sched-risk-amber-fg: #92400e;
  --sched-risk-red-bg: #fee2e2;
  --sched-risk-red-fg: #991b1b;
  --sched-dep-fg: #1a2e14;
  --chat-action-bg: #d8f5e0;
  --chat-action-border: #a0e8b8;
  --chat-action-fg: #065f46;
  --chat-action-err-bg: #fee2e2;
  --chat-action-err-border: #fecaca;
  --chat-action-err-fg: #991b1b;
  --chat-action-pend-bg: #f0eacc;
  --chat-action-pend-border: #d4c890;
  --chat-action-pend-fg: #6b5020;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #2d7a3e;
  --kanban-scope-fg: #2d7a3e;
  --kanban-scope-bg: rgba(45,122,62,0.08);
  --tab-objectives-fg: #2d7a3e;
  --tab-objectives-border: #1b6b2e;
  --tab-plan-fg: #2d7a3e;
  --tab-plan-border: #1b6b2e;
  --tab-schedule-fg: #2d7a3e;
  --tab-schedule-border: #1b6b2e;
  --node-task-header: #122810;

  --toolbar-bg: #0e2810; --toolbar-fg: #f0f5ec; --toolbar-border: rgba(255,255,255,0.08);
  --toolbar-muted: rgba(240,245,236,0.4); --toolbar-link: #80b080; --toolbar-link-hover: #f0f5ec;
  --toolbar-btn-bg: rgba(255,255,255,0.08); --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1); --toolbar-icon-fg: rgba(240,245,236,0.65); --toolbar-icon-fg-hover: #f0f5ec;
  --edge-default: #7a9a70; --edge-seq: #16a34a; --edge-or: #f59e0b; --edge-preview: #7a9a70; --edge-delete-bg: #0e2810;
  --node-text: #fff; --node-port-seq: #16a34a; --node-port-seq-stroke: #145420;
  --node-port-or: #f59e0b; --node-port-or-stroke: #d97706;
  --node-bottleneck: #ef4444; --node-progress-track: #bccaae; --node-progress-fill: #16a34a;
  --node-success-badge: #22c55e; --node-info-badge: #16a34a;
  --gantt-seg-1: #16a34a; --gantt-seg-2: #3b82f6; --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #f59e0b; --gantt-seg-5: #ef4444; --gantt-seg-6: #0891b2; --gantt-seg-7: #c026d3;
  --gantt-bar-done: #7a9a70; --gantt-bar-normal: #16a34a; --gantt-bar-bottleneck: #ef4444; --gantt-bar-text: #fff;
  --hist-bar: #16a34a; --hist-bar-duration: #16a34a; --hist-p10: #06b6d4; --hist-p50: #f59e0b; --hist-p90: #ef4444;
  --input-bg: var(--bg-white); --input-fg: var(--text-primary); --input-border: var(--border); --input-focus-border: #16a34a;
  --chat-user-bg: #16a34a; --chat-user-fg: #fff;
  --chat-code-bg: #0e2810; --chat-code-fg: #d0e4c8;
}

/* ── Dark Mode ── */
[data-special="greenhouse"][data-mode="dark"] {
  --bg-page: #0e1a0c;
  --bg-white: #162212;
  --bg-light: #1e2e18;
  --bg-hover: #28381e;
  --bg-card-header: #1c2816;
  --bg-surface: #1e2e18;
  --bg-panel: #162212;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #324828;

  --light-blue: #48c060;
  --btn-blue: #38a850;
  --btn-blue-hover: #2e9044;
  --orange: #c0a060;
  --orange-hover: #a88848;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.3);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(72,192,96,0.25);
  --overlay-bg: rgba(6,12,4,0.7);

  /* Component tokens (greenhouse-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.07);
  --code-fg: #dcd4ca;
  --canvas-dot: #324828;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(72,192,96,0.12);
  --table-band-odd-sel: rgba(72,192,96,0.15);
  --table-row-sel: rgba(72,192,96,0.1);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(72,192,96,0.1);
  --cal-today-hover: rgba(72,192,96,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(72,192,96,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(72,192,96,0.12);
  --gantt-grid: #324828;
  --or-group-bg: rgba(72,192,96,0.06);
  --or-group-hover: rgba(72,192,96,0.12);
  --or-group-sel: rgba(72,192,96,0.18);
  --or-type-badge-bg: rgba(72,192,96,0.12);
  --or-type-badge-fg: #88e8a0;
  --or-type-badge-border: #38a850;
  --badge-ok-bg: rgba(74,222,128,0.12);
  --badge-ok-fg: #6ee7b7;
  --badge-warn-bg: rgba(251,191,36,0.12);
  --badge-warn-fg: #fcd34d;
  --badge-err-bg: rgba(248,113,113,0.1);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(72,192,96,0.08);
  --hint-fg: #88e8a0;
  --hint-border: #38a850;
  --hint-bottleneck-bg: rgba(248,113,113,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: rgba(72,192,96,0.08);
  --hint-info-fg: #88e8a0;
  --hint-info-border: #48c060;
  --chat-system-bg: rgba(72,192,96,0.1);
  --chat-system-fg: #88e8a0;
  --chip-bg: rgba(72,192,96,0.12);
  --chip-fg: #88e8a0;
  --sched-status-done-bg: rgba(74,222,128,0.1);
  --sched-status-done-fg: #6ee7b7;
  --sched-status-prog-bg: rgba(72,192,96,0.1);
  --sched-status-prog-fg: #88e8a0;
  --sched-status-btn-bg: rgba(248,113,113,0.1);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(72,192,96,0.1);
  --sched-badge-yes-fg: #88e8a0;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(74,222,128,0.1);
  --sched-risk-green-fg: #6ee7b7;
  --sched-risk-amber-bg: rgba(251,191,36,0.1);
  --sched-risk-amber-fg: #fcd34d;
  --sched-risk-red-bg: rgba(248,113,113,0.1);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(74,222,128,0.08);
  --chat-action-border: rgba(74,222,128,0.18);
  --chat-action-fg: #6ee7b7;
  --chat-action-err-bg: rgba(248,113,113,0.08);
  --chat-action-err-border: rgba(248,113,113,0.18);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(192,160,96,0.08);
  --chat-action-pend-border: rgba(192,160,96,0.18);
  --chat-action-pend-fg: #e0cc88;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #48c060;
  --kanban-scope-fg: #48c060;
  --kanban-scope-bg: rgba(72,192,96,0.12);
  --tab-objectives-fg: #48c060;
  --tab-objectives-border: #38a850;
  --tab-plan-fg: #48c060;
  --tab-plan-border: #38a850;
  --tab-schedule-fg: #48c060;
  --tab-schedule-border: #38a850;
  --node-task-header: #1a281a;

  --toolbar-bg: #060e04; --toolbar-fg: #d0e4c8; --toolbar-border: #1a3018;
  --toolbar-muted: rgba(208,228,200,0.35); --toolbar-link: #6aa860; --toolbar-link-hover: #d0e4c8;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(208,228,200,0.6); --toolbar-icon-fg-hover: #d0e4c8;
  --edge-default: #3a5830; --edge-seq: #4ade80; --edge-or: #fbbf24; --edge-preview: #2a4820; --edge-delete-bg: #0e1a0c;
  --node-text: #fff; --node-port-seq: #4ade80; --node-port-seq-stroke: #38a850;
  --node-port-or: #fbbf24; --node-port-or-stroke: #d97706;
  --node-bottleneck: #f87171; --node-progress-track: #1a3018; --node-progress-fill: #4ade80;
  --node-success-badge: #4ade80; --node-info-badge: #4ade80;
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #3a5830; --gantt-bar-normal: #4ade80; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #4ade80; --hist-bar-duration: #4ade80; --hist-p10: #22d3ee; --hist-p50: #fbbf24; --hist-p90: #f87171;
  --input-bg: #0e1a0c; --input-fg: #d0e4c8; --input-border: #1a3018; --input-focus-border: #48c060;
  --chat-user-bg: #38a850; --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.06); --chat-code-fg: #d0e4c8;
}
/* ================================================================
   Monochrome — Zero Visual Noise
   Entirely grayscale, no hue. Hierarchy through weight, size,
   and value contrast only. Single warm tint (#a08050) for
   selection and active states.
   ================================================================ */

/* ── Light Mode ── */
[data-special="monochrome"] {
  /* Core surfaces */
  --bg-page: #f7f7f7;
  --bg-white: #ffffff;
  --bg-light: #f2f2f2;
  --bg-hover: #eaeaea;
  --bg-card-header: #f4f4f4;
  --bg-surface: #f2f2f2;
  --bg-panel: #ffffff;

  /* Text */
  --text-primary: #1a1a1a;
  --text-secondary: #5c5c5c;
  --text-tertiary: #848484;
  --text-muted: #737373;

  /* Border */
  --border: #d0d0d0;

  /* Brand — warm gray accent */
  --light-blue: #8a7a6a;
  --btn-blue: #7a6a58;
  --btn-blue-hover: #6a5a48;
  --orange: #8a7a6a;
  --orange-hover: #7a6a58;

  /* Shadows — minimal, cool neutral */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.07);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-modal: 0 12px 40px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.07);

  /* Status — desaturated but still functional */
  --error-red: #dc3545;
  --success-green: #1a8c48;
  --warning-amber: #e09a10;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(160,128,80,0.22);
  --overlay-bg: rgba(0,0,0,0.32);

  /* Component tokens */
  --text-heading: #0e0e0e;
  --code-bg: #ededed;
  --code-fg: #1a1a1a;
  --canvas-dot: #cccccc;

  /* Table banding */
  --table-band-even: #ffffff;
  --table-band-odd: #f6f6f6;
  --table-band-even-hover: #edededd0;
  --table-band-odd-hover: #e7e7e7;
  --table-band-even-sel: #ece6dc;
  --table-band-odd-sel: #e5dfd5;
  --table-row-sel: #ece6dc;

  /* Calendar */
  --cal-hover: #eaeaea;
  --cal-today: #e8e2d8;
  --cal-today-hover: #ddd6ca;
  --cal-weekend: #f4f4f4;
  --cal-weekend-hover: #eaeaea;
  --cal-selected: #ddd6ca;
  --cal-pill-mix-base: white;

  /* Scenario / Gantt */
  --scenario-active-bg: #e8e2d8;
  --gantt-grid: #d8d8d8;

  /* OR-group */
  --or-group-bg: #f0ede8;
  --or-group-hover: #e8e4de;
  --or-group-sel: #ddd8d0;
  --or-type-badge-bg: #e8e4de;
  --or-type-badge-fg: #6a5e50;
  --or-type-badge-border: #b5aa98;

  /* Badges */
  --badge-ok-bg: #e6ece6;
  --badge-ok-fg: #3a6a3a;
  --badge-warn-bg: #f0ebe0;
  --badge-warn-fg: #6a5828;
  --badge-err-bg: #ede4e4;
  --badge-err-fg: #7a3030;

  /* Hints */
  --hint-bg: #f0ebe0;
  --hint-fg: #6a5828;
  --hint-border: #c0aa78;
  --hint-bottleneck-bg: #ede4e4;
  --hint-bottleneck-fg: #7a3030;
  --hint-bottleneck-border: #a04040;
  --hint-info-bg: #e8e8e8;
  --hint-info-fg: #4a4a4a;
  --hint-info-border: #8a8a8a;

  /* Chat */
  --chat-system-bg: #f0ebe0;
  --chat-system-fg: #6a5828;

  /* Chips */
  --chip-bg: #e8e2d8;
  --chip-fg: #6a5a48;

  /* Schedule status */
  --sched-status-done-bg: #e6ece6;
  --sched-status-done-fg: #3a6a3a;
  --sched-status-prog-bg: #e8e8e8;
  --sched-status-prog-fg: #4a4a4a;
  --sched-status-btn-bg: #ede4e4;
  --sched-status-btn-fg: #7a3030;

  /* Schedule badges */
  --sched-badge-yes-bg: #e8e2d8;
  --sched-badge-yes-fg: #6a5a48;
  --sched-badge-no-bg: #eeeeee;
  --sched-badge-no-fg: #8a8a8a;

  /* Schedule risk */
  --sched-risk-green-bg: #e6ece6;
  --sched-risk-green-fg: #3a6a3a;
  --sched-risk-amber-bg: #f0ebe0;
  --sched-risk-amber-fg: #6a5828;
  --sched-risk-red-bg: #ede4e4;
  --sched-risk-red-fg: #7a3030;

  /* Schedule dependency */
  --sched-dep-fg: #1a1a1a;

  /* Chat actions */
  --chat-action-bg: #e8ece8;
  --chat-action-border: #c0ccc0;
  --chat-action-fg: #3a6a3a;
  --chat-action-err-bg: #ede6e6;
  --chat-action-err-border: #d0c0c0;
  --chat-action-err-fg: #7a3030;
  --chat-action-pend-bg: #eaeaea;
  --chat-action-pend-border: #c8c8c8;
  --chat-action-pend-fg: #5c5c5c;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #8a7a6a;
  --kanban-scope-fg: #8a7a6a;
  --kanban-scope-bg: rgba(138,122,106,0.08);
  --tab-objectives-fg: #8a7a6a;
  --tab-objectives-border: #7a6a58;
  --tab-plan-fg: #8a7a6a;
  --tab-plan-border: #7a6a58;
  --tab-schedule-fg: #8a7a6a;
  --tab-schedule-border: #7a6a58;
  --node-task-header: #0e0e0e;

  --toolbar-bg: #1a1a1a; --toolbar-fg: #f0f0f0; --toolbar-border: rgba(255,255,255,0.06);
  --toolbar-muted: rgba(240,240,240,0.4); --toolbar-link: #a0a0a0; --toolbar-link-hover: #f0f0f0;
  --toolbar-btn-bg: rgba(255,255,255,0.08); --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1); --toolbar-icon-fg: rgba(240,240,240,0.65); --toolbar-icon-fg-hover: #f0f0f0;
  --edge-default: #888; --edge-seq: #16a34a; --edge-or: #b08030; --edge-preview: #999; --edge-delete-bg: #1a1a1a;
  --node-text: #fff; --node-port-seq: #16a34a; --node-port-seq-stroke: #0f7a35;
  --node-port-or: #b08030; --node-port-or-stroke: #8a6420;
  --node-bottleneck: #dc3545; --node-progress-track: #c0c0c0; --node-progress-fill: #b08030;
  --node-success-badge: #16a34a; --node-info-badge: #b08030;
  --gantt-seg-1: #16a34a; --gantt-seg-2: #b08030; --gantt-seg-3: #7c5cc4;
  --gantt-seg-4: #e08520; --gantt-seg-5: #dc3545; --gantt-seg-6: #0d9488; --gantt-seg-7: #b04878;
  --gantt-bar-done: #888; --gantt-bar-normal: #16a34a; --gantt-bar-bottleneck: #dc3545; --gantt-bar-text: #fff;
  --hist-bar: #b08030; --hist-bar-duration: #b08030; --hist-p10: #16a34a; --hist-p50: #e09a10; --hist-p90: #dc3545;
  --input-bg: var(--bg-white); --input-fg: var(--text-primary); --input-border: var(--border); --input-focus-border: #a08050;
  --chat-user-bg: #a08050; --chat-user-fg: #fff;
  --chat-code-bg: #1a1a1a; --chat-code-fg: #d0d0d0;
}

/* ── Dark Mode ── */
[data-special="monochrome"][data-mode="dark"] {
  /* Core surfaces — pure neutral, no hue */
  --bg-page: #111111;
  --bg-white: #1a1a1a;
  --bg-light: #202020;
  --bg-hover: #2a2a2a;
  --bg-card-header: #1e1e1e;
  --bg-surface: #202020;
  --bg-panel: #1a1a1a;

  /* Text */
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;

  /* Border */
  --border: #363636;

  /* Brand — warm gray accent, lifted for dark */
  --light-blue: #b8a888;
  --btn-blue: #a89878;
  --btn-blue-hover: #b8a888;
  --orange: #b8a888;
  --orange-hover: #c8b898;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.28);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.38);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.45);
  --shadow-modal: 0 12px 40px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.38);

  /* Status — desaturated pastels */
  --error-red: #f07070;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(184,168,136,0.25);
  --overlay-bg: rgba(0,0,0,0.58);

  /* Component tokens */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.07);
  --code-fg: #dcd4ca;
  --canvas-dot: #404040;

  /* Table banding */
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(184,168,136,0.10);
  --table-band-odd-sel: rgba(184,168,136,0.14);
  --table-row-sel: rgba(184,168,136,0.08);

  /* Calendar */
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(184,168,136,0.10);
  --cal-today-hover: rgba(184,168,136,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(184,168,136,0.15);
  --cal-pill-mix-base: var(--bg-white);

  /* Scenario / Gantt */
  --scenario-active-bg: rgba(184,168,136,0.10);
  --gantt-grid: #363636;

  /* OR-group */
  --or-group-bg: rgba(184,168,136,0.08);
  --or-group-hover: rgba(184,168,136,0.14);
  --or-group-sel: rgba(184,168,136,0.20);
  --or-type-badge-bg: rgba(184,168,136,0.12);
  --or-type-badge-fg: #c8b898;
  --or-type-badge-border: #8a7a60;

  /* Badges */
  --badge-ok-bg: rgba(128,184,128,0.10);
  --badge-ok-fg: #a0d0a0;
  --badge-warn-bg: rgba(200,168,96,0.10);
  --badge-warn-fg: #d0c080;
  --badge-err-bg: rgba(208,128,128,0.10);
  --badge-err-fg: #d8a8a8;

  /* Hints */
  --hint-bg: rgba(200,168,96,0.10);
  --hint-fg: #d0c080;
  --hint-border: #8a7a50;
  --hint-bottleneck-bg: rgba(208,128,128,0.10);
  --hint-bottleneck-fg: #d8a8a8;
  --hint-bottleneck-border: #a06060;
  --hint-info-bg: rgba(255,255,255,0.06);
  --hint-info-fg: #b0b0b0;
  --hint-info-border: #686868;

  /* Chat */
  --chat-system-bg: rgba(200,168,96,0.10);
  --chat-system-fg: #d0c080;

  /* Chips */
  --chip-bg: rgba(184,168,136,0.12);
  --chip-fg: #c8b898;

  /* Schedule status */
  --sched-status-done-bg: rgba(128,184,128,0.10);
  --sched-status-done-fg: #a0d0a0;
  --sched-status-prog-bg: rgba(255,255,255,0.06);
  --sched-status-prog-fg: #b0b0b0;
  --sched-status-btn-bg: rgba(208,128,128,0.10);
  --sched-status-btn-fg: #d8a8a8;

  /* Schedule badges */
  --sched-badge-yes-bg: rgba(184,168,136,0.12);
  --sched-badge-yes-fg: #c8b898;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);

  /* Schedule risk */
  --sched-risk-green-bg: rgba(128,184,128,0.10);
  --sched-risk-green-fg: #a0d0a0;
  --sched-risk-amber-bg: rgba(200,168,96,0.10);
  --sched-risk-amber-fg: #d0c080;
  --sched-risk-red-bg: rgba(208,128,128,0.10);
  --sched-risk-red-fg: #d8a8a8;

  /* Schedule dependency */
  --sched-dep-fg: var(--text-primary);

  /* Chat actions */
  --chat-action-bg: rgba(128,184,128,0.08);
  --chat-action-border: rgba(128,184,128,0.18);
  --chat-action-fg: #a0d0a0;
  --chat-action-err-bg: rgba(208,128,128,0.08);
  --chat-action-err-border: rgba(208,128,128,0.18);
  --chat-action-err-fg: #d8a8a8;
  --chat-action-pend-bg: rgba(255,255,255,0.06);
  --chat-action-pend-border: rgba(255,255,255,0.12);
  --chat-action-pend-fg: #b0b0b0;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #b8a888;
  --kanban-scope-fg: #b8a888;
  --kanban-scope-bg: rgba(184,168,136,0.12);
  --tab-objectives-fg: #b8a888;
  --tab-objectives-border: #a89878;
  --tab-plan-fg: #b8a888;
  --tab-plan-border: #a89878;
  --tab-schedule-fg: #b8a888;
  --tab-schedule-border: #a89878;
  --node-task-header: #2a2a2a;

  --toolbar-bg: #0a0a0a; --toolbar-fg: #d0d0d0; --toolbar-border: #252525;
  --toolbar-muted: rgba(208,208,208,0.35); --toolbar-link: #808080; --toolbar-link-hover: #d0d0d0;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(208,208,208,0.6); --toolbar-icon-fg-hover: #d0d0d0;
  --edge-default: #555; --edge-seq: #4ade80; --edge-or: #fbbf24; --edge-preview: #444; --edge-delete-bg: #141414;
  --node-text: #fff; --node-port-seq: #4ade80; --node-port-seq-stroke: #22c55e;
  --node-port-or: #fbbf24; --node-port-or-stroke: #d99e0a;
  --node-bottleneck: #f07070; --node-progress-track: #252525; --node-progress-fill: #fbbf24;
  --node-success-badge: #4ade80; --node-info-badge: #fbbf24;
  --gantt-seg-1: #4ade80; --gantt-seg-2: #fbbf24; --gantt-seg-3: #b8a0e0;
  --gantt-seg-4: #f0a040; --gantt-seg-5: #f07070; --gantt-seg-6: #40c8c8; --gantt-seg-7: #d090b8;
  --gantt-bar-done: #555; --gantt-bar-normal: #4ade80; --gantt-bar-bottleneck: #f07070; --gantt-bar-text: #fff;
  --hist-bar: #fbbf24; --hist-bar-duration: #fbbf24; --hist-p10: #4ade80; --hist-p50: #f0a040; --hist-p90: #f07070;
  --input-bg: #141414; --input-fg: #d0d0d0; --input-border: #252525; --input-focus-border: #c8a860;
  --chat-user-bg: #a08050; --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.06); --chat-code-fg: #d0d0d0;
}

/* ================================================================
   Blueprint Theme — Engineering precision, drafting aesthetic
   Blue-on-blue palette evoking architectural blueprints.
   Light: white/light-blue grid-paper feel with blueprint-blue lines.
   Dark: deep navy with white line-art accents.
   ================================================================ */

/* ── Light Mode ── */
[data-special="blueprint"] {
  --bg-page: #eaf2fb;
  --bg-white: #f5f9ff;
  --bg-light: #dce8f5;
  --bg-hover: #c9dbef;
  --bg-card-header: #ecf2fb;
  --bg-surface: #e1ecf8;
  --bg-panel: #f0f6ff;
  --text-primary: #1a2f4b;
  --text-secondary: #3d5a80;
  --text-tertiary: #6686a8;
  --text-muted: #4e7094;
  --border: #8badd4;

  --light-blue: #2b6cb0;
  --btn-blue: #1e56a0;
  --btn-blue-hover: #163d75;
  --orange: #d97706;
  --orange-hover: #b45309;

  --shadow-sm: 0 1px 3px rgba(27,63,112,0.10), 0 1px 2px rgba(27,63,112,0.06);
  --shadow-md: 0 4px 12px rgba(27,63,112,0.12), 0 2px 4px rgba(27,63,112,0.06);
  --shadow-lg: 0 8px 24px rgba(27,63,112,0.15);
  --shadow-modal: 0 20px 60px rgba(27,63,112,0.20), 0 4px 16px rgba(27,63,112,0.10);

  --error-red: #ef4444;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  --focus-ring: 0 0 0 3px rgba(30,86,160,0.35);
  --overlay-bg: rgba(15,30,55,0.50);

  /* Component tokens (blueprint-light) */
  --text-heading: #0e2240;
  --code-bg: #d0dfef;
  --code-fg: #1a2f4b;
  --canvas-dot: #8badd4;
  --table-band-even: #f5f9ff;
  --table-band-odd: #e5eef8;
  --table-band-even-hover: #c9dbef;
  --table-band-odd-hover: #bdd2ea;
  --table-band-even-sel: #b3d1f0;
  --table-band-odd-sel: #a0c5e8;
  --table-row-sel: #b3d1f0;
  --cal-hover: #c9dbef;
  --cal-today: #b3d1f0;
  --cal-today-hover: #8ebbea;
  --cal-weekend: #dce8f5;
  --cal-weekend-hover: #c9dbef;
  --cal-selected: #8ebbea;
  --cal-pill-mix-base: #f5f9ff;
  --scenario-active-bg: #b3d1f0;
  --gantt-grid: #8badd4;
  --or-group-bg: #d6e6f5;
  --or-group-hover: #b3d1f0;
  --or-group-sel: #8ebbea;
  --or-type-badge-bg: #b3d1f0;
  --or-type-badge-fg: #0e2240;
  --or-type-badge-border: #1e56a0;
  --badge-ok-bg: #c6f6d5;
  --badge-ok-fg: #1a4731;
  --badge-warn-bg: #fefcbf;
  --badge-warn-fg: #744210;
  --badge-err-bg: #fed7d7;
  --badge-err-fg: #9b2c2c;
  --hint-bg: #d6e6f5;
  --hint-fg: #0e2240;
  --hint-border: #1e56a0;
  --hint-bottleneck-bg: #fed7d7;
  --hint-bottleneck-fg: #9b2c2c;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #d6e6f5;
  --hint-info-fg: #0e2240;
  --hint-info-border: #2b6cb0;
  --chat-system-bg: #d6e6f5;
  --chat-system-fg: #0e2240;
  --chip-bg: #b3d1f0;
  --chip-fg: #0e2240;
  --sched-status-done-bg: #c6f6d5;
  --sched-status-done-fg: #1a4731;
  --sched-status-prog-bg: #b3d1f0;
  --sched-status-prog-fg: #0e2240;
  --sched-status-btn-bg: #fed7d7;
  --sched-status-btn-fg: #9b2c2c;
  --sched-badge-yes-bg: #b3d1f0;
  --sched-badge-yes-fg: #0e2240;
  --sched-badge-no-bg: #dce8f5;
  --sched-badge-no-fg: #5b7ea3;
  --sched-risk-green-bg: #c6f6d5;
  --sched-risk-green-fg: #1a4731;
  --sched-risk-amber-bg: #fefcbf;
  --sched-risk-amber-fg: #744210;
  --sched-risk-red-bg: #fed7d7;
  --sched-risk-red-fg: #9b2c2c;
  --sched-dep-fg: #1a2f4b;
  --chat-action-bg: #dcf5e0;
  --chat-action-border: #a3d9ad;
  --chat-action-fg: #1a4731;
  --chat-action-err-bg: #fed7d7;
  --chat-action-err-border: #f5a3a3;
  --chat-action-err-fg: #9b2c2c;
  --chat-action-pend-bg: #d6e6f5;
  --chat-action-pend-border: #8ebbea;
  --chat-action-pend-fg: #0e2240;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #2b6cb0;
  --kanban-scope-fg: #2b6cb0;
  --kanban-scope-bg: rgba(43,108,176,0.08);
  --tab-objectives-fg: #2b6cb0;
  --tab-objectives-border: #1e56a0;
  --tab-plan-fg: #2b6cb0;
  --tab-plan-border: #1e56a0;
  --tab-schedule-fg: #2b6cb0;
  --tab-schedule-border: #1e56a0;
  --node-task-header: #0e2240;

  --toolbar-bg: #0e2240; --toolbar-fg: #f5f9ff; --toolbar-border: rgba(255,255,255,0.08);
  --toolbar-muted: rgba(245,249,255,0.4); --toolbar-link: #7aaad4; --toolbar-link-hover: #f5f9ff;
  --toolbar-btn-bg: rgba(255,255,255,0.08); --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1); --toolbar-icon-fg: rgba(245,249,255,0.65); --toolbar-icon-fg-hover: #f5f9ff;
  --edge-default: #8badd4; --edge-seq: #1e56a0; --edge-or: #d4820a; --edge-preview: #8badd4; --edge-delete-bg: #0e2240;
  --node-text: #fff; --node-port-seq: #1e56a0; --node-port-seq-stroke: #154080;
  --node-port-or: #d4820a; --node-port-or-stroke: #b06a08;
  --node-bottleneck: #ef4444; --node-progress-track: #8badd4; --node-progress-fill: #1e56a0;
  --node-success-badge: #22c55e; --node-info-badge: #1e56a0;
  --gantt-seg-1: #1e56a0; --gantt-seg-2: #10b981; --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #d4820a; --gantt-seg-5: #ef4444; --gantt-seg-6: #0891b2; --gantt-seg-7: #a855f7;
  --gantt-bar-done: #8badd4; --gantt-bar-normal: #1e56a0; --gantt-bar-bottleneck: #ef4444; --gantt-bar-text: #fff;
  --hist-bar: #2a72c0; --hist-bar-duration: #2a72c0; --hist-p10: #22c55e; --hist-p50: #d4820a; --hist-p90: #ef4444;
  --input-bg: var(--bg-white); --input-fg: var(--text-primary); --input-border: var(--border); --input-focus-border: #1e56a0;
  --chat-user-bg: #1e56a0; --chat-user-fg: #fff;
  --chat-code-bg: #0e2240; --chat-code-fg: #d8e6f3;
}

/* ── Dark Mode ── */
[data-special="blueprint"][data-mode="dark"] {
  --bg-page: #0a1628;
  --bg-white: #0f1e34;
  --bg-light: #142640;
  --bg-hover: #1a304e;
  --bg-card-header: #12223a;
  --bg-surface: #142640;
  --bg-panel: #0f1e34;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #264060;

  --light-blue: #5fa8d3;
  --btn-blue: #4a96c8;
  --btn-blue-hover: #3a82b8;
  --orange: #f0b429;
  --orange-hover: #d99e1e;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.40), 0 1px 2px rgba(0,0,0,0.30);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.30);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.50);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.60), 0 4px 16px rgba(0,0,0,0.40);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(95,168,211,0.30);
  --overlay-bg: rgba(5,10,22,0.75);

  /* Component tokens (blueprint-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(95,168,211,0.10);
  --code-fg: #dcd4ca;
  --canvas-dot: #264060;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(95,168,211,0.10);
  --table-band-odd-sel: rgba(95,168,211,0.14);
  --table-row-sel: rgba(95,168,211,0.08);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(95,168,211,0.12);
  --cal-today-hover: rgba(95,168,211,0.20);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(95,168,211,0.18);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(95,168,211,0.12);
  --gantt-grid: #264060;
  --or-group-bg: rgba(95,168,211,0.08);
  --or-group-hover: rgba(95,168,211,0.14);
  --or-group-sel: rgba(95,168,211,0.20);
  --or-type-badge-bg: rgba(95,168,211,0.12);
  --or-type-badge-fg: #7ec4e6;
  --or-type-badge-border: #4a96c8;
  --badge-ok-bg: rgba(104,211,145,0.12);
  --badge-ok-fg: #81e6a1;
  --badge-warn-bg: rgba(246,224,94,0.12);
  --badge-warn-fg: #f6e88a;
  --badge-err-bg: rgba(245,101,101,0.10);
  --badge-err-fg: #fca5a5;
  --hint-bg: rgba(95,168,211,0.08);
  --hint-fg: #7ec4e6;
  --hint-border: #4a96c8;
  --hint-bottleneck-bg: rgba(245,101,101,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #f87171;
  --hint-info-bg: rgba(95,168,211,0.08);
  --hint-info-fg: #7ec4e6;
  --hint-info-border: #5fa8d3;
  --chat-system-bg: rgba(95,168,211,0.10);
  --chat-system-fg: #7ec4e6;
  --chip-bg: rgba(95,168,211,0.12);
  --chip-fg: #7ec4e6;
  --sched-status-done-bg: rgba(104,211,145,0.10);
  --sched-status-done-fg: #81e6a1;
  --sched-status-prog-bg: rgba(95,168,211,0.10);
  --sched-status-prog-fg: #7ec4e6;
  --sched-status-btn-bg: rgba(245,101,101,0.10);
  --sched-status-btn-fg: #fca5a5;
  --sched-badge-yes-bg: rgba(95,168,211,0.10);
  --sched-badge-yes-fg: #7ec4e6;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(104,211,145,0.10);
  --sched-risk-green-fg: #81e6a1;
  --sched-risk-amber-bg: rgba(246,224,94,0.10);
  --sched-risk-amber-fg: #f6e88a;
  --sched-risk-red-bg: rgba(245,101,101,0.10);
  --sched-risk-red-fg: #fca5a5;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(104,211,145,0.08);
  --chat-action-border: rgba(104,211,145,0.18);
  --chat-action-fg: #81e6a1;
  --chat-action-err-bg: rgba(245,101,101,0.08);
  --chat-action-err-border: rgba(245,101,101,0.18);
  --chat-action-err-fg: #fca5a5;
  --chat-action-pend-bg: rgba(95,168,211,0.08);
  --chat-action-pend-border: rgba(95,168,211,0.18);
  --chat-action-pend-fg: #7ec4e6;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #5fa8d3;
  --kanban-scope-fg: #5fa8d3;
  --kanban-scope-bg: rgba(95,168,211,0.12);
  --tab-objectives-fg: #5fa8d3;
  --tab-objectives-border: #4a96c8;
  --tab-plan-fg: #5fa8d3;
  --tab-plan-border: #4a96c8;
  --tab-schedule-fg: #5fa8d3;
  --tab-schedule-border: #4a96c8;
  --node-task-header: #1e3450;

  --toolbar-bg: #060e1c; --toolbar-fg: #d8e6f3; --toolbar-border: #1a3050;
  --toolbar-muted: rgba(216,230,243,0.35); --toolbar-link: #5090c0; --toolbar-link-hover: #d8e6f3;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(216,230,243,0.6); --toolbar-icon-fg-hover: #d8e6f3;
  --edge-default: #3a5878; --edge-seq: #5fa8d3; --edge-or: #e8a030; --edge-preview: #264060; --edge-delete-bg: #0f1e34;
  --node-text: #fff; --node-port-seq: #5fa8d3; --node-port-seq-stroke: #4090c0;
  --node-port-or: #e8a030; --node-port-or-stroke: #c88818;
  --node-bottleneck: #f87171; --node-progress-track: #1a3050; --node-progress-fill: #5fa8d3;
  --node-success-badge: #4ade80; --node-info-badge: #5fa8d3;
  --gantt-seg-1: #5fa8d3; --gantt-seg-2: #34d399; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #e8a030; --gantt-seg-5: #f87171; --gantt-seg-6: #38bdf8; --gantt-seg-7: #c084fc;
  --gantt-bar-done: #3a5878; --gantt-bar-normal: #5fa8d3; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #5fa8d3; --hist-bar-duration: #5fa8d3; --hist-p10: #4ade80; --hist-p50: #e8a030; --hist-p90: #f87171;
  --input-bg: #0f1e34; --input-fg: #d8e6f3; --input-border: #1a3050; --input-focus-border: #5fa8d3;
  --chat-user-bg: #4a90c0; --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.07); --chat-code-fg: #d8e6f3;
}
/* ================================================================
   Ember Theme — Intense, high-stakes urgency
   Deep blacks/charcoals with smoldering red-orange accents.
   Warm highlights on critical elements, restrained elsewhere.
   ================================================================ */

/* ── Light Mode ── */
[data-special="ember"] {
  /* Surfaces */
  --bg-page: #f2edea;
  --bg-white: #faf7f5;
  --bg-light: #eae5e2;
  --bg-hover: #eae3de;
  --bg-card-header: #f2ece8;
  --bg-surface: #f5f0ed;
  --bg-panel: #faf7f5;

  /* Text */
  --text-primary: #2a1f1a;
  --text-secondary: #7a6a5e;
  --text-tertiary: #8a7a70;
  --text-muted: #6e5e52;

  /* Border */
  --border: #d6cbc2;

  /* Brand (red-orange / ember) */
  --light-blue: #d4522a;
  --btn-blue: #c74420;
  --btn-blue-hover: #ae3a1a;
  --orange: #e07028;
  --orange-hover: #c96322;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(42,31,26,0.07), 0 1px 2px rgba(42,31,26,0.09);
  --shadow-md: 0 4px 12px rgba(42,31,26,0.09), 0 2px 4px rgba(42,31,26,0.07);
  --shadow-lg: 0 8px 24px rgba(42,31,26,0.12);
  --shadow-modal: 0 20px 60px rgba(42,31,26,0.22), 0 4px 16px rgba(42,31,26,0.12);

  /* Status */
  --error-red: #ef4444;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(199,68,32,0.20);
  --overlay-bg: rgba(42,31,26,0.50);

  /* Component tokens */
  --text-heading: #1e1410;
  --code-bg: #eae3de;
  --code-fg: inherit;
  --canvas-dot: #c4b8ae;

  /* Table */
  --table-band-even: #faf7f5;
  --table-band-odd: #f2edea;
  --table-band-even-hover: #eae3de;
  --table-band-odd-hover: #e2dad3;
  --table-band-even-sel: #f8e0d4;
  --table-band-odd-sel: #f2d4c4;
  --table-row-sel: #f8e0d4;

  /* Calendar */
  --cal-hover: #f4ddd0;
  --cal-today: #f0d2c0;
  --cal-today-hover: #e8c4ae;
  --cal-weekend: #efe8e2;
  --cal-weekend-hover: #e6ddd5;
  --cal-selected: #e8c4ae;
  --cal-pill-mix-base: #faf7f5;

  /* Scenario */
  --scenario-active-bg: #f8e0d4;
  --gantt-grid: #d6cbc2;

  /* OR groups */
  --or-group-bg: #fdf0e0;
  --or-group-hover: #fae4ca;
  --or-group-sel: #f2d6b0;
  --or-type-badge-bg: #fae4ca;
  --or-type-badge-fg: #7a5218;
  --or-type-badge-border: #c08020;

  /* Badges */
  --badge-ok-bg: #d8eede;
  --badge-ok-fg: #265a38;
  --badge-warn-bg: #faeaca;
  --badge-warn-fg: #7a5218;
  --badge-err-bg: #f5dada;
  --badge-err-fg: #8c2020;

  /* Hints */
  --hint-bg: #faeaca;
  --hint-fg: #7a5218;
  --hint-border: #c08020;
  --hint-bottleneck-bg: #f5dada;
  --hint-bottleneck-fg: #8c2020;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #f4ddd0;
  --hint-info-fg: #8c4420;
  --hint-info-border: #d4522a;

  /* Chat */
  --chat-system-bg: #faeaca;
  --chat-system-fg: #7a5218;
  --chip-bg: #f0d4c0;
  --chip-fg: #8c4420;

  /* Schedule status */
  --sched-status-done-bg: #d8eede;
  --sched-status-done-fg: #265a38;
  --sched-status-prog-bg: #f4ddd0;
  --sched-status-prog-fg: #8c4420;
  --sched-status-btn-bg: #f5dada;
  --sched-status-btn-fg: #8c2020;

  /* Schedule badges */
  --sched-badge-yes-bg: #f0d4c0;
  --sched-badge-yes-fg: #8c4420;
  --sched-badge-no-bg: #eae3de;
  --sched-badge-no-fg: #6e5e52;

  /* Schedule risk */
  --sched-risk-green-bg: #d8eede;
  --sched-risk-green-fg: #265a38;
  --sched-risk-amber-bg: #faeaca;
  --sched-risk-amber-fg: #7a5218;
  --sched-risk-red-bg: #f5dada;
  --sched-risk-red-fg: #8c2020;
  --sched-dep-fg: #3a2e26;

  /* Chat actions */
  --chat-action-bg: #dcf0e0;
  --chat-action-border: #b0d4b8;
  --chat-action-fg: #265a38;
  --chat-action-err-bg: #f5dada;
  --chat-action-err-border: #e0b0b0;
  --chat-action-err-fg: #8c2020;
  --chat-action-pend-bg: #f4ddd0;
  --chat-action-pend-border: #d4b89a;
  --chat-action-pend-fg: #8c4420;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #d4522a;
  --kanban-scope-fg: #d4522a;
  --kanban-scope-bg: rgba(212,82,42,0.08);
  --tab-objectives-fg: #d4522a;
  --tab-objectives-border: #c74420;
  --tab-plan-fg: #d4522a;
  --tab-plan-border: #c74420;
  --tab-schedule-fg: #d4522a;
  --tab-schedule-border: #c74420;
  --node-task-header: #1e1410;

  --toolbar-bg: #2a1410; --toolbar-fg: #faf7f5; --toolbar-border: rgba(255,255,255,0.08);
  --toolbar-muted: rgba(250,247,245,0.4); --toolbar-link: #c09080; --toolbar-link-hover: #faf7f5;
  --toolbar-btn-bg: rgba(255,255,255,0.08); --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1); --toolbar-icon-fg: rgba(250,247,245,0.65); --toolbar-icon-fg-hover: #faf7f5;
  --edge-default: #9a8880; --edge-seq: #16a34a; --edge-or: #c74420; --edge-preview: #9a8880; --edge-delete-bg: #2a1410;
  --node-text: #fff; --node-port-seq: #16a34a; --node-port-seq-stroke: #0d7a30;
  --node-port-or: #c74420; --node-port-or-stroke: #a03518;
  --node-bottleneck: #ef4444; --node-progress-track: #d0c4be; --node-progress-fill: #c74420;
  --node-success-badge: #22c55e; --node-info-badge: #c74420;
  --gantt-seg-1: #16a34a; --gantt-seg-2: #2563eb; --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #d4522a; --gantt-seg-5: #ef4444; --gantt-seg-6: #0891b2; --gantt-seg-7: #c026d3;
  --gantt-bar-done: #8a7a72; --gantt-bar-normal: #16a34a; --gantt-bar-bottleneck: #ef4444; --gantt-bar-text: #fff;
  --hist-bar: #2563eb; --hist-bar-duration: #2563eb; --hist-p10: #22c55e; --hist-p50: #d4522a; --hist-p90: #ef4444;
  --input-bg: var(--bg-white); --input-fg: var(--text-primary); --input-border: var(--border); --input-focus-border: #c74420;
  --chat-user-bg: #c74420; --chat-user-fg: #fff;
  --chat-code-bg: #2a1410; --chat-code-fg: #e8d8d0;
}

/* ── Dark Mode ── */
[data-special="ember"][data-mode="dark"] {
  /* Surfaces */
  --bg-page: #141010;
  --bg-white: #1e1818;
  --bg-light: #262020;
  --bg-hover: #322828;
  --bg-card-header: #221c1c;
  --bg-surface: #262020;
  --bg-panel: #1e1818;

  /* Text */
  --text-primary: #e4d8d0;
  --text-secondary: #a08e86;
  --text-tertiary: #8a7a72;
  --text-muted: #a09088;

  /* Border */
  --border: #3c302a;

  /* Brand (red-orange / ember) */
  --light-blue: #e06840;
  --btn-blue: #d45c34;
  --btn-blue-hover: #c0502c;
  --orange: #e88838;
  --orange-hover: #d47c30;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.28), 0 1px 2px rgba(0,0,0,0.22);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.32), 0 2px 4px rgba(0,0,0,0.22);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.38);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.38);

  /* Status */
  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  /* Focus & overlay */
  --focus-ring: 0 0 0 3px rgba(212,92,52,0.30);
  --overlay-bg: rgba(0,0,0,0.65);

  /* Component tokens */
  --text-heading: #e4d8d0;
  --code-bg: rgba(255,255,255,0.08);
  --code-fg: #e4d8d0;
  --canvas-dot: #443830;

  /* Table */
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(212,92,52,0.10);
  --table-band-odd-sel: rgba(212,92,52,0.15);
  --table-row-sel: rgba(212,92,52,0.08);

  /* Calendar */
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(212,92,52,0.12);
  --cal-today-hover: rgba(212,92,52,0.20);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(212,92,52,0.18);
  --cal-pill-mix-base: var(--bg-white);

  /* Scenario */
  --scenario-active-bg: rgba(212,92,52,0.12);
  --gantt-grid: #3c302a;

  /* OR groups */
  --or-group-bg: rgba(232,136,56,0.08);
  --or-group-hover: rgba(232,136,56,0.15);
  --or-group-sel: rgba(232,136,56,0.22);
  --or-type-badge-bg: rgba(232,136,56,0.12);
  --or-type-badge-fg: #f0c060;
  --or-type-badge-border: #b87828;

  /* Badges */
  --badge-ok-bg: rgba(94,201,122,0.12);
  --badge-ok-fg: #7ee8a0;
  --badge-warn-bg: rgba(232,136,56,0.12);
  --badge-warn-fg: #f0c060;
  --badge-err-bg: rgba(240,112,112,0.12);
  --badge-err-fg: #f8a0a0;

  /* Hints */
  --hint-bg: rgba(232,136,56,0.10);
  --hint-fg: #f0c060;
  --hint-border: #b87828;
  --hint-bottleneck-bg: rgba(240,112,112,0.10);
  --hint-bottleneck-fg: #f8a0a0;
  --hint-bottleneck-border: #e05050;
  --hint-info-bg: rgba(224,104,64,0.10);
  --hint-info-fg: #f0a070;
  --hint-info-border: #d45c34;

  /* Chat */
  --chat-system-bg: rgba(232,136,56,0.12);
  --chat-system-fg: #f0c060;
  --chip-bg: rgba(224,104,64,0.12);
  --chip-fg: #f0a070;

  /* Schedule status */
  --sched-status-done-bg: rgba(94,201,122,0.12);
  --sched-status-done-fg: #7ee8a0;
  --sched-status-prog-bg: rgba(224,104,64,0.12);
  --sched-status-prog-fg: #f0a070;
  --sched-status-btn-bg: rgba(240,112,112,0.12);
  --sched-status-btn-fg: #f8a0a0;

  /* Schedule badges */
  --sched-badge-yes-bg: rgba(224,104,64,0.12);
  --sched-badge-yes-fg: #f0a070;
  --sched-badge-no-bg: rgba(255,255,255,0.06);
  --sched-badge-no-fg: var(--text-secondary);

  /* Schedule risk */
  --sched-risk-green-bg: rgba(94,201,122,0.12);
  --sched-risk-green-fg: #7ee8a0;
  --sched-risk-amber-bg: rgba(232,136,56,0.12);
  --sched-risk-amber-fg: #f0c060;
  --sched-risk-red-bg: rgba(240,112,112,0.12);
  --sched-risk-red-fg: #f8a0a0;
  --sched-dep-fg: var(--text-primary);

  /* Chat actions */
  --chat-action-bg: rgba(94,201,122,0.10);
  --chat-action-border: rgba(94,201,122,0.20);
  --chat-action-fg: #7ee8a0;
  --chat-action-err-bg: rgba(240,112,112,0.10);
  --chat-action-err-border: rgba(240,112,112,0.20);
  --chat-action-err-fg: #f8a0a0;
  --chat-action-pend-bg: rgba(224,104,64,0.10);
  --chat-action-pend-border: rgba(224,104,64,0.20);
  --chat-action-pend-fg: #f0a070;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #e06840;
  --kanban-scope-fg: #e06840;
  --kanban-scope-bg: rgba(224,104,64,0.12);
  --tab-objectives-fg: #e06840;
  --tab-objectives-border: #d45c34;
  --tab-plan-fg: #e06840;
  --tab-plan-border: #d45c34;
  --tab-schedule-fg: #e06840;
  --tab-schedule-border: #d45c34;
  --node-task-header: #382e28;

  --toolbar-bg: #0c0808; --toolbar-fg: #e0d0c8; --toolbar-border: #2a2020;
  --toolbar-muted: rgba(224,208,200,0.35); --toolbar-link: #a07060; --toolbar-link-hover: #e0d0c8;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(224,208,200,0.6); --toolbar-icon-fg-hover: #e0d0c8;
  --edge-default: #5a4840; --edge-seq: #4ade80; --edge-or: #e06840; --edge-preview: #4a3830; --edge-delete-bg: #1e1818;
  --node-text: #fff; --node-port-seq: #4ade80; --node-port-seq-stroke: #22c55e;
  --node-port-or: #e06840; --node-port-or-stroke: #c05028;
  --node-bottleneck: #f87171; --node-progress-track: #2a2020; --node-progress-fill: #d45c34;
  --node-success-badge: #4ade80; --node-info-badge: #d45c34;
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #e06840; --gantt-seg-5: #f87171; --gantt-seg-6: #22d3ee; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #5a4840; --gantt-bar-normal: #4ade80; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #60a5fa; --hist-bar-duration: #60a5fa; --hist-p10: #4ade80; --hist-p50: #e06840; --hist-p90: #f87171;
  --input-bg: #1e1818; --input-fg: #e0d0c8; --input-border: #2a2020; --input-focus-border: #d45c34;
  --chat-user-bg: #c74420; --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.06); --chat-code-fg: #e0d0c8;
}
/* ================================================================
   Coastal Theme — Breezy, approachable, open
   Sandy beiges, seafoam greens, soft sky blues.
   Light: sun-bleached airy.  Dark: twilight-at-the-beach navy
   with foam-white accents.
   ================================================================ */

/* ── Light Mode ── */
[data-special="coastal"] {
  --bg-page: #f5f0e8;
  --bg-white: #faf8f3;
  --bg-light: #ede7db;
  --bg-hover: #e4dccf;
  --bg-card-header: #f2ede4;
  --bg-surface: #ede7db;
  --bg-panel: #faf8f3;
  --text-primary: #2c3e3a;
  --text-secondary: #5a6e68;
  --text-tertiary: #728880;
  --text-muted: #5e7268;
  --border: #c8d5cc;

  --light-blue: #72b8c9;
  --btn-blue: #3a9fb5;
  --btn-blue-hover: #2d8a9e;
  --orange: #d4905a;
  --orange-hover: #c07a44;

  --shadow-sm: 0 1px 3px rgba(44,62,58,0.08), 0 1px 2px rgba(44,62,58,0.05);
  --shadow-md: 0 4px 12px rgba(44,62,58,0.10), 0 2px 4px rgba(44,62,58,0.06);
  --shadow-lg: 0 8px 24px rgba(44,62,58,0.12);
  --shadow-modal: 0 20px 60px rgba(44,62,58,0.18), 0 4px 16px rgba(44,62,58,0.10);

  --error-red: #ef4444;
  --success-green: #16a34a;
  --warning-amber: #f59e0b;

  --focus-ring: 0 0 0 3px rgba(58,159,181,0.35);
  --overlay-bg: rgba(44,62,58,0.42);

  /* Component tokens (coastal-light) */
  --text-heading: #1e302c;
  --code-bg: #e4dccf;
  --code-fg: inherit;
  --canvas-dot: #c8d5cc;
  --table-band-even: #faf8f3;
  --table-band-odd: #f0ebe0;
  --table-band-even-hover: #e4dccf;
  --table-band-odd-hover: #dbd2c3;
  --table-band-even-sel: #c4e4e0;
  --table-band-odd-sel: #b3dbd5;
  --table-row-sel: #c4e4e0;
  --cal-hover: #e4dccf;
  --cal-today: #bce0dc;
  --cal-today-hover: #a0d4ce;
  --cal-weekend: #ede7db;
  --cal-weekend-hover: #e4dccf;
  --cal-selected: #a0d4ce;
  --cal-pill-mix-base: #faf8f3;
  --scenario-active-bg: #bce0dc;
  --gantt-grid: #c8d5cc;
  --or-group-bg: #daf0ed;
  --or-group-hover: #bce0dc;
  --or-group-sel: #a0d4ce;
  --or-type-badge-bg: #bce0dc;
  --or-type-badge-fg: #1a5c52;
  --or-type-badge-border: #3a9fb5;
  --badge-ok-bg: #c5e8d5;
  --badge-ok-fg: #1a5e38;
  --badge-warn-bg: #f9edc4;
  --badge-warn-fg: #7a5f00;
  --badge-err-bg: #f5cdc8;
  --badge-err-fg: #8b1a10;
  --hint-bg: #daf0ed;
  --hint-fg: #1a5c52;
  --hint-border: #3a9fb5;
  --hint-bottleneck-bg: #f5cdc8;
  --hint-bottleneck-fg: #8b1a10;
  --hint-bottleneck-border: #ef4444;
  --hint-info-bg: #d5ecf2;
  --hint-info-fg: #1a5c52;
  --hint-info-border: #72b8c9;
  --chat-system-bg: #daf0ed;
  --chat-system-fg: #1a5c52;
  --chip-bg: #bce0dc;
  --chip-fg: #1a5c52;
  --sched-status-done-bg: #c5e8d5;
  --sched-status-done-fg: #1a5e38;
  --sched-status-prog-bg: #bce0dc;
  --sched-status-prog-fg: #1a5c52;
  --sched-status-btn-bg: #f5cdc8;
  --sched-status-btn-fg: #8b1a10;
  --sched-badge-yes-bg: #bce0dc;
  --sched-badge-yes-fg: #1a5c52;
  --sched-badge-no-bg: #ede7db;
  --sched-badge-no-fg: #6d8078;
  --sched-risk-green-bg: #c5e8d5;
  --sched-risk-green-fg: #1a5e38;
  --sched-risk-amber-bg: #f9edc4;
  --sched-risk-amber-fg: #7a5f00;
  --sched-risk-red-bg: #f5cdc8;
  --sched-risk-red-fg: #8b1a10;
  --sched-dep-fg: #2c3e3a;
  --chat-action-bg: #dff0e4;
  --chat-action-border: #a8d8b8;
  --chat-action-fg: #1a5e38;
  --chat-action-err-bg: #f5cdc8;
  --chat-action-err-border: #e8a49c;
  --chat-action-err-fg: #8b1a10;
  --chat-action-pend-bg: #d5ecf2;
  --chat-action-pend-border: #a0d2df;
  --chat-action-pend-fg: #1a5c52;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #72b8c9;
  --kanban-scope-fg: #72b8c9;
  --kanban-scope-bg: rgba(114,184,201,0.08);
  --tab-objectives-fg: #72b8c9;
  --tab-objectives-border: #3a9fb5;
  --tab-plan-fg: #72b8c9;
  --tab-plan-border: #3a9fb5;
  --tab-schedule-fg: #72b8c9;
  --tab-schedule-border: #3a9fb5;
  --node-task-header: #1e302c;

  --toolbar-bg: #1a3838; --toolbar-fg: #f5f0e8; --toolbar-border: rgba(255,255,255,0.08);
  --toolbar-muted: rgba(245,240,232,0.4); --toolbar-link: #80b8b0; --toolbar-link-hover: #f5f0e8;
  --toolbar-btn-bg: rgba(255,255,255,0.08); --toolbar-btn-bg-hover: rgba(255,255,255,0.14);
  --toolbar-btn-border: rgba(255,255,255,0.1); --toolbar-icon-fg: rgba(245,240,232,0.65); --toolbar-icon-fg-hover: #f5f0e8;
  --edge-default: #8aaca8; --edge-seq: #2a9a88; --edge-or: #f59e0b; --edge-preview: #8aaca8; --edge-delete-bg: #1a3838;
  --node-text: #fff; --node-port-seq: #2a9a88; --node-port-seq-stroke: #1a8070;
  --node-port-or: #f59e0b; --node-port-or-stroke: #d97706;
  --node-bottleneck: #ef4444; --node-progress-track: #bcd4d0; --node-progress-fill: #3a9fb5;
  --node-success-badge: #22c55e; --node-info-badge: #3a9fb5;
  --gantt-seg-1: #10b981; --gantt-seg-2: #3a9fb5; --gantt-seg-3: #7c3aed;
  --gantt-seg-4: #f59e0b; --gantt-seg-5: #ef4444; --gantt-seg-6: #0891b2; --gantt-seg-7: #c026d3;
  --gantt-bar-done: #8aaca8; --gantt-bar-normal: #2a9a88; --gantt-bar-bottleneck: #ef4444; --gantt-bar-text: #fff;
  --hist-bar: #3a9fb5; --hist-bar-duration: #3a9fb5; --hist-p10: #22c55e; --hist-p50: #f59e0b; --hist-p90: #ef4444;
  --input-bg: var(--bg-white); --input-fg: var(--text-primary); --input-border: var(--border); --input-focus-border: #3a9fb5;
  --chat-user-bg: #3a9fb5; --chat-user-fg: #fff;
  --chat-code-bg: #1a3838; --chat-code-fg: #d8e8e4;
}

/* ── Dark Mode ── */
[data-special="coastal"][data-mode="dark"] {
  --bg-page: #0e1a24;
  --bg-white: #132230;
  --bg-light: #182a3a;
  --bg-hover: #1e3244;
  --bg-card-header: #162836;
  --bg-surface: #182a3a;
  --bg-panel: #132230;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #263e4e;

  --light-blue: #7ecad8;
  --btn-blue: #5ab8c8;
  --btn-blue-hover: #48a8b8;
  --orange: #e0a474;
  --orange-hover: #d49060;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.30), 0 1px 2px rgba(0,0,0,0.20);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.22);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.40);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.50), 0 4px 16px rgba(0,0,0,0.30);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(90,184,200,0.30);
  --overlay-bg: rgba(10,18,28,0.72);

  /* Component tokens (coastal-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(126,202,216,0.08);
  --code-fg: #dcd4ca;
  --canvas-dot: #263e4e;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(90,184,200,0.10);
  --table-band-odd-sel: rgba(90,184,200,0.14);
  --table-row-sel: rgba(90,184,200,0.08);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(90,184,200,0.10);
  --cal-today-hover: rgba(90,184,200,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(90,184,200,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(90,184,200,0.12);
  --gantt-grid: #263e4e;
  --or-group-bg: rgba(90,184,200,0.06);
  --or-group-hover: rgba(90,184,200,0.12);
  --or-group-sel: rgba(90,184,200,0.18);
  --or-type-badge-bg: rgba(90,184,200,0.12);
  --or-type-badge-fg: #8ad4e0;
  --or-type-badge-border: #5ab8c8;
  --badge-ok-bg: rgba(92,184,122,0.12);
  --badge-ok-fg: #78d098;
  --badge-warn-bg: rgba(224,184,64,0.12);
  --badge-warn-fg: #ecd06a;
  --badge-err-bg: rgba(224,96,80,0.10);
  --badge-err-fg: #e8a098;
  --hint-bg: rgba(90,184,200,0.08);
  --hint-fg: #8ad4e0;
  --hint-border: #5ab8c8;
  --hint-bottleneck-bg: rgba(248,113,113,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #f87171;
  --hint-info-bg: rgba(126,202,216,0.08);
  --hint-info-fg: #8ad4e0;
  --hint-info-border: #7ecad8;
  --chat-system-bg: rgba(90,184,200,0.10);
  --chat-system-fg: #8ad4e0;
  --chip-bg: rgba(90,184,200,0.12);
  --chip-fg: #8ad4e0;
  --sched-status-done-bg: rgba(92,184,122,0.10);
  --sched-status-done-fg: #78d098;
  --sched-status-prog-bg: rgba(90,184,200,0.10);
  --sched-status-prog-fg: #8ad4e0;
  --sched-status-btn-bg: rgba(224,96,80,0.10);
  --sched-status-btn-fg: #e8a098;
  --sched-badge-yes-bg: rgba(90,184,200,0.10);
  --sched-badge-yes-fg: #8ad4e0;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(92,184,122,0.10);
  --sched-risk-green-fg: #78d098;
  --sched-risk-amber-bg: rgba(224,184,64,0.10);
  --sched-risk-amber-fg: #ecd06a;
  --sched-risk-red-bg: rgba(224,96,80,0.10);
  --sched-risk-red-fg: #e8a098;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(92,184,122,0.08);
  --chat-action-border: rgba(92,184,122,0.18);
  --chat-action-fg: #78d098;
  --chat-action-err-bg: rgba(224,96,80,0.08);
  --chat-action-err-border: rgba(224,96,80,0.18);
  --chat-action-err-fg: #e8a098;
  --chat-action-pend-bg: rgba(90,184,200,0.08);
  --chat-action-pend-border: rgba(90,184,200,0.18);
  --chat-action-pend-fg: #8ad4e0;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #7ecad8;
  --kanban-scope-fg: #7ecad8;
  --kanban-scope-bg: rgba(126,202,216,0.12);
  --tab-objectives-fg: #7ecad8;
  --tab-objectives-border: #5ab8c8;
  --tab-plan-fg: #7ecad8;
  --tab-plan-border: #5ab8c8;
  --tab-schedule-fg: #7ecad8;
  --tab-schedule-border: #5ab8c8;
  --node-task-header: #1e3840;

  --toolbar-bg: #060e14; --toolbar-fg: #e8ede6; --toolbar-border: #1a3038;
  --toolbar-muted: rgba(232,237,230,0.35); --toolbar-link: #5a9aaa; --toolbar-link-hover: #e8ede6;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(232,237,230,0.6); --toolbar-icon-fg-hover: #e8ede6;
  --edge-default: #3a5858; --edge-seq: #5ac0b0; --edge-or: #fbbf24; --edge-preview: #2a4848; --edge-delete-bg: #132230;
  --node-text: #fff; --node-port-seq: #5ac0b0; --node-port-seq-stroke: #40a898;
  --node-port-or: #fbbf24; --node-port-or-stroke: #d97706;
  --node-bottleneck: #f87171; --node-progress-track: #1a3038; --node-progress-fill: #5abac8;
  --node-success-badge: #4ade80; --node-info-badge: #5abac8;
  --gantt-seg-1: #4ade80; --gantt-seg-2: #60a5fa; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fbbf24; --gantt-seg-5: #f87171; --gantt-seg-6: #38bdf8; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #4a6878; --gantt-bar-normal: #5ac0b0; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #60a5fa; --hist-bar-duration: #60a5fa; --hist-p10: #4ade80; --hist-p50: #fbbf24; --hist-p90: #f87171;
  --input-bg: #132230; --input-fg: #e8ede6; --input-border: #1a3038; --input-focus-border: #5abac8;
  --chat-user-bg: #40a0b5; --chat-user-fg: #fff;
  --chat-code-bg: rgba(255,255,255,0.06); --chat-code-fg: #e8ede6;
}
/* ================================================================
   Obsidian Theme — Premium luxurious exclusivity
   Near-black surfaces with subtle warm undertones, gold/champagne
   accents for interactive elements. Minimal color, maximum
   material richness.
   ================================================================ */

/* ── Light Mode (still dark-ish — a "light-dark" premium feel) ── */
[data-special="obsidian"] {
  --bg-page: #2a2726;
  --bg-white: #322e2c;
  --bg-light: #3a3533;
  --bg-hover: #44403d;
  --bg-card-header: #383432;
  --bg-surface: #3a3533;
  --bg-panel: #322e2c;
  --text-primary: #e8e2da;
  --text-secondary: #a8a098;
  --text-tertiary: #8a827c;
  --text-muted: #a49c94;
  --border: #504a46;

  --light-blue: #d4b87a;
  --btn-blue: #c8a85c;
  --btn-blue-hover: #b8984c;
  --orange: #d4a870;
  --orange-hover: #c49860;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.22), 0 1px 2px rgba(0,0,0,0.18);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.28), 0 2px 4px rgba(0,0,0,0.18);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.34);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.44), 0 4px 16px rgba(0,0,0,0.28);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(200,168,92,0.3);
  --overlay-bg: rgba(10,8,6,0.65);

  /* Component tokens (obsidian-light) */
  --text-heading: #f0ebe4;
  --code-bg: rgba(255,255,255,0.06);
  --code-fg: #e0d8d0;
  --canvas-dot: #504a46;
  --table-band-even: #322e2c;
  --table-band-odd: #3a3533;
  --table-band-even-hover: #44403d;
  --table-band-odd-hover: #4a4542;
  --table-band-even-sel: rgba(200,168,92,0.1);
  --table-band-odd-sel: rgba(200,168,92,0.14);
  --table-row-sel: rgba(200,168,92,0.08);
  --cal-hover: #44403d;
  --cal-today: rgba(200,168,92,0.12);
  --cal-today-hover: rgba(200,168,92,0.2);
  --cal-weekend: #3a3533;
  --cal-weekend-hover: #44403d;
  --cal-selected: rgba(200,168,92,0.18);
  --cal-pill-mix-base: #322e2c;
  --scenario-active-bg: rgba(200,168,92,0.12);
  --gantt-grid: #504a46;
  --or-group-bg: rgba(200,168,92,0.06);
  --or-group-hover: rgba(200,168,92,0.12);
  --or-group-sel: rgba(200,168,92,0.18);
  --or-type-badge-bg: rgba(200,168,92,0.12);
  --or-type-badge-fg: #e0c880;
  --or-type-badge-border: #c8a85c;
  --badge-ok-bg: rgba(106,170,120,0.12);
  --badge-ok-fg: #8cd0a0;
  --badge-warn-bg: rgba(204,160,64,0.12);
  --badge-warn-fg: #e0c070;
  --badge-err-bg: rgba(208,96,96,0.12);
  --badge-err-fg: #e89090;
  --hint-bg: rgba(200,168,92,0.08);
  --hint-fg: #e0c880;
  --hint-border: #c8a85c;
  --hint-bottleneck-bg: rgba(248,113,113,0.1);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #f87171;
  --hint-info-bg: rgba(200,168,92,0.08);
  --hint-info-fg: #e0c880;
  --hint-info-border: #d4b87a;
  --chat-system-bg: rgba(200,168,92,0.1);
  --chat-system-fg: #e0c880;
  --chip-bg: rgba(200,168,92,0.12);
  --chip-fg: #e0c880;
  --sched-status-done-bg: rgba(106,170,120,0.12);
  --sched-status-done-fg: #8cd0a0;
  --sched-status-prog-bg: rgba(200,168,92,0.1);
  --sched-status-prog-fg: #e0c880;
  --sched-status-btn-bg: rgba(208,96,96,0.1);
  --sched-status-btn-fg: #e89090;
  --sched-badge-yes-bg: rgba(200,168,92,0.1);
  --sched-badge-yes-fg: #e0c880;
  --sched-badge-no-bg: rgba(255,255,255,0.05);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(106,170,120,0.12);
  --sched-risk-green-fg: #8cd0a0;
  --sched-risk-amber-bg: rgba(204,160,64,0.12);
  --sched-risk-amber-fg: #e0c070;
  --sched-risk-red-bg: rgba(208,96,96,0.12);
  --sched-risk-red-fg: #e89090;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(106,170,120,0.08);
  --chat-action-border: rgba(106,170,120,0.2);
  --chat-action-fg: #8cd0a0;
  --chat-action-err-bg: rgba(208,96,96,0.08);
  --chat-action-err-border: rgba(208,96,96,0.2);
  --chat-action-err-fg: #e89090;
  --chat-action-pend-bg: rgba(200,168,92,0.08);
  --chat-action-pend-border: rgba(200,168,92,0.2);
  --chat-action-pend-fg: #e0c880;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #d4b87a;
  --kanban-scope-fg: #d4b87a;
  --kanban-scope-bg: rgba(212,184,122,0.08);
  --tab-objectives-fg: #d4b87a;
  --tab-objectives-border: #c8a85c;
  --tab-plan-fg: #d4b87a;
  --tab-plan-border: #c8a85c;
  --tab-schedule-fg: #d4b87a;
  --tab-schedule-border: #c8a85c;
  --node-task-header: #2a2726;

  --toolbar-bg: #1c1916; --toolbar-fg: #e8e2da; --toolbar-border: rgba(255,255,255,0.06);
  --toolbar-muted: rgba(232,226,218,0.35); --toolbar-link: #a09080; --toolbar-link-hover: #e8e2da;
  --toolbar-btn-bg: rgba(255,255,255,0.06); --toolbar-btn-bg-hover: rgba(255,255,255,0.12);
  --toolbar-btn-border: rgba(255,255,255,0.08); --toolbar-icon-fg: rgba(232,226,218,0.6); --toolbar-icon-fg-hover: #e8e2da;
  --edge-default: #5a5248; --edge-seq: #4ade80; --edge-or: #d4b87a; --edge-preview: #4a4238; --edge-delete-bg: #2a2726;
  --node-text: #fff; --node-port-seq: #4ade80; --node-port-seq-stroke: #22c55e;
  --node-port-or: #d4b87a; --node-port-or-stroke: #b0985a;
  --node-bottleneck: #f87171; --node-progress-track: #4a4440; --node-progress-fill: #c8a85c;
  --node-success-badge: #4ade80; --node-info-badge: #c8a85c;
  --gantt-seg-1: #4ade80; --gantt-seg-2: #fbbf24; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fb923c; --gantt-seg-5: #f87171; --gantt-seg-6: #38bdf8; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #5a5248; --gantt-bar-normal: #4ade80; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #fbbf24; --hist-bar-duration: #fbbf24; --hist-p10: #4ade80; --hist-p50: #fb923c; --hist-p90: #f87171;
  --input-bg: #3a3634; --input-fg: #e8e2da; --input-border: #4a4440; --input-focus-border: #d0b468;
  --chat-user-bg: #c8a85c; --chat-user-fg: #1c1916;
  --chat-code-bg: #1c1916; --chat-code-fg: #e8e2da;
}

/* ── Dark Mode (true near-black with gold accents) ── */
[data-special="obsidian"][data-mode="dark"] {
  --bg-page: #141210;
  --bg-white: #1c1916;
  --bg-light: #24201c;
  --bg-hover: #2e2a26;
  --bg-card-header: #201c18;
  --bg-surface: #24201c;
  --bg-panel: #1c1916;
  --text-primary: #e4ddd4;
  --text-secondary: #9a9288;
  --text-tertiary: #847c74;
  --text-muted: #948c84;
  --border: #383230;

  --light-blue: #dcc480;
  --btn-blue: #d0b468;
  --btn-blue-hover: #c0a458;
  --orange: #dab478;
  --orange-hover: #caa468;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.36), 0 1px 2px rgba(0,0,0,0.28);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.42), 0 2px 4px rgba(0,0,0,0.28);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.48);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);

  --error-red: #f87171;
  --success-green: #4ade80;
  --warning-amber: #fbbf24;

  --focus-ring: 0 0 0 3px rgba(208,180,104,0.25);
  --overlay-bg: rgba(6,4,2,0.75);

  /* Component tokens (obsidian-dark) */
  --text-heading: #ece6de;
  --code-bg: rgba(255,255,255,0.05);
  --code-fg: #dcd4ca;
  --canvas-dot: #383230;
  --table-band-even: var(--bg-white);
  --table-band-odd: var(--bg-surface);
  --table-band-even-hover: var(--bg-hover);
  --table-band-odd-hover: var(--bg-hover);
  --table-band-even-sel: rgba(208,180,104,0.08);
  --table-band-odd-sel: rgba(208,180,104,0.12);
  --table-row-sel: rgba(208,180,104,0.06);
  --cal-hover: var(--bg-hover);
  --cal-today: rgba(208,180,104,0.1);
  --cal-today-hover: rgba(208,180,104,0.18);
  --cal-weekend: var(--bg-surface);
  --cal-weekend-hover: var(--bg-hover);
  --cal-selected: rgba(208,180,104,0.15);
  --cal-pill-mix-base: var(--bg-white);
  --scenario-active-bg: rgba(208,180,104,0.1);
  --gantt-grid: #383230;
  --or-group-bg: rgba(208,180,104,0.05);
  --or-group-hover: rgba(208,180,104,0.1);
  --or-group-sel: rgba(208,180,104,0.16);
  --or-type-badge-bg: rgba(208,180,104,0.1);
  --or-type-badge-fg: #e8d498;
  --or-type-badge-border: #d0b468;
  --badge-ok-bg: rgba(120,204,150,0.09);
  --badge-ok-fg: #90e0ae;
  --badge-warn-bg: rgba(224,184,80,0.09);
  --badge-warn-fg: #ecd080;
  --badge-err-bg: rgba(232,128,128,0.09);
  --badge-err-fg: #f0a0a0;
  --hint-bg: rgba(208,180,104,0.07);
  --hint-fg: #e8d498;
  --hint-border: #d0b468;
  --hint-bottleneck-bg: rgba(248,113,113,0.08);
  --hint-bottleneck-fg: #fca5a5;
  --hint-bottleneck-border: #f87171;
  --hint-info-bg: rgba(208,180,104,0.07);
  --hint-info-fg: #e8d498;
  --hint-info-border: #dcc480;
  --chat-system-bg: rgba(208,180,104,0.08);
  --chat-system-fg: #e8d498;
  --chip-bg: rgba(208,180,104,0.1);
  --chip-fg: #e8d498;
  --sched-status-done-bg: rgba(120,204,150,0.09);
  --sched-status-done-fg: #90e0ae;
  --sched-status-prog-bg: rgba(208,180,104,0.08);
  --sched-status-prog-fg: #e8d498;
  --sched-status-btn-bg: rgba(232,128,128,0.08);
  --sched-status-btn-fg: #f0a0a0;
  --sched-badge-yes-bg: rgba(208,180,104,0.08);
  --sched-badge-yes-fg: #e8d498;
  --sched-badge-no-bg: rgba(255,255,255,0.04);
  --sched-badge-no-fg: var(--text-secondary);
  --sched-risk-green-bg: rgba(120,204,150,0.09);
  --sched-risk-green-fg: #90e0ae;
  --sched-risk-amber-bg: rgba(224,184,80,0.09);
  --sched-risk-amber-fg: #ecd080;
  --sched-risk-red-bg: rgba(232,128,128,0.09);
  --sched-risk-red-fg: #f0a0a0;
  --sched-dep-fg: var(--text-primary);
  --chat-action-bg: rgba(120,204,150,0.07);
  --chat-action-border: rgba(120,204,150,0.16);
  --chat-action-fg: #90e0ae;
  --chat-action-err-bg: rgba(232,128,128,0.07);
  --chat-action-err-border: rgba(232,128,128,0.16);
  --chat-action-err-fg: #f0a0a0;
  --chat-action-pend-bg: rgba(208,180,104,0.07);
  --chat-action-pend-border: rgba(208,180,104,0.16);
  --chat-action-pend-fg: #e8d498;

  /* Toolbox / Kanban / Tabs */
  --toolbox-header-fg: #dcc480;
  --kanban-scope-fg: #dcc480;
  --kanban-scope-bg: rgba(220,196,128,0.12);
  --tab-objectives-fg: #dcc480;
  --tab-objectives-border: #d0b468;
  --tab-plan-fg: #dcc480;
  --tab-plan-border: #d0b468;
  --tab-schedule-fg: #dcc480;
  --tab-schedule-border: #d0b468;
  --node-task-header: #222020;

  --toolbar-bg: #0a0908; --toolbar-fg: #d8d0c4; --toolbar-border: #242018;
  --toolbar-muted: rgba(216,208,196,0.35); --toolbar-link: #8a7a68; --toolbar-link-hover: #d8d0c4;
  --toolbar-btn-bg: rgba(255,255,255,0.05); --toolbar-btn-bg-hover: rgba(255,255,255,0.1);
  --toolbar-btn-border: rgba(255,255,255,0.06); --toolbar-icon-fg: rgba(216,208,196,0.5); --toolbar-icon-fg-hover: #d8d0c4;
  --edge-default: #3a3428; --edge-seq: #4ade80; --edge-or: #dcc480; --edge-preview: #2a2418; --edge-delete-bg: #1c1916;
  --node-text: #fff; --node-port-seq: #4ade80; --node-port-seq-stroke: #22c55e;
  --node-port-or: #dcc480; --node-port-or-stroke: #b8a460;
  --node-bottleneck: #f87171; --node-progress-track: #242018; --node-progress-fill: #d0b468;
  --node-success-badge: #4ade80; --node-info-badge: #d0b468;
  --gantt-seg-1: #4ade80; --gantt-seg-2: #fbbf24; --gantt-seg-3: #a78bfa;
  --gantt-seg-4: #fb923c; --gantt-seg-5: #f87171; --gantt-seg-6: #38bdf8; --gantt-seg-7: #f472b6;
  --gantt-bar-done: #3a3428; --gantt-bar-normal: #4ade80; --gantt-bar-bottleneck: #f87171; --gantt-bar-text: #fff;
  --hist-bar: #fbbf24; --hist-bar-duration: #fbbf24; --hist-p10: #4ade80; --hist-p50: #fb923c; --hist-p90: #f87171;
  --input-bg: #1c1916; --input-fg: #d8d0c4; --input-border: #242018; --input-focus-border: #d0b468;
  --chat-user-bg: #c8a85c; --chat-user-fg: #141210;
  --chat-code-bg: rgba(255,255,255,0.05); --chat-code-fg: #d8d0c4;
}



/* ── 4. CSS Reset & Base Typography ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%; width: 100%;
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
}

/* ── 5. Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
[data-mode="dark"] ::-webkit-scrollbar-thumb { background: #4a5568; }
[data-mode="dark"] ::-webkit-scrollbar-thumb:hover { background: #6b7280; }

/* ── 6. Utilities ── */
.hidden { display: none !important; }
.loading { text-align: center; padding: 80px 20px; color: var(--text-secondary); font-size: 15px; }

/* ── 7. Toolbar ── */
.toolbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--toolbar-bg); color: var(--toolbar-fg);
  border-bottom: 1px solid var(--toolbar-border);
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.toolbar-left { display: flex; align-items: center; gap: 14px; }
.toolbar-center { display: flex; align-items: center; gap: 12px; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.toolbar-logo { display: inline-flex; flex-shrink: 0; text-decoration: none; }
.toolbar-logo svg { width: 28px; height: 28px; }
.toolbar-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.toolbar-title span { color: var(--toolbar-muted); font-weight: 400; }
.toolbar-right a {
  color: var(--toolbar-link); font-size: 13px; text-decoration: none; font-weight: 600;
  padding: 6px 14px; border-radius: var(--radius); background: var(--toolbar-btn-bg);
  border: 1px solid var(--toolbar-btn-border); transition: all var(--transition);
}
.toolbar-right a:hover { color: var(--toolbar-link-hover); background: var(--toolbar-btn-bg-hover); border-color: var(--toolbar-btn-bg-hover); }
.toolbar-role {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 10px;
}
.toolbar-role.role-owner { background: rgba(51,153,255,0.2); color: #7cb8ff; }
.toolbar-role.role-admin { background: rgba(255,142,0,0.2); color: #ffb84d; }
.toolbar-role.role-member { background: var(--toolbar-btn-bg); color: var(--toolbar-link); }

/* Status indicator (toolbar) */
.status-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 12px;
  background: var(--toolbar-btn-bg); font-size: 12px;
}
.status-indicator svg { width: 12px; height: 12px; }

/* Theme toggle button */
.toolbar-icon-btn {
  background: var(--toolbar-btn-bg); border: 1px solid var(--toolbar-btn-border);
  border-radius: var(--radius-lg); padding: 6px; cursor: pointer;
  color: var(--toolbar-icon-fg); transition: all var(--transition);
  display: inline-flex; align-items: center; justify-content: center;
}
.toolbar-icon-btn:hover { background: var(--toolbar-btn-bg-hover); color: var(--toolbar-icon-fg-hover); }
.toolbar-icon-btn svg { width: 18px; height: 18px; }

/* Theme toggle icon visibility — controlled by data-mode-pref and data-special */
.icon-sun, .icon-system, .icon-special { display: none; }
[data-mode-pref="dark"] .icon-moon { display: none; }
[data-mode-pref="dark"] .icon-sun { display: block; }
[data-mode-pref="system"] .icon-moon { display: none; }
[data-mode-pref="system"] .icon-system { display: block; }
/* Special theme active: show special icon instead of mode icon */
:root[data-special] .icon-moon { display: none; }
:root[data-special] .icon-sun { display: none; }
:root[data-special] .icon-system { display: none; }
:root[data-special] .icon-special { display: block; }
.icon-special svg { width: 18px; height: 18px; }

/* Theme dropdown (long-press menu) */
.theme-dropdown {
  position: absolute; top: 100%; right: 0; z-index: 300;
  margin-top: 6px; min-width: 280px;
  max-width: calc(100vw - 16px);
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 4px 0; animation: modal-slide-up 0.15s ease;
}
.theme-dropdown-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  padding: 8px 14px 4px;
}
.theme-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 14px; border: none; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  color: var(--text-primary); transition: background var(--transition);
  text-align: left;
}
.theme-dropdown-item:hover { background: var(--bg-hover); }
.theme-dropdown-item.active { color: var(--btn-blue); }
.theme-dropdown-icon { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; }
.theme-dropdown-icon svg { width: 18px; height: 18px; }
.theme-dropdown-text { flex: 1; }
.theme-dropdown-check { font-size: 14px; color: var(--btn-blue); flex-shrink: 0; }
.theme-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Special themes container: 3 columns at every screen size. On phones
   items use minmax(0, 1fr) and shrink to fit ~320px-wide screens (the
   theme-dropdown's max-width caps it to viewport — 16px); on larger
   screens items get more breathing room via minmax(120px, 1fr). */
.theme-dropdown-specials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: calc(100dvh - 160px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.theme-dropdown-specials .theme-dropdown-item {
  padding: 8px 6px;
  gap: 6px;
  font-size: 12px;
  min-width: 0;
  justify-content: center;
}
.theme-dropdown-specials .theme-dropdown-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-dropdown-specials .theme-dropdown-icon { width: 16px; height: 16px; }
.theme-dropdown-specials .theme-dropdown-icon svg { width: 16px; height: 16px; }
@media (min-width: 600px) {
  .theme-dropdown {
    min-width: auto;
    width: max-content;
  }
  .theme-dropdown-specials {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    max-height: calc(100dvh - 120px);
  }
  .theme-dropdown-specials .theme-dropdown-item {
    padding: 8px 14px;
    font-size: 13px;
    justify-content: flex-start;
  }
  .theme-dropdown-specials .theme-dropdown-icon,
  .theme-dropdown-specials .theme-dropdown-icon svg { width: 18px; height: 18px; }
}

/* ── 8. Sidebar Navigation ── */
.sidebar {
  width: 168px; min-width: 168px;
  background: var(--bg-white); border-right: 1px solid var(--border);
  padding: 12px 0; overflow-y: auto;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 8px; padding: 7px 16px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; border-left: 3px solid transparent;
  transition: all var(--transition);
}
.sidebar-nav a svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.5; }
.sidebar-nav a:hover { color: var(--text-primary); background: var(--bg-light); }
.sidebar-nav a:hover svg { opacity: 0.8; }
.sidebar-nav a.active {
  border-left-color: var(--light-blue); background: var(--bg-light); color: var(--text-heading);
}
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-nav a[disabled] { opacity: 0.35; pointer-events: none; }
.nav-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted); padding: 16px 19px 4px;
}
.nav-group-label:first-child { padding-top: 8px; }

/* ── 9. Section Cards ── */
.section-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: var(--bg-card-header);
}
.section-header span {
  font-size: 14px; font-weight: 700; color: var(--text-heading);
}
.section-header-count {
  font-size: 12px; color: var(--text-muted); font-family: var(--font-mono);
}

/* ── 10. Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px; border: none; border-radius: var(--radius-lg);
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--btn-blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--btn-blue-hover); box-shadow: 0 2px 8px rgba(26,135,227,0.25); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-secondary { background: var(--bg-light); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border); }

/* ── 11. Badges ── */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-done { background: rgba(34,197,94,0.1); color: #16a34a; }
.badge-pending { background: rgba(245,158,11,0.12); color: var(--warning-amber); }
.badge-failed { background: rgba(239,68,68,0.1); color: var(--error-red); }
.badge-confirmed { background: rgba(6,95,70,0.1); color: #065f46; }
.badge-declined { background: rgba(153,27,27,0.1); color: #991b1b; }
.badge-conflict { background: rgba(153,27,27,0.1); color: #991b1b; }
[data-mode="dark"] .badge-done { background: rgba(74,222,128,0.15); color: #4ade80; }
[data-mode="dark"] .badge-confirmed { background: rgba(74,222,128,0.12); color: #6ee7b7; }
[data-mode="dark"] .badge-declined { background: rgba(248,113,113,0.12); color: #fca5a5; }
[data-mode="dark"] .badge-conflict { background: rgba(248,113,113,0.12); color: #fca5a5; }

/* Role badges */
.role-badge {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.role-owner { background: rgba(29,78,216,0.1); color: #1d4ed8; }
.role-admin { background: rgba(146,64,14,0.1); color: #92400e; }
.role-member { background: rgba(107,114,128,0.08); color: #6b7280; }
[data-mode="dark"] .role-owner { background: rgba(96,165,250,0.15); color: #93c5fd; }
[data-mode="dark"] .role-admin { background: rgba(251,191,36,0.15); color: #fcd34d; }
[data-mode="dark"] .role-member { background: rgba(148,163,184,0.12); color: #94a3b8; }

/* ── 12. Messages / Alerts ── */
.msg { padding: 12px 16px; border-radius: var(--radius-lg); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.msg-error { background: #fef2f2; color: var(--error-red); border: 1px solid #fecaca; }
.msg-success { background: #f0fdf4; color: var(--success-green); border: 1px solid #bbf7d0; }
[data-mode="dark"] .msg-error { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.2); }
[data-mode="dark"] .msg-success { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.2); }

/* ── 13. Form Inputs ── */
.text-input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); font-size: 14px; font-family: inherit;
  background: var(--bg-white); color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.text-input:focus { outline: none; border-color: var(--btn-blue); box-shadow: var(--focus-ring); }
.text-input:disabled { background: var(--bg-light); color: var(--text-secondary); }

/* ── 14. Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--overlay-bg); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: modal-fade-in 0.18s ease;
}

/* Offline-mode UI treatment — amber viewport border + "Offline" pill that
   straddles the top border over the cloud-backup icon. Implemented as a
   fixed-positioned ::before on <html> so it floats above #app (which fills
   the viewport and would otherwise hide a body-level box-shadow). The pill
   is rendered once into the toolbar and also sits at position:fixed; its X
   is computed in JS to track the cloud-backup button across window resizes. */
html[data-offline="true"]::before {
  content: "";
  position: fixed;
  inset: 0;
  border: 4px solid var(--warning-amber, #f59e0b);
  pointer-events: none;
  z-index: 10000;
}
.offline-pill {
  display: none;
  position: fixed;
  top: 0;                              /* pill's top edge at the viewport top edge */
  transform: translate(-50%, -25%);       /* horizontal center only — pill overlaps the amber border */
  background: var(--warning-amber, #f59e0b);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10001;                       /* above the border overlay */
}
html[data-offline="true"] .offline-pill { display: inline-block; }
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-slide-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.modal-card {
  background: var(--bg-white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 440px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px); overflow-y: auto;
  animation: modal-slide-up 0.22s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 800; color: var(--text-heading); letter-spacing: -0.3px; }
.modal-close {
  width: 28px; height: 28px; border: none; background: none; cursor: pointer;
  color: var(--text-secondary); border-radius: var(--radius); display: flex;
  align-items: center; justify-content: center; transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-light); color: var(--text-primary); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 20px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 24px; border-top: 1px solid var(--border);
}
.modal-note {
  font-size: 12px; line-height: 1.5; padding: 10px 14px; border-radius: var(--radius-lg);
  display: flex; align-items: flex-start; gap: 8px;
}
.modal-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.modal-note-info { background: rgba(51,153,255,0.06); color: var(--accent-blue); border: 1px solid rgba(51,153,255,0.12); }
.modal-note-warn { background: rgba(245,158,11,0.08); color: #92400e; border: 1px solid rgba(245,158,11,0.15); }
.modal-note-error { background: rgba(239,68,68,0.06); color: var(--error-red); border: 1px solid rgba(239,68,68,0.12); }
[data-mode="dark"] .modal-note-info { background: rgba(51,153,255,0.1); color: #7cb8ff; border-color: rgba(51,153,255,0.2); }
[data-mode="dark"] .modal-note-warn { background: rgba(251,191,36,0.1); color: #fcd34d; border-color: rgba(251,191,36,0.2); }

/* ── 15. Empty State ── */
.empty-state {
  padding: 32px 20px; text-align: center; color: var(--text-secondary);
  font-size: 13px;
}

/* ============================================================
   16. Task Inspector (shared by scheduler.html + team.html)
   ============================================================ */
.inspector-content { flex: 1; overflow-y: auto; padding: 0; }
.inspector-empty {
  display: flex; align-items: center; justify-content: center;
  height: 200px; color: var(--text-secondary); font-size: 13px; text-align: center;
  padding: 20px;
}
.inspector-section {
  padding: 12px 15px; border-bottom: 1px solid var(--border);
}
.gated-section .gated-overlay {
  text-align: center; padding: 12px 8px;
  background: linear-gradient(to bottom, rgba(255,142,0,0.05), rgba(255,142,0,0.1));
  border-radius: 8px; margin-top: 4px;
}
.gated-overlay p { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.gated-overlay .upgrade-btn { font-size: 12px; padding: 6px 14px; }
.inspector-header {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 13px; margin-bottom: 10px;
  color: var(--text-heading);
}
.inspector-header svg { width: 16px; height: 16px; }
.inspector-field {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px;
}
.inspector-field label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--text-muted); letter-spacing: 0.06em;
}
.inspector-value {
  font-family: var(--font-mono); font-size: 13px;
  padding: 4px 0; color: var(--text-primary);
}
.inspector-value.computed { color: var(--accent-blue); }
.inspector-actions { display: flex; gap: 8px; }
.bottleneck-warning {
  background: #fef2f2; padding: 8px 10px !important; border-radius: var(--radius);
}
.bottleneck-severity { color: var(--error-red); font-weight: 700; font-size: 13px; }
.bottleneck-reason { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.understaffed-alert {
  border-radius: var(--radius);
  padding: 8px 10px !important;
}
.understaffed-gap-list {
  margin: 4px 0 0; padding-left: 18px; font-size: 12px; color: var(--text-secondary);
  list-style: none;
}
.understaffed-gap-list li::before {
  content: '•'; color: var(--text-secondary); font-weight: 700; margin-right: 6px; margin-left: -14px;
}
.understaffed-gap-sublist {
  margin: 2px 0 0; padding-left: 16px; list-style: none;
  font-size: 11px;
}
.understaffed-gap-sublist li::before {
  content: '–'; font-weight: 400; margin-right: 5px; margin-left: -14px;
}
.te-dep-row {
  font-size: 12px; padding: 3px 0; color: var(--text-primary);
}

/* ── Schedule-mode inspector subsections ── */
.sched-insp-status { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 8px; margin-left: 8px; }
.sched-insp-status.completed { background: var(--sched-status-done-bg); color: var(--sched-status-done-fg); }
.sched-insp-status.in-progress { background: var(--sched-status-prog-bg); color: var(--sched-status-prog-fg); }
.sched-insp-status.bottleneck { background: var(--sched-status-btn-bg); color: var(--sched-status-btn-fg); }
.sched-insp-status.scheduled { background: var(--sched-status-done-bg); color: var(--sched-status-done-fg); }

.sched-insp-detail { display: flex; justify-content: space-between; font-size: 12px; padding: 2px 0; }
.sched-insp-detail-label { color: var(--text-secondary); }
.sched-insp-detail-value { font-weight: 600; color: var(--text-primary); }
.sched-insp-badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 8px;
  font-weight: 600; margin-left: 4px; }
.sched-insp-badge.yes { background: var(--sched-badge-yes-bg); color: var(--sched-badge-yes-fg); }
.sched-insp-badge.no { background: var(--sched-badge-no-bg); color: var(--sched-badge-no-fg); }

.sched-insp-people { display: flex; flex-direction: column; gap: 6px; }
.sched-insp-person { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.sched-insp-person-name { font-weight: 600; }
.sched-insp-risk-badge { font-size: 10px; padding: 2px 6px; border-radius: 8px; font-weight: 600; }
.sched-insp-risk-badge.green { background: var(--sched-risk-green-bg); color: var(--sched-risk-green-fg); }
.sched-insp-risk-badge.amber { background: var(--sched-risk-amber-bg); color: var(--sched-risk-amber-fg); }
.sched-insp-risk-badge.red { background: var(--sched-risk-red-bg); color: var(--sched-risk-red-fg); }
.sched-insp-avail { font-size: 10px; color: var(--text-secondary); }

.sched-insp-lock-btn { background: none; border: none; cursor: pointer; padding: 2px; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--text-secondary); flex-shrink: 0; transition: color 0.15s; }
.sched-insp-lock-btn:hover { color: var(--text-primary, #374151); }
.sched-insp-lock-btn.locked { color: #22c55e; }
.sched-insp-lock-btn.locked:hover { color: #16a34a; }
.sched-insp-lock-btn svg { width: 14px; height: 14px; }

.sched-insp-deps { display: flex; flex-direction: column; gap: 4px; }
.sched-insp-dep-item { font-size: 12px; color: var(--sched-dep-fg, var(--text-primary)); }
.sched-insp-dep-date { font-size: 10px; color: var(--text-secondary); margin-left: 4px; }
.sched-insp-slack { color: #22c55e; font-size: 10px; font-weight: 600; margin-left: 4px; }
.sched-insp-immediate { color: #22c55e; font-size: 10px; font-weight: 600; margin-left: 4px; }

.sched-insp-hint { background: var(--hint-bg); border-left: 3px solid var(--hint-border); padding: 8px 10px;
  font-size: 11px; color: var(--hint-fg); border-radius: 0 4px 4px 0; margin-top: 4px; }
.sched-insp-hint.bottleneck { background: var(--hint-bottleneck-bg); border-color: var(--hint-bottleneck-border); color: var(--hint-bottleneck-fg); }
.sched-insp-hint.info { background: var(--hint-info-bg); border-color: var(--hint-info-border); color: var(--hint-info-fg); }

/* Small action button used in inspector ("Record/Update Actual Duration") */
.small-btn {
  font-size: 12px; padding: 5px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-white);
  color: var(--text-primary); cursor: pointer; font-family: inherit;
  transition: var(--transition);
}
.small-btn:hover { background: var(--bg-hover); }

/* ================================================================
   Markdown + LaTeX rendering (rich-text surfaces)
   ================================================================ */

/* Element spacing inside any .md-wrapped block of markdown output. */
.md > *:first-child { margin-top: 0; }
.md > *:last-child  { margin-bottom: 0; }
.md p               { margin: 0.35em 0; }
.md ul, .md ol      { margin: 0.35em 0; padding-left: 1.4em; }
.md li              { margin: 0.15em 0; }
.md li > p          { margin: 0; }
.md h1, .md h2, .md h3, .md h4 {
  margin: 0.6em 0 0.25em;
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.25;
}
.md h1 { font-size: 1.15em; }
.md h2 { font-size: 1.1em; }
.md code {
  background: var(--bg-hover, rgba(0,0,0,0.06));
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: var(--font-mono, 'Inconsolata', monospace);
  word-break: break-word;
}
.md pre {
  background: var(--bg-hover, rgba(0,0,0,0.06));
  padding: 0.6em 0.75em;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.9em;
  margin: 0.45em 0;
}
.md pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}
.md blockquote {
  border-left: 3px solid var(--border, #d0d5dd);
  padding-left: 0.75em;
  margin: 0.45em 0;
  color: var(--text-secondary, #4a5568);
}
.md table {
  border-collapse: collapse;
  margin: 0.45em 0;
  font-size: 0.95em;
}
.md table th,
.md table td {
  border: 1px solid var(--border, #d0d5dd);
  padding: 0.3em 0.55em;
  text-align: left;
}
.md table th {
  background: var(--bg-hover, rgba(0,0,0,0.03));
  font-weight: 600;
}
.md a {
  color: var(--light-blue, #2196f3);
  text-decoration: none;
}
.md a:hover { text-decoration: underline; }
.md hr {
  border: none;
  border-top: 1px solid var(--border, #d0d5dd);
  margin: 0.8em 0;
}
.md img {
  max-width: 100%;
  height: auto;
}

/* Inline variant — no block-level margins; used inside <span> chips. */
.md-inline {
  display: inline;
}
.md-inline > * {
  display: inline;
  margin: 0;
}

/* KaTeX tweaks — keep inline math baseline-aligned and contain display math. */
.katex { font-size: 1em; }
.katex-display {
  margin: 0.35em 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.katex-display > .katex { text-align: inherit; }

/* Live-preview markdown editor */
.md-editor {
  cursor: text;
  min-height: 1.4em;
  border-radius: 4px;
  transition: background-color 120ms ease, border-color 120ms ease;
  outline: none;
}
.md-field.md-editor {
  /* fields embedded in forms inherit layout from their container */
  word-break: break-word;
}
.md-editor:hover:not(.md-editing) {
  background: var(--bg-hover, rgba(0,0,0,0.04));
}
.md-editor.md-editing {
  background: var(--bg-white, #fff);
  border-color: var(--input-focus-border, #2196f3);
  box-shadow: var(--focus-ring, 0 0 0 2px rgba(33,150,243,0.25));
}
.md-editor.md-empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted, #94a3b8);
  pointer-events: none;
  font-style: italic;
}
.md-editor.md-empty.md-editing::before {
  /* Hide the placeholder while editing so the caret lands at the
     field origin rather than after the placeholder text — the
     pseudo-element renders BEFORE the empty segment children, which
     would otherwise push the caret past the placeholder run.
     The field's min-height is kept honest by the zero-width-space
     pseudo on the empty active segment (rule below), so the box
     doesn't collapse to 0 even though no rendered text is present. */
  content: '';
}

/* Segment model used by attachMarkdownEditor while editing.
   Each child of .md-editor.md-editing is a <span>/<div> segment. The
   one whose source range contains the caret carries .md-seg-active and
   is contenteditable=true; others carry contenteditable=false and show
   rendered HTML. */
.md-editor.md-editing > .md-seg {
  /* Nothing by default — segment-type classes below configure layout. */
}
.md-editor.md-editing > .md-seg-block,
.md-editor.md-editing > .md-seg-list-item {
  display: block;
}
.md-editor.md-editing > .md-seg-block-raw {
  display: block;
  white-space: pre-wrap;
  font-family: var(--font-mono, 'Inconsolata', monospace);
  margin: 0;
}
.md-editor.md-editing > .md-seg-plain,
.md-editor.md-editing > .md-seg-inline,
.md-editor.md-editing > .md-seg-latex {
  display: inline;
}
.md-editor.md-editing > .md-seg-plain {
  white-space: pre-wrap;
}
.md-editor.md-editing > .md-seg-break {
  display: none;
}
/* Active-segment affordance: subtle highlight + monospace so the user
   sees they're editing raw markdown syntax. Scoped to token-style
   segments only — plain prose looks like normal prose even when it
   holds the caret, so the "raw zone" never extends beyond the token
   the user is actually editing. */
.md-editor.md-editing > .md-seg-inline.md-seg-active,
.md-editor.md-editing > .md-seg-latex.md-seg-active,
.md-editor.md-editing > .md-seg-block-raw.md-seg-active {
  background: rgba(33, 150, 243, 0.08);
  border-radius: 2px;
  font-family: var(--font-mono, 'Inconsolata', monospace);
  white-space: pre-wrap;
  outline: none;
}
.md-editor.md-editing > .md-seg-plain.md-seg-active,
.md-editor.md-editing > .md-seg-list-item.md-seg-active {
  outline: none;
}
/* When the active segment has no rendered content (the user has
   deleted everything during editing, or focus just entered an empty
   field), inject a zero-width-space via a pseudo-element. Without
   this, an empty inline contenteditable establishes no line box and
   the .md-editor parent collapses to 0 height despite min-height —
   visibly shrinking the kanban scope / action item description fields
   on iPhone Safari. The zero-width space is invisible to the user and
   is not part of textContent, so _collectRawText still treats the
   segment as empty. */
.md-editor.md-editing > .md-seg-active:empty::before {
  content: '\200B';
}
.md-editor.md-editing > .md-seg-latex {
  cursor: text;
}
/* Rendered inline markdown inside segments should flow naturally. */
.md-editor.md-editing > .md-seg-inline > * {
  display: inline;
}
