/*
 * Design tokens. Nothing else.
 *
 * No layout, no components, no face declarations, no font loading. Those arrive with the
 * DESIGN_SPEC layout session; this file exists so that when they do, there is somewhere
 * for a value to come from other than a literal.
 *
 * THIS IS THE ONLY FILE IN THE REPOSITORY THAT MAY CONTAIN A HEX LITERAL.
 * CLAUDE.md §7 and DESIGN_SPEC §4.1: not in a template, not in an inline style, not in an
 * SVG attribute, not in a comment showing what a token resolves to. ADR-004 §8 rule 6
 * makes it a grep over src/render/**, and src/render/__tests__/boundaries.test.ts runs it.
 *
 * Logical properties only, everywhere downstream: margin-inline-start and padding-inline-end,
 * never their physical counterparts. CLAUDE.md §11, and this file must not name them even in
 * prose, because the check that enforces it is a grep over the whole file.
 */

:root {
  /* --- Brand. CLAUDE.md §7, reproduced verbatim. DESIGN_SPEC §4.1 adds; never edits. --- */
  --brand-green-900: #00341A;
  --brand-green-700: #006C35;  /* primary */
  --brand-green-100: #E6F0EA;
  --brand-gold-600:  #C9A227;  /* accent only. DESIGN_SPEC §4.5: exactly two uses. */
  --brand-gold-100:  #F7EFD6;
  --surface:         #FFFFFF;
  --surface-sunken:  #F6F7F6;
  --ink-900:         #10201A;
  --ink-500:         #5A6B62;

  /* --- Added neutrals, and one foreign hue. DESIGN_SPEC §4.1. --- */
  --line-soft:   #E3E8E5;  /* hairlines, table rules */
  --line-strong: #7E8F85;  /* unselected option ring, dashed placeholder */
  /*
   * Focus only. Foreign to both the brand and the acuity namespaces on purpose: a focus
   * ring must never be mistakable for a status or a selection, and a hue that appears
   * nowhere else is the only way to guarantee that.
   */
  --focus: #1D4ED8;

  /*
   * --- Acuity. A RESERVED NAMESPACE. DESIGN_SPEC §4.2. ---
   *
   * Never drawn from the brand palette. Never used for anything that is not a potential
   * acuity value. Never shown on the patient surface at all (DESIGN_SPEC §4.6) — acuity is
   * not shown to a patient.
   *
   * The ring ramp 8/6/4/2/1 is MONOTONIC WITH URGENCY and is not decoration. It is the
   * second, non-chromatic channel carrying level, which is what makes the indicator read
   * correctly in greyscale, under protanopia, and through a phone camera in bad light.
   * CLAUDE.md §7: acuity identity is never carried by colour alone. Numeral, translated
   * level name, and this edge weight all carry it.
   *
   * Contrast ratios are computed in DESIGN_SPEC §4.2, not estimated. Every ink-on-fill pair
   * clears 7:1 (WCAG AAA), every edge clears 3:1 on --surface-sunken. Any change to these
   * five triples re-runs that table.
   */
  --acuity-1-fill: #7F1D1D;  --acuity-1-ink: #FFFFFF;  --acuity-1-edge: #450A0A;
  --acuity-2-fill: #9A3412;  --acuity-2-ink: #FFFFFF;  --acuity-2-edge: #431407;
  --acuity-3-fill: #FDE68A;  --acuity-3-ink: #78350F;  --acuity-3-edge: #B45309;
  --acuity-4-fill: #DCFCE7;  --acuity-4-ink: #14532D;  --acuity-4-edge: #166534;
  --acuity-5-fill: #FFFFFF;  --acuity-5-ink: #1F2937;  --acuity-5-edge: #6B7280;

  --acuity-1-ring: 8px;
  --acuity-2-ring: 6px;
  --acuity-3-ring: 4px;
  --acuity-4-ring: 2px;
  --acuity-5-ring: 1px;  /* never absent: level 5's fill IS --surface. DESIGN_SPEC §4.3. */

  /*
   * --- Spacing. DESIGN_SPEC §3. 4px base, nine steps, nothing else exists. ---
   *
   * Any length that is not one of these is a review failure, in the same class as a
   * hardcoded string under I6. The two exceptions are the acuity ring ramp above and the
   * acuity numeral's optical baseline nudge, and that is the complete list.
   *
   * The spacing scale does NOT change per locale. Only type metrics do. That is what keeps
   * one layout serving seven scripts (DESIGN_SPEC §13.1).
   */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* --- Weight. DESIGN_SPEC §2.5: one family, two weights. Never synthesise a third. --- */
  --weight-regular: 400;
  --weight-semibold: 600;

  /*
   * --- Type scale. DESIGN_SPEC §2.6, Latin metrics. ---
   *
   * Patient surface floor is 20px, from presentation.min_body_text_px.
   * Per-script multipliers (§2.7) are NOT here: Arabic and RTL are out of scope this
   * session, and the mechanism is two factors set on <html> per locale, which belongs with
   * the locale work rather than with the token file.
   */
  --type-kiosk-question-size: 44px;   --type-kiosk-question-leading: 62px;
  --type-kiosk-option-size:   28px;   --type-kiosk-option-leading:   40px;
  --type-kiosk-control-size:  24px;   --type-kiosk-control-leading:  32px;
  --type-kiosk-support-size:  22px;   --type-kiosk-support-leading:  34px;
  --type-kiosk-meta-size:     20px;   --type-kiosk-meta-leading:     28px;

  --type-report-acuity-size:   96px;  --type-report-acuity-leading:   96px;
  --type-report-headline-size: 22px;  --type-report-headline-leading: 28px;
  --type-report-section-size:  13px;  --type-report-section-leading:  18px;
  --type-report-body-size:     15px;  --type-report-body-leading:     22px;
  --type-report-data-size:     15px;  --type-report-data-leading:     20px;
  --type-report-mono-size:     13px;  --type-report-mono-leading:     18px;
}
