:where(*) {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:where(html) {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

:where(body) {
  min-block-size: 100dvh;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--clr-fg);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:where(h1, h2, h3, h4, h5, h6) {
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

:where(h1) {
  font-size: var(--text-5xl);
}

:where(h2) {
  font-size: var(--text-4xl);
}

:where(h3) {
  font-size: var(--text-3xl);
}

:where(h4) {
  font-size: var(--text-2xl);
}

:where(h5) {
  font-size: var(--text-xl);
}

:where(h6) {
  font-size: var(--text-lg);
}

:where(p, li) {
  max-inline-size: 70ch;
  text-wrap: pretty;
}

:where(a) {
  color: var(--clr-primary);
  text-decoration: none;
}

:where(a):hover {
  color: var(--clr-primary-hover);
  text-decoration: underline;
}

:where(img, picture, video, canvas, svg) {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

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

:where(button) {
  cursor: pointer;
  background: none;
  border: none;
}

:where(:focus-visible) {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

:where(:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding-block: var(--space-md);
  padding-inline: var(--space-lg);
  background: var(--clr-primary);
  color: var(--clr-primary-fg);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.skip-link:focus {
  inset-block-start: var(--space-md);
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

.text-center {
  text-align: center;
}

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