/* ============================================================================
   Base: the reset, typography and the handful of utility classes.
   Element selectors only — anything with a name is a component.
   ========================================================================== */

/* ---------------------------------------------------------------- Base ---- */

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

/* Class rules below set display:flex/grid, which outranks the browser's
   [hidden]{display:none}. Restore the priority once, globally. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 var(--sp-2); line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: 1.6rem; font-weight: 640; }
h2 { font-size: 1.0625rem; font-weight: 620; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 var(--sp-3); }
a { color: var(--accent); text-underline-offset: 2px; }

code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: .05em .35em;
  border-radius: 5px;
}

.muted { color: var(--text-muted); }
.empty { color: var(--text-muted); font-style: italic; }
.lead { color: var(--text-muted); font-size: 1.02rem; }
.hint { font-size: .85rem; color: var(--text-muted); margin: var(--sp-3) 0 0; }
.meta-line { color: var(--text-muted); font-size: .875rem; }

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

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