/* ============================================================================
   МЦ «Ангелина» — дизайн-система. Один файл, никакой сборки.
   Правила системы описаны в site/SYSTEM.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Шрифты (self-hosted, variable)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/golos-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/golos-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Токены
   -------------------------------------------------------------------------- */
:root {
  /* Поверхности и текст */
  --paper: #f7faf8;
  --surface: #ffffff;
  --sunken: #eff4f0;
  --line: #dee6e0;
  --ink: #131c17;
  --ink-2: #46514a;
  --ink-3: #5c6862;

  /* Бренд. Роли зафиксированы, см. SYSTEM.md */
  --brand: #078c2f;
  --brand-fill: #05702a;
  --brand-press: #04561f;
  --brand-ink: #04591d;
  --brand-wash: #e4f1e9;
  --on-brand: #ffffff;

  --alert: #a6301f;
  --alert-wash: #fdeeeb;

  /* Тени: тонированы в зелёно-чернильный, чистого чёрного нет */
  --sh-1: 0 1px 2px rgba(14, 40, 24, 0.06), 0 2px 8px rgba(14, 40, 24, 0.04);
  --sh-2: 0 4px 12px rgba(14, 40, 24, 0.07), 0 1px 3px rgba(14, 40, 24, 0.05);
  --sh-3: 0 16px 40px rgba(14, 40, 24, 0.1), 0 2px 8px rgba(14, 40, 24, 0.06);
  --sh-cta: 0 2px 0 var(--brand-press);

  /* Форма */
  --r-1: 10px;
  --r-2: 16px;
  --r-3: 24px;

  /* Ритм */
  --gutter: 20px;
  --wrap: 1320px;
  --section-y: 56px;

  /* Типографика */
  --f-display: 'Onest', system-ui, sans-serif;
  --f-text: 'Golos Text', system-ui, sans-serif;

  --t-h1: clamp(2.125rem, 1.4rem + 3.1vw, 3.5rem);
  --t-h2: clamp(1.625rem, 1.2rem + 1.9vw, 2.375rem);
  --t-h3: clamp(1.1875rem, 1.1rem + 0.5vw, 1.5rem);
  --t-lead: clamp(1.125rem, 1.05rem + 0.45vw, 1.3125rem);
  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
  --t-small: 0.9375rem;
  --t-num: clamp(2rem, 1.5rem + 1.8vw, 2.75rem);

  /* Движение */
  --ease: cubic-bezier(0.2, 0.6, 0.25, 1);
  --dur: 200ms;

  color-scheme: light;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section-y: 88px;
  }
}
@media (min-width: 1280px) {
  :root {
    --gutter: 40px;
    --section-y: 96px;
  }
}

/* Тёмная тема: по системной настройке, с ручным переключателем */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0e1310;
    --surface: #161d18;
    --sunken: #1c241e;
    --line: #29332c;
    --ink: #e7ede8;
    --ink-2: #a8b4ab;
    --ink-3: #8d998f;
    --brand: #34b85c;
    --brand-fill: #34b85c;
    --brand-press: #57cc79;
    --brand-ink: #4fd177;
    --brand-wash: #16281c;
    --on-brand: #0b120d;
    --alert: #ef8878;
    --alert-wash: #2a1512;
    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --sh-2: 0 4px 14px rgba(0, 0, 0, 0.45);
    --sh-3: 0 18px 44px rgba(0, 0, 0, 0.55);
    --sh-cta: 0 2px 0 rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0e1310;
  --surface: #161d18;
  --sunken: #1c241e;
  --line: #29332c;
  --ink: #e7ede8;
  --ink-2: #a8b4ab;
  --ink-3: #8d998f;
  --brand: #34b85c;
  --brand-fill: #34b85c;
  --brand-press: #57cc79;
  --brand-ink: #4fd177;
  --brand-wash: #16281c;
  --on-brand: #0b120d;
  --alert: #ef8878;
  --alert-wash: #2a1512;
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-2: 0 4px 14px rgba(0, 0, 0, 0.45);
  --sh-3: 0 18px 44px rgba(0, 0, 0, 0.55);
  --sh-cta: 0 2px 0 rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   3. Сброс и база
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: 1.62;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img,
svg,
picture {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
img {
  height: auto;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  color: var(--ink);
  text-wrap: balance;
}
h1 {
  font-size: var(--t-h1);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.07;
}
h2 {
  font-size: var(--t-h2);
  font-weight: 650;
  letter-spacing: -0.016em;
  line-height: 1.15;
}
h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: -0.008em;
  line-height: 1.25;
}
p {
  text-wrap: pretty;
}
a {
  color: var(--brand-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--brand-press);
}
ul,
ol {
  padding: 0;
  list-style: none;
}

