/* ─── Modal overlay ──────────────────────────────────────────────────────────
   Применяется ко всем модалкам.
   display переключается через JS: cexOpenModal / cexCloseModal
   ────────────────────────────────────────────────────────────────────────── */

.cex-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(195, 180, 160, 0.28);
  z-index: 99000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.cex-modal-overlay--dark {
  background: rgba(195, 180, 160, 0.42);
}

/* ─── Анимации — управляются JS через .modal-opening / .modal-closing ─────── */

.cex-modal-overlay.modal-opening {
  display: flex;
  opacity: 1;
}

.cex-modal-overlay.modal-closing {
  opacity: 0;
}

/* ─── Modal box ──────────────────────────────────────────────────────────── */

.cex-modal-box {
  background: #F7F2EA;
  border-radius: 24px;
  padding: 32px 28px;
  width: min(420px, 90vw);
  box-shadow:
    0  2px  4px rgba(40, 35, 30, 0.04),
    0  8px 20px rgba(40, 35, 30, 0.10),
    0 20px 40px rgba(40, 35, 30, 0.10),
    0  0   0 1px rgba(206, 196, 184, 0.55);
  font-family: 'Jost', sans-serif;
  position: relative;
  transform-origin: center center;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity   0.26s ease,
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-opening .cex-modal-box {
  opacity: 1;
  transform: translateY(0);
}

.modal-closing .cex-modal-box {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity   0.16s ease-in,
    transform 0.16s ease-in;
}

/* ─── Stagger-анимация дочерних элементов ────────────────────────────────── */

@keyframes cexFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-opening .cex-modal-box > *:nth-child(1) { animation: cexFadeUp 0.30s ease 0.06s both; }
.modal-opening .cex-modal-box > *:nth-child(2) { animation: cexFadeUp 0.30s ease 0.12s both; }
.modal-opening .cex-modal-box > *:nth-child(3) { animation: cexFadeUp 0.30s ease 0.18s both; }
.modal-opening .cex-modal-box > *:nth-child(4) { animation: cexFadeUp 0.30s ease 0.22s both; }
.modal-opening .cex-modal-box > *:nth-child(5) { animation: cexFadeUp 0.30s ease 0.26s both; }
.modal-opening .cex-modal-box > *:nth-child(n+6) { animation: cexFadeUp 0.30s ease 0.28s both; }

/* Компактный — consult-modal, share-error, share-register */
.cex-modal-box--compact {
  width: min(340px, 90vw);
  padding: 28px 22px;
}

/* Широкий — invite-modal */
.cex-modal-box--wide {
  width: min(460px, 92vw);
  max-height: min(88vh, 680px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cex-modal-box--wide::-webkit-scrollbar { display: none; }

/* ─── Scroll hint ────────────────────────────────────────────────────────── */

/* Sticky "scroll down" indicator — works inside any overflow-y:auto container */
.cex-scroll-hint {
  position: sticky;
  bottom: 0;
  margin: 8px -28px -32px;
  padding: 20px 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cex-scroll-hint--hidden {
  opacity: 0;
}

/* Frosted pill — the visible badge inside the hint area */
.cex-scroll-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px 5px 10px;
  border-radius: 20px;
  background: rgba(247, 242, 234, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #7A6E64;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  /* fade all edges of the pill */
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* Variant for intro body — zero footprint in flow: sticky bottom-of-scroll
   indicator that must NOT count as a boundary for centering the central
   block (#intro-center-wrap centers between the header and the login
   block, not between the header and this hint). Height/padding/margin all
   collapsed to 0 so it takes no space in the flex column; the hint itself
   still renders and still sticks to the bottom of the scroll area, just
   straddling that 0-height line instead of pushing content above it. */
.cex-scroll-hint--intro {
  margin: 0;
  padding: 0;
  height: 0;
  overflow: visible;
  /* Пилюля лежит НАД нулевой линией (её нижний край на линии), а не оседлав
     её по центру: половина, свисавшая ниже, добавляла ~12px к scrollHeight
     #intro-body — и у вошедшего, где под центральной частью больше нет
     мёртвого места (см. .intro-body--no-login-row, style.css), которое эту
     половину поглощало, главная получала фантомную прокрутку на те же 12px
     при полностью помещающемся содержимом. Так же, целиком над линией,
     лежат и затухание, и шеврон ниже. */
  align-items: flex-end;
}
/* Главная — не пилюля, а затухание края: содержимое у нижней границы
   прокручиваемой области мягко растворяется в фон экрана, по центру — голый
   шеврон. Обрезанный край сам говорит, что ниже есть ещё, а у пилюли с
   размытием и маской края выходили мутными и ложились поверх кнопок.
   Подсказка растянута на ширину содержимого (align-self), а градиент лежит
   внутри неё, НЕ в боковых полях #intro-body: в полях содержимого нет, а
   выход за них дал бы горизонтальную прокрутку (overflow-y:auto делает и
   overflow-x прокручиваемым). Градиент клики не ловит — кнопка «Войти» под
   ним нажимается как обычно; кликабелен только шеврон (обработчик на самой
   подсказке, _cexInitScrollHint, navigation.js).
   Липкость считается от края С УЧЁТОМ нижнего поля #intro-body (16px inline
   в index.html): при bottom:0 затухание висело бы на 16px выше края, и под
   ним виднелась бы незатухшая полоска содержимого. Отрицательный bottom
   ровно на это поле сажает его на сам край; у вошедшего поле снято
   (.intro-body--no-login-row, style.css) — там и сдвиг 0. Вниз липкий
   элемент так не уезжает (только вверх, когда содержимое ниже края), так
   что лишней прокрутки сдвиг не добавляет. */
.cex-scroll-hint--intro { align-self: stretch; z-index: 2; bottom: -16px; }
#intro-body.intro-body--no-login-row .cex-scroll-hint--intro { bottom: 0; }
.cex-scroll-hint-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(240, 235, 225, 0), var(--bg) 78%);
}
.cex-scroll-hint-chev {
  position: relative;
  width: 44px; height: 28px;
  display: grid; place-items: center;
  color: var(--ink3);
  transition: color .2s;
}
.cex-scroll-hint-chev:hover { color: var(--ink2); }
.cex-scroll-hint-chev .cex-icon { width: 16px; height: 16px; stroke-width: 1.8; }

/* ─── Invite session-type chooser ────────────────────────────────────────── */

.invite-type-group {
  display: flex;
  gap: 8px;
}
.invite-type-opt {
  flex: 1;
  cursor: default;
  display: block;
}
.invite-type-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.invite-type-card {
  display: block;
  height: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1.5px solid #CEC4B8;
  border-radius: 10px;
  background: #FFFDF9;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.invite-type-opt input:checked + .invite-type-card {
  border-color: #8EA68C;
  background: #F0F7F0;
}
.invite-type-name {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 500;
  color: #28231E;
}
.invite-type-desc {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-meta);
  color: var(--c-muted-text);
  margin-top: 3px;
  line-height: 1.4;
}

/* ─── Research tests info page (client view) ──────────────────────────────── */

.research-info-hero {
  text-align: center;
  margin-bottom: 18px;
}
.research-info-glyph {
  line-height: 1;
  margin-bottom: 6px;
}
.research-info-glyph svg {
  width: 44px;
  height: 44px;
}
.research-info-lead {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: #5A5049;
  line-height: 1.6;
  margin: 0;
}
.research-test {
  border: 1px solid #E4DBCF;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #FFFDF9;
}
.research-test-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.research-test-name {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 600;
  color: #28231E;
}
.research-test-time {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-meta);
  color: var(--c-muted-text);
  white-space: nowrap;
}
.research-test-desc {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: #7A6E64;
  line-height: 1.5;
  margin: 0 0 12px;
}
.research-test-link {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 9px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  text-decoration: none;
}
.research-info-note {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  color: var(--c-muted-text);
  line-height: 1.5;
  margin: 4px 0 0;
}

.research-test-result {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  font-weight: 500;
  color: #6E8A6C;
  background: #F0F7F0;
  border: 1px solid #D4E3D2;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0 0 12px;
}

/* ─── Test questionnaire (quiz) ───────────────────────────────────────────── */

.quiz-question {
  margin-bottom: 18px;
}
.quiz-question-text {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 600;
  color: #28231E;
  line-height: 1.45;
  margin-bottom: 8px;
}
.quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: default;
  padding: 9px 12px;
  border: 1.5px solid #CEC4B8;
  border-radius: 9px;
  background: #FFFDF9;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.quiz-opt-radio {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #CEC4B8;
  position: relative;
  transition: border-color 0.15s ease;
}
.quiz-opt input:checked + .quiz-opt-radio {
  border-color: #8EA68C;
}
.quiz-opt input:checked + .quiz-opt-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #8EA68C;
}
.quiz-opt input:checked ~ .quiz-opt-label {
  color: #28231E;
}
.quiz-opt:has(input:checked) {
  border-color: #8EA68C;
  background: #F0F7F0;
}
.quiz-opt-label {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: #5A5049;
}

