/* ==========================================================================
   Шаблон №6: repair-roof-v1 (Ремонт, устранение протечек и реконструкция кровли)
   Родная дизайн-система Лидер Стандарт / Лидер Кровля (.lk-mt-page)
   Высокий контраст WCAG AA (>= 4.5:1), 0 горизонтального скролла 320..1920px
   ========================================================================== */

.lk-mt-page {
  font-size: 16px;
  line-height: 1.64;
  color: #1e2b37;
  max-width: 100%;
  overflow-x: clip;
}
.lk-mt-page *,
.lk-mt-page *::before,
.lk-mt-page *::after {
  box-sizing: border-box;
}
.lk-mt-page [hidden] {
  display: none !important;
}
.lk-mt-page p {
  margin: 0 0 12px;
}
.lk-mt-page h2 {
  margin: 28px 0 14px;
  font-size: 27px;
  line-height: 1.24;
  color: #173448;
  font-weight: 700;
}
.lk-mt-page h3 {
  margin: 18px 0 8px;
  font-size: 19px;
  line-height: 1.32;
  color: #173448;
  font-weight: 700;
}
.lk-mt-page a {
  color: #145374;
  font-weight: 700;
}
.lk-mt-page a:hover {
  color: #9e3d0c;
}

/* Кнопки с гарантированным контрастом >= 5.2:1 */
.lk-mt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 7px;
  background: #b7470d;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}
.lk-mt-btn:hover,
.lk-mt-btn:focus-visible {
  background: #963808;
  color: #ffffff !important;
}
.lk-mt-btn-secondary {
  background: #e6eff5;
  color: #173448 !important;
  border: 1px solid #bfd1de;
}
.lk-mt-btn-secondary:hover,
.lk-mt-btn-secondary:focus-visible {
  background: #d6e5f0;
  color: #102636 !important;
}
.lk-mt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.lk-mt-note {
  display: inline-block;
  color: #425869;
  font-size: 14px;
}

/* Быстрая навигация разделов (.leader-tool-nav) */
.lk-mt-page .leader-tool-nav {
  margin: 12px 0 20px;
  padding: 14px 18px;
  border: 1px solid #c5d6e3;
  border-radius: 12px;
  background: #f5f9fc;
}
.lk-mt-page .leader-tool-nav__title {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #35586e;
}
.lk-mt-page .leader-tool-nav__main,
.lk-mt-page .leader-tool-nav__extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lk-mt-page .leader-tool-nav__main {
  margin-bottom: 8px;
}
.lk-mt-page .leader-tool-nav__main a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 8px;
  background: #173448;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 700;
}
.lk-mt-page .leader-tool-nav__main a:hover {
  background: #b7470d;
}
.lk-mt-page .leader-tool-nav__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffd7a8;
  font-size: 11.5px;
}
.lk-mt-page .leader-tool-nav__extra a {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid #c4d5e2;
  border-radius: 999px;
  background: #ffffff;
  color: #173448 !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
}
.lk-mt-page .leader-tool-nav__extra a:hover {
  border-color: #b7470d;
  color: #9e3d0c !important;
}
.lk-mt-page .leader-nav-short {
  display: none;
}

/* Главный комбайн первого экрана: #repair-diagnostic-planner */
.rrp-shell {
  margin: 18px 0 42px;
  border: 1px solid #b8cbd8;
  border-radius: 16px;
  background: linear-gradient(155deg, #f7fafc 0%, #edf3f8 100%);
  box-shadow: 0 12px 32px rgba(23, 52, 72, 0.07);
  overflow: hidden;
}
.rrp-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: #173448;
  color: #ffffff;
}
.rrp-topbar__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffd7a8;
}
.rrp-topbar__rate {
  font-size: 15px;
  color: #ffffff;
}
.rrp-topbar__rate strong {
  color: #ffd7a8;
  font-size: 16.5px;
}
.rrp-topbar__link {
  color: #ffd7a8 !important;
  text-decoration: underline;
  font-size: 14px;
}

