/* Itswrng — brand tokens. Source of truth for the static site.
   Fonts (Google Fonts, self-host for production):
   Archivo (wdth 62–125, wght 400–900), Spectral (400, 600, 400 italic). */

:root {
  /* Color — light (default); these flip in dark mode */
  --paper:      #F3F3F1;  /* page ground */
  --sheet:      #FBFBFA;  /* the ruled sheet: reading surface, figures, inputs */
  --grey-light: #DCDCD8;  /* panels */
  --grey-mid:   #9A9A96;  /* disabled fills, never text */
  --hatch:      #6A6B6D;  /* 45° hatching inside figures — the only fill */
  --graphite:   #5D5D59;  /* meta, captions, numerals — 5.9:1 on paper */
  --ink:        #141414;  /* text, line work, primary fills — 16.6:1 */
  --rule:       #C4C4C0;  /* 1px rules */
  --crimson:    #B3122E;  /* the strike, the failing part, the wordmark dot ONLY — 6.2:1 */
  --on-ink:     #F3F3F1;

  /* Fixed — never flip (ink bands, share cards, compact mark) */
  --fixed-ink:           #141414;
  --fixed-paper:         #F3F3F1;
  --fixed-rule:          #C4C4C0;
  --fixed-graphite:      #A4A49F;  /* on fixed ink — 7.4:1 */
  --fixed-graphite-paper: #5D5D59; /* on fixed paper — 5.9:1 */
  --fixed-crimson:       #B3122E;  /* on fixed paper — 6.2:1 */
  --fixed-crimson-lift:  #EA4F66;  /* on fixed ink — 5.1:1 */

  /* Type */
  --font-head: "Archivo", "Arial Narrow", sans-serif;
  --font-text: "Spectral", Georgia, serif;
  --wdth-head: 72;  --wdth-mark: 70;  --wdth-sub: 85;  --wdth-ui: 100;

  /* Type scale (mobile → desktop) */
  --fs-claim:      clamp(2.5rem, 1.5rem + 4.2vw, 5.25rem);    /* 40 → 84  struck headline */
  --fs-correction: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);   /* 24 → 34  the one-line answer */
  --fs-h2:         clamp(1.75rem, 1.4rem + 1.2vw, 2.125rem);  /* 28 → 34 */
  --fs-h3:         clamp(1.25rem, 1.15rem + .4vw, 1.375rem);  /* 20 → 22 */
  --fs-amended:    clamp(1.5rem, 1.2rem + 1vw, 1.75rem);      /* 24 → 28  the claim, rewritten */
  --fs-body:       clamp(1.125rem, 1.08rem + .2vw, 1.1875rem);/* 18 → 19 */
  --fs-part:       1.0625rem;  /* 17  dissection part text */
  --fs-fig:        1.0625rem;  /* 17  Spectral italic figure captions */
  --fs-ui:         .9375rem;   /* 15 */
  --fs-meta:       .875rem;    /* 14 */
  --fs-label:      .75rem;     /* 12, caps, +0.1em */

  --lh-claim: .98; --lh-correction: 1.15; --lh-h2: 1.1; --lh-h3: 1.25; --lh-body: 1.62; --lh-ui: 1.45;
  --track-claim: -.02em; --track-mark: -.03em; --track-label: .1em;
  --strike: .09em;   /* strike thickness, relative to the claim size */
  --measure: 64ch;

  /* Space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Lines, corners, motion */
  --hair: 1px solid var(--rule);
  --line: 1.5px;            /* figure line weight */
  --sheet-frame: 1.5px solid var(--ink);   /* outer rule; inner rule 1px, 5.5px inside (outline-offset -7px) */
  --radius: 0;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 160ms; --t-strike: 700ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121211; --sheet: #1C1C1A; --grey-light: #2B2B29; --grey-mid: #4A4A47; --hatch: #8A8A86;
    --graphite: #A4A49F; --ink: #E9E9E6; --rule: #383836;
    --crimson: #EA4F66; /* 5.2:1 on paper, 4.7:1 on sheet */ --on-ink: #121211;
  }
}
:root[data-theme="dark"] {
  --paper: #121211; --sheet: #1C1C1A; --grey-light: #2B2B29; --grey-mid: #4A4A47; --hatch: #8A8A86;
  --graphite: #A4A49F; --ink: #E9E9E6; --rule: #383836;
  --crimson: #EA4F66; --on-ink: #121211;
}
