:root {
  --navy: #07111f;
  --navy-2: #0c1a2e;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6ebf3;
  --bg: #f4f6fb;
  --white: #fff;
  --red: #e11d2e;
  --red-d: #be1230;
  --green: #059669;
  --green-b: #10b981;
  --gold: #e0b14a;
  --cta: #00b86b;
  --cta-h: #009e5c;
  --shadow: 0 24px 60px rgba(7, 17, 31, .28);
  --radius: 20px;
  --header: 72px;
  --font: "Manrope", "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#kalkulator, #ranking, #jak, #opinie, #faq {
  scroll-margin-top: 88px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 12px; background: #fff; padding: 8px 12px; z-index: 80; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header);
  background: rgba(7, 17, 31, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header__row {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo img { height: 40px; width: auto; }
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: #d7deea;
  font-size: 14px;
  font-weight: 600;
}
.nav a:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta { display: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  min-width: 112px;
}
.btn-ghost:hover { border-color: #fff; }
.btn-red {
  background: var(--red);
  color: #fff;
  min-width: 128px;
}
.btn-red:hover { background: var(--red-d); }
.btn-cta {
  background: var(--cta);
  color: #042814;
  width: 100%;
  min-height: 54px;
  font-size: 16px;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px rgba(0, 184, 107, .28);
  animation: pulse 2.4s ease-in-out infinite;
}
.btn-cta:hover { background: var(--cta-h); }
.btn-dark {
  background: var(--navy);
  color: #fff;
  min-height: 44px;
  width: 100%;
}
.btn-dark:hover { background: #13233d; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(0, 184, 107, .28); }
  50% { box-shadow: 0 10px 28px rgba(0, 184, 107, .5); }
}
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  border-radius: 2px;
  transition: transform .15s ease, opacity .15s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  color: #fff;
  padding: 36px 0 56px;
  background:
    linear-gradient(180deg, rgba(7,17,31,.78) 0%, rgba(7,17,31,.92) 100%),
    url("../img/hero.jpg") center/cover no-repeat,
    var(--navy);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 36px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #f3d48a;
  margin-bottom: 16px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-b);
  box-shadow: 0 0 0 4px rgba(16,185,129,.2);
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--green-b);
}
.lead {
  margin: 0 0 18px;
  max-width: 540px;
  color: #c9d4e4;
  font-size: 18px;
}
.checks { list-style: none; margin: 0 0 20px; padding: 0; }
.checks li {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  color: #e8eef7;
  font-weight: 600;
}
.checks svg { flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #d7deea;
}

