/* ==========================================================================
   КАРАТ — Центр современной стоматологии
   Гамма, типографика и компоненты сайта.

   Цвета — материалы клиники: светлый камень фасада, белый фарфор кабинетов,
   графит стекла вывески и золото букв (см. design-system/karat.md).
   Все значения — токены на :root. Вне блока токенов цвет не пишется.
   ========================================================================== */

:root {
  /* ── цвет: светлый камень фасада, белый фарфор, графит вывески ────────── */
  --bg: #f3f3f1;
  --surface: #ffffff;
  --surface-sunken: #e8e9e7;
  --fg: #17191b;
  --muted: #55595d;
  --faint: #5d6165;
  --border: #d8d9d6;
  --border-strong: #b3b5b1;

  /* ── цвет: акцент — золото вывески. Заливки и линии ─────────────────── */
  --accent: #c4a256;
  --accent-hover: #b08f3f;
  --accent-ink: #75591d;        /* золото для текста на бумаге (контраст ≥ 4,5) */
  --on-accent: #17191b;

  /* ── светлая поверхность: шапка, первый экран, блок записи, подвал ─────── */
  --night: #ffffff;
  --night-2: #f3f3f1;
  --night-border: rgba(23, 25, 27, 0.12);
  --on-night: #17191b;
  --on-night-muted: #55595d;
  --accent-on-night: #75591d;

  /* ── золото букв на графите: кнопки, марка врача (как вывеска клиники) ──── */
  --gold-on-ink: #e3c887;
  --ink-hover: #2b2e31;

  /* ── смысловые ───────────────────────────────────────────────────────── */
  --danger: #a33a2a;
  --success: #2f6b4f;

  /* ── производные ─────────────────────────────────────────────────────── */
  --accent-soft: color-mix(in oklch, var(--accent) 16%, transparent);
  --fg-soft: color-mix(in oklch, var(--fg) 5%, transparent);

  /* ── типографика: геометрический гротеск вывески + Onest для текста ────── */
  --font-display: "Jost", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --fs-display: clamp(40px, 4.8vw, 60px);
  --fs-h1: clamp(32px, 3.6vw, 44px);
  --fs-h2: clamp(24px, 2.5vw, 32px);
  --fs-h3: 20px;
  --fs-lead: 19px;
  --fs-body: 17px;
  --fs-small: 15px;
  --fs-caption: 13px;
  --fs-label: 12px;

  /* ── сетка: 8-точечный шаг ───────────────────────────────────────────── */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 96px;
  --s-8: 128px;
  --container: 1200px;
  --gutter: 24px;
  --section: clamp(56px, 9vw, 112px);
  --header-h: 76px;

  --radius: 8px;
  --radius-sm: 6px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 100ms;
  --t-base: 180ms;
  --t-enter: 240ms;
}

/* ==========================================================================
   База
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); scrollbar-color: var(--border-strong) transparent; color-scheme: light; }
::selection { background: var(--accent); color: var(--fg); }
input, select, textarea { caret-color: var(--accent-ink); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
p, ul, ol, dl, dd, h1, h2, h3, h4, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: 500; }
p { text-wrap: pretty; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 2px; }
.on-night :focus-visible, .night :focus-visible { outline-color: var(--accent-on-night); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-2); top: -100px; z-index: 200; padding: 12px 20px; background: var(--night); color: var(--on-night); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.skip-link:focus { top: var(--s-2); }
.num, .price { font-variant-numeric: tabular-nums lining-nums; }
.hero__phone strong, .cta__phone strong, .footer__phone, .drawer__phone, .header__phone strong, .step::before, .doctor__mark, .offer__price strong { font-variant-numeric: lining-nums; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   Типографика
   ========================================================================== */
.h1, .h2 { font-family: var(--font-display); }
.h1 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.015em; font-weight: 600; }
.h1--display { font-size: var(--fs-display); line-height: 1.04; }
.h2 { font-size: var(--fs-h2); line-height: 1.14; letter-spacing: -0.01em; font-weight: 600; }
.h3 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--muted); max-width: 56ch; }
.prose > * + * { margin-top: var(--s-3); }
.prose { max-width: 68ch; }
.prose h2 { max-width: none; margin-top: var(--s-6); }
.prose ul, .prose ol { max-width: 68ch; }
.prose a, .text-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--border-strong); transition: color var(--t-base) var(--ease), text-decoration-color var(--t-base) var(--ease); }
.prose a:hover, .text-link:hover { color: var(--accent-ink); text-decoration-color: var(--accent-ink); }

.caption { font-size: var(--fs-caption); line-height: 1.5; color: var(--faint); }
.small { font-size: var(--fs-small); line-height: 1.5; }
.muted { color: var(--muted); }
.night { background: var(--night); color: var(--on-night); }
.night .lead, .night .muted { color: var(--on-night-muted); }
.night .caption, .night .faint { color: var(--on-night-muted); }
.sunken { background: var(--surface-sunken); }

/* ==========================================================================
   Раскладка
   ========================================================================== */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section-head { display: grid; gap: var(--s-2); margin-bottom: var(--s-6); max-width: 760px; }
