:root {
    --c-navy: #0f2a4a;
    --c-navy-2: #16375f;
    --c-green: #16a34a;
    --c-green-d: #128a3e;
    --c-red: #dc2626;
    --c-text: #1e293b;
    --c-muted: #64748b;
    --c-line: #e2e8f0;
    --c-bg-alt: #f5f8fc;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 42, 74, .08);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font: 16px/1.6 var(--font);
    color: var(--c-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 50px); letter-spacing: -.02em; }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
a { color: var(--c-green-d); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 13px 22px; border-radius: 10px; border: 2px solid transparent;
    font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, transform .1s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--c-green); color: #fff; box-shadow: 0 6px 18px rgba(22, 163, 74, .3); }
.btn--primary:hover:not(:disabled) { background: var(--c-green-d); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: rgba(127, 127, 127, .08); }
.btn--lg { padding: 17px 28px; font-size: 17px; }
.btn--sm { padding: 8px 14px; font-size: 14px; }
.btn--block { width: 100%; }

/* Header */
.header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--c-line);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--c-navy); text-decoration: none; white-space: nowrap; }
.logo__icon { width: 32px; height: 32px; }
.logo--light { color: #fff; }
.nav { display: none; gap: 22px; margin-left: auto; }
.nav a { color: var(--c-text); text-decoration: none; font-weight: 500; white-space: nowrap; }
.btn--sm { white-space: nowrap; }
.nav a:hover { color: var(--c-green-d); }
.header__contacts { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header__phone { font-weight: 700; color: var(--c-navy); text-decoration: none; white-space: nowrap; }
.header__contacts .btn { display: none; }

/* Hero */
.hero {
    background: radial-gradient(1000px 500px at 85% 10%, #1d4f86 0%, transparent 60%), var(--c-navy);
    color: #fff; padding: 48px 0 64px; overflow: hidden;
}
.hero__inner { display: grid; gap: 40px; align-items: center; }
.hero__badge {
    display: inline-block; padding: 6px 14px; border-radius: 99px;
    background: rgba(220, 38, 38, .18); color: #fecaca; font-weight: 600; font-size: 14px;
}
.hero__lead { font-size: 18px; color: #cbd5e1; max-width: 620px; }
.hero__lead b { color: #fff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero__actions .btn--ghost { color: #fff; }
.hero__stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hero__stats b { display: block; font-size: 26px; color: #4ade80; }
.hero__stats span { font-size: 14px; color: #94a3b8; }

.hero__visual { position: relative; min-height: 500px; max-width: 480px; width: 100%; justify-self: center; }
.receipt {
    position: absolute; width: 260px; padding: 20px 18px 26px; background: #fff; color: #334155;
    font: 13px/1.5 ui-monospace, Consolas, monospace; border-radius: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.receipt::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
    background: linear-gradient(-45deg, transparent 6px, #fff 0) 0 0 / 12px 8px, linear-gradient(45deg, transparent 6px, #fff 0) 0 0 / 12px 8px;
}
.receipt--bad { top: 0; left: 0; transform: rotate(-4deg); }
.receipt--good { top: 235px; right: 0; transform: rotate(3deg); }
.receipt__title { text-align: center; font-weight: 700; margin-bottom: 10px; border-bottom: 1px dashed #cbd5e1; padding-bottom: 8px; }
.receipt__row { display: flex; justify-content: space-between; padding: 3px 6px; border-radius: 4px; }
.receipt__row--err { background: #fee2e2; color: var(--c-red); }
.receipt__row--ok { background: #dcfce7; color: var(--c-green-d); }
.receipt__stamp {
    margin-top: 14px; text-align: center; font: 800 15px var(--font); text-transform: uppercase;
    border: 3px solid; border-radius: 6px; padding: 4px; transform: rotate(-3deg);
}
.receipt__stamp--bad { color: var(--c-red); }
.receipt__stamp--good { color: var(--c-green); }

/* Sections */
.section { padding: 64px 0; }
.section--alt { background: var(--c-bg-alt); }
.section--dark { background: var(--c-navy); color: #fff; }
.section--dark .section__lead, .risk__text p, .quiz-wrap__text p { color: #cbd5e1; }
.section__title { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -.01em; }
.section__lead { font-size: 18px; color: var(--c-muted); max-width: 760px; margin-bottom: 36px; }

/* Cards */
.cards { display: grid; gap: 18px; }
.card {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}
.card p { color: var(--c-muted); margin: 0; }
.card--flat { box-shadow: none; background: var(--c-bg-alt); border: 0; }
.card__icon {
    display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 40px; padding: 0 10px;
    border-radius: 10px; background: #fee2e2; color: var(--c-red); font-weight: 800; margin-bottom: 14px;
}

/* Checklists */
.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checklist li::before {
    content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--c-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.checklist--warn li::before {
    background: var(--c-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v8M12 18v.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.checklist--warn li, .checklist--light li { color: #e2e8f0; }
.checklist--warn b { color: #fff; }

/* Risk + calculator */
.risk { display: grid; gap: 40px; align-items: start; }
.risk__note { background: rgba(74, 222, 128, .12); border-left: 4px solid #4ade80; padding: 14px 16px; border-radius: 8px; }
.calc { background: #fff; color: var(--c-text); border-radius: var(--radius); padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.calc__title { font-size: 22px; }
.calc__result { margin: 8px 0 20px; border-top: 1px solid var(--c-line); }
.calc__line { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.calc__line span { color: var(--c-muted); font-size: 15px; }
.calc__line b { white-space: nowrap; font-size: 18px; }
.calc__line--bad b { color: var(--c-red); font-size: 22px; }
.calc__line--good b { color: var(--c-green-d); font-size: 22px; }
.calc__hint { font-size: 12px; color: var(--c-muted); margin: 12px 0 0; }

/* Fields */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"], .field input[type="tel"], .field select {
    width: 100%; padding: 13px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
    font: 16px var(--font); color: var(--c-text); background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid var(--c-green); outline-offset: 1px; border-color: transparent; }
.field input.is-invalid { border-color: var(--c-red); }
.field input[type="range"] { width: 100%; accent-color: var(--c-green); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--c-muted); margin-bottom: 14px; }
.consent input { margin-top: 3px; accent-color: var(--c-green); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { color: var(--c-red); font-size: 14px; margin: 0 0 12px; }
.form-success { text-align: center; padding: 20px 0; }
.form-success h3 { color: var(--c-green-d); font-size: 24px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: s; }
.step { position: relative; padding: 26px 24px; border-radius: var(--radius); background: var(--c-bg-alt); }
.step p { color: var(--c-muted); margin: 0; }
.step__num {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border-radius: 50%; background: var(--c-green); color: #fff; font-weight: 800; margin-bottom: 14px;
}

.tags-grid { display: grid; gap: 24px; }
.tags-grid__col { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }

/* KKT */
.kkt { display: grid; gap: 18px; margin-bottom: 20px; }
.kkt__item { border: 2px solid var(--c-line); border-radius: var(--radius); padding: 26px; }
.kkt__item--main { border-color: var(--c-green); background: #f0fdf4; }
.kkt__item p { color: var(--c-muted); margin: 0; }
.kkt__badge {
    display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px;
    background: var(--c-green); color: #fff; margin-bottom: 10px;
}
.kkt__badge--alt { background: var(--c-navy-2); }
.ofd-list { color: var(--c-muted); }

/* Prices */
.price {
    position: relative; display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--c-line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow);
}
.price .checklist { flex: 1; }
.price--hit { border: 2px solid var(--c-green); }
.price__label {
    position: absolute; top: -13px; left: 24px; background: var(--c-green); color: #fff;
    font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 99px;
}
.price__value { font-size: 30px; font-weight: 800; color: var(--c-navy); margin-bottom: 18px; }
.price__value small { font-size: 15px; font-weight: 500; color: var(--c-muted); }

.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 28px; }
.tier { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow); }
.tier--best { border: 2px solid var(--c-green); }
.tier__range { font-weight: 600; color: var(--c-muted); font-size: 15px; }
.tier__value { font-size: 28px; font-weight: 800; color: var(--c-navy); margin: 6px 0; }
.tier__value small { font-size: 14px; font-weight: 500; color: var(--c-muted); }
.tier p { margin: 0; font-size: 14px; color: var(--c-muted); }

.examples { margin-bottom: 28px; }
.examples__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.example { display: flex; flex-direction: column; background: var(--c-navy); color: #fff; border-radius: var(--radius); padding: 18px; }
.example span { color: #cbd5e1; font-size: 15px; }
.example b { font-size: 24px; color: #4ade80; margin: 4px 0; }
.example small { color: #94a3b8; }

.included { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 28px; }
.included__list { display: grid; gap: 0 24px; margin-bottom: 8px; }
.included__note { margin: 0; color: var(--c-muted); font-size: 15px; }
.prices__cta { text-align: center; margin: 0 0 40px; }

.tags-note { margin: 28px 0 0; padding: 18px 22px; border-left: 4px solid var(--c-green); background: #fff; border-radius: 10px; }
.calc__ratio { margin: -8px 0 16px; padding: 10px 12px; border-radius: 8px; background: #fef2f2; color: var(--c-red); font-weight: 600; font-size: 14px; }

.compare { display: grid; gap: 18px; }
.compare__col { border-radius: var(--radius); padding: 24px; }
.compare__col ul { margin: 0; padding-left: 20px; }
.compare__col li { margin-bottom: 6px; }
.compare__col--bad { background: #fef2f2; }
.compare__col--bad h3 { color: var(--c-red); }
.compare__col--good { background: #f0fdf4; }
.compare__col--good h3 { color: var(--c-green-d); }

/* FAQ */
.faq__item { background: #fff; border-radius: 12px; margin-bottom: 10px; border: 1px solid var(--c-line); }
.faq__item summary {
    cursor: pointer; list-style: none; padding: 18px 50px 18px 20px; font-weight: 600; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    font-size: 24px; color: var(--c-green); transition: transform .2s;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { padding: 0 20px 18px; margin: 0; color: var(--c-muted); }

/* Quiz */
.quiz-wrap { display: grid; gap: 36px; align-items: start; }
.quiz {
    position: relative; background: #fff; color: var(--c-text); border-radius: var(--radius);
    padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); min-height: 420px;
}
.quiz__progress { height: 6px; border-radius: 3px; background: var(--c-line); overflow: hidden; }
.quiz__progress span { display: block; height: 100%; width: 20%; background: var(--c-green); transition: width .3s; }
.quiz__counter { font-size: 14px; color: var(--c-muted); margin: 10px 0 14px; }
.quiz__step { display: none; border: 0; padding: 0; margin: 0 0 20px; }
.quiz__step.is-active { display: block; animation: fade .25s; }
.quiz__step legend { font-size: 22px; font-weight: 700; margin-bottom: 16px; padding: 0; }
.quiz__step legend small { font-size: 14px; color: var(--c-muted); font-weight: 400; }
.quiz__nav { display: flex; gap: 10px; justify-content: space-between; }
.quiz__nav [data-quiz-next], .quiz__nav [data-quiz-submit] { margin-left: auto; }
.form-success p { color: var(--c-muted); }
.quiz .form-success { padding: 120px 0; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; }
.option span {
    display: block; padding: 14px; border: 2px solid var(--c-line); border-radius: 10px;
    font-weight: 600; text-align: center; transition: border-color .15s, background .15s;
}
.option:hover span { border-color: #86efac; }
.option input:checked + span { border-color: var(--c-green); background: #f0fdf4; color: var(--c-green-d); }
.option input:focus-visible + span { outline: 2px solid var(--c-green); outline-offset: 2px; }

@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Footer */
.footer { background: #0a1d33; color: #94a3b8; padding: 36px 0 90px; font-size: 14px; }
.footer__inner { display: grid; gap: 24px; }
.footer a { color: #cbd5e1; }
.footer__req { margin: 10px 0 0; }
.footer__contacts, .footer__links { display: flex; flex-direction: column; gap: 6px; }

.legal h1 { font-size: clamp(26px, 4vw, 36px); }
.legal h2 { font-size: 20px; margin-top: 1.6em; }
.legal ul { padding-left: 22px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__overlay { position: absolute; inset: 0; background: rgba(10, 29, 51, .7); }
.modal__box {
    position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius);
    padding: 30px 26px; animation: fade .2s;
}
.modal__box > p { color: var(--c-muted); }
.modal__close {
    position: absolute; top: 10px; right: 12px; border: 0; background: none;
    font-size: 30px; line-height: 1; color: var(--c-muted); cursor: pointer;
}

.sticky-cta {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
    padding: 15px; border-radius: 12px; text-align: center; font-weight: 700; text-decoration: none;
    background: var(--c-green); color: #fff; box-shadow: 0 10px 30px rgba(22, 163, 74, .45);
    transition: transform .25s, opacity .25s;
}
.sticky-cta.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }

@media (min-width: 640px) {
    .cards--3, .cards--4, .steps, .tags-grid, .compare, .kkt { grid-template-columns: 1fr 1fr; }
    .options { grid-template-columns: repeat(3, 1fr); }
    .header__contacts .btn { display: inline-flex; }
}

@media (min-width: 1100px) {
    .nav { display: flex; }
    .header__contacts { margin-left: 0; }
}

@media (min-width: 960px) {
    .hero { padding: 80px 0 96px; }
    .hero__inner { grid-template-columns: 1.25fr 1fr; }
    .section { padding: 96px 0; }
    .cards--3 { grid-template-columns: repeat(3, 1fr); }
    .tiers, .examples__grid { grid-template-columns: repeat(4, 1fr); }
    .included__list { grid-template-columns: 1fr 1fr; }
    .cards--4, .steps { grid-template-columns: repeat(4, 1fr); }
    .risk { grid-template-columns: 1.1fr 1fr; }
    .quiz-wrap { grid-template-columns: 1fr 1.25fr; }
    .footer { padding-bottom: 36px; }
    .footer__inner { grid-template-columns: 2fr 1fr 1fr; }
    .sticky-cta { display: none; }
}

@media (max-width: 639px) {
    .hero__visual { display: none; }
}

@media (max-width: 420px) {
    .header__phone { font-size: 14px; }
    .hero__stats b { font-size: 20px; }
    .receipt { width: 220px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
