/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   CORE42 — THE BRAND PALETTE, DEFINED ONCE
   ═══════════════════════════════════════════════════════════════════════════════════════════════

   WHY THIS FILE EXISTS (2026-09-09)
   ---------------------------------
   The six Core42 values were defined in FIVE places at once:

     design-system.css:230-235   as --c42-*      (the login desk)
     design-system.css:116-123   as --color-*    (dead — see below)
     arc.html:12-15              as --color-*    verbatim inline copy
     command.html:12-15          as --color-*    verbatim inline copy
     i999.html:12-15             as --color-*    verbatim inline copy, plus --color-critical-2

   The --color-* block in `design-system.css` was dead code: its only consumers are arc, command and
   i999, and those three pages do not load `design-system.css` — they load `sidebar.css` and carry
   their own copy. So the "central brand layer" was central to nothing, and a value corrected in it
   would have silently failed to reach the three pages that read those names.

   Hand-copied palettes drift. This file is loaded FIRST by every page, and it is the only place any
   of these values is written down.

   THE SIX, AND WHERE THEY COME FROM
   ---------------------------------
   Measured, not transcribed: the two RGB logo masters in `docs/guide/` sample to exactly #1D2C22
   and #48DE93, and the swatch fills on pages 25-26 of the Core42 Mini Brand Guidelines resolve to
   the other four. Do not "correct" one of these by eye — re-measure against the PDF.

   Page 25 also sets the intended balance: Platinum White 25%, Pearl White 25%, Grit Green 20%, and
   the remainder split between Slate Black, Impact Green and Passion Orange. That is why the page
   ground is Pearl White and cards are Platinum White rather than white-on-white.

   WHAT IMPACT GREEN CAN AND CANNOT DO
   -----------------------------------
   #48DE93 measures 1.73:1 on Platinum White and 1.48:1 on Pearl White. It is a FILL and a GRAPHIC
   on the light side, never text and never a status glyph — an operator reading a confirmed-fire
   screen must not be handed a 1.7:1 label. On the dark side it is excellent: 8.46:1 on Grit Green.
   White on Impact Green is also 1.73:1, so the ink on a green button is Slate Black (9.94:1), which
   is what `--color-primary-ink` carries.

   THE PALETTE DOES NOT OWN SEVERITY
   ---------------------------------
   Passion Orange #FF4D00 is already spent as a life-safety hue — `app.js` uses it for EVACUATE, gas
   leak, smoke-affected and degraded. It is not available as a brand accent, and the severity ramp,
   the alarm red #CC3D00 and the UAE flag band are governed by legibility, not by this file.
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

:root{
  /* ── the six ──────────────────────────────────────────────────────────────────────────────── */
  --c42-grit:#1D2C22;         /* Grit Green      — the signature dark; rail and sign-in ground */
  --c42-slate:#191C1A;        /* Slate Black     — deepest chrome, active tab, badges          */
  --c42-impact:#48DE93;       /* Impact Green    — THE accent. One per screen.                 */
  --c42-platinum:#FFFFFF;     /* Platinum White  — cards                                       */
  --c42-pearl:#F1EDE8;        /* Pearl White     — the page ground behind the cards            */
  --c42-passion:#FF4D00;      /* Passion Orange  — faults only, never decoration               */

  /* ── on-dark steps, all tints of Grit Green ───────────────────────────────────────────────────
     Solved against #1D2C22 rather than picked: the field border clears 3:1 (a control boundary is
     non-text contrast, WCAG 1.4.11) — at the old 1.66:1 the inputs read as holes in the pane, which
     is most of what "the text isn't readable" was pointing at. */
  --c42-field:#354B3D;        /* field fill, and the rail's active row — 1.55:1 lift off the pane */
  --c42-line:#597864;         /* field + chip border, 2.99:1 on the pane                          */
  --c42-hair:#445C4C;         /* quieter divider on dark                                          */
  --c42-on-dark:#F1EDE8;      /* body text on Grit Green — 12.55:1                                */
  --c42-on-dark-dim:#A9BCB0;  /* labels and captions      —  7.32:1                               */
  --c42-fault:#EC682F;        /* Passion Orange lifted to clear 4.5:1 on Grit Green               */

  /* ── semantic layer ───────────────────────────────────────────────────────────────────────────
     The names arc.html, command.html and i999.html already consume. Every one resolves to a swatch
     above, so there is no second literal to keep in step. */
  --color-background:var(--c42-pearl);      /* the page, per the 25/25 split on p.25             */
  --color-surface:var(--c42-platinum);      /* cards and the top bar sit ON the page             */
  --color-sidebar:var(--c42-slate);         /* avatar/photo gradients, not the rail itself       */
  --color-sidebar-2:var(--c42-grit);
  --color-text-primary:var(--c42-slate);    /* 14.74:1 on Pearl White                            */
  --color-text-secondary:#5C6B61;           /*  4.83:1 on Pearl White                            */
  --color-primary:var(--c42-impact);
  --color-primary-ink:var(--c42-slate);     /* the ONLY accessible ink on Impact Green — 9.94:1  */
  --color-accent:var(--c42-grit);
  --color-critical:var(--c42-passion);      /* a fault, not a confirmed fire                     */
  --color-critical-2:#CC3D00;               /* the alarm red — severity, deliberately not brand  */
  --color-border:#E4DDD1;
  --color-focus:var(--c42-impact);
  --color-success:#127A4B;
  --color-warning:#B4560A;
}

/* p.29 permits Arial when NB International Pro is unavailable. Arabic retains
   the bundled script-capable typeface. Signal colours remain independent. */
html[lang="en"] body,html[lang="en"] button,html[lang="en"] input,html[lang="en"] select,html[lang="en"] textarea{font-family:Arial,Helvetica,sans-serif!important}
/* MDT retains the dark role treatment in the supplied vehicle reference. */
body.c42-driver{--bg:var(--c42-slate);--card:var(--c42-grit);--ink:var(--c42-platinum);--mut:var(--c42-on-dark-dim);--line:var(--c42-line);--brand:var(--c42-impact);--green:var(--c42-impact);--blue-ink:#9ac9ed;--tint-blue:var(--c42-field);--tint-green:var(--c42-field);--tint-amber:#392e20;--amber-ink:#ffce86;--tint-red:#402720;--red-ink:#ffb5a4}
body.c42-driver .go{color:var(--c42-slate)}

body.c42-driver header .lang button[aria-pressed="true"]{background:var(--c42-impact);border-color:var(--c42-impact);color:var(--c42-slate)}