.section-head .h2 { max-width: 22ch; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.stack { display: grid; gap: var(--s-3); }
.stack--tight { gap: var(--s-2); }
.stack--loose { gap: var(--s-5); }
.row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-6); align-items: start; }
.split > :nth-child(1) { grid-column: 1 / span 6; }
.split > :nth-child(2) { grid-column: 7 / span 6; }
.split--center { align-items: center; }
.split--media-large > :nth-child(1) { grid-column: 1 / span 5; }
.split--media-large > :nth-child(2) { grid-column: 7 / span 6; }
.split--narrow-media > :nth-child(1) { grid-column: 1 / span 7; }
.split--narrow-media > :nth-child(2) { grid-column: 9 / span 4; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .split > *, .services > * { min-width: 0; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }

@media (max-width: 1023px) {
  .split, .split--media-large, .split--narrow-media { grid-template-columns: 1fr; gap: var(--s-5); }
  .split.split > :nth-child(1), .split.split > :nth-child(2) { grid-column: 1 / -1; }
  .sticky-col { position: static; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  :root { --gutter: 16px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Кнопки, ссылки, метки
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 50px; padding: 12px 24px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: var(--fs-body); font-weight: 500; line-height: 1.2; letter-spacing: 0.01em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--fg); color: var(--gold-on-ink); border-color: var(--fg); }
.btn--primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--fg); background: var(--surface); }
.btn--ghost-night { background: transparent; color: var(--on-night); border-color: color-mix(in srgb, var(--on-night) 42%, transparent); }
.btn--ghost-night:hover { border-color: var(--on-night); }
.btn--sm { min-height: 44px; padding: 12px 20px; font-size: var(--fs-small); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }

.link-arrow { display: inline-flex; align-items: center; gap: var(--s-1); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--border-strong); padding-bottom: 4px; transition: color var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.link-arrow:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.link-arrow .icon { transition: transform var(--t-base) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; text-decoration: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: var(--fs-small); font-weight: 500; color: var(--fg); }
.night .tag { border-color: color-mix(in srgb, var(--on-night) 30%, transparent); color: var(--on-night-muted); }

/* ==========================================================================
   Шапка
   ========================================================================== */
.header { position: sticky; top: 0; z-index: 60; background: var(--night); color: var(--on-night); border-bottom: 1px solid var(--night-border); }
.header__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; color: inherit; }
.brand__lockup { width: clamp(172px, 16vw, 208px); height: auto; flex: none; }
.brand__text { display: grid; gap: 4px; white-space: nowrap; }
.brand__tagline { font-size: 12px; line-height: 1.3; letter-spacing: 0.01em; color: var(--on-night-muted); }
.header .brand__tagline { display: none; }
.nav { display: flex; align-items: center; justify-content: center; gap: var(--s-1); }
.nav__link, .nav__toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; white-space: nowrap; border: 0; background: none; color: var(--on-night); font-size: var(--fs-small); font-weight: 500; text-decoration: none; border-radius: var(--radius-sm); transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.nav__link:hover, .nav__toggle:hover, .nav__toggle[aria-expanded="true"], .nav__link[aria-current="page"] { color: var(--accent-on-night); background: var(--night-2); }
.nav__toggle .icon { transition: transform var(--t-base) var(--ease); }
.nav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.header__actions { display: flex; align-items: center; gap: var(--s-3); }
.header__phone { display: grid; text-align: right; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.header__phone strong { font-size: 19px; font-weight: 600; letter-spacing: 0.01em; }
.header__phone span { font-size: var(--fs-caption); color: var(--on-night-muted); }
.header__phone:hover strong { color: var(--accent-on-night); }
.burger { display: none; width: 48px; height: 48px; border: 1px solid var(--night-border); background: none; border-radius: var(--radius-sm); place-items: center; color: var(--on-night); }

/* выпадающее меню услуг */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); color: var(--fg); border-top: 1px solid var(--border); box-shadow: 0 24px 40px -24px color-mix(in srgb, var(--fg) 45%, transparent); }
.mega[hidden] { display: none; }
.mega__inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); padding-block: var(--s-5) var(--s-6); }
.mega__group { display: grid; gap: var(--s-1); align-content: start; }
.mega__title { font-size: var(--fs-body); font-weight: 600; color: var(--fg); padding-bottom: var(--s-1); border-bottom: 1px solid var(--border); margin-bottom: var(--s-1); }
.mega__link { display: flex; justify-content: space-between; gap: var(--s-2); padding: 8px 0; text-decoration: none; color: var(--fg); font-size: var(--fs-small); line-height: 1.3; white-space: nowrap; }
.mega__link:hover { color: var(--accent-ink); }
.mega__link small { color: var(--muted); font-size: var(--fs-caption); white-space: nowrap; }
.mega__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--border); }
.mega__foot-title { font-size: var(--fs-small); font-weight: 600; color: var(--fg); }
.mega__foot a { font-size: var(--fs-small); font-weight: 500; color: var(--fg); text-decoration: none; }
.mega__foot a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 0.18em; }