/* Фокус: никогда не отключается */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--brand-wash);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. Утилиты
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-y);
}
.section--sunken {
  background: var(--sunken);
}
.section--wash {
  background: var(--brand-wash);
}
.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
}
.small {
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-3);
}
.num {
  font-family: var(--f-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--surface);
  color: var(--brand-ink);
  padding: 14px 20px;
  border-radius: var(--r-1);
  box-shadow: var(--sh-2);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus {
  top: 12px;
}
.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}

/* Заголовок секции: заголовок и лид стопкой, без надстрочных меток */
.s-head {
  max-width: 62ch;
  margin-bottom: 40px;
}
.s-head > .lead {
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   5. Кнопки
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn--primary {
  background: var(--brand-fill);
  color: var(--on-brand);
  box-shadow: var(--sh-cta);
}
.btn--primary:hover {
  background: var(--brand-press);
  color: var(--on-brand);
}
.btn--primary:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--brand-press);
}
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn--ghost:active {
  transform: translateY(1px);
}
.btn--sm {
  min-height: 48px;
  padding: 0 18px;
  font-size: 1rem;
}
.btn--block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   6. Шапка
   -------------------------------------------------------------------------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease);
}
.hdr[data-stuck='true'] {
  box-shadow: var(--sh-2);
}
.hdr__in {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}
/* Шапка шире основного контейнера: шесть пунктов меню, переключатель центра
   и телефон должны помещаться в одну строку без сжатия. */
