:root {
  --ink: #f6f4ec;
  --soft: rgba(246, 244, 236, 0.82);
  --faint: rgba(246, 244, 236, 0.14);
  --line: rgba(246, 244, 236, 0.3);
  --glass: rgba(18, 32, 56, 0.52);
  --glass-in: rgba(255, 255, 255, 0.07);
  /* активні поверхні мають точно колір фону, на якому зняті зарядки, щоб фото не мало рамки */
  --cream: #cfcfcf;
  --forest: #13233a;
  --moss: #63c0ff;
  --amber: #e2b866;
  --red: #e88270;
  --serif: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 32px;
  --r-md: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.narrow-only { display: none; }
html { background: #0b1424; }
html, body { overflow-x: clip; }

body {
  margin: 0; min-height: 100vh;
  font: 500 17px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
/* фон: фото bg.jpg, якщо його покласти поруч, інакше намальований ліс */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: url("img/bg.jpg") center / cover no-repeat, url("img/bg.svg?v=4") center / cover no-repeat;
}
body::after { content: ""; position: fixed; inset: 0; z-index: -2; background: rgba(8, 14, 26, 0.24); }

/* дрібне зерно поверх усього: розбиває смуги на плавних темних переходах */
html::after {
  content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: url("img/grain.png") 0 0 / 192px 192px;
}

/* хмари, що пливуть у небі */
.clouds { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.clouds i {
  position: absolute; left: 0; top: var(--t); width: min(var(--w), 80vw); aspect-ratio: 600 / 240; opacity: var(--o);
  background: url("img/cloud.svg?v=3") center / contain no-repeat; will-change: transform;
  animation: drift var(--d) linear infinite; animation-delay: var(--delay);
}
@keyframes drift { from { transform: translateX(-100%); } to { transform: translateX(100vw); } }
@media (prefers-reduced-motion: reduce) { .clouds i { animation-play-state: paused; } }

.top { display: flex; align-items: center; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 20px 24px 0; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.top img { border-radius: 10px; }
.top b { font-weight: 600; }
.top nav { margin-left: auto; display: flex; gap: 30px; }
.top a { color: inherit; text-decoration: none; opacity: 0.85; }
.top a:hover { opacity: 1; }

main { max-width: 1080px; margin: 0 auto; padding: 0 24px calc(110px + env(safe-area-inset-bottom)); }

.eyebrow { margin: 9vh 0 14px; font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--moss); }
h1 { margin: 0 0 7vh; font: 700 clamp(40px, 7.5vw, 88px)/1 var(--serif); letter-spacing: -0.035em; }
h3 { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }
h3.sub { margin: 26px 0 12px; }

.glass {
  margin-top: 18px; padding: 30px;
  background: var(--glass);
  backdrop-filter: blur(34px) saturate(140%); -webkit-backdrop-filter: blur(34px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.step { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.step b { font-size: 15px; font-weight: 700; letter-spacing: 0.08em; color: var(--moss); }
.step span { font: 700 clamp(22px, 3vw, 30px)/1.1 var(--serif); letter-spacing: -0.02em; }

label { display: block; font-size: 14px; font-weight: 600; color: var(--soft); }
select, input[type="number"] {
  display: block; width: 100%; margin-top: 8px; padding: 13px 16px;
  font: 600 17px/1.2 "Manrope", system-ui, sans-serif; letter-spacing: 0; text-transform: none;
  color: var(--ink); background: var(--glass-in); border: 1px solid var(--faint); border-radius: 16px;
}
select { -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background: var(--glass-in) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f6f4ec' stroke-width='1.6'/%3E%3C/svg%3E") right 16px center no-repeat; }
select option { color: #13233a; background: #cfcfcf; }
select:disabled, input:disabled { opacity: 0.4; }
select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* вибір авто */
.fields { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 14px; }
.ports { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.port {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  font: 600 15px/1.25 "Manrope", system-ui, sans-serif; text-align: left;
  color: var(--ink); background: var(--glass-in); border: 1px solid var(--faint); border-radius: var(--r-md);
}
.port picture { flex: none; }
.port img { display: block; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.port.on { color: var(--forest); background: var(--cream); border-color: var(--cream); font-weight: 600; }

.hint { margin: 14px 2px 0; font-size: 15px; color: var(--soft); }
.link { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: block; padding: 11px 18px; font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; }
.chip input:checked + span { background: var(--cream); border-color: var(--cream); color: var(--forest); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

/* перемикачі: білий контур, активний пункт із напівпрозорою заливкою */
.tabs, .seg { display: flex; border: 1.5px solid rgba(246, 244, 236, 0.75); border-radius: 999px; padding: 3px; }
.tabs button, .seg button {
  flex: 1; padding: 9px 14px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font: 600 15px/1.2 "Manrope", system-ui, sans-serif; color: var(--ink); background: none;
}
.tabs button.on, .seg button.on { background: rgba(246, 244, 236, 0.3); font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.tabs { max-width: 560px; }

/* сцена */
.scene-frame { position: relative; margin-top: 20px; background: var(--glass-in); border: 1px solid var(--faint); border-radius: var(--r-md); overflow: hidden; }
#scene { display: block; width: 100%; height: auto; }
.lbl { font-size: 22px; font-weight: 700; fill: #fff; paint-order: stroke; stroke: rgba(8, 16, 30, 0.5); stroke-width: 6px; stroke-linejoin: round; }
.lbl.small { font-size: 18px; font-weight: 700; }
.lbl.big { font-size: 34px; font-weight: 800; }
.lbl.soft { fill: var(--ink); stroke: none; font-size: 17px; font-weight: 600; }
.lbl.plain { font-size: 17px; font-weight: 800; stroke-width: 4px; }
.flow-line { fill: none; stroke: var(--moss); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 12; }
.charging .flow-line { animation: flow 1.1s linear infinite; }
.flow-line.bad { stroke: var(--red); }
@keyframes flow { to { stroke-dashoffset: -26; } }
@media (prefers-reduced-motion: reduce) { .charging .flow-line { animation: none; } .tick input, .tick input::after { transition: none !important; } }

/* що втрачається з нерекомендованою зарядкою: одразу під авто */
.tradeoff { padding: 16px 18px; border-top: 1px solid var(--faint); background: rgba(232, 130, 112, 0.14); }
.tradeoff.ok { background: rgba(99, 192, 255, 0.14); }
.tradeoff > b { display: block; font-size: 17px; font-weight: 800; }
.tradeoff .vs { display: block; font-size: 14px; color: var(--soft); }
.tradeoff ul { margin: 10px 0 0; padding-left: 20px; font-size: 15px; }
.tradeoff li + li { margin-top: 4px; }
.tradeoff p { margin: 10px 0 0; font-size: 15px; color: var(--soft); }

.info {
  flex: none; width: 28px; height: 28px; padding: 0; margin-left: 4px; align-self: center; cursor: pointer;
  font: italic 700 16px/1 Georgia, serif; color: var(--ink); background: none; border: 1.5px solid var(--line); border-radius: 50%;
}
.info:hover { background: var(--glass-in); }
.col-main .link { color: var(--forest); font-weight: 700; }
.amps-cap { display: inline-flex; align-items: center; gap: 8px; }
.col-main .info { margin: 0; color: var(--forest); border-color: rgba(19, 35, 58, 0.45); }
.col-main .info:hover { background: rgba(19, 35, 58, 0.08); }

dialog {
  width: min(520px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 28px 26px 22px; overflow: auto;
  color: var(--forest); background: #f6f4ec; border: 0; border-radius: 28px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
dialog::backdrop { background: rgba(8, 14, 26, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog h2 { margin: 0 34px 14px 0; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
dialog p { margin: 0 0 12px; font-size: 16px; }
dialog table { width: 100%; margin: 4px 0 14px; border-collapse: collapse; font-size: 16px; }
dialog caption { padding-bottom: 8px; text-align: left; font-size: 14px; font-weight: 700; color: rgba(19, 35, 58, 0.7); }
dialog th, dialog td { padding: 9px 0; text-align: left; border-top: 1px solid rgba(19, 35, 58, 0.15); }
dialog th { width: 38%; font-weight: 800; }
dialog .hint { margin: 0; font-size: 14px; color: rgba(19, 35, 58, 0.72); }
dialog .close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; padding: 0; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--forest); background: rgba(19, 35, 58, 0.1); border: 0; border-radius: 50%;
}

/* шкала часу над авто */
.timeline {
  position: absolute; top: 18px; right: 18px; width: 46%; padding: 16px 18px 12px; z-index: 1;
  background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--faint); border-radius: var(--r-md);
}
.tl-head { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.tl-head b { font: 700 22px/1 var(--serif); letter-spacing: -0.02em; white-space: nowrap; }
.tl-head span { font-size: 14px; color: var(--soft); white-space: nowrap; }
.tl-track { position: relative; height: 4px; margin: 20px 12px 0; background: rgba(246, 244, 236, 0.2); border-radius: 2px; touch-action: none; }
.tl-night { position: absolute; top: -6px; height: 16px; left: 45.833%; width: 33.333%; background: rgba(246, 244, 236, 0.12); border-radius: 8px; }
.tl-range { position: absolute; top: 0; bottom: 0; background: rgba(246, 244, 236, 0.5); border-radius: 2px; }
.tl-charge { position: absolute; top: 0; bottom: 0; background: var(--moss); border-radius: 2px; }
.tl-handle {
  position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 0;
  background: #fff; border: 0; border-radius: 50%; cursor: grab; touch-action: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.tl-handle::before { content: ""; position: absolute; inset: -10px; }
.tl-handle:active { cursor: grabbing; transform: scale(1.1); }
.tl-ticks { display: flex; justify-content: space-between; margin: 16px 2px 0; font-size: 13px; font-weight: 600; color: var(--soft); }

/* керування під сценою */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.col { padding: 22px; background: var(--glass-in); border: 1px solid var(--faint); border-radius: var(--r-md); }
.col-main { background: var(--cream); border-color: var(--cream); color: var(--forest); }
.col-main h3, .col-main .amps-row { color: rgba(19, 35, 58, 0.66); }
.col label { margin-top: 16px; }

.tick { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.tick span { order: -1; }
.tick input {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 48px; height: 28px; margin: 0;
  background: rgba(246, 244, 236, 0.18); border: 0; border-radius: 999px; cursor: pointer; transition: background 0.2s;
}
.tick input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.tick input:checked { background: var(--moss); }
.tick input:checked::after { transform: translateX(20px); }
.mini { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mini.two { grid-template-columns: 1fr 1fr; }
.mini label { font-size: 13px; white-space: nowrap; margin-top: 0; }
.col .mini { margin-top: 16px; }
.mini select, .mini input { padding: 11px 12px; font-size: 15px; }
.mini select { padding-right: 26px; background-position: right 10px center; }

.sel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sel-head b { flex: 1; }
.thumb { flex: none; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: var(--cream); }
.thumb:empty { display: none; }
.thumb picture, .photo picture { display: block; width: 100%; height: 100%; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sel-head b { font: 700 21px/1.1 var(--serif); letter-spacing: -0.02em; }
.sel-head span { font-weight: 600; white-space: nowrap; }
.col-main .seg { border-color: rgba(19, 35, 58, 0.55); }
.col-main .seg button { color: var(--forest); }
.col-main .seg button.on { background: var(--forest); color: var(--cream); box-shadow: none; }
.amps-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 18px; font-size: 15px; font-weight: 600; }
.amps-row output { font-size: 58px; font-weight: 800; line-height: 0.9; letter-spacing: -0.03em; color: var(--forest); }
.cap { min-height: 18px; margin: 8px 0 0; font-size: 15px; color: rgba(19, 35, 58, 0.75); }
.warn { margin: 14px 0 0; font-size: 15px; font-weight: 600; color: var(--red); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 10px 0 0; background: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--forest) var(--p, 0%), rgba(19, 35, 58, 0.2) var(--p, 0%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(19, 35, 58, 0.2); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--forest); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -12px; background: var(--forest); border: 3px solid var(--cream); border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; background: var(--forest); border: 3px solid var(--cream); border-radius: 50%; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
input[type="range"]:disabled { opacity: 0.35; }

/* результати */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 22px; background: var(--glass-in); border: 1px solid var(--faint); border-radius: var(--r-md); }
.stat b { display: block; white-space: nowrap; font-size: clamp(26px, 3.6vw, 42px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat span { display: block; margin-top: 10px; font-size: 15px; font-weight: 600; color: var(--soft); }

.sheet { margin-top: 12px; padding: 24px; background: var(--glass-in); border: 1px solid var(--faint); border-radius: var(--r-md); }
.energy-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; color: var(--soft); }
.energy-title b { font-size: 24px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.bar { display: flex; height: 10px; margin-top: 14px; gap: 3px; border-radius: 5px; overflow: hidden; }
.bar i { display: block; min-width: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--soft); }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; }
.legend b { color: var(--ink); font-weight: 600; }
i.battery { background: var(--moss); }
i.car { background: var(--amber); }
i.cable { background: var(--red); }

.cost { margin-top: 22px; }
.cost-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--faint); }
.cost-row b { display: block; font-size: 18px; font-weight: 700; }
.cost-row span { font-size: 15px; color: var(--soft); }
.cost-sum { text-align: right; flex: none; }
.cost-row.whatif { margin-top: 4px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 18px; }
.cost-row.whatif .cost-sum b { color: var(--moss); }
.cost-sum b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.saving { margin: 8px 0 0; padding: 14px 20px; font-size: 16px; font-weight: 700; border-radius: 18px; color: var(--forest); background: var(--moss); }

/* зарядки: стрічка карток */
.carousel { position: relative; }
.carousel .nav {
  position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  color: var(--forest); background: var(--cream); border: 0; border-radius: 50%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.carousel .nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.carousel .prev { left: -14px; }
.carousel .next { right: -14px; }
/* неактивна стрілка лишається на місці й перехоплює клік, щоб він не потрапив у картку під нею */
.carousel .nav:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.carousel.fits .nav { display: none; }
.chargers.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.chargers.dragging .charger { pointer-events: none; }
/* на сенсорних екранах стрічку гортають пальцем, стрілки не потрібні */
@media (hover: none), (pointer: coarse) { .carousel .nav { display: none; } }
.reasons { margin: 0 0 22px; padding-left: 20px; color: var(--ink); font-size: 16px; }
.chargers { display: flex; gap: 14px; margin: 0 -30px; padding: 6px 30px 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.chargers::-webkit-scrollbar { display: none; }
.charger {
  position: relative; flex: 0 0 290px; min-height: 320px; padding: 0 22px 170px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; text-align: left; cursor: pointer; scroll-snap-align: center;
  font: inherit; color: var(--ink); background: var(--glass-in); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); transition: transform 0.2s;
}
.charger:hover { transform: translateY(-4px); }
.charger::after {
  content: "+"; position: absolute; right: 20px; bottom: 116px; width: 40px; height: 40px;
  display: grid; place-items: center; font-size: 24px; font-weight: 400; line-height: 1;
  color: var(--forest); background: #fff; border-radius: 50%;
}
.charger.on { background: var(--cream); border-color: var(--cream); color: var(--forest); }
.charger.on::after { content: "✓"; font-size: 18px; color: var(--cream); background: var(--forest); }
.charger.on .summary, .charger.on .notes { color: rgba(19, 35, 58, 0.75); }
.photo { display: block; margin: 0 -22px 18px; aspect-ratio: 4 / 3; background: var(--cream); }
.photo:empty { aspect-ratio: auto; height: 24px; margin-bottom: 0; background: none; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.charger.static { cursor: pointer; }
.charger.static::after { display: none; }
.plugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.plugs i { padding: 4px 10px; font-size: 13px; font-style: normal; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; }
.lead { margin: -8px 0 20px; font-size: 16px; color: var(--soft); max-width: 60ch; }
.charger-head { display: block; }
.charger-head b { display: block; font: 800 23px/1.1 var(--serif); letter-spacing: -0.02em; }
.price { display: block; position: absolute; left: 22px; bottom: 124px; font-size: 21px; font-weight: 800; white-space: nowrap; }
.badge { position: absolute; top: 14px; left: 14px; display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--forest); background: var(--moss); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--faint); }
.facts span { display: block; font-size: 13px; line-height: 1.25; color: var(--soft); }
.facts b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.charger.on .facts { border-color: rgba(19, 35, 58, 0.2); }
.charger.on .facts span { color: rgba(19, 35, 58, 0.75); }
.charger.on .facts b { color: var(--forest); }
.summary { display: block; margin-top: 12px; font-size: 15px; color: var(--soft); }
.notes { margin: 10px 0 0; padding-left: 18px; font-size: 14px; color: var(--soft); }

/* плаваюча панель унизу */
.more {
  position: absolute; left: 22px; right: 22px; bottom: 68px; padding: 10px; cursor: pointer;
  font: 700 15px/1.2 "Manrope", system-ui, sans-serif; color: inherit; background: none;
  border: 1.5px solid currentColor; border-radius: 999px; opacity: 0.85;
}
.more:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.charger.on .more:hover { background: rgba(19, 35, 58, 0.08); }

.buy {
  position: absolute; left: 22px; right: 22px; bottom: 18px; padding: 12px; cursor: pointer;
  font: 800 15px/1.2 "Manrope", system-ui, sans-serif; color: var(--forest); background: var(--moss); border: 0; border-radius: 999px;
}
.buy:hover { filter: brightness(1.08); }
.charger.on .buy { color: #f6f4ec; background: var(--forest); }
.col-main .cta { margin-top: 14px; }

/* кошик */
#dock-cart {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; cursor: pointer;
  color: #13233a; background: none; border: 0; border-radius: 999px; -webkit-tap-highlight-color: transparent;
}
#dock-cart.has { color: #f6f4ec; background: var(--moss); }
#dock-cart.has svg { color: #13233a; }
#cart-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; font: 800 11px/18px "Manrope", system-ui, sans-serif; font-style: normal; text-align: center; color: #f6f4ec; background: #13233a; border-radius: 9px; }
#cart-count:empty { display: none; }
.cart-line, .offer { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid rgba(19, 35, 58, 0.14); }
.cart-photo { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--cream); }
.cart-photo picture, .cart-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cart-main { flex: 1; min-width: 0; }
.cart-main > b { display: block; font-size: 16px; }
.cart-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.cart-price { margin-left: auto; font-weight: 800; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid rgba(19, 35, 58, 0.2); border-radius: 999px; }
.qty button { width: 34px; height: 34px; padding: 0; cursor: pointer; font: 700 18px/1 "Manrope", system-ui, sans-serif; color: var(--forest); background: none; border: 0; border-radius: 50%; }
.qty output { min-width: 22px; text-align: center; font-weight: 800; }
.choices.small { gap: 6px; margin-top: 8px; }
.choices.small button { padding: 6px 10px; cursor: pointer; font: 700 13px/1.2 "Manrope", system-ui, sans-serif; color: var(--forest); background: #fff; border: 1.5px solid rgba(19, 35, 58, 0.2); border-radius: 999px; }
.choices.small button.on { color: #f6f4ec; background: var(--forest); border-color: var(--forest); }
.remove { flex: none; width: 34px; height: 34px; padding: 0; cursor: pointer; font-size: 22px; line-height: 1; color: rgba(19, 35, 58, 0.7); background: rgba(19, 35, 58, 0.08); border: 0; border-radius: 50%; }
.cart-empty { margin: 8px 0 4px; font-size: 16px; }
.more-title { margin: 14px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(19, 35, 58, 0.6); }
.offer { align-items: center; }
.offer .cart-photo { width: 48px; height: 48px; border-radius: 12px; }
.offer-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.offer-name i { font-style: normal; font-weight: 700; color: #1f7a45; }
.offer-name b { display: block; font-weight: 800; }
.add { flex: none; padding: 9px 14px; cursor: pointer; font: 800 14px/1.2 "Manrope", system-ui, sans-serif; color: var(--forest); background: none; border: 1.5px solid rgba(19, 35, 58, 0.4); border-radius: 999px; }
#order-fields { margin-top: 6px; border-top: 1px solid rgba(19, 35, 58, 0.14); }

/* аксесуари */
#products-wrap { margin-top: 18px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.products .charger { flex: none; min-height: 0; }
.badge.quiet { color: var(--ink); background: rgba(8, 14, 26, 0.6); }
.about-text { margin: 18px 0 0; font-size: 16px; }
.for-whom { margin: 0; padding-left: 20px; font-size: 15px; }
.for-whom li + li { margin-top: 6px; }

/* форма замовлення */
dialog.order { width: min(480px, calc(100% - 20px)); }
.order h2 { margin: 0 34px 4px 0; }
.order .eyebrow { margin: 0 0 6px; font-size: 13px; color: rgba(19, 35, 58, 0.6); }
.order .detail-price { margin: 4px 0 16px; font-size: 24px; }
.order label { margin-top: 12px; font-size: 14px; color: rgba(19, 35, 58, 0.75); }
.order input:not([type="radio"]), .order textarea {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px; resize: vertical;
  font: 600 17px/1.3 "Manrope", system-ui, sans-serif; color: var(--forest); background: #fff;
  border: 1.5px solid rgba(19, 35, 58, 0.2); border-radius: 14px;
}
.order input:focus, .order textarea:focus { outline: 2px solid var(--forest); outline-offset: 1px; }
.order fieldset { margin: 0; padding: 0; border: 0; }
.order legend { padding: 0; font-size: 14px; font-weight: 600; color: rgba(19, 35, 58, 0.75); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choices label { margin: 0; cursor: pointer; }
.choices input { position: absolute; opacity: 0; }
.choices span { display: block; padding: 9px 14px; font-size: 15px; font-weight: 700; color: var(--forest); background: #fff; border: 1.5px solid rgba(19, 35, 58, 0.2); border-radius: 999px; }
.choices input:checked + span { color: #f6f4ec; background: var(--forest); border-color: var(--forest); }
.choices input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }
.order fieldset.np { margin-top: 16px; }
.suggest { margin: 6px 0 0; padding: 4px; max-height: 232px; overflow-y: auto; list-style: none; background: #fff; border: 1.5px solid rgba(19, 35, 58, 0.2); border-radius: 14px; }
.suggest button { display: block; width: 100%; padding: 10px 12px; text-align: left; cursor: pointer; font: 600 15px/1.3 "Manrope", system-ui, sans-serif; color: var(--forest); background: none; border: 0; border-radius: 10px; }
.suggest button:hover, .suggest button:focus-visible { background: rgba(19, 35, 58, 0.08); outline: none; }
.suggest .none { padding: 10px 12px; font-size: 14px; color: rgba(19, 35, 58, 0.7); }
.order input:disabled { opacity: 0.55; }
.trap { position: absolute !important; left: -9999px; width: 1px !important; height: 1px; opacity: 0; }
.form-error { min-height: 20px; margin: 10px 0 0; font-size: 15px; font-weight: 700; color: #b3261e; }
.order .cta:disabled { opacity: 0.6; cursor: default; }
.test-note { margin: 0 0 8px; padding: 8px 12px; font-size: 14px; font-weight: 700; color: #7a4b00; background: #ffe9b8; border-radius: 10px; }
.cta.ghost { margin-top: 10px; color: var(--forest); background: none; border: 1.5px solid rgba(19, 35, 58, 0.4); }
.order .hint { margin-top: 12px; }
.done p { font-size: 17px; }

/* детальна картка зарядки */
dialog.detail { width: min(760px, calc(100% - 20px)); padding: 0; }
.detail .close { z-index: 2; background: rgba(246, 244, 236, 0.9); }
.gallery { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--cream); border-radius: 28px 28px 0 0; }
.gallery figure { flex: 0 0 min(78%, 380px); margin: 0; scroll-snap-align: start; position: relative; }
.gallery picture { display: block; aspect-ratio: 1 / 1; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 14px; bottom: 12px; padding: 4px 10px; font-size: 13px; font-weight: 700; color: var(--forest); background: rgba(246, 244, 236, 0.85); border-radius: 999px; }
.detail-body { padding: 22px 26px 26px; }
.detail .eyebrow { margin: 0 0 6px; font-size: 13px; color: rgba(19, 35, 58, 0.6); }
.detail h2 { margin: 0 0 6px; font-size: 28px; }
.detail .tagline { margin: 0; font-size: 16px; color: rgba(19, 35, 58, 0.75); }
.detail-price { margin: 12px 0 18px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.detail h3 { margin: 24px 0 10px; font-size: 13px; color: rgba(19, 35, 58, 0.6); }
.for-car { margin: 0 0 20px; padding: 18px; background: #fff; border-radius: 20px; }
.for-car h3 { margin-top: 0; }
.for-car .facts { margin-top: 0; padding-bottom: 0; border: 0; grid-template-columns: repeat(4, 1fr); }
.for-car .facts span { color: rgba(19, 35, 58, 0.7); }
.for-car .facts b { color: var(--forest); }
.for-car .notes { color: rgba(19, 35, 58, 0.75); font-size: 14px; }
.cta { display: block; width: 100%; margin-top: 6px; padding: 14px; cursor: pointer; font: 800 16px/1.2 "Manrope", system-ui, sans-serif; color: #f6f4ec; background: var(--forest); border: 0; border-radius: 999px; }
table.spec { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; }
table.spec th, table.spec td { padding: 10px 0; vertical-align: top; text-align: left; border-top: 1px solid rgba(19, 35, 58, 0.14); }
table.spec th { width: 46%; padding-right: 14px; font-weight: 600; color: rgba(19, 35, 58, 0.72); }
table.spec td { font-weight: 700; }
.yes { color: #1f7a45; }
.no { color: rgba(19, 35, 58, 0.45); font-weight: 600; }
.box { display: flex; gap: 14px; align-items: center; margin-top: 20px; padding: 14px; background: #fff; border-radius: 20px; }
.box picture { flex: none; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; background: var(--cream); }
.box img { display: block; width: 100%; height: 100%; object-fit: cover; }
.box h3 { margin: 0 0 4px; font-size: 16px; color: var(--forest); letter-spacing: 0; text-transform: none; }
.box p { margin: 0; font-size: 14px; }
.about { margin-top: 22px; border-top: 1px solid rgba(19, 35, 58, 0.14); }
.about summary { padding: 14px 0; cursor: pointer; font-weight: 800; font-size: 16px; }
.about p { font-size: 15px; }
.detail .hint a { color: var(--forest); font-weight: 700; }
@media (max-width: 760px) {
  .detail-body { padding: 18px 18px 22px; }
  .for-car .facts { grid-template-columns: 1fr 1fr; }
  table.spec th { width: 50%; }
}

/* плаваюча панель: під нею вміст плавно згасає, тож вона нічого не перекриває різко */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; pointer-events: none;
  display: flex; justify-content: center; padding: 44px 12px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(8, 14, 26, 0), rgba(8, 14, 26, 0.8) 62%);
}
.pill {
  pointer-events: auto; display: flex; gap: 4px; padding: 6px; max-width: 100%;
  background: #f6f4ec; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.dock a {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; min-width: 46px; padding: 0 12px;
  border-radius: 999px; color: #13233a; text-decoration: none; font-size: 14px; font-weight: 700;
  -webkit-tap-highlight-color: transparent; transition: background 0.2s, color 0.2s;
}
.dock a span { display: none; }
.dock a.on { color: #f6f4ec; background: #13233a; padding: 0 16px 0 14px; }
.dock a.on span { display: inline; }
.dock svg { width: 23px; height: 23px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  main, .top { padding-left: 14px; padding-right: 14px; }
  .top nav { gap: 16px; }
  .eyebrow { margin-top: 6vh; }
  h1 { margin-bottom: 5vh; }
  .glass { padding: 22px 16px; border-radius: 26px; }
  .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #model-field { grid-column: 1 / -1; order: 2; }
  #battery-field { order: 1; }
  .ports { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .port { padding: 10px; gap: 8px; font-size: 14px; }
  .port img { width: 46px; height: 46px; border-radius: 12px; }
  .tabs { max-width: none; }
  .seg button { flex: 1 1 auto; min-width: 0; padding: 10px 6px; font-size: 13px; line-height: 1.15; white-space: normal; }
  /* вкладки не стискаються менше за свій текст: якщо не вміщаються, переходять на другий рядок */
  .tabs { flex-wrap: wrap; border-radius: 24px; }
  .tabs button { flex: 1 1 auto; min-width: auto; padding: 10px 10px; font-size: 13px; white-space: nowrap; }
  .timeline { position: static; width: auto; margin: 10px 10px 0; padding: 14px 14px 10px; }
  .tl-head b { font-size: 20px; }
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  /* на телефоні лишаємо на сцені тільки головні цифри, зате великі */
  .m-hide { display: none; }
  .lbl { font-size: 32px; }
  .lbl.small { font-size: 30px; }
  .lbl.big { font-size: 50px; }
  .lbl.soft { font-size: 24px; }
  .lbl.plain { font-size: 22px; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cost-row { flex-wrap: wrap; }
  .cost-row > div { min-width: 0; }
  .cost-sum { flex: 1 1 auto; }
  .mini label { white-space: normal; }

  .col-main { order: -1; }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat b { font-size: clamp(19px, 5.6vw, 26px); }
  .stat:first-child { grid-column: 1 / -1; }
  .stat { padding: 18px; }
  .sheet { padding: 18px; }
  .chargers { margin: 0 -16px; padding: 6px 16px 18px; }
  .charger { flex-basis: 78%; }
}
@media (max-width: 380px) {
  .port { padding: 8px; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
  .port img { width: 40px; height: 40px; border-radius: 10px; }
  .stat b { font-size: 15px; }
  .charger { flex-basis: 86%; }
  .thumb { width: 48px; height: 48px; border-radius: 12px; }
  .sel-head { gap: 8px; }
  .sel-head b { font-size: 18px; }
  .sel-head span { font-size: 15px; }
  .amps-row output { font-size: 48px; }
}

/* у Telegram шапка сайту зайва: назву показує сам Telegram */
.in-telegram .top { display: none; }
.in-telegram .eyebrow { margin-top: 4vh; }
.order .link { margin-top: 8px; color: var(--forest); font-weight: 700; font-size: 15px; }
