/* ==========================================================================
   WIDGET 27 · Base
   Reset, typography and layout primitives. Uses tokens.css only.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--sp-4)); }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

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

[hidden] { display: none !important; } /* hidden always wins over component display rules */

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 112%;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }

p { margin: 0; max-width: 65ch; }

a { color: var(--c-blue-text); text-underline-offset: 3px; }
a:hover { color: var(--c-text); }

:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--c-green); color: var(--c-green-ink); }

/* Layout primitives ------------------------------------------------------ */

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

.stack { display: grid; gap: var(--sp-4); align-content: start; }
.stack-lg { display: grid; gap: var(--sp-6); align-content: start; }

.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(--sp-4);
  top: -100px;
  z-index: 100;
  background: var(--c-green);
  color: var(--c-green-ink);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--sp-3); }

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