/* ═══════════════════════════════════════════════════════════════════
   ДИЗАЙН-СИСТЕМА: компоненты chat-home + sidebar shell.
   Подключается ТОЛЬКО шаблонами на базе templates/shells/chat_shell.html.
   Не загружается на legacy-страницах — никаких глобальных переопределений.

   Зависит от:  tokens.css  (CSS-переменные палитры/радиусов/типографики)
   Соседствует: chat.css    (мессенджер, /messenger/*) — после Фазы 4 будет
                            переписан под общие токены отсюда.

   Структура:
     1. Reset и базовая раскладка
     2. Shell (sidebar + main, mobile drawer)
     3. Bubbles (терапевт / user / system / pending)
     4. Avatar, BrandMark, StatusPill
     5. Chip, GlyphTile, CtaCard
     6. Composer
     7. Navigation (NavItem, BottomBar)
     8. Utilities
═══════════════════════════════════════════════════════════════════ */

/* ─── 1. Reset и базовая раскладка ────────────────────────────── */
/* Глобальный сброс: убираем дефолтный 8px-margin у body
   (это и есть «рамка вокруг сайта»). */
html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg-shell);
}
html { scrollbar-gutter: stable; }

/* Кастомный скроллбар (как в мессенджере) — тонкий, светлый, прозрачный. */
* { scrollbar-width: thin; scrollbar-color: rgba(112, 81, 174, 0.20) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(112, 81, 174, 0.20);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(112, 81, 174, 0.35);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

.ds-shell,
.ds-shell *,
.ds-shell *::before,
.ds-shell *::after {
  box-sizing: border-box;
}

.ds-shell {
  font-family: var(--font-sans);
  color: var(--c-text);
  background: var(--c-bg-shell);
  min-height: 100vh;
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
}

:where(.ds-shell) button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

:where(.ds-shell) a {
  color: var(--c-brand);
  text-decoration: none;
  transition: color var(--t-fast);
}

:where(.ds-shell) a:hover {
  color: var(--c-brand-hover);
}

/* ─── 2. Shell layout ─────────────────────────────────────────── */
.ds-layout {
  display: flex;
  min-height: 100vh;
  background: var(--c-surface);
}

.ds-layout__sidebar {
  width: var(--w-sidebar);
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}

.ds-layout__main {
  flex: 1;
  background: var(--c-bg-chat);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Клиентский чат (ds-shell--chat) использует ТЕ ЖЕ viewport-bounded
   правила, что и терапевт (см. ниже): body фиксированной высоты 100dvh,
   overflow:hidden, .messenger/.chat-panel flex-fill'ятся, .chat-messages —
   единственный скроллер внутри. Composer — нормальный flex-child в конце
   колонки, не sticky.

   100dvh (а не 100vh) — критично: на мобиле dvh сжимается при появлении
   клавиатуры, поэтому composer остаётся над клавиатурой. На коротких
   чатах композер прилипает к низу естественным образом, потому что
   .chat-panel всегда занимает полный viewport. */
.ds-shell--chat {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ds-shell--chat .ds-layout {
  flex: 1;
  min-height: 0;
}
.ds-shell--chat .ds-layout__main {
  min-height: 0;
}

/* Терапевтская чат-страница (ds-shell--chat-therapist) — viewport-bounded
   модель: body фиксированной высоты, внутри .messenger делает горизонтальный
   split conv-list + chat-panel с двумя независимыми скроллами. Для
   терапевта sticky-модель не подходит — нужны ДВЕ скролл-зоны
   одновременно (список диалогов и сообщения), а sticky-bottom-composer
   работает только с одним документ-скроллом.
   На мобиле viewport-bounded более рискованно (address-bar quirks), но
   терапевт работает с десктопа в 95% времени, и на мобиле conv-list ↔
   chat-panel слайдятся друг между другом — каждый вид self-contained. */
.ds-shell--chat-therapist {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ds-shell--chat-therapist .ds-layout {
  flex: 1;
  min-height: 0;
}
.ds-shell--chat-therapist .ds-layout__main {
  min-height: 0;
}

.ds-layout__content {
  flex: 1;
  padding: 32px 24px;
}

/* ── Chat-home top bar (только «shilko.ru» справа) ────────────── */
.ds-chat-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 48px;
  padding: 0 28px;
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-bg-chat);
}
.ds-chat-topbar__host { font-size: 12px; color: var(--c-text-muted, #8a8693); }
@media (max-width: 1023px) { .ds-chat-topbar { display: none; } }

/* ── Сайдбар: юр.строка снизу (ИНН + ссылки на доки) ──────────── */
.ds-sidebar-legal {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border-soft);
  font-size: 11px;
  color: var(--c-text-muted);
  line-height: 1.55;
  text-align: center;
}
.ds-sidebar-legal a {
  color: var(--c-text-secondary);
  text-decoration: none;
}
.ds-sidebar-legal a:hover { color: var(--c-brand); }

/* ── Хлебные крошки (плашка над контентом) ────────────────────── */
.ds-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  border-bottom: 1px solid var(--c-border-soft);
  background: var(--c-bg-chat);
  font-size: 13px;
  color: var(--c-text-secondary);
}
.ds-breadcrumbs__item {
  color: var(--c-text-secondary);
  text-decoration: none;
}
.ds-breadcrumbs__item:hover { color: var(--c-brand); }
.ds-breadcrumbs__item--current { color: var(--c-text); font-weight: var(--fw-medium); }
.ds-breadcrumbs__sep { color: var(--c-text-muted, #8a8693); }
.ds-breadcrumbs__host { margin-left: auto; font-size: 12px; color: var(--c-text-muted, #8a8693); }
@media (max-width: 1023px) {
  .ds-breadcrumbs { display: none; }
}

.ds-layout__content--centered > * {
  max-width: var(--w-content-max);
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════════
   Staff-страницы (Phase F.8.2): унифицируем все исторические
   wrapper-классы (.stats-page, .staff-shell, .at-shell, .hw-shell,
   .settings-shell, .tech-shell, .err-card) под единый DS-визуал.

   body.ds-shell-префикс даёт специфичность 2 — перебивает per-template
   inline-стили (специфичность 1) без !important.

   .stats-page = дашборд (содержит grid карточек) → прозрачный фон.
   Остальные = «лист с контентом» → белая карточка с тенью.
═══════════════════════════════════════════════════════════════ */

body.ds-shell .stats-page,
body.ds-shell .staff-shell,
body.ds-shell .at-shell,
body.ds-shell .hw-shell,
body.ds-shell .settings-shell,
body.ds-shell .tech-shell,
body.ds-shell .err-card {
  max-width: var(--w-content-max);
  margin: 24px auto;
  padding: 32px;
  background: var(--c-surface);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03),
              0 4px 16px rgba(112, 81, 174, 0.05);
  border: 1px solid var(--c-border-soft);
}

/* .stats-page — дашборд с собственным grid карточек. Outer wrapper
   должен быть прозрачным, чтобы карточки сами были визуальными
   единицами; иначе получаем «карточки внутри карточки». */
body.ds-shell .stats-page {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 24px 16px 48px;
}

/* Мобильные правила: edge-to-edge паддинги, меньше margins. */
@media (max-width: 768px) {
  body.ds-shell .staff-shell,
  body.ds-shell .at-shell,
  body.ds-shell .hw-shell,
  body.ds-shell .settings-shell,
  body.ds-shell .tech-shell,
  body.ds-shell .err-card {
    padding: 20px 16px;
    margin: 12px 8px;
    border-radius: 12px;
  }
  body.ds-shell .stats-page {
    padding: 16px 12px 32px;
    margin: 0;
  }
}

/* ── Bridge: legacy button-классы → DS-look ────────────────────────
   Шаблоны staff_*.html используют .btn-primary / .btn-secondary /
   .icon-btn / .icon-btn.danger — стилизуем их под DS-кнопки без
   изменения markup'а. Если позже захотим заменить классы на
   .ds-btn / .ds-btn--primary etc., правила сами выпадут из работы. */
body.ds-shell .stats-page .btn-primary,
body.ds-shell .staff-shell .btn-primary,
body.ds-shell .at-shell .btn-primary,
body.ds-shell .hw-shell .btn-primary,
body.ds-shell .settings-shell .btn-primary,
body.ds-shell .tech-shell .btn-primary,
body.ds-shell .err-card .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid var(--c-brand);
  background: var(--c-brand);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast);
}
body.ds-shell .stats-page .btn-primary:hover,
body.ds-shell .staff-shell .btn-primary:hover,
body.ds-shell .at-shell .btn-primary:hover,
body.ds-shell .hw-shell .btn-primary:hover,
body.ds-shell .settings-shell .btn-primary:hover,
body.ds-shell .tech-shell .btn-primary:hover,
body.ds-shell .err-card .btn-primary:hover {
  background: var(--c-brand-hover);
  border-color: var(--c-brand-hover);
}

body.ds-shell .stats-page .btn-secondary,
body.ds-shell .staff-shell .btn-secondary,
body.ds-shell .at-shell .btn-secondary,
body.ds-shell .hw-shell .btn-secondary,
body.ds-shell .settings-shell .btn-secondary,
body.ds-shell .tech-shell .btn-secondary,
body.ds-shell .err-card .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--t-fast), color var(--t-fast);
}
body.ds-shell .stats-page .btn-secondary:hover,
body.ds-shell .staff-shell .btn-secondary:hover,
body.ds-shell .at-shell .btn-secondary:hover,
body.ds-shell .hw-shell .btn-secondary:hover,
body.ds-shell .settings-shell .btn-secondary:hover,
body.ds-shell .tech-shell .btn-secondary:hover,
body.ds-shell .err-card .btn-secondary:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
}

/* Icon-кнопки в строке действий (Редактировать / В чате / Удалить /
   В архив и т.п.). Содержат иконку + текст; auto-width с компактным
   padding'ом. Если в будущем понадобятся pure-icon-кнопки (только
   иконка, без текста), они получат отдельный модификатор .icon-btn--sq
   с фиксированными 36×36. */
body.ds-shell .stats-page .icon-btn,
body.ds-shell .staff-shell .icon-btn,
body.ds-shell .at-shell .icon-btn,
body.ds-shell .hw-shell .icon-btn,
body.ds-shell .settings-shell .icon-btn,
body.ds-shell .tech-shell .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--c-border-soft);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
body.ds-shell .stats-page .icon-btn:hover,
body.ds-shell .staff-shell .icon-btn:hover,
body.ds-shell .at-shell .icon-btn:hover,
body.ds-shell .hw-shell .icon-btn:hover,
body.ds-shell .settings-shell .icon-btn:hover,
body.ds-shell .tech-shell .icon-btn:hover {
  border-color: var(--c-brand);
  color: var(--c-brand);
  background: rgba(112, 81, 174, 0.04);
}
body.ds-shell .staff-shell .icon-btn.danger:hover,
body.ds-shell .hw-shell .icon-btn.danger:hover,
body.ds-shell .tech-shell .icon-btn.danger:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

/* ── Bridge: формовые поля под DS ─────────────────────────────────
   Стилизуем text/email/password/number/date/select/textarea внутри
   staff-обёрток. Touchpoint — DS-токены (--c-border, --c-brand). */
body.ds-shell .staff-shell input[type="text"],
body.ds-shell .staff-shell input[type="email"],
body.ds-shell .staff-shell input[type="password"],
body.ds-shell .staff-shell input[type="tel"],
body.ds-shell .staff-shell input[type="number"],
body.ds-shell .staff-shell input[type="date"],
body.ds-shell .staff-shell input[type="datetime-local"],
body.ds-shell .staff-shell input[type="url"],
body.ds-shell .staff-shell select,
body.ds-shell .staff-shell textarea,
body.ds-shell .hw-shell input[type="text"],
body.ds-shell .hw-shell input[type="date"],
body.ds-shell .hw-shell input[type="datetime-local"],
body.ds-shell .hw-shell select,
body.ds-shell .hw-shell textarea,
body.ds-shell .tech-shell input[type="text"],
body.ds-shell .tech-shell input[type="number"],
body.ds-shell .tech-shell select,
body.ds-shell .tech-shell textarea,
body.ds-shell .at-shell input,
body.ds-shell .at-shell select,
body.ds-shell .at-shell textarea,
body.ds-shell .settings-shell input[type="text"],
body.ds-shell .settings-shell input[type="email"],
body.ds-shell .settings-shell select,
body.ds-shell .settings-shell textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-sizing: border-box;
}
body.ds-shell .staff-shell input:focus,
body.ds-shell .staff-shell select:focus,
body.ds-shell .staff-shell textarea:focus,
body.ds-shell .hw-shell input:focus,
body.ds-shell .hw-shell select:focus,
body.ds-shell .hw-shell textarea:focus,
body.ds-shell .tech-shell input:focus,
body.ds-shell .tech-shell select:focus,
body.ds-shell .tech-shell textarea:focus,
body.ds-shell .at-shell input:focus,
body.ds-shell .at-shell select:focus,
body.ds-shell .at-shell textarea:focus,
body.ds-shell .settings-shell input:focus,
body.ds-shell .settings-shell select:focus,
body.ds-shell .settings-shell textarea:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(112, 81, 174, 0.12);
}
body.ds-shell .staff-shell label,
body.ds-shell .hw-shell label,
body.ds-shell .tech-shell label,
body.ds-shell .at-shell label,
body.ds-shell .settings-shell label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-secondary);
}

