/* zaymonline.su — современная лёгкая дизайн-система (mobile-first, без фреймворков).
   Никаких внешних шрифтов/ресурсов: быстрый LCP, стабильный CLS. */

:root {
  --brand-1: #6366f1;          /* indigo */
  --brand-2: #8b5cf6;          /* violet */
  --brand-ink: #4338ca;
  --accent: #10b981;           /* emerald (доверие/успех) */
  --ink: #0b1220;
  --text: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --line: #e9edf5;
  --warn-bg: #fff8ec;
  --warn-line: #fde4b3;
  --warn-ink: #92600a;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px -2px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 50px -18px rgba(79, 70, 229, .35);
  --maxw: 880px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(139, 92, 246, .10), transparent 60%),
    radial-gradient(1000px 460px at -10% 0%, rgba(99, 102, 241, .10), transparent 55%),
    var(--bg);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------------- Шапка ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 12px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: var(--ink);
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  display: grid; place-items: center; color: #fff;
  font-size: 20px; font-weight: 800; line-height: 1;
  box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .7);
}
.logo-text { color: var(--ink); white-space: nowrap; }
.logo-text .grad {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.header-pill {
  font-size: 12px; color: var(--brand-ink); font-weight: 600;
  background: color-mix(in srgb, var(--brand-1) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand-1) 22%, #fff);
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}

/* ---------------- Первый экран ---------------- */
.hero { padding: 30px 0 6px; }
.hero h1 {
  font-size: 30px; line-height: 1.12; letter-spacing: -.03em;
  margin: 0 0 10px; color: var(--ink); font-weight: 820;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin: 0 0 16px; color: var(--muted); font-size: 16px; max-width: 620px; }

.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.trust {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #334155;
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.trust svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------------- Центрированный герой + «поисковик» ---------------- */
.hero--center { text-align: center; padding-top: 36px; }
.hero--center .lead { margin-left: auto; margin-right: auto; }
.trust-row--center { justify-content: center; }
.tag-filter--center { justify-content: center; }

.finder {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin: 20px auto 0; max-width: 680px; text-align: left;
}
.finder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.finder-field label {
  display: block; font-size: 12.5px; color: var(--muted);
  font-weight: 600; margin-bottom: 6px;
}
.finder-field input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 17px; font-weight: 600;
  background: #fcfdff; transition: border-color .15s, box-shadow .15s;
}
.finder-field input:focus {
  outline: none; border-color: var(--brand-1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 16%, transparent);
}
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.quick button {
  border: 1px solid var(--line); background: #fff; color: #475569;
  cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 6px 11px;
  border-radius: 999px; transition: border-color .12s, color .12s, background .12s;
}
.quick button:hover {
  border-color: color-mix(in srgb, var(--brand-1) 35%, var(--line));
  color: var(--brand-ink);
}
.quick button.is-active {
  background: color-mix(in srgb, var(--brand-1) 12%, #fff);
  border-color: color-mix(in srgb, var(--brand-1) 38%, #fff);
  color: var(--brand-ink);
}
.finder-submit { width: 100%; margin-top: 18px; }

/* Кнопка-переключатель фильтра (видна только на мобильных). */
.finder-toggle {
  display: none; width: 100%; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; font-size: 15px; font-weight: 700; color: var(--ink);
  cursor: pointer;
}
.finder-toggle svg { width: 18px; height: 18px; color: var(--brand-ink); }
.finder-toggle .chev { margin-left: auto; transition: transform .2s; }
.finder--open .finder-toggle .chev { transform: rotate(180deg); }

/* ---------------- Фильтр ---------------- */
.filter {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px;
}
.filter .field { display: flex; flex-direction: column; }
.filter .field--submit { grid-column: 1 / -1; }
.filter label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.filter input, .filter select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 16px; background: #fcfdff;
  transition: border-color .15s, box-shadow .15s;
}
.filter input:focus, .filter select:focus {
  outline: none; border-color: var(--brand-1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 16%, transparent);
}

/* ---------------- Чипсы-фильтры по тегам ---------------- */
.tag-filter {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px;
}
.tag-chip {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 600;
  color: #334155; background: var(--surface); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .2s, border-color .2s, color .2s;
}
.tag-chip:hover {
  text-decoration: none; transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand-1) 35%, var(--line));
  color: var(--brand-ink);
}
.tag-chip.is-active {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px rgba(99,102,241,.7);
}

