/* RankingKontOsobistych.pl — styles translated 1:1 from the design handoff (section 2a/2b).
   Mobile-first; desktop breakpoint ≥ 768 px. */

:root {
  --navy: #12294d;
  --green: #16a34a;
  --green-h: #15803d;
  --badge-bg: #dcfce7;
  --badge-t: #15803d;
  --mint: #8fd3a8;
  --bg: #f2f4f8;
  --border: #e2e7ef;
  --sep: #edf0f5;
  --t2: #42536e;
  --t3: #6b7a90;
  --muted: #8d99ab;
  --link: #1d4ed8;
  --link-h: #1e40af;
  --tile-green: #f0f7f2;
  --tile: #f6f8fb;
  --green-sub: #4e7a5f;
  --chip: #eef1f6;
  --dash: #c9d2e0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  font-family: system-ui, 'Helvetica Neue', sans-serif;
  color: var(--t2);
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-h); }
button { font-family: inherit; }
[hidden] { display: none !important; }

@media (max-width: 767px) { .desktop-only { display: none !important; } }
@media (min-width: 768px) { .mobile-only { display: none !important; } }

/* ---------- Header + hero ---------- */
.site-top { background: var(--navy); color: #fff; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 0;
}
.logo { font-size: 15px; font-weight: 700; letter-spacing: -.2px; color: #fff; flex: none; }
.logo span { color: var(--mint); }
.logo:hover { color: #fff; }
.top-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.top-nav a {
  padding: 9px 14px; border-radius: 999px;
  color: rgba(255,255,255,.75); font-size: 13px; font-weight: 600;
}
.top-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.top-nav a.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.menu-btn {
  width: 42px; height: 42px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2); border-radius: 9px;
  color: #fff; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hero-inner { padding: 0 16px 18px; }
.hero-inner h1 { margin: 14px 0 6px; font-size: 21px; line-height: 1.25; font-weight: 700; }
.hero-inner p { margin: 0; font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.78); }
.hero-update { margin-top: 8px; font-size: 11px; color: rgba(255,255,255,.6); }

@media (min-width: 768px) {
  .header-inner {
    max-width: 1100px; margin: 0 auto; justify-content: flex-start;
    gap: 22px; padding: 14px 40px 12px;
  }
  .logo { font-size: 17px; }
  .hero-inner { max-width: 1100px; margin: 0 auto; padding: 20px 40px 30px; }
  .hero-inner h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.2; letter-spacing: -.4px; }
  .hero-inner p { max-width: 640px; font-size: 14px; line-height: 1.55; }
  .hero-update { margin-top: 10px; font-size: 11.5px; }
}

