/* ============================================================
   Сметология — дизайн-система
   Референс из ТЗ: online.otpbank.ru — светлый нейтральный фон,
   белые карточки с крупным радиусом, тёмные кнопки, зелёный акцент,
   много воздуха. Цифры — моноширинные (требование ТЗ).
   ============================================================ */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9f9fa;
  --surface-3: #f0f1f4;
  --text: #00020f;
  --text-2: #4a4d55;
  --muted: #8a8d96;
  --line: #e6e8ec;
  --line-strong: #d5d8de;

  --accent: #5fa82a;
  --accent-hover: #538f24;
  --accent-soft: #eef7e4;
  --lime: #cff56a;

  --btn: #16181d;
  --btn-hover: #2a2d35;
  --btn-text: #ffffff;

  --danger: #d64545;
  --danger-soft: #fdeceb;
  --warning: #b8842a;
  --warning-soft: #fbf3e2;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(16, 18, 24, 0.04);
  --shadow: 0 4px 20px rgba(16, 18, 24, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 18, 24, 0.1);

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --header-h: 68px;
  --content-w: 1180px;
}

[data-theme='dark'] {
  --bg: #0e0f12;
  --surface: #17181c;
  --surface-2: #1d1f24;
  --surface-3: #24262c;
  --text: #f2f3f5;
  --text-2: #c3c5cb;
  --muted: #8b8e97;
  --line: #26282e;
  --line-strong: #343740;

  --accent: #8ed14f;
  --accent-hover: #9fdb66;
  --accent-soft: #1d2718;

  --btn: #f2f3f5;
  --btn-hover: #ffffff;
  --btn-text: #0e0f12;

  --danger: #ef6b6b;
  --danger-soft: #2a1a1a;
  --warning: #d9a441;
  --warning-soft: #292116;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------- раскладка */
.container { width: 100%; max-width: var(--content-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--tight { padding: 40px 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ------------------------------------------------------- шапка
   Плавающая капсула: панель оторвана от края экрана, при прокрутке
   сжимается и уплотняет тень. Сверху — тонкая полоса прогресса чтения. */
.read-progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--lime));
  transition: width .08s linear, opacity .25s ease;
  opacity: 0;
}
.read-progress.is-visible { opacity: 1; }

.header {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 0 10px;
  transition: padding .22s ease;
  isolation: isolate;
}
.header.is-scrolled { padding: 8px 0 8px; }

/* подложка: контент, проходящий под плавающей капсулой, мягко растворяется */
.header::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom,
              var(--bg) 0%, var(--bg) 55%,
              color-mix(in srgb, var(--bg) 60%, transparent) 80%, transparent 100%);
  opacity: 0; transition: opacity .22s ease;
}
.header.is-scrolled::before { opacity: 1; }
.header__inner { position: relative; z-index: 1; }

.header__inner {
  height: 60px;
  display: flex; align-items: center; gap: 24px;
  padding: 0 12px 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--shadow-sm);
  transition: height .22s ease, box-shadow .22s ease, background .22s ease;
}
.header.is-scrolled .header__inner {
  height: 52px;
  box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.logo__mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--btn); color: var(--btn-text);
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--text-2);
  font-size: .94rem; transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.is-active { color: var(--text); font-weight: 500; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--line-strong); }

.burger { display: none; }

/* ------------------------------------------------------ кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  background: var(--btn); color: var(--btn-text);
  font-size: .96rem; font-weight: 500; cursor: pointer; text-align: center;
  transition: background .15s ease, transform .06s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover { background: var(--btn-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; }
.btn--lg { padding: 16px 32px; font-size: 1.02rem; }
.btn--sm { padding: 9px 16px; font-size: .875rem; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-3); }
.btn--soft { background: var(--surface-3); color: var(--text); }
.btn--soft:hover { background: var(--line); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-hover); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--block { width: 100%; }

/* ----------------------------------------------------- карточки */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; }
.card--pad-sm { padding: 20px; }
.card__title { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 500;
  background: var(--surface-3); color: var(--text-2);
}
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }

/* ------------------------------------------------------- формы */
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: .9rem; font-weight: 500; color: var(--text-2); }
.field__label .req { color: var(--danger); }
.field__hint { font-size: .81rem; color: var(--muted); }
.field__error { font-size: .81rem; color: var(--danger); }

