/* Primitive values → semantic theme aliases → component tokens. */
:root {
  --color-blue-600: #0062b5;
  --color-blue-800: #004697;
  --color-cyan-300: #66d7ff;
  --color-amber-300: #ffb454;
  --color-white: #fff;
  --color-slate-50: #f4f7fb;
  --color-slate-100: #dbe5ef;
  --color-slate-500: #526a80;
  --color-slate-800: #16324b;
  --color-night-950: #080f1b;
  --color-night-900: #101e2f;
  --color-night-800: #16283c;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-control: 6px;
  --radius-menu: 10px;
  --radius-panel: 16px;
  --type-caption: 12px;
  --type-body: 14px;
  --type-lead: 16px;
  --type-section: 18px;
  --type-page: 32px;
  --size-control: 44px;
}

/* Classic theme and shared component measurements. */
:root {
  --ink: var(--color-slate-800);
  --muted: var(--color-slate-500);
  --line: var(--color-slate-100);
  --bg: var(--color-slate-50);
  --green: var(--color-blue-600);
  --dark: var(--color-blue-800);
  --lime: var(--gold);
  --pale: #e6f3fd;
  --white: var(--color-white);
  --radius: 14px;
  --shadow: 0 3px 14px #00469706;
  --blue: var(--color-blue-600);
  --cyan: #00a5ef;
  --gold: #fce67d;
  --orange: #ed7f25;
  --navy: #004697;
  --font-ui: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  --text-caption: var(--type-caption);
  --text-body: var(--type-body);
  --text-lead: var(--type-lead);
  --text-section: var(--type-section);
  --text-page: var(--type-page);
  --space-control: var(--space-3);
  --space-list: var(--space-3);
  --space-panel: var(--space-6);
  --space-tabs: var(--space-5);
  --control-height: var(--size-control);
  --select-surface: var(--ui-surface);
  --select-text: var(--ui-text);
  --select-muted: var(--ui-muted);
  --select-line: var(--ui-border);
  --select-accent: var(--ui-accent);
  --select-hover: #f1f7fd;
  --select-selected: #e8f3ff;
  --select-shadow: 0 10px 28px #16324b24;
  --ui-surface: var(--color-white);
  --ui-text: var(--ink);
  --ui-muted: var(--muted);
  --ui-border: var(--line);
  --ui-accent: var(--blue);
  --ui-danger: #ae3434;
  --ui-danger-bg: #fff1f1;
  --ui-success: #216b4e;
  --ui-success-bg: #eaf7f0;
  --ui-warning: #89571f;
  --ui-warning-bg: #f9efd9;
  --field-bg: #fcfdff;
  --field-border: #c6d7e7;
  --field-readonly: #edf2f7;
  --field-gap: var(--space-2);
  --field-space: var(--space-4);
  --actions-gap: var(--space-control);
}

/* Exploration theme: geometry and interaction remain shared. */
body.explore-ui {
  --personal-surface: #101e2f;
  --select-surface: var(--ui-surface);
  --select-text: var(--ui-text);
  --select-muted: var(--ui-muted);
  --select-line: var(--ui-border);
  --select-accent: var(--ui-accent);
  --select-hover: #1a3248;
  --select-selected: #17384b;
  --select-shadow: 0 12px 32px #0006;
  --explore-base: #080f1b;
  --explore-panel: #101e2f;
  --explore-raised: #16283c;
  --explore-text: #edf5ff;
  --explore-muted: #a8bbce;
  --explore-line: #294156;
  --explore-accent: #66d7ff;
  --explore-warm: #ffb454;
  --explore-tint: #19354a;
  --explore-control-line: #49617a;
  --nova-navy-950: #080f1b;
  --nova-navy-900: #101e2f;
  --nova-cyan-300: #66d7ff;
  --nova-orange-300: #ffb454;
  --nova-surface: var(--nova-navy-900);
  --nova-action: var(--nova-cyan-300);
  --nova-max: 1320px;
  --nova-gutter: clamp(20px,4.5vw,72px);
  --ink: #edf5ff;
  --muted: #a8bbce;
  --line: #294156;
  --blue: var(--nova-action);
  --green: #086fbc;
  --ui-surface: var(--color-night-900);
  --ui-text: var(--explore-text);
  --ui-muted: var(--explore-muted);
  --ui-border: #35516a;
  --ui-accent: var(--color-cyan-300);
  --ui-danger: #ffaaaa;
  --ui-danger-bg: #402632;
  --ui-success: #8ce4bb;
  --ui-success-bg: #16392f;
  --ui-warning: #ffbd69;
  --ui-warning-bg: #3b2d21;
  --field-bg: #0e2032;
  --field-border: #49617a;
  --field-readonly: #182a3d;
}
