:root {
    --bg: #f4efe6;
    --bg-card: #ffffff;
    --bg-soft: #ebe4d6;
    --ink: #1a1a1a;
    --ink-soft: #4a4a4a;
    --ink-muted: #8a8275;
    --line: #d9d1bf;
    --accent: #1f3d2f;
    --accent-hover: #2a5240;
    --accent-soft: #d8e3dc;
    --highlight: #e8ff5a;
    --warning: #c64a2c;
    --gold: #b8923a;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.04);
    --shadow-md: 0 8px 24px rgba(26, 26, 26, 0.08);
    --shadow-lg: 0 20px 60px rgba(26, 26, 26, 0.12);
    --font-display: 'Unbounded', -apple-system, sans-serif;
    --font-body: 'Golos Text', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    font-size: 16px;
    overflow-x: hidden;
    font-weight: 400;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }

/* Доступность — focus ring */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}
button:focus-visible, .btn-apply:focus-visible, .btn-primary:focus-visible,
.btn-login:focus-visible, .scenario:focus-visible, .article-card:focus-visible,
.tag-chip:focus-visible, .topbar-cta:focus-visible {
    outline-offset: 4px;
}
/* Skip link для скринридеров */
.skip-link {
    position: absolute; top: -100px; left: 16px;
    background: var(--ink); color: var(--bg);
    padding: 12px 20px; border-radius: var(--radius-sm);
    z-index: 1000; font-weight: 700;
    transition: top 0.15s;
}
.skip-link:focus { top: 16px; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) {
    .header .container.header-inner { padding-left: 24px; }
    .logo { padding-left: 8px; }
}

/* ВЕРХНЯЯ ПЛАШКА — ПРОМО */
.topbar {
    background: linear-gradient(90deg, #1a1a1a 0%, #1f3d2f 100%);
    color: var(--bg);
    font-size: 14px;
    padding: 10px 0;
    position: relative;
    overflow: hidden;
}
.topbar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 50%, rgba(232, 255, 90, 0.15) 0%, transparent 50%);
    pointer-events: none;
}
.topbar-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
}
.topbar-promo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.topbar-badge {
    background: var(--highlight);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 100px;
    text-transform: uppercase;
}
.topbar-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.topbar-text strong {
    font-weight: 700;
    color: var(--highlight);
}
.topbar-divider {
    opacity: 0.4;
}
.topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    background: var(--highlight);
    color: var(--ink);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}
.topbar-cta:hover {
    background: var(--bg);
    transform: translateX(2px);
}
.topbar-cta .arrow {
    transition: transform 0.2s;
}
.topbar-cta:hover .arrow { transform: translateX(3px); }
.topbar-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bg);
    opacity: 0.5;
    font-size: 22px;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.topbar-close:hover { opacity: 1; }
.topbar.hidden { display: none; }

/* ХЕДЕР */
.header {
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(244, 239, 230, 0.95);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 32px; }
.logo {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700;
    letter-spacing: -0.04em;
    display: flex; align-items: center; gap: 10px;
}
.logo-mark {
    width: 32px; height: 32px;
    background: var(--accent);
    border-radius: 50%;
    position: relative; display: inline-block;
}
.logo-mark::after {
    content: ''; position: absolute; inset: 6px;
    border-radius: 50%; background: var(--highlight);
}
.nav { display: flex; gap: 32px; flex: 1; }
.burger {
    display: none;
    width: 40px; height: 40px;
    flex-direction: column; gap: 5px;
    align-items: center; justify-content: center;
    flex-shrink: 0;
}
.burger span {
    width: 22px; height: 2px;
    background: var(--ink); border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav a { font-size: 15px; font-weight: 500; color: var(--ink-soft); transition: color 0.2s; position: relative; }
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--ink); font-weight: 600; }
.nav a.active::after { content: ''; position: absolute; bottom: -22px; left: 0; right: 0; height: 2px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-login {
    padding: 10px 22px;
    background: var(--ink); color: var(--bg);
    border-radius: 100px;
    font-size: 14px; font-weight: 600;
    transition: all 0.2s;
    font-family: var(--font-body);
}
.btn-login:hover { background: var(--accent); transform: translateY(-1px); }


.btn-primary {
    width: 100%; padding: 18px;
    background: var(--accent); color: var(--bg);
    border-radius: var(--radius);
    font-size: 15px; font-weight: 700;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-body);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(31, 61, 47, 0.25);
}
.btn-primary .arrow { display: inline-block; transition: transform 0.2s; }
.btn-primary:hover .arrow { transform: translateX(4px); }

