/* Home page (src/home.js): the hero's live line, the showroom turn, the honest range, the price «під ключ», the route,
   the tools, the AI consultant, Telegram. One moving thing per screen; with reduced motion everything is still. */
:root { --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); --ease-io: cubic-bezier(0.65, 0, 0.35, 1); }

/* ---------- hero: the live count, the status of a model slide ---------- */
.hero__live {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 24px; padding: 10px 14px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; background: rgba(12, 13, 14, 0.38); color: #fff;
  font-size: 15px; text-decoration: none; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); /* legible over any frame */
}
.hero__live b { font-weight: 600; }
.hero__live span { color: rgba(255, 255, 255, 0.82); }
.hero__live span::before { content: "·"; margin-right: 14px; color: rgba(255, 255, 255, 0.5); }
.hero__live .i { width: 16px; height: 16px; transition: transform 0.15s var(--ease-out); }
.hero__live:hover .i { transform: translateX(3px); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 18px; font-size: clamp(16px, 1.4vw, 19px); }
.hero__meta span + span::before { content: "·"; margin-right: 14px; opacity: 0.6; }
.hero__meta b { font-size: 1.3em; }

.pulse { position: relative; display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #c3c8cf; }
.pulse--instock { background: #3ccf7d; color: #3ccf7d; }
.pulse--transit { background: #f3b744; }
.pulse--instock::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; animation: pulse 1.8s var(--ease-out) infinite; }
@keyframes pulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.8); opacity: 0; } }

/* the film becomes a card as you scroll on (scroll-driven; static where not supported) */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero { transform-origin: 50% 0; animation: hero-away linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
    .hero__nav, .hero__inner { animation: hero-dim linear both; animation-timeline: scroll(root); animation-range: 0 55vh; }
  }
}
@keyframes hero-away { to { transform: scale(0.93); border-radius: 0 0 40px 40px; } }
@keyframes hero-dim { to { opacity: 0; transform: translateY(-48px); } }

