/*
 * АНТЕРУС — слой компонентов дизайн-системы. Значения только из static/design-tokens.css.
 * Подключается последним (перед /appearance/site.css) на главной и внутренних страницах и приводит
 * к токенам то, что старые слои (theme/*, local.css, presentation/*) задают по-своему. Всё правило-
 * содержимое лежит в каскадном слое `design-system`: важные (!important) объявления слоя побеждают
 * важные объявления старых файлов вне слоёв независимо от специфичности. Поэтому каждое значение здесь
 * помечено !important, кроме `display` — его старые слои могут прятать намеренно. Опубликованное
 * оформление находится в более приоритетном important-слое appearance-controls (порядок в tokens).
 * Когда слой будет
 * принят, старые правила можно удалять, не меняя вида страниц.
 */

/* The fixed dark gallery is not the published page paper. This finite exception
 * shares the appearance layer so the generic published focus rule cannot dim it. */
@layer appearance-controls {
html body.home main#content dialog.ac-lightbox[open] :is(button, a[href], [tabindex]):focus-visible {
  outline: 2px solid #FFFFFF !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px #10231D !important;
  opacity: 1 !important;
}
}
@layer appearance-controls {
/* Fixed dark cover and uniform filter values have their own finite surface roles. */
html body main#content .cooperation-hero :is(h1, h1 em) { color: #FFFFFF !important; }
/* Cooperation breadcrumbs are on the same fixed dark cover, not page paper. */
html body main#content .cooperation-hero .crumbs,
html body main#content .cooperation-hero .crumbs a { color: #FFFFFF !important; }
html body main#content .cooperation-hero .crumbs a:focus-visible { outline-color: #FFFFFF !important; }
html body.an-interior main#content #local-specialist-filters .catalog-bar :is(.catalog-val, .catalog-field--select select) { color: var(--color-text-link) !important; }
}

/* BEGIN fixed-dark-foreground-repair */
@layer appearance-controls {
/* These forest surfaces are not the published page paper.
 * #content plus their explicit wrapper wins over the later paper text rule. */
html body main#content .b2b-pricing article.is-featured :is(h2, p, li, small) {
  color: var(--color-text-on-photo) !important;
}
/* The large price keeps its approved pale coral; the small label needs white. */
html body main#content .b2b-pricing article.is-featured > strong {
  color: #E3A58F !important;
}
html body main#content .cooperation-hero .cooperation-hero__grid > p {
  color: var(--color-text-on-photo) !important;
}
/* Prices CTA uses the primary surface pair; its booking button has its own pair. */
html body main#content section.prices-cta :is(h2, p) {
  color: var(--color-on-primary) !important;
}
}
/* END fixed-dark-foreground-repair */

@layer design-system {
/* ---------- 1. Основа ---------- */
html { font-synthesis: none !important; scroll-padding-top: var(--header-offset) !important; }
html body {
  font-family: var(--font-family-body) !important;
  font-size: var(--text-body-size) !important;
  line-height: var(--text-body-line) !important;
  color: var(--color-text-primary) !important;
  background-color: var(--color-background) !important;
  -webkit-font-smoothing: antialiased !important;
}
html body :is(input, select, textarea, button) { font-family: var(--font-family-body) !important; }

/* ---------- 2. Типографика ---------- */
html body :is(main, .site-footer, dialog) :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-family-heading) !important;
  font-synthesis: none !important;
  text-wrap: balance !important;
}
html body main h1 {
  font-size: var(--text-h1-size) !important;
  line-height: var(--text-h1-line) !important;
  font-weight: var(--font-weight-display) !important;
  letter-spacing: var(--letter-spacing-display) !important;
}
html body main h2 {
  font-size: var(--text-h2-size) !important;
  line-height: var(--text-h2-line) !important;
  font-weight: var(--font-weight-display) !important;
  letter-spacing: var(--letter-spacing-display) !important;
}
html body main h3 {
  font-size: var(--text-h3-size) !important;
  line-height: var(--text-h3-line) !important;
  font-weight: var(--font-weight-heading) !important;
  letter-spacing: 0 !important;
}
html body main h4 { font-size: var(--text-h4-size) !important; line-height: var(--text-h4-line) !important; font-weight: var(--font-weight-strong-heading) !important; letter-spacing: 0 !important; }
html body main h5 { font-size: var(--text-h5-size) !important; line-height: var(--text-h5-line) !important; font-weight: var(--font-weight-strong-heading) !important; }
html body main h6 { font-size: var(--text-h6-size) !important; line-height: var(--text-h6-line) !important; font-weight: var(--font-weight-strong-heading) !important; }
html body main :is(h1, h2) em { font-family: var(--font-family-heading) !important; font-weight: var(--font-weight-display) !important; font-style: italic !important; color: var(--color-text-link-hover) !important; }
html body main .eyebrow { font-weight: var(--font-weight-semibold) !important; letter-spacing: var(--letter-spacing-label) !important; text-transform: uppercase !important; color: var(--color-text-secondary) !important; }
/* Лид под заголовком страницы */
html body main :is(.specialists-page__hero > p, .help-page__hero-grid > p, .faq-page__hero-copy > p:first-child, .contacts-page__schedule,
  .tests-catalog-hero__grid > p, .reviews-catalog-hero__copy > p, .blog-reference-header > p, .prices-hero__grid > p, .portal-hero p:not(.eyebrow)) {
  font-size: var(--text-lead-size) !important; line-height: var(--text-lead-line) !important; color: var(--color-text-secondary) !important;
}

/* ---------- 3. Сетка ---------- */
html body :is(.shell, .hs-inner, section.hp, .ac-section, .site-footer > .shell, .footer-shell) {
  width: var(--container) !important;
  max-width: var(--container-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
/* Both accepted catalog source shapes: a bare root or an existing .shell wrapper. */
html body :is(main.specialists-page, main > .specialists-page:not(.shell)):not(:has(.shell)) {
  width: var(--container) !important;
  max-width: var(--container-width) !important;
  margin-inline: auto !important;
}
/* Юридический документ: заголовок по сетке, текст читаемой колонкой */
html body .legal-document > :not(h1) { max-width: 760px !important; }

/* ---------- 4. Ссылки, подчёркивания, фокус ---------- */
html body :is(header, footer, nav, .crumbs, .blog-catalog-crumbs, button, .button, [class*="card"], [class*="actions"],
  [class*="-link"], [class*="tag"], [class*="chip"], [class*="pill"], [class*="nav"], .rc-expand, .review-source, .help-tabs, .faq-directory__quick-links) a,
html body :is(button, .button, a.button, .rc-expand, .profile-expand, .review-source, .ac-view-all, .ac-text-link, .profile-booking-phone),
html body :is(.crumbs, .blog-catalog-crumbs, .profile-crumbs) a,
html body :is(h1, h2, h3, h4, h5, h6) a {
  text-decoration: none !important;
}
/* В тексте статей и документов ссылка остаётся подчёркнутой: цвет сам по себе не отличает её от текста (WCAG 1.4.1) */
html body :is(.blog-reference-article__body, .local-article-body, .legal-document, .entry-content, .profile-section .rich-text) p a {
  text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: 3px !important;
}
html body :is(.crumbs, .blog-catalog-crumbs, .profile-crumbs) { color: var(--color-text-secondary) !important; font-size: var(--text-caption-size) !important; }
html body :is(.crumbs, .blog-catalog-crumbs, .profile-crumbs) a { color: var(--color-text-secondary) !important; transition: color var(--transition) !important; }
html body :is(.crumbs, .blog-catalog-crumbs, .profile-crumbs) a:hover { color: var(--color-text-link) !important; }
html body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: var(--focus-ring) !important;
  outline-offset: var(--focus-offset) !important;
  box-shadow: none !important;
}

/* ---------- 5. Кнопки ---------- */
/* Primary · Secondary · Text · Icon · Disabled */
html body :is(.button, a.button, button.button, .hs-btn, .ac-pill, .ac-view-all:not(.ac-text-link), .sc-all, .faq-all-link, .btn, .local-form button[type="submit"]) {
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-8) !important;
  min-height: var(--control-height) !important;
  height: auto !important;
  padding: 0 var(--control-padding-x) !important;
  border-radius: var(--radius-control) !important;
  font-family: var(--font-family-body) !important;
  font-size: var(--text-button-size) !important;
  line-height: var(--text-button-line) !important;
  font-weight: var(--font-weight-semibold) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition) !important;
}
/* Primary — запись и главное действие */
html body :is(.button--coral, .button--appointment, .hs-btn--primary, .quick-booking-submit, .contact-appointment-form button[type="submit"], .local-form button[type="submit"]) {
  background: var(--color-brand-accent) !important;
  border: var(--control-border-width) solid var(--color-brand-accent) !important;
  color: var(--color-on-brand) !important;
}
html body :is(.button--coral, .button--appointment, .hs-btn--primary, .quick-booking-submit, .contact-appointment-form button[type="submit"], .local-form button[type="submit"]):hover { background: var(--color-brand-accent-hover) !important; border-color: var(--color-brand-accent-hover) !important; }
html body :is(.button--coral, .button--appointment, .hs-btn--primary, .quick-booking-submit, .contact-appointment-form button[type="submit"], .local-form button[type="submit"]):active { background: var(--color-brand-accent-active) !important; border-color: var(--color-brand-accent-active) !important; }
/* Secondary — второстепенное действие */
html body :is(.button--green, .ac-pill, .ac-view-all:not(.button--coral):not(.ac-text-link), .faq-all-link, .sc-all, .local-filter button) {
  background: transparent !important;
  border: var(--control-border-width) solid var(--color-brand-dark) !important;
  color: var(--color-text-link) !important;
}
html body :is(.button--green, .ac-pill, .ac-view-all:not(.button--coral):not(.ac-text-link), .faq-all-link, .sc-all, .local-filter button):hover { background: var(--color-brand-dark) !important; color: var(--color-on-primary) !important; }
/* «Все отзывы», «Все специалисты»…: переход к списку — всегда Secondary, даже если в разметке класс записи */
html body a.ac-view-all.button--coral:not(.ac-text-link) { background: transparent !important; border: var(--control-border-width) solid var(--color-brand-dark) !important; color: var(--color-text-link) !important; }
html body a.ac-view-all.button--coral:not(.ac-text-link):hover { background: var(--color-brand-dark) !important; color: var(--color-on-primary) !important; }
/* Secondary на тёмном фоне и фото */
html body .hs-btn--ghost { background: transparent !important; border: var(--control-border-width) solid rgba(255, 255, 255, .72) !important; color: var(--color-text-on-photo) !important; }
html body .hs-btn--ghost:hover { background: var(--color-text-on-photo) !important; color: var(--color-white-ink) !important; }
/* Text button */
html body :is(.ac-text-link, .rc-expand, .profile-expand, .specialist-card__actions a:not(.button), .local-article-author__link) {
  min-height: var(--touch-target) !important;
  display: inline-flex; align-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--color-text-link) !important;
  font: var(--font-weight-semibold) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
  text-decoration: none !important;
  cursor: pointer !important;
}
html body :is(.ac-text-link, .rc-expand, .profile-expand, .specialist-card__actions a:not(.button), .local-article-author__link):hover { color: var(--color-text-link-hover) !important; }
/* Disabled */
html body :is(button, .button, a.button)[disabled],
html body :is(button, .button, a.button)[aria-disabled="true"] {
  background: var(--color-disabled-surface) !important; border-color: var(--color-disabled-surface) !important;
  color: var(--color-disabled) !important; cursor: not-allowed !important; pointer-events: none !important;
}
/* Кнопка записи в шапке: та же Primary, чуть ниже, но не меньше минимальной зоны */
html body .site-header .nav-tools a.button { min-height: var(--touch-target) !important; padding: 0 var(--space-16) !important; font-size: var(--text-caption-size) !important; }
html body .site-header .nav-tools a.button::after { content: none !important; }
html body .site-header .brand { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; }
@media (min-width: 1440px), (min-width: 481px) and (max-width: 1100px) { html body .site-header .brand .brand-logo { width: 230px !important; max-width: 230px !important; height: auto !important; } }
@media (min-width: 1101px) { html body .site-header .shell.nav { padding-left: var(--space-24) !important; padding-right: var(--space-24) !important; } }
html body .site-header .nav-links { gap: var(--space-12) !important; }
@media (min-width: 1101px) and (max-width: 1439px) {
  html body .site-header .brand .brand-logo { width: 170px !important; max-width: 170px !important; height: auto !important; }
  html body .site-header .nav-links { gap: var(--space-12) !important; }
  html body .site-header .nav-links a { font-size: var(--text-caption-size) !important; }
}
@media (min-width: 1101px) and (max-width: 1365px) {
  html body .site-header .brand .brand-logo { width: 150px !important; max-width: 150px !important; }
  html body .site-header .shell.nav { column-gap: var(--space-16) !important; }
}