/* мобильное меню */
.drawer { position: fixed; inset: 0; z-index: 80; background: var(--night); color: var(--on-night); display: flex; flex-direction: column; overflow-y: auto; padding-bottom: var(--s-5); }
.drawer[hidden] { display: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--gutter); border-bottom: 1px solid var(--night-border); }
.drawer__close { width: 48px; height: 48px; border: 1px solid var(--night-border); background: none; border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--on-night); }
.drawer__body { padding: var(--s-4) var(--gutter); display: grid; gap: var(--s-5); }
.drawer__group { display: grid; gap: 4px; }
.drawer__title { font-size: var(--fs-small); font-weight: 600; color: var(--muted); margin-bottom: var(--s-1); }
.drawer__link { display: block; padding: 12px 0; text-decoration: none; font-size: 19px; line-height: 1.3; border-bottom: 1px solid var(--night-border); }
.drawer__link:hover { color: var(--accent-on-night); }
.drawer__actions { display: grid; gap: var(--s-2); }
.drawer__phone { font-size: 28px; font-weight: 600; line-height: 1.1; text-decoration: none; white-space: nowrap; }
body.no-scroll { overflow: hidden; }

@media (max-width: 1279px) {
  .header__phone { display: none; }
}
@media (max-width: 1023px) {
  .nav { display: none; }
  .header__actions .btn { display: none; }
  .burger { display: grid; }
  .header__inner { grid-template-columns: 1fr auto; }
  .brand__tagline { display: none; }
}

/* ==========================================================================
   Главная: первый экран
   ========================================================================== */
.hero { background: var(--night); color: var(--on-night); position: relative; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-6); align-items: center; padding-block: var(--s-7); min-height: min(620px, calc(100vh - var(--header-h))); }
.hero__body { grid-column: 1 / span 7; display: grid; gap: var(--s-5); align-content: center; }
.hero__title { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.015em; max-width: 16ch; }
.hero__lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--on-night-muted); max-width: 50ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.hero__phone { display: inline-flex; align-items: baseline; gap: var(--s-2); text-decoration: none; }
.hero__phone strong { font-size: 26px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.hero__phone:hover strong { color: var(--accent-on-night); }
.hero__media { grid-column: 8 / span 5; position: relative; }
.hero__media img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 4.2; object-fit: cover; }

/* вход заголовка: единственная анимация на странице */
.hero__body > * { animation: rise 560ms var(--ease) both; }
.hero__body > *:nth-child(2) { animation-delay: 60ms; }
.hero__body > *:nth-child(3) { animation-delay: 120ms; }
.hero__body > *:nth-child(4) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: 1fr; min-height: 0; padding-block: var(--s-6); }
  .hero__body, .hero__media { grid-column: 1 / -1; }
  .hero__media img { aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) {
  .hero__actions .btn { width: 100%; }
}

/* ==========================================================================
   Внутренняя страница: светлый первый экран
   ========================================================================== */
.page-hero { padding-block: var(--s-6) var(--s-7); background: var(--surface); border-bottom: 1px solid var(--border); }
.page-hero__inner { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-6); align-items: center; }
.page-hero__body { grid-column: 1 / span 6; display: grid; gap: var(--s-4); }
.page-hero__title { max-width: 16ch; }
.page-hero__media { grid-column: 8 / span 5; }
.page-hero__media img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 4.6; object-fit: cover; }
.page-hero--no-media .page-hero__body { grid-column: 1 / span 8; }
.page-hero--no-media .page-hero__title { max-width: 20ch; }
.page-hero .lead { color: var(--fg); }
.page-facts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); font-size: var(--fs-body); }
.page-facts > div { display: inline-flex; align-items: baseline; gap: 4px; }
.page-facts dt { color: var(--muted); }
.page-facts dd { font-weight: 600; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
/* панель «Частые услуги» в шапке страницы цен */
.price-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); display: grid; gap: var(--s-3); }
.price-card__title { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.15; }
.price-card ul { display: grid; }
.price-card li { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); padding: 12px 0; border-top: 1px solid var(--border); font-size: var(--fs-body); }
.price-card li .num { font-weight: 600; white-space: nowrap; }
.price-card .link-arrow { justify-self: start; font-size: var(--fs-small); }

@media (max-width: 1023px) {
  .page-hero__inner { grid-template-columns: 1fr; }
  .page-hero__body, .page-hero__media, .page-hero--no-media .page-hero__body { grid-column: 1 / -1; }
  .page-hero__media { max-width: 520px; }
  .page-hero__media img { aspect-ratio: 4 / 3.4; }
}

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.crumbs { padding-block: var(--s-2); font-size: var(--fs-small); color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--border-strong); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 0.18em; }
.crumbs [aria-current="page"] { color: var(--fg); }

/* ==========================================================================
   Указатель услуг: прейскурант с точечными выносками
   ========================================================================== */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); }