/* ---------------- Кнопки ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 18px; font-size: 15px;
  font-weight: 700; cursor: pointer; transition: transform .12s, box-shadow .2s, filter .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; border: 0; box-shadow: var(--shadow-lg);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-cta { font-size: 16px; padding: 15px 20px; }
.btn-ghost { background: #fff; color: var(--brand-ink); border: 1px solid var(--line); }

/* ---------------- Карточки офферов ---------------- */
.offers { display: flex; flex-direction: column; gap: 16px; }
.offer-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .25s ease, border-color .2s;
}
.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px -18px rgba(15, 23, 42, .22);
  border-color: color-mix(in srgb, var(--brand-1) 28%, var(--line));
}
.offer-rank {
  position: absolute; top: -10px; left: 16px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  padding: 4px 10px; border-radius: 999px; box-shadow: 0 6px 14px -6px rgba(99,102,241,.8);
}

/* Шапка карточки: лого слева + название/рейтинг/бейджи. */
.offer-head { display: flex; align-items: center; gap: 14px; }
.offer-logo, .offer-logo-stub {
  width: 76px; height: 76px; flex: 0 0 76px; border-radius: 16px;
}
.offer-logo { object-fit: contain; }              /* без фона и рамки */
.offer-logo-stub {
  display: grid; place-items: center; font-weight: 800; font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}