/* Заголовки внутри staff-страниц приводим к DS-типографике. */
body.ds-shell .staff-shell h1,
body.ds-shell .at-shell h1,
body.ds-shell .hw-shell h1,
body.ds-shell .settings-shell h1,
body.ds-shell .tech-shell h1,
body.ds-shell .err-card h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 24px;
  line-height: 1.2;
}
@media (max-width: 768px) {
  body.ds-shell .staff-shell h1,
  body.ds-shell .at-shell h1,
  body.ds-shell .hw-shell h1,
  body.ds-shell .settings-shell h1,
  body.ds-shell .tech-shell h1,
  body.ds-shell .err-card h1 {
    font-size: 20px;
    margin: 0 0 18px;
  }
}

.ds-layout__content--chat > * {
  max-width: var(--w-content-chat);
}

/* CTA-кнопки в контенте — никаких transform/scale на hover, только цвет фона. */
.ds-btn:hover,
.ds-btn:focus-visible {
  transform: none;
}
.ds-btn--primary,
.ds-btn--secondary,
.ds-btn--sm {
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

/* Mobile shell — нет sidebar по умолчанию, есть drawer */
@media (max-width: 1023px) {
  .ds-layout__sidebar {
    display: none;
  }
}

/* ─── 2a. Mobile header (бургер + brand + войти) ─────────────── */
.ds-mobile-header {
  display: none;
  height: var(--h-mobile-header);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  background: rgba(253, 252, 253, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border-soft);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

@media (max-width: 1023px) {
  .ds-mobile-header { display: flex; }
}

.ds-mobile-header__burger {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  border-radius: var(--r-md);
}

.ds-mobile-header__login {
  color: var(--c-brand-hover);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  padding: 6px 8px;
}

/* ─── 2b. Drawer (mobile offcanvas слева) ──────────────────── */
.ds-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 50, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
  z-index: var(--z-overlay);
}

.ds-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: var(--c-surface);
  transform: translateX(-100%);
  transition: transform var(--t-base);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
}

.ds-drawer[data-open="true"] {
  transform: translateX(0);
}

.ds-drawer-overlay[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

/* ─── 3. Bubbles ──────────────────────────────────────────────── */
.ds-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.ds-bubble-row--user {
  justify-content: flex-end;
}

.ds-bubble-row--system {
  justify-content: center;
  margin: 10px 0;
}

.ds-bubble-row--compact {
  margin-bottom: 6px;
}

.ds-bubble {
  border-radius: var(--r-2xl) var(--r-2xl) var(--r-2xl) var(--r-sm);
  padding: 12px 16px;
  max-width: 78%;
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--c-text);
  word-wrap: break-word;
}

.ds-bubble--therapist {
  background: var(--c-surface);
  border: 1px solid var(--c-border-brand);
  box-shadow: var(--shadow-sm);
}

.ds-bubble--user {
  background: var(--c-brand-bubble);
  border: 1px solid transparent;
  border-radius: var(--r-2xl) var(--r-2xl) var(--r-sm) var(--r-2xl);
}

.ds-bubble--pending {
  border: 1px dashed var(--c-brand-pending);
  opacity: 0.65;
}

.ds-bubble--system {
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  font-style: italic;
  text-align: center;
  max-width: 85%;
  padding: 6px 12px;
  background: var(--c-surface-muted);
  border-radius: var(--r-pill);
}

.ds-bubble--compact {
  padding: 10px 14px;
}

.ds-bubble__time {
  color: var(--c-text-muted);
  font-size: 11px;
  margin-top: 4px;
  text-align: right;
}

.ds-bubble__action {
  margin-top: 10px;
}

/* ─── 4. Avatar, BrandMark, StatusPill ────────────────────────── */
.ds-avatar {
  flex-shrink: 0;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-medium);
  width: 40px;
  height: 40px;
  font-size: 16px;
  background: linear-gradient(135deg, #ebe3f3 0%, #d6c9e7 100%);
  color: var(--c-brand-active);
  letter-spacing: -0.02em;
  overflow: hidden;
  line-height: 1;
}

.ds-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ds-avatar--sm  { width: 32px; height: 32px; font-size: 13px; }
.ds-avatar--md  { width: 40px; height: 40px; font-size: 16px; }
.ds-avatar--lg  { width: 44px; height: 44px; font-size: 18px; }
.ds-avatar--xl  { width: 64px; height: 64px; font-size: 26px; }

.ds-avatar-slot {
  width: 40px;
  flex-shrink: 0;
}

/* Brand mark — реальный логотип + текст */
.ds-brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.ds-brand-mark__logo {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  object-fit: contain;
  flex-shrink: 0;
}

/* Mobile compact: словесная марка brand.png — крупнее, ширина auto */
.ds-brand-mark--compact { justify-content: center; }
.ds-brand-mark__logo--wordmark {
  width: auto;
  height: 36px;
  border-radius: 0;
  object-fit: contain;
}

.ds-brand-mark__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.ds-brand-mark__name {
  color: var(--c-text);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
}

.ds-brand-mark__role {
  color: var(--c-text-muted);
  font-size: 11.5px;
  margin-top: 1px;
}

/* Status pill — "Никита онлайн / Отвечу за ~2 часа" */
.ds-status-pill {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--c-bg-chat);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}

.ds-status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--c-online);
  box-shadow: 0 0 0 3px var(--c-online-ring);
  margin-top: 6px;
  flex-shrink: 0;
}

.ds-status-pill__title {
  color: var(--c-text);
  font-size: 13px;
  font-weight: var(--fw-medium);
}

.ds-status-pill__sub {
  color: var(--c-text-secondary);
  font-size: 12px;
  margin-top: 1px;
}

/* ─── 5. Chip, GlyphTile, CtaCard ─────────────────────────────── */
.ds-chip {
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-brand-accent);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 15.5px;
  font-weight: var(--fw-medium);
  transition: all var(--t-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(112, 81, 174, 0.08);
}

.ds-chip:hover {
  border-color: var(--c-brand);
  background: var(--c-brand-softer);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(112, 81, 174, 0.12);
}

.ds-chip--active,
.ds-chip[aria-selected="true"] {
  border-color: var(--c-brand);
  background: var(--c-brand);
  color: #fff;
  font-weight: var(--fw-medium);
}

.ds-chip--square { border-radius: var(--r-md); }

/* Иконка слева в chip (whoask из БД WhoAsk.icon).
   Размер 44px — чтобы картинка была чётко видна и тап-зона комфортнее. */
.ds-chip--with-icon {
  padding: 8px 20px 8px 10px;
  font-size: 16px;
  gap: 12px;
}
.ds-chip__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Иконка в radio-pill визарда (problem из БД Problem.icon) — тот же
   увеличенный формат, чтобы визуально соответствовать chip'ам whoask. */
.ds-wizard-pill__inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.ds-wizard-pill__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.ds-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 24px;
}

.ds-chip-row--start { justify-content: flex-start; }

/* ── Tab-panel: плавный fade при смене вкладки (HTMX swap) ──── */
.ds-tab-panel { animation: ds-tab-fade-in 180ms ease-out; }
@keyframes ds-tab-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Главная: микро-анимация intro-баблов ────────────────────────
   Первые 6 прямых children #chat-stream (4 бабла + блок чипов +
   финальный CTA-бабл) появляются «один за другим» с лёгким fade-up.
   Создаёт эффект «Никита печатает в реальном времени» без
   раздражающей дёрганости.

   nth-child(-n+6) — ограничивает анимацию ТОЛЬКО начальными элементами.
   Динамически добавленные после (pending user-bubble от anon-composer,
   ответы HTMX) уже не получают delay — иначе они появлялись бы
   с большой задержкой и казались зависшими.

   prefers-reduced-motion: respect — для пользователей с настройкой
   «уменьшить движение» (вестибулярные расстройства) интро мгновенное. */
@media (prefers-reduced-motion: no-preference) {
  #chat-stream > :nth-child(-n+6) {
    animation: ds-bubble-intro 300ms ease-out backwards;
  }
  #chat-stream > :nth-child(1) { animation-delay: 0ms; }
  #chat-stream > :nth-child(2) { animation-delay: 120ms; }
  #chat-stream > :nth-child(3) { animation-delay: 240ms; }
  #chat-stream > :nth-child(4) { animation-delay: 360ms; }
  #chat-stream > :nth-child(5) { animation-delay: 480ms; }
  #chat-stream > :nth-child(6) { animation-delay: 600ms; }
}

@keyframes ds-bubble-intro {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Auth-pages: единый стиль для login / forgot / reset ─────── */
.ds-auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}
.ds-auth-header__title {
  margin: 14px 0 4px;
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  color: var(--c-text);
}
.ds-auth-header__sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--c-text-secondary);
}
.ds-auth-icon {
  width: 64px; height: 64px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ebe3f3 0%, #d6c9e7 100%);
  color: var(--c-brand-active);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-auth-info {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--c-brand-softer);
  border: 1px solid var(--c-brand-accent);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}
.ds-auth-info strong { color: var(--c-text); font-weight: var(--fw-medium); }

/* auth-input / auth-label / auth-field — единый стиль (раньше был
   в inline <style> login.html). Используется и в forgot_password. */
.auth-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.auth-input:focus { border-color: var(--c-brand-accent); box-shadow: var(--shadow-focus); }
.auth-field { margin-bottom: 14px; }
.auth-label { display: block; font-size: 12.5px; color: var(--c-text-secondary); margin-bottom: 6px; }
.alert-msg {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 12px;
}
.alert-msg.error {
  background: #fdf0ef;
  border: 1px solid #f3c7c4;
  color: var(--c-danger);
}