.services__group { display: grid; gap: var(--s-2); align-content: start; }
.services__title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--s-2); padding-bottom: var(--s-2); border-bottom: 1px solid var(--border-strong); }
.services__title h3 { font-family: var(--font-display); font-size: 21px; line-height: 1.15; font-weight: 600; }
.services__title span { font-size: var(--fs-small); font-weight: 500; color: var(--muted); }
.service-row { position: relative; display: grid; gap: 4px; padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.service-row__line { display: flex; align-items: baseline; gap: var(--s-2); }
.service-row__name { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.service-row__dots { flex: 1; min-width: 24px; border-bottom: 1px dotted var(--border-strong); transform: translateY(-5px); }
.service-row__price { font-size: 17px; font-weight: 500; white-space: nowrap; }
.service-row__desc { font-size: var(--fs-small); color: var(--muted); max-width: 52ch; }
.service-row a { text-decoration: none; color: inherit; }
.service-row a::after { content: ""; position: absolute; inset: 0; }
.service-row a:hover ~ .service-row__name, .service-row a:hover .service-row__name, .service-row:has(a:hover) .service-row__name { color: var(--accent-ink); }
.service-row:has(a:hover) .service-row__dots { border-color: var(--accent); }
.service-row:has(a:hover) .service-row__price { color: var(--accent-ink); }
.service-row:focus-within { outline: 2px solid var(--accent-ink); outline-offset: 4px; border-radius: 4px; }

@media (max-width: 1023px) { .services { grid-template-columns: 1fr; gap: var(--s-5); } }
/* очень узкие экраны: выноски убираем, цена переносится под название */
@media (max-width: 400px) {
  .service-row__line, .price-list li { flex-wrap: wrap; row-gap: 4px; }
  .service-row__dots, .price-list .dots { display: none; }
  .service-row__price, .price-list .price { margin-left: auto; }
}


/* ==========================================================================
   Этапы: нумерованная последовательность
   ========================================================================== */
.steps { display: grid; gap: 0; counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); padding-block: var(--s-4); border-top: 1px solid var(--border); counter-increment: step; }
.step:last-child { border-bottom: 1px solid var(--border); }
.step::before { content: counter(step); font-family: var(--font-display); font-size: 15px; line-height: 1.6; font-weight: 600; color: var(--accent-ink); font-variant-numeric: lining-nums tabular-nums; }
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); max-width: 56ch; }
.night .step { border-color: var(--night-border); }
.night .step::before { color: var(--accent-on-night); }
.night .step p { color: var(--on-night-muted); }

/* ==========================================================================
   Стоимость: список с выносками и полная таблица
   ========================================================================== */
.price-list { display: grid; }
.price-list li { display: flex; align-items: baseline; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--border); }
.price-list .name { flex: 0 1 auto; }
.price-list .dots { flex: 1 1 24px; min-width: 24px; border-bottom: 1px dotted var(--border-strong); transform: translateY(-4px); }
.price-list .price { flex: none; font-size: 18px; font-weight: 600; white-space: nowrap; text-align: right; }
.price s { display: block; font-size: var(--fs-small); font-weight: 400; color: var(--faint); text-decoration-thickness: 1px; }
.price-list .price small { display: block; font-size: var(--fs-caption); font-weight: 400; color: var(--faint); }
.price-list .name { min-width: 0; }
.price-list .name small { display: block; font-size: var(--fs-small); color: var(--muted); }
.price-note { font-size: var(--fs-small); color: var(--muted); margin-top: var(--s-3); max-width: 70ch; }

.price-table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.price-table caption { text-align: left; font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.15; padding: var(--s-5) 0 var(--s-2); color: var(--fg); }
.price-table th, .price-table td { padding: 12px 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--border); }
.price-table th { font-size: var(--fs-caption); font-weight: 500; color: var(--muted); border-bottom-color: var(--border-strong); }
.price-table th:last-child, .price-table td:last-child { text-align: right; white-space: nowrap; }
.price-table td:last-child { font-weight: 600; font-size: 17px; }
.price-table td small { display: block; color: var(--muted); font-weight: 400; font-size: var(--fs-caption); margin-top: 4px; }
.price-table tbody tr:hover { background: var(--fg-soft); }
.table-scroll { overflow-x: auto; }

/* ==========================================================================
   Медиа
   ========================================================================== */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-sunken); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--portrait img { aspect-ratio: 4 / 5; }
.media--square img { aspect-ratio: 1 / 1; }
.media--wide img { aspect-ratio: 16 / 10; }
.media--tall img { aspect-ratio: 3 / 4; }
.media figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px var(--s-3) 10px; color: var(--surface); font-size: var(--fs-caption); background: linear-gradient(to top, color-mix(in srgb, var(--fg) 72%, transparent), transparent); }

 .mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.mosaic > .media { min-width: 0; background: transparent; }
.mosaic > .media:first-child { grid-column: 1 / -1; }
.mosaic .media img { height: auto; aspect-ratio: 4 / 3; border-radius: var(--radius); }
.mosaic > .media:first-child img { aspect-ratio: 16 / 9; }
.mosaic .media figcaption { position: static; padding: 6px 0 0; color: inherit; background: none; }

/* до / после */
.ba { display: grid; gap: var(--s-3); }
.ba__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.ba__item { position: relative; }
.ba__item img { width: 100%; border-radius: var(--radius-sm); aspect-ratio: 16 / 10; object-fit: cover; }
.ba__item span { position: absolute; left: var(--s-2); top: var(--s-2); padding: 4px 12px; border-radius: 4px; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--fg); font-size: var(--fs-small); font-weight: 500; }
.ba__item--after span { color: var(--accent-ink); }
.ba__caption { font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 639px) { .ba__pair { gap: var(--s-1); } }

