/* ============================================================================
   INGANCI — institutional token substrate, rebuild pass (2026-08-25)
   ----------------------------------------------------------------------------
   WHAT CHANGED vs. the shipped system, and why:

   Every Inganci ground to date has been a warm cream — #f5f2ea → #f7f5f0 →
   #F5F2EB (House). The "paper tone." This substrate replaces it with THREE
   candidate cool/neutral grounds, switchable at runtime via [data-ground].

   THE ACCENT MOVED — orange → ultramarine (Joel, 2026-08-25). Two reasons:

     1. Hudl (#FF6300) is the largest brand in this market. More than that,
        red-orange is the single most occupied hue family across BOTH adjacent
        markets — Hudl in sport; Anthropic, Cursor, Mistral, Databricks in AI.
        There was no warm exit: going terracotta to escape Hudl lands on
        Anthropic.
     2. It failed WCAG AA. The accent sets 11–12px text — eyebrows, kicker
        indexes, reference numbers, citation superscripts — where AA requires
        4.50:1. Ember measured 4.15 / 4.41 / 3.90 on the three grounds. It
        failed on all three, so no choice of ground rescued it. Ultramarine
        clears the same bar at 8.20 / 8.73 / 7.71.

   The vocabulary moved with it. `ember` is a thermal word and this is not a
   thermal colour, so the warrant tone is now `--core` — plain, structural, and
   it survives any future hue. `--signal` is untouched: signal is an
   instrumentation word, not a heat word.

   WHAT IS PRESERVED (do not touch — these are family-locked):
     · the pair  — a still warrant tone and a lit direction, one hue apart by
                   +6 saturation and +8 lightness. Transposed, not abandoned.
     · the mark  — three concentric diamonds, bounded core (locked 2026-07-16).
     · the type  — Archivo / Archivo Narrow. One spine across the family.

   The accent is the only chromatic element on the page. Spend it sparingly —
   the mark core, the current-page marker, one link state.
   ========================================================================= */

:root {
  /* ---- the accent — CONSTANT across all grounds, family-locked ----

     Ultramarine: from `ultramarinus`, beyond the sea. Ground lapis came from
     one mine complex in Badakhshan and was priced above gold, so Renaissance
     contracts specified where a painter was permitted to spend it — reserved
     for the single most important element in the work. That is already this
     system's rule for this colour, written four centuries early. */
  --core:    #1E32C8;   /* the still warrant · identity  · 8.73 on white */
  --signal:  #283EE7;   /* the lit direction · action    · hover, active  */
  --wrong:   #9a3b28;   /* a wrong call, shown honestly — NEVER the accent */

  /* The third value, and the one cost of leaving orange. Orange was
     luminance-balanced — 4.41 on the white ground and 4.37 on the dark band —
     so one value served both and nobody noticed there was a question. Blues
     are dark hues: superb on white, 2.2 on near-black, where they vanish.
     `.is-dark` below re-points --core at this, so every component that already
     says var(--core) simply works inside a dark stratum. */
  --core-band: #5F6FE7; /* the same hue, lifted · 4.63 on #0A0A0A */

  /* ---- type spine — CONSTANT ---- */
  --font-display: "Archivo", system-ui, -apple-system, sans-serif;
  --font-label:   "Archivo Narrow", "Archivo", system-ui, sans-serif;
  --font-prose:   "Archivo", system-ui, -apple-system, sans-serif;

  /* ---- structure — institutional register (DESIGN-SYSTEM §3) ---- */
  --radius:      2px;    /* hairline institution, not 16px consumer card */
  --hairline:    1px;
  --measure:     68ch;   /* prose max-width */
  --measure-tight: 46ch;
  --shell:       1180px;
  --gutter:      clamp(20px, 4vw, 56px);
}

/* ==========================================================================
   GROUND A — "cool"  ·  cool neutral light
   Strip the yellow. Archival, laboratory, technical-standard register.
   Furthest from paper; cleanest parent/child split against SCOUTSWING's dark.
   ========================================================================== */
:root,
[data-ground="cool"] {
  --ground:      #F4F5F6;
  --raised:      #FFFFFF;
  --sunk:        #EAECEE;
  --hair:        #DDE0E3;
  --hair-strong: #C9CDD2;
  --mid:         #9BA1A8;
  --dim:         #63686E;   /* 5.15:1 on ground — AA small text */
  --ink-soft:    #3A4046;
  --ink:         #14171A;

  --band:        #14171A;   /* dark authority band */
  --on-band:     #E6E8EA;
  --on-band-dim: #8C9298;
  --on-band-hair: rgba(230, 232, 234, 0.16);
}

