/*
 * Every value here comes from the design guide §8. The older spec §6 predates
 * the 2026-08 design changes; the guide is the current authority.
 * Changing a value here changes the whole site. That is the intent.
 */

:root {
  /* Colour. Ratios are enforced by scripts/check-content, not by a document. */
  --ground: #E8E9E4;
  --surface: #F6F5F0;
  --ink: #202522;
  --ink-secondary: #48504B;
  --rule: #C9CDC7;
  --umber: #4A3328;

  /*
   * The accent marks exactly one line per post and nothing else. Links
   * deliberately do not use it: a colour that also does link duty stops being
   * a mark and becomes furniture. It replaces the retired bottle green.
   */
  --accent: #B23A2E;

  /*
   * One face. Georgia was drawn for small sizes on screen, renders
   * near-identically on every platform, and loads nothing. A single face at
   * genuine scale contrast reads as more deliberate than a mismatched pair.
   */
  --font-body: Georgia, 'Times New Roman', serif;

  /* Scale */
  --step-meta: 0.9375rem;
  --step-body: 1.1875rem;
  --step-lead: 1.375rem;
  --step-h3: 1.75rem;
  --step-h2: clamp(1.75rem, 1.5rem + 1.2vw, 2.25rem);
  --step-h1: clamp(2.25rem, 1.6rem + 2.4vw, 3rem);

  --leading-body: 1.7;
  --leading-tight: 1.2;

  /*
   * Measure and frame.
   *
   * 34em, not a `ch` value. `ch` is the advance width of "0", which differs
   * enough between faces that the old 58ch figure meant nothing once the face
   * changed. 34em lands a Georgia body line at roughly 65-75 characters, the
   * band from guide §8. The cap only binds above ~850px viewport.
   */
  --measure-read: 34em;
  --frame: 1160px;
  --gutter: 1.5rem;

  /*
   * Measure is a property of elements, not pages. The homepage is composed
   * blocks, not continuous reading, so a single constraint would turn it into
   * a thin column. The varying widths are the point.
   *
   * The first two are in `em` deliberately: they cap display type relative to
   * its own size, which is what makes large type read as a statement. The third
   * is in `rem` because it caps an h1 — an `em` value there resolves against
   * 48px type and never binds.
   */
  --measure-title: 11em;
  --measure-line: 25em;
  --measure-orient: 35rem;

  /* Rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;
}

/*
 * Breakpoints are 48rem and 68rem, written as literals in every media query.
 * They cannot be custom properties: var() is invalid in a media query prelude
 * and fails silently. See spec §7.1.
 */
