/*
 * Base — document-level defaults.
 *
 * Typeface (Inter), body color, line-height. Add to this file only when
 * a default is genuinely wrong everywhere in the app, not in a single
 * place. Single-place overrides belong in the component's own file.
 */

@layer base {
  /* Border-box everywhere so padding and border count INSIDE an
     element's declared size rather than expanding it. The default
     content-box behavior breaks any layout that uses min-height: 100vh
     plus padding (the padding silently adds another 2*padding to the
     element height, pushing it past the viewport). Standard reset. */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 system-ui, "Helvetica Neue", Arial, sans-serif;
    font-feature-settings: "cv11", "ss01", "ss03";
    color: var(--color-text-body);
    background: var(--color-white);
    line-height: 1.5;
  }

  body { margin: 0; }

  /* Headings — a restrained scale so raw content reads as designed
     even before a page adopts component classes. Page titles use
     `.page-header__title`; these cover in-content headings. */
  h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-heading);
    font-weight: 600;
    line-height: var(--leading-tight);
    margin: 0 0 var(--space-3);
  }

  h1 { font-size: var(--text-2xl); letter-spacing: -0.015em; }
  h2 { font-size: var(--text-xl);  letter-spacing: -0.01em; }
  h3 { font-size: var(--text-lg); }
  h4 { font-size: var(--text-base); }
  h5, h6 { font-size: var(--text-sm); }

  p { margin: 0 0 var(--space-4); }

  ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
  li { margin: 0 0 var(--space-1); }

  strong, b { font-weight: 600; color: var(--color-text-heading); }

  hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: var(--space-6) 0;
  }

  small { font-size: var(--text-xs); }

  a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 120ms ease;
  }

  a:hover {
    color: var(--color-link-hover);
  }

  code {
    font-family: var(--font-family-mono);
    font-size: 0.9em;
  }
}
