/* ============================================================
   DIRECTIVE — design tokens (production)
   Single source of truth. Portable to Jinja2 templates as-is.
   Refined from Design Brief v1 §5.
   ============================================================ */
:root{
  /* ---- brand chrome (graphite) ---- */
  --chrome-1:#121317;      /* sidebar top */
  --chrome-2:#0c0d10;      /* sidebar bottom */
  --feature-1:#1b1d23;     /* dark feature card */
  --feature-2:#0f1014;
  --chrome-ink:#15171c;

  /* ---- accent ----
     --accent is a NON-TEXT colour (dots, bars, sparklines, active bars, borders).
     Anything carrying text uses --accent-fill (white text on it) or
     --accent-ink (it as text on light) so WCAG AA holds. */
  --accent:#14b8a6;
  --accent-deep:#0d9488;
  --accent-fill:#0f766e;        /* 5.47:1 with #fff — solid buttons, user bubble */
  --accent-fill-hover:#0c625c;  /* 7.20:1 with #fff */
  --accent-ink:#0b7e72;         /* 4.95:1 on #fff — accent as text/links */
  --accent-bg:#e7f8f5;
  --accent-line:#bfe8e1;
  --accent-rgb:20,184,166;

  /* ---- surfaces ---- */
  --bg:#f5f6f8;
  --card:#ffffff;
  --card-2:#f8f9fb;
  --th-bg:#f9fafb;
  --hover:#f6f7f9;
  --field:#ffffff;

  /* ---- text ---- */
  --ink:#16181d;
  --ink-soft:#3c414a;
  --muted:#656c78;
  --faint:#9aa0aa;   /* NON-TEXT only (rules, placeholder glyphs) — use --muted for copy */

  /* ---- lines ---- */
  --line:#ebedf0;
  --line-soft:#f1f2f4;
  --field-line:#dcdfe5;
  --line-strong:#d4d8de;

  /* ---- semantics: base = non-text (dots, bars); -ink = text ---- */
  --good:#16a36f; --good-bg:#e6f6ef; --good-ink:#0f7a52; --good-line:#bfe8d4;
  --warn:#dd8d1f; --warn-bg:#fdf3e2; --warn-ink:#855a10; --warn-line:#f2ddb4;
  --risk:#e1503f; --risk-bg:#fdece9; --risk-ink:#b6392a; --risk-line:#f6cfc8;
  --info:#2f7fd1; --info-bg:#e9f2fc; --info-ink:#1f63a8; --info-line:#c9def6;
  --neutral-bg:#f0f1f3; --neutral-ink:#5b6270;

  /* ---- type ---- */
  --font:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --fs-page:17px;   --fw-page:700;
  --fs-card:13.5px; --fw-card:650;
  --fs-body:13.5px;
  --fs-sm:12.5px;
  --fs-xs:11.5px;
  --fs-label:10.5px;
  --fs-tile:27px;   --fw-tile:700;
  --lh-body:1.5;
  --track-tight:-.022em;

  /* ---- spacing (8px grid) ---- */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px; --s7:32px; --s8:40px;
  --pad-card:16px;
  --row-y:11px;

  /* ---- radii ---- */
  --r-lg:12px; --r-md:9px; --r-sm:7px; --r-pill:999px;

  /* ---- depth (borders carry structure; shadows stay quiet) ---- */
  --sh-1:0 1px 1px rgba(18,20,26,.04);
  --sh-2:0 1px 2px rgba(18,20,26,.05);
  --sh-3:0 4px 10px rgba(18,20,26,.06),0 14px 32px rgba(18,20,26,.07);
  --sh-drawer:-8px 0 28px rgba(18,20,26,.10);
  --sh-snack:0 6px 18px rgba(18,20,26,.18),0 18px 44px rgba(18,20,26,.16);

  /* ---- layout ---- */
  --side-w:236px;
  --top-h:56px;
  --drawer-w:440px;
  --content-max:1440px;

  /* ---- motion (functional only) ---- */
  --t:120ms ease;
}
