:root {
  /* Единственная тема — тёмная. Цвета сняты с аватара сервиса: фон круга
     тёмно-бордовый, акцент — красный из пробирки логотипа.
     color-scheme говорит браузеру красить полосы прокрутки и поля ввода
     по-тёмному, иначе они остаются белыми. */
  color-scheme: dark;

  /* Заливки. Держим ОТДЕЛЬНО от текстовых токенов: на юр-боте одна общая
     переменная дала кнопку с белым текстом на светлом фоне, контраст 1.28. */
  --fill-1: #2f6fd0;
  --fill-2: #1c4f9e;
  --fill-text: #eaf2fb;
  --on-white: #123d78;

  --blue: #2f6fd0;              /* заливка + белый текст поверх */
  --accent-text: #7fb0f0;       /* синий, читаемый НА тёмном фоне */
  --blue-dark: #cfe0f7;         /* теперь это ТЕКСТ, а не заливка */
  --blue-light: #16283f;        /* была бледная подложка — стала тёмная */
  --blue-soft: #101d30;
  --heading: #eef3fa;

  --green: #6fb893;
  --orange: #e0a855;
  --red: #e0697a;
  --text: #e3e8ef;
  --text-soft: #a3adbb;
  --gray: #8d95a3;
  --border: #223247;
  --bg: #0d1826;
  --bg-soft: #111f31;
  --surface: #16283f;
  --header-bg: rgba(13, 24, 38, 0.88);

  --ok-bg: rgba(111, 184, 147, 0.16);
  --warn-bg: rgba(224, 168, 85, 0.16);
  --bad-bg: rgba(224, 105, 122, 0.16);
  --note-bg: #1c1a12;
  --note-border: #3a3018;
  --note-text: #d8bd85;
  --ghost-hover: #1d3350;
  /* Рамка контурной кнопки. ОТДЕЛЬНО от --blue-light: тот служит подложкой
     и в тёмной теме равен цвету карточки (#16283f) — рамка сливалась с фоном
     и кнопка «Выбрать в Telegram» выглядела просто текстом. */
  --outline-border: #3a5c8f;
  --outline-hover-bg: rgba(47, 111, 208, 0.16);
  /* Панель финального призыва. Раньше блок заливался теми же синими, что
     и кнопки: посреди тёмной страницы он светился ярко-синим прямоугольником,
     а кнопку Telegram приходилось делать белой — единственную на всём сайте.
     Панель тёмная => Telegram снова синий, как везде. */
  --panel-1: #10233f;
  --panel-2: #17324f;
  --footer-bg: #081320;
  --footer-text: #93a2b6;
  --max-outline-border: #3a2a5c;
  --max-outline-text: #c9a7ff;

  --radius: 16px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn--sm { padding: 10px 20px; font-size: 14px; }
.btn--lg { padding: 17px 34px; font-size: 17px; }

.btn--primary {
  background: linear-gradient(135deg, var(--fill-1), var(--fill-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(26, 83, 161, 0.28);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(26, 83, 161, 0.35); }

.btn--ghost {
  background: var(--blue-light);
  color: var(--blue-dark);
}
.btn--ghost:hover { background: var(--ghost-hover); }

.btn--outline {
  border: 2px solid var(--outline-border);
  color: var(--accent-text);
  width: 100%;
}
.btn--outline:hover { border-color: var(--blue); background: var(--outline-hover-bg); }

.btn--white {
  background: #fff;
  color: var(--on-white);
}
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,0.15); }

/* MAX messenger — фирменный фиолетовый, чтобы отличать от синей TG-кнопки */
.btn--max {
  background: linear-gradient(135deg, #8b3ffb, #b24bff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(139, 63, 251, 0.28);
}
.btn--max:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(139, 63, 251, 0.38); }

/* Вариант MAX в контурном стиле — для карточек тарифов рядом с btn--outline */
.btn--max-outline {
  border: 2px solid var(--max-outline-border);
  color: var(--max-outline-text);
  width: 100%;
}
.btn--max-outline:hover { border-color: #8b3ffb; background: #1e1533; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.logo {
  font-weight: 800;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-dark);
}
.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 24px;
}
.nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .2s;
}
.nav a:hover { color: var(--accent-text); }
.header__cta { flex-shrink: 0; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-switch a {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--text-soft);
  transition: all .2s;
}
.lang-switch a.active {
  background: var(--blue);
  color: #fff;
}
.lang-switch a:not(.active):hover { color: var(--accent-text); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
.burger span {
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .2s;
}

/* ===== Hero ===== */
.hero {
  padding: 72px 0 96px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(26,83,161,0.08), transparent),
    var(--bg);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--heading);
}
.hero__lead {
  font-size: 18px;
  color: var(--text-soft);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero__trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 500;
}