/* ── Условия отмены: timeline + cards + channels ─────────────── */
.ds-cancel-timeline {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  padding: 22px 26px 20px;
  margin-bottom: 12px;
}
.ds-cancel-timeline__zones {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 10px;
  font-size: 13px;
  font-weight: var(--fw-medium);
}
.ds-cancel-timeline__label--ok { color: #16a34a; }
.ds-cancel-timeline__label--bad { color: #dc4538; }
.ds-cancel-timeline__bar {
  position: relative;
  height: 3px;
  border-radius: 999px;
  display: flex;
  overflow: visible;
}
.ds-cancel-timeline__seg { height: 3px; border-radius: 999px; }
.ds-cancel-timeline__seg--ok { flex: 1.4; background: #16a34a; }
.ds-cancel-timeline__seg--bad { flex: 1; background: #dc4538; }
.ds-cancel-timeline__marker {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--c-surface);
  border: 2px solid var(--c-text-muted);
  transform: translate(-50%, -50%);
}
.ds-cancel-timeline__marker--mid { left: calc(100% * 1.4 / 2.4); border-color: #888; }
.ds-cancel-timeline__marker--end { left: 100%; border-color: var(--c-text); }
.ds-cancel-timeline__points {
  position: relative;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--c-text-secondary);
  min-height: 18px;
}
.ds-cancel-timeline__point { position: absolute; transform: translateX(-50%); }
.ds-cancel-timeline__point--mid { left: calc(100% * 1.4 / 2.4); }
.ds-cancel-timeline__point--end { left: 100%; transform: translateX(-100%); }

/* Сетка 3 карточек условий */
.ds-cancel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
.ds-cancel-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ds-cancel-card::before {
  content: "";
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 3px;
  border-radius: 0 0 3px 3px;
}
.ds-cancel-card--ok::before { background: #16a34a; }
.ds-cancel-card--bad::before { background: #dc4538; }
.ds-cancel-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}
.ds-cancel-card__meta { font-size: 12.5px; color: var(--c-text-muted); }
.ds-cancel-card__title { margin: 0; font-size: 16px; font-weight: var(--fw-medium); color: var(--c-text); }
.ds-cancel-card__body { margin: 0; font-size: 13.5px; color: var(--c-text-secondary); line-height: 1.55; }

.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: var(--fw-medium);
}
.ds-badge--ok { background: rgba(22, 163, 74, 0.10); color: #16a34a; }
.ds-badge--bad { background: rgba(220, 69, 56, 0.10); color: #dc4538; }

@media (max-width: 768px) {
  .ds-cancel-grid { grid-template-columns: 1fr; }
  .ds-cancel-timeline { padding: 16px 18px; }
}

/* Каналы отмены */
.ds-cancel-channels {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.ds-cancel-channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.ds-cancel-channel:not(.ds-cancel-channel--static):hover {
  border-color: var(--c-brand-accent);
  background: var(--c-brand-softer);
}
.ds-cancel-channel:not(.ds-cancel-channel--static):hover .ds-cancel-channel__icon {
  background: var(--c-brand);
  color: #fff;
  transition: background var(--t-fast), color var(--t-fast);
}
.ds-cancel-channel__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--c-brand-softer);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ds-cancel-channel__body { flex: 1; min-width: 0; }
.ds-cancel-channel__cap { font-size: 12px; color: var(--c-text-muted); margin-bottom: 2px; }
.ds-cancel-channel__val { font-size: 15px; font-weight: var(--fw-medium); color: var(--c-text); }
.ds-cancel-channel__hint { font-size: 12.5px; color: var(--c-text-muted); text-align: right; flex-shrink: 0; max-width: 200px; }

@media (max-width: 640px) {
  .ds-cancel-channel { flex-wrap: wrap; }
  .ds-cancel-channel__hint { width: 100%; text-align: left; padding-left: 54px; max-width: none; }
}

/* Подсказка про перенос */
.ds-cancel-note {
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--c-brand-softer);
  border-radius: var(--r-xl);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}
.ds-cancel-note__icon { color: var(--c-brand); flex-shrink: 0; padding-top: 1px; }
.ds-cancel-note strong { color: var(--c-text); font-weight: var(--fw-medium); }

/* ── FAQ: блок «Не нашли ответ?» ──────────────────────────────── */
.ds-faq-help {
  margin-top: 32px;
  padding: 22px 24px;
  background: var(--c-brand-softer);
  border-radius: var(--r-2xl);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ds-faq-help__icon {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-brand);
  flex-shrink: 0;
}
.ds-faq-help__body { flex: 1; min-width: 200px; }
.ds-faq-help__title { font-size: 15px; font-weight: var(--fw-medium); color: var(--c-text); margin-bottom: 4px; }
.ds-faq-help__sub { font-size: 13.5px; color: var(--c-text-secondary); }
@media (max-width: 768px) {
  .ds-faq-help { flex-direction: column; align-items: stretch; text-align: center; }
  .ds-faq-help__icon { margin: 0 auto; }
  .ds-faq-help__body { text-align: center; }
  .ds-faq-help__cta { width: 100%; justify-content: center; }
}

/* ── Подзаголовок секции (Базовое образование / Курсы) ──────── */
.ds-subhead {
  /* auto по бокам — чтобы при использовании в .ds-layout__content--centered > *
     не «улетал» влево из-за переопределения margin-left/right у родителя. */
  margin: 18px auto 12px;
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.005em;
}

/* ── Карточка с фото диплома (клик увеличивает) ──────────────── */
.ds-edu-card { display: flex; flex-direction: column; }
.ds-edu-card__photo {
  display: block;
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, var(--c-brand-softer), var(--c-brand-soft));
  border-radius: var(--r-md);
  overflow: hidden;
  margin: -4px -4px 12px;
  cursor: zoom-in;
}
.ds-edu-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-edu-card__thumb {
  display: block;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-brand-softer), var(--c-brand-soft));
  cursor: zoom-in;
}
.ds-edu-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Информационные пилюли (для контактов / маршрута) ────────── */
.ds-info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ds-info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
  font-size: 12.5px;
  border-radius: 999px;
  white-space: nowrap;
}
.ds-info-pill .ds-icon { color: var(--c-brand); flex-shrink: 0; }

/* ── Документы: карточки списка ───────────────────────────────── */
.ds-docs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}
.ds-doc-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ds-doc-card__link {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  text-decoration: none;
  /* Кликабельная подложка — sr-only текст не нужен, aria-label выше */
}
.ds-doc-card > *:not(.ds-doc-card__link) {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.ds-doc-card .ds-doc-card__btn--pdf,
.ds-doc-card .ds-doc-card__btn--read,
.ds-doc-card .ds-doc-card__actions {
  pointer-events: auto;
}
.ds-doc-card:hover {
  border-color: var(--c-brand-accent);
  box-shadow: 0 4px 16px rgba(112, 81, 174, 0.08);
}
.ds-doc-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--c-brand-softer);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ds-doc-card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
}
.ds-doc-card__sub {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--c-text-secondary);
}
.ds-doc-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--c-text-muted);
}
.ds-doc-card__meta strong { color: var(--c-text); font-weight: var(--fw-medium); }
.ds-doc-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.ds-doc-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.ds-doc-card__btn--read {
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
}
.ds-doc-card__btn--read:hover { background: var(--c-brand-soft); }
.ds-doc-card__btn--pdf {
  background: var(--c-surface);
  border-color: var(--c-border);
  color: var(--c-text-secondary);
}
.ds-doc-card__btn--pdf:hover {
  background: var(--c-brand-softer);
  border-color: var(--c-brand-accent);
  color: var(--c-brand-active);
}

.ds-docs-help {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--c-brand-softer);
  border-radius: var(--r-xl);
  font-size: 13.5px;
  color: var(--c-text-secondary);
  line-height: 1.5;
}
.ds-docs-help > .ds-icon { color: var(--c-brand); flex-shrink: 0; }
.ds-docs-help a { color: var(--c-brand-hover); font-weight: var(--fw-medium); }

@media (max-width: 720px) {
  .ds-doc-card { grid-template-columns: 40px 1fr; gap: 12px; }
  .ds-doc-card__icon { width: 40px; height: 40px; }
  .ds-doc-card__actions { grid-column: 1 / -1; justify-content: stretch; }
  .ds-doc-card__btn { flex: 1; }
}

/* ── Фотоинструкция «Как добраться» — кнопки карт-сервисов ────── */
.ds-road-routes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.ds-road-route {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ds-road-route:hover { border-color: var(--c-brand-accent); background: var(--c-brand-softer); }

/* ── Фотоинструкция «Как добраться» ───────────────────────────── */
.ds-road-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 18px auto 32px;
  width: 100%;
  /* max-width задаётся родителем .ds-layout__content--centered > * → 1080px;
     margin: auto — чтобы блок центрировался так же, как шапка/page-intro
     и попадал с ней в одну вертикальную линию. */
}
.ds-road-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  width: 100%;
}
.ds-road-card__body {
  padding-top: 12px;
}
.ds-road-card__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-brand-softer), var(--c-brand-soft));
}
.ds-road-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ds-road-card__num {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--c-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--fw-medium);
  box-shadow: 0 4px 12px rgba(112, 81, 174, 0.30);
  z-index: 1;
}
.ds-road-card__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 4px;
}
.ds-road-card__cat {
  font-size: 11.5px;
  color: var(--c-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: var(--fw-medium);
}
.ds-road-card__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.ds-road-card__desc {
  margin: 0;
  font-size: 15px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}
.ds-road-help {
  margin: 0 auto;
  padding: 16px 22px;
  background: var(--c-brand-softer);
  border-radius: var(--r-xl);
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}
.ds-road-help__title {
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin-bottom: 2px;
}
.ds-road-help__body { font-size: 14px; }
.ds-road-help a {
  color: var(--c-brand-hover);
  font-weight: var(--fw-medium);
}
@media (max-width: 720px) {
  .ds-road-card { grid-template-columns: 1fr; gap: 14px; }
  .ds-road-card__title { font-size: 18px; }
}

/* ── Услуги: список и detail ───────────────────────────────────── */
.ds-page-intro { margin-bottom: 28px; }
.ds-page-intro__title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.ds-page-intro__sub {
  margin: 0;
  font-size: 15px;
  color: var(--c-text-secondary);
  line-height: 1.55;
  max-width: 580px;
}

.ds-service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ds-service-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(45, 42, 50, 0.03);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ds-service-row:hover {
  border-color: var(--c-brand-accent, #9579bf);
  box-shadow: 0 4px 16px rgba(112, 81, 174, 0.10);
}
.ds-service-row__mark { flex-shrink: 0; }
.ds-service-row__body { flex: 1; min-width: 0; }
.ds-service-row__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.ds-service-row__title {
  font-size: 16.5px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
}
.ds-service-row__pill {
  font-size: 12px;
  color: var(--c-text-muted);
  padding: 2px 8px;
  background: #f3f1f5;
  border-radius: 999px;
}
.ds-service-row__desc {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--c-text-secondary);
  line-height: 1.45;
}
.ds-service-row__meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--c-brand-active, #5d4293);
  font-weight: var(--fw-medium);
}
.ds-service-row__sep { color: #d6c9e7; }
.ds-service-row__arrow {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--c-brand-accent, #9579bf);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-service-hint {
  margin-top: 22px;
  padding: 18px 22px;
  background: var(--c-brand-softer);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--c-brand-active);
  line-height: 1.5;
}
.ds-service-hint__icon { color: var(--c-brand); flex-shrink: 0; display: inline-flex; }
.ds-service-hint__link {
  color: var(--c-brand);
  font-weight: var(--fw-medium);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Service detail ───────────────────────────────────────────── */
/* Обёртка над back-pill: расширяется до 1080px (через .ds-layout__content--centered > *),
   а сама пилюля сидит у левого края, выровненная с контентной карточкой ниже. */
.ds-back-row {
  margin-bottom: 24px;
}
.ds-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-brand-active);
  font-size: 13px;
  text-decoration: none;
}
.ds-back-pill:hover { background: var(--c-brand-softer); }