/* КАТАЛОГ */
.catalog { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; gap: 32px; flex-wrap: wrap; }
.section-eyebrow {
    font-size: 12px; color: var(--ink-muted);
    text-transform: uppercase; letter-spacing: 0.12em;
    font-weight: 700; margin-bottom: 14px;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05; font-weight: 600;
    letter-spacing: -0.04em;
    max-width: 700px;
}
.section-head h2 .accent-word { color: var(--accent); }
.sort-bar { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-muted); font-weight: 500; }
.sort-select {
    padding: 9px 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px; color: var(--ink);
    cursor: pointer; font-weight: 600;
}
.catalog-grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }

.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: sticky; top: 100px;
}
.filter-block { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.filter-block:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.filter-block h4 {
    font-family: var(--font-display);
    font-size: 14px; font-weight: 600;
    margin-bottom: 14px; letter-spacing: -0.02em;
}
.checkbox-row {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0;
    font-size: 14px; color: var(--ink-soft);
    cursor: pointer; transition: color 0.15s;
    font-weight: 500;
}
.checkbox-row:hover { color: var(--ink); }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.checkbox-row .count { margin-left: auto; color: var(--ink-muted); font-size: 12px; font-weight: 500; }
.filter-apply {
    width: 100%; padding: 14px;
    background: var(--accent); color: var(--bg);
    border-radius: var(--radius);
    font-size: 14px; font-weight: 700;
    font-family: var(--font-body);
    transition: all 0.2s;
    margin-bottom: 8px;
}
.filter-apply:hover { background: var(--accent-hover); transform: translateY(-1px); }
.filter-reset {
    display: block;
    width: 100%; padding: 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    font-size: 13px; color: var(--ink-soft);
    font-weight: 600;
    transition: background 0.2s;
    font-family: var(--font-body);
    text-align: center;
}
.filter-reset:hover { background: var(--ink); color: var(--bg); }

/* Аккордеон-фильтры на мобильном (по умолчанию скрыта кнопка-тогглер) */
.filter-toggle { display: none; }
/* HTMX loading state */
#loans-results { transition: opacity 0.15s, filter 0.15s; }
#loans-results.htmx-request { opacity: 0.45; filter: blur(0.5px); pointer-events: none; }
#loans-results.htmx-request::after {
    content: '';
    position: absolute; left: 50%; top: 80px;
    transform: translateX(-50%);
    width: 32px; height: 32px;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    z-index: 10;
}
#loans-results { position: relative; }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

.catalog-empty { padding: 24px; background: var(--bg-card); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }
.catalog-empty a { color: var(--accent); text-decoration: underline; }

