/* Пазарлък v3 — „Инфографика“. Светъл фон, 6 плътни цвята, много данни, анимации.
   Шрифтове: Alumni Sans (заглавия, числа) + Geologica (текст) — и двата с потвърден locl BGR. */
@font-face { font-family: "Alumni Sans"; src: url("/fonts/alumni.woff2") format("woff2-variations"), url("/fonts/alumni.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geologica"; src: url("/fonts/geologica.woff2") format("woff2-variations"), url("/fonts/geologica.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff;
  --tint: #f3f4f8;
  --tint-2: #e9ebf2;
  --ink: #121826;
  --ink-2: #5b6475;
  --ink-3: #8c94a3;
  --line: #e4e7ee;
  --blue: #3b5bfd;
  --coral: #ff5c47;
  --mint: #13c296;
  --sun: #ffc233;
  --violet: #8a5cf6;
  --sky: #3fb6ff;
  --ok: #0fa57f;
  --warn: #e6a100;
  --bad: #f0432f;
  --focus: #3b5bfd;
  --r-s: 10px;
  --r-m: 18px;
  --r-l: 28px;
  --disp: "Alumni Sans", "Geologica", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { 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.6 "Geologica", system-ui, -apple-system, "Segoe UI", sans-serif; font-language-override: "BGR"; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3, .display { font-family: var(--disp); font-weight: 800; line-height: 0.95; letter-spacing: 0; margin: 0; }
h1 { font-size: clamp(3.4rem, 9vw, 8rem); }
h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h3 { font-size: 1.7rem; line-height: 1; }
p { margin: 0 0 0.8em; max-width: 60ch; }
.muted { color: var(--ink-2); }
.num, .fin, .price-big, .meter, .big-num { font-variant-numeric: tabular-nums lining-nums; }
.wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }

/* ── бутони и полета ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform 0.15s var(--ease), background 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-brass { background: var(--ink); color: #fff; }
.btn-primary:hover, .btn-brass:hover { background: var(--blue); border-color: var(--blue); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--tint); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.84rem; margin-top: 4px; }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"], textarea, select { width: 100%; min-height: 46px; padding: 10px 14px; background: #fff; border: 2px solid var(--line); border-radius: var(--r-s); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus { border-color: var(--blue); outline: none; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input[type="color"] { width: 56px; height: 46px; padding: 3px; border: 2px solid var(--line); border-radius: var(--r-s); background: #fff; }
input[type="range"] { width: 100%; accent-color: var(--blue); }
.field { margin-bottom: 18px; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.error { color: var(--bad); font-weight: 600; min-height: 1.5em; margin: 8px 0 0; }

/* ── шапка ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.top .logo img { height: 40px; width: auto; }
.top nav { display: flex; gap: 4px; align-items: center; }

/* ════════ анимации при скрол ════════ */
/* скриваме само когато JS реално работи (.js се слага от скрипта) — ако падне, съдържанието се вижда */
.js [data-anim] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js [data-anim].in { opacity: 1; transform: none; }
[data-anim-delay="1"] { transition-delay: 0.1s; } [data-anim-delay="2"] { transition-delay: 0.2s; } [data-anim-delay="3"] { transition-delay: 0.3s; } [data-anim-delay="4"] { transition-delay: 0.4s; }
.bar-v { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform 1s var(--ease); }
.in .bar-v, .bar-v.in { transform: scaleY(1); }
.bar-h { transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.in .bar-h, .bar-h.in { transform: scaleX(1); }
.donut .arc { transition: stroke-dashoffset 1.3s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-anim], .bar-v, .bar-h { opacity: 1 !important; transform: none !important; transition: none !important; }
  .donut .arc { transition: none; }
  .flow-dot, .ticker, .float { animation: none !important; }
}

/* ════════ КОМАНДЕН РЕД ════════ */
.cmd { display: grid; grid-template-columns: 1.05fr 1.4fr 0.85fr 0.85fr auto; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-m); overflow: hidden; box-shadow: 6px 6px 0 var(--ink); }
.cmd .cell { padding: 10px 16px; border-right: 2px solid var(--tint-2); min-width: 0; }
.cmd .cell label { font-size: 0.74rem; color: var(--ink-2); margin-bottom: 0; }
.cmd .cell input { border: 0; padding: 0; min-height: 30px; font-size: 1.08rem; font-weight: 600; border-radius: 0; background: transparent; }
.cmd .cell:focus-within { background: #f6f8ff; }
.cmd .cell .opt { color: var(--ink-3); font-weight: 400; }
.cmd .go { display: flex; padding: 8px; }
.cmd .go .btn { min-height: 100%; padding: 0 24px; border-radius: 12px; background: var(--blue); border-color: var(--blue); color: #fff; }
.cmd .go .btn:hover { background: var(--ink); border-color: var(--ink); }

/* ── поток с данни ── */
.readout { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.readout li { border-radius: var(--r-s); padding: 12px 14px; background: var(--tint); border: 2px solid transparent; transition: background 0.3s, border-color 0.3s; min-width: 0; }
.readout .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); margin-right: 6px; vertical-align: middle; }
.readout .src { font-weight: 700; font-size: 0.9rem; }
.readout .val { display: block; font-size: 0.82rem; color: var(--ink-2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readout li[data-s="run"] { border-color: var(--blue); background: #eef1ff; }
.readout li[data-s="run"] .dot { background: var(--blue); animation: pulse 0.9s ease-in-out infinite; }
.readout li[data-s="done"] { background: #e3f8f1; }
.readout li[data-s="done"] .dot { background: var(--mint); }
.readout li[data-s="fail"] .dot { background: var(--bad); }
@keyframes pulse { 50% { transform: scale(1.6); opacity: 0.5; } }

/* ════════ ВИЗУАЛИЗАЦИИ ════════ */
.donut { position: relative; width: 132px; height: 132px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.donut .lbl b { font-family: var(--disp); font-size: 2.9rem; font-weight: 800; display: block; }
.donut .lbl span { font-size: 0.7rem; color: var(--ink-2); }
.donut.sm { width: 54px; height: 54px; }
.donut.sm .lbl b { font-size: 1.25rem; }

.chart-bars { width: 100%; height: auto; overflow: visible; }
.chart-bars text { font-family: "Geologica", sans-serif; font-size: 11px; fill: var(--ink-2); }
.chart-bars .v { font-weight: 700; fill: var(--ink); font-size: 12px; }

.costbar { margin-top: 8px; }
.costbar .track { position: relative; height: 34px; border-radius: 10px; background: var(--tint); overflow: visible; display: flex; }
.costbar .seg { height: 100%; display: flex; align-items: center; padding: 0 10px; color: #fff; font-weight: 700; font-size: 0.82rem; white-space: nowrap; overflow: hidden; }
.costbar .seg.cost { background: var(--coral); border-radius: 10px 0 0 10px; }
.costbar .seg.profit { background: var(--mint); border-radius: 0 10px 10px 0; }
.costbar .seg.only { border-radius: 10px; }
.costbar .capmk { position: absolute; top: -8px; bottom: -8px; width: 3px; background: var(--ink); border-radius: 2px; }
.costbar .capmk span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 0.74rem; white-space: nowrap; font-weight: 700; }
.costbar .legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-2); margin-top: 10px; }
.costbar .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* ценомер */
.meter-wrap { padding-top: 46px; }
.meter { position: relative; margin: 0 6px; }
.meter-track { position: relative; height: 16px; border-radius: 8px; display: flex; overflow: hidden; }
.meter-track .z { height: 100%; }
.meter-track .z-ok { background: var(--mint); }
.meter-track .z-warn { background: var(--sun); }
.meter-track .z-bad { background: var(--coral); }
.meter .mk { position: absolute; top: -9px; height: 34px; width: 0; transition: left 1.2s var(--ease); }
.meter .mk::before { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: var(--ink); }
.meter .mk.rec::before { background: var(--blue); width: 6px; left: -3px; }
.meter .mk.cap::before { background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.meter .mk.floor::before { background: var(--violet); }
.meter .mk .tag { position: absolute; top: 38px; transform: translateX(-50%); white-space: nowrap; font-size: 0.74rem; color: var(--ink-2); text-align: center; line-height: 1.2; }
.meter .mk .tag b { display: block; color: var(--ink); font-size: 0.95rem; }
.meter .mk.rec .tag b { color: var(--blue); }
.meter .mk.up .tag { top: auto; bottom: 38px; }
.meter .mk.edge-l .tag { transform: none; left: -4px; text-align: left; }
.meter .mk.edge-r .tag { transform: none; right: -4px; text-align: right; }
.meter-legend { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 0.74rem; margin: 62px 6px 0; }

/* ── доклад ── */
.report { margin-top: 22px; display: grid; gap: 16px; }
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 26px; border-radius: var(--r-l); background: var(--tint); }
.verdict.yes { background: #e3f8f1; }
.verdict.maybe { background: #fff6dc; }
.verdict.no { background: #ffe9e5; }
.verdict.rec { background: #eef1ff; }
.verdict .company { font-weight: 600; color: var(--ink-2); font-size: 0.92rem; }
.verdict .label { font-family: var(--disp); font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; line-height: 0.95; margin-top: 4px; }
.verdict.yes .label { color: var(--ok); }
.verdict.maybe .label { color: #b07a00; }
.verdict.no .label { color: var(--bad); }
.verdict.rec .label { color: var(--blue); }
.verdict .meter-box { grid-column: 1 / -1; }
.score { display: none; }

.panel { background: #fff; border: 2px solid var(--tint-2); border-radius: var(--r-l); padding: 22px 24px; min-width: 0; }
.panel h3 { margin-bottom: 12px; }
.panel.c-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.panel.c-blue .muted, .panel.c-blue .kv dt { color: #d5ddff; }
.cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

.fin { width: 100%; border-collapse: collapse; }
.fin th, .fin td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: right; }
.fin td { white-space: nowrap; }
.fin th:first-child, .fin td:first-child { text-align: left; font-weight: 400; color: var(--ink-2); }
.fin thead th { font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }
.neg { color: var(--bad); }

.factors { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.factors li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; font-size: 0.94rem; }
.factors .d { font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; border-radius: 8px; padding: 2px 0; font-family: var(--disp); font-size: 1.2rem; background: var(--tint); }
.factors .d.p { color: #fff; background: var(--mint); }
.factors .d.m { color: #fff; background: var(--coral); }

.price-big { font-family: var(--disp); font-size: clamp(3.4rem, 7vw, 5.6rem); font-weight: 800; line-height: 0.9; }
.price-range { color: inherit; opacity: 0.85; font-size: 1rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.94rem; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.bullets { margin: 0; padding-left: 1.1em; }
.bullets li { margin-bottom: 6px; }
.say { background: var(--tint); border-radius: 14px; padding: 12px 16px; margin: 0 0 10px; position: relative; }
.say::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 2px; background: var(--violet); }
.teaser-lock { text-align: center; padding: 22px; border: 2px dashed var(--ink-3); border-radius: var(--r-m); }
.note-small { font-size: 0.8rem; color: var(--ink-3); }
.basis { display: inline-block; font-size: 0.8rem; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,0.22); font-weight: 600; }
.offer-hero { display: grid; gap: 6px; }
.offer-hero .q { font-size: 0.92rem; opacity: 0.9; }

/* ════════ НАЧАЛНА СТРАНИЦА ════════ */
.hero { padding: 26px 0 70px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero .lead { font-size: 1.15rem; margin: 18px 0 26px; max-width: 44ch; color: var(--ink-2); }
.hero h1 span { display: inline-block; }
.hero .c1 { color: var(--blue); }
.hero .c2 { color: var(--coral); }
.hero-search { grid-column: 1 / -1; }

/* живата карта в героя */
.live { position: relative; background: #fff; border: 2px solid var(--ink); border-radius: var(--r-l); padding: 22px; box-shadow: 10px 10px 0 var(--sun); min-height: 470px; }
.live .float { position: absolute; border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: 0.86rem; box-shadow: 0 10px 30px -12px rgba(18, 24, 38, 0.4); animation: floaty 5s ease-in-out infinite; }
.live .f1 { top: -18px; right: 24px; background: var(--mint); color: #fff; }
.live .f2 { bottom: -18px; left: 22px; background: var(--violet); color: #fff; animation-delay: -2.5s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.live-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.live-name { font-weight: 700; line-height: 1.25; }
.live-kid { font-size: 0.8rem; color: var(--ink-2); }
.live-row { display: flex; gap: 18px; align-items: center; margin: 14px 0; }
.live-price { background: var(--blue); color: #fff; border-radius: var(--r-m); padding: 16px 18px; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.live-price .big-num { font-family: var(--disp); font-weight: 800; font-size: 3.4rem; line-height: 0.85; }
.live-dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.live-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--tint-2); cursor: pointer; padding: 0; }
.live-dots button[aria-current="true"] { background: var(--ink); width: 24px; border-radius: 5px; }
.live-swap { transition: opacity 0.35s, transform 0.35s var(--ease); }
.live-swap.out { opacity: 0; transform: translateY(8px); }
.chip { display: inline-block; padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: 0.82rem; }
.chip.yes { background: #d6f5ea; color: var(--ok); }
.chip.maybe { background: #fff1c7; color: #8a6000; }
.chip.no { background: #ffdcd6; color: var(--bad); }

/* бягаща лента */
.ticker-wrap { overflow: hidden; border-block: 2px solid var(--ink); background: var(--sun); }
.ticker { display: flex; gap: 48px; width: max-content; padding: 14px 0; animation: tick 40s linear infinite; font-family: var(--disp); font-weight: 800; font-size: 1.6rem; }
.ticker span::after { content: "✦"; margin-left: 48px; color: var(--coral); }
@keyframes tick { to { transform: translateX(-50%); } }

.band { padding: 96px 0; }
.band.tint { background: var(--tint); }
.band.ink { background: var(--ink); color: #fff; }
.band.ink .muted { color: #aab3c2; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.sec-head p { margin: 0; color: var(--ink-2); max-width: 40ch; }
.band.ink .sec-head p { color: #aab3c2; }

/* как работи */
.flow-line { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.flow-line::before { content: ""; position: absolute; left: 6%; right: 6%; top: 58px; height: 4px; background: repeating-linear-gradient(90deg, var(--ink) 0 10px, transparent 10px 20px); z-index: 0; }
.flow-dot { position: absolute; top: 52px; left: 6%; width: 16px; height: 16px; border-radius: 50%; background: var(--coral); z-index: 1; animation: run 6s var(--ease) infinite; }
@keyframes run { 0% { left: 6%; background: var(--blue); } 33% { background: var(--coral); } 66% { background: var(--mint); } 100% { left: 92%; background: var(--violet); } }
.step { position: relative; z-index: 2; text-align: center; }
.step .ic { width: 116px; height: 116px; margin: 0 auto 16px; border-radius: 30px; display: grid; place-items: center; border: 2px solid var(--ink); }
.step .ic svg { width: 54px; height: 54px; }
.step h3 { font-size: 1.9rem; margin-bottom: 6px; }
.step p { margin: 0 auto; color: var(--ink-2); font-size: 0.94rem; max-width: 26ch; }
.step .t { display: inline-block; margin-top: 8px; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--tint); }

/* какво получаваш — мозайка (различна плътност → различни размери) */
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(150px, auto); gap: 16px; }
.tile { border-radius: var(--r-l); padding: 22px; overflow: hidden; position: relative; }
.tile h3 { font-size: 1.9rem; margin-bottom: 4px; }
.tile p { font-size: 0.92rem; margin: 0; opacity: 0.85; }
.t-a { grid-column: span 2; grid-row: span 2; background: var(--blue); color: #fff; }
.t-b { grid-column: span 4; background: var(--tint); }
.t-c { grid-column: span 2; background: var(--sun); }
.t-d { grid-column: span 2; background: var(--mint); color: #fff; }
.t-e { grid-column: span 3; background: var(--violet); color: #fff; }
.t-f { grid-column: span 3; background: var(--coral); color: #fff; }
.tile .big-num { font-family: var(--disp); font-weight: 800; font-size: 5rem; line-height: 0.85; }
.mini-pdf { background: #fff; color: var(--ink); border-radius: 12px; padding: 12px; font-size: 0.72rem; margin-top: 14px; transform: rotate(-2deg); box-shadow: 0 16px 30px -18px rgba(0,0,0,0.5); }
.mini-pdf .h { background: #203a5c; color: #fff; padding: 6px 10px; border-radius: 6px; font-weight: 700; display: flex; justify-content: space-between; }
.mini-pdf .r { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 4px 0; }

/* примери */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case { border-radius: var(--r-l); background: #fff; border: 2px solid var(--ink); overflow: hidden; display: flex; flex-direction: column; }
.case-top { padding: 20px 22px 16px; color: #fff; }
.case:nth-child(1) .case-top { background: var(--coral); }
.case:nth-child(2) .case-top { background: var(--blue); }
.case:nth-child(3) .case-top { background: var(--mint); }
.case-top .who { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.case-top .what { font-size: 0.84rem; opacity: 0.9; }
.case-top .q { font-family: var(--disp); font-size: 1.9rem; font-weight: 800; line-height: 1; margin-top: 12px; }
.case-body { padding: 18px 22px 22px; display: grid; gap: 14px; flex: 1; }
.case-res { display: flex; align-items: end; justify-content: space-between; gap: 10px; border-top: 2px dashed var(--line); padding-top: 14px; margin-top: auto; }
.case-res .big-num { font-family: var(--disp); font-size: 3.2rem; font-weight: 800; line-height: 0.85; }
.case-note { margin-top: 18px; font-size: 0.84rem; color: var(--ink-2); }

/* калкулатор на разходите */
.calc { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: stretch; }
.calc-in { background: #fff; color: var(--ink); border-radius: var(--r-l); padding: 26px; display: grid; gap: 18px; align-content: start; }
.calc-in output { font-family: var(--disp); font-weight: 800; font-size: 1.8rem; float: right; line-height: 1; }
.calc-out { border-radius: var(--r-l); padding: 26px; background: #1c2436; display: grid; gap: 18px; align-content: start; }
.calc-out .big-num { font-family: var(--disp); font-weight: 800; font-size: clamp(4rem, 9vw, 7rem); line-height: 0.85; color: var(--sun); }
.calc-out .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc-out .kpi { background: rgba(255,255,255,0.07); border-radius: 14px; padding: 12px; }
.calc-out .kpi b { display: block; font-family: var(--disp); font-size: 1.9rem; line-height: 1; }
.calc-out .kpi span { font-size: 0.78rem; color: #aab3c2; }
.calc-out .costbar .track { background: rgba(255,255,255,0.1); }
.calc-out .costbar .capmk { background: #fff; }
.calc-out .costbar .legend { color: #aab3c2; }

/* цени */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan { padding: 28px; border-radius: var(--r-l); display: flex; flex-direction: column; gap: 12px; border: 2px solid var(--ink); }
.plan:nth-child(1) { background: #fff; }
.plan:nth-child(2) { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-10px); box-shadow: 10px 10px 0 var(--ink); }
.plan:nth-child(3) { background: var(--sun); }
.plan .p { font-family: var(--disp); font-size: 4.4rem; font-weight: 800; line-height: 0.85; }
.plan .p small { font-family: "Geologica"; font-size: 0.95rem; font-weight: 600; }
.plan ul { margin: 0; padding-left: 1.1em; flex: 1; }
.beta { margin-top: 18px; font-size: 0.94rem; }
.faq { max-width: 820px; }
.faq details { border-bottom: 2px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--disp); font-weight: 800; font-size: 1.6rem; line-height: 0.8; color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.cta-end { text-align: center; padding: 90px 0; background: var(--blue); color: #fff; }
.cta-end h2 { font-size: clamp(3rem, 7vw, 6rem); }
.cta-end .btn { margin-top: 26px; background: #fff; border-color: #fff; color: var(--ink); min-height: 56px; padding: 0 30px; font-size: 1.05rem; }
footer { padding: 34px 0 50px; color: var(--ink-2); font-size: 0.88rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }

/* ════════ ПРИЛОЖЕНИЕ ════════ */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; }
.side .logo img { height: 34px; width: auto; }
.side nav { display: grid; gap: 4px; }
.side nav a { padding: 10px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; color: #aab3c2; }
.side nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.side nav a[aria-current="page"] { background: var(--blue); color: #fff; }
.side .who { margin-top: auto; font-size: 0.84rem; color: #aab3c2; overflow-wrap: anywhere; }
.side .who button { color: #fff; margin-top: 6px; padding: 0; border: 0; background: none; text-decoration: underline; cursor: pointer; }
.main { padding: 30px clamp(16px, 4vw, 44px) 80px; min-width: 0; background: var(--bg); }
.main > .head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.main > .head h2 { font-size: clamp(2.4rem, 4vw, 3.4rem); }
.list { border: 2px solid var(--tint-2); border-radius: var(--r-l); overflow: hidden; }
.list a.item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 2px solid var(--tint); text-decoration: none; color: var(--ink); }
.list a.item:last-child { border-bottom: 0; }
.list a.item:hover { background: #f8f9fc; }
.list .t { font-weight: 700; }
.list .s { font-size: 0.84rem; color: var(--ink-2); }
.pill { font-size: 0.78rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; background: var(--tint); color: var(--ink-2); white-space: nowrap; }
.pill.yes { background: #d6f5ea; color: var(--ok); }
.pill.maybe { background: #fff1c7; color: #8a6000; }
.pill.no { background: #ffdcd6; color: var(--bad); }
.pill.sent { background: #e3e8ff; color: var(--blue); }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-2); }

.card-form { background: #fff; border: 2px solid var(--tint-2); border-radius: var(--r-l); padding: 26px; max-width: 920px; }
.card-form + .card-form { margin-top: 16px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--tint); }
.auth .card-form { width: min(460px, 100%); box-shadow: 10px 10px 0 var(--blue); border-color: var(--ink); }
.auth .logo img { height: 40px; width: auto; margin: 0 auto 22px; }
.auth h2 { font-size: 3rem; }

.wizard-steps { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.wizard-steps span { padding: 6px 14px; border-radius: 99px; background: var(--tint); font-size: 0.86rem; font-weight: 700; color: var(--ink-2); }
.wizard-steps span[aria-current="step"] { background: var(--blue); color: #fff; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.price-table, .items-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.price-table th, .items-table th { text-align: left; font-size: 0.78rem; color: var(--ink-2); font-weight: 600; padding: 0 6px 6px 0; }
.price-table td, .items-table td { padding: 0 6px 8px 0; vertical-align: top; }
.price-table input, .items-table input { min-height: 42px; padding: 6px 10px; }
.price-table .x, .items-table .x { border: 0; background: none; cursor: pointer; font-size: 1.3rem; color: var(--ink-3); width: 36px; height: 42px; }
.price-table .x:hover, .items-table .x:hover { color: var(--bad); }
.price-table th.cost-h { color: var(--coral); }
.items-table .sum { text-align: right; font-variant-numeric: tabular-nums; padding-top: 10px; white-space: nowrap; font-weight: 700; }
.totals { margin-left: auto; width: min(320px, 100%); display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-variant-numeric: tabular-nums; margin-top: 10px; }
.totals .grand { font-family: var(--disp); font-weight: 800; font-size: 2rem; border-top: 2px solid var(--ink); padding-top: 6px; color: var(--blue); }

.upload { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.upload .preview { width: 150px; height: 64px; border: 2px dashed var(--line); border-radius: var(--r-s); display: grid; place-items: center; background: #fff; overflow: hidden; font-size: 0.8rem; color: var(--ink-3); }
.upload .preview img { max-height: 56px; max-width: 140px; object-fit: contain; }

dialog { border: 2px solid var(--ink); border-radius: var(--r-l); padding: 26px; width: min(520px, calc(100% - 32px)); background: #fff; color: var(--ink); box-shadow: 10px 10px 0 var(--blue); }
dialog::backdrop { background: rgba(18, 24, 38, 0.55); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 99px; font-weight: 600; z-index: 50; max-width: calc(100% - 32px); }

/* ── мобилно ── */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .cmd { grid-template-columns: 1fr 1fr; }
  .cmd .cell { border-bottom: 2px solid var(--tint-2); }
  .cmd .cell.svc { grid-column: 1 / -1; }
  .cmd .go { grid-column: 1 / -1; }
  .cmd .go .btn { width: 100%; min-height: 50px; }
  .cases, .plans { grid-template-columns: 1fr; }
  .plan:nth-child(2) { transform: none; }
  .calc { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .t-a, .t-b, .t-c, .t-d, .t-e, .t-f { grid-column: span 2; grid-row: auto; }
  .flow-line { grid-template-columns: 1fr 1fr; row-gap: 34px; }
  .flow-line::before, .flow-dot { display: none; }
  .readout { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; gap: 12px; z-index: 10; overflow-x: auto; }
  .side nav { display: flex; gap: 2px; }
  .side nav a { padding: 8px 10px; font-size: 0.9rem; }
  .side .who { display: none; }
  .side .logo img { height: 28px; }
  .list a.item { grid-template-columns: auto 1fr auto; }
  .list a.item .s-hide { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .cmd { grid-template-columns: 1fr; box-shadow: 4px 4px 0 var(--ink); }
  .readout { grid-template-columns: 1fr; }
  .verdict { grid-template-columns: 1fr; }
  .live { min-height: 0; box-shadow: 6px 6px 0 var(--sun); }
  .live .float { display: none; }
  .flow-line { grid-template-columns: 1fr; }
  .calc-out .kpis { grid-template-columns: 1fr 1fr; }
  .top .hide-s { display: none; }
  .fin { font-size: 0.88rem; }
  .fin th:first-child { white-space: normal; padding-right: 8px; }
  .meter .mk .tag { font-size: 0.68rem; }
  .items-table thead, .price-table thead { display: none; }
  .items-table tr, .price-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 2px solid var(--tint); }
  .items-table td, .price-table td { padding: 0; width: auto !important; }
  .items-table td.name, .price-table td.name { grid-column: 1 / -1; }
}

/* поправки след преглед */
.big-num, .price-big, .plan .p, .calc-in output, .kpi b, .donut .lbl b, .totals .grand { font-variant-numeric: lining-nums proportional-nums; word-spacing: -0.06em; }
.donut .lbl b { color: var(--ink); }
.donut .lbl span { color: var(--ink-2); }
.live { min-height: 0; }

/* v3.1 — нова формула */
.meter-track .z-ok2 { background: #8fe3c9; }
.meter-legend span:nth-child(2), .meter-legend span:nth-child(3), .meter-legend span:nth-child(4) { flex: 0 0 auto; }
.meter-legend { gap: 8px; }
.plan-row { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; margin-top: 16px; }
.plan-row > div { background: rgba(255,255,255,0.14); border-radius: 14px; padding: 10px 12px; }
.plan-row > div.t { background: #fff; color: var(--ink); }
.plan-row span { display: block; font-size: 0.78rem; opacity: 0.85; }
.plan-row b { font-family: var(--disp); font-size: 1.9rem; font-weight: 800; line-height: 1; font-variant-numeric: lining-nums proportional-nums; }
.pkgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pkg { border-radius: 16px; padding: 14px; background: var(--tint); }
.pkg.mid { background: var(--blue); color: #fff; }
.pkg h4 { margin: 0; font-size: 0.86rem; }
.pkg .pp { font-family: var(--disp); font-size: 2.2rem; font-weight: 800; line-height: 1; margin: 6px 0; font-variant-numeric: lining-nums proportional-nums; }
.pkg p { font-size: 0.82rem; margin: 0; opacity: 0.85; }
.steps-list { margin: 10px 0 0; padding-left: 1.1em; font-size: 0.88rem; color: var(--ink-2); }
@media (max-width: 640px) { .plan-row, .pkgs { grid-template-columns: 1fr; } }

/* ъгли (копирайтинг v2) */
.angles { padding-top: 70px; }
.angle { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 46px 0; border-bottom: 2px solid var(--tint); }
.angle:last-child { border-bottom: 0; }
.angle.rev .angle-txt { order: 2; }
.angle h2 { font-size: clamp(2.6rem, 5vw, 4.4rem); margin: 14px 0 14px; }
.angle p { font-size: 1.12rem; color: var(--ink-2); max-width: 44ch; }
.angle-n { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: #fff; font-family: var(--disp); font-weight: 800; font-size: 1.4rem; }
.angle-viz { background: var(--tint); border-radius: var(--r-l); padding: 26px; min-height: 260px; }
.cmp { display: grid; gap: 14px; }
.cmp-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.cmp-row span { font-weight: 700; font-size: 0.92rem; }
.cmp-bar { height: 52px; border-radius: 12px; display: flex; align-items: center; padding: 0 14px; color: #fff; font-family: var(--disp); font-weight: 800; font-size: 1.8rem; white-space: nowrap; }
.gap-note { margin-top: 18px; display: flex; align-items: baseline; gap: 10px; }
.gap-note b { font-family: var(--disp); font-size: 3.4rem; line-height: 0.9; color: var(--coral); }
.tl { display: grid; gap: 18px; }
.tl-row b { display: block; font-size: 0.9rem; margin-bottom: 8px; }
.tl-track { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-track i { font-style: normal; font-size: 0.82rem; font-weight: 700; padding: 8px 12px; border-radius: 10px; background: #fff; }
.tl-track i.bad { background: #ffdcd6; color: var(--bad); }
.tl-track i.ok { background: #d6f5ea; color: var(--ok); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.quote { background: #fff; border-radius: var(--r-l); padding: 24px; border: 2px solid var(--ink); }
.quote p { font-size: 1.05rem; }
.quote .who { display: flex; gap: 12px; align-items: center; margin-top: 14px; font-size: 0.9rem; }
.quote .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
@media (max-width: 1000px) { .angle { grid-template-columns: 1fr; gap: 24px; } .angle.rev .angle-txt { order: 0; } }

.h1-money { font-size: clamp(3rem, 7.2vw, 6.6rem); }
.gap-note b { white-space: nowrap; }
