/* Прототип «Подбор ИОЛ» — язык сайта reviewclinic.ru: Stolzl-заголовки,
   Gilroy-текст, прямые углы у панелей и карточек, пилюли только у кнопок и
   чипов, подчёркнутые поля, панели #E8F0F6, графит #323F4A, без теней.
   Порядок: токены → база → кнопки/чипы/поля → секции сверху вниз → мобила. */
@font-face { font-family: 'Gilroy'; src: url('../fonts/Gilroy-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('../fonts/Gilroy-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Gilroy'; src: url('../fonts/Gilroy-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Stolzl'; src: url('../fonts/Stolzl-Book.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Stolzl'; src: url('../fonts/Stolzl-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --primary: #323F4A;
  --primary-light: #46586A;
  --dark: #141616;
  --blue: #A1BCD0;
  --blue-soft: #B8D2E5;
  --ice: #E8F0F6;
  --elements: #F5F7F9;
  --surface: #F8F9F4;
  --border: #E3E8EA;
  --border-gray: #D8DBD6;
  --slate: #56616C;
  --muted: #5A6161;
  --sale: #D64534;
  --font: 'Gilroy', system-ui, sans-serif;
  --font-heading: 'Stolzl', 'Gilroy', system-ui, sans-serif;
  --line: 1px solid var(--border);
}

/* ---------- База ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--dark); background: #fff; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; color: var(--primary); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: 53px; line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: 41px; line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: 23px; line-height: 1.2; }
p { margin: 0; }
button { font: inherit; cursor: pointer; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.container { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
.page { display: flex; flex-direction: column; gap: 96px; padding: 64px 40px 96px; } /* боковые поля явно: сокращённая запись иначе обнуляет отступ .container */
.section { display: flex; flex-direction: column; gap: 28px; }
.section-head { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.section-head p { font-size: 18px; color: var(--slate); }
.section-head .meta { font-size: 16px; }
.sub-title { font-size: 21px; }
.stack { display: flex; flex-direction: column; gap: 72px; }

/* Eyebrow как на сайте: «— 02 / Направления» */
.eyebrow { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; letter-spacing: .03em; color: var(--slate); margin-bottom: 18px; }
.eyebrow .dash { width: 19px; height: 1px; background: var(--slate); }
.eyebrow .sep { color: var(--border-gray); }
.label { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); }
.step-num { font-size: 15px; letter-spacing: .04em; color: var(--slate); }

/* Шапка-заглушка */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: #fff; border-bottom: var(--line); max-width: none; }
.site-header .logo { font-family: var(--font-heading); font-size: 28px; color: var(--primary); }
.site-header .logo small { display: block; font-family: var(--font); font-size: 14px; letter-spacing: .02em; color: var(--slate); }
.site-header nav { display: flex; gap: 22px; font-size: 17px; font-weight: 500; color: var(--primary); }
.site-header .phone { font-weight: 600; color: var(--primary); }

/* ---------- Кнопки, ссылки, чипы, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 28px; border-radius: 999px; border: 1px solid transparent; font-size: 17px; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.btn .plus { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary { background: #fff; color: var(--primary); border-color: var(--border-gray); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 16px; gap: 8px; }
.btn-sm .plus { width: 13px; height: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-primary[disabled]:hover { background: var(--primary); }
.btn-compare[aria-pressed="true"] { border-color: var(--primary); background: var(--ice); }
.link { background: none; border: 0; padding: 0; min-height: 44px; font-size: 17px; font-weight: 500; color: var(--primary); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border-gray); }
.link:hover { text-decoration-color: var(--primary); }
.plus-circle { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1px solid var(--border-gray); border-radius: 50%; color: var(--primary); transition: transform .2s, background .2s; }
.plus-circle .plus { width: 12px; height: 12px; }
details[open] .plus-circle { transform: rotate(45deg); background: var(--primary); color: #fff; border-color: var(--primary); }
.badge { padding: 5px 12px; border-radius: 999px; background: var(--ice); font-size: 15px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.badge.gray { background: var(--elements); color: var(--slate); font-weight: 500; }
.badge.warn { background: #fff; border: 1px solid var(--border-gray); color: var(--primary); font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 2px 0 14px; border-radius: 999px; background: var(--ice); font-size: 16px; font-weight: 500; color: var(--primary); }
.chip button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--slate); font-size: 17px; }
.chip button:hover { background: #fff; color: var(--primary); }
.pill { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-gray); background: #fff; font-size: 16px; font-weight: 500; color: var(--primary); transition: background .2s, color .2s, border-color .2s; }
.pill[aria-checked="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.input { min-height: 48px; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--border-gray); background: transparent; font: inherit; font-size: 19px; color: var(--primary); transition: border-color .2s; }
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-bottom-color: var(--primary); }
.input[aria-invalid="true"] { border-bottom-color: var(--sale); }
textarea.input { min-height: 64px; padding: 12px 0; resize: vertical; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--ice); color: var(--primary); font-size: 16px; }
.notice::before { content: 'i'; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--slate); color: var(--slate); font-size: 14px; font-weight: 600; display: grid; place-items: center; margin-top: 1px; }
.err { font-size: 16px; color: var(--sale); }
.err.box { padding: 12px 16px; background: #fff; color: var(--primary); }
.privacy { font-size: 14px; line-height: 1.4; color: var(--slate); }

/* Тултип «?» */
.tip { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: 6px; padding: 0; border: 1px solid var(--border-gray); background: #fff; color: var(--slate); font-size: 13px; font-weight: 600; line-height: 1; cursor: help; vertical-align: middle; }
.tip:hover, .tip:focus-visible, .tip.open { border-color: var(--primary); color: var(--primary); }
.tip::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: 280px; padding: 12px 14px; background: var(--primary); color: #fff; font-family: var(--font); font-weight: 400; font-size: 15px; line-height: 1.4; text-align: left; text-transform: none; letter-spacing: 0; display: none; pointer-events: none; }
.tip:hover::after, .tip:focus-visible::after, .tip.open::after { display: block; pointer-events: auto; } /* display, а не opacity: скрытая подсказка не должна давать горизонтальный скролл */

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 500px; gap: 40px; align-items: center; padding: 64px; background: var(--ice); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hero-sub { max-width: 560px; font-size: 19px; color: var(--slate); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero-copy .hero-actions .btn { padding: 0 24px; }
.hero-stats { display: flex; margin-top: 8px; }
.hero-stats li { display: flex; flex-direction: column; gap: 4px; padding-right: 28px; margin-right: 28px; border-right: 1px solid rgba(50,63,74,.15); }
.hero-stats li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stats b { font-family: var(--font-heading); font-weight: 400; font-size: 26px; line-height: 1; color: var(--primary); }
.hero-stats span { font-size: 15px; color: var(--slate); }
/* «Где стоит ИОЛ»: по кнопке текст первого экрана уступает место схеме, глаз встаёт слева,
   слои раскладываются справа от него плоскими пластинами по ходу света — спокойно, без анимации поверх лица. */
.hero > * { transition: opacity .18s ease-out; }
.hero.fade > * { opacity: 0; }
.hero-explain { display: none; }
.hero-explain-link { align-self: flex-start; }
.hero.explain { grid-template-columns: 1fr; }
.hero.explain .hero-copy { display: none; }
.hero.explain .hero-explain { display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.hero-explain .section-fig { max-width: 820px; }
/* Сменный визуал справа (варианты — hero-v-*.css). Контейнер: 400 px на компьютере, во всю ширину на телефоне. */
.hero-visual { position: relative; min-height: 460px; min-width: 0; }
.hero.explain .hero-visual { display: none; }
/* Блоки «для тех, кто хочет разобраться»: текст слева, наглядный модуль справа */
.learn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: center; }
.learn-copy { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.learn-copy .eyebrow { margin-bottom: 0; }
.learn-copy p { font-size: 18px; line-height: 1.5; color: var(--slate); }
.learn-visual { min-width: 0; }
.hero-explain .eyebrow { margin-bottom: 0; }
.hero-explain h2 { font-size: 34px; }
.hero-explain h2:focus { outline: none; }
.section-fig { display: flex; align-items: flex-end; gap: 12px; }
.eye-section { flex: 1; min-width: 0; height: auto; max-width: 560px; }
.eye-section .lbl { font-family: var(--font); font-size: 16px; fill: var(--primary); }
.eye-section .lbl.key { font-weight: 600; fill: #1F3A66; }
.eye-section .num { fill: #fff; stroke: #56616C; stroke-width: 1.5; }
.eye-section .key .num { stroke: #1F3A66; stroke-width: 2; }
.eye-section .num-t { font-family: var(--font); font-size: 13px; font-weight: 600; fill: var(--primary); }
.eye-section .t-mob, .legend { display: none; }
.lens-photo { flex: none; width: 128px; margin: 0 0 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lens-photo img { width: 96px; height: auto; filter: contrast(1.15) drop-shadow(0 4px 8px rgba(31,58,102,.25)); }
.lens-photo figcaption { font-size: 14px; line-height: 1.35; color: var(--slate); text-align: center; }
.explain-sum { max-width: 640px; font-size: 19px; line-height: 1.45; color: var(--primary); }
@keyframes pupil { 0%, 100% { transform: scale(1); } 50% { transform: scale(.88); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Как работает ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.steps li { display: flex; flex-direction: column; gap: 14px; padding: 8px 32px 8px 0; }
.steps li + li { padding-left: 32px; border-left: var(--line); }
.steps h3 { font-size: 23px; }
.steps p { font-size: 17px; color: var(--slate); }
.how-note { font-size: 16px; color: var(--slate); max-width: 720px; }

/* ---------- Старт ---------- */
.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.entry { display: flex; flex-direction: column; justify-content: space-between; min-height: 176px; padding: 28px; border: var(--line); background: #fff; text-align: left; color: var(--primary); transition: border-color .2s, background .2s; }
.entry:hover { border-color: var(--primary); }
.entry.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.entry.primary:hover { background: var(--primary-light); }
.entry b { font-family: var(--font-heading); font-weight: 400; font-size: 23px; line-height: 1.15; display: block; margin-bottom: 10px; }
.entry span { font-size: 17px; opacity: .75; }
.entry .arrow { margin-top: 16px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; opacity: 1; }
.entry .arrow .plus { width: 14px; height: 14px; }
.resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: var(--ice); }
.resume b { font-family: var(--font-heading); font-weight: 400; font-size: 19px; color: var(--primary); display: block; margin-bottom: 4px; }
.resume p { font-size: 16px; color: var(--slate); max-width: 560px; }
.resume-actions { display: flex; gap: 10px; }

/* ---------- Квиз ---------- */
.quiz { display: grid; grid-template-columns: 400px 1fr; gap: 48px; align-items: start; }
.quiz-panel { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; padding: 28px; background: var(--ice); }
.quiz-panel .eyebrow { margin: 0; }
.stepper { display: flex; flex-direction: column; gap: 2px; }
.stepper button { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 40px; padding: 6px 0; border: 0; background: none; text-align: left; font-size: 17px; color: var(--slate); }
.stepper button[disabled] { cursor: default; opacity: .55; }
.stepper i { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 1px solid var(--border-gray); background: #fff; font-style: normal; font-size: 14px; font-weight: 600; color: var(--slate); }
.stepper .done i { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper .cur i { background: #fff; border-color: var(--primary); color: var(--primary); }
.stepper .done span, .stepper .cur span { color: var(--primary); }
.stepper .cur span { font-weight: 600; }
.stepper span { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
.stepper small { font-size: 14px; font-weight: 400; color: var(--slate); line-height: 1.25; }
.panel-stat { padding-top: 20px; border-top: 1px solid rgba(50,63,74,.15); display: flex; flex-direction: column; gap: 10px; }
.quiz-counter { font-family: var(--font-heading); font-size: 26px; line-height: 1.1; letter-spacing: -0.02em; color: var(--primary); }
.funnel { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--slate); }
.funnel b { color: var(--primary); font-weight: 600; margin-right: 4px; }
.funnel .arr { display: none; }
.quiz-hint { font-size: 17px; color: var(--slate); }
.panel-stat .quiz-hint { font-size: 16px; }
.quiz-q { display: flex; flex-direction: column; gap: 24px; }
.quiz-q h2 { font-size: 34px; }
.quiz-q > .quiz-hint { margin-top: -8px; max-width: 640px; }
.multi-hint { margin-top: -10px; font-size: 16px; color: var(--slate); }
.m-step { display: none; }
.progress { display: none; gap: 6px; }
.progress li { flex: 1; display: flex; }
.progress button { width: 100%; height: 24px; padding: 10px 0; border: 0; background: none; opacity: 1; }
.progress button span { display: block; height: 4px; background: #D4DDE5; }
.progress button.done span, .progress button.current span { background: var(--primary); }
.options { display: grid; gap: 12px; }
.options.two { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 18px; border: var(--line); background: #fff; text-align: left; transition: border-color .2s, background .2s; }
.opt:hover { border-color: var(--primary); }
.opt[aria-checked="true"] { border-color: var(--primary); background: var(--ice); }
.opt .box { flex: none; width: 22px; height: 22px; border: 1px solid var(--border-gray); background: #fff; display: grid; place-items: center; color: #fff; font-size: 15px; }
.opt:not(.multi) .box { border-radius: 50%; }
.opt[aria-checked="true"] .box { background: var(--primary); border-color: var(--primary); }
.opt b { display: block; font-size: 17px; color: var(--primary); }
.opt small { display: block; font-size: 15px; color: var(--slate); }
.quiz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quiz-nav .right { display: flex; gap: 20px; align-items: center; }
.m-counter { display: none; }

/* ---------- Результаты ---------- */
.results-head { display: flex; flex-direction: column; gap: 10px; }
.results-head p { font-size: 17px; color: var(--slate); max-width: 640px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 16px; color: var(--slate); }
.compare-hint { font-size: 16px; color: var(--slate); margin-top: -8px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards.one { grid-template-columns: 1fr; }
.card { display: flex; flex-direction: column; gap: 18px; padding: 24px; border: var(--line); background: #fff; transition: border-color .2s; }
.card.best { border-color: var(--primary); }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 26px; }
.card-top { display: flex; gap: 16px; }
.card-top img, .lens-img { width: 88px; height: 88px; background: #fff; object-fit: contain; flex: none; }
.card-top h3 { font-size: 19px; }
.card-top p { font-size: 15px; color: var(--slate); margin-top: 4px; }
.card-top .type { display: inline-block; margin-top: 8px; padding: 4px 10px; background: var(--ice); font-size: 15px; font-weight: 600; color: var(--primary); }
.scales { display: flex; flex-direction: column; gap: 8px; }
.scale { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 17px; color: var(--slate); }
.scale .val { display: flex; align-items: center; gap: 10px; }
.scale .val em { font-style: normal; font-size: 15px; color: var(--slate); min-width: 52px; text-align: right; }
.scale .bars { display: flex; gap: 4px; }
.scale .bars i { display: block; width: 22px; height: 7px; background: var(--border); }
.scale .bars i.on { background: var(--primary); }
.scale.sm { font-size: 15px; }
.scale.sm .bars i { width: 16px; height: 5px; }
.scale.sm .tip { width: 22px; height: 22px; font-size: 12px; margin-left: 4px; }
.bullets { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 17px; color: var(--primary); }
.bullets li { display: flex; gap: 8px; }
.bullets li::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); margin-top: 8px; }
.bullets.gray { font-size: 16px; color: var(--slate); }
.bullets.gray li::before { background: var(--border-gray); }
.price { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.price b { font-family: var(--font-heading); font-weight: 400; font-size: 23px; color: var(--primary); }
.price small { font-size: 15px; color: var(--slate); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { cursor: pointer; display: grid; grid-template-columns: 64px minmax(240px, 1fr) 200px 190px auto; align-items: center; gap: 20px; padding: 16px 20px; border: var(--line); background: #fff; transition: border-color .2s; }
.row:hover { border-color: var(--primary); }
.row img { width: 64px; height: 64px; object-fit: contain; }
.row h3 { font-family: var(--font); font-weight: 600; font-size: 18px; }
.row h3 .badge { margin-left: 8px; vertical-align: middle; font-size: 13px; padding: 3px 8px; }
.row .sub { font-size: 15px; color: var(--slate); margin-top: 2px; }
.row .scales { gap: 4px; }
.row .price { margin-top: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
.row .price b { font-size: 19px; }
.row .actions { display: flex; gap: 8px; }
.zero { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--ice); }
.zero h3 { font-size: 19px; }
.zero p { font-size: 17px; color: var(--slate); }
.relax { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 0 18px; border: var(--line); background: #fff; text-align: left; font-size: 17px; font-weight: 500; color: var(--primary); transition: border-color .2s; }
.relax:hover { border-color: var(--primary); }

/* ---------- Лоток и таблица сравнения ---------- */
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; transition: transform .25s, opacity .25s; }
.tray.hide { transform: translateY(100%); opacity: 0; pointer-events: none; }
body.has-tray .page { padding-bottom: 96px; }
.tray-inner { display: flex; align-items: center; gap: 16px; max-width: 1440px; margin: 0 auto; padding: 10px 40px; background: #fff; border-top: var(--line); }
.tray-label { font-size: 16px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.tray-inner ul { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; }
.tray-inner li { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 2px 0 10px; border-radius: 999px; background: var(--ice); font-size: 15px; font-weight: 500; color: var(--primary); }
.tray-inner li button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--slate); font-size: 14px; }
.tray-inner .full { font-size: 15px; color: var(--sale); }
.one-more { font-size: 16px; color: var(--slate); }
.table-wrap { border: var(--line); overflow: clip; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 17px; color: var(--primary); }
th, td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: var(--line); overflow-wrap: anywhere; }
thead th { position: sticky; top: 90px; z-index: 2; border-top: 0; background: var(--ice); }
thead th:first-child, tbody th { width: 230px; }
thead th .lens { display: flex; align-items: center; gap: 12px; }
thead th .lens img { width: 48px; height: 48px; object-fit: contain; flex: none; }
thead th .lens b { font-family: var(--font-heading); font-weight: 400; font-size: 19px; line-height: 1.15; display: block; }
thead th .lens small { font-size: 15px; color: var(--slate); font-weight: 400; }
thead th .lens.conflict b { color: var(--slate); }
tbody th { background: var(--ice); font-weight: 500; font-size: 16px; color: var(--slate); white-space: nowrap; }
.cell-scale { display: flex; align-items: center; gap: 8px; }
.cell-scale span { font-size: 15px; color: var(--slate); }
.cell-scale .bars { display: flex; gap: 3px; }
.cell-scale .bars i { display: block; width: 18px; height: 6px; background: var(--border); }
.cell-scale .bars i.on { background: var(--primary); }
td .p { font-family: var(--font-heading); font-size: 19px; }
td .pn { display: block; font-size: 14px; color: var(--slate); }
td .nw { white-space: nowrap; }
.compare-price-note { display: none; margin-top: 10px; font-size: 13px; color: var(--slate); }

/* ---------- Как мы сузили список ---------- */
.why { display: flex; flex-direction: column; gap: 20px; padding: 32px; background: var(--ice); }
.why h3 { font-size: 24px; }
.why-funnel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 17px; color: var(--slate); }
.why-funnel b { font-family: var(--font-heading); font-weight: 400; font-size: 21px; color: var(--primary); margin-right: 4px; }
.why-funnel .arr { font-style: normal; color: var(--blue); }
.why details { background: #fff; }
.why summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 18px; font-size: 17px; font-weight: 600; color: var(--primary); cursor: pointer; }
.why summary::-webkit-details-marker { display: none; }
.why details ul { display: flex; flex-direction: column; gap: 6px; padding: 0 18px 16px; font-size: 16px; color: var(--slate); }

/* ---------- Запись ---------- */
.booking { display: grid; grid-template-columns: 1fr 520px; gap: 48px; align-items: start; }
.booking-copy { display: flex; flex-direction: column; gap: 20px; }
.booking-copy h2 { font-size: 34px; }
.booking-copy > p { font-size: 17px; color: var(--slate); max-width: 560px; }
.booking-doc { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: var(--line); border-bottom: var(--line); }
.booking-doc .ava { width: 56px; height: 56px; border-radius: 50%; background: var(--ice); flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 600; font-size: 17px; color: var(--primary); }
.booking-doc .ava img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.booking-doc b { display: block; font-weight: 600; color: var(--primary); }
.booking-doc span { font-size: 15px; color: var(--slate); }
.next-steps { display: flex; flex-direction: column; gap: 12px; }
.next-steps li { display: flex; gap: 14px; font-size: 17px; color: var(--primary); line-height: 1.35; }
.next-steps li i { font-style: normal; font-size: 14px; color: var(--slate); letter-spacing: .04em; padding-top: 3px; flex: none; width: 24px; }
.next-steps.horizontal { flex-direction: row; gap: 0; }
.next-steps.horizontal li { flex: 1; flex-direction: column; gap: 8px; padding-right: 24px; margin-right: 24px; border-right: var(--line); }
.next-steps.horizontal li:last-child { border-right: 0; margin-right: 0; }
form.lead { display: flex; flex-direction: column; gap: 22px; padding: 32px; background: var(--ice); }
.selected { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.selected li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #fff; font-size: 16px; font-weight: 500; color: var(--primary); }
.selected img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; background: #fff; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 500; color: var(--slate); }
label.f small { font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-size: 15px; font-weight: 500; color: var(--slate); margin-bottom: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--slate); }
.consent input { margin-top: 2px; accent-color: var(--primary); }
.consent a { color: inherit; }
.hp { display: none; }
.submit-row { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.security { font-size: 15px; color: var(--slate); }

/* ---------- Подтверждение ---------- */
.confirm { display: flex; flex-direction: column; gap: 24px; padding: 40px; background: var(--ice); }
.confirm h2 { font-size: 38px; }
.confirm .lead-text { font-size: 18px; color: var(--primary); }
.confirm-actions { display: flex; gap: 24px; }

/* ---------- Каталог ---------- */
.catalog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.filters { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 24px; align-items: end; }
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 500; color: var(--slate); }
.filters select { appearance: none; -webkit-appearance: none; min-height: 44px; padding: 0 28px 0 0; border: 0; border-bottom: 1px solid var(--border-gray); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23323F4A' stroke-width='1.5'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right center; font: inherit; font-size: 17px; color: var(--primary); }
.filters .check { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; color: var(--primary); font-size: 17px; }
.filters .check input { width: 18px; height: 18px; accent-color: var(--primary); }
.search { padding-right: 32px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236B7683' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat right center; }
.count { font-size: 16px; color: var(--slate); }
.empty { padding: 24px; background: var(--ice); font-size: 17px; color: var(--slate); }

/* ---------- Модалка ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(20,22,22,.55); }
.modal.open { display: flex; }
.modal.soft { background: rgba(20,22,22,.28); }
.modal-box { position: relative; width: min(920px, 100%); max-height: 90vh; overflow-y: auto; padding: 32px; background: #fff; display: flex; flex-direction: column; gap: 28px; }
/* Окно «Сохраните результаты» перед PDF (KOY-4826) и номер подбора */
.modal-box.gate { width: min(520px, 100%); gap: 18px; }
.pdf-gate, .gate-done { display: flex; flex-direction: column; gap: 18px; }
.gate-head h2, .gate-done h2 { margin: 0 0 10px; padding-right: 48px; }
.gate-head p, .gate-done p { margin: 0; color: var(--slate); }
.gate-number { padding: 18px 20px; background: var(--ice); }
.confirm .gate-number { background: #fff; align-self: flex-start; }
.gate-number span { display: block; font-size: 15px; color: var(--slate); }
.gate-number b { display: block; margin-top: 4px; font-size: 34px; font-weight: 400; letter-spacing: .04em; color: var(--primary); }
/* KOY-5682: результаты под окном контактов — видно, что готовы, но не прочитать */
#podbor.locked .stack { filter: blur(4px); pointer-events: none; user-select: none; }
.gate-teaser { display: flex; gap: 10px; align-items: center; padding: 14px 16px; background: var(--ice); font-size: 16px; }
.gate-teaser b { font-size: 26px; font-weight: 400; color: var(--primary); }
.gate-back { align-self: center; }
.gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.modal-close {position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ice); color: var(--primary); font-size: 19px; }
.modal-head { display: flex; gap: 20px; padding-right: 64px; align-items: flex-start; }
.modal-head img { width: 112px; height: 112px; object-fit: contain; flex: none; }
.modal-head h2 { font-size: 28px; }
.modal-head p { font-size: 17px; color: var(--slate); margin-top: 6px; }
.modal-head .btn { margin-top: 14px; }
.details { display: flex; flex-direction: column; gap: 32px; }
.details section { display: flex; flex-direction: column; gap: 16px; }
.details .label { font-size: 20px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.3; color: var(--primary); }
.details section > p:not(.label) { line-height: 1.6; max-width: 72ch; }
.details .bullets { margin-top: 0; gap: 12px; line-height: 1.6; max-width: 72ch; }
.details .scales { max-width: 460px; gap: 12px; }
.details .scale { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 20px; }
.details .scale .val { display: grid; grid-template-columns: 74px 1fr; gap: 12px; }
.details .scale .val em { min-width: 0; text-align: left; }
.details details { background: var(--ice); padding: 12px 16px; }
.details summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 16px; font-weight: 600; color: var(--primary); cursor: pointer; }
.details summary::-webkit-details-marker { display: none; }
.details summary .plus-circle { width: 32px; height: 32px; }
.details details[open] summary .plus-circle { transform: rotate(45deg); }
.details details p { margin-top: 8px; font-size: 17px; white-space: pre-line; color: var(--primary); }
.details dl { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 0 24px; font-size: 17px; margin: 0; }
.details dt { color: var(--slate); padding: 12px 0; border-bottom: var(--line); }
.details dd { margin: 0; color: var(--primary); font-weight: 500; padding: 12px 0; border-bottom: var(--line); }
.details .tech { font-size: 17px; color: var(--primary); }
.modal-actions { position: sticky; bottom: -32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 -32px -32px; padding: 16px 32px 24px; background: #fff; border-top: var(--line); }
.modal-actions .btn { width: 100%; min-width: 0; white-space: normal; padding-left: 16px; padding-right: 16px; }
.lbl-short { display: none; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#toast { position: fixed; left: 50%; bottom: 96px; z-index: 60; transform: translate(-50%, 20px); max-width: calc(100vw - 32px); padding: 12px 18px; background: var(--primary); color: #fff; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Врач, диагностика, FAQ ---------- */
.doctor { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 0; padding: 0; background: var(--ice); overflow: hidden; }
.doctor-photo { background: transparent; display: flex; align-items: flex-end; justify-content: center; padding: 24px 0 0 16px; }
.doctor-photo:has(img) { background: transparent; }
.doctor-photo img { width: 100%; max-width: 410px; height: auto; object-fit: contain; object-position: bottom; display: block; }
.doctor-copy { display: flex; flex-direction: column; align-self: center; gap: 18px; margin: 28px 32px 28px 0; padding: 28px 32px; background: #fff; border: 1px solid var(--border); }
.doctor-copy .name { font-family: var(--font-heading); font-size: 38px; line-height: 1.1; letter-spacing: -.02em; color: var(--primary); }
.doctor-copy .spec { font-size: 17px; color: var(--slate); max-width: 560px; }
.doc-stats { display: flex; padding: 18px 20px; background: var(--ice); }
.doc-stats li { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; padding-right: 16px; margin-right: 16px; border-right: 1px solid rgba(50,63,74,.15); }
.doc-stats li:last-child { border-right: 0; }
.doctor-stat-review { display: flex; flex-direction: column; gap: 4px; color: var(--primary); text-decoration: none; }
.doctor-stat-review:hover { text-decoration: underline; }
.doctor-stat-review:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.doc-stats b { font-family: var(--font-heading); font-weight: 400; font-size: 24px; color: var(--primary); }
.doc-stats span { font-size: 15px; color: var(--slate); }
.doctor-comment { padding: 18px 20px; border-left: 2px solid var(--primary); background: #f6f9fb; }
.doctor-comment-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--slate); }
.doctor-copy blockquote { margin: 0; font-family: var(--font-heading); font-size: 18px; line-height: 1.4; color: var(--primary); }
.doctor-reviews { display: flex; max-width: 100%; }
.doctor-review span:empty, .doctor-reviews-date:empty { display: none; }
.doctor-review { display: flex; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; padding: 0; text-decoration: none; color: var(--primary); min-width: 0; }
.doctor-review b { font-size: 17px; font-weight: 600; }
.doctor-review span { font-size: 15px; }
.doctor-review:hover { text-decoration: underline; }
.doctor-reviews-date { color: var(--slate); font-size: 13px; }
/* Диагностика: шесть самостоятельных иллюстрированных карточек. */
.diag { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.diag li { display: flex; flex-direction: column; background: var(--elements); border: 1px solid var(--border); }
.diag-art { position: relative; background: #f1f6fa; }
.diag-art .step-num { position: absolute; top: 20px; left: 24px; font-size: 15px; color: var(--slate); }
.diag-art img { display: block; width: 100%; height: 190px; object-fit: contain; }
.diag-copy { padding: 24px 28px 30px; }
.diag-copy h3 { font-size: 22px; line-height: 1.25; margin-bottom: 12px; }
.diag-copy p { font-size: 17px; line-height: 1.5; color: var(--slate); }
.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; align-items: start; margin-top: 36px; }
.faq-cta { position: sticky; top: 28px; padding: 30px; background: var(--ice); display: flex; flex-direction: column; gap: 20px; }
.faq-cta-eyebrow { font-size: 15px; color: var(--slate); }
.faq-cta-art { margin: -18px -12px -10px; }
.faq-cta-art img { display: block; width: 100%; height: 160px; object-fit: contain; }
.faq-cta h3 { font-size: 30px; line-height: 1.15; }
.faq-cta p { font-size: 17px; color: var(--primary); }
.faq-cta .btn { width: 100%; padding-left: 18px; padding-right: 18px; font-size: 16px; }
.faq-cta-note { font-size: 15px; color: var(--slate); }
.faq { display: flex; flex-direction: column; }
.faq details { border-bottom: var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 16px 0; font-size: 19px; font-weight: 500; color: var(--primary); cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { padding: 0 60px 20px 0; font-size: 17px; line-height: 1.5; color: var(--primary); }
.disclaimer { font-size: 15px; }
.site-footer { padding: 40px 0; background: var(--primary); color: #fff; font-size: 16px; }
.site-footer .logo { font-family: var(--font-heading); font-size: 32px; }
.sticky-cta { display: none; }

/* ---------- Движение: только появление экрана ---------- */
.quiz-q.enter > *, .options.enter .opt { animation: fadeIn .25s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 1; }

/* ---------- Мобила ---------- */
@media (max-width: 767px) {
  .container { padding: 0 16px; }
  .page { gap: 56px; padding: 32px 16px 110px; } /* боковые 16px: сокращённая запись раньше обнуляла отступ .container — текст лип к краю экрана */
  h1 { font-size: 32px; } h2 { font-size: 26px; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero-visual { min-height: 0; }
  .learn { grid-template-columns: 1fr; gap: 24px; }
  .hero.explain { grid-template-columns: 1fr; padding: 24px 16px; }
  .hero-explain h2 { font-size: 26px; }
  .explain-sum { font-size: 17px; }
  .section-fig { flex-direction: column; align-items: center; }
  .eye-section .t-desk { display: none; }
  .eye-section .t-mob { display: inline; }
  .eye-section .num { r: 16px; }
  .eye-section .num-t { font-size: 19px; }
  .legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 16px; color: var(--primary); }
  .legend li { display: flex; gap: 8px; align-items: baseline; }
  .legend li.key { font-weight: 600; color: #1F3A66; }
  .legend i { font-style: normal; font-weight: 600; color: var(--slate); }
  .lens-photo { flex-direction: row; width: auto; margin: 0; }
  .lens-photo img { width: 56px; }
  .hero-stats { flex-wrap: wrap; gap: 12px 0; }
  .steps, .entries, .cards, .diag, .fields, .filters { grid-template-columns: 1fr; }
  .steps li { padding: 0 0 20px; }
  .steps li + li { padding: 20px 0; border-left: 0; border-top: var(--line); }
  .options.two { grid-template-columns: 1fr; }
  .quiz { grid-template-columns: 1fr; gap: 24px; }
  .quiz-panel { position: static; order: 2; padding: 20px; }
  .stepper { display: none; }
  .panel-stat { padding-top: 0; border-top: 0; }
  .quiz-panel .quiz-counter, .quiz-panel .funnel, .quiz-panel > .eyebrow { display: none; }
  body.has-tray .page { padding-bottom: 150px; }
  .progress { display: flex; margin-bottom: 8px; }
  .m-step { display: block; font-size: 15px; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
  .quiz-q h2 { font-size: 24px; }
  .quiz-nav { position: sticky; bottom: 0; margin: 0 -16px; padding: 12px 16px; background: rgba(255,255,255,.95); border-top: var(--line); backdrop-filter: blur(8px); flex-wrap: wrap; }
  .m-counter { display: block; flex-basis: 100%; font-size: 15px; font-weight: 600; color: var(--primary); }
  .stack { gap: 40px; }
  .row { grid-template-columns: 56px 1fr; }
  .row .scales, .row .price, .row .actions { grid-column: 1 / -1; }
  .row .actions .btn { flex: 1; white-space: normal; }
  .booking, .doctor { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  .doctor-photo { padding: 0; }
  .doctor-copy { margin: 0; padding: 24px; }
  .booking { padding: 0; }
  /* Крупный шрифт: длинные подписи кнопок переносятся, а не распирают экран */
  .booking > * { min-width: 0; }
  form.lead { padding: 20px; }
  .filters label { min-width: 0; }
  .filters select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
  .btn { white-space: normal; text-align: center; }
  .confirm { padding: 24px; }
  .next-steps.horizontal { flex-direction: column; gap: 12px; }
  .next-steps.horizontal li { padding: 0; margin: 0; border: 0; }
  .doc-stats { flex-wrap: wrap; gap: 12px 0; }
  .why { padding: 20px; }
  .tray-inner { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  .tray-inner ul { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tray-inner ul::-webkit-scrollbar { display: none; }
  .tray-inner li { flex: none; }
  .tray-inner > .btn { margin-left: auto; min-height: 40px; }
  /* Правка клиники: на телефоне сравнение — та же таблица в строку (параметр | линзы), а не карточки по вертикали.
     Колонки ужаты так, чтобы три линзы помещались в 390 px без прокрутки вбок. */
  table { font-size: 14px; }
  th, td { padding: 10px 4px; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; } /* не рвать слова без дефиса */
  thead th { position: static; text-align: center; vertical-align: top; padding: 12px 4px; }
  thead th:first-child, tbody th { width: 92px; }
  thead th .lens { flex-direction: column; gap: 6px; }
  thead th .lens img { width: 44px; height: 44px; }
  thead th .lens b { font-family: var(--font); font-size: 14px; font-weight: 600; }
  thead th .lens small { display: block; font-size: 12px; line-height: 1.25; }
  tbody th { padding: 10px 8px; font-size: 13px; line-height: 1.3; white-space: normal; }
  tbody th .tip { width: 20px; height: 20px; margin: 4px 0 0; }
  tbody td { text-align: center; font-size: 13px; line-height: 1.3; }
  .cell-scale { flex-direction: column; gap: 5px; }
  .cell-scale span { font-size: 12px; line-height: 1.25; }
  .cell-scale .bars i { width: 12px; height: 5px; }
  td .p { font-size: 15px; }
  td .pn { font-size: 12px; line-height: 1.3; margin-top: 4px; }
  td .pn-common { display: none; }
  .compare-price-note { display: block; }
  .modal-box { max-height: 100dvh; padding: 20px; }
  .modal-head { flex-direction: column; padding-right: 48px; }
  .modal-head img { width: 72px; height: 72px; }
  .modal-actions { margin: 0 -20px -20px; padding: 10px 20px 12px; bottom: -20px; gap: 8px; }
  /* Правка клиники: две кнопки внизу окна линзы занимали пол-экрана — короткие подписи в одну строку, низкая высота */
  .modal-actions .btn { flex: 1; min-width: 0; min-height: 46px; padding: 0 12px; gap: 8px; font-size: 15px; white-space: nowrap; }
  .modal-actions .btn .plus { display: none; }
  .modal-actions .lbl-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .modal-actions .lbl-short { display: inline; }
  /* Правка: «✓ В сравнении» в карточке переносилось на две строки. Подписи кнопок в одну строку;
     на совсем узком экране кнопки встают друг под другом, а не ломают текст. */
  .card-actions { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); }
  .card-actions .btn, .rows .actions .btn { white-space: nowrap; padding: 0 12px; font-size: 15px; }
  .result-actions .btn { flex: 1; white-space: nowrap; padding: 0 12px; font-size: 15px; }
  .details dl { grid-template-columns: 1fr; gap: 2px; }
  .details dd { margin-bottom: 6px; }
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px; background: #fff; border-top: var(--line); }
  .sticky-cta .btn { width: 100%; }
  .tray:not([hidden]) ~ .sticky-cta { display: none; }
  .tip::after { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; z-index: 60; } /* на телефоне подсказка — плашкой внизу экрана, не вылезает за край */
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 767px) { .faq-layout { grid-template-columns: 1fr; gap: 28px; } .faq-cta { position: static; } .diag { grid-template-columns: 1fr; } }
