/*
Theme Name: ЗаймЧек
Description: Блочная тема агрегатора МФО в стиле «Чек переплаты».
Version: 0.1.0
Requires at least: 6.5
Text Domain: zajmchek
*/

:root {
	--blue: #2B4BFF;
	--blue-2: #1F3BE0;
	--ink: #0B1A66;
	--lime: #C6FF3D;
	--paper: #FFFEF8;
	--fog: #F2F3F8;
	--text: #14172B;
	--muted: #5A5F7A;
	--line: #DADDEA;
	--ok: #127A43;
	--bad: #D22B2B;
	--display: Unbounded, system-ui, sans-serif;
	--mono: 'PT Mono', ui-monospace, monospace;
	--r: 14px;
	--gut: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--fog); color: var(--text); }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 .5em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 15px; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* ---------- Шапка ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gut); background: var(--blue); color: #fff; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 19px var(--display); color: inherit; text-decoration: none; letter-spacing: -0.02em; }
.logo__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: var(--ink); font-size: 18px; transform: rotate(-6deg); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; font-weight: 500; padding: 9px 14px; border-radius: 999px; }
.nav a:hover { background: rgba(255,255,255,.12); }
.nav .nav__check { border: 1.5px solid var(--lime); color: var(--lime); }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; font: 800 14px var(--display); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: scale(.97); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #B4F21F; }
.btn--ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn--ghost:hover { background: var(--blue); color: #fff; }

.kicker { font: 13px var(--mono); letter-spacing: .02em; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Главный экран ---------- */
.hero { background: var(--blue); color: #fff; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(32px, 6vw, 80px) var(--gut) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero .kicker { color: #C9D2FF; }
.hero .kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(198,255,61,.25); }
.hero__h1 { font-size: clamp(40px, 6.4vw, 84px); line-height: .95; letter-spacing: -0.045em; max-width: 9ch; }
.hero__lead { font: 16px/1.5 var(--mono); color: #DDE3FF; max-width: 36ch; margin: 0 0 28px; }
.calc { display: grid; gap: 18px; max-width: 520px; }
.calc__row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: baseline; font-weight: 500; }
.calc__row span { color: #C9D2FF; font-size: 14px; }
.calc__row output { font: 800 24px var(--display); letter-spacing: -0.02em; }
.calc__row input { grid-column: 1 / -1; }
.calc .btn { justify-self: start; margin-top: 6px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.25); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.25); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--lime); border: 4px solid var(--ink); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 4px solid var(--ink); }
.hero__receipt { justify-self: center; width: min(100%, 380px); }

/* ---------- Чек ---------- */
.receipt { --zig: 12px; position: relative; min-width: 0; background: var(--paper); color: #1A1A1A; font: 14px/1.7 var(--mono); padding: 22px 22px calc(22px + var(--zig)); transform: rotate(2deg);
	-webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--zig) * 2) 100%;
	mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--zig) * 2) 100%;
	filter: drop-shadow(0 18px 30px rgba(11,26,102,.35)); }
