/* ============================================================
   СантехСмета220 — единые стили (лендинг + приложение)
   Бренд: глубокое море (#1C1206) + вода-циан (#E8964A)
   ============================================================ */

:root {
  --bg: #1C1206;
  --bg-2: #2A1A0C;
  --bg-3: #33220F;
  --line: rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .06);
  --text: #F2F1EE;
  --muted: #9BA0AB;
  --yellow: #E8964A;
  --yellow-deep: #B45309;
  --yellow-soft: rgba(232, 150, 74, .12);
  --ok: #7BE0A8;
  --warn: #FFC86B;
  --bad: #FF8E9E;
  --radius: 18px;
  --radius-lg: 26px;
  --font: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  /* iOS Safari: запрет авто-подгонки размера текста — тексты не «плывут» */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* якорные секции не уезжают под sticky-шапку при переходе по меню */
section[id] {
  scroll-margin-top: 84px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p { margin: 0; }

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

:is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.s220-container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Общие элементы ---------- */

.s220-eyebrow {
  color: var(--yellow);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 600;
}

h1 span, h2 span { color: var(--yellow); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 600;
  margin: 18px 0 14px;
}

.s220-lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  max-width: 620px;
  margin-top: 22px;
}

.s220-muted { color: var(--muted); font-size: 14px; }

.s220-fineprint {
  color: #71767F;
  font-size: 12px;
  margin-top: 16px;
}

.s220-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid rgba(232, 150, 74, .5);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--yellow), var(--yellow-deep));
  color: #1C1206;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform .2s, filter .2s;
  white-space: nowrap;
}

.s220-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }

.s220-btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
  font-weight: 500;
}

.s220-btn-ghost:hover { background: rgba(255, 255, 255, .05); }

.s220-btn-sm { padding: 9px 18px; font-size: 13px; }

.s220-btn-lg { padding: 16px 32px; font-size: 16px; }

/* Ghost-кнопка большого размера (установка PWA в hero) */
.s220-btn-ghost-lg {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
  font-weight: 500;
}

.s220-btn-ghost-lg:hover { background: rgba(255, 255, 255, .05); }

/* Иконка-кнопка в шапке приложения (📱 установка) */
.s220-btn-icon {
  padding: 9px 12px;
  font-size: 15px;
  line-height: 1;
}

/* ---------- Навигация ---------- */

.s220-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(10, 22, 34, .9);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  /* iOS: без -webkit-префикса шапка без размытия и заметно мерцает при скролле */
  -webkit-backdrop-filter: blur(14px);
}

.s220-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.s220-brand b { color: var(--yellow); font-weight: 700; }

.s220-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--yellow-soft);
  border: 1px solid rgba(232, 150, 74, .3);
  font-size: 17px;
}

.s220-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.s220-nav-links a:not(.s220-btn):hover { color: var(--text); }

.s220-nav-app-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.s220-sub-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.s220-sub-chip.is-pro {
  border-color: rgba(232, 150, 74, .4);
  background: var(--yellow-soft);
  color: var(--yellow);
  font-weight: 600;
}

/* ---------- Лендинг ---------- */

.s220-hero {
  padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 90px);
  background:
    radial-gradient(720px 380px at 78% -10%, rgba(232, 150, 74, .12), transparent 64%),
    radial-gradient(560px 340px at 0% 100%, rgba(232, 150, 74, .05), transparent 60%);
}

.s220-hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.s220-hero-note { color: var(--muted); font-size: 13px; }

.s220-hero-metrics {
  display: flex;
  gap: clamp(28px, 6vw, 64px);
  flex-wrap: wrap;
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
}

/* в HTML портала метрики — <b>число</b><span>пояснение</span> */
.s220-hero-metrics b,
.s220-hero-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--text);
}

.s220-hero-metrics span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.s220-section { padding: clamp(64px, 9vw, 110px) 0; }

.s220-section-alt { background: var(--bg-2); }

.s220-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin-top: 40px;
}

.s220-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--bg-3), var(--bg));
}

.s220-card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--yellow-soft);
  border: 1px solid rgba(232, 150, 74, .25);
  font-size: 24px;
  margin-bottom: 18px;
}

.s220-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.s220-card p { color: var(--muted); font-size: 15px; line-height: 1.7; }

.s220-pains-note {
  margin-top: 30px;
  padding: 16px 20px;
  border: 1px dashed rgba(232, 150, 74, .3);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}

.s220-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  margin-top: 40px;
}

.s220-step {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.s220-step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--yellow);
  color: #1C1206;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
}

.s220-step h3 { font-size: 17px; margin-bottom: 8px; }

.s220-step p { color: var(--muted); font-size: 14px; }

/* Тарифы */

.s220-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin-top: 40px;
  align-items: stretch;
}

.s220-price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
}

.s220-price-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
}

.s220-price {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 14px 0 20px;
}

.s220-price span {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.s220-price-card ul {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.s220-price-card li::before { content: "✓ "; color: var(--yellow); }

.s220-price-card .s220-btn { margin-top: auto; }

.s220-price-featured {
  border-color: rgba(232, 150, 74, .5);
  background: linear-gradient(170deg, rgba(232, 150, 74, .08), var(--bg-2) 45%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.s220-price-badge {
  position: absolute;
  top: -13px;
  left: 26px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1C1206;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

/* FAQ */

.s220-faq-wrap { max-width: 780px; }

.s220-faq { margin-top: 30px; border-top: 1px solid rgba(232, 150, 74, .25); }

.s220-faq details { border-bottom: 1px solid rgba(232, 150, 74, .25); }

.s220-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
}

.s220-faq summary::-webkit-details-marker { display: none; }

.s220-faq summary span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(232, 150, 74, .45);
  border-radius: 50%;
  color: var(--yellow);
  transition: transform .25s;
}

.s220-faq details[open] summary span { transform: rotate(45deg); }

.s220-faq p { padding: 0 0 20px; color: var(--muted); font-size: 15px; max-width: 640px; }

/* Финальный CTA */

.s220-final {
  padding: clamp(70px, 10vw, 120px) 0;
  text-align: center;
  background:
    radial-gradient(680px 360px at 50% 120%, rgba(232, 150, 74, .14), transparent 70%),
    var(--bg-2);
}

.s220-final p { color: var(--muted); margin: 18px 0 30px; }

.s220-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  color: #71767F;
  font-size: 13px;
}

.s220-footer .s220-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Приложение ---------- */

.s220-app-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 60px;
}

.s220-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  overflow-x: auto;
  scrollbar-width: none;        /* Firefox: скрыть системный скроллбар */
  -webkit-overflow-scrolling: touch;
}

.s220-tabs::-webkit-scrollbar { display: none; }

/* Обёртка табов: на мобильном — индикатор «→ ещё» + затухание края */
.s220-tabs-wrap { position: relative; }

.s220-tabs-hint { display: none; }

.s220-tab {
  padding: 11px 20px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.s220-tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }

.s220-tab.is-active { background: var(--yellow); color: #1C1206; font-weight: 700; }

.s220-pane { display: none; margin-top: 22px; }

.s220-pane.is-active { display: block; }

.s220-est-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.s220-est-main { display: grid; gap: 18px; min-width: 0; }

.s220-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  min-width: 0;
}

.s220-panel h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.s220-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.s220-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.s220-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.s220-field {
  display: grid;
  gap: 6px;
  flex: 1 1 180px;
  min-width: 0;
}

