/* Reset + element defaults + layout primitives. No component styling here. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: var(--fs-base)/var(--lh-body) var(--font-sans);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
  overflow-wrap: anywhere;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: var(--lh-tight); margin: 0 0 var(--sp-3); text-wrap: balance; }
h1 { font-size: var(--fs-2xl); } h2 { font-size: var(--fs-xl); } h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
a { color: var(--primary); text-underline-offset: 0.2em; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
::selection { background: color-mix(in oklch, var(--primary) 30%, transparent); }
[hidden] { display: none !important; }

.container { width: min(100% - 2 * var(--sp-4), var(--container)); margin-inline: auto; }
.stack > * + * { margin-top: var(--stack-gap, var(--sp-4)); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--sp-3)); }
.grid-auto { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--sp-3); top: -4rem; background: var(--primary); color: var(--on-primary); padding: var(--sp-2) var(--sp-4); border-radius: var(--radius); z-index: var(--z-toast); }
.skip-link:focus { top: var(--sp-3); }
.muted { color: var(--text-muted); }

@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; }
}