/* ==========================================================================
   Списки, вопросы, врачи, отзывы
   ========================================================================== */
.check-list { display: grid; gap: var(--s-2); }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-2); align-items: start; }
.check-list .icon { color: var(--accent-ink); margin-top: 4px; }
.night .check-list .icon { color: var(--accent-on-night); }
.check-list li p { color: var(--muted); }
.night .check-list li p { color: var(--on-night-muted); }

.def-list { display: grid; gap: 0; }
.def-list > div { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.def-list > div:last-child { border-bottom: 1px solid var(--border); }
.def-list dt { font-weight: 600; }
.def-list dd { color: var(--muted); }
.night .def-list > div { border-color: var(--night-border); }
.night .def-list dd { color: var(--on-night-muted); }
@media (max-width: 639px) { .def-list > div { grid-template-columns: 1fr; gap: 4px; } }
.def-list--rows > div { grid-template-columns: 1fr; gap: 4px; }

.faq { display: grid; gap: 0; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) 0; font-size: 19px; font-weight: 500; line-height: 1.3; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 14px; height: 14px; flex: none; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-4px); transition: transform var(--t-base) var(--ease); color: var(--accent-ink); }
.faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.faq details[open] summary { color: var(--accent-ink); }
.faq .faq__answer { padding: 0 0 var(--s-3); color: var(--muted); max-width: 68ch; }
.faq .faq__answer > * + * { margin-top: var(--s-2); }

.doctor { display: grid; grid-template-columns: 112px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.doctor:last-child { border-bottom: 1px solid var(--border); }
.doctor__mark { width: 112px; height: 112px; border-radius: var(--radius-sm); background: var(--fg); display: grid; place-items: center; font-family: var(--font-display); font-size: 40px; line-height: 1; font-weight: 500; color: var(--gold-on-ink); letter-spacing: 0.02em; }
.doctor__body { display: grid; gap: var(--s-1); align-content: start; }
.doctor__role { font-size: var(--fs-body); font-weight: 500; color: var(--muted); }
.doctor__body p { color: var(--muted); max-width: 62ch; }
@media (max-width: 639px) { .doctor { grid-template-columns: 84px 1fr; gap: var(--s-3); } .doctor__mark { width: 84px; height: 84px; font-size: 32px; } }

.reviews { display: grid; gap: var(--s-4); }
.review { display: grid; gap: var(--s-2); padding: var(--s-4) 0; border-top: 1px solid var(--border); align-content: start; }
.review--plain { padding: var(--s-4) 0; }
.review__text { font-size: 17px; line-height: 1.55; }
.review__text--lead { font-family: var(--font-display); font-size: 24px; line-height: 1.25; font-weight: 500; }
.night .review__text--lead { color: var(--on-night); }
.review__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); font-size: var(--fs-small); color: var(--faint); }
.review__author { font-weight: 600; color: var(--fg); }
.night .review__meta { color: var(--on-night-muted); }
.night .review__author { color: var(--on-night); }
.stars { display: inline-flex; gap: 4px; color: var(--accent-ink); }
.night .stars { color: var(--accent-on-night); }
.stars .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }

/* ==========================================================================
   Блок записи и форма
   ========================================================================== */
.cta { background: var(--night); color: var(--on-night); position: relative; overflow: hidden; }
.cta__inner { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-6); align-items: center; padding-block: var(--section); }
.cta__body { grid-column: 1 / span 5; display: grid; gap: var(--s-4); }
.cta__media { grid-column: 6 / span 7; }
.cta__media img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover; }
.cta .h2 { max-width: 14ch; }
.cta__phone { display: inline-flex; align-items: baseline; gap: var(--s-2); text-decoration: none; }
.cta__phone strong { font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.cta__phone:hover strong { color: var(--accent-on-night); }
.cta__phone span { font-size: var(--fs-small); color: var(--on-night-muted); }
.cta--no-media .cta__body { grid-column: 1 / span 7; }
.cta--no-media .cta .h2 { max-width: 18ch; }
@media (max-width: 1023px) { .cta__inner { grid-template-columns: 1fr; gap: var(--s-5); padding-block: var(--s-7); } .cta__body, .cta__media, .cta--no-media .cta__body { grid-column: 1 / -1; } }

.form { display: grid; gap: var(--s-3); }
.form--card { background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-4); }
.form--night { background: var(--night-2); color: var(--on-night); border: 1px solid var(--night-border); border-radius: var(--radius); padding: var(--s-4); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.field { display: grid; gap: 8px; }
.field label { font-size: var(--fs-small); font-weight: 500; }
.field .hint { font-size: var(--fs-caption); color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--fg); font: inherit; font-size: var(--fs-body); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.form--night .input, .form--night .select { background: var(--night); color: var(--on-night); border-color: color-mix(in srgb, var(--on-night-muted) 55%, transparent); }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; color: var(--fg); }
.form--night .select { color: var(--on-night); }
.form--night .select option { color: var(--fg); background: var(--surface); }
.input::placeholder { color: var(--faint); }
.select { text-overflow: ellipsis; }
.form--night .input::placeholder { color: var(--on-night-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.form--night .input:focus, .form--night .select:focus { border-color: var(--accent-on-night); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-on-night) 25%, transparent); }
.input:user-invalid, .select:user-invalid { border-color: var(--danger); }
.error { display: none; font-size: var(--fs-small); color: var(--danger); }
.form--night .error { color: var(--danger); }
.input:user-invalid ~ .error, .select:user-invalid ~ .error { display: block; }
.error.is-shown { display: block; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-2); align-items: start; font-size: var(--fs-small); color: var(--muted); }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent-ink); }
.form--night .check { color: var(--on-night-muted); }
.form--night .check input { accent-color: var(--accent-on-night); }
.form__actions { display: grid; gap: var(--s-2); }
.form__copy { font-size: var(--fs-small); }
.form__note { font-size: var(--fs-caption); color: var(--faint); }
.form--night .form__note { color: var(--on-night-muted); }
.form__status { font-size: var(--fs-small); color: var(--success); min-height: 1.5em; }
.form--night .form__status { color: var(--success); }
@media (max-width: 639px) { .form__row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Диалог
   ========================================================================== */
.dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--fg); }
.dialog::backdrop { background: color-mix(in srgb, var(--fg) 60%, transparent); }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-4) 0; }
.dialog__close { width: 44px; height: 44px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); display: grid; place-items: center; }
.dialog__body { padding: var(--s-3) var(--s-4) var(--s-4); }
.dialog .form { background: transparent; border: 0; padding: 0; }

