ground-inversion-guardlisted
Install: claude install-skill fernandokylas/editorial-web-craft
# Ground Inversion Guard
Colour tokens aren't ground-independent. A deep emerald that reads as authoritative on cream turns into unreadable mud on near-black; a soft grey that's fine as muted text on white vanishes on obsidian. The amateur move is to define `--accent: #0e6245` once and use it everywhere. The professional move is to treat each ground as its own contrast system and *mutate* the tokens when the ground flips — same hue family, different job and luminance.
Two rules carry most of the weight:
1. **On light grounds, accents are fills; on dark grounds, accents are text.** A saturated dark colour makes a great background box on paper but a poor text colour on obsidian. Flip its role: keep a *deep* version for background boxes and introduce a *bright* version for typography.
2. **Every pair is measured, not eyeballed.** Ship nothing below 7:1 for body text (AAA), 4.5:1 for large text (≥24px, or ≥19px bold), 3:1 for icons, borders, and UI components. The bundled script does the arithmetic.
## The token contract
Each ground defines the *same set* of variables so components never change; only the values move. Use these as the starting palette:
```css
/* --- Paper ground (root) --- */
:root {
--bg-main: #fcfbf9; /* soft warm white; #ffffff is fine for product UI */
--text-main: #1a1a1a; /* 16.8:1 — off-black, no glare */
--text-muted: #555555; /* 7.2:1 — AAA; #666 only reaches AA on paper */
--accent-solid: #0e6245; /* deep green: B