*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font, system-ui, sans-serif); color: #2b2b2e; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
h1:focus, h2:focus { outline: none; }

.app { --card: #fff; --line: color-mix(in srgb, var(--ink) 14%, transparent); --muted: color-mix(in srgb, var(--ink) 62%, #fff);
  min-height: 100svh; background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 400; }
.app[data-project="balance"] { font-weight: 300; }

.kicker { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- лого ---------- */
.brand { display: flex; align-items: flex-end; gap: 16px; filter: drop-shadow(0 1px 10px rgba(0,0,0,.35)); }
.brand__logo { height: 88px; width: auto; }
.brand__endorse { height: 39px; width: auto; }
.app[data-project="dobre-misto"] .brand__logo { height: 55px; }
.app[data-project="dobre-misto"] .brand__endorse { height: 36px; }

/* ---------- пігулки / кнопки ---------- */
.pill { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 9px 18px; font-size: 14px; text-decoration: none; color: inherit; white-space: nowrap; }
.pill--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 420px; border: 0; border-radius: 999px;
  padding: 10px 10px 10px 26px; min-height: 60px; background: var(--accent); color: var(--on-accent); font-size: 19px; font-weight: 600; text-align: left; }
.cta i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--on-accent); color: var(--accent); }
.cta svg { width: 20px; height: 20px; }

/* ---------- вхід ---------- */
.intro { position: relative; min-height: 100svh; display: flex; flex-direction: column; color: #fff; background: var(--intro-bg); overflow: hidden; }
.intro__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro__shade { position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--intro-bg) 97%, transparent) 0%, color-mix(in srgb, var(--intro-bg) 88%, transparent) 42%, color-mix(in srgb, var(--intro-bg) 45%, transparent) 62%, transparent 80%),
  linear-gradient(to bottom, rgba(0,0,0,.35), transparent 22%); }
.intro__top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: max(18px, env(safe-area-inset-top)) 16px 0; }
.intro__body { position: relative; margin-top: auto; padding: 0 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.intro__title { margin: 0; font-family: var(--head-font); font-weight: var(--head-weight); font-size: clamp(32px, 8.6vw, 60px); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
.app[data-project="balance"] .intro__title { font-weight: 500; }
.intro__sub { margin: 0 0 6px; font-size: 17px; line-height: 1.4; max-width: 34em; opacity: .92; text-wrap: balance; }
.facts { margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,.18); }
.facts div { padding: 14px 12px 12px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.facts div:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.18); }
.facts div:nth-child(even) { padding-left: 14px; }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts dt { font-family: var(--head-font); font-size: 21px; font-weight: 600; color: var(--accent); line-height: 1.15; }
.facts dd { margin: 2px 0 0; font-size: 15px; opacity: .9; }

