/* Одна колонка под телефон (люди приходят из Instagram), карточка-шаг по центру;
   шкалы Fonseca и боли 0–10 как главный визуальный приём. */
:root {
  --bg: #eef3f2;
  --surface: #ffffff;
  --ink: #12201e;
  --muted: #566764;
  --line: #d3dedb;
  --accent: #0d6a62;
  --accent-ink: #ffffff;
  --accent-soft: #d9eeea;
  --warn: #a1560b;
  --warn-soft: #fbecd9;
  --danger: #b0261b;
  --danger-soft: #fbe3e0;
  --ok: #2c7a3f;
  --pain-0: #3c9a5f;
  --pain-5: #d69a1c;
  --pain-10: #c4362a;
  --shadow: 0 1px 2px rgb(18 32 30 / 6%), 0 8px 24px rgb(18 32 30 / 6%);

  --font-display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1615; --surface: #142120; --ink: #e4eeec; --muted: #93a6a2; --line: #253634;
    --accent: #52c2b4; --accent-ink: #052220; --accent-soft: #173431;
    --warn: #f0b062; --warn-soft: #3a2a14; --danger: #ff8a7d; --danger-soft: #3d1c19; --ok: #6fd08a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1615; --surface: #142120; --ink: #e4eeec; --muted: #93a6a2; --line: #253634;
  --accent: #52c2b4; --accent-ink: #052220; --accent-soft: #173431;
  --warn: #f0b062; --warn-soft: #3a2a14; --danger: #ff8a7d; --danger-soft: #3d1c19; --ok: #6fd08a;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--font-body);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding-block: 20px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
@media (max-width: 480px) { .card { padding: 20px 16px; } h1 { font-size: 1.625rem; } }

.btn {
  appearance: none; border: 0; cursor: pointer; font: 600 var(--step-0)/1.2 var(--font-body);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 22px; border-radius: 12px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 8px 0; text-decoration: underline; }

/* Прогресс теста */
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s ease; }
.step-meta { display: flex; justify-content: space-between; font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }

/* Варианты ответа */
.options { display: grid; gap: 10px; }
.options-3 { grid-template-columns: repeat(3, 1fr); }
.opt {
  appearance: none; cursor: pointer; text-align: left; width: 100%;
  font: 500 var(--step-0)/1.35 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 15px 16px; min-height: 54px;
}
.options-3 .opt { text-align: center; }
.opt:hover { border-color: var(--accent); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

/* Шкала боли 0–10 */
.pain { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.pain button {
  appearance: none; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 var(--step-0)/1 var(--font-body); font-variant-numeric: tabular-nums; border-radius: 8px; padding: 12px 0; min-width: 0;
}
.pain button[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--c); }
.pain-legend { display: flex; justify-content: space-between; font-size: var(--step--1); color: var(--muted); }
.pain-bar { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--pain-0), var(--pain-5), var(--pain-10)); }
@media (max-width: 380px) { .pain button { font-size: var(--step--1); padding: 10px 0; } }

/* Поля */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: var(--step--1); }
.input {
  font: 400 1.0625rem/1.3 var(--font-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 14px; width: 100%; min-height: 52px;
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { min-height: 96px; resize: vertical; }
.error { color: var(--danger); font-size: var(--step--1); }

/* Шкала Fonseca в результате */
.gauge { display: flex; flex-direction: column; gap: 8px; }
.gauge-track { position: relative; display: grid; grid-template-columns: 20fr 25fr 25fr 30fr; gap: 3px; height: 12px; }
.gauge-track span { border-radius: 3px; background: var(--line); }
.gauge-track span.on { background: var(--c); }
.gauge-pin { position: absolute; top: -6px; width: 4px; height: 24px; border-radius: 2px; background: var(--ink); transform: translateX(-50%); }
.gauge-labels { display: grid; grid-template-columns: 20fr 25fr 25fr 30fr; gap: 3px; font-size: 0.6875rem; color: var(--muted); line-height: 1.2; }
.score { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; font-variant-numeric: tabular-nums; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.alert { border-radius: var(--radius); padding: 18px; border: 1.5px solid var(--danger); background: var(--danger-soft); }
.alert h3 { color: var(--danger); }
.alert ul { margin: 8px 0 0; padding-left: 20px; }

/* Оффер на разбор */
.offer { border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 20px; }
.offer .price { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.offer ul { margin: 0; padding-left: 20px; }

/* Уроки */
.lesson { padding: 0; overflow: hidden; }
.lesson > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; }
.lesson > summary::-webkit-details-marker { display: none; }
.lesson-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }
.lesson.done .lesson-num { background: var(--accent); color: var(--accent-ink); }
.lesson-body { padding: 0 20px 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lesson-body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.chev { color: var(--muted); transition: transform .15s ease; }
.lesson[open] .chev { transform: rotate(180deg); }
.video { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0b1413; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #cfe0dc; padding: 16px; font-size: var(--step--1); }
.meter { font-variant-numeric: tabular-nums; }

.footer { margin-top: 32px; font-size: var(--step--1); color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.demo-note { font-size: var(--step--1); background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Логотип */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo > span { display: flex; flex-direction: column; line-height: 1.05; }
.logo b { font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.02em; text-transform: uppercase; }
.logo i { font-style: normal; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }

/* Блоки лендинга */
.section { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.section > h2 { font-size: var(--step-1); }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: how; }
.how li { counter-increment: how; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; }
.how li::before { content: counter(how); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.how li:not(:last-child) { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.doctor { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
.doctor img, .doctor-ph { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.doctor-ph { display: grid; place-items: center; background: var(--accent-soft); color: var(--muted); font-size: var(--step--1); }
.facts { margin: 4px 0 0; padding-left: 18px; font-size: var(--step--1); display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 420px) { .doctor { grid-template-columns: minmax(0, 1fr); } }
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.review { margin: 0; display: flex; flex-direction: column; gap: 10px; position: relative; box-shadow: none; }
.review blockquote { margin: 0; font-size: var(--step-0); }
.review-meta { color: var(--accent); font-weight: 600; }
.review.is-ph { border-style: dashed; background: transparent; }
.ph-tag { align-self: flex-start; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 3px 8px; border-radius: 6px; }
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin-top: 8px; }
.cta-end { margin-top: 40px; }
