/* ===== DESIGN TOKENS (the one token set) =====
   Loaded first (before base.css). Every --pb-* token lives here; themes swap
   values only. Dark is :root, Light is [data-theme="light"], Rose is
   [data-theme="girly"]. Component CSS uses var(--pb-*) instead of literals.
   Layers:
   1. Semantic (--pb-bg, --pb-text, --pb-blue ...): what components should reach for.
   2. Palette (--pb-c-<hue>-<lightness>, plus -rgb channels for rgba()): theme-constant
      primitives generated from the literals the CSS used on staging 2a8ac866, so the
      page renders the same. Later PRs fold these into the semantic layer.
   3. Scales: radius, spacing, type sizes (current values; spacing/type not applied yet).
   --pb-text-dim is tuned per theme for WCAG AA (>=4.5:1 on bg, bg2, surface, surface-2).
   --pc-* and --cs-* (chat cards) are owned by cards.css and card-styles/, not here. */
:root{
  /* Semantic: brand + status */
  --pb-blue:#2a93c1;--pb-blue-light:#3db8f5;--pb-blue-dark:#1a6a8f;
  --pb-orange:#f1420b;--pb-orange-light:#ff6a3d;
  --pb-green:#22c55e;--pb-yellow:#f59e0b;--pb-purple:#8b5cf6;
  /* Text-safe status + accent (4.5:1 on bg, bg2, surface, surface-2/3). Use these for color:, the plain ones for fills. */
  --pb-green-text:var(--pb-green);--pb-yellow-text:var(--pb-yellow);--pb-purple-text:var(--pb-c-violet-76);
  --pb-orange-text:var(--pb-orange-light);--pb-accent-text:var(--pb-blue-light);
  /* Style guide names for the same status text (one value per theme via the -text tokens) */
  --pb-success:var(--pb-green-text);--pb-warning:var(--pb-yellow-text);
  /* Buttons + focus (guide sections 6-7). --pb-accent marks and borders; a solid fill under text uses --pb-accent-fill
     (white on the #2a93c1 accent is 3.48:1, on --pb-c-sky-38 4.76). --pb-red is the old name of --pb-danger. */
  --pb-accent:var(--pb-blue);--pb-accent-fill:var(--pb-c-sky-38);--pb-accent-fill-hover:var(--pb-blue-dark);--pb-on-accent:var(--pb-c-white);
  --pb-focus:var(--pb-blue);--pb-border-strong:var(--pb-text-dim);--pb-orange-fill:var(--pb-c-orange-45);--pb-on-orange:var(--pb-c-white);
  --pb-danger:var(--pb-c-red-51);--pb-on-danger:var(--pb-c-white);--pb-danger-soft:rgba(var(--pb-c-red-51-rgb),0.12);--pb-danger-text:var(--pb-c-red-71);--pb-red:var(--pb-danger);
  /* Semantic: surfaces, text, lines (Dark) */
  --pb-bg:#0a0e1a;--pb-surface:#111827;--pb-surface-2:#1a2535;--pb-surface-3:#1f2d40;--pb-sidebar-bg:rgba(8,11,20,0.95);
  --pb-bg2:#1e1e2e;
  --pb-border:rgba(42,147,193,0.15);--pb-border-hover:rgba(42,147,193,0.40);
  --pb-text:#e6edf3;--pb-text-muted:#7d8fa3;
  --pb-text-dim:#7a8da6; /* was #4a5a6e (2.73:1 on bg); now 5.67 bg, 4.55 surface-2 */
  --pb-accent-soft:rgba(42,147,193,0.08);--pb-accent-soft-2:rgba(42,147,193,0.16);
  --pb-pane-header-bg:rgba(10,14,26,0.4);
  --pb-shadow:0 8px 32px rgba(0,0,0,0.5);--pb-glow-blue:0 0 24px rgba(42,147,193,0.2);
  /* Radius: semantic names + px scale below */
  --pb-radius:12px;--pb-radius-sm:8px;--pb-radius-xs:4px;--pb-radius-pill:999px;
  /* Spacing scale (current common values: 2 4 6 8 10 12 16 20 24 32 40) */
  --pb-space-0_5:2px;--pb-space-1:4px;--pb-space-1_5:6px;--pb-space-2:8px;--pb-space-2_5:10px;--pb-space-3:12px;
  --pb-space-4:16px;--pb-space-5:20px;--pb-space-6:24px;--pb-space-8:32px;--pb-space-10:40px;
  /* Type sizes. 12px is the floor (--pb-fs-md); 2xs/xs/sm are retired aliases of it, do not use. */
  --pb-fs-md:12px;--pb-fs-base:13px;--pb-fs-lg:14px;--pb-fs-xl:16px;--pb-fs-2xl:18px;--pb-fs-3xl:22px;
  --pb-fs-2xs:var(--pb-fs-md);--pb-fs-xs:var(--pb-fs-md);--pb-fs-sm:var(--pb-fs-md);
  /* Touch targets: 44px phone/touch, 40px desktop. --pb-hit is the one in force (switched below). */
  --pb-tap:44px;--pb-tap-desktop:40px;--pb-hit:var(--pb-tap-desktop);
  /* Families and motion (guide sections 3 and 7) */
  --pb-font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;--pb-font-display:'Oswald',sans-serif;
  --pb-dur-fast:120ms;--pb-dur:200ms;--pb-ease:ease;
  /* Shade layers over filled buttons on hover / press (theme-constant, like the scales) */
  --pb-btn-shade:rgba(var(--pb-c-black-rgb),0.12);--pb-btn-press:rgba(var(--pb-c-black-rgb),0.22);
  /* Palette: theme-constant primitives (generated from the literals in use on staging 2a8ac866). */
  --pb-c-amber-38:#a08520;
  --pb-c-amber-39-rgb:180,140,20;
  --pb-c-amber-47:#c9a227;--pb-c-amber-47-rgb:201,162,39;
  --pb-c-amber-47a:#eab308;--pb-c-amber-47a-rgb:234,179,8;
  --pb-c-amber-50:#fbbc05;--pb-c-amber-50-rgb:251,188,5;
  --pb-c-amber-53:#facc15;--pb-c-amber-53-rgb:250,204,21;
  --pb-c-amber-56:#fbbf24;--pb-c-amber-56-rgb:251,191,36;
  --pb-c-black:#000000;--pb-c-black-rgb:0,0,0;
  --pb-c-blue-11-rgb:15,23,42;
  --pb-c-blue-11a:#111827;--pb-c-blue-11a-rgb:17,24,39;
  --pb-c-blue-2-rgb:1,4,9;
  --pb-c-blue-24-rgb:30,60,90;
  --pb-c-blue-25:#1e3a5f;--pb-c-blue-25-rgb:30,58,95;
  --pb-c-blue-30:#2d4a6a;
  --pb-c-blue-32-rgb:42,80,120;
  --pb-c-blue-35:#3a5a7a;
  --pb-c-blue-5:#080b14;--pb-c-blue-5-rgb:8,11,20;
  --pb-c-blue-52:#3367d6;
  --pb-c-blue-6:#090d18;--pb-c-blue-6-rgb:9,13,24;
  --pb-c-blue-60:#3b82f6;--pb-c-blue-60-rgb:59,130,246;
  --pb-c-blue-61:#4285f4;--pb-c-blue-61-rgb:66,133,244;
  --pb-c-blue-68:#60a5fa;
  --pb-c-blue-7:#0a0e1a;--pb-c-blue-7-rgb:10,14,26;
  --pb-c-blue-74:#818cf8;
  --pb-c-blue-9:#0c1622;
  --pb-c-blue-93-rgb:232,238,244;
  --pb-c-blue-95:#edf2f7;
  --pb-c-blue-9a:#0d1021;
  --pb-c-cyan-43-rgb:6,182,212;
  --pb-c-fuchsia-73-rgb:232,121,249;
  --pb-c-gray-12-rgb:30,30,30;
  --pb-c-gray-60:#999999;
  --pb-c-gray-71-rgb:180,180,180;
  --pb-c-gray-98:#f7fafc;--pb-c-gray-98-rgb:247,250,252;
  --pb-c-gray-98a-rgb:253,246,249;
  --pb-c-gray-99:#fefafc;
  --pb-c-green-36:#16a34a;--pb-c-green-36-rgb:22,163,74;
  --pb-c-green-43:#34a853;--pb-c-green-43-rgb:52,168,83;
  --pb-c-green-45:#22c55e;--pb-c-green-45-rgb:34,197,94;
  --pb-c-green-49:#3fb950;
  --pb-c-green-49a:#4caf50;
  --pb-c-green-58:#4ade80;--pb-c-green-58-rgb:74,222,128;
  --pb-c-green-73:#86efac;
  --pb-c-indigo-67-rgb:99,102,241;
  --pb-c-orange-38:#b8320a;
  --pb-c-orange-44:#d97706;--pb-c-orange-44-rgb:217,119,6;
  --pb-c-orange-45:#d93b0a;
  --pb-c-orange-49:#8a7a72;
  --pb-c-orange-49a:#f1420b;--pb-c-orange-49a-rgb:241,66,11;
  --pb-c-orange-50:#f59e0b;--pb-c-orange-50-rgb:245,158,11;
  --pb-c-orange-53:#f97316;--pb-c-orange-53-rgb:249,115,22;
  --pb-c-orange-55:#e0693a;--pb-c-orange-55-rgb:224,105,58;
  --pb-c-orange-61:#fb923c;
  --pb-c-pink-35:#6b4a58;
  --pb-c-pink-39-rgb:168,33,107;
  --pb-c-pink-42:#be185d;
  --pb-c-pink-56-rgb:217,70,168;
  --pb-c-pink-70:#f472b6;
  --pb-c-pink-82-rgb:249,168,212;
  --pb-c-pink-95-rgb:255,230,240;
  --pb-c-pink-97:#fdf0f7;
  --pb-c-pink-97a-rgb:253,242,248;
  --pb-c-purple-56:#9333ea;--pb-c-purple-56-rgb:147,51,234;
  --pb-c-purple-65:#a855f7;--pb-c-purple-65-rgb:168,85,247;
  --pb-c-red-31:#7f1d1d;
  --pb-c-red-42:#b91c1c;
  --pb-c-red-48:#c53030;
  --pb-c-red-51:#dc2626;--pb-c-red-51-rgb:220,38,38;
  --pb-c-red-53:#dc3232;--pb-c-red-53-rgb:220,50,50;
  --pb-c-red-56:#ea4335;--pb-c-red-56-rgb:234,67,53;
  --pb-c-red-60:#ef4444;--pb-c-red-60-rgb:239,68,68;
  --pb-c-red-71:#f87171;--pb-c-red-71-rgb:248,113,113;
  --pb-c-red-82:#fca5a5;
  --pb-c-red-95:#ffe4e6;--pb-c-red-95-rgb:255,228,230;
  --pb-c-red-97:#fff1f2;--pb-c-red-97-rgb:255,241,242;
  --pb-c-rose-29-rgb:120,30,50;
  --pb-c-rose-30:#881337;--pb-c-rose-30-rgb:136,19,55;
  --pb-c-rose-50a-rgb:225,29,72;
  --pb-c-rose-90:#fecdd3;
  --pb-c-rose-91:#ffd0d4;
  --pb-c-rose-98:#fff5f7;
  --pb-c-sky-33:#1a6a8f;
  --pb-c-sky-34:#1a6f94;
  --pb-c-sky-38:#1a7aaa;
  --pb-c-sky-40:#1d7fae;
  --pb-c-sky-46:#2a93c1;--pb-c-sky-46-rgb:42,147,193;
  --pb-c-sky-47:#4a8da8;
  --pb-c-sky-53:#3b9fd1;
  --pb-c-sky-60:#3db8f5;--pb-c-sky-60-rgb:61,184,245;
  --pb-c-sky-93:#e6edf3;
  --pb-c-sky-96:#f1f5f9;
  --pb-c-slate-10:#12151f;
  --pb-c-slate-10a:#14171f;
  --pb-c-slate-14a:#1a202c;
  --pb-c-slate-15:#1a2030;
  --pb-c-slate-15a-rgb:26,37,53;
  --pb-c-slate-34:#4b5563;
  --pb-c-slate-35:#475569;
  --pb-c-slate-42:#4a6a8a;
  --pb-c-slate-46:#6b7280;
  --pb-c-slate-56:#7d8fa3;--pb-c-slate-56-rgb:125,143,163;
  --pb-c-slate-8:#0f111c;
  --pb-c-slate-82-rgb:200,204,220;
  --pb-c-slate-87:#d4dce8;
  --pb-c-slate-89:#dae2ec;
  --pb-c-slate-91:#e2e8f0;--pb-c-slate-91-rgb:226,232,240;
  --pb-c-slate-93:#e7e9f1;
  --pb-c-teal-30:#059669;--pb-c-teal-30-rgb:5,150,105;
  --pb-c-teal-40:#14b8a6;
  --pb-c-teal-45:#00e5a0;--pb-c-teal-45-rgb:0,229,160;
  --pb-c-violet-50:#6d28d9;
  --pb-c-violet-66:#8b5cf6;--pb-c-violet-66-rgb:139,92,246;
  --pb-c-violet-76:#a78bfa;
  --pb-c-white:#ffffff;--pb-c-white-rgb:255,255,255;
  /* Radius scale (px). --pb-radius-sm = 8, --pb-radius = 12. */
  --pb-radius-1:1px;--pb-radius-2:2px;--pb-radius-4:4px;--pb-radius-6:6px;--pb-radius-10:10px;--pb-radius-14:14px;--pb-radius-16:16px;--pb-radius-20:20px;--pb-radius-30:30px;
}
/* Light: swap values only */
[data-theme="light"]{
  --pb-bg:#e8eef4;--pb-surface:#edf2f7;--pb-surface-2:#e2e8f0;--pb-surface-3:#dae2ec;
  --pb-bg2:#edf2f7;
  --pb-border:rgba(42,80,120,0.12);--pb-border-hover:rgba(42,147,193,0.4);
  --pb-text:#1a1a2e;--pb-text-muted:#4a5568;
  --pb-text-dim:#59697b; /* was #5a6b7d (4.44:1 on surface-2) */
  --pb-shadow:0 4px 16px rgba(30,60,90,0.08);--pb-glow-blue:0 0 12px rgba(42,147,193,0.12);
  --pb-sidebar-bg:rgba(226,232,240,0.98);
  --pb-accent-soft:rgba(42,147,193,0.08);--pb-accent-soft-2:rgba(42,147,193,0.16);
  --pb-pane-header-bg:var(--pb-surface-2);
  --pb-green-text:#166534;--pb-yellow-text:#92400e;--pb-purple-text:#6d28d9;--pb-orange-text:#9a3412;--pb-accent-text:#155a7c;
  --pb-success:var(--pb-green-text);--pb-warning:var(--pb-yellow-text);
  --pb-accent:var(--pb-blue);--pb-accent-fill:var(--pb-c-sky-38);--pb-accent-fill-hover:var(--pb-blue-dark);--pb-on-accent:var(--pb-c-white);
  --pb-focus:var(--pb-blue-dark);--pb-border-strong:var(--pb-text-dim);--pb-orange-fill:var(--pb-c-orange-45);--pb-on-orange:var(--pb-c-white); /* focus: --pb-blue is 2.82 on surface-2 */
  --pb-danger:var(--pb-c-red-42);--pb-on-danger:var(--pb-c-white);--pb-danger-soft:rgba(var(--pb-c-red-51-rgb),0.08);--pb-danger-text:var(--pb-c-red-42);--pb-red:var(--pb-danger);
}
/* Rose: swap values only */
[data-theme="girly"]{
  --pb-bg:#fff1f2;--pb-surface:#ffffff;--pb-surface-2:#fef0f5;--pb-surface-3:#fde8f0;
  --pb-bg2:#fef0f5;
  --pb-blue:#be123c;--pb-blue-light:#e11d48;--pb-blue-dark:#9f1239;
  --pb-border:rgba(225,29,72,0.1);--pb-border-hover:rgba(225,29,72,0.3);
  --pb-text:#2e1a2b;--pb-text-muted:#6b4a68;
  --pb-text-dim:#805b7d; /* was #a07a9d (3.29:1 on surface-2); #896286 was 4.15-4.42 on the #ffe4e6 chrome gradient */
  --pb-shadow:0 4px 20px rgba(225,29,72,0.06);--pb-glow-blue:0 0 12px rgba(225,29,72,0.08);
  --pb-accent-soft:rgba(225,29,72,0.06);--pb-accent-soft-2:rgba(225,29,72,0.12);
  --pb-pane-header-bg:var(--pb-surface-2);
  --pb-green-text:#166534;--pb-yellow-text:#92400e;--pb-purple-text:#6d28d9;--pb-orange-text:#9a3412;--pb-accent-text:#9f1239;
  --pb-success:var(--pb-green-text);--pb-warning:var(--pb-yellow-text);
  --pb-accent:var(--pb-blue);--pb-accent-fill:var(--pb-blue);--pb-accent-fill-hover:var(--pb-blue-light);--pb-on-accent:var(--pb-c-white);
  --pb-focus:var(--pb-blue);--pb-border-strong:var(--pb-text-dim);--pb-orange-fill:var(--pb-c-orange-45);--pb-on-orange:var(--pb-c-white);
  --pb-danger:var(--pb-c-red-42);--pb-on-danger:var(--pb-c-white);--pb-danger-soft:rgba(var(--pb-c-red-51-rgb),0.08);--pb-danger-text:var(--pb-c-red-42);--pb-red:var(--pb-danger);
}
/* Phone layout (bottom tab bar) and touch screens: hit areas grow to the 44px tap size. */
@media (max-width:1024px),(pointer:coarse){:root{--pb-hit:var(--pb-tap)}}