@media (min-width: 1100px) {
  .hdr__in,
  .hdr .mnav {
    max-width: 1440px;
  }
}
.hdr__logo {
  display: flex;
  align-items: center;
  flex: none;
  margin-right: auto;
}
.hdr__logo img {
  /* Знак почти квадратный, и подпись «центр медицинских инноваций» в нём мелкая:
     на 44px она не читалась. Строка шапки 72px, поэтому 56px это предел,
     при котором сверху и снизу остаётся воздух. */
  height: 50px;
  width: auto;
}
@media (min-width: 1100px) {
  .hdr__logo img {
    height: 56px;
  }
}
.hdr__nav {
  display: none;
  flex: none;
  gap: 4px;
}
.hdr__nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-height: 48px;
  padding: 0 12px;
  border-radius: var(--r-1);
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hdr__nav a:hover {
  color: var(--ink);
  background: var(--sunken);
}
.hdr__nav a[aria-current='page'] {
  color: var(--brand-ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--brand);
  border-radius: 0;
}
.hdr__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.hdr__phone {
  display: none;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  line-height: 1.15;
  white-space: nowrap;
}
.hdr__phone b {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hdr__phone span {
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.hdr__phone:hover b {
  color: var(--brand-ink);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover {
  color: var(--brand-ink);
  border-color: var(--ink-3);
}
.icon-btn .ico {
  width: 22px;
  height: 22px;
}

/* Шапка перестраивается в три этапа, потому что шесть пунктов меню, переключатель
   центра и телефон в одну строку помещаются только на широком экране.
   До 1100px: две строки, переключатель центра занимает всю ширину, меню под бургером. */
@media (max-width: 1099px) {
  .hdr__in {
    height: auto;
    flex-wrap: wrap;
    row-gap: 10px;
    padding-block: 12px;
  }
  .center-switch {
    order: 10;
    width: 100%;
  }
  .center-switch button {
    flex: 1;
    min-width: 0;
  }
  html {
    scroll-padding-top: 148px;
  }
}

/* До 900px шапка ещё и не липкая: постоянный CTA держит нижняя панель. */
@media (max-width: 899px) {
  .hdr {
    position: static;
  }
  html {
    scroll-padding-top: 12px;
  }
}

/* От 1100px одна строка с меню. Тумблер темы прячем, тёмная тема идёт по системной настройке. */
@media (min-width: 1100px) {
  .hdr__in {
    height: 80px;
  }
  .hdr__nav {
    display: flex;
    margin-right: auto;
  }
  .hdr__logo {
    margin-right: 24px;
  }
  html {
    scroll-padding-top: 96px;
  }
}
@media (min-width: 1100px) and (max-width: 1339px) {
  .hdr [data-act='theme'] {
    display: none;
  }
  .hdr__nav a {
    padding: 0 10px;
  }
  .center-switch button {
    padding: 0 10px;
    font-size: 0.875rem;
  }
}

/* Телефон в шапке появляется, как только для него есть место в одну строку. */
@media (min-width: 1200px) {
  .hdr__phone {
    display: flex;
  }
}
@media (min-width: 1200px) and (max-width: 1339px) {
  .hdr__phone span {
    display: none;
  }
  .hdr__phone b {
    font-size: 1.0625rem;
  }
}

/* Переключатель центра */
.center-switch {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
}
.center-switch__label {
  display: none;
}
.center-switch button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.center-switch button[aria-pressed='true'] {
  background: var(--brand-wash);
  color: var(--brand-ink);
  font-weight: 600;
}
@media (max-width: 639px) {
  .center-switch button {
    padding: 0 10px;
    font-size: 0.875rem;
  }
}

/* Мобильное меню */
.mnav {
  display: none;
  border-top: 1px solid var(--line);
  padding-block: 12px 20px;
}
.mnav[data-open='true'] {
  display: block;
}
.mnav ul {
  display: grid;
  gap: 2px;
}
.mnav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  border-radius: var(--r-1);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}
.mnav a[aria-current='page'] {
  color: var(--brand-ink);
  background: var(--brand-wash);
  font-weight: 600;
}
@media (min-width: 1024px) {
  .mnav,
  .hdr__burger {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   7. Герой
   -------------------------------------------------------------------------- */
.hero {
  padding-top: 40px;
  padding-bottom: var(--section-y);
}
.hero__grid {
  display: grid;
  gap: 32px;
}
.hero__title {
  max-width: 16ch;
}
.hero__lead {
  margin-top: 20px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 32px;
}
.hero__tel {
  display: inline-flex;
  flex-direction: column;
  margin-top: 24px;
  text-decoration: none;
  line-height: 1.2;
}
.hero__tel b {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero__tel:hover b {
  color: var(--brand-ink);
}
.hero__tel span {
  font-size: var(--t-small);
  color: var(--ink-3);
}
@media (min-width: 900px) {
  .hero {
    padding-top: 72px;
  }
  .hero__grid {
    grid-template-columns: 7fr 5fr;
    gap: 56px;
    align-items: center;
  }
}

/* Слот фотографии */
.photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-3);
  background: var(--sunken);
  box-shadow: var(--sh-1);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo--4x5 {
  aspect-ratio: 4 / 5;
}
.photo--3x2 {
  aspect-ratio: 3 / 2;
}
.photo--1x1 {
  aspect-ratio: 1 / 1;
}
/* Слот без файла: честно называет нужный кадр, а не подставляет случайную картинку */
.photo[data-empty='true'] {
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line);
  background: var(--sunken);
  box-shadow: none;
}
.photo[data-empty='true']::after {
  content: 'Нужно фото: ' attr(data-photo);
  max-width: 36ch;
  text-align: center;
  font-size: var(--t-small);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-3);
}
.photo-cap {
  margin-top: 12px;
  font-size: var(--t-small);
  color: var(--ink-3);
}
figure:has(.photo[data-empty='true']) .photo-cap {
  display: none;
}
@media (max-width: 899px) {
  .hero .photo--4x5 {
    aspect-ratio: 3 / 2;
  }
  /* Кадр вертикальный, а слот на телефоне горизонтальный. Видимую полосу
     поднимаем: по центру от аппарата остаётся середина без монитора. */
  .hero .photo--4x5 img {
    object-position: 50% 30%;
  }
}

/* --------------------------------------------------------------------------
   8. Полоса фактов
   -------------------------------------------------------------------------- */
.facts {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 32px;
}
.facts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 20px;
}
.fact__v {
  font-family: var(--f-display);
  font-size: var(--t-num);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.fact__l {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
}
.fact__n {
  margin-top: 4px;
  font-size: var(--t-small);
  color: var(--ink-3);
}
@media (min-width: 768px) {
  .facts__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
  .facts__grid > * + * {
    padding-left: 32px;
    border-left: 1px solid var(--line);
  }
}

/* --------------------------------------------------------------------------
   9. Сценарии
   -------------------------------------------------------------------------- */
.scen {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .scen {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .scen {
    grid-template-columns: repeat(3, 1fr);
  }
  .scen > :first-child {
    grid-column: span 2;
  }
}
.scen__card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.scen__card:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
  color: inherit;
}
.scen__card:active {
  transform: translateY(1px);
}
.scen__card .ico {
  width: 28px;
  height: 28px;
  color: var(--brand);
}
.scen__card h3 {
  margin-top: -4px;
}
.scen__list {
  display: grid;
  gap: 2px;
  margin-top: auto;
}
.scen__list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 9px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink-2);
}
.scen__list b {
  font-family: var(--f-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}
.scen__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-ink);
  font-weight: 600;
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   10. Прайс
   -------------------------------------------------------------------------- */