/* ==========================================================================
   Контакты на странице
   ========================================================================== */
.contact-list { display: grid; gap: 0; }
.contact-list > div { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-2); padding: var(--s-3) 0; border-top: 1px solid var(--border); align-items: start; }
.contact-list > div:last-child { border-bottom: 1px solid var(--border); }
.contact-list .icon { color: var(--accent-ink); margin-top: 4px; }
.contact-list dt { font-size: var(--fs-small); color: var(--muted); margin-bottom: 4px; }
.contact-list dd a { text-decoration: none; font-weight: 600; }
.contact-list dd a:hover { color: var(--accent-ink); }
.map-embed { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-sunken); height: 480px; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 639px) { .map-embed { height: 540px; } }

/* ==========================================================================
   Подвал
   ========================================================================== */
.footer { background: var(--night); color: var(--on-night); border-top: 1px solid var(--night-border); padding-top: var(--section); }
.footer__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: var(--s-6); padding-bottom: var(--s-7); }
.footer__brand { display: grid; gap: var(--s-3); align-content: start; }
.footer__brand .brand__lockup { width: min(208px, 100%); }
.footer__brand p { color: var(--on-night-muted); font-size: var(--fs-small); max-width: 30ch; }
.footer__award { display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: var(--fs-small); color: var(--on-night); text-decoration: none; width: fit-content; }
.footer__award:hover { border-color: var(--accent-on-night); color: var(--accent-on-night); }
.footer__award .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-on-night); flex: none; }
.footer__title { font-size: var(--fs-body); font-weight: 600; color: var(--on-night); margin-bottom: var(--s-2); }
.footer__links { display: grid; gap: 8px; }
.footer__links a { text-decoration: none; color: var(--on-night); font-size: var(--fs-small); line-height: 1.5; padding: 4px 0; }
.footer__links a:hover { color: var(--accent-on-night); }
.footer__contact { display: grid; gap: var(--s-2); align-content: start; font-size: var(--fs-small); }
.footer__contact a { text-decoration: none; }
.footer__contact .tag { color: var(--fg); border-color: var(--border-strong); }
.footer__contact a:hover { color: var(--accent-on-night); }
.footer__phone { font-size: 22px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.footer__bottom { border-top: 1px solid var(--night-border); padding-block: var(--s-4); display: grid; gap: var(--s-3); font-size: var(--fs-caption); color: var(--on-night-muted); }
.footer__legal { display: grid; gap: 4px; max-width: 90ch; }
.footer__disclaimer { color: var(--on-night); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--fs-caption); }
@media (max-width: 1023px) { .footer__top { grid-template-columns: 1fr 1fr; gap: var(--s-5); } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 639px) { .footer__top { grid-template-columns: 1fr; } .footer__brand { grid-column: auto; } }

/* ==========================================================================
   Мобильная панель действий
   ========================================================================== */
.mobile-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; grid-template-columns: 1fr 1fr; gap: var(--s-2); padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom)); background: var(--night); border-top: 1px solid var(--night-border); }
.mobile-bar .btn { min-height: 50px; }
@media (max-width: 1023px) { .mobile-bar { display: grid; } body { padding-bottom: 80px; } }

/* ==========================================================================
   Прочее
   ========================================================================== */