/* ---------- 6. Поля форм ---------- */
html body main :is(input[type="text"], input[type="tel"], input[type="email"], input[type="search"], input[type="number"], input:not([type]), select),
html body .final-cta__form :is(input, select) {
  min-height: var(--control-height) !important;
  border: var(--control-border-width) solid var(--color-border-strong) !important;
  border-radius: var(--radius) !important;
  background-color: var(--color-surface-raised) !important;
  color: var(--color-text-primary) !important;
  font-size: var(--text-body-size) !important;
  line-height: var(--text-body-line) !important;
  padding-left: var(--space-16) !important;
  padding-right: var(--space-16) !important;
  box-shadow: none !important;
}
html body main textarea, html body .final-cta__form textarea {
  border: var(--control-border-width) solid var(--color-border-strong) !important;
  border-radius: var(--radius) !important;
  background: var(--color-surface-raised) !important;
  font-size: var(--text-body-size) !important;
  line-height: var(--text-body-line) !important;
  padding: var(--space-12) var(--space-16) !important;
  box-shadow: none !important;
}
html body main :is(input, select, textarea)::placeholder { color: var(--color-text-secondary) !important; opacity: 1 !important; }
html body main input[type="checkbox"] { width: 20px !important; height: 20px !important; border-radius: var(--radius-checkbox) !important; accent-color: var(--color-text-link) !important; flex: none !important; }
html body main :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--color-error) !important; }

/* ---------- 7. Теги ---------- */
html body :is(.sc-tag, .profile-chips span, .profile-chips a, .blog-tag-list a, .site-knowledge-tags a, .test-catalog-card__category,
  .specialist-card__tags span, .specialist-card .tag, .local-article-tags a, .related-terms a, .profile-terms a) {
  display: inline-flex;
  align-items: center !important;
  min-height: var(--tag-height) !important;
  padding: 0 var(--tag-padding-x) !important;
  border: 0 !important;
  border-radius: var(--radius) !important;
  background: var(--color-surface-muted) !important;
  color: var(--color-muted-ink) !important;
  font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
  text-decoration: none !important;
  white-space: normal !important;
}
html body a:is(.profile-chips a, .blog-tag-list a, .site-knowledge-tags a, .test-catalog-card__category, .local-article-tags a, .related-terms a, .profile-terms a):hover { background: var(--color-surface-muted-hover) !important; }

/* ---------- 8. Один радиус ---------- */
html body :is(
  .shell.nav, .catalog-bar, .hs-over, .final-cta, .final-cta__form,
  .ac-gallery-main, .ac-gallery-small figure, .ac-gallery-photo-open, .ac-article, .ac-article img, .ev-card, .rc-card .review-quote,
  .specialist-card, .specialist-photo-link, .sc-photo, .sc-photo img, .entity-card,
  .profile-photo, .profile-photo img, .quick-booking-card, .profile-bottom-booking, .profile-video,
  .help-group, .help-search, .help-cta, .filter-dropdown__panel, .catalog-field, .filter-dropdown, .filter-dropdown summary,
  .blog-reference-nav, .blog-reference-nav a, .blog-reference-nav .nav-marker, .blog-reference-card, .blog-reference-card img, .blog-reference-card__link,
  .local-article-image, .local-article-author__card, .local-article-author__card img, .local-article-specialists__card, .local-article-specialists__card img,
  .reading-route__card, .reading-route__image, .material-booking, .local-article-next,
  .faq-directory__group, .faq-directory__support, .clinic-document-disclosures details, .clinic-faq-group,
  .contacts-card, .contacts-route__map, .contacts-route__video, .contacts-route__frame, .contacts-route iframe, .contacts-route video,
  .tax-deduction-form, .reviews-filters, .review-catalog-card, .tests-toolbar, .tests-search, .test-catalog-card,
  .portal-choice, .local-auth-card, .hads-intro__copy, .hads-start-card, .price-group, .prices-search,
  .site-header .shell.nav, .nav-tools a, .nav-tools button, .header-search button, .header-search input,
  .catalog-price, .catalog-price input, .catalog-sort, .catalog-sort select, .specialist-price, .specialist-card__experience,
  .profile-chips span, .profile-chips a, .contact-messenger, .contacts-communication a, .test-back-button, .reviews-filter-status button,
  .reviews-pagination button, .tests-category select, .local-pagination a, .local-pagination span, .help-tabs a, .faq-directory__quick-links a,
  .blog-tag-list a, .site-knowledge-tags a, .sc-arrow, .hs-round, .rc-expand,
  main button, main .button, main input:not([type="checkbox"]):not([type="radio"]), main select, main textarea, main video, main iframe,
  main figure, main img:not([width="16"]):not([width="20"]):not([width="24"])
) { border-radius: var(--radius) !important; }
html body main input[type="checkbox"] { border-radius: var(--radius-checkbox) !important; }
html body :is(.ac-gallery-main, .ac-gallery-small figure, .ac-article, .sc-photo, .specialist-photo-link, .profile-photo, .contacts-route__map, .contacts-route__video, .blog-reference-card__link) { overflow: hidden !important; }

/* ---------- 9. Карточки и поверхности ---------- */
html body main :is(.rc-card .review-quote, .specialist-card, .test-catalog-card, .blog-reference-card, .contacts-card, .local-auth-card,
  .reading-route__card, .local-article-specialists__card, .local-article-author__card, .quick-booking-card, .review-catalog-card,
  .faq-directory__group, .help-group, .clinic-faq-group, .tax-deduction-form, .reviews-filters, .tests-toolbar, .final-cta__form) {
  box-shadow: none !important;
}
html body .site-header .shell.nav { box-shadow: var(--shadow-floating) !important; }

/* ---------- 10. Декоративные стрелки ---------- */
/* Карточка целиком — ссылка; круглая кнопка-стрелка внутри дублирует переход */
html body :is(.ac-article .ac-arrow, .ev-card .ac-arrow, .blog-reference-card__cta, .blog-reference-nav a::after, .blog-reference-nav a > svg, .blog-reference-nav a > .arrow) { display: none !important; }


/* ---------- 11. Шапка и навигация ---------- */
html body .site-header .nav-links a {
  font-family: var(--font-family-body) !important;
  font-size: var(--text-nav-size) !important;
  line-height: var(--text-nav-line) !important;
  font-weight: var(--font-weight-medium) !important;
  text-decoration: none !important;
}
/* Текущий раздел: цвет и тонкая линия под пунктом; на мобильном — плашка */
html body .site-header .nav-links a[aria-current="page"] { color: var(--color-text-link-hover) !important; font-weight: var(--font-weight-semibold) !important; }
html body .site-header .nav-links a:hover { color: var(--color-text-link-hover) !important; }
html.menu-is-open, html.menu-is-open body { overflow: hidden !important; }
@media (max-width: 1100px) {
  html body .site-header .shell.nav { justify-content: flex-start !important; column-gap: var(--space-12) !important; }
  html body .site-header .nav-tools { margin-left: auto !important; }
  html body .site-header .menu-toggle { order: 10 !important; margin-left: 0 !important; }
  html body .site-header .account-trigger .dashicons { display: inline-block !important; }
  html body .site-header .menu-toggle {
    min-width: var(--touch-target) !important; width: auto !important; flex-basis: auto !important;
    min-height: var(--touch-target) !important; height: var(--touch-target) !important;
    padding: 0 var(--space-12) !important; gap: var(--space-8) !important;
    border-radius: var(--radius) !important;
    font: var(--font-weight-semibold) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
  }
  html body .site-header .menu-toggle > span { display: inline !important; }
  html body .site-header .nav-links.is-open a[aria-current="page"] { box-shadow: none !important; background: var(--color-surface-muted) !important; color: var(--color-muted-ink) !important; border-radius: var(--radius) !important; }
}

