/* MWS site-specific tweaks on top of the vendored design system.
   Never edit system.css or mws.css directly — put every MWS-only
   adjustment here instead.

   Fix (2026-09-03): system.css declares typography and color directly on
   bare h1-h6 elements (its section 4 typescale — h1 font-family "Archivo
   Black" + color var(--ds-accent); h2 color var(--ds-ink); h4-h6 color
   var(--ds-ink-secondary)). Every one of this site's own headings already
   carries its own typographic system (per-component font-family/weight,
   set in each page's scoped CSS), but a handful never re-declared
   font-family or color themselves — they simply inherited or fell back to
   the pre-existing global default. A declaration made directly on an
   element always wins over inheritance regardless of selector specificity,
   so linking system.css silently:
     - repainted several dark-background headings dark-on-dark, dropping
       Accessibility from 100 to 96 on 14 pages (contrast audit), and
     - swapped `<h1 id="apps-h1">` on /apps/ from its intended sans-serif
       to "Archivo Black" (much wider/heavier), reflowing the hero text and
       regressing Performance to 92 (CLS 0.172).
   Restoring `color`/`font-family` (and the related typescale properties)
   to `inherit` on bare h1-h6 puts every heading that didn't already
   override them back to the pre-existing, contrast- and layout-audited
   behavior, without touching system.css. Headings that explicitly set
   their own font-family/color in a page's own scoped CSS are unaffected
   either way, since their own rule already wins on specificity. */
h1, h2, h3, h4, h5, h6 {
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
  text-transform: none;
  letter-spacing: inherit;
  line-height: inherit;
}

/* Fix (2026-09-03, after re-vendoring system.css from garage bf0ed38): the
   shared layer moved its 28 base element rules into `@layer ds.tokens` /
   `@layer ds.base`, so a consuming site's own rules now win by default. That
   is the correct direction — it is the fix for a live PLLC regression where
   the vendored `img, video, svg { height: auto }` beat the site's own
   `height: 100%` and scene art stopped filling its box.

   MWS never had that symptom, but it WAS silently relying on two of those base
   rules, because it declares nothing of its own for them and Tailwind's
   preflight (in Tailwind's `base` layer, which this site links AFTER
   /ds/system.css and therefore orders later) now wins them:

     p { margin: 0 0 1rem }        Measured with headless Chrome across 16
     p:last-child { margin: 0 }    routes: 189 paragraphs lost their bottom
                                   margin and butted against the next element
                                   — 170 on /blog/, 8 on /, 7 on /apps/, and
                                   the two footer lines on every page.

   Restated here as MWS's own rule rather than borrowed from the vendored
   system. Unlayered, so it beats Tailwind's preflight; declared before every
   page's own scoped CSS, so any page rule still wins on source order. The
   values are the ones the site rendered with before the layer change
   (--ds-space-4 = 1rem), so this is parity, not a new decision. */
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
