/* embiri UI: design tokens. Light by default; dark follows the system
   unless the page sets data-theme on <html> (the nav's theme switch does). */

:root {
  color-scheme: light;
  --lf-font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lf-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --lf-bg: #FFFFFF;
  --lf-side: #F7F6F3;
  --lf-hover: #F1EFEA;
  --lf-line: #E8E6E1;
  --lf-line-strong: #D6D3CC;
  --lf-muted: #6B6860;
  --lf-ink: #1A1A17;
  --lf-cursor: #F4F6FF;

  --lf-accent: #2E4BFF;
  --lf-accent-hover: #2440E6;
  --lf-on-accent: #FFFFFF;
  --lf-accent-soft: #EEF1FF;
  --lf-accent-ink: #2238D9;
  --lf-ring: rgba(46, 75, 255, .25);

  --lf-attention: #C2410C;
  --lf-attention-soft: #FFF4EC;
  --lf-ok: #15803D;
  --lf-ok-soft: #EDF8F1;
  --lf-danger: #C0262D;
  --lf-danger-soft: #FDEEEE;
  --lf-info: #0369A1;

  /* Status tags: background / text (/ ring) */
  --lf-st-new-bg: #F1EFEA;       --lf-st-new-fg: #57544D;
  --lf-st-short-fg: #1A1A17;
  --lf-st-contacted-bg: #E6F4FB; --lf-st-contacted-fg: #0369A1;
  --lf-st-replied-bg: #E3F5F1;   --lf-st-replied-fg: #0F766E;
  --lf-st-call-bg: #F1ECFD;      --lf-st-call-fg: #6D28D9;
  --lf-st-won-bg: #15803D;       --lf-st-won-fg: #FFFFFF;
  --lf-st-rejected-fg: #8A877F;
  --lf-st-archived-bg: #F1EFEA;  --lf-st-archived-fg: #8A877F;

  --lf-shadow-menu: 0 0 0 1px var(--lf-line), 0 12px 32px rgba(20, 18, 12, .12);
  --lf-shadow-lift: 0 0 0 1px var(--lf-line), 0 1px 2px rgba(20, 18, 12, .06);

  --lf-r-sm: 4px;
  --lf-r-kbd: 6px;
  --lf-r-md: 8px;
  --lf-r-lg: 12px;
  --lf-r-xl: 16px;
  --lf-r-pill: 999px;

  /* Motion: short and quiet. components.css only animates under
     prefers-reduced-motion: no-preference. */
  --lf-dur-fast: 120ms;
  --lf-dur: 200ms;
  --lf-dur-slow: 420ms;
  --lf-ease: cubic-bezier(.2, .7, .2, 1);

  /* register.html's strip chart (charts.py) reads these names */
  --series-1: var(--lf-accent);
  --critical: var(--lf-danger);
  --ink-2: var(--lf-muted);
  --grid: var(--lf-line);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --lf-bg: #111110;
    --lf-side: #171715;
    --lf-hover: #1F1F1C;
    --lf-line: #2B2A27;
    --lf-line-strong: #3A3935;
    --lf-muted: #9A978F;
    --lf-ink: #EDECE8;
    --lf-cursor: #181A26;
    --lf-accent: #6F86FF;
    --lf-accent-hover: #8396FF;
    --lf-on-accent: #0B1033;
    --lf-accent-soft: #1C2140;
    --lf-accent-ink: #A5B3FF;
    --lf-ring: rgba(111, 134, 255, .35);
    --lf-attention: #FF8A3D;
    --lf-attention-soft: #2A1A0E;
    --lf-ok: #4ADE80;
    --lf-ok-soft: #0E2417;
    --lf-danger: #F87171;
    --lf-danger-soft: #2B1213;
    --lf-info: #7DD3FC;
    --lf-st-new-bg: #24231F;       --lf-st-new-fg: #C9C6BE;
    --lf-st-short-fg: #EDECE8;
    --lf-st-contacted-bg: #0E2A3A; --lf-st-contacted-fg: #7DD3FC;
    --lf-st-replied-bg: #0B2E29;   --lf-st-replied-fg: #5EEAD4;
    --lf-st-call-bg: #261A45;      --lf-st-call-fg: #C4B5FD;
    --lf-st-won-bg: #22C55E;       --lf-st-won-fg: #052E14;
    --lf-st-rejected-fg: #6F6C65;
    --lf-st-archived-bg: #1F1F1C;  --lf-st-archived-fg: #6F6C65;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --lf-bg: #111110;
  --lf-side: #171715;
  --lf-hover: #1F1F1C;
  --lf-line: #2B2A27;
  --lf-line-strong: #3A3935;
  --lf-muted: #9A978F;
  --lf-ink: #EDECE8;
  --lf-cursor: #181A26;
  --lf-accent: #6F86FF;
  --lf-accent-hover: #8396FF;
  --lf-on-accent: #0B1033;
  --lf-accent-soft: #1C2140;
  --lf-accent-ink: #A5B3FF;
  --lf-ring: rgba(111, 134, 255, .35);
  --lf-attention: #FF8A3D;
  --lf-attention-soft: #2A1A0E;
  --lf-ok: #4ADE80;
  --lf-ok-soft: #0E2417;
  --lf-danger: #F87171;
  --lf-danger-soft: #2B1213;
  --lf-info: #7DD3FC;
  --lf-st-new-bg: #24231F;       --lf-st-new-fg: #C9C6BE;
  --lf-st-short-fg: #EDECE8;
  --lf-st-contacted-bg: #0E2A3A; --lf-st-contacted-fg: #7DD3FC;
  --lf-st-replied-bg: #0B2E29;   --lf-st-replied-fg: #5EEAD4;
  --lf-st-call-bg: #261A45;      --lf-st-call-fg: #C4B5FD;
  --lf-st-won-bg: #22C55E;       --lf-st-won-fg: #052E14;
  --lf-st-rejected-fg: #6F6C65;
  --lf-st-archived-bg: #1F1F1C;  --lf-st-archived-fg: #6F6C65;
}
