/* ═══════════════════════════════════════════════════════════════════════════
   THE READING ROOM — token source of truth
   Friends of the Rappahannock County Library · designer · round 2, fix pass

   Every artifact in this folder imports this file and declares no tokens of
   its own. Round 1's Barn Red was demoted because a mockup was built from its
   own generated ramp instead of the approved tokens; PRESSURE_TEST M3 found
   the same drift starting again between the specimen and the comp. One file,
   imported everywhere, makes parity structural instead of coincidental.

   Artifacts importing this file:
     specimen-r2.html · homepage-comp-r2.html
     flyer-comp.html · payment-comp.html · tools-comp.html
   ═══════════════════════════════════════════════════════════════════════════ */

:root{
  /* ── ground and ink — six tokens, exactly one chromatic ───────────────── */
  --paper  :#F5F3EE;   /* the page. Ecru, not the yellow of an old paperback */
  --ink    :#1B1E1B;   /* every word. Warm near-black, never #000            */
  --bindery:#1F4436;   /* THE colour. Links, one bordered action, the rule   */
  --slate  :#585C54;   /* small-caps labels and captions. Never prose        */
  --rule   :#8E8878;   /* the hairline that replaced cards and borders       */
  --hair   :#D6D2C6;   /* sub-hairline. NEVER the sole boundary of anything  */

  /* Pre-verified hue alternates (board decision D3). One line changes it.
     --bindery:#5E222B;  Claret  10.89:1 AAA
     --bindery:#22334A;  Oxford  10.44:1 AAA                                 */

  /* ── one typeface. no second family anywhere. ─────────────────────────── */
  --serif:'Literata',Georgia,'Times New Roman',serif;

  /* ── the lockup — one size in every artifact ──────────────────────────── */
  --wm-size   :23px;
  --wm-lh     :1.13;
  --wm-rule-w :48px;
  --mark-w    :38px;

  /* ── the type ladder (desktop) ────────────────────────────────────────── */
  --t-hero  :42px;   /* opsz 60 · wght 400 · one per page · 26ch            */
  --t-h2    :29px;   /* opsz 36 · wght 400 · sentence case                  */
  --t-h3    :26px;   /* opsz 32 · wght 400                                  */
  --t-fact  :30px;   /* opsz 24 · wght 500 · lining tabular figures         */
  --t-lede  :21px;
  --t-body  :19px;   /* opsz 16 · wght 450 · 64ch                           */
  --t-action:19px;
  --t-meta  :18px;
  --t-nav   :19px;
  --t-cap   :16px;
  --t-label :15px;   /* small caps · slate · floor for anything non-actionable */

  /* ── tracking ─────────────────────────────────────────────────────────── */
  --tr-label:.11em;  /* small-caps labels                                   */
  --tr-nav  :.07em;  /* small-caps navigation and action labels             */

  /* ── geometry ─────────────────────────────────────────────────────────── */
  --tap    :44px;    /* minimum hit area on any inline link                 */
  --tap-act:52px;    /* bordered action                                     */
  --gut    :clamp(22px,5vw,64px);

  /* ── plate measures (photography is a plate, never full-bleed) ────────── */
  --plate-library:330px;  /* native width of the supplied file after crop   */
  --plate-barn   :540px;  /* native width of the supplied file after crop   */
}

@media (max-width:760px){
  :root{
    --t-hero:30px; --t-h2:25px; --t-h3:23px; --t-fact:26px;
    --t-lede:20px; --t-body:18px;
    --tap-act:52px;
    /* The lockup steps down so "Rappahannock County Library" — a 27-character
       line the naming rule forbids us to shorten — fits a 390px screen INSIDE
       the 22px gutter. Measured on the render: 23px reaches x=382.5 of 390 and
       breaks the gutter; 20px with a 34px mark lands at x=361. */
    --wm-size:20px;
    --mark-w :34px;
  }
}

/* ── the one documented exception ───────────────────────────────────────────
   TRANSACTIONAL SURFACES DO NOT STEP DOWN AT MOBILE. /p/<slug> is a payment
   page read on a phone at a card table in daylight, so prose holds 19px at
   every width instead of stepping to 18px. Opt in with class="txn" on <html>;
   it is a system rule, not a per-file override.                             */
@media (max-width:760px){
  html.txn{ --t-body:19px; --t-lede:20px; }
}
