/* Новая главная (TASK-005, G1). Подключается только на переработанных страницах — ПОСЛЕ замороженных
   css/style.css и css/mobile.css, которые читают корзина и страницы внутри приложения (OI-05, SITE_MAP §6).
   Поэтому всё здесь — новые классы v2-* или правила внутри main.v2; общие классы сайта не переопределяются.
   Мобильный вид — css/site-v2-mobile.css (та же граница 860 px, что у mobile.css).
   Цифры — Manrope 800 с lining-nums (правило проекта: цифры нигде не Cormorant). */

/* Место под полосой согласия: --v2-consent-h ставит js/site-v2.js, пока полоса видна; --tabbar-full — из mobile.css
   (на компьютере не задан → 0). Так конец страницы и фокус не прячутся под полосой и нижней панелью. */
html { scroll-padding-bottom: calc(var(--tabbar-full, 0px) + var(--v2-consent-h, 0px) + 12px); }
body { padding-bottom: calc(var(--tabbar-full, 0px) + var(--v2-consent-h, 0px)); }
main.v2:focus { outline: none; }

.v2-skip { position: absolute; left: 8px; top: -80px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--gold); color: var(--green-950); font-weight: 700; text-decoration: none; }
.v2-skip:focus { top: 8px; }
.v2 :focus-visible, .v2-consent :focus-visible, .v2-dialog :focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }

.v2-num { font-family: var(--sans); font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.v2-center { text-align: center; margin-top: 22px; }
.v2-small { font-size: .9rem; margin: 16px 0 0; }
.v2-quiet { color: var(--muted); }
.v2-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.v2-more .v2-links { justify-content: center; }

/* B1 — первый экран */
.v2-hero { padding: 64px 0 72px; background: radial-gradient(ellipse at 70% 30%, rgba(27, 86, 64, .55), transparent 60%); }
.v2-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.v2-hero__grid > * { min-width: 0; }
.v2-hero h1 { margin-bottom: .35em; }
.v2-lead { font-size: 1.15rem; color: var(--text); max-width: 38em; margin: 0 0 22px; }
.v2-hero__media img { width: min(330px, 100%); margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.v2-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0 0 22px; }
.v2-offer__jar { display: none; }
.v2-price { margin: 0; font-family: var(--sans); font-weight: 800; font-size: 2.1rem; line-height: 1; color: var(--gold-light); font-variant-numeric: lining-nums; }
.v2-offer__facts { list-style: none; padding: 0; margin: 0; font-size: .92rem; line-height: 1.5; color: var(--muted); }
.v2-offer__facts .v2-num { font-weight: 700; color: var(--text); }
.v2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.v2-bad { margin: 18px 0 0; font: 700 .76rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }

/* B2 — роли групп */
.v2 .section-head p { color: var(--text); }
.v2-amount { font-family: var(--sans); font-weight: 700; color: var(--gold); font-size: .9rem; margin: 0 0 10px; font-variant-numeric: lining-nums; }
.v2-note { max-width: 860px; margin: 28px auto 0; border-left: 3px solid var(--gold); padding: 6px 0 6px 16px; color: var(--muted); }

/* B3 — наука */
.v2-science { align-items: start; }
.v2-questions { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.v2-questions li { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 46px; }
.v2-questions li::before { content: "?"; position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--green-950); font: 800 .8rem/22px var(--sans); text-align: center; }
.v2-ref { font-size: .7em; color: var(--muted); }
.v2-sources { font-size: .82rem; color: var(--muted); padding-left: 1.2em; margin: 18px 0 0; }

/* B4 — состав: правая колонка в стиле FAQ сайта */
.v2-comp { align-items: start; }
/* колонки не растягиваются по ширине таблицы (на 320 px при крупном тексте страница становилась шире экрана);
   сама таблица — прежний общий фрагмент, её разметку не трогаем: при нехватке места она прокручивается внутри */
.v2-comp > *, .v2-science > * { min-width: 0; }
.v2 .comp { display: block; max-width: 100%; overflow-x: auto; }
/* «гидроксипропилметилцеллюлоза» длиннее строки на 320 px при крупном тексте — переносим только такие слова */
.v2 .full-comp, .v2 .comp-notes { overflow-wrap: break-word; hyphens: auto; }
.v2-faq { max-width: none; margin: 0; }

/* B5 — как купить */
.v2-buy { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: center; border: 1px solid var(--gold); border-radius: 22px; padding: 34px; background: linear-gradient(160deg, var(--green-800), var(--green-950)); }
.v2-buy > * { min-width: 0; }
.v2-buy__jar { width: 180px; margin: 0 auto; }
.v2-buy h2 { margin-bottom: .5em; }
.v2-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.v2-steps li { counter-increment: s; position: relative; padding-top: 36px; font-size: .95rem; }
.v2-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-light); font: 800 .85rem/28px var(--sans); text-align: center; }
.v2-facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: .9rem; color: var(--muted); }
.v2-facts li::before { content: "◆ "; color: var(--gold); font-size: .7rem; }

/* B7 — сначала разобраться */
.v2-more { text-align: center; }
.v2-more__group { margin-top: 28px; }
.v2-more__group > p:first-child { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }

/* Полоса согласия на cookie — немодальная: без затемнения и блокировки прокрутки */
.v2-consent { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-full, 0px) + 10px); width: min(980px, 100% - 20px); display: flex; align-items: center; gap: 10px 18px; padding: 10px 14px; background: var(--green-950); border: 1px solid var(--gold); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: .84rem; line-height: 1.45; color: var(--muted); }
.v2-consent[hidden] { display: none; }
.v2-consent__text { margin: 0; flex: 1; }
.v2-consent__text b { color: var(--text); }
.v2-consent__text a, .v2-consent__text .link-btn { color: var(--gold-light); }
.v2-consent__text .link-btn { font-weight: 700; padding: 6px 2px; }
.v2-consent__btns { display: flex; gap: 8px; flex-shrink: 0; }
.v2-consent .btn { min-height: 44px; }

/* Настройки cookie — настоящий модальный диалог */
.v2-veil { position: fixed; inset: 0; z-index: 90; background: rgba(3, 14, 10, .62); backdrop-filter: blur(2px); }
.v2-veil[hidden], .v2-dialog[hidden] { display: none; }
html.v2-locked, html.v2-locked body { overflow: hidden; }
.v2-dialog { position: fixed; z-index: 95; left: 50%; bottom: 0; transform: translateX(-50%); width: min(600px, 100%); max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; padding: 26px 26px calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--green-950); border: 1px solid var(--gold); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .55); font-size: .92rem; line-height: 1.55; color: var(--muted); }
.v2-dialog:focus { outline: none; }
.v2-dialog p { margin: 0 0 14px; }
.v2-dialog a { color: var(--gold-light); }
.v2-dialog__title { font: 800 1.2rem/1.3 var(--sans) !important; color: var(--text); margin-right: 48px !important; }
.v2-dialog__close { position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--text); font-size: 1rem; cursor: pointer; }
.v2-dialog .v2-dialog__close:focus-visible { border-radius: 50%; }
.v2-dialog input { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--gold); }
.v2-dialog__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v2-dialog__btns .btn { width: 100%; min-height: 48px; }
.v2-dialog__save { display: block; margin: 12px auto 0; min-height: 44px; font-weight: 700; }
.v2-dialog__state { margin-top: 10px !important; font-size: .85rem; text-align: center; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
