/* Дизайн-система по мотивам Clay, см. DESIGN.md: кремовый фон, чёрные
   кнопки со скруглением 12px, крупные заголовки Inter 500 с плотным трекингом.
   Карточки — нежные нейтральные тона (stone, sage mist, sand, taupe mist),
   насыщенную палитру Clay не используем. Inter (OFL) лежит в /fonts. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/inter-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/inter-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --primary: #0a0a0a;
  --primary-active: #1f1f1f;
  --ink: #0a0a0a;
  --body: #3a3a3a;
  --muted: #6a6a6a;
  --muted-soft: #9a9a9a;
  --hairline: #e5e5e5;
  --canvas: #fffaf0;
  --surface-soft: #faf5e8;
  --surface-card: #f5f0e0;
  --surface-strong: #ebe6d6;
  /* Пастель для плашек */
  --peach: #ffe0cc;
  /* Нежные нейтральные тона: карточки тем чуть отделяются от фона, не крича */
  --card-1: #eeece7;  /* soft stone */
  --card-2: #e7eae1;  /* sage mist */
  --card-3: #f1eadf;  /* sand */
  --card-4: #ece6e0;  /* taupe mist */
  --dot-1: #b8c0aa;
  --dot-2: #cdb9a4;
  --dot-3: #a9b39e;
  --dot-4: #bba892;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; background: var(--canvas); color: var(--body); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