/* Переключатель 3 масштабов ремонта */
.rrp-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 24px 10px;
}
.rrp-scenario-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1.5px solid #c3d4e0;
  border-radius: 10px;
  background: #ffffff;
  color: #173448;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.rrp-scenario-btn:hover {
  border-color: #1f6f8b;
}
.rrp-scenario-btn[aria-pressed="true"] {
  border-color: #b7470d;
  background: #fff8f3;
  box-shadow: 0 4px 14px rgba(183, 71, 13, 0.12);
}
.rrp-scenario-btn__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9e3d0c;
}
.rrp-scenario-btn__title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #173448;
}
.rrp-scenario-btn__price {
  font-size: 13px;
  color: #365266;
}

/* Двухколоночная сетка: Слева карта симптомов крыши + диагноз, Справа смета Прайса 2026 */
.rrp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1.16fr);
  gap: 20px;
  padding: 12px 24px 24px;
  align-items: start;
}
.rrp-visual-card,
.rrp-calc-card {
  background: #ffffff;
  border: 1px solid #c9d8e3;
  border-radius: 13px;
  padding: 20px;
  min-width: 0;
}
.rrp-visual-card h2,
.rrp-calc-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
}
.rrp-sublead {
  font-size: 14px;
  color: #3f596c;
  margin-bottom: 14px !important;
}

/* Переключатель триггера влаги (Когда появляется течь?) */
.rrp-weather-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  background: #edf3f8;
  border-radius: 8px;
}
.rrp-weather-pill {
  padding: 6px 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #233f54;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.rrp-weather-pill[aria-pressed="true"] {
  background: #173448;
  color: #ffffff;
}

/* Интерактивная SVG-карта симптомов крыши */
.rrp-svg-stage {
  border: 1px solid #d7e3ec;
  border-radius: 10px;
  background: #f8fbfd;
  padding: 8px;
  margin-bottom: 12px;
}
.rrp-svg-stage svg,
.rrp-svg-stage img {
  display: block;
  width: 100%;
  height: auto;
}
.rrp-svg-stage .rrp-pin {
  cursor: pointer;
  transition: transform 0.15s ease;
}
.rrp-svg-stage .rrp-pin:hover circle {
  stroke-width: 3px;
}

/* Кнопки выбора 6 очагов протечки под схемой */
.rrp-symptom-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}
.rrp-symptom-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid #c5d6e3;
  border-radius: 8px;
  background: #ffffff;
  color: #173448;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.rrp-symptom-chip:hover {
  border-color: #1f6f8b;
}
.rrp-symptom-chip[aria-pressed="true"] {
  border-color: #b7470d;
  background: #fff7f1;
  color: #7c2d06;
}
.rrp-symptom-chip__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #173448;
  color: #ffffff;
  font-size: 11px;
  flex-shrink: 0;
}
.rrp-symptom-chip[aria-pressed="true"] .rrp-symptom-chip__num {
  background: #b7470d;
}

/* Карточка инженерного диагноза выбранного узла */
.rrp-diagnosis-card {
  padding: 13px 15px;
  border-radius: 10px;
  background: #f4f8fb;
  border: 1px solid #c9dae6;
  margin-bottom: 12px;
}
.rrp-diagnosis-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.rrp-diagnosis-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #173448;
}
.rrp-diagnosis-card__rate {
  font-size: 13px;
  font-weight: 700;
  color: #9e3d0c;
  background: #fff4eb;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #f0c9ad;
}
.rrp-diagnosis-card p {
  font-size: 13.5px;
  color: #294153;
  margin-bottom: 10px !important;
}
.rrp-apply-symptom-btn {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #173448;
  background: #173448;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.rrp-apply-symptom-btn:hover {
  background: #b7470d;
  border-color: #b7470d;
}

/* 4 плашки решения (Матрица 30% Repair vs Replace) */
.rrp-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.rrp-metric {
  padding: 11px 12px;
  border-radius: 9px;
  background: #f3f7fa;
  border: 1px solid #d5e2ec;
}
.rrp-metric__label {
  display: block;
  font-size: 12px;
  color: #415a6c;
  margin-bottom: 3px;
}
.rrp-metric__val {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #173448;
}
.rrp-metric--ok {
  background: #eef7f1;
  border-color: #b7dcc3;
}
.rrp-metric--ok .rrp-metric__val {
  color: #185c37;
}
.rrp-metric--warn {
  background: #fff5ec;
  border-color: #f0c5a5;
}
.rrp-metric--warn .rrp-metric__val {
  color: #9a3808;
}

