:root{
  --rk-bg:#f4f5f7;
  --rk-card:#ffffff;
  --rk-line:#dde3ee;
  --rk-text:#0f172a;
  --rk-muted:#64748b;

  --rk-primary:#3aa5d5;
  --rk-primary2:#0c2340;

  --rk-ok:#0f8a2d;
  --rk-danger:#b91c1c;
  --rk-warn:#b45309;

  --rk-shadow:0 16px 45px rgba(0,0,0,.10);
  --rk-radius:18px;
}

.rk-wrap{ width:min(1000px,85%) !important; margin: 26px auto; padding: 0 14px; }
.rk-card{
  background:var(--rk-card);
  border:1px solid var(--rk-line);
  border-radius:var(--rk-radius);
  box-shadow:var(--rk-shadow);
  overflow:hidden;
}
.rk-topbar{
  padding:14px 16px;
  border-bottom:1px solid var(--rk-line);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background: linear-gradient(180deg, #ffffff, #fbfbff);
}
.rk-pill{
  font-size:12px; font-weight:800;
  color:var(--rk-primary2);
  background: #e1e1e11c;
  border:1px solid rgba(31,79,214,.18);
  padding:8px 10px; border-radius:999px; white-space:nowrap;
}
.rk-progress{
  flex:1; height:10px; background:#eef2ff;
  border-radius:999px; overflow:hidden;
  border:1px solid rgba(31,79,214,.15);
}
#rkProgressBar{
  height:100%; width:0%;
  background: linear-gradient(90deg, #3aa5d5, #0c2340);
  border-radius:999px;
  transition: width .25s ease;
}

.rk-content{ padding:16px; display:grid; gap:12px; }

.rk-step{
  border:1px solid var(--rk-line);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
}
.rk-stepHead{
  padding:12px 14px; display:flex; align-items:center; justify-content:space-around; gap:10px;
  background:#fbfcff; border-bottom:1px solid var(--rk-line);
}
.rk-stepTitle{ display:flex; gap:10px; align-items:center; font-weight:900; font-size:17px; letter-spacing:.2px; color:var(--rk-text); }
.rk-badgeNum{
  width:26px; height:26px; border-radius:999px; display:grid; place-items:center;
  background: #e1e1e11c;
  color: var(--rk-primary2);
  border:1px solid rgba(31,79,214,.18);
  font-weight:1000;
}
.rk-stepHint{ color:var(--rk-muted); font-size:12px; font-weight:600; }
.rk-stepBody{ padding:12px 14px; display:grid; gap:10px; }

.rk-field{ display:grid; gap:6px; padding:10px 0; border-bottom:1px dashed #eef0f6; }
.rk-field:last-child{ border-bottom:none; }
.rk-label{ font-size:14px; color:#111827; font-weight:800; text-align:center; }
.rk-control{ display:flex; justify-content:center; gap:10px; align-items:center; }
.rk-control input{
  width:65%; padding:11px 12px;
  border:1px solid #cfd6e0; border-radius:14px;
  font-size:15px; outline:none; background:#fff;
  color: #040404 !important;
}

#rkFRateOld {gap: 15px;}

.rk-control input:focus{
  border-color:#7aa7ff;
  box-shadow:0 0 0 4px rgba(122,167,255,.18);
}
.rk-suffix{ font-size:12px; color:var(--rk-muted); white-space:nowrap; font-weight:700; }

.rk-options{ display:flex; justify-content:center; gap:10px; margin-top:2px; }
.rk-radio{
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 10px;
  border:1px solid var(--rk-line);
  border-radius:14px;
  background:#fff; cursor:pointer;
}
.rk-radio:hover{ border-color: rgba(31,79,214,.25); background: rgba(31,79,214,.04); }
.rk-radio input{ accent-color: var(--rk-primary); margin-top:2px; }
.rk-radio b{ font-size:14px; }
.rk-desc{ color:var(--rk-muted); font-size:12px; margin-top:2px; }

.rk-msg{
  font-size:12px; padding:10px 12px; border-radius:14px;
  border:1px solid var(--rk-line); background:#fff;
}
.rk-msg.rk-err{ border-color: rgba(185,28,28,.25); background: rgba(185,28,28,.06); color: var(--rk-danger); font-weight:700; }
.rk-msg.rk-warn{ border-color: rgba(180,83,9,.25); background: rgba(180,83,9,.06); color: var(--rk-warn); font-weight:700; }
.rk-msg.rk-ok{ border-color: rgba(15,138,45,.25); background: rgba(15,138,45,.06); color: var(--rk-ok); font-weight:700; }

.rk-hidden{ display:none !important; }

.rk-appear{ animation: rkFadeInUp .18s ease both; }
@keyframes rkFadeInUp{
  from{ opacity:0; transform: translateY(6px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ====== checkboxy stałe / zmienne ====== */
.rk-rateTypeRow{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}
.rk-checkPill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--rk-line);
  border-radius:999px;
  background:#fff;
  cursor:pointer;
  user-select:none;
  transition: .15s ease;
}
.rk-checkPill:hover{
  border-color: rgba(31,79,214,.28);
  background: rgba(31,79,214,.04);
}
.rk-checkPill input{
  width:18px;
  height:18px;
  /* accent-color: var(--rk-primary); */
}
.rk-checkPill span{
  font-size:13px;
  font-weight:900;
  color: var(--rk-text);
}
.rk-hintSmall{
  margin-top:6px;
  color: var(--rk-muted);
  font-size:12px;
  font-weight:650;
}

/* === BENEFITS UX === */
.rk-benefitsWrap{
  border:2px solid #1f4fd6;
  border-radius:22px;
  background:#f7faff;
  padding:18px;
}
.rk-benefitsTitleMain{
  text-align:center;
  font-weight:1000;
  font-size:18px;
  margin-bottom:14px;
  color: #0f172a;
}
.rk-benefitsTopGrid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:14px;
  align-items:stretch;
}
.rk-benefitsCard{
  border-radius:18px;
  padding:16px;
  border:1px solid rgba(15,23,42,.15);
  background:#fff;
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
}
.rk-benefitsCardGreen{
  border:2px solid rgba(15,138,45,.55);
  background:#ecfff2;
}
.rk-benefitsCardLabel{
  text-align:center;
  font-size:14px;
  font-weight:900;
  letter-spacing:.6px;
  color: rgba(15,23,42,.6);
  text-transform:uppercase;
}
.rk-benefitsCardValue{
  text-align:center;
  font-size:28px;
  font-weight:700;
  color:#0f172a;
  margin-top:8px;
}
.rk-benefitsCardValueGreen{
  text-align:center;
  font-size:32px;
  font-weight:1200;
  color:#0f8a2d;
  margin-top:8px;
}
.rk-benefitsCardSub{
  text-align:center;
  margin-top:10px;
  font-size:12px;
  color:#64748b;
  font-weight:700;
}

.rk-cutBanner{
  margin-top:14px;
  border-radius:18px;
  padding:16px;
  background: linear-gradient(180deg, #1f4fd6, #163aa8);
  color:#fff;
  display:flex;
  gap:14px;
  align-items:center;
  box-shadow: 0 16px 40px rgba(31,79,214,.25);
}
.rk-cutIcon{
  width:54px; height:54px;
  border-radius:999px;
  background: rgba(255,255,255,.16);
  display:grid; place-items:center;
  font-size:22px;
}
.rk-cutSmall{ font-size:14px; opacity:.95; font-weight:800; }
.rk-cutBig{ font-size:34px; font-weight:1200; line-height:1.05; margin-top:2px; }
.rk-cutSmall2{ margin-top:2px; font-size:13px; opacity:.95; font-weight:700; }

.rk-benefitsBottom{
  margin-top:12px;
  text-align:center;
  font-size:13px;
  color:#64748b;
  font-weight:800;
}
.rk-footNote{
  margin-top:12px;
  font-size:13px;
  font-weight:800;
  color:#0f172a;
}

.rk-details{
  margin-top:14px;
  border-top:1px solid rgba(15,23,42,.18);
  padding-top:10px;
}
.rk-details summary{
  cursor:pointer;
  font-size:13px;
  font-weight:900;
  color:#298ab5;
  user-select:none;
}
.rk-summaryInner{ margin-top:12px; display:grid; gap:10px; }

.rk-sumLine{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:10px;
  align-items:center;
  padding:12px 12px;
  border:1px dashed #e5eaf5;
  border-radius:16px;
  background:#fff;
}
.rk-sumName{ font-weight:900; font-size:13px; }
.rk-sumVal{ font-weight:1000; white-space:nowrap; }
.rk-sumExtra{
  grid-column:1 / -1;
  color:#64748b;
  font-size:12px;
  margin-top:-2px;
  font-weight:700;
}
.rk-save{ color: #0f8a2d; font-weight:700; }

/* ===== LEAD / CTA (UPGRADE) ===== */
.rk-lead{
  border:1px solid var(--rk-line);
  border-radius:18px;
  background:#fff;
  padding:16px;
  display:grid;
  gap:12px;
}
.rk-leadTitle{
  font-size:22px;
  font-weight:700;
  color:var(--rk-text);
  margin-bottom:0;
  text-align: center;
}

/* opcjonalnie: jeśli dodasz podtytuł <p class="rk-leadSubtitle">... */
.rk-leadSubtitle{
  margin-top:0;
  font-size:13px;
  font-weight:750;
  color: var(--rk-muted);
}

.rk-leadTiles{
  margin-top:12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

.rk-leadTile{
  width:100%;
  text-align:center;
  border:1px solid rgba(15,23,42,.12);
  background: white;
  border-radius:5px;
  padding:20px 14px;
  cursor:pointer;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
  transition: transform .10s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  position:relative;
  overflow:hidden;
}

.rk-leadTile:hover{
  transform: translateY(-1px);
  border-color: rgba(31,79,214,.35);
  box-shadow: 0 18px 40px rgba(31,79,214,.12);
}


.rk-leadTile:active{ transform: translateY(0); }

.rk-leadTileTop{
  
  gap:12px;
  align-items:flex-start;
}

.rk-leadTileTitle{
  font-weight:700;
  font-size:14px;
  color: var(--rk-text);
  line-height:1.25;
}

.rk-leadTileDesc{
  margin-top:6px;
  font-size:12px;
  font-weight:750;
  color: var(--rk-muted);
}

.rk-leadTile:hover .rk-leadTileTitle  {
    color: white;
}

.rk-leadTile.is-active:hover .rk-leadTileTitle {
    color:var(--rk-text);
}

/* aktywny kafelek */
.rk-leadTile.is-active{
  border-color: rgba(31,79,214,.75);
  background-color: white;
  box-shadow: 0 10px 10px rgba(31, 80, 214, 0.068);
}


/* formularz danych */
.rk-leadForm{
  margin-top:12px;
  padding-top:10px;
  border-top:1px dashed rgba(15,23,42,.14);
  display:grid;
  gap:10px;
}

.rk-check{
  display:flex; gap:10px; align-items:flex-start;justify-content:center;
  padding:10px 10px;
  border:1px dashed #eef0f6;
  border-radius:14px;
  color:var(--rk-muted);
  font-size:12px;
}
.rk-check input{ margin-top:2px; accent-color: var(--rk-primary); }

/* przycisk */
.rk-btn{
 margin: 15px auto;
  width:65%;
  padding:16px 20px;
  border:none;
  border-radius: 5px;
  font-weight:1000;
  cursor:pointer;
  background: #3aa5d5;
  color:#fff;
  font-size:14px;
  letter-spacing:.3px;
  box-shadow: 0 16px 35px rgba(31,79,214,.22);
  transition: transform .10s ease, box-shadow .15s ease, opacity .15s ease, background .15s ease;
}
.rk-btn:hover{
  background: #0c2340;
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(31,79,214,.28);
}
.rk-btn:disabled{ opacity:.6; cursor:not-allowed; }

.rk-btn.is-loading{
  opacity:.8;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.g-recaptcha {justify-items: center;}

/* ===================== MOBILE UX ===================== */
@media(max-width:720px){
  .rk-wrap{ margin: 14px auto; padding: 0 5px; width: 100% !important;}
  .rk-topbar{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .rk-stepTitle {
    font-size: 18px;
  }

  .rk-label {
    font-size: 15px;
  }

  .rk-options {
    flex-direction: column;
  }
  .rk-pill{ text-align:center; white-space:normal; }
  .rk-content{ padding:5px; gap:10px; }

  .rk-stepHead{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }

  /* inputy w 1 kolumnie, suffix pod spodem */
  .rk-control{
    grid-template-columns: 1fr;
    gap:8px;

  }
  .rk-suffix{
    justify-self:start;
    padding-left:4px;
  }

  /* większe pola na mobile */
  .rk-control input{
    font-size:16px;
    padding:12px 12px;
    width:100%;
  }

  /* analiza: 1 kolumna */
  .rk-benefitsTopGrid{ grid-template-columns: 1fr; }
  .rk-cutBanner{
    flex-direction:column;
    align-items:flex-start;
  }

  .rk-footNote {
    text-align: center;
  }
  .rk-cutIcon{ width:48px; height:48px; }

  .rk-cutBig{ font-size:30px; }
  .rk-benefitsCardValue{ font-size:26px; }
  .rk-benefitsCardValueGreen{ font-size:30px; }

  /* szczegóły: układ w 1 kolumnie */
  .rk-sumLine{ grid-template-columns: 1fr; }
  .rk-sumVal{ justify-self:start; }

  /* lead: 1 kolumna */
  .rk-leadTiles{ grid-template-columns: 1fr; }

  .rk-lead {
    padding: 20px 10px;
  }

  .rk-leadTileTitle {
    font-size: 13px;
  }
}

/* =========================
   PODZIAŁ 1 RATY
========================= */
.rk-firstRateBox{
  margin-top:18px;
  border:1px solid #dbe5f1;
  border-radius:18px;
  background:#fff;
  padding:18px;
  box-shadow:0 10px 30px rgba(15,23,42,.05);
}

.rk-firstRateHeader{
  font-size:22px;
  font-weight:1000;
  line-height:1.2;
  color:#0f172a;
  margin-bottom:14px;
}

.rk-firstRateCompare{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.rk-firstRateCard{
  border:1px solid #e7edf5;
  border-radius:14px;
  background:#f8fbff;
  padding:14px 16px;
}

.rk-firstRateCardNew{
  background:#f4f9ff;
}

.rk-firstRateCardTitle{
  font-size:15px;
  font-weight:1000;
  color:#0f172a;
  margin-bottom:10px;
}

.rk-firstRateRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:9px 0;
  border-bottom:1px solid #e6edf5;
  font-size:14px;
  line-height:1.35;
}

.rk-firstRateRow:last-child{
  border-bottom:none;
  padding-bottom:0;
}

.rk-firstRateRow span{
  color:#475569;
  font-weight:700;
}

.rk-firstRateRow strong{
  color:#0f172a;
  font-size:15px;
  font-weight:1000;
  white-space:nowrap;
  text-align:right;
}

/* =========================
   ZMIANA RATY / ACCORDION
========================= */
.rk-rateChangeBox{
  margin-top:18px;
  border:1px solid #d9e2ef;
  border-radius:18px;
  background:#fff;
  overflow:hidden;
}

.rk-rateChangeToggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  background:#fff;
  border:0;
  cursor:pointer;
  text-align:left;
}

.rk-rateChangeToggleTitle{
  font-size:18px;
  font-weight:1000;
  line-height:1.25;
  color:#0f172a;
}

.rk-rateChangeToggleBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:112px;
  padding:12px 18px;
  border-radius:10px;
  background:#0c2340;
  color:#fff;
  font-size:14px;
  font-weight:900;
  white-space:nowrap;
}

.rk-rateChangeCollapse{
  border-top:1px solid #e4eaf3;
  padding:18px 18px 16px;
  background:#fff;
}

.rk-rateChangeTableWrap{
  overflow-x:auto;
}

.rk-rateChangeTable{
  width:100%;
  border-collapse:collapse;
}

.rk-rateChangeTable th,
.rk-rateChangeTable td{
  padding:16px 10px;
  border-bottom:1px solid #e8edf5;
  font-size:15px;
}

.rk-rateChangeTable th{
  text-transform:uppercase;
  letter-spacing:.4px;
  font-size:12px;
  font-weight:1000;
  color:#7a8799;
}

.rk-rateChangeTable td:first-child,
.rk-rateChangeTable th:first-child{
  text-align:left;
}

.rk-rateChangeTable td:nth-child(2),
.rk-rateChangeTable th:nth-child(2),
.rk-rateChangeTable td:nth-child(3),
.rk-rateChangeTable th:nth-child(3){
  text-align:right;
}

.rk-rateRowNeutral td{
  color:#94a3b8;
  font-weight:700;
}

.rk-rateDeltaUp{
  color:#ff1978;
  font-weight:900;
}

.rk-rateDeltaDown{
  color:#08b657;
  font-weight:900;
}

.rk-rateDeltaNeutral{
  color:#94a3b8;
  font-weight:900;
}

.rk-ratePaymentStrong{
  color:#0f172a;
  font-weight:1000;
}

/* =========================
   WYKRES SŁUPKOWY
========================= */
.rk-rateChart{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #edf2f7;
  display:grid;
  grid-template-columns:repeat(5, minmax(0,1fr));
  gap:14px;
  align-items:end;
}

.rk-rateChartItem{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.rk-rateChartTop{
  text-align:center;
  min-height:42px;
}

.rk-rateChartDelta{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
}

.rk-rateChartDelta.is-up{
  background:rgba(255,25,120,.10);
  color:#ff1978;
}

.rk-rateChartDelta.is-down{
  background:rgba(8,182,87,.10);
  color:#08b657;
}

.rk-rateChartDelta.is-neutral{
  background:rgba(148,163,184,.14);
  color:#94a3b8;
}

.rk-rateChartPayment{
  font-size:14px;
  font-weight:1000;
  color:#0f172a;
  line-height:1.2;
  margin-top:4px;
}

.rk-rateChartBarWrap{
  width:100%;
  max-width:86px;
  height:180px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}

.rk-rateChartBar{
  width:100%;
  background:#aab5c5;
  border-radius:0;
  position:relative;
  overflow:hidden;
  min-height:10px;
}

.rk-rateChartBarDiff{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
}

.rk-rateChartBarDiff.is-up{
  background:#e91578;
}

.rk-rateChartBarDiff.is-down{
  background:#0bbf61;
}

.rk-rateChartLabel{
  text-align:center;
  font-size:13px;
  font-weight:800;
  color:#475569;
}

/* =========================
   MOBILE
========================= */
@media(max-width:720px){
     .rk-firstRateBox{
    padding:14px;
  }

  .rk-firstRateHeader{
    font-size:18px;
    margin-bottom:12px;
  }

  .rk-firstRateCompare{
    grid-template-columns:1fr;
    gap:12px;
  }

  .rk-firstRateCard{
    padding:12px 14px;
  }

  .rk-firstRateRow{
    font-size:13px;
  }

  .rk-firstRateRow strong{
    font-size:14px;
  }

  .rk-rateChangeToggle{
    padding:14px 14px;
    align-items:flex-start;
  }

  .rk-rateChangeToggleTitle{
    font-size:16px;
    max-width:70%;
  }

  .rk-rateChangeToggleBtn{
    min-width:96px;
    padding:10px 14px;
    font-size:13px;
  }

  .rk-rateChangeCollapse{
    padding:14px 10px 12px;
  }

  .rk-rateChart{
    grid-template-columns:repeat(5, minmax(56px,1fr));
    gap:10px;
    overflow-x:auto;
    align-items:end;
  }

  .rk-rateChartItem{
    min-width:56px;
  }

  .rk-rateChartBarWrap{
    height:140px;
    max-width:56px;
  }

  .rk-rateChartPayment{
    font-size:12px;
  }

  .rk-rateChartLabel{
    font-size:11px;
  }

  .rk-rateChangeTable th,
  .rk-rateChangeTable td{
    padding:12px 8px;
    font-size:13px;
  }
}