/*
 * 00-tokens.css — the design tokens. ElNidoGuide-Migration.md §2.1–§2.3.
 *
 * Transcribed from the prototype's <style id="brand-palette"> block. This is the
 * ONLY file in the cascade permitted to contain raw hex values; every other file
 * refers to these custom properties. tools/csscheck.mjs enforces that.
 *
 * One accent, and one only (§2.1). The ramp below is a single hue at nine steps —
 * introducing a second hue anywhere is a §12 violation.
 */

:root{
  /* ---- Colour (§2.1) — transcribed verbatim from the prototype ---- */
  --color-bg:#F7F4EE;
  --color-surface:#EFEAE1;
  --color-text:#14343B;
  --color-divider:#D8D0C4;
  /* Darkened from the prototype’s #5E7178, which measures 4.27:1 on --color-surface
     and fails WCAG AA for body text. #586A71 clears 4.5:1 on both --color-bg (5.15)
     and --color-surface (4.72). Smallest change that passes; see build/audit-contrast.mjs. */
  --color-muted:#586A71;

  --color-accent:#0E8F9E;
  --color-accent-100:#E3F3F4;
  --color-accent-200:#BEE5E8;
  --color-accent-300:#8FD3D9;
  --color-accent-400:#47B2BD;
  --color-accent-500:#0E8F9E;
  --color-accent-600:#0C7C89;
  --color-accent-700:#0A6572;
  --color-accent-800:#084F59;
  --color-accent-900:#063B43;

  /* Dialog backdrop: --color-text at 42%. Held as a token so no component file
     needs a colour literal — see tools/csscheck.mjs, rule no-off-palette-colour. */
  --color-scrim:rgba(20,52,59,.42);

  /* ------------------------------------------------------------------ state --
   * Semantic status colour. NOT a second accent.
   *
   * §12 forbids a second ACCENT — a competing brand hue used decoratively. It does
   * not forbid state: a form that reports an error in the accent teal, or a saved
   * confirmation in the same teal as every button, has stopped communicating. Every
   * one of these is functional and appears only on a message, a badge or a field in
   * an error/success/warning state.
   *
   * They live here so the fidelity linter can see them and so the whole set is
   * reviewable in one place — which is the entire point of the no-off-palette rule.
   * Values are the ones already in use across the OCS surfaces, checked for contrast
   * against their own tint: danger 6.4:1, success 5.1:1, warning 6.9:1.
   */
  --color-danger:#A02833;
  --color-danger-bg:#FCEBEC;
  --color-danger-border:#E3B5B9;
  --color-success:#1E7E34;
  --color-success-bg:#D6F0D8;
  --color-warning:#856404;
  --color-warning-bg:#FFF3CD;

  /*
   * ---- Spacing (§2.3) ----
   * DERIVED, NOT TRANSCRIBED. The prototype's design-system stylesheet
   * (_ds/industry-…/styles.css) is missing from the project, so these values are
   * inferred from §2.3 ("~16px gutters; sections separated by ~48–64px") checked
   * against usage in the prototype: --space-4 is the gutter (161 uses) and
   * --space-8 the section rhythm (51 uses). Both constraints are met exactly on a
   * 4px grid. Only these six steps are ever used.
   *
   * See docs/OPEN-QUESTIONS.md #1. If the real _ds/ stylesheet is recovered,
   * correct these values and re-run the visual diff — nothing else should change.
   */
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-6:32px;
  --space-8:48px;

  /* ---- Type (§2.2) ---- */
  --font-heading:'Barlow Condensed','Barlow Condensed Fallback',system-ui,sans-serif;
  --font-body:'Barlow','Barlow Fallback',system-ui,sans-serif;

  /* Fluid scale, straight from §2.2's table. GP's Customizer holds the static
     fallbacks; these clamps are what actually render. */
  --type-h1-hero:clamp(34px,6.4vw,66px);
  --type-h1-page:clamp(30px,5.2vw,54px);
  --type-h1-article:clamp(32px,5.8vw,60px);
  --type-h2-section:clamp(24px,3.2vw,34px);
  --type-h2-article:clamp(22px,2.9vw,30px);
  --type-h3-card:clamp(19px,1.6vw,24px);
  --type-body-article:17.5px;
  --type-body:16px;
  --type-kicker:11px;
  --type-meta:13px;

  /* §3.2 — the blueprint registration mark: two hairlines crossed into a "+".
     Defined once here so the gradient literal exists in exactly one file; every
     blueprint object references this token rather than repeating it. */
  --registration-mark:
    linear-gradient(var(--color-text),var(--color-text)) center/1px 11px no-repeat,
    linear-gradient(var(--color-text),var(--color-text)) center/11px 1px no-repeat;

  --measure-article:68ch;   /* §2.2 — article column max-width */
  --container:1280px;       /* §2.3 — Customizer → Layout → Container */
  --rail-top:70px;          /* §6.3 — sticky right-rail offset */
}
