/* Base styles, layout, and typography (Spec 7.3, 7.4). Mobile-first; breakpoints at 640px,
   1024px, and 1280px. */

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-16);
  line-height: var(--lh-16);
  font-weight: var(--weight-regular);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-4);
  font-weight: var(--weight-semibold);
  color: var(--navy);
}
h1 {
  font-size: var(--text-30);
  line-height: var(--lh-30);
}
h2 {
  font-size: var(--text-22);
  line-height: var(--lh-22);
}
h3 {
  font-size: var(--text-18);
  line-height: var(--lh-18);
}
p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--blue);
  text-underline-offset: 2px;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

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

.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: var(--space-4);
  top: -100px;
  background: var(--surface);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-control);
  z-index: 100;
}
.skip-link:focus {
  top: var(--space-2);
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-6);
  }
}

.page {
  padding-top: var(--space-8);
  padding-bottom: var(--space-12);
}

.narrow {
  max-width: 480px;
}
.prose {
  max-width: var(--measure);
}

.label {
  font-size: var(--text-12);
  line-height: var(--lh-12);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  color: var(--muted);
}
.caption {
  font-size: var(--text-14);
  line-height: var(--lh-14);
  color: var(--muted);
}
.numeric {
  font-variant-numeric: tabular-nums;
}
.stack > * + * {
  margin-top: var(--space-4);
}
.row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
}

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