/* P0099 · UNIT Workspace · Light / Dark semantic tokens.
   Light (default) = L3 Cinematic Light. Dark = 02C.2 Cinematic Compact Dark.
   Load before home-cinematic.css. The theme is `data-theme` on <html> (theme.ts › THEME_BOOT_SCRIPT applies the stored
   choice before first paint). Values come from the UNIT Ecosystem design system (ink #0D0D12, night #0B0B0F,
   interface violet #5A46DE) and the approved prototypes. All text pairs below meet WCAG AA (see docs/TOKENS.md). */

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --uws-bg: #FFFFFF;
  --uws-surface: #F5F5F8;          /* quiet fills: search field, chips */
  --uws-surface-raised: #FFFFFF;   /* panels, menus */
  --uws-text: #0D0D12;             /* 19.6:1 on bg */
  --uws-text-2: #3A3A44;           /* 11.4:1 */
  --uws-text-3: #5F5F6B;           /* 6.3:1  (meta, counters) */
  --uws-line: #ECECF0;
  --uws-line-strong: #DEDEE6;
  --uws-control-bg: #FFFFFF;
  --uws-control-border: #DEDEE6;
  --uws-control-hover: #F5F5F8;
  --uws-accent: #5A46DE;           /* 6.2:1 on bg */
  --uws-accent-hover: #4B39C9;
  --uws-accent-soft: #F1EFFC;
  --uws-focus: #5A46DE;
  --uws-inverse-bg: #0D0D12;
  --uws-inverse-text: #FFFFFF;
  --uws-header-bg: rgba(255, 255, 255, .86);
  --uws-toolbar-bg: rgba(255, 255, 255, .88);
  --uws-ring-gap: #FFFFFF;         /* gap between a focused card and its hue ring */
  --uws-shadow-pop: 0 12px 32px rgba(13, 13, 18, .10);
  --uws-scrim-modal: rgba(13, 13, 18, .55);

  /* Hero (light: copy is ink, sitting in the image-to-white fade) */
  --uws-hero-text: #0D0D12;
  --uws-hero-text-2: #2E2E36;
  --uws-hero-eyebrow: #2E2E36;
  --uws-hero-cta-bg: #0D0D12;
  --uws-hero-cta-text: #FFFFFF;
  --uws-hero-track: rgba(13, 13, 18, .16);
  --uws-hero-fill: #0D0D12;
  --uws-hero-step-bg: #FFFFFF;
  --uws-hero-step-border: #DEDEE6;
  --uws-glow-alpha: .14;
}

:root[data-theme="dark"] {
  --uws-bg: #0B0B0F;
  --uws-surface: rgba(255, 255, 255, .06);
  --uws-surface-raised: #16161C;
  --uws-text: #FFFFFF;             /* 19.4:1 on bg */
  --uws-text-2: #C9C9D1;           /* 12.0:1 */
  --uws-text-3: #A1A1AC;           /* 7.6:1  */
  --uws-line: rgba(255, 255, 255, .10);
  --uws-line-strong: rgba(255, 255, 255, .18);
  --uws-control-bg: rgba(255, 255, 255, .06);
  --uws-control-border: rgba(255, 255, 255, .22);
  --uws-control-hover: rgba(255, 255, 255, .12);
  --uws-accent: #B9A8FF;           /* 9.2:1 on bg */
  --uws-accent-hover: #CFC3FF;
  --uws-accent-soft: rgba(157, 133, 255, .16);
  --uws-focus: #B9A8FF;
  --uws-inverse-bg: #FFFFFF;
  --uws-inverse-text: #0D0D12;
  --uws-header-bg: rgba(11, 11, 15, .86);
  --uws-toolbar-bg: rgba(11, 11, 15, .82);
  --uws-ring-gap: #0B0B0F;
  --uws-shadow-pop: 0 12px 32px rgba(0, 0, 0, .5);
  --uws-scrim-modal: rgba(0, 0, 0, .6);

  /* Hero (dark: copy is white over the 02C.2 scrim) */
  --uws-hero-text: #FFFFFF;
  --uws-hero-text-2: rgba(255, 255, 255, .88);
  --uws-hero-eyebrow: rgba(255, 255, 255, .92);
  --uws-hero-cta-bg: #FFFFFF;
  --uws-hero-cta-text: #0D0D12;
  --uws-hero-track: rgba(255, 255, 255, .28);
  --uws-hero-fill: #FFFFFF;
  --uws-hero-step-bg: rgba(255, 255, 255, .08);
  --uws-hero-step-border: rgba(255, 255, 255, .3);
  --uws-glow-alpha: .30;
}

/* Workspace host: the dark colour scheme (native controls, scrollbars) and the page ground apply to Home and Settings
   only, never to module screens. Before the application mounts, theme-boot.js marks Home and Settings
   (`data-uws-launch`) so the loading screen is already dark there (no light flash). */
:root[data-theme="dark"]:has(.uws-app.is-launch),
:root[data-theme="dark"][data-uws-launch]:not(:has(.uws-app)) { color-scheme: dark; }
:root[data-theme="dark"][data-uws-launch]:not(:has(.uws-app)),
:root[data-theme="dark"][data-uws-launch]:not(:has(.uws-app)) body { background: #0B0B0F; color: #FFFFFF; }
