/* ===== Design tokens ===== */
:root {
  color-scheme: light;

  --bg: #eef3f1;
  --bg-soft: #e3ece8;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --ink: #0f262a;
  --ink-soft: #3c5a56;
  --muted: #6b8781;
  --line: rgba(15, 38, 42, 0.12);
  --line-strong: rgba(15, 38, 42, 0.22);

  --teal: #0f6b63;         /* brand teal */
  --teal-soft: #dcece9;
  --teal-strong: #0a4c46;

  --cta: #1f7a38;          /* action green */
  --cta-ink: #ffffff;
  --cta-soft: #e3f3e6;
  --cta-strong: #14562a;

  --good: #2f7a4f;
  --good-soft: #e1efe4;

  --shadow-1: 0 1px 2px rgba(15, 38, 42, 0.06), 0 1px 1px rgba(15, 38, 42, 0.04);
  --shadow-2: 0 8px 24px -8px rgba(15, 38, 42, 0.22);
  --shadow-3: 0 24px 64px -20px rgba(15, 38, 42, 0.35);

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 20px;

  --font-display: "Unbounded", "Arial Narrow", sans-serif;
  --font-body: "Golos Text", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1717;
    --bg-soft: #0e1e1e;
    --surface: #122423;
    --surface-2: #0e1e1d;
    --ink: #eaf3f0;
    --ink-soft: #b6cbc6;
    --muted: #7fa39c;
    --line: rgba(234, 243, 240, 0.14);
    --line-strong: rgba(234, 243, 240, 0.26);

    --teal: #3fc2b6;
    --teal-soft: #123634;
    --teal-strong: #d7f3ef;

    --cta: #3fbe63;
    --cta-ink: #07240f;
    --cta-soft: #123420;
    --cta-strong: #8fe3ab;

    --good: #6cc08d;
    --good-soft: #12301d;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    --shadow-3: 0 24px 64px -20px rgba(0, 0, 0, 0.65);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1717;
  --bg-soft: #0e1e1e;
  --surface: #122423;
  --surface-2: #0e1e1d;
  --ink: #eaf3f0;
  --ink-soft: #b6cbc6;
  --muted: #7fa39c;
  --line: rgba(234, 243, 240, 0.14);
  --line-strong: rgba(234, 243, 240, 0.26);

  --teal: #3fc2b6;
  --teal-soft: #123634;
  --teal-strong: #d7f3ef;

  --cta: #3fbe63;
  --cta-ink: #07240f;
  --cta-soft: #123420;
  --cta-strong: #8fe3ab;

  --good: #6cc08d;
  --good-soft: #12301d;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-3: 0 24px 64px -20px rgba(0, 0, 0, 0.65);
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html, body { height: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font-family: inherit; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-display); margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }

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

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 16px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
}
.brand {
  display: flex;
  width: 220px;
}
@media (max-width: 540px) {
  .brand {
    width: 180px;
  }
}
.brand img {
  max-width: 100%;
  max-height: 100%;
}
.brand__mark { flex: none; width: 34px; height: 34px; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand__word b { color: var(--cta); font-weight: 700; }
.count-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-soft);
  color: var(--teal-strong);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  min-width: 0;
  overflow: hidden;
}
.count-pill__extra {
  display: none;
}
@media (min-width: 480px) {
  .count-pill__extra { display: inline; }
}
.count-pill__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-soft);
}

/* ===== Filter bar ===== */
.filter-bar {
  position: sticky;
  top: calc(54px + env(safe-area-inset-top, 0px));
  z-index: 39;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-block: 8px;
}
.filter-bar__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar__row::-webkit-scrollbar { display: none; }