aside .receipt, .page .receipt { transform: rotate(-1deg); margin: 0 6px; filter: drop-shadow(0 10px 22px rgba(11,26,102,.14)); }
.receipt__title { text-align: center; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.receipt__sub { text-align: center; font-size: 12px; color: #555; }
.receipt__rule { border-top: 1.5px dashed #9A9A9A; margin: 12px 0; }
.receipt__rows { list-style: none; margin: 0; padding: 0; }
.receipt__rows li, .receipt__total { display: flex; justify-content: space-between; gap: 12px; }
.receipt__rows li span:first-child { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.receipt__rows li span:first-child::after { content: " ........................................"; color: #BBB; }
.receipt__rows li span:last-child { flex: none; white-space: nowrap; }
.receipt__rows li:first-child { font-weight: 700; }
.receipt__total { font-weight: 700; font-size: 16px; }
.receipt__foot { text-align: center; font-size: 11px; color: #555; margin-top: 10px; }
.receipt.is-printing .receipt__rows li { animation: print .32s steps(6) both; }
.receipt.is-printing .receipt__rows li:nth-child(2) { animation-delay: .04s; }
.receipt.is-printing .receipt__rows li:nth-child(3) { animation-delay: .08s; }
.receipt.is-printing .receipt__rows li:nth-child(4) { animation-delay: .12s; }
.receipt.is-printing .receipt__rows li:nth-child(5) { animation-delay: .16s; }
@keyframes print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hero .receipt { animation: feed .9s cubic-bezier(.2,.8,.2,1) .1s backwards; }
@keyframes feed { from { transform: translateY(-40px) rotate(2deg); clip-path: inset(0 0 100% 0); } to { transform: rotate(2deg); clip-path: inset(0 0 -40px 0); } }

/* ---------- Секции главной ---------- */
.band { padding: clamp(40px, 6vw, 72px) var(--gut); max-width: 1280px; margin: 0 auto; }
.band__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.band__head a { font-weight: 700; text-decoration: none; }
.band--split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); }
.how { background: var(--ink); color: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 40px); }
.how ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 18px; }
.how li { counter-increment: s; position: relative; padding-left: 52px; color: #C9D2FF; }
.how li::before { content: counter(s); position: absolute; left: 0; top: -4px; font: 800 26px var(--display); color: var(--lime); }
.how b { color: #fff; }
.watch { background: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); }
.watch .btn { margin-top: 18px; }

/* ---------- Офферы ---------- */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.offer { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 14px; align-content: start; transition: transform .2s ease, box-shadow .2s ease; }
.offer:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11,26,102,.08); }
.offer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 10px; flex-wrap: wrap; }
.offer__name { font: 800 19px var(--display); letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.offer__terms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.offer__terms div { background: var(--fog); border-radius: 12px; padding: 10px 12px; }
.offer__terms dt { font-size: 12px; color: var(--muted); }
.offer__terms dd { margin: 2px 0 0; font-weight: 700; }
.offer__over { background: var(--lime) !important; }
.offer__over dt { color: var(--ink) !important; }
.offer__cta { width: 100%; }
.offer__legal { margin: 0; font-size: 11px; line-height: 1.45; color: var(--muted); }

/* ---------- Печать ЦБ ---------- */
.stamp { display: inline-grid; justify-items: center; padding: 4px 10px; border: 1.5px solid currentColor; border-radius: 8px; font: 10px/1.25 var(--mono); text-transform: uppercase; letter-spacing: .04em; transform: rotate(-4deg); white-space: nowrap; }
.stamp__k { font-weight: 700; }
.stamp--ok { color: var(--ok); }
.stamp--bad { color: var(--bad); }
.hero .stamp, .how .stamp { color: var(--lime); }

/* ---------- Лента исключений ---------- */
.ticker { list-style: none; margin: 0; padding: 0; }
.ticker li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.ticker a { color: var(--text); font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker span { font: 12px var(--mono); color: var(--bad); white-space: nowrap; }

/* ---------- Перелинковка ---------- */
.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.links a, .chip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; }
.links a:hover, .chip:hover { border-color: var(--blue); color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }

/* ---------- Внутренние страницы ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 24px var(--gut) 64px; }
.page > * + * { margin-top: 0; }
.crumbs { font: 13px var(--mono); color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.page__head { background: var(--blue); color: #fff; border-radius: 28px; padding: clamp(24px, 5vw, 56px); margin-bottom: 28px; position: relative; overflow: hidden; }
.page__head::after { content: "₽"; position: absolute; right: -10px; bottom: -60px; font: 800 220px var(--display); color: rgba(255,255,255,.07); pointer-events: none; }
.page__head h1 { font-size: clamp(30px, 4.6vw, 58px); letter-spacing: -0.04em; max-width: 18ch; }
.page__head .kicker { color: #C9D2FF; }
.page__head .stamp { color: var(--lime); }
.lead { font: 16px/1.55 var(--mono); color: #DDE3FF; max-width: 60ch; }
.lead b { color: var(--lime); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; margin-bottom: 40px; }
.split aside { position: sticky; top: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.split .offers { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.calc-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 32px; font-size: 15px; }
.calc-table th { text-align: left; font: 12px var(--mono); color: var(--muted); text-transform: uppercase; padding: 14px 16px; background: var(--fog); }
.calc-table td { padding: 14px 16px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.calc-table tr:first-child td { background: #F6FFE0; font-weight: 700; }
.calc-table a { color: var(--text); font-weight: 700; }

.verdict { margin-top: 16px; padding: 16px 18px; border-radius: 16px; font: 15px/1.5 var(--body, inherit); }
.page__head .verdict--ok { background: rgba(198,255,61,.16); color: #fff; border: 1.5px solid var(--lime); }
.verdict--ok { background: #EBFBF1; color: #0B4F2B; border: 1.5px solid #9BE0B6; }
.verdict--bad { background: #FFF0F0; color: #7A1313; border: 1.5px solid #F2A7A7; }
.page__head .verdict--bad { background: #FFE9E9; }

.extract { margin: 0; background: var(--paper); border-radius: 20px; padding: 8px 20px; border: 1px solid var(--line); font-size: 15px; }
.extract div { display: grid; grid-template-columns: 200px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.extract div:last-child { border: 0; }
.extract dt { font: 13px var(--mono); color: var(--muted); }
.extract dd { margin: 0; overflow-wrap: anywhere; }

.search { display: flex; gap: 10px; background: #fff; padding: 8px; border-radius: 999px; border: 2px solid var(--blue); max-width: 720px; margin-bottom: 24px; }
.search input { flex: 1; min-width: 0; border: 0; font: 17px inherit; padding: 0 16px; background: transparent; outline: none; }
.results { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 8px; }
.results li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.results a { font-weight: 700; color: var(--text); text-decoration: none; }
.results__meta { font: 13px var(--mono); color: var(--muted); margin-right: auto; }
.results--grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 14px; }
.pager span { background: var(--blue); color: #fff; border-color: var(--blue); }

.disclaimer { font-size: 12px; color: var(--muted); max-width: 90ch; margin-top: 40px; }
.empty { padding: 24px; background: #fff; border-radius: 16px; border: 1px dashed var(--line); }
.page--404 { display: grid; place-items: center; min-height: 60vh; }
.receipt--404 { max-width: 340px; text-align: center; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: #C9D2FF; padding: 48px var(--gut) 32px; margin-top: 40px; }
.footer__cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; max-width: 1280px; margin: 0 auto; }
.footer h3 { color: #fff; }
.footer a { color: #C9D2FF; text-decoration: none; display: block; padding: 4px 0; }
.footer a:hover { color: var(--lime); }
.footer .logo { color: #fff; display: inline-flex; }
.footer__legal { max-width: 1280px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

/* ---------- Мобильные ---------- */
@media (max-width: 900px) {
	.hero, .band--split, .split { grid-template-columns: minmax(0, 1fr); }
	.split aside { position: static; order: -1; }
	.footer__cols { grid-template-columns: 1fr 1fr; }
	.extract div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 640px) {
	.topbar { flex-wrap: wrap; }
	.nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
	.nav a { white-space: nowrap; }
	.calc-table th:nth-child(4), .calc-table td:nth-child(4) { display: none; }
	.footer__cols { grid-template-columns: 1fr; }
	.search { border-radius: 20px; flex-direction: column; }
	.search input { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Шаги и FAQ ---------- */
.steps { margin: 8px 0 40px; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; counter-reset: st; }
.steps li { counter-increment: st; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 6px; }
.steps li::before { content: counter(st, decimal-leading-zero); font: 800 13px var(--display); color: var(--blue); }
.steps span { color: var(--muted); font-size: 15px; }
.faq { margin: 0 0 40px; max-width: 860px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 800 20px var(--display); color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--muted); }
.page .links { margin-bottom: 32px; }