.input, .select, .textarea {
  width: 100%; padding: 13px 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input--invalid, .select--invalid { border-color: var(--danger); }
.textarea { min-height: 120px; resize: vertical; }
.input[type='number'] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 62px; }
.input-group__unit {
  position: absolute; right: 16px; font-size: .85rem; color: var(--muted);
  pointer-events: none; font-family: var(--font-mono);
}

.select {
  appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238a8d96' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* переключатель */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 46px; height: 27px; border-radius: 999px; background: var(--line-strong);
  position: relative; flex: none; transition: background .18s ease;
}
.switch__track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .18s ease;
}
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(19px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* карточки-варианты выбора */
.options { display: grid; gap: 10px; }
.options--2 { grid-template-columns: repeat(2, 1fr); }
.options--3 { grid-template-columns: repeat(3, 1fr); }
.option {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: var(--line-strong); }
.option input { position: absolute; opacity: 0; }
.option__title { font-weight: 500; font-size: .96rem; }
.option__hint { font-size: .82rem; color: var(--muted); }
.option:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

/* ----------------------------------------------------- таблицы */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-weight: 500; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.mono, .table th.mono { white-space: nowrap; }

/* ------------------------------------------------ уведомления */
.alert { padding: 14px 18px; border-radius: var(--radius); font-size: .92rem; border: 1px solid transparent; }
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.alert--success { background: var(--accent-soft); color: var(--accent); }
.alert--warning { background: var(--warning-soft); color: var(--warning); }
.alert--info { background: var(--surface-3); color: var(--text-2); }

/* ---------------------------------------- нумерация разделов */
.section-head { margin-bottom: 32px; }
.section-head__top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.section-head__num {
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  color: var(--accent); letter-spacing: .06em; flex: none;
}
.section-head__rule { flex: 1; height: 1px; background: var(--line); }
.section-head h2 { margin-bottom: 10px; }
.section-head__lead { color: var(--muted); max-width: 46em; margin: 0; }

/* --------------------------------------------- живые карточки */
.card--interactive {
  transition: transform .2s cubic-bezier(.22,.61,.36,1),
              box-shadow .2s ease, border-color .2s ease;
}
.card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
@media (prefers-reduced-motion: reduce) {
  .card--interactive:hover { transform: none; }
}

/* ------------------------------------------------ главная */
.hero { padding: 80px 0 56px; position: relative; overflow: hidden; }

/* мягкое свечение и точечная сетка за карточкой сметы */
.hero::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: -18%; right: -10%; width: 62%; aspect-ratio: 1;
  background: radial-gradient(circle at center,
              color-mix(in srgb, var(--accent) 26%, transparent) 0%,
              transparent 68%);
  filter: blur(18px);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 78% 66% at 62% 38%, #000 20%, transparent 76%);
}
[data-theme='dark'] .hero::before { opacity: .5; }
[data-theme='dark'] .hero::after { opacity: .35; }
.hero__inner { position: relative; z-index: 1; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero__lead { font-size: 1.12rem; color: var(--text-2); max-width: 30em; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__facts { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.fact__value { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.03em; }
.fact__label { font-size: .85rem; color: var(--muted); }

/* анимация главного экрана: цифры собираются в таблицу.
   Заглушка на CSS/JS — заменяется материалом Заказчика (п. 5.6 Приложения № 2). */
.hero__visual {
  position: relative; aspect-ratio: 1 / .92; border-radius: var(--radius-xl);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-anim { position: absolute; inset: 0; }
.hero-anim__digit {
  position: absolute; font-family: var(--font-mono); font-size: .82rem;
  color: var(--accent); opacity: 0; font-variant-numeric: tabular-nums;
  animation: digit-fly 3.2s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes digit-fly {
  0%   { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.6); }
  18%  { opacity: .95; }
  72%  { opacity: .95; }
  100% { opacity: 0; transform: translate(0, 0) scale(1); }
}
.hero-sheet {
  position: absolute; inset: 12% 9%; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 18px; opacity: 0; animation: sheet-in .8s ease 2.4s forwards;
  display: flex; flex-direction: column; gap: 9px;
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-sheet__row { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; }
.hero-sheet__row span:first-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-sheet__row span:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hero-sheet__total {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 600;
}
.hero-sheet__total span:last-child { font-family: var(--font-mono); font-size: 1.15rem; }

@media (prefers-reduced-motion: reduce) {
  .hero-anim__digit { animation: none; opacity: 0; }
  .hero-sheet { animation: none; opacity: 1; }
}

/* шаги «как это работает» */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 52px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; font-size: .9rem;
}

/* -------------------------------------------------- калькулятор */
.calc { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.calc__aside { position: sticky; top: calc(var(--header-h) + 20px); }

.progress { display: flex; gap: 8px; margin-bottom: 28px; }
.progress__item {
  flex: 1; height: 4px; border-radius: 999px; background: var(--line);
  transition: background .25s ease;
}
.progress__item.is-done { background: var(--accent); }
.progress__item.is-current { background: color-mix(in srgb, var(--accent) 55%, var(--line)); }

.calc-step { display: none; }
.calc-step.is-active { display: block; animation: step-in .28s ease; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.calc-step__head { margin-bottom: 24px; }
.calc-step__num { font-family: var(--font-mono); font-size: .82rem; color: var(--accent); margin-bottom: 6px; }

.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.field--full { grid-column: 1 / -1; }

.total-card { text-align: center; }
.total-card__label { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.total-card__value {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.1; transition: opacity .2s ease;
}
.total-card__value.is-loading { opacity: .35; }
.total-card__note { font-size: .8rem; color: var(--muted); margin-top: 10px; }
.total-breakdown { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.total-breakdown__row { display: flex; justify-content: space-between; font-size: .88rem; gap: 12px; }
.total-breakdown__row span:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------- тарифы */
.tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.tariff { display: flex; flex-direction: column; gap: 16px; position: relative; }
.tariff--featured { border-color: var(--accent); box-shadow: var(--shadow); }
.tariff__price { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 600; letter-spacing: -0.03em; }
.tariff__period { font-size: .9rem; color: var(--muted); }
.tariff__features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.tariff__features li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.tariff__features li::before {
  content: ''; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='9' viewBox='0 0 11 9'%3E%3Cpath d='M1 4.5L4 7.5L10 1.5' stroke='%235fa82a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}
.tariff .btn { margin-top: auto; }

/* --------------------------------------------------- кабинет */
.cabinet { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.side-nav { display: grid; gap: 2px; position: sticky; top: calc(var(--header-h) + 20px); }
.side-nav a {
  padding: 11px 16px; border-radius: var(--radius-sm); color: var(--text-2); font-size: .94rem;
  transition: background .15s ease, color .15s ease;
}
.side-nav a:hover { background: var(--surface-3); color: var(--text); }
.side-nav a.is-active { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--shadow-sm); }

.doc-list { display: grid; gap: 10px; }
.doc-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.doc-item__icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: var(--danger-soft); color: var(--danger);
  display: grid; place-items: center; font-size: .68rem; font-weight: 700; font-family: var(--font-mono);
}
.doc-item__name { font-size: .94rem; font-weight: 500; }
.doc-item__meta { font-size: .8rem; color: var(--muted); }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }

/* --------------------------------------------------- подвал */
.footer { border-top: 1px solid var(--line); padding: 48px 0 36px; margin-top: 64px; color: var(--text-2); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer a { color: var(--text-2); font-size: .92rem; }
.footer a:hover { color: var(--text); }
.footer__links { display: grid; gap: 8px; }
.footer__bottom { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --------------------------------------------------- модальное окно */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; }
.modal.is-open { display: grid; }
.modal__overlay { position: absolute; inset: 0; background: rgba(10, 12, 16, .45); backdrop-filter: blur(3px); }
.modal__box { position: relative; width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg); animation: modal-in .22s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------- адаптив */
@media (max-width: 1024px) {
  .calc { grid-template-columns: 1fr; }
  .calc__aside { position: static; }
  .cabinet { grid-template-columns: 1fr; }
  .side-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { max-width: 520px; }
  .tariffs { grid-template-columns: 1fr; max-width: 520px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .section { padding: 48px 0; }
  .hero { padding: 44px 0 32px; }
  .card { padding: 20px; border-radius: var(--radius); }
  .fields, .grid--2, .grid--3, .grid--4, .options--2, .options--3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .nav.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  }
  .burger { display: grid; margin-left: auto; }
  .header__inner { position: relative; padding: 0 10px 0 12px; gap: 10px; }
  .header__inner > .row { margin-left: auto; }   /* nav скрыт — прижимаем кнопки вправо */
  .header__inner .logo span:last-child { display: none; }  /* на узком экране — только знак */
}

@media print {
  .header, .footer, .btn, .calc__aside { display: none !important; }
  body { background: #fff; }
}
