/* base.css — reset + universal element behavior */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* B7 — the three text-size-adjust declarations were removed from this rule.
   Their value was the keyword `none`, which switches off the mobile text-inflation algorithm outright and, in
   WebKit, has historically also suppressed user text-size preferences, which is
   a WCAG 2.1 SC 1.4.4 Resize Text (AA) risk. Removing them restores the
   `auto` initial value. This is safe on this page because the whole type scale
   is fluid (`--text-*` are `clamp()` functions with a vw term) and every text
   container is fluid too (`p, li, figcaption { max-width: 72ch }` below, plus
   percentage/`fr` grids in style.css), so inflated text reflows rather than
   clipping or overflowing. */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: var(--space-20);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); font-weight: 400; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection { background: color-mix(in oklab, var(--color-primary) 25%, transparent); color: var(--color-text); }

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

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

button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

a, button, [role='button'], [role='link'], input, textarea, select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

/* B3 — the skip link at index.html:106 is `.sr-only`. `.sr-only` alone clips it
   to 1x1px even while focused, so a sighted keyboard user tabs onto an
   invisible control (WCAG 2.1 SC 2.4.7 Focus Visible, and 2.4.1 Bypass Blocks
   is only usefully satisfied when the link can be seen). `clip-path` is added
   alongside the legacy `clip` because `clip` is deprecated and ignored by some
   engines on non-`absolute` boxes. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  white-space: nowrap; border-width: 0;
}

.sr-only:focus,
.sr-only:focus-visible {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 1000;
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-5);
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: nowrap;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  outline: 2px solid var(--color-text-inverse);
  outline-offset: -4px;
}
