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

html {
  min-width: 20rem;
  background: var(--color-canvas);
  font-family: var(--font-sans);
  font-size: 100%;
  line-height: var(--line-height-body);
  color: var(--color-text);
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-canvas);
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

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

button,
select,
input[type="checkbox"],
input[type="radio"],
input[type="file"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
p,
ul,
ol,
dl {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  color: var(--color-heading);
  line-height: var(--line-height-heading);
}

h1 {
  margin-block-end: var(--space-3);
  font-size: var(--font-size-2xl);
}

h2 {
  margin-block-end: var(--space-5);
  font-size: var(--font-size-xl);
}

h3 {
  margin-block-end: var(--space-3);
  font-size: var(--font-size-lg);
}

p,
li {
  max-width: 75ch;
}

a {
  color: var(--color-link);
  font-weight: var(--font-weight-medium);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: 3px;
}

::selection {
  color: var(--color-white);
  background: var(--color-ink-800);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--color-white);
  background: var(--color-ink-950);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}
