/* Electric Bold 2026.5 — implementation tokens
 *
 * Contrast rules are not advisory. Measured against WCAG 2.1 AA:
 * body/small text needs 4.5:1, large text (>=24px, or >=19px bold) needs 3:1.
 * Every ratio below is measured, not estimated.
 */

:root {
  /* ── Identity ─────────────────────────────────────────────── */
  --brand-purple: #442567;          /* on White 12.31 · on Ice 10.84 — safe at any size */
  --brand-purple-deep: #32184F;     /* dark supporting ground */

  /* ── Action ───────────────────────────────────────────────── */
  /* Azure is a LARGE-TEXT and fill colour on light grounds.
   * On Ice it measures 4.24 — below the 4.5 body threshold.
   * For any text under 24px on White or Ice, use --brand-azure-deep instead.
   *
   * Clinical dosage ceiling (2026-08-08): up to 10% on practice web and
   * education surfaces, where Azure carries keylines, fact chips, and one
   * solid action button per view; still 5% max in clinical documents and
   * correspondence. Never introduce burgundy or any wine/oxblood red — dark
   * red is the alert colour and must stay available for real warnings. */
  --brand-azure: #2E6BE6;           /* on White 4.81 · on Ice 4.24 (large text / fills only) */
  --brand-azure-deep: #2458C4;      /* on White 6.43 · on Ice 5.66 — the small-text azure */
  --brand-azure-bright: #4B82F0;    /* on Ink 4.90 — reverse only, never on light grounds */

  /* ── Emphasis ─────────────────────────────────────────────── */
  --brand-periwinkle: #AEB9F7;      /* on Purple 6.50 · NEVER on White (1.89) or Ice (1.67) */
  --brand-periwinkle-ink: #1E2A6B;  /* text colour for use inside a periwinkle block */

  /* ── Grounds ──────────────────────────────────────────────── */
  --brand-ice: #EEF0FB;
  --brand-white: #FFFFFF;
  --brand-ink: #141720;
  --brand-clinical-lavender: #EDE7F6; /* clinical information surfaces only */

  /* ── Text ─────────────────────────────────────────────────── */
  /* All three clear 4.5:1 on White, Ice, and Clinical Lavender.
   * Hierarchy is text > secondary > muted; do not invert it. */
  --brand-text: #23283A;            /* on White 14.62 · on Ice 12.88 · on Lavender 12.09 */
  --brand-text-secondary: #555C72;  /* on White  6.65 · on Ice  5.85 · on Lavender  5.49 */
  --brand-text-muted: #63697B;      /* on White  5.47 · on Ice  4.82 · on Lavender  4.52 */

  --brand-border: #E1E5F2;          /* non-text only — 1.26 on White, never use for type */

  /* ── Type ─────────────────────────────────────────────────── */
  --brand-font-primary: "Archivo", Arial, sans-serif;
  --brand-font-utility: "Space Mono", "Courier New", monospace;

  /* ── Density and layout ───────────────────────────────────── */
  /* Tightened 2026-08-08. This brand is dense: pages carry real content and
   * visible structure, not large empty fields. These are the approved values —
   * do not loosen them locally to create breathing room.
   *
   * Density is more content per screen. It is NEVER smaller or tighter type:
   * --brand-measure, --brand-body-line, and --brand-tap-min are floors, and
   * clinical documents are governed by the Medical Practice Standard instead. */
  --brand-page-pad: clamp(20px, 2.6vw, 48px);   /* outer frame — was clamp(28px, 4vw, 76px) */
  --brand-section-y: clamp(44px, 4.4vw, 76px);  /* between sections — was clamp(76px, 8vw, 132px) */
  --brand-gap: clamp(16px, 1.8vw, 28px);        /* grid and flex gap */
  --brand-content-max: 1180px;                  /* wide content frame; narrow columns waste space */

  /* Legibility floors — density must not cross these. */
  --brand-measure: 68ch;                        /* running text: 65–75 characters */
  --brand-body-line: 1.6;                       /* body line height minimum */
  --brand-tap-min: 44px;                        /* interactive target minimum */

  /* Structure over emptiness: divide a dense page with rules, not big gaps. */
  --brand-rule: 1px solid var(--brand-border);
  --brand-keyline: 3px solid var(--brand-azure);
}