.ds-service-detail {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.ds-service-detail__mark {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-service-detail__pill {
  display: inline-block;
  padding: 4px 10px;
  background: var(--c-brand-soft, #ebe3f3);
  color: var(--c-brand-active);
  font-size: 12px;
  font-weight: var(--fw-medium);
  border-radius: 999px;
  margin-bottom: 10px;
}
.ds-service-detail__title {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
  color: var(--c-text);
}
.ds-service-detail__desc {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text-secondary);
}
.ds-service-detail__cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ds-service-detail__cta-btn {
  padding: 12px 18px;
  border-radius: var(--r-lg);
  font-size: 14px;
  justify-content: center;
}
@media (max-width: 480px) {
  .ds-service-detail__cta { grid-template-columns: 1fr; }
}

.ds-service-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 18px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  margin-bottom: 22px;
}
.ds-service-metrics > div { padding: 4px 16px; border-left: 1px solid var(--c-border-soft); }
.ds-service-metrics > div:first-child { padding-left: 0; border-left: none; }
.ds-service-metrics__sep { display: none; }
.ds-service-metrics__label {
  font-size: 11.5px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.ds-service-metrics__value {
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
}

.ds-service-stages { margin-top: 36px; }
.ds-service-stages__title {
  font-size: 13px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  font-weight: var(--fw-medium);
}
.ds-service-stages__timeline {
  position: relative;
  padding-left: 26px;
}
.ds-service-stages__timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 1.5px;
  background: linear-gradient(180deg, #d6c9e7 0%, #ebe3f3 100%);
}
.ds-service-stages__step {
  position: relative;
  margin-bottom: 18px;
}
.ds-service-stages__num {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-brand-accent, #9579bf);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
}
.ds-service-stages__step-title {
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin-bottom: 4px;
}
.ds-service-stages__step-body {
  margin: 0;
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}

/* ─── Контакты: страница «Как добраться» — крупный блок адреса ── */

.ds-road-address {
  margin-top: 4px;
  padding: 16px 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ds-road-address__addr {
  font-size: 16px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
}
.ds-road-address__clinic {
  font-size: 13px;
  color: var(--c-text-muted);
}
.ds-road-address .ds-place-card__metro {
  margin-top: 6px;
}

/* ─── Контакты: центр + метро-бейджи + подзаголовок маршрута ──── */

.ds-place-card__clinic {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-top: 4px;
}

.ds-place-card__metro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--c-text-secondary);
}
.ds-metro-station {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ds-metro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1;
  flex-shrink: 0;
}
.ds-metro-sep { color: var(--c-text-muted); }
.ds-metro-walk { color: var(--c-text-muted); }

.ds-contacts-route-sub {
  margin: -6px 0 12px;
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* ─── Лайтбокс для фото (дипломы, кабинет) ─────────────────────── */

.ds-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 28, 0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 24px;
}
.ds-lightbox--open { display: flex; }
.ds-lightbox-lock { overflow: hidden; }

.ds-lightbox__img {
  max-width: min(100%, 1200px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.ds-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.ds-lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }

.ds-lightbox__nav {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  margin: 0 12px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.ds-lightbox__nav:hover { background: rgba(255, 255, 255, 0.22); }
.ds-lightbox--multi .ds-lightbox__nav { display: inline-flex; }

@media (max-width: 720px) {
  .ds-lightbox { padding: 12px; }
  .ds-lightbox__nav { width: 36px; height: 36px; font-size: 22px; margin: 0 4px; }
}

/* ─── Иконка в карточке специализации (about_me/?tab=specializations) */

.ds-spec-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ds-spec-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f3eef9 0%, #ebe1f5 100%);
  color: var(--c-brand);
  flex-shrink: 0;
}
.ds-spec-card__icon .ds-icon { display: block; }

/* ─── Имя терапевта на главной (бабл-приветствие) ─────────────── */

.ds-name-link {
  color: var(--c-brand-hover);
  text-decoration: none;
  border-bottom: 1px dashed var(--c-brand-hover);
}
.ds-name-link:hover { color: var(--c-brand); border-bottom-color: var(--c-brand); }

.ds-name-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  color: var(--c-brand);
  text-decoration: none;
  vertical-align: middle;
  transition: color 0.15s, transform 0.15s;
}
.ds-name-help:hover { color: var(--c-brand-hover); transform: scale(1.1); }
.ds-name-help .ds-icon { display: block; }

/* ─── Detail-блоки страницы услуги ─────────────────────────────── */

/* «Кому подходит / Лучше другой формат» — две колонки */
.ds-service-suitability {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.ds-service-suitability__col {
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
}
.ds-service-suitability__col--yes {
  background: linear-gradient(180deg, #f3eef9 0%, #fbf8fe 100%);
  border-color: #e4d8f1;
}
.ds-service-suitability__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin-bottom: 10px;
  text-transform: none;
}
.ds-service-suitability__col--yes .ds-service-suitability__head { color: var(--c-brand); }
.ds-service-suitability__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: var(--c-brand);
  flex-shrink: 0;
}
.ds-service-suitability__icon--muted { color: var(--c-text-muted); }
.ds-service-suitability__icon .ds-icon { display: block; }
.ds-service-suitability__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.5;
}
.ds-service-suitability__list li {
  padding-left: 14px;
  position: relative;
}
.ds-service-suitability__list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  top: -2px;
  color: var(--c-text-muted);
  font-weight: 700;
}
.ds-service-suitability__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text-secondary);
}

/* «Что будет на первой встрече» — callout */
.ds-service-first {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: 14px;
}
.ds-service-first__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3eef9 0%, #ebe1f5 100%);
  color: var(--c-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ds-service-first__icon .ds-icon { display: block; }
.ds-service-first__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
  font-weight: var(--fw-medium);
  margin-bottom: 6px;
}
.ds-service-first__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
}

/* «Чего не будет» */
.ds-service-whatnot {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--c-bg-chat, #fafafb);
  border: 1px dashed var(--c-border-soft);
}
.ds-service-whatnot__title {
  font-size: 13px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  font-weight: var(--fw-medium);
}
.ds-service-whatnot__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ds-service-whatnot__list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}
.ds-service-whatnot__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  margin-top: 1px;
}
.ds-service-whatnot__icon .ds-icon { display: block; }

/* Отзыв */
.ds-service-review {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
}
.ds-service-review .ds-stars { margin-bottom: 10px; align-items: center; }
.ds-service-review__rating-source {
  color: var(--c-text-muted);
  font-size: 12.5px;
  margin-left: 6px;
}
.ds-service-review__quote {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  font-style: italic;
}
.ds-service-review__author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--c-text-muted);
}
.ds-service-review__more {
  color: var(--c-brand);
  text-decoration: none;
  font-weight: var(--fw-medium);
}
.ds-service-review__more:hover { color: var(--c-brand-hover); }

/* Активный hint в конце страницы услуги */
.ds-service-cta-hint {
  margin-top: 32px;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f3eef9 0%, #fbf8fe 100%);
  border: 1px solid #e4d8f1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.ds-service-cta-hint__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
}

@media (max-width: 720px) {
  .ds-service-detail { grid-template-columns: 1fr; }
  .ds-service-detail__mark { padding: 22px; }
  .ds-service-row { flex-wrap: wrap; }
  .ds-service-row__arrow { display: none; }
  /* На мобиле метрики стеком: каждая на отдельной строке по центру */
  .ds-service-metrics {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 18px;
    text-align: center;
  }
  .ds-service-metrics > div {
    padding: 12px 0;
    border-left: none;
    border-top: 1px solid var(--c-border-soft);
  }
  .ds-service-metrics > div:first-child {
    padding-top: 4px;
    border-top: none;
  }
  .ds-service-metrics__sep { display: none; }
  /* Detail-блоки стеком */
  .ds-service-suitability { grid-template-columns: 1fr; gap: 12px; }
}

/* ── Контакты: 2-колоночная сетка (desktop) ──────────────────── */
.ds-contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.ds-contacts-grid__left { display: flex; flex-direction: column; gap: 20px; }
.ds-contacts-grid__right { position: sticky; top: 24px; }

/* Caption-заголовок секции (caps) */
.ds-contacts-section-cap {
  font-size: 11.5px;
  color: var(--c-text-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin: 4px 0 12px;
  font-weight: var(--fw-medium);
}

/* Phone + Email — 2 карточки в одну строку */
.ds-contacts-headrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ds-contact-head {
  display: block;
  padding: 16px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast);
}
.ds-contact-head:hover { border-color: var(--c-brand-accent); }
.ds-contact-head__cap {
  font-size: 11.5px;
  color: var(--c-text-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: var(--fw-medium);
}
.ds-contact-head__val {
  font-size: 17px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
}

/* Мессенджеры — сетка 2 колонки, цветной квадратик-лого */
.ds-msgr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ds-msgr-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast);
  min-width: 0;
}
.ds-msgr-card:hover { border-color: var(--c-brand-accent); }
.ds-msgr-card__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: var(--fw-medium);
  font-size: 12px;
  flex-shrink: 0;
}
.ds-msgr-card__body { flex: 1; min-width: 0; }
.ds-msgr-card__name { font-size: 14.5px; font-weight: var(--fw-medium); color: var(--c-text); }
.ds-msgr-card__handle { font-size: 12.5px; color: var(--c-text-muted); margin-top: 2px; }
.ds-msgr-card__open { color: var(--c-text-muted); flex-shrink: 0; }

.ds-contacts-meta-notice {
  margin: 6px 0 0;
  padding: 12px 16px;
  background: #fdf8ee;
  border-radius: var(--r-md);
  font-size: 12px;
  color: #8a7a55;
  line-height: 1.5;
}

/* Сотрудничество — заливная brand-карточка */
.ds-coop-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-brand-active, #5d4293) 100%);
  border-radius: var(--r-xl);
  color: #fff;
  text-decoration: none;
  margin-top: 8px;
  transition: filter var(--t-fast), transform var(--t-fast);
}
/* Перебиваем глобальный :where(.ds-shell) a:hover (он красит ссылку в брендовый
   цвет = цвет фона карточки, текст пропадает). Оставляем белый, чуть
   подсвечиваем градиент через brightness. */
.ds-coop-card:hover,
.ds-coop-card:focus-visible,
.ds-coop-card:hover .ds-coop-card__title,
.ds-coop-card:hover .ds-coop-card__sub {
  color: #fff;
}
.ds-coop-card:hover { filter: brightness(1.06); }

.ds-coop-card__title { font-size: 15.5px; font-weight: var(--fw-medium); margin-bottom: 4px; }
.ds-coop-card__sub { font-size: 13.5px; opacity: 0.88; line-height: 1.45; }
.ds-coop-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.30);
  color: #fff;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.ds-coop-card:hover .ds-coop-card__cta { background: rgba(255,255,255,0.24); color: #fff; }

/* ── Coop v2: hero / status pill / sections ──────────────────── */
.ds-coop-hero {
  padding: 40px 44px;
  background: linear-gradient(135deg, var(--c-brand-softer) 0%, var(--c-surface) 100%);
  border-radius: var(--r-2xl);
  margin-bottom: 36px;
}
.ds-coop-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin-bottom: 18px;
}
.ds-coop-status__dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.18);
}
.ds-coop-hero__title {
  margin: 0 0 12px;
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 720px;
}
.ds-coop-hero__sub {
  margin: 0 0 22px;
  font-size: 15.5px;
  color: var(--c-text-secondary);
  line-height: 1.6;
  max-width: 680px;
}
.ds-coop-hero__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ds-coop-hero__mail { font-size: 13.5px; color: var(--c-text-muted); }
.ds-coop-hero__mail a { color: var(--c-brand-hover); font-weight: var(--fw-medium); }

/* auto по бокам — иначе .ds-layout__content--centered > * margin auto
   перебивается, и заголовок «улетает» к левому краю широкого main. */
.ds-coop-section-title {
  margin: 36px auto 4px;
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.015em;
}
.ds-coop-section-sub {
  margin: 0 auto 18px;
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}

/* ── Coop форматы: 2×2 карточки с буллетами и CTA ─────────────── */
.ds-coop-formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ds-coop-format {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.ds-coop-format:hover { border-color: var(--c-brand-accent); }
.ds-coop-format__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ds-coop-format__icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--c-brand-softer);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ds-coop-format__audience {
  font-size: 11.5px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--fw-medium);
}
.ds-coop-format__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.ds-coop-format__body {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}
.ds-coop-format__bullets {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ds-coop-format__bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--c-text);
  line-height: 1.45;
}
.ds-coop-format__bullets li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--c-brand);
}
.ds-coop-format__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
  font-size: 13px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  align-self: flex-start;
  margin-top: auto;
  transition: background var(--t-fast);
}
.ds-coop-format__cta:hover { background: var(--c-brand-soft); color: var(--c-brand-active); }

/* ── Coop опыт в цифрах: 4 stat-карточки ─────────────────────── */
.ds-coop-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ds-coop-number {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  padding: 22px 20px;
}
.ds-coop-number__value {
  font-size: 28px;
  font-weight: var(--fw-medium);
  color: var(--c-brand);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.05;
}
.ds-coop-number__label {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.4;
}

