/* ==========================================================================
   Base — reset, typography, focus, and the skip link.
   Applies to every page. Do not edit per screen.
   ========================================================================== */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--wash);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  margin: 0 0 var(--space-3);
  color: var(--indigo);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-base); font-family: var(--font-body); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

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

/* Focus is how a keyboard user knows where they are. Never remove it.
   WCAG 2.4.7. If you find yourself writing `outline: none`, stop. */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* Visible only to screen readers. Use for context a sighted user gets from
   layout: "Search results", "Loan status". */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* First focusable element on every page. Lets a keyboard user jump past the
   navigation instead of tabbing through every link. */
.skip-link {
  position: absolute; left: var(--space-4); top: -3rem;
  z-index: 100;
  background: var(--gold); color: var(--indigo-dark);
  padding: var(--space-2) var(--space-4);
  font-weight: 700; text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: var(--space-2); }

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