@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/onest-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/onest-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --accent: #e5482f;
  --accent-ink: #fff;
  /* Заливка под белый текст: акцент темнее ровно до контраста 4.5:1. common.js setAccent() пересчитывает под цвет клиента */
  --accent-fill: color-mix(in oklab, var(--accent) 91%, black);
  --accent-fill-ink: #fff;
  /* Обводка выбранного и главной кнопки: обычно совпадает с заливкой, у очень светлого акцента темнее неё */
  --accent-line: var(--accent-fill);
  --bg: oklch(1 0 0);
  --surface: oklch(0.97 0.003 260);
  --surface-2: oklch(0.94 0.004 260);
  --line: oklch(0.89 0.005 260);
  --ink: oklch(0.2 0.01 260);
  --ink-2: oklch(0.42 0.01 260);
  --ink-3: oklch(0.5 0.01 260);
  --ok: oklch(0.55 0.13 150);
  --warn: oklch(0.6 0.14 70);
  --err: oklch(0.55 0.19 25);
  --radius: 14px;
  --radius-s: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --z-sticky: 10;
  --z-overlay: 20;
  --z-toast: 30;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 60%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--bg); color: var(--ink);
  font-weight: 560; font-size: 15px; white-space: nowrap; text-decoration: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease), opacity .18s;
}
.btn:hover { background: var(--surface); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-line); color: var(--accent-fill-ink); }
.btn.primary:hover:not(:disabled) { background: color-mix(in oklab, var(--accent-fill) 90%, black); }
.btn.primary:disabled { opacity: 1; background: var(--surface-2); border-color: var(--surface-2); color: var(--ink-3); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { color: var(--err); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; color: var(--ink-2); font-weight: 520; }
.input {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--bg);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.input::placeholder { color: var(--ink-3); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.4; }

.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button {
  border: 0; background: transparent; border-radius: 9px; padding: 7px 14px; font-size: 14px; font-weight: 540; color: var(--ink-2);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / .08); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: var(--z-toast);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 15px;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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