/* Компас Кредит — стилі. Картки редагуються в src/cards.html, не тут. */
/* Шрифт Geologica (SIL Open Font License), локальні файли */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/geologica-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/geologica-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/geologica-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F6F4EF;
  --paper: #FFFFFF;
  --ink: #0E1E2B;
  --ink-2: #44535F;
  --ink-3: #5A6772;
  --line: #E3E0D7;
  --line-2: #EFEDE6;
  --brand: #0F4C5C;
  --brand-2: #136579;
  --brand-tint: #E4EFF0;
  --needle: #F2643A;
  --cta: #C93F18;
  --cta-h: #AE3412;
  --gold: #F1C04B;
  --warn-bg: #FFF6E5;
  --warn-line: #F0D9A8;
  --r: 14px;
  --r-s: 10px;
  --shadow: 0 1px 2px rgba(14, 30, 43, .06), 0 4px 14px rgba(14, 30, 43, .05);
  --font: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-2); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(23px, 6.2vw, 44px); font-weight: 800; }
h2 { font-size: clamp(21px, 4.4vw, 30px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.calc-sec :focus-visible, .foot :focus-visible { outline-color: var(--gold); }

.demo-ribbon { background: #B42318; color: #fff; text-align: center; font-size: 12px; font-weight: 600; padding: 4px 8px; letter-spacing: .02em; }

/* ---------- шапка (темна) ---------- */
.top { position: sticky; top: 0; z-index: 30; background: #0B2A33; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-sub { font-size: 10.5px; color: rgba(255, 255, 255, .72); letter-spacing: .01em; margin-top: 2px; }
.brand-name { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: #fff; }
.brand-name b { font-weight: 800; color: var(--gold); }
.top :focus-visible { outline-color: var(--gold); }
.nav { display: flex; gap: 4px; }
.nav a { color: rgba(255, 255, 255, .84); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { color: var(--gold); background: rgba(255, 255, 255, .06); }
.menu-btn { display: none; }

@media (max-width: 799px) {
  .menu-btn { display: grid; gap: 4px; place-content: center; width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; cursor: pointer; border-radius: 10px; }
  .menu-btn span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 58px; flex-direction: column; gap: 0; background: #0B2A33; border-bottom: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 12px 24px rgba(0, 0, 0, .25); padding: 6px 8px 10px; }
  .nav.open { display: flex; }
  .nav a { padding: 13px 12px; border-radius: 10px; font-size: 16px; }
}

/* ---------- хлібні крихти ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- перший екран: темна смуга на всю ширину, картки «заїжджають» на неї ---------- */
.hero { position: relative; isolation: isolate; color: #fff; padding-top: 16px; padding-bottom: 60px; }
.hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -1; background: radial-gradient(900px 420px at 85% -10%, #1B7A8F 0%, rgba(27, 122, 143, 0) 60%), linear-gradient(165deg, #0A2630 0%, #0F4C5C 100%); }
.hero h1 { margin-bottom: 8px; color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold); }
.lead { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); max-width: 760px; margin-bottom: 8px; }
.hero .lead { color: rgba(255, 255, 255, .84); }
.trust { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.trust li { display: flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; padding: 5px 10px; }
.trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.hero a { color: #fff; }
.hero + .offers { margin-top: -44px; position: relative; }
.hero + .offers > .ad-tag { color: rgba(255, 255, 255, .78); }
@media (min-width: 800px) {
  .hero { padding-top: 34px; padding-bottom: 96px; }
  .lead { font-size: 17px; }
  .trust { font-size: 14px; gap: 10px; }
  .trust li { padding: 8px 13px; }
  .hero + .offers { margin-top: -72px; }
}

/* ---------- картки ---------- */
.offers { padding-bottom: 8px; }
.cards { counter-reset: n; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card { counter-increment: n; position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 9px; box-shadow: var(--shadow); min-width: 0; }
.card::before { content: counter(n); position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--line-2); border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.card-head { display: flex; align-items: center; gap: 6px; min-width: 0; padding-right: 24px; margin-bottom: 6px; }
.logo { width: auto; height: 26px; max-width: 92px; flex: none; object-fit: contain; object-position: left center; }
.card h3 { font-size: 13px; margin: 0; line-height: 1.2; overflow-wrap: break-word; min-width: 0; letter-spacing: -.01em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); text-decoration: underline; }
/* Сума, термін, ставка й РРПС — однаковий шрифт, колір і розмір (Положення НБУ №100, п.15) */
/* п.27 Положення №100: міжрядковий інтервал від 120 %, не більше 3 кольорів тексту, мало жирного */
.facts { list-style: none; margin: 0; padding: 0; font-size: 12px; line-height: 1.35; }
.facts li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 4px; padding: 3px 0; border-bottom: 1px dashed var(--line-2); font-weight: 500; text-align: right; color: var(--ink); }
.facts .v { font-weight: inherit; white-space: nowrap; margin-left: auto; }
.facts li:last-child { border-bottom: 0; }
.facts span { color: var(--ink-3); font-weight: 400; text-align: left; font-size: 11px; white-space: nowrap; }
.go { display: block; text-align: center; background: #F5B83D; color: #0B2A33; font-weight: 800; font-size: 15px; text-decoration: none; padding: 10px 8px; border-radius: 11px; box-shadow: 0 3px 0 #C98A12; transition: background .15s, transform .1s, box-shadow .1s; }
.go:hover { background: #E9A824; color: #0B2A33; }
.go:active { transform: translateY(2px); box-shadow: 0 1px 0 #C98A12; }
.docs { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 6px 0 0; font-size: 10.5px; line-height: 1.3; }
.card .go { margin-top: auto; }
.card .example { margin-bottom: 8px; }
.docs a { color: var(--ink-3); }
.example { font-size: 10.5px; line-height: 1.35; color: var(--ink-3); margin: 4px 0 0; }
.legal { font-size: 9.5px; line-height: 1.3; color: var(--ink-3); margin: 6px 0 0; overflow-wrap: anywhere; }
.ad-tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.ad-note { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
/* на телефоні реквізити в картці — 2 рядки; повністю вони є в таблиці «Кредитодавці на сайті» */
/* на телефоні — більші зони натискання для посилань на документи */
@media (max-width: 559px) {
  .docs { gap: 4px 12px; font-size: 11.5px; }
  .docs a, .w-docs a { display: inline-block; padding: 4px 0; line-height: 1.25; }
  .w-docs { font-size: 12px; gap: 12px; }
}
@media (max-width: 559px) { .cards .legal { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }

@media (min-width: 560px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .card { padding: 14px 14px 12px; }
  .card h3 { font-size: 16px; letter-spacing: 0; }
  .card-head { gap: 8px; padding-right: 30px; }
  .logo { height: 32px; max-width: 120px; }
  .facts { font-size: 14px; }
  .facts span { font-size: 13px; }

  .docs, .example { font-size: 12px; }
  .legal { font-size: 11px; }
  .go { padding: 12px; font-size: 16px; }
}
@media (min-width: 980px) {
  .cards { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .card { padding: 16px 16px 14px; transition: transform .18s, box-shadow .18s; }
  .card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(14, 30, 43, .06), 0 12px 28px rgba(14, 30, 43, .09); }
}

/* ---------- розділи ---------- */
/* тільки вертикальні відступи — бокові дає .wrap */
.sec { padding-top: 34px; padding-bottom: 34px; }
.sec + .sec { padding-top: 6px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips a { display: inline-block; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.chips a:hover { border-color: var(--brand-2); color: var(--brand); }
@media (min-width: 800px) { .sec { padding-top: 56px; padding-bottom: 56px; } }

/* ---------- текст статей ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--brand-2); }
.note { background: var(--brand-tint); border-radius: var(--r-s); padding: 14px 16px; margin: 0 0 1.2em; font-size: 15px; }
.note b:first-child { color: var(--brand); }
.byline { font-size: 13px; color: var(--ink-3); margin: -2px 0 14px; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 16px; margin: 0 0 1.4em; font-size: 15px; }
.toc b { display: block; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 1.2em; }

/* ---------- таблиці ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); margin: 0 0 1.2em; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
thead th { background: #FAF9F5; font-size: 12.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 700; white-space: nowrap; }
.compare td { white-space: nowrap; }
.compare .tdocs { font-size: 12.5px; }
.compare .tdocs a { color: var(--ink-3); }
.lenders td { font-size: 13px; color: var(--ink-2); min-width: 260px; }
.kv th { width: 42%; color: var(--ink-3); font-weight: 500; white-space: normal; }
.kv td { font-weight: 600; }

/* ---------- калькулятор ---------- */
.calc-sec { background: var(--brand); color: #fff; }
.calc-sec .muted { color: rgba(255, 255, 255, .72); }
.calc-in { display: grid; gap: 20px; }
.calc { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r); padding: 18px; display: grid; gap: 16px; }
.range-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.range-top b { font-size: 17px; }
.calc input[type=range] { --p: 50%; width: 100%; height: 6px; -webkit-appearance: none; appearance: none; background: linear-gradient(90deg, var(--gold) var(--p), rgba(255, 255, 255, .22) var(--p)); border-radius: 6px; outline: none; }
.calc input[type=range]:focus-visible { outline: 3px solid var(--gold); outline-offset: 6px; }
.calc input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--gold); cursor: pointer; }
.calc input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--gold); cursor: pointer; }
.rate { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.rate input { width: 96px; font: 700 17px var(--font); text-align: right; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-out div { background: rgba(255, 255, 255, .1); border-radius: 10px; padding: 10px 12px; }
.calc-out span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .88); }
.calc-out strong { font-size: 20px; }
@media (min-width: 800px) { .calc-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; } }

/* ---------- кроки, методика, попередження, FAQ ---------- */
.steps ol { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); padding: 14px 16px 14px 54px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
@media (min-width: 800px) { .steps ol { grid-template-columns: 1fr 1fr; } }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--r-s); padding: 14px 16px; font-size: 14px; color: #5A4512; }
.warn p:last-child { margin: 0; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); margin: 0 0 8px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 16px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 11px; font-size: 22px; color: var(--brand-2); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--ink-2); }

/* ---------- огляд МФО ---------- */
.lender-top { display: grid; gap: 16px; align-items: start; }
.lender-id { display: flex; align-items: center; gap: 12px; }
.lender-id .logo { width: 52px; height: 52px; border-radius: 12px; }
.lender-cta { display: grid; gap: 8px; }
.lender-cta .go { padding: 14px; font-size: 17px; }
@media (min-width: 900px) { .lender-top { grid-template-columns: 1fr 340px; gap: 36px; } }
.mfo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .mfo-list { grid-template-columns: 1fr 1fr; } }
.mfo-list a { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 600; }
.mfo-list a:hover { border-color: var(--brand-2); }
.mfo-list small { display: block; font-weight: 400; color: var(--ink-3); font-size: 13px; }

/* ---------- статті (список) ---------- */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 800px) { .post-list { grid-template-columns: repeat(3, 1fr); } }
.post-list a { display: block; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; text-decoration: none; color: var(--ink); }
.post-list a:hover { border-color: var(--brand-2); }
.post-list b { display: block; font-size: 17px; line-height: 1.3; margin-bottom: 6px; }
.post-list span { font-size: 14px; color: var(--ink-2); }

/* ---------- підвал ---------- */
.foot { background: #0B2A33; color: rgba(255, 255, 255, .78); margin-top: 40px; font-size: 14px; }
.foot a { color: rgba(255, 255, 255, .88); }
.foot a:hover { color: #fff; }
.foot .brand-name { color: #fff; }
.foot .brand-name b { color: var(--gold); }
.foot-grid { display: grid; gap: 24px; padding-top: 36px; padding-bottom: 20px; }
.foot-about p { margin: 10px 0 0; max-width: 520px; }
.foot-col { display: grid; gap: 8px; align-content: start; }
.foot-col b { color: #fff; font-size: 15px; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { text-decoration: underline; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; padding-bottom: 28px; font-size: 13px; }
.foot-legal p { margin: 0 0 8px; }
.foot .muted { color: rgba(255, 255, 255, .5); }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; } }

/* ---------- 404 ---------- */
.nf { text-align: center; padding-top: 60px; padding-bottom: 30px; }
.nf .big { font-size: 64px; font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: 10px; }

/* ---------- віконця топ-3 ---------- */
.w-corner { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 330px; max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 40px rgba(14, 30, 43, .18); opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.w-corner.in { opacity: 1; transform: none; }
.w-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; position: sticky; top: 0; background: var(--paper); }
.w-ad { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-right: 6px; vertical-align: 1px; }
/* згорнута смужка — на будь-якій ширині (телефон в альбомній орієнтації, планшет) */
.w-corner.min .w-list, .w-corner.min .w-note { display: none; }
.w-corner.min .w-head { border-bottom: 0; }
.w-corner.min .w-head b::after { content: " ▴"; color: var(--ink-3); }
.w-head b { font-size: 14px; }
.w-x { border: 0; background: var(--line-2); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.w-x:hover { background: var(--line); }
.w-list { display: grid; }
.w-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.w-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: var(--line-2); }
.w-txt { min-width: 0; }
.w-txt b { display: block; font-size: 14px; }
.w-txt small { display: block; font-size: 11.5px; color: var(--ink); line-height: 1.3; }
.w-docs { display: flex; gap: 8px; font-size: 10.5px; margin-top: 2px; }
.w-docs a { color: var(--ink-3); }
.w-go { margin: 0; padding: 8px 12px; font-size: 13.5px; }
.w-note { font-size: 11px; color: var(--ink-3); margin: 0; padding: 8px 12px 10px; }
@media (max-width: 719px) {
  .w-corner { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: calc(100vh - 16px); }
}
.w-modal { position: fixed; inset: 0; z-index: 50; background: rgba(9, 22, 30, .55); display: grid; place-items: center; padding: 16px; animation: wfade .2s ease-out; }
.w-box { position: relative; width: min(460px, 100%); background: var(--paper); border-radius: 18px; padding: 22px 6px 8px; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.w-box > .w-x { position: absolute; right: 12px; top: 12px; }
.w-kicker { margin: 0 16px 2px; font-size: 13px; color: var(--brand-2); font-weight: 600; }
.w-title { margin: 0 16px 10px; font-size: 22px; }
@keyframes wfade { from { opacity: 0; } to { opacity: 1; } }

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

/* картка кредитодавця поруч з оглядом — одна колонка */
.lender-cta .cards { grid-template-columns: 1fr; }
.lender-cta .card::before { content: none; }
.lender-cta .card-head { padding-right: 0; }
.lender-cta .card .facts { font-size: 14px; }
.lender-cta .card h3 { font-size: 16px; }

/* ============================================================
   СПИСОК ПРОПОЗИЦІЙ «РЯДКАМИ» (головна, підбірки, «інші пропозиції»)
   Телефон: логотип + кнопка зверху, під ними 4 умови сіткою 2×2.
   ПК: одна пропозиція — один рядок: назва | сума | термін | ставка | РРПС | кнопка.
   Сума, термін, ставка й РРПС — однаковий шрифт, колір і розмір (Положення НБУ №100).
   ============================================================ */
.cards.cards-list { grid-template-columns: 1fr; gap: 10px; }
.cards-list .card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head go" "facts facts" "docs docs" "ex ex" "legal legal"; gap: 7px 12px; align-items: center; padding: 12px 12px 10px; border-radius: 14px; }
.cards-list .card::before { top: -1px; left: -1px; right: auto; border-radius: 14px 0 9px 0; background: var(--brand); color: #fff; min-width: 22px; height: 20px; font-size: 10.5px; }
.cards-list .card-head { grid-area: head; padding: 0 0 0 16px; margin: 0; gap: 8px; }
.cards-list .card h3 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cards-list .card .go { grid-area: go; margin: 0; padding: 10px 16px; font-size: 15px; }
.cards-list .card .facts { grid-area: facts; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13.5px; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.cards-list .card .facts li { flex-direction: column; align-items: flex-start; border: 0; padding: 0; text-align: left; }
.cards-list .card .facts .v { margin-left: 0; }
.cards-list .card .facts span { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.cards-list .card .docs { grid-area: docs; margin: 0; }
.cards-list .card .example { grid-area: ex; margin: 0; }
.cards-list .card .legal { grid-area: legal; margin: 0; }
@media (min-width: 560px) {
  .cards.cards-list { grid-template-columns: 1fr; }
  .cards-list .card { padding: 14px 16px 12px; }
  .cards-list .card .facts { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 980px) {
  .cards.cards-list { grid-template-columns: 1fr; gap: 12px; }
  .cards-list .card { grid-template-columns: 220px repeat(4, minmax(0, 1fr)) 180px; grid-template-areas: "head f1 f2 f3 f4 go" "docs ex ex ex ex legal"; gap: 6px 16px; padding: 16px 20px 14px; }
  .cards-list .card:hover { transform: none; border-color: var(--brand-2); }
  .cards-list .card .facts { display: contents; }
  .cards-list .card .facts li:nth-child(1) { grid-area: f1; } .cards-list .card .facts li:nth-child(2) { grid-area: f2; }
  .cards-list .card .facts li:nth-child(3) { grid-area: f3; } .cards-list .card .facts li:nth-child(4) { grid-area: f4; }
  .cards-list .card .facts li { font-size: 16px; }
  .cards-list .card .facts span { font-size: 11px; }
  .cards-list .card h3 { font-size: 16px; }
  .cards-list .card .go { padding: 13px 16px; font-size: 16px; }
  .cards-list .card .legal { font-size: 10.5px; }
  .cards-list .logo { height: 34px; max-width: 130px; }
}
/* картка поруч з оглядом МФО — вертикальна, логотип більший */
.lender-cta .logo { height: 34px; max-width: 150px; }
/* віконця: широкі логотипи */
.w-item { grid-template-columns: 64px 1fr auto; }
.w-logo { width: 64px; height: 28px; object-fit: contain; background: none; border-radius: 0; }
.mfo-list .logo { width: 84px; height: 28px; }
/* телефон: перший екран компактніший, щоб було видно мінімум 2 пропозиції */
@media (max-width: 559px) {
  .hero { padding-top: 12px; padding-bottom: 50px; }
  .hero .lead { font-size: 13.5px; margin-bottom: 8px; }
  .trust { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .trust::-webkit-scrollbar { display: none; }
  .trust li { white-space: nowrap; flex: none; }
  .hero + .offers { margin-top: -40px; }
  .cards-list .card { gap: 6px 10px; padding: 10px 11px 9px; }
  .cards-list .card .facts { padding: 6px 9px; gap: 4px 10px; }
  .cards-list .card .legal { -webkit-line-clamp: 1; }
}
/* ПК: у рядку логотип зверху, назва під ним — назва не обрізається */
@media (min-width: 980px) {
  .cards-list .card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cards-list .card h3 { font-size: 14px; white-space: normal; }
}
/* огляд МФО: таблиця умов не розпирає сторінку на вузьких телефонах */
.lender-top > * { min-width: 0; }
/* довгі рядки без пробілів (номери рахунків, посилання) переносяться, а не розпирають сторінку */
.prose p, .prose li, .prose td { overflow-wrap: anywhere; }

/* ---------- квіз «Підбір кредиту» ---------- */
.quiz-sec { position: relative; margin-top: -40px; margin-bottom: 18px; }
.quiz, .q-result { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgba(8, 30, 40, .14); padding: 18px 16px; max-width: 720px; }
.q-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--ink-3); }
.q-bar { flex: 1; height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 25%; background: #F5B83D; border-radius: 6px; transition: width .25s; }
.q-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.q-step legend { font-size: 20px; font-weight: 800; letter-spacing: -.015em; margin-bottom: 12px; padding: 0; }
.q-opts { display: grid; gap: 8px; }
.q-opts label { position: relative; display: block; cursor: pointer; }
.q-opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.q-opts span { display: block; border: 2px solid var(--line); border-radius: 12px; padding: 13px 14px; font-weight: 600; font-size: 16px; background: var(--paper); transition: border-color .15s, background .15s; }
.q-opts label:hover span { border-color: var(--brand-2); }
.q-opts input:checked + span { border-color: #E9A824; background: #FFF7E3; }
.q-opts input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.q-nav { margin-top: 12px; min-height: 8px; }
.q-back, .q-again { border: 0; background: none; color: var(--brand-2); font: 600 15px var(--font); cursor: pointer; padding: 8px 0; }
.q-again { background: #F5B83D; color: #0B2A33; border-radius: 11px; padding: 11px 18px; box-shadow: 0 3px 0 #C98A12; margin-top: 6px; }
.q-result h2 { margin-bottom: 6px; }
.q-summary { font-weight: 600; margin-bottom: 8px; }
.q-notes { margin: 0 0 8px; padding-left: 1.2em; color: var(--ink-2); font-size: 14.5px; }
.q-notes li { margin: 4px 0; }
.cards .card[data-fit="no"] { opacity: .78; }
.cards .card[data-fit="no"]::after { content: "Сума може бути меншою за потрібну"; position: absolute; top: -1px; right: 12px; font-size: 10.5px; font-weight: 600; color: var(--ink-2); background: var(--line-2); border-radius: 0 0 8px 8px; padding: 2px 8px; }
.cards .card[data-fit="yes"]::after { content: "Підходить за сумою"; position: absolute; top: -1px; right: 12px; font-size: 10.5px; font-weight: 700; color: #0B2A33; background: #FFE7A8; border-radius: 0 0 8px 8px; padding: 2px 8px; }
.cards-list .card[data-fit] { padding-top: 18px; }
@media (min-width: 800px) {
  .quiz-sec { margin-top: -72px; }
  .quiz, .q-result { padding: 24px 26px; }
  .q-opts { grid-template-columns: 1fr 1fr; }
  .q-step legend { font-size: 24px; }
}
/* на сторінці квізу шапка не потребує «заїзду» карток */
.hero + .quiz-sec + .offers { margin-top: 0; }

/* жовта «таблетка» підбору в першому екрані */
.trust .trust-cta { background: #F5B83D; border-color: #F5B83D; padding: 0; }
.trust .trust-cta::before { display: none; }
.trust .trust-cta a { display: block; padding: 5px 12px; color: #0B2A33; font-weight: 800; text-decoration: none; }
@media (min-width: 800px) { .trust .trust-cta a { padding: 8px 14px; } }
