/* ==========================================================================
   SmartDocs 9.0 design tokens

   Every color, type size, space and radius in the prototype is defined
   here and nowhere else. A theme is a set of values for these names,
   applied by data-theme on <html>. Which themes exist, and who may switch
   them, is open item O4 in CLAUDE.md.

   Direction, product owner 17 November 2026:
     - Shell after ClickUp (D:/Downloads/clickup-ui-design-system.md): a dark
       icon rail, a light sidebar and a white canvas floating on a grey
       frame. Dense type (13px body), 28px controls, color only for
       meaning.
     - Color after PublicBuyer (publicbuyer.ai): near-black primary, one
       violet for agents, links, active items and focus.
     - Content after 8.2: every module keeps its 8.2 destinations.
   The prototype is locked to light (product owner). Dark values below
   are kept for O4 but are not complete for the new shell.

   Resolution order:
     1. :root                         light
     2. prefers-color-scheme: dark    unless data-theme="light"
     3. :root[data-theme="dark"]      explicit choice wins
   ========================================================================== */

:root {
  /* ---- Type: dense, as ClickUp; Inter as PublicBuyer ---- */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --font-accent: 'Instrument Serif', Georgia, serif;
  --text-2xs: 0.6875rem;  /* 11px */
  --text-xs: 0.75rem;     /* 12px  labels, chips, table headers */
  --text-sm: 0.8125rem;   /* 13px  body */
  --text-md: 0.875rem;    /* 14px  list text, nav */
  --text-lg: 1rem;        /* 16px */
  --text-xl: 1.125rem;    /* 18px */
  --text-2xl: 1.375rem;   /* 22px  page title */
  --text-3xl: 1.75rem;    /* 28px  tile figures */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --tracking-tight: -0.018em;
  --tracking-label: 0.1em;

  /* ---- Space: 4px grid ---- */
  --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;

  /* ---- Radius: soft controls, rounder panels ---- */
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ---- Shell: rail, sidebar, canvas ---- */
  --topbar-h: 44px;
  --rail-w: 64px;
  --sidebar-w: 248px;
  --gutter: 6px;
  --strip-h: 0px;
  --content-max: 1440px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.42, 0, 0.58, 1);
  --dur-fast: 100ms;
  --dur: 200ms;

  /* ---- Neutrals: about 95% of the screen ---- */
  --app: #ececf1;              /* behind the floating panels */
  --page: #ffffff;             /* the canvas */
  --page-glow: #f1eeff;
  /* The soft wash behind the header and the top of the page */
  --glow-1: rgba(107, 78, 255, 0.15);
  --glow-2: rgba(17, 86, 178, 0.11);
  --surface: #ffffff;
  --surface-sunk: #f9f9fb;     /* sidebar, quiet panels, inputs */
  --surface-hover: rgba(11, 11, 22, 0.04);
  --surface-press: rgba(11, 11, 22, 0.08);
  /* Rail: 8.2's white navigation, its slate ink and its open-module blue */
  --rail: #ffffff;
  --rail-ink: #475569;
  --rail-ink-strong: #0f172a;
  --rail-hover: #f1f5f9;
  --rail-current: #e3effa;
  --rail-current-ink: #1156b2;
  --rail-line: #e2e8f0;
  --ink: #1e1f24;
  --ink-muted: #62636b;
  --ink-faint: #8b8d98;
  --line: #e7e8ec;
  --line-strong: #cdced6;
  --overlay: rgba(11, 11, 22, 0.5);
  --shadow-card: none;
  --shadow-panel: 0 1px 2px rgba(0, 0, 0, 0.055);
  --shadow-raised: 0 0 1px rgba(0, 0, 0, 0.27), 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 0 1px rgba(0, 0, 0, 0.27), 0 20px 25px -5px rgba(0, 0, 0, 0.14), 0 8px 10px -6px rgba(0, 0, 0, 0.12);
  --shadow-button: none;
  --dots: rgba(107, 78, 255, 0.14);

  /* ---- Action: black primary, as ClickUp's black theme and PublicBuyer ---- */
  --primary: #1e1f24;
  --primary-hover: #36373f;
  --primary-ink: #ffffff;

  /* ---- Agents, links, active and focus: one violet ---- */
  --agent: #6b4eff;
  --agent-strong: #5236e8;
  --agent-soft: #f0eeff;
  --agent-line: #d9d4ff;
  --focus: #6b4eff;

  /* ---- Status: dark ink on its own pale tint ---- */
  --ok: #18794e;       --ok-soft: #e9f9ee;
  --watch: #915930;    --watch-soft: #fff3d0;
  --risk: #c62a2f;     --risk-soft: #ffefef;
  --info: #0b68cb;     --info-soft: #edf6ff;
  --idle: #62636b;     --idle-soft: #f0f0f3;
  --highlight: #ffe0a1;

  /* ---- Avatar tints: object identity only ---- */
  --av-violet: #5a43d6;  --av-violet-soft: #f0f1ff;
  --av-teal: #067a6f;    --av-teal-soft: #e7f9f5;
  --av-pink: #cb1d63;    --av-pink-soft: #feeff6;
  --av-amber: #915930;   --av-amber-soft: #fff3d0;
  --av-blue: #0b68cb;    --av-blue-soft: #edf6ff;
  --av-green: #18794e;   --av-green-soft: #e9f9ee;
  --av-orange: #c2410c;  --av-orange-soft: #ffedd5;
  --av-slate: #62636b;   --av-slate-soft: #f0f0f3;
  --av-sky: #007ba2;     --av-sky-soft: #e3f5fd;
  --av-plum: #9c2bad;    --av-plum-soft: #fcefff;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0b0a1a;
    --page-glow: #231b55;
    --surface: #14132a;
    --surface-sunk: #100f22;
    --surface-hover: #1c1b36;
    --ink: #f3f2fb;
    --ink-muted: #bab9d4;
    --ink-faint: #8f8eb0;
    --line: #26254a;
    --line-strong: #36355e;
    --overlay: rgba(0, 0, 0, 0.6);
    --shadow-card: none;
    --shadow-raised: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 18px 48px rgba(0, 0, 0, 0.55);
    --shadow-button: none;
    --dots: rgba(155, 135, 255, 0.14);
    --primary: #f3f2fb;
    --primary-hover: #ffffff;
    --primary-ink: #0b0b16;
    --agent: #9b87ff;
    --agent-strong: #b3a3ff;
    --agent-soft: #241d52;
    --agent-line: #3a2f7a;
    --focus: #9b87ff;
    --ok: #74d39c;     --ok-soft: #12301f;
    --watch: #f0bd62;  --watch-soft: #33260e;
    --risk: #ff978c;   --risk-soft: #3a1714;
    --info: #8fb0ff;   --info-soft: #18244a;
    --idle: #bab9d4;   --idle-soft: #22213f;
    --highlight: #7a6224;
    --av-violet: #b3a3ff;  --av-violet-soft: #2a2160;
    --av-teal: #6ad6c8;    --av-teal-soft: #10302d;
    --av-pink: #f39cc1;    --av-pink-soft: #3a1728;
    --av-amber: #f0c06a;   --av-amber-soft: #33270f;
    --av-blue: #93b3ff;    --av-blue-soft: #18244a;
    --av-green: #7fd7a5;   --av-green-soft: #12301f;
    --av-orange: #f6a676;  --av-orange-soft: #38200f;
    --av-slate: #c3c2dc;   --av-slate-soft: #24233f;
    --av-sky: #79cdf0;     --av-sky-soft: #0f2b38;
    --av-plum: #d8a6f2;    --av-plum-soft: #2f1b3d;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --page: #0b0a1a;
  --page-glow: #231b55;
  --surface: #14132a;
  --surface-sunk: #100f22;
  --surface-hover: #1c1b36;
  --ink: #f3f2fb;
  --ink-muted: #bab9d4;
  --ink-faint: #8f8eb0;
  --line: #26254a;
  --line-strong: #36355e;
  --overlay: rgba(0, 0, 0, 0.6);
  --shadow-card: none;
  --shadow-raised: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, 0.55);
  --shadow-button: none;
  --dots: rgba(155, 135, 255, 0.14);
  --primary: #f3f2fb;
  --primary-hover: #ffffff;
  --primary-ink: #0b0b16;
  --agent: #9b87ff;
  --agent-strong: #b3a3ff;
  --agent-soft: #241d52;
  --agent-line: #3a2f7a;
  --focus: #9b87ff;
  --ok: #74d39c;     --ok-soft: #12301f;
  --watch: #f0bd62;  --watch-soft: #33260e;
  --risk: #ff978c;   --risk-soft: #3a1714;
  --info: #8fb0ff;   --info-soft: #18244a;
  --idle: #bab9d4;   --idle-soft: #22213f;
  --highlight: #7a6224;
  --av-violet: #b3a3ff;  --av-violet-soft: #2a2160;
  --av-teal: #6ad6c8;    --av-teal-soft: #10302d;
  --av-pink: #f39cc1;    --av-pink-soft: #3a1728;
  --av-amber: #f0c06a;   --av-amber-soft: #33270f;
  --av-blue: #93b3ff;    --av-blue-soft: #18244a;
  --av-green: #7fd7a5;   --av-green-soft: #12301f;
  --av-orange: #f6a676;  --av-orange-soft: #38200f;
  --av-slate: #c3c2dc;   --av-slate-soft: #24233f;
  --av-sky: #79cdf0;     --av-sky-soft: #0f2b38;
  --av-plum: #d8a6f2;    --av-plum-soft: #2f1b3d;
  color-scheme: dark;
}
