/* =============================================================================
   THE PINGBACK — institutional token substrate                     (2026-08-26)
   -----------------------------------------------------------------------------
   Ported from apps/inganci/identity/tokens.css. Same file, same job, and above
   all the same HABIT: this is the one place a colour or a typeface is written
   down, and every value it declares is recorded with its MEASURED contrast.

   THAT HABIT IS THE REASON THE FILE EXISTS. See THE TRAP at the foot — a gold
   in this family was carried for months under a comment asserting a ratio it
   did not have, because the number had been true once and nobody re-measured
   it when the ground moved. Numbers here, never adjectives.

   WHAT CHANGED vs. Inganci's substrate
     · THE GROUND. Inganci offered three cool candidate grounds (cool / white /
       grey). The Pingback ships ONE and keeps a second arguable: a cool neutral
       #F4F4F4, with the warmer paper #F7F5F0 retained under [data-ground]
       so the change stays reversible rather than merely done. A charcoal
       register sits under [data-theme="dark"].
     · THE ACCENT. Ultramarine became GOLD. Gold does not clear AA for text on
       either light ground, so the family law changes shape with it:

           GOLD MARKS. IT DOES NOT SET CHARACTERS.

       Everything below is a consequence of that sentence. Three tokens carry
       three different permissions, and they are not interchangeable.
     · THE VOCABULARY. `--core` became `--warrant`. A warrant is what entitles
       a claim, which is what the accent marks on every surface here — the
       finding, the citation, the place you are in the argument. The word
       survives a future hue the way `core` did; it also says what the mark is
       FOR, which `core` never did.
     · THE TYPE SPINE. Archivo / Archivo Narrow became Instrument Sans for the
       display and micro registers and EB Garamond for prose. One grotesque and
       one garalde: the institution speaks in labels and reads in text.

   NO MONOSPACE, anywhere, ever. Standing house rule.

   Consumers: build/assets/site.css (the shell) and research/research.css (the
   paper library). Neither declares a colour or a font-family of its own —
   swapping the values in THIS file must be sufficient to reskin every surface.
   ============================================================================= */

:root {
  /* ---- the type spine — CONSTANT across every ground ----

     Instrument Sans sets everything that IDENTIFIES (the wordmark, the datum
     labels, the publication numbers, the titles). EB Garamond sets everything
     that is READ. The split is the institution's own: an identifier is looked
     up, a text is inhabited, and one face has never done both well.

     --font-label and --font-mark are the display face by reference rather than
     by a restated literal. They are the same drawing at different sizes and
     tracking; writing the stack three times is three places for it to drift.
     (The approved mockups restate it; this says the same thing once.) */
  --font-display: "Instrument Sans", system-ui, sans-serif;
  --font-label:   var(--font-display);
  --font-mark:    var(--font-display);
  --font-prose:   "EB Garamond", Georgia, "Times New Roman", serif;

  /* ---- structure — institutional register ---- */
  --radius:        2px;    /* hairline institution, not a 16px consumer card */
  --hairline:      1px;
  --shell:         1180px;
  --gutter:        clamp(20px, 4vw, 56px);
  --measure:       60ch;   /* shell prose max-width */
  --mark-size:     28px;
}

/* =============================================================================
   THE ACCENT, AND ITS THREE PERMISSIONS

   Measured on this family's own values. Never assume one of these, and never
   carry one forward across a change of ground: the whole reason this block is
   written out is that exactly that was done once and it was silently wrong for
   the life of the file.

     --warrant       #AD851E on #F4F4F4   3.10:1   rules, borders, marks,
                                                   focus rings. NEVER text.
                     #AD851E on #F7F5F0   3.13:1
                                                   3.10 clears WCAG 1.4.11's
                                                   3:1 floor for NON-TEXT UI
                                                   components, which is
                                                   precisely why gold may RING
                                                   a control it may not SET.

     --warrant-text  #886714 on #F4F4F4   4.78:1   THE ONE LEGAL TEXT GOLD.
                     #886714 on #F7F5F0   4.82:1   Clears AA (4.5:1) for normal
                                                   text. House floor for it is
                                                   14px — below that it is a
                                                   compliant colour on an
                                                   uncomfortable size, and the
                                                   only sanctioned exception is
                                                   an identifier (a citation
                                                   call, a note number), never
                                                   reading text.

     --warrant-wash  rgba(173,133,30,.13)          The highlight. A wash BEHIND
                                                   the letters; the character
                                                   colour never changes, so it
                                                   cannot fail — --ink on the
                                                   resulting blend (~#EBE6D8)
                                                   measures 14.78:1.

   On the dark register and inside a dark band the constraint stops biting:
   #C9A23F measures 7.65:1 on #141414 and 7.90:1 on the band's #101010, so
   there gold MAY set a character. That is a property of the ground, not a
   relaxation of the law.
   ============================================================================= */