/* ── Coop «Как будем работать»: 4 шаговых карточки ───────────── */
.ds-coop-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ds-coop-step {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  padding: 20px 22px;
}
.ds-coop-step__num {
  font-size: 22px;
  font-weight: var(--fw-medium);
  color: var(--c-brand);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.ds-coop-step__title {
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin-bottom: 6px;
}
.ds-coop-step__body {
  margin: 0;
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.5;
}

/* ── Coop нижний CTA-блок (большой фиолетовый) ───────────────── */
.ds-coop-cta {
  margin-top: 36px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-brand-active, #5d4293) 100%);
  border-radius: var(--r-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  flex-wrap: wrap;
}
.ds-coop-cta__title {
  font-size: 20px;
  font-weight: var(--fw-medium);
  margin-bottom: 6px;
}
.ds-coop-cta__sub {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.9;
  max-width: 560px;
}
.ds-coop-cta__sub a { color: #fff; text-decoration: underline; text-underline-offset: 2px; font-weight: var(--fw-medium); }
.ds-coop-cta__sub a:hover { color: #fff; opacity: 0.85; }
.ds-coop-cta__buttons { display: flex; gap: 10px; flex-shrink: 0; }
.ds-coop-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--c-brand-active);
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: filter var(--t-fast);
}
.ds-coop-cta__btn:hover { filter: brightness(0.96); color: var(--c-brand-active); }
.ds-coop-cta__btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.ds-coop-cta__btn--ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

@media (max-width: 768px) {
  .ds-coop-hero { padding: 28px 22px; }
  .ds-coop-hero__title { font-size: var(--fs-2xl); }
  .ds-coop-formats { grid-template-columns: 1fr; }
  .ds-coop-numbers { grid-template-columns: repeat(2, 1fr); }
  .ds-coop-steps { grid-template-columns: 1fr; }
  .ds-coop-cta { flex-direction: column; align-items: stretch; padding: 24px 22px; }
  .ds-coop-cta__buttons { flex-direction: column; }
  .ds-coop-cta__btn { justify-content: center; }
}

/* Очный приём — карточка */
.ds-place-card {
  padding: 22px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
}
.ds-place-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.ds-place-card__cap {
  font-size: 11.5px;
  color: var(--c-text-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: var(--fw-medium);
}
.ds-place-card__pill {
  padding: 4px 10px;
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.ds-place-card__addr {
  font-size: 18px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  line-height: 1.35;
  margin-bottom: 2px;
}
.ds-place-card__metro {
  font-size: 13.5px;
  color: var(--c-text-secondary);
  margin-bottom: 16px;
}
.ds-place-card__photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.ds-place-card__photo {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, #d6c9e7, #b6a1d4);
  cursor: zoom-in;
}
.ds-place-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-place-card__photo:hover img { transform: scale(1.04); transition: transform 0.3s ease; }
.ds-place-card__main-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--c-brand-softer);
  border-radius: var(--r-xl);
  color: var(--c-brand-active);
  font-size: 14px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: background var(--t-fast);
}
.ds-place-card__main-cta:hover { background: var(--c-brand-soft); color: var(--c-brand-active); }

/* Список карт-сервисов */
.ds-routes-list { display: flex; flex-direction: column; gap: 8px; }
.ds-route-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast);
}
.ds-route-row:hover { border-color: var(--c-brand-accent); }
.ds-route-row__logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: 13.5px;
  flex-shrink: 0;
}
.ds-route-row__logo--brand { background: transparent; padding: 0; }
.ds-route-row__logo--brand svg { display: block; }
.ds-route-row__body { flex: 1; min-width: 0; }
.ds-route-row__name { font-size: 14.5px; font-weight: var(--fw-medium); color: var(--c-text); }
.ds-route-row__sub { font-size: 12.5px; color: var(--c-text-muted); margin-top: 2px; }
.ds-route-row__arrow { color: var(--c-text-muted); flex-shrink: 0; }

@media (max-width: 900px) {
  /* На мобиле «разворачиваем» левую колонку через display:contents — её
     дети становятся прямыми элементами .ds-contacts-grid, и тогда coop-card
     можно отправить в самый низ через order:99 (после очного приёма).
     На десктопе coop-card сидит внутри левой колонки нормально. */
  .ds-contacts-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .ds-contacts-grid__left { display: contents; }
  .ds-contacts-grid__right { position: static; order: 50; }
  .ds-contacts-grid .ds-coop-card { order: 99; }
  .ds-contacts-headrow { grid-template-columns: 1fr; }
  .ds-msgr-grid { grid-template-columns: 1fr; }
  .ds-place-card__photos { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Мобильный: route-row (контакты) и road-route (как добраться)
       на всю ширину экрана, чтобы тапать удобнее ─────────────── */
@media (max-width: 720px) {
  .ds-route-row { padding: 14px 16px; }
  .ds-route-row__logo { width: 38px; height: 38px; }
  .ds-route-row__name { font-size: 15px; }

  .ds-road-routes { flex-direction: column; gap: 8px; }
  .ds-road-route {
    width: 100%;
    padding: 12px 16px;
    justify-content: flex-start;
    border-radius: var(--r-lg);
    font-size: 15px;
  }
}

/* ── OTP-карточка (4-значный код после отправки email) ──────── */
.ds-otp-card {
  /* 540px — чтобы текст под заголовком ложился в 2 строки на десктопе
     (было 440px → 4 строки, читалось ступенькой). */
  max-width: 540px;
  margin: 40px auto;
  padding: 36px 32px 28px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-2xl);
  text-align: center;
}
.ds-otp-card__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.ds-otp-card__sub {
  margin: 0 0 22px;
  font-size: 14.5px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}
.ds-otp-card__info {
  margin: 0 0 14px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--c-online, #16a34a);
  background: rgba(22, 163, 74, 0.08);
  border-radius: var(--r-md);
}
.ds-otp-card__error {
  margin: 0 0 14px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--c-danger);
  background: #fdf0ef;
  border: 1px solid #f3c7c4;
  border-radius: var(--r-md);
}
.ds-otp-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ds-otp-cells {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.ds-otp-cell {
  width: 52px;
  height: 60px;
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-text);
  font-family: "Roboto Mono", Consolas, monospace;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ds-otp-cell:focus { border-color: var(--c-brand-accent); box-shadow: var(--shadow-focus); }
.ds-otp-form__submit {
  min-width: 200px;
  justify-content: center;
}
.ds-otp-form__links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--c-text-muted);
}
.ds-otp-form__link {
  background: none;
  border: none;
  color: var(--c-brand-active);
  font-size: 13px;
  padding: 4px 6px;
  cursor: pointer;
  font-family: inherit;
}
.ds-otp-form__link:hover { color: var(--c-brand); }
.ds-otp-form__link:disabled { color: var(--c-text-muted); cursor: not-allowed; }
.ds-otp-form__sep { color: var(--c-text-muted); }

/* ── Wizard: финальная карточка «Опрос пройден» ────────────────── */
.ds-wizard-done {
  max-width: 480px;
  margin: 40px auto;
  padding: 36px 32px 32px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-2xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.ds-wizard-done__title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.01em;
  text-align: center;
}
.ds-wizard-done__sub {
  margin: 0 0 22px;
  font-size: 14.5px;
  color: var(--c-text-secondary);
  line-height: 1.6;
  text-align: center;
}
.ds-wizard-done__cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Centered email-форма внутри done-карточки */
.ds-done-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.ds-done-form__input {
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text);
  outline: none;
  text-align: center;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ds-done-form__input:focus { border-color: var(--c-brand-accent); box-shadow: var(--shadow-focus); }
.ds-done-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--c-text-secondary);
  cursor: pointer;
  line-height: 1.45;
}
.ds-done-form__consent input { margin-top: 3px; flex-shrink: 0; }
.ds-done-form__submit {
  align-self: center;
  min-width: 200px;
  justify-content: center;
}
.ds-done-form__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  font-size: 12px;
  color: var(--c-text-muted);
}
.ds-done-form__divider::before,
.ds-done-form__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--c-border);
}
.ds-done-form__oauth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Wizard: полная замена chat-stream опросной панелью ──────── */
.ds-wizard {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border-radius: var(--r-2xl);
  border: 1px solid var(--c-border-soft);
  overflow: hidden;
  margin: 0 auto;
  max-width: var(--w-content-chat);
  min-height: 560px;
}
.ds-wizard__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--c-border-soft);
}
.ds-wizard__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-secondary);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}
.ds-wizard__back:hover { background: var(--c-brand-softer); color: var(--c-brand); }
.ds-wizard__title { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: center; }
.ds-wizard__name { font-size: 13px; color: var(--c-text); font-weight: var(--fw-medium); }
.ds-wizard__progress { display: flex; gap: 4px; }
.ds-wizard__step {
  width: 32px; height: 4px; border-radius: 2px;
  background: var(--c-border);
}
.ds-wizard__step--done { background: var(--c-brand); }
.ds-wizard__step--current { background: var(--c-brand-accent, #d6c9e7); }
.ds-wizard__count { font-size: 12px; color: var(--c-text-muted); white-space: nowrap; }

.ds-wizard__body {
  padding: 28px 28px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ds-wizard__system {
  align-self: center;
  font-size: 12px;
  color: var(--c-text-secondary);
  font-style: italic;
  padding: 5px 14px;
  background: var(--c-brand-softer);
  border-radius: 999px;
  margin-bottom: 18px;
}
.ds-wizard__question {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  text-align: center;
  letter-spacing: -0.01em;
}
.ds-wizard__hint {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--c-text-secondary);
  text-align: center;
}

.ds-wizard__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 0 auto 22px;
  max-width: 640px;
}
.ds-wizard__list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.ds-wizard__list--column { flex-direction: column; align-items: stretch; max-width: 560px; margin-left: auto; margin-right: auto; }

.ds-wizard-tile { cursor: pointer; }
.ds-wizard-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ds-wizard-tile__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  font-size: 12px;
  transition: all var(--t-fast);
}
.ds-wizard-tile:hover .ds-wizard-tile__inner {
  border-color: var(--c-brand-accent);
  background: var(--c-brand-softer);
}
.ds-wizard-tile input:checked + .ds-wizard-tile__inner {
  border-color: var(--c-brand);
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
  box-shadow: 0 0 0 2px rgba(112,81,174,0.12);
}
.ds-wizard-tile__label { font-weight: var(--fw-medium); }

.ds-wizard-pill { cursor: pointer; }
.ds-wizard-pill input { position: absolute; opacity: 0; pointer-events: none; }
.ds-wizard-pill__inner {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 14px;
  transition: all var(--t-fast);
}
.ds-wizard-pill--block .ds-wizard-pill__inner {
  display: flex;
  border-radius: var(--r-lg);
  text-align: left;
  white-space: normal;
}
.ds-wizard-pill:hover .ds-wizard-pill__inner {
  border-color: var(--c-brand-accent);
  background: var(--c-brand-softer);
}
.ds-wizard-pill input:checked + .ds-wizard-pill__inner {
  border-color: var(--c-brand);
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
  box-shadow: 0 0 0 2px rgba(112,81,174,0.12);
}

.ds-wizard__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0 22px;
  margin-top: auto;
  border-top: 1px solid var(--c-border-soft);
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 28px;
  padding-right: 28px;
}
.ds-wizard__skip {
  background: transparent;
  border: none;
  color: var(--c-text-muted);
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
}
.ds-wizard__skip:hover { color: var(--c-brand); }
.ds-wizard__next { padding: 12px 28px; }

