/* ============================================================
   Agentic Network Design System v2 — tokens.css
   Shared neutral spine + type/space/shape/motion/status tokens.
   Load order: tokens.css -> <site>.accent.css -> components.css
   Framework-free. Safe to drop into any repo in the estate.
   All colour pairs sanctioned for text are printed with their
   measured WCAG ratios in DESIGN-SYSTEM.md §9.1.
   ============================================================ */

:root{
  /* — Neutral spine: light grounds — */
  --bg:#FAF6EC;            /* paper-100, page ground */
  --surface:#FFFDF7;       /* paper-50, cards */
  --surface-quiet:#F1EAD8; /* paper-200, quiet sections, stripes */
  --text:#17222D;          /* 14.93:1 on --bg */
  --text-2:#405364;        /* 7.37:1 on --bg */
  --text-3:#5A6B7A;        /* 5.10:1 on --bg */
  --line:#DDD3BA;          /* decorative borders on light */
  --line-strong:#8A7B52;   /* 3.86:1 — input borders, UI boundaries */

  /* — Gold family (shared signal) — */
  --gold:#C9A227;          /* GRAPHIC ONLY (2.24:1) — never text on light */
  --gold-text:#7A5C00;     /* 5.79:1 on --bg — text-safe gold */
  --gold-fill:#E8C85A;     /* primary fill on dark; text on it is --text (9.85:1) */

  /* — Links, focus — */
  --link:#0E7C7B;          /* 4.65:1 on --bg */
  --focus:#0E7C7B;

  /* — Dark grounds — */
  --bg-d:#07131F;          /* ink-950 */
  --surface-d:#0B1E3A;     /* ink-900 */
  --raised-d:#123152;      /* ink-800 */
  --ink-700:#24476E;       /* dark borders, secondary dark fills */
  --text-d:#F5F1E6;        /* 16.58:1 on --bg-d */
  --text-d2:#C7D2DF;       /* 10.87:1 on --surface-d */
  --text-d3:#93A5BC;       /* 6.62:1 on --surface-d */
  --line-d:rgba(255,255,255,.18);
  --link-d:#E8C85A;        /* 10.18:1 on --surface-d */
  --focus-d:#E8C85A;

  /* — Status (always paired with a text label) — */
  --ok:#1E7A34;            /* 5.00:1 on --bg */
  --ok-tint:#EAF4EC;
  --ok-d:#7BD88F;          /* 9.56:1 on ink-900 */
  --danger:#B3261E;        /* 6.06:1 on --bg; white on it 6.54:1 */
  --danger-tint:#FBEDEC;
  --danger-d:#F2B8B5;      /* 9.75:1 on ink-900 */
  --warn:#8A5A00;          /* 5.37:1 on --warn-tint */
  --warn-tint:#FFF3D6;
  --info:#175CD3;          /* 5.55:1 on --bg */
  --info-tint:#EBF1FC;

  /* — Accent slots: set by packs/<site>.accent.css —
     Defaults below are the AGI Corp set so a page is never unstyled. */
  --accent:#17352A;
  --accent-deep:#17352A;
  --accent-bright:#E9B949;
  --accent-text:#17352A;
  --accent-text-alt:#8A6100;
  --on-accent:#FFFFFF;
  --hero-ground:#17352A;

  /* — Type — */
  --font-display:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --font-sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-mono:ui-monospace,"SF Mono","Cascadia Mono",Consolas,monospace;
  --fs-display:clamp(2.5rem,6vw,4.25rem);
  --fs-h2:clamp(1.9rem,4vw,2.75rem);
  --fs-h3:1.25rem;
  --fs-h4:1.05rem;
  --fs-lede:clamp(1.08rem,2.4vw,1.28rem);
  --fs-body:1rem;
  --fs-small:.9rem;
  --fs-caption:.82rem;
  --fs-eyebrow:.76rem;
  --fs-chip:.78rem;
  --lh-body:1.65;
  --measure:46rem;         /* reading width */
  --measure-wide:72rem;    /* content width */

  /* — Space (4px base) — */
  --sp-1:.25rem; --sp-2:.5rem; --sp-3:.75rem; --sp-4:1rem;
  --sp-5:1.5rem; --sp-6:2rem; --sp-7:3rem; --sp-8:4rem;
  --sp-9:6rem; --sp-10:8rem;
  --gutter:clamp(1.25rem,4vw,3rem);
  --section-pad:clamp(4.5rem,9vw,7.5rem);

  /* — Shape & elevation — */
  --r-sm:10px; --r-md:14px; --r-lg:20px; --r-xl:28px; --r-pill:999px;
  --sh-sm:0 4px 14px rgba(7,19,31,.07);
  --sh-md:0 14px 36px rgba(7,19,31,.12);
  --sh-lg:0 24px 60px rgba(7,19,31,.18);

  /* — Motion — */
  --ease:cubic-bezier(.22,1,.36,1);
  --dur-fast:180ms;
  --dur-med:240ms;

  /* — Targets & bars — */
  --tap:44px;              /* minimum interactive size */
  --tap-primary:48px;      /* primary action height */
  --header-h:72px;
  --actionbar-h:72px;
}

/* Dark section scope: components inside .ds-dark read these. */
.ds-dark{
  --bg:var(--surface-d);
  --surface:var(--raised-d);
  --surface-quiet:var(--ink-700);
  --text:var(--text-d);
  --text-2:var(--text-d2);
  --text-3:var(--text-d3);
  --line:var(--line-d);
  --line-strong:rgba(255,255,255,.45);
  --link:var(--link-d);
  --focus:var(--focus-d);
  --gold-text:var(--gold-fill);
  --ok:var(--ok-d);
  --danger:var(--danger-d);
  background:var(--surface-d);
  color:var(--text-d);
}
