/* Renovatsiya Hisob — мобильная версия в первую очередь. Только transform/opacity в анимациях. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece4;
  --ink: #17201d;
  --ink-2: #4a5550;
  --ink-3: #75807a;
  --line: #dcd8cd;
  --brand: #0e6b5c;
  --brand-ink: #ffffff;
  --brand-soft: #dcefe9;
  --accent: #c8962c;
  --good: #1f7a4d;
  --good-soft: #e1f3e8;
  --warn: #a5650b;
  --warn-soft: #fbf0db;
  --bad: #b3261e;
  --bad-soft: #fbe4e2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 32, 29, .06), 0 6px 24px rgba(23, 32, 29, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111614; --surface: #18201d; --surface-2: #1f2925; --ink: #eef2ef; --ink-2: #b9c4be; --ink-3: #8b9690;
    --line: #2c3833; --brand: #3fb59d; --brand-ink: #062a23; --brand-soft: #173a32; --accent: #e0b35a;
    --good: #5fd39a; --good-soft: #163626; --warn: #f0b45a; --warn-soft: #3a2c12; --bad: #ff8a80; --bad-soft: #3d1a18;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 5.5vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.75rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo span small { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-3); letter-spacing: 0; }
.nav { display: none; gap: 18px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.langs { display: flex; gap: 2px; margin-left: auto; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.langs a { padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650; color: var(--ink-2); text-decoration: none; }
.langs a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav a { white-space: nowrap; }
@media (min-width: 1180px) { .nav { display: flex; } .langs { margin-left: 8px; } }
@media (max-width: 420px) { .logo span small { display: none; } }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent; font: 650 1rem/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .12s ease, opacity .12s ease; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { opacity: .92; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-tg { background: #229ed9; color: #fff; }
.btn-wa { background: #1fa855; color: #fff; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn svg { width: 20px; height: 20px; }

/* ---------- главная ---------- */
.hero { padding: 28px 0 8px; }
.hero-grid { display: grid; gap: 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 6px 10px; border-radius: 999px; margin-bottom: 14px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.hero-cta .btn-primary { flex: 1 1 220px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 10px 0 0; color: var(--ink-2); font-size: .9rem; }
.trust li::before { content: "✓ "; color: var(--good); font-weight: 800; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.hero-card h3 { font-size: .95rem; color: var(--ink-2); font-weight: 650; }
@media (min-width: 900px) { .hero { padding: 56px 0 24px; } .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; } }

.section { padding: 36px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.section-alt .card { background: var(--bg); }
.card h3 { display: flex; gap: 10px; align-items: center; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.icon svg { width: 22px; height: 22px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; }
.steps b { display: block; }

/* ---------- формы ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .field > legend { font-weight: 650; font-size: .95rem; }
.hint { font-size: .84rem; color: var(--ink-3); }
.input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 400 1rem/1.3 var(--font); }
textarea { min-height: 96px; resize: vertical; }
.input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 64px; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: .9rem; pointer-events: none; }
.field.invalid .input, .field.invalid select { border-color: var(--bad); }
.err { color: var(--bad); font-size: .86rem; font-weight: 600; }
.err:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.choices { display: grid; gap: 8px; }
@media (min-width: 560px) { .choices-2 { grid-template-columns: 1fr 1fr; } .choices-3 { grid-template-columns: repeat(3, 1fr); } }
.choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice input { margin: 3px 0 0; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice b { display: block; font-weight: 650; }
.choice small { color: var(--ink-3); }
.row-2 { display: grid; gap: 16px; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 2px; flex: none; }

/* мастер */
.wizard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.progress { display: flex; gap: 6px; margin-bottom: 18px; }
.progress span { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-2); transition: opacity .2s; }
.progress span.on { background: var(--brand); }
.step-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.step-title small { color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.js .step { display: none; }
.js .step.active { display: grid; gap: 16px; animation: fade .25s ease; }
.no-js-only { display: block; }
.js .no-js-only { display: none; }
.step-nav { display: flex; gap: 10px; margin-top: 8px; }
.step-nav .btn-primary { flex: 1; }
.js-only { display: none; }
.js .js-only { display: block; }
.js .js-only.btn { display: inline-flex; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.preview { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--ink); font-size: .92rem; }
.preview:empty { display: none; }

/* ---------- отчёт ---------- */
.verdict { border-radius: 20px; padding: 20px; margin: 16px 0; border: 1px solid var(--line); background: var(--surface); }
.verdict.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.verdict.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.verdict.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.verdict .tag { display: inline-block; font-weight: 800; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--surface); margin-bottom: 8px; }
.verdict.good .tag { color: var(--good); } .verdict.warn .tag { color: var(--warn); } .verdict.bad .tag { color: var(--bad); }
.verdict h1 { font-size: clamp(1.4rem, 4.6vw, 2rem); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border-radius: 12px; padding: 12px; border: 1px solid var(--line); }
.kpi small { display: block; color: var(--ink-3); font-size: .78rem; font-weight: 600; }
.kpi b { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.options { display: grid; gap: 14px; }
@media (min-width: 900px) { .options { grid-template-columns: repeat(3, 1fr); } }
.option { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.option.best { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.option.offered .badge-offer { display: inline-block; }
.option-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.badge { display: inline-block; font-size: .72rem; font-weight: 750; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.brand { background: var(--brand); color: var(--brand-ink); }
.big { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.lines li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.lines li span:last-child { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 10px; background: var(--brand); transform-origin: left; }
.bar i.over { background: var(--warn); }
.bars { display: grid; gap: 10px; }
.bars .lbl { display: flex; justify-content: space-between; font-size: .86rem; color: var(--ink-2); margin-bottom: 4px; }
.notes { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .93rem; }
.todo { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.todo li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.todo li::before { content: ""; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--brand); margin-top: 2px; display: grid; place-items: center; color: var(--brand-ink); font-size: 14px; font-weight: 900; }
.js .todo li { cursor: pointer; }
.todo li.done::before { content: "✓"; background: var(--brand); }
.todo li.done b { text-decoration: line-through; color: var(--ink-3); }
.todo li.must { border-left: 4px solid var(--bad); }
.todo b { display: block; }
.share { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .share { grid-template-columns: repeat(4, auto); justify-content: start; } }
.copy-ok { color: var(--good); font-weight: 650; font-size: .9rem; }
.callout { border-left: 4px solid var(--accent); background: var(--surface); padding: 14px 16px; border-radius: 0 12px 12px 0; }
.disclaimer { font-size: .82rem; color: var(--ink-3); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; background: var(--surface-2); white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
details + details { margin-top: 8px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--brand); }
details[open] summary::after { content: "−"; }
details > div { padding-bottom: 14px; color: var(--ink-2); }
.search { margin-bottom: 14px; }

/* обновления */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { padding: 14px 16px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.timeline time { font-weight: 700; color: var(--brand); font-size: .9rem; }

/* подвал */
.foot { margin-top: 40px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
.foot .cols { display: grid; gap: 18px; }
@media (min-width: 700px) { .foot .cols { grid-template-columns: 2fr 1fr 1fr; } }
.foot a { color: var(--ink-2); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; z-index: 20; }
.sticky-cta { position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.js .sticky-cta { opacity: 0; pointer-events: none; transition: opacity .2s; }
.js .sticky-cta.on { opacity: 1; pointer-events: auto; }
@media (min-width: 900px) { .sticky-cta { display: none; } }
.empty { text-align: center; padding: 40px 16px; }
.empty svg { width: 72px; height: 72px; color: var(--ink-3); }

/* печать: отчёт и памятка помещаются на A4 */
@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --ink-3: #444; --line: #bbb; }
  .top, .foot, .no-print, .share, .sticky-cta, .btn { display: none !important; }
  body { font-size: 11pt; }
  .option, .card, .verdict, .todo li { break-inside: avoid; box-shadow: none; }
  .options { grid-template-columns: repeat(3, 1fr); }
  a { color: #000; text-decoration: none; }
  .print-url { display: block !important; }
}
.print-url { display: none; }

/* утилиты (без inline-стилей: CSP style-src 'self') */
.mt-14 { margin-top: 14px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; } .mt-32 { margin-top: 32px; } .mb-20 { margin-bottom: 20px; } .my-20 { margin: 20px 0; }
.m-0 { margin: 0; } .m-tight { margin: .3em 0; } .m-center { margin: 0 auto 1em; } .pb-0 { padding-bottom: 0; }
.w-640 { max-width: 640px; } .stack { display: grid; gap: 8px; } .row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.h-icon { display: flex; gap: 10px; align-items: center; margin: 0; } .r-home { font-size: 1.25rem; margin: 0; }
.card-brand { border-color: var(--brand); } tr.hl td { font-weight: 700; background: var(--brand-soft); }
.kpis[data-fit] { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
svg.bar { display: block; width: 100%; height: 10px; background: none; }
.bar-bg { fill: var(--surface-2); } .bar-fg { fill: var(--brand); }
.field-label { font-size: .95rem; }
.callout svg { width: 18px; height: 18px; vertical-align: -3px; }
.small svg, p > svg { width: 18px; height: 18px; vertical-align: -4px; }
[hidden] { display: none !important; }
.tpl { white-space: pre-wrap; font: .9rem/1.5 var(--font); background: var(--surface-2); padding: 12px; border-radius: 10px; color: var(--ink); }
