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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--navy-dark);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

p {
  max-width: 68ch;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--border);
  padding: 0.1em 0.4em;
  border-radius: var(--r-sm);
}

/* Focus accessible */
:focus-visible {
  outline: 3px solid var(--navy-light);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--r-md);
  z-index: 9999;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}
