/* Classic UI foundation v1. Semantic tokens only; safe to load without opting in. */
:root {
  --ui-color-scheme: dark;
  --ui-bg: #0c0f0b;
  --ui-surface: #141814;
  --ui-surface-low: #10130f;
  --ui-surface-high: #1a211a;
  --ui-border: #2a3227;
  --ui-border-quiet: #222b21;
  --ui-border-control: #56644c;
  --ui-text: #e8eee6;
  --ui-muted: #b3beaf;
  --ui-heading: #c1cbbb;
  --ui-accent: #2fe36a;
  --ui-accent-soft: rgb(47 227 106 / 9%);
  --ui-gold: #ffcc00;
  --ui-info: #a5caff;
  --ui-warning: #f4c486;
  --ui-danger: #ff927b;
  /* Count badges share the approved light palette in both themes. */
  --ui-count-ink: #fff;
  --ui-count-main-fill: #b33524;
  --ui-count-sub-fill: #895000;
  --ui-count-clear-fill: #116c32;
  --ui-panel-fill: linear-gradient(180deg, #141814, #10130f);
  --ui-hero-fill: radial-gradient(ellipse at 100% 0%, #2fe36a21, transparent 68%), linear-gradient(180deg, #161a15, #0e110d);
  --ui-vip-fill: linear-gradient(180deg, #ffd45e, #f0a828);
  --ui-gloss: inset 0 1px 0 rgb(255 255 255 / 3.5%);
  --ui-popover-shadow: 0 .875rem 2.5rem #0008, inset 0 1px 0 #ffffff08;
  --ui-font: Arial, Helvetica, sans-serif;
  --ui-font-system: "Segoe UI", system-ui, -apple-system, sans-serif;
  --ui-root-size: 100%;
  --ui-text-xs: .75rem;
  --ui-text-sm: .8125rem;
  --ui-text-label: .875rem;
  --ui-text-nav: .9375rem;
  --ui-text-body: 1rem;
  --ui-text-title: 1.375rem;
  --ui-text-value: 1.875rem;
  --ui-leading: 1.5;
  --ui-space-1: .25rem;
  --ui-space-2: .5rem;
  --ui-space-3: .75rem;
  --ui-space-4: 1rem;
  --ui-space-5: 1.25rem;
  --ui-space-6: 1.5rem;
  --ui-radius-sm: .375rem;
  --ui-radius-control: .5625rem;
  --ui-radius-panel: .75rem;
  --ui-radius-hero: .875rem;
  --ui-sidebar-width: 15.25rem;
  --ui-rail-width: 5rem;
  --ui-gutter: clamp(1rem, 2vw, 2.5rem);
  --ui-focus: 2px solid var(--ui-accent);
  --ui-target: 2.75rem;
  --ui-layer-header: 10;
  --ui-layer-backdrop: 30;
  --ui-layer-sidebar: 40;
  --ui-layer-flyout: 50;
  --ui-motion-fast: 150ms;
  --ui-hover-open-ms: 120;
  --ui-hover-close-ms: 300;
}
/* Light is opt-in. Component aliases are intentionally absent in dark/legacy:
   each module's var() fallback preserves its exact original dark color/gradient stop. */
html.ui-root[data-ui-theme="light"], html.auth-root[data-ui-theme="light"] {
  --ui-color-scheme: light;
  --ui-bg: #f4f6f2;
  --ui-surface: #ffffff;
  --ui-surface-low: #eef2eb;
  --ui-surface-high: #e4ecdf;
  --ui-border: #d5ddd0;
  --ui-border-quiet: #e0e6dc;
  --ui-border-control: #7c8b75;
  --ui-text: #202820;
  --ui-muted: #576352;
  --ui-heading: #3f503a;
  --ui-accent: #116c32;
  --ui-accent-soft: rgb(22 124 58 / 8%);
  --ui-gold: #795500;
  --ui-info: #245ba5;
  --ui-warning: #895000;
  --ui-danger: #b33524;
  --ui-summary-fill: linear-gradient(180deg, var(--ui-surface) 0%, var(--ui-surface-low) 100%);
  --ui-summary-border: var(--ui-border);
  --ui-summary-divider: var(--ui-border);
  --ui-input-border: var(--ui-border-control);
  --ui-primary-hover: #0d5c29;
  --ui-primary-active: #094a21;
  --ui-count-ink: #fff;
  --ui-count-main-fill: var(--ui-danger);
  --ui-count-sub-fill: var(--ui-warning);
  --ui-count-clear-fill: var(--ui-accent);
  --ui-panel-fill: linear-gradient(180deg, #fff, #f7f9f5);
  --ui-hero-fill: radial-gradient(ellipse at 100% 0%, #167c3a12, transparent 68%), linear-gradient(180deg, #fff, #eef4e9);
  --ui-gloss: inset 0 1px 0 rgb(255 255 255 / 60%);
  --ui-popover-shadow: 0 .875rem 2.5rem #20282026, inset 0 1px 0 #fff;
  --ui-theme-ink-body: var(--ui-text);
  --ui-theme-ink-muted: var(--ui-muted);
  --ui-theme-ink-accent: var(--ui-accent);
  --ui-theme-ink-warning: var(--ui-warning);
  --ui-theme-ink-danger: var(--ui-danger);
  --ui-theme-ink-info: var(--ui-info);
  --ui-theme-ink-purple: #70419d;
  --ui-theme-ink-pink: #a02767;
  --ui-theme-on-accent: #fff;
  --ui-theme-fill-panel: var(--ui-surface);
  --ui-theme-fill-control: #f9fbf7;
  --ui-theme-fill-raised: var(--ui-surface-high);
  --ui-theme-fill-hover: rgb(32 40 32 / 3%);
  --ui-theme-fill-accent: var(--ui-accent);
  --ui-theme-fill-warning: var(--ui-warning);
  --ui-theme-fill-danger: var(--ui-danger);
  --ui-theme-fill-info: var(--ui-info);
  --ui-theme-fill-purple: #70419d;
  --ui-theme-fill-soft-accent: rgb(22 124 58 / 8%);
  --ui-theme-fill-soft-warning: rgb(137 80 0 / 8%);
  --ui-theme-fill-soft-danger: rgb(179 53 36 / 8%);
  --ui-theme-fill-soft-info: rgb(36 91 165 / 8%);
  --ui-theme-fill-soft-purple: rgb(112 65 157 / 8%);
  --ui-theme-line: var(--ui-border);
  --ui-theme-line-control: var(--ui-border-control);
  --ui-theme-line-accent: var(--ui-accent);
  --ui-theme-line-warning: var(--ui-warning);
  --ui-theme-line-danger: var(--ui-danger);
  --ui-theme-line-info: var(--ui-info);
  --ui-theme-scroll-thumb: #7c8b75;
  --ui-theme-scroll-track: var(--ui-surface-low);
  --ui-theme-shadow: rgb(32 40 32 / 12%);
  --ui-theme-gloss: rgb(255 255 255 / 55%);
  --ui-theme-glow-accent: rgb(22 124 58 / 12%);
  --ui-theme-glow-danger: rgb(179 53 36 / 12%);
  --ui-theme-glow-info: rgb(36 91 165 / 12%);
  --ui-theme-backdrop: rgb(3 6 3 / 50%);
}
/* CSS viewport width, not physical resolution. Bounded; respects browser text size. */
@media (min-width: 1600px) { :root { --ui-root-size: 106.25%; } }
@media (min-width: 2200px) { :root { --ui-root-size: 112.5%; } }
@media (min-width: 3000px) { :root { --ui-root-size: 125%; } }