/* ─── Test results rows (psych modal + session detail) ────────────────────── */

.test-result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #EDE6DA;
}
.test-result-row:last-child { border-bottom: none; }
.test-result-name {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: #28231E;
}
.test-result-score {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 600;
  color: #6E8A6C;
  white-space: nowrap;
}
.test-result-pending {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  color: #B7AC9E;
  white-space: nowrap;
}

/* ─── Research admin: active-tests management ─────────────────────────────── */

.research-admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #E4DBCF;
  border-radius: 12px;
  background: #FFFDF9;
}
.research-admin-info { flex: 1; min-width: 0; }
.research-admin-name {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 600;
  color: #28231E;
}
.research-admin-meta {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-meta);
  color: var(--c-muted-text);
  margin-top: 2px;
}
.research-admin-desc {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: #7A6E64;
  line-height: 1.45;
  margin-top: 5px;
}

/* Toggle switch */
.cex-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  cursor: default;
}
.cex-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cex-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: #D6CCBE;
  transition: background 0.2s ease;
}
.cex-switch-track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFDF9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}
.cex-switch input:checked + .cex-switch-track {
  background: #8EA68C;
}
.cex-switch input:checked + .cex-switch-track::before {
  transform: translateX(18px);
}

/* Link to reopen the research page on the intro screen */
.research-open-link {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--c-accent-text);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(142,166,140,0.5);
  padding: 0 0 1px;
  cursor: default;
}
/* Карточка методики в «Методиках» целиком — вход в её заполнение. */
.research-admin-row--link { cursor: default; transition: border-color 0.15s ease, background 0.15s ease; }
.research-admin-row--link:hover { border-color: #8EA68C; background: #FAFCF9; }
.research-admin-row--link .research-open-link { margin-top: 8px; }
.cex-switch input:disabled + .cex-switch-track { opacity: 0.55; cursor: default; }

/* Плашка предпросмотра на странице заполнения (сотрудник, без сохранения). */
.test-quiz-preview-note {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  color: #7A5C1E;
  background: #FBF3E2;
  border: 1px solid #EAD9B0;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
}

/* «Валидизация» → «Результаты»: группа на методику, в ней карточки. */
.test-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #E4DBCF;
}
.test-group-name {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: #28231E;
}
.test-group-count {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-small);
  color: var(--c-muted-text);
  white-space: nowrap;
}
.test-group-list { display: flex; flex-direction: column; gap: 10px; }
.test-group-empty {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: var(--c-muted-text);
  padding: 4px 0;
}
.test-result-item {
  border: 1px solid #E4DBCF;
  border-radius: 12px;
  background: #FFFDF9;
  padding: 12px 14px;
}
.test-result-item--link { cursor: default; transition: border-color 0.15s ease; }
.test-result-item--link:hover { border-color: #8EA68C; }
.test-result-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.test-result-item-client {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 600;
  color: #28231E;
}
.test-result-item-date {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-small);
  color: var(--c-muted-text);
  white-space: nowrap;
}
.test-result-item-meta {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  color: #7A6E64;
  margin: 2px 0 6px;
  line-height: 1.4;
}
.test-result-item-score {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 600;
  color: #6E8A6C;
}

