/* ==========================================================================
   Вёрстка сайта (одна на все 4 темы). Цвета/шрифты/радиусы — только через
   переменные из themes.css. Mobile-first: базовые стили — телефон,
   @media (min-width: 768px) — планшет и шире. Демонстрация — /_kit.html.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  color: var(--text);
  font: 400 16px/1.55 var(--font-body);
  padding-bottom: 64px; /* место под липкую мобильную панель */
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  text-transform: var(--head-case);
  letter-spacing: var(--head-spacing);
  line-height: 1.15;
  margin: 0 0 calc(var(--space) * .75);
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.85rem, 6.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 4.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 var(--space); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---- Иконки ------------------------------------------------------------ */
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon--lg { width: 40px; height: 40px; }

/* ---- Кнопки ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em;
  border: 2px solid transparent; border-radius: var(--radius);
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; text-align: center;
  cursor: pointer; transition: filter .15s, background-color .15s, color .15s;
}
.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--secondary { background: transparent; color: var(--text); border-color: currentColor; }
.btn--secondary:hover { background: var(--text); color: var(--bg); }
.btn--sm { min-height: 40px; padding: .45em 1em; font-size: .925rem; }
.btn--block { display: flex; width: 100%; }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions > .btn { flex: 1 1 100%; } /* телефон: кнопки во всю ширину, одного размера; сетки 2×2 (grid) не затрагивает */

/* ---- Заглушка неизвестного факта -------------------------------------- */
.ph { display: inline-block; padding: 0 .35em; border: 1.5px dashed var(--accent-ink); border-radius: 2px; color: var(--accent-ink); font-weight: 600; }

/* ---- Шапка ------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.header__in { display: flex; align-items: center; gap: 8px; height: 60px; }
.logo {
  font: var(--head-weight) .8rem/1.1 var(--font-head); text-transform: var(--head-case);
  color: var(--text); text-decoration: none; max-width: 8em; min-width: 0; flex: 0 1 auto;
}
.logo::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .35em; background: var(--accent); border-radius: 1px; vertical-align: .05em; }
.svc { display: flex; margin-left: auto; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; flex: none; }
.svc__link { padding: .55em .55em; font-size: .8rem; font-weight: 600; color: var(--text); text-decoration: none; line-height: 1.2; }
.svc__link[aria-current="page"] { background: var(--accent); color: var(--accent-contrast); }
.header__phone { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-width: 44px; min-height: 44px; color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.header__phone .icon { width: 22px; height: 22px; }
.header__phone-text, .header__cta { display: none; }

/* ---- Секции и заголовки ------------------------------------------------- */
.section { padding: calc(var(--space) * 3) 0; }
.section--alt { background: var(--section-alt); }
.section__head { max-width: 760px; margin-bottom: calc(var(--space) * 2); }
.section__title { margin-bottom: calc(var(--space) * .5); }
.section__lead { color: var(--muted); font-size: 1.075rem; margin: 0; }
.eyebrow { display: inline-block; margin-bottom: .5em; color: var(--accent-ink); font: 600 .8rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ---- Первый экран ------------------------------------------------------- */
.hero { padding: calc(var(--space) * 2) 0 calc(var(--space) * 3); }
.hero__grid { display: grid; gap: calc(var(--space) * 1.5); align-items: center; }
.hero__title { margin-bottom: calc(var(--space) * .75); }
.hero__lead { color: var(--muted); font-size: 1.1rem; }
.hero__price { font: var(--head-weight) 1.6rem/1.2 var(--font-head); margin-bottom: var(--space); }
.hero__price b { color: var(--accent-ink); }
.hero__benefits { list-style: none; padding: 0; margin: 0 0 calc(var(--space) * 1.5); display: grid; gap: .5em; }
.hero__benefits li { display: flex; gap: .5em; }
.hero__benefits .icon { color: var(--accent-ink); margin-top: .15em; }

/* ---- Сетка карточек и карточка ------------------------------------------ */
.grid { display: grid; gap: calc(var(--space) * 1); grid-template-columns: 1fr; }
.grid > figure { margin: 0; } /* «Примеры работ»: без браузерных полей 40px — фото на всю ячейку */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: calc(var(--space) * 1.25); min-width: 0; }
.card__icon { display: block; width: 40px; height: 40px; margin-bottom: .75em; color: var(--accent-ink); }
.card__title { font-size: 1.15rem; margin-bottom: .4em; }
.card__text { color: var(--muted); margin: 0; }
.card__text + .card__text { margin-top: .5em; }
/* Карточки «Виды»: цена прижата к низу — в ряду карточек на одном уровне */
.card--price { display: flex; flex-direction: column; }
.card--price .hero__price { margin: auto 0 0; padding-top: .5em; }

