/* Shared UI primitives. Terminal surfaces deliberately keep their own dark palette. */
:root {
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "MesloLGS NF", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-size: 14px;
  --meta-size: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 4px;
  --radius-control: 6px;
  --radius-panel: 8px;
  --control-height: 40px;
  --control-compact: 32px;
  --header-height: 42px;
  --header-padding: 4px 12px;
  --header-gap: 6px 8px;
  --header-title-size: 14px;
  --sidebar-width: 236px;
  --terminal-bg: #070a0e;
  --terminal-text: #d6dde6;
  --terminal-muted: #a3afbd;
  --terminal-border: #364250;
  --heat-mid-text: #16200e;
}
:root, html[data-theme="dark"], .nativeconsole, .console {
  color-scheme: dark;
  --canvas: #0c1015;
  --surface: #141a22;
  --surface-raised: #1b232d;
  --surface-subtle: #10161d;
  --text: #e8edf3;
  --text-secondary: #bfccd9;
  --text-muted: #a1afbf;
  --border: #354250;
  --border-strong: #56677a;
  --control-bg: #1c2631;
  --control-hover: #2b3948;
  --input-bg: #101720;
  --disabled-bg: #222b35;
  --disabled-text: #8f9caa;
  --accent: #c1ed8c;
  --accent-bg: #25351e;
  --accent-border: #718f50;
  --primary-bg: #bbed80;
  --primary-hover: #cff7a6;
  --primary-text: #17260f;
  --focus: #c1ed8c;
  --link: #a3cdff;
  --info: #a3cdff;
  --info-bg: #172b43;
  --info-border: #5079a9;
  --success: #95e0af;
  --success-bg: #193526;
  --success-border: #478e61;
  --warning: #f0d27a;
  --warning-bg: #352d17;
  --warning-border: #947d3d;
  --danger: #ffb2ba;
  --danger-bg: #3b2026;
  --danger-hover: #522b34;
  --danger-border: #ab5b68;
  --purple: #d7bff6;
  --purple-bg: #30213f;
  --purple-border: #8a6ba8;
  --pink: #ff9fc2;
  --pink-bg: #371e2a;
  --pink-border: #a85575;
  --teal: #8edfdc;
  --teal-bg: #173435;
  --teal-border: #4c9394;
  --heat-1: #263b27;
  --heat-2: #365b2c;
  --heat-3: #4d7b35;
  --heat-4: #6da647;
  --heat-5: #96cf5c;
  --heat-text: #f1f8ed;
  --heat-strong-text: #10170c;
  --shadow: 0 12px 36px #0005;
}
html[data-theme="light"] {
  color-scheme: light;
  --canvas: #edf1f5;
  --surface: #ffffff;
  --surface-raised: #f3f6f9;
  --surface-subtle: #f7f9fb;
  --text: #202c39;
  --text-secondary: #405163;
  --text-muted: #536579;
  --border: #c3ceda;
  --border-strong: #7c8fa4;
  --control-bg: #ffffff;
  --control-hover: #e7eef5;
  --input-bg: #ffffff;
  --disabled-bg: #e6ebf0;
  --disabled-text: #657486;
  --accent: #3c641c;
  --accent-bg: #e8f2de;
  --accent-border: #71964f;
  --primary-bg: #426b24;
  --primary-hover: #31531a;
  --primary-text: #ffffff;
  --focus: #386bba;
  --link: #215b9f;
  --info: #215b9f;
  --info-bg: #e9f2ff;
  --info-border: #779ac7;
  --success: #22643c;
  --success-bg: #e9f5ed;
  --success-border: #7ca98b;
  --warning: #765509;
  --warning-bg: #fff5d9;
  --warning-border: #b49a4e;
  --danger: #a52c3e;
  --danger-bg: #fff0f2;
  --danger-hover: #f9dce2;
  --danger-border: #cf8591;
  --purple: #6b3c96;
  --purple-bg: #f3ecfc;
  --purple-border: #ab90c7;
  --pink: #9a325b;
  --pink-bg: #fff0f6;
  --pink-border: #c77c9b;
  --teal: #176568;
  --teal-bg: #e6f5f4;
  --teal-border: #70a9ab;
  --heat-1: #e1efd8;
  --heat-2: #c8e3b5;
  --heat-3: #a9d388;
  --heat-4: #82bc5d;
  --heat-5: #4c812f;
  --heat-text: #203315;
  --heat-strong-text: #ffffff;
  --shadow: 0 12px 36px #24394f18;
}
