:root {
  color-scheme: light;
  --mm-primary: #2C96FF;
  --mm-primary-hover: #1A84EE;
  --mm-primary-light: #EBF5FF;
  --mm-primary-border: #B8DAFF;
  --mm-primary-accent: #5AADFF;
  --mm-text: #1F2937;
}

.site-logo { display: block; }

.mm-btn-primary {
  background: var(--mm-primary);
  color: #fff;
}
.mm-btn-primary:hover:not(:disabled) {
  background: var(--mm-primary-hover);
}
.mm-link {
  color: var(--mm-primary);
}
.mm-link:hover {
  color: var(--mm-primary-hover);
}

#score-ring {
  --size: 180px;
  --thick: 14px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--c) calc(var(--p) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
  position: relative;
}
#score-ring::after {
  content: attr(data-score);
  position: absolute;
  inset: var(--thick);
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: #0f172a;
}

.check-card {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-left: 6px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}
/* Левая полоска и фон карточки = статус (ok/warn/fail) */
.check-card.status-ok   { border-left-color: #16a34a; background: #f0fdf4; }
.check-card.status-warn { border-left-color: #f59e0b; background: #fffbeb; }
.check-card.status-fail { border-left-color: #dc2626; background: #fef2f2; }

/* Иконка статуса в цветном круге */
.check-card .status-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  margin-top: 1px;
  line-height: 1;
  background: #94a3b8;
}
.check-card.status-ok   .status-icon { background: #16a34a; }
.check-card.status-warn .status-icon { background: #f59e0b; }
.check-card.status-fail .status-icon { background: #dc2626; }

.check-card .check-body { min-width: 0; }

.check-card .title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.check-card .title { font-weight: 600; color: #0f172a; }

/* Текстовый бейдж статуса рядом с заголовком */
.st-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: .02em;
  white-space: nowrap;
}
.st-badge-ok   { background: #dcfce7; color: #166534; }
.st-badge-warn { background: #fef3c7; color: #92400e; }
.st-badge-fail { background: #fee2e2; color: #991b1b; }

.check-card .value { color: #334155; font-size: 13px; word-break: break-word; margin-top: 4px; }
.check-card .rec   { color: #b45309; font-size: 13px; margin-top: 6px; font-weight: 500; }

.check-card .badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.sev {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: .02em;
  white-space: nowrap;
}
.sev-high   { background: #fee2e2; color: #991b1b; }
.sev-medium { background: #fef3c7; color: #92400e; }
.sev-low    { background: #f1f5f9; color: #475569; }

.check-more {
  margin-top: 8px;
  font-size: 13px;
}
.check-more > summary {
  cursor: pointer;
  color: var(--mm-primary);
  font-weight: 500;
  list-style: none;
  user-select: none;
}
.check-more > summary::-webkit-details-marker { display: none; }
.check-more > summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 0.15s;
}
.check-more[open] > summary::before {
  content: '▾ ';
}
.check-more .more-body {
  margin-top: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  color: #334155;
  display: grid;
  gap: 6px;
  line-height: 1.45;
}
.check-more .more-label {
  color: #0f172a;
  font-weight: 600;
}

.cat-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.cat-title.cat-ai {
  color: var(--mm-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-title.cat-ai::before {
  content: '✨';
  font-size: 14px;
}
.cat-title:where(:not(.cat-ai)):where([data-medmaps]) {
  /* запас под будущие маркеры категорий */
}
/* Медтематика — маркер-крестик */
.cat-title.cat-med {
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat-title.cat-med::before {
  content: '⚕';
  font-size: 14px;
}

/* ===== Большой блок «Базовые данные сайта» (как в SiteAnalyzer SEO Tools) ===== */
.facts-box {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  padding: 18px 20px;
}
.facts-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.facts-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.facts-sub {
  font-size: 12px;
  color: #64748b;
}
.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
@media (min-width: 768px) {
  .facts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .facts-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.facts-cell {
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 0;
}
.facts-key {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 2px;
}
.facts-val {
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
  word-break: break-word;
}
.facts-val .ok    { color: #15803d; font-weight: 600; }
.facts-val .fail  { color: #b91c1c; font-weight: 600; }
.facts-val .muted { color: #94a3b8; font-weight: 500; }

/* ===== Большой блок «GEO-анализ / AI-видимость» — в стиле остальных карточек ===== */
.geo-box {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  padding: 18px 20px 20px;
  color: #0f172a;
}
.geo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.geo-head-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.geo-head-right {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 999px;
}
.geo-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.geo-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.geo-score {
  --p: 0;
  --c: #f59e0b;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background:
    conic-gradient(var(--c) calc(var(--p) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.geo-score::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #ffffff;
}
.geo-score-num,
.geo-score-max { position: relative; }
.geo-score-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--c);
  line-height: 1;
}
.geo-score-max {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
  text-align: center;
}
.geo-verdict-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.geo-verdict-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.geo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 768px) {
  .geo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.geo-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}
.geo-tile.geo-ok   { background: #f0fdf4; border-color: #bbf7d0; }
.geo-tile.geo-warn { background: #fffbeb; border-color: #fde68a; }
.geo-tile.geo-fail { background: #fef2f2; border-color: #fecaca; }
.geo-tile.geo-na   { background: #f8fafc; border-color: #e2e8f0; }
.geo-tile-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}
.geo-tile-val {
  font-size: 12px;
  color: #334155;
  word-break: break-word;
}
.geo-tile-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}
.geo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.geo-ok   .geo-icon { background: #16a34a; color: #fff; }
.geo-warn .geo-icon { background: #f59e0b; color: #1f2937; }
.geo-fail .geo-icon { background: #ef4444; color: #fff; }
.geo-na   .geo-icon { background: #e2e8f0; color: #94a3b8; }
.geo-tile.geo-na .geo-tile-head { color: #64748b; }
.geo-tile.geo-na .geo-tile-val.muted { color: #94a3b8; }

.geo-sem {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.geo-sem-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 8px;
}
.geo-sem-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.geo-sem-tag {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid transparent;
}
.geo-sem-tag.on  { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.geo-sem-tag.off { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

/* Бейдж типа страницы (врач/услуга/прайс/...) */
.page-type-badge {
  display: inline-block;
  padding: 1px 8px;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  vertical-align: 2px;
  white-space: nowrap;
}
.page-type-badge.pt-doctor        { background: #dbeafe; color: #1d4ed8; }
.page-type-badge.pt-doctors_list  { background: #bfdbfe; color: #1e40af; }
.page-type-badge.pt-service       { background: #ede9fe; color: #6d28d9; }
.page-type-badge.pt-services_list { background: #ddd6fe; color: #5b21b6; }
.page-type-badge.pt-price         { background: #fef3c7; color: #92400e; }
.page-type-badge.pt-reviews       { background: #fce7f3; color: #9d174d; }
.page-type-badge.pt-contacts      { background: #dcfce7; color: #166534; }
.page-type-badge.pt-home          { background: var(--mm-primary-light); color: var(--mm-primary-hover); }
.page-type-badge.pt-about         { background: #ecfeff; color: #155e75; }
.page-type-badge.pt-article       { background: #f1f5f9; color: #334155; }
.page-type-badge.pt-promo         { background: #ffe4e6; color: #9f1239; }
.page-type-badge.pt-docs          { background: #fae8ff; color: #6b21a8; }
.page-type-badge.pt-equipment     { background: #ecfccb; color: #3f6212; }
.page-type-badge.pt-gallery       { background: #fef9c3; color: #854d0e; }
.page-type-badge.pt-section_index { background: #e2e8f0; color: #1e293b; }
.page-type-badge.pt-fill          { background: #f8fafc; color: #64748b; }
.page-type-badge.pt-other         { background: #f1f5f9; color: #475569; }

/* Блок «Какие страницы взяты в аудит» */
.sample-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.sample-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 6px;
}
.sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
  cursor: help;
  white-space: nowrap;
}
.sample-chip b { font-weight: 700; }
.sample-chip.pt-home          { background: var(--mm-primary-light); color: var(--mm-primary-hover); }
.sample-chip.pt-contacts      { background: #dcfce7; color: #166534; }
.sample-chip.pt-price         { background: #fef3c7; color: #92400e; }
.sample-chip.pt-about         { background: #ecfeff; color: #155e75; }
.sample-chip.pt-service       { background: #ede9fe; color: #6d28d9; }
.sample-chip.pt-services_list { background: #ddd6fe; color: #5b21b6; }
.sample-chip.pt-doctor        { background: #dbeafe; color: #1d4ed8; }
.sample-chip.pt-doctors_list  { background: #bfdbfe; color: #1e40af; }
.sample-chip.pt-reviews       { background: #fce7f3; color: #9d174d; }
.sample-chip.pt-article       { background: #f1f5f9; color: #334155; }
.sample-chip.pt-promo         { background: #ffe4e6; color: #9f1239; }
.sample-chip.pt-docs          { background: #fae8ff; color: #6b21a8; }
.sample-chip.pt-equipment     { background: #ecfccb; color: #3f6212; }
.sample-chip.pt-gallery       { background: #fef9c3; color: #854d0e; }
.sample-chip.pt-section_index { background: #e2e8f0; color: #1e293b; }
.sample-chip.pt-fill          { background: #f8fafc; color: #64748b; }
.sample-hint {
  font-size: 12px;
  color: #64748b;
}

/* Топ-проблем сайта */
.top-issues-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.top-issues-grid {
  display: grid;
  gap: 10px;
}
.top-issue {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
}
.top-issue.sev-border-high   { border-left-color: #dc2626; }
.top-issue.sev-border-medium { border-left-color: #f59e0b; }
.top-issue.sev-border-low    { border-left-color: #cbd5e1; }
.top-issue-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.top-issue-title {
  font-weight: 600;
  color: #0f172a;
}
.top-issue-cat {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.top-issue-stat {
  margin-top: 4px;
  font-size: 13px;
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.top-issue-stat .ti-fail { color: #b91c1c; font-weight: 600; }
.top-issue-stat .ti-warn { color: #b45309; font-weight: 600; }
.top-issue-stat .ti-total { color: #64748b; }
.top-issue-examples {
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
  word-break: break-all;
}
.top-issue-examples a {
  color: var(--mm-primary);
  text-decoration: underline;
  text-decoration-color: var(--mm-primary-border);
}
.top-issue-examples a:hover { text-decoration-color: var(--mm-primary); }

/* --- Печать / PDF --- */
@media print {
  @page { margin: 14mm 12mm; }

  html, body {
    background: #fff !important;
    color: #0f172a !important;
    font-size: 11pt;
  }

  /* Прячем интерактив, шапку, форму и переключатели — в отчёте они не нужны. */
  header, footer,
  #audit-form, #status, #error-box, .tab-btn, .no-print,
  #site-pages summary .page-toggle,
  details.check-more > summary {
    display: none !important;
  }

  /* Ключевые секции занимают всю ширину. */
  main { max-width: 100% !important; padding: 0 !important; }
  section { break-inside: avoid; }

  /* Вкладки/grid страниц + сетка результата стелим вертикально. */
  #result > div { display: block !important; }
  #result aside { width: 100%; text-align: left; padding: 0 0 12px; box-shadow: none; ring: 0; border-bottom: 1px solid #e2e8f0; border-radius: 0; }

  /* Раскрытые details печатаем целиком, без стрелочки. */
  details { display: block !important; }
  details > summary { list-style: none !important; cursor: default !important; }
  details > summary::-webkit-details-marker { display: none; }
  .check-more .more-body { background: #f8fafc !important; }

  /* Чтобы цвета severity действительно печатались. */
  .check-card,
  .top-issue,
  .att-card,
  .ai-summary,
  .page-type-badge,
  .sev,
  .page-status,
  .page-score,
  .cat-title {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Не разрывать карточку чека по странице. */
  .check-card, .top-issue, .att-card, .site-page { break-inside: avoid; }

  /* Уменьшим внешний скоринг-кольцо для печати. */
  #score-ring { --size: 130px; --thick: 10px; }
  #score-ring::after { font-size: 2rem; }

  /* В сайт-аудите длинные URL не должны вылезать. */
  .site-page .page-url { white-space: normal; word-break: break-all; }
}

.no-print { /* класс-якорь для скрытия в @media print */ }

.pdf-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--mm-primary-hover) 0%, var(--mm-primary) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(44, 150, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pdf-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(44, 150, 255, 0.45);
  color: #fff;
}
.pdf-fab.hidden { display: none; }

@media print {
  .pdf-fab { display: none !important; }
}

/* --- Score analysis loading ring --- */
@property --score-load-p {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

.score-load-ring {
  --size: 132px;
  --thick: 11px;
  --score-load-p: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(var(--c, var(--mm-primary)) calc(var(--score-load-p) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
  position: relative;
  transition: --score-load-p 0.45s ease;
}

.score-load-ring::after {
  content: '';
  position: absolute;
  inset: var(--thick);
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.score-load-pct {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 700;
  color: var(--mm-text, #1F2937);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* --- SEO Score Dashboard --- */
#score-ring-big {
  --size: 180px;
  --thick: 14px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
  position: relative;
}
#score-ring-big::after {
  content: attr(data-score);
  position: absolute;
  inset: var(--thick);
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  font-weight: 700;
  color: #0f172a;
}

.score-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

/* --- Score Chart (SVG column chart) --- */
#score-chart {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 16px 12px;
}
.score-chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
  margin-bottom: 14px;
}
.score-chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.score-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #64748b;
}
.score-chart-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.score-chart-wrap {
  overflow-x: auto;
}
.score-chart-svg {
  display: block;
  width: 100%;
  min-width: 320px;
  height: 220px;
}
/* Не даём глобальным reset’ам сжимать столбики диаграммы */
.score-chart-svg rect.score-chart-bar {
  max-height: none;
}
.score-chart-bar { cursor: pointer; transition: opacity 0.15s; }
.score-chart-bar:hover { opacity: 0.8; }
.score-chart-label { font-size: 10px; fill: #64748b; text-anchor: middle; }
.score-chart-value { font-size: 10px; fill: #334155; text-anchor: middle; font-weight: 500; }
.score-chart-axis-label { font-size: 10px; fill: #94a3b8; }

.score-detail-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
}
.score-detail-group summary {
  list-style: none;
  cursor: pointer;
}
.score-detail-group summary::-webkit-details-marker { display: none; }

/* Прозрачность расчёта (вкладка SEO Score) */
.score-tz-table {
  border-collapse: collapse;
  width: 100%;
}
.score-tz-table th,
.score-tz-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.score-tz-table thead th {
  background: #f1f5f9;
  font-weight: 600;
  font-size: 0.75rem;
}
.score-tz-k {
  font-size: 0.75rem;
  color: var(--mm-primary-hover);
}
.score-tz-v {
  word-break: break-word;
  font-size: 0.75rem;
  max-width: 48rem;
}
.score-metric-details summary {
  list-style: none;
}
.score-metric-details summary::-webkit-details-marker { display: none; }
.score-cache-pill {
  white-space: nowrap;
}
.score-warn a {
  text-decoration: underline;
}

@media print {
  #score-ring-big { --size: 130px; --thick: 10px; }
  #score-ring-big::after { font-size: 2rem; }
}

.ai-summary {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--mm-primary-light), #f5f3ff);
  border: 1px solid var(--mm-primary-border);
  border-radius: 12px;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.5;
}

/* Карта внимания пациента (3/5/10 сек) */
.attention-block {
  margin: 0 0 14px;
}
.attention-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .attention-grid { grid-template-columns: 1fr; }
}
.att-card {
  position: relative;
  border-radius: 12px;
  padding: 12px 14px 12px 38px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #cbd5e1;
}
.att-card::before {
  content: '👁';
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 16px;
  filter: grayscale(.4);
}
.att-card.att-good    { border-left-color: #16a34a; background: #f0fdf4; }
.att-card.att-good::before { content: '✓'; color: #166534; font-weight: 700; }
.att-card.att-neutral { border-left-color: #94a3b8; }
.att-card.att-bad     { border-left-color: #dc2626; background: #fef2f2; }
.att-card.att-bad::before  { content: '✕'; color: #991b1b; font-weight: 700; }
.att-time {
  font-size: 12px;
  color: var(--mm-primary);
  font-weight: 700;
  margin-bottom: 4px;
}
.att-sees {
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.35;
}
.att-note {
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

/* --- Переключатель режимов --- */
.tab-btn {
  background: transparent;
  color: #475569;
  border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.tab-btn.tab-active {
  background: var(--mm-primary-light);
  color: var(--mm-primary-hover);
  border-color: var(--mm-primary-border);
}

/* --- Site audit: карточка страницы --- */
.site-page {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
.site-page > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  user-select: none;
}
.site-page > summary::-webkit-details-marker { display: none; }
.site-page > summary:hover { background: #f8fafc; }
.site-page .page-score {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: #94a3b8;
}
.site-page .page-score.s-good { background: #16a34a; }
.site-page .page-score.s-ok   { background: #f59e0b; }
.site-page .page-score.s-bad  { background: #dc2626; }
.site-page .page-score.s-pending { background: #cbd5e1; color: #475569; }
.site-page .page-url {
  font-size: 14px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.site-page .page-url .page-url-meta {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.site-page .page-status {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.site-page .page-status.st-done    { background: #dcfce7; color: #166534; }
.site-page .page-status.st-failed  { background: #fee2e2; color: #991b1b; }
.site-page .page-status.st-pending { background: #f1f5f9; color: #475569; }
.site-page .page-toggle {
  font-size: 12px;
  color: var(--mm-primary);
  white-space: nowrap;
}
.site-page[open] > summary .page-toggle::before { content: '▾ '; }
.site-page:not([open]) > summary .page-toggle::before { content: '▸ '; }
.site-page .page-body {
  border-top: 1px solid #e2e8f0;
  padding: 14px;
  background: #f8fafc;
}
/* статусные цвета (status-ok/warn/fail) задают свой фон сами */
.site-page .page-loading {
  font-size: 13px;
  color: #64748b;
}

/* Методика расчёта (техническая спецификация) */
.method-spec .tech-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.method-spec .method-table td,
.method-spec .method-table th {
  vertical-align: top;
}
.method-spec code {
  word-break: break-all;
}

/* ===== Новый формат общего score: «48 из 100» ===== */
.score-big-number {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.score-out-of {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 4px;
}

/* ===== Детальный разбор: группы ===== */
.score-detail-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.score-detail-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: #f8fafc;
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 8px;
}
.score-detail-group > summary::-webkit-details-marker { display: none; }
.score-detail-group > summary::marker { display: none; }
.score-detail-group[open] > summary {
  border-bottom: 1px solid #e2e8f0;
}
.score-detail-group > div {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.score-detail-group[open] > div {
  grid-template-rows: 1fr;
}
.score-detail-group > div > * {
  min-height: 0;
  overflow: hidden;
}
.summary-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.2s;
}
.score-detail-group[open] .summary-chevron {
  transform: rotate(180deg);
}
.summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.group-score-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Детальный разбор: строки метрик ===== */
.metric-row {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.metric-row:last-child {
  border-bottom: none;
}
.metric-score-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
  margin-top: 1px;
}
.metric-progress {
  height: 3px;
  border-radius: 2px;
  background: #e2e8f0;
  margin-top: 7px;
  overflow: hidden;
}
.metric-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.metric-help-btn {
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.metric-help-text {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  line-height: 1.5;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}
.metric-help-text.metric-help-open {
  max-height: 600px;
  opacity: 1;
  overflow-y: auto;
}

/* copyPreview=1 — все варианты A/B/C без внутреннего скролла */
.copy-preview-all .metric-help-text,
.copy-preview-all .metric-help-text.metric-help-open {
  max-height: none;
  opacity: 1;
  overflow-y: visible;
}

.seo-divider {
  padding: 12px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--mm-primary-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid #e0e7ff;
  margin-top: 8px;
}

.term-tip {
  border-bottom: 1px dashed #94a3b8;
  cursor: help;
}

/* ===== Сравнительная таблица ===== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th,
.compare-table td {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.compare-table .group-row td {
  background: #f1f5f9;
  font-weight: 600;
  font-size: 13px;
}
.compare-table .best-cell {
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
}
.compare-table .score-cell {
  font-weight: 600;
  white-space: nowrap;
}
.compare-domain-header {
  max-width: 160px;
  word-break: break-all;
  font-size: 13px;
}
.compare-domain-header .your-badge {
  display: inline-block;
  font-size: 10px;
  background: #e0e7ff;
  color: var(--mm-primary-hover);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
  font-weight: 600;
}
.compare-loading-row td {
  color: #64748b;
  font-style: italic;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Score loading stage icons (SVG only) ===== */

.stage-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@keyframes score-icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stage-icon--spin {
  transform-origin: 50% 50%;
  animation: score-icon-spin 0.9s linear infinite;
  will-change: transform;
}

.score-stage-row {
  transition: color 0.25s ease;
}

.score-stage-row .stage-label {
  line-height: 1.35;
}

/* ── Copy Preview Mode ──────────────────────────────────────────────── */

.copy-preview-banner {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 12px;
}

.copy-variant-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
}

.copy-variant-current {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.copy-variant-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  display: inline-block;
}

.copy-variant-label--current {
  background: #f1f5f9;
  color: #64748b;
}

.copy-variant--a .copy-variant-label {
  background: #dbeafe;
  color: #1e40af;
}

.copy-variant--b .copy-variant-label {
  background: #dcfce7;
  color: #166534;
}

.copy-variant--c .copy-variant-label {
  background: #fdf4ff;
  color: #7e22ce;
}

.copy-variant-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}

.copy-variant-badge--a { background: #dbeafe; color: #1e40af; }
.copy-variant-badge--b { background: #dcfce7; color: #166534; }
.copy-variant-badge--c { background: #fdf4ff; color: #7e22ce; }

/* KPI-карточки с кнопкой «?» */
.kpi-help-btn {
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
}
#score-key-metrics .bg-slate-50 {
  position: relative;
}
.kpi-help-text {
  line-height: 1.5;
}
.kpi-help-text.hidden {
  display: none;
}

/* Дисклеймер о боте */
.score-audit-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #78350f;
  line-height: 1.5;
}
.score-audit-disclaimer svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #d97706;
}

/* Анимация точек загрузки */
@keyframes stage-dots-anim {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}
.stage-dots::after {
  content: '';
  display: inline-block;
  animation: stage-dots-anim 1.4s steps(1, end) infinite;
  min-width: 18px;
  text-align: left;
}
