/* ============ Fonts: Onest, локально (SIL OFL 1.1, fonts/OFL.txt). Без запросов к Google ============ */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/onest-symbols.woff2') format('woff2'); unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AE, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F8D0-1F8D8, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FAC6, U+1FAC8, U+1FACC-1FADD, U+1FADF-1FAEB, U+1FAEF-1FAFA, U+1FB00-1FBFF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/onest-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/onest-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ============ Tokens ============ */
:root {
  --paper: #f5f2eb;
  --paper-2: #ebe6da;
  --card: #fbfaf6;
  --ink: #16201c;
  --text: #36403c;
  --muted: #5a6460;
  --line: #d8d1c2;
  --route: #1d4a3c;        /* тёмно-зелёный «маршрут» */
  --route-2: #163a2f;
  --route-ink: #eaf1ec;
  --route-muted: #d0e2d7;
  --accent: #c43d10;       /* единственный акцент: только кликабельное */
  --accent-hover: #a8330c;
  --accent-soft: #f6dccf;
  --ok: #1f7a4d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 28, .06), 0 8px 24px -12px rgba(22, 32, 28, .18);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --gutter: 20px;
  --header-h: 69px;        /* высота шапки вместе с её нижней границей 1px */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--ink); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 88px 0; }
.section--alt { background: var(--paper-2); }
.lead { font-size: 1.125rem; color: var(--text); max-width: 62ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--route);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 44px; }
.note { font-size: .9375rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* ============ Placeholders ============ */
.ph {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .82em; font-weight: 600;
  color: #7a4a00; background: #fff3d1;
  border: 1px dashed #c99a2e; border-radius: 4px; padding: 0 4px;
}

/* ============ Buttons ============ */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 24px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1.0625rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(22, 32, 28, .2), 0 6px 14px -8px rgba(22, 32, 28, .45); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }
.btn--primary[aria-busy="true"] { opacity: .75; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--sm { --h: 44px; padding: 0 18px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--ink); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.link:hover { color: var(--accent); }

/* ============ Header ============ */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 242, 235, .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__in { display: flex; align-items: center; gap: 24px; height: calc(var(--header-h) - 1px); }
/* Переход по якорю: верхняя граница секции встаёт ровно под нижнюю границу шапки */
section[id] { scroll-margin-top: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 600; letter-spacing: -0.02em; font-size: 1.0625rem; }
.logo__mark { width: 28px; height: 28px; flex: none; color: var(--route); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: .9375rem; font-weight: 550; color: var(--text); }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.header .btn { margin-left: 8px; }
@media (max-width: 860px) {
  .nav { display: none; }
  .header .btn { margin-left: auto; }
  :root { --header-h: 61px; }
}

/* ============ Hero ============ */
.hero { padding: 56px 0 80px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero__copy { display: grid; gap: 22px; }
.hero__sub { font-size: 1.1875rem; max-width: 56ch; }
.covers { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.covers li {
  font-size: .875rem; font-weight: 600; color: var(--route);
  background: rgba(29, 74, 60, .08); border-radius: 999px; padding: 6px 12px;
}
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 4px; }
.micro { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0; list-style: none; font-size: .9375rem; color: var(--muted); }
.micro li { display: inline-flex; align-items: center; gap: 6px; }
.micro svg { width: 16px; height: 16px; color: var(--ok); flex: none; }
.indep {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .9375rem; color: var(--muted);
  border-left: 3px solid var(--line); padding: 2px 0 2px 12px; max-width: 54ch;
}

/* Book mock (типографская заглушка, если нет реальной обложки) */
.book-stage { position: relative; display: grid; place-items: center; padding: 20px 0; }
.book-stage__tag {
  position: absolute; top: 0; right: 0; z-index: 3;
}
.book {
  position: relative; width: min(330px, 78vw); aspect-ratio: 3 / 4.1;
  container-type: inline-size; isolation: isolate;
  border-radius: 4px 12px 12px 4px; overflow: hidden;
  background: #1d4a3c;
  color: #eaf1ec;
  box-shadow: -2px 0 0 #0c2019 inset, 0 30px 60px -24px rgba(22, 32, 28, .55), 0 12px 20px -12px rgba(22, 32, 28, .35);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-2.5deg);
}
.book::before { /* корешок */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4.5%; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .32), rgba(0, 0, 0, .06) 60%, rgba(255, 255, 255, .08));
}
/* Обложка книги: размеры от ширины обложки (cqw), одинаково на десктопе и телефоне */
.book__in { position: absolute; inset: 0; padding: 11cqw 9cqw 9cqw 12cqw; display: flex; flex-direction: column; }
.book__kicker { font-size: 3.2cqw; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #9fd3b8; }
.book__title { margin-top: 5cqw; font-size: 10.4cqw; font-weight: 800; line-height: 1.03; letter-spacing: -0.025em; color: #fff; }
.book__sub { margin-top: 3cqw; font-size: 4.4cqw; font-weight: 500; line-height: 1.3; color: #c9ddd1; }
.book__route { margin-top: auto; width: 100%; height: auto; overflow: visible; }
.book__badge {
  position: absolute; right: 6cqw; top: 6cqw;
  font-size: 3.4cqw; font-weight: 700; letter-spacing: .1em; line-height: 1;
  border: .5cqw solid #9fd3b8; color: #9fd3b8; border-radius: 1.8cqw; padding: 1.6cqw 2.2cqw;
}
.book-img { width: min(340px, 80vw); border-radius: 8px; box-shadow: 0 30px 60px -24px rgba(22, 32, 28, .55);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }

/* Интерактивная обложка: наклон за курсором + короткая вибрация при наведении (только мышь) */
.book, .book-img { transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; will-change: transform; }
.book-stage.is-live .book, .book-stage.is-live .book-img { transition: transform .12s ease-out, box-shadow .3s; }
.book-stage.is-live .book { box-shadow: -2px 0 0 #0c2019 inset, 0 40px 70px -24px rgba(22, 32, 28, .6), 0 16px 24px -12px rgba(22, 32, 28, .35); }
.book-stage.is-buzz .book, .book-stage.is-buzz .book-img { animation: book-buzz .42s linear; }
@keyframes book-buzz {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  12% { translate: -2px 1px; rotate: -.8deg; }
  25% { translate: 2px -1px; rotate: .8deg; }
  37% { translate: -2px 0; rotate: -.6deg; }
  50% { translate: 2px 1px; rotate: .6deg; }
  62% { translate: -1px -1px; rotate: -.4deg; }
  75% { translate: 1px 0; rotate: .3deg; }
  87% { translate: -1px 0; rotate: -.15deg; }
}
@media (prefers-reduced-motion: reduce) {
  .book-stage.is-buzz .book, .book-stage.is-buzz .book-img { animation: none; }
  .book, .book-img { transition: none; }
}

.price-chip {
  position: absolute; left: 2%; top: 56%; z-index: 2; /* слева, над маршрутом обложки */
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 16px; display: grid; gap: 2px;
}
.price-chip strong { font-size: 1.75rem; line-height: 1; color: var(--ink); font-weight: 800; }
.price-chip span { font-size: .8125rem; color: var(--muted); }

@media (max-width: 860px) {
  .hero { padding: 28px 0 56px; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__sub { font-size: 1.0625rem; }
  .cta-row .btn--primary { width: 100%; }
  .book { width: min(250px, 66vw); }
  .price-chip { left: max(0px, calc(50% - 165px)); padding: 8px 12px; }
  .price-chip strong { font-size: 1.375rem; }
}

/* ============ Problem ============ */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: c; }
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: grid; gap: 12px; align-content: start;
}
.pcard__icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(29, 74, 60, .09); color: var(--route); display: grid; place-items: center; }
.pcard__icon svg { width: 22px; height: 22px; }
.pcard p { font-size: 1rem; }
.problem-foot { margin-top: 32px; font-size: 1.125rem; color: var(--ink); font-weight: 600; max-width: 60ch; }
@media (max-width: 860px) { .cards3 { grid-template-columns: 1fr; } }

/* ============ Route ============ */
.route-sec { background: var(--route); color: var(--route-ink); }
.route-sec h2, .route-sec h3 { color: #fff; }
.route-sec .eyebrow { color: #9fd3b8; }
.route-sec .lead { color: var(--route-muted); }

.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pgroup { margin: 0; padding: 20px; border: 1.5px solid rgba(234, 241, 236, .18); border-radius: var(--radius); min-width: 0; }
.pgroup--wide { grid-column: 1 / -1; }
.pgroup__title { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-weight: 700; color: #fff; font-size: 1.0625rem; }
.pgroup__n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #fff; color: var(--route); display: grid; place-items: center; font-size: .875rem; font-weight: 800; }
.pgroup__hint { font-weight: 500; color: var(--route-muted); font-size: .9375rem; }
.opts { display: grid; gap: 8px; margin-top: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; cursor: pointer;
  background: var(--route-2); border: 1.5px solid rgba(234, 241, 236, .18); border-radius: var(--radius-sm);
  font-size: .9375rem; font-weight: 550; line-height: 1.35; transition: border-color .15s, background-color .15s;
}
.opt:hover { border-color: rgba(234, 241, 236, .5); }
.opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #9fd3b8; }
.opt:has(input:checked) { border-color: #9fd3b8; background: #24594a; }
.opt:has(input:focus-visible) { outline: 3px solid #f6b89f; outline-offset: 2px; }

.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.chip {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px;
  padding: 10px 14px; text-align: left;
  background: var(--route-2); color: var(--route-ink);
  border: 1.5px solid rgba(234, 241, 236, .18); border-radius: var(--radius-sm);
  font: inherit; font-size: .9375rem; font-weight: 550; line-height: 1.35; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.chip:hover { border-color: rgba(234, 241, 236, .5); }
.chip:focus-visible { outline: 3px solid #f6b89f; outline-offset: 2px; }
.chip__box {
  width: 20px; height: 20px; flex: none; border-radius: 5px; border: 2px solid rgba(234, 241, 236, .55);
  display: grid; place-items: center; transition: background-color .15s, border-color .15s;
}
.chip__box svg { width: 13px; height: 13px; opacity: 0; color: var(--route); }
.chip[aria-pressed="true"] { border-color: #9fd3b8; background: #24594a; }
.chip[aria-pressed="true"] .chip__box { background: #9fd3b8; border-color: #9fd3b8; }
.chip[aria-pressed="true"] .chip__box svg { opacity: 1; }

.plan { margin-top: 40px; display: grid; gap: 20px; }
.plan__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; }
.plan__count { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -0.015em; }
.plan__hint { color: var(--route-muted); font-size: .9375rem; flex-basis: 100%; }
.plan__reset {
  margin-left: auto; min-height: 44px; padding: 0 4px; background: none; border: 0; cursor: pointer;
  color: #fff; font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 4px;
}
.plan__note { font-size: .875rem; color: var(--route-muted); max-width: 72ch; }

.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl__group { position: relative; padding: 0 0 26px 34px; }
.tl__group::before { /* точка этапа */
  content: ""; position: absolute; left: 4px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px var(--route);
}
.tl__group::after { /* линия маршрута */
  content: ""; position: absolute; left: 10px; top: 26px; bottom: 0; width: 2px;
  background: repeating-linear-gradient(180deg, rgba(234, 241, 236, .45) 0 6px, transparent 6px 12px);
}
.tl__group:last-child::after { display: none; }
.tl__group--alert::before { background: #f6b89f; }
.tl__label { font-size: .8125rem !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9fd3b8 !important; margin-bottom: 12px; }
.tl__group--alert .tl__label { color: #f6b89f !important; }
.tl__items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tl__item { background: var(--route-2); border-radius: var(--radius-sm); padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.tl__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tl__top strong { color: #fff; font-size: 1rem; line-height: 1.35; }
.tl__tag {
  flex: none; font-size: .75rem; font-weight: 800; white-space: nowrap;
  background: #f4f1ea; color: var(--route-2); border-radius: 999px; padding: 3px 9px;
}
.tl__group--alert .tl__tag { background: #f6b89f; color: #3d1606; }
.tl__item p { font-size: .9375rem; color: var(--route-muted); line-height: 1.5; }

.route-result {
  padding: 22px; border-radius: var(--radius);
  background: var(--paper); color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
}
.route-result p { color: var(--text); flex: 1 1 320px; }
.route-result strong { color: var(--ink); }

@media (max-width: 860px) {
  .picker { grid-template-columns: 1fr; }
  .chips { grid-template-columns: 1fr; }
  .tl__items { grid-template-columns: 1fr; }
  .pgroup { padding: 16px; }
  .route-result .btn { width: 100%; }
}
@media (min-width: 861px) and (max-width: 1060px) { .chips { grid-template-columns: repeat(2, 1fr); } }

/* ============ Scenarios (para quién) ============ */
.scen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.scen__item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.scen__item p { font-size: .9688rem; line-height: 1.55; }
.who-title { margin: 40px 0 14px; font-size: 1.125rem; }
.who-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.who-tags li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: .9375rem; font-weight: 600; color: var(--ink); }
@media (max-width: 1000px) { .scen { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .scen { grid-template-columns: 1fr; } }
.fork--wide { grid-column: 1 / -1; }

/* ============ Inside ============ */
.toc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); counter-increment: toc; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 800; color: var(--route); font-size: .9375rem; padding-top: 2px; font-variant-numeric: tabular-nums;
}
.toc p { font-size: 1rem; margin-top: 4px; }
@media (max-width: 760px) { .toc { grid-template-columns: 1fr; } }

/* ============ For whom ============ */
.who { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.who__item {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.who__item p { font-size: 1rem; margin-top: 6px; }
.who-notes { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-sm); font-size: .9375rem; }
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.callout--info { background: rgba(29, 74, 60, .08); color: var(--route-2); }
.callout--warn { background: #f3e7d6; color: #5b3a12; }
@media (max-width: 760px) { .who, .who-notes { grid-template-columns: 1fr; } }

/* ============ Forks / trust ============ */
.forks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fork { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; align-content: start; }
.fork__org { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fork__pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.fork__side { background: var(--paper); border-radius: var(--radius-sm); padding: 14px; display: grid; gap: 6px; align-content: start; }
.fork__side h3 { font-size: 1rem; }
.fork__side p { font-size: .9375rem; line-height: 1.5; }
.fork__vs { align-self: center; font-weight: 800; color: var(--route); font-size: .875rem; }
.trust { margin-top: 36px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 32px; list-style: none; padding: 0; }
.trust li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; }
.trust svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: 3px; }
@media (max-width: 860px) {
  .forks, .trust { grid-template-columns: 1fr; }
  .fork__pair { grid-template-columns: 1fr; }
  .fork__vs { justify-self: center; }
}

/* ============ Offer ============ */
.offer { display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: center; }
.specs { list-style: none; margin: 24px 0 0; padding: 0; display: grid; }
.specs li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.specs li span:first-child { color: var(--muted); }
.specs li span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.buy {
  background: var(--card); border-radius: 20px; padding: 32px;
  box-shadow: 0 1px 2px rgba(22, 32, 28, .06), 0 24px 48px -24px rgba(22, 32, 28, .35);
  border: 1px solid var(--line); display: grid; gap: 20px;
}
.buy__label { font-weight: 700; color: var(--ink); font-size: 1.0625rem; }
.buy__price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.buy__price strong { font-size: 3.5rem; line-height: 1; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.buy__price span { color: var(--muted); font-size: .9375rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 1rem; line-height: 1.45; }
.checks svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: 1px; }
.buy__safe { display: grid; gap: 6px; font-size: .875rem; color: var(--muted); }
.buy__safe div { display: flex; gap: 8px; align-items: center; }
.buy__safe svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 900px) { .offer { grid-template-columns: 1fr; gap: 36px; } .buy { padding: 24px; } }

/* ============ FAQ ============ */
.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; min-height: 56px; font-weight: 700; color: var(--ink); font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none; margin-right: 6px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details > div { padding: 0 0 22px; max-width: 66ch; }

/* ============ Final ============ */
.final { background: var(--ink); color: #e8ece9; text-align: center; }
.final h2 { color: #fff; max-width: 18ch; margin: 0 auto; }
.final p { color: #b9c2be; margin: 16px auto 28px; max-width: 52ch; }
.final .micro { justify-content: center; color: #b9c2be; margin-top: 18px; }
.final .micro svg { color: #7fcca4; }

/* ============ Footer ============ */
.footer { padding: 44px 0 120px; font-size: .9375rem; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; padding: 0; margin: 0; justify-content: flex-end; }
.footer__links a { color: var(--text); display: inline-flex; align-items: center; min-height: 44px; }
.footer p + p { margin-top: 8px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } .footer__links { justify-content: flex-start; } }

/* ============ Sticky mobile CTA ============ */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -18px rgba(22, 32, 28, .45);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 14px;
  transform: translateY(110%); transition: transform .25s ease;
}
.sticky.is-visible { transform: translateY(0); }
.sticky__info { display: grid; line-height: 1.25; }
.sticky__info strong { color: var(--ink); font-size: 1.0625rem; }
.sticky__info span { font-size: .8125rem; color: var(--muted); }
.sticky .btn { margin-left: auto; }
@media (max-width: 860px) { .sticky { display: flex; } }

/* ============ Dialog (оплата не настроена) ============ */
dialog { border: 0; border-radius: 18px; padding: 28px; max-width: 440px; width: calc(100% - 32px); color: var(--text); background: var(--card); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(22, 32, 28, .55); }
dialog h2 { font-size: 1.375rem; margin-bottom: 10px; }
dialog p + p { margin-top: 10px; }
dialog .btn { margin-top: 20px; }

/* ============ Dev banner ============ */
.devbar {
  position: fixed; right: 12px; bottom: 12px; z-index: 60; max-width: 340px;
  background: #fff3d1; color: #5b3a00; border: 1px dashed #c99a2e; border-radius: 12px;
  font: 600 12px/1.45 ui-monospace, Consolas, monospace; box-shadow: var(--shadow);
}
.devbar summary { cursor: pointer; padding: 8px 12px; }
.devbar ul { margin: 0; padding: 0 12px 10px 28px; max-height: 40vh; overflow: auto; font-weight: 500; }
@media (max-width: 860px) { .devbar { bottom: 84px; } }

/* ============ Simple pages (gracias / cancelado / legal) ============ */
.page { padding: 64px 0 96px; }
.page__card { max-width: 680px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 40px; display: grid; gap: 18px; }
.page__card ol, .page__card ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9375rem; }
.status svg { width: 20px; height: 20px; }
.status--info { color: var(--route); }
.status--warn { color: #8a4b00; }
.legal { max-width: 760px; }
.legal h2 { font-size: 1.375rem; margin: 32px 0 10px; }
.legal p + p { margin-top: 10px; }
@media (max-width: 600px) { .page__card { padding: 24px; } }

/* ============ Мобильная адаптация ============ */
/* Касание: без серой вспышки iOS, без задержки двойного тапа, нажатие видно сразу */
a, button, summary, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn:active { transform: scale(.98); }
@media (hover: none) {
  /* hover на тач-экране «залипает» после тапа — отключаем подъём и сдвиг стрелки */
  .btn--primary:hover { transform: none; background: var(--accent); }
  .btn--primary:active { background: var(--accent-hover); transform: scale(.98); }
  .btn--ghost:hover { background: transparent; color: var(--ink); }
  .btn--ghost:active { background: var(--ink); color: var(--paper); }
  .btn:hover .arrow { transform: none; }
  .opt:hover, .chip:hover { border-color: rgba(234, 241, 236, .18); }
}
.toc-more { margin-top: 20px; }

@media (max-width: 860px) {
  /* Hero: кнопка покупки сразу после подзаголовка, список организмов — после гарантий */
  .hero__copy { gap: 18px; }
  .hero__copy .cta-row { order: 1; }
  .hero__copy .micro { order: 2; margin-top: -4px; }
  .hero__copy .covers { order: 3; }
  .hero__copy .indep { order: 4; }
  .cta-row { gap: 4px 24px; }
  .header .btn { padding: 0 14px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .hero { padding: 20px 0 48px; }
  .hero__sub { font-size: 1rem; }
  .covers li { font-size: .8125rem; padding: 5px 10px; }
  .toc li { padding: 16px 0; grid-template-columns: 32px 1fr; gap: 10px; }
  .toc.is-collapsed li:nth-child(n+7) { display: none; }
  .scen__item, .who__item { padding: 18px; }
  .fork { padding: 18px; }
  .buy__price strong { font-size: 3rem; }
  .faq summary { padding: 16px 0; font-size: 1rem; }
  .final h2 { font-size: 1.75rem; }
  .footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* Горизонтальный телефон: низкий экран, шапка и нижний бар не должны съедать контент */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: 16px; }
  .book { width: min(220px, 40vw); }
  .sticky { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
}

/* Очень узкие телефоны (320–374px): шапка в одну строку, заголовок не выдавливает CTA */
.header .btn, .btn { white-space: nowrap; }
.buy__safe a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 374px) {
  .logo { font-size: .9375rem; gap: 6px; }
  .logo__mark { width: 24px; height: 24px; }
  .header__in { gap: 12px; }
  .header .btn { padding: 0 12px; font-size: .875rem; }
  h1 { font-size: 1.75rem; }
  .hero__sub { font-size: .9375rem; }
}
.offer > *, .hero__grid > * { min-width: 0; }
.btn--block { white-space: normal; text-align: center; }
@media (max-width: 374px) { .buy { padding: 20px 16px; } }
@media (max-height: 500px) and (orientation: landscape) {
  h1 { font-size: 1.75rem; }
  .hero__sub { font-size: .9375rem; }
  .hero__copy { gap: 14px; }
}
/* Планшет 861–1000px: пункты меню и логотип не переносятся на вторую строку */
.logo, .nav a { white-space: nowrap; }
@media (min-width: 861px) and (max-width: 1000px) { .nav a { padding: 10px 8px; } .header__in { gap: 16px; } }

/* Reduced motion: убираем перемещение, оставляем смену цвета и прозрачности —
   кнопки, FAQ и нижняя панель по-прежнему показывают, что состояние сменилось */
@media (prefers-reduced-motion: reduce) {
  .btn--primary:hover, .btn--primary:active, .btn:active { transform: none; }
  .btn:hover .arrow { transform: none; }
  .faq summary::after { transition: none; }
  .sticky { transform: none; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
  .sticky.is-visible { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
}

/* Ссылка на карту гида под оглавлением */
.toc-map { margin-top: 20px; }

/* Подвал: не больше ~8 слов в строке */
.footer__grid > p, .footer__grid > div > p { max-width: 36ch; }

/* ============ Tabla de plazos (SEO) ============ */
.ptable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.ptable { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ptable th, .ptable td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable thead th { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
.ptable tbody th { font-weight: 650; color: var(--ink); width: 40%; }
.ptable tbody td:nth-child(2) { font-weight: 700; color: var(--route); white-space: normal; }
.ptable tbody tr:last-child th, .ptable tbody tr:last-child td { border-bottom: 0; }
.ptable-note { margin-top: 14px; }
@media (max-width: 640px) {
  .ptable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ptable, .ptable tbody, .ptable tr, .ptable th, .ptable td { display: block; width: 100%; }
  .ptable tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .ptable tbody tr:last-child { border-bottom: 0; }
  .ptable th, .ptable td { padding: 0; border: 0; }
  .ptable tbody th { width: 100%; }
  .ptable tbody td:nth-child(2) { margin-top: 4px; }
  .ptable tbody td:nth-child(3) { color: var(--muted); font-size: .9375rem; }
}