/* =============================================================================
   GROUND — "neutral"  ·  cool neutral light.        ▓▓▓ SHIPPED ▓▓▓
   The default, and the one The Pingback publishes on.
   ============================================================================= */
:root,
[data-ground="neutral"] {
  --ground:      #F4F4F4;
  --raised:      #FCFCFC;
  --sunk:        #EAEAEA;
  --hair:        #DCDCDC;
  --hair-strong: #C4C4C4;
  --mid:         #9C9C9C;
  --dim:         #61615F;   /*  5.64:1 on ground — AA small text            */
  --ink-soft:    #3A3A3C;
  --ink:         #141414;   /* 16.75:1 on ground                            */

  --warrant:      #AD851E;              /*  3.10:1 — rule only, NEVER text   */
  --warrant-text: #886714;              /*  4.78:1 — the one legal text gold */
  --warrant-wash: rgba(173,133,30,.13); /* --ink on the blend is 14.78:1     */
}

/* =============================================================================
   GROUND — "paper"  ·  the incumbent warm cream.
   Kept so the change of ground stays ARGUABLE rather than merely done.
   apps/thepingback/style.css shipped this ground; cooling it to #F4F4F4 is the
   proposal, and a proposal you cannot switch back from is a decree.
   ============================================================================= */
[data-ground="paper"] {
  --ground:      #F7F5F0;
  --raised:      #FDFCF9;
  --sunk:        #F1EEE6;
  --hair:        #E1DCD0;
  --hair-strong: #CAC3B3;
  --mid:         #A29A8B;
  --dim:         #63605A;   /* not re-measured on this ground — no number is
                               printed here until one has been. See THE TRAP. */
  --ink-soft:    #3B3934;
  --ink:         #1A1A1A;

  --warrant:      #AD851E;              /* 3.13:1 on this ground             */
  --warrant-text: #886714;              /* 4.82:1 on this ground             */
  --warrant-wash: rgba(173,133,30,.13);
}

/* =============================================================================
   THE CHARCOAL REGISTER.
   Not a third ground — a register. The grounds above are a decision about what
   paper the institution prints on; this is a decision the READER makes.
   ============================================================================= */
[data-theme="dark"] {
  --ground:      #141414;
  --raised:      #1C1C1C;
  --sunk:        #0E0E0E;
  --hair:        #2B2B2B;
  --hair-strong: #3C3C3C;
  --mid:         #6B6B6B;
  --dim:         #9A9A98;
  --ink-soft:    #C6C6C6;
  --ink:         #F4F4F4;

  /* Gold lifts, and the two gold tokens COLLAPSE INTO ONE — on this ground the
     constraint that separated them does not exist. #C9A23F measures 7.65:1 on
     #141414, so a rule and a character are equally legal in it. Every component
     that already says var(--warrant) or var(--warrant-text) simply works. */
  --warrant:      #C9A23F;              /* 7.65:1 on #141414 */
  --warrant-text: #C9A23F;              /* 7.65:1 — see above */
  --warrant-wash: rgba(201,162,63,.16);
}

/* =============================================================================
   THE BAND — dark in BOTH registers, the way Anthropic's is.
   It is not a theme surface; it is a PLACE. Slightly deeper than the dark
   ground so that it still reads as a band when the whole page is charcoal,
   which is why these live at :root and are never re-declared per theme.
   ============================================================================= */