@media (max-width: 720px) {
  .ds-wizard { min-height: 0; }
  .ds-wizard__grid { grid-template-columns: repeat(3, 1fr); }
  .ds-wizard__header { padding: 12px 14px; }
  .ds-wizard__body { padding: 20px 16px 0; }
  .ds-wizard__footer { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

/* ── Опросная плашка с прогрессом и «Пропустить» ──────────────── */
.ds-survey-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  margin: 0 auto 14px;
  max-width: 560px;
  background: var(--c-brand-softer, #f5f1fa);
  border: 1px solid var(--c-brand-accent, #d6c9e7);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--c-text-secondary, #6e6b74);
}
.ds-survey-bar__label { font-weight: var(--fw-medium); color: var(--c-brand, #5d4293); white-space: nowrap; }
.ds-survey-bar__progress { display: flex; gap: 3px; flex: 1; }
.ds-survey-bar__step { flex: 1; height: 3px; border-radius: 2px; background: #eae6f0; }
.ds-survey-bar__step--done { background: var(--c-brand, #7051ae); }
.ds-survey-bar__step--current { background: var(--c-brand-accent, #d6c9e7); }
.ds-survey-bar__skip {
  background: transparent;
  border: none;
  color: var(--c-text-muted, #8a8693);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: none;
  white-space: nowrap;
}
.ds-survey-bar__skip:hover { color: var(--c-brand, #5d4293); }

/* Glyph-tile — для генератора эмоций */
.ds-glyph-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  font-size: 12px;
  transition: all var(--t-fast);
  cursor: pointer;
}

.ds-glyph-tile:hover {
  border-color: var(--c-brand-accent);
  background: var(--c-brand-softer);
}

.ds-glyph-tile[aria-pressed="true"] {
  border-color: var(--c-brand-accent);
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
}

.ds-glyph-tile__icon {
  width: 26px;
  height: 26px;
  color: var(--c-brand);
}

.ds-glyph-tile__emoji-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-glyph-tile__emoji {
  width: 40px;
  height: 40px;
  display: block;
  pointer-events: none;
}

.ds-glyph-tile__emoji--native {
  font-size: 34px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
               "Noto Color Emoji", "Twemoji Mozilla", system-ui, sans-serif;
}

.ds-glyph-tile--square { border-radius: var(--r-lg); }

.ds-glyph-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 20px 0 28px;
}

@media (max-width: 640px) {
  .ds-glyph-grid { grid-template-columns: repeat(3, 1fr); }
}

/* CTA-card — карточка-приглашение */
.ds-cta-card {
  border-radius: var(--r-2xl);
  background: var(--c-surface);
  border: 1px solid var(--c-border-brand);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-width: 420px;
  margin: 12px auto;
}

.ds-cta-card__stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--c-brand-decor) 0%, var(--c-brand-accent) 50%, var(--c-brand) 100%);
}

.ds-cta-card__body {
  padding: 18px 20px;
  text-align: center;
}

.ds-cta-card__title {
  color: var(--c-text);
  font-weight: var(--fw-medium);
  font-size: var(--fs-md);
  margin: 0 0 4px;
}

.ds-cta-card__sub {
  color: var(--c-text-secondary);
  font-size: 13px;
  margin: 0 0 14px;
}

/* ─── 6. Composer ──────────────────────────────────────────────── */
.ds-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.ds-composer:focus-within {
  border-color: var(--c-brand-pending);
  box-shadow: var(--shadow-focus);
}

.ds-composer__input {
  flex: 1;
  padding: 9px 10px;
  color: var(--c-text);
  font-size: var(--fs-base);
  min-height: 22px;
  max-height: 160px;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  background: transparent;
  line-height: var(--lh-normal);
}

.ds-composer__input::placeholder {
  color: var(--c-text-muted);
}

.ds-composer__send {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  background: var(--c-brand-soft);
  color: var(--c-brand-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-fast), color var(--t-fast);
}

.ds-composer__send--active,
.ds-composer:focus-within .ds-composer__send {
  background: var(--c-brand);
  color: var(--c-text-on-brand);
}

.ds-composer__hint {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--c-text-muted);
  text-align: center;
}

/* ─── 7. Navigation ────────────────────────────────────────────── */
.ds-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.ds-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--c-text);
  text-decoration: none;
  transition: background var(--t-fast);
  width: 100%;
}

.ds-nav-item:hover {
  background: var(--c-brand-ghost);
  color: var(--c-text);
}

.ds-nav-item[aria-current="page"],
.ds-nav-item--active {
  background: var(--c-brand-soft);
  color: var(--c-brand-active);
}

/* Тонкий разделитель между публичной нав. и auth-блоком (Опросник/Профиль/Выйти). */
.ds-nav__sep {
  height: 1px;
  background: var(--c-border-soft);
  margin: 8px 14px;
  border-radius: 1px;
}

/* «Тихий» пункт (например Выйти) — приглушённый, не должен соревноваться
   с основными пунктами нав по контрастности. */
.ds-nav-item--muted {
  color: var(--c-text-muted);
}
.ds-nav-item--muted .ds-nav-item__icon { color: var(--c-text-muted); }
.ds-nav-item--muted:hover { color: var(--c-text); background: var(--c-brand-ghost); }
.ds-nav-item--muted:hover .ds-nav-item__icon { color: var(--c-text); }

.ds-nav-item__icon {
  width: 18px;
  height: 18px;
  color: var(--c-text-secondary);
  flex-shrink: 0;
}

.ds-nav-item[aria-current="page"] .ds-nav-item__icon,
.ds-nav-item--active .ds-nav-item__icon {
  color: var(--c-brand);
}

.ds-nav-item__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ds-nav-item__label {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
}

.ds-nav-item[aria-current="page"] .ds-nav-item__label,
.ds-nav-item--active .ds-nav-item__label {
  font-weight: var(--fw-medium);
}

.ds-nav-item__hint {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  margin-top: 1px;
}

.ds-nav-item__indicator {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--c-brand);
  flex-shrink: 0;
}

/* Sidebar header / footer */
.ds-sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--c-border-soft);
}

.ds-sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--c-border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── 7b. Bottom-bar (sticky на контентных страницах) ─────────── */
.ds-bottom-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(253, 252, 253, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-border-soft);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  z-index: var(--z-sticky);
}

.ds-bottom-bar > * { flex: 1; }
.ds-bottom-bar > .ds-btn--icon { flex: 0 0 auto; }

/* На desktop bottom-bar не нужен — sidebar содержит CTA «Записаться» и «Войти». */
@media (min-width: 1024px) {
  .ds-bottom-bar { display: none; }
}

/* ─── 8. Buttons ───────────────────────────────────────────────── */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.ds-btn--primary {
  background: var(--c-brand);
  color: var(--c-text-on-brand);
}

.ds-btn--primary:hover {
  background: var(--c-brand-hover);
  color: var(--c-text-on-brand);
}

.ds-btn--secondary {
  background: transparent;
  color: var(--c-brand-hover);
  border-color: #d6c9e7;
}

.ds-btn--secondary:hover {
  background: var(--c-brand-ghost);
  color: var(--c-brand-active);
}

/* Активный secondary (например «Профиль» в footer на /messenger/profile/). */
.ds-btn--secondary-active,
.ds-btn--secondary-active:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand-active);
  border-color: var(--c-brand-accent);
}

/* Тонкий текстовый «Выйти» в footer сайдбара — не должен соревноваться по
   контрастности с CTA «Записаться» / «Профиль». */
.ds-sidebar-footer__exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--c-text-muted);
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.ds-sidebar-footer__exit:hover {
  background: var(--c-brand-ghost);
  color: var(--c-text);
}

.ds-btn--ghost {
  background: transparent;
  color: var(--c-text-secondary);
}

.ds-btn--ghost:hover {
  background: var(--c-brand-ghost);
  color: var(--c-text);
}

.ds-btn--sm {
  padding: 8px 14px;
  font-size: 13.5px;
}

.ds-btn--icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--r-pill);
}

.ds-btn__icon {
  width: 14px;
  height: 14px;
}

/* ─── 9. Utilities ─────────────────────────────────────────────── */
.ds-icon {
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ds-divider {
  height: 1px;
  background: var(--c-border-soft);
  margin: 16px 0;
  border: none;
}

/* Анимация многоточия typing-индикатора */
@keyframes ds-tdot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.ds-typing {
  display: inline-flex;
  gap: 4px;
}

.ds-typing__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--c-brand-pending);
  animation: ds-tdot 1.2s ease-in-out infinite;
}

.ds-typing__dot:nth-child(2) { animation-delay: 0.15s; }
.ds-typing__dot:nth-child(3) { animation-delay: 0.30s; }

/* ─── 10. Контентные страницы ─────────────────────────────────── */

.ds-page-hero {
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, var(--c-brand-softer) 0%, var(--c-brand-soft) 100%);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.ds-section-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin: 32px 0 16px;
  padding: 0 4px;
}

.ds-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--r-pill);
  background: var(--c-brand-soft);
  color: var(--c-brand-active);
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  margin-bottom: 20px;
  transition: background var(--t-fast);
}

.ds-back-link:hover {
  background: var(--c-brand-softer);
  color: var(--c-brand-active);
}

.ds-process-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  padding: 8px 24px;
}

.ds-btn-oauth {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  text-decoration: none;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.ds-btn-oauth > span:not(.ds-btn-oauth__logo) {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ds-btn-oauth:hover {
  background: var(--c-brand-softer, #f5f1fa);
  border-color: var(--c-brand-accent, #d6c9e7);
  color: var(--c-text);
}

.ds-btn-oauth__logo {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.ds-btn-oauth--yandex .ds-btn-oauth__logo {
  background: #fc3f1d;
  border-radius: 999px;
}

.ds-btn-oauth--vk .ds-btn-oauth__logo {
  background: #0077ff;
  border-radius: 4px;
}

.ds-page-hero__kicker {
  font-size: 11px;
  color: var(--c-brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: var(--fw-medium);
  margin-bottom: 8px;
}

.ds-page-hero__title {
  margin: 0;
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.ds-page-hero__sub {
  margin-top: 10px;
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
}

.ds-page-hero__pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(112, 81, 174, 0.18);
  margin-top: 10px;
}

.ds-page-hero__pill strong {
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--c-brand-active);
  letter-spacing: -0.01em;
}

.ds-page-hero__pill span {
  font-size: 12px;
  color: var(--c-text-secondary);
}

.ds-page-hero__photo {
  width: 160px;
  height: 180px;
  border-radius: var(--r-xl);
  object-fit: cover;
}

@media (max-width: 768px) {
  .ds-page-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .ds-page-hero__photo {
    width: 160px;
    height: 180px;
    margin: 0 auto;
  }
  .ds-page-hero__title { font-size: var(--fs-2xl); }

  /* На мобильном desktop-hero не показываем — отдаём место .ds-mhero. */
  .ds-page-hero--desktop { display: none; }
}

/* ─── Mobile hero для «О психологе» (только ≤768px) ──────────────── */
.ds-mhero { display: none; }

@media (max-width: 768px) {
  .ds-mhero {
    display: block;
    margin-bottom: 16px;
    /* Анимация сжатия фото при переходе на другие табы: высота и opacity
       плавно меняются. Перерисовка происходит через HTMX swap (.ds-about-host),
       но .ds-mhero внутри host'а — поэтому swap заменяет .ds-mhero вместе с
       панелью, а CSS-переход срабатывает на change класса --expanded/--collapsed
       при первичной отрисовке. Для надёжности — view-transition. */
    overflow: hidden;
    transition: max-height 320ms ease, margin-bottom 320ms ease;
  }
  .ds-mhero--expanded { max-height: 1200px; }
  .ds-mhero--collapsed { max-height: 72px; margin-bottom: 12px; }

  .ds-mhero__row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: gap 320ms ease;
  }
  .ds-mhero__photo {
    width: 120px;
    height: 132px;
    border-radius: var(--r-xl);
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-brand-softer), var(--c-brand-soft));
    transition: width 320ms ease, height 320ms ease, border-radius 320ms ease;
  }
  .ds-mhero--collapsed .ds-mhero__photo {
    width: 44px;
    height: 44px;
    border-radius: 999px;
  }
  .ds-mhero__info { min-width: 0; flex: 1; }
  .ds-mhero__kicker {
    font-size: 11px;
    color: var(--c-brand);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: var(--fw-medium);
    margin-bottom: 6px;
  }
  .ds-mhero--collapsed .ds-mhero__kicker { display: none; }
  .ds-mhero__title {
    margin: 0;
    font-size: 22px;
    font-weight: var(--fw-medium);
    color: var(--c-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
  }
  .ds-mhero--collapsed .ds-mhero__title { font-size: 14.5px; }
  .ds-mhero__pill {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    background: var(--c-brand-softer);
    border: 1px solid rgba(112, 81, 174, 0.18);
    margin-top: 10px;
  }
  .ds-mhero__pill strong {
    font-size: 13.5px;
    font-weight: var(--fw-medium);
    color: var(--c-brand-active);
  }
  .ds-mhero__pill span { font-size: 11.5px; color: var(--c-text-secondary); }
  .ds-mhero--collapsed .ds-mhero__pill { display: none; }
  /* Pill-вариант кнопки видеоприветствия — на mobile не используем (его заменяет
     overlay поверх фото). На случай если он где-то появится — скрываем. */
  .ds-mhero--collapsed .ds-hero-video-btn-wrap--accent { display: none; }
  .ds-mhero .ds-hero-video-btn-wrap--accent { display: none; }

  /* Wrapper фото на mobile — нужен относительный контекст для overlay-кнопки. */
  .ds-mhero__photo-wrap {
    position: relative;
    flex-shrink: 0;
    line-height: 0;  /* убираем inline-gap под img */
  }
  .ds-mhero--collapsed .ds-mhero__photo-wrap .ds-hero-video-btn-wrap--overlay {
    /* В свёрнутом режиме фото маленькое (44×44) — overlay-кнопка не помещается */
    display: none;
  }
  .ds-mhero__meta {
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--c-text-secondary);
    line-height: 1.4;
  }
  .ds-mhero--collapsed .ds-mhero__meta { display: none; }
  .ds-mhero--collapsed .ds-mhero__info::after {
    content: "7 лет опыта · КПТ";
    display: block;
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 2px;
  }
  .ds-mhero__desc {
    margin: 14px 0 0;
    font-size: 14.5px;
    color: var(--c-text);
    line-height: 1.55;
  }
  .ds-mhero--collapsed .ds-mhero__desc { display: none; }

  /* На мобильном первый параграф overview уже в .ds-mhero__desc — скрываем дубль. */
  .ds-about-overview-text > p:first-child { display: none; }
}

/* Табы с горизонтальным скроллом + scroll-hint: правый fade-overlay
   подсказывает, что есть скрытые вкладки. На мобиле — обязательно. */
.ds-tabs-wrap {
  position: relative;
}
.ds-tabs-wrap::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 1px;
  width: 36px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(253,252,253,0) 0%, var(--c-bg-chat, #f8f7fa) 90%);
  z-index: 1;
}
.ds-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--c-border-soft);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ds-tabs::-webkit-scrollbar { display: none; }
.ds-tabs > * { scroll-snap-align: start; }

.ds-tabs__item {
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--c-text-secondary);
  font-size: 13.5px;
  font-weight: var(--fw-regular);
  cursor: pointer;
  position: relative;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--t-fast);
}