.rrp-guard-alert {
  padding: 12px 14px;
  border-left: 4px solid #1f6f8b;
  background: #eef5fa;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #173448;
}
.rrp-guard-alert--warn {
  border-left-color: #b7470d;
  background: #fff4eb;
  color: #592205;
}

/* Поля калькулятора работ (#repair-estimate) */
.rrp-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.rrp-form-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rrp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3547;
  min-width: 0;
}
.rrp-field input,
.rrp-field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #b6cad8;
  border-radius: 7px;
  background: #ffffff;
  color: #173448;
  font-size: 14px;
  font-weight: 600;
}
.rrp-field select {
  padding-right: 32px;
  text-overflow: ellipsis;
}
.rrp-field input:focus,
.rrp-field select:focus {
  outline: 2px solid #1f6f8b;
  border-color: #1f6f8b;
}

/* Чекбоксы послойных работ по Прайсу 2026 */
.rrp-ops-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #35576e;
  margin: 12px 0 8px;
}
.rrp-ops-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-bottom: 14px;
}
.rrp-op-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #d7e3ec;
  border-radius: 8px;
  background: #fafcfe;
  cursor: pointer;
  font-weight: 400;
}
.rrp-op-item:hover {
  border-color: #9ab5c7;
}
.rrp-op-item__left {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}
.rrp-op-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #b7470d;
  flex-shrink: 0;
}
.rrp-op-item__name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #173448;
  line-height: 1.32;
}
.rrp-op-item__hint {
  display: block;
  font-size: 12px;
  color: #486377;
  line-height: 1.35;
}
.rrp-op-item__rate {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: #9e3d0c;
  flex-shrink: 0;
}

/* Итоговая панель сметы работ + защищённая форма */
.rrp-summary {
  padding: 15px 16px;
  border-radius: 10px;
  background: #173448;
  color: #ffffff;
  margin-bottom: 14px;
}
.rrp-summary__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.rrp-summary__label {
  font-size: 13px;
  color: #d6e6f2;
}
.rrp-summary__total {
  font-size: 26px;
  font-weight: 800;
  color: #ffd7a8;
}
.rrp-summary__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 9px;
  font-size: 13px;
  color: #e2eef7;
}
.rrp-lines-details {
  margin: 10px 0 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 9px 12px;
}
.rrp-lines-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffd7a8;
}
.rrp-lines-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 12.5px;
  color: #f0f6fa;
}
.rrp-lines-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}
.rrp-lines-list li:last-child {
  border-bottom: 0;
}

.rrp-inline-lead {
  padding: 14px;
  border: 1px solid #cad8e3;
  border-radius: 10px;
  background: #f5f9fc;
}
.rrp-inline-lead__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.rrp-lead-status {
  margin: 8px 0 0 !important;
  font-size: 13px;
  font-weight: 700;
  color: #173448;
}

/* ==========================================================================
   Коммерческий блок №2: #kit + #kit-lead (Ремонтная доборка и узловые элементы)
   ========================================================================== */
