/* ============================================================================
   LCB — shared colour tokens
   ----------------------------------------------------------------------------
   Load this on EVERY page. It carries no layout rules, only custom properties,
   so it cannot break a page whose markup predates it — but it replaces the old
   inline :root blocks that each page carried its own copy of, three of which
   declared --ink-3 as #a9a59a.

   That value measured 2.34:1 on the page background and it was not decoration:
   it carried every structural micro-label at 8-10px — section headers, layer
   codes, unit captions, eyebrows. 83 references on dashboard.html alone. This
   is why the interface read as unfinished: the labels you scan to orient were
   physically illegible.

   Source: Nonarkara/palette — Sanzo Wada's 348 recorded colour combinations.
   We take structure and value, not all 159 colours.

     --paper    #f7f5ef  dominant field    (the exhibition's own white)
     --ink      #111314  Wada Black        counter-field, 17.1:1 with paper
     --plate    #12354e  Dark Tyrian Blue  structural depth, 11.7:1 with paper
     --wada-hi  #fdbf68  Cream Yellow      rare signal only

   Measured against --paper #f7f5ef:
     --ink-3  #736e65  4.64:1   (was #a9a59a at 2.34:1 — WCAG AA failure)
     --ink-2  #706b62  5.03:1
   ========================================================================== */

:root {
  /* --- field + ink ------------------------------------------------------- */
  --paper:      #f7f5ef;
  --panel:      #ffffff;
  --ink:        #111314;
  --ink-2:      #706b62;
  --ink-3:      #736e65;   /* 4.64:1 — passes AA at 8px. Was 2.34:1.      */
  --line:       #e2ded1;
  --line-2:     #c9c4b4;

  /* --- structural plates -------------------------------------------------- */
  --plate:      #12354e;   /* Dark Tyrian Blue */
  --plate-ink:  #0b2438;   /* one step deeper for hover/active             */
  --wada-hi:    #fdbf68;   /* Cream Yellow — rare signal, never decoration  */
  --wada-hi-ink:#111314;

  /* --- semantics (unchanged — closed signal system) ----------------------- */
  --accent:     #1f6e43;
  --neg:        #b3261e;
  --amber:      #8a6d05;   /* "moderate". #b6930c was 2.93:1 on white.       */
  --amber-soft: #b6930c;   /* borders/fills only, never text on white      */
  --amber-ink:  #7a5d00;   /* amber TEXT laid on a warm amber tint.          */
                             /* 4.97:1 on #eee7cf (a --amber-soft 14% wash), */
                             /* 5.17:1 on #f8ebb6 (a --amber-soft 25% wash).   */
                             /* The literal #8a6900 these replaced measured    */
                             /* 4.14:1 and 4.28:1 — both under the 4.5:1 AA    */
                             /* floor for the 10px type they carry.            */

  /* --- route families (unchanged — the civic vocabulary) ------------------
     These are MAP MARK colours and stay exactly as specified: a driver has
     learned that orange means "restricted". They are not all safe as UI text
     or as a background under white, so two companions exist:
       --rt-orange      #FF6319  map lines + filled chips   (keep)
       --rt-orange-ink  #a83c05  orange as TEXT            5.81:1 on paper
     For white-on-orange, use ink instead of white — #111314 on #FF6319 is
     6.26:1 where white is only 2.98:1. */
  --rt-ink:     #111314;
  --rt-green:   #00853F;   /* open            */
  --rt-purple:  #B933AD;   /* Fam-2           */
  --rt-yellow:  #FCCC0A;   /* Fam-3 morning ban */
  --rt-orange:  #FF6319;   /* restricted/standby — mark colour only        */
  --rt-orange-ink: #a83c05;/* orange as TEXT. 5.81:1 on paper and 5.11:1 on the
                             12% orange tint chips use, where #b8430a drops
                             to 4.13:1. The mark colour above is unchanged. */
  --rt-orange-soft: #FF6319;/* borders and fills only — same hue, never text */
  --rt-purple-ink: #9a2a90;/* purple is 4.65:1 on paper but 4.16 on its own
                             8% tint, so tinted badges use this             */
  --rt-blue:    #0039A6;   /* port / industrial — already 9.02:1 on paper,
                             so it is safe as text with no darker variant  */
  --road:       #c8c4b8;
  --road-strong:#98948a;

  /* Motion — unchanged from the previous page-level tokens. */
  --shadow-warm: 0 1px 0 rgba(75,60,30,.03), 0 12px 30px -16px rgba(75,60,30,.16);
  --ease-spring: cubic-bezier(.22, 1, .36, 1);

  /* The house reading measure.
   *
   * A reading line wants 45–75 characters. The body text in this product is
   * Thai and Latin at 10.5–12px, where one character is about 4.3–5.0px, so
   * 75 characters is roughly 330px (a character is 4.4px at 11px and 5.0px
   * at 12px, so 330px is 66-75 characters either way). The SH gate measures
   * CHARACTERS; this cap is what makes that number true.
   *
   * A cap is a safety net, not the mechanism. Where a wide card holds prose,
   * the COLUMN is the measure (the brief's notes are laid out in as many
   * columns as there are notes), and the cap only stops a lone line from
   * running the full width of a phone-turned-tablet. */
  --measure: 330px;
}

/* Users who ask the OS for more contrast get a darker tertiary and real rules.
   The old palette had no such branch at all. */
@media (prefers-contrast: more) {
  :root { --ink-3: #55524a; --line: #9d9887; --line-2: #6f6b60; }
}