.ds-tabs__item:hover {
  color: var(--c-text);
}

.ds-tabs__item[aria-current="page"] {
  color: var(--c-brand-hover);
  font-weight: var(--fw-medium);
}

.ds-tabs__item[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--c-brand);
  border-radius: 2px;
}

/* Класс .ds-tabs--pill оставлен для обратной совместимости, но визуально
   на mobile теперь тоже underline-стиль (как на desktop) — по просьбе UX:
   овалы выглядели тяжело. Единый внешний вид во всех ширинах. */

.ds-content-card {
  padding: 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
}

.ds-content-card--accent {
  border-color: var(--c-border-brand);
}

.ds-content-card__title {
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin: 0 0 6px;
}

.ds-content-card__body {
  font-size: 13.5px;
  color: var(--c-text-secondary);
  line-height: 1.55;
  margin: 0;
}

.ds-content-card__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--c-brand-softer);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.ds-content-grid {
  display: grid;
  gap: 14px;
}

.ds-content-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ds-content-grid--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .ds-content-grid--2,
  .ds-content-grid--3 { grid-template-columns: 1fr; }
}

/* Карточка-ссылка: цвет наследуется (иначе глобальный
   :where(.ds-shell) a красит в брендовый), декорации нет, ховер —
   рамка + лёгкая заливка фона + усиление стрелки. */
.ds-content-card--link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ds-content-card--link:hover,
.ds-content-card--link:focus-visible {
  color: inherit;
  border-color: var(--c-brand-accent);
  background: var(--c-brand-softer);
}
.ds-content-card__more {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  color: var(--c-brand);
  transition: gap var(--t-fast);
}
.ds-content-card--link:hover .ds-content-card__more { gap: 8px; }

/* ── Booking: виджет Rubitime + блок-помощник ─────────────────── */
.ds-booking-widget {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-2xl);
  padding: 20px;
  margin-bottom: 24px;
}
/* Десктоп: даём Rubitime больше высоты, чтобы блок «Подтверждение»
   и «Стоимость» не уезжали под скролл внутри iframe. */
.ds-booking-widget iframe,
.ds-booking-widget .rubitime-project-iframe__inited {
  width: 100%;
  border: 0;
  min-height: 820px;
  display: block;
}
.ds-booking-info { margin-bottom: 24px; }
.ds-booking-help {
  padding: 18px 22px;
  background: var(--c-brand-softer);
  border-radius: var(--r-xl);
  font-size: 13.5px;
  color: var(--c-text-secondary);
  line-height: 1.55;
}
.ds-booking-help a { color: var(--c-brand-hover); font-weight: var(--fw-medium); }

@media (max-width: 768px) {
  /* На мобиле виджет «вылезает» из коробки: убираем рамку/паддинги/фон,
     растягиваем во всю ширину контентной области, увеличиваем высоту —
     Rubitime сильно сплющивается на узком экране. */
  .ds-booking-widget {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    /* Лёгкий выход за паддинги .ds-layout__content (≈16px по бокам). */
    margin-left: -16px;
    margin-right: -16px;
  }
  .ds-booking-widget iframe,
  .ds-booking-widget .rubitime-project-iframe__inited {
    min-height: 1100px;
  }
}

.ds-timeline {
  display: flex;
  flex-direction: column;
}

.ds-timeline__row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--c-border-soft);
}

.ds-timeline__row:last-child { border-bottom: none; }

.ds-timeline__period {
  font-size: 12.5px;
  color: var(--c-brand);
  font-weight: var(--fw-medium);
  padding-top: 2px;
}

.ds-timeline__title {
  font-size: 15.5px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
}

.ds-timeline__org {
  color: var(--c-text-muted);
  font-weight: var(--fw-regular);
}

.ds-timeline__desc {
  font-size: 13.5px;
  color: var(--c-text-secondary);
  margin-top: 4px;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .ds-timeline__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.ds-publication-row {
  padding: 16px 4px;
  border-bottom: 1px solid var(--c-border-soft);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: var(--c-text);
  text-decoration: none;
}

.ds-publication-row:last-child { border-bottom: none; }

.ds-publication-row:hover {
  background: var(--c-brand-ghost);
}

.ds-publication-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--c-brand-softer);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ds-publication-row__source {
  font-size: 11.5px;
  color: var(--c-brand);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: var(--fw-medium);
  margin-bottom: 4px;
}

.ds-publication-row__title {
  font-size: 15px;
  color: var(--c-text);
  font-weight: var(--fw-medium);
}

.ds-publication-row__meta {
  font-size: 12.5px;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* ── Отзывы: summary + сетка карточек ───────────────────────── */
.ds-review-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: var(--c-brand-softer);
  border-radius: var(--r-xl);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ds-review-summary__col { display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; }
.ds-review-summary__rating {
  font-size: 30px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  letter-spacing: -0.01em;
  line-height: 1;
}
.ds-review-summary__count { font-size: 12.5px; color: var(--c-text-muted); margin-top: 6px; }
.ds-review-summary__note {
  flex: 1;
  min-width: 200px;
  font-size: 12.5px;
  color: var(--c-text-secondary);
  line-height: 1.5;
}

/* Звёзды (5-балльная шкала) */
.ds-stars { display: inline-flex; gap: 2px; font-size: 16px; margin-top: 4px; }
.ds-stars--sm { font-size: 13px; }
.ds-stars__star { color: var(--c-border, #eae6f0); line-height: 1; }
.ds-stars__star--filled { color: #f5a623; }

/* Сетка карточек отзывов */
.ds-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 768px) {
  .ds-review-grid { grid-template-columns: 1fr; }
  .ds-review-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 18px;
  }
  /* Колонка с рейтингом + звёздами + счётчиком — по центру */
  .ds-review-summary__col { align-items: center; text-align: center; }
  .ds-review-summary__note { text-align: center; }
  .ds-review-summary .ds-btn { width: 100%; justify-content: center; }
  .ds-review { padding: 16px 18px; }
}

.ds-review {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ds-review__head { display: flex; align-items: center; gap: 12px; }
.ds-review__avatar {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--c-brand-soft), var(--c-brand-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-medium);
  font-size: 15px;
  flex-shrink: 0;
}
.ds-review__who { display: flex; flex-direction: column; }
.ds-review__name { font-size: 14.5px; font-weight: var(--fw-medium); color: var(--c-text); }
.ds-review__body {
  margin: 0;
  font-size: 13.5px;
  color: var(--c-text);
  line-height: 1.6;
}
.ds-review__foot {
  padding-top: 8px;
  border-top: 1px solid var(--c-border-soft);
  font-size: 12.5px;
}
.ds-review__source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-text-muted);
  text-decoration: none;
}
.ds-review__source:hover { color: var(--c-brand); }

.ds-faq-item {
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-lg);
  margin-bottom: 8px;
  overflow: hidden;
}

.ds-faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ds-faq-item summary::-webkit-details-marker { display: none; }

.ds-faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--c-text-muted);
  font-weight: var(--fw-regular);
  transition: transform var(--t-fast);
}

.ds-faq-item[open] summary::after { transform: rotate(45deg); }

.ds-faq-item__body {
  padding: 0 18px 16px;
  font-size: 13.5px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}

.ds-service-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  padding: 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-xl);
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.ds-service-card:hover {
  border-color: var(--c-border-brand);
  box-shadow: var(--shadow-md);
}

.ds-service-card__mark {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-brand-softer), var(--c-brand-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-brand);
  font-weight: var(--fw-semibold);
  font-size: 22px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.ds-service-card__title {
  font-size: 16px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin: 0 0 6px;
}

.ds-service-card__sub {
  font-size: 13px;
  color: var(--c-text-secondary);
  margin: 0;
}

.ds-service-card__price {
  font-size: 18px;
  font-weight: var(--fw-medium);
  color: var(--c-brand-active);
  white-space: nowrap;
}

.ds-service-card__price-sub {
  font-size: 12px;
  color: var(--c-text-muted);
  text-align: right;
}

@media (max-width: 640px) {
  .ds-service-card {
    grid-template-columns: auto 1fr;
    gap: 14px;
  }
  .ds-service-card__price-wrap {
    grid-column: 1 / -1;
    text-align: left;
  }
}

.ds-process-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 16px 0;
  align-items: flex-start;
  border-bottom: 1px solid var(--c-border-soft);
}

.ds-process-step:last-child { border-bottom: none; }

.ds-process-step__num {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--c-brand-soft);
  color: var(--c-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-medium);
  font-size: 14px;
}

.ds-process-step__title {
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--c-text);
  margin: 0 0 4px;
}

.ds-process-step__body {
  font-size: 13.5px;
  color: var(--c-text-secondary);
  line-height: 1.55;
  margin: 0;
}

.ds-road-step {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.ds-road-step__photo {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-brand-soft);
  aspect-ratio: 4 / 3;
}

.ds-road-step__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ds-road-step__num {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.95);
  color: var(--c-brand-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .ds-road-step { grid-template-columns: 1fr; }
}

/* ─── Hero video: кнопка + модал ─────────────────────────────────────
   Подход «не раздражать»: на странице видна только компактная
   кнопка с иконкой play. Клик → нативный <dialog> с видео по центру
   экрана. ESC и клик по фону — закрывают.
─────────────────────────────────────────────────────────────────────── */
.ds-hero-video-btn-wrap {
  display: inline-block;
  margin: 18px 0;
}
/* Hero-вариант — между h1 и pill «X лет опыта»: занимает свою строку,
   чтобы следующий за ней pill упал на новую строку (а не встал в одну
   с кнопкой). margin задаём чуть скромнее — кнопка маленькая. */
.ds-hero-video-btn-wrap--accent {
  display: block;
  margin: 12px 0 4px;
}

.ds-hero-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--c-text);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .18s ease, transform .12s ease,
              background .15s ease;
  position: relative;
}
.ds-hero-video-btn:hover {
  border-color: var(--c-brand);
  box-shadow: 0 8px 24px rgba(102, 95, 177, .15);
  transform: translateY(-1px);
}
.ds-hero-video-btn:focus-visible {
  outline: 3px solid var(--c-brand);
  outline-offset: 2px;
}

/* Акцентный pill-вариант — повторяет визуальный язык .ds-page-hero__pill
   (компактный, белый фон, фиолетовая рамка), но с play-иконкой слева.
   Один в один не делаем — кнопка должна быть «нажимаемее» pill'а. */
.ds-hero-video-btn--accent {
  padding: 4px 14px 4px 5px;   /* как у pill: 4px по верт., узко по гориз. */
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(112, 81, 174, 0.18);
  box-shadow: 0 1px 3px rgba(112, 81, 174, .06);
}
.ds-hero-video-btn--accent:hover {
  background: #fff;
  border-color: var(--c-brand);
  box-shadow: 0 6px 18px rgba(102, 95, 177, .15);
}
.ds-hero-video-btn--accent .ds-hero-video-btn__icon {
  /* Маленький круг с иконкой — высота кнопки ~28-30px */
  width: 24px;
  height: 24px;
  box-shadow: 0 2px 6px rgba(102, 95, 177, .35);
}
.ds-hero-video-btn--accent .ds-hero-video-btn__icon svg {
  width: 14px;
  height: 14px;
}
.ds-hero-video-btn--accent .ds-hero-video-btn__label {
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--c-brand-active);
  letter-spacing: -0.005em;
}

.ds-hero-video-btn__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
}
.ds-hero-video-btn__icon svg {
  /* play-иконка чуть сдвигается вправо для оптической компенсации */
  margin-left: 2px;
}

.ds-hero-video-btn__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.ds-hero-video-btn__label {
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--c-text);
}

