/* ---------- Base / Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout helpers */
.container { max-width: 960px; margin-inline: auto; padding-inline: 1rem; }
.stack > * + * { margin-top: var(--stack, 1rem); }
.grid { display: grid; gap: 1rem; }
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.badge { font-size: .75rem; padding: .15rem .5rem; border: 1px solid var(--border); border-radius: 999px; }
.mono  { font-family: ui-monospace, Menlo, Monaco, "Roboto Mono", Consolas, monospace; }
.center { text-align: center; }

/* Typography */
h1 { font-size: clamp(1.8rem, 1.1rem + 2vw, 2.4rem); line-height: 1.2; margin: .5rem 0 1rem; }
h2 { font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); margin: 1.2rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 .4rem; }
p  { margin: .5rem 0; }
small { color: var(--muted); }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem; background: var(--accent); color: #000; border-radius: 8px; }