.research-admin-src {
  display: inline-block;
  margin-top: 6px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-meta);
  color: #8EA68C;
  text-decoration: none;
  border-bottom: 1px solid rgba(142,166,140,0.5);
}

/* ─── «i» рядом с названием методики ─────────────────────────────────────── */

.test-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -3px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--c-muted-text);
  cursor: default;
}
.test-info-btn:hover { color: #5A5049; }
.test-info-btn .cex-icon { width: 18px; height: 18px; }
.test-info-body {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: #5A5049;
}
.test-info-body p { margin: 0 0 10px; }
.test-info-h {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: #28231E;
  margin: 14px 0 8px;
}
.test-info-h:first-child { margin-top: 0; }
.test-info-list, .test-info-lit {
  margin: 0 0 10px;
  padding-left: 18px;
}
.test-info-list li, .test-info-lit li { margin-bottom: 6px; }
.test-info-lit { font-size: var(--fs-small); color: #7A6E64; }
.test-info-body a, .bfi-credit a { color: #6E8A6C; }
.test-info-meta { color: #7A6E64; }

/* ─── BFI-2: опросник ─────────────────────────────────────────────────────── */
/* Футер страницы заполнения (#test-quiz-footer) — обычный .reg-btn-group, как
   у любого другого экрана: «Закрыть»/«Назад» первым cex-btn-out уезжает
   влево общим правилом (.cex-footer .reg-btn-group > .cex-btn-out:first-child,
   style.css), «Далее»/«Сохранить ответы» cex-btn-ink остаётся справа —
   отдельного класса под этот футер заводить не нужно. */

.bfi-form-pick { text-align: center; padding: 6px 0 4px; }
.bfi-form-pick-title {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: #28231E;
  margin-bottom: 6px;
}
.bfi-form-pick-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.bfi-form-btn {
  flex: 1 1 150px;
  max-width: 200px;
  padding: 14px 16px;
  border: 1.5px solid #CEC4B8;
  border-radius: 12px;
  background: #FFFDF9;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  color: #28231E;
  cursor: default;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.bfi-form-btn:hover, .bfi-form-btn-on { border-color: #8EA68C; background: #F0F7F0; }

/* Верх страницы (прогресс, бланк, легенда) прилипает к верху прокрутки
   #test-quiz-body — легенда шкалы нужна под рукой на каждом утверждении.
   top:0 и фон var(--bg) — страница, а не модал: прилипает к самому верху
   СВОЕГО скролл-контейнера, фон тот же, что у экрана под ней. */
.bfi-quiz-top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  padding: 6px 0 10px;
  margin: 0 0 4px;
  border-bottom: 1px solid #E4DBCF;
}
.bfi-quiz-progress {
  height: 4px;
  border-radius: 2px;
  background: #E4DBCF;
  overflow: hidden;
}
.bfi-quiz-progress-fill { height: 100%; background: #8EA68C; transition: width 0.2s ease; }
.bfi-quiz-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 8px;
  margin: 6px 0 6px;
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-small);
  color: var(--c-muted-text);
}
.bfi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  color: #7A6E64;
  line-height: 1.4;
}
.bfi-legend-item b { color: #28231E; font-weight: 600; }
.bfi-stem {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: #28231E;
  margin: 8px 0 6px;
}
.bfi-item {
  padding: 9px 0;
  border-bottom: 1px solid #EDE6DA;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: 6px;
}
.bfi-item:last-child { border-bottom: none; }
.bfi-item-missing { background: #FBF0EC; box-shadow: 0 0 0 6px #FBF0EC; }
.bfi-item-text {
  flex: 1 1 200px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: #28231E;
  line-height: 1.4;
}
.bfi-item-num {
  display: inline-block;
  min-width: 22px;
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-meta);
  color: var(--c-muted-text);
}
.bfi-likert { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.bfi-likert-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #CEC4B8;
  background: #FFFDF9;
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-ui);
  color: #7A6E64;
  cursor: default;
  padding: 0;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.bfi-likert-btn:hover { border-color: #8EA68C; }
.bfi-likert-on { background: #8EA68C; border-color: #8EA68C; color: #FFFDF9; font-weight: 600; }
@media (max-width: 400px) {
  .bfi-likert { gap: 4px; }
  .bfi-likert-btn { width: 29px; height: 29px; font-size: var(--fs-small); }
}

/* ─── BFI-2: результат (полосы 1..5 с коридором норм) ─────────────────────── */

.bfi-result-sub {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-meta);
  color: var(--c-muted-text);
  margin-bottom: 12px;
}
.bfi-section-title {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted-text);
  margin: 14px 0 6px;
}
.bfi-block {
  border: 1px solid #E4DBCF;
  border-radius: 12px;
  background: #FFFDF9;
  padding: 10px 12px 8px;
}
.bfi-row {
  display: grid;
  grid-template-columns: minmax(96px, 34%) 1fr 34px;
  align-items: center;
  gap: 8px;
  padding: 4px 0 12px;
}
.bfi-row-compact { padding: 2px 0; grid-template-columns: minmax(96px, 40%) 1fr 30px; }
.bfi-row-name {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  color: #28231E;
  line-height: 1.25;
}
.bfi-row-compact .bfi-row-name { font-size: var(--fs-meta); color: #5A5049; }
/* Узкий телефон: название шкалы («Доброжелательность») не делится на строки и
   не помещается в свою колонку рядом с полосой — уходит отдельной строкой над
   полосой; компактный профиль в списках остаётся в одну строку с ужатым
   шрифтом. */
@media (max-width: 400px) {
  .bfi-row:not(.bfi-row-compact) { grid-template-columns: 1fr 34px; row-gap: 2px; }
  .bfi-row:not(.bfi-row-compact) .bfi-row-name { grid-column: 1 / -1; }
  .bfi-row-compact { grid-template-columns: minmax(90px, 42%) 1fr 30px; }
  .bfi-row-compact .bfi-row-name { font-size: var(--fs-label); overflow-wrap: anywhere; }
}
.bfi-row-bar { position: relative; min-width: 0; }
.bfi-bar {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: #EDE6DA;
  overflow: hidden;
}
.bfi-row-compact .bfi-bar { height: 8px; border-radius: 4px; }
.bfi-bar-norm {
  position: absolute;
  top: 0; bottom: 0;
  background: repeating-linear-gradient(135deg, rgba(90,80,73,0.16) 0 2px, transparent 2px 5px);
  border-left: 1px solid rgba(90,80,73,0.35);
  border-right: 1px solid rgba(90,80,73,0.35);
}
.bfi-bar-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  border-radius: 6px 0 0 6px;
  opacity: 0.85;
}
.bfi-lvl-low  { background: #C1B7AA; }
.bfi-lvl-mid  { background: #8EA68C; }
.bfi-lvl-high { background: #5F7A5D; }
.bfi-lvl-low-txt  { color: var(--c-muted-text); }
.bfi-lvl-mid-txt  { color: #6E8A6C; }
.bfi-lvl-high-txt { color: #4B6449; }
.bfi-bar-ticks {
  position: relative;
  height: 12px;
  margin-top: 2px;
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-micro);
  color: var(--c-muted-text);
}
.bfi-tick { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.bfi-tick:first-child { transform: none; }
.bfi-tick:last-child { transform: translateX(-100%); }
.bfi-tick-lo::before { content: '['; color: #5A5049; }
.bfi-tick-hi::after  { content: ']'; color: #5A5049; }
.bfi-row-val {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  text-align: right;
}
.bfi-row-compact .bfi-row-val { font-size: var(--fs-meta); }
.bfi-legend-levels {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  color: #7A6E64;
  text-align: center;
  padding: 4px 0 2px;
}
.bfi-legend-levels span { font-weight: 600; }
.bfi-legend-norms { font-size: var(--fs-label); color: var(--c-muted-text); margin-top: 3px; }
.bfi-facet-group { margin-bottom: 8px; }
.bfi-facet-group:last-child { margin-bottom: 0; }
.bfi-facet-group-title {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: #28231E;
  text-align: center;
  margin: 4px 0 6px;
}
.bfi-compact { margin-top: 4px; }
.test-result-card {
  padding: 6px 0 8px;
  border-bottom: 1px solid #EDE6DA;
}
.test-result-card:last-child { border-bottom: none; }
.test-result-card .test-result-row { border-bottom: none; padding: 4px 0 2px; }

.bfi-details {
  margin-top: 10px;
  border: 1px solid #E4DBCF;
  border-radius: 12px;
  background: #FFFDF9;
  padding: 0 12px;
}
.bfi-details summary {
  cursor: default;
  list-style: none;
  padding: 10px 0;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: #28231E;
}
.bfi-details summary::-webkit-details-marker { display: none; }
.bfi-details summary::after { content: '▾'; float: right; color: var(--c-muted-text); }
.bfi-details[open] summary::after { content: '▴'; }
.bfi-details[open] summary { border-bottom: 1px solid #EDE6DA; margin-bottom: 8px; }
.bfi-calc-wrap { overflow-x: auto; padding-bottom: 10px; }
.bfi-calc {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-small);
  color: #5A5049;
  white-space: nowrap;
}
.bfi-calc th, .bfi-calc td { padding: 4px 6px; text-align: left; border-bottom: 1px solid #EDE6DA; }
.bfi-calc th { color: var(--c-muted-text); font-weight: 500; }
.bfi-calc td:nth-child(3), .bfi-calc td:nth-child(5), .bfi-calc td:nth-child(6), .bfi-calc td:nth-child(7),
.bfi-calc th:nth-child(3), .bfi-calc th:nth-child(5), .bfi-calc th:nth-child(6), .bfi-calc th:nth-child(7) { text-align: right; }
.bfi-calc-domain td { background: #F3EEE6; color: #28231E; }
.bfi-interp { padding: 0 0 10px; }
.bfi-interp-title {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: #28231E;
  margin-bottom: 4px;
}
.bfi-interp-badge {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-meta);
  font-weight: 500;
  margin-left: 6px;
}
.bfi-interp-p, .bfi-interp-mid {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--c-muted-text);
  margin: 0 0 6px;
  padding-left: 8px;
  border-left: 2px solid #EDE6DA;
}
.bfi-interp-mid { color: #7A6E64; border-left-color: #8EA68C; font-style: italic; }
.bfi-interp-on { color: #28231E; border-left-color: #8EA68C; background: #F5F8F4; padding: 6px 8px; border-radius: 0 8px 8px 0; }
.bfi-credit {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  color: var(--c-muted-text);
  font-style: italic;
  margin: 0 0 10px;
}
.bfi-details .test-info-lit { padding-bottom: 6px; }

/* ─── Modal title ────────────────────────────────────────────────────────── */

.cex-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--fs-serif-m);
  font-weight: 400;
  color: #28231E;
  margin: 0 0 20px;
}

/* Компактный заголовок утилитарных модалов (код автора, обсуждение,
   комментарий к фразе, история изменений) — тот же кегль и вес, что у
   заголовков секций и шапки (.title-serif / .cex-hdr-title). */
.cex-modal-title--compact {
  font-size: var(--fs-serif-s);
  font-weight: 600;
  letter-spacing: 0.04em;
}
/* Крупный заголовок «листов» (подбор психолога, легенда, сообщения…) и
   модала записи на встречу с карты. */
.cex-modal-title--lg {
  font-size: var(--fs-serif-l);
  font-weight: 500;
}
.cex-modal-box .map-consult-heading { font-size: var(--fs-serif-l); }

/* ─── Close button (×) ───────────────────────────────────────────────────── */

.cex-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 19px;
  color: #B8AFA7;
  cursor: default;
  line-height: 1;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
/* Гарантируем, что весь квадрат кнопки кликабелен — ни SVG, ни <use> не
   перехватывают клики, иначе попасть в крестик трудно (особенно на тач). */
.cex-modal-close > * {
  pointer-events: none;
}
.cex-modal-close .cex-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.cex-modal-close:hover {
  color: #4A4440;
  background: rgba(206, 196, 184, 0.22);
  transform: scale(1.08);
}
.cex-modal-close:active {
  background: rgba(206, 196, 184, 0.35);
  transform: scale(0.96);
}

/* ─── Modal input ────────────────────────────────────────────────────────── */

.cex-modal-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1.5px solid #CEC4B8;
  background: white;
  color: #28231E;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-input);
  box-sizing: border-box;
  outline: none;
}

/* ─── Modal footer row ───────────────────────────────────────────────────── */

.cex-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── Dropdown menus ─────────────────────────────────────────────────────── */

.cex-dropdown-menu {
  display: none;
  position: fixed;
  background: #F7F2EA;
  border: 1.5px solid rgba(206, 196, 184, 0.70);
  border-radius: 12px;
  flex-direction: column;
  gap: 0;
  z-index: 9990;
  right: 16px;
  padding: 6px;
  /* Ширина — по самому длинному пункту (подписи одной строкой), не уже 180px
     (ширина кнопки «Обзор карты», .intro-btn) и не шире экрана. */
  width: max-content;
  min-width: 180px;
  max-width: min(300px, calc(100vw - 32px));
  /* Короткий экран: пункты не помещаются — прокрутка внутри меню. Точный
     потолок (место между кнопкой и краем экрана) ставит JS при открытии
     (_cexFitMenuHeight, navigation.js); это — запас, если он не сработал. */
  max-height: calc(var(--cex-vvh, 100dvh) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow:
    0 2px  6px rgba(40, 35, 30, 0.06),
    0 8px 24px rgba(40, 35, 30, 0.10);
}

/* Пункт меню: текст влево, наведение — мягкий фон всей строки (раньше —
   черта под текстом). Выбранный/текущий пункт (.hamburger-active,
   .cex-btn-mid, is-current) красится своими правилами поверх. */
.cex-dropdown-menu-btn {
  font-size: var(--fs-body);
  padding: 10px 14px;
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  border: none;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.15s ease;
}
.cex-dropdown-menu-btn:hover,
.cex-dropdown-menu-btn:focus-visible { background: #EAE2D5; }
.cex-dropdown-menu-btn:active { background: #E2D8C9; }

/* Подпись группы в меню (гамбургер карты, _cexFooterRenderMenu). */
.cex-menu-cap {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6C635C;
  padding: 8px 14px 2px;
}

/* ─── Accessibility ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .cex-modal-box,
  .cex-modal-overlay,
  .cex-modal-box > * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ─── Comparison chat modal: floating, draggable, resizable ──────────────── */

/* Overlay is click-through so page below remains usable */
.cmp-chat-overlay {
  background: transparent !important;
  pointer-events: none;
  padding: 0;
}
.cmp-chat-overlay.modal-opening { display: block !important; }

.cmp-chat-overlay .cmp-chat-box {
  pointer-events: auto;
  /* Position is set by JS on open; these are fallback defaults */
  top: 8vh;
  left: 50%;
  width: min(520px, 94vw);
  height: min(560px, 80vh);
  padding: 0;
  background: #F7F2EA;
  box-shadow:
    0 4px 12px rgba(40, 35, 30, 0.10),
    0 14px 36px rgba(40, 35, 30, 0.14),
    0 0 0 1px rgba(206, 196, 184, 0.55);
}

/* Disable parent's child-stagger animation for chat modal — interferes with
   absolute positioning + drag */
.modal-opening .cmp-chat-box > * { animation: none !important; }

#cmp-chat-resize:hover svg line, #task-chat-resize:hover svg line { stroke: #5A5049; }
#cmp-chat-header:active, #task-chat-header:active { cursor: grabbing; }

/* ══════════════════════════════════════════════════════════════════════════
   Consult modal («Запись на сессию») — просторный, выдержанный дизайн
   ════════════════════════════════════════════════════════════════════════ */

/* ВАЖНО: max-height этого бокса задаётся ТОЛЬКО здесь и в медиазапросе
   «max-width:480px» в конце файла. Второе такое же правило где-нибудь выше по
   файлу молча перебьётся этими двумя (одинаковая специфичность — выигрывает
   последнее) и станет мёртвым кодом: ровно так уже терялась правка «считать
   высоту от visualViewport», и форма продолжала обрезаться снизу. */
#consult-modal .cex-modal-box, #consult-contact-modal .cex-modal-box, #review-consult-modal .cex-modal-box {
  width: min(468px, 92vw);
  /* Высота — от РЕАЛЬНО видимой части экрана (--cex-vvh, visualViewport API,
     см. _cexSyncViewportVar в modals.js), а не от vh/dvh: на телефоне 100vh —
     это высота БЕЗ адресной строки, а 100dvh не учитывает экранную клавиатуру
     (в форме есть поле контакта). С ними бокс получается выше видимой
     области, и, так как на телефоне он прижат к верху (медиазапрос ниже),
     весь избыток уходит ЗА нижний край экрана — кнопка «Записаться» срезана.
     Внутренняя прокрутка это НЕ лечит: за край уходит сама рамка бокса, а не
     его содержимое, поэтому докрутка упирается в конец списка, а кнопка
     по-прежнему наполовину под панелью браузера. */
  max-height: min(92vh, calc(var(--cex-vvh, 100dvh) - 40px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* will-change:transform (базовое .cex-modal-box) держит на элементе свой
     compositing-слой — вместе с -webkit-overflow-scrolling:touch на НЁМ ЖЕ
     это известный источник залипающего тач-скролла в WebKit. Анимация
     открытия короткая и к перф некритична — снимаем. */
  will-change: auto;
  /* Не отдаём жест прокрутки родителю (боди), когда бокс долистан до края. */
  overscroll-behavior: contain;
  /* Нижний padding больше проектных 36px: самый нижний пиксель прокрутки на
     мобильных ненадёжен (системный жест снизу может его перехватывать), и
     кнопка «Записаться» не должна быть последним пикселем формы. */
  padding: 44px 40px 56px;
}
#consult-modal .cex-modal-box::-webkit-scrollbar, #consult-contact-modal .cex-modal-box::-webkit-scrollbar, #review-consult-modal .cex-modal-box::-webkit-scrollbar { display: none; }

.consult-hero { text-align: center; margin-bottom: 32px; }
.consult-hero__glyph {
  line-height: 1;
  margin-bottom: 16px;
}
.consult-hero__glyph svg {
  width: 44px;
  height: 44px;
}
.consult-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent-text);
  margin: 0;
}
/* Логотип над подписью «Живая сессия» — точно как .cex-logo на главной:
   сериф, вес 600, letter-spacing .06em, «Jointness» #28231E + «.Co» sage. */
.consult-brand {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: #28231E;
  margin-bottom: 9px;
}
.consult-brand em { color: #8EA68C; font-style: normal; }
.consult-hero__sub {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: #7A6E64;
  margin: 12px auto 0;
  max-width: 340px;
}

/* — Список преимуществ: тонкая разделительная линия, без заливки — */
.consult-benefits {
  list-style: none;
  margin: 0 0 30px;
  padding: 26px 4px 0;
  border-top: 1px solid #E8E0D4;
}
.consult-benefit {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: #5A5049;
}
.consult-benefit + .consult-benefit { margin-top: 16px; }
.consult-benefit__tick {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0;
  border-radius: 50%;
  background: rgba(142, 166, 140, 0.14);
  color: #6E8C6C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-small);
  line-height: 1;
}

/* — Выбор формата (карточки-радио) — */
.consult-opts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.consult-opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 19px 20px;
  border: 1px solid #E2D9CC;
  border-radius: 16px;
  background: #FCFAF6;
  cursor: default;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.consult-opt:hover { border-color: #C3B7A6; }
.consult-opt input { position: absolute; opacity: 0; pointer-events: none; }
.consult-opt:has(input:checked) {
  border-color: #8EA68C;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px #8EA68C, 0 6px 16px rgba(142, 166, 140, 0.12);
}
.consult-opt__body { flex: 1; min-width: 0; }
.consult-opt__name {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 500;
  color: #28231E;
  margin: 0 0 4px;
}
.consult-opt__meta {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--c-muted-text);
  margin: 0;
}
/* «+ тесты (15 мин) + видеозапись» — единый блок: на узком экране переносится
   на новую строку целиком, а не разрывается между словами/символами. */
.consult-opt__meta-tests { white-space: nowrap; }
.consult-opt__price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-body);
  font-weight: 500;
  color: #5A5049;
  margin-top: 10px;
}
.consult-opt__price s { color: #9A8E84; font-weight: 400; margin-right: 6px; white-space: nowrap; }
/* Незачёркнутая (актуальная) цена — единый блок: на узком экране переносится
   на новую строку целиком, а не разрывается между цифрами/символами. */
.consult-opt__price-now { white-space: nowrap; }
/* Скидка живёт в строке цены — тихий контурный sage-чип, без «наклейки» в углу */
.consult-opt__save {
  flex-shrink: 0;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--c-accent-text);
  border: 1px solid rgba(142, 166, 140, 0.45);
  border-radius: 7px;
  padding: 2px 8px;
  line-height: 1.3;
  white-space: nowrap;
}

/* Один формат без выбора («Записаться на консультацию к нам»): та же карточка,
   что выбранный вариант в «Живой сессии», но не кнопка. */
.consult-opt--static, .consult-opt--static:hover {
  cursor: default;
  border-color: #8EA68C;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px #8EA68C, 0 6px 16px rgba(142, 166, 140, 0.12);
}

/* Шапка «Живой сессии» внутри модала предложения по двум картам
   (#map-consult-modal, вариант «repeat»): у того бокса нет отступов. */
.map-consult-live-hero { padding: 40px 26px 0; }
.map-consult-live-hero .consult-hero { margin-bottom: 4px; }

/* — Блок контакта — */
.consult-contact-block { margin-bottom: 8px; }
.consult-contact-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.consult-contact-row #consult-messenger {
  width: auto;
  flex: 0 0 auto;
  max-width: 42%;
}
.consult-contact-row #consult-messenger,
.consult-contact-row #consult-contact {
  padding: 12px 14px;
}
.consult-contact-row #consult-contact {
  flex: 1 1 auto;
  min-width: 0;
}
.consult-field-label {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #7A6E64;
  margin: 0 0 11px;
}
.consult-note {
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: #BEB4A8;
  margin: 14px 0 0;
}
.consult-cta {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border-radius: 13px;
  font-family: 'Jost', sans-serif;
  font-size: var(--fs-ui);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* На телефоне модал — та же «плавающая» карточка с полями по краям, что и
   раньше, но прижата к верху, чтобы только перекрыть лого главной страницы. */
@media (max-width: 480px) {
  #consult-modal, #consult-contact-modal, #review-consult-modal {
    align-items: flex-start;
    padding-top: 8px;
  }
  #consult-modal .cex-modal-box, #consult-contact-modal .cex-modal-box, #review-consult-modal .cex-modal-box {
    /* 8px сверху (padding-top оверлея) + 16px воздуха снизу — но от ВИДИМОЙ
       высоты, а не от 100vh: та на телефоне не знает ни про адресную строку,
       ни про клавиатуру, и именно она обрезала форму снизу. */
    max-height: calc(var(--cex-vvh, 100dvh) - 24px);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Sticker-info modal («Значение цвета тактов переживания») — редизайн легенды
   ════════════════════════════════════════════════════════════════════════ */

.legend-list { display: flex; flex-direction: column; gap: 4px; }
.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 11px 12px;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.legend-item:hover { background: rgba(142, 166, 140, 0.06); }
.legend-swatch {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  box-shadow:
    inset 0 0 0 1px rgba(40, 35, 30, 0.06),
    0 3px 6px rgba(14, 15, 14, 0.10);
}
.legend-text { font-family: 'Jost', sans-serif; }
.legend-formula {
  font-size: var(--fs-small);
  line-height: 1.4;
  color: #8A7E72;
}
.legend-lead {
  font-size: var(--fs-body);
  font-weight: 600;
  color: #28231E;
  line-height: 1.3;
  margin: 1px 0 2px;
}
.legend-desc {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: #8A7E72;
  margin: 0;
}

/* ─── Модал «Рассказать о карте» (#share-modal, share.js) ─────────────────
   Шаги — .cex-share-step, показывается один (cexShareGo). Строки адресатов —
   .cex-share-row с миниатюрой артефакта слева; технические ссылки — под
   .cex-share-more. Ширина как у прежнего модала «Поделиться». */
.cex-share-box {
  padding: 28px 24px;
  width: min(400px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cex-share-sub {
  font-size: var(--fs-small);
  color: var(--c-muted-text);
  line-height: 1.5;
  margin: 0 0 16px;
}
.cex-share-label {
  font-family: 'Roboto Flex', sans-serif;
  font-size: var(--fs-label); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #5A5049; margin-bottom: 6px;
}
.cex-share-desc {
  font-size: var(--fs-small);
  color: var(--c-muted-text);
  line-height: 1.5;
  margin-bottom: 10px;
}
.cex-share-list { display: flex; flex-direction: column; gap: 8px; }
.cex-share-row {
  display: grid; grid-template-columns: 44px 1fr 16px; gap: 12px; align-items: center;
  width: 100%; text-align: left; padding: 10px 12px 10px 10px;
  background: #F0EBE1; border: 1px solid #E0D8CE; border-radius: 12px;
  color: #28231E; cursor: default; transition: border-color 0.15s, background 0.15s;
  font-family: 'Jost', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.cex-share-row:hover, .cex-share-row:active { border-color: #9A8E84; background: #EDE6DA; }
.cex-share-row:focus-visible { outline: 2px solid #8EA68C; outline-offset: 2px; }
.cex-share-row-txt { display: flex; flex-direction: column; min-width: 0; }
.cex-share-row-t { font-size: var(--fs-ui); font-weight: 500; line-height: 1.25; }
.cex-share-row-d { font-size: var(--fs-small); color: var(--c-muted-text); line-height: 1.35; margin-top: 2px; }
.cex-share-chev { width: 16px; height: 16px; color: #9A8E84; }
.cex-share-thumb {
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #FFFFFF; border: 1px solid #E0D8CE;
}
.cex-share-thumb svg { width: 100%; height: 100%; display: block; }
/* «Пригласить сравнить» — две мини-карты рядом, общие такты в зелёных рамках */
.cex-share-thumb--pair {
  width: auto; height: auto; flex-direction: row; flex-shrink: 0; gap: 6px; padding: 0;
  background: transparent; border: 0; overflow: visible;
}
.cex-share-thumb--pair > span {
  display: block; position: relative; width: 64px; height: 64px; border-radius: 6px; overflow: hidden;
  background: #F5EEE1; box-shadow: 0 0 0 1px #E0D8CE;
}
/* Разделы «Ещё»: квадрат «+» справа на уровне заголовка, текст обтекает */
.cex-share-sec { margin-bottom: 20px; }
.cex-share-sec--last { margin-bottom: 4px; }
.cex-share-sec::after { content: ''; display: table; clear: both; }
.cex-share-float { float: right; margin: 0 0 6px 12px; }
/* Кнопка «+» должна лежать ПОВЕРХ текста, который её обтекает: блок текста
   (#cmp-share-desc и др.) иначе перехватывал нажатие — «Создать ссылку» в
   «Поделиться сравнением» не нажималась. */
.cex-share-float { position: relative; z-index: 1; }
.cex-share-clear { clear: both; }
.cex-share-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: none; border: 0; padding: 0; cursor: default;
  font-family: 'Jost', sans-serif; font-size: var(--fs-small); color: #5A5049;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #CEC4B8;
}
.cex-share-more:hover { color: #28231E; }
.cex-share-more .cex-icon { width: 14px; height: 14px; transition: transform 0.15s; }
.cex-share-more[aria-expanded="true"] .cex-icon { transform: rotate(180deg); }
.cex-share-more[aria-expanded="true"] { margin-bottom: 14px; }
.cex-share-back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px;
  background: none; border: 0; padding: 0; cursor: default;
  font-family: 'Jost', sans-serif; font-size: var(--fs-small); color: #9A8E84;
}
.cex-share-back:hover { color: #28231E; }
.cex-share-back .cex-icon { width: 14px; height: 14px; }
.cex-share-art {
  background: #FFFFFF; border: 1px solid #E0D8CE; border-radius: 12px;
  padding: 12px; display: flex; gap: 12px; align-items: flex-start;
}
.cex-share-art-txt { font-size: var(--fs-small); color: #5A5049; line-height: 1.45; min-width: 0; }
.cex-share-art-txt b { display: block; font-weight: 500; color: #28231E; margin-bottom: 2px; }
.cex-share-square {
  width: 108px; height: 108px; flex-shrink: 0; border-radius: 6px; overflow: hidden;
  border: 1px solid #E0D8CE; background: #F5EEE1;
}
.cex-share-square svg { width: 100%; height: 100%; display: block; }
/* Условный лист PDF: миниатюра карты сверху, «строки» текста снизу */
.cex-share-sheet {
  width: 84px; height: 112px; flex-shrink: 0; border: 1px solid #CEC4B8; border-radius: 3px;
  background: #FFFFFF; padding: 7px 6px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: 2px 2px 0 rgba(206, 196, 184, 0.5);
}
.cex-share-sheet > span { display: block; width: 100%; height: 44px; }
.cex-share-sheet > span svg { width: 100%; height: 100%; display: block; }
.cex-share-sheet > i { display: block; height: 3px; border-radius: 2px; background: #DED6CA; }
.cex-share-sheet > i.s { width: 60%; }
.cex-share-digest { margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.cex-share-digest-h {
  font-family: 'Roboto Flex', sans-serif; font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: #9A8E84; margin-bottom: 2px;
}
.cex-share-digest-p { font-size: var(--fs-small); color: #28231E; line-height: 1.45; }
.cex-share-digest-p span { display: block; }
.cex-share-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.cex-share-actions .cex-btn { width: 100%; }
.cex-share-link {
  display: block; margin: 12px auto 0; background: none; border: 0; padding: 0; cursor: default;
  font-family: 'Jost', sans-serif; font-size: var(--fs-small); color: #5A5049;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #CEC4B8;
}
.cex-share-link:hover { color: #28231E; }

/* Строка модала «Новые комментарии» (consult.js, _cexDiscussRenderList). */
.cex-discuss-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; background: #F8F4EE; border: 1.5px solid #CEC4B8; border-radius: 12px; cursor: default; text-align: left; font-family: 'Jost', sans-serif; color: #28231E; }
.cex-discuss-row:hover { border-color: #9A8E84; }
.cex-discuss-row-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cex-discuss-row-t { font-size: var(--fs-body); overflow-wrap: anywhere; }
.cex-discuss-row-d { font-size: var(--fs-meta); color: #C4695C; }

/* Превью того, что уйдёт близкому (share.js, cexShareClosePick): картинка —
   как есть, квадрат во всю ширину; сообщение — пузырь мессенджера. */
.cex-share-preview { margin-top: 2px; }
.cex-share-preview img {
  display: block; width: 100%; height: auto; border-radius: 10px;
  border: 1px solid #E0D8CE; background: #FBF8F2;
}
.cex-share-preview .cex-share-desc { margin: 8px 0 0; }
.cex-share-bubble {
  background: #E6F4D9; color: #28231E; border-radius: 14px 14px 4px 14px;
  padding: 10px 14px; font-size: var(--fs-small); line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.cex-share-bubble a { color: #5C6C5B; }
.cex-share-preview-wait { font-size: var(--fs-small); color: var(--c-muted-text); padding: 18px 0; text-align: center; }
.cex-share-notice {
  font-family: 'Jost', sans-serif; font-size: var(--fs-small); color: #5A9E6F;
  text-align: center; padding: 6px 0 2px;
}