.s220-field-grow { flex: 1 1 100%; }

.s220-field span {
  color: var(--muted);
  font-size: 12px;
}

/* Пояснение под полем (LED-калькулятор и др.) */
.s220-field-hint {
  color: #71767F;
  font-size: 11px;
  line-height: 1.45;
}

.s220-app input,
.s220-app select,
.s220-app textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 14px;
}

.s220-app select option { background: var(--bg-3); }

.s220-input-sm { max-width: 90px; padding: 6px 10px !important; text-align: right; }

/* Таблица сметы */

.s220-est-table-wrap { overflow-x: auto; margin-top: 4px; }

.s220-etable { width: 100%; border-collapse: collapse; font-size: 14px; }

.s220-etable th {
  padding: 10px 8px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.s220-etable td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.s220-etable .num { text-align: right; white-space: nowrap; }

.s220-etable input {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13px;
}

.s220-etable .s220-line-name { min-width: 200px; }

.s220-etable .s220-line-qty { width: 84px; text-align: right; }

.s220-etable .s220-line-price { width: 100px; text-align: right; }

.s220-etable .s220-line-sum {
  font-weight: 600;
  white-space: nowrap;
  min-width: 90px;
  text-align: right;
}

.s220-line-del {
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
}

.s220-line-del:hover { color: var(--bad); background: rgba(255, 142, 158, .08); }

.s220-empty {
  padding: 26px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin: 12px 0 0;
}

.s220-est-totals {
  margin-top: 16px;
  margin-left: auto;
  max-width: 340px;
  display: grid;
  gap: 8px;
}

.s220-tot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.s220-tot-row b { color: var(--text); font-size: 16px; }

.s220-tot-grand {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

.s220-tot-grand b { color: var(--yellow); font-size: 24px; }

.s220-est-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Расценки */

.s220-est-table { overflow-x: auto; }

.s220-rates-name { min-width: 220px; }

.s220-rates-unit { width: 80px; }

.s220-rates-price { width: 110px; text-align: right; }

/* История */

.s220-hist-list { display: grid; gap: 12px; margin-top: 16px; }

.s220-hist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg);
}

.s220-hist-item h4 { margin: 0; font-size: 15px; }

.s220-hist-item .s220-hist-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

.s220-hist-sum {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--yellow);
  white-space: nowrap;
}

.s220-hist-actions { display: flex; gap: 8px; }

/* Подписка */

.s220-sub-state {
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
}

.s220-sub-state b { color: var(--text); }

.s220-pay-links { display: grid; gap: 10px; margin-top: 18px; }

.s220-activate { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }

.s220-activate > label > span { color: var(--muted); font-size: 13px; display: block; margin-bottom: 8px; }

.s220-activate-row { display: flex; gap: 10px; }

.s220-activate-row input { flex: 1; }

/* Восстановление подписки по телефону */
.s220-restore { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-soft); }

.s220-restore > label > span { color: var(--muted); font-size: 13px; display: block; margin-bottom: 8px; }

/* Строка связи в профиле */
.s220-contact-line a { color: var(--yellow); font-weight: 600; text-decoration: none; }

.s220-contact-line a:hover { text-decoration: underline; }

/* Модалка paywall */

.s220-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 10, 18, .78);
  backdrop-filter: blur(6px);
}

.s220-modal[hidden] { display: none; }

.s220-modal-box {
  position: relative;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(232, 150, 74, .35);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6);
}

.s220-modal-box h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-top: 12px;
}

.s220-modal-box .s220-muted { margin-top: 12px; }

.s220-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.s220-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.s220-modal-close:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

/* Модалка установки приложения (PWA) */
.s220-install-box { text-align: left; }

.s220-install-ico {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border: 1px solid rgba(232, 150, 74, .35);
  border-radius: 16px;
  background: rgba(232, 150, 74, .08);
  font-size: 26px;
}

.s220-install-steps {
  margin: 18px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.s220-install-steps b { color: var(--yellow); }

.s220-install-fineprint {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Печать сметы ---------- */

#print-root[hidden] { display: none; }

@media print {
  body.s220-app > *:not(#print-root) { display: none !important; }

  #print-root { display: block !important; }

  body.s220-app { background: #fff; color: #111; }

  .pr-doc {
    width: 210mm;
    min-height: 100mm;
    margin: 0 auto;
    padding: 14mm 12mm;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.5;
  }

  .pr-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 3px solid #E8964A;
  }

  .pr-brand { font-size: 22px; font-weight: 700; }

  .pr-brand small { display: block; font-size: 11px; font-weight: 400; color: #555; margin-top: 3px; }

  .pr-master { text-align: right; font-size: 13px; }

  .pr-title {
    font-size: 19px;
    font-weight: 700;
    margin: 18px 0 4px;
  }

  .pr-client { color: #444; margin-bottom: 14px; }

  .pr-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

  .pr-table th, .pr-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
  }

  .pr-table th { background: #f4f4f2; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }

  .pr-table .num { text-align: right; white-space: nowrap; }

  .pr-total-row td {
    font-weight: 700;
    font-size: 14px;
    border-bottom: 2px solid #111;
    border-top: 1px solid #111;
    padding-top: 9px;
  }

  .pr-sign { margin-top: 20px; color: #333; font-size: 12.5px; }

  .pr-foot {
    margin-top: 26px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 10.5px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  /* Водяной знак (не-Pro, со 2-й печати): по диагонали через документ */
  .pr-watermark {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 9999;
  }

  .pr-watermark span {
    transform: rotate(-32deg);
    font-size: 58px;
    font-weight: 900;
    font-family: Arial, Helvetica, sans-serif;
    color: rgba(7, 24, 38, .075);
    white-space: nowrap;
    letter-spacing: .08em;
  }
}

/* ---------- Мастер объекта (v2) ---------- */

.s220-wiz-grid {
  display: grid;
  gap: 18px;
}

.s220-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.s220-step-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--yellow);
  color: #1C1206;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  flex: 0 0 auto;
}

.s220-rooms { display: grid; gap: 8px; }

/* Заголовки колонок таблицы комнат */
.s220-room-head {
  padding: 0 2px 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--yellow);
}

.s220-room-head span {
  text-align: center;
}

.s220-room-head span:first-child { text-align: left; }

.s220-room-head span:last-child { visibility: hidden; }

.s220-room {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 74px 74px auto auto;
  gap: 8px;
  align-items: center;
}

.s220-room-name { min-width: 0; }

/* Ячейка-поле комнаты: подпись + инпут (подпись видна только на мобильном) */
.s220-room-cell { display: grid; gap: 4px; min-width: 0; }

.s220-room-lbl { display: none; }

.s220-room-sock, .s220-room-light { text-align: center; }

.s220-room-wet {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.s220-room-wet input { width: auto; }

.s220-appliances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.s220-app-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  transition: border-color .2s, background .2s;
}

.s220-app-chip:hover { border-color: rgba(232, 150, 74, .35); }

.s220-app-chip input { width: auto; accent-color: #E8964A; }

.s220-app-chip small { color: var(--muted); font-size: 11px; }

.s220-app-chip:has(input:checked) {
  border-color: rgba(232, 150, 74, .5);
  background: var(--yellow-soft);
}

/* ВАУ-сводка */

.s220-waow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.s220-waow > div {
  padding: 16px;
  border: 1px solid rgba(232, 150, 74, .25);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(232, 150, 74, .07), transparent 70%);
  text-align: center;
}

.s220-waow strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: -.02em;
}

.s220-waow span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.s220-notes {
  list-style: none;
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px dashed rgba(232, 150, 74, .3);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.s220-notes li::before { content: "⚡ "; color: var(--yellow); }

.s220-tbl-title {
  font-family: var(--font-display);
  font-size: 16px;
  margin: 22px 0 10px;
}

.s220-line-note {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.s220-result-summary { margin-top: 4px; }

/* ---------- Печать сметы (v2) ---------- */

.pr-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 20px 0 8px;
  color: #222;
}

.pr-subtotal {
  margin-top: 8px;
  text-align: right;
  font-size: 13px;
  color: #333;
}

.pr-total-table { margin-top: 10px; }

.pr-notes {
  margin: 10px 0 0;
  color: #555;
  font-size: 11.5px;
  line-height: 1.7;
}

/* ---------- Адаптивность ---------- */

@media (max-width: 900px) {
  .s220-est-grid { grid-template-columns: 1fr; }

  .s220-est-side { display: none; }
}

/* ---------- HERO v3: сетка, молния, стекло ---------- */

.s220-hero { position: relative; overflow: hidden; }

.s220-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.s220-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Технологическая сетка-пол */
.s220-grid-floor {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 150, 74, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 150, 74, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(720px 520px at 70% 40%, rgba(0, 0, 0, .9), transparent 75%);
  -webkit-mask-image: radial-gradient(720px 520px at 70% 40%, rgba(0, 0, 0, .9), transparent 75%);
}

/* Мерцающая молния-разряд */
.s220-bolt {
  position: absolute;
  top: 12%;
  right: 4%;
  width: clamp(60px, 8vw, 110px);
  opacity: .5;
  filter: drop-shadow(0 0 14px rgba(232, 150, 74, .45));
  animation: s220-bolt-flicker 5.5s ease-in-out infinite;
}

@keyframes s220-bolt-flicker {
  0%, 100% { opacity: .35; }
  8% { opacity: .8; }
  12% { opacity: .3; }
  16% { opacity: .9; }
  22%, 70% { opacity: .45; }
  74% { opacity: .85; }
  80% { opacity: .4; }
}

/* Стеклянная панель (Apple-glassmorphism) */
.s220-glass-panel {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 26px;
  background: rgba(14, 30, 46, .55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.s220-panel-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1em;
}

.s220-panel-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3A3B42;
}

.s220-panel-dots b { margin-left: 10px; font-weight: 600; }

.s220-panel-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted);
  font-size: 12px;
}

/* Пульс LIVE */
.s220-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 0 rgba(232, 150, 74, .5);
  animation: s220-live-pulse 1.8s ease-out infinite;
  flex: 0 0 auto;
}

@keyframes s220-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 150, 74, .55); }
  70% { box-shadow: 0 0 0 9px rgba(232, 150, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 150, 74, 0); }
}