.select-wrap {
  position: relative;
  flex: none;
}
.select-wrap select {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 30px 8px 13px;
  border-radius: 999px;
  cursor: pointer;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.results-note {
  flex: none;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  padding-left: 4px;
}

/* ===== Main / intro strip ===== */
.intro-strip {
  padding-block: 10px 6px;
}
.intro-strip p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ===== Offer grid ===== */
.offer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-block: 8px 20px;
}
@media (min-width: 640px) {
  .offer-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (min-width: 980px) {
  .offer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .offer-grid { grid-template-columns: repeat(4, 1fr); }
}

.offer-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 10px;
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.offer-card { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
@media (min-width: 640px) {
  .offer-card { gap: 10px; padding: 14px; }
}

.offer-card__logo {
  flex: none;
  width: 100%;
  max-width: calc(100% - 20px);
  height: 72px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.offer-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.offer-card__logo span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal);
  font-size: 20px;
}

.offer-card__top {
  display: contents;
}

.offer-card__body {
  flex: 1;
  min-width: 0;
}
.offer-card__name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.offer-card__name {
  font-weight: 700;
  font-size: 15px;
}
@media (min-width: 1280px) {
  .offer-card__name { font-size: 16px; }
}
.offer-card__title {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.offer-card__stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.stat-chip {
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
@media (min-width: 1280px) {
  .stat-chip { font-size: 13px; }
}
.stat-chip--sum { background: var(--teal-soft); color: var(--teal-strong); }
.stat-chip--rate { background: var(--cta-soft); color: var(--cta-strong); }
.stat-chip--term { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }

.offer-card__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn--cta {
  background: var(--cta);
  color: var(--cta-ink);
  font-size: 14px;
  padding: 11px 14px;
  width: 100%;
  box-shadow: var(--shadow-1);
}
.btn--cta:hover { filter: brightness(1.05); }
.btn--ghost {
  display: none;
}
.offer-card__more {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: none;
  padding: 2px 0 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.offer-card__more:hover { color: var(--teal); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ===== Sections ===== */
.section {
  padding-block: 36px;
  border-top: 1px solid var(--line);
}
.section__head {
  max-width: 640px;
  margin-bottom: 20px;
}
.section__kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.section__title {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 700;
}
.section__lead {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 60ch;
}
.section--tint {
  background: var(--bg-soft);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 18px;
}
.step__num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cta);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.step__num::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--cta);
}
.step h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.step p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

.criteria {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .criteria { grid-template-columns: repeat(2, 1fr); }
}
.criterion {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 14px;
}
.criterion__icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal-strong);
  display: flex; align-items: center; justify-content: center;
}
.criterion h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
.criterion p { margin: 0; font-size: 13px; color: var(--ink-soft); }

.faq {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 820px) {
  .faq { grid-template-columns: repeat(2, 1fr); align-items: start; }
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item__q {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-family: var(--font-display);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.faq-item summary > span:last-child {
  flex: 1;
}
.faq-item summary::after {
  content: "+";
  flex: none;
  font-size: 18px;
  line-height: 1;
  color: var(--cta);
  font-weight: 400;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item__body {
  padding: 0 16px 16px 52px;
  color: var(--ink-soft);
  font-size: 13.5px;
  max-width: 60ch;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-soft);
  padding-block: 32px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}
.footer-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 760px) {
  .footer-panel {
    grid-template-columns: minmax(0, 1fr) 200px;
    padding: 28px;
    align-items: center;
  }
}
.site-footer__brand {
  display: flex;
  width: 220px;
}

.site-footer__brand img {
  max-width: 100%;
  max-height: 100%;
}

@media (max-width: 530px) {
  .site-footer__brand {
    width: 180px;
  }
}


.disclaimer {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 68ch;
}
.disclaimer + .disclaimer { margin-top: 10px; }

.footer-panel__meta {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}
@media (min-width: 760px) {
  .footer-panel__meta {
    flex-direction: column;
    border-left: 1px solid var(--line);
    padding-left: 24px;
  }
}
.footer-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 10px 12px;
}
@media (min-width: 760px) {
  .footer-stat { background: none; border: none; padding: 0; }
}
.footer-stat__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.footer-stat__value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.footer-copy {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 20, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 20px; }
}
.modal-card {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-3);
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 640px) {
  .modal-card { border-radius: var(--radius-l); }
}
.modal-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.modal-card__logo {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.modal-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.modal-card__name { font-size: 17px; font-weight: 700; }
.modal-card__title { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.modal-card__close {
  margin-left: auto;
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.modal-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.modal-stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 10px 8px;
  text-align: center;
}
.modal-stat b {
  display: block;
  font-size: 15px;
  font-family: var(--font-display);
  color: var(--teal-strong);
}
.modal-stat span {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal-card__legal-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.modal-card__legal {
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: pre-line;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px;
  margin-bottom: 18px;
  max-height: 160px;
  overflow-y: auto;
}
.modal-card .btn--cta { width: 100%; padding: 13px; font-size: 14.5px; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
