/* Element defaults and small utilities. */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 1rem); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
  margin: 0 0 var(--s2);
  text-wrap: balance;
}
h1, h2 { font-weight: 600; letter-spacing: -0.012em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: 1.3rem; }
h3 { font-family: var(--font-sans); font-size: var(--fs-md); }
p, ul, ol, dl, figure { margin: 0 0 var(--s4); }
p { text-wrap: pretty; }

a { color: var(--accent-700); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-800); }

:focus-visible { outline: 2px solid var(--accent-600); outline-offset: 2px; }
main:focus { outline: none; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--s5) 0; }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; overflow-wrap: anywhere; }
::selection { background: var(--accent-100); color: var(--navy-900); }

/* Form controls have their own sizes, so these must win over them. */
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: -1px !important;
  padding: 0 !important; border: 0 !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--s2); top: -5rem; z-index: 100;
  background: var(--accent-600); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: var(--s2); color: #fff; }

[hidden] { display: none !important; }

.meta { font-size: var(--fs-sm); color: var(--text-3); margin: 0; line-height: 1.5; }
.lede { font-size: var(--fs-md); color: var(--text-2); max-width: 42em; line-height: 1.6; }
.eyebrow { font-size: var(--fs-sm); font-weight: 600; color: var(--teal-700); margin: 0 0 var(--s1); }
.eyebrow a { color: inherit; }

/* Page-to-page cross-fade, where the browser supports it. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important; animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important; scroll-behavior: auto !important;
  }
}