/* ---------- кроки ---------- */
.split { min-height: 100svh; display: flex; flex-direction: column; }
.split__media { position: relative; height: 22svh; min-height: 150px; overflow: hidden; background: var(--intro-bg); color: #fff; }
.split__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 60%); }
.split__logo { position: absolute; top: 14px; left: 16px; }
.split__logo .brand__logo { height: 46px; }
.split__logo .brand__endorse { height: 22px; }
.app[data-project="dobre-misto"] .split__logo .brand__logo { height: 32px; }
.split__caption { position: absolute; left: 16px; right: 16px; bottom: 14px; }
.split__caption .kicker { color: #fff; }
.split__thesis { display: none; }
.split--result .split__media { display: none; }
.split__panel { flex: 1; padding: 20px 16px max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 720px; margin: 0 auto; }
.split--result .split__panel { padding-top: max(20px, env(safe-area-inset-top)); }

.qhead { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; }
.qhead__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qhead__sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.progress { display: flex; align-items: center; gap: 14px; }
.progress__bars { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.progress__bars span { height: 3px; border-radius: 2px; background: var(--line); }
.progress__bars span.on { background: var(--next-bg); }
.progress__num { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

.kicker--step { color: var(--select); }
.app[data-project="dobre-misto"] .kicker--step { color: var(--ink); }
.q { margin: -6px 0 0; font-family: var(--head-font); font-weight: var(--head-weight); font-size: clamp(30px, 7.4vw, 44px); line-height: 1.08; text-wrap: balance; }
.app[data-project="balance"] .q { font-weight: 400; }
.hint { margin: -4px 0 4px; font-size: 16px; color: var(--muted); }

.opts { display: flex; flex-direction: column; gap: 12px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 16px 16px; min-height: 64px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.opt:hover { border-color: color-mix(in srgb, var(--select) 60%, transparent); }
.opt.is-on { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.opt__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.opt__txt b { font-size: 19px; font-weight: 500; }
.app[data-project="dobre-misto"] .opt__txt b { font-weight: 600; font-size: 18px; }
.opt__txt small { font-size: 14px; color: var(--muted); line-height: 1.35; }
.opt__mark { flex: none; width: 24px; height: 24px; border: 1.5px solid color-mix(in srgb, var(--ink) 35%, transparent); display: grid; place-items: center; color: #fff; }
.opt__mark.is-box { border-radius: 6px; }
.opt__mark.is-radio { border-radius: 50%; }
.opt__mark svg { width: 16px; height: 16px; opacity: 0; }
.opt.is-on .opt__mark { border-color: var(--select); }
.opt.is-on .is-box { background: var(--select); }
.opt.is-on .is-box svg { opacity: 1; }
.opt.is-on .is-radio { box-shadow: inset 0 0 0 5px #fff; background: var(--select); }

.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.back { border: 0; background: none; padding: 8px 0; font-size: 16px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; align-self: flex-start; }
.next { border: 0; border-radius: 999px; padding: 14px 40px; background: var(--next-bg); color: var(--next-fg); font-size: 18px; }

/* ---------- результат ---------- */
.card { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.card__photo { position: relative; aspect-ratio: 16 / 8; background: var(--intro-bg); color: #fff; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), transparent 55%), linear-gradient(to bottom, rgba(0,0,0,.35), transparent 35%); }
.card__tag { position: absolute; z-index: 1; top: 14px; left: 16px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.app[data-project="dobre-misto"] .card__tag { background: var(--accent); color: var(--ink); padding: 4px 9px; border-radius: 999px; }
.card__title { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 12px; margin: 0; font-family: var(--head-font); font-size: 28px; font-weight: 600; line-height: 1.1; }
.card__grid { margin: 0; padding: 4px 18px; display: grid; grid-template-columns: 1fr 1fr; }
.card__grid div { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.card__grid div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.card__grid div:nth-last-child(-n+2) { border-bottom: 0; }
.card__grid dt { font-size: 13px; color: var(--muted); }
.card__grid dd { margin: 4px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card__grid dd.hl { display: inline-block; background: var(--accent); padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-size: clamp(15px, 4.1vw, 18px); }
.chips { list-style: none; margin: 0; padding: 0 18px 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--select); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.note { margin: 8px 18px 16px; font-size: 13px; color: var(--muted); }
.card > :last-child:not(.card__photo):not(.card__grid) { margin-bottom: 16px; }

.form { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.field span { font-size: 12px; color: var(--muted); }
.field input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 18px; padding: 2px 0 4px; color: var(--ink); min-width: 0; }
.field:focus-within { border-color: var(--select); }
.channels { border: 0; margin: 4px 0 0; padding: 0; }
.channels legend { padding: 0; margin-bottom: 8px; font-size: 15px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 11px 4px; font-size: 14px; min-width: 0; }
.seg button.is-on { background: var(--next-bg); color: var(--next-fg); border-color: var(--next-bg); }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.agree input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--select); }
.agree a { color: inherit; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { margin: 0; color: #b3261e; font-size: 15px; }
.submit { border: 0; border-radius: 14px; min-height: 58px; background: var(--submit-bg); color: var(--submit-fg); font-size: 19px; font-weight: 600; }
.thanks { display: flex; flex-direction: column; gap: 14px; }
.vid { margin: 8px 0 0; }
.vid video { aspect-ratio: 9 / 16; height: min(70svh, 640px); width: auto; max-width: 100%; margin: 0 auto; border-radius: 14px; background: #000; object-fit: cover; }
.vid figcaption { text-align: center; margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---------- десктоп ---------- */
@media (min-width: 1024px) {
  .intro__top { padding: 28px 48px 0; }
  .intro__body { padding: 0 48px 40px; max-width: 1180px; }
  .intro__title { font-size: 64px; max-width: 14em; }
  .intro__sub { font-size: 19px; }
  .facts { grid-template-columns: repeat(4, 1fr); max-width: 980px; }
  .facts div, .facts div:nth-child(even) { padding: 16px 24px 6px; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.18); }
  .facts div:first-child { padding-left: 0; }
  .facts div:last-child { border-right: 0; }
  .brand__logo { height: 109px; }
  .brand__endorse { height: 47px; }
  .app[data-project="dobre-misto"] .brand__logo { height: 68px; }
  .app[data-project="dobre-misto"] .brand__endorse { height: 42px; }

  .split { flex-direction: row; height: 100svh; min-height: 640px; }
  .split__media, .split--result .split__media { display: block; flex: 0 0 42%; height: auto; }
  .split__shade { background: linear-gradient(to top, rgba(0,0,0,.72), transparent 50%), linear-gradient(to bottom, rgba(0,0,0,.35), transparent 20%); }
  .split__logo { top: 28px; left: 36px; }
  .split__logo .brand__logo { height: 68px; }
  .split__logo .brand__endorse { height: 30px; }
  .app[data-project="dobre-misto"] .split__logo .brand__logo { height: 44px; }
  .split__caption { left: 36px; right: 36px; bottom: 40px; }
  .split__caption .kicker { color: var(--accent); }
  .split__thesis { display: block; margin: 10px 0 0; font-family: var(--head-font); font-size: 40px; font-weight: 600; line-height: 1.1; text-wrap: balance; max-width: 12em; }
  .split__panel { flex: 1; max-width: none; margin: 0; overflow-y: auto; padding: 32px clamp(32px, 5vw, 80px) 40px; }
  .split__panel > * { width: 100%; max-width: 640px; flex-shrink: 0; }
  .split--result .card__photo { display: none; }
}

/* ---------- планування з каталогу ---------- */
/* Мобільний: три картки стовпчиком (планування ліворуч, дані праворуч) — без горизонтального гортання (Олег 17.11) */
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plans li { min-width: 0; }
.plan { display: grid; grid-template-columns: 124px 1fr; grid-template-areas: "img head" "img meta" "img offer" "img price"; align-content: center; column-gap: 14px; row-gap: 2px; width: 100%; padding: 10px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.plan.is-on { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
.plan__img { grid-area: img; display: grid; place-items: center; aspect-ratio: 1 / 1; background: #fff; border-radius: 10px; overflow: hidden; }
.plan__img img { width: 100%; height: 100%; object-fit: contain; }
.plan__head { grid-area: head; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan__head b { font-size: 18px; font-weight: 600; }
.plan__like { font-style: normal; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--select); color: var(--ink); white-space: nowrap; }
.plan.is-on .plan__like { background: var(--select); color: #fff; }
.plan__meta { grid-area: meta; font-size: 13px; color: var(--muted); }
.plan__offer { grid-area: offer; justify-self: start; align-self: start; width: max-content; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--ink); }
.plan__price { grid-area: price; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Варіант B: планування видно й можна обрати, ціна прихована до заявки */
.plans--locked { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plans--locked .plan { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; height: 100%; padding: 8px; }
.plans--locked .plan__img { width: 100%; margin-bottom: 4px; }
.plans--locked .plan__like { margin-top: auto; align-self: stretch; text-align: center; padding: 5px 0; }
.plan__area { font-size: 15px; font-weight: 600; }
.form__title { margin: 6px 0 0; font-family: var(--head-font); font-size: 24px; font-weight: 600; line-height: 1.15; }
.form .hint { margin: 0 0 4px; }
@media (min-width: 1024px) {
  .plans { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .plan { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 14px 14px; }
  .plan__img { margin-bottom: 6px; }
}

.split__media--vid .split__logo { pointer-events: none; }