/* ===== Report card visual ===== */
.hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.visual-stack {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 36px auto 116px;   /* запас сверху/снизу для плавающих стикеров */
}

/* ===== Лицо сервиса в первом экране ===== */
/* <picture> сам по себе inline — без display:block не центруется по auto-полям.
   Фон не задаём: у файла прозрачные углы, подложка вылезла бы квадратом. */
.hero__face-pic { display: block; }
.hero__face {
  display: block;
  width: clamp(200px, 78%, 264px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  /* Сдвиг влево — по просьбе владельца: круг стоял вплотную к правому краю,
     и между текстом и картинкой зияла дыра. Двигаем трансформом, а не полем:
     раскладка не меняется, карточка под ним остаётся на месте.
     На телефоне сдвиг снимается — там знак идёт по центру над заголовком. */
  /* Сдвиг зависит от ширины окна, а не фиксирован: на 1000 px постоянные
     -130 px клали круг ровно на край заголовка (перекрытие 1 px), а на 1440
     их не хватало. clamp держит вилку -40…-130 и сам подбирает середину. */
  transform: translateX(clamp(-150px, -11vw, -40px));
  /* тень по кругу, а не по квадрату картинки */
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.5));
}
.report-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  width: 100%;
  border: 1px solid var(--border);
  transform: rotate(1.5deg);
}
.mini-wave-card {
  position: absolute;
  z-index: 2;
  bottom: -84px;            /* ниже футера карточки, чтобы не перекрывала текст */
  right: 18px;              /* сдвинута левее от края */
  width: 48%;               /* правая половина низа — не пересекается с chip-2 слева */
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 12px 14px 8px;
  transform: rotate(5deg);
}
.mini-wave-card__head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.mini-wave-card .wave-line {
  height: 32px;
  margin: 4px 0 0;
}
.report-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--blue-light);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.report-card__title { font-weight: 700; color: var(--blue-dark); font-size: 16px; }
.report-card__date { font-size: 12px; color: var(--gray); }
.report-card__row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.7fr;
  align-items: center;
  gap: 6px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.report-card__row span { color: var(--text-soft); }
.report-card__row b { font-weight: 700; white-space: nowrap; }
.report-card__row em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-align: center;
}
em.ok { background: var(--ok-bg); color: var(--green); }
em.warn { background: var(--warn-bg); color: var(--orange); }
em.bad { background: var(--bad-bg); color: var(--red); }
.report-card__footer {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--gray);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.floating-chip {
  position: absolute;
  z-index: 2;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-dark);
  border: 1px solid var(--border);
  line-height: 1.35;
}
.chip-1 { top: -54px; right: -8px; transform: rotate(-3deg); max-width: 60%; }
/* левая половина низа — держим ширину, чтобы длинный текст переносился, а не наезжал на мини-карточку ЭКГ справа */
.chip-2 { bottom: -30px; left: -8px; transform: rotate(2deg); max-width: 46%; }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section__title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--heading);
  margin-bottom: 12px;
}
.section__subtitle {
  text-align: center;
  color: var(--text-soft);
  font-size: 17px;
  margin-bottom: 56px;
}

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step__num {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 13px;
  font-weight: 800;
  color: var(--fill-text);
  background: var(--fill-2);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step__icon { font-size: 32px; margin-bottom: 16px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--text-soft); }

/* ===== Grid / Cards ===== */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  font-size: 30px;
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { font-size: 14.5px; color: var(--text-soft); }
.card--big { padding: 36px; }
.card--big p { font-size: 15.5px; }