/* The open compact menu scrolls within the remaining viewport. */
@media (max-width: 1100px) {
  html body.home #site-header.site-header .nav-links.is-open {
    max-height: calc(100dvh - var(--nav-top, 12px) - var(--nav-h, 58px) - 20px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
}

/* Only measured desktop overflow uses the existing compact-menu interaction. */
@media (min-width: 1101px) {
  html body .site-header.has-compact-navigation .shell.nav { justify-content: flex-start !important; column-gap: var(--space-12) !important; }
  html body .site-header.has-compact-navigation .nav-tools { margin-left: auto !important; }
  html body .site-header.has-compact-navigation .menu-toggle {
    display: inline-flex !important; order: 10 !important; margin-left: 0 !important;
    align-items: center !important; justify-content: center !important; flex: 0 0 auto !important;
    min-width: var(--touch-target) !important; min-height: var(--touch-target) !important;
    padding: 0 var(--space-12) !important; gap: var(--space-8) !important;
    border-radius: var(--radius) !important;
    font: var(--font-weight-semibold) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
  }
  html body .site-header.has-compact-navigation .menu-toggle > span { display: inline !important; }
  html body .site-header.has-compact-navigation .nav-links { display: none !important; }
  html body .site-header.has-compact-navigation .nav-links.is-open {
    display: flex !important; flex-direction: column !important; position: absolute !important;
    top: calc(100% + 8px) !important; left: 0 !important; right: 0 !important;
    width: 100% !important; max-width: none !important; margin: 0 !important; transform: none !important;
    max-height: calc(100svh - var(--nav-top, 12px) - var(--nav-h, 80px) - 24px) !important;
    overflow: auto !important; padding: var(--space-24) !important;
    background: var(--color-background) !important; color: var(--color-text-link) !important;
    border-radius: var(--radius) !important;
  }
  html body .site-header.has-compact-navigation .nav-links.is-open a { display: block !important; padding: var(--space-12) !important; white-space: normal !important; }
  html body .site-header.has-compact-navigation .nav-links.is-open a[aria-current="page"] { background: var(--color-surface-muted) !important; color: var(--color-muted-ink) !important; border-radius: var(--radius) !important; }
  html body .site-header.has-compact-navigation .mobile-booking { display: block !important; }
  html body .site-header.has-compact-navigation .nav-item--has-children { display: grid !important; grid-template-columns: 1fr auto !important; }
  html body .site-header.has-compact-navigation .nav-submenu { position: static !important; grid-column: 1 / -1 !important; background: transparent !important; color: inherit !important; box-shadow: none !important; }
  html body .site-header.has-compact-navigation .nav-item--has-children:hover .nav-submenu { display: none !important; }
  html body .site-header.has-compact-navigation .nav-item--has-children.is-open .nav-submenu { display: grid !important; }
}

/* ---------- 12. Карточка специалиста: компактный согласованный образец ---------- */
html body #specialists .sc-card > a {
  display: flex; flex-direction: column !important;
  height: 100% !important;
  padding: 0 0 var(--space-16) !important;
  background: var(--color-surface-raised) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  color: var(--color-text-link) !important;
  text-decoration: none !important;
}
html body #specialists .sc-photo { margin: 0 0 var(--space-16) !important; border-radius: var(--radius) var(--radius) 0 0 !important; aspect-ratio: 4 / 3 !important; }
html body #specialists .sc-identity { padding: 0 var(--space-16) !important; gap: var(--space-8); }
/* Полное имя остаётся читаемым, даже когда карусель предлагает уменьшить шрифт. */
html body #specialists .sc-name {
  font-family: var(--font-family-heading) !important;
  font-weight: var(--font-weight-heading) !important;
  font-size: max(18px, var(--sc-name-size, var(--text-h4-size))) !important;
  line-height: 1.3 !important;
  height: auto !important;
  min-height: 2.6em !important;
  margin: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  color: var(--color-text-link) !important;
}
html body #specialists .sc-role {
  margin-top: 0 !important;
  color: var(--color-text-secondary) !important;
  font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
  min-height: 0 !important;
}
html body #specialists .sc-tags { margin: var(--space-16) 0 !important; padding: 0 var(--space-16) !important; gap: 6px !important; min-height: 0; }
html body #specialists .sc-tag { border-radius: 8px !important; padding: 5px 8px !important; font-size: 12px !important; font-weight: 400 !important; }
html body #specialists .sc-facts {
  display: grid; grid-template-columns: 1fr 1fr !important;
  margin: auto var(--space-16) 0 !important;
  padding-top: var(--space-16) !important;
  border-top: 1px solid var(--color-border) !important;
  color: var(--color-text-link) !important;
}
html body #specialists .sc-fact { display: grid; gap: var(--space-4) !important; min-width: 0 !important; }
html body #specialists .sc-fact + .sc-fact { padding-left: var(--space-16) !important; border-left: 0 !important; }
html body #specialists .sc-fact small { font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; }
html body #specialists .sc-fact b { font: var(--font-weight-heading) var(--text-h5-size)/var(--text-h5-line) var(--font-family-heading) !important; color: var(--color-text-link) !important; white-space: nowrap !important; }

/* ---------- 13. Отзыв (главная): «Показать полностью» справа от автора, три строки текста ---------- */
html body #reviews .review-quote {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas: "meta meta" "quote quote" "author more" !important;
  column-gap: var(--space-16) !important;
  align-items: end !important;
  padding: var(--space-24) !important;
  background: var(--color-surface-raised) !important;
  border: 1px solid var(--color-border) !important;
}
html body #reviews .review-rating-row { grid-area: meta !important; margin: 0 0 var(--space-12) !important; }
html body #reviews .review-quote blockquote { grid-area: quote !important; margin: 0 0 var(--space-16) !important; font: var(--font-weight-regular) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; color: var(--color-text-primary) !important; }
html body #reviews .review-quote footer { grid-area: author !important; margin: 0 !important; }
html body #reviews .rc-expand { grid-area: more !important; justify-self: end !important; align-self: end !important; }
html body #reviews .rc-expand[hidden] { display: none !important; }
html body #reviews .review-patient { font: var(--font-weight-semibold) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-primary) !important; }
html body #reviews .review-source { font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-link) !important; text-decoration: none !important; }
html body #reviews .review-date { font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; }


/* Закрытый отзыв всегда занимает три строки: карточки в ряд одной высоты */
html body #reviews .rc-card:not(.is-expanded) .review-quote blockquote { min-height: calc(3 * var(--text-body-line)) !important; }
/* Блог на главной: заголовки боковых карточек — H4, главной — H3 */
html body #blog .ac-article--side h3 { font: var(--font-weight-heading) var(--text-h4-size)/var(--text-h4-line) var(--font-family-heading) !important; letter-spacing: 0 !important; }
html body #blog .ac-article--lead h3 { font: var(--font-weight-display) var(--text-h3-size)/var(--text-h3-line) var(--font-family-heading) !important; }
html body #blog .ac-article time { font: var(--font-weight-regular) var(--text-micro-size)/var(--text-micro-line) var(--font-family-body) !important; }
/* «Все …» — переход к списку: везде одна вторичная кнопка */
html body a.ac-text-link.ac-view-all {
  min-height: var(--control-height) !important; padding: 0 var(--control-padding-x) !important;
  border: var(--control-border-width) solid var(--color-brand-dark) !important; border-radius: var(--radius) !important;
  font: var(--font-weight-semibold) var(--text-button-size)/var(--text-button-line) var(--font-family-body) !important;
  color: var(--color-text-link) !important; background: transparent !important; justify-content: center !important;
}
html body a.ac-text-link.ac-view-all:hover { background: var(--color-brand-dark) !important; color: var(--color-on-primary) !important; }
html body a.ac-view-all > span[aria-hidden="true"]:empty { display: none !important; }

/* ---------- 15. Форма заявки: компактная, один левый край ---------- */
html body .form-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
html body .contact-appointment-form {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row dense !important;
  column-gap: var(--space-16) !important;
  row-gap: var(--space-12) !important;
  align-items: start !important;
  margin: 0 !important;
}
html body .contact-appointment-form > label:not(.portal-consent) {
  display: grid !important; gap: var(--space-4) !important; margin: 0 !important; padding: 0 !important;
  font: var(--font-weight-semibold) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
  color: var(--color-text-primary) !important;
  grid-column: 1 !important;
}
html body .contact-appointment-form > label:not(.portal-consent):has(textarea) { grid-column: 2 !important; grid-row: 1 / span 3 !important; height: 100% !important; grid-template-rows: auto 1fr !important; }
html body .contact-appointment-form textarea { height: 100% !important; min-height: 120px !important; resize: vertical !important; }
html body .contact-appointment-form .form-health-note { grid-column: 2 !important; margin: calc(-1 * var(--space-4)) 0 0 !important; font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; }
html body .contact-appointment-form .portal-consent {
  grid-column: 1 / -1 !important; display: flex !important; align-items: flex-start !important; gap: var(--space-12) !important;
  margin: var(--space-4) 0 0 !important; padding: 0 !important;
  font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important;
}
html body .contact-appointment-form .portal-consent { flex-wrap: wrap !important; }
html body .contact-appointment-form .portal-consent input { margin: 0 !important; }
html body .contact-appointment-form .portal-consent > span:not(.form-field-error) { flex: 1 1 0 !important; min-width: 0 !important; }
html body .contact-appointment-form .portal-consent > .form-field-error { flex-basis: 100% !important; margin-left: calc(20px + var(--space-12)) !important; }
html body .contact-appointment-form .portal-consent a { color: var(--color-text-link) !important; text-decoration: underline !important; text-underline-offset: 3px !important; }
html body .contact-appointment-form button[type="submit"] { grid-column: 1 !important; justify-self: start !important; margin: var(--space-4) 0 0 !important; }
html body .contact-appointment-form .form-status { grid-column: 1 / -1 !important; margin: 0 !important; font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; }
html body .contact-appointment-form .form-status:empty { display: none !important; }
html body .contact-appointment-form .form-status.is-error { color: var(--color-error) !important; }
html body :is(.form-field-error, .field-note[data-presentation-mask-note]) { display: block; margin: var(--space-4) 0 0 !important; font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-error) !important; }
html body .form-field-error[hidden] { display: none !important; }
html body .portal-consent .form-field-error { flex-basis: 100% !important; }
html body .form-success { padding: var(--space-24) !important; border-radius: var(--radius) !important; background: var(--color-success-surface) !important; color: var(--color-text-primary) !important; outline: none !important; }
html body .form-success__title { margin: 0 0 var(--space-8) !important; font: var(--font-weight-heading) var(--text-h4-size)/var(--text-h4-line) var(--font-family-heading) !important; color: var(--color-success) !important; }
html body .form-success__text { margin: 0 !important; font: var(--font-weight-regular) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; }
html body :is(.final-cta__form, .contacts-card--simple):has(.contact-appointment-form) { padding: var(--space-32) !important; }
html body .final-cta__form > p, html body .contacts-appointment__lead { margin: 0 0 var(--space-16) !important; font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; max-width: 52ch !important; }
html body .preview-form-note { display: none !important; }
@media (max-width: 767px) {
  html body .contact-appointment-form { grid-template-columns: minmax(0, 1fr) !important; }
  html body .contact-appointment-form > label:not(.portal-consent):has(textarea), html body .contact-appointment-form .form-health-note, html body .contact-appointment-form button[type="submit"] { grid-column: 1 !important; grid-row: auto !important; }
  html body .contact-appointment-form button[type="submit"] { justify-self: stretch !important; }
  html body :is(.final-cta__form, .contacts-card--simple):has(.contact-appointment-form) { padding: var(--space-24) var(--space-16) !important; }
}