h1, h2 { color: var(--ink); font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -2px; margin: 0 0 24px; }
h2 { font-size: 44px; line-height: 1.08; letter-spacing: -1.2px; margin: 0 0 28px; }
h3 { color: inherit; font-size: 19px; font-weight: 600; line-height: 1.35; margin: 0 0 8px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
strong { color: var(--ink); font-weight: 600; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.page { max-width: 760px; padding-top: 24px; padding-bottom: 96px; }
.page h1 { font-size: 52px; letter-spacing: -1.8px; line-height: 1.04; margin-top: 36px; }
.page h2 { font-size: 30px; letter-spacing: -0.6px; line-height: 1.15; margin: 48px 0 14px; }

/* Навигация на креме */
/* Шапка прилипает к верху на всех экранах; фон полупрозрачный с размытием */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 250, 240, .88); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--hairline); }
html { scroll-padding-top: 80px; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.logo { margin-right: auto; }
.skip { position: absolute; left: -9999px; top: 16px; z-index: 20; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
.logo { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.3px; }
.logo span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 14px; font-weight: 500; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 11px 0; }
.nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.nav a:not(.btn):hover { text-decoration: underline; }

/* Кнопки: чёрная, кремовая с волосяной рамкой, белая на цветной карточке */
.btn { display: inline-flex; align-items: center; min-height: 44px; background: var(--primary); color: #fff; font: 600 15px/1 var(--font); padding: 12px 22px; border-radius: 12px; border: 1px solid var(--primary); text-decoration: none; }
.btn:hover { background: var(--primary-active); }
.btn-ghost { background: var(--canvas); color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--surface-soft); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 14px; }
.on-color .btn, .on-color.btn { background: #fff; color: var(--ink); border-color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }

.kicker { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--body); text-decoration: none; display: inline-block; padding: 12px 0; margin: -12px 0; }
.byline { font-size: 14px; color: var(--muted); margin-top: -8px; }
.byline a { color: var(--muted); }
.lead { font-size: 20px; line-height: 1.5; color: var(--body); }
.small { font-size: 13px; color: var(--muted); }
.center { text-align: center; }
.center .cta-row { justify-content: center; }
.narrow, .center .lead { max-width: 720px; margin-left: auto; margin-right: auto; }
.more { margin-top: 32px; margin-bottom: 0; }
main { flex: 1 0 auto; }

/* Секции: крем и ритм 96px; цвет несут карточки, а не фоны */
.tile { padding: 96px 0; }
.hero { padding: 88px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 56px; align-items: center; }
/* Фото врача: карточка в тон сайта, портрет 4:5 */
/* Силуэт без фона лежит прямо на карточке, снизу обрезан её краем */
.hero-photo { margin: 0; background: var(--card-2); border-radius: 24px; padding: 20px 20px 0; overflow: hidden; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.hero-photo figcaption { padding-bottom: 20px; }
.hero-photo figcaption { font-size: 14px; color: var(--body); margin-top: 14px; }
.hero-photo figcaption strong { font-weight: 600; }

/* Карточки тем: нежные тона по кругу */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card, .cards li { background: var(--surface-card); border-radius: 24px; padding: 32px; margin: 0; color: var(--ink); }
.cards li { min-height: 180px; }
.page .cards li { min-height: 0; padding: 24px; }
.cards li a, .cards li strong { display: block; font-size: 22px; font-weight: 500; letter-spacing: -0.4px; line-height: 1.2; margin-bottom: 10px; color: inherit; text-decoration: none; }
.cards li:nth-child(4n+1) { background: var(--card-1); }
.cards li:nth-child(4n+2) { background: var(--card-2); }
.cards li:nth-child(4n+3) { background: var(--card-3); }
.cards li:nth-child(4n+4) { background: var(--card-4); }
.cards li a::after { content: "\00a0→"; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.cols .card:first-child { background: var(--card-2); }
.cols .card:last-child { background: var(--card-1); }
.cols .card ul { list-style: none; padding-left: 0; }
.cols .card li { position: relative; padding-left: 34px; margin-bottom: 10px; }
.cols .card li::before { position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 9999px; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.cols .card:first-child li::before { content: "✓" / ""; color: #5c6b52; border: 1.5px solid #5c6b52; }
.cols .card:last-child li::before { content: "—" / ""; color: var(--muted); font-weight: 400; }
.cols .card ul { margin-bottom: 0; }
.band { border-radius: 24px; padding: 64px 48px; }
.band-sand { background: var(--card-3); }
.band-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.band-head h2 { margin: 0; }
/* Кнопка на плашке: в тон карточкам с фактами, рамка чуть темнее фона */
.band .btn-ghost { background: rgba(255, 250, 240, .85); border-color: var(--surface-strong); }
.band .btn-ghost:hover { background: #fff; border-color: var(--muted-soft); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; list-style: none; padding: 0; margin: 32px 0 0; }
.facts li { background: rgba(255, 250, 240, .7); border-radius: 16px; padding: 18px 20px; margin: 0; font-size: 15px; color: var(--muted); }
.facts strong { display: block; font-size: 22px; font-weight: 500; letter-spacing: -0.4px; color: var(--ink); margin-bottom: 4px; }
.band-cream { background: var(--surface-card); }

.box { background: var(--surface-card); border-radius: 16px; padding: 24px 28px; margin: 32px 0; }
.box-warn { background: var(--peach); color: var(--ink); }
.page .box h2 { font-size: 22px; letter-spacing: -0.4px; margin: 0 0 10px; }
.box > :last-child { margin-bottom: 0; }

.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 0; }
.steps li { counter-increment: s; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 16px; padding: 24px; margin: 0; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; margin-bottom: 16px; }

details { border-bottom: 1px solid var(--hairline); padding: 20px 0; }
summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary { padding: 10px 0; }
summary::after { content: "+" / ""; font-weight: 400; font-size: 24px; line-height: 1; }
details[open] summary::after { content: "−" / ""; }
details p { margin: 12px 0 0; }

/* Подвал кремовый, не тёмный */
.foot { background: var(--surface-soft); border-top: 1px solid var(--hairline); color: var(--muted); font-size: 14px; }
.foot-in { padding-top: 48px; padding-bottom: 56px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 14px 0; }
.foot a { color: var(--ink); text-decoration: none; font-weight: 500; }
.foot nav a { padding: 11px 0; }
.foot a:hover { text-decoration: underline; }
.disclaimer { margin: 0; max-width: 760px; color: var(--body); }

@media (max-width: 1199px) {
  .cards:not(.cards-2), .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1199px) and (min-width: 900px) { .hero-grid { gap: 40px; } }
/* До 899px (телефон и планшет-портрет): мобильная шапка и первый экран */
@media (max-width: 899px) {
  /* Фото первым и компактно: лицо видно до прокрутки */
  .hero { padding: 32px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo { order: -1; padding: 14px 14px 0; }
  .hero-photo img { aspect-ratio: 5 / 3; object-position: 50% 12%; }
  .hero-photo figcaption { padding-bottom: 14px; margin-top: 10px; }
  /* Цена над кнопками, чтобы попадала в первый экран */
  .hero-grid > div:first-child { display: flex; flex-direction: column; }
  .hero .price-note { order: 1; margin: 0 0 4px; }
  .hero .cta-row { order: 2; margin-top: 16px; }
  /* Шапка: логотип и кнопка в одной строке, меню — второй строкой с прокруткой */
  .top-in { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 0; }
  .top-in .btn-sm { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 20px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a:not(.btn) { white-space: nowrap; padding: 8px 0; }
  .top-in { min-height: 0; padding-top: 6px; padding-bottom: 2px; }
  html { scroll-padding-top: 96px; }
  /* Кнопки в плашках — во всю ширину, иначе висят слева */
  .band .btn { width: 100%; justify-content: center; }
  /* «Подробнее обо мне» на телефоне — после фактов, а не между заголовком и текстом */
  .band-sand { display: flex; flex-direction: column; }
  .band-sand .band-head { display: contents; }
  .band-sand .band-head h2 { margin-bottom: 16px; }
  .band-sand .band-head .btn { order: 1; margin-top: 24px; }
  /* Логотип в две строки ровно по высоте кнопки: верх букв по верху кнопки, низ подписи по низу */
  .logo { white-space: nowrap; display: flex; flex-direction: column; justify-content: space-between; height: 36px; line-height: 1; font-size: 20px; }
  .logo, .logo span { text-box: trim-both cap alphabetic; }
  .logo span { margin-left: 0; font-size: 14px; }
  /* Кнопка визуально 36px под высоту логотипа, область нажатия — 44px */
  .top-in .btn-sm { position: relative; min-height: 36px; height: 36px; padding: 0 16px; }
  .top-in .btn-sm::after { content: ""; position: absolute; inset: -4px 0; }
}
@media (max-width: 1023px) { .tile { padding: 80px 0; } }
@media (max-width: 599px) { .cards:not(.cards-2), .steps { grid-template-columns: 1fr; } }
@media (max-width: 767px) {
  body { font-size: 16px; }
  h1, .page h1 { font-size: 40px; line-height: 1.05; letter-spacing: -1.2px; }
  h2 { font-size: 32px; letter-spacing: -0.8px; }
  .page h2 { font-size: 26px; }
  .lead { font-size: 18px; }
  .tile { padding: 56px 0; }
  .hero { padding: 24px 0 56px; }
  .hero .lead { font-size: 17px; }
  .band { padding: 40px 24px; }
  .card, .cards li { padding: 24px; }
  /* Карточки тем на телефоне — компактные, без минимальной высоты */
  .cards li { min-height: 0; padding: 18px 20px; border-radius: 18px; }
  .cards li a, .cards li strong { font-size: 19px; margin-bottom: 6px; }
  .cards { gap: 10px; }
  .page { padding-bottom: 40px; }
  .foot-in { padding-top: 28px; }
}
@media (max-width: 419px) { h1, .page h1 { font-size: 34px; } .wrap { padding-left: 16px; padding-right: 16px; } }
.narrow-left { max-width: 720px; }
.tile + .tile { padding-top: 0; }
.timeline { display: grid; grid-template-columns: 120px 1fr; gap: 12px 24px; margin: 0 0 16px; }
.timeline dt { font-weight: 600; color: var(--ink); }
.timeline dd { margin: 0; }
@media (max-width: 519px) { .timeline { grid-template-columns: 1fr; gap: 2px; } .timeline dd { margin-bottom: 14px; } }
.doc { margin: 24px 0 8px; }
.doc img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--hairline); }
.doc figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.doc-facts { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.about-head { display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: start; }
.about-head img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; }
@media (max-width: 599px) { .about-head { grid-template-columns: 1fr; } .about-head img { max-width: 260px; } }
.topics-title { margin: 40px 0 16px; }
.topics-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 32px; list-style: none; padding: 0; margin: 0; }
.topics-list li { break-inside: avoid; position: relative; padding: 6px 0 6px 20px; margin: 0; color: var(--ink); }
.topics-list li::before { content: ""; position: absolute; left: 0; top: 15px; width: 8px; height: 8px; border-radius: 3px; background: var(--dot-3); }
.prices { list-style: none; padding: 0; margin: 0; }
.prices li:last-child { border-bottom: 0; padding-bottom: 0; }
.prices li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--surface-strong); color: var(--body); font-size: 15px; }
.prices li:first-child { padding-top: 0; }
.prices strong { font-size: 17px; }
.prices .price { flex: 0 0 auto; font-size: 20px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.prices .price { text-align: right; }
.prices .price small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.price-note { font-size: 15px; color: var(--muted); margin: 16px 0 0; }
.price-note strong { color: var(--ink); font-weight: 600; }
.price-note a { color: var(--muted); white-space: nowrap; }
.page .price-note { margin: 0 0 8px; }
.topics-list a { color: var(--ink); text-decoration: none; }
.topics-list a:hover { text-decoration: underline; }
/* Концовка статьи: заметная карточка записи и отдельный блок похожих тем */
.cta-card { background: var(--card-2); border-radius: 24px; padding: 28px 32px; margin: 48px 0 0; }
.cta-card p { font-size: 19px; line-height: 1.45; font-weight: 500; color: var(--ink); margin: 0; }
.cta-card .cta-row { align-items: center; margin-top: 20px; }
.cta-price { font-size: 15px; color: var(--body); }
.related-links { margin-top: 32px; color: var(--muted); }
@media (max-width: 767px) { .cta-card { padding: 24px; } .cta-card p { font-size: 17px; } }
/* Одиночная кнопка в конце страницы: с воздухом сверху и по центру */
.page p:has(> a.btn:only-child) { text-align: center; margin-top: 40px; }
@media (max-width: 389px) { .prices li { flex-direction: column; gap: 4px; } .prices .price { text-align: left; } }
/* Таблицы в статьях: без рамок, только линии между строками */
.page table { width: 100%; margin: 24px 0; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.page th, .page td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--surface-strong); }
.page th { color: var(--ink); font-weight: 600; }
/* Источники в статьях: мелко, приглушённо */
.page .sources { font-size: 15px; color: var(--muted); }
.page .sources a { color: var(--body); }
/* На странице записи кнопка в шапке ведёт сама на себя — прячем */
.top-in .btn[aria-current] { visibility: hidden; }
/* Широкие таблицы на телефоне прокручиваются внутри себя, а не всю страницу */
/* На телефоне таблица — стопка карточек: первая ячейка заголовком, остальные с подписью колонки */
@media (max-width: 599px) {
  .page table, .page tbody, .page tr, .page td { display: block; }
  .page thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .page tr { padding: 16px 0; border-bottom: 1px solid var(--surface-strong); }
  .page td { border: 0; padding: 0; margin-top: 8px; }
  .page td:first-child { margin-top: 0; color: var(--ink); font-weight: 600; font-size: 16px; }
  .page td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 13px; color: var(--muted); }
}
/* Кнопки первого экрана на телефоне — во всю ширину, как в плашках */
@media (max-width: 599px) { .hero .cta-row .btn { width: 100%; justify-content: center; } }