/* ---------- Sort bar ---------- */
.sortbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.sortbar-inner { display: flex; gap: 8px; align-items: center; padding: 10px 12px; }
.sort-label {
  font-size: 10px; font-weight: 700; color: var(--t3);
  text-transform: uppercase; letter-spacing: .5px;
}
.pill {
  border: 1px solid #d6dde8; border-radius: 999px; padding: 8px 13px;
  font-size: 12px; font-weight: 700; cursor: pointer; min-height: 32px;
  background: #fff; color: var(--t2);
}
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill-filter { margin-left: auto; color: var(--green); border-color: #bcd9c8; }
.pill-filter.on { background: var(--green); color: #fff; border-color: var(--green); }
.sort-count { margin-left: 10px; font-size: 11.5px; color: var(--muted); }

@media (min-width: 768px) {
  .sortbar-inner { max-width: 1100px; margin: 0 auto; padding: 12px 40px; }
}

/* ---------- Offer cards ---------- */
.offers { padding: 12px 0 4px; }
.offer-card {
  background: #fff; border-radius: 14px; border: 1px solid var(--border);
  margin: 0 12px 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(16,35,70,.05);
}
.card-badge { padding: 12px 14px 0; }
.card-badge-pill {
  display: inline-flex; align-items: center;
  background: var(--badge-bg); color: var(--badge-t);
  font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  border-radius: 999px; padding: 4px 10px;
}
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 13px 14px 0; }
.rank {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--chip); color: var(--t2); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; order: 3;
}
.logo-tile {
  width: 72px; height: 32px; border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  flex: none; border: 1px solid var(--border); padding: 3px; order: 1;
}
.logo-img {
  background-size: contain; background-repeat: no-repeat; background-position: center;
  width: 100%; height: 100%;
}
.names { flex: 1; min-width: 0; order: 2; }
.names .bank { font-size: 11px; color: var(--t3); }
.names .name { font-size: 14.5px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.metrics {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px;
  order: 4; width: 100%; margin-top: 2px;
}
.metrics.sav { grid-template-columns: 1.3fr 1fr 1fr; }
.metrics.no-bonus { grid-template-columns: 1fr 1fr; }
.tile { background: var(--tile); border-radius: 10px; padding: 8px 10px; }
.tile-green { background: var(--tile-green); }
.tile-label {
  font-size: 9.5px; font-weight: 700; color: var(--t3);
  text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
}
.tile-green .tile-label { color: var(--green); }
.tile-val { font-size: 15px; font-weight: 700; color: var(--navy); }
.tile-green .tile-val { font-size: 17px; font-weight: 800; color: var(--green); }
.tile-sub { font-size: 9px; line-height: 1.35; color: var(--green-sub); margin-top: 1px; }
.tile-sub.muted, .tile .tile-sub { color: var(--muted); }
.tile-green .tile-sub { color: var(--green-sub); }
.cta-col { order: 5; width: 100%; margin-top: 2px; padding-bottom: 6px; }
.cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--green); color: #fff; border-radius: 10px;
  min-height: 46px; font-size: 13.5px; font-weight: 600; letter-spacing: .15px;
}
.cta:hover { background: var(--green-h); color: #fff; }

.card-bar {
  display: flex; align-items: stretch;
  border-top: 1px solid var(--sep); background: #fafbfd; margin-top: 8px;
}
.details-toggle {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: none; color: var(--t2);
  font-size: 12.5px; font-weight: 600; cursor: pointer; min-height: 44px;
}
.details-toggle:hover { background: #f1f4f9; color: var(--navy); }
.vsep { width: 1px; background: var(--border); flex: none; }
.cmp-toggle {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: none; border: none; min-height: 44px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--t3);
}
.cmp-toggle.on { background: #e8f1ff; color: var(--link); font-weight: 700; }

.card-details {
  border-top: 1px solid var(--border); background: #fafbfd; padding: 16px 14px 18px;
}
.card-details h3 {
  margin: 20px 0 8px; font-size: 11px; font-weight: 800; color: var(--navy);
  text-transform: uppercase; letter-spacing: .5px;
}
.det-steps h3:first-child, .det-promo h3:first-child, .det-fees h3:first-child { margin-top: 0; }
.det-fees h3 { margin-bottom: 4px; }
.det-feat h3 { margin-bottom: 9px; }
.det-promo h3 { margin-bottom: 2px; }
.step-row {
  display: flex; gap: 7px; font-size: 13.5px; line-height: 1.5;
  color: var(--t2); margin-bottom: 7px;
}
.step-row .tick { color: var(--green); font-weight: 800; }
.tier-row {
  display: flex; gap: 7px; font-size: 13.5px; line-height: 1.5; color: var(--t2);
  padding: 7px 0; border-bottom: 1px solid var(--sep);
}
.tier-row .pct { color: var(--green); font-weight: 800; }
.cond-notes { margin: 6px 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--t2); }
.fee-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--sep);
}
.fee-l { flex: 1; min-width: 0; }
.fee-label { font-size: 13.5px; font-weight: 600; color: var(--t2); }
.fee-note { font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 2px; }
.fee-val { font-size: 14px; font-weight: 800; color: var(--navy); flex: none; }
.transfer-note { font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  font-size: 11.5px; font-weight: 600; color: var(--t2);
  background: var(--chip); border-radius: 999px; padding: 4px 9px;
}

@media (min-width: 768px) {
  .offers { max-width: 1100px; margin: 0 auto; padding: 16px 40px 4px; }
  .offer-card { margin: 0 0 12px; }
  .card-badge { padding: 12px 18px 0; }
  .card-head { flex-wrap: nowrap; gap: 16px; padding: 16px 18px; }
  .rank { width: 28px; height: 28px; font-size: 12.5px; order: 0; }
  .logo-tile { width: 88px; height: 38px; order: 0; }
  .names { width: 190px; flex: none; order: 0; }
  .names .name { line-height: 1.25; }
  .metrics { flex: 1; width: auto; order: 0; gap: 8px; margin: 0; }
  .tile { padding: 8px 12px; }
  .tile-green .tile-val { font-size: 18px; }
  .cta-col { order: 0; width: 236px; flex: none; margin: 0; padding: 0; }
  .cta { min-height: 44px; font-size: 13px; }
  .card-bar { margin-top: 14px; }
  .details-toggle { min-height: 42px; }
  .cmp-toggle { flex: none; width: 254px; padding-right: 18px; min-height: 42px; }
  .card-details {
    padding: 16px 18px;
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 4px 36px;
    grid-template-areas: "steps fees" "feat fees";
    align-content: start;
  }
  .det-steps { grid-area: steps; }
  .det-fees { grid-area: fees; }
  .det-feat { grid-area: feat; }
  .det-steps h3 { margin-bottom: 6px; }
  .det-fees h3 { margin-bottom: 2px; }
  .det-feat h3 { margin: 15px 0 7px; }
  .step-row { font-size: 13px; margin-bottom: 6px; }
  .tier-row { font-size: 13px; }
  .cond-notes { font-size: 13px; margin: 6px 0 13px; }
  .fee-label { font-size: 13px; }
  .fee-note { font-size: 11.5px; }
  .fee-val { font-size: 13.5px; }
  .card-details.sav {
    grid-template-columns: 1.2fr 1fr;
    grid-template-areas: "promo fees";
  }
  .det-promo { grid-area: promo; }
}