.notice { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-2); padding: var(--s-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--fs-small); color: var(--muted); }
.notice .icon { color: var(--accent-ink); margin-top: 4px; }
/* разделы прайса: строка ссылок-якорей над таблицами */
.toc { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.toc a { text-decoration: none; font-size: var(--fs-body); font-weight: 500; padding: 4px 0; border-bottom: 1px solid var(--border-strong); transition: color var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.toc a:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
/* таблицы текут в две колонки и распределяются по высоте, без дыр под короткими разделами */
.price-tables { columns: 2; column-gap: var(--s-7); }
.price-table { table-layout: fixed; width: 100%; break-inside: avoid; margin-bottom: var(--s-6); }
.price-table:last-child { margin-bottom: 0; }
.price-table td:first-child { padding-right: var(--s-3); }
#prices { padding-top: var(--s-6); }
@media (max-width: 1023px) { .price-tables { columns: 1; } .price-table { margin-bottom: var(--s-5); } }
.offers { display: grid; gap: 0; }
.offer { display: grid; grid-template-columns: 1fr auto; gap: var(--s-2) var(--s-4); padding: var(--s-4) 0; border-top: 1px solid var(--border); align-items: start; }
.offer:last-child { border-bottom: 1px solid var(--border); }
.offer h3 { margin-bottom: 4px; }
.offer p { color: var(--muted); max-width: 60ch; }
.offer__price { text-align: right; }
.offer__price strong { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1; white-space: nowrap; }
.offer__price s { color: var(--faint); font-size: var(--fs-small); }
.offer__price small { display: block; font-size: var(--fs-caption); color: var(--faint); margin-top: 4px; }
@media (max-width: 639px) { .offer { grid-template-columns: 1fr; } .offer__price { text-align: left; } }

/* уменьшение движения: убираем перемещения, оставляем прозрачность */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero__body > * { animation: none; }
}


/* ==========================================================================
   ИИ-ассистент
   ========================================================================== */
.chat-fab { position: fixed; right: var(--gutter); bottom: var(--s-4); z-index: 75; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 52px; padding: 12px 20px; border: 1px solid var(--fg); border-radius: var(--radius-sm); background: var(--fg); color: var(--gold-on-ink); font-size: var(--fs-body); font-weight: 500; box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--fg) 60%, transparent); }
.chat-fab:hover { background: var(--ink-hover); }
.chat { position: fixed; right: var(--gutter); bottom: calc(var(--s-4) + 64px); z-index: 76; width: min(400px, calc(100% - var(--gutter) * 2)); max-height: min(640px, calc(100vh - var(--s-8))); display: grid; grid-template-rows: auto minmax(160px, 1fr) auto auto auto; background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--fg) 50%, transparent); overflow: hidden; }
.chat[hidden] { display: none; }
.chat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
.chat__close { width: 40px; height: 40px; flex: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); display: grid; place-items: center; }
.chat__close:hover { border-color: var(--fg); }
.chat__log { overflow-y: auto; padding: var(--s-4); display: grid; gap: var(--s-2); align-content: start; }
.chat__msg { display: grid; gap: var(--s-2); max-width: 90%; padding: 12px 16px; border-radius: var(--radius-sm); font-size: var(--fs-small); line-height: 1.5; white-space: pre-line; }
.chat__msg--bot { background: var(--surface-sunken); justify-self: start; }
.chat__typing { color: var(--muted); }
.chat__msg--user { background: var(--fg); color: var(--surface); justify-self: end; }
.chat__links { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.chat__links .btn { min-height: 40px; padding: 8px 12px; font-size: var(--fs-small); }
.chat__quick { display: flex; flex-wrap: wrap; gap: var(--s-1); padding: 0 var(--s-4) var(--s-2); }
.chat__quick button { flex: none; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--fs-small); white-space: nowrap; }
.chat__quick button:hover { border-color: var(--fg); }
.chat__form { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1); padding: var(--s-2) var(--s-4); }
.chat__form .btn { min-height: 50px; padding-inline: var(--s-3); }
.chat__note { padding: 0 var(--s-4) var(--s-3); font-size: var(--fs-caption); color: var(--faint); }
@media (max-width: 1023px) {
  .chat-fab { bottom: calc(92px + env(safe-area-inset-bottom)); padding: 12px 16px; }
  .chat { right: 0; left: 0; bottom: 0; width: auto; max-height: calc(100% - 24px); border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
}

/* печать */
@media print {
  .header, .footer, .mobile-bar, .dialog, .cta, .crumbs, .skip-link, .chat, .chat-fab { display: none !important; }
  body { background: var(--surface); color: var(--fg); padding: 0; }
}

/* ==========================================================================
   ПАТЧ: кнопка чата — компактная иконка, без нижней мобильной панели
   ========================================================================== */
.chat-fab {
  width: 56px; height: 56px; min-height: 56px; padding: 0;
  justify-content: center; border-radius: 50%;
}
.chat-fab .icon { width: 24px; height: 24px; }
.mobile-bar { display: none !important; }
@media (max-width: 1023px) {
  .chat-fab { bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); padding: 0; }
  body { padding-bottom: 0; }
}

/* ==========================================================================
   ЧАТ В СТИЛЕ «АБРИКОСА»: тёмная карточка, аватар, пузыри, быстрые вопросы
   ========================================================================== */