/* ==========================================================================
   GROUND B — "white"  ·  paper-white, high contrast
   Near-pure white, true black, hairline rules. Gallery / monograph / museum
   wall-text register. Most severe — the typography has to carry everything.
   ========================================================================== */
[data-ground="white"] {
  --ground:      #FCFCFC;
  --raised:      #FFFFFF;
  --sunk:        #F2F2F2;
  --hair:        #E2E2E2;
  --hair-strong: #CFCFCF;
  --mid:         #A0A0A0;
  --dim:         #686868;   /* 5.43:1 on ground — AA small text */
  --ink-soft:    #333333;
  --ink:         #0A0A0A;

  --band:        #0A0A0A;
  --on-band:     #F0F0F0;
  --on-band-dim: #909090;
  --on-band-hair: rgba(240, 240, 240, 0.16);
}

/* ==========================================================================
   GROUND C — "grey"  ·  cool grey, mid-weight
   A grey field with white surfaces floating on it. Structural, gridded,
   systems-diagram register. Closest to how cognition.ai actually renders.
   ========================================================================== */
[data-ground="grey"] {
  --ground:      #E8EAEC;
  --raised:      #F9FAFB;
  --sunk:        #DDE0E3;
  --hair:        #CFD3D7;
  --hair-strong: #B9BEC4;
  --mid:         #8C9298;
  --dim:         #5F646A;   /* was #676C72 — failed AA at 4.39:1. Now 4.95:1. */
  --ink-soft:    #363B41;
  --ink:         #14171A;

  --band:        #14171A;
  --on-band:     #E6E8EA;
  --on-band-dim: #8C9298;
  --on-band-hair: rgba(230, 232, 234, 0.16);
}

/* ==========================================================================
   TYPE SCALE — institutional dial: Archivo 700, sentence case, tight tracking.
   NOT the consumer dial (800/900 uppercase poster) — that register belongs to
   SCOUTSWING. The parent is quiet; the product is loud.
   ========================================================================== */
:root {
  --t-display: clamp(34px, 5.2vw, 60px);   /* h1 — 700 / 1.04 / -0.028em */
  --t-section: clamp(24px, 2.6vw, 32px);   /* h2 — 700 / 1.12 / -0.02em  */
  --t-sub:     clamp(17px, 1.5vw, 20px);   /* h3 — 600 / 1.25 / -0.01em  */
  --t-lede:    clamp(17px, 1.5vw, 20px);   /* lede — 400 / 1.55          */
  --t-body:    16px;                       /* body — 400 / 1.62          */
  --t-small:   14px;
  --t-label:   11px;                       /* Archivo Narrow 600 UPPER   */
  --track-label: 0.14em;
}

/* ==========================================================================
   THE DARK STRATUM — the one place the accent is re-pointed.

   Any component that already says var(--core) keeps saying it; inside a dark
   stratum this rule swaps in the lifted value, so nothing downstream has to
   know which ground it landed on. That is the whole mechanism for the third
   value — one rule, no per-component overrides, no `.is-dark .thing` chains.

   The signal tone is left alone: it is used for hover and active states that
   only appear on light grounds, and re-pointing it here would be a change with
   no consumer.
   ========================================================================== */
.is-dark {
  --core: var(--core-band);
}

/* ⚠ THE ONE TRAP THIS CREATES, and it is silent.

   `--core` is re-pointed above for TEXT and UI contrast. The MARK's core is a
   different thing that happens to share the name: canon says the mark's core
   holds #1E32C8 on every ground, dark included. So a mark whose core polygon is
   filled with var(--core) and which is placed inside a dark stratum will render
   #5F6FE7 and silently contradict the lock — with no visibly wrong code.

   Not live today: there is no .is-dark in any markup in this tree. The site's
   dark band went when 02 was deleted. It becomes live the moment anyone adds
   one back with a mark in it.

   The mark's core takes a literal #1E32C8, or its own token. Never var(--core).
   Found by the agent authoring marks/GEOMETRY.md; see its §5 and check #6. */
