/* Reset, typography defaults, focus system, and skip link. Fonts are declared in theme.json. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-l);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading);
  font-weight: 400;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.25; }

p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

p { text-wrap: pretty; }

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

a {
  color: var(--blue-ink);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button {
  font: inherit;
}

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

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -100vh;
  z-index: 100;
  padding: var(--space-2xs) var(--space-s);
  background: var(--paper);
  color: var(--blue-ink);
  border: var(--rule) solid var(--blue-ink);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-s);
}

.no-js .js-only {
  display: none !important;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
