/* Reset, element defaults and accessibility utilities. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Room for a scrollbar on every page, so pages that scroll (the Hall of
     Fame, About) are exactly as wide as the map page, which doesn't. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ol, ul, figure {
  margin: 0;
}

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

a {
  color: inherit;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* One focus style everywhere: thick, offset, impossible to miss. */
:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

/* Headings that take focus from script (after the sheet's content changes)
   don't need a ring: the content moving is the cue. */
[tabindex="-1"]:focus {
  outline: none;
}

/* Meta labels: kickers, timestamps, small print. */
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: var(--mono-tracking);
}

.muted {
  color: var(--muted);
}

/* Hidden visually, still read by screen readers. */
.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-pill);
}

.skip-link:focus {
  top: 12px;
}

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