/* ---------- 16. Карточка специалиста в каталоге: те же ряды, что на главной; все карточки одной высоты ---------- */
html body .specialist-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: var(--grid-gap) !important; align-items: stretch !important; }
html body .specialist-grid .specialist-card {
  display: flex; flex-direction: column !important;
  min-width: 0 !important; height: 100% !important;
  padding: var(--space-12) var(--space-12) var(--space-16) !important;
  background: var(--color-surface-raised) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
}
html body .specialist-grid .specialist-photo-link { display: block; margin: 0 0 var(--space-16) !important; aspect-ratio: 4 / 3 !important; border-radius: var(--radius) !important; overflow: hidden !important; background: var(--color-surface-muted) !important; }
html body .specialist-grid .specialist-photo { width: 100% !important; height: 100% !important; object-fit: cover !important; aspect-ratio: auto !important; margin: 0 !important; border-radius: 0 !important; }
html body .specialist-grid .specialist-card__body { display: flex; flex-direction: column !important; flex: 1 1 auto !important; padding: 0 var(--space-4) !important; }
html body .specialist-grid .specialist-card__name { margin: 0 !important; font: var(--font-weight-heading) var(--text-h4-size)/1.3 var(--font-family-heading) !important; min-height: 2.6em !important; letter-spacing: 0 !important; }
html body .specialist-grid .specialist-card__name a { color: var(--color-text-link) !important; }
html body .specialist-grid .specialist-card__name a > span { display: block; }
html body .specialist-grid .specialist-card__name a:hover { color: var(--color-text-link-hover) !important; }
html body .specialist-grid .specialist-card__role { margin: var(--space-4) 0 0 !important; min-height: calc(2 * var(--text-caption-line)) !important; font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; display: -webkit-box; -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; }
html body .specialist-grid .specialist-card__tags { display: flex; flex-wrap: wrap !important; gap: var(--space-8) !important; align-content: flex-start !important; min-height: var(--tag-height) !important; margin: var(--space-12) 0 var(--space-16) !important; padding: 0 !important; list-style: none !important; }
html body .specialist-grid .specialist-card__tags li {
  display: inline-flex; align-items: center !important; min-height: var(--tag-height) !important; padding: 0 var(--tag-padding-x) !important; margin: 0 !important;
  border: 0 !important; border-radius: var(--radius) !important; background: var(--color-surface-muted) !important; color: var(--color-muted-ink) !important;
  font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
}
html body .specialist-grid .specialist-card__tags li::before { content: none !important; }
html body .specialist-grid .specialist-card__tags-space { display: block; min-height: var(--tag-height) !important; margin: var(--space-12) 0 var(--space-16) !important; }
html body .specialist-grid .specialist-card__facts { display: grid; grid-template-columns: 1fr 1fr !important; margin: 0 !important; padding: var(--space-12) 0 0 !important; border-top: 1px solid var(--color-border) !important; }
html body .specialist-grid .specialist-card__facts > div { display: grid; gap: var(--space-4) !important; min-width: 0 !important; }
html body .specialist-grid .specialist-card__facts > div + div { padding-left: var(--space-16) !important; border-left: 1px solid var(--color-border) !important; }
html body .specialist-grid .specialist-card__facts dt { margin: 0 !important; font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; }
html body .specialist-grid .specialist-card__facts dd { margin: 0 !important; font: var(--font-weight-heading) var(--text-h5-size)/var(--text-h5-line) var(--font-family-heading) !important; color: var(--color-text-link) !important; white-space: nowrap !important; }
html body .specialist-grid .specialist-card__formats { min-height: var(--text-caption-line) !important; margin: var(--space-12) 0 0 !important; font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; }
html body .specialist-grid .specialist-card__actions { display: grid; grid-template-columns: 1fr 1fr !important; gap: var(--space-8) !important; margin: auto 0 0 !important; padding-top: var(--space-16) !important; padding: 0 !important; border: 0 !important; }
html body .specialist-grid .specialist-card__actions .button { width: 100% !important; padding: 0 var(--space-12) !important; font-size: var(--text-caption-size) !important; }
html body .specialist-grid .specialist-card__booking-note { order: 0 !important; margin: var(--space-8) 0 0 !important; font: var(--font-weight-regular) var(--text-micro-size)/var(--text-micro-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; text-align: center !important; }
@media (max-width: 1279px) { html body .specialist-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 1023px) { html body .specialist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 767px) { html body .specialist-grid { grid-template-columns: minmax(0, 1fr) !important; } }

/* ---------- 17. Каталог: поиск, выбранные фильтры, панель фильтров на телефоне ---------- */
/* The desktop bar and price/sort row share a wrapper; the form's gap cannot separate them. */
@media (min-width: 768px) {
  html body.an-interior #content #local-specialist-filters > .catalog-panel {
    display: flex !important; flex-direction: column !important; gap: 14px !important;
  }
}
html body .catalog-search { display: block; margin: 0 0 var(--space-12) !important; }
html body .catalog-search input { width: 100% !important; padding-left: var(--space-24) !important; }
html body .catalog-toggle { display: none; }
html body .catalog-panel__close { display: none !important; }
html body .catalog-active { display: flex; flex-wrap: wrap !important; gap: var(--space-8) !important; margin: var(--space-16) 0 0 !important; }
html body .catalog-active[hidden] { display: none !important; }
html body .catalog-chip {
  display: inline-flex; align-items: center !important; gap: var(--space-8) !important; min-height: var(--tag-height) !important; padding: 0 var(--space-12) !important;
  border: 0 !important; border-radius: var(--radius) !important; background: var(--color-surface-muted) !important; color: var(--color-muted-ink) !important;
  font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; cursor: pointer !important;
}
html body .catalog-chip::after { content: '×' !important; font-size: 16px !important; line-height: 1 !important; color: var(--color-muted-ink) !important; }
html body .catalog-chip:hover { background: var(--color-surface-muted-hover) !important; }
@media (max-width: 767px) {
  html body .catalog-toggle {
    display: inline-flex; align-items: center !important; justify-content: center !important; gap: var(--space-8) !important; width: 100% !important;
    min-height: var(--control-height) !important; border: var(--control-border-width) solid var(--color-brand-dark) !important; border-radius: var(--radius) !important;
    background: transparent !important; color: var(--color-text-link) !important; font: var(--font-weight-semibold) var(--text-button-size)/var(--text-button-line) var(--font-family-body) !important;
  }
  html body .catalog-toggle__count { display: inline-grid; place-items: center !important; min-width: 24px !important; height: 24px !important; border-radius: var(--radius) !important; background: var(--color-brand-accent) !important; color: var(--color-on-brand) !important; font-size: var(--text-micro-size) !important; }
  html body .catalog-toggle__count[hidden] { display: none !important; }
  html body #local-specialist-filters:not(.is-panel-open) .catalog-panel { display: none !important; }
  html body #local-specialist-filters.is-panel-open .catalog-panel {
    position: fixed !important; inset: 0 !important; z-index: 1000 !important; display: flex; flex-direction: column !important; gap: var(--space-12) !important;
    padding: var(--space-24) var(--container-gutter) calc(var(--space-24) + env(safe-area-inset-bottom)) !important;
    background: var(--color-background) !important; overflow-y: auto !important;
  }
  html body #local-specialist-filters.is-panel-open .catalog-bar, html body #local-specialist-filters.is-panel-open .catalog-row {
    display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: var(--space-12) !important;
    padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0 !important;
  }
  html body #local-specialist-filters.is-panel-open .catalog-panel__close { display: inline-flex !important; position: sticky !important; bottom: 0 !important; margin-top: auto !important; width: 100% !important; }
}

/* Поля внутри общей капсулы фильтров — без собственных рамок, как остальные поля капсулы */
html body .catalog-bar .catalog-field select { min-height: 0 !important; height: auto !important; border: 0 !important; background-color: transparent !important; }
/* Заголовок страницы: первая строка, затем акцент целиком на второй («Найдите / своего специалиста») */
@media (min-width: 768px) { html body main h1 em { white-space: nowrap !important; } }
/* Планшет: шапка страницы в одну колонку, чтобы заголовок шёл в две строки («Найдите / своего специалиста») */
@media (max-width: 1279px) {
  html body :is(.specialists-page__hero, .help-page__hero-grid, .faq-page__hero-grid, .contacts-page__hero-grid, .tests-catalog-hero__grid, .prices-hero__grid) {
    display: block !important;
  }
  html body :is(.specialists-page__hero, .help-page__hero-grid, .faq-page__hero-grid, .contacts-page__hero-grid, .tests-catalog-hero__grid, .prices-hero__grid) > :not(h1) {
    max-width: 640px !important; margin-top: var(--text-gap) !important;
  }
}

/* ---------- 18. Страница специалиста ---------- */
html body.has-sticky-booking { padding-bottom: calc(var(--control-height) + var(--space-32) + env(safe-area-inset-bottom)) !important; }
html body .specialist-profile .profile-chips :is(span, a) { min-height: var(--tag-height) !important; padding: 0 var(--tag-padding-x) !important; border: 0 !important; background: var(--color-surface-muted) !important; color: var(--color-muted-ink) !important; font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; }
html body .specialist-profile h1 { font-family: var(--font-family-heading) !important; }
html body .specialist-profile .quick-booking-card { padding: var(--space-24) !important; background: var(--color-surface-raised) !important; border: 1px solid var(--color-border) !important; }
html body .specialist-profile .profile-booking-price { font: var(--font-weight-heading) var(--text-h3-size)/var(--text-h3-line) var(--font-family-heading) !important; color: var(--color-text-link) !important; }
html body .specialist-profile .quick-booking-submit { width: 100% !important; }
html body .specialist-profile .profile-anchor-nav a { font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; text-decoration: none !important; }

