/* Reset and global typography. Mobile first. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: var(--lh);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0 0 var(--s4);
  line-height: 1.2;
  color: var(--midnight);
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 600; }

p { margin: 0 0 var(--s4); }

a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--cobalt-hover); }

ul { margin: 0 0 var(--s4); padding-left: 1.25rem; }
li { margin-bottom: var(--s2); }

strong { font-weight: 700; }
small { font-size: 0.85rem; color: var(--muted); }

/* Keyboard focus is always visible */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s5);
}

.container-narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--s7); }

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

.skip-link {
  position: absolute; left: var(--s4); top: -3rem; z-index: 100;
  background: var(--midnight); color: var(--white); padding: var(--s2) var(--s4);
  border-radius: var(--radius-sm); text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--s4); color: var(--white); }

@media (min-width: 48rem) {
  .section { padding-block: var(--s8); }
}
