@layer base {
  *, *::before, *::after { box-sizing: border-box; }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
  }

  body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3, h4 {
    margin: 0;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-wrap: balance;
    color: var(--ink);
  }
  h1 { font-size: var(--fs-display); letter-spacing: -0.035em; }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; }

  p { margin: 0; }
  p + p { margin-top: 1em; }

  a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--t-hover) var(--ease);
  }
  a:hover { color: var(--link-hover); }

  ul, ol { margin: 0; padding: 0; }
  address { font-style: normal; }
  img, svg { display: block; max-width: 100%; height: auto; }
  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  strong { font-weight: 600; }

  ::selection { background: color-mix(in oklab, var(--blue) 30%, transparent); }

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

  .icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  }
}