/* ---------- 19. «С чем помогаем»: поиск и переключатель «Запросы / Симптомы» в одну строку ---------- */
html body section.help-page { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; column-gap: var(--space-16) !important; align-items: center !important; }
html body section.help-page > * { grid-column: 1 / -1 !important; }
html body section.help-page > .help-search { grid-column: 1 !important; grid-row: 2 !important; margin: 0 !important; width: 100% !important; max-width: none !important; }
html body section.help-page > .help-tabs { grid-column: 2 !important; grid-row: 2 !important; margin: 0 !important; display: flex; gap: var(--space-8) !important; }
html body section.help-page > .help-groups { margin-top: var(--space-32) !important; }
html body .help-tabs a { min-height: var(--control-height) !important; display: inline-flex; align-items: center !important; padding: 0 var(--space-16) !important; border: 1px solid var(--color-border-strong) !important; background: transparent !important; color: var(--color-text-link) !important; font: var(--font-weight-semibold) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; }
html body .help-tabs a.is-active { background: var(--color-brand-dark) !important; border-color: var(--color-text-link) !important; color: var(--color-on-primary) !important; }
html body .help-search { display: flex !important; align-items: center !important; gap: var(--space-8) !important; min-height: var(--control-height) !important; padding: 0 var(--space-16) !important; border: 1px solid var(--color-border-strong) !important; background: var(--color-surface-raised) !important; }
html body main .help-search input { border: 0 !important; background: transparent !important; min-height: 0 !important; padding: 0 !important; width: 100% !important; }
@media (max-width: 767px) {
  html body section.help-page { grid-template-columns: minmax(0, 1fr) !important; }
  html body section.help-page > .help-search { grid-row: 3 !important; }
  html body section.help-page > .help-tabs { grid-column: 1 !important; grid-row: 2 !important; margin: 0 0 var(--space-12) !important; }
}

/* ---------- 20. Аккордеон: один вид для FAQ, прайса, документов клиники, образования специалиста, «С чем помогаем» ---------- */
html body :is(details.faq-directory__group, details.price-group, details.clinic-faq-group, .clinic-document-disclosures > details, .profile-details > details, details.help-group) {
  margin: 0 0 var(--space-12) !important; padding: 0 !important;
  border: 1px solid var(--color-border) !important; border-radius: var(--radius) !important;
  background: var(--color-surface-raised) !important; box-shadow: none !important; overflow: clip !important;
}
html body :is(details.faq-directory__group, details.price-group, details.clinic-faq-group, .clinic-document-disclosures > details, .profile-details > details, details.help-group) > summary {
  position: relative !important; display: flex !important; align-items: center !important; gap: var(--space-16) !important;
  min-height: 72px !important; margin: 0 !important; padding: var(--space-16) calc(var(--space-24) + 32px) var(--space-16) var(--space-24) !important;
  border: 0 !important; background: transparent !important; cursor: pointer !important; list-style: none !important;
  color: var(--color-text-link) !important; font: var(--font-weight-heading) var(--text-h4-size)/var(--text-h4-line) var(--font-family-heading) !important;
  text-decoration: none !important;
}
html body details > summary::-webkit-details-marker { display: none; }
html body :is(details.faq-directory__group, details.price-group, details.clinic-faq-group, .clinic-document-disclosures > details, .profile-details > details, details.help-group) > summary::after {
  content: '+' !important; position: absolute !important; right: var(--space-24) !important; top: 50% !important; transform: translateY(-50%) !important;
  width: 24px !important; text-align: center !important; font: 300 28px/1 var(--font-family-heading) !important; color: var(--color-text-link-hover) !important;
}
html body :is(details.faq-directory__group, details.price-group, details.clinic-faq-group, .clinic-document-disclosures > details, .profile-details > details, details.help-group)[open] > summary::after { content: '−' !important; }
/* Старые значки «+» и круги — у нас один значок */
html body :is(.faq-directory__group > summary > b, .price-group > summary > i, .help-group > summary > i, .profile-details > details > summary > b, .clinic-faq-group__meta > i, .clinic-faq-group > summary > i, .clinic-faq-group__icon) { display: none !important; }
html body :is(details.price-group, details.help-group, details.clinic-faq-group) > summary :is(h2, h3, strong) { margin: 0 !important; font: var(--font-weight-heading) var(--text-h4-size)/var(--text-h4-line) var(--font-family-heading) !important; color: var(--color-text-link) !important; letter-spacing: 0 !important; }
html body details.price-group > summary > span:first-child { min-width: 24px !important; font: var(--font-weight-medium) var(--text-micro-size)/var(--text-micro-line) var(--font-family-body) !important; color: var(--color-text-link-hover) !important; }
html body details.price-group > summary p, html body .clinic-faq-group__copy small { display: block; margin: var(--space-4) 0 0 !important; font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; }
html body .clinic-faq-group__copy { display: grid; flex: 1 1 auto !important; }
html body .clinic-faq-group__meta, html body details.help-group > summary > b { margin-left: auto !important; font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; color: var(--color-text-secondary) !important; background: none !important; }
html body .clinic-faq-group__meta b { font: inherit !important; color: inherit !important; }
html body :is(details.faq-directory__group, details.price-group, details.clinic-faq-group, .clinic-document-disclosures > details, .profile-details > details, details.help-group)[open] > :not(summary) { padding: 0 var(--space-24) var(--space-24) !important; }
html body details.help-group[open] > .help-group__items { padding: 0 var(--space-12) var(--space-12) !important; }

/* ---------- 21. О клинике: «Как добраться» — текст, карта и видео одного размера ---------- */
html body .contacts-route { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: var(--grid-gap) !important; align-items: start !important; padding: 0 !important; background: none !important; border: 0 !important; }
html body .contacts-route > .contacts-route__video { display: contents !important; }
html body .contacts-route__copy { grid-column: 1 !important; grid-row: 1 !important; align-self: center !important; padding: 0 !important; }
html body .contacts-route__copy h2 { margin: 0 0 var(--text-gap) !important; }
html body .contacts-route__copy p { margin: 0 !important; color: var(--color-text-secondary) !important; }
html body .contacts-route > .contacts-route__map { grid-column: 2 !important; grid-row: 1 !important; height: auto !important; min-height: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; overflow: visible !important; }
html body .contacts-route .contact-map__heading { display: none !important; }
html body :is(.contacts-route .contact-map__frame, .contacts-route__frame) {
  position: relative !important; width: 100% !important; height: auto !important; aspect-ratio: 3 / 4 !important;
  margin: 0 !important; border-radius: var(--radius) !important; overflow: hidden !important; background: var(--color-surface-muted) !important;
}
html body .contacts-route__frame { grid-column: 3 !important; grid-row: 1 !important; }
html body :is(.contacts-route .contact-map__frame iframe, .contacts-route__frame video) { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; border: 0 !important; border-radius: 0 !important; object-fit: cover !important; }
html body .contacts-route__frame video:fullscreen { object-fit: contain !important; background: var(--color-media-backdrop) !important; }
@media (max-width: 1023px) {
  html body .contacts-route { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body .contacts-route__copy { grid-column: 1 / -1 !important; }
  html body .contacts-route > .contacts-route__map { grid-column: 1 !important; grid-row: 2 !important; }
  html body .contacts-route__frame { grid-column: 2 !important; grid-row: 2 !important; }
}
@media (max-width: 767px) {
  html body .contacts-route { grid-template-columns: minmax(0, 1fr) !important; }
  html body .contacts-route > .contacts-route__map, html body .contacts-route__frame { grid-column: 1 !important; grid-row: auto !important; }
}

/* ---------- 22. Выбор кабинета: два акцента (пациент, специалист), B2B — ссылка справа ---------- */
html body .portal-choice-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: var(--grid-gap) !important; }
html body .portal-choice:not(.portal-choice--b2b) { min-height: 320px !important; padding: var(--space-32) !important; text-decoration: none !important; box-shadow: none !important; }
html body .portal-choice--patient { background: var(--color-surface-raised) !important; border: 1px solid var(--color-border) !important; color: var(--color-text-link) !important; }
html body .portal-choice--specialist { background: var(--color-brand-dark) !important; border: 1px solid var(--color-brand-dark) !important; color: var(--color-on-primary) !important; }
html body .portal-choice:not(.portal-choice--b2b) > span { display: none !important; }
html body .portal-choice:not(.portal-choice--b2b) > b { display: inline-flex; align-items: center !important; min-height: var(--control-height) !important; margin-top: var(--space-24) !important; padding: 0 var(--control-padding-x) !important; border-radius: var(--radius) !important; background: var(--color-brand-accent) !important; color: var(--color-on-brand) !important; font: var(--font-weight-semibold) var(--text-button-size)/var(--text-button-line) var(--font-family-body) !important; }
html body .portal-choice--b2b {
  grid-column: 1 / -1 !important; justify-self: end !important; display: inline-flex !important; align-items: center !important; gap: var(--space-8) !important;
  min-height: var(--touch-target) !important; height: auto !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
  color: var(--color-text-link) !important; text-decoration: none !important;
}
html body .portal-choice--b2b > :is(span, p, b) { display: none !important; }
html body .portal-choice--b2b > small { margin: 0 !important; font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--color-text-secondary) !important; }
html body .portal-choice--b2b > h2 { margin: 0 !important; font: var(--font-weight-semibold) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; letter-spacing: 0 !important; color: var(--color-text-link) !important; }
html body .portal-choice--b2b:hover > h2 { color: var(--color-text-link-hover) !important; }
@media (max-width: 767px) { html body .portal-choice-grid { grid-template-columns: minmax(0, 1fr) !important; } html body .portal-choice--b2b { justify-self: start !important; } }

/* ---------- 23. Внешний сервис записи обозначен явно ---------- */
html body a[href*="sqns.ru/"]::after { content: '↗' !important; margin-left: var(--space-4) !important; font-weight: var(--font-weight-regular) !important; }

