/* Materials — diagram & card polish (light theme) */

.diagram-wrap {
  padding: 16px 12px 20px !important;
  background: #f8faff !important;
  border-color: #e7edf9 !important;
}

.diagram-wrap svg {
  display: block;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  height: auto;
}

/* Бейдж «≠ активация» — в потоке, не поверх заголовка */
.conf-card .badge {
  position: static !important;
  display: inline-block !important;
  top: auto !important;
  right: auto !important;
  margin: 0 0 8px !important;
}
.conf-card h4 {
  max-width: 100% !important;
  padding-right: 0 !important;
}

/* Мобилка: схемы не сжимаем в нечитаемую кашу — горизонтальный скролл */
@media (max-width: 720px) {
  .diagram-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .diagram-wrap > svg {
    min-width: 700px !important;
    width: 700px !important;
    max-width: none !important;
  }
  .diagram-wrap::after {
    content: 'листай схему →';
    display: block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #98a1b5;
  }
}

/* Mini App / iframe: без полноэкранного hero и лишних хром-баров */
html.is-embed .hero {
  min-height: 0 !important;
  padding: 24px 20px 28px !important;
  justify-content: flex-start !important;
}
html.is-embed .hero h1 {
  font-size: clamp(26px, 8vw, 40px) !important;
}
html.is-embed .series-bar,
html.is-embed .nav,
html.is-embed .site-header,
html.is-embed #site-header-mobile {
  display: none !important;
}
html.is-embed .section,
html.is-embed .next-section {
  padding-left: 20px !important;
  padding-right: 20px !important;
}
html.is-embed body.has-site-header {
  padding-top: 0 !important;
}

.diagram-title {
  color: #434a5c !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}

/* Symptom cards: red accent; 1 col mobile, 2 col desktop, 3 col if exactly 3 cards */
.symptom-grid {
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

@media (max-width: 719px) {
  .symptom-grid,
  .symptom-grid.cols-3,
  .symptom-grid:has(> .symptom-card:nth-child(3):last-child) {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 720px) {
  .symptom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .symptom-grid.cols-3,
  .symptom-grid:has(> .symptom-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.symptom-card {
  border-color: #e7edf9 !important;
  box-shadow: none !important;
}

.symptom-card::before {
  background: #ef4d4d !important;
  height: 2px !important;
}

.symptom-card h4 {
  color: #ef4d4d !important;
}

.symptom-card .s-num {
  color: rgba(255, 68, 68, 0.1) !important;
}

.symptom-card ul li::before {
  color: #98a1b5 !important;
  opacity: 1 !important;
}

.symptom-card .flag {
  background: rgba(255, 68, 68, 0.15) !important;
  color: #ef4d4d !important;
}

/* Action cards — red accent; 1 col mobile, 2 col desktop, 3 col if exactly 3 cards */
.action-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  margin: 32px 0 !important;
}

@media (max-width: 719px) {
  .action-grid,
  .action-grid:has(> .action-card:nth-child(3):last-child) {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 720px) {
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .action-grid:has(> .action-card:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.action-card {
  border: 1px solid rgba(255, 68, 68, 0.2) !important;
  border-top: 3px solid #ef4d4d !important;
  background: rgba(255, 68, 68, 0.03) !important;
  margin-bottom: 0 !important;
}

.action-card .tag {
  background: rgba(255, 68, 68, 0.12) !important;
  color: #ef4d4d !important;
}

.action-card .action-num {
  color: rgba(255, 68, 68, 0.1) !important;
}

.action-card .result-list li {
  color: #586074 !important;
}

.action-card .result-list li::before {
  color: #ef4d4d !important;
}

.blind-zone {
  border-color: #e7edf9 !important;
  background: rgba(58, 92, 255, 0.04) !important;
  max-width: 100% !important;
}

.blind-zone strong {
  color: #3a5cff !important;
}

.but-block {
  border-color: #e7edf9 !important;
  background: rgba(58, 92, 255, 0.04) !important;
}

.but-block .but-label,
.but-block p strong {
  color: #3a5cff !important;
}

.col-box.isnot {
  border-color: #e7edf9 !important;
  background: rgba(58, 92, 255, 0.03) !important;
}

.col-box.isnot h4 {
  color: #586074 !important;
}

.col-box.isnot ul li::before {
  color: #98a1b5 !important;
}

.cost-list {
  border-color: #e7edf9 !important;
  background: rgba(58, 92, 255, 0.03) !important;
}

.cost-list p {
  color: #3a5cff !important;
}

.cost-list ul li {
  border-bottom-color: #e7edf9 !important;
}

.conf-card.wrong {
  border-color: #e7edf9 !important;
  background: rgba(58, 92, 255, 0.03) !important;
}

.conf-card.wrong .badge {
  background: rgba(58, 92, 255, 0.08) !important;
  color: #3a5cff !important;
}
