/* Self-hosted fonts (SIL Open Font License), latin subset. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); }

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

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
svg { flex: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

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

a, button, select, input, textarea, .row-item {
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), opacity var(--ease), filter var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Type scale from HANDOFF.md; letter-spacing tightens from 16 px up. */
.t-28 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.t-26 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.t-22 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.t-18 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.t-16 { font-size: 16px; letter-spacing: -0.01em; }
.t-15 { font-size: 15px; }
.t-14 { font-size: 14px; }
.t-13 { font-size: 13px; }
.t-12 { font-size: 12px; }
.t-11 { font-size: 11px; }
.w-500 { font-weight: 500; }
.w-600 { font-weight: 600; }
.mono { font-family: var(--font-mono); font-weight: 500; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent-text); }
.danger-text { color: var(--danger); }
.lh { line-height: 1.5; }
.strike { text-decoration: line-through; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Layout helpers (4 px grid). */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.baseline { align-items: baseline; }
.start { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.none { flex: none; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-2 { gap: 2px; }