/* ---------- Empty state ---------- */
.empty-wrap { padding: 20px 12px 4px; }
.empty-card {
  background: #fff; border: 1px dashed var(--dash); border-radius: 14px;
  padding: 28px 18px; text-align: center;
}
.empty-title { font-size: 14.5px; font-weight: 800; color: var(--navy); }
.empty-text { margin: 8px 0 14px; font-size: 12px; line-height: 1.6; color: var(--t3); }
.btn-green {
  background: var(--green); color: #fff; border: none; border-radius: 10px;
  min-height: 44px; padding: 0 20px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.btn-green:hover { background: var(--green-h); color: #fff; }
.btn-link { display: inline-flex; align-items: center; padding: 0 22px; }

@media (min-width: 768px) {
  .empty-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 40px 8px; }
  .empty-card { padding: 36px 24px; }
  .empty-title { font-size: 15.5px; }
  .empty-text { max-width: 440px; margin: 8px auto 16px; font-size: 12.5px; }
}

/* ---------- FAQ ---------- */
.faq-wrap { padding: 18px 16px 8px; }
.faq-wrap h2 { margin: 0 0 10px; font-size: 17px; font-weight: 800; color: var(--navy); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; background: none; border: none; text-align: left;
  padding: 13px 0; font-size: 13px; font-weight: 700; color: var(--navy); cursor: pointer;
}
.faq-icon { color: var(--t3); font-size: 16px; flex: none; }
.faq-a { font-size: 12.5px; line-height: 1.6; color: var(--t2); padding: 0 0 13px; }

@media (min-width: 768px) {
  .faq-wrap { max-width: 1100px; margin: 0 auto; padding: 18px 40px 8px; }
  .faq-wrap h2 { font-size: 18px; }
  .faq-q { font-size: 13.5px; }
  .faq-a { max-width: 820px; }
}

/* ---------- Author card ---------- */
.author-wrap { padding: 12px 12px 4px; }
.author-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; display: flex; align-items: center; gap: 12px;
}
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: var(--mint); font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.author-info { flex: 1; min-width: 0; }
.author-label {
  font-size: 10px; font-weight: 700; color: var(--t3);
  text-transform: uppercase; letter-spacing: .5px;
}
.author-name { font-size: 14px; font-weight: 800; color: var(--navy); }
.author-role { font-size: 11.5px; line-height: 1.4; color: var(--t2); }
.author-meta { margin-left: auto; text-align: right; }
.author-meta .val { font-size: 13px; font-weight: 700; color: var(--navy); }

@media (min-width: 768px) {
  .author-wrap { max-width: 1100px; margin: 0 auto; padding: 12px 40px 8px; }
  .author-card { padding: 18px 24px; gap: 16px; }
  .avatar { width: 54px; height: 54px; font-size: 18px; }
  .author-label { font-size: 10.5px; }
  .author-name { font-size: 15px; }
  .author-role { font-size: 12px; }
}

/* ---------- Disclaimer ---------- */
.disclaimer { padding: 14px 16px 90px; font-size: 10px; line-height: 1.6; color: var(--muted); }
@media (min-width: 768px) {
  .disclaimer { max-width: 1100px; margin: 0 auto; padding: 14px 40px 90px; }
}

/* ---------- Compare bar ---------- */
.cmp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--navy); color: #fff; }
.cmp-bar-inner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.cmp-count { flex: 1; font-size: 12.5px; font-weight: 600; }
.cmp-clear { background: none; border: none; color: rgba(255,255,255,.7); font-size: 12px; cursor: pointer; }
.cmp-go {
  background: var(--green); color: #fff; border: none; border-radius: 999px;
  padding: 10px 18px; font-size: 12px; font-weight: 700; cursor: pointer; min-height: 32px;
}
.cmp-go:disabled { opacity: .45; cursor: default; }
@media (min-width: 768px) {
  .cmp-bar-inner { max-width: 1100px; margin: 0 auto; padding: 12px 40px; }
}

