/* Reset, typography and layout. Colours, fonts and spacing come from tokens.css only. */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
}

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

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 var(--space-3); }
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
p, ul, ol, address { margin: 0 0 var(--space-3); }
address { font-style: normal; }

a { color: var(--color-brand); text-underline-offset: 0.15em; }
a:hover { color: var(--color-brand-strong); }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

main:focus { outline: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.container--narrow { max-width: var(--container-narrow); }

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

.plain-list { list-style: none; padding: 0; margin: 0; }

.stack-lines .line { display: block; }

.lead { font-size: 1.2rem; color: var(--color-text-muted); max-width: 40em; }

.prose { max-width: 42em; }
.prose h2 { margin-top: var(--space-5); }
.prose h3 { margin-top: var(--space-4); }

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

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -4rem;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--color-text);
  color: var(--color-bg);
}
.skip-link:focus { top: var(--space-3); color: var(--color-bg); }

@media (min-width: 768px) {
  .container { padding-inline: var(--space-4); }
  .section { padding-block: var(--space-6); }
}

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