* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 13px/1.45 var(--font);
  letter-spacing: -0.003em;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  overflow: hidden;
}
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 18px; height: 18px; }

/* ---------- buttons, fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: var(--r); font-weight: 550; font-size: 12.5px; white-space: nowrap; transition: background 0.12s, box-shadow 0.12s, color 0.12s, transform 0.08s;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgb(61 68 229 / 0.3), inset 0 0 0 1px rgb(0 0 0 / 0.04); }
.btn-primary:hover { background: var(--accent-2); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #22252e; }
.btn-secondary { background: var(--surface); box-shadow: var(--sh-card); color: var(--ink); }
.btn-secondary:hover { background: var(--sunken); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-lg { height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: var(--r-md); }
.btn-icon { width: 30px; padding: 0; }
.btn-icon.sm { width: 26px; height: 26px; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--r); background: var(--hover); gap: 2px; }
.seg button { height: 26px; min-width: 28px; padding: 0 9px; border-radius: 6px; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-card); }
.field {
  width: 100%; height: 36px; padding: 0 12px; border-radius: var(--r); border: 0; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2); outline: none; transition: box-shadow 0.12s;
}
.field:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.field-lg { height: 42px; font-size: 14px; border-radius: var(--r-md); }
textarea.field { height: auto; padding: 10px 12px; resize: none; line-height: 1.5; }
label.lbl { display: block; font-size: 12px; font-weight: 550; color: var(--ink-2); margin: 0 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 550; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.chip.blue { background: var(--accent-soft); color: var(--accent-ink); }
.chip.green { background: var(--green-soft); color: #0b7a3b; }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.outline { background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.chip svg.i { width: 12px; height: 12px; }

/* Less motion when the viewer asks for it: no entrances, pulses or loops; changes happen at once. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
