/* =============================================================================
   base.css — reset, typography, layout primitives, accessibility baseline
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sw-color-bg);
  color: var(--sw-color-text);
  font-family: var(--sw-font-body);
  font-size: var(--sw-font-scale-base);
  line-height: var(--sw-line-height);
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--sw-space-4); }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
/* Heading level promoted for correct document outline (no skipped levels)
   while keeping the same visual size as h3 elsewhere on the page. */
.heading-sm { font-size: 1.2rem; }
p  { margin: 0 0 var(--sw-space-4); }
a  { color: var(--sw-color-link); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--sw-color-link-hover); }

/* Visible, unmistakable focus state everywhere — never colour-only */
:focus-visible {
  outline: 3px solid var(--sw-color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--sw-color-surface); color: var(--sw-color-text);
  padding: var(--sw-space-3) var(--sw-space-4); border-radius: 0 0 var(--sw-radius) 0;
  border: 2px solid var(--sw-color-focus);
}
.skip-link:focus { left: 0; }

.container       { max-width: var(--sw-container); margin: 0 auto; padding: 0 var(--sw-space-4); }
.container--narrow { max-width: var(--sw-container-narrow); margin: 0 auto; padding: 0 var(--sw-space-4); }
.stack > * + *   { margin-top: var(--sw-space-4); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

@media (min-width: 780px) {
  .mt-7 { margin-top: var(--sw-space-12); }
}
