/* Base: font, reset, typography, layout primitives. Tokens only - no raw values. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.3100e775e8.woff2") format("woff2");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-0);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 var(--sp-3); line-height: var(--lh-tight); font-weight: var(--fw-bold); letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--fs-5); }
h2 { font-size: var(--fs-4); }
h3 { font-size: var(--fs-2); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-1); line-height: var(--lh-snug); }
p { margin: 0 0 var(--sp-4); max-width: var(--measure); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
img, svg, video { max-width: 100%; height: auto; }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--c-surface-2); padding: 0.1em 0.35em; border-radius: var(--r-1); overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--sp-6) 0; }

a { color: var(--c-accent); text-underline-offset: 0.2em; }
a:hover { color: var(--c-accent-hover); }

:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--c-bg), 0 0 0 5px var(--c-accent); border-radius: var(--r-1); }

.container { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.muted { color: var(--c-text-muted); }
.eyebrow { font-size: var(--fs-n1); font-weight: var(--fw-semibold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-accent); margin: 0 0 var(--sp-2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: var(--sp-3); top: -4rem; z-index: 100; background: var(--c-accent); color: var(--c-on-accent); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-2); }
.skip-link:focus { top: var(--sp-3); }

@media print { .site-header, .theme-toggle { display: none; } }

/* Skip-link target takes focus (tabindex -1) but is not a control, so no ring. */
#main:focus { outline: none; }