.offer-id { min-width: 0; flex: 1; }
.offer-title { font-weight: 800; font-size: 18px; margin: 0; color: var(--ink); letter-spacing: -.01em; }
.offer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 4px; font-size: 13px; color: var(--muted); }
.offer-registry { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.stars { color: #f59e0b; font-weight: 700; white-space: nowrap; }
.approval { display: inline-flex; align-items: center; gap: 5px; font-weight: 700;
  color: var(--accent); white-space: nowrap; }
.approval svg { width: 14px; height: 14px; }

.badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 0; }
.badge {
  font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  white-space: nowrap; border: 1px solid;
  color: var(--bc, #334155);
  background: color-mix(in srgb, var(--bc, #64748b) 12%, #fff);
  border-color: color-mix(in srgb, var(--bc, #64748b) 26%, #fff);
}
.badge-highlight { --bc: var(--accent); }

/* Параметры — строка-таблица с разделителями (без иконок-боксов). */
.offer-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 16px 0; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; background: #fcfdff;
}
.stat { padding: 11px 14px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.stat-value { font-size: 16px; font-weight: 800; color: var(--ink); }

.offer-submit { width: 100%; }
.offer-warning { font-size: 10.5px; color: var(--faint); margin: 12px 0 0; line-height: 1.4; }

/* ---------------- Обязательное предупреждение ---------------- */
.mandatory-warning {
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink);
  border-radius: var(--radius); padding: 14px 16px; font-size: 12.5px; line-height: 1.5;
  margin: 18px 0; display: flex; gap: 11px; align-items: flex-start; min-height: 64px;
}
.mandatory-warning svg { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 1px; color: #d97706; }

/* ---------------- Текстовые блоки ---------------- */
.content-block { margin: 26px 0; }
.content-block h2 { font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.prose { font-size: 15px; color: #334155; }
.prose h2 { font-size: 19px; margin-top: 22px; color: var(--ink); }
.prose h3 { font-size: 16px; }
.prose a { text-decoration: underline; }

/* Перелинковка: ссылки-категории (SEO-лендинги). */
.cat-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-links a {
  font-size: 13.5px; font-weight: 600; color: #334155;
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.cat-links a:hover {
  text-decoration: none; color: var(--brand-ink);
  border-color: color-mix(in srgb, var(--brand-1) 35%, var(--line));
}

/* Хлебные крошки. */
.breadcrumbs { font-size: 13px; color: var(--muted); margin: 18px 0 6px; }
.breadcrumbs a { color: var(--brand-ink); }
.breadcrumbs span { color: var(--faint); }

/* ---------------- Подвал ---------------- */
.site-footer {
  margin-top: 36px; padding: 42px 0 34px;
  background: linear-gradient(180deg, #0c1326, #0b1120); color: #aab4c5; font-size: 13.5px;
}
.site-footer a { color: #cbd5e1; transition: color .15s; }
.site-footer a:hover { color: #fff; text-decoration: none; }

.footer-top { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 40px; }
.footer-brand { max-width: 340px; }
.logo--footer { margin-bottom: 12px; }
.site-footer .logo-text { color: #fff; }   /* «Займ» белым; «Онлайн» — градиент */
.footer-about { color: #8b98ad; font-size: 13px; line-height: 1.6; margin: 0; }

.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin: 0 0 14px; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-contacts { display: flex; flex-direction: column; gap: 9px; color: #8b98ad; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08);
  color: #6f7e96; font-size: 12.5px;
}

/* ---------------- Cookie-баннер ---------------- */
.cookie-banner {
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 50;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 18px 50px -16px rgba(15, 23, 42, .4); font-size: 13px;
}
.cookie-banner .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cookie-banner p { margin: 0; flex: 1 1 260px; color: #334155; }

/* ---------------- Служебные (предпросмотр/дашборд) ---------------- */
.admin-tool { padding: 24px 0 40px; }
.admin-tool h1 { font-size: 24px; letter-spacing: -.02em; color: var(--ink); }
.admin-tool table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface);
  font-size: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.admin-tool th, .admin-tool td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.admin-tool thead th { background: #f3f5fb; font-weight: 700; color: var(--ink); }
.admin-tool tbody tr:last-child td { border-bottom: 0; }
.admin-tool .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-tool form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.admin-tool .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.admin-tool .field { display: flex; flex-direction: column; }
.admin-tool label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.admin-tool input, .admin-tool select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: #fcfdff;
}

/* ---------------- Адаптив ---------------- */
@media (min-width: 560px) {
  .filter { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .filter .field--submit { grid-column: auto; }
  .filter .field--submit .btn { height: 46px; }
}
@media (min-width: 680px) {
  .hero { padding: 44px 0 8px; }
  .hero h1 { font-size: 40px; }
  .offer-params { grid-template-columns: repeat(4, 1fr); }
}

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

/* ---- Мобильная компоновка: офферы сразу, фильтр свёрнут ----
   В конце файла — чтобы перекрыть базовые .trust-row/.tag-filter (flex-wrap). */
@media (max-width: 679px) {
  /* Плашка-дисклеймер не влезает в шапку — скрываем (текст есть в герое/подвале). */
  .header-pill { display: none; }
  /* Лого по центру шапки на мобиле. */
  .site-header .container { justify-content: center; }

  .hero--center { padding-top: 16px; }
  .hero--center h1 { font-size: 25px; }
  .hero--center .lead { font-size: 14.5px; margin-bottom: 12px; }

  .trust-row, .tag-filter {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .trust-row::-webkit-scrollbar, .tag-filter::-webkit-scrollbar { display: none; }
  .trust, .tag-chip { flex: 0 0 auto; }

  .finder { padding: 12px; margin-top: 14px; }
  .finder-toggle { display: flex; }
  .finder-body { display: none; }
  .finder--open .finder-body { display: block; margin-top: 12px; }
  .finder-grid { grid-template-columns: 1fr; }

  /* Параметры на мобиле: «Сумма» и «ПСК» во всю ширину, «Срок»/«Ставка» —
     половинками; разделители между ячейками. */
  .offer-stats { grid-template-columns: 1fr 1fr; }
  .stat { border-left: 0; }
  .stat:first-child, .stat:nth-child(4) { grid-column: 1 / -1; }
  .stat:nth-child(2) { border-top: 1px solid var(--line); }
  .stat:nth-child(3) { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }

  /* Футер — колонки в столбик. */
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { margin-top: 26px; }
}
