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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Reserved so locking the page behind a dialog doesn't shift the layout */
  scrollbar-gutter: stable;
}

/* Smooth wheel scrolling (Lenis, components/site/SmoothScroll.tsx). It adds .lenis to <html>
   while it runs; these are its own required rules. Nested scrollers it leaves to the browser
   keep their scroll to themselves, and an iframe cannot swallow the wheel mid-glide. */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

body {
  margin: 0;
  background: var(--color-ground);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

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

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: 10;
  padding: var(--space-xs) var(--space-s);
  background: var(--color-cta);
  color: var(--color-cta-ink);
  text-decoration: none;
}

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

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

/* The icon sprite. Every page that uses icons carries one <svg class="icon-sprite"> of
   <symbol>s near the top of the body and references them with <use href="#icon-name">, so a
   glyph that repeats twenty times down a page is drawn once. It renders nothing itself:
   taken out of flow and given no size, it never opens a gap above the first section. */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
