/* Сброс и типографика */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.25; }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }
p { margin: 0; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

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

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

img, svg { display: block; }

.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }

.muted { color: var(--text-3); }
.small { font-size: var(--text-sm); }
.xsmall { font-size: var(--text-xs); }
.nums { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.row { display: flex; align-items: center; gap: var(--space-2); }
.row-wrap { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.spacer { flex: 1; }

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

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