/* ---- Список с галочками ----------------------------------------------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .6em; }
.grid + .checklist { margin-top: calc(var(--space) * 1.5); } /* список сразу под карточками («Виды» штукатурки) */
.checklist li { display: flex; gap: .6em; }
.checklist .icon { color: var(--accent-ink); margin-top: .15em; }

/* ---- Таблица и прайс ---------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
/* На телефоне таблица помещается в экран: мельче шрифт, узкие поля, переносы слов; с 768px — обычный вид */
.table { width: 100%; border-collapse: collapse; font-size: .8rem; line-height: 1.4; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.table th, .table td { padding: .6em .45em; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: 0; color: var(--muted); background: var(--section-alt); }
.table tr:last-child > * { border-bottom: 0; }
.price { min-width: 0; }
.price td:last-child, .price th:last-child { text-align: right; white-space: nowrap; }
.price__val { font-weight: 700; }
.price__note { margin-top: .75em; color: var(--muted); font-size: .95rem; }

/* ---- Плашки цифр ------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space); }
.stat { border-top: 3px solid var(--accent); padding-top: .6em; min-width: 0; }
.stat__num { display: block; font: var(--head-weight) clamp(1.6rem, 6vw, 2.4rem)/1.1 var(--font-head); overflow-wrap: anywhere; }
.stat__label { display: block; color: var(--muted); font-size: .95rem; }

/* ---- Шаги --------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space); counter-reset: step; }
.step { position: relative; padding-left: 3.2em; counter-increment: step; min-width: 0; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.3em; height: 2.3em; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-contrast); border-radius: var(--radius);
  font: var(--head-weight) 1rem/1 var(--font-head);
}
.step__title { font-size: 1.1rem; margin-bottom: .3em; }
.step__text { color: var(--muted); margin: 0; }

/* ---- FAQ ---------------------------------------------------------------- */
.faq { display: grid; gap: .5em; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq__q { display: flex; justify-content: space-between; gap: 1em; padding: 1em 1.1em; cursor: pointer; font-weight: 600; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; flex: none; font-size: 1.4em; line-height: .8; color: var(--accent-ink); }
.faq__item[open] .faq__q::after { content: "−"; }
.faq__a { padding: 0 1.1em 1em; color: var(--muted); }
.faq__a > :last-child { margin-bottom: 0; }

/* ---- Картинка ------------------------------------------------------------ */
.pic { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--section-alt); aspect-ratio: 4 / 3; }
.pic--wide { aspect-ratio: 16 / 9; }
.pic--square { aspect-ratio: 1 / 1; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic__caption { margin-top: .5em; color: var(--muted); font-size: .9rem; }
/* «Примеры работ»: превью открывает галерею */
.pic-link { display: block; border-radius: var(--radius); cursor: zoom-in; }
.pic--focus-right img { object-position: 80% 50%; } /* при обрезке кадра не терять мастера справа */
/* «Примеры работ» на телефоне: лента по одному фото, стрелки поверх, счётчик под фото */
.slider { position: relative; }
.slider .works { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: var(--radius); }
.slider .works::-webkit-scrollbar { display: none; }
.slider .works > figure { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.slider__btn { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(10, 12, 16, .55); color: #fff; cursor: pointer; transition: opacity .2s; }
.slider__btn .icon { width: 22px; height: 22px; }
.slider__btn[disabled] { opacity: .3; cursor: default; }
.slider__prev { left: 10px; }
.slider__prev .icon { transform: scaleX(-1); }
.slider__next { right: 10px; }
.slider__count { margin: .6em 0 0; text-align: center; color: var(--muted); font-size: .9rem; }
.pic-link img { transition: transform .35s ease; }
.pic-link:hover img, .pic-link:focus-visible img { transform: scale(1.04); }
.gallery { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 12, 16, .96); color: #fff; overflow: hidden; }
.gallery::backdrop { background: rgba(10, 12, 16, .6); }
.gallery__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: 0; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; padding: 60px 12px; scroll-snap-align: center; scroll-snap-stop: always; }
.gallery__slide picture { display: contents; }
.gallery__slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.gallery__btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.gallery__btn:hover, .gallery__btn:focus-visible { background: rgba(255, 255, 255, .28); }
.gallery__btn .icon { width: 24px; height: 24px; }
.gallery__close { top: 8px; right: 8px; }
.gallery__prev, .gallery__next { top: 50%; margin-top: -24px; display: none; }
.gallery__prev { left: 16px; }
.gallery__prev .icon { transform: scaleX(-1); }
.gallery__next { right: 16px; }
.gallery__count { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; text-align: center; font-size: .95rem; color: rgba(255, 255, 255, .8); }

/* ---- Блок-переход на второй лендинг -------------------------------------- */
.bridge { display: grid; gap: var(--space); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bridge__body { padding: calc(var(--space) * 1.5); }
.bridge__title { margin-bottom: .4em; }
.bridge .pic { border-radius: 0; }

/* ---- Поля формы ---------------------------------------------------------- */
.form { display: grid; gap: calc(var(--space) * .9); }
.field { display: grid; gap: .35em; }
.field__label { font-weight: 600; font-size: .95rem; }
.field__input {
  width: 100%; min-height: 48px; padding: .7em .9em;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius);
}
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.field__input[aria-invalid="true"] { border-color: #D93025; }
.field__hint { color: var(--muted); font-size: .85rem; }
.field__error { color: #D93025; font-size: .9rem; font-weight: 600; margin: 0; }
html[data-theme="c"] .field__error, html[data-theme="c"] .field__input[aria-invalid="true"] { color: #FF8A80; border-color: #FF8A80; }
.field--file input[type="file"] { font: inherit; font-size: .9rem; max-width: 100%; }
.consent { display: flex; gap: .6em; align-items: flex-start; font-size: .9rem; color: var(--muted); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: .1em 0 0; flex: none; accent-color: var(--accent); }
.form__status { margin: 0; font-weight: 600; }
.form__status[data-state="ok"] { color: var(--accent-ink); }
.form__status[data-state="error"] { color: #D93025; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Модальная форма ------------------------------------------------------ */
.modal { width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal::backdrop { background: rgba(10, 12, 16, .6); }
.modal__in { position: relative; padding: calc(var(--space) * 1.5); }
.modal__title { font-size: 1.5rem; padding-right: 40px; }
.modal__lead { color: var(--muted); }
.modal__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--text); cursor: pointer; }
.modal__close .icon { width: 24px; height: 24px; }

/* ---- Квиз --------------------------------------------------------------- */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: calc(var(--space) * 1.25); }
.quiz__progress { height: 6px; background: var(--section-alt); border-radius: 3px; overflow: hidden; margin-bottom: .5em; }
.quiz__bar { height: 100%; width: var(--p, 0%); background: var(--accent); transition: width .25s; }
.quiz__count { color: var(--muted); font-size: .85rem; margin-bottom: var(--space); }
.quiz__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__q { font: var(--head-weight) 1.3rem/1.2 var(--font-head); text-transform: var(--head-case); margin-bottom: var(--space); padding: 0; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; }
.option__body { display: flex; flex-direction: column; align-items: flex-start; gap: .4em; height: 100%; padding: .9em; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--bg); font-weight: 600; }
.option__body .icon { width: 28px; height: 28px; color: var(--accent-ink); }
.option input:checked + .option__body { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.option input:focus-visible + .option__body { outline: 3px solid var(--accent); outline-offset: 2px; }
.quiz__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: calc(var(--space) * 1.25); }
.quiz__price { margin-top: var(--space); padding: var(--space); border-left: 4px solid var(--accent); background: var(--section-alt); border-radius: var(--radius); }
.quiz__sum { display: block; font: var(--head-weight) 1.6rem/1.2 var(--font-head); }
.quiz__note { display: block; color: var(--muted); font-size: .9rem; margin-top: .3em; }

/* ---- Схема слоёв (SVG) ---------------------------------------------------- */
.layers { margin: var(--space) 0 0; max-width: 480px; /* схема в родном размере viewBox, не на всю ширину */ }
/* Схема стяжки: полосы тянутся по ширине (рамки не толще — non-scaling-stroke), подписи — фиксированной ширины */
.layers__art { display: flex; font-family: var(--font-body); }
.layers__bars { flex: 1 1 auto; min-width: 80px; height: 230px; }
.layers__bars .layer { vector-effect: non-scaling-stroke; }
.layers__labels { flex: 0 0 220px; width: 220px; height: 230px; }
.layers__svg { display: block; width: 100%; height: auto; font-family: var(--font-body); }
.layers .layer { stroke: var(--text); stroke-width: 1; }
.layers .layer--1 { fill: color-mix(in srgb, var(--accent) 85%, var(--surface)); }
.layers .layer--2 { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.layers .layer--3 { fill: color-mix(in srgb, var(--muted) 35%, var(--surface)); }
.layers .layer--4 { fill: color-mix(in srgb, var(--muted) 60%, var(--surface)); }
.layers .layer__label { fill: var(--text); font-size: 13px; }
.layers .layer__line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.layers figcaption { color: var(--muted); font-size: .9rem; margin-top: .5em; }
html[data-theme="c"] .layers { border: 1px solid var(--accent); padding: var(--space); background: var(--surface); }
html[data-theme="c"] .layers .layer { stroke: var(--accent); }
/* «Почему полусухая стяжка»: справа от схемы — аксонометрия слоёв в линиях (только ≥ 1024px) */
.iso { display: none; }
.iso .iso__box { stroke: var(--text); stroke-width: 1.1; stroke-linejoin: round; }
.iso .iso__top { fill: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.iso .iso__side--l { fill: color-mix(in srgb, var(--c) 42%, var(--surface)); }
.iso .iso__side--r { fill: color-mix(in srgb, var(--c) 60%, var(--surface)); }
.iso .layer--1 { --c: var(--accent); }
.iso .layer--2 { --c: color-mix(in srgb, var(--accent) 50%, var(--surface)); }
.iso .layer--3, .iso .layer--4 { --c: var(--muted); }
.iso .iso__hatch { fill: none; stroke: var(--text); stroke-width: .8; opacity: .45; }
.iso .iso__guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.iso .iso__rule { fill: var(--surface); stroke: var(--text); stroke-width: 1.1; }
.iso .iso__dim { stroke: var(--muted); stroke-width: 1; }
.iso .iso__dim--arrow { marker-start: url(#iso-arr); marker-end: url(#iso-arr); }
.iso .iso__arrowhead { fill: var(--muted); }
.iso .iso__text { fill: var(--text); font: 12px var(--font-body); }
html[data-theme="c"] .iso { border: 1px solid var(--accent); padding: var(--space); background: var(--surface); }

/* ---- Мессенджеры и контакты ---------------------------------------------- */
.msgs { display: flex; flex-wrap: wrap; gap: 10px; }
/* Кнопки в «Контактах»: сетка 2 колонки одной ширины — «Позвонить» над WhatsApp, почта над Telegram */
.contact-actions, .contact-actions + .msgs, .zamer-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; max-width: 480px; }
.contact-actions { margin-top: calc(var(--space) * 1.5); }
.contact-actions + .msgs { margin: 14px 0 calc(var(--space) * 1.5); }
.contact-actions .btn, .contact-actions + .msgs .btn, .zamer-actions .btn { padding-left: .75em; padding-right: .75em; }
.icon--wa { color: #25d366; }
.icon--tg { color: #229ed9; }
/* «Бесплатный замер»: рисунок рулетки под кнопками — тянется до низа формы (только ≥ 768px) */
.zamer-art { display: none; }
.tape__band { fill: var(--accent); }
.tape__tick { stroke: var(--accent-contrast); stroke-width: 1.5; fill: none; }
.tape__num { fill: var(--accent-contrast); font: 600 11px/1 var(--font-body); }
.tape__hook, .tape__lock, .tape__case { fill: var(--text); }
.tape__ring { fill: var(--accent); }
.tape__hub { fill: var(--text); stroke: var(--surface); stroke-width: 3; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75em; }
.contact-list li { display: flex; gap: .6em; align-items: flex-start; }
.contact-list .icon { color: var(--accent-ink); margin-top: .15em; }

/* ---- Подвал -------------------------------------------------------------- */
.footer { background: var(--section-alt); border-top: 1px solid var(--line); padding: calc(var(--space) * 2.5) 0 var(--space); font-size: .95rem; }
.footer__grid { display: grid; gap: calc(var(--space) * 1.5); }
.footer__about { color: var(--muted); margin-top: .5em; }
.footer__title { font: 600 .8rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .75em; }
.footer__nav { list-style: none; padding: 0; margin: 0; display: grid; gap: .4em; }
.footer__nav a, .footer .contact-list a { color: var(--text); }
.footer address { font-style: normal; }
.footer__legal { color: var(--muted); }
.footer__legal p { margin: 0 0 .3em; }
.footer__bottom { margin-top: calc(var(--space) * 2); padding-top: var(--space); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer__bottom a { color: var(--muted); }

/* ---- Липкая мобильная панель ------------------------------------------------ */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  height: 64px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
}
.mbar__btn { min-height: 48px; padding: .5em .6em; font-size: .95rem; }
.mbar .btn--secondary { border-color: var(--line); }

/* ---- Баннер cookie ---------------------------------------------------------- */
.cookie {
  position: fixed; left: 8px; right: 8px; bottom: 72px; z-index: 70;
  display: grid; gap: 10px; padding: 14px 16px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  font-size: .9rem;
}
.cookie__text { margin: 0; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Кнопка-палитра тем (рисует theme-switcher.js) ---------------------------- */
.theme-sw { position: fixed; left: 12px; bottom: calc(76px + var(--cookie-h, 0px)); z-index: 65; }
.theme-sw__btn {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--text); color: var(--bg); border: 2px solid var(--surface); border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25); cursor: pointer;
}
.theme-sw__btn .icon { width: 24px; height: 24px; }
.theme-sw__panel {
  position: absolute; left: 0; bottom: 58px; width: 250px; max-width: calc(100vw - 24px);
  padding: 8px; margin: 0; list-style: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.theme-sw__title { padding: 4px 8px 8px; font-size: .8rem; color: var(--muted); }
.theme-sw__opt {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px;
  background: none; border: 2px solid transparent; border-radius: 6px;
  color: inherit; font: 600 .9rem/1.2 var(--font-body); text-align: left; cursor: pointer;
}
.theme-sw__opt:hover { background: var(--section-alt); }
.theme-sw__opt[aria-pressed="true"] { border-color: var(--accent); }
.theme-sw__opt[aria-pressed="true"]::after { content: "✓"; margin-left: auto; color: var(--accent-ink); }
.theme-sw__dots { display: flex; flex: none; }
.theme-sw__dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(128, 128, 128, .5); margin-right: -5px; }

/* ---- Страницы-тексты (политика, 404) ---------------------------------------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.4rem; margin-top: calc(var(--space) * 2); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.notfound { padding: calc(var(--space) * 4) 0; }
.notfound__code { font: var(--head-weight) clamp(4rem, 20vw, 8rem)/1 var(--font-head); color: var(--accent-ink); margin: 0 0 .2em; }

/* ---- Планшет и шире ---------------------------------------------------------- */
@media (min-width: 768px) {
  .actions > .btn { flex: 0 1 auto; }
  body { padding-bottom: 0; }
  .container { padding: 0 24px; }
  .mbar { display: none; }
  .header__in { height: 72px; gap: 20px; }
  .logo { font-size: 1.1rem; max-width: none; }
  .svc { margin-left: 0; }
  .svc__link { padding: .6em 1em; font-size: .95rem; }
  .header__phone { margin-left: auto; }
  .header__phone-text { display: inline; }
  .header__cta { display: inline-flex; }
  .section { padding: calc(var(--space) * 4.5) 0; }
  .hero { padding: calc(var(--space) * 3.5) 0 calc(var(--space) * 4.5); }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: calc(var(--space) * 3); }
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--space) * 1.5); }
  .bridge { grid-template-columns: 1fr 1fr; }
  .gallery__prev, .gallery__next { display: grid; }
  .slider .works { display: grid; gap: calc(var(--space) * 1); overflow: visible; border-radius: 0; }
  .slider__btn, .slider__count { display: none; }
  .gallery__slide { padding: 64px 88px; }
  .table { font-size: 1rem; line-height: inherit; hyphens: manual; -webkit-hyphens: manual; }
  .table th, .table td { padding: .75em 1em; }
  .table thead th { font-size: .85rem; letter-spacing: .04em; }
  .options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quiz { padding: calc(var(--space) * 2); }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1.3fr 1.4fr; }
  .cookie { left: auto; right: 24px; bottom: 24px; max-width: 420px; }
  .theme-sw { left: 24px; bottom: 24px; }
  .zamer__side { display: flex; flex-direction: column; }
  .zamer-art { display: block; position: relative; flex: 1; min-height: 64px; max-width: 480px; margin: calc(var(--space) * 1.5) 0 calc(var(--space) * .9); /* снизу — как gap формы под кнопкой (там пустой статус); фон прозрачный — рисунок на весь блок */ }
  .zamer-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
}
@media (min-width: 1024px) {
  .hero__grid > .pic { align-self: stretch; aspect-ratio: auto; } /* фото по высоте текста — от заголовка до кнопок */
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layers-row { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-top: var(--space); }
  .layers-row .layers { flex: 1 1 auto; max-width: none; margin-top: 0; }
  .iso { display: block; flex: 0 1 340px; min-width: 0; height: auto; }
  .steps--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
