/* =========================================================
   BASE / RESET
   ========================================================= */

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

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

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

body {
  margin: 0;
  background: var(--st-paper);
  color: var(--st-ink);
  font-family: var(--st-font-body);
  font-size: var(--st-fs-base);
  line-height: var(--st-lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--st-font-display);
  font-weight: 600;
  line-height: var(--st-lh-tight);
  color: var(--st-ink);
  margin: 0 0 var(--st-space-4);
}

h1 { font-size: var(--st-fs-3xl); letter-spacing: -0.01em; }
h2 { font-size: var(--st-fs-2xl); letter-spacing: -0.005em; }
h3 { font-size: var(--st-fs-xl); }
h4 { font-size: var(--st-fs-lg); font-family: var(--st-font-body); font-weight: 700; }

p { margin: 0 0 var(--st-space-4); max-width: 70ch; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--st-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--st-primary-dark); }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

ul, ol { padding-left: 1.25em; }

.st-container {
  max-width: var(--st-content-width);
  margin-inline: auto;
  padding-inline: var(--st-space-5);
}

.st-container--narrow {
  max-width: var(--st-content-narrow);
}

/* Numeric alignment for stats/results */
.st-num, .st-tabular {
  font-variant-numeric: tabular-nums;
}

/* Visually-hidden but accessible */
.st-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.st-skip-link {
  position: absolute;
  left: var(--st-space-3);
  top: -48px;
  background: var(--st-ink);
  color: var(--st-paper);
  padding: var(--st-space-3) var(--st-space-4);
  border-radius: var(--st-radius);
  z-index: 200;
  transition: top var(--st-transition);
}
.st-skip-link:focus {
  top: var(--st-space-3);
}

/* Consistent visible focus ring */
:focus-visible {
  outline: 2px solid var(--st-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Section rhythm */
.st-section {
  padding-block: var(--st-space-8);
}
.st-section--tight {
  padding-block: var(--st-space-6);
}
.st-section-head {
  margin-bottom: var(--st-space-6);
}
.st-section-head p {
  color: var(--st-ink-soft);
  font-size: var(--st-fs-md);
}
