html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

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

a {
  color: var(--color-link);
}

button,
input,
select,
textarea {
  font: inherit;
}

* {
  box-sizing: border-box;
}

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

:where(h1, h2, h3, h4, p, ul, ol, figure) {
  margin-top: 0;
}

:where(p, ul, ol) {
  margin-bottom: var(--space-4);
}

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

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink-deep);
  box-shadow: var(--shadow-raised);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-4);
  overflow: visible;
  clip-path: none;
}

::selection {
  color: var(--color-ink-deep);
  background: rgba(235, 173, 42, 0.45);
}

@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;
    scroll-behavior: auto !important;
  }
}
