/* Trace design tokens. The only place raw colors, sizes and shadows are defined. See docs/STYLE-GUIDE.md. */
:root{
  --font-sans:"Inter","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  --font-features:"cv01","cv05","ss02","ss03";

  --bg-base:#ffffff;
  --bg-secondary:#fafafa;
  --bg-tertiary:#f5f5f5;
  --bg-quaternary:#e8e8e8;
  --bg-overlay:rgba(0,0,0,.03);
  --bg-header:rgba(255,255,255,.7);
  --bg-tooltip:rgba(24,24,26,.9);

  --text-primary:#18181a;
  --text-secondary:#787878;
  --text-tertiary:#969696;
  --text-quaternary:#b4b4b4;
  --text-inverse:#ffffff;

  --control-bg:#ffffff;
  --control-hover:#f5f5f5;
  --control-selected:#f1f1f1;
  --control-primary:#18181a;
  --control-primary-hover:#2c2c2e;

  --border-row:#eeeeee;
  --border-strong:#e8e8e8;
  --stroke:#ebebeb;

  --fill-primary:#18181a;
  --fill-secondary:#969696;
  --fill-tertiary:#d4d4d8;
  --fill-quaternary:#e8e8e8;
  --fill-quinary:#f0f0f0;
  --chart-other:#888888;

  --green-base:#00a442;  --green-emphasis:#0d542b;  --green-muted:#e6fbec;  --green-border:#c7f4d7;
  --red-base:#fb2c36;    --red-emphasis:#9f0712;    --red-muted:#fef2f2;    --red-border:#ffe6e6;
  --amber-base:#fe9a00;  --amber-emphasis:#973c00;  --amber-muted:#fffbeb;  --amber-border:#f5ecc4;
  --orange-base:#ff6900; --orange-emphasis:#9f2d00; --orange-muted:#fff7ed; --orange-border:#f7e4cb;
  --blue-base:#2b7fff;   --blue-emphasis:#1b3ea7;   --blue-muted:#eff6ff;   --blue-border:#e0edff;
  --purple-base:#ad46ff; --purple-emphasis:#59168b; --purple-muted:#faf5ff; --purple-border:#f1e4fa;
  --cyan-base:#00b7c1;   --cyan-emphasis:#00676f;   --cyan-muted:#e6fafa;   --cyan-border:#c7edef;

  --brand:#7450b2;
  --brand-emphasis:#4f2e80;
  --brand-muted:#f6f2fc;
  --brand-border:#e6dcf5;
  --brand-pink:#a43579;
  --brand-yellow:#f4d867;

  --series-1:#7450b2;
  --series-2:#4894ee;
  --series-3:#f85291;
  --series-4:#4ea852;
  --series-5:#ff9f4f;
  --series-6:#00b7c1;
  --series-7:#888888;

  --radius-2:2px; --radius-4:4px; --radius-6:6px; --radius-8:8px;
  --radius-12:12px; --radius-16:16px; --radius-full:9999px;

  --ring:0 0 0 1px rgba(0,0,0,.05);
  --shadow-low:0 1px 2px rgba(0,0,0,.02),0 2px 4px rgba(0,0,0,.02),var(--ring);
  --shadow-medium:0 4px 4px rgba(0,0,0,.02),0 4px 80px 8px rgba(0,0,0,.02),var(--ring);
  --shadow-high:0 4px 5px rgba(0,0,0,.02),0 8px 32px rgba(0,0,0,.05),var(--ring);
  --shadow-focus:0 0 0 3px rgba(0,0,0,.05);

  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px; --space-12:48px;

  --sidebar-width:240px;
  --sidebar-width-collapsed:60px;
  --header-height:48px;
  --page-gutter:24px;

  --ease:cubic-bezier(.4,0,.2,1);
  --ease-out-expo:cubic-bezier(.19,1,.22,1);
  --ease-quint:cubic-bezier(.23,1,.32,1);
  --duration:150ms;

  --z-sidebar:25; --z-header:30; --z-dropdown:100; --z-dialog:100;
  --z-popover:1001; --z-tooltip:1000000; --z-toast:10000000;

  --chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23787878' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
}

/* Dark remaps semantic tokens only; components never branch on theme. */
:root[data-theme="dark"]{
  --bg-base:#111112;
  --bg-secondary:#161617;
  --bg-tertiary:#1d1d1f;
  --bg-quaternary:#2a2a2c;
  --bg-overlay:rgba(255,255,255,.03);
  --bg-header:rgba(17,17,18,.75);
  --bg-tooltip:rgba(250,250,250,.92);

  --text-primary:#ededee;
  --text-secondary:#9a9a9c;
  --text-tertiary:#727274;
  --text-quaternary:#56565a;
  --text-inverse:#111112;

  --control-bg:#1a1a1c;
  --control-hover:#222224;
  --control-selected:#252527;
  --control-primary:#ededee;
  --control-primary-hover:#ffffff;

  --border-row:#232325;
  --border-strong:#2a2a2c;
  --stroke:#2a2a2c;

  --fill-primary:#ededee;
  --fill-secondary:#727274;
  --fill-tertiary:#3a3a3d;
  --fill-quaternary:#2a2a2c;
  --fill-quinary:#1f1f21;

  --brand:#b69af5;
  --brand-emphasis:#d6c6fb;
  --brand-muted:rgba(182,154,245,.12);
  --brand-border:rgba(182,154,245,.24);
  --series-1:#b69af5;

  --ring:0 0 0 1px rgba(255,255,255,.07);
  --shadow-low:0 1px 2px rgba(0,0,0,.3),var(--ring);
  --shadow-medium:0 4px 16px rgba(0,0,0,.3),var(--ring);
  --shadow-high:0 8px 32px rgba(0,0,0,.45),var(--ring);
  --shadow-focus:0 0 0 3px rgba(255,255,255,.08);

  --chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239a9a9c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
}
