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

html {
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-interface);
  font-size: 100%;
  line-height: 1.55;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--color-page);
}

body.menu-is-open {
  overflow: hidden;
}

main {
  min-height: 65vh;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd,
ol,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 580;
  letter-spacing: -0.025em;
  line-height: 1.03;
}

h1 {
  font-size: clamp(2.8rem, 5.4vw, 4.75rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.75rem);
}

h3 {
  font-size: 1.35rem;
}

p,
li,
dd,
dt,
td,
th,
label,
input,
select,
button {
  font-size: 1rem;
}

p {
  color: var(--color-ink-soft);
}

a {
  color: var(--color-sapphire-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-sapphire);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
}

code,
pre {
  font-family: var(--font-data);
}

pre {
  max-width: 100%;
  overflow: auto;
  padding: var(--space-5);
  border: var(--rule);
  background: var(--color-surface);
  color: var(--color-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.site-shell {
  width: min(100%, calc(var(--content-max) + 6rem));
  margin: 0 auto;
  padding-inline: clamp(1.125rem, 3vw, 3rem);
}

.sr-only {
  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: 1000;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  background: var(--color-ink);
  color: #fff;
}

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: clamp(2.35rem, 10vw, 2.8rem);
  }
}
