/* Base layer — element defaults, expressed only in tokens.
 *
 * Loaded after tokens.css and before any template's inline <style>, so a
 * template can still override anything here while it migrates.
 */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--fs-2);
  font-weight: var(--w-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: var(--w-mid);
  margin: 0;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-8); line-height: 1.18; }
h2 { font-size: var(--fs-5); line-height: 1.3; }
h3 { font-size: var(--fs-4); line-height: 1.35; }
h4 { font-size: var(--fs-2); line-height: 1.4; }

p { margin: 0 0 var(--sp-3); }
a { color: inherit; }

/* The UA stylesheet sets b,strong{font-weight:bolder} — a RELATIVE keyword, so
 * it resolves against whatever the element inherits: 900 against a 600 or 700
 * parent. That is a fourth weight the scale doesn't have, and it only appears
 * where a bare <b> renders, which is often only under live data (it was invisible
 * on a dev server with an empty desk and showed up on production). Pinning it
 * here kills the whole class rather than one selector at a time. Template rules
 * still win — this sheet loads first — so .quackcard b's --w-mid and friends are
 * unaffected. */
b, strong { font-weight: var(--w-bold); }

/* The mono data layer: numbers, symbols and timestamps read as instrument
 * output, prose stays Inter, display stays Sora. */
td, th, .tape .sym, .asof, .stamp, .kicker, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
