/* ============================================================================
   creationhouse.org — design system
   ----------------------------------------------------------------------------
   DECISION BLOCK (written before any markup, per design-craft §2)

   DIRECTION   Instrument / hardware — teenage.engineering, Elektron, Polaroid.
               Chosen because this is a diagnostic instrument and the FINDINGS are
               the argument. Density of facts reads as confidence. Navigation is a
               dense index, not a menu. Not blended with anything else.

   STRUCTURE   Composition, not system. Sections placed by hand, ~40 custom
               properties, not 500. The house is four doors and a tool, not a
               component library.

   FACES       Archivo (variable, wght 100-900 + wdth 62-125) — display and text.
               The wdth axis is used condensed for the large numeric readouts, the
               way a meter face is condensed. One grotesque doing both jobs is what
               TE actually does; a second sans would be redundant.
               IBM Plex Mono — every number, every machine transcript, every code
               fix. The transcript is literally machine output so it is set as
               machine output. Chosen over JetBrains Mono for the flatter, more
               instrument-like terminals.
               NOT Inter alone: measured, 1 of 69 admired sites does that.

   WEIGHTS     THREE, each with a job: 400 body, 600 headings and labels, 700 display
               and numeric readouts. An earlier draft shipped 400/600/650/680/700 —
               three of those sit within 50 units of each other and no reader can tell
               them apart, which is picking numbers rather than choosing weights.

   SCALE       11 / 13 / 15 / 19 / 26 / 40 / 76.  The 76 tier exists only for the
               two scores and the hero claim. Category label at 13 sits directly
               above the 76 — a ~5.8x jump with nothing between (Apple's move).

   ACCENT      ONE: signal amber oklch(.80 .145 74). It marks the live readout and
               nothing else. Severity uses its own functional ramp (amber -> red)
               which is not decoration. Neutral ramp is chroma exactly 0 so the
               amber is the only hue on the page.

   CURVE       --ease: cubic-bezier(.45,.02,.09,.98) at 280ms — Polaroid's late
               acceleration, mechanical, no overshoot. Target ~70% dominance.
               --ease-fast 120ms for state that must feel instant.
               --ease-long 620ms reserved for THE STRIP only.

   THEMES      [data-theme] attribute, seeded from prefers-color-scheme, user
               choice persists and wins. Dark is default: an instrument's readout
               is a bright figure on a dark ground.

   MECHANISM   THE STRIP. A control that progressively removes from the live page
               everything a machine cannot perceive, until only the transcript is
               left. The page performs the product on itself. This is the one thing
               a screenshot of this page cannot do, and it is the whole argument.
   ========================================================================== */

/* ---- neutral ramp: chroma exactly 0 so amber is the only hue -------------- */
:root {
  --n-00: oklch(0.145 0 0);
  --n-05: oklch(0.185 0 0);
  --n-10: oklch(0.225 0 0);
  --n-15: oklch(0.275 0 0);
  --n-25: oklch(0.360 0 0);
  --n-40: oklch(0.490 0 0);
  --n-55: oklch(0.610 0 0);
  --n-70: oklch(0.735 0 0);
  --n-85: oklch(0.870 0 0);
  --n-95: oklch(0.955 0 0);
  --n-99: oklch(0.990 0 0);

  --signal:      oklch(0.80 0.145 74);
  --signal-dim:  oklch(0.62 0.115 74);
  --sev-critical: oklch(0.66 0.20 25);
  --sev-serious:  oklch(0.74 0.16 52);
  --sev-moderate: oklch(0.80 0.115 88);
  --sev-minor:    oklch(0.66 0.02 250);
  --good:         oklch(0.76 0.15 155);

  --ease:      cubic-bezier(0.45, 0.02, 0.09, 0.98);
  --ease-fast: cubic-bezier(0.45, 0.02, 0.09, 0.98);
  --t:      280ms;
  --t-fast: 120ms;
  --t-long: 620ms;

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

  --rule: 1px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 34rem;

  /* ROLES — themes remap these, never the ramp */
  color-scheme: dark;
  --bg:        var(--n-00);
  --bg-raised: var(--n-05);
  --bg-sunk:   oklch(0.115 0 0);
  --line:      var(--n-15);
  --line-soft: var(--n-10);
  --ink:       var(--n-95);
  --ink-2:     var(--n-70);
  --ink-3:     var(--n-55);
  --ink-4:     var(--n-40);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg:        var(--n-99);
  --bg-raised: oklch(1 0 0);
  --bg-sunk:   var(--n-95);
  --line:      var(--n-85);
  --line-soft: oklch(0.925 0 0);
  --ink:       var(--n-05);
  --ink-2:     var(--n-25);
  --ink-3:     var(--n-40);
  --ink-4:     var(--n-55);
  --signal:     oklch(0.58 0.155 62);
  --signal-dim: oklch(0.66 0.13 68);
  --sev-moderate: oklch(0.58 0.13 80);
  --good:         oklch(0.52 0.14 155);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    color-scheme: light;
    --bg: var(--n-99); --bg-raised: oklch(1 0 0); --bg-sunk: var(--n-95);
    --line: var(--n-85); --line-soft: oklch(0.925 0 0);
    --ink: var(--n-05); --ink-2: var(--n-25); --ink-3: var(--n-40); --ink-4: var(--n-55);
    --signal: oklch(0.58 0.155 62); --signal-dim: oklch(0.66 0.13 68);
    --sev-moderate: oklch(0.58 0.13 80); --good: oklch(0.52 0.14 155);
  }
}