.price {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  overflow: hidden;
}
.price__top {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
}
.search {
  position: relative;
  display: flex;
  align-items: center;
}
.search .ico {
  position: absolute;
  left: 16px;
  width: 22px;
  height: 22px;
  color: var(--ink-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px 0 48px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
}
.search input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}
.search input:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.chips button {
  flex: none;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.chips button:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.chips button[aria-pressed='true'] {
  background: var(--brand-wash);
  border-color: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
}
.chips button span {
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 6px;
}

/* От планшета разделы прайса перестают быть лентой с горизонтальной прокруткой
   и раскладываются плиткой: на широком экране это два ряда, и все разделы видны
   сразу, без прокрутки вбок. Число колонок раскладка считает сама от ширины
   блока, поэтому в узкой колонке страницы направления плитка не переполняется.
   На телефоне лента остаётся: десять плашек в столбик заняли бы пол-экрана. */
@media (min-width: 700px) {
  .chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }
  .chips button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    text-align: left;
    line-height: 1.25;
    white-space: normal;
  }
  .chips button span {
    flex: none;
    margin-left: 0;
  }
}

/* Строки прайса: зебра вместо линии под каждой строкой */
.plist {
  display: grid;
}
.prow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px 20px;
  padding: 14px 20px;
  min-height: 56px;
}
.prow:nth-child(even) {
  background: var(--sunken);
}
.prow__n {
  overflow-wrap: anywhere;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}