/* КАРТОЧКИ МФО */
.mfo-list { display: flex; flex-direction: column; gap: 16px; }
.mfo-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: grid; grid-template-columns: auto 1fr auto;
    gap: 28px; align-items: center;
    transition: all 0.25s;
    position: relative;
}
.mfo-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.mfo-card.top::before {
    content: 'ТОП-1 НЕДЕЛИ';
    position: absolute; top: 0; left: 0;
    background: var(--highlight); color: var(--ink);
    padding: 6px 16px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.1em;
    border-top-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-sm);
    font-family: var(--font-display);
}
/* ПОИСК */
.search-popover { position: relative; }
.search-popover summary { list-style: none; cursor: pointer; }
.search-popover summary::-webkit-details-marker { display: none; }
.search-trigger {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-soft); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.search-trigger:hover, .search-popover[open] .search-trigger {
    background: var(--ink); color: var(--bg);
}
.search-panel {
    position: absolute; top: calc(100% + 12px); right: 0;
    width: 420px; max-width: calc(100vw - 32px);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 110;
}
.search-input-wrap {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-muted);
}
.search-input-wrap input {
    flex: 1; border: 0; background: none;
    font-size: 15px; color: var(--ink);
    outline: none; font-family: var(--font-body);
}
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.search-hint {
    padding: 28px 18px; text-align: center;
    color: var(--ink-muted); font-size: 13px;
}
.search-hint--empty { color: var(--ink-soft); }
.search-group + .search-group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.search-group-label {
    padding: 10px 12px 4px;
    font-size: 11px; font-weight: 700;
    color: var(--ink-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.12s;
}
.search-item:hover { background: var(--bg-soft); }
.search-item .mfo-logo { width: 36px; height: 36px; font-size: 16px; flex-shrink: 0; }
.search-item-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.search-item-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.search-item-meta { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
@media (max-width: 800px) {
    .search-panel {
        position: fixed; top: 64px; left: 8px; right: 8px;
        width: auto; max-width: none;
    }
}

/* COMPARE — кнопка на карточке + floating bar */
.compare-toggle {
    position: absolute; top: -10px; right: 12px; z-index: 5;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-card); color: var(--ink-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.compare-toggle:hover { background: var(--ink); color: var(--bg); }
.compare-toggle.is-active { background: var(--accent); color: var(--bg); transform: rotate(45deg); }

/* FAVORITES — сердечко на карточке + бейдж в шапке + пустое состояние */
.favorite-toggle {
    position: absolute; top: -10px; right: 56px; z-index: 5;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-card); color: var(--ink-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.favorite-toggle:hover { background: var(--ink); color: var(--bg); }
.favorite-toggle.is-active { background: #ffe9ef; color: #e23e57; }
.favorite-toggle.is-active svg { fill: currentColor; }
.header-fav {
    position: relative;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-soft); border-radius: 50%;
    transition: all 0.15s;
    flex-shrink: 0;
}
.header-fav:hover { background: var(--bg-soft); color: var(--ink); }
.header-fav-badge {
    position: absolute; top: 4px; right: 4px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--accent); color: var(--bg);
    font-size: 10px; font-weight: 700;
    border-radius: 100px;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
}
.header-fav-badge[hidden] { display: none; }
.favorites-empty {
    text-align: center; padding: 64px 20px;
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    max-width: 520px; margin: 32px auto 0;
}
.favorites-empty[hidden] { display: none; }
.favorites-empty-icon { color: var(--ink-muted); margin-bottom: 16px; }
.favorites-empty h3 {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.favorites-empty p { color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; }
.favorites-empty .btn-primary { display: inline-flex; }
.compare-bar {
    position: fixed; left: 50%; bottom: 24px;
    transform: translateX(-50%);
    background: var(--ink); color: var(--bg);
    padding: 12px 16px; border-radius: 100px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: 0 16px 40px rgba(26, 26, 26, 0.32);
    z-index: 250; max-width: calc(100vw - 32px);
    font-size: 14px;
    flex-wrap: nowrap;
}
.compare-bar[hidden] { display: none; }
.compare-bar-label { white-space: nowrap; flex-shrink: 0; }
.compare-bar-label strong { color: var(--highlight); margin: 0 2px; }
.compare-bar-list { display: flex; gap: 6px; min-width: 0; overflow: hidden; flex-wrap: nowrap; }
.compare-bar-item {
    background: rgba(255,255,255,0.1); padding: 4px 10px;
    border-radius: 100px; font-size: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    max-width: 140px; white-space: nowrap; overflow: hidden;
    flex-shrink: 1; min-width: 0;
}
.compare-bar-item > span:first-child {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.compare-bar-item button { color: rgba(255,255,255,0.7); font-size: 14px; line-height: 1; padding: 0 2px; }
.compare-bar-item button:hover { color: var(--bg); }
.compare-bar-cta {
    background: var(--highlight); color: var(--ink);
    padding: 8px 18px; border-radius: 100px;
    font-weight: 700; font-size: 13px;
    transition: transform 0.15s;
}
.compare-bar-cta:hover { transform: translateX(2px); }
.compare-bar-clear {
    color: rgba(255,255,255,0.5);
    font-size: 22px; line-height: 1; padding: 0 4px;
    transition: color 0.15s;
}
.compare-bar-clear:hover { color: var(--bg); }
@media (max-width: 800px) {
    .compare-bar { left: 16px; right: 16px; transform: none; bottom: 80px; flex-wrap: wrap; }
    .compare-bar-list { width: 100%; flex-wrap: wrap; }
    body:has(.sticky-cta) .compare-bar { bottom: 80px; }
    body:has(.cookie-banner:not(.hidden)) .compare-bar { bottom: 168px; }
}

/* TOAST — всплывающее уведомление */
.toast-stack {
    position: fixed; bottom: 24px; right: 24px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 300; max-width: calc(100vw - 32px);
}
.toast {
    background: var(--ink); color: var(--bg);
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px; font-weight: 500;
    box-shadow: 0 12px 32px rgba(26, 26, 26, 0.24);
    animation: toast-in 0.25s ease-out, toast-out 0.4s ease-in 5s forwards;
    min-width: 280px; max-width: 420px;
}
.toast--success { background: var(--accent); }
.toast--error { background: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); pointer-events: none; } }
@media (max-width: 800px) {
    .toast-stack { left: 16px; right: 16px; bottom: 90px; }
    .toast { min-width: auto; }
}

/* STICKY CTA — mobile */
.sticky-cta {
    display: none;
    position: fixed; left: 16px; right: 16px; bottom: 16px;
    padding: 16px 24px;
    background: var(--accent); color: var(--bg);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 15px; font-weight: 700;
    text-align: center;
    box-shadow: 0 12px 32px rgba(31, 61, 47, 0.32);
    z-index: 200;
    align-items: center; justify-content: center; gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.sticky-cta:active { transform: scale(0.97); }
.sticky-cta .arrow { transition: transform 0.2s; }
.sticky-cta:hover .arrow { transform: translateX(3px); }

.mfo-logo {
    width: 90px; height: 90px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 28px; font-weight: 700;
    color: var(--ink); flex-shrink: 0;
    border: 1px solid var(--line);
    letter-spacing: -0.04em;
    overflow: hidden;
}
.mfo-logo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mfo-logo.has-logo { background: transparent; border: none; padding: 0; }
.mfo-logo.l1 { background: linear-gradient(135deg, #ffe5b4, #ffd28a); }
.mfo-logo.l2 { background: linear-gradient(135deg, #c8e6d4, #a3d4b6); }
.mfo-logo.l3 { background: linear-gradient(135deg, #ffd1d1, #f5b3b3); }
.mfo-logo.l4 { background: linear-gradient(135deg, #d4d8f0, #b8bee5); }
.mfo-logo.l5 { background: linear-gradient(135deg, #f0e0c8, #e0c89a); }
.mfo-info { min-width: 0; }
.mfo-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.mfo-name {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 600;
    letter-spacing: -0.03em;
}
.mfo-rating {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--bg-soft);
    padding: 3px 10px; border-radius: 100px;
    font-size: 13px; font-weight: 600;
}
.mfo-rating .star { color: var(--gold); }
.mfo-license { font-size: 12px; color: var(--ink-muted); margin-bottom: 14px; font-weight: 500; }
.mfo-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 100px; }
.badge.green { background: var(--accent-soft); color: var(--accent); }
.badge.yellow { background: var(--highlight); color: var(--ink); }
.badge.gray { background: var(--bg-soft); color: var(--ink-soft); }
.badge.gold { background: #f5e8c8; color: var(--gold); }
.mfo-params { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.mfo-param .p-label {
    font-size: 11px; color: var(--ink-muted); font-weight: 600; margin-bottom: 5px;
    display: inline-flex; align-items: center; gap: 4px;
}

/* ТУЛТИП */
.tooltip { position: relative; display: inline-flex; }
.tooltip-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--ink-muted);
    font-size: 10px; font-weight: 700;
    cursor: help;
    transition: all 0.15s;
}
.tooltip:hover .tooltip-icon { background: var(--accent); color: var(--bg); }
.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%; transform: translateX(-50%);
    background: var(--ink);
    color: var(--bg);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    width: 240px;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
    opacity: 0; visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 50;
    pointer-events: none;
    box-shadow: var(--shadow-md);
}
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--ink);
}
.tooltip:hover .tooltip-content,
.tooltip:focus-within .tooltip-content { opacity: 1; visibility: visible; }
.mfo-param .p-value {
    font-family: var(--font-display);
    font-size: 14px; font-weight: 600;
    letter-spacing: -0.03em;
    white-space: nowrap;
}
.mfo-actions {
    display: flex; flex-direction: column; gap: 12px;
    min-width: 180px; align-items: stretch;
}
.approval-meter {
    background: var(--accent-soft);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}
.approval-meter-num {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 700;
    line-height: 1; color: var(--accent);
    letter-spacing: -0.04em;
}
.approval-meter-num span { font-size: 16px; font-weight: 600; margin-left: 1px; }
.approval-meter-label {
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent); margin-top: 4px;
}
.btn-apply {
    padding: 14px 24px;
    background: transparent;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    border-radius: var(--radius);
    font-size: 14px; font-weight: 700;
    text-align: center; transition: all 0.15s;
}
.btn-apply:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
.btn-apply.featured {
    background: var(--accent); border-color: var(--accent); color: var(--bg);
    box-shadow: 0 8px 16px rgba(31, 61, 47, 0.18);
}
.btn-apply.featured:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-detail {
    padding: 12px;
    color: var(--ink-soft);
    font-size: 13px; text-align: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s; font-weight: 600;
}
.btn-detail:hover { background: var(--bg-soft); }
.show-more {
    margin: 24px auto 0; display: block;
    padding: 16px 32px;
    border: 1px solid var(--line);
    background: var(--bg-card);
    border-radius: 100px;
    font-size: 14px; font-weight: 600;
    transition: all 0.2s;
    font-family: var(--font-body);
}
.show-more:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }


/* ОТЗЫВЫ */
.reviews { padding: 80px 0; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.25s;
}
.review-card:hover { box-shadow: var(--shadow-md); }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.review-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--accent);
    font-family: var(--font-display);
    letter-spacing: -0.04em;
}
.review-name { font-weight: 600; font-size: 15px; }
.review-meta { font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.review-stars { color: var(--gold); margin-bottom: 12px; font-size: 14px; }
.review-text { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 14px; }
.review-mfo {
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px; color: var(--ink-muted);
    display: flex; justify-content: space-between;
    font-weight: 500;
}
.review-mfo strong { color: var(--ink); font-weight: 600; }

/* FAQ */
.faq-section { padding: 80px 0; background: var(--bg-soft); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; align-items: start; }
.faq-side h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05; font-weight: 600;
    letter-spacing: -0.04em; margin-bottom: 16px;
}
.faq-side h2 .accent-word { color: var(--accent); }
.faq-side p { font-size: 15px; color: var(--ink-soft); margin-bottom: 24px; line-height: 1.55; }
.faq-side .btn-primary { width: auto; display: inline-flex; padding: 14px 28px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
}
.faq-item.open { border-color: var(--accent); }
.faq-question {
    width: 100%; padding: 20px 24px;
    text-align: left;
    font-family: var(--font-display);
    font-size: 16px; font-weight: 600;
    letter-spacing: -0.03em;
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; cursor: pointer;
}
.faq-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all 0.2s;
    flex-shrink: 0; font-weight: 600;
}
.faq-item.open .faq-icon { background: var(--accent); color: var(--bg); transform: rotate(45deg); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
    font-size: 15px; color: var(--ink-soft); line-height: 1.6;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 24px 24px; }

/* ИНФО-БЛОК */
.info-block { padding: 80px 0; }
.info-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; }
.info-grid h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.5vw, 36px);
    line-height: 1.1; font-weight: 600;
    letter-spacing: -0.04em;
}
.info-grid h2 .accent-word { color: var(--accent); }
.info-text { font-size: 15px; line-height: 1.7; color: var(--ink-soft); columns: 2; column-gap: 40px; }
.info-text p { margin-bottom: 16px; break-inside: avoid; }
.info-text strong { color: var(--ink); font-weight: 600; }

/* ФУТЕР — БЕЗ SEO-ОБЛАКОВ */
.footer { background: var(--ink); color: var(--bg); padding: 64px 0 32px; }
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(244, 239, 230, 0.15);
}
.footer-brand { max-width: 380px; }
.footer-brand .logo { color: var(--bg); margin-bottom: 16px; }
.footer-brand .logo-mark { background: var(--highlight); }
.footer-brand .logo-mark::after { background: var(--accent); }
.footer-brand p { font-size: 14px; color: rgba(244, 239, 230, 0.65); line-height: 1.55; margin-bottom: 20px; }
.footer-cb {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: rgba(232, 255, 90, 0.1);
    border: 1px solid rgba(232, 255, 90, 0.3);
    color: var(--highlight);
    border-radius: 100px;
    font-size: 12px; font-weight: 600;
}
.footer-address {
    display: flex; align-items: flex-start; gap: 8px;
    margin-top: 14px;
    font-size: 12px; line-height: 1.5;
    color: rgba(244, 239, 230, 0.55); font-style: normal;
}
.footer-address svg { flex-shrink: 0; margin-top: 2px; }
.footer-col h4 {
    font-family: var(--font-display);
    font-size: 13px; font-weight: 600;
    margin-bottom: 16px; color: var(--bg);
    letter-spacing: -0.02em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
    font-size: 14px;
    color: rgba(244, 239, 230, 0.65);
    transition: color 0.2s;
    font-weight: 500;
}
.footer-col a:hover { color: var(--highlight); }
.footer-disclaimer {
    padding: 32px 0;
    border-bottom: 1px solid rgba(244, 239, 230, 0.15);
    font-size: 12px;
    color: rgba(244, 239, 230, 0.5);
    line-height: 1.65; font-weight: 500;
}
.footer-bottom {
    padding-top: 32px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
    font-size: 13px;
    color: rgba(244, 239, 230, 0.5);
    font-weight: 500;
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a:hover { color: var(--highlight); }

/* COOKIE */
.cookie-banner {
    position: fixed; bottom: 24px; left: 24px;
    max-width: 400px;
    background: var(--ink); color: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    font-size: 13px; line-height: 1.5;
    transform: translateY(0); transition: transform 0.3s;
}
.cookie-banner.hidden { transform: translateY(150%); }
.cookie-banner h5 {
    font-family: var(--font-display);
    font-size: 15px; font-weight: 600;
    margin-bottom: 8px; letter-spacing: -0.03em;
}
.cookie-banner p { color: rgba(244, 239, 230, 0.7); margin-bottom: 12px; font-weight: 500; }
.cookie-banner button {
    padding: 8px 16px;
    background: var(--highlight); color: var(--ink);
    border-radius: var(--radius-sm);
    font-weight: 700; font-size: 13px;
    transition: background 0.2s;
    font-family: var(--font-body);
}
.cookie-banner button:hover { background: var(--bg); }

/* АДАПТИВ */
@media (max-width: 1100px) {
    .hero-inner { grid-template-columns: 1fr; }
    .catalog-grid { grid-template-columns: 1fr; }
    .filter-panel { position: static; padding: 0; background: transparent; border: 0; }
    .filter-toggle {
        display: flex; align-items: center; gap: 10px;
        width: 100%; padding: 14px 18px;
        background: var(--bg-card);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        font-family: var(--font-body);
        font-size: 14px; font-weight: 600;
        color: var(--ink);
        cursor: pointer;
    }
    .filter-toggle-count {
        background: var(--accent); color: var(--bg);
        font-size: 12px; font-weight: 700;
        padding: 2px 8px; border-radius: 100px;
        margin-left: 4px;
    }
    .filter-toggle-arrow { margin-left: auto; transition: transform 0.2s; }
    .filter-panel.is-open .filter-toggle-arrow { transform: rotate(180deg); }
    .filter-panel #filter-form { display: none; }
    .filter-panel.is-open #filter-form {
        display: block;
        margin-top: 12px;
        padding: 20px;
        background: var(--bg-card);
        border: 1px solid var(--line);
        border-radius: var(--radius);
    }
    .trust-grid { grid-template-columns: 1fr 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: span 3; max-width: 600px; margin-bottom: 24px; }
    .info-grid { grid-template-columns: 1fr; gap: 32px; }
    .info-text { columns: 1; }
    .faq-grid { grid-template-columns: 1fr; gap: 32px; }
    .scenarios-grid { grid-template-columns: repeat(3, 1fr); }
    .mfo-params { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (max-width: 800px) {
    .header-inner { justify-content: flex-start; gap: 6px; }
    .logo { margin-right: auto; }
    .burger { display: inline-flex; order: 3; }
    .header-fav { width: 36px; height: 36px; }
    .search-trigger { width: 36px; height: 36px; }
    .nav {
        display: none;
        position: fixed; top: 64px; left: 8px; right: 8px;
        flex-direction: column; gap: 0;
        background: var(--bg-card);
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        padding: 8px;
        z-index: 120;
    }
    .nav.is-open { display: flex; }
    .nav a {
        padding: 14px 16px; font-size: 15px;
        border-radius: var(--radius-sm);
        color: var(--ink);
    }
    .nav a:hover, .nav a.active { background: var(--bg-soft); color: var(--accent); }
    .nav a.active::after { display: none; }
    .topbar-text { font-size: 12px; gap: 6px; }
    .topbar-text-extra { display: none; }
    .topbar-divider { display: none; }
    .topbar-close { display: none; }
    .topbar-promo { gap: 10px; flex-wrap: nowrap; }
    .topbar-inner { padding-right: 0; }
    .steps { grid-template-columns: 1fr 1fr; }
    .coll-grid { grid-template-columns: 1fr; }
    .reviews-grid { grid-template-columns: 1fr; }
    .mfo-card { grid-template-columns: 1fr; text-align: left; }
    .mfo-actions { min-width: auto; }
    .mfo-params { grid-template-columns: 1fr 1fr; }
    .favorite-toggle, .compare-toggle { width: 40px; height: 40px; top: 12px; }
    .favorite-toggle { right: 60px; }
    .section-head { align-items: stretch; }
    .sort-bar { width: 100%; }
    .sort-select { flex: 1; min-width: 0; max-width: 100%; }
    /* Стек fixed-элементов снизу, чтобы не перекрывались */
    .sticky-cta { bottom: 16px; }
    .cookie-banner { bottom: 88px !important; left: 16px; right: 16px; max-width: none; }
    .hero-stats { gap: 24px; }
    .hero-stat-num { font-size: 26px; }
    .scenarios-grid { grid-template-columns: repeat(2, 1fr); }
    .sticky-cta { display: flex; }
    .cookie-banner { bottom: 84px !important; }
    .footer { padding-bottom: 96px; }
}
@media (max-width: 520px) {
    .topbar { font-size: 12px; padding: 8px 0; }
    .topbar-text { font-size: 12px; }
    .topbar-badge { font-size: 9px; padding: 3px 8px; }
    .topbar-cta { font-size: 11px; padding: 4px 10px; gap: 2px; }
    .topbar-promo { gap: 8px; }
    .calculator { padding: 24px 20px; }
    .hero { padding: 32px 0 56px; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; max-width: none; }
    .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
    .review-card { padding: 18px; }
    .steps { grid-template-columns: 1fr; }
    .cookie-banner { left: 16px; right: 16px; max-width: none; }
    .calc-summary { grid-template-columns: 1fr; }
    .scenarios { padding: 32px 0; }
    .scenarios-head { margin-bottom: 20px; }
    .scenarios-head p { font-size: 13px; }
    .scenarios-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .scenario { padding: 16px 12px; gap: 8px; }
    .scenario-icon { width: 40px; height: 40px; }
    .scenario-icon svg { width: 18px; height: 18px; }
    .scenario-label { font-size: 13px; }
    .scenario-meta { font-size: 11px; }
    .scenario-flag { font-size: 8px; padding: 2px 6px; top: 6px; right: 6px; }
    /* Уменьшаем визуал на узком экране */
    .header-inner { padding: 14px 0; }
    .logo { font-size: 18px; gap: 8px; }
    .logo-mark { width: 26px; height: 26px; }
    .logo-mark::after { inset: 5px; }
    .mfo-logo { width: 64px; height: 64px; font-size: 22px; }
    .mfo-card { padding: 20px; gap: 18px; }
    .section-head { gap: 16px; margin-bottom: 28px; }
    .section-head h2 { font-size: 24px; }
    .sort-bar { width: 100%; }
    .sort-bar > span { flex-shrink: 0; }
    .sort-select { flex: 1; min-width: 0; }
}

/* СЦЕНАРИИ — UX-блок вместо SEO-чипсов */
.scenarios { padding: 48px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.scenarios-head { text-align: center; margin-bottom: 32px; }
.scenarios-head h3 {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 600; letter-spacing: -0.04em;
    margin-bottom: 8px;
}
.scenarios-head p { font-size: 15px; color: var(--ink-muted); font-weight: 500; }
.scenarios-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.scenario {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scenario:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.scenario.active {
    background: var(--ink); color: var(--bg);
    border-color: var(--ink);
}
.scenario.active .scenario-icon { background: var(--highlight); }
.scenario-icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 22px; transition: background 0.2s, color 0.2s;
}
.scenario-icon svg { width: 22px; height: 22px; }
.scenario { position: relative; }
.scenario-flag {
    position: absolute; top: 8px; right: 8px;
    background: var(--accent); color: var(--bg);
    font-family: var(--font-display);
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 100px;
}
.scenario-flag--hot { background: var(--highlight); color: var(--ink); }
.scenario.active .scenario-icon { color: var(--ink); }
.scenario-label { font-size: 13px; font-weight: 600; line-height: 1.3; }
.scenario-meta { font-size: 11px; color: var(--ink-muted); font-weight: 500; }
.scenario.active .scenario-meta { color: rgba(244,239,230,0.7); }

.trust { padding: 80px 0; }
.trust-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 24px; }
.trust-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s;
}
.trust-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.trust-card.hero-trust { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.trust-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; font-size: 24px;
}
.trust-card.hero-trust .trust-icon { background: rgba(232, 255, 90, 0.2); }
.trust-num {
    font-family: var(--font-display);
    font-size: 40px; font-weight: 700;
    line-height: 1; letter-spacing: -0.05em;
    margin-bottom: 10px;
}
.trust-card.hero-trust .trust-num { color: var(--highlight); }
.trust-label { font-size: 14px; color: var(--ink-muted); line-height: 1.4; font-weight: 500; }
.trust-card.hero-trust .trust-label { color: rgba(244, 239, 230, 0.85); }
.trust-card.hero-trust h3 {
    font-family: var(--font-display);
    font-size: 22px; font-weight: 600;
    margin-bottom: 12px; letter-spacing: -0.03em;
}
.trust-card.hero-trust p { font-size: 14px; color: rgba(244, 239, 230, 0.85); line-height: 1.5; font-weight: 500; }
@media (max-width: 800px) {
    .trust { padding: 48px 0; }
    .trust-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .trust-card.hero-trust { grid-column: 1 / -1; }
    .trust-card { padding: 22px; }
    .trust-icon { width: 40px; height: 40px; margin-bottom: 14px; }
    .trust-num { font-size: 30px; margin-bottom: 6px; }
    .trust-card.hero-trust h3 { font-size: 18px; margin-bottom: 8px; }
    .trust-card.hero-trust p { font-size: 13px; }
}
@media (max-width: 520px) {
    .trust { padding: 36px 0; }
    .trust-card { padding: 16px; }
    .trust-icon { width: 36px; height: 36px; margin-bottom: 10px; }
    .trust-num { font-size: 22px; }
    .trust-label { font-size: 12px; }
}

/* Адаптив для trust-grid на планшете (после base, чтобы перебивало) */
@media (max-width: 1100px) {
    .trust-grid { grid-template-columns: 1fr 1fr; }
    .trust-card.hero-trust { grid-column: 1 / -1; }
}

/* СЦЕНАРИИ — мобильные правила (после base, чтобы перебивали) */
@media (max-width: 1100px) {
    .scenarios-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    .scenarios-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .scenarios { padding: 32px 0; }
    .scenarios-head { margin-bottom: 20px; }
    .scenarios-head p { font-size: 13px; }
    .scenarios-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .scenario { padding: 16px 12px; gap: 8px; }
    .scenario-icon { width: 40px; height: 40px; }
    .scenario-icon svg { width: 18px; height: 18px; }
    .scenario-label { font-size: 13px; }
    .scenario-meta { font-size: 11px; }
    .scenario-flag { font-size: 8px; padding: 2px 6px; top: 6px; right: 6px; }
}
