:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --ink: #111214;
  --ink-2: #3a3c42;
  --muted: #74767d;
  --line: #e3e1da;
  --soft: #ecebe5;
  --max: linear-gradient(115deg, #2b6bff 0%, #6a45ff 55%, #a541ff 100%);
  --max-c: #5b4bff;
  --r: 18px;
  --sh: 0 1px 2px rgba(17, 18, 20, .04), 0 12px 32px -12px rgba(17, 18, 20, .14);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 Onest, system-ui, -apple-system, Segoe UI, sans-serif; padding-bottom: 86px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2 { margin: 0; letter-spacing: -0.025em; line-height: 1.12; font-weight: 700; }
svg { flex: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 40; background: rgba(244, 243, 239, .86); backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #000; }

.logo-t { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.1; letter-spacing: -0.01em; }
.logo-t small { font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.top-nav { display: none; gap: 22px; margin-left: 12px; font-weight: 500; color: var(--ink-2); }
.top-nav a:hover { color: var(--ink); }
.top-ch { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.top-ch svg { width: 20px; height: 20px; color: var(--ink); }
.top-ch b { color: var(--ink); font-weight: 700; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 22px; border-radius: 14px; font-weight: 600; font-size: 16px; letter-spacing: -0.005em; border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, filter .2s; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 22px; height: 22px; }
.btn:active { transform: scale(.985); }
.btn-max { background: var(--max); color: #fff; box-shadow: 0 10px 24px -10px rgba(91, 75, 255, .8); }
.btn-max:hover { filter: brightness(1.06); box-shadow: 0 14px 30px -10px rgba(91, 75, 255, .9); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2c31; }
.btn-light { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-light svg { width: 18px; height: 18px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 14px; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* карточка машины: раскладка */
.car-grid { display: grid; gap: 20px; padding-top: 0; }
@media (min-width: 720px) { .car-grid { padding-top: 24px; } }
.car-main { display: contents; }
.gal { order: 1; }
.panel { order: 2; }
.car-main > .block, .car-main > .mgr-card { order: 3; }

/* галерея */
.gal-frame { position: relative; margin: 0 -16px; background: #ddd; overflow: hidden; }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: center; }
.gal-n { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 9px; background: rgba(17, 18, 20, .72); color: #fff; font-size: 13px; font-weight: 600; }
.gal-btn { display: none; position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; box-shadow: var(--sh); place-items: center; }
.gal-btn svg { width: 20px; height: 20px; }
.gal-btn.prev { left: 14px; } .gal-btn.prev svg { transform: rotate(180deg); }
.gal-btn.next { right: 14px; }
.gal-thumbs { display: none; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gal-thumbs::-webkit-scrollbar { display: none; }
.gal-thumbs button { flex: 0 0 92px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s; }
.gal-thumbs button.on { border-color: var(--ink); opacity: 1; }
.gal-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* панель цены */
.panel { background: var(--surface); border-radius: var(--r); padding: 22px 20px; box-shadow: var(--sh); }
.panel-k { margin: 0 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.panel h1 { font-size: clamp(26px, 6vw, 34px); }
.panel-sub { margin: 6px 0 0; color: var(--muted); }
.price { margin: 18px 0 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.price b { display: block; font-size: clamp(38px, 9vw, 46px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.price span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.keys div { padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.keys b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keys span { font-size: 12px; color: var(--muted); }
.cta { display: grid; gap: 10px; }
.panel-note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.panel-note svg { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }

/* блоки */
.block { margin-top: 36px; }
.block h2 { font-size: clamp(22px, 4.6vw, 30px); margin-bottom: 16px; }
.block-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.block-h h2 { margin: 0; }
.block-h a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.car-main > .block { margin-top: 16px; background: var(--surface); border-radius: var(--r); padding: 22px 20px; }
.car-main > .block h2 { font-size: 22px; }

.hl { display: grid; gap: 12px; }
.hl p { margin: 0; padding-left: 16px; border-left: 3px solid var(--soft); color: var(--ink-2); }

.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.specs div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 13px; color: var(--muted); }
.specs dd { margin: 2px 0 0; font-weight: 600; }

.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 24px; }
.opts li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.opts svg { width: 18px; height: 18px; color: var(--ink); margin-top: 3px; }
.opts.clip li:nth-child(n + 11) { display: none; }
.opts-more { margin-top: 16px; padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; font-weight: 600; cursor: pointer; }

.mgr-card { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; padding: 22px 20px; border-radius: var(--r); background: var(--surface); color: var(--ink); }
.mgr-ava { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--ink); font-weight: 700; font-size: 22px; }
.mgr-t b { display: block; font-size: 18px; }
.mgr-t span { font-size: 14px; color: var(--muted); }
.mgr-t p { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.mgr-card .btn { grid-column: 1 / -1; }

/* как купить */
.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.how li { counter-increment: s; position: relative; padding: 20px 20px 20px 70px; background: var(--surface); border-radius: var(--r); }
.how li::before { content: "0" counter(s); position: absolute; left: 20px; top: 19px; font-weight: 800; font-size: 22px; letter-spacing: -0.04em; background: var(--max); -webkit-background-clip: text; background-clip: text; color: transparent; }
.how b { display: block; font-size: 17px; font-weight: 600; }
.how span { color: var(--muted); font-size: 15px; }

/* канал */
.chan { margin-top: 36px; display: grid; gap: 24px; padding: 26px 20px; border-radius: 24px; background: var(--surface); color: var(--ink); overflow: hidden; position: relative; }

.chan-l { position: relative; }
.chan-h { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.chan-ic { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #000; }
.chan-h b { display: block; font-size: 16px; } .chan-h span { font-size: 13px; color: var(--muted); }
.chan h2 { font-size: clamp(24px, 5vw, 36px); }
.chan p { margin: 12px 0 0; color: var(--ink-2); max-width: 520px; }
.chan-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 28px; margin: 22px 0 24px; }
.chan-stats b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.chan-stats span { font-size: 13px; color: var(--muted); }
.chan-r { position: relative; display: grid; gap: 10px; }
.chan-post { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--bg); border: 0; }
.chan-post img { width: 72px; height: 54px; border-radius: 9px; object-fit: cover; }
.chan-post b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.chan-post span { font-size: 13px; color: var(--ink); font-weight: 700; }
.chan-post:nth-child(n + 4) { display: none; }

/* карточки */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--sh); transform: translateY(-2px); }
.card-img { position: relative; }
.card-img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.card-n { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 7px; background: rgba(17, 18, 20, .7); color: #fff; font-size: 12px; font-weight: 600; }
.card-b { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-t { font-weight: 600; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-m { color: var(--muted); font-size: 13px; }
.card-f { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; }
.card-f b { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.card-f span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); }
.card-f svg { width: 16px; height: 16px; }
.card:hover .card-f span { background: var(--ink); color: #fff; }

/* витрина */
.ihero { padding: 32px 0 28px; }
.ihero-in { display: grid; gap: 28px; }
.ihero h1 { font-size: clamp(34px, 8.5vw, 64px); letter-spacing: -0.04em; line-height: 1.02; }
.ihero h1 span { display: block; }
.ihero-sub { margin: 16px 0 0; font-size: 17px; color: var(--ink-2); max-width: 540px; }
.cta-row { margin-top: 24px; }
.ihero-r { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: auto auto; gap: 10px; }
.ih-card { position: relative; border-radius: 18px; overflow: hidden; background: #ccc; }
.ih-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.ih-0 { grid-row: span 2; } .ih-0 img { aspect-ratio: auto; position: absolute; inset: 0; }
.ih-card div { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); }
.ih-card b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ih-card span { font-size: 13px; font-weight: 700; }
.filters { padding: 8px 0 4px; display: grid; gap: 8px; }
.f-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.f-row::-webkit-scrollbar { display: none; }
.f-row button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: 14px; cursor: pointer; }
.f-row button i { font-style: normal; color: var(--muted); font-size: 13px; }
.f-row button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.f-row button.on i { color: #9a9ca3; }
.found { margin: 14px 0 12px; color: var(--muted); font-size: 14px; }
.found b { color: var(--ink); }
.card.hide { display: none; }

/* липкая панель */
.sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .25s; }
.sticky.one { grid-template-columns: 1fr; }
.sticky.show { transform: none; }
.sticky .btn { min-height: 50px; font-size: 15px; padding: 0 16px; }
.sticky .sq { width: 50px; padding: 0; }
.sticky-p { min-width: 0; }
.sticky-p b { display: block; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.sticky-p span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.foot { margin-top: 56px; padding: 32px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-in { display: grid; gap: 12px; }
.foot p { margin: 0; max-width: 620px; }
.foot .small { font-size: 12px; }

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .opts { grid-template-columns: 1fr 1fr; }
  .how ol { grid-template-columns: repeat(2, 1fr); }
  .chan { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 40px; }
  .chan-post:nth-child(n + 4) { display: flex; }
  .mgr-card { grid-template-columns: auto 1fr auto; }
  .mgr-card .btn { grid-column: auto; }
  .gal-frame { margin: 0; border-radius: var(--r); }
  .cta-row { display: flex; flex-wrap: wrap; }
}
@media (min-width: 1000px) {
  body { padding-bottom: 0; }
  .top-nav { display: flex; }
  .car-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
  .car-main { display: block; }
  .panel { position: sticky; top: 84px; padding: 28px; }
  .gal-btn { display: grid; }
  .gal-thumbs { display: flex; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .how ol { grid-template-columns: repeat(4, 1fr); }
  .sticky { display: none; }
  .ihero { padding: 56px 0 40px; }
  .ihero-in { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
  .f-row { margin: 0; padding: 0 0 2px; flex-wrap: wrap; }
}

/* фото менеджера */
.mgr-ph { width: 72px; height: 72px; object-fit: cover; padding: 0; }
.btn-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255, 255, 255, .85); }
@media (min-width: 720px) { .mgr-ph { width: 88px; height: 88px; } }
.sq-ava { width: 34px; height: 34px; }

/* политика */
.legal { max-width: 760px; padding-top: 32px; }
.legal h1 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 16px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal p { color: var(--ink-2); margin: 0 0 10px; }
.foot a { text-decoration: underline; }

/* ===== выравнивание: единая шкала шрифтов, отступов и скруглений ===== */
:root { --fs-xs: 13px; --fs-s: 15px; --fs-m: 16px; --fs-h3: 20px; --fs-h2: 26px; --pad: 24px; --r: 16px; }
body { font-size: var(--fs-m); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.logo-t { font-size: var(--fs-m); }
.logo-t small, .top-ch, .panel-k, .price span, .keys span, .specs dt, .card-m, .chan-h span, .chan-stats span, .found, .foot, .foot .small, .crumbs { font-size: var(--fs-xs); }
.foot a.logo { text-decoration: none; }
.foot p, .foot .small { line-height: 1.5; }

/* карточки-блоки: одинаковые поля и скругления */
.panel, .car-main > .block, .mgr-card, .chan, .how li, .card, .gal-frame { border-radius: var(--r); }
.panel, .car-main > .block, .mgr-card { padding: var(--pad); }
.car-main > .block, .mgr-card { margin-top: 16px; box-shadow: none; }
.panel { box-shadow: none; }
.car-main > .block h2, .mgr-t b { font-size: var(--fs-h3); line-height: 1.25; margin-bottom: 14px; }
.panel h1 { font-size: 28px; line-height: 1.15; }
.panel-sub { font-size: var(--fs-s); margin-top: 6px; }
.price { margin: 20px 0; padding-top: 20px; }
.price b { font-size: 44px; }
.keys { gap: 8px; margin-bottom: 20px; }
.keys div { padding: 12px 14px; }
.keys b { font-size: var(--fs-s); line-height: 1.3; }
.keys span { display: block; margin-top: 2px; }
.cta .btn, .mgr-card .btn, .chan .btn { min-height: 52px; font-size: var(--fs-m); }
.panel-note { font-size: var(--fs-xs); margin-top: 14px; color: var(--muted); }

/* комплектация */
.opts { gap: 12px 24px; }
.opts li { font-size: var(--fs-s); line-height: 1.45; }
.opts svg { margin-top: 2px; }

/* менеджер: фото и текст по центру строки */
.mgr-card { grid-template-columns: 72px 1fr; gap: 16px 20px; align-items: center; }
.mgr-t b { margin-bottom: 2px; }
.mgr-t span { display: block; font-size: var(--fs-xs); }
.mgr-t p { font-size: var(--fs-s); margin-top: 8px; line-height: 1.45; }

/* блок канала */
.chan { padding: 28px var(--pad); gap: 24px; }
.chan h2 { font-size: var(--fs-h2); line-height: 1.2; }
.chan p { font-size: var(--fs-s); margin-top: 10px; }
.chan-h { margin-bottom: 16px; }
.chan-h b { font-size: var(--fs-s); }
.chan-stats { margin: 20px 0 22px; gap: 32px; }
.chan-stats b { font-size: 22px; line-height: 1.2; }
.chan-r { gap: 8px; }
.chan-post { padding: 8px; border-radius: 12px; }
.chan-post b { font-size: var(--fs-s); }
.chan-post span { font-size: var(--fs-xs); }

/* карточки машин */
.card-t { font-size: var(--fs-s); }
.card-f b { font-size: 17px; }

@media (min-width: 720px) {
  .mgr-card { grid-template-columns: 88px 1fr auto; }
  .chan { padding: 36px; align-items: center; }
}
@media (min-width: 1000px) {
  .car-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
  .panel { top: 88px; padding: 28px; }
  .car-main > .block:first-of-type { margin-top: 16px; }
}
@media (max-width: 719px) {
  .chan h2 { font-size: 22px; }
  .chan .btn { width: 100%; }
  .panel h1 { font-size: 26px; }
  .price b { font-size: 40px; }
}

/* ===== кнопки ===== */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn-max { justify-content: space-between; padding: 0 8px 0 22px; font-weight: 700; }
.btn-max > span { flex: 1; text-align: center; padding-left: 36px; }
.btn-go { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); flex: none; transition: transform .2s; }
.btn-go svg { width: 20px; height: 20px; color: #fff; }
.btn-max:hover .btn-go { transform: translateX(3px); }
/* блик раз в несколько секунд — только у главной кнопки */
.btn-max::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite 1.2s; }
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.btn-max { background-size: 140% 100%; }
.btn-dark .btn-ava { margin-right: 2px; }
.btn-dark { font-weight: 600; }
.sticky .btn-max { padding: 0 6px 0 16px; }
.sticky .btn-max > span { padding-left: 0; }
.sticky .btn-go { width: 36px; height: 36px; }
.top-ch { gap: 6px; font-weight: 500; }
.top-go svg { width: 16px; height: 16px; display: block; }
@media (prefers-reduced-motion: reduce) { .btn-max::after { animation: none; } }
.top-ch { white-space: nowrap; flex: none; }
.top-long { font-style: normal; }
.logo-t { white-space: nowrap; }
@media (max-width: 479px) { .top-long { display: none; } .logo-t small { display: none; } }

/* один главный шаг на первом экране карточки */
.panel-link { display: block; margin-top: 14px; text-align: center; font-size: var(--fs-xs); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.panel .price { margin-bottom: 18px; }
.sticky.two { grid-template-columns: minmax(0, 1fr) auto; }
.cta .btn-max > span, .sticky .btn-max > span { padding-left: 0; white-space: nowrap; }
.sticky .btn-max { padding-left: 16px; gap: 10px; }
