/* СНГЗайм — светлая тема, карточки-плитки */
:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --text: #16202e;
    --muted: #5b6778;
    --line: #e3e8ef;
    --accent: #1f6feb;
    --accent-d: #1858bd;
    --accent-soft: #eaf1fe;
    --ok: #0f7a56;
    --ok-soft: #e4f6ee;
    --warn-soft: #fff6dd;
    --warn-line: #f1dc9a;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
    color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: #0e1726; }
h1 { font-size: clamp(28px, 4.2vw, 44px); letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 2.8vw, 30px); letter-spacing: -.01em; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.section { padding: 44px 0; }
.section--white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 760px; margin-bottom: 24px; }
.section__head p { color: var(--muted); }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: #0e1726; }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: 15px; }
.nav a:hover { background: var(--accent-soft); text-decoration: none; }
.nav a.is-active { background: var(--accent-soft); color: var(--accent-d); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px auto; border-radius: 2px; }

@media (max-width: 860px) {
    .burger { display: block; }
    .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px; flex-direction: column; box-shadow: var(--shadow); }
    .nav.is-open { display: flex; }
    .nav a { padding: 12px; }
}

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 18px; font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

/* Первый экран */
.hero { background: linear-gradient(180deg, #eaf1fe 0%, var(--bg) 100%); padding: 48px 0 40px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-d); background: #fff; border: 1px solid #d5e3fb; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero__lead { font-size: 18px; color: #36445a; max-width: 760px; }
.hero__points { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero__points li { position: relative; padding-left: 26px; margin: 0; font-weight: 500; }
.hero__points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 12px; line-height: 18px; text-align: center; font-weight: 700; }

/* Кнопки */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 12px 20px; font: 600 16px/1.2 var(--font); text-align: center; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--accent-d); text-decoration: none; color: #fff; }
.btn--lg { padding: 15px 28px; font-size: 17px; }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--block { display: block; width: 100%; }

/* Калькулятор */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.calc__fields { display: grid; gap: 18px; }
.field label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; }
.field label output { color: var(--accent-d); }
.field select { width: 100%; padding: 12px; border: 1px solid #cfd8e5; border-radius: 12px; font: 16px var(--font); background: #fff; color: var(--text); }
.field input[type=range] { width: 100%; accent-color: var(--accent); }
.calc__result { background: var(--accent-soft); border-radius: 14px; padding: 18px; align-self: stretch; }
.calc__result h3 { margin-bottom: 8px; }
.calc__count { font-size: 22px; font-weight: 700; color: var(--accent-d); }
.calc__names { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.calc__money { background: #fff; border-radius: 10px; padding: 12px; font-size: 15px; }
.calc__small { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; padding: 18px; } }

/* Фильтр */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfd8e5; background: #fff; border-radius: 999px; padding: 7px 14px; font: 500 14px var(--font); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Карточки-плитки */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; min-height: 46px; }
.card__logo { display: block; height: 46px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.badge { background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.card__title { font-size: 20px; margin-bottom: 12px; }
.card__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.card__facts div:first-child { grid-column: 1 / -1; }
.card__facts div { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.card__facts dt { font-size: 12px; color: var(--muted); }
.card__facts dd { margin: 0; font-weight: 600; font-size: 14px; }
/* ПСК и ставка — один шрифт, размер и цвет */
.cost { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.cost__line { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; font-weight: 400; color: var(--text); }
.cost__line strong { font-weight: 400; }
.cost__line + .cost__line { margin-top: 4px; }
.cost__line span { font-weight: 400; color: var(--text); }
.card__note { font-size: 14px; color: var(--ok); background: var(--ok-soft); border-radius: 10px; padding: 8px 10px; }
.card__docs { font-size: 14px; color: #36445a; }
.card__docs span { color: var(--muted); }
.card__flags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 14px; padding-top: 6px; }
.flag { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); display: inline-block; vertical-align: middle; }
.card__legal { font-size: 12px; color: var(--muted); margin: 10px 0 2px; }
.grid-note { font-size: 14px; color: var(--muted); margin-top: 16px; }
.empty-note { display: none; padding: 20px; background: #fff; border: 1px dashed #cfd8e5; border-radius: 12px; color: var(--muted); }
.empty-note.is-shown { display: block; }

/* Шаги */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 18px 18px; margin: 0; }
.steps li::before { content: counter(s); display: block; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; text-align: center; line-height: 32px; margin-bottom: 10px; }
.steps strong { display: block; margin-bottom: 4px; }

/* Таблицы */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f0f4fa; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td .flag { margin-right: 6px; }

/* Текстовые блоки */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.box h3 { margin-bottom: 10px; }
.check { list-style: none; padding: 0; }
.check li { position: relative; padding-left: 28px; }
.check li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 12px; line-height: 20px; text-align: center; font-weight: 700; }
.cross li::before { content: "!"; background: var(--warn-soft); color: #9a6a00; }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.notice p:last-child { margin-bottom: 0; }
.meta { font-size: 14px; color: var(--muted); }
.sources { font-size: 14px; color: var(--muted); }
.sources a { color: var(--muted); text-decoration: underline; }
.prose { max-width: 820px; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 48px 16px 18px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq .faq__a { padding: 0 18px 16px; color: #36445a; }

/* Подвал */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 36px 0 24px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; margin-bottom: 20px; }
.footer__grid h4 { font-size: 14px; color: var(--text); margin-bottom: 10px; }
.footer__grid ul { list-style: none; padding: 0; margin: 0; }
.footer__grid li { margin-bottom: 6px; }
.footer__grid a { color: var(--muted); }
.footer__text { margin-top: 8px; }
.footer__legal { border-top: 1px solid var(--line); padding-top: 16px; }
.footer__legal p { margin-bottom: .7em; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* Cookie */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin: 0 auto; z-index: 100; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(16, 24, 40, .18); border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; }
@media (max-width: 560px) { .cookie { flex-direction: column; align-items: stretch; } }

/* Компактный первый экран */
.hero--compact { padding: 26px 0 22px; }
.hero--compact h1 { margin-bottom: .35em; }
.hero--compact .hero__lead { font-size: 17px; margin-bottom: 16px; }
.hero--compact .meta { margin-bottom: 0; }
.calc--bar { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px 24px; padding: 16px 20px; align-items: end; }
.calc--bar .field label { margin-bottom: 4px; font-size: 14px; }
.calc--bar .field select { padding: 9px 10px; }
.calc--bar .calc__result { grid-column: 1 / -1; background: var(--accent-soft); border-radius: 10px; padding: 9px 14px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 15px; }
.calc--bar .calc__count { font-size: 17px; font-weight: 700; color: var(--accent-d); }
.calc--bar .calc__money { font-weight: 400; }
.hero--compact .calc__small { margin: 8px 0 0; }
@media (max-width: 860px) { .calc--bar { grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 12px; } .calc--bar .field:first-child { grid-column: 1 / -1; } .hero--compact .hero__lead { font-size: 16px; } }

/* Предупреждение над витриной */
.risk-note { display: inline-block; margin: 0 0 14px; padding: 7px 14px; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 10px; font-weight: 600; font-size: 15px; }

.calc--bar .calc__money { background: none; padding: 0; border-radius: 0; font-size: 15px; }
.calc--bar .calc__result { padding: 8px 14px; }
#catalog { padding-top: 24px; }
#catalog > .container > h2 { margin-bottom: 12px; }

/* Кнопка «Сбросить» под калькулятором */
.calc__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.calc__foot .calc__small { margin: 0; flex: 1 1 320px; }
.btn-reset { background: #fff; border: 1px solid #cfd8e5; color: var(--text); border-radius: 10px; padding: 8px 14px; font: 500 14px var(--font); cursor: pointer; }
.btn-reset:hover { border-color: var(--accent); color: var(--accent-d); }
.empty-note .btn-reset { margin-top: 10px; display: inline-block; }
.mt { margin-top: 28px; }
[id] { scroll-margin-top: 84px; }
