/* Design tokens, variant B. Values copied verbatim from the :root block of
   docs/design/prototype-v6.html (the approved prototype); core/test_tokens.py
   compares them to the prototype, so change both together.
   Approved additions are not in the prototype (--border-input, --err-soft,
   --ok-soft, --accent-hover, the --*-text colours for text on a solid fill,
   --overlay, --photo-ring (K219.4), the --agent-* colours, --agent-text for the initials on them and
   --agent-tag-mix, the share of the agent colour in the timeline tag text, the
   rest being --text). The same test pins those. The dark theme (K50) is the
   :root[data-theme="dark"] block below. */
:root {
  --font: "Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono: ui-monospace,"SF Mono",Menlo,Consolas,monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --bg: #f7f7f8;
  --surface: #fff;
  --surface-2: #f1f1f3;
  --border: #e4e4e8;
  --border-strong: #c4c4cc;
  --border-input: #8a8a94;

  --text: #18181b;
  --text-2: #52525b;
  --text-3: #6b6b74;

  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-soft: #f3edff;
  --accent-text: #fff;

  --wait: #b45309;
  --wait-soft: #fff7e6;
  --wait-border: #f5c26b;
  --wait-text: #fff;

  --ok: #15803d;
  --ok-soft: #effaf2;
  --ok-text: #fff;
  --err: #b91c1c;
  --err-soft: #fef2f2;
  --err-text: #fff;
  --idle: #71717a;

  --agent-orange: #c2410c;
  --agent-blue: #0369a1;
  --agent-violet: #7c3aed;
  --agent-green: #047857;
  --agent-indigo: #4338ca;
  --agent-olive: #4d7c0f;
  --agent-pink: #be185d;
  --agent-slate: #475569;
  --agent-text: #fff;
  --agent-tag-mix: 80%;

  --label-violet: var(--accent);
  --label-red: var(--err);
  --label-amber: var(--wait);
  --label-green: var(--ok);
  --label-teal: #0f766e;
  --label-blue: var(--agent-blue);
  --label-indigo: var(--agent-indigo);
  --label-pink: var(--agent-pink);
  --label-orange: var(--agent-orange);
  --label-slate: var(--agent-slate);

  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.16);
  --focus: 0 0 0 3px #fff,0 0 0 5px var(--accent);
  --overlay: rgba(15,15,20,.5);
  --photo-ring: rgba(0,0,0,.08);
}

/* Dark theme (K50). base.html sets data-theme on <html> before the first
   paint: the choice kept in localStorage, else the system preference. The
   --agent-* colours and --agent-text do not change, so an agent looks the
   same in both themes. Solid fills turn light here, so the text on them
   (--accent-text, --*-text) turns dark. --agent-tag-mix drops because --text
   is light now: at 80% the timeline tag falls to 3.2:1. Ratios are pinned in core/test_tokens.py. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0f0f12;
  --surface: #18181c;
  --surface-2: #232329;
  --border: #2e2e36;
  --border-strong: #484852;
  --border-input: #7c7c87;

  --text: #ededf0;
  --text-2: #b4b4bd;
  --text-3: #9b9ba5;

  --accent: #a78bfa;
  --accent-hover: #c4b5fd;
  --accent-soft: #2b2145;
  --accent-text: #17121f;

  --wait: #fbbf24;
  --wait-soft: #2a2010;
  --wait-border: #94701f;
  --wait-text: #1c1405;

  --ok: #4ade80;
  --ok-soft: #11261a;
  --ok-text: #0b1f12;
  --err: #f87171;
  --err-soft: #2d1618;
  --err-text: #250b0b;
  --idle: #a1a1aa;

  --agent-tag-mix: 55%;

  --label-violet: #7c3aed;
  --label-red: #b91c1c;
  --label-amber: #b45309;
  --label-green: #15803d;
  --label-teal: #0f766e;
  --label-blue: #0369a1;
  --label-indigo: #4338ca;
  --label-pink: #be185d;
  --label-orange: #c2410c;
  --label-slate: #475569;

  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  --focus: 0 0 0 3px var(--surface),0 0 0 5px var(--accent);
  --overlay: rgba(0,0,0,.6);
  --photo-ring: rgba(255,255,255,.12);
}

/* Agent status: set --st on a container and let children (status dot, avatar
   badge) read var(--st). Names match the status labels shown in the UI. */
.st-working { --st: var(--ok); }
.st-stopped { --st: var(--idle); }
.st-error { --st: var(--err); }
.st-waiting { --st: var(--wait); }
