/* Отдельные страницы и мелкие блоки: шапка проекта, графики, модальные окна.

   Часть общего набора стилей. Файлы подключаются по порядку номеров
   и вместе дают то же, что прежний единый style.css: порядок правил
   не менялся, иначе поехал бы каскад. */
/* ---------- Служебные состояния: ошибки и пустые экраны ---------- */
.err-page {
  max-width: 34rem; margin: 4rem auto 5rem; text-align: center;
}
.err-art { width: min(17rem, 60vw); height: auto; margin: 0 auto 0.5rem; display: block; }
.err-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; letter-spacing: -0.025em; margin: 0 0 0.6rem; }
.err-text { color: var(--gray-500); font-size: 1rem; line-height: 1.55; margin: 0 0 1.6rem; }
.err-actions { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; }
.err-hint { color: var(--gray-400); font-size: 0.85rem; margin-top: 1.4rem; }

/* Пустое состояние раздела: иллюстрация + короткое объяснение + действие */
.empty-state {
  text-align: center; padding: 2.6rem 1.5rem 3rem;
  background: var(--color-gray); border-radius: var(--radius-lg);
  margin-top: 14px;
}
.empty-state img { width: min(11rem, 46vw); height: auto; margin-bottom: 0.4rem; }
.empty-state-title { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.empty-state-text { color: var(--gray-500); font-size: 0.92rem; line-height: 1.5; max-width: 26rem; margin: 0 auto; }
.empty-state-actions { margin-top: 1.1rem; display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }

/* Вкладки админки */
.admin-tabs { margin: 4px 0 22px; }
.tab .nav-badge { margin-left: 7px; }
.tab.active .nav-badge { background: var(--color-white); color: var(--color-black); }

/* ---------- Хиро-шапка проекта ---------- */
.site-hero {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap;
  padding: 26px 0 6px;
}
.site-hero-kicker {
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: 0.09em;
  margin-bottom: 6px;
}
.site-hero-title {
  font-size: clamp(28px, 3.4vw, 40px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.06; margin: 0 0 12px;
}
.site-hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-gray); color: var(--color-black);
  border-radius: var(--radius-full);
  padding: 7px 14px; font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background-color var(--t-fast);
}
a.chip-pill:hover { background: #E9E9EC; color: var(--color-black); text-decoration: none; }
.chip-pill--mint { background: #DFF9EC; color: #0B7A4B; }
/* Проект на паузе: спокойный янтарь, не тревога, но заметно */
.chip-pill--pause { background: #FDF0D5; color: #8A5A00; }
.site-hero-pause { margin: 8px 0 0; color: var(--color-muted); font-size: 14px; max-width: 62ch; }
/* Свежесть данных проекта: одна строка под названием, устаревшее — янтарём */
.fresh-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px;
  font-size: 12.5px; color: var(--gray-500); }
.fresh-title { font-weight: 600; }
.fresh-item { white-space: nowrap; }
.fresh-item.is-stale { color: #8A5A00; }
.fresh-btn { border: 0; background: var(--color-gray); color: var(--color-black); border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.fresh-btn:hover { background: #E9E9EC; }
.fresh-btn:disabled { opacity: .55; cursor: default; }
.fresh-stage { color: var(--accent); }
.site-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* Топ-3 в таблице позиций — мятная пилюля */
.pos-pill {
  display: inline-block; min-width: 30px; text-align: center;
  background: var(--up-bg); color: var(--up);
  border-radius: var(--radius-full);
  padding: 3px 10px; font-weight: 700;
}
.grid tbody tr { transition: background-color var(--t-fast); }
.grid tbody tr:hover { background: #FAFAFB; }

/* Вкладки проекта липнут под шапкой — навигация всегда под рукой */
.tabs {
  position: sticky; top: 67px; z-index: 40;
  background: var(--color-white);
  padding: 8px 0;
}

/* Отчёт: месяцы-аккордеоны в характере FAQ витрины */
.report-month { border-radius: var(--radius-md); }
.report-month-progress {
  background: #E9F8DA; color: #3D5407;
  border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 12.5px; font-weight: 700;
}

/* Появление карточек при загрузке — как reveal на витрине */
@media (prefers-reduced-motion: no-preference) {
  .nt-reveal {
    opacity: 0; transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nt-reveal.is-in { opacity: 1; transform: none; }
}


/* ==========================================================================
   Кабинет как продолжение витрины: секции — крупные серые плиты,
   карточки внутри — белые, главная цифра — на градиенте.
   Витрина (page-land2) несёт свои секции и сюда не попадает.
   ========================================================================== */
body:not(.page-land2) main.wrap section {
  background: var(--color-gray);
  border-radius: var(--radius-lg);
  padding: 26px 28px 30px;
  margin: 20px 0 24px;
}
body:not(.page-land2) main.wrap section > h2:first-child { margin-top: 0; }
/* Вложенная секция внутри плиты (если встретится) — без второй рамки */
body:not(.page-land2) main.wrap section section { background: transparent; padding: 0; border-radius: 0; }

/* Внутри плиты карточки переворачиваются в белые */
body:not(.page-land2) section .metric { background: var(--color-white); }
body:not(.page-land2) section .metrics > .metric:first-child { background: var(--grad-accent); }
body:not(.page-land2) section table.grid { border-radius: 16px; }
body:not(.page-land2) section .grid th { background: #EDEDEF; }
body:not(.page-land2) section .grid tbody tr:hover { background: #FCFCFD; }
body:not(.page-land2) section .empty-state { background: var(--color-white); }
body:not(.page-land2) section .kw-chip,
body:not(.page-land2) section .chip-pill { background: var(--color-white); }
body:not(.page-land2) section button:not(.btn-primary):not(.toggle):not(.kw-del),
body:not(.page-land2) section .btn-sm:not(.btn-primary) { background: var(--color-white); }
body:not(.page-land2) section input:not([type="checkbox"]),
body:not(.page-land2) section select { background: var(--color-white); }

/* Заголовок списка проектов */
.page-hero-title {
  font-size: clamp(28px, 3.4vw, 40px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.06; margin: 2px 0 0;
}
.page-hero-count {
  display: inline-block; vertical-align: 0.35em;
  background: var(--color-gray); color: var(--gray-500);
  border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700; padding: 4px 12px; margin-left: 6px;
}

/* Живые цифры на карточке проекта */
/* К низу прижимаются только данные-блоки, а не регион-чип пустой карточки */

.site-spark {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin-top: auto; padding-top: 12px; padding-right: 36px;
  border-top: 1px solid #E9E9EC;
}
/* Когда живых цифр нет, к низу прижимается предыдущий блок — стрелке
   оставляем воздух, чтобы она не наезжала на контент */

.site-spark-stat { font-size: 13px; color: var(--gray-500); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.site-spark-stat b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-black); }
.site-spark-line { width: 108px; height: 30px; flex: 0 0 auto; opacity: 0.9; }

/* Полоса прогресса «в топ-10 N из M» */
.prog { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 18px; }
.prog-label { font-size: 14px; color: var(--gray-500); }
.prog-label b { font-size: 16px; color: var(--color-black); }
.prog-bar {
  height: 10px; border-radius: var(--radius-full);
  background: var(--color-white); overflow: hidden;
}
.prog-bar span {
  display: block; height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #35C77B, #A5E24A);
}

/* Пустые состояния с 3D-артом */
.empty-state-art { width: min(180px, 46vw); height: auto; margin: 0 auto 4px; display: block; mix-blend-mode: multiply; }

/* Отчётный график динамики (SVG-область на всю ширину плиты) */
.trend-card { background: var(--color-white); border-radius: 16px; padding: 18px 20px 10px; }
.trend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.trend-title { font-size: 14px; font-weight: 700; }
.trend-note { font-size: 12px; color: var(--gray-400); }
.trend-chart { width: 100%; height: auto; display: block; }

/* ---------- Навигация проекта в шапке ---------- */
.topbar-project {
  display: flex; align-items: center; gap: 4px;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin: 0 14px;
}
.topbar-project::-webkit-scrollbar { display: none; }
.topbar-project .tab {
  flex: 0 0 auto; white-space: nowrap;
  padding: 8px 14px; border-radius: var(--radius-full);
  color: var(--gray-500); font-weight: 600; font-size: 13.5px;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.topbar-project .tab:hover { color: var(--color-black); background: var(--color-gray); text-decoration: none; }
.topbar-project .tab.active { color: var(--color-white); background: var(--color-black); }
.topbar-project .tab .nav-badge { margin-left: 6px; }
@media (max-width: 760px) {
  /* На телефоне навигация проекта — под шапкой, широкой прокруткой */
  .topbar-inner { flex-wrap: wrap; }
  .topbar-project { order: 3; flex-basis: 100%; margin: 2px 0 4px; }
}

/* Полоса подразделов без главного ряда — прижимается к хиро-шапке */





/* ---------- Аудит: сводка, оглавление, фильтр ---------- */
.audit-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-white); border-radius: var(--radius-full);
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--gray-500);
}
.stat-chip b { font-size: 15px; font-weight: 800; color: var(--color-black); }
.stat-chip--fail { background: #FDE7E8; color: #A3242A; } .stat-chip--fail b { color: #A3242A; }
.stat-chip--warn { background: #FFF3D6; color: #6B4E07; } .stat-chip--warn b { color: #6B4E07; }
.stat-chip--ok { background: #DFF9EC; color: #0B7A4B; } .stat-chip--ok b { color: #0B7A4B; }

/* Оглавление страницы — липкая полоса чипов, как категории в медиа */
.page-toc {
  position: sticky; top: 67px; z-index: 35;
  display: flex; gap: 6px; align-items: center;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 10px 0; margin: 4px 0 6px;
  background: var(--color-white);
}
.page-toc::-webkit-scrollbar { display: none; }
.toc-chip {
  flex: 0 0 auto; white-space: nowrap;
  padding: 8px 14px; border-radius: var(--radius-full);
  background: var(--color-gray); color: var(--gray-500);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.toc-chip:hover { color: var(--color-black); background: #E9E9EC; text-decoration: none; }
.toc-chip.active { background: var(--color-black); color: var(--color-white); }

/* Полоса фильтра проверок */
.checks-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin: 30px 0 14px;
}
.checks-title { margin: 0; }
.checks-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip {
  padding: 8px 14px; border-radius: var(--radius-full); border: 0;
  background: var(--color-gray); color: var(--gray-500);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.fchip:hover { background: #E9E9EC; color: var(--color-black); transform: none; }
.fchip.active { background: var(--color-black); color: var(--color-white); }
.fchip--fail.active { background: #A3242A; }
.fchip--warn.active { background: #B7791F; }
.fchip--ok.active { background: #0B7A4B; }

/* Кнопка «показать в норме» внутри группы */
.audit-more {
  margin: 2px 0 4px; width: 100%;
  padding: 11px 16px; border: 0; border-radius: 12px;
  background: transparent; color: var(--gray-500);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.audit-more:hover { background: #ECECEF; color: var(--color-black); transform: none; box-shadow: none; }


/* Фигуры-«стикеры» в заголовках кабинета — как на витрине */
.h-shape { display: inline-block; vertical-align: -0.08em; width: 0.85em; height: 0.85em; margin-left: 0.1em; }

/* Арт в хиро аудита */
.audit-head-art { flex: 0 0 170px; align-self: center; }
.audit-head-art img { width: 170px; height: auto; display: block; mix-blend-mode: multiply; }
@media (max-width: 900px) { .audit-head-art { display: none; } }


/* ---------- Финальные правки аудита ---------- */
/* Хлебная крошка над заголовком проекта */
.site-breadcrumb {
  display: inline-block; margin-bottom: 10px;
  font-size: 13px; font-weight: 600; color: var(--gray-500);
  text-decoration: none;
}
.site-breadcrumb:hover { color: var(--color-black); text-decoration: none; }
/* Правый блок действий: последняя кнопка — главное действие, чёрная */
.site-head-right > :last-child button,
.site-head-right > button:last-child,
.site-head-right > a.btn-sm:last-child {
  background: var(--color-black); color: var(--color-white);
}
.site-head-right > :last-child button:hover,
.site-head-right > button:last-child:hover,
.site-head-right > a.btn-sm:last-child:hover { background: #26262D; color: var(--color-white); }

/* Якоря не ныряют под липкие панели.

   scroll-behavior: smooth здесь стоял глобально на html — и ломал обычную
   прокрутку: колесо и трекпад переставали двигать страницу напрямую, каждое
   движение браузер анимировал и догонял с задержкой. На липкой шапке это
   особенно заметно: она стоит, а содержимое под ней идёт рывками.
   Плавность нужна только при переходе по якорю — её включает скрипт
   в base.html, по клику. */
html { scroll-padding-top: 96px; }
.audit-group, .checks-bar, .pages-section, .niche-card, .plan, .rivals-card { scroll-margin-top: 130px; }

/* Плоский список страниц */
.pages-tools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin: 16px 0 12px;
}
.pages-search {
  flex: 1 1 260px; max-width: 360px;
  border: 1.5px solid #E4E4E8; border-radius: var(--radius-full);
  padding: 10px 18px; font: inherit; font-size: 13.5px;
  background: var(--color-white); color: var(--color-black);
}
.pages-search:focus { outline: none; border-color: var(--accent); }
.pcard-status {
  flex: 0 0 auto; width: 27px; height: 27px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.pcard-status--ok { background: #DFF9EC; color: #0B7A4B; }
.pcard-status--warn { background: #FFF3D6; color: #6B4E07; }
.pcard-status--fail { background: #FDE7E8; color: #A3242A; }
.pcard-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pcard-text .ptree-page-title { font-weight: 600; }
.pcard-text .ptree-page-path { max-width: none; }
.pcard-caret {
  flex: 0 0 auto; color: var(--gray-400); font-size: 12px;
  transition: transform .15s ease;
}
.ptree-page--open > .ptree-page-head .pcard-caret { transform: rotate(180deg); }
.pages-nothing { text-align: center; color: var(--gray-500); padding: 26px 0 10px; font-size: 14px; }

/* Фильтры внутри плит: активная пилюля не должна перекрашиваться белым
   общим правилом секций */
body:not(.page-land2) main.wrap section .fchip.active { background: var(--color-black); color: var(--color-white); }
body:not(.page-land2) main.wrap section .fchip--fail.active { background: #A3242A; color: var(--color-white); }
body:not(.page-land2) main.wrap section .fchip--warn.active { background: #B7791F; color: var(--color-white); }
body:not(.page-land2) main.wrap section .fchip--ok.active { background: #0B7A4B; color: var(--color-white); }

/* ---------- Тайлы оценок PageSpeed ---------- */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.score-tile {
  position: relative;
  border-radius: var(--radius-md);
  padding: 22px 22px 20px;
  background: var(--color-white);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.score-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(16, 24, 40, 0.22); }
.score-tile-num { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.score-tile-cap { margin-top: 8px; font-size: 12px; font-weight: 700; color: inherit; opacity: 0.75; }
.score-tile--good { background: #DFF9EC; color: #0B7A4B; }
.score-tile--average { background: #FFF3D6; color: #6B4E07; }
.score-tile--poor { background: #FDE7E8; color: #A3242A; }
.score-tile--none { background: var(--color-white); color: var(--gray-400); }
.score-tile .info-tip-corner { opacity: 0.6; }

/* Сетки метрик без градиентной первой карточки (CWV и подобные ряды) */
body:not(.page-land2) section .metrics--flat > .metric:first-child { background: var(--color-white); }
.metrics--flat > .metric:first-child .metric-title { color: var(--gray-400); }
.metrics--flat > .metric:first-child .metric-value { color: inherit; }
.metrics--flat > .metric:first-child .prev { color: var(--gray-400); }


/* ---------- Глубокая проработка: ссылки, бизнес, точки роста, вебмастер ---------- */
/* Карточки документов внутри плит — белые, чтобы не сливались с фоном секции */
body:not(.page-land2) main.wrap section .s-card { background: var(--color-white); border: 0; }

/* Каннибализация: фразы — карточки, адреса — чипы */
.cannibal-row {
  background: var(--color-white); border-radius: 14px;
  padding: 14px 18px; border-bottom: 0; margin-bottom: 8px;
}
.cannibal-urls { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.cannibal-urls li {
  background: var(--color-gray); border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; line-height: 1.4;
}
.cannibal-urls li a { color: var(--gray-600); }

/* Оценка → возможная оценка: цифры крупнее */
.score-move-num { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }

/* Карточка организации на градиенте: белые цифры и кнопки-пилюли */
.org-card .org-stat-num { color: var(--color-white); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.org-card .org-stat-cap { color: rgba(255, 255, 255, 0.7); }
.org-card .org-link {
  display: inline-flex; align-items: center;
  background: var(--color-white); color: var(--color-black);
  border-radius: var(--radius-full); padding: 10px 18px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.org-card .org-link:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -14px rgba(0,0,0,0.4); color: var(--color-black); }
.org-card .org-link--ghost {
  background: rgba(255, 255, 255, 0.16); color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.org-card .org-link--ghost:hover { background: rgba(255, 255, 255, 0.26); color: var(--color-white); }
.org-card .org-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.org-card .org-footer { border-top: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.75); }
.org-card .org-source a { color: var(--color-white); }
.org-card .org-edit { background: rgba(255,255,255,0.14); color: var(--color-white); border: 0; }

/* Карточка организации: плитки и служебные кнопки на градиенте */
body:not(.page-land2) main.wrap section.org-card .org-stat {
  background: rgba(255, 255, 255, 0.16); border-radius: 14px; padding: 12px 16px;
}
body:not(.page-land2) main.wrap section.org-card .org-stat-cap { color: rgba(255, 255, 255, 0.75); }
body:not(.page-land2) main.wrap section.org-card .org-edit,
body:not(.page-land2) main.wrap section.org-card button.org-edit {
  background: rgba(255, 255, 255, 0.16); color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--radius-full);
}
body:not(.page-land2) main.wrap section.org-card .org-footer,
body:not(.page-land2) main.wrap section.org-card .org-source { color: rgba(255, 255, 255, 0.8); }


/* ---------- Стратегия и отчёт: доводка до уровня аудита ---------- */
/* Наблюдение модели — плашка с фиолетовым кикером вместо пунктирной рамки */
.s-insight {
  border: 0 !important; background: #F6F6F8; border-radius: 14px;
  padding: 14px 18px !important;
}
.s-insight-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--accent-2);
}
.s-insight p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--gray-600); }

/* Черновик стратегии — янтарная служебная плашка */
.s-draft { background: #FFF3D6 !important; border: 0 !important; border-radius: var(--radius-lg); }
.s-draft-title { color: #6B4E07; }

/* Статусы кластеров — пилюли по смыслу */
.s-status {
  display: inline-block; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 11px; white-space: nowrap;
}
.s-status--work { background: #E3EBFE; color: #2F55C8; }
.s-status--good { background: #DFF9EC; color: #0B7A4B; }
.s-status--idle { background: #EEF0F3; color: var(--gray-500); }

/* Отчёт: задачи — карточки со статус-тайлами */
.report-task {
  background: var(--color-white); border-radius: 12px;
  padding: 12px 14px;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.report-task:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(16, 24, 40, 0.22); }
.report-task-status {
  width: 26px; height: 26px; border-radius: 9px; font-size: 13px; font-weight: 800;
}
.report-task.done .report-task-status { background: #DFF9EC; color: #0B7A4B; }
.report-task.pending .report-task-status { background: #FFF3D6; color: #6B4E07; }
.report-task.done .report-task-badge, .report-task.done .report-task-badge-btn { background: #DFF9EC; color: #0B7A4B; }
.report-task.pending .report-task-badge, .report-task.pending .report-task-badge-btn { background: #FFF3D6; color: #6B4E07; }
.report-task-badge { padding: 5px 12px; font-size: 11.5px; }

/* Шапка месяца: тонкий прогресс под строкой */
.report-month-head { flex-wrap: wrap; }
.report-month-bar {
  flex-basis: 100%; height: 6px; margin-top: 10px;
  border-radius: 999px; background: #EEF0F3; overflow: hidden;
}
.report-month-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #35C77B, #A5E24A);
}

/* Форма нового месяца — плита */
.report-add {
  background: var(--color-gray); border-radius: var(--radius-lg);
  padding: 16px 18px; align-items: center;
}
.report-add-label { font-size: 13.5px; font-weight: 700; margin-right: 4px; }
.report-add input, .report-add select { background: var(--color-white); }


/* ---------- Финальный вид таблиц данных ---------- */
body:not(.page-land2) section .grid th { background: transparent; }
.grid th .info-icon { width: 13px; height: 13px; font-size: 9px; opacity: 0.55; }
.grid th .info-tip:hover .info-icon { opacity: 1; }
.grid tbody tr:last-child td { border-bottom: 0; }
/* Выпадающий выбор месяца сравнения в заголовке — тихая пилюля */
.th-select {
  border: 0 !important; background: var(--color-gray) !important;
  border-radius: 999px !important; padding: 5px 10px !important;
  font-size: 11px !important; font-weight: 700; color: var(--gray-600) !important;
  text-transform: none; letter-spacing: 0;
}

/* Индикатор неопределённой загрузки (Директ и подобные) */
.load-indeterminate span {
  width: 40% !important;
  animation: loadSlide 1.2s ease-in-out infinite;
}
@keyframes loadSlide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

/* Редактор списка площадок */
.registry-edit input {
  width: 100%; border: 0; background: var(--color-gray);
  border-radius: 9px; padding: 9px 12px; font: inherit; font-size: 13px;
}
.registry-edit input:focus { outline: 2px solid var(--accent); outline-offset: 0; background: var(--color-white); }
.registry-edit td { padding: 6px 6px; border-bottom: 0; }
.registry-edit th { border-bottom: 1.5px solid #E9E9EC; }

/* ---------- Точечные правки по замечаниям ---------- */
/* Онбординг «Бесплатный аудит»: поля в системе */
.onboard input[name="host"], .onboard select {
  border: 1.5px solid #E4E4E8; border-radius: 999px;
  padding: 11px 18px; font-size: 14px;
}
.onboard input[name="host"]:focus { outline: none; border-color: var(--accent); }
.onboard button[type="submit"] { background: var(--color-black); color: var(--color-white); }
.onboard button[type="submit"]:hover { background: #26262D; }

/* Переключатель вида проектов — иконки строго по центру */
.view-switch { display: inline-flex; gap: 4px; }
.view-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0; border-radius: 10px;
}
.view-btn svg { width: 16px; height: 16px; display: block; }

/* Фильтр «чьи проекты» — воздух между пилюлями и группами */
.owner-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 20px; }
.owner-chip { margin: 0; }

/* Плитка проектов: фиксированные зоны, чтобы ряд не «плясал» */
.site-name { min-height: 0; }
.site-card .site-region { margin-bottom: 2px; }
.site-billing { min-height: 0; }

/* Отчёт: формы месяца не рассыпаются */
.report-month-body .row-form {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.report-month-body .row-form input[name="text"] { flex: 1 1 260px; min-width: 200px; }
.report-month-body .inline { margin-top: 10px; }

/* Полоса загрузки Директа — в пределах разумной ширины, не через всю плиту */
#direct-live .load-bar { max-width: 420px; }


/* ---------- Единая шапка: витрина и кабинет — один и тот же блок ---------- */
/* Обёртка меню на десктопе «растворяется»: её дети остаются во flex-строке шапки.
   Правило под min-width, иначе оно перебивало бы мобильную панель бургера,
   объявленную выше по файлу. */
@media (min-width: 1001px) { .topbar-menu { display: contents; } }
.topbar { padding: 0; }
.topbar-inner { max-width: 87.5rem; padding: 15px 1.5rem; }
.brand-text { font-size: 22px; }
@media (max-width: 760px) {
  .topbar { padding: 0; }
  .topbar-inner { padding: 12px 1rem; }
  .brand-text { font-size: 19px; }
}

/* Плашка состояния при сборке PDF */
.pdf-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 80; min-width: min(360px, calc(100vw - 32px));
  background: var(--color-black); color: var(--color-white);
  border-radius: var(--radius-md); padding: 14px 20px 12px;
  box-shadow: 0 20px 46px -20px rgba(0, 0, 0, 0.55);
}
.pdf-toast-text { font-size: 13.5px; font-weight: 600; }
.pdf-toast .load-bar { background: rgba(255, 255, 255, 0.18); margin-top: 10px; }

/* ---------- Единый индикатор фоновых операций ----------
   Обход сайта, сбор позиций, Метрика, Page Speed, разведка конкурентов и сборка
   PDF раньше показывали ход каждая по-своему и в своём месте страницы. Теперь
   это одна плашка внизу экрана: видно из любой точки, ничего не сдвигает. */
.pdf-toast,
.collect-progress,
.audit-progress,
.scout-progress {
  /* top/right сбрасываем явно: у прежних версий этих блоков были свои
     top (sticky под шапкой) и right, и вместе с bottom плашка растягивалась
     на всю высоту экрана */
  position: fixed; top: auto; right: auto;
  left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 80; width: min(460px, calc(100vw - 32px));
  background: var(--color-black); color: var(--color-white);
  border: 0; border-radius: var(--radius-md);
  padding: 14px 20px 12px;
  box-shadow: 0 20px 46px -20px rgba(0, 0, 0, 0.55);
  margin: 0;
}
.collect-progress-top,
.audit-progress-top,
.scout-stage {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--color-white);
}
.collect-progress-count,
.audit-progress-count { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.7); }
.audit-progress-note,
.collect-progress p.muted,
.collect-progress .muted {
  color: rgba(255,255,255,0.7) !important; font-size: 12px; margin: 8px 0 0;
}
/* Дорожки полос — на тёмном фоне */
.pdf-toast .load-bar,
.collect-progress .load-bar,
.scout-progress .load-bar,
.audit-progress-track {
  background: rgba(255, 255, 255, 0.18);
  height: 4px; border-radius: 999px; margin-top: 10px; overflow: hidden;
}
.audit-progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #35C77B, #A5E24A);
  transition: width .3s ease;
}
/* Панель Метрики поверх блока больше не нужна — она тоже плашка */
.collect-progress--over { position: fixed; top: auto; right: auto; }

/* ---------- Управление списком проектов ---------- */
.list-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 6px 0 20px;
}
.list-controls .owner-switch { margin: 0; }
.list-controls .view-switch { margin-left: auto; }

/* Скелет блока, пока данные едут из API (Реклама, Метрика) */
.direct-skeleton, .block-skeleton { display: grid; gap: 12px; }
.direct-skeleton span, .block-skeleton span {
  display: block; height: 74px; border-radius: var(--radius-md);
  background: linear-gradient(90deg, #F0F0F2 25%, #E7E7EA 37%, #F0F0F2 63%);
  background-size: 400% 100%;
  animation: skeletonSlide 1.4s ease-in-out infinite;
}
.direct-skeleton span:nth-child(2), .block-skeleton span:nth-child(2) { height: 180px; }
.direct-skeleton span:nth-child(3), .block-skeleton span:nth-child(3) { height: 120px; }
@keyframes skeletonSlide { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Кнопки вида — одной высоты с чипами фильтра, чтобы строка читалась как одна */
.list-controls .owner-chip { min-height: 38px; }
.list-controls .view-btn { width: 38px; height: 38px; }


/* ---------- Плитка проекта: детали и адаптив ---------- */
.site-card .site-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.site-card .site-spark-line { width: 100%; height: 26px; opacity: 0.85; }
.site-card .site-billing { margin: 0; }
.site-card .site-direct { margin: 0; }
.site-state { z-index: 2; }
/* На тач-экранах наведения нет — показываем всё сразу */
@media (hover: none) {
  .site-card { min-height: 0; }
  .site-face { min-height: 0; padding: 22px 20px 4px; }
  .site-info {
    position: static; transform: none; box-shadow: none; background: transparent;
    padding: 0 20px 18px;
  }
  .site-card:hover .site-face { transform: none; opacity: 1; }
}


/* ---------- Плитка при наведении: содержимое на градиенте ---------- */
.site-info .chip-pill {
  background: rgba(255, 255, 255, 0.6); color: #16210A;
}
.site-info .chip-pill--mint { background: #16210A; color: #D7F97E; }
.site-info .site-billing { border: 0; }
.site-info .site-billing-sum { color: #16210A; }
.site-info .site-billing-sum span,
.site-info .site-billing-meta,
.site-info .site-billing-services,
.site-info .site-billing-date { color: rgba(22, 33, 10, 0.66); }
.site-info .site-direct { color: rgba(22, 33, 10, 0.9); }
.site-info .site-direct-label { color: rgba(22, 33, 10, 0.6); }
.site-info .site-direct b { color: #16210A; }
.site-info .site-direct-skeleton { background: rgba(22, 33, 10, 0.18); }
.site-info .site-spark-line { opacity: 1; }
.site-info .site-spark-line polyline { stroke: #16210A; }
.site-info-title i { color: rgba(22, 33, 10, 0.66); }
.site-open {
  margin-top: auto; align-self: flex-start;
  background: #16210A; color: #D7F97E;
  border-radius: var(--radius-full); padding: 8px 15px;
}
/* Иконка на лице плитки крупная, название под ней */
.site-face .site-name { font-size: 19px; }


/* ---------- Шапка уходит в бургер, когда меню перестаёт помещаться ----------
   Порог задаёт не медиазапрос, а факт: скрипт меряет строку и ставит .is-compact.
   Ширина меню зависит от числа проектов и длины почты, поэтому фиксированный
   брейкпоинт всегда где-то ошибался — пункты обрезались. */
.topbar.is-compact .nav-toggle { display: flex; }
.topbar.is-compact .topbar-menu {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column; align-items: stretch; gap: 2px;
  background: var(--color-white);
  padding: 10px 20px 16px; box-shadow: 0 18px 40px -22px rgba(16, 24, 40, 0.35);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  max-height: calc(100vh - 64px); overflow-y: auto;
}
.topbar.is-compact .topbar-menu.open { display: flex; }
.topbar.is-compact .topbar-project {
  order: 0; flex: 0 0 auto; margin: 0 0 8px;
  flex-direction: column; align-items: stretch; overflow: visible;
  padding-bottom: 8px; border-bottom: 1px solid #F0F0F2;
}
.topbar.is-compact .topbar-project .tab { width: 100%; text-align: left; padding: 11px 14px; font-size: 15px; }
.topbar.is-compact #site-nav {
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  position: static; background: none; border: 0; padding: 0; box-shadow: none;
}
.topbar.is-compact #site-nav .who { padding: 6px 14px; font-size: 13px; }
.topbar.is-compact #site-nav .btn-sm { width: 100%; justify-content: center; }


/* Метрики и карточки вне плит: серое на белом почти не читается,
   поэтому за пределами секции добавляем им контур */
body:not(.page-land2) main.wrap > .metrics > .metric,
body:not(.page-land2) main.wrap > .s-card {
  box-shadow: inset 0 0 0 1px #ECECEF;
}
body:not(.page-land2) main.wrap > .metrics > .metric:first-child { box-shadow: none; }
/* Описания в парах «подпись — текст» не жмём в узкую колонку */
.s-facts dd { max-width: 92ch; }


/* Ряд метрик и следующий за ним блок слипались вплотную — разводим */
.metrics + .s-card,
.metrics + .table-scroll,
.metrics + table.grid,
.metrics + .trend-card,
.metrics + .audit-group { margin-top: 18px; }


/* ---------- Плитка: слой-ссылка и закрепление ---------- */
/* Кликается вся плитка, но внутри есть своя кнопка, поэтому ссылка —
   отдельный прозрачный слой поверх содержимого, а не обёртка над ним. */
.site-cover {
  position: absolute; inset: 0; z-index: 3;
  border-radius: inherit; text-indent: -9999px; overflow: hidden;
}
.site-cover:focus-visible { outline: 2px solid var(--color-blue); outline-offset: 2px; }

.site-pin {
  display: none; z-index: 4;
  width: 30px; height: 30px; padding: 0;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  border-radius: var(--radius-full); color: var(--gray-300);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.site-pin svg { width: 15px; height: 15px; fill: currentColor; display: block; }
.site-pin:hover { color: var(--color-black); background: var(--color-gray); }
.site-pin[aria-pressed="true"] { color: var(--color-black); }
/* Скрепка нужна там, где есть чем управлять — в длинном списке.
   На плитке порядок и так виден глазами. */
[data-cards="list"] .site-pin { display: flex; }
[data-cards="list"] .site-card.is-pinned { box-shadow: inset 3px 0 0 var(--color-black); }


/* ---------- Колокольчик: длинные работы и их итоги ---------- */
.bell-wrap { position: relative; display: inline-flex; }
.bell {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: none; border: 0; cursor: pointer;
  border-radius: var(--radius-full); color: var(--gray-400);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.bell:hover, .bell[aria-expanded="true"] { color: var(--color-black); background: var(--color-gray); }
.bell svg { width: 19px; height: 19px; fill: currentColor; display: block; }
/* Точка, а не число: точное количество непрочитанного здесь ничего
   не решает, а место в шапке дорогое */
.bell-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-blue); border: 2px solid var(--color-white);
}
/* Иконка сводки — той же формы и размера, что колокольчик: шапка не должна
   расти от каждого нового пункта. Красная точка — есть сломавшийся проект. */
.topbar-icons { display: inline-flex; align-items: center; gap: 2px; }
.digest-link { text-decoration: none; }
.digest-link svg { fill: none; }
.digest-dot { background: #E4646C; }
.bell-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 90;
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--color-white); border-radius: var(--radius-md);
  box-shadow: 0 24px 60px -24px rgba(16, 24, 40, 0.4);
  padding: 8px;
}
.bell-empty { margin: 0; padding: 18px 12px; color: var(--gray-400); font-size: 13.5px; }
.bell-run { padding: 12px 12px 14px; border-radius: var(--radius-sm); background: var(--color-gray); }
.bell-run-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bell-run-top b { font-size: 14px; }
.bell-run-top span { font-size: 12.5px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.bell-run .load-bar { margin: 9px 0 8px; }
.bell-run-note { font-size: 12.5px; line-height: 1.4; color: var(--gray-500); }
.bell-item { padding: 11px 12px; border-radius: var(--radius-sm); }
.bell-item + .bell-item { border-top: 1px solid var(--color-border); border-radius: 0; }
.bell-item.is-new { background: rgba(61, 109, 235, 0.06); }
.bell-item-title { font-size: 13.5px; font-weight: 600; }
.bell-item-text { font-size: 12.5px; line-height: 1.45; color: var(--gray-500); margin-top: 3px; }
.bell-item-at { font-size: 11.5px; color: var(--gray-400); margin-top: 5px; }

/* Разбор падения в сводке: сворачиваемый, чтобы не вытеснять сами сигналы */
.drop-analysis { margin-top: 12px; padding: 14px 16px; background: var(--color-white); border-radius: 14px; }
.drop-analysis > summary { cursor: pointer; list-style: none; font-size: 14px; line-height: 1.6; }
.drop-analysis > summary::-webkit-details-marker { display: none; }
.drop-summary { display: block; margin-top: 4px; color: var(--gray-500); font-size: 13.5px; }
.drop-hyps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.drop-hyp-title { font-weight: 700; font-size: 14px; }
.drop-conf { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--color-gray); color: var(--gray-500); }
.drop-conf--high { background: #FDE7E8; color: #A3242A; }
.drop-conf--medium { background: #FFF3D6; color: #6B4E07; }
.drop-facts { margin-top: 3px; font-size: 12px; color: var(--gray-400); }
.drop-facts span { margin-right: 4px; cursor: help; border-bottom: 1px dotted currentColor; }
.drop-fact-list { margin-top: 12px; font-size: 12.5px; color: var(--gray-500); }
.drop-fact-list summary { cursor: pointer; font-weight: 600; }
.drop-fact-list ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; line-height: 1.5; }

/* ---------- Нейросети ---------- */
/* Рассказ об услуге — фирменная градиентная плашка, как блок разработки на витрине */
body main.wrap section.geo-promo {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  border-radius: var(--radius-lg); overflow: hidden; background: var(--grad-accent); color: #fff;
  padding: 0 !important;
}
.geo-promo-main { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.geo-promo-eyebrow {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #2A3B06; background: #C6F26E;
  border-radius: var(--radius-full); padding: 5px 12px;
}
.geo-promo-title { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; color: #fff; }
.geo-promo-lead { margin: 0; max-width: 34rem; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.88); }
.geo-promo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 6px; }
.geo-promo-btn {
  background: #fff; color: var(--color-black); border: 0; border-radius: var(--radius-full);
  padding: 13px 26px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform var(--t-fast, .15s);
}
.geo-promo-btn:hover { transform: translateY(-1px); }
.geo-promo-note { font-size: 13px; color: rgba(255, 255, 255, 0.75); max-width: 28rem; }
.geo-contact { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.geo-contact-title { font-weight: 700; font-size: 15px; }
.geo-msg { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.geo-msg img { width: 26px; height: 26px; }
a.geo-promo-btn:hover { color: var(--color-black); text-decoration: none; }
body main.wrap section.geo-promo .geo-promo-link {
  background: none !important; color: #fff; padding: 0; font-size: 14px; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px; border-radius: 0;
}
body main.wrap section.geo-promo .geo-promo-link:hover { transform: none; opacity: .85; }
body main.wrap section.geo-promo .geo-promo-btn { background: #fff !important; }
.btn-primary.btn-grad { background: var(--grad-accent) !important; color: #fff; }
.btn-primary.btn-grad:hover { background: var(--grad-accent); filter: brightness(1.07); color: #fff; }
.geo-bottom-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.geo-promo-sent {
  align-self: flex-start; background: rgba(255, 255, 255, 0.16); border-radius: var(--radius-md);
  padding: 12px 18px; font-weight: 600;
}
.geo-promo-art { position: relative; min-height: 280px; }
.geo-promo-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
          mask-image: linear-gradient(to right, transparent 0, #000 22%);
}
body main.wrap section.geo-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; background: none; padding: 0; }
.geo-point {
  background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.geo-point img { width: 64px; height: 64px; mix-blend-mode: multiply; margin-bottom: 6px; }
.geo-point b { font-size: 15px; line-height: 1.3; }
.geo-point p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--gray-500); }
.geo-example-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 10px; }
.geo-example-head h2 { margin: 0; }
.geo-example-tag {
  font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-bg);
  border-radius: var(--radius-full); padding: 4px 12px;
}
.geo-example {
  border: 2px dashed var(--panel-accent-border); border-radius: var(--radius-lg);
  padding: 4px 18px; background: var(--panel-accent);
}
body main.wrap section.geo-promo-bottom { text-align: center; background: var(--panel-accent); }
.geo-promo-bottom p { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
body main.wrap section.geo-admin { margin-top: 36px; border: 1px dashed var(--gray-300); }

.geo-date { margin: 10px 0 0; font-size: 13px; }
.geo-bars { display: flex; align-items: flex-end; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.geo-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; }
.geo-bar-track {
  position: relative; width: 28px; height: 120px; background: var(--color-gray);
  border-radius: 8px; overflow: hidden;
}
.geo-bar-track span { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px 8px 0 0; }
.geo-bar-ment { background: rgba(123, 91, 250, 0.25); }
.geo-bar-cite { background: var(--grad-accent); }
.geo-bar b { font-size: 13px; }
.geo-bar small { font-size: 11px; color: var(--gray-400); }
.geo-legend { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.geo-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.geo-dot--cite { background: var(--accent); margin-left: 0; }
.geo-dot--ment { background: rgba(123, 91, 250, 0.3); }

.geo-questions { display: flex; flex-direction: column; gap: 8px; }
.geo-q { background: var(--color-white); border: 1px solid var(--color-border); border-radius: 14px; }
.geo-q > summary {
  list-style: none; cursor: pointer; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.geo-q > summary::-webkit-details-marker { display: none; }
.geo-q-text { font-weight: 600; flex: 1 1 20rem; }
.geo-q-states { display: flex; gap: 6px; flex-wrap: wrap; }
.geo-state { font-size: 12px; font-weight: 700; border-radius: var(--radius-full); padding: 4px 10px; white-space: nowrap; }
.geo-state--cite { background: var(--up-bg); color: var(--up); }
.geo-state--ment { background: var(--accent-bg); color: var(--accent); }
.geo-state--no { background: var(--down-bg); color: var(--down); }
.geo-state--none { background: var(--flat-bg); color: var(--flat); }
.geo-answer { padding: 0 16px 14px; }
.geo-answer-engine { font-weight: 700; margin: 6px 0; }
.geo-answer-text {
  white-space: pre-wrap; font-size: 14px; line-height: 1.55; background: var(--color-gray);
  border-radius: 12px; padding: 12px 14px;
}
.geo-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 12px; }
.geo-src { background: var(--color-gray); border-radius: var(--radius-full); padding: 3px 10px; }
.geo-src--own { background: var(--up-bg); color: var(--up); font-weight: 700; }
.geo-rivals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.geo-rivals h3 { margin: 0 0 4px; }
.geo-ready { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.geo-ready li {
  border-radius: 14px; padding: 12px 14px 12px 40px; position: relative;
  background: var(--color-white); border: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: 4px; font-size: 13px;
}
.geo-ready li span { color: var(--gray-500); line-height: 1.5; }
.geo-ready li::before {
  position: absolute; left: 14px; top: 12px; font-weight: 800; font-size: 15px;
}
.geo-ready li.is-ok::before { content: "✓"; color: var(--up); }
.geo-ready li.is-bad::before { content: "!"; color: var(--down); }
.geo-traffic { display: flex; flex-direction: column; gap: 8px; max-width: 34rem; }
.geo-traffic-row { display: grid; grid-template-columns: 7rem 1fr 3rem; align-items: center; gap: 10px; }
.geo-traffic-bar { height: 10px; background: var(--color-gray); border-radius: 6px; overflow: hidden; }
.geo-traffic-bar i { display: block; height: 100%; background: var(--grad-accent); }
.geo-traffic-row b { text-align: right; }
.geo-manage-actions { margin: 8px 0 12px; }
.geo-manage-btns { white-space: nowrap; }
.geo-add { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; max-width: 40rem; }
.geo-add textarea { width: 100%; box-sizing: border-box; }
.geo-add button { align-self: flex-start; }

@media (max-width: 900px) {
  body main.wrap section.geo-promo { grid-template-columns: 1fr; }
  .geo-promo-art { min-height: 200px; order: -1; }
  .geo-promo-art img { -webkit-mask-image: linear-gradient(to top, transparent 0, #000 30%);
                               mask-image: linear-gradient(to top, transparent 0, #000 30%); }
  body main.wrap section.geo-points { grid-template-columns: repeat(2, 1fr); }
  .geo-rivals, .geo-ready { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body main.wrap section.geo-points { grid-template-columns: 1fr; }
  .geo-example { padding: 2px 6px; }
  body main.wrap .geo-example section { padding-left: 14px; padding-right: 14px; }
  .geo-traffic-row { grid-template-columns: 5.5rem 1fr 2.5rem; }
}

/* Нижний призыв на рассказе об услуге — та же плашка, что наверху,
   чтобы белые кнопки с иконками смотрелись одинаково */
body main.wrap section.geo-promo-bottom { background: var(--grad-accent); color: #fff; }
.geo-promo-bottom p { color: #fff; }

/* Подвкладка «Нейросети» — разноцветная, с медленным переливом:
   новая услуга должна бросаться в глаза среди позиций */
.subtab.subtab--geo {
  color: #fff;
  background: linear-gradient(100deg, #4F7DF9 0%, #7B5BFA 30%, #C05BFA 55%, #3FC6A0 80%, #4F7DF9 100%);
  background-size: 250% 100%;
  animation: subtab-geo-flow 6s linear infinite;
  box-shadow: 0 6px 16px -8px rgba(123, 91, 250, 0.7);
}
.subtab.subtab--geo:hover { color: #fff; background: linear-gradient(100deg, #4F7DF9 0%, #7B5BFA 30%, #C05BFA 55%, #3FC6A0 80%, #4F7DF9 100%); background-size: 250% 100%; filter: brightness(1.08); }
.subtab.subtab--geo.active { color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-black); }
@keyframes subtab-geo-flow { from { background-position: 0% 0; } to { background-position: 250% 0; } }
@media (prefers-reduced-motion: reduce) { .subtab.subtab--geo { animation: none; } }

/* ---------- Кто ведёт проект ---------- */
.spec-card {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--panel-accent); border: 1px solid var(--panel-accent-border);
  border-radius: var(--radius-lg); padding: 18px 22px; margin: 0 0 18px;
}
.spec-ava {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 64px;
  box-shadow: 0 0 0 3px #fff, 0 8px 20px -10px rgba(79, 125, 249, .7);
}
.spec-ava--letter, .spec-chip-ava--letter {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-accent); color: #fff; font-weight: 800;
}
.spec-ava--letter { font-size: 26px; }
.spec-body { flex: 1 1 20rem; min-width: 0; }
.spec-hello { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.spec-text { margin: 4px 0 0; color: var(--gray-500); font-size: 14px; line-height: 1.5; }
.spec-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.spec-msg {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  background: #fff; color: var(--color-black); font-weight: 700; font-size: 14px;
  border-radius: var(--radius-full); padding: 8px 16px 8px 10px;
  box-shadow: 0 6px 16px -10px rgba(16, 24, 40, .35);
  transition: transform var(--t-fast, .15s);
}
.spec-msg:hover { transform: translateY(-1px); text-decoration: none; color: var(--color-black); }
.spec-msg img { width: 22px; height: 22px; }
.spec-msg--sm { padding: 5px; }
.spec-msg--sm img { width: 20px; height: 20px; }
.spec-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--color-gray); border-radius: var(--radius-full); padding: 5px 6px 5px 5px;
}
.spec-chip-ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: 0 0 36px; }
.spec-chip-ava--letter { font-size: 15px; }
.spec-chip-text { display: flex; flex-direction: column; line-height: 1.2; margin-right: 4px; }
.spec-chip-text span { font-size: 11px; color: var(--gray-400); }
.spec-chip-text b { font-size: 13px; }
.spec-admin { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .spec-card { padding: 16px; }
  .spec-actions { width: 100%; }
}

/* ---------- Актуальность ядра ---------- */
.core-form { margin-top: 10px; }
.core-table .cell-check { width: 34px; }
.core-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.core-ready td { background: rgba(16, 185, 129, 0.08); }
.core-mismatch td { background: rgba(255, 216, 77, 0.16); }

/* ---------- Вопросы к заказчику ---------- */
/* Поля — те же, что в формах кабинета (.row-form): мягкая рамка, скругление,
   акцентная подсветка при фокусе. Без этого браузер рисовал свои серые поля */
/* Поля — как в редакторе разделов стратегии (.st-edit-form): соседняя вкладка
   того же раздела, и формы на них должны выглядеть одинаково */
.qa-field {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 13.5px;
  line-height: 1.55; color: var(--color-black); background: var(--color-white);
  border: 1px solid var(--color-border); border-radius: 12px; resize: vertical;
}
.qa-field:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
.qa-field--short { width: 220px; max-width: 100%; }
.qa-form { display: flex; flex-direction: column; gap: 8px; }
.qa-form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qa-label { font-size: 12.5px; font-weight: 700; }

body main.wrap section.qa-list { background: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
/* Карточка — как секции других вкладок: серая плита, белое внутри */
.qa-item {
  background: var(--color-gray); border-radius: var(--radius-lg); padding: 20px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.qa-item.is-hidden .qa-text { color: var(--gray-500); }
.qa-head { display: flex; gap: 14px; align-items: flex-start; }
.qa-num {
  flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--color-white); color: var(--gray-500);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.qa-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qa-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.qa-tags:empty { display: none; }
.qa-topic, .qa-state {
  font-size: 11.5px; font-weight: 600; border-radius: var(--radius-full); padding: 3px 10px;
  background: var(--color-white); color: var(--gray-500);
}
.qa-topic { background: var(--accent-bg); color: var(--accent); }
.qa-state--ok, .qa-state--done { background: var(--up-bg); color: var(--up); }
.qa-state--hidden { background: var(--flat-bg); color: var(--flat); }
/* Состояние вопроса цветом: зелёное — закрыто, янтарное — ход за заказчиком,
   синее — ход за мной. По списку видно, где что стоит, не вчитываясь. */
.qa-state--answered { background: var(--accent-bg); color: var(--accent); }
.qa-state--clarify, .qa-state--waiting { background: #FDF0D5; color: #8A5A00; }
.qa-state--review { background: var(--accent-bg); color: var(--accent); }
.qa-text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--color-black); }
.qa-orig { font-size: 12.5px; color: var(--gray-500); }
.qa-orig summary { cursor: pointer; }
.qa-orig p { margin: 6px 0 0; }
.qa-pub { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.qa-pub-label { font-size: 12.5px; color: var(--gray-500); white-space: nowrap; }
.qa-indent { margin-left: 42px; }
.qa-answer { margin-left: 42px; }
.qa-answer-label { font-size: 12px; font-weight: 600; color: var(--gray-500); margin-bottom: 4px; }
.qa-answer-text { margin: 0; white-space: pre-wrap; background: var(--color-white); border-radius: 12px; padding: 10px 14px; }
/* Мои реплики в переписке отличаются от ответов заказчика — иначе
   после уточнения непонятно, кто что написал */
.qa-answer--mine .qa-answer-text { background: var(--accent-bg); }
/* Черновик уточнения: пунктир — привычный знак «ещё не опубликовано» */
.qa-answer--draft .qa-answer-text { background: var(--color-white); border: 1px dashed var(--gray-300); }
.qa-draft-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.qa-answer + .qa-answer { margin-top: 8px; }
.qa-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.qa-actions .btn-sm { padding: 6px 12px; font-size: 12.5px; }
.qa-actions .btn-danger-soft:hover { color: var(--down); }
.qa-meta { margin-left: auto; font-size: 12px; color: var(--gray-400); }
body main.wrap section.qa-form-card { background: var(--color-gray); }
body main.wrap section.qa-closed-card { background: none; padding: 0; }
.qa-closed { background: var(--color-gray); border-radius: var(--radius-lg); padding: 16px 24px; }
.qa-closed summary { cursor: pointer; font-weight: 700; }
.qa-closed-item { border-top: 1px solid var(--color-border); padding: 12px 0 4px; margin-top: 12px; }
.qa-closed-line { margin: 4px 0; font-size: 14px; }
@media (max-width: 640px) {
  .qa-head { flex-wrap: wrap; }
  .qa-pub { width: 100%; margin-left: 42px; }
  .qa-indent, .qa-answer { margin-left: 0; }
  .qa-meta { margin-left: 0; width: 100%; }
}
.qa-view { display: inline-flex; background: var(--color-gray); border-radius: var(--radius-full); padding: 3px; gap: 2px; }
.qa-view-btn {
  font-size: 13px; font-weight: 600; color: var(--gray-500); text-decoration: none;
  padding: 6px 14px; border-radius: var(--radius-full); white-space: nowrap;
}
.qa-view-btn:hover { color: var(--color-black); text-decoration: none; }
.qa-view-btn.is-on { background: var(--color-black); color: #fff; }
.qa-preview-note {
  background: var(--accent-bg); color: var(--accent); border-radius: 12px;
  padding: 10px 14px; font-size: 13.5px; font-weight: 600; margin: 0 0 12px;
}

/* Пилюли статуса и интента в таблицах стратегии. Пока формулировки были
   короткими («в работе»), им хватало одной строки. Теперь в статусе пишут
   целую фразу — и запрет переноса растягивал таблицу за край экрана.
   Длинная пилюля переносится и становится плашкой с мягким скруглением */
.s-table .s-status, .s-table .intent {
  white-space: normal; display: inline-block; max-width: 100%;
  line-height: 1.4; border-radius: 10px; text-align: left;
}
.s-table td:last-child { min-width: 180px; max-width: 320px; }
.s-table .intent { max-width: 220px; }

/* ---------- Контент-план: статусы и построчный редактор ---------- */
.cp-status { display: inline-block; font-size: 12px; font-weight: 600; border-radius: var(--radius-full);
  padding: 3px 10px; white-space: nowrap; }
.cp-done { background: var(--up-bg); color: var(--up); }
.cp-work { background: var(--accent-bg); color: var(--accent); }
.cp-wait { background: #FDF0D5; color: #8A5A00; }
.cp-plan { background: var(--flat-bg); color: var(--flat); }
.cp-off { background: var(--color-gray); color: var(--gray-500); }
.cp-row-off td { color: var(--gray-400); }
.s-table td.nowrap { white-space: nowrap; }
.cp-edit { width: 100%; border-collapse: collapse; font-size: 13px; }
.cp-edit th { text-align: left; font-size: 12px; font-weight: 600; color: var(--gray-500); padding: 4px 6px; }
.cp-edit td { padding: 4px 6px; vertical-align: top; }
.cp-edit input, .cp-edit select, .cp-edit textarea { width: 100%; min-width: 90px; font: inherit;
  border: 1px solid var(--gray-200, #E4E4E7); border-radius: 8px; padding: 6px 8px; background: var(--color-white); }
.cp-edit textarea { min-width: 240px; resize: vertical; }
.cp-edit input[type=date] { min-width: 132px; }
.cp-inline { margin: 0; }
.cp-inline input[type=date] { font: inherit; font-size: 13px; border: 1px solid var(--gray-200, #E4E4E7);
  border-radius: 8px; padding: 4px 6px; background: var(--color-white); }
select.cp-status { border: 0; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; appearance: auto; }
.today-copy { white-space: nowrap; align-self: center; margin-left: auto; }
.plan-dry { padding: 10px 0; border-top: 1px solid var(--color-gray); }
.plan-dry:first-of-type { border-top: 0; }
.plan-dry-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.plan-ideas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-ideas li { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; }
.bell-count { position: absolute; top: -3px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700;
  line-height: 17px; text-align: center; }
.cp-prop { background: #EEE8FF; color: #5B3FC4; }
.cp-decide { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-quota { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px;
  font-size: 13.5px; color: var(--gray-500); }
.digest-ack { margin-top: 4px; font-size: 12.5px; }
.digest-ack summary { cursor: pointer; color: var(--gray-400); }
.digest-ack form { margin-top: 6px; }
.digest-acked { margin-top: 8px; }
.digest-acked summary { cursor: pointer; }
.digest-acked li { margin: 4px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