/* ---------- Compare modal ---------- */
.cmp-modal {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.cmp-backdrop { position: absolute; inset: 0; background: rgba(10,20,40,.55); }
.cmp-sheet {
  position: relative; background: #fff; border-radius: 18px 18px 0 0;
  max-height: 86%; overflow-y: auto; padding: 16px 12px;
}
.cmp-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.cmp-title { font-size: 16px; font-weight: 800; color: var(--navy); }
.cmp-close {
  background: var(--chip); border: none; border-radius: 8px; padding: 7px 12px;
  font-size: 12px; font-weight: 700; color: var(--t2); cursor: pointer;
}
.cmp-cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.cmp-col {
  border: 1px solid var(--border); border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.cmp-logo { width: 80px; height: 33px; }
.cmp-name { font-size: 12px; font-weight: 700; color: var(--navy); line-height: 1.25; min-height: 30px; }
.cmp-k { font-size: 9px; font-weight: 700; color: var(--t3); text-transform: uppercase; }
.cmp-v { font-size: 13px; font-weight: 700; color: var(--navy); }
.cmp-v.big { font-size: 15px; font-weight: 800; color: var(--green); }
.cmp-sub { font-size: 9.5px; color: var(--muted); }
.cmp-cta {
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff; border-radius: 8px;
  min-height: 40px; font-size: 12px; font-weight: 700; margin-top: auto;
}
.cmp-cta:hover { background: var(--green-h); color: #fff; }

@media (min-width: 768px) {
  .cmp-modal { flex-direction: row; align-items: center; justify-content: center; padding: 40px; }
  .cmp-sheet { border-radius: 16px; max-width: 880px; width: 100%; max-height: 100%; padding: 18px 16px; }
  .cmp-cols { gap: 10px; }
  .cmp-col { padding: 12px; }
  .cmp-name { font-size: 12.5px; }
  .cmp-v.big { font-size: 16px; }
}

/* ---------- Mobile menu drawer ---------- */
.menu-overlay { position: fixed; inset: 0; z-index: 30; }
.menu-backdrop { position: absolute; inset: 0; background: rgba(10,20,40,.55); }
.menu-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 290px; background: #fff;
  display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(16,35,70,.18);
}
.menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border);
}
.menu-logo { font-size: 14px; font-weight: 800; color: var(--navy); }
.menu-logo span { color: var(--green); }
.menu-close {
  width: 40px; height: 40px; background: var(--chip); border: none;
  border-radius: 9px; color: var(--t2); font-size: 14px; cursor: pointer;
}
.menu-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.menu-nav a { padding: 13px 12px; border-radius: 9px; color: var(--navy); font-size: 13.5px; font-weight: 600; }
.menu-nav a:hover { background: #f4f6f9; color: var(--navy); }
.menu-nav a.on { background: #eef6f0; color: var(--green); font-weight: 700; }
.menu-foot {
  margin-top: auto; padding: 12px 16px 16px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.menu-foot a { padding: 10px 0; color: var(--t3); font-size: 12.5px; font-weight: 600; }
.menu-foot a:hover { color: var(--navy); }

/* ---------- Static pages ---------- */
.page-wrap { padding: 16px 12px 40px; }
.page-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 18px; font-size: 13px; line-height: 1.65; color: var(--t2);
}
.page-card p { margin: 0 0 12px; }
.page-card p:last-child { margin-bottom: 0; }
.page-card h2 { margin: 20px 0 8px; font-size: 14.5px; font-weight: 800; color: var(--navy); }
.page-card h3 { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--navy); }
.page-card h2:first-child, .page-card h3:first-child { margin-top: 0; }
.page-card ul { margin: 0 0 12px; padding-left: 20px; }
.page-card li { margin-bottom: 6px; }
.page-card em { color: var(--t3); }
@media (min-width: 768px) {
  .page-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 40px 60px; }
  .page-card { max-width: 760px; padding: 26px 28px; font-size: 13.5px; }
}

/* sekcja treści pod listingiem (nad kartą autora) */
.seo-wrap { padding: 16px 12px 4px; }
@media (min-width: 768px) {
  .seo-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 40px 8px; }
  .seo-wrap .seo-card { max-width: none; }
}
