/* Modern, low-specificity reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
  margin: var(--space-0);
}

:where(ul, ol) {
  margin: var(--space-0);
  padding: var(--space-0);
  list-style: none;
}

:where(img, picture, svg, canvas, video, iframe) {
  display: block;
  max-width: 100%;
}

:where(img, picture, video) {
  height: auto;
}

:where(button, input, textarea, select) {
  color: inherit;
  font: inherit;
}

:where(button, [role="button"]) {
  cursor: pointer;
}

:where(button:disabled, input:disabled, textarea:disabled, select:disabled, [aria-disabled="true"]) {
  cursor: not-allowed;
}

:where(textarea) {
  resize: vertical;
}

:where(a) {
  color: inherit;
  text-decoration: none;
}

:where(table) {
  border-collapse: collapse;
  border-spacing: var(--space-0);
}

:where([hidden]) {
  display: none !important;
}

:focus-visible {
  outline: var(--space-1) solid var(--color-accent);
  outline-offset: var(--space-1);
}

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

  *,
  *::before,
  *::after {
    animation-duration: var(--duration-instant) !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: var(--duration-instant) !important;
  }
}
