/* Типографика, формы, кнопки — всё, что не зависит от конкретного экрана. */

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
h2 { font-size: 15px; font-weight: 650; margin: 28px 0 10px; }
h3 { font-size: 14px; font-weight: 650; margin: 0 0 6px; }
p { margin: 8px 0; }
a { color: var(--accent-ink); }

.sub { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }

button, input, select, textarea { font: inherit; color: inherit; }

input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input[type="checkbox"] { width: auto; }

label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin: 12px 0 4px;
}
label.inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }

.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 7px 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.danger { color: var(--crit); border-color: var(--crit); }
.btn.danger:hover { background: var(--crit-soft); }
.btn.small { padding: 4px 9px; font-size: 12.5px; }

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

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