/* ============================================================
   base.css — reset + token-driven base styles. Token-neutral by
   design: the visual language lives in tokens.css + skin.css
   ("Signal Flags", D-006). Currently linked by 404.html.
   Link order (binding): tokens.css → fonts.css → base.css.
   ============================================================ */

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 var(--space-4);
}

p {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--accent);
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.75;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

main section {
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--border);
}

main section:last-child {
  border-bottom: none;
}

.site-header {
  padding: var(--space-5) 0;
}

.site-footer {
  padding: var(--space-6) 0;
  color: var(--text-muted);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

/* Numeric readouts (stats, counts): aligned digits — CRAFT.md §4 */
.num {
  font-variant-numeric: tabular-nums;
}

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

/* RESPONSIVE — this @media block MUST stay LAST in this file.
   All base rules go ABOVE it: a base rule added below silently
   overrides these mobile styles (same specificity, later wins).
   See CRAFT.md §2. Breakpoints: ≤768px mobile, ≥1024px desktop. */
@media (max-width: 768px) {
  main section {
    padding: var(--space-6) 0;
  }
}
