/* Отступы кратны 4, радиусы 16 / 12 / 8. Акцент один — --accent. */
:root {
  --ink: #0e1726; --ink-2: #3b4658; --muted: #566072; --line: #e3e7ee;
  --bg: #ffffff; --bg-alt: #f5f7fa; --accent: #d9382c; --accent-2: #b92d23;
  --wa: #0f7a3d; --tg: #1c74a3; --muted-dark: #a9b4c6;
  --r: 16px; --r-sm: 12px; --r-xs: 8px;
  --shadow: 0 1px 2px rgba(14,23,38,.06), 0 8px 24px rgba(14,23,38,.06);
}
/* Manrope — со своего сервера: один переменный файл на подсет (400–800), а не 5 статических начертаний */
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.55 Manrope, system-ui, sans-serif; color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh; }  /* подвал — до низа экрана на коротких страницах */
main { flex: 1 0 auto; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; }
p { margin: 0 0 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 20px; border-radius: var(--r-sm); border: 0; font: inherit; font-weight: 700; font-size: 15px; line-height: 1; text-decoration: none;
  cursor: pointer; transition: background .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-tg { background: var(--tg); color: #fff; }
.btn-wa:hover, .btn-tg:hover { filter: brightness(.94); }
.btn-outline { background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.btn-outline:hover { background: var(--bg-alt); }
.btn:disabled { opacity: .5; cursor: default; pointer-events: none; }

/* шапка */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: block; flex: none; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.02em; }
.logo img { display: block; height: 40px; width: auto; }
.foot .logo img { height: 56px; }
.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.top-cta { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.phone { font-weight: 700; text-decoration: none; margin-right: 8px; }

/* первый экран */
.hero { background: var(--bg-alt); overflow-x: clip; }  /* скрытые карточки карусели сдвинуты вправо — не расширять ими страницу */
.hero-in { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; padding-top: 40px; padding-bottom: 48px; align-items: center; }
/* min-width: 0 — иначе колонка не уже самого широкого ребёнка (ряд стран, карусель): на телефоне герой был 1168px
   и обрезался справа (аудит 10.10) */
.hero-in > * { min-width: 0; }
.hero h1 { text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
p.lead { font-size: 18px; color: var(--ink-2); max-width: 560px; margin-bottom: 24px; }   /* p: form.lead — заявка */
/* марка, модель, цена — в ряд, кнопка во всю ширину под ними (с моделью в одном ряду всем было тесно, 17.10) */
.hero-search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 16px; padding: 20px;
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
/* быстрые ссылки под поиском: марки и бюджеты с числом машин */
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-quick a { padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 700; text-decoration: none; transition: box-shadow .15s; }
.hero-quick a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.hero-quick span { color: var(--muted); font-weight: 500; margin-left: 2px; }
/* рейтинг и стаж — крупно: это главное доверие на первом экране */
.hero-trust { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 28px; }
.ht { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.ht b { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.ht b i { font-style: normal; color: #c27d0e; }
.ht span { font-size: 15px; line-height: 1.3; color: var(--ink-2); font-weight: 600; }
a.ht:hover span { color: var(--ink); text-decoration: underline; }
.ht + .ht { padding-left: 32px; border-left: 1px solid var(--line); }
.hero-search label { min-width: 0; }
.hero-search .btn { grid-column: 1 / -1; }
@media (max-width: 720px) { .hero-search { grid-template-columns: minmax(0, 1fr); } }

/* машина на первом экране: карточки лежат стопкой в одной ячейке сетки (высота — по самой
   высокой), видна .on. Смена — проявление со сдвигом, фото медленно наезжает, пока карточка видна */
.show { min-width: 0; }
.show-stage { display: grid; }
.show-car { grid-area: 1 / 1; display: flex; flex-direction: column; background: #fff; border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  opacity: 0; visibility: hidden; transform: translateX(32px);
  transition: opacity .45s var(--ease-out), transform .6s var(--ease-out), visibility 0s .6s; }
.show-car.on { opacity: 1; visibility: visible; transform: none; transition-delay: .12s, .12s, 0s; }
.show-car.out { transform: translateX(-32px); }
.show-ph { aspect-ratio: 16 / 9; overflow: hidden; background: var(--line); }
.show-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 7s linear; }
.show-car.on .show-ph img { transform: scale(1.06); }
.show-bd { display: flex; flex-direction: column; gap: 16px; flex: 1; padding: 24px; }
.show-nm { font-weight: 800; font-size: 24px; letter-spacing: -.01em; line-height: 1.2; }
/* карточка на первом экране крупная — и текст в ней крупнее, чем в карточках каталога */
.show .show-specs { margin: 0; gap: 14px 16px; }   /* .show — чтобы перебить .card-specs ниже по файлу */
.show .show-specs dt { font-size: 14px; }
.show .show-specs dd { font-size: 18px; font-weight: 700; }
/* назад — карточки едут в обратную сторону */
.show.back .show-car { transform: translateX(-32px); }
.show.back .show-car.on { transform: none; }
.show.back .show-car.out { transform: translateX(32px); }
.show-pr { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.show-p { font-size: 32px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; line-height: 1.15; }
.show-pr > span { font-size: 17px; font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (hover: hover) { .show-car:hover .show-pr > span { text-decoration: underline; } }
/* под карточкой: ‹ номер / всего › */
.show-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.show-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 24px; line-height: 1; cursor: pointer; transition: background .15s, transform .12s var(--ease-out); }
.show-nav button:hover { background: var(--bg-alt); }
.show-nav button:active { transform: scale(.94); }
.show-n { min-width: 64px; text-align: center; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.show-n b { color: var(--ink); }
/* та же навигация под отзывами и фото клиентов (аудит 22.10: одна на всех лентах и ширинах) */
.show-nav button:disabled { opacity: .35; cursor: default; pointer-events: none; }
.rev-pages + .show-nav, .rev-dlg + .show-nav, .track + .show-nav { margin-top: 16px; }

/* секции */
.sec { padding: 72px 0; }
.sec-tight { padding: 32px 0 72px; }
.sec-alt { background: var(--bg-alt); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.link-more { font-weight: 700; color: var(--ink); text-decoration: none; }
@media (hover: hover) { .link-more:hover { text-decoration: underline; } }
.page-h { font-size: clamp(28px, 4vw, 40px); }

/* карточки машин */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card { display: flex; flex-direction: column; background: #fff; border-radius: var(--r); overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(14,23,38,.06), 0 16px 40px rgba(14,23,38,.1); }
.card-img { position: relative; aspect-ratio: 16 / 9; background: var(--bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; z-index: 1; left: 12px; top: 12px; background: rgba(14,23,38,.8); color: #fff; font-size: 12px;
  font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.card-name { font-weight: 800; font-size: 17px; }
.card-grade { color: var(--muted); font-size: 13px; min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.card-specs dt { font-size: 12px; color: var(--muted); }
.card-specs dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { margin-top: 8px; }
.price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

/* калькулятор */
.calc { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
/* рамка полей #8b95a7 — 3:1 к белому (WCAG 1.4.11); шрифт 16px — иначе iPhone увеличивает страницу при вводе */
input, select { min-height: 44px; padding: 0 12px; border: 1px solid #8b95a7; border-radius: var(--r-xs);
  font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); background: #fff; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
/* все обычные <select> — одна и та же галочка вместо системной стрелки, как у .csel-btn */
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1 3l4 4 4-4' fill='none' stroke='%233b4658' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 10px 10px; }
select::-ms-expand { display: none; }
.calc-out { background: #fff; border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); min-height: 200px; }
.breakdown { width: 100%; border-collapse: collapse; font-size: 15px; }
.breakdown td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.breakdown td:last-child { text-align: right; font-weight: 700; white-space: nowrap; padding-left: 12px; }
.breakdown .total td { border: 0; padding-top: 16px; font-size: 22px; font-weight: 800; }

/* шаги, гарантии, отзывы, вопросы */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.step { position: relative; }
.step-n { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 800; margin-bottom: 16px; }
.step-t { font-weight: 800; margin-bottom: 8px; }
.step-d { display: table; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--bg-alt);
  font-weight: 600; font-size: 13px; color: var(--ink-2); }
.step p { color: var(--ink-2); font-size: 15px; }
@media (min-width: 1081px) {
  .step:not(:last-child)::after { content: ""; position: absolute; top: 19px; left: 40px; right: -20px; height: 2px; background: var(--line); }
}
.guar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }
.guar-i { background: #fff; border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.guar-t { font-weight: 800; margin-bottom: 8px; }
.guar-i p { color: var(--ink-2); font-size: 15px; margin: 0; }
.review { margin: 0; padding: 24px; border-radius: var(--r); border: 1px solid var(--line); display: flex; flex-direction: column; }
.review blockquote { margin: 0 0 20px; font-size: 16px; }
.review figcaption { display: flex; flex-direction: column; font-size: 14px; }
.review figcaption span { color: var(--muted); }
.faq-wrap { max-width: 860px; }
.faq details { background: #fff; border-radius: var(--r-sm); margin-bottom: 8px; box-shadow: var(--shadow); }
.faq summary { padding: 18px 20px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--ink); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; color: var(--ink-2); margin: 0; max-width: 68ch; }
#clients .sec-head p { max-width: 68ch; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 40px;
  border-radius: var(--r); background: var(--ink); color: #fff; }
.cta .muted { color: var(--muted-dark); }
.cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* каталог */
.cat { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.filters { display: flex; flex-direction: column; gap: 14px;
  background: var(--bg-alt); padding: 20px; border-radius: var(--r); }
/* на телефоне фильтры сворачиваются, как вопросы в FAQ; на десктопе всегда раскрыты.
   .filters — не внутри details (в Chrome раскрытие через display у слота содержимого
   details не считается в высоте родителя), видимость переключает :has() по соседству. */
.filters-wrap { display: flex; flex-direction: column; gap: 12px; }
.filters-d > summary { list-style: none; cursor: pointer; font-weight: 800; padding: 16px 20px;
  background: var(--bg-alt); border-radius: var(--r); }
.filters-d > summary::-webkit-details-marker { display: none; }
.filters-d > summary::after { content: "+"; float: right; color: var(--ink); font-weight: 800; }
.filters-d[open] > summary::after { content: "\2212"; }
.filters-wrap:has(.filters-d:not([open])) .filters { display: none; }
@media (min-width: 821px) {
  .filters-d { display: none; }
  .filters-wrap:has(.filters-d:not([open])) .filters { display: flex; }
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* пара «от–до» под одной подписью: иначе длинная подпись у «от» переносится
   и поля встают на разную высоту */
.pair-f { border: 0; margin: 0; padding: 0; min-width: 0; }
.pair-f legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.sortbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--bg-alt); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip.on { background: var(--ink); color: #fff; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 32px 0 16px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-xs); text-decoration: none; font-weight: 700; }
.pager a { background: var(--bg-alt); }
.pager a.on { background: var(--ink); color: #fff; }
.empty { padding: 48px; text-align: center; background: var(--bg-alt); border-radius: var(--r); }
.empty p { margin: 0 0 16px; font-weight: 700; font-size: 17px; }
.empty .cta-btns { justify-content: center; }
#cat-h { scroll-margin-top: 84px; }

/* страница машины */
.carpage { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; margin: 16px 0 32px; align-items: start; }
.gallery { min-width: 0; }  /* иначе лента миниатюр распирает колонку сетки */
.gallery-main { aspect-ratio: 16 / 9; background: var(--bg-alt); border-radius: var(--r); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.thumbs button { flex: 0 0 112px; padding: 0; border: 2px solid transparent; border-radius: var(--r-xs); overflow: hidden; cursor: pointer; background: none; }
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy { position: sticky; top: 88px; padding: 28px; border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); }
.buy h1 { font-size: 30px; margin-bottom: 4px; }
.buy-price { font-size: 36px; font-weight: 800; letter-spacing: -.02em; margin-top: 20px; }
.buy-btns { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 24px; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.panel { background: var(--bg-alt); border-radius: var(--r); padding: 24px; }
.panel h2 { font-size: 22px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.opts-h { font-weight: 800; margin-bottom: 8px; }
.opts ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }

/* подвал */
.foot { background: var(--ink); color: #c5cedc; padding: 56px 0 32px; }
.foot .muted { color: var(--muted-dark); }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.foot .logo { color: #fff; margin-bottom: 12px; }
.foot a { color: #fff; }
.foot-h { color: #fff; font-weight: 800; margin-bottom: 12px; }
.foot-btns { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .guar { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}
@media (max-width: 820px) {
  .hero-in, .calc, .carpage, .cat, .specs-grid, .foot-in { grid-template-columns: 1fr; }
  .hero-in { padding-top: 48px; padding-bottom: 48px; }
  .grid, .grid-3, .opts { grid-template-columns: repeat(2, 1fr); }
  .filters, .buy { position: static; }
  .cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  .phone { display: none; }
}
@media (max-width: 520px) {
  .grid, .grid-3, .steps, .guar, .opts { grid-template-columns: 1fr; }
  .sec { padding: 48px 0; }
}

/* страница машины v2 */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.car-head h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 4px; }
.car-sub { color: var(--ink-2); font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge { padding: 6px 12px; border-radius: 999px; background: var(--bg-alt); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.badge-accent { background: #e4eef8; color: #1d4f7a; }
.badge-warn { background: #fdf1dc; color: #8a5300; }
.badge-ok { background: #e3f5ea; color: #16733c; }
.badge-bad { background: #fde9e7; color: var(--accent-2); }
.car-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.gallery-main { position: relative; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s; }
.gallery-main:hover .g-nav, .g-nav:focus-visible { opacity: 1; }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-count { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(14,23,38,.75); color: #fff; font-size: 13px; }
@media (hover: none) { .g-nav { opacity: 1; } }
.tabs { position: sticky; top: 68px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; padding: 8px 0;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px); }
.tabs a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.tabs a:hover { background: var(--bg-alt); }
.panel { scroll-margin-top: 130px; }
.specs-2 { grid-template-columns: auto 1fr auto 1fr; }
.specs a { color: var(--ink); font-weight: 700; }
.ok { color: #16733c; font-weight: 700; } .bad { color: var(--accent-2); font-weight: 700; }
.body-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; margin-top: 16px; }
.car-svg { width: 100%; max-width: 240px; }
.car-svg .pp { fill: #fff; stroke: #b9c1cd; stroke-width: 1.5; transition: fill .2s; }
.car-svg .glass { fill: #dfe7f1; }
.car-svg .wheel { fill: #3b4658; }
.car-svg .x { fill: #e5484d; stroke: #b52a2f; } .car-svg .w { fill: #f5a524; stroke: #c27d0e; }
.car-svg .c { fill: #9b6b43; } .car-svg .a, .car-svg .u, .car-svg .t { fill: #f7d45c; }
.svg-t { font: 600 9px Manrope, sans-serif; fill: var(--muted); text-anchor: middle; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #b9c1cd; }
.dot.x { background: #e5484d; } .dot.w { background: #f5a524; } .dot.c { background: #9b6b43; } .dot.a, .dot.u, .dot.t { background: #f7d45c; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.diag-h { font-weight: 800; margin-bottom: 8px; }
.car-main .opts { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.buy { align-self: start; }
.buy-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.buy .buy-price { margin-top: 4px; }
.calc-d summary { cursor: pointer; font-weight: 800; padding: 8px 0; }
@media (max-width: 820px) {
  .specs-2 { grid-template-columns: auto 1fr; }
  .body-wrap { grid-template-columns: 1fr; justify-items: center; }
  .body-info { width: 100%; }
}

/* нижняя панель с ценой: только на телефоне, где блок цены уезжает вниз */
.mbar { display: none; }
@media (max-width: 820px) {
  .mbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 24px rgba(14,23,38,.12); }
  .mbar-p { font-size: 20px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
  .mbar { transform: translateY(110%); transition: transform .25s var(--ease-out); }
  .mbar.on { transform: none; }
  body:has(.mbar) .foot { padding-bottom: 96px; }
}

/* фото encar — целиком, без увеличения: увеличение срезало вместе с бледным знаком «Encar»
   бампер и колёса (владелец 26.09). Знак остаётся, как на самом encar (см. WTMK в app.py) */
.card-img, .gallery-main { overflow: hidden; }

/* отзывы: рейтинг площадки + карточки */
.rating { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: var(--bg-alt); text-decoration: none; }
.rating-v { font-size: 22px; font-weight: 800; }
.rating-l { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.stars { color: #c27d0e; letter-spacing: 1px; }
.stars-off { color: var(--line); }
.review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.review blockquote { font-size: 15px; margin: 0 0 16px; }
@media (max-width: 520px) { .sec-head { flex-direction: column; align-items: flex-start; } }

/* ленты со стрелками: отзывы и фото клиентов (data-slider в index.html) */
.sec-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.track { display: grid; grid-auto-flow: column; gap: 20px; margin-top: 24px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.clients { grid-auto-columns: calc((100% - 80px) / 5); }
.client { margin: 0; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--line); }
/* сверху на фото в основном небо: сдвигаем кадр к людям и машине */
.client img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 75%; }
@media (max-width: 1080px) { .clients { grid-auto-columns: calc((100% - 40px) / 3); } }
@media (max-width: 520px) { .clients { grid-auto-columns: 62%; } }

/* состояние кузова: вердикт плашкой + строки «деталь — метка».
   Метки .pill — единый вид статуса во всех блоках карточки (кузов, история, техосмотр) */
:root { --ok: #16733c; --ok-bg: #e3f5ea; --bad: #b42318; --bad-bg: #fde9e7; --warn-bg: #fdf1dc; --warn: #8a5300; }
.verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-sm); background: #fff; margin-bottom: 20px; }
.verdict-i { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; }
.verdict-ok .verdict-i { background: var(--ok); } .verdict-bad .verdict-i { background: var(--bad); }
.verdict-t { font-weight: 800; font-size: 17px; line-height: 1.3; }
.verdict-s { font-size: 14px; color: var(--muted); margin-top: 2px; }
.rows-h { font-weight: 800; font-size: 15px; margin: 20px 0 4px; }
.rows-note { margin-left: 8px; font-weight: 500; font-size: 13px; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rows li:last-child { border-bottom: 0; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
/* да/нет — значок + слово («✓ не было»): один значок без слова читался наоборот; статусы со смыслом («Замена») — .pill */
.mark { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.mark-i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 13px; font-weight: 800; line-height: 1; color: #fff; }
.mark-ok { color: var(--ok); } .mark-ok .mark-i { background: var(--ok); }
.mark-x { color: var(--bad); } .mark-x .mark-i { background: var(--bad); }
.pill-x, .pill-t { background: var(--bad-bg); color: var(--bad); }
.pill-w, .pill-c, .pill-a, .pill-u { background: var(--warn-bg); color: var(--warn); }
.legend { margin-top: 12px; }

/* пары «подпись — значение» везде одинаково: строки с разделителями,
   на десктопе в две колонки (характеристики, история, техосмотр) */
.rows-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.rows-2 li:last-child { border-bottom: 1px solid var(--line); }
.rows li > span:first-child { color: var(--ink-2); }
.rows-v { font-weight: 700; text-align: right; }
.rows-v a { color: var(--ink); }
@media (max-width: 820px) { .rows-2 { grid-template-columns: 1fr; } }

/* отзывы: страницы по 5. Десктоп — 3 сверху и 2 пошире снизу */
.rev-pages { margin-top: 24px; }
.rev-page[hidden] { display: none; }
.rev-page { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.rev-page > :nth-child(-n+3) { grid-column: span 2; }
.rev-page > :nth-child(n+4) { grid-column: span 3; }
@media (max-width: 1080px) { .rev-page { grid-template-columns: 1fr 1fr; } .rev-page > * { grid-column: auto !important; } .rev-page > :last-child:nth-child(odd) { grid-column: 1 / -1 !important; } }
@media (max-width: 520px) { .rev-page { grid-template-columns: 1fr; } }

/* блок цены на карточке: компактнее, чтобы липкая панель влезала в экран.
   Раскрыли разбивку — панель перестаёт липнуть, иначе её низ не увидеть */
.buy { padding: 24px; }
.buy .buy-price { font-size: 32px; }
.buy-btns { margin: 16px 0 12px; }
.buy .btn-lg { min-height: 48px; }
.buy .breakdown { font-size: 14px; }
.buy .breakdown td { padding: 7px 0; }
.buy .breakdown .total td { font-size: 18px; padding-top: 12px; }
.buy { max-height: calc(100vh - 104px); overflow-y: auto; scrollbar-width: thin; }
.buy .buy-btns { margin: 14px 0 10px; }
.calc-h { font-weight: 800; font-size: 15px; margin: 8px 0 2px; }
.buy .breakdown td { padding: 5px 0; }
.buy .calc-d p { margin: 8px 0 0; }
@media (max-width: 820px) { .buy { max-height: none; overflow: visible; } }

/* миниатюры 16:9, как сами фото */
.thumbs button { aspect-ratio: 16 / 9; }

/* движение. Кривая одна — --ease-out (быстрый старт, мягкая остановка), отклик 120 мс, переходы до 300 мс
   (дольше только зум фото и «докрутка» итога). Двигаем только transform и opacity. У кого в системе
   «уменьшить движение» — блок в самом конце всё выключает, в JS проверка still() */
:root { --ease-out: cubic-bezier(.23, 1, .32, 1); }
.btn { transition: background .15s, filter .15s, transform .12s var(--ease-out); }
.btn:active, .chip:active, .pager a:active { transform: scale(.97); }
.chip, .pager a { transition: transform .12s var(--ease-out); }
.g-nav { transition: opacity .2s, transform .12s var(--ease-out); }
.g-nav:active { transform: translateY(-50%) scale(.92); }

/* карточки: подъём и лёгкий зум фото только там, где есть мышь */
.card { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.card-img img { transition: transform .4s var(--ease-out), opacity .4s var(--ease-out); }
.card:active { transform: scale(.98); }

/* появление карточек: скрыты, пока не попали в экран, дальше их проявляет скрипт
   в base.html. Класс .motion ставится только при включённом JS и без «уменьшить движение» */
.motion .grid > .card:not(.seen):not(:has(img[fetchpriority])) { opacity: 0; }   /* первые карточки каталога — сразу (LCP) */

/* раскрытие вопросов и разбивки цены по высоте (Chrome 131+, остальные — сразу) */
:root { interpolate-size: allow-keywords; }
.faq details::details-content, .calc-d::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size .25s var(--ease-out), content-visibility .25s allow-discrete; }
.faq details[open]::details-content, .calc-d[open]::details-content { block-size: auto; }

/* фото: пока грузится — серая заглушка с бегущим бликом, загрузилось — проявляется.
   Класс .loaded ставит скрипт в base.html (переименован из .ok — тот пересекался
   с глобальным .ok{color:green}, из-за чего alt битой картинки красился зелёным) */
.motion .card-img img:not(.loaded):not([fetchpriority]), .motion .thumbs img:not(.loaded) { opacity: 0; }
.thumbs img { transition: opacity .4s var(--ease-out); }
.motion .card-img:has(img:not(.loaded)), .motion .thumbs button:has(img:not(.loaded)) {
  background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.7) 50%, transparent 65%) var(--bg-alt);
  background-size: 250% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
/* фото не загрузилось — прячем битую иконку и alt; в карточке и на первом экране вместо пустой плашки — значок
   и «Фото пришлём» (аудит 22.10). У машины без фото — то же */
.card-img img.err, .thumbs img.err, .show-ph img.err { display: none; }
.card-img:not(:has(img:not(.err)))::after, .show-ph:not(:has(img:not(.err)))::after {
  content: "Фото пришлём"; position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  padding-top: 40px; font-size: 14px; font-weight: 700; color: var(--muted);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%238b95a7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3l2-3h6l2 3h3v11H4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E") center calc(50% - 12px) / 32px no-repeat var(--bg-alt); }

/* шапка при прокрутке — с тенью. Высоту не меняем: её анимация пересчитывает раскладку каждый кадр */
.top { transition: box-shadow .25s; }
.top.scrolled { box-shadow: 0 4px 20px rgba(14,23,38,.08); }

/* переход между страницами: фото карточки перелетает в галерею, шапка стоит на месте.
   Chrome и Safari; остальные открывают страницу как обычно */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
.top { view-transition-name: top; }
.gallery-main { view-transition-name: car-photo; }
::view-transition-group(*) { animation-duration: .35s; animation-timing-function: var(--ease-out); }

/* кнопка «наверх»: появляется после полутора экранов прокрутки */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 15; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 22px; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(14,23,38,.18);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:active { transform: scale(.94); }
@media (max-width: 820px) { body:has(.mbar) .to-top { bottom: calc(108px + env(safe-area-inset-bottom)); } }


/* каталог без перезагрузки: старые карточки гаснут, пока грузятся новые */
.cat-res { min-width: 0; transition: opacity .2s; }
.cat-res.loading { opacity: .4; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}

/* примечание под итогом калькулятора: место под две строки есть всегда,
   иначе блок прыгает по высоте, когда примечание появляется и пропадает */
.calc-note { min-height: calc(2em * 1.55); margin: 12px 0 0; }

/* отзывы на телефоне: по одному, листаются пальцем прямо под текстом — не нужно
   возвращаться к стрелкам наверху. Страницы по 5 растворяются в одну ленту */
@media (max-width: 520px) {
  .rev-pages { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; overscroll-behavior-x: contain; align-items: flex-start; }  /* не тянуть карточки по самой длинной */
  .rev-pages::-webkit-scrollbar { display: none; }
  .rev-pages > .rev-page, .rev-pages > .rev-page[hidden] { display: contents; }
  .rev-pages .review { flex: 0 0 88%; scroll-snap-align: start; }
}

/* телефон: свежие поступления — лентой пальцем, а не 8 карточек столбиком.
   Лента во всю ширину экрана, первая карточка по краю текста */
@media (max-width: 520px) {
  .fresh { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 85%; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
    margin: 0 -16px; padding: 4px 16px 16px; scroll-padding: 0 16px; }
  .fresh::-webkit-scrollbar { display: none; }
  .fresh > .card { scroll-snap-align: start; }
}

/* телефон: блок цены с кнопками сразу под фото, а не после всей комплектации.
   .car-main растворяется, и её части встают в общий столбец по order */
@media (max-width: 820px) {
  .carpage { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
  .car-main { display: contents; }
  .car-main > :not(.gallery) { order: 2; }
  .buy { order: 1; }
}

/* «Проходные, 3–5 лет» — переключатель над списком, отдельно от сортировки: выключен — контур, включён — тёмный,
   как тот же фильтр в панели и выбранная марка (17.10: был зелёный с галочкой, в панели — тёмный без неё) */
.sortbar { align-items: center; }
.chip-toggle { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.chip-toggle.on { background: var(--ink); color: #fff; box-shadow: none; }
/* телефон: чипы сортировки — одной лентой пальцем, как чипы марок */
@media (max-width: 520px) {
  .sortbar { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 20px; padding: 0 16px 4px;
    scrollbar-width: none; overscroll-behavior-x: contain; }
  .sortbar::-webkit-scrollbar { display: none; }
  .sortbar .chip { flex: none; }
}

/* нижняя панель: Telegram значком рядом с главной кнопкой */
.mbar-btns { display: flex; gap: 8px; }
.btn-ico { width: 44px; padding: 0; }

/* калькулятор: ошибка называет поле; после итога — переход к машинам за эту сумму */
.calc-err { color: var(--bad); font-weight: 700; margin: 0; }
.calc-go { margin-top: 8px; width: 100%; }
.panel-note { margin: 12px 0 0; }

/* 404 */
.nf { max-width: 640px; }
.nf .cta-btns { margin-top: 24px; }

/* первый экран: «из Кореи» не разрывается; на телефоне рейтинг и стаж друг под другом — без разделителя */
.hero h1 em { white-space: nowrap; }
@media (max-width: 520px) { .ht + .ht { padding-left: 0; border-left: 0; } }

/* список марок с логотипами (initSelects в base.html): кнопка выглядит как поле выбора,
   логотип слева в кружке; настоящий <select> скрыт, но остаётся в форме */
.csel-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.csel { position: relative; }
.csel-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  padding: 0 36px 0 12px; border: 1px solid #8b95a7; border-radius: var(--r-xs); background: #fff; color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 500; text-align: left; cursor: pointer; position: relative; }
.csel-btn::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.csel-btn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -2px; }
.csel-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.csel-pop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(14,23,38,.16); overflow: hidden; }
.csel-pop[hidden] { display: none; }
.csel-list { max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; overscroll-behavior: contain; }
.csel-list li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px;
  border-radius: var(--r-xs); font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
/* популярные марки сверху (data-top, app.popular_first) — черта перед алфавитом; при поиске не нужна (24.10) */
.csel-list li.top + li:not(.top) { border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; }
.csel-pop:has(.csel-q:not(:placeholder-shown)) .csel-list li { border-top: 0; margin-top: 0; }
@media (hover: hover) { .csel-list li:hover { background: var(--bg-alt); } }
.csel-list li:focus { background: var(--bg-alt); outline: 2px solid var(--accent); outline-offset: -2px; }
.csel-list li[aria-selected="true"] { font-weight: 800; }
/* кружок с логотипом марки — один и тот же в списке марок и в чипах над каталогом;
   нет логотипа — первая буква; .none — пустое место под «Все», чтобы названия стояли ровно */
.blogo { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #f3f5f8; box-shadow: inset 0 0 0 1px #c3cad6;
  display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.blogo img { width: 24px; height: 24px; object-fit: contain; }
.blogo.none { background: none; box-shadow: none; }
.csel-btn .blogo { width: 28px; height: 28px; margin-left: -4px; }
.csel-btn .blogo img { width: 20px; height: 20px; }
.csel-btn .blogo.none { display: none; }
.csel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* пробег: готовые диапазоны под «от / до», как галочки; число машин — при остальных фильтрах */
.bands { display: flex; flex-direction: column; margin-top: 8px; }
.pair + .pills { margin-top: 8px; }      /* «Проходные» под годом */
.band { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; font-weight: 600;
  color: var(--ink); text-decoration: none; }
/* диапазоны выбираются по одному — кружок радио, а не квадратная галочка */
.band i { flex: none; width: 18px; height: 18px; border: 1.5px solid #8b95a7; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.band.on i { border-color: var(--ink); }
.band.on i::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.band span { color: var(--muted); font-weight: 500; }
.band.zero { color: var(--muted); opacity: .5; pointer-events: none; }  /* без машин — приглушить и не кликать; не .empty, это пустая выдача каталога */
@media (hover: hover) { .band:hover i { border-color: var(--ink); } }

/* «Без страховки» — каждый период своей строкой */
.gaps { display: flex; flex-direction: column; align-items: flex-end; }

/* чипы марок над списком каталога: логотип, название, число машин; выбранная — тёмная */
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.bchip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 4px; border-radius: 999px;
  background: var(--bg-alt); font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink);
  transition: background .15s, transform .12s var(--ease-out); }
.bchip:not(:has(.blogo)) { padding-left: 14px; }
@media (hover: hover) { .bchip:hover { background: #e8ecf2; } }
.bchip:active { transform: scale(.97); }
.bchip span { color: var(--muted); font-weight: 500; }
.bchip.on { background: var(--ink); color: #fff; }
.bchip.on span { color: #c5cedc; }
.bchip.on .blogo { box-shadow: none; }

/* поля «от / до»: тот же размер текста, что у соседних полей (числа короче не сделать — идут из app.py) */
.pair input { padding: 0 10px; }
/* телефон: чипы марок — одной лентой пальцем, а не 7 строк над машинами */
@media (max-width: 520px) {
  .brand-chips { flex-wrap: nowrap; overflow-x: auto; margin: -8px -16px 16px; padding: 0 16px 4px;
    scrollbar-width: none; overscroll-behavior-x: contain; }
  .brand-chips::-webkit-scrollbar { display: none; }
  .bchip { flex: none; }
}

/* подвал: контакты списком с иконками (контур цветом текста; ВК — залитый знак) */
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-list li { display: flex; align-items: center; gap: 10px; }
.foot-list a, .foot-privacy { display: inline-block; padding-block: 10px; }
.ci { flex: none; width: 18px; height: 18px; fill: none; stroke: #8f9bb0; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ci-fill { fill: #8f9bb0; stroke: none; }

/* плитки страховой истории: сумма «≈ N ₽» и воны под ней, пометка про курс — одной строкой под плитками */

@media (max-width: 520px) { .show-p { font-size: 28px; } .show-nm { font-size: 21px; } }

/* шапка: у WhatsApp и Telegram значок; на телефоне — только значки. Меню-кнопка слева от
   логотипа видна там, где спрятаны пункты шапки (до 1080px) */
.bi { width: 18px; height: 18px; flex: none; }
.burger { display: none; width: 44px; height: 44px; margin-left: -10px; padding: 0; border: 0; border-radius: var(--r-xs);
  background: none; cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 12px; width: 20px; height: 2px;
  border-radius: 2px; background: var(--ink); transition: transform .2s var(--ease-out), opacity .2s; }
.burger span { top: 21px; } .burger span::before, .burger span::after { content: ""; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.burger.on span { background: transparent; }
.burger.on span::before { transform: translateY(6px) rotate(45deg); }
.burger.on span::after { transform: translateY(-6px) rotate(-45deg); }
.burger:focus-visible { outline: 2px solid var(--accent); }
.mnav { border-top: 1px solid var(--line); background: #fff; }
.mnav .wrap { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 16px; }
.mnav a { padding: 12px 0; font-size: 17px; font-weight: 700; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.mnav a:last-child { border-bottom: 0; }
.mnav .mnav-phone { color: var(--ink); }
@media (max-width: 1080px) { .burger { display: block; } .top-in { gap: 12px; } }
@media (min-width: 1081px) { .mnav { display: none; } }

/* отзывы на телефоне: длинный — 6 строк и «Читать целиком», иначе лента высотой с самый
   длинный отзыв и под короткими пустота */
.rev-more { display: none; align-self: flex-start; margin: -8px 0 16px; padding: 0; border: 0; background: none;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: underline; cursor: pointer; }
@media (max-width: 520px) {
  .review blockquote.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 10; overflow: hidden; }
  .review blockquote.clamp + .rev-more { display: block; }
}
.review figcaption { margin-top: auto; }  /* имя автора внизу — карточки в ленте одной высоты */

/* касания ≥44px на телефоне и планшете: чипы, пейджер, мелкие кнопки, вкладки, крошки, подвал */
@media (max-width: 820px) {
  .chip, .tabs a { padding: 14px; }
  .pager a, .pager span { min-width: 44px; height: 44px; }
  .btn-sm { min-height: 44px; }
  .crumbs a { display: inline-block; padding-block: 12px; }
  .foot-list a { display: inline-block; padding-block: 10px; }
}

/* кнопки в блоке «Написать»/CTA — во всю ширину на телефоне */
@media (max-width: 520px) { .cta-btns .btn { width: 100%; } }

/* секции главной ниже первого экрана — не рендерим, пока не долистали до них.
   Селектор через .hero — на каталоге/404/анкете этого элемента нет, их секции не задеты */
.hero ~ .sec { content-visibility: auto; contain-intrinsic-size: auto 800px; }
/* высота-заглушка по секциям — замер 22.10 на 390 / 768 / 1440: с одной на всех полоса прокрутки прыгала,
   когда секция дорисовывалась (свежие на планшете — 2 050px, а не 800).
   --cis — высота всей секции, а заглушка задаёт высоту содержимого: паддинг .sec вычитаем (72×2, на телефоне 48×2),
   иначе страница до прокрутки была выше на ~1 тыс. px и якоря шапки съезжали (аудит 24.10) */
.hero ~ .sec { contain-intrinsic-size: auto calc(var(--cis, 800px) - 144px); }
@media (max-width: 520px) { .hero ~ .sec { contain-intrinsic-size: auto calc(var(--cis, 800px) - 96px); } }
.fresh-sec { --cis: 650px; } #calc { --cis: 1330px; } #steps { --cis: 1030px; } .guar-sec { --cis: 740px; }
#reviews { --cis: 580px; } #clients { --cis: 620px; } .faq-sec { --cis: 820px; } .sec-cta { --cis: 330px; }
@media (min-width: 521px) {
  .fresh-sec { --cis: 2050px; } #calc { --cis: 1170px; } #steps { --cis: 920px; } .guar-sec { --cis: 490px; }
  #reviews { --cis: 1180px; } #clients { --cis: 640px; } .faq-sec { --cis: 850px; } .sec-cta { --cis: 300px; }
}
@media (min-width: 1081px) {
  .fresh-sec { --cis: 1060px; } #calc { --cis: 670px; } #steps { --cis: 610px; } .guar-sec { --cis: 360px; }
  #reviews { --cis: 850px; } #clients { --cis: 650px; } .faq-sec { --cis: 680px; } .sec-cta { --cis: 250px; }
}
}

/* car.html — исправления 26.09 (A) */
/* вкладки характеристик: непрозрачный фон (rgba «просвечивал» под контентом при скролле)
   и подсветка активной по прокрутке (IntersectionObserver проставляет aria-current) */
.tabs { background: #fff; backdrop-filter: none; }
.tabs a[aria-current] { background: var(--ink); color: #fff; }
/* комплектация: галочки вместо браузерных маркеров списка */
.opts ul { list-style: none; padding-left: 0; }
.opts li { position: relative; padding-left: 22px; }
.opts li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* ——— правки владельца 26.09 вечер ——— */
/* под суммой: чего нет в неполной цене («+ утильсбор») — заметно, --ink-2; город — мельче и серым.
   Сумма неполной цены легче полной: не выглядит ценой под ключ (аудит 09.10) */
.plus-tax { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--ink-2); margin-top: 2px; }
.price-city { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.price-part, .buy-price .price-part { font-weight: 600; }
/* быстрые ссылки главной — с логотипами марок */
.hero-quick a { display: inline-flex; align-items: center; gap: 6px; }
.hero-quick .blogo { width: 24px; height: 24px; flex: none; }
/* кнопки покупки — в одну строку */
.buy-btns { flex-direction: row; flex-wrap: wrap; }
.buy-btns { flex-wrap: nowrap; }
.buy-btns .btn { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; white-space: normal; text-align: center; line-height: 1.2; }
/* вкладки карточки — лентой без видимой полосы прокрутки */
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* отметки да/нет: значок справа от слова — значки стоят ровной колонкой */
.mark { flex-direction: row-reverse; }
/* схема кузова на телефоне — целиком в экране (под шапкой, вкладками и нижней панелью) */
@media (max-width: 820px) {
  .car-svg { max-width: min(220px, calc((100svh - 440px) / 2)); }
  /* на странице машины кнопки связи — в нижней панели; в шапке те же не дублируем */
  body:has(.mbar) .top-cta { display: none; }
  /* крошки с увеличенной зоной касания — «/» по центру строки, а не вверху */
  .crumbs { align-items: center; row-gap: 0; }
}

/* ——— правки владельца 26.09, ночь ——— */
/* меню на телефоне — поверх страницы, прямо под шапкой (top ставит скрипт по её высоте), фон затемнён.
   Прокрутку не запрещаем через overflow: у html/body это ломало липкую шапку */
.mnav { position: fixed; top: var(--mnav-top, 68px); left: 0; right: 0; z-index: 11;
        box-shadow: 0 16px 32px rgba(15, 23, 42, .18); max-height: calc(100svh - var(--mnav-top, 68px)); overflow-y: auto;
        overscroll-behavior: contain; }
html.menu-open body::before { content: ""; position: fixed; inset: 0; z-index: 9; background: rgba(15, 23, 42, .4);
                              backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@media (max-width: 820px) {
  /* шаги «Как мы покупаем машину» — кружок слева от текста, плотнее */
  .steps { gap: 18px; margin-top: 24px; }
  .step { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; align-items: start; }
  .step-n { grid-row: span 2; width: 36px; height: 36px; margin: 0; font-size: 15px; line-height: 1; }
  .step-t { margin: 6px 0 2px; }
  .step p { margin: 0; }
  /* подвал — плотнее по высоте */
  .foot { padding: 32px 0 24px; }
  .foot-in { gap: 24px; margin-bottom: 20px; }
  .foot-h { margin-bottom: 4px; }
  .foot-list { gap: 0; }
  .foot-list li { min-height: 40px; }
  .foot-list a { padding-block: 8px; }
}

/* ——— правки владельца 26.09, поздний вечер ——— */
/* MAX — третья кнопка связи (шапка и подвал), фирменный градиент мессенджера */
.btn-max { background: #2563eb; color: #fff; }
.btn-max:hover { filter: brightness(.94); }

@media (max-width: 820px) {
  /* шаги на телефоне — лента, как на компьютере, только вертикальная: кружки связаны линией,
     срок — плашкой рядом с названием, текст мельче */
  .step { padding-bottom: 4px; }
  .step:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: -18px; width: 2px; background: var(--line); }
  .step-t { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 7px 0 4px; font-size: 16px; }
  .step-d { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bg-alt); font-size: 12px; }
  .step p { font-size: 14px; line-height: 1.5; }
}

@media (max-width: 520px) {
  /* отзывы на телефоне: лента во всю ширину экрана (край не режется о поля), карточки одной высоты,
     под лентой полоска прогресса вместо точек-страниц */
  #reviews .sec-head { gap: 12px; }
  #reviews .rating { padding: 8px 14px; gap: 8px; }
  #reviews .rating-v { font-size: 19px; }
  #reviews .rating-l { font-size: 13px; }
  .rev-pages { margin: 16px -16px 0; padding: 0 16px 4px; scroll-padding: 0 16px; align-items: stretch; }
  .rev-pages .review { flex: 0 0 86%; padding: 18px; box-shadow: var(--shadow); border-color: transparent; }
  .review-top { margin-bottom: 8px; }
  .review blockquote { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
  .review blockquote.clamp { -webkit-line-clamp: 6; }
  .rev-more { margin: -4px 0 12px; }
  .review figcaption { font-size: 13px; }
}
/* подвал: три кнопки мессенджеров столбиком одной ширины (в строку MAX переносился отдельно), на телефоне — во всю ширину */
.foot-btns { display: grid; max-width: 240px; }
@media (max-width: 520px) { .foot-btns { max-width: none; } }
/* шаги на телефоне: кружок по центру всего шага, а не первой строки; линия идёт через центры кружков */
@media (max-width: 820px) {
  .step { padding-bottom: 0; }
  .step-n { align-self: center; }
  .step::after, .step:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 0; bottom: -18px; width: 2px; background: var(--line); }
  .step:first-child::after { top: 50%; }
  .step:last-child::after { bottom: 50%; }
}
/* отзыв целиком — во всплывающем окне поверх затемнённой страницы (index.html, #rev-dlg) */
.rev-dlg { width: min(560px, calc(100% - 32px)); max-height: calc(100svh - 64px); padding: 0; border: 0; border-radius: var(--r);
  background: #fff; box-shadow: 0 24px 48px rgba(15, 23, 42, .25); overscroll-behavior: contain; }
.rev-dlg::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.rev-dlg .review { border: 0; box-shadow: none; padding: 20px 20px 24px; }
.rev-dlg .review-top { padding-right: 40px; }
.rev-dlg .review blockquote { font-size: 15px; }
.rev-dlg-x { position: absolute; top: 8px; right: 8px; z-index: 1; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--bg-alt); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.motion .rev-dlg[open] { animation: rev-in .25s var(--ease-out); }
@keyframes rev-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* история по страховой базе (car.html #history): итог плашкой .verdict, как у кузова; сводка — одна
   карточка на 4 ячейки с разделителями; перерыв в страховке — жёлтой плашкой; случаи — лентой в карточке */
.verdict-warn .verdict-i { background: #c27d0e; }
.hist-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--r-sm); overflow: hidden; }
.hs { padding: 14px 16px; box-shadow: -1px 0 0 var(--line); }
.hs-v { font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.hs-l { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hs-s { font-size: 13px; font-weight: 700; margin-top: 4px; }
.hs-s span { display: block; font-weight: 500; color: var(--muted); }   /* «выплатила страховая» над суммой (22.10) */
.hist-gap { margin-top: 16px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: 14px; }
.hist-gap b { white-space: nowrap; }
.hist-gap-s { margin-top: 2px; font-size: 13px; }
.acc-list { list-style: none; margin: 8px 0 0; padding: 4px 16px; background: #fff; border-radius: var(--r-sm); }
.acc-i { display: grid; grid-template-columns: 10px 1fr auto; column-gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.acc-i:last-child { border-bottom: 0; }
.acc-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; }
.acc-dot.own { background: var(--bad); } .acc-dot.other { background: #f5a524; }
.acc-t { font-weight: 700; font-size: 15px; }
.acc-date, .acc-parts { font-size: 13px; color: var(--muted); }
.acc-sum { text-align: right; font-weight: 800; font-size: 15px; white-space: nowrap; }
.acc-sum span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.hist-note { margin: 12px 0 0; }
@media (max-width: 820px) {
  .hist-stats { grid-template-columns: 1fr 1fr; }
  .hs { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
}

/* ——— фильтры каталога, 26.09 ночь: поиск с подсказками, выпадашки с поиском и числом машин,
   диапазоны у цены/пробега/мощности, «таблетки» топлива/коробки/кузова, выбранное — чипами над списком,
   на телефоне фильтры — шторкой на весь экран с кнопкой «Показать» внизу ——— */
.csel-list li.zero { color: var(--muted); }
.csel-list li[hidden] { display: none; }
.csel-n { margin-left: auto; padding-left: 8px; font-weight: 500; font-size: 13px; color: var(--muted); }
.csel-q { display: block; width: calc(100% - 12px); margin: 6px 6px 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: var(--r-xs); font: inherit; font-size: 15px; background: var(--bg-alt); }
.csel-q:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: #fff; }

.cat-search { position: relative; max-width: 640px; margin: 0 0 20px; }
.cat-search[hidden], html:not(.js) .cat-search { display: none; }
.cs-i { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: var(--muted);
  stroke-width: 2; stroke-linecap: round; pointer-events: none; }
#cat-q { width: 100%; min-height: 52px; padding: 0 16px 0 46px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font: inherit; font-size: 16px; box-shadow: var(--shadow); }
#cat-q:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.cat-sg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 31; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line), 0 16px 40px rgba(14,23,38,.18); }
.cat-sg[hidden] { display: none; }
.cat-sg li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: var(--r-xs); cursor: pointer; font-weight: 600; }
.cat-sg li[aria-selected="true"] { background: var(--bg-alt); }
.cat-sg li b { margin-left: auto; font-weight: 500; font-size: 13px; color: var(--muted); }
.cat-sg .sg-none { color: var(--muted); font-weight: 500; cursor: default; }

.filters { gap: 18px; }
.f-head { display: none; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .fpill { position: relative; display: inline-flex; margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.fpill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fpill span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.fpill span i { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); }
@media (hover: hover) { .fpill:hover span { box-shadow: inset 0 0 0 1px #8b95a7; } }
.fpill input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.fpill input:checked + span i { color: #c5cedc; }
.fpill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.fpill.zero span { opacity: .5; }
/* «Проходные, 3–5 лет» не ломаем; всем пилюлям nowrap нельзя — «Без ДТП и страховых» в сетке на 390 вылезает (24.10) */
.fpill input[name=passable] + span { white-space: nowrap; }
.pills-more { display: contents; }
.pills-more > summary { list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.pills-more > summary::-webkit-details-marker { display: none; }
.pills-more[open] > summary { display: none; }
.f-foot { display: flex; flex-direction: column; gap: 10px; }
.f-foot .btn { width: 100%; }
.f-reset { align-self: center; font-size: 14px; font-weight: 700; color: var(--muted); }

.active-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.af { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px 0 14px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.af i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.18);
  font-style: normal; font-size: 14px; line-height: 1; }
@media (hover: hover) { .af:hover i { background: rgba(255,255,255,.3); } }
.af-reset { font-size: 14px; font-weight: 700; color: var(--ink); padding: 8px 4px; }

@media (max-width: 820px) {
  .cat-search { margin-bottom: 12px; }
  #cat-q { min-height: 48px; }
  .active-f { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
  .active-f::-webkit-scrollbar { display: none; }
  .af, .af-reset { flex: none; min-height: 40px; }
  /* шторка фильтров на весь экран: список прокручивается, «Показать N» всегда внизу */
  .filters-wrap:has(.filters-d[open]) .filters { position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 0; padding: 0 16px; gap: 18px; background: var(--bg-alt); }
  .f-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2;
    margin: 0 -16px; padding: 8px 8px 8px 16px; background: var(--bg-alt); box-shadow: 0 1px 0 var(--line); font-size: 18px; }
  .f-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; }
  .f-foot { position: sticky; bottom: 0; z-index: 2; margin: auto -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-alt); box-shadow: 0 -1px 0 var(--line); flex-direction: row-reverse; align-items: center; }
  .f-foot .btn { flex: 1; }
  .band, .fpill span { min-height: 44px; }
}
.f-note { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }

/* ——— правки 26.09, поздняя ночь ——— */
/* системная синяя подсветка касания на телефоне оставалась поверх открывшейся шторки фильтров */
html { -webkit-tap-highlight-color: transparent; }
/* варианты топлива/коробки/кузова — ровной сеткой: в колонке фильтров по одному, на телефоне по два */
.pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.filters .fpill { display: flex; }
.fpill span { flex: 1; justify-content: space-between; min-height: 40px; padding: 8px 14px; border-radius: var(--r-sm); line-height: 1.25; }
.pills-more > summary { justify-content: center; min-height: 40px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); background: none; }
@media (max-width: 820px) { .fpill span, .pills-more > summary { min-height: 44px; } }
/* открытое «Ещё»: display: contents у details Chrome не отдаёт содержимое в сетку — кнопки слипались (11.10).
   Открытый блок — своя такая же сетка на всю ширину */
.pills-more[open] { display: grid; grid-column: 1 / -1; grid-template-columns: inherit; gap: inherit; }
/* подвал: кнопка «наверх» не накрывает текст, после него — воздух */
.foot { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
@media (max-width: 820px) { .foot .wrap.small { padding-right: 64px; } }
/* «Связаться» — окно выбора мессенджера: на телефоне листом снизу, на компьютере по центру */
.cdlg { width: min(420px, calc(100% - 32px)); padding: 20px; border: 0; border-radius: var(--r); background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, .25); }
.cdlg::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cdlg-top { display: flex; align-items: center; justify-content: space-between; font-size: 18px; }
.cdlg-x { width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; border-radius: 50%; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink); }
.cdlg-s { margin: 2px 0 16px; font-size: 14px; color: var(--muted); }
.cdlg-list { display: grid; gap: 10px; }
form.lead { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e5e7eb; }
.lead-h { margin: 0; font-size: 14px; color: var(--muted); }
.lead input { width: 100%; font-size: 16px; }   /* 16px — иначе iOS увеличивает страницу при фокусе */
.lead textarea { width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid #8b95a7; border-radius: var(--r-xs);
  font: inherit; font-size: 16px; resize: vertical; }
.lead textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.lead-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.lead-msg { margin: 0; font-size: 14px; }
.lead-msg:empty { display: none; }
.lead-msg.err { color: #b91c1c; }
.buy-btns .btn-primary { width: 100%; }
.mbar-btns .btn-primary { padding: 0 22px; }
/* на телефоне — листом СВЕРХУ (владелец: окна с полями ввода — сверху): клавиатура снизу его не закрывает. Высота —
   по видимой части экрана (dvh + interactive-widget=resizes-content в base.html), дальше окно прокручивается */
.motion .cdlg[open] { animation: rev-in .25s var(--ease-out); }
@media (max-width: 520px) {
  .cdlg { width: 100%; max-width: none; margin: 0 0 auto; border-radius: 0 0 var(--r) var(--r);
    padding-top: calc(20px + env(safe-area-inset-top)); max-height: 100dvh; overflow-y: auto; }
  .motion .cdlg[open] { animation: sheet-top .25s var(--ease-out); }
}
@keyframes sheet-top { from { opacity: 0; transform: translateY(-24px); } }
/* стрелки полосы миниатюр на странице машины: только там, где есть мышь; на телефоне листают пальцем */
.thumbs-wrap { position: relative; }
.t-nav { position: absolute; top: calc(50% - 2px); z-index: 2; width: 36px; height: 36px; margin-top: -18px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.95); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.t-nav[hidden] { display: none; }
.t-prev { left: 6px; } .t-next { right: 6px; }
@media (hover: none) { .t-nav { display: none; } }

/* ——— визуальный аудит 26.09 ночь ——— */
/* касания ≥44px на телефоне: быстрые ссылки марок на главной и «Читать целиком» у отзывов */
@media (max-width: 820px) {
  .hero-quick a { min-height: 44px; }
  .rev-more { padding: 12px 0; margin: -18px 0 4px; }
}
/* вкладки карточки машины на телефоне: не влезают — правый край гаснет, видно, что ленту можно листать */
@media (max-width: 820px) {
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
          padding-right: 40px; }
}
.card-price .price { white-space: nowrap; line-height: 1.2; }
@media (min-width: 1081px) and (max-width: 1180px) { .card-price .price { font-size: 20px; } }
.csel-none { padding: 12px 10px; font-size: 14px; color: var(--muted); }
.csel-none[hidden] { display: none; }
@media (max-width: 820px) { .bchip { min-height: 44px; } }

/* 28.09: три страны */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* слово в заголовке главной по кругу: все варианты в одной ячейке */
/* ширина — по текущему слову (ставит скрипт), «под заказ» подъезжает следом без дыры */
.rot { display: inline-grid; grid-template-columns: 100%; transition: width .5s var(--ease-out); }
.rot > em::before { content: attr(data-t); }   /* слово не в тексте h1 (24.10) */
.rot > em { grid-area: 1 / 1; justify-self: start; transition: opacity .45s var(--ease-out), transform .6s var(--ease-out), filter .45s var(--ease-out); }
.rot > em:not(.on) { opacity: 0; transform: translateY(.3em); filter: blur(6px); }
.rot > em.out { transform: translateY(-.3em); }
@media (prefers-reduced-motion: reduce) { .rot > em { transition: opacity .2s; transform: none !important; filter: none !important; } }
/* переключатель страны (калькулятор, каталог): --n равных ячеек, подложка выбранной едет — --i её номер */
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); padding: 4px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--line); isolation: isolate; }
.seg::before { content: ""; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 3));
  border-radius: 999px; background: var(--ink); transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .3s var(--ease-out); }
.seg > a, .seg > label { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 0; min-height: 40px;
  padding: 0 8px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-2); text-decoration: none;
  cursor: pointer; transition: color .2s; -webkit-user-select: none; user-select: none; }
.seg > a.on, .seg > label:has(input:checked) { color: #fff; }
/* радио — на всю ячейку (под подписью): фокус и касание — по всей кнопке, не по точке в углу (аудит 22.10) */
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.seg > label:has(input:focus-visible), .seg > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .seg > a:not(.on):hover, .seg > label:not(:has(input:checked)):hover { color: var(--ink); } }
.calc-form .seg { grid-column: 1 / -1; }
/* в узкой колонке фильтров пять стран (с Японией, 05.10): мельче и без полей, иначе «Япония» вылезала за край */
.f-country .seg { padding: 3px; }
.f-country .seg::before { top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 3)); }
.f-country .seg > a { min-height: 36px; padding: 0; font-size: 12px; letter-spacing: -.01em; }
.f-l { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
/* страна вывоза на фото карточки — справа сверху, «Проходная» слева */
.tag-c { left: auto; right: 12px; background: rgba(255,255,255,.92); color: var(--ink); }
.show-ph { position: relative; }

/* электромобиль — справа снизу на фото карточки */
.tag-ev { left: auto; top: auto; right: 12px; bottom: 12px; background: #0f7a3d; }
/* оценка guazi: цвет буквы по оценке — один и тот же в строке панели и в окне со шкалой */
.g-s { --g: #b7860b; } .g-a { --g: #1b8f4a; } .g-b { --g: #1c74a3; } .g-c { --g: #c2410c; } .g-d { --g: var(--accent); }
.grade-l { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--r-xs);
  background: var(--g); color: #fff; font-size: 18px; font-weight: 800; line-height: 1; }
.grade-b { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit;
  font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
@media (hover: hover) { .grade-b:hover { color: var(--ink); } }
.gdlg { width: min(560px, calc(100% - 32px)); max-height: min(86vh, 900px); }
.gdlg-list { display: grid; gap: 10px; }
.gd { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; padding: 14px 16px;
  border-radius: var(--r-sm); background: var(--bg-alt); border: 2px solid transparent; }
.gd.on { border-color: var(--g); }
.gd-l { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r-sm); background: var(--g);
  color: #fff; font-size: 28px; font-weight: 800; line-height: 1; }
.gd dl { margin: 0; font-size: 14px; }
.gd dt { font-weight: 800; }
.gd dd { margin: 0 0 8px; color: var(--ink-2); }
.gd dd:last-child { margin-bottom: 0; }
.cdlg-top + .cdlg-list { margin-top: 16px; }
/* заголовок окна оценки не уезжает при прокрутке шкалы (на телефоне окно открыто сразу на оценке машины) */
.gdlg .cdlg-top { position: sticky; top: -20px; z-index: 1; margin: -20px -20px 0; padding: 20px 20px 8px; background: #fff; }
/* аудит 27.09 */
.show-ph .tag { z-index: 1; }           /* картинка карусели с transform рисуется поверх чипа страны */
@media (max-width: 520px) { .gdlg { width: 100%; } }    /* нижний лист на всю ширину, как «Связаться» */
@media (max-width: 820px) { .seg > a, .seg > label, .f-country .seg > a { min-height: 44px; } }

.ask-more { margin: 0 0 12px; padding: 10px 16px; border-radius: var(--r-xs); background: var(--bg-alt); font-size: 15px; }
.ask-more a { font-weight: 700; color: var(--ink); }
/* ссылка в плашке — зона нажатия 44px без роста плашки (17.10: была 68×21) */
.ask-more a { display: inline-block; padding: 12px 8px; margin: -12px -8px; }

/* ── аудит вёрстки 08.10 (Playwright, 360–1366 px) ── */
.csel-q { font-size: 16px; }                            /* поиск в выпадашке: мельче 16px iOS зумит страницу */
@media (max-width: 380px) {                             /* «Подобрать на аукционе» у Японии вылезала за экран на 17px */
  .mbar-btns .btn-primary { padding: 0 12px; }
  .mbar-btns .btn-primary svg { display: none; }
}
body:has(.mbar) .foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }   /* панель 95–98px, не 75 */
@media (max-width: 820px) {
  .to-top { width: 40px; height: 40px; }   /* закрывала итог калькулятора и текст */
  .to-top.on { opacity: .8; }              /* 17.10: .8 без .on держала кнопку видимой всегда, поверх цены */
  .link-more, .rows-v a { display: inline-block; padding-block: 10px; }   /* тап-цели были 21–24px */
}
@media (max-width: 400px) { .calc-form label:has(select[name="engine"]) { grid-column: 1 / -1; } }   /* «Бензин / дизел» */
.cdlg { overscroll-behavior: contain; }                /* свайп в окне «Связаться» не уезжает в страницу */
html:has(dialog[open]) { overflow: hidden; }
/* страны в боковой колонке каталога (~240px): 5 пунктов в одну строку не помещались — подложка выбранной наезжала
   на соседей, «Европа» обрезалась. На десктопе — 3 + 2, выбранная — своим фоном, без едущей подложки */
/* 17.10: в одну строку — ячейки по ширине слова, поля меньше (3 + 2 смотрелось переносом) */
/* 22.10: 13px впритык друг к другу читались плохо — на компьютере страны кнопками-«таблетками» с переносом, как
   чипы марок над списком: 14px, касание 36px, выбранная — тёмная */
@media (min-width: 821px) {
  .f-country .seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; border: 0; background: none; }
  .f-country .seg::before { display: none; }
  .f-country .seg > a { min-height: 36px; padding: 0 14px; font-size: 14px; letter-spacing: 0; background: #fff;
    box-shadow: inset 0 0 0 1px var(--line); }
  .f-country .seg > a.on { background: var(--ink); box-shadow: none; }
}

/* ── UI/UX-аудит 4 агентами, 09.10 ── */
/* к содержимому — первым по Tab, виден только в фокусе */
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; border-radius: var(--r-xs);
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus, #cat-h:focus { outline: none; }
/* шапка на телефоне: звонок и «Написать» (окно со всеми мессенджерами и заявкой); правила — ниже, «шапка на компьютере» */
.top-tel { display: none; }
/* первый экран: страны с числом машин; быстрые ссылки на телефоне — лентой пальцем, как чипы марок каталога */
.hero-countries { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 16px; font-size: 15px; font-weight: 700; }
.hero-countries a { text-decoration: none; padding-block: 6px; }
.hero-countries span { color: var(--muted); font-weight: 500; }
@media (hover: hover) { .hero-countries a:hover { text-decoration: underline; } }
@media (max-width: 520px) {
  .hero-quick { flex-wrap: nowrap; overflow-x: auto; margin: 16px -16px 0; padding: 0 16px 4px;
    scrollbar-width: none; overscroll-behavior-x: contain; }
  .hero-quick::-webkit-scrollbar { display: none; }
  .hero-quick a { flex: none; }
}
/* каталог: сортировка выпадашкой в строке с «Проходными»; страна вне формы — на компьютере верх той же панели */
.sort-sel { flex-direction: row; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sort-sel select { width: auto; min-height: 40px; font-size: 15px; font-weight: 700; }
/* телефон: сортировка первой в одной ленте с чипами — выбранная видна целиком, чипы листаются пальцем
   (17.10: была отдельной строкой, до первой машины ~760px). Подпись «Сортировка» — только для скринридера;
   «Страна» видна, как на других ширинах (22.10) */
@media (max-width: 520px) {
  .sortbar { margin-bottom: 12px; }
  .sort-sel { order: -1; flex: none; margin-left: 0; }
  .sort-sel > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sort-sel select { min-height: 44px; }
  .sortbar .chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; }
}
@media (min-width: 821px) {
  .filters-wrap { gap: 0; }
  .filters-wrap > .f-country { padding: 20px 20px 0; border-radius: var(--r) var(--r) 0 0; background: var(--bg-alt); }
  .filters-wrap > .f-country ~ .filters { border-radius: 0 0 var(--r) var(--r); }
}
/* пустая выдача: без какого фильтра сколько машин */
.relax { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 4px; }
.relax a { display: inline-block; padding-block: 10px; font-weight: 700; }
.cat-sg .sg-none { display: block; padding: 10px; line-height: 1.4; }
.cat-sg .sg-h { min-height: 32px; color: var(--muted); font-weight: 600; font-size: 14px; cursor: default; }
.sg-ask { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; cursor: pointer; }
/* страница машины: «← К результатам», доверие под разбивкой цены, Япония — цена с налогом под кнопкой */
.crumb-back[hidden] { display: none; }
.crumbs .crumb-back { color: var(--ink); font-weight: 700; margin-right: 8px; }
.buy-trust { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px;
  font-size: 14px; color: var(--ink-2); }
.buy-trust a { color: var(--ink); font-weight: 700; }
.buy-jp { margin: -4px 0 8px; }
.mbar-pr { min-width: 0; }
.mbar .price-city, .mbar .plus-tax { line-height: 1.3; }
.bt-short { display: none; }
/* до 400px: на 390 длинная кнопка сжимала подпись «ориентир под ключ…» в 3 строки (аудит 24.10) */
@media (max-width: 400px) { .bt-long { display: none; } .bt-short { display: inline; } }
/* частые вопросы: справа «Не нашли ответ?» с кнопкой связи */
.faq-wrap { max-width: none; display: grid; grid-template-columns: minmax(0, 860px) 280px; gap: 0 40px; align-items: start; }
.faq-wrap h2 { grid-column: 1 / -1; }
.faq-ask { position: sticky; top: 96px; padding: 24px; border-radius: var(--r); background: var(--bg-alt); }
.faq-ask b { display: block; font-size: 18px; margin-bottom: 6px; }
.faq-ask p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 1080px) { .faq-wrap { grid-template-columns: 1fr; } .faq-ask { position: static; margin-top: 16px; } }
/* окно заявки: подписи над полями, часы звонка, согласие на обработку данных */
form.lead label { gap: 4px; }
.lead-s { margin: 0; font-size: 14px; color: var(--ink-2); }
.lead-ok { margin: 0; font-size: 12px; color: var(--muted); }
.lead-ok a { color: var(--ink-2); }
/* политика обработки данных */
.legal { max-width: 760px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p { color: var(--ink-2); }

/* Страница машины: карточка цены липнет, только если влезает в окно (.tall — скрипт в car.html), иначе едет со
   страницей; своей прокрутки у неё нет (владелец 10.10). Доверие — панелью #trust в основной колонке */
.buy-col { min-width: 0; align-self: stretch; }
.buy-stack { position: sticky; top: 88px; }
.buy-stack.tall { position: static; }
.buy { position: static; max-height: none; overflow: visible; }
#trust .buy-trust { margin: 0; padding: 0; border-top: 0; gap: 10px; font-size: 15px; }
@media (max-width: 820px) {
  .buy-col, .buy-stack { display: contents; }
}

/* карточка цены компактнее (владелец 10.10: «подужмем по высоте») — подписи разбивки в одну строку, меньше отступов */
.buy { padding: 20px 22px; }
.buy .buy-price { font-size: 30px; margin-top: 2px; }
.buy .plus-tax { font-size: 13px; }
.buy .buy-btns { margin: 12px 0 8px; }
.buy .btn-lg { min-height: 44px; }
.buy .calc-h { font-size: 14px; margin: 6px 0 0; }
.buy .breakdown { font-size: 13px; }
.buy .breakdown td { padding: 4px 0; line-height: 1.35; }
.buy .breakdown .total td { font-size: 16px; padding-top: 8px; }
.buy .breakdown .total .plus-tax { font-size: 12px; }
.buy .calc-d p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; }

/* галочка согласия в форме заявки (152-ФЗ, с 01.09.2025 — отдельно от других документов) */
/* 22.10: галочка 24px, подпись — часть цели касания; ссылка на текст согласия — отдельной строкой под подписью */
.lead-cb { display: grid; gap: 2px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
form.lead .lead-cb label { display: flex; flex-direction: row; gap: 10px; align-items: center; min-height: 32px; font-size: 13px;
  font-weight: 400; color: var(--ink-2); cursor: pointer; }
form.lead .lead-cb input { width: 24px; height: 24px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
.lead-cb a { justify-self: start; margin-left: 34px; padding-block: 6px; color: var(--ink); }

/* юр. страницы: телефон и почта не рвутся посередине (владелец 10.10) */
.legal a[href^="tel:"], .legal a[href^="mailto:"] { white-space: nowrap; }

/* шапка на компьютере и планшете — как на телефоне (владелец 10.10, 15.10): номер и «Написать». Трёх кнопок
   мессенджеров в шапке нет совсем — они в окне «Написать» и в подвале. До 820px номера нет — значок трубки */
.top-cta .top-write { padding: 0 18px; }
@media (max-width: 820px) {
  .top-tel { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line); }
  .top-tel .bi { width: 20px; height: 20px; }
}

/* окно «Написать»: три мессенджера в один ряд, телефон — строкой под ними (владелец 10.10: компактнее) */
.cdlg-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cdlg-list .btn-wa, .cdlg-list .btn-tg, .cdlg-list .btn-max { padding: 0 8px; gap: 6px; font-size: 15px; min-width: 0; }
.cdlg-list .btn-outline { grid-column: 1 / -1; }
@media (max-width: 380px) {
  .cdlg-list .btn-wa, .cdlg-list .btn-tg, .cdlg-list .btn-max { flex-direction: column; gap: 2px; font-size: 13px; min-height: 60px; }
}

/* номер в шапке выглядел обычным текстом (владелец 10.10): значок трубки, при наведении — цвет и подчёркивание */
.top-cta .phone { align-items: center; gap: 6px; padding: 8px 4px; transition: color .15s; }
/* display только с 821px: без медиазапроса правило перебивало .phone {display:none} телефона (≤820) — номер,
   трубка и «Написать» сразу, страница уезжала вбок (аудит 10.10) */
@media (min-width: 821px) { .top-cta .phone { display: inline-flex; } }
.top-cta .phone .bi { width: 16px; height: 16px; color: var(--accent); }
@media (hover: hover) { .top-cta .phone:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; } }

/* заявка отправлена: поля прячем, показываем итог (base.html, класс done ставит скрипт формы) */
.lead-done { display: none; }
form.lead.done > :not(.lead-done) { display: none; }
form.lead.done .lead-done { display: grid; justify-items: center; gap: 6px; padding: 12px 0 4px; text-align: center; outline: none; }
.lead-done svg { width: 48px; height: 48px; color: #16a34a; }
.lead-done p { margin: 0; color: var(--ink-2); }
.lead-done .lead-done-h { font-size: 20px; font-weight: 700; color: var(--ink); }
.lead-done .btn { margin-top: 8px; }

/* фото крупно на странице машины (car.html, окно #lbox): на весь экран по тёмному фону, кадр целиком.
   Стрелки и счётчик — те же .g-nav / .g-count, что у галереи, но видны всегда */
.gallery-main img { cursor: zoom-in; }
/* фокус с клавиатуры: обводка внутрь — снаружи её срезает overflow: hidden галереи; стрелки видны, как при наведении */
.gallery-main img:focus-visible { outline: none; }
/* рамка фокуса — поверх галереи: у img её срезал бы overflow, пока кадр увеличен под размытием (.wait) */
.gallery-main:has(img:focus-visible)::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--accent); pointer-events: none; }
.gallery-main:has(img:focus-visible) .g-nav { opacity: 1; }
.lbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0b0f17; overflow: hidden; overscroll-behavior: contain; }
.lbox::backdrop { background: transparent; }
/* ячейка сетки ровно в экран: с автоматической строкой max-height: 100% у кадра не срабатывал —
   на телефоне боком кадр вылезал за экран по высоте */
.lbox-stage { position: absolute; inset: 0; display: grid; grid-template: 100% / 100%; place-items: center; touch-action: none; }
.lbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.lbox .g-nav { z-index: 1; opacity: 1; }
/* щипок, начатый на кнопке, не масштабирует страницу под окном */
.lbox .g-nav, .lbox-x { touch-action: none; }
.lbox .g-count { z-index: 1; right: 50%; transform: translateX(50%); bottom: calc(16px + env(safe-area-inset-bottom)); }
.lbox-x { position: absolute; z-index: 1; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 28px; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow); }
.motion .lbox[open] { animation: lbox-in .2s var(--ease-out); }
@keyframes lbox-in { from { opacity: 0; } }
/* кадр 1200 ещё грузится (галерея и фото крупно, car.html shots.put): вместо него миниатюра 640 с размытием,
   сверху бегущая полоска; большой пришёл — размытие уходит. Крупно миниатюра растянута до размера кадра 1200 */
.gallery-main img, .lbox-stage img { transition: filter .22s var(--ease-out); }
.wait > img { filter: blur(8px); }
/* размытие по краю тянет фон галереи — светлая кромка; увеличенный кадр уводит её за overflow: hidden */
.gallery-main img { transition-property: filter, transform; }
.gallery-main.wait > img { transform: scale(1.05); }
/* рамка как у будущего кадра 1200: не шире 1200, экрана и высоты экрана × пропорции миниатюры (--ar из shots.put) */
.lbox-stage.wait img { width: min(1200px, 100%, 100dvh * var(--ar, 1.333)); }
.wait::after { content: ""; position: absolute; z-index: 1; top: 0; left: 0; width: 40%; height: 3px;
  background: var(--accent); pointer-events: none; }
/* быстрый кадр полоску не показывает: она проявляется через четверть секунды */
.motion .wait::after { opacity: 0; animation: wait-in 0s .25s forwards, wait-bar 1.1s linear infinite; }
.lbox-stage.wait::after { top: env(safe-area-inset-top); }
@keyframes wait-in { to { opacity: 1; } }
@keyframes wait-bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
/* телефон: стрелки внизу, в ряд со счётчиком — посередине их закрывал бы палец на фото */
@media (max-width: 520px) {
  .lbox .g-nav { top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); transform: none; }
  .lbox .g-nav:active { transform: scale(.92); }
}

/* ── аудит 17.10 ── */
/* 404 и другие короткие страницы: место под полосу прокрутки всегда, вёрстка не съезжает на 8px */
html { scrollbar-gutter: stable; }
/* электромобиль в карточке: «Двигатель Электро» одной строкой на всю ширину */
.card-specs .cs-wide { grid-column: 1 / -1; }
/* Япония: «Подобрать на аукционе» и «Связаться» — друг под другом, каждая во всю ширину */
.buy-btns:has(.btn-outline) { flex-direction: column; }
.buy-btns:has(.btn-outline) .btn { flex: none; width: 100%; }
/* окно «Написать»: заголовок заявки — как подписи полей, тёмным; плейсхолдеры одним начертанием */
.lead-h { font-size: 15px; font-weight: 700; color: var(--ink); }
.lead textarea { font-weight: 500; }
.lead ::placeholder { font-weight: 500; color: #8b95a7; }
/* главная внизу: «Подберём под ваш бюджет» после частых вопросов — .cta светлой плашкой, как «Не нашли ответ?»
   рядом: тёмная сливалась с тёмным подвалом */
.sec-cta { padding-top: 0; }
.sec-cta .cta { background: var(--bg-alt); color: var(--ink); }
.sec-cta .cta .muted { color: var(--ink-2); }
.cta h2 { margin-bottom: 8px; }
.cta p { max-width: 56ch; margin: 0; }
@media (max-width: 520px) {
  /* страны на первом экране — 2 × 2, а не «Япония» одна на второй строке */
  .hero-countries { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .hero-countries a { padding-block: 10px; }   /* зона нажатия 44px */
  .cta > .cta-btns { align-self: stretch; }
}
@media (max-width: 820px) {
  /* страница машины: над крошками была пустая полоса ~50px (отступ секции + зона нажатия крошек) */
  .sec-tight:has(> .wrap > .crumbs) { padding-top: 16px; }
  /* каталог: между «Фильтрами» и выдачей 16px, как между остальными рядами, а не 32px колонок компьютера */
  .cat { gap: 16px; }
  .crumbs { margin-top: -12px; }
  /* липкие вкладки — во всю ширину экрана, непрозрачные: маска гасила и фон, сквозь правый край просвечивал текст.
     Затухание справа — липким псевдоэлементом: своё место в конце ленты (без отрицательного отступа), поэтому
     дочитанную до конца или помещающуюся ленту не накрывает, а при прокрутке липнет к правому краю (24.10) */
  .tabs { margin: 0 -16px; padding: 8px 16px; -webkit-mask-image: none; mask-image: none; }
  .tabs::after { content: ""; position: sticky; right: 0; flex: none; width: 48px; margin: -8px 0;
    background: linear-gradient(90deg, rgba(255,255,255,0), #fff 70%); pointer-events: none; }
}