/* ---------- 24. Размеры текста по шкале (сведено по аудиту страниц) ---------- */
/* Основной текст 16/24 */
html body :is(.legal-document p, .legal-document li, .faq-directory__answer p, .faq-directory__answer li, .profile-strengths li, .profile-traits, .profile-section .profile-excerpt p,
  .portal-choice p, .catalog-val, .ac-intro p, .contacts-route__copy p, .profile-details > details > div, .profile-details > details > div p) {
  font-size: var(--text-body-size) !important; line-height: var(--text-body-line) !important;
}
/* Лид 18/28 */
html body :is(.hs .hs-lead, .hs .hs-text, .specialist-profile-intro .answer, .final-cta__intro p, .local-article-page p.lead, .blog-reference-article__lead) {
  font-size: var(--text-lead-size) !important; line-height: var(--text-lead-line) !important;
}
/* Подписи и служебный текст 14/20 */
html body :is(.footer-note__legal, .footer-note__legal a, .footer-note__copyright, .faq-directory__quick-links a, .local-filter label, .reading-route__text p, .reading-route__text,
  .local-pagination a, .local-pagination span, .reviews-filter-status, .reviews-filter-status button, .reviews-pagination, .reviews-total span, .article-meta, .article-meta time) {
  font-size: var(--text-caption-size) !important; line-height: var(--text-caption-line) !important;
}
/* Метки 12/16 */
html body :is(.hs-dot__num, .review-date, .reviews-filters label, .contact-card__label, .catalog-cap, .catalog-row__cap) {
  font-size: var(--text-micro-size) !important; line-height: var(--text-micro-line) !important;
}
/* Пункты списков-переходов («С чем помогаем») */
html body .help-group__items a, html body .help-group__items a > span { font: var(--font-weight-medium) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; }
html body details.help-group > summary > span { font: inherit !important; }
/* Контакты: значения — один размер H3 */
html body .contact-card__value { font: var(--font-weight-heading) var(--text-h3-size)/var(--text-h3-line) var(--font-family-heading) !important; color: var(--color-text-link) !important; text-decoration: none !important; }
html body .contact-card__value.contact-phone { font-size: var(--text-h2-size) !important; line-height: var(--text-h2-line) !important; font-weight: var(--font-weight-display) !important; }
/* Заголовки карточек, размеченные как h2: визуально H3 */
html body :is(.blog-reference-card h2, .test-catalog-card h2, .blog-reference-card--overview h2) { font: var(--font-weight-heading) var(--text-h3-size)/var(--text-h3-line) var(--font-family-heading) !important; letter-spacing: 0 !important; }
html body .portal-choice:not(.portal-choice--b2b) h2 { font: var(--font-weight-display) var(--text-h2-size)/var(--text-h2-line) var(--font-family-heading) !important; }
/* Строки прайса: название услуги H5, цена — полужирный основной текст */
html body .price-group h3 { font: var(--font-weight-heading) var(--text-h5-size)/var(--text-h5-line) var(--font-family-heading) !important; letter-spacing: 0 !important; }
html body .price-row__value { font: var(--font-weight-semibold) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; white-space: nowrap !important; }
html body .reviews-total strong { font: var(--font-weight-display) var(--text-h2-size)/1 var(--font-family-heading) !important; }
html body .clinic-faq-group__copy strong, html body .clinic-document-disclosures > details > summary { font: var(--font-weight-heading) var(--text-h4-size)/var(--text-h4-line) var(--font-family-heading) !important; }
html body .clinic-faq-group__meta b { font: var(--font-weight-medium) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important; }

/* ---------- 25. Первый экран: одно контекстное действие активного слайда ---------- */
html body .hs .hs-slide .hs-actions { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: var(--space-12) var(--space-16) !important; margin-top: var(--space-8) !important; }
html body .hs .hs-stat--word strong { font-size: clamp(64px, 6vw, 112px) !important; letter-spacing: -.03em !important; }
@media (max-width: 600px) {
  html body .hs .hs-slide .hs-actions > .hs-btn { min-height: 44px !important; white-space: normal !important; text-align: center !important; }
}
/* The one existing home-header booking anchor remains in place, including the open mobile menu. */
@media (max-width: 760px) {
  html body.home #site-header:has(.nav-links.is-open) .nav-tools > .button--appointment {
    display: inline-flex !important; position: absolute !important; z-index: 2 !important;
    top: calc(100% + var(--space-24)) !important; left: var(--space-24) !important; right: var(--space-24) !important;
    width: auto !important; margin: 0 !important; min-height: var(--touch-target) !important;
  }
  html body.home #site-header:has(.nav-tools > .button--appointment) .nav-links.is-open { padding-top: calc(var(--touch-target) + var(--space-48)) !important; }
  html body.home #site-header .nav-links.is-open { z-index:1!important; }
}

/* ---------- 26. Шапка на телефоне: логотип, поиск и «Меню» помещаются в капсулу ---------- */
@media (max-width: 480px) {
  html body .site-header .brand { flex:1 1 150px!important;min-width:0!important;max-width:150px!important; }
  html body .site-header .brand .brand-logo { width:100%!important; max-width:150px!important; height:auto!important; }
  html body .site-header .nav-tools { flex:0 0 auto!important; }
  html body .site-header .menu-toggle { flex-shrink:0!important; }
  html body .site-header .menu-toggle { padding: 0 var(--space-8) !important; gap: 6px !important; }
  html body .site-header .shell.nav { gap: var(--space-8) !important; }
}

/* ---------- 27. Хвосты аудита ---------- */
html body .clinic-document-disclosures > details > summary > span[aria-hidden="true"] { display: none !important; }
html body :is(.facet-checks label > span, .profile-anchor-nav a) { border-radius: var(--radius) !important; }

/* ---------- 28. Планшет: перенос второй строки героя, форма в одну колонку, когда ей узко ---------- */
@media (max-width: 1023px) { html body .hs .hs-title .hs-title__rest { white-space: normal !important; } }
html body :is(.final-cta__form, .contacts-card--simple) { container-type: inline-size !important; }
@container (max-width: 460px) {
  html body .contact-appointment-form { grid-template-columns: minmax(0, 1fr) !important; }
  html body .contact-appointment-form > label:not(.portal-consent):has(textarea), html body .contact-appointment-form .form-health-note,
  html body .contact-appointment-form button[type="submit"] { grid-column: 1 !important; grid-row: auto !important; }
}

/* ---------- 29. Закрытые страницы под общей шапкой; аккордеон на телефоне ---------- */
/* Native booking filters must not size their grid from the longest option. */
html body.ds-private .booking-schedule > .booking-schedule__form { min-width: 0 !important; max-width: 100% !important; }
html body.ds-private .booking-schedule__form > label { min-width: 0 !important; max-width: 100% !important; grid-template-columns: minmax(0, 1fr) !important; }
html body.ds-private .booking-schedule__form :is(select, button[type="submit"]) { min-width: 0 !important; max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; }
html body.ds-private .booking-schedule__form button[type="submit"] { white-space: normal !important; overflow-wrap: anywhere !important; }
@media (max-width: 700px) {
  html body.ds-private .booking-schedule > .booking-schedule__form { grid-template-columns: minmax(0, 1fr) !important; }
}
html body.ds-private > main#content { padding-top: var(--header-clearance) !important; margin-top: 0 !important; }
html body.ds-private > main#content > :first-child { margin-top: 0 !important; padding-top: 0 !important; }
/* Private routes intentionally share styles, not the public presentation runtime. */
html body.ds-private #site-header > .shell.nav { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; }
@media (max-width: 1100px) {
  html body.ds-private #site-header .nav-links:not(.is-open) { display: none !important; }
  html body.ds-private #site-header .menu-toggle { display: inline-flex !important; align-items: center !important; white-space: nowrap !important; }
  html body.ds-private #site-header .nav-links.is-open {
    display: flex !important; flex-direction: column !important; position: absolute !important;
    top: calc(100% + 8px) !important; left: 0 !important; right: 0 !important;
    width: 100% !important; max-width: none !important; margin: 0 !important; transform: none !important;
    padding: var(--space-24) !important; border-radius: var(--radius) !important;
    background: var(--color-background) !important; color: var(--color-text-link) !important;
    max-height: calc(100svh - 160px) !important; overflow: auto !important;
  }
  html body.ds-private #site-header .nav-links.is-open a { display: flex !important; align-items: center !important; min-height: var(--touch-target) !important; white-space: normal !important; }
}
@media (max-width: 767px) {
  html body.ds-private { --nav-top: 12px; --nav-h: calc(var(--touch-target) + var(--space-12)); }
  html body.ds-private > main#content { padding-top: max(var(--header-clearance), calc(var(--nav-top) + var(--nav-h) + var(--space-24))) !important; }
  html body.ds-private #site-header .header-contact-bar { display: none !important; }
  html body.ds-private #site-header > .shell.nav {
    top: var(--nav-top) !important; height: var(--nav-h) !important; min-height: var(--nav-h) !important;
    padding: 0 10px !important; margin: 0 auto !important; gap: var(--space-8) !important;
  }
  html body.ds-private #site-header .brand { flex: 0 1 150px !important; }
  html body.ds-private #site-header .brand .brand-logo { width: 100% !important; max-width: 150px !important; max-height: var(--touch-target) !important; object-fit: contain !important; }
  html body.ds-private #site-header .nav-tools { display: flex !important; flex: 0 0 auto !important; gap: 0 !important; margin-left: auto !important; }
  html body.ds-private #site-header .account-trigger,
  html body.ds-private #site-header .nav-tools > .button--appointment { display: none !important; }
  html body.ds-private #site-header .search-trigger { width: var(--touch-target) !important; min-width: var(--touch-target) !important; height: var(--touch-target) !important; flex: 0 0 var(--touch-target) !important; }
  html body.ds-private #site-header .menu-toggle { flex: 0 0 auto !important; min-width: var(--touch-target) !important; min-height: var(--touch-target) !important; padding: 0 var(--space-8) !important; gap: 6px !important; }
  html body.ds-private #site-header .menu-toggle > span { display: inline !important; }
  /* The existing booking link stays in its original DOM, above the open menu links. */
  html body.ds-private #site-header:has(.nav-links.is-open) .nav-tools > .button--appointment {
    display: inline-flex !important; position: absolute !important; z-index: 2 !important;
    top: calc(100% + var(--space-24)) !important; left: var(--space-24) !important; right: var(--space-24) !important;
    width: auto !important; margin: 0 !important; min-height: var(--touch-target) !important;
  }
  html body.ds-private #site-header:has(.nav-tools > .button--appointment) .nav-links.is-open { padding-top: calc(var(--touch-target) + var(--space-48)) !important; }
  html body.ds-private #site-header .nav-links.is-open { z-index: 1 !important; max-height: calc(100svh - var(--nav-top) - var(--nav-h) - var(--space-24)) !important; }
}
@media (max-width: 767px) {
  html body details.price-group > summary > span:first-child { display: none !important; }
  html body details.price-group .price-list { margin-left: 0 !important; }
  html body :is(details.clinic-faq-group, details.price-group) > summary { flex-wrap: wrap !important; }
  html body :is(.clinic-faq-group__meta) { margin-left: 0 !important; flex-basis: 100% !important; }
}

