/* Base: reset + element defaults. No classes here. */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--maw-header-h) + 1rem);
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }

  body {
    min-height: 100vh;
    background: var(--maw-bg);
    color: var(--maw-text);
    font-family: var(--maw-font-body);
    font-size: var(--maw-text-base);
    line-height: var(--maw-leading);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--maw-font-heading);
    line-height: var(--maw-leading-tight);
    letter-spacing: -0.02em;
    font-weight: 750;
    text-wrap: balance;
  }
  h1 { font-size: var(--maw-text-3xl); }
  h2 { font-size: var(--maw-text-2xl); }
  h3 { font-size: var(--maw-text-xl); }
  h4 { font-size: var(--maw-text-lg); }
  p { text-wrap: pretty; }

  a { color: var(--maw-link); text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
  a:hover { text-decoration-thickness: 0.14em; }

  :focus-visible { outline: 3px solid var(--maw-focus); outline-offset: 2px; border-radius: var(--maw-radius-sm); }

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

  code, kbd, samp, pre { font-family: var(--maw-font-mono); font-size: 0.9em; }
  :not(pre) > code { background: var(--maw-bg-alt); border: 1px solid var(--maw-border); padding: 0.1em 0.35em; border-radius: var(--maw-radius-sm); }
  pre { background: var(--maw-bg-alt); border: 1px solid var(--maw-border); padding: var(--maw-space-4); border-radius: var(--maw-radius); overflow-x: auto; }

  table { width: 100%; border-collapse: collapse; }
  th, td { text-align: left; padding: var(--maw-space-2) var(--maw-space-3); border-bottom: 1px solid var(--maw-border); }

  blockquote { border-left: 4px solid var(--maw-accent); padding-left: var(--maw-space-4); color: var(--maw-text-muted); }

  ::selection { background: var(--maw-accent-soft); }
}