.prow__c {
  grid-column: 1;
  font-size: var(--t-small);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.prow__p {
  grid-row: 1;
  grid-column: 2;
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.prow__inc {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-left: 16px;
  border-left: 2px solid var(--brand);
}
.prow__inc li {
  font-size: var(--t-small);
  color: var(--ink-2);
}
.price__foot {
  padding: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.price__empty {
  padding: 48px 20px;
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
}
.price__empty .ico {
  width: 40px;
  height: 40px;
  color: var(--ink-3);
}
.skel {
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--sunken), var(--surface), var(--sunken));
  background-size: 200% 100%;
  animation: skel 1.4s linear infinite;
}
@keyframes skel {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .skel {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   11. Комплексные программы
   -------------------------------------------------------------------------- */
.progs {
  display: grid;
  gap: 16px;
}
@media (min-width: 700px) {
  .progs {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .progs {
    grid-template-columns: repeat(3, 1fr);
  }
}
.prog {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}
.prog__for {
  font-size: var(--t-small);
  color: var(--ink-3);
  margin-bottom: 6px;
}
.prog__inc {
  display: grid;
  gap: 8px;
  margin: 20px 0 24px;
}
.prog__inc li {
  display: flex;
  gap: 10px;
  font-size: 1rem;
  color: var(--ink-2);
  line-height: 1.4;
}
.prog__inc .ico {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--brand);
}
.prog__sum {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.prog__sum span {
  font-size: var(--t-small);
  color: var(--ink-3);
}
.prog__sum b {
  font-family: var(--f-display);
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   12. Направления (лента со скролл-снапом)
   -------------------------------------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(272px, 78vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.rail > * {
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .rail {
    grid-auto-columns: minmax(320px, 42vw);
  }
}
@media (min-width: 1200px) {
  .rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}
.dir {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.dir:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
  color: inherit;
}
.dir .ico {
  width: 26px;
  height: 26px;
  color: var(--brand);
}
.dir__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--ink-3);
}
.dir__meta b {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   13. Как проходит визит
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 0;
  max-width: 68ch;
}
.step {
  position: relative;
  padding: 0 0 32px 32px;
  border-left: 2px solid var(--line);
}
.step:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.step::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
}
.step h3 {
  margin-bottom: 6px;
}
.step p {
  color: var(--ink-2);
}
.step--on {
  border-left-color: var(--brand);
}

/* --------------------------------------------------------------------------
   14. Два филиала
   -------------------------------------------------------------------------- */
.centers {
  display: grid;
  gap: 16px;
}
@media (min-width: 800px) {
  .centers {
    grid-template-columns: repeat(2, 1fr);
  }
}
.center {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}
.center[data-active='true'] {
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}
.center__role {
  font-size: var(--t-small);
  color: var(--ink-3);
}
.center__rows {
  display: grid;
  gap: 12px;
}
.center__rows > div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.center__rows .ico {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--brand);
}
.center__rows span {
  color: var(--ink-2);
}
.center__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

/* --------------------------------------------------------------------------
   15. Форма записи
   -------------------------------------------------------------------------- */
.book {
  display: grid;
  gap: 32px;
}
@media (min-width: 900px) {
  .book {
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: start;
  }
}
.form {
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}
.field {
  display: grid;
  gap: 8px;
}
.field > label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
}
.field textarea {
  min-height: 104px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
  opacity: 1;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.field__hint {
  font-size: var(--t-small);
  color: var(--ink-3);
}
.field__err {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--alert);
}
.field__err .ico {
  width: 18px;
  height: 18px;
}
.field[data-invalid='true'] .field__err {
  display: flex;
}
.field[data-invalid='true'] input,
.field[data-invalid='true'] select {
  border-color: var(--alert);
  background: var(--alert-wash);
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.consent input {
  width: 24px;
  height: 24px;
  min-height: 0;
  margin-top: 2px;
  flex: none;
  accent-color: var(--brand-fill);
}
.consent label {
  font-size: var(--t-small);
  color: var(--ink-2);
  line-height: 1.5;
}
.form__note {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-1);
  background: var(--sunken);
  font-size: var(--t-small);
  color: var(--ink-2);
}
.form__note .ico {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--brand);
}
.form__ok {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 32px 28px;
  border: 1px solid var(--brand);
  border-radius: var(--r-2);
  background: var(--brand-wash);
}
.form__ok .ico {
  width: 40px;
  height: 40px;
  color: var(--brand-ink);
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.aside-call {
  display: grid;
  gap: 20px;
  padding: 28px;
  border-radius: var(--r-2);
  background: var(--sunken);
}
.aside-call__tel {
  display: block;
  text-decoration: none;
}
.aside-call__tel b {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
  white-space: nowrap;
}
/* В узкой колонке справа номер не должен ломаться */
.svc__side .aside-call__tel b {
  font-size: 1.5rem;
}
.aside-call__tel:hover b {
  color: var(--brand-ink);
}
.social {
  display: flex;
  gap: 10px;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.social a:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
}
.social .ico {
  width: 22px;
  height: 22px;
}

/* --------------------------------------------------------------------------
   16. Аккордеон
   -------------------------------------------------------------------------- */
.faq {
  max-width: 68ch;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding-block: 16px;
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .ico {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--brand);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary .ico {
  transform: rotate(180deg);
}
.faq details > div {
  padding-bottom: 20px;
  color: var(--ink-2);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   17. Дисклеймер и подвал
   -------------------------------------------------------------------------- */
.disclaimer {
  background: var(--sunken);
  border-top: 1px solid var(--line);
  padding-block: 24px;
}
.disclaimer__in {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--ink-2);
}
.disclaimer .ico {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
  color: var(--brand);
}
.ftr {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 48px 32px;
}
.ftr__grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 720px) {
  .ftr__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.ftr h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.ftr ul {
  display: grid;
  gap: 10px;
}
/* Кнопку из этого правила исключаем: `.ftr a` перебивал её собственный цвет,
   и «Позвонить» в подвале выходила тёмным текстом на зелёной заливке,
   а при наведении зелёным по зелёному. */
.ftr a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 1rem;
}
.ftr a:not(.btn):hover {
  color: var(--brand-ink);
  text-decoration: underline;
}
.ftr__logo img {
  height: 52px;
  width: auto;
}
.ftr__legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: var(--t-small);
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   18. Липкая нижняя панель (мобильная)
   -------------------------------------------------------------------------- */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: var(--sh-3);
  transform: translateY(110%);
  transition: transform 260ms var(--ease);
}
.callbar[data-show='true'] {
  transform: translateY(0);
}
.callbar .btn {
  min-height: 52px;
  padding: 0 12px;
  font-size: 1rem;
}
@media (min-width: 900px) {
  .callbar {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .callbar {
    transition: none;
  }
}
body:has(.callbar[data-show='true']) {
  padding-bottom: 84px;
}
@media (min-width: 900px) {
  body:has(.callbar[data-show='true']) {
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   19. Панель доступности (ГОСТ Р 52872-2019)
   -------------------------------------------------------------------------- */
.a11y {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
  box-shadow: var(--sh-3);
  padding-block: 16px;
  display: none;
}
.a11y[data-open='true'] {
  display: block;
}
.a11y__in {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
}
.a11y__group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.a11y__group > span {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--ink-2);
}
.a11y__group button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.a11y__group button[aria-pressed='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}
.a11y__close {
  margin-left: auto;
}

/* Ступени кегля */
:root[data-a11y-size='l'] {
  font-size: 118%;
}
:root[data-a11y-size='xl'] {
  font-size: 138%;
}

/* Цветовые схемы. Перебивают бренд намеренно: это режим чтения, а не оформление. */
:root[data-a11y-scheme] {
  --sh-1: none;
  --sh-2: none;
  --sh-3: none;
  --sh-cta: none;
}
:root[data-a11y-scheme='bw'] {
  --paper: #ffffff;
  --surface: #ffffff;
  --sunken: #ffffff;
  --line: #000000;
  --ink: #000000;
  --ink-2: #000000;
  --ink-3: #000000;
  --brand: #000000;
  --brand-fill: #000000;
  --brand-press: #333333;
  --brand-ink: #000000;
  --brand-wash: #ffffff;
  --on-brand: #ffffff;
  color-scheme: light;
}
:root[data-a11y-scheme='wb'] {
  --paper: #000000;
  --surface: #000000;
  --sunken: #000000;
  --line: #ffffff;
  --ink: #ffffff;
  --ink-2: #ffffff;
  --ink-3: #ffffff;
  --brand: #ffffff;
  --brand-fill: #ffffff;
  --brand-press: #cccccc;
  --brand-ink: #ffffff;
  --brand-wash: #000000;
  --on-brand: #000000;
  color-scheme: dark;
}
:root[data-a11y-scheme='bb'] {
  --paper: #9dd1ff;
  --surface: #9dd1ff;
  --sunken: #9dd1ff;
  --line: #063462;
  --ink: #063462;
  --ink-2: #063462;
  --ink-3: #063462;
  --brand: #063462;
  --brand-fill: #063462;
  --brand-press: #0a4c8c;
  --brand-ink: #063462;
  --brand-wash: #9dd1ff;
  --on-brand: #9dd1ff;
  color-scheme: light;
}
:root[data-a11y-scheme] .photo,
:root[data-a11y-scheme] .prow:nth-child(even) {
  background: transparent;
}
:root[data-a11y-scheme] .btn--primary {
  border-color: var(--ink);
}
:root[data-a11y-img='off'] img:not(.a11y-keep),
:root[data-a11y-img='off'] .photo {
  display: none;
}

/* --------------------------------------------------------------------------
   20. Появление блоков при скролле
   -------------------------------------------------------------------------- */
/* Прячем только когда скрипты действительно включены: без JS весь контент виден сразу. */
@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  }
  .reveal[data-in='true'] {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   21. Страничные блоки
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: 40px 24px;
  border-bottom: 1px solid var(--line);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--t-small);
  color: var(--ink-3);
  margin-bottom: 16px;
}
.crumbs a {
  color: var(--ink-3);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--brand-ink);
  text-decoration: underline;
}