/* ---------- SVG-схема (hero + раздел «Щит») ---------- */

.s220-scheme, .s220-board-svg { display: block; width: 100%; height: auto; }

.s220-wire {
  stroke: rgba(232, 150, 74, .5);
  stroke-width: 2;
  stroke-linecap: round;
}

.s220-bus { stroke: rgba(232, 150, 74, .75); stroke-width: 3.5; }

.s220-breaker {
  fill: rgba(255, 255, 255, .05);
  stroke: rgba(232, 150, 74, .45);
  stroke-width: 1.5;
}

.s220-b-in {
  fill: rgba(232, 150, 74, .14);
  stroke: rgba(232, 150, 74, .8);
  filter: drop-shadow(0 0 8px rgba(232, 150, 74, .25));
}

.s220-b-rcd { stroke: rgba(143, 183, 216, .6); }

.s220-b-wet { fill: rgba(143, 183, 216, .12); }

.s220-b-power { stroke: rgba(255, 200, 107, .6); }

.s220-arrow { fill: var(--yellow); }

.s220-scheme-t { fill: #F2F1EE; font-size: 11px; font-weight: 700; }

.s220-scheme-l { fill: #C9CBD1; font-size: 10.5px; }

.s220-scheme-c { fill: #8E93A0; font-size: 10px; }

.s220-scheme-r { fill: #B9D4EA; font-size: 9px; font-weight: 600; }

/* Бегущие импульсы тока */
.s220-spark {
  fill: #E8964A;
  filter: drop-shadow(0 0 6px rgba(232, 150, 74, .9));
}

.s220-spark-2 { fill: #A5E4FF; }

.s220-spark-3 { fill: #FFC86B; }

.s220-board-svg-wrap {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(560px 280px at 50% 0%, rgba(232, 150, 74, .06), transparent 70%),
    rgba(255, 255, 255, .02);
  overflow-x: auto;
}

/* ---------- Монтажная раскладка щита: реалистичный рендер ---------- */

/* модуль: hover-подсветка — щит «живой» */
.s220-mod-g { transition: filter .25s ease; }

.s220-mod-g:hover {
  filter: brightness(1.09) drop-shadow(0 0 6px rgba(232, 150, 74, .45));
}

/* наклейки номиналов и мелкие подписи */
.s220-mod-lbl { fill: #2A1A0C; font-size: 6.5px; font-weight: 700; }

.s220-mod-sub { fill: #6A6F78; font-size: 5px; font-weight: 600; }

/* кнопка TEST у УЗО */
.s220-test-btn { fill: #2C5BC5; }

.s220-test-t { fill: #fff; font-size: 5.5px; font-weight: 700; }

/* дисплей реле напряжения: живые вольты */
.s220-screen { fill: #0D0E11; stroke: #2A2D33; stroke-width: .6; }

.s220-volt {
  fill: #FF4438;
  font-size: 8.5px;
  font-weight: 700;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.s220-volt-v { fill: #9A4A4A; font-size: 4.5px; font-weight: 600; }

.s220-volt-b, .s220-volt-c, .s220-volt-d { opacity: 0; }

.s220-volt-a { animation: s220-volt-a 4.8s steps(1) infinite; }
.s220-volt-b { animation: s220-volt-b 4.8s steps(1) infinite; }
.s220-volt-c { animation: s220-volt-c 4.8s steps(1) infinite; }
.s220-volt-d { animation: s220-volt-d 4.8s steps(1) infinite; }

@keyframes s220-volt-a { 0%, 24% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes s220-volt-b { 0%, 24% { opacity: 0; } 25%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes s220-volt-c { 0%, 49% { opacity: 0; } 50%, 74% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes s220-volt-d { 0%, 74% { opacity: 0; } 75%, 100% { opacity: 1; } }

/* светодиод «сеть» на реле */
.s220-led { fill: #3AC254; animation: s220-led 2.2s ease-in-out infinite; }

@keyframes s220-led { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* окошки индикации УЗИП */
.s220-surge-win { fill: #3AC254; stroke: #1E5F2E; stroke-width: .6; }

/* гребёнка (соединительная шина) */
.s220-comb { fill: #23262B; }

/* провода групп и вводной кабель */
.s220-wire-p { fill: none; stroke-width: 2.2; stroke-linecap: round; }

.s220-cable-in { fill: none; stroke: #1B1D20; stroke-width: 6.5; stroke-linecap: round; }

/* стяжки жгута */
.s220-tie { fill: #2C2F35; }

/* шины N/PE на боковой стенке */
.s220-busbar-n { fill: #2E62D9; }

.s220-busbar-pe { fill: #D9DE2A; }

.s220-bus-t { font-size: 6px; font-weight: 700; }

.s220-bus-t-n { fill: #2E62D9; }

.s220-bus-t-pe { fill: #4E7A1E; }

/* маркировка позиций */
.s220-tag { fill: #fff; stroke: #D8D4CC; stroke-width: .5; }

.s220-tag-t { fill: #2A1A0C; font-size: 5px; font-weight: 700; }

/* резервные слоты */
.s220-slot-res {
  fill: none;
  stroke: rgba(7, 24, 38, .25);
  stroke-dasharray: 4 4;
}

/* Легенда сборки: номер позиции → назначение модуля */
.s220-panel-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  font-size: 12.5px;
  color: #A7ACB8;
}

.s220-panel-legend b { color: #F2F1EE; }

.s220-lg { display: inline-flex; align-items: center; gap: 6px; }

.s220-lg i {
  font-style: normal;
  min-width: 20px;
  text-align: center;
  padding: 2px 5px;
  border-radius: 6px;
  background: rgba(232, 150, 74, .12);
  color: var(--yellow);
  font-weight: 700;
  font-size: 11px;
}

.s220-lg-res i { background: rgba(255, 255, 255, .06); color: #8E93A0; }

.s220-chip {
  padding: 7px 14px;
  border: 1px solid rgba(232, 150, 74, .35);
  border-radius: 999px;
  background: var(--yellow-soft);
  color: var(--yellow);
  font-size: 12px;
  white-space: nowrap;
}

.s220-pricing-note {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px dashed rgba(143, 183, 216, .35);
  border-radius: 12px;
  color: #8FA3B8;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- Калькулятор окупаемости ---------- */

.s220-calc-sub {
  color: var(--muted);
  max-width: 640px;
  margin-top: 6px;
  font-size: 15px;
}

.s220-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 20px;
  margin-top: 36px;
  align-items: stretch;
}

.s220-calc-controls {
  display: grid;
  gap: 26px;
  align-content: start;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.s220-slider { display: grid; gap: 10px; }

.s220-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
}

.s220-slider-head b { font-weight: 600; }

.s220-slider-head output {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

.s220-slider-note { color: #71767F; font-size: 12px; }

.s220-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;           /* место под ползунок 24px — он не «уплывает» от шкалы */
  background: transparent;
  outline: none;
  cursor: pointer;
  touch-action: manipulation; /* iOS: без задержки тача, палец ведёт ползунок */
  margin: 0;
}

/* Chrome / Safari / Edge: шкала — сам трек, заливка до --fill (ставит JS) */
.s220-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg,
    var(--yellow) 0%,
    var(--yellow) var(--fill, 40%),
    rgba(255, 255, 255, .12) var(--fill, 40%));
}

.s220-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow);
  border: 4px solid #1C1206;
  box-shadow: 0 0 0 2px var(--yellow), 0 6px 18px rgba(232, 150, 74, .45);
  margin-top: -9.5px;     /* центр ползунка на оси трека: (5 − 24) / 2 */
}

/* Firefox: прогресс трека красится нативно — заливка идёт сама */
.s220-slider input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .12);
}

.s220-slider input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 5px;
  background: var(--yellow);
}

.s220-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid #1C1206;
  box-shadow: 0 0 0 2px var(--yellow);
}

.s220-calc-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border: 1px solid rgba(232, 150, 74, .3);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 240px at 80% 0%, rgba(232, 150, 74, .1), transparent 70%),
    var(--bg-2);
}

.s220-calc-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.s220-calc-loss strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 700;
  color: var(--bad);
  letter-spacing: -.03em;
  line-height: 1.05;
}

.s220-calc-loss small { color: var(--muted); font-size: 13px; }

.s220-calc-vs {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.s220-calc-vs-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.s220-calc-vs-row b { font-weight: 700; }

.s220-calc-vs-row .s220-calc-cost { color: var(--text); }

.s220-calc-vs-win b {
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 20px;
}

.s220-calc-note { color: var(--muted); font-size: 13.5px; line-height: 1.7; }

.s220-calc-note b { color: var(--text); }

.s220-calc-cta { margin-top: auto; }

/* ---------- Гарантии ---------- */

.s220-guarantee {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  margin-top: 28px;
}

.s220-guarantee-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(232, 150, 74, .25);
  border-radius: 18px;
  background: var(--yellow-soft);
}

.s220-guarantee-item b {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--yellow);
  white-space: nowrap;
}

.s220-guarantee-item span { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Пометка о непрерывном мониторинге нормативов */
.s220-norms-live {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(123, 224, 168, .3);
  border-radius: 14px;
  background: rgba(123, 224, 168, .06);
  color: #9BCDB4;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ---------- Режим расценок + рекомендации ---------- */

.s220-rate-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.s220-rate-mode-label {
  padding: 0 6px 0 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.s220-rate-btn {
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.s220-rate-btn:hover { color: var(--text); }

.s220-rate-btn.is-active {
  background: var(--yellow);
  color: #1C1206;
}

.s220-reco-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.s220-reco-list {
  display: grid;
  gap: 10px;
}

.s220-reco {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px dashed rgba(143, 183, 216, .4);
  border-radius: 16px;
  background: rgba(143, 183, 216, .05);
}

.s220-reco-body {
  display: grid;
  gap: 4px;
  flex: 1 1 240px;
  min-width: 0;
}

.s220-reco-body b { font-size: 14.5px; }

.s220-reco-body span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.s220-reco-price {
  font-family: var(--font-display);
  font-weight: 700;
  color: #8FB7D8;
  white-space: nowrap;
}

/* ---------- Reveal при скролле ---------- */

.s220-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1);
}

.s220-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .s220-reveal { opacity: 1; transform: none; transition: none; }
  .s220-bolt, .s220-spark, .s220-live-dot { animation: none; }
  .s220-volt-a, .s220-volt-b, .s220-volt-c, .s220-volt-d, .s220-led { animation: none; }
}

/* ---------- Оффер-плитки в hero: офлайн/подарок/без карты ---------- */

.s220-offer-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.s220-offer-tile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}

.s220-offer-tile b {
  display: block;
  color: #F2F1EE;
  font-size: 13px;
  line-height: 1.25;
}

.s220-offer-tile span:not(.s220-offer-ico) {
  display: block;
  margin-top: 3px;
  color: #9BA0AB;
  font-size: 11.5px;
  line-height: 1.35;
}

.s220-offer-ico { font-size: 20px; line-height: 1.2; }

/* Офлайн — главный акцент: жёлтая рамка + мягкое свечение */
.s220-offer-offline {
  border-color: rgba(232, 150, 74, .45);
  background:
    linear-gradient(140deg, rgba(232, 150, 74, .08), rgba(232, 150, 74, .01) 60%),
    rgba(255, 255, 255, .025);
  box-shadow: 0 0 24px rgba(232, 150, 74, .08);
}

.s220-offer-offline b { color: var(--yellow); }

/* ---------- Умный дом: CTA в начале мастера ---------- */

.s220-smart-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid rgba(232, 150, 74, .35);
  background:
    linear-gradient(120deg, rgba(232, 150, 74, .10), rgba(232, 150, 74, .02) 55%),
    rgba(255, 255, 255, .02);
}

.s220-smart-cta-body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #F2F1EE;
}

.s220-smart-cta-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(232, 150, 74, .16);
  color: var(--yellow);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
}

.s220-smart-cta-text { color: #A7ACB8; font-size: 13px; }

/* Кнопка: заметная, мягкая редкая пульсация (не дёргается) */
.s220-btn-smart {
  background: linear-gradient(180deg, #F5B26B, #E8964A);
  color: #1C1206;
  font-weight: 800;
  border: none;
  box-shadow: 0 6px 24px rgba(232, 150, 74, .35);
  animation: s220-smart-pulse 2.6s ease-in-out infinite;
}

.s220-btn-smart:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(232, 150, 74, .5);
  animation: none;
}

@keyframes s220-smart-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(232, 150, 74, .35); }
  50%      { box-shadow: 0 6px 34px rgba(232, 150, 74, .62); }
}

/* ---------- Схемы коммутации (проходные выключатели) ---------- */

.s220-scheme-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, .02);
  margin-top: 14px;
}

.s220-scheme-card h4 {
  margin: 0 0 4px;
  color: #F2F1EE;
  font-size: 15px;
}

.s220-scheme-card p { margin: 0 0 10px; }

.s220-ps-svg { display: block; width: 100%; height: auto; }

/* фазная жила */
.s220-ps-l { stroke: #D97706; stroke-width: 2.4; fill: none; stroke-linecap: round; }

/* перекидные жилы */
.s220-ps-j1 { stroke: #D96A4A; stroke-width: 2.2; fill: none; stroke-linecap: round; }

.s220-ps-j2 { stroke: #4A8FD9; stroke-width: 2.2; fill: none; stroke-linecap: round; }

/* ноль */
.s220-ps-n { stroke: #5B6B8C; stroke-width: 2.2; fill: none; stroke-linecap: round; }

.s220-ps-dev {
  fill: rgba(255, 255, 255, .05);
  stroke: rgba(232, 150, 74, .55);
  stroke-width: 1.6;
}

.s220-ps-lamp {
  fill: rgba(245, 178, 107, .14);
  stroke: #D97706;
  stroke-width: 1.8;
}

.s220-ps-lamp-on { fill: #F5B26B; }

.s220-ps-t { fill: #F2F1EE; font-size: 11px; font-weight: 700; }

.s220-ps-c { fill: #8E93A0; font-size: 10px; }

.s220-ps-tag {
  fill: rgba(232, 150, 74, .10);
  stroke: rgba(232, 150, 74, .3);
  stroke-width: .8;
}

.s220-ps-tag-t { fill: var(--yellow); font-size: 9px; font-weight: 700; }

/* ---------- LED-калькулятор: панель в стиле smart-CTA ---------- */

.s220-led-panel {
  border-color: rgba(245, 178, 107, .30);
  background:
    linear-gradient(125deg, rgba(245, 178, 107, .07), rgba(245, 178, 107, .015) 55%),
    rgba(255, 255, 255, .02);
  box-shadow: 0 0 28px rgba(245, 178, 107, .06);
}

.s220-led-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.s220-led-head-body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #F2F1EE;
}

.s220-led-head-body b { font-size: 16px; letter-spacing: .01em; }

.s220-led-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 178, 107, .14);
  color: #F5B26B;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

.s220-led-head-text { color: #A7ACB8; font-size: 13px; }

.s220-led-warn {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, .28);
  background: rgba(56, 189, 248, .06);
  color: #D8CFA8;
  font-size: 13px;
  line-height: 1.6;
}

.s220-led-warn b { color: #D97706; }

.s220-led-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.s220-btn-led {
  background: linear-gradient(180deg, #F5B26B, #E8964A);
  color: #1C1206;
  font-weight: 800;
  border: none;
  white-space: nowrap;
}

.s220-btn-led:hover { transform: translateY(-1px); }

/* --- результат: карточки-метрики + лента + шкала --- */

.s220-led-res {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  padding: 16px 18px 18px;
}

.s220-led-res-ok   { border-color: rgba(58, 194, 84, .35);  background: linear-gradient(160deg, rgba(58, 194, 84, .06), rgba(255, 255, 255, .02)); }
.s220-led-res-bad  { border-color: rgba(217, 106, 74, .45); background: linear-gradient(160deg, rgba(217, 106, 74, .08), rgba(255, 255, 255, .02)); }

.s220-led-res-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.s220-led-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
}

.s220-led-metric strong { font-size: 20px; color: #F2F1EE; line-height: 1.1; }

.s220-led-metric span { font-size: 11px; color: #8E93A0; }

.s220-led-metric-hi  { border-color: rgba(245, 178, 107, .4); }
.s220-led-metric-hi strong { color: #F5B26B; }

.s220-led-metric-bad { border-color: rgba(217, 106, 74, .55); }
.s220-led-metric-bad strong { color: #D96A4A; }

/* лента: БП → линия с затуханием яркости к хвосту */
.s220-led-strip-svg { display: block; width: 100%; height: auto; margin: 2px 0 12px; }

.s220-led-psu {
  fill: rgba(255, 255, 255, .06);
  stroke: rgba(245, 178, 107, .5);
  stroke-width: 1.2;
}

.s220-led-psu-t { fill: #F5B26B; font-size: 8.5px; font-weight: 700; }

.s220-led-strip-cap { fill: #8E93A0; font-size: 9px; }

/* шкала просадки 0–10%, цель ≤ 5% */
.s220-led-bar { margin: 0 0 12px; }

.s220-led-bar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
}

.s220-led-bar-ok {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, rgba(58, 194, 84, .55), rgba(58, 194, 84, .25));
}

.s220-led-bar-bad {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  right: 0;
  background: linear-gradient(90deg, rgba(217, 106, 74, .25), rgba(217, 106, 74, .6));
}

.s220-led-bar-mark {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #F2F1EE;
  box-shadow: 0 0 8px rgba(255, 255, 255, .55);
}

.s220-led-bar-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 10.5px;
  color: #8E93A0;
}

.s220-led-bar-goal { color: #3AC254; font-weight: 700; }

.s220-led-advice {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #D9D6CF;
}

.s220-led-res-ok .s220-led-advice  { color: #A9DDB5; }
.s220-led-res-bad .s220-led-advice { color: #E8B39E; }

.s220-led-bom {
  margin: 0 0 14px;
  font-size: 12px;
  color: #8E93A0;
}

.s220-led-bom b { color: #F2F1EE; }

.s220-btn-led-add {
  width: 100%;
  background: linear-gradient(180deg, #F5B26B, #E8964A);
  color: #1C1206;
  font-weight: 800;
  border: none;
  box-shadow: 0 6px 22px rgba(232, 150, 74, .28);
}

.s220-btn-led-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(232, 150, 74, .45);
}

@media (max-width: 860px) {
  .s220-led-calc { grid-template-columns: 1fr 1fr; }
  .s220-led-res-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Отзывы электриков ---------- */

.s220-reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}

.s220-review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 20px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  transition: border-color .2s, transform .2s;
}

.s220-review:hover {
  border-color: rgba(232, 150, 74, .35);
  transform: translateY(-2px);
}

.s220-review-stars {
  color: #E8964A;
  font-size: 15px;
  letter-spacing: .12em;
}

.s220-review p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #D9D6CF;
  flex: 1;
}

.s220-review-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.s220-review-ava {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(232, 150, 74, .18), rgba(232, 150, 74, .05));
  border: 1px solid rgba(232, 150, 74, .3);
  color: var(--yellow);
  font-weight: 800;
  font-size: 15px;
}

.s220-review-author b { display: block; font-size: 13.5px; color: #F2F1EE; }

.s220-review-author span { font-size: 11.5px; color: #8E93A0; }

.s220-reviews-note {
  margin-top: 18px;
  font-size: 12px;
  color: #8E93A0;
  text-align: center;
}

@media (max-width: 960px) {
  .s220-reviews { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .s220-reviews { grid-template-columns: 1fr; }
}

/* ---------- Связь с нами (Telegram / MAX) ---------- */

.s220-contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.s220-contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.s220-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.s220-contact-ico { font-size: 17px; line-height: 1; }

.s220-footer-links { display: flex; gap: 16px; }

.s220-footer-links a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 600;
}

.s220-footer-links a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .s220-contact { grid-template-columns: 1fr; }
}

/* Реквизиты и договор в PDF */
.pr-req-head {
  margin: 10px 0 2px;
  font-size: 12px;
  color: #2A1A0C;
  border: 1.5px solid #2A1A0C;
  border-radius: 8px;
  padding: 8px 12px;
  background: #F6F4EE;
}

.pr-terms td { padding: 5px 10px; font-size: 11.5px; }

.pr-reqs {
  margin: 12px 0 8px;
  font-size: 11.5px;
  color: #2A1A0C;
  line-height: 1.7;
}

.pr-signs td {
  padding: 26px 10px 6px;
  font-size: 11.5px;
  color: #2A1A0C;
}

@media (prefers-reduced-motion: reduce) {
  .s220-btn-smart { animation: none; }
}

/* ---------- Адаптив v3 ---------- */

@media (max-width: 960px) {
  .s220-hero-inner { grid-template-columns: 1fr; }

  .s220-hero-visual { max-width: 520px; }

  .s220-calc { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* Меню: не прячем ссылки — переносим ниже бренда в прокручиваемую
     строку (палец скроллит, все пункты доступны: Окупаемость ·
     Нормативы · Тарифы · FAQ · Я заказчик) */
  .s220-nav { flex-wrap: wrap; row-gap: 10px; }

  .s220-nav-links {
    order: 3;
    flex: 1 1 100%;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 6px;
    mask-image: linear-gradient(90deg, #000 86%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
  }

  .s220-nav-links::-webkit-scrollbar { display: none; }

  .s220-nav-links a:not(.s220-btn) {
    display: inline;
    white-space: nowrap;
  }

  .s220-offer-tiles { grid-template-columns: 1fr; }

  .s220-hero-metrics { gap: 22px; }

  .s220-est-totals { max-width: none; }

  .s220-tot-row input.s220-input-sm { width: 70px; }

  .s220-waow { grid-template-columns: repeat(2, 1fr); }

  .s220-guarantee-item { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* --- Табы: индикатор прокрутки «→ ещё» + затухание края --- */
  .s220-tabs-wrap::after {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    right: 1px;
    width: 44px;
    border-radius: 0 13px 13px 0;
    background: linear-gradient(90deg, transparent, rgba(14, 30, 46, .92) 78%);
    pointer-events: none;
    transition: opacity .25s;
  }

  .s220-tabs-wrap.is-end::after { opacity: 0; }

  .s220-tabs-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    right: 10px;
    bottom: -20px;
    color: var(--yellow);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    pointer-events: none;
    animation: s220-tabs-nudge 1.6s ease-in-out infinite;
  }

  .s220-tabs-wrap.is-end .s220-tabs-hint { display: none; }

  .s220-app-main { padding-top: 34px; } /* место под hint */

  @keyframes s220-tabs-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
  }

  /* --- Шапка приложения: чип подписки + кнопка «Про» в одну строку, ничего не вылезает --- */
  .s220-nav-app { gap: 10px; }

  .s220-nav-app-right { gap: 8px; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }

  .s220-sub-chip {
    max-width: 52vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    padding: 6px 10px;
  }

  .s220-nav-app-right .s220-btn { padding: 8px 12px; font-size: 12px; flex: 0 0 auto; }

  /* --- Кнопки: длинный текст переносится, а не уходит за край --- */
  .s220-btn { white-space: normal; text-align: center; }

  .s220-btn-lg { padding: 13px 20px; font-size: 15px; }

  /* --- Комнаты: карточка в 2 строки — имя целиком, ниже поля с подписями --- */
  .s220-room-head { display: none; }

  .s220-rooms { gap: 10px; }

  .s220-room {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px 8px;
    padding: 12px 12px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .02);
  }

  .s220-room-name { grid-column: 1 / -1; }

  .s220-room-lbl {
    display: block;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .s220-room-wet { justify-content: flex-start; }

  .s220-line-del { align-self: end; }

  /* --- LED-калькулятор: кнопка «Рассчитать» на всю ширину, не сплющивается --- */
  .s220-led-calc { grid-template-columns: 1fr 1fr; }

  .s220-led-calc .s220-btn-led { grid-column: 1 / -1; }

  /* --- Панель «Смета»: расценки и кнопка генерации не толкаются --- */
  .s220-panel-head .s220-btn-lg { width: 100%; }

  .s220-rate-mode { width: 100%; justify-content: space-between; }

  /* --- Модалка, активация, восстановление --- */
  .s220-modal { padding: 14px; }

  .s220-modal-box { padding: 20px 16px; }

  .s220-activate-row { flex-wrap: wrap; }

  .s220-activate-row .s220-btn { flex: 1 1 auto; }

  .s220-calc-controls, .s220-calc-result { padding: 18px 16px; }

  .s220-contact-btn { width: 100%; }
}

/* Совсем узкие экраны (320–420px): всё в один столбец */
@media (max-width: 420px) {
  .s220-led-calc { grid-template-columns: 1fr; }

  .s220-waow { grid-template-columns: 1fr; }

  .s220-app-main { width: calc(100% - 20px); }

  .s220-container { width: calc(100% - 32px); }
}

/* ---------- Калькулятор для заказчика (zakaz.html) ---------- */

/* Демо-вилка в hero */
.s220-zakaz-demo { padding: 16px 0 6px; }

.s220-zakaz-demo-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.s220-zakaz-demo-lbl { color: var(--muted); font-size: 12.5px; }

.s220-zakaz-demo-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
}

.s220-zakaz-demo-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.s220-zakaz-demo-e i { background: linear-gradient(90deg, #7BE0A8, rgba(123, 224, 168, .4)); }

.s220-zakaz-demo-s i { background: linear-gradient(90deg, #E8964A, rgba(232, 150, 74, .4)); }

.s220-zakaz-demo-p i { background: linear-gradient(90deg, #8FB7D8, rgba(143, 183, 216, .4)); }

.s220-zakaz-demo-val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.s220-zakaz-demo-note {
  color: #71767F;
  font-size: 11.5px;
  margin-top: 8px;
}

/* Панель калькулятора */
.s220-zakaz-panel { max-width: 780px; margin: 0 auto; }

/* Поля калькулятора заказчика: тёмная тема, как в приложении
   (иначе — белый фон браузера + светлый текст = невидимые селекты) */
.s220-zakaz input,
.s220-zakaz select,
.s220-zakaz textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 14px;
}

.s220-zakaz select option { background: var(--bg-3); color: var(--text); }

.s220-zakaz input::placeholder { color: var(--muted); }

.s220-zakaz input:focus-visible,
.s220-zakaz select:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
}

.s220-zakaz-veil-note {
  margin: 18px 0 14px;
  padding: 14px 16px;
  border: 1px dashed rgba(232, 150, 74, .35);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.s220-zakaz-calc-btn { width: 100%; }

/* Карточки вилки */
.s220-zakaz-tiers {
  display: grid;
  gap: 12px;
  margin: 20px 0 16px;
}

.s220-zakaz-tier {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .02);
}

.s220-zakaz-tier-hot {
  border-color: rgba(232, 150, 74, .5);
  background: linear-gradient(160deg, rgba(232, 150, 74, .07), rgba(255, 255, 255, .02) 60%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3);
}

.s220-zakaz-tier .s220-price-badge { top: -11px; left: 18px; }

.s220-zakaz-tier-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.s220-zakaz-tier-head b {
  font-family: var(--font-display);
  font-size: 18px;
}

.s220-zakaz-tier-price {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

.s220-zakaz-tier-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  overflow: hidden;
  margin-bottom: 8px;
}

.s220-zakaz-tier-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-deep));
}

.s220-zakaz-tier-desc { color: var(--muted); font-size: 12.5px; }

/* Замок полного расчёта */
.s220-zakaz-veil {
  position: relative;
  margin: 8px 0 0;
}

.s220-zakaz-veil-box {
  padding: 20px;
  border: 1px solid rgba(232, 150, 74, .3);
  border-radius: 16px;
  background:
    radial-gradient(400px 200px at 80% 0%, rgba(232, 150, 74, .09), transparent 70%),
    var(--bg-2);
}

.s220-zakaz-veil-box b { display: block; margin-bottom: 10px; font-size: 15px; }

.s220-zakaz-veil-box ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13.5px;
}

.s220-zakaz-veil-box li::before { content: "✓ "; color: var(--yellow); }

.s220-zakaz-veil-box .s220-btn { width: 100%; }

.s220-zakaz-code-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--yellow);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* Полный расчёт */
.s220-zakaz-full { margin-top: 18px; }

.s220-zakaz-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0 18px;
}

.s220-zakaz-kpi > div {
  padding: 14px 12px;
  border: 1px solid rgba(232, 150, 74, .25);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(232, 150, 74, .06), transparent 70%);
  text-align: center;
}

.s220-zakaz-kpi b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--yellow);
}

.s220-zakaz-kpi span { color: var(--muted); font-size: 11.5px; }

.s220-zakaz-full .s220-etable td { font-size: 13px; }

/* Печать zakaz: только полный расчёт */
@media print {
  body.s220-zakaz > *:not(main) { display: none !important; }
  body.s220-zakaz main > *:not(#calc) { display: none !important; }
  body.s220-zakaz #calc .s220-container > *:not(.s220-panel) { display: none !important; }
  body.s220-zakaz .s220-panel > *:not(.s220-zakaz-full) { display: none !important; }
  body.s220-zakaz { background: #fff; color: #111; }
  body.s220-zakaz .s220-zakaz-full .s220-tbl-title,
  body.s220-zakaz .s220-zakaz-full h4 { color: #111; }
  body.s220-zakaz .s220-zakaz-kpi > div { border-color: #ddd; background: #fafafa; }
  body.s220-zakaz .s220-zakaz-kpi b { color: #0369a1; }
  body.s220-zakaz .s220-notes { border-color: #ddd; color: #333; }
  body.s220-zakaz .s220-line-note { color: #777; }
  body.s220-zakaz .s220-etable th,
  body.s220-zakaz .s220-etable td { border-color: #ddd; color: #111; }
}

/* ============================================================
   Дополнение v2: недостающие классы лендинга и приложения
   (водно-морская тема)
   ============================================================ */

/* ---------- Заголовки секций ---------- */

.s220-section-head { max-width: 760px; }

.s220-section-head h2 { margin-top: 14px; }

.s220-section-sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin-top: 10px;
}

/* ---------- Hero: подзаголовок, офферы, CTA ---------- */

.s220-hero-copy { max-width: 640px; }

@media (min-width: 961px) {
  .s220-hero > .s220-container {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(28px, 4vw, 56px);
    /* мокап с ценой — на уровень оффера (не «плавает» по центру колонки) */
    align-items: start;
  }
}

.s220-hero-sub {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  margin-top: 20px;
}

.s220-accent { color: var(--yellow); }

.s220-hero-offers { margin-top: 22px; }

.s220-hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* Мокап сметы вместо схемы в hero */
.s220-hero-visual {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(232, 150, 74, .28);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 260px at 80% 0%, rgba(232, 150, 74, .1), transparent 70%),
    var(--bg-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.s220-mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.s220-mock-head b { font-family: var(--font-display); font-size: 15px; }

.s220-mock-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #F5B26B;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.s220-mock-head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F5B26B;
  box-shadow: 0 0 0 0 rgba(245, 178, 107, .6);
  animation: s220-live-pulse 1.8s ease-out infinite;
}

.s220-mock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line-soft);
}

.s220-mock-row b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.s220-mock-row small {
  display: block;
  margin-top: 2px;
  color: #71767F;
  font-size: 11px;
}

.s220-mock-row em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}

.s220-mock-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(232, 150, 74, .3);
}

.s220-mock-total span { color: var(--muted); font-size: 13px; }

.s220-mock-total b {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: -.02em;
}

.s220-mock-foot {
  margin-top: 14px;
  color: #71767F;
  font-size: 11px;
  line-height: 1.6;
}

/* ---------- Нормативные карточки ---------- */

.s220-norms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 36px;
}

.s220-norm-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, var(--bg-3), var(--bg));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s220-norm-card b {
  font-family: var(--font-display);
  font-size: 17px;
}

.s220-norm-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
}

.s220-norm-card small {
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: #F5B26B;
  font-size: 11.5px;
  letter-spacing: .04em;
}

/* ---------- Тарифы: план-карточки ---------- */

.s220-plan-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.s220-plan-price {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 10px 0 18px;
}

.s220-plan-price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}

.s220-plan-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.s220-plan-list li::before { content: "✓ "; color: var(--yellow); font-weight: 700; }

.s220-plan-badge {
  position: absolute;
  top: -13px;
  left: 26px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1C1206;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.s220-plan-note {
  margin-top: 12px;
  color: #71767F;
  font-size: 12px;
  text-align: center;
}

/* ---------- Тарифы: периоды оплаты, пикер сервиса, живые цены ---------- */

.s220-period-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 34px auto 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
}

.s220-period-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.s220-period-btn:hover { color: var(--text); }

.s220-period-btn.is-active {
  background: var(--yellow);
  color: #1C1206;
}

.s220-period-disc {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: var(--yellow);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
}

.s220-period-btn.is-active .s220-period-disc {
  background: rgba(28, 18, 6, .16);
  color: #1C1206;
}

/* сервис-пикер в карточке «Один сервис» */
.s220-svc-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 2px;
}

.s220-svc-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}

.s220-svc-chip:hover { color: var(--text); }

.s220-svc-chip.is-active {
  border-color: rgba(232, 150, 74, .6);
  background: var(--yellow-soft);
  color: var(--text);
}

/* живая цена: зачёркнутая база + подпись периода */
.s220-plan-price-live s {
  margin-right: 8px;
  color: #71767F;
  font-size: 19px;
  font-weight: 500;
}

.s220-plan-price-live s[hidden] { display: none; }

.s220-plan-sub {
  margin: -10px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.s220-plan-sub b { color: var(--ok); font-weight: 600; }

@media (max-width: 720px) {
  .s220-period-switch { border-radius: 20px; }
  .s220-period-btn { padding: 9px 13px; font-size: 13px; }
}

/* ---------- CTA-секция и контакты ---------- */

.s220-cta { text-align: center; }

.s220-cta h2 { margin-top: 0; }

.s220-cta p {
  color: var(--muted);
  font-size: 16px;
  margin: 12px 0 0;
}

.s220-cta .s220-hero-cta { justify-content: center; margin-top: 26px; }

.s220-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 30px;
}

.s220-contact-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.s220-contact-card b { font-family: var(--font-display); font-size: 17px; }

.s220-contact-card p {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}

.s220-contact-card .s220-btn { margin-top: 8px; }

/* ---------- Калькулятор потерь (лендинг) ---------- */

.s220-calc-sliders { display: grid; gap: 24px; }

.s220-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 14px;
}

.s220-calc-row b { color: var(--text); font-size: 17px; }

.s220-calc-grand {
  padding-top: 14px;
  border-bottom: 0;
  border-top: 1px solid var(--line);
}

.s220-calc-grand b { color: var(--yellow); font-size: 22px; }

.s220-calc-roi {
  margin-top: auto;
  padding: 12px 16px;
  border: 1px solid rgba(123, 224, 168, .3);
  border-radius: 14px;
  background: rgba(123, 224, 168, .07);
  color: #9BCDB4;
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------- Карточки помещений (v3): тип + точки + тёплый пол + котёл ---------- */

.s220-rooms { display: grid; gap: 14px; }

.s220-room-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .015);
}

.s220-room-top {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.s220-room-top .s220-room-name {
  flex: 1 1 160px;
  min-width: 0;
}

.s220-room-type,
.s220-room-heat,
.s220-room-wfarea,
.s220-room-boiler,
.s220-room-boiler-dual {
  display: grid;
  gap: 4px;
}

.s220-room-type span,
.s220-room-heat span,
.s220-room-wfarea span,
.s220-room-boiler span,
.s220-room-boiler-dual span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.s220-room-type select,
.s220-room-boiler select,
.s220-room-boiler-dual select { max-width: 170px; }

.s220-room-boiler-dual.is-hidden { display: none; }

/* ---------- Опции рядом с котлом: бак, водоподготовка, осмос ---------- */

.s220-boiler-opts {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(245, 178, 107, .25);
}

.s220-opt-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.s220-opt-chip input { width: auto; flex: 0 0 auto; accent-color: #E8964A; }

.s220-opt-ico { font-size: 22px; line-height: 1; flex: 0 0 auto; }

.s220-opt-body { display: grid; gap: 2px; min-width: 0; }

.s220-opt-body b { font-size: 13.5px; color: var(--text); }

.s220-opt-body small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.s220-opt-chip:hover { border-color: rgba(232, 150, 74, .4); }

.s220-opt-chip.is-on {
  border-color: rgba(232, 150, 74, .55);
  background: linear-gradient(120deg, rgba(232, 150, 74, .1), rgba(232, 150, 74, .02) 60%);
  box-shadow: 0 0 18px rgba(232, 150, 74, .08);
}

.s220-opt-chip.is-on .s220-opt-body b { color: #F5B26B; }

/* Бак косвенного нагрева — главный акцент: тёплая (отопление) рамка */
.s220-opt-hot {
  border-color: rgba(255, 142, 86, .4);
  background: linear-gradient(120deg, rgba(255, 142, 86, .07), rgba(255, 255, 255, .02) 60%);
}

.s220-opt-hot:hover { border-color: rgba(255, 142, 86, .6); }

.s220-opt-hot.is-on {
  border-color: rgba(255, 142, 86, .65);
  background: linear-gradient(120deg, rgba(255, 142, 86, .14), rgba(255, 142, 86, .03) 60%);
  box-shadow: 0 0 20px rgba(255, 142, 86, .12);
}

.s220-opt-hot.is-on .s220-opt-body b { color: #FFB08E; }

/* Селект литража под чекбоксом опции */
.s220-opt-size {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 40px;
  padding: 6px 12px;
  border-left: 2px solid rgba(232, 150, 74, .35);
}

.s220-opt-size.is-hidden { display: none; }

.s220-opt-size span {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.s220-opt-size select { max-width: 240px; }

.s220-room-heat input,
.s220-room-wfarea input { width: 78px; }

.s220-room-top .s220-line-del { align-self: flex-end; }

.s220-room-note {
  margin: 10px 0 0;
  color: #71767F;
  font-size: 12px;
  line-height: 1.5;
}

.s220-room-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.s220-room-extra {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-soft);
}

.s220-wf-chip { padding: 8px 14px; }

.s220-room-wfarea.is-hidden { display: none; }

@media (max-width: 720px) {
  .s220-room-top { align-items: stretch; }

  .s220-room-top .s220-room-name { flex: 1 1 100%; }

  .s220-room-extra { align-items: stretch; }

  .s220-room-extra .s220-wf-chip { align-self: flex-start; }
}

/* ---------- Смета: блоки по этапам ---------- */

.s220-est-h {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 26px 0 6px;
}

#result-works .s220-est-h:first-child,
#result-materials .s220-est-h:first-child,
#result-recommendations .s220-est-h:first-child { margin-top: 0; }

.s220-stage {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .015);
  overflow: hidden;
}

.s220-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(120deg, rgba(232, 150, 74, .07), transparent 60%);
}

.s220-stage-head b { font-size: 14px; }

.s220-stage-head span {
  color: #F5B26B;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.s220-stage-subtotal {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px dashed var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.s220-stage-subtotal b { color: var(--text); }

.s220-stage .s220-etable { padding: 0 6px; }

.s220-stage .s220-etable th:first-child,
.s220-stage .s220-etable td:first-child { padding-left: 10px; }

.s220-stage .s220-etable th:last-child,
.s220-stage .s220-etable td:last-child { padding-right: 10px; }

/* Рекомендации: аккуратные плашки */
.s220-rec {
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px dashed rgba(232, 150, 74, .3);
  border-radius: 14px;
  background: rgba(232, 150, 74, .05);
  color: #C7D6E2;
  font-size: 13.5px;
  line-height: 1.65;
}

.s220-rec b { color: #F5B26B; }

/* Схема разводки (вкладка «Схемы»): строки-таблицей */
.s220-flow-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.s220-flow-line:last-child { border-bottom: 0; }

.s220-flow-line small { display: block; color: #71767F; font-size: 11px; margin-top: 2px; }

.s220-flow-line .s220-flow-qty {
  color: var(--muted);
  white-space: nowrap;
  font-size: 12.5px;
}

.s220-flow-line .s220-flow-price {
  color: #F5B26B;
  font-weight: 600;
  white-space: nowrap;
  font-size: 12.5px;
}

/* ---------- Адаптив дополнений ---------- */

@media (max-width: 960px) {
  .s220-hero-copy { max-width: none; }
}

@media (max-width: 720px) {
  .s220-norms-grid { grid-template-columns: 1fr; }

  .s220-mock-row { grid-template-columns: minmax(0, 1fr) auto; }

  .s220-flow-line { grid-template-columns: minmax(0, 1fr) auto; }
  .s220-flow-line .s220-flow-price { grid-column: 2; }
}