/* ---- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* every number aligns — design-craft §3 */
.num, td, th, time, .score, .tabular { font-variant-numeric: tabular-nums; }

/* ---- craft states: all six, per design-craft §8 --------------------------- */
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 1px;
}
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--signal); color: var(--n-00); }
:root[data-theme="light"] ::selection { background: var(--signal); color: var(--n-99); }

* { scrollbar-width: thin; scrollbar-color: var(--n-25) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--n-25); border: 3px solid var(--bg); border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--n-40); }

button:disabled, [aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- type scale ----------------------------------------------------------- */
.t-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3);
  font-family: var(--mono);
}
.t-meta  { font-size: 13px; color: var(--ink-2); }
.t-body  { font-size: 15px; }
.t-lead  { font-size: 19px; line-height: 1.5; color: var(--ink-2); }
.t-h2    { font-size: clamp(22px, 3vw, 26px); font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.t-h1    { font-size: clamp(30px, 6vw, 40px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
.t-display {
  font-size: clamp(42px, 10.5vw, 76px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 0;
  font-stretch: 96%;
}

/* ---- layout --------------------------------------------------------------- */
.shell { max-width: 78rem; margin-inline: auto; padding-inline: var(--gutter); }
.rule  { border: 0; border-top: var(--rule) solid var(--line); margin: 0; }

/* ---- links ---------------------------------------------------------------- */
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--signal); }

.linkish {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--signal) 45%, transparent);
}
.linkish:hover { text-decoration-color: var(--signal); }

/* ---- shared chrome (index header, claim, footer) -------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--bg); color: var(--ink); padding: 0.7rem 1.1rem;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; border: var(--rule) solid var(--signal);
}
.skip:focus { left: 0; }

.index {
  display: flex; align-items: baseline; gap: 0.6rem 1.6rem; flex-wrap: wrap;
  padding: 1rem 0 1.1rem; border-bottom: var(--rule) solid var(--line);
}
.index .mark {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  text-decoration: none;
}
.index a.mark:hover { color: var(--ink); }
.index .mark.cur { color: var(--ink); }
.index .sep { color: var(--ink-4); font-family: var(--mono); font-size: 11px; }
.index .spine { flex: 1 1 6rem; }
.index dl {
  margin: 0; display: grid; grid-template-columns: auto auto; gap: 0.1rem 0.7rem;
  font-family: var(--mono); font-size: 11px; color: var(--ink-4); align-content: start;
}
.index dt { color: var(--ink-4); }
.index dd { margin: 0; color: var(--ink-2); }

.themeswitch {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; background: none; border: var(--rule) solid var(--line);
  color: var(--ink-3); padding: 0.3rem 0.6rem; cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.themeswitch:hover { color: var(--ink); border-color: var(--ink-4); }

.claim { padding: clamp(3.5rem, 14vh, 8rem) 0 clamp(2rem, 6vh, 3.5rem); }
.claim .t-label { display: block; margin-bottom: 1.1rem; }
.claim h1 { max-width: 20ch; }
.claim .dot { color: var(--signal); }
.claim .quiet { color: var(--ink-4); display: block; }

footer.foot {
  border-top: var(--rule) solid var(--line);
  padding: 1.1rem 0 2.5rem; margin-top: clamp(3rem, 8vh, 5rem);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; color: var(--ink-4);
}
footer.foot a { color: var(--ink-3); text-decoration: none; }
footer.foot a:hover { color: var(--ink); }
