/* Reset, element defaults, typography, layout primitives, utilities. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  font-weight: var(--wt-body); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-strong); }
::selection { background: var(--primary-soft-2); color: var(--ink); }
hr { border: 0; border-top: var(--rule); }

h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: var(--wt-head);
  letter-spacing: var(--tracking-heading); line-height: var(--lh-snug);
  text-transform: var(--case-head); text-wrap: balance; font-optical-sizing: auto;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--t-18); }
p, li { text-wrap: pretty; }
p { max-width: var(--measure); }
small { font-size: var(--fs-small); }
strong { font-weight: 700; }

/* ---- Layout primitives ---- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container-wide { width: min(100% - 2 * var(--gutter), var(--container-wide)); margin-inline: auto; }
.container-narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); margin-inline: auto; }
.stack > * + * { margin-top: var(--stack, var(--s-4)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster, var(--s-3)); align-items: center; }
.grid-auto { display: grid; gap: var(--gap-grid); grid-template-columns: repeat(auto-fit, minmax(var(--min, 260px), 1fr)); }
.spread { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }

/* Bands — the Sheet archetype's only container. Full-bleed tone, square edges. */
.band { padding-block: var(--band-pad, var(--section-tight)); background: var(--bg); }
.band--tone { background: var(--surface); }
.band--deep { background: var(--surface-2); }
.band--drench { background: var(--drench); color: var(--on-drench); }
.band--drench a { color: var(--on-drench); }

/* ---- Utilities ---- */
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.display { font-family: var(--font-display); }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); }
.xs { font-size: var(--t-13); }
.sm { font-size: var(--t-14); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ico { flex: none; display: inline-block; vertical-align: -0.2em; }
[hidden] { display: none !important; }