.rrp-kit-section {
  margin: 44px 0;
  padding: 26px 24px;
  border: 1px solid #b3c7d6;
  border-radius: 16px;
  background: linear-gradient(145deg, #f6f9fc 0%, #eaf2f7 100%);
}
.rrp-kit-head {
  max-width: 960px;
  margin-bottom: 18px;
}
.rrp-kit-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: #9e3d0c;
  margin-bottom: 6px;
}
.rrp-kit-head h2 {
  margin: 0 0 10px;
  font-size: 30px;
  color: #173448;
}
.rrp-kit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.rrp-kit-tab {
  padding: 8px 14px;
  border: 1px solid #bfd1de;
  border-radius: 999px;
  background: #ffffff;
  color: #173448;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.rrp-kit-tab[aria-pressed="true"] {
  background: #173448;
  border-color: #173448;
  color: #ffffff;
}
.rrp-kit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.rrp-kit-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  border: 1.5px solid #cbd9e4;
  border-radius: 12px;
  background: #ffffff;
  min-width: 0;
}
.rrp-kit-card.is-selected {
  border-color: #b7470d;
  box-shadow: 0 6px 18px rgba(183, 71, 13, 0.1);
}
.rrp-kit-card__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.rrp-kit-card__img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e1ebf2;
  background: #ffffff;
  flex-shrink: 0;
}
.rrp-kit-card__role {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9e3d0c;
  margin-bottom: 3px;
}
.rrp-kit-card__title {
  margin: 0;
  font-size: 15px !important;
  line-height: 1.32 !important;
}
.rrp-kit-card__title a {
  color: #173448;
  text-decoration: none;
}
.rrp-kit-card__title a:hover {
  text-decoration: underline;
}
.rrp-kit-card__why {
  font-size: 13px;
  color: #3f586a;
  line-height: 1.48;
  margin-bottom: 12px !important;
}
.rrp-kit-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e7eff5;
}
.rrp-kit-card__price {
  font-size: 13.5px;
  color: #173448;
}
.rrp-kit-card__price strong {
  display: block;
  font-size: 15px;
  color: #173448;
}
.rrp-kit-toggle {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid #173448;
  background: #ffffff;
  color: #173448;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.rrp-kit-card.is-selected .rrp-kit-toggle {
  background: #b7470d;
  border-color: #b7470d;
  color: #ffffff;
}

/* Сводная плашка «Работы + Материалы» (#kit-lead) */
.rrp-bundle-bar {
  padding: 20px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid #173448;
}
.rrp-bundle-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.rrp-bundle-cell {
  padding: 11px 13px;
  border-radius: 9px;
  background: #f3f7fa;
  border: 1px solid #d5e2ec;
}
.rrp-bundle-cell span {
  display: block;
  font-size: 12px;
  color: #425a6b;
}
.rrp-bundle-cell strong {
  display: block;
  font-size: 18px;
  color: #173448;
  margin-top: 2px;
}
.rrp-bundle-cell--accent {
  background: #173448;
  border-color: #173448;
}
.rrp-bundle-cell--accent span {
  color: #d6e6f2;
}
.rrp-bundle-cell--accent strong {
  color: #ffd7a8;
}

/* ==========================================================================
   Инструмент №3: Интерактивный атлас 6 узлов протечек (#repair-nodes-atlas)
   ========================================================================== */
.rrp-atlas {
  margin: 40px 0;
  padding: 24px;
  border: 1px solid #c4d5e2;
  border-radius: 15px;
  background: #ffffff;
}
.rrp-atlas__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}
.rrp-atlas__tab {
  padding: 9px 14px;
  border: 1px solid #bfd1de;
  border-radius: 8px;
  background: #f4f8fb;
  color: #173448;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.rrp-atlas__tab[aria-selected="true"] {
  background: #173448;
  border-color: #173448;
  color: #ffffff;
}
.rrp-atlas__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid #d7e3ec;
  border-radius: 11px;
  background: #f9fbfd;
}
.rrp-atlas__panel[hidden] {
  display: none !important;
}
.rrp-atlas__checks {
  padding: 14px 16px;
  border-radius: 9px;
  background: #ffffff;
  border-left: 4px solid #2d6a4f;
  border-top: 1px solid #d9e5ee;
  border-right: 1px solid #d9e5ee;
  border-bottom: 1px solid #d9e5ee;
}
.rrp-atlas__checks ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 14px;
}
.rrp-atlas__checks li {
  margin-bottom: 7px;
}

/* Калькулятор площади скатов/узлов (#roof-area) и аудит готовой сметы */
.rrp-area-box,
.rrp-audit-box {
  margin: 36px 0;
  padding: 22px 24px;
  border: 1px solid #c5d6e3;
  border-radius: 14px;
  background: #f6f9fc;
}
.rrp-area-result {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid #cbd9e4;
  font-size: 15px;
  color: #173448;
}