/* Calculator */
.calc {
  background: #fff;
  color: var(--ink);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.calc-badge {
  display: inline-flex;
  background: #ecfdf5;
  color: #047857;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.calc-badge.is-paid { background: #fff7ed; color: #c2410c; }
.calc h2 { margin: 0 0 14px; font-size: 22px; }
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f4f7fb;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.toggle span { font-size: 14px; font-weight: 700; }
.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.switch i {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}
.switch i::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform .15s ease;
}
.switch input:checked + i { background: var(--cta); }
.switch input:checked + i::after { transform: translateX(20px); }
.field { margin-bottom: 16px; }
.field-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.field-top label { font-size: 13px; color: var(--muted); font-weight: 700; }
.field-top b { font-size: 22px; }
.range-row { display: flex; align-items: center; gap: 8px; }
.step {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
}
.step:hover { background: #f8fafc; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--cta) 0 var(--p, 20%), #e2e8f0 var(--p, 20%) 100%);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--cta);
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--cta);
  cursor: pointer;
}
.limits {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 11px;
  margin-top: 6px;
}
.calc-sum {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 6px 0 16px;
}
.calc-sum div {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
}
.calc-sum span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.calc-sum b { font-size: 16px; }
.calc-sum b.is-zero { color: var(--green); }
.calc-note {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}
.calc-note a { text-decoration: underline; }
.micro {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: -28px;
  position: relative;
  z-index: 2;
}
.stat {
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.stat b { display: block; font-size: 22px; }
.stat span { color: var(--muted); font-size: 13px; }

/* Ranking */
.section { padding: 72px 0; }
.section h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 10px;
  letter-spacing: -.03em;
}
.section-lead { color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 24px;
}
.updated {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.updated b { display: block; color: var(--ink); font-size: 14px; }
.offer {
  display: grid;
  grid-template-columns: 42px 1.15fr 1.45fr 180px;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.offer.is-top {
  border-color: #f2c14b;
  box-shadow: 0 12px 28px rgba(224, 177, 74, .16);
}
.offer.is-match { border-color: #86efac; }
.rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #64748b;
  font-weight: 800;
  font-size: 13px;
  align-self: start;
}
.offer.is-top .rank {
  background: linear-gradient(180deg, #f5d36a, #d4a017);
  color: #1f1403;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img {
  width: 108px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 4px 8px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px #e6ebf3;
}
.brand h3 { margin: 0 0 2px; font-size: 17px; }
.stars { color: #d4a017; font-size: 12px; font-weight: 800; }
.stars span { color: #94a3b8; font-weight: 600; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.facts span { display: block; color: #94a3b8; font-size: 11px; font-weight: 700; }
.facts b { font-size: 14px; }
.facts b.good { color: var(--green); }
.offer-side { display: grid; gap: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  background: #f1f5f9;
  color: #334155;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}
.tags span.free { background: #ecfdf5; color: #047857; }
.legal-line {
  margin: 14px 0 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.55;
}
.legal-line a { text-decoration: underline; }

/* Steps / benefits */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card, .benefit, .review {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--line);
}
.num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #047857;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
}
.step-card h3, .benefit h3 { margin: 0 0 8px; font-size: 18px; }
.step-card p, .benefit p, .review p { margin: 0; color: var(--muted); }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #07111f;
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

/* Reviews */
.reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ava {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
}
.who b { display: block; }
.who span { color: var(--muted); font-size: 13px; }

/* FAQ */
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq-item button::after { content: "+"; color: var(--muted); }
.faq-item.is-open button::after { content: "–"; }
.faq-item .answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--muted);
}
.faq-item.is-open .answer { display: block; }

/* CTA band */
.cta-band {
  background: var(--navy);
  color: #fff;
  border-radius: 24px;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.cta-band h2 { margin: 0 0 8px; color: #fff; }
.cta-band p { margin: 0; color: #9fb0c7; }
.cta-band .btn-cta { width: auto; min-width: 240px; }

/* Footer */
.site-footer {
  background: #07111f;
  color: #9fb0c7;
  padding: 48px 0 32px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.site-footer h3 { color: #fff; margin: 0 0 10px; font-size: 14px; }
.site-footer a { color: #c9d4e4; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.copy {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 18px;
  font-size: 12px;
  line-height: 1.6;
}

/* Mobile CTA / toast / cookie / loader */
.m-cta { display: none; }
#toast {
  position: fixed;
  left: 16px;
  bottom: 24px;
  z-index: 40;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
  display: grid;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .25s ease;
  min-width: 240px;
}
#toast.is-on { opacity: 1; transform: none; }
#toast strong { font-size: 13px; }
#toast span { color: var(--muted); font-size: 12px; }
.cookie {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 45;
  max-width: 320px;
  background: #0c1a2e;
  color: #d7deea;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 13px;
  box-shadow: var(--shadow);
}
.cookie[hidden] { display: none !important; }
.cookie .btn { margin-top: 10px; min-height: 38px; background: #fff; color: var(--navy); width: 100%; }
body.nav-open::after {
  content: "";
  position: fixed;
  inset: var(--header) 0 0 0;
  background: rgba(0,0,0,.46);
  z-index: 40;
}
.loader {
  position: fixed;
  inset: 0;
  background: rgba(7,17,31,.72);
  color: #fff;
  display: none;
  place-items: center;
  z-index: 80;
  text-align: center;
  padding: 24px;
}
.loader.is-on { display: grid; }
.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--cta);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page {
  padding: 40px 0 80px;
}
.page h1 { margin-top: 0; }
.page p, .page li { color: #475569; }

@media (max-width: 1024px) {
  body { padding-bottom: 78px; }
  .nav, .header-actions { display: none; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: #07111f;
    padding: 18px 20px 24px;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav.is-open .nav-cta {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
  }
  .nav.is-open .nav-cta .btn { flex: 1; }
  .nav.is-open .header-actions-mobile { display: flex; gap: 10px; width: 100%; }
  .burger { display: block; }
  .hero__grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .calc { order: -1; }
  .calc-note, .calc .micro { display: none; }
  .hero .checks li:nth-child(n+3),
  .hero .chips { display: none; }
  .stats, .steps, .benefits, .reviews, .foot-grid, .cta-band, .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }
  .offer {
    grid-template-columns: 32px 1fr;
  }
  .offer .facts,
  .offer .offer-side { grid-column: 1 / -1; }
  .cta-band { display: grid; }
  .cta-band .btn-cta { width: 100%; }
  .stats { margin-top: 18px; grid-template-columns: 1fr 1fr; }
  .m-cta {
    display: grid;
    grid-template-columns: 1.55fr .75fr;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(7, 17, 31, .96);
    box-shadow: 0 -10px 28px rgba(0,0,0,.28);
  }
  .m-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
    padding: 0 8px;
  }
  .m-cta__loan { background: var(--cta); color: #042814; }
  .m-cta__login { border: 1px solid rgba(255,255,255,.35); color: #fff; }
  #toast { bottom: 92px; left: 12px; right: 12px; }
  .cookie {
    left: 10px;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    border-radius: 12px;
  }
  .cookie .btn {
    margin-top: 0;
    width: auto;
    min-width: 52px;
    min-height: 34px;
    padding: 0 12px;
    flex-shrink: 0;
  }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .hero { padding: 16px 0 20px; }
  .hero h1 { font-size: 28px; }
  .lead { font-size: 15px; }
  .calc { padding: 14px; border-radius: 18px; }
  .calc h2 { font-size: 18px; margin-bottom: 10px; }
  .calc-sum { grid-template-columns: 1fr 1fr; }
  .benefits { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .offer-side { min-width: 0; }
  .field { margin-bottom: 12px; }
}

@media (min-width: 1025px) {
  .nav-cta { display: none; }
}
