/* ==========================================================================
   Minnowsoft — base: reset and document defaults
   ========================================================================== */

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

  /* scroll-padding-top is the single anchor offset for the sticky header;
     sections deliberately carry no scroll-margin of their own. */
  html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--size-header);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    hanging-punctuation: first last;
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
  }

  body {
    margin: 0;
    font-family: var(--font-prose);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    font-kerning: normal;
    font-variant-numeric: oldstyle-nums proportional-nums;
    text-rendering: optimizeLegibility;
    color: var(--color-text);
    background-color: var(--color-canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-prose);
    font-weight: 500;
    line-height: var(--leading-heading);
    text-wrap: balance;
  }

  p, ul, ol, dl, dd, address, figure, blockquote {
    margin: 0;
  }

  img, svg {
    display: block;
    max-width: 100%;
    height: auto;
  }

  a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
  }

  button {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    border-radius: 0;
    cursor: pointer;
  }

  /* Keyboard focus is the accent, 2px, offset 2px (A11Y-3). */
  :focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
  }

  /* The skip-link target takes programmatic focus; a ring around the whole
     document is noise rather than signal. */
  main:focus-visible {
    outline: none;
  }

  ::selection {
    color: var(--color-canvas);
    background-color: var(--color-text);
  }
}