/* Общие текстовые карточки, таблицы и блоки .lk-mt-* */
.lk-mt-top {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid #d0dde7;
  border-left: 4px solid #1f6f8b;
  background: #f5f8fb;
  border-radius: 8px;
}
.lk-mt-eyebrow {
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #35586e;
}
.lk-mt-lead {
  font-size: 18px;
  color: #172633;
}
.lk-mt-facts,
.lk-mt-grid,
.lk-mt-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 22px;
}
.lk-mt-fact,
.lk-mt-card,
.lk-mt-extra-card {
  padding: 15px;
  border: 1px solid #d5e1ea;
  border-radius: 8px;
  background: #ffffff;
}
.lk-mt-fact b,
.lk-mt-card strong,
.lk-mt-extra-card strong {
  display: block;
  margin-bottom: 6px;
  color: #173448;
}
.lk-mt-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.lk-mt-check {
  padding: 14px;
  border-left: 4px solid #2d6a4f;
  background: #f2f8f4;
  border-radius: 6px;
}
.lk-mt-callout,
.lk-mt-warning {
  margin: 16px 0;
  padding: 15px 16px;
  border-left: 4px solid #b7470d;
  background: #fff6ee;
  border-radius: 6px;
  color: #2b180c;
}
.lk-mt-links,
.lk-mt-extra-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}
.lk-mt-links > a,
.lk-mt-links > div,
.lk-mt-extra-links > a {
  display: block;
  padding: 13px;
  border: 1px solid #d4e0e9;
  border-radius: 8px;
  background: #ffffff;
  text-decoration: none;
}
.lk-mt-page .editorial-section--brief .lk-mt-extra-links > a {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
}
.lk-mt-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 26px;
}
.lk-mt-media {
  overflow: hidden;
  border: 1px solid #d5e1ea;
  border-radius: 8px;
  background: #ffffff;
}
.lk-mt-media img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.lk-mt-media img.is-diagram {
  object-fit: contain;
  background: #f6f9fc;
  padding: 6px;
}
.lk-mt-media-copy {
  padding: 14px;
}
.lk-mt-media-copy strong {
  display: block;
  margin-bottom: 5px;
  color: #173448;
}

/* Таблицы (десктоп + чистая карточная адаптация на мобильных) */
.lk-mt-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 24px;
  border: 1px solid #cfdce6;
  border-radius: 10px;
  background: #ffffff;
}
.lk-mt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.lk-mt-table caption {
  padding: 11px 14px;
  text-align: left;
  font-size: 13px;
  color: #425a6c;
  background: #f7fafc;
  border-bottom: 1px solid #e3ecf2;
}
.lk-mt-table th,
.lk-mt-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #e8eff4;
  text-align: left;
  vertical-align: top;
}
.lk-mt-table thead th {
  background: #173448;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
}
.lk-mt-table tbody th {
  color: #173448;
  font-weight: 700;
  background: #fbfdfe;
}
.editorial-table__price {
  font-weight: 700;
  color: #9e3d0c;
  white-space: nowrap;
}

/* Перебиваем жёсткие ширины editorial.css для 7-колоночного прайса и 5-колоночной матрицы на десктопе */
@media (min-width: 721px) {
  #content .article_description .lk-mt-page #roof-price-table .editorial-table,
  .lk-mt-page #roof-price-table .editorial-table {
    table-layout: fixed !important;
    width: 100% !important;
  }
  #content .article_description .lk-mt-page #roof-price-table .editorial-table thead th:nth-child(1),
  #content .article_description .lk-mt-page #roof-price-table .editorial-table tbody th:nth-child(1),
  .lk-mt-page #roof-price-table .editorial-table thead th:nth-child(1),
  .lk-mt-page #roof-price-table .editorial-table tbody th:nth-child(1) {
    width: 31% !important;
  }
  #content .article_description .lk-mt-page #roof-price-table .editorial-table thead th:nth-child(2),
  #content .article_description .lk-mt-page #roof-price-table .editorial-table tbody td:nth-child(2),
  .lk-mt-page #roof-price-table .editorial-table thead th:nth-child(2),
  .lk-mt-page #roof-price-table .editorial-table tbody td:nth-child(2) {
    width: 8% !important;
    padding: 10px 8px !important;
  }
  #content .article_description .lk-mt-page #roof-price-table .editorial-table thead th:nth-child(n+3),
  #content .article_description .lk-mt-page #roof-price-table .editorial-table tbody td:nth-child(n+3),
  .lk-mt-page #roof-price-table .editorial-table thead th:nth-child(n+3),
  .lk-mt-page #roof-price-table .editorial-table tbody td:nth-child(n+3) {
    width: 12.2% !important;
    padding: 10px 8px !important;
  }
  #content .article_description .lk-mt-page #roof-price-table .editorial-table__price,
  .lk-mt-page #roof-price-table .editorial-table__price {
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    display: inline !important;
  }

  #content .article_description .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(1),
  .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(1) {
    width: 19% !important;
  }
  #content .article_description .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(2),
  .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(2) {
    width: 33% !important;
  }
  #content .article_description .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(3),
  .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(3) {
    width: 10% !important;
  }
  #content .article_description .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(4),
  .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(4) {
    width: 16% !important;
  }
  #content .article_description .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(5),
  .lk-mt-page #repair-vs-replace .editorial-table thead th:nth-child(5) {
    width: 22% !important;
  }
  #content .article_description .lk-mt-page #repair-vs-replace .editorial-table__price,
  .lk-mt-page #repair-vs-replace .editorial-table__price {
    font-size: 14px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
  }
}

