/* ══ z3 CONTRACT — layer 2, the semantic vocabulary ═══════════════════════════
   Generated from the STAMPED ballots (phase B closed 2026-08-18, all three:
   Amir · Iman · Mario). New surfaces import THIS and use ONLY these names —
   the css-ratchet FAILS any new sheet that ships a raw color.
   ADOPT BY CLASS: put class="z3" on the page/section root (the .substrate
   pattern). The names deliberately reuse the classic vocabulary (--paper,
   --ink, --accent) — the .z3 scope keeps them from colliding with the legacy
   sheets' same-named theme pairs while the oldies await phase C.
   Source of truth: specs/design-lang/z3/contract.css (the app copy under
   vox-app/src/styles/ is a VERBATIM copy — edit the source, re-copy).
   Layer 1 beneath it: specs/design-lang/z2/tokens.css (34 ballot-decided).
   ═══════════════════════════════════════════════════════════════════════════ */

.z3 {
  /* ── GROUNDS (z2 Ballots 02/03/05) ─────────────────────────────────────── */
  --paper:   #F4F2EC;             /* the ground — warm, never white          */
  --card:    #FAF9F5;             /* raised: 6 units lighter, never a shadow */
  --ink:     #0A0A0A;             /* the words AND the night — one substance */

  /* THE RAMP (z2 Ballot 04) — alpha encodes the name                        */
  --ink-78:  rgb(10 10 10 / .78); /* running text                            */
  --ink-60:  rgb(10 10 10 / .60); /* meta, quiet but AA                      */
  --ink-46:  rgb(10 10 10 / .46); /* large text / decoration ONLY, never prose */
  --ink-10:  rgb(10 10 10 / .10); /* the frame around a card                 */
  --ink-8:   rgb(10 10 10 / .08); /* hairline between rows                   */
  --ink-7:   rgb(10 10 10 / .07); /* hover/held wash — never text, never a line */

  /* THE TWO APP RUNGS (z3 shade ballot, Amir 2026-08-18: 14 rungs)
     ⚠ FIRST-CUT VALUES — count+role are stamped; eye-check these two hexes
     in the sim before phase C leans on them, then remove this warning.       */
  --surface-dark: #171614;        /* raised surface ON the night (night card) */
  --ink-soft:     #8A877F;        /* disabled controls, data-viz ground — the
                                     opacity-independent muted ink            */

  /* ── THE ACCENT (z2 Ballot 06 + z3 Ballot 3 · A1: Stahl, flach) ────────── */
  --accent:  #3F6597;             /* the ONE blue: may be a word (5.33:1),
                                     may carry white (5.97:1). NO gradients on
                                     surfaces or words — the zeros hold.      */
  /* the wash is DERIVED, not a token (z2 B06):
     color-mix(in srgb, var(--card), var(--accent) 10%)                       */

  /* ── SIGNALS (z2 Ballot 07 + z3 Ballot 4 · E2a) ────────────────────────── */
  --ok:        #21B354;           /* a dot or a fill, never a word            */
  --bad:       #B22A21;           /* may be a word; ADDS to ink wording       */
  --warn:      #E6B547;           /* amber FILL/dot only — 1.70:1, cannot speak */
  --warn-word: #8F5B1A;           /* amber that MAY speak (5.42:1 on card)    */

  /* ── FOCUS (z3 Ballot 4 · E1a) ─────────────────────────────────────────── */
  --focus: var(--accent);         /* usage: outline: 2px solid var(--focus);
                                     outline-offset: 2px                      */

  /* ── THE SCRIM (z3 Ballot 4 · E4a) ─────────────────────────────────────── */
  --scrim: rgb(10 10 10 / .55);   /* what dims the room behind a dialog       */

  /* ── TYPE (z2 Ballots 09–13 + z3 Ballot 1 · S1: Inter überall) ─────────── */
  --face:  'Inter', system-ui, -apple-system, sans-serif;  /* ONE face. No
                                     Fustat, no serif, no italic on new pages */
  --t-hero:    88px;  --t-display: 52px;  --t-title: 18px;
  --t-body:    16px;  --t-micro:   13px;
  --w-regular: 400;   --w-heavy:   800;   /* weight is on/off                 */
  --track-hero: -.04em; --track-display: -.02em; --track-micro: .10em;
  --lh-tight: 1.05;   --lh-text: 1.6;     --measure: 68ch;

  /* ── SPACE · SHAPE · MOTION (z2 Ballots 14/15/19) ──────────────────────── */
  --u: 8px;                       /* ALL space = calc(var(--u) * n)           */
  --page: 1120px;
  --r: 12px;  --r-lg: 24px;  --pill: 999px;
  --dur: 140ms;  --dur-reveal: 400ms;  --ease: cubic-bezier(.2,.6,.3,1);
}

/* ── THE NIGHT (z3 Ballot 2 · N1: warm, derived from the language) ─────────
   ⚠ FIRST-CUT derivation — the warm night's full per-token tuning is phase C;
   new pages get this block so they are night-ready from birth.               */
html[data-theme="dark"] .z3 {
  --paper:   #0A0A0A;             /* the night IS the ink — one substance     */
  --card:    var(--surface-dark);
  --ink:     #F4F2EC;
  --ink-78:  rgb(244 242 236 / .78);
  --ink-60:  rgb(244 242 236 / .60);
  --ink-46:  rgb(244 242 236 / .46);
  --ink-10:  rgb(244 242 236 / .14);
  --ink-8:   rgb(244 242 236 / .09);
  --ink-7:   rgb(244 242 236 / .07);
  --ink-soft: #75726B;
  --accent:  #7FA5D4;             /* Stahl, lifted to speak on the night      */
  --scrim:   rgb(0 0 0 / .6);
}

/* ── DIE AURA (z2 Ballot 08 · Au1 + z3 Ballot 4 · E0: Au-ja) ───────────────
   ELEMENT SPEC, not tokens: the primary CTA only, ≤1 per viewport, NEVER on
   the night. Its two hexes may be used nowhere else.                         */
.z3-aura { position: relative; isolation: isolate; }
.z3-aura::before {
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  z-index: -1; filter: blur(8px); opacity: .75;
  background: linear-gradient(90deg, #817FED, #60F4E8);
}
.z3-aura::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: inherit; z-index: -1;
}
html[data-theme="dark"] .z3-aura::before { display: none; }  /* never on the night */
