/* Arbor design tokens. The ONLY file in web/public/ that may contain a hex
   color (plus inline SVG marks). Everything else reads var(--token).
   Enforced by scripts/check-tokens.js (npm run check:tokens).
   Skin layer: this file. Structure layer: components.css / components.js.
   See docs/DESIGN.md. */

:root {
  /* Surfaces */
  --bg: #ffffff;
  --panel: #f7f8fa;
  --panel2: #fbfbfc;
  --card: #ffffff;          /* elevated surface, assistant cards, login card, popovers */
  --overlay: rgba(17, 24, 39, 0.04);

  /* Lines */
  --line: #e5e7eb;
  --line2: #d7dbe2;

  /* Text */
  --text: #111827;
  /* --mute/--dim darkened 2026-09-27 (UX_BACKLOG.md P1 "Contrast risks on
     real reading content"), the old --mute (#6b7280, gray-500) measured
     only ~4.55:1 for .turn.user .turn-body message text on the --panel
     background, and old --dim (#9ca3af, gray-400) measured only ~2.5:1
     for turn sender labels ("YOU"/"ARBOR") on white, a real AA fail.
     New values clear 4.5:1 with margin against both --bg (#fff) and
     --panel (#f7f8fa): --mute ~7.1-7.6:1, --dim ~5.6-6.0:1. --dim stays
     lighter than --mute on purpose to preserve the existing two-tier
     hierarchy (text > mute > dim). */
  --mute: #4b5563;
  --dim: #5b6472;
  --on-accent: #ffffff;     /* text/icon color drawn on top of --accent */
  /* Flat 18% black overlay for anything drawing --on-accent text/icons on
     --accent (or --cdot, which is set to the same per-client accent_color).
     --accent is set per-client at runtime (index.html sets documentElement's
     --accent to client.accent_color, see scripts/seed.js), so no single rule
     here can know which client is open. Measured white-on-accent contrast
     across all 5 seeded accent colors: BRSA's green #059669 was the outlier
     at ~3.77:1 (an AA fail); HGS blue/Red Roan amber/Poppy red/Home teal were
     already 4.8-5.5:1. This overlay (rather than swapping the text color,
     which would fail 4/5 of those accents outright) fixes the BRSA case
     (~5.3:1) while only making the other four clients' elements safely
     darker (6.6-7.3:1), never a regression. Shared so `.cbox button`,
     `.unread-badge`, `.channel-row .chicon.unread` and the JS-generated
     avatar-fallback letter glyphs (index.html botAvatarImg/specialistAvatarImg)
     all apply the identical fix instead of re-deriving it. */
  --accent-overlay: linear-gradient(rgba(0, 0, 0, .18), rgba(0, 0, 0, .18));

  /* Brand + status */
  --accent: #2563eb;        /* overridden per client at runtime */
  --accent-soft: #e0edff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --green-line: #a7f3d0;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --amber-line: #fde68a;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --red-line: #fecaca;

  /* Shape */
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.10);
  --shadow-lg: 0 16px 44px rgba(17, 24, 39, 0.14);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.15);

  /* Motion */
  --dur-fast: 120ms;
  --dur-med: 200ms;
  --dur-slow: 420ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Skeleton */
  --skeleton-base: #eceef1;
  --skeleton-sheen: #f7f8fa;

  /* 2026-10-14 color pass: three distinct regions + more than one gray.
     Header = --card (white), sidebar = --sidebar-bg, main = --bg-app, and
     cards (white, --shadow-xs) lift off the gray main column. */
  --bg-app: #eceef2;         /* main column behind cards */
  --sidebar-bg: #f4f5f8;     /* sidebar, a step lighter than --bg-app */
  --turn-user-bg: #e4e7ed;   /* user turns; --mute text on it is ~6.3:1 */
  --violet: #6d28d9;         /* outreach drafts, What's next (7:1 on white) */
  --violet-soft: #f5f3ff;
  --violet-line: #ddd6fe;
  --teal: #0f766e;           /* content ideas (5.5:1 on white) */
  --teal-soft: #f0fdfa;
  --teal-line: #99f6e4;
  --green-strong: #047857;   /* section text / hover on --green-soft */
}

/* ── Added 2026-10-22 (round 2, item 3) ── */
:root {
  /* Thrive brand: the approved accent for new screens and the design page.
     --accent above stays per-client at runtime and is untouched. */
  --brand: #1B6E4D;
  --brand-strong: #145539;
  --brand-soft: #e6f3ed;
  --brand-line: #b7dcc9;

  /* State colors beyond green / amber / red */
  --orange: #c2410c;
  --orange-soft: #fff7ed;
  --orange-line: #fed7aa;
  --attention: #d7263d;      /* unread / attention badge, never the client accent */
  --slate: #475569;          /* band header: delivery group */
  --ink: #111827;            /* band header: agents group */
  --violet-bright: #7c3aed;  /* avatar gradient end */
  --scroll-track: #f4f5f8;
  --scroll-thumb: #9aa3b2;
  --na: #9aa3b2;             /* "not available" text */

  /* Risk bands */
  --risk-low: var(--green);
  --risk-low-soft: var(--green-soft);
  --risk-low-line: var(--green-line);
  --risk-medium: var(--amber);
  --risk-medium-soft: var(--amber-soft);
  --risk-medium-line: var(--amber-line);
  --risk-high: var(--orange);
  --risk-high-soft: var(--orange-soft);
  --risk-high-line: var(--orange-line);
  --risk-critical: var(--red);

  /* Login (Google button follows Google's own button spec) */
  --oauth-text: #3c4043;
  --oauth-line: #dadce0;

  /* Chart categorical series (fixed order, see index.html CC_CATEGORICAL) */
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100;
  --cat-5: #e87ba4; --cat-6: #008300; --cat-7: #4a3aa7; --cat-8: #e34948;

  /* Specialist role chips (one fixed color per registry key) */
  --role-strategy: #7c3aed;
  --role-search: #0ea5e9;
  --role-content: #f59e0b;
  --role-web_studio: #10b981;
  --role-outreach: #ec4899;
  --role-qa: #ef4444;
  --role-account_manager: #6366f1;
  --role-digital_pr: #0891b2;
  --role-cro: #0d9488;
  --fallback-dot: #888;      /* activity dot when a client has no accent */

  /* Type scale */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-2xs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 19px;
  --fs-xl: 26px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-heavy: 800;
  --tracking-caps: 0.04em;
  --tracking-tight: -0.02em;

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  /* Layout */
  --topbar-h: 44px;
  --table-head-h: 34px;
  --table-band-h: 30px;
  --col-first-w: 210px;
}

/* v10 mockup palette, used by the login page. Light only, same as the mockup. */
:root {
  --v10-bg: #f4f7f1;
  --v10-surf: #ffffff;
  --v10-mint: #e6f4ea;
  --v10-peach-soft: #f6d5bd66;
  --v10-fg: #17382d;
  --v10-muted: #4d6258;
  --v10-forest: #174c3a;
  --v10-green: #247a59;
  --v10-line: #dce8df;
  --v10-red: #a3201a;
  --v10-redbg: #fdeceb;
  --v10-onf: #ffffff;
  --v10-shadow: 0 8px 28px rgba(23, 56, 45, .16);
  --v10-shadow-card: inset 0 0 0 1px #538f6b1f, 0 6px 20px #1b4b390c;
}
