/* ============================================================
   Munchkin — Base layer
   Applies the foundation tokens to the document so any page that
   links styles.css gets the parchment surface + friendly type
   for free. Components stay self-contained; this is just the canvas.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: var(--w-regular);
  color: var(--text-primary);
  background-color: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--text-link); text-underline-offset: 2px; }

button, input, textarea, select { font-family: inherit; }

::selection { background: var(--brand-soft); color: var(--text-primary); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
