/* ----------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--ground);
  color: var(--ink-2);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--rule-strong) var(--ground);
}
body {
  margin: 0;
  font-family: var(--mono);
  font-weight: var(--body-weight);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}
::selection {
  background: var(--red);
  color: var(--on-red);
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul,
figure {
  margin: 0;
}
/* Low-specificity defaults keep semantic headings on the shared type scale.
   Display and component roles can override them without fighting the reset. */
:where(h1, h2, h3, h4, h5, h6) {
  color: var(--ink-1);
  font-weight: var(--label-weight);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
:where(h1) { font-size: var(--text-3xl); }
:where(h2) { font-size: var(--text-2xl); }
:where(h3) { font-size: var(--text-xl); }
:where(h4) { font-size: var(--text-lg); }
:where(h5) { font-size: var(--text-base); }
:where(h6) { font-size: var(--text-sm); }
ol,
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  transition: text-decoration-color var(--motion-normal) var(--ease), color var(--motion-normal) var(--ease);
}
a:hover {
  color: var(--ink-1);
  text-decoration-color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: var(--s-2) var(--s-3);
  background: var(--ground);
  color: var(--ink-1);
}
.skip:focus {
  top: var(--s-2);
}

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