/* Tali design tokens: primitive -> semantic -> component. */
:root {
  color-scheme: light;

  /* Approved primitive palette */
  --primitive-ink: #14243b;
  --primitive-deep-navy: #102039;
  --primitive-blue: #2f7cf6;
  --primitive-bright-blue: #5ea2ff;
  --primitive-cyan: #4db7c7;
  --primitive-slate: #6b7a90;
  --primitive-light-blue: #eaf3ff;
  --primitive-background: #f4f7fb;
  --primitive-white: #ffffff;
  --primitive-border: #dce5f0;
  --primitive-sage: #8fa99a;
  --primitive-sand: #ece6dc;
  --primitive-success: #3a9d6f;
  --primitive-warning: #d79a32;
  --primitive-danger: #d55d62;

  /* Semantic tokens */
  --color-background: var(--primitive-background);
  --color-foreground: var(--primitive-ink);
  --color-card: var(--primitive-white);
  --color-surface-subtle: #f8fafd;
  --color-muted: #edf2f7;
  --color-muted-foreground: #5b6c83;
  --color-border: var(--primitive-border);
  --color-border-strong: #c6d3e2;
  --color-primary: var(--primitive-blue);
  --color-primary-strong: #1767dc;
  --color-primary-hover: #236fe2;
  --color-primary-emphasis: #1f68d3;
  --color-primary-action-background: #1767dc;
  --color-primary-action-hover: #0f58c2;
  --color-primary-soft: var(--primitive-light-blue);
  --color-on-primary: var(--primitive-white);
  --color-accent: var(--primitive-cyan);
  --color-success: var(--primitive-success);
  --color-success-soft: #e9f6ef;
  --color-warning: #a96808;
  --color-warning-soft: #fff5df;
  --color-danger: var(--primitive-danger);
  --color-danger-emphasis: #b83f48;
  --color-danger-action-background: #bd4650;
  --color-on-danger: var(--primitive-white);
  --color-danger-soft: #fff0f1;
  --color-danger-border: #efbcc0;
  --color-danger-foreground: #842e35;
  --color-ring: var(--primitive-bright-blue);
  --color-input-background: var(--primitive-white);
  --color-input-foreground: var(--primitive-ink);
  --color-input-border: #aebed1;
  --color-brand-wash: var(--primitive-light-blue);
  --color-topbar-background: rgb(255 255 255 / 0.9);
  --color-topbar-border: rgb(220 229 240 / 0.92);
  --color-sidebar-background: var(--primitive-deep-navy);
  --color-sidebar-surface: #172b49;
  --color-sidebar-foreground: #f5f8fc;
  --color-sidebar-muted: #aebed2;
  --color-sidebar-border: rgb(255 255 255 / 0.1);
  --color-sidebar-hover: rgb(94 162 255 / 0.11);
  --color-sidebar-active: rgb(94 162 255 / 0.18);
  --color-attention-background: var(--primitive-ink);
  --color-attention-foreground: var(--primitive-white);
  --color-attention-eyebrow: #a9d2ff;
  --color-attention-empty: #d7e6f8;
  --color-item-background: var(--color-surface-subtle);
  --color-item-border: #e4ebf3;
  --color-approval-background: #f9fbfe;
  --color-approval-border: #cbd9e9;
  --color-payload-background: var(--primitive-white);
  --color-payload-foreground: var(--primitive-ink);
  --color-payload-border: var(--primitive-border);
  --color-count-background: var(--primitive-light-blue);
  --color-count-foreground: #1558a8;
  --color-count-warning-background: #fff0d4;
  --color-count-warning-foreground: #8b5200;
  --color-chat-owner-background: var(--primitive-light-blue);
  --color-dialog-scrim: rgb(9 20 36 / 0.62);
  --color-toast-background: var(--primitive-ink);
  --color-toast-foreground: var(--primitive-white);

  /* Component tokens */
  --font-family-ui: Heebo, "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif;
  --font-family-latin: Inter, Manrope, "Segoe UI", Arial, sans-serif;
  --radius-control: 11px;
  --radius-card: 17px;
  --radius-prominent: 22px;
  --radius-icon: 12px;
  --radius-pill: 999px;
  --control-min-height: 44px;
  --input-min-height: 50px;
  --icon-control-size: 44px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --shadow-card: 0 8px 28px rgb(20 36 59 / 0.055);
  --shadow-float: 0 18px 46px rgb(16 32 57 / 0.16);
  --motion-fast: 180ms ease;
  --motion-view: 240ms cubic-bezier(.2, .7, .2, 1);
  --sidebar-width: 278px;
  --composer-height: 76px;
  --z-sticky: 20;
  --z-navigation: 50;
  --z-composer: 45;
  --z-toast: 80;
  --z-skip-link: 100;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-background: #0d1624;
  --color-foreground: #eef4fb;
  --color-card: #142033;
  --color-surface-subtle: #18263a;
  --color-muted: #1d2c42;
  --color-muted-foreground: #aebdd0;
  --color-border: #293a51;
  --color-border-strong: #3b506b;
  --color-primary: #5ea2ff;
  --color-primary-strong: #7bb4ff;
  --color-primary-hover: #78b3ff;
  --color-primary-emphasis: #8abfff;
  --color-primary-action-background: #1767dc;
  --color-primary-action-hover: #2c78e6;
  --color-primary-soft: #1b3555;
  --color-success-soft: #183729;
  --color-warning: #f1b552;
  --color-warning-soft: #3c2d16;
  --color-danger-emphasis: #ff9298;
  --color-danger-action-background: #c64f58;
  --color-danger-soft: #3b2027;
  --color-danger-border: #79434a;
  --color-danger-foreground: #ffc2c5;
  --color-ring: #83baff;
  --color-input-background: #101c2c;
  --color-input-foreground: #eef4fb;
  --color-input-border: #536882;
  --color-brand-wash: #17314f;
  --color-topbar-background: rgb(13 22 36 / 0.91);
  --color-topbar-border: rgb(41 58 81 / 0.9);
  --color-sidebar-background: #0a1422;
  --color-sidebar-surface: #16253b;
  --color-sidebar-muted: #b2c1d3;
  --color-sidebar-border: rgb(255 255 255 / 0.09);
  --color-attention-background: #182d49;
  --color-attention-eyebrow: #9ac8ff;
  --color-attention-empty: #d4e5f8;
  --color-item-background: #17253a;
  --color-item-border: #2b3c53;
  --color-approval-background: #17253a;
  --color-approval-border: #3b506b;
  --color-payload-background: #101c2c;
  --color-payload-foreground: #eef4fb;
  --color-payload-border: #33465f;
  --color-count-background: #1b3555;
  --color-count-foreground: #b8d8ff;
  --color-count-warning-background: #443119;
  --color-count-warning-foreground: #ffd48d;
  --color-chat-owner-background: #1a3a60;
  --color-toast-background: #e9f2fc;
  --color-toast-foreground: #102039;
  --shadow-card: 0 10px 32px rgb(0 0 0 / 0.18);
  --shadow-float: 0 18px 46px rgb(0 0 0 / 0.34);
}