/* ─── Overlay-вариант (поверх фото психолога на mobile-hero) ────────
   Круглая кнопка с play-иконкой; позиционируется absolute относительно
   .ds-mhero__photo-wrap. Аккуратно в нижне-правом углу, чтобы не
   закрывать лицо. Лёгкая pulse-анимация раз в 3 сек привлекает взгляд. */
.ds-hero-video-btn-wrap--overlay {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: block;
  margin: 0;
}
.ds-hero-video-overlay-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25), 0 0 0 4px rgba(102, 95, 177, .15);
  transition: transform .12s ease, box-shadow .15s ease;
  animation: ds-hero-video-pulse 2.6s ease-in-out infinite;
}
.ds-hero-video-overlay-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), 0 0 0 6px rgba(102, 95, 177, .2);
}
.ds-hero-video-overlay-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  animation: none;
}
.ds-hero-video-overlay-btn__icon svg {
  /* play-иконка чуть сдвигается вправо для оптической компенсации */
  margin-left: 2px;
}

/* Pulse — лёгкое «дыхание» рамки, чтобы пользователь заметил кнопку.
   prefers-reduced-motion отключает анимацию для тех, кто её не выносит. */
@keyframes ds-hero-video-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, .25), 0 0 0 4px rgba(102, 95, 177, .15); }
  50%       { box-shadow: 0 4px 12px rgba(0, 0, 0, .25), 0 0 0 9px rgba(102, 95, 177, .0); }
}
@media (prefers-reduced-motion: reduce) {
  .ds-hero-video-overlay-btn { animation: none; }
}

/* ─── Modal (нативный <dialog>) ────────────────────────────────────── */

/* <dialog> по умолчанию display:none пока не вызвали .showModal() */
.ds-hero-video-modal {
  /* Сбрасываем дефолтные браузерные стили */
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(960px, 92vw);
  max-height: 92vh;
  width: 100%;
}
.ds-hero-video-modal::backdrop {
  background: rgba(15, 12, 30, .85);
  backdrop-filter: blur(8px);
}
.ds-hero-video-modal[open] {
  /* dialog показан */
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-hero-video-modal__player {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88vh;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.ds-hero-video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}
.ds-hero-video-modal__close:hover {
  background: rgba(255, 255, 255, .25);
  transform: scale(1.05);
}
.ds-hero-video-modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .ds-hero-video-btn { padding: 10px 16px 10px 12px; gap: 10px; }
  .ds-hero-video-btn__icon { width: 32px; height: 32px; }
  .ds-hero-video-modal { max-width: 96vw; }
  .ds-hero-video-modal__close { top: -40px; right: 4px; }
}

/* ═══ Cases (/cases/) ═════════════════════════════════════════════════
   Список — карточки 2×2 с иконкой формата + цветовой акцент.
   Деталь — hero с фоновой заливкой по формату, 3 «ступени» истории
   («С чем пришёл / Как шла работа / К чему пришли») с цветовыми
   маркерами, выпуклая pull-quote клиента.

   Цветовые акценты по формату (берём с тонкой прозрачностью, чтобы
   не перетягивать внимание с контента):
     mentor      — фиолетовый (бренд)
     personal    — янтарный (тёплый, очно/семейно)
     online      — бирюзовый (онлайн, дистанция)
     diagnostic  — серо-синий (нейтральный, медицинский)
═══════════════════════════════════════════════════════════════════════ */

/* ─── Cases shell ────────────────────────────────────────────────────
   Глобальное правило `.ds-layout__content--centered > *` уже даёт
   shell ширину var(--w-content-max) (~1080px) и центрирование. Не
   переопределяем — используем ту же ширину, что и /about_me/, /therapy/.
   Shell нужен только чтобы прямые потомки cases-блоков (карточки,
   hero, stages…) не получили повторный margin auto и не разъехались. */
.ds-case-shell > * {
  /* отключаем повторный центринг для прямых потомков shell — они уже
     лежат внутри центрированного контейнера. */
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* ─── Список: cards-grid ─────────────────────────────────────────── */

.ds-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.ds-case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .18s ease, transform .12s ease;
  isolation: isolate;
}
.ds-case-card::before {
  /* Тонкая цветная полоса сверху — главный визуальный маркер формата. */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c-brand);
  opacity: .8;
}
.ds-case-card:hover {
  border-color: var(--c-brand);
  box-shadow: 0 8px 24px rgba(102, 95, 177, .12);
  transform: translateY(-2px);
}
.ds-case-card:focus-visible {
  outline: 3px solid var(--c-brand);
  outline-offset: 2px;
}

.ds-case-card__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(102, 95, 177, .12);
  color: var(--c-brand);
  margin-bottom: 14px;
}
.ds-case-card__meta {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  margin-bottom: 6px;
}
.ds-case-card__fmt { font-weight: 500; color: var(--c-text-secondary); }
.ds-case-card__dur { opacity: .8; }
.ds-case-card__title {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--c-text);
  margin: 0 0 10px;
  line-height: 1.3;
}
.ds-case-card__client {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin: 0 0 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ds-case-card__tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(102, 95, 177, .10);
  color: var(--c-brand);
  font-size: var(--fs-xs);
  font-weight: 500;
  border-radius: 999px;
  margin-top: auto;
}
.ds-case-card__arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  color: var(--c-text-muted);
  transition: transform .15s ease, color .15s ease;
}
.ds-case-card:hover .ds-case-card__arrow {
  color: var(--c-brand);
  transform: translateX(4px);
}

/* Цветовые варианты карточек (top-полоса + иконка-фон) */
.ds-case-card--mentor::before     { background: #6e63c6; }
.ds-case-card--mentor .ds-case-card__icon { background: rgba(110, 99, 198, .14); color: #6e63c6; }
.ds-case-card--mentor .ds-case-card__tag  { background: rgba(110, 99, 198, .12); color: #6e63c6; }

.ds-case-card--personal::before   { background: #d97c40; }
.ds-case-card--personal .ds-case-card__icon { background: rgba(217, 124, 64, .15); color: #d97c40; }
.ds-case-card--personal .ds-case-card__tag  { background: rgba(217, 124, 64, .12); color: #b66428; }

.ds-case-card--online::before     { background: #3da894; }
.ds-case-card--online .ds-case-card__icon { background: rgba(61, 168, 148, .15); color: #3da894; }
.ds-case-card--online .ds-case-card__tag  { background: rgba(61, 168, 148, .12); color: #2e8c7a; }

.ds-case-card--diagnostic::before { background: #6989ab; }
.ds-case-card--diagnostic .ds-case-card__icon { background: rgba(105, 137, 171, .15); color: #6989ab; }
.ds-case-card--diagnostic .ds-case-card__tag  { background: rgba(105, 137, 171, .12); color: #4c6c8d; }

.ds-case-empty { margin: 32px 0; }
.ds-case-empty__cta { margin-top: 20px; display: flex; justify-content: center; }


/* ─── Деталь: hero + stages + pullquote ──────────────────────────── */

.ds-case-hero {
  position: relative;
  padding: 28px 28px 26px;
  margin: 20px 0 28px;
  background: linear-gradient(135deg, rgba(102,95,177,.06) 0%, rgba(102,95,177,.02) 100%);
  border: 1px solid var(--c-border-soft);
  border-radius: 18px;
  border-top: 4px solid var(--c-brand);
}
.ds-case-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--c-surface);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-brand);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.ds-case-hero__badge span { color: inherit; }
.ds-case-hero__dur { color: var(--c-text-secondary); font-weight: 400; }
.ds-case-hero__title {
  font-size: var(--fs-3xl, 28px);
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.ds-case-hero__client {
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
}
.ds-case-hero__tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--c-surface);
  color: var(--c-brand);
  font-size: var(--fs-xs);
  font-weight: 500;
  border-radius: 999px;
}

/* Цветовые варианты hero — соответствуют карточкам списка */
.ds-case-hero--mentor     { background: linear-gradient(135deg, rgba(110,99,198,.08) 0%, rgba(110,99,198,.02) 100%); border-top-color: #6e63c6; }
.ds-case-hero--mentor .ds-case-hero__badge { color: #6e63c6; }

.ds-case-hero--personal   { background: linear-gradient(135deg, rgba(217,124,64,.08) 0%, rgba(217,124,64,.02) 100%); border-top-color: #d97c40; }
.ds-case-hero--personal .ds-case-hero__badge { color: #b66428; }
.ds-case-hero--personal .ds-case-hero__tag   { color: #b66428; }

.ds-case-hero--online     { background: linear-gradient(135deg, rgba(61,168,148,.08) 0%, rgba(61,168,148,.02) 100%); border-top-color: #3da894; }
.ds-case-hero--online .ds-case-hero__badge { color: #2e8c7a; }
.ds-case-hero--online .ds-case-hero__tag   { color: #2e8c7a; }

.ds-case-hero--diagnostic { background: linear-gradient(135deg, rgba(105,137,171,.08) 0%, rgba(105,137,171,.02) 100%); border-top-color: #6989ab; }
.ds-case-hero--diagnostic .ds-case-hero__badge { color: #4c6c8d; }
.ds-case-hero--diagnostic .ds-case-hero__tag   { color: #4c6c8d; }


/* Three stages — ширина задаётся общим правилом выше (720px) */
.ds-case-story {
  /* max-width управляется общим правилом для cases-блоков */
}
.ds-case-stage {
  position: relative;
  padding: 22px 24px 22px 28px;
  margin: 0 0 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: 14px;
  border-left: 4px solid var(--c-brand);
}
.ds-case-stage__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ds-case-stage__step {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-brand);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  font-feature-settings: "tnum";
  letter-spacing: -.02em;
}
.ds-case-stage__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-brand);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ds-case-stage__body {
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--c-text);
}
.ds-case-stage__body p { margin: 0 0 12px; }
.ds-case-stage__body p:last-child { margin-bottom: 0; }

/* 3 ступени — каждая со своим цветом, чтобы взглядом находить «где я сейчас» */
.ds-case-stage--before  { border-left-color: #d97c40; }
.ds-case-stage--before  .ds-case-stage__step  { background: #d97c40; }
.ds-case-stage--before  .ds-case-stage__label { color: #b66428; }

.ds-case-stage--during  { border-left-color: var(--c-brand); }
.ds-case-stage--during  .ds-case-stage__step  { background: var(--c-brand); }
.ds-case-stage--during  .ds-case-stage__label { color: var(--c-brand); }

.ds-case-stage--after   { border-left-color: #3da894; }
.ds-case-stage--after   .ds-case-stage__step  { background: #3da894; }
.ds-case-stage--after   .ds-case-stage__label { color: #2e8c7a; }


/* Pull-quote: большая кавычка + текст + подпись (ширина — общая 720px) */
.ds-case-pullquote {
  position: relative;
  margin-top: 32px;
  margin-bottom: 32px;
  padding: 30px 32px 28px;
  background: var(--c-surface);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(102, 95, 177, .08);
  border: 1px solid var(--c-border-soft);
}
.ds-case-pullquote__mark {
  position: absolute;
  top: -8px;
  left: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 80px;
  line-height: 1;
  color: var(--c-brand);
  opacity: .35;
}
.ds-case-pullquote__text {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--c-text);
  margin: 0;
  font-weight: 400;
  font-style: italic;
}
.ds-case-pullquote__by {
  margin-top: 14px;
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  font-style: normal;
}


/* Disclaimer */
.ds-case-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 28px 0 0;
  padding: 14px 18px;
  background: var(--c-bg-soft, #f7f6fb);
  border-radius: 10px;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--c-text-muted);
}
.ds-case-disclaimer__icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--c-text-muted);
  opacity: .8;
}


/* CTA-блок (bubble + buttons) */
.ds-case-cta { margin: 44px 0 0; }
.ds-case-cta__actions {
  margin-top: 16px;
  margin-left: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* Responsive */
@media (max-width: 768px) {
  .ds-case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ds-case-card { padding: 18px 18px 20px; }
  .ds-case-card__title { font-size: var(--fs-base); }
  .ds-case-card__arrow { top: 18px; right: 18px; }

  .ds-case-hero { padding: 22px 20px 20px; }
  .ds-case-hero__title { font-size: var(--fs-xl); }

  .ds-case-stage { padding: 18px 18px 18px 22px; }
  .ds-case-pullquote { padding: 24px 22px 22px; }
  .ds-case-pullquote__mark { font-size: 60px; left: 12px; }

  .ds-case-cta__actions { margin-left: 0; }
}