/* ---------- models: ≈ ₴ and what the car can do ---------- */
.mcard__uah { min-height: 1.4em; margin-top: 2px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.mcard__img--photo { height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); filter: none; }
.mcard__specs { margin: -6px 0 18px; color: var(--muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- the showroom turn ---------- */
.h-show { position: relative; }
.h-show__sticky { padding-block: clamp(56px, 7vw, 104px); }
.h-show__grid { display: grid; grid-template-columns: minmax(300px, 0.78fr) 1.62fr; align-items: center; gap: clamp(24px, 4vw, 64px); }
.h-show__title { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.06; letter-spacing: -0.025em; }
.h-show__lead { max-width: 42ch; margin-top: 14px; color: var(--muted); font-size: 17px; }
.h-show__pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.h-show__pick button {
  min-height: 40px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--graphite); font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.h-show__pick button:hover { border-color: var(--graphite); }
.h-show__pick button[aria-pressed="true"] { border-color: var(--graphite); background: var(--graphite); color: #fff; }
.h-show__info { margin-top: 28px; }
.h-show__name { font-size: 22px; font-weight: 700; line-height: 1.2; text-transform: uppercase; }
.h-show__name a { text-decoration: none; }
.h-show__name a:hover { text-decoration: underline; text-underline-offset: 4px; }
.h-show__trim { margin-top: 2px; color: var(--muted); font-size: 14px; }
.h-show__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.h-show__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 22px; }
.h-show__specs dt { color: var(--muted); font-size: 13px; }
.h-show__specs dd { margin-top: 2px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.h-show__price { margin-top: 20px; }
.h-show__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.h-show__stage { position: relative; margin: 0; overflow: hidden; border-radius: var(--r-lg); background: #e7e8ea; aspect-ratio: 16 / 9; }
.h-show__frames { position: absolute; inset: 0; transition: opacity 0.2s; }
.h-show__frames.is-swap { opacity: 0.6; }
.h-show__frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.45s var(--ease-out); user-select: none; }
.h-show__frames img.is-on { opacity: 1; }
.is-scrub .h-show__frames img { transition: none; } /* the scroll drives it */
.h-show__turn { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h-show__angle, .h-show__ticks { border-radius: 999px; background: rgba(255, 255, 255, 0.9); box-shadow: 0 2px 10px rgba(15, 17, 20, 0.1); }
.h-show__angle { padding: 7px 14px; font-size: 13px; font-weight: 600; }
.h-show__ticks { display: flex; padding: 0 6px; }
.h-show__ticks button { display: grid; place-items: center; width: 34px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.h-show__ticks button::before { content: ""; width: 28px; height: 5px; border-radius: 3px; background: #c4c7cc; transform: scaleX(0.64); transition: transform 0.25s var(--ease-out), background-color 0.25s; }
.h-show__ticks button[aria-pressed="true"]::before { background: var(--graphite); transform: none; }

.h-show.is-scrub { height: calc(100vh + (var(--n) - 1) * 52vh); }
.h-show.is-scrub .h-show__sticky { position: sticky; top: 0; display: grid; align-items: center; height: 100vh; height: 100svh; padding-block: 88px 24px; }

@media (max-width: 900px) {
  .h-show__grid { grid-template-columns: 1fr; gap: 14px; }
  .h-show__text { display: contents; }
  .h-show__title { order: 1; }
  .h-show__lead { order: 2; margin-top: 0; }
  .h-show__pick { order: 3; flex-wrap: nowrap; margin: 4px calc(-1 * var(--gutter)) 0; padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .h-show__pick::-webkit-scrollbar { display: none; }
  .h-show__pick button { flex: none; }
  .h-show__stage { order: 4; }
  .h-show__info { order: 5; margin-top: 0; }
  .h-show__specs, .h-show__badges { display: none; }
  .h-show__info:not([hidden]) { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
  .h-show__name { font-size: 18px; }
  .h-show__price { grid-row: 1 / span 2; grid-column: 2; margin: 0; text-align: right; }
  .h-show__cta { grid-column: 1 / -1; }
  .h-show.is-scrub { height: calc(100svh + (var(--n) - 1) * 40vh); }
  .h-show.is-scrub .h-show__sticky { align-items: start; padding-block: 76px 16px; }
  .h-show.is-scrub .h-show__lead { display: none; }
}
@media (max-width: 900px) and (min-height: 700px) { .h-show.is-scrub .h-show__sticky { align-items: center; } }
@media (max-width: 480px) { .h-show__cta .btn { flex: 1; padding-inline: 12px; } }

/* ---------- the honest range ---------- */
.h-range__head { max-width: 780px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
.h-range__head .sec__lead { margin: 14px auto 0; }
.h-range__ctl {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label temp" "slider slider" "marks marks"; align-items: center; gap: 12px 16px;
  max-width: 760px; margin: 0 auto clamp(28px, 4vw, 44px); padding: 22px 24px 20px; border-radius: var(--r-lg); background: var(--mist);
}
.h-range__label { grid-area: label; color: var(--muted); font-size: 14px; font-weight: 500; }
.h-range__temp { grid-area: temp; font-size: clamp(28px, 3vw, 36px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.h-range__slider { grid-area: slider; width: 100%; height: 32px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
/* the track is the thermometer itself: cold blue, mild grey, hot amber */
.h-range__slider::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2c64c8, #8db7f0 34%, #e2e5e9 50%, #f6c56f 72%, #ef7a35); }
.h-range__slider::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2c64c8, #8db7f0 34%, #e2e5e9 50%, #f6c56f 72%, #ef7a35); }
.h-range__slider::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -10px; border: 3px solid #fff; border-radius: 50%; background: var(--graphite); box-shadow: 0 2px 8px rgba(15, 17, 20, 0.3); -webkit-appearance: none; appearance: none; }
.h-range__slider::-moz-range-thumb { width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50%; background: var(--graphite); box-shadow: 0 2px 8px rgba(15, 17, 20, 0.3); }
.h-range__slider:focus-visible { outline: none; }
.h-range__slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--focus); outline-offset: 2px; }
.h-range__marks { grid-area: marks; display: flex; flex-wrap: wrap; gap: 6px; }
.h-range__marks button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 999px; background: #fff; color: var(--graphite); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.h-range__marks button[aria-pressed="true"] { background: var(--graphite); color: #fff; }
.h-range__list { display: grid; gap: 20px; max-width: 1000px; margin-inline: auto; }
.h-range__row { display: grid; grid-template-columns: minmax(170px, 250px) 1fr minmax(150px, auto); align-items: center; gap: 6px 22px; }
.h-range__name { font-weight: 600; line-height: 1.3; text-decoration: none; }
.h-range__name:hover { text-decoration: underline; text-underline-offset: 4px; }
.h-range__name span { color: var(--muted); font-weight: 500; }
.h-range__bar { position: relative; height: 14px; border-radius: 7px; background: var(--mist); }
.h-range__rated, .h-range__real { position: absolute; inset: 0; border-radius: 7px; }
.h-range__rated { background: #d6d9dd; clip-path: inset(0 calc((1 - var(--rated)) * 100%) 0 0 round 7px); }
.h-range__real { background: var(--graphite); clip-path: inset(0 calc((1 - var(--real)) * 100%) 0 0 round 7px); transition: clip-path 0.35s var(--ease-out); }
.h-range__km b { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-range__km span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; }
.h-range__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-top: clamp(32px, 4vw, 48px); }
.h-range__fine { max-width: 58ch; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .h-range__row { grid-template-columns: 1fr auto; }
  .h-range__bar { grid-column: 1 / -1; grid-row: 2; }
  .h-range__km { text-align: right; }
  .h-range__km span { display: inline; margin-left: 6px; }
}
@media (max-width: 420px) { .h-range__km span { display: none; } }

/* ---------- the price «під ключ» ---------- */
.h-cost__grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 5vw, 80px); }
.h-cost__text .sec__lead { margin-top: 14px; }
.h-cost__form { display: grid; gap: 22px; max-width: 520px; margin-top: 30px; }
.h-cost__price { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px 12px; }
.h-cost__price span { color: var(--muted); font-size: 13px; font-weight: 500; }
.h-cost__price output { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.h-cost__price input { grid-column: 1 / -1; width: 100%; height: 28px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.h-cost__price input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--mist-2); }
.h-cost__price input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--mist-2); }
.h-cost__price input::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -10px; border: 3px solid #fff; border-radius: 50%; background: var(--graphite); box-shadow: 0 2px 8px rgba(15, 17, 20, 0.3); -webkit-appearance: none; appearance: none; }
.h-cost__price input::-moz-range-thumb { width: 20px; height: 20px; border: 3px solid #fff; border-radius: 50%; background: var(--graphite); box-shadow: 0 2px 8px rgba(15, 17, 20, 0.3); }
.h-cost__out { padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.h-cost__label { color: var(--muted); font-size: 14px; font-weight: 500; }
.h-cost__total b { display: block; margin-top: 6px; font-size: clamp(40px, 5vw, 64px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.h-cost__total span { display: block; margin-top: 8px; color: var(--muted); font-size: 16px; font-variant-numeric: tabular-nums; }
.h-cost__bar { display: flex; gap: 3px; height: 14px; margin-top: 26px; overflow: hidden; border-radius: 7px; }
.h-cost__seg { flex: var(--w) 1 0; min-width: 3px; transition: flex-grow 0.45s var(--ease-out); }
.h-cost__seg--car, .h-cost__dot--car { background: var(--graphite); }
.h-cost__seg--way, .h-cost__dot--way { background: #7d8792; }
.h-cost__seg--tax, .h-cost__dot--tax { background: #d39a2c; }
.h-cost__seg--doc, .h-cost__dot--doc { background: #c9ced5; }
.h-cost__legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-top: 16px; }
.h-cost__legend div { display: flex; justify-content: space-between; gap: 8px; }
.h-cost__legend dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.h-cost__legend dd { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.h-cost__dot { width: 10px; height: 10px; border-radius: 3px; }
.h-cost__time { margin-top: 18px; font-size: 14px; }
.h-cost__sell { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 12px; border-radius: var(--r-md); background: var(--ok-bg); color: var(--ok); text-decoration: none; }
.h-cost__sell:hover b { text-decoration: underline; }
.h-cost__sell img { flex: none; width: 96px; height: 54px; border-radius: 10px; object-fit: cover; }
.h-cost__sell b { display: block; font-size: 14px; line-height: 1.35; }
.h-cost__sell small { display: block; margin-top: 2px; font-size: 13px; }
.h-cost__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.h-cost__fine { margin-top: 14px; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .h-cost__grid { grid-template-columns: 1fr; } .h-cost__form { max-width: none; } }
@media (max-width: 420px) { .h-cost__legend { grid-template-columns: 1fr; } .h-cost__cta .btn { flex: 1; } }

/* ---------- the route: one dark passage ---------- */
.h-route { padding-block: clamp(64px, 8vw, 112px); background: #131416; color: #fff; }
.h-route__head h2 { max-width: 20ch; font-size: clamp(30px, 3.8vw, 52px); line-height: 1.06; letter-spacing: -0.025em; }
.h-route__head p { max-width: 60ch; margin-top: 14px; color: rgba(255, 255, 255, 0.72); font-size: 17px; }
.h-route__body { display: grid; grid-template-columns: 1.7fr 1fr; align-items: start; gap: clamp(24px, 4vw, 64px); margin-top: clamp(28px, 4vw, 48px); }
.h-route__svg { display: block; width: 100%; height: auto; }
.h-route__land { fill: #25282c; }
.h-route__ua { fill: #3b4149; }
.h-route__line { fill: none; stroke: #fff; stroke-width: calc(2.2px * var(--k, 1)); stroke-linecap: round; stroke-linejoin: round; }
.h-route__kyiv { fill: #ffd54a; }
.h-route__dot { fill: #fff; stroke: rgba(255, 255, 255, 0.28); stroke-width: calc(8px * var(--k, 1)); }
.h-route__now { min-height: 1.6em; margin-top: 12px; color: rgba(255, 255, 255, 0.82); font-size: 15px; font-weight: 500; }
.tabs--dark { background: rgba(255, 255, 255, 0.08); }
.tabs--dark button { color: rgba(255, 255, 255, 0.78); }
.tabs--dark button[aria-pressed="true"] { background: #fff; color: var(--graphite); }
.h-route__fact { margin-top: 24px; }
.h-route__time { font-size: clamp(36px, 4.4vw, 56px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.h-route__way { margin-top: 10px; color: rgba(255, 255, 255, 0.75); }
.h-route__steps { display: grid; gap: 14px; margin-top: 28px; counter-reset: step; }
.h-route__steps li { display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; counter-increment: step; }
.h-route__steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%; font-size: 13px; font-weight: 600; }
.h-route__steps b { font-size: 15px; }
.h-route__steps span { color: rgba(255, 255, 255, 0.65); font-size: 14px; line-height: 1.5; }
.h-route__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.h-route__track { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.h-route__track label { display: block; margin-bottom: 10px; color: rgba(255, 255, 255, 0.78); font-size: 14px; }
.h-route__track div { display: flex; gap: 8px; }
.h-route__track input { flex: 1; min-width: 0; height: 44px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 15px; }
.h-route__track input::placeholder { color: rgba(255, 255, 255, 0.5); }
.h-route__track input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.h-route__track .btn { min-height: 44px; }
.h-route__fine { margin-top: 28px; color: rgba(255, 255, 255, 0.5); font-size: 12px; }
.h-route ::selection { background: #fff; color: #131416; }
@media (max-width: 1000px) { .h-route__body { grid-template-columns: 1fr; } }

/* ---------- tools ---------- */
.h-tools__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.h-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 220px; padding: 24px; overflow: hidden;
  border-radius: var(--r-lg); background: var(--mist); color: var(--ink); text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
a.h-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15, 17, 20, 0.1); }
.h-tile__title { font-size: 20px; font-weight: 700; line-height: 1.2; }
.h-tile > span, .h-tile__body > span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.h-tile__body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.h-tile--compare { grid-column: span 3; justify-content: space-between; gap: 18px; }
.h-tile__vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.h-tile__vs > i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--graphite); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; text-transform: uppercase; }
.h-tile__car { display: grid; gap: 2px; min-width: 0; }
.h-tile__car img { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: var(--r-sm); object-fit: cover; }
.h-tile__car b { font-size: 15px; }
.h-tile__car small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.h-tile--drive { grid-column: span 3; min-height: 340px; justify-content: flex-end; color: #fff; }
.h-tile--drive img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.h-tile--drive:hover img { transform: scale(1.03); }
.h-tile--drive::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7)); }
.h-tile--drive .h-tile__body { position: relative; z-index: 1; }
.h-tile--drive .h-tile__body > span { color: rgba(255, 255, 255, 0.86); }
.h-tile--drive .btn { margin-top: 10px; }
.h-tile--credit { grid-column: span 3; background: #edf6e8; } /* a breath of the bank's green */
.h-tile__bank { display: inline-flex; align-self: flex-start; margin-bottom: auto; }
.h-tile__bank img { display: block; width: 164px; height: 27px; }
.h-tile--acc { grid-column: span 3; }
.h-tile--acc img { width: 100%; height: 120px; margin-bottom: 8px; object-fit: contain; }
.h-tools__grid:not(:has(.h-tile--credit)) .h-tile--acc { grid-column: 1 / -1; }
.h-tile--map, .h-tile--row { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 20px; min-height: 0; padding-block: 22px; }
.h-tile--map.mapbox--facade { height: auto; place-content: initial; justify-items: start; text-align: left; }
.h-tile--map .i, .h-tile--row .i { grid-row: span 2; width: 34px; height: 34px; }
.h-tile--map > span, .h-tile--row > span:not(.btn) { grid-column: 2; }
.h-tile--map .btn, .h-tile--row .btn { grid-row: 1 / span 2; grid-column: 3; }
.h-tile--map:has(iframe) { display: block; min-height: 520px; padding: 0; }
.h-tile--map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* «Світло з авто» and «Перехідники»: a pair, half the row each on computers and tablets, one per row on phones */
.h-tile--own { grid-column: span 3; }
.h-tile--own .i { width: 32px; height: 32px; margin-bottom: 6px; }
.h-tile--own .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 1100px) { .h-tile--own { grid-column: span 1; } }
@media (max-width: 1100px) {
  .h-tools__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-tile--compare, .h-tile--drive, .h-tools__grid:not(:has(.h-tile--credit)) .h-tile--acc { grid-column: 1 / -1; }
  .h-tile--credit, .h-tile--acc { grid-column: span 1; }
}
@media (max-width: 640px) {
  .h-tools__grid { grid-template-columns: 1fr; }
  .h-tile--credit, .h-tile--acc { grid-column: 1 / -1; }
  .h-tile--drive { min-height: 260px; }
  .h-tile__vs { gap: 8px; }
  .h-tile__vs > i { width: 32px; height: 32px; }
  .h-tile--map { grid-template-columns: auto 1fr; }
  .h-tile--map .btn { grid-row: auto; grid-column: 1 / -1; justify-self: start; }
}

/* ---------- the AI consultant ---------- */
.h-ai__grid { display: grid; grid-template-columns: 0.9fr 1.3fr; align-items: center; gap: clamp(28px, 5vw, 80px); }
.h-ai__text .sec__lead { margin-top: 14px; }
.h-ai__asks { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 26px 0 24px; }
.h-ai__ask { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--graphite); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: border-color 0.2s; }
.h-ai__ask:hover { border-color: var(--graphite); }
.h-ai__win { display: flex; flex-direction: column; min-height: 540px; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 30px 80px rgba(15, 17, 20, 0.12); }
.h-ai__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.h-ai__top span { padding: 4px 10px; border-radius: 999px; background: var(--mist); color: var(--muted); font-size: 12px; white-space: nowrap; }
.h-ai__chat { display: grid; flex: 1; align-content: start; gap: 22px; padding: 24px 24px 12px; }
.h-ai__you { justify-self: end; max-width: 82%; }
.h-ai__you small, .h-ai__bot > small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.h-ai__you small { text-align: right; }
.h-ai__you p { min-height: 1.6em; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: var(--mist-2); font-size: 15px; }
.h-ai__bot { transition: opacity 0.3s; }
.h-ai__trace { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 5px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 12px; font-weight: 600; transition: background-color 0.3s, color 0.3s; }
.h-ai__trace .i { width: 14px; height: 14px; }
.h-ai__win.is-thinking .h-ai__trace { background: var(--wait-bg); color: var(--wait); }
.h-ai__win.is-thinking .h-ai__trace .i { animation: pulse-i 1s var(--ease-io) infinite alternate; }
@keyframes pulse-i { to { opacity: 0.25; } }
.h-ai__say { max-width: 62ch; font-size: 17px; line-height: 1.55; }
.h-ai__say.is-streaming::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; background: var(--graphite); vertical-align: middle; }
.h-ai__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.h-ai__card { position: relative; display: grid; align-content: start; gap: 2px; padding: 10px; border: 1.5px solid var(--line); border-radius: 16px; font-size: 13px; }
.h-ai__card.is-pick { border-color: var(--graphite); }
.h-ai__card img { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 6px; border-radius: 10px; object-fit: cover; }
.h-ai__card b { font-size: 14px; line-height: 1.25; }
.h-ai__card small, .h-ai__spec { color: var(--muted); font-size: 12px; }
.h-ai__price .price { font-size: 16px; }
.h-ai__mine { position: absolute; top: 16px; left: 16px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 600; }
.h-ai__mine .i { width: 12px; height: 12px; }
.h-ai__composer { display: flex; align-items: center; justify-content: space-between; margin: 12px 20px 20px; padding: 8px 8px 8px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 15px; }
.h-ai__composer i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--graphite); color: #fff; }
.h-ai__composer .i { width: 18px; height: 18px; }
/* the conversation types itself (public/js/home.js): the answer waits for the question, the cards for the answer */
.h-ai__win.is-empty .h-ai__bot { opacity: 0; }
.h-ai__win.is-live .h-ai__cards li { opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.h-ai__win.is-live .h-ai__cards.is-in li { opacity: 1; transform: none; }
.h-ai__cards.is-in li:nth-child(2) { transition-delay: 0.12s; }
.h-ai__cards.is-in li:nth-child(3) { transition-delay: 0.24s; }
@media (max-width: 1000px) { .h-ai__grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .h-ai__win { min-height: 0; }
  .h-ai__chat { padding: 18px 16px 8px; }
  .h-ai__cards { grid-template-columns: none; grid-auto-columns: 72%; grid-auto-flow: column; margin-inline: -16px; padding-inline: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .h-ai__card { scroll-snap-align: start; }
  .h-ai__composer { margin: 8px 16px 16px; }
}

/* ---------- Telegram ---------- */
.h-tg__grid { display: grid; grid-template-columns: 0.8fr 1fr; align-items: center; gap: clamp(28px, 6vw, 96px); }
.h-tg__phone { justify-self: center; width: min(320px, 80vw); aspect-ratio: 9 / 19; padding: 11px; border-radius: 50px; background: #101112; box-shadow: 0 40px 80px rgba(15, 17, 20, 0.25); }
.h-tg__screen { position: relative; height: 100%; overflow: hidden; border-radius: 40px; background: #eff1f4; }
.h-tg__bar { display: flex; flex-direction: column; align-items: center; padding: 46px 16px 12px; background: #fff; line-height: 1.3; }
.h-tg__bar b { font-size: 15px; }
.h-tg__bar small { color: var(--muted); font-size: 12px; }
.h-tg__note { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.97); box-shadow: 0 12px 30px rgba(15, 17, 20, 0.2); font-size: 12px; line-height: 1.35; }
.h-tg__note .i { width: 22px; height: 22px; color: #2aabee; }
.h-tg__note b { display: block; font-size: 13px; }
.h-tg__note .price { font-size: 12px; }
.js .h-tg__note { transform: translateY(-140%); transition: transform 0.7s var(--ease-out) 0.3s; }
.js .h-tg__note.is-in { transform: none; }
.h-tg__list { display: grid; gap: 10px; padding: 12px; }
.h-tg__list li { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; background: #fff; }
.h-tg__list img { width: 96px; aspect-ratio: 16 / 10; border-radius: 10px; object-fit: cover; }
.h-tg__list span { display: grid; min-width: 0; line-height: 1.3; }
.h-tg__list b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.h-tg__list small { color: var(--muted); font-size: 11px; }
.h-tg__list .price { font-size: 14px; }
.h-tg__tabs { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px 22px; border-top: 1px solid var(--line); background: #fff; }
.h-tg__tabs span { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 10px; font-weight: 600; }
.h-tg__tabs .is-on { color: var(--graphite); }
.h-tg__tabs .i { width: 18px; height: 18px; }
.h-tg__points { display: grid; gap: 18px; margin-top: 26px; }
.h-tg__points li { display: grid; grid-template-columns: 40px 1fr; align-items: start; gap: 14px; }
.h-tg__points .i { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--mist); }
.h-tg__points b { display: block; font-size: 16px; }
.h-tg__points span { color: var(--muted); font-size: 15px; }
.h-tg__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }

/* «E-Car Club» (src/club-app.js clubSection): the text left, the app's home in a phone right (the Telegram block's frame) */
.h-club { background: linear-gradient(180deg, #eef5f1, #fff 70%); }
.h-club__grid { display: grid; grid-template-columns: 1fr 0.8fr; align-items: center; gap: clamp(28px, 6vw, 96px); }
.h-club__kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--ok); font-size: 14px; font-weight: 600; }
.h-club__kicker .i { width: 16px; height: 16px; }
.h-club__features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin-top: 26px; }
.h-club__features li { display: grid; grid-template-columns: 40px 1fr; align-items: start; gap: 12px; }
.h-club__features .i { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #fff; color: var(--ok); box-shadow: 0 1px 0 var(--line); }
.h-club__features b { display: block; margin-bottom: 2px; font-size: 16px; }
.h-club__features span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.h-club__levels { margin: 28px 0 24px; padding: 18px 20px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 1px 0 var(--line); }
.h-club__levels p { color: var(--muted); font-size: 14px; }
.h-club__levels p b { color: var(--graphite); }
.h-club__levels ol { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; counter-reset: lvl; }
.h-club__levels li { padding: 6px 12px; border-radius: 999px; background: #e3eee9; color: #2c5446; font-size: 13px; font-weight: 600; }
.h-club__screen { padding: 44px 12px 0; background: #f6f7f5; }
.h-club__title { display: grid; padding: 0 6px 12px; font-size: 24px; font-weight: 700; line-height: 1.1; }
.h-club__title small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.h-club__dial { display: grid; justify-items: center; gap: 10px; padding: 16px 12px 14px; border-radius: 22px; background: #fff; text-align: center; }
.h-club__dial svg { width: 132px; height: 132px; }
.h-club__dial p { display: grid; color: var(--muted); font-size: 11px; line-height: 1.35; }
.h-club__dial b { color: var(--graphite); font-size: 15px; }
.h-club__hold { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; margin-top: 10px; padding: 12px; border-radius: 18px; background: #fff; font-size: 11px; line-height: 1.35; color: var(--muted); }
.h-club__hold .i { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: #e3eee9; color: var(--ok); }
.h-club__hold b { display: block; color: var(--graphite); font-size: 12px; }
.h-club__card { display: grid; margin-top: 10px; padding: 14px 16px; border-radius: 18px; background: radial-gradient(120% 90% at 95% 0%, rgba(255, 255, 255, 0.28), transparent 60%), linear-gradient(135deg, #5a9a82, #407361 45%, #2c5446); color: rgba(255, 255, 255, 0.85); font-size: 11px; line-height: 1.2; box-shadow: 0 10px 24px rgba(44, 84, 70, 0.3); }
.h-club__card small { margin-bottom: 4px; font-size: 10px; font-weight: 600; }
.h-club__card b { color: #fff; font-size: 30px; letter-spacing: -0.02em; }
.h-club__tabs { grid-template-columns: repeat(5, 1fr); }
.h-club__tabs .is-on { color: var(--ok); }
@media (max-width: 900px) {
  .h-club__grid { grid-template-columns: 1fr; }
  .h-club__phone { order: -1; }
}
@media (max-width: 560px) { .h-club__features { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .h-tg__grid { grid-template-columns: 1fr; } .h-tg__text { order: -1; } }

/* ---------- about: the real lot, not a stock photo ---------- */
.h-about { padding-top: clamp(16px, 3vw, 40px); }
.h-route__dot { r: calc(5px * var(--k, 1)); }
.h-route__kyiv { r: calc(4px * var(--k, 1)); }
.h-tile > span.btn--dark { color: #fff; } /* the map tile's button is a span inside a link */

/* ---------- «Що дає електромобіль»: the money and the light (src/home.js gain) ---------- */
.h-gain__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.h-gain__card { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 360px; padding: 28px; border-radius: var(--r-lg); background: var(--mist); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform 0.3s var(--ease-out); }
.h-gain__card:hover { transform: translateY(-3px); }
.h-gain__card--light { background: #0d1424; color: #fff; }
.h-gain__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.h-gain__kicker .i { width: 20px; height: 20px; }
.h-gain__card--light .h-gain__kicker { color: rgba(255, 255, 255, 0.72); }
.h-gain__big { font-size: clamp(40px, 5.2vw, 68px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.h-gain__big small { color: var(--ok); font-size: 18px; font-weight: 600; letter-spacing: 0; }
.h-gain__card--light .h-gain__big { color: #ffd27a; }
.h-gain__sub { color: var(--graphite); font-size: 15px; font-weight: 500; }
.h-gain__card--light .h-gain__sub { color: rgba(255, 255, 255, 0.86); }
.h-gain__bars { display: grid; gap: 8px; margin-top: 6px; }
.h-gain__bar { display: flex; align-items: center; justify-content: space-between; width: calc(var(--w) * 100%); min-width: 150px; padding: 9px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; }
.h-gain__bar i { font-style: normal; opacity: 0.75; }
.h-gain__bar--ev { background: var(--ok); }
.h-gain__note { color: var(--muted); font-size: 13px; }
.h-gain__card--light .h-gain__note { color: rgba(255, 255, 255, 0.62); }
.h-gain__card .btn { align-self: flex-start; margin-top: auto; }
.h-gain__night { width: 100%; max-width: 360px; height: auto; color: #fff; }
.h-gain__flow { stroke-dasharray: 2 7; animation: h-gain-flow 1s linear infinite; }
@keyframes h-gain-flow { to { stroke-dashoffset: -9; } }
@media (prefers-reduced-motion: reduce) { .h-gain__flow { animation: none; } .h-gain__card { transition: none; } }
@media (max-width: 860px) { .h-gain__grid { grid-template-columns: 1fr; } .h-gain__card { min-height: 0; padding: 22px; } }