:root {
  --band:         #101010;
  --on-band:      #F0F0F0;
  --on-band-dim:  #8E8E8A;   /* 5.79:1 on --band — sub-line, nav panel */
  --on-band-q:    #A3A39D;   /* 7.51:1 on --band — over a busy field   */
  --on-band-hair: rgba(240,240,240,.16);

  /* ── TWO LAWS THIS FILE EXISTS TO ENFORCE ──────────────────────────────────
     Both were violated in the mockups this port came from, and both were found
     by measuring rather than by looking.

     1. --mid IS NOT A TEXT COLOUR ON A LIGHT GROUND. It is 2.50:1 on #F4F4F4
        and 2.56:1 on #F7F5F0 — below AA at any size, and every use of it was at
        9.5-12px, the worst case. It is legal for glyphs that carry no meaning
        (separators), for rules, and for text on the band. Anything a reader has
        to READ takes --dim (5.64:1 / 5.75:1 / 6.54:1 across the three grounds).

     2. THE BAND DOES NOT FOLLOW THE REGISTER, SO ITS TEXT MUST NOT EITHER.
        --band is #101010 in both light and dark. --mid and --dim are redefined
        per register. Put either on the band and it is legible in one register
        and fails in the other while the ground underneath has not moved:
            --mid  on band:  6.93:1 light  ->  3.57:1 dark
            --dim  on band:  3.07:1 light  ->  6.75:1 dark
        Anything on the band takes --on-band, --on-band-dim or --on-band-q,
        which are declared once here and are register-independent by design. */
  --band-warrant: #C9A23F;   /* 7.90:1 on --band — here gold may SET text */
}

/* THE ONE RE-POINT, and it is the whole mechanism for the band's gold.

   Inside a dark region every component that already says var(--warrant) or
   var(--warrant-text) keeps saying it; this rule swaps in the lifted value, so
   nothing downstream has to know which ground it landed on. One rule, no
   per-component overrides, no `.is-dark .thing` chains.

   `.band` and `.is-dark` are the two names a dark region wears — the former is
   the root page's stratum 02, the latter any other inverted stratum. */
.band,
.is-dark {
  --warrant:      var(--band-warrant);
  --warrant-text: var(--band-warrant);
}

/* =============================================================================
   TYPE SCALE — roles, not literals. Weights, tracking and leading are dialled
   per surface (site.css for the shell, research.css for a paper) because a
   masthead and a paper are different objects; the SIZES are shared, because
   they are the institution's voice and it does not change room to room.

   Two laws hold whatever the face, because they belong to the institution and
   not to the drawing: the display register is SENTENCE CASE, and the wordmark
   and micro-labels are CAPS.
   ============================================================================= */
:root {
  --t-display: clamp(38px, 5.9vw, 80px);   /* h1 */
  --t-section: clamp(23px, 2.4vw, 30px);   /* h2 */
  --t-sub:     clamp(17px, 1.5vw, 20px);   /* h3 — no consumer on the shell
                                              today; the ladder keeps its rung
                                              because a scale with a gap in it
                                              stops being a scale */
  --t-lede:    clamp(17px, 1.45vw, 20px);
  --t-body:    16px;
  --t-small:   14px;
  --t-label:   11px;                       /* Instrument Sans 500 UPPER */

  --track-label: 0.14em;
  --tr-mark:     0.02em;   /* the wordmark's own tracking — see site.css */
}

/* =============================================================================
   ⚠ THE TRAP, and it is silent. This is the record of the failure this file's
   whole documentation habit exists to prevent.

   apps/thepingback/style.css carries a token named --gold-deep, value #8F6D15,
   under a comment claiming it is gold text for light grounds at 4.5:1 or
   better. Measured against this substrate's ground it is 4.37:1 — UNDER AA.

   The comment was not a lie when it was written. #8F6D15 does clear 4.5:1 on
   that file's warmer #F7F5F0. Cooling the ground to #F4F4F4 took roughly a
   tenth off every ratio on the page, and one of them crossed the line. Nothing
   in the code changed; nothing warned; the claim simply stopped being true.

   TWO RULES FOLLOW, and they are the reason for the format above:

     1. A contrast claim is attached to a PAIR — a value AND a ground. Moving
        either invalidates it. Never carry a ratio across a change of ground.
     2. Record the number, never the adjective. "Passes AA" survives a ground
        change looking healthy; "4.37:1 on #F4F4F4" cannot.

   #886714 is the replacement, and it was chosen by measuring on BOTH grounds
   (4.78 neutral / 4.82 paper) rather than on the one that happened to be
   current. Do not reinstate --gold-deep.
   ============================================================================= */
