/* Base: reset, typography, utilities. No components here. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--text-base); color: var(--text); background: var(--surface); line-height: var(--leading); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: var(--leading-tight); margin: 0 0 .5em; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }   /* the hidden attribute always wins over component display rules */

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.mono { font-family: var(--mono); }
.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(--space-2); top: -3rem; background: var(--primary); color: var(--white); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); z-index: var(--z-toast); }
.skip-link:focus { top: var(--space-2); }

/* Layout helpers shared by all modules */
.stack { display: grid; gap: var(--space-5); }
.stack-sm { display: grid; gap: var(--space-3); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.r { text-align: right; }

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