/* Base: reset, typography, links, focus. Depends on tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--text-lg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 var(--space-4); line-height: 1.2; font-weight: 700; }
h1 { font-size: var(--text-hero); letter-spacing: -0.02em; }
h2 { font-size: var(--text-3xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-xl); }
p, ul, ol { margin: 0 0 var(--space-4); }
small { font-size: var(--text-sm); }
code { font-family: var(--font-mono); font-size: 0.9em; }
img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--primary); text-underline-offset: 3px; transition: color var(--motion); }
a:hover { color: var(--primary-hover); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--primary);
  color: var(--primary-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.muted { color: var(--muted); }
.soft { color: var(--fg-soft); }
