/* Tokens derivados do Design System v2 Signal (docs/design.md). Não usar valor literal fora daqui. */

:root,
:root[data-theme="dark"] {
  --canvas: #0C0B09;
  --surface: #141310;
  --surface-raised: #1D1B17;
  --surface-sunken: #080706;
  --surface-hover: #211F1A;
  --border-subtle: #232019;
  --border: #332F26;
  --border-strong: #4C4638;
  --text-primary: #F4F1E9;
  --text-secondary: #A8A296;
  --text-tertiary: #847E72;
  --text-disabled: #565044;
  --accent: #BAFF4B;
  --accent-hover: #CFFF7E;
  --accent-pressed: #A4E637;
  --accent-muted: #22280E;
  --on-accent: #0C0B09;
  --on-accent-muted: #BAFF4B;
  --positive: #35D9A0;
  --positive-muted: #0A2A20;
  --warning: #FFAE1A;
  --warning-muted: #33230A;
  --critical: #FF6152;
  --critical-muted: #331410;
  --info: #7CA8FF;
  --info-muted: #131C33;
  --focus-ring: #BAFF4B;
  --focus-ring-contrast: #0C0B09;
  --data-1: #BAFF4B; --data-2: #7CA8FF; --data-3: #FF9E4A;
  --data-4: #35D9A0; --data-5: #C58BFF; --data-6: #FF6152;

  /* topbar contrasts with theme: dark theme -> bone topbar */
  --topbar-bg: #FCFBF8;
  --topbar-text: #0B0B09;
  --topbar-text-secondary: #4A473F;
  --topbar-border: #C4C1B7;
}

:root[data-theme="light"] {
  --canvas: #E8E7E2;
  --surface: #FCFBF8;
  --surface-raised: #FFFFFF;
  --surface-sunken: #DEDCD5;
  --surface-hover: #F2F1EC;
  --border-subtle: #DCDAD2;
  --border: #C4C1B7;
  --border-strong: #8F8B7F;
  --text-primary: #0B0B09;
  --text-secondary: #4A473F;
  --text-tertiary: #6E6A5F;
  --text-disabled: #A5A196;
  --accent: #BAFF4B;
  --accent-hover: #ACF631;
  --accent-pressed: #98E01E;
  --accent-muted: #E9FFC4;
  --on-accent: #0B0B09;
  --on-accent-muted: #3C5709;
  --positive: #0B6B47;
  --positive-muted: #DCF2E7;
  --warning: #7A4E00;
  --warning-muted: #F8EED3;
  --critical: #A81F14;
  --critical-muted: #FBE3E0;
  --info: #12508F;
  --info-muted: #E1ECFA;
  --focus-ring: #BAFF4B;
  --focus-ring-contrast: #0B0B09;
  --data-1: #6F9E1E; --data-2: #2C5FD0; --data-3: #C2670F;
  --data-4: #0B7A57; --data-5: #7B45C7; --data-6: #B33227;

  /* topbar contrasts with theme: light theme -> ink topbar */
  --topbar-bg: #0B0B09;
  --topbar-text: #F4F1E9;
  --topbar-text-secondary: #A8A296;
  --topbar-border: #332F26;
}

:root {
  /* sidebar is always black, in both themes */
  --sidebar-bg: #0C0B09;
  --sidebar-text: #F4F1E9;
  --sidebar-text-muted: #A8A296;
  --sidebar-border: #232019;
  --sidebar-active-bg: #211F1A;
  --sidebar-accent: #BAFF4B;

  --font-ui: "Archivo", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Courier New", monospace;

  --radius-none: 0px;
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;
  --sp-32: 128px; --sp-40: 160px;

  --topbar-h: 60px;
  --ticker-h: 32px;
  --sidebar-w: 260px;
}
