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

html, body { overflow-x: clip; }
html {
  scroll-behavior: smooth;
  scroll-padding-block-start: 1.5rem;
  scrollbar-color: var(--color-ink-2) var(--color-paper);
}
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--color-accent); color: var(--color-accent-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }

a { color: inherit; text-underline-offset: 0.23em; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:disabled { opacity: 0.5; cursor: default; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p, figure { margin: 0; }
img, video { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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