.chat {
  background: #1d1c1a;
  border: 1px solid #2d2c2a;
  border-radius: 24px;
  color: #f2efe9;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .35);
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.chat__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid #2d2c2a;
}
.chat__ava {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe0b0, #c8a15a 70%);
  display: grid; place-items: center;
  font: 600 15px/1 "Jost", "Segoe UI", sans-serif; color: #2a2010;
}
.chat__who { min-width: 0; }
.chat__head h2 { color: #fff; font-size: 15px; margin: 0; letter-spacing: -.01em; }
.chat__status {
  display: flex; align-items: center; gap: 6px;
  margin: 3px 0 0; color: #6fbf73; font-size: 12px; line-height: 1.2;
}
.chat__status i { width: 7px; height: 7px; border-radius: 50%; background: #6fbf73; display: inline-block; }
.chat__close {
  margin-left: auto; width: 36px; height: 36px; flex: none; border-radius: 50%;
  border: 1px solid #3a3936; background: #232220; color: #cfcac2;
  display: grid; place-items: center; cursor: pointer;
}
.chat__close:hover { border-color: #c8a15a; color: #fff; }
.chat__log { padding: 16px; gap: 10px; }
.chat__msg {
  max-width: 86%; padding: 11px 14px; border-radius: 16px;
  font-size: 14.5px; line-height: 1.45;
}
.chat__msg--bot {
  background: #2a2926; color: #f2efe9;
  border-bottom-left-radius: 5px; justify-self: start;
}
.chat__msg--user {
  background: #c8a15a; color: #211a0c;
  border-bottom-right-radius: 5px; justify-self: end;
}
.chat__typing { display: flex; gap: 5px; align-items: center; }
.chat__typing i {
  width: 7px; height: 7px; border-radius: 50%; background: #a8a49b;
  animation: karatTdot 1s infinite;
}
.chat__typing i:nth-child(2) { animation-delay: .15s; }
.chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes karatTdot {
  0%, 60%, 100% { opacity: .3; transform: none; }
  30% { opacity: 1; transform: translateY(-3px); }
}
.chat__links .btn {
  background: #232220; color: #e9e4dc; border: 1px solid #3a3936;
  border-radius: 999px; min-height: 38px; padding: 8px 14px; font-size: 13px;
}
.chat__links .btn--primary { background: #c8a15a; color: #211a0c; border-color: #c8a15a; }
.chat__quick { padding: 0 16px 12px; }
.chat__quick button {
  background: #232220; color: #e9e4dc; border: 1px solid #3a3936;
  border-radius: 999px; padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.chat__quick button:hover { border-color: #c8a15a; color: #fff; }
.chat__form { padding: 12px 16px; border-top: 1px solid #2d2c2a; background: #191817; }
.chat__form .input {
  background: #232220; border: 1px solid #3a3936; color: #f2efe9;
  border-radius: 999px; padding: 12px 16px;
}
.chat__form .input::placeholder { color: #8a8578; }
.chat__form .btn {
  border-radius: 50%; width: 44px; height: 44px; min-height: 44px; padding: 0;
  display: grid; place-items: center;
}
.chat__note { padding: 8px 16px 14px; color: #8a8578; font-size: 11.5px; line-height: 1.4; }

/* ==========================================================================
   HERO: фото выше кнопок на мобиле, телефон из hero убран
   ========================================================================== */
.hero__body { grid-row: 1; }
.hero__media { grid-row: 1 / span 2; }
.hero__actions--after { grid-column: 1 / span 7; grid-row: 2; margin-top: calc(var(--s-4) * -1); }
.hero__actions--after .btn { width: auto; }
@media (max-width: 1023px) {
  .hero__body { order: 1; grid-row: auto; }
  .hero__media { order: 2; grid-row: auto; }
  .hero__actions--after { order: 3; grid-column: 1 / -1; grid-row: auto; margin-top: 0; }
  .hero__actions--after .btn { width: 100%; }
}

@media (max-width: 1023px) {
  .hero__media img { aspect-ratio: 16 / 9; }
}
.hero__trust { margin-top: var(--s-3); font-size: 14px; color: var(--muted); }
.hero__trust b { color: var(--fg); font-weight: 600; }
.hero__body .hero__title { font-size: clamp(30px, 3vw, 44px); max-width: 24ch; }
@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__body, .hero__media, .hero__actions--after { grid-column: 1 / -1; min-width: 0; }
  .hero__body .hero__title { max-width: none; }
  .hero__lead, .hero__trust { max-width: none; }
}

/* Photo compositions */
.hero__media picture { display: block; }
.hero__media img { aspect-ratio: 1086 / 1140; }
.page-hero__media img { height: auto; aspect-ratio: 4 / 3; }
.media img { height: auto; }
.media img:is([src*="duo-bw-"], [src*="treatment-duo-"]) { aspect-ratio: 3 / 2; }
.media img:is([src*="administrator-"], [src*="doctor-wide-"], [src*="doctor-loupes-"]) { object-position: center 32%; }
.ba__item img { aspect-ratio: 3 / 2; }
@media (max-width: 1023px) {
  .hero__media img { aspect-ratio: 4 / 3; }
}