/* ---------- 30. Отзывы (страница): карточка по содержимому, без пустого места ---------- */
html body .review-catalog-card { min-height: 0 !important; padding: var(--space-24) !important; background: var(--color-surface-raised) !important; border: 1px solid var(--color-border) !important; }
html body .review-catalog-card blockquote { margin: var(--space-12) 0 var(--space-16) !important; font: var(--font-weight-regular) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; }
html body .review-catalog-card footer { margin-top: auto !important; }

/* ---------- 31. Полное имя: минимум 18 px, перенос вместо обрезки ---------- */
html body .specialist-grid .specialist-card__name { font-size: max(18px, var(--text-h4-size)) !important; }
html body :is(.specialist-card__name a > span, #specialists .sc-name > span) {
  white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

/* Карта и видео одного размера: пропорцию держит колонка карты, вложенные блоки занимают её целиком */
html body .contacts-route > .contacts-route__map { aspect-ratio: 3 / 4 !important; height: auto !important; }
html body .contacts-route > .contacts-route__map > .contact-map { height: 100% !important; min-height: 0 !important; display: block; padding: 0 !important; }
html body .contacts-route .contact-map__frame { height: 100% !important; aspect-ratio: auto !important; }

/* ---------- 32. Форма: порядок «согласие → кнопка → пометка», один левый край ---------- */
html body .contact-appointment-form .portal-consent { order: 8; }
html body .contact-appointment-form > .form-field-error--choice { order: 8; grid-column: 1 / -1 !important; margin: calc(-1 * var(--space-8)) 0 0 calc(20px + var(--space-12)) !important; }
html body .contact-appointment-form button[type="submit"] { order: 9; }
html body .contact-appointment-form .form-status { order: 10; }
html body .contact-appointment-form .form-health-note { order: 11; grid-column: 1 / -1 !important; margin: 0 !important; max-width: 60ch; }
html body :is(.final-cta__form, .contacts-card--simple) > h2 { margin: 0 0 var(--space-8) !important; }

/* ---------- 33. Заголовки секций на телефоне — по левому краю сетки ---------- */
@media (max-width: 767px) { html body .ac-section-head { align-items: flex-start !important; text-align: left !important; } }

/* ---------- 34. Выравнивание: отзывы, кабинеты, сброс фильтра ---------- */
html body #reviews .review-quote footer { min-height: var(--touch-target) !important; display: flex !important; flex-direction: column !important; justify-content: flex-end !important; align-items: flex-start !important; }
html body #reviews .rc-expand { min-height: var(--touch-target) !important; align-items: flex-end !important; padding-bottom: 1px !important; }
html body .portal-choice--b2b { display: inline-flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: flex-end !important; text-align: right !important; }
html body .portal-choice:not(.portal-choice--b2b) > b { display: inline-flex !important; width: fit-content !important; justify-content: center !important; }
html body :is(.local-filter a, .local-filter button[type="reset"], .filter-status button, .catalog-row .filter-status a) { text-decoration: none !important; }
html body .specialist-profile-main > .profile-section + .site-knowledge-tags { border-top: 0 !important; margin-top: 0 !important; }

/* ---------- 35. Зоны нажатия: 44 px на десктопе, 48 px на телефоне ---------- */
html body .site-header :is(.search-trigger, .account-trigger),
html body .hs :is(.hs-round, .hs-dot),
html body .ac-carousel-stage .sc-arrow,
html body :is(.contact-messenger, .contacts-communication a, .header-messengers a) {
  min-width: var(--touch-target) !important; min-height: var(--touch-target) !important;
}
/* ---------- 37. Claude review 8780: finite component corrections ---------- */
html body :is(.cooperation-form-card, .profile-video-card, .blog-reference-card > a:first-child) { border-radius: var(--radius) !important; }
html body #reviews .review-quote { grid-template-columns: minmax(min-content, 1fr) minmax(0, auto) !important; }
html body #reviews .review-author { min-width: 0 !important; align-items: flex-start !important; text-align: left !important; }
html body #reviews .review-patient { overflow-wrap: anywhere !important; }
html body #reviews .review-source { white-space: nowrap !important; overflow-wrap: normal !important; }
html body #reviews .rc-expand { white-space: normal !important; text-align: right !important; }
html body .portal-hero::after { content: none !important; }
html body .specialist-grid .specialist-card__actions { order: 1 !important; padding: var(--space-16) 0 0 !important; }
html body .specialist-grid .specialist-card__booking-note { order: 2 !important; margin: var(--space-8) 0 0 !important; }
html body .clinic-authority-disclosure > summary::after { display: block !important; content: '+' !important; }
html body .clinic-authority-disclosure[open] > summary::after { content: '−' !important; }
html body .clinic-authority-disclosure > summary > b { display: none !important; }
html body .clinic-legal details > summary { position: relative !important; padding-right: calc(var(--space-24) + 32px) !important; }
html body .clinic-legal details > summary::after { display: block !important; position: absolute !important; right: var(--space-24) !important; top: 50% !important; transform: translateY(-50%) !important; content: '+' !important; color: var(--color-text-link) !important; }
html body .clinic-legal details[open] > summary::after { content: '−' !important; }
html body .clinic-legal details > summary > b[aria-hidden="true"] { display: none !important; }
html body :is(.prices-search, .tests-search) { display: flex !important; align-items: center !important; gap: var(--space-12) !important; padding: 0 var(--space-16) !important; border: 1px solid var(--color-border-strong) !important; background: var(--color-surface-raised) !important; }
html body :is(.prices-search, .tests-search) > .dashicons { flex: 0 0 24px !important; }
html body main#content :is(.prices-search, .tests-search) input { min-width: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; padding-inline: 0 !important; }
html body main#content .profile-video-card h2 { font-size: var(--text-h4-size) !important; line-height: var(--text-h4-line) !important; word-break: normal !important; overflow-wrap: normal !important; hyphens: none !important; }
html body .tests-toolbar { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
html body .tests-category { min-width: 0 !important; }
html body .tests-category select { min-height: var(--control-height) !important; border-radius: var(--radius) !important; color: var(--color-text-link) !important; }
html body .address-city { white-space: nowrap !important; }
/* Paths share the page's typography without restoring the old expanding plates. */
html body.home .hp .hp-title { font-size: var(--text-h3-size) !important; font-weight: var(--font-weight-display) !important; line-height: var(--text-h3-line) !important; text-align: left !important; }
@media (max-width: 767px) {
  html body section.help-page > .help-tabs { margin-top: var(--space-32) !important; }
  html body.home .hs-controls { flex-wrap: wrap !important; min-width: 0 !important; max-width: 100% !important; gap: 12px !important; margin-bottom: 0 !important; }
  html body.home .hs-dots { min-width: 0 !important; flex-wrap: nowrap !important; gap: 0 !important; }
  html body.home .hs-buttons { flex: 0 0 auto !important; margin-left: auto !important; gap: 0 !important; }
  html body.home .hs :is(.hs-dot, .hs-round) { width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; box-sizing: border-box !important; }
  html body.home .hs .hs-dot { padding: 8px 6px !important; gap: 5px !important; }
  html body.home .hs .hs-round { border: 0 !important; background: transparent !important; }
}
html body .hs .hs-dot { display: inline-grid; align-content: center; }
/* Legacy hidden rules must remain effective even when component display rules are important. */
html body :is(.specialist-card, .profile-mobile-booking)[hidden] { display: none !important; }
/* Крошки: строка остаётся прежней высоты, область нажатия — выше и ниже текста */
html body :is(.crumbs, .blog-catalog-crumbs, .profile-crumbs) a { display: inline-block; padding-block: 12px !important; margin-block: -12px !important; }
@media (max-width: 380px) { html body .site-header .brand .brand-logo { width: 128px !important; max-width: 128px !important; } }
@media (max-width: 480px) { html body .site-header .shell.nav { padding-left: var(--space-12) !important; padding-right: var(--space-8) !important; } }

@media (prefers-reduced-motion: reduce) {
  html, html body *, html body *::before, html body *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
}

/* ---------- 36. Панель фильтров на телефоне — диалог с заголовком и закрытием ---------- */
html body .catalog-panel__head { display: none !important; }
@media (max-width: 767px) {
  html body #local-specialist-filters.is-panel-open .catalog-panel__head { display: flex !important; align-items: center; justify-content: space-between; margin: 0 0 var(--space-8) !important; }
  html body .catalog-panel__title { margin: 0 !important; font: var(--font-weight-heading) var(--text-h3-size)/var(--text-h3-line) var(--font-family-heading) !important; color: var(--color-text-link) !important; }
  html body .catalog-panel__x { min-width: var(--touch-target) !important; min-height: var(--touch-target) !important; border: 0 !important; background: transparent !important; color: var(--color-text-link) !important; font: 300 32px/1 var(--font-family-heading) !important; cursor: pointer; }
}
/* Hosted booking: retire the field grid and its empty rows only in live handoff output. */
html body [data-booking-handoff] {
  display: flex !important; flex-direction: column !important; align-items: flex-start !important;
  grid-template-columns: none !important; grid-template-rows: none !important;
  min-width: 0 !important; min-height: 0 !important; height: auto !important;
  gap: var(--space-16) !important; margin: 0 !important;
}
html body [data-booking-handoff] > .button {
  grid-column: auto !important; grid-row: auto !important;
  margin: 0 !important; max-width: 100% !important; white-space: normal !important; text-align: center !important;
}
html body [data-booking-handoff] > [role="status"] {
  margin: 0 !important; max-width: 52ch !important; color: var(--color-text-secondary) !important;
  font: var(--font-weight-regular) var(--text-caption-size)/var(--text-caption-line) var(--font-family-body) !important;
}
html body [data-booking-handoff-card] {
  display: flex !important; flex-direction: column !important; justify-content: flex-start !important;
  min-height: 0 !important; height: auto !important; gap: var(--space-16) !important;
}
html body [data-booking-handoff-card] > :is(h2, p) { margin: 0 !important; }
html body [data-booking-handoff-layout] { align-items: stretch !important; }
html body [data-booking-handoff-layout] > :is(.final-cta__intro, .final-cta__form) {
  min-height: 0 !important; height: auto !important; padding: var(--space-32) !important;
}
html body [data-booking-handoff-layout] > [data-booking-handoff-card] {
  align-self: center !important;
}
html body [data-booking-handoff-column] {
  grid-template-rows: auto !important; align-self: start !important;
}
@media (max-width: 767px) {
  html body [data-booking-handoff-layout] > :is(.final-cta__intro, .final-cta__form) {
    padding: var(--space-24) var(--space-16) !important;
  }
  html body [data-booking-handoff] > .button { width: 100% !important; }
}
}

/* BEGIN finite catalog price/sort geometry */
@layer design-system {
html body.an-interior main#content #local-specialist-filters :is(.catalog-price, .catalog-sort) {
  height: 52px !important; min-height: 52px !important; padding-block: 6px !important;
}
html body.an-interior main#content #local-specialist-filters :is(.catalog-price input, .catalog-sort select) {
  height: 38px !important; min-height: 38px !important;
}
@media (max-width: 760px) {
  html body.an-interior main#content #local-specialist-filters :is(.catalog-price, .catalog-sort) {
    height: auto !important; min-height: 62px !important;
  }
  html body.an-interior main#content #local-specialist-filters :is(.catalog-price input, .catalog-sort select) {
    height: 48px !important; min-height: 48px !important;
  }
  html body.an-interior main#content #local-specialist-filters .catalog-sort select {
    min-width: 0 !important;
  }
}
}
/* END finite catalog price/sort geometry */

