/* Reset, typography and accessibility baseline shared by every page. */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
video { background: #000; }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; font-family: var(--font-display); font-weight: 700; text-wrap: balance; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); margin-block: 2.5rem 1rem; }
h4 { font-size: var(--step-0); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, figure { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
small { font-size: 0.8em; }

:where(h1, h2, h3, h4, p, li, dd, dt, figcaption, a, span) { overflow-wrap: break-word; }

/* Focus is always visible, never removed. */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus-visible { outline: none; }

.skip-link {
  position: absolute;
  z-index: 1000;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.75rem 1.1rem;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

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

[hidden] { display: none !important; }

/* In-page anchors land below the sticky header. */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.kicker, .sec-kicker {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.fine { font-size: var(--step--1); color: var(--muted); }

/* Touch targets: at tablet and phone widths every control is at least 44 x 44 px. */
@media (max-width: 920px) {
  /* !important so no component rule can shrink a control below the floor. */
  a, button, input, select, textarea, summary, [role="button"] {
    min-height: 44px !important;
    min-width: 44px !important;
  }
  a { display: inline-flex; align-items: center; }
  .lb-link, .g-link, .card-link { display: block; }
  input[type="hidden"], .hp input { min-height: 0 !important; min-width: 0 !important; }
}