/* Фотовкладки SVG — защита от обрезки чертежей по краям */
#roof-information-tabs .content-photo-panel__image {
  object-fit: contain !important;
  background: #f6f9fc;
}

/* ==========================================================================
   Адаптив: планшеты (<= 1040px) и смартфоны (<= 720px, <= 390px, 320px)
   ========================================================================== */
@media (max-width: 1040px) {
  .rrp-scenarios {
    grid-template-columns: 1fr;
  }
  .rrp-grid,
  .rrp-atlas__panel {
    grid-template-columns: 1fr;
  }
  .rrp-symptom-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rrp-kit-grid,
  .rrp-bundle-totals,
  .lk-mt-facts,
  .lk-mt-grid,
  .lk-mt-extra-grid,
  .lk-mt-media-grid,
  .lk-mt-links,
  .lk-mt-extra-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .lk-mt-page .leader-nav-long {
    display: none !important;
  }
  .lk-mt-page .leader-nav-short {
    display: inline !important;
  }
  .lk-mt-page {
    font-size: 15px;
  }
  .lk-mt-page h2,
  .rrp-kit-head h2 {
    font-size: 22px;
  }
  .rrp-topbar,
  .rrp-scenarios,
  .rrp-grid {
    padding-left: 14px;
    padding-right: 14px;
  }
  .rrp-scenarios,
  .rrp-symptom-chips,
  .rrp-form-row,
  .rrp-form-row--3,
  .rrp-inline-lead__row,
  .rrp-kit-grid,
  .rrp-metrics,
  .rrp-bundle-totals,
  .lk-mt-facts,
  .lk-mt-grid,
  .lk-mt-extra-grid,
  .lk-mt-check-grid,
  .lk-mt-links,
  .lk-mt-extra-links,
  .lk-mt-media-grid {
    grid-template-columns: 1fr;
  }
  .rrp-visual-card,
  .rrp-calc-card,
  .rrp-kit-section,
  .rrp-atlas,
  .rrp-area-box,
  .rrp-audit-box {
    padding: 15px 14px;
  }
  .rrp-op-item {
    flex-direction: column;
    gap: 5px;
  }
  .rrp-op-item__rate {
    padding-left: 27px;
  }
  .lk-mt-actions .lk-mt-btn {
    width: 100%;
  }

  /* Карточная раскладка всех таблиц с data-label на смартфонах 320..720px */
  .lk-mt-table-wrap {
    overflow: visible !important;
    border: 0;
    background: transparent;
  }
  .lk-mt-table,
  .lk-mt-table tbody,
  .lk-mt-table tr,
  .lk-mt-table th,
  .lk-mt-table td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .lk-mt-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
  }
  .lk-mt-table caption {
    display: block;
    margin-bottom: 10px;
    border: 1px solid #d5e1ea;
    border-radius: 8px;
  }
  .lk-mt-table tbody tr {
    margin-bottom: 12px;
    padding: 10px 13px;
    border: 1px solid #cfdce6;
    border-radius: 9px;
    background: #ffffff;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
  .lk-mt-table tbody th,
  .lk-mt-table tbody td {
    padding: 7px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #edf2f6 !important;
    background: transparent !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  .lk-mt-table tbody td:last-child {
    border-bottom: 0 !important;
  }
  .lk-mt-table tbody th[data-label]::before,
  .lk-mt-table tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #446476;
  }
}
