*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--step-0)/1.6 var(--font-ui);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); }
a { color: var(--defense); text-underline-offset: 3px; }
code, pre { font-family: var(--font-code); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--defense); outline-offset: 2px; border-radius: 3px; }
.wrap { width: min(100% - 2 * var(--gutter), 74rem); margin-inline: auto; }
.muted { color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* controls */
.btn {
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  padding: 0.65rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg);
}
.btn:hover { opacity: 0.88; }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn--quiet:hover { border-color: var(--ink); opacity: 1; }
input, textarea, select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.55rem 0.7rem; width: 100%;
}
textarea { resize: vertical; line-height: 1.5; }
select { width: auto; max-width: 100%; }

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