/* ===== Document types (ЭКГ/ЭЭГ waveforms) ===== */
.wave-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.wave-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  transition: transform .2s, box-shadow .2s;
}
.wave-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.wave-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text);
  margin-bottom: 4px;
}
.wave-card__badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  background: var(--ok-bg);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.wave-line {
  width: 100%;
  height: 84px;
  display: block;
  margin: 6px 0 2px;
}
.wave-line path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.wave-line--eeg path { stroke: #6c4fd6; }
.wave-card__foot {
  font-size: 13.5px;
  color: var(--text-soft);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.doctypes-lead {
  text-align: center;
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 20px;
}
.doctypes-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.doctype-chip {
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--blue-light);
}

/* ===== Pricing ===== */
.pricing {
  display: grid;
  /* minmax(0,…) обязателен: без него колонка не может стать уже своего содержимого,
     и пять карточек выталкивают страницу в горизонтальную прокрутку */
  /* ТРИ колонки, а не пять. Контейнер ограничен 1160 px, поэтому пять колонок
     дают карточку 208 px на ЛЮБОМ экране — хоть на 1440, хоть на 1920, — и
     кнопка «Выбрать в Telegram» ломается на три строки. При трёх колонках
     карточка 359 px и кнопка помещается в две строки. Тарифы встают 3 + 2. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
/* В узкой карточке подпись переносится, а не распирает колонку */
.price-card .btn { white-space: normal; overflow-wrap: anywhere; padding-left: 12px;
                   padding-right: 12px; font-size: 15px; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card--featured {
  border: 2px solid var(--blue);
  box-shadow: var(--shadow-lg);
  transform: scale(1.04);
}
.price-card__ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
}
.price-card__name { font-weight: 600; color: var(--text-soft); font-size: 14px; margin-bottom: 10px; }
.price-card__price { font-size: 32px; font-weight: 800; color: var(--blue-dark); margin-bottom: 4px; }
.price-card__desc { font-size: 13px; color: var(--gray); margin-bottom: 20px; }
.price-card__btns { display: flex; flex-direction: column; gap: 10px; }

.payment-methods {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-soft);
}
.payment-methods span:first-child { font-weight: 600; color: var(--text); }
.pm {
  background: var(--blue-soft);
  padding: 8px 16px;
  border-radius: 999px;
}

/* ===== Disclaimer ===== */
.disclaimer { padding: 40px 0; }
.disclaimer__inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.disclaimer__icon { font-size: 22px; flex-shrink: 0; }
.disclaimer p { font-size: 14.5px; color: var(--note-text); }

/* ===== FAQ ===== */
.faq { max-width: 780px; margin: 0 auto; }
.faq__item {
  border-bottom: 1px solid var(--border);
}
.faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 4px;
  font-size: 16.5px;
  font-weight: 600;
  text-align: left;
  color: var(--text);
}
.faq__icon {
  font-size: 22px;
  color: var(--accent-text);
  transition: transform .25s;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq__item.open .faq__icon { transform: rotate(45deg); }
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq__a p { padding: 0 4px 22px; color: var(--text-soft); font-size: 15px; max-width: 680px; }
.faq__item.open .faq__a { max-height: 200px; }

/* ===== Final CTA ===== */
.final-cta {
  background: linear-gradient(135deg, var(--panel-1), var(--panel-2));
  padding: 80px 0;
  color: var(--text);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.final-cta h2 { color: var(--heading); }
/* Telegram-кнопка здесь была белой — из-за синего фона. Фон стал тёмным,
   поэтому возвращаем ей фирменный синий: одна и та же кнопка на всём сайте
   должна выглядеть одинаково. */
.final-cta .btn--white {
  background: linear-gradient(135deg, var(--fill-1), var(--fill-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}
.final-cta__inner { text-align: center; }
.final-cta h2 { font-size: 32px; font-weight: 800; margin-bottom: 14px; }
.final-cta p { font-size: 17px; opacity: .9; margin-bottom: 32px; }

/* ===== Footer ===== */
.footer { background: var(--footer-bg); color: var(--footer-text); padding: 56px 0 32px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo--footer { color: #fff; margin-bottom: 10px; }
.footer__brand p { font-size: 14px; max-width: 260px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a { font-size: 14.5px; transition: color .2s; }
.footer__links a:hover { color: #fff; }
.footer__legal { font-size: 13px; opacity: .8; }
.footer__legal p { margin-bottom: 6px; }
.footer__inner + .footer p { text-align: center; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  /* Раскладываем первый экран в три отдельных ряда: лицо → текст с кнопками →
     карточка показателей. display:contents растворяет .hero__visual, и её
     дети становятся рядами наравне с текстом — только так лицо поднимается
     наверх, а карточка (353 px высотой) уходит ПОД кнопки.
     Раньше вся колонка стояла над текстом целиком, и заголовок оказывался
     на 809-й строке при окне 812 — то есть за сгибом. */
  .hero__inner { display: flex; flex-direction: column; gap: 10px; }
  .hero__face { transform: none; }   /* колонка уже не справа — центрируем */
  .hero__visual { display: contents; }
  .hero__face-pic { order: -2; }
  .hero__text { order: -1; }
  .visual-stack { order: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .wave-cards { grid-template-columns: 1fr; }   /* графики ЭКГ/ЭЭГ — по одному в ряд */
}

@media (max-width: 560px) {
  /* На телефоне тарифы в один столбец: в два они сжимаются до нечитаемого */
}

/* Меню уезжает в бургер уже на планшете: с четырьмя языками в шапке рядом стоят
   логотип, шесть пунктов меню, переключатель и две кнопки — они не помещаются */
@media (max-width: 1000px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--surface);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform .25s ease;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    z-index: -1;
  }
  .nav--open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
  .burger { display: flex; }
  .burger--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger--active span:nth-child(2) { opacity: 0; }
  .burger--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header__cta { display: none; }   /* кнопки ботов есть в первом экране и в футере */
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%);
    transition: transform .25s ease;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  }
  .nav--open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
  .burger { display: flex; z-index: 101; }
  .burger--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger--active span:nth-child(2) { opacity: 0; }
  .burger--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero h1 { font-size: 32px; }
  .hero__lead { font-size: 16px; }
  .section { padding: 60px 0; }
  .section__title { font-size: 27px; }
  .steps { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .price-card--featured { transform: none; }
  .visual-stack { max-width: 300px; margin: 40px auto 106px; }

  /* ===== Первый экран на телефоне ===== */
  /* Телефон — основной экран. Колонка с картинкой уезжает НАД заголовком,
     поэтому лицо держим скромным и поджимаем отступы: иначе заголовок
     и кнопки уходят за сгиб. Значения выставлены по замерам на 375×812. */
  .hero { padding-top: 20px; padding-bottom: 48px; }
  .hero__face { width: clamp(128px, 36vw, 164px); margin-bottom: 6px; transform: none; }
  .hero__lead { margin-bottom: 16px; }
  .badge { margin-bottom: 12px; }
  .hero h1 { margin-bottom: 12px; }
  .hero__cta { gap: 10px; margin-bottom: 18px; }

  .chip-1 { top: -46px; font-size: 12px; padding: 8px 12px; max-width: 62%; }
  .chip-2 { bottom: -26px; font-size: 12px; padding: 8px 12px; max-width: 48%; }
  .mini-wave-card { bottom: -74px; right: 8px; }
  .header__cta { display: none; }
}

/* Грузинские подписи в меню длиннее русских, а переключатель языков вырос до
   шести кодов — шапка перестала помещаться даже в 1280. Кнопки ботов из шапки
   убираем раньше: они дублируются в первом экране и в футере. Логотипу при этом
   разрешаем сжиматься, чтобы бургер не выдавливало за край. */
@media (max-width: 1340px) {
  .header__cta { display: none; }
}
.header__inner { min-width: 0; }
.logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) {
  .logo { font-size: 16px; }
}

@media (max-width: 480px) {
  /* Совсем узкий экран: переключатель языков — отдельной строкой под логотипом.
     Четыре кода рядом с логотипом и бургером в 360 px уже не помещаются. */
  .header__inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; }
  .lang-switch { order: 3; width: 100%; justify-content: center; border: none; gap: 2px; }
  .lang-switch a { border: 1px solid var(--border); border-radius: 999px; }
}

/* Карточка ЭКГ/ЭЭГ не сжималась: заголовок и плашка «Распознано» стоят в одну
   строку и держат минимальную ширину. На узком экране разрешаем перенос. */
.wave-card { min-width: 0; }
.wave-card__head { flex-wrap: wrap; gap: 6px; min-width: 0; }


@media (max-width: 620px) {
  /* Ширину НЕ ограничиваем и авто-поля НЕ ставим: в гриде margin:auto
     отменяет растягивание — карточка сжимается по содержимому, и соседние
     тарифы получают разную ширину (было 252, 218, 216 в одной колонке). */
  .price-card { max-width: none; }
}

/* ===== Тарифы: сколько колонок ===== */
/* ВАЖЕН ПОРЯДОК: медиазапросы не спорят по важности — выигрывает тот, что ниже.
   Поэтому ступени идут строго от широкого к узкому и стоят в самом конце файла.
   Пять тарифов помещаются в ряд только на широком экране; ниже переходим
   на 3 и 2, чтобы карточка не сжималась и кнопка «Выбрать в Telegram»
   не ломалась на три строки (так было при 208 px). */
@media (max-width: 900px) {
  .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .pricing { grid-template-columns: 1fr; }
  .price-card { max-width: none; }
}