/* BEGIN finite responsive review 20261011 */
@layer design-system {
/* Auto tracks replace the obsolete three-row map/video layout on tablets. */
@media (max-width: 900px) {
  html body main#content .contacts-page .contacts-layout { grid-template-columns: minmax(0, 1fr) !important; align-items: start !important; }
  html body main#content .contacts-page .contacts-column { grid-template-rows: none !important; grid-auto-rows: auto !important; min-width: 0 !important; }
  html body main#content .contacts-page .contacts-column > .contacts-card { height: auto !important; min-height: 0 !important; }
}
/* A grid item must shrink before its Russian title can hyphenate. */
html body main#content .blog-reference-page .blog-reference-article__hero > div { min-width: 0 !important; }
html body main#content .blog-reference-page :is(.local-article > h1, .blog-reference-article__hero h1),
html body main#content .hads-page .hads-hero h1 {
  max-width: 100% !important; min-width: 0 !important; white-space: normal !important;
  hyphens: auto !important; hyphenate-limit-chars: 6 3 3 !important; word-break: normal !important; overflow-wrap: break-word !important;
}
html body main#content :is(.reading-route__card h3, .local-article-specialists__card strong, .local-article-specialists__card small) {
  hyphens: auto !important; hyphenate-limit-chars: 6 3 3 !important; word-break: normal !important; overflow-wrap: normal !important;
}
html body main#content .reading-route .reading-route__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)) !important; }
html body main#content .local-article-specialists__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important; }
html body main#content .local-article-specialists__card > span { min-width: 0 !important; }
@media (max-width: 640px) {
  html body main#content .local-article-specialists__card { grid-template-columns: minmax(0, 1fr) !important; }
}
/* The authored notice remains below the CTA; every desktop card reserves its row. */
@media (min-width: 768px) {
  html body main#content .specialist-grid .specialist-card:not(:has(.specialist-card__booking-note))::after {
    content: ''; display: block; order: 2; min-height: var(--text-micro-line); margin-top: var(--space-8);
  }
}
html body main#content #reviews .rc-expand { white-space: nowrap !important; }
}
@layer appearance-controls {
@media (min-width: 768px) {
  html body main#content .cooperation-hero h1 { font-size: 80px !important; }
}
}
/* END finite responsive review 20261011 */

/* BEGIN finite Claude final 20261011 */
/* Profile reviews: two balanced columns, so a long review no longer stretches its row and leaves the short ones
   empty; review text at body size, source as a caption. */
@layer design-system {
html body main#content .specialist-profile .profile-reviews__grid { display: block !important; columns: 2 300px !important; column-gap: var(--space-16) !important; }
html body main#content .specialist-profile .profile-reviews__grid > article { display: flex !important; flex-direction: column !important; break-inside: avoid !important; min-height: 0 !important; width: 100% !important; margin: 0 0 var(--space-16) !important; }
html body main#content .specialist-profile .profile-reviews__grid > article[hidden] { display: none !important; }
@media (max-width: 760px) { html body main#content .specialist-profile .profile-reviews__grid { columns: 1 !important; } }
html body main#content .specialist-profile .profile-reviews__grid blockquote { margin: var(--space-12) 0 var(--space-16) !important; font: var(--font-weight-regular) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; color: var(--color-text-primary) !important; }
html body main#content .specialist-profile .profile-reviews__grid .review-quote footer { margin-top: auto !important; padding-top: var(--space-12) !important; }
html body main#content .specialist-profile .profile-reviews__grid :is(.review-source, .review-rating-row time, .review-clinic-label) { font-size: var(--text-caption-size) !important; line-height: var(--text-caption-line) !important; }

/* Catalog filters: the facet values read like the select values next to them; price and sort keep one outline,
   the fields' own, instead of a pill inside a pill. */
html body .catalog-field--facet .catalog-val { font: var(--font-weight-medium) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; color: var(--color-brand-dark) !important; }
html body :is(.catalog-price, .catalog-sort) { border: 0 !important; background: transparent !important; box-shadow: none !important; padding-inline: 0 !important; }
/* Select and facet fields: caption and value on the same lines and the same left edge */
html body.an-interior #content :is(.catalog-field--select, .catalog-field--facet) .catalog-cap { top: 11px !important; }
html body.an-interior #content .catalog-field--select select { padding: 30px 40px 12px 20px !important; font: var(--font-weight-medium) var(--text-body-size)/var(--text-body-line) var(--font-family-body) !important; }
@media (max-width: 760px) {
  html body.an-interior #content .catalog-field--select select { padding: 30px 34px 12px 16px !important; }
}
}

/* Header surface. One owner for its colours at every width. --hdr-p (surface) and --hdr-t (text, icons, logo) are 0 for the dark state over the home hero and 1 for
   the light state; on the home page hero.js drives it from the position of the light page sliding under the header, so
   the colours follow the scroll instead of flipping. Elsewhere it stays 1. The glass is 10% more transparent than before. */
@layer appearance-controls {
html body:is(.home,.an-interior) #site-header.site-header { --hdr-p: 1; --hdr-t: 1; background: transparent !important; }
html body.home #site-header.site-header { --hdr-p: var(--hdr-progress, 0); --hdr-t: var(--hdr-text-progress, 0); }
html body:is(.home,.an-interior) #site-header.site-header .shell.nav {
  background: color-mix(in srgb, color-mix(in srgb, var(--color-background) 61%, transparent) calc(var(--hdr-p) * 100%), color-mix(in srgb, var(--color-brand-dark-active) 54%, transparent)) !important;
  transition: box-shadow var(--transition) !important;
}
html body:is(.home,.an-interior) #site-header.site-header .shell.nav :is(.search-trigger, .account-trigger, .menu-toggle, .account-trigger .dashicons) {
  color: color-mix(in srgb, var(--color-text-link) calc(var(--hdr-t) * 100%), var(--color-text-on-photo)) !important; transition: none !important;
}
html body:is(.home,.an-interior) #site-header.site-header .brand .brand-logo--reverse { opacity: calc(1 - var(--hdr-t)) !important; transition: none !important; }
html body:is(.home,.an-interior) #site-header.site-header .brand .brand-logo--color { opacity: var(--hdr-t) !important; transition: none !important; }
html body.home #site-header.site-header .header-contact-bar {
  background: color-mix(in srgb, transparent calc(var(--hdr-p) * 100%), color-mix(in srgb, var(--color-brand-dark-active) 68%, transparent)) !important;
  color: color-mix(in srgb, var(--color-brand-dark) calc(var(--hdr-t) * 100%), color-mix(in srgb, var(--color-text-on-photo) 88%, transparent)) !important;
}
@media (min-width: 1181px) {
  html body:is(.home,.an-interior) #site-header.site-header .nav-links:not(.is-open) > a:not(.button):not([aria-current]):not(.mobile-booking) {
    color: color-mix(in srgb, var(--color-text-primary) calc(var(--hdr-t) * 100%), var(--color-on-brand)) !important; transition: none !important;
  }
}
}


/* Focus. Fields get a soft ring that hugs their own shape, with no gap; buttons, links and disclosures show a thin
   ring only for keyboard focus and nothing after a mouse press. */
@layer appearance-controls {
html body :is(main#content, #site-header, .site-footer) :is(a, button, summary, [tabindex]):focus:not(:focus-visible) { outline: none !important; }
/* Width/style preserve the published contrast colour and its fixed-dark exceptions. */
html body :is(main#content, #site-header, .site-footer) :is(a, button, summary, [tabindex]):focus-visible { outline-width: 2px !important; outline-style: solid !important; outline-offset: 2px !important; }
html body :is(main#content, #site-header, .site-footer) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):is(:focus, :focus-visible) {
  outline: none !important;
  border-color: var(--color-text-link) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-dark) 16%, transparent) !important;
}
html body :is(main#content, #site-header, .site-footer) :is(input, select, textarea)[aria-invalid="true"]:is(:focus, :focus-visible) { border-color: var(--color-error) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-error) 16%, transparent) !important; }
html body :is(main#content, #site-header, .site-footer) :is(input[type="checkbox"], input[type="radio"]):focus:not(:focus-visible) { outline: none !important; }
html body :is(main#content, #site-header, .site-footer) :is(input[type="checkbox"], input[type="radio"]):focus-visible { outline-width: 2px !important; outline-style: solid !important; outline-offset: 2px !important; }
}
/* END finite Claude final 20261011 */

/* BEGIN finite page spacing repair 20261011 */
@layer design-system {
/* The paired desktop tools share row 2: both need the same clearance from
   the hero. Mobile already has separate 32px/12px gaps above tabs/search. */
@media (min-width: 768px) {
  html body.an-interior main#content section.help-page > :is(.help-search, .help-tabs) {
    margin-top: var(--space-32) !important;
  }
}
}
/* END finite page spacing repair 20261011 */

/* BEGIN finite public CTA arrow presentation */
@layer design-system {
/* Public booking buttons keep their label and destination; plain source links
 * retain the external-link marker from the existing SQNS rule. */
html body:is(.home,.an-interior) :is(a.button,a.btn,a.hs-btn,a.ac-view-all,a.ac-pill,a.sc-all,a.ac-text-link,a.faq-all-link,a.mobile-booking)[href*="sqns.ru/"]::after {
 content:none!important;
}
html body.an-interior .specialist-profile.profile-layout .profile-chips>a::after {
 content:none!important;
}
}
/* END finite public CTA arrow presentation */

/* Clinic requisites under the footer links (organization.FOOTER_LINE) */
html body .site-footer .footer-requisites { margin-top: 14px; font-size: 12px; line-height: 1.5; opacity: .6; }
html body .site-footer .footer-requisites a { display: inline; margin: 0; color: inherit; text-decoration: none; }
html body .site-footer .footer-requisites a:hover { text-decoration: underline; }