.spec {
  display: grid;
  gap: 12px;
}
@media (min-width: 680px) {
  .spec {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .spec {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.spec__i {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}
.spec__i .ico {
  width: 24px;
  height: 24px;
  color: var(--brand);
  flex: none;
}
.spec__i div {
  flex: 1;
  min-width: 0;
}
.spec__i b {
  display: block;
  font-family: var(--f-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.spec__i span {
  font-size: var(--t-small);
  color: var(--ink-3);
}
.spec__p {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}
.spec__ask {
  border-style: dashed;
  background: transparent;
}

.docs {
  display: grid;
  gap: 12px;
}
@media (min-width: 700px) {
  .docs {
    grid-template-columns: repeat(2, 1fr);
  }
}
.doc {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.doc:hover {
  border-color: var(--brand);
  color: inherit;
}
.doc .ico {
  width: 24px;
  height: 24px;
  color: var(--brand);
  flex: none;
}
.doc b {
  display: block;
  font-weight: 600;
  font-size: 1.0625rem;
}
.doc span {
  font-size: var(--t-small);
  color: var(--ink-3);
}

.reqs {
  display: grid;
  gap: 0;
  max-width: 76ch;
  border-top: 1px solid var(--line);
}
.reqs > div {
  display: grid;
  gap: 4px 24px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .reqs > div {
    grid-template-columns: 240px 1fr;
  }
}
.reqs dt {
  font-size: var(--t-small);
  color: var(--ink-3);
}
.reqs dd {
  margin: 0;
  color: var(--ink);
}

.todo {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--r-2);
  background: var(--sunken);
  font-size: var(--t-small);
  color: var(--ink-2);
}
.todo .ico {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   22. Врачи
   -------------------------------------------------------------------------- */
.vgrid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.vcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
a.vcard:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
  color: inherit;
}
a.vcard:hover .vcard__n {
  color: var(--brand-ink);
}
.vcard__ph {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--sunken);
}
.vcard__ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vcard__ph--none {
  display: grid;
  place-items: center;
}
.vcard__ini {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.vcard__b {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  flex: 1;
}
.vcard__n {
  font-family: var(--f-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.vcard__p {
  font-size: var(--t-small);
  color: var(--ink-2);
  line-height: 1.4;
}
.vcard__c {
  margin-top: auto;
  padding-top: 10px;
  font-size: var(--t-small);
  color: var(--ink-3);
}
.vcard__n {
  transition: color var(--dur) var(--ease);
}

/* Фильтр по центру и специальности */
.vfilter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   23. Страница направления
   -------------------------------------------------------------------------- */
.svc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
@media (min-width: 1000px) {
  .svc {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
  }
  .svc__side {
    position: sticky;
    top: 100px;
  }
}
.svc__body > * + * {
  margin-top: 40px;
}
.svc__body h2 {
  margin-bottom: 16px;
}
.svc__text p + p {
  margin-top: 14px;
}
.svc__text p {
  max-width: 68ch;
  color: var(--ink-2);
}
.svc__side .aside-call {
  padding: 24px;
}

/* Доступность по центрам */
.avail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.avail span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
}
.avail span[data-yes='true'] {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand-ink);
}
.avail .ico {
  width: 18px;
  height: 18px;
}

/* Список «когда стоит прийти» */
.ilist {
  display: grid;
  gap: 12px;
  max-width: 68ch;
}
.ilist li {
  display: flex;
  gap: 12px;
  color: var(--ink-2);
}
.ilist .ico {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  flex: none;
  color: var(--brand);
}

/* Что делаем: название слева, цена справа */
.wlist {
  display: grid;
  max-width: 76ch;
  border-top: 1px solid var(--line);
}
.wlist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 20px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.wlist b {
  font-family: var(--f-display);
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  white-space: nowrap;
}
.wlist i {
  grid-column: 1 / -1;
  font-style: normal;
  font-size: var(--t-small);
  color: var(--ink-3);
}
.wlist span {
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* Плитка направлений на странице услуг */
.sgrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.scard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.scard:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
  color: inherit;
}
.scard .ico {
  width: 24px;
  height: 24px;
  color: var(--brand);
}
.scard__n {
  font-family: var(--f-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}
.scard__l {
  font-size: var(--t-small);
  color: var(--ink-2);
  line-height: 1.45;
}
.scard__m {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   24. Страница врача
   -------------------------------------------------------------------------- */
.vhero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (min-width: 640px) {
  .vhero {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 32px;
  }
}
@media (min-width: 1000px) {
  .vhero {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
  }
}
.vhero__ph {
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--sunken);
  border: 1px solid var(--line);
}
.vhero__ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vhero__ph--none {
  display: grid;
  place-items: center;
}
.vhero__ph--none span {
  font-family: var(--f-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--ink-3);
}
.vhero h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
}
.vhero__post {
  margin-top: 12px;
  font-size: var(--t-lead);
  line-height: 1.4;
  color: var(--ink-2);
}
.vhero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 18px;
}
.vhero__meta div {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: var(--t-small);
  color: var(--ink-2);
}
.vhero__meta .ico {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   25. Прайс плитками: разделы, услуги и подробности
   -------------------------------------------------------------------------- */
/* Включается на странице цен, где у блока прайса стоит data-tiles.
   Ленты с горизонтальной прокруткой здесь нет: только сетка и раскрытие. */
.pcats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding: 20px;
}
.pcats[hidden] {
  display: none;
}
.pcats__nojs {
  grid-column: 1 / -1;
  margin: 0;
  max-width: 76ch;
}

.pcat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  padding: 18px 46px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  color: inherit;
  font-family: var(--f-text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.pcat:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-2);
}
.pcat .ico.pcat__i {
  width: 26px;
  height: 26px;
  color: var(--brand);
}
.pcat__n {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pcat__m {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.pcat__c {
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.pcat__from {
  margin-left: auto;
  font-family: var(--f-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pcat .ico.pcat__x {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 24px;
  height: 24px;
  color: var(--ink-3);
  transition: transform var(--dur) var(--ease);
}
.pcat[aria-expanded='true'] {
  background: var(--brand-wash);
  border-color: var(--brand);
}
.pcat[aria-expanded='true'] .ico.pcat__x {
  transform: rotate(180deg);
  color: var(--brand);
}

/* Панель раздела: занимает всю ширину сетки под строкой плиток */
.ppanel {
  grid-column: 1 / -1;
  border: 1px solid var(--brand);
  border-radius: var(--r-2);
  background: var(--surface);
  overflow: hidden;
}
.ppanel[hidden] {
  display: none;
}
.ppanel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 20px;
  background: var(--brand-wash);
  border-bottom: 1px solid var(--line);
}
.ppanel__t {
  font-size: var(--t-h3);
  line-height: 1.2;
}
.ppanel__head .small {
  margin-top: 4px;
}
.ppanel__head .btn {
  flex: none;
}

/* Строки услуг внутри раздела и в результатах поиска */
.plist2 {
  display: grid;
}
.pitem + .pitem {
  border-top: 1px solid var(--line);
}
.prow2 {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 6px 16px;
  min-height: 56px;
  padding: 12px 20px;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--f-text);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.prow2--flat {
  cursor: default;
}
.prow2:hover {
  background: var(--sunken);
}
.prow2--flat:hover {
  background: none;
}
.prow2__n {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.prow2__cat {
  display: block;
  margin-top: 3px;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink-3);
}
.prow2__p {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.prow2 .ico.prow2__x {
  width: 24px;
  height: 24px;
  color: var(--ink-3);
  transition: transform var(--dur) var(--ease);
}
.prow2[aria-expanded='true'] {
  background: var(--sunken);
}
.prow2[aria-expanded='true'] .ico.prow2__x {
  transform: rotate(180deg);
  color: var(--brand);
}

/* Подробности услуги: код, состав, подготовка и переход на направление */
.pdet {
  display: grid;
  gap: 14px;
  padding: 4px 20px 18px;
  background: var(--sunken);
}
.pdet[hidden] {
  display: none;
}
.pdet__dl {
  display: grid;
  gap: 14px;
}
.pdet__dl > div {
  display: grid;
  gap: 4px;
}
.pdet dt {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--ink-3);
}
.pdet dd {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.pdet__list {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--brand);
}
.pdet__list li {
  font-size: var(--t-small);
  line-height: 1.45;
  color: var(--ink-2);
}
.pdet__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  justify-self: start;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-ink);
}
.pdet__link .ico {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Результаты поиска поверх всех разделов сразу */
.pres[hidden] {
  display: none;
}

@media (max-width: 559px) {
  .pcats {
    padding: 16px;
    gap: 10px;
  }
  .ppanel__head {
    padding: 16px;
  }
  .pdet {
    padding: 4px 16px 16px;
  }
  /* На узком экране цена уходит под название: иначе длинные названия
     сжимаются в столбик по два слова. Столбец цены остаётся правым. */
  .prow2 {
    grid-template-columns: minmax(0, 1fr) 24px;
    align-items: start;
    padding: 12px 16px;
  }
  .prow2__n {
    grid-column: 1;
    grid-row: 1;
  }
  .prow2__p {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
  }
  .prow2 .ico.prow2__x {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

/* --------------------------------------------------------------------------
   26. Вакансии
   -------------------------------------------------------------------------- */
.vac {
  display: grid;
  gap: 16px;
}
.vac__item {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}
@media (min-width: 900px) {
  .vac__item {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 32px;
    padding: 32px;
    align-items: start;
  }
}
/* Срочная вакансия: опорная линия слева, тонированная подложка */
.vac__item--urgent {
  border-color: var(--brand);
  background: var(--brand-wash);
  box-shadow: inset 3px 0 0 var(--brand);
}
.vac__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-1);
  background: var(--brand-fill);
  color: var(--on-brand);
  font-size: var(--t-small);
  font-weight: 600;
}
.vac__tag .ico {
  width: 18px;
  height: 18px;
}
.vac__head h3 {
  margin-top: 10px;
}
.vac__lead {
  margin-top: 8px;
  color: var(--ink-2);
  max-width: 62ch;
}
.vac__cols {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
@media (min-width: 640px) {
  .vac__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}
.vac__cols h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.vac__side {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: var(--r-2);
  background: var(--sunken);
}
.vac__item--urgent .vac__side {
  background: var(--surface);
}
.vac__row {
  display: grid;
  gap: 2px;
}
.vac__row dt {
  font-size: var(--t-small);
  color: var(--ink-3);
}
.vac__row dd {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

/* Поле загрузки файла */
.field input[type='file'] {
  padding: 14px 16px;
  background: var(--surface);
  border-style: dashed;
  cursor: pointer;
}
.field input[type='file']::file-selector-button {
  margin-right: 14px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunken);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 600;
  cursor: pointer;
}
