/* ==========================================================================
   Pojedynczy wpis bazy wiedzy
   Układ wg dokumentu klienta „Struktura wpisu — baza wiedzy", wygląd z makiety.
   ========================================================================== */

.pagebody { padding: 38px 0 78px; }
.prose { max-width: 820px; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: #69756c;
  padding: 0 0 15px;
}

.article-meta span + span::before { content: "·"; margin-right: 14px; color: #a7b0a9; }
.article-meta a:hover { color: var(--green); }

/* --- WIZYTÓWKA AUTORA ----------------------------------------------------- */

.author-badge { display: flex; align-items: center; gap: 12px; margin: 4px 0 22px; }
.author-badge img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.author-badge-copy { display: flex; flex-direction: column; min-width: 0; }
.author-badge-name { font-weight: 700; font-size: 15px; }
.author-badge-cred { font-size: 13px; color: var(--muted); }
.author-badge-link { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--green); white-space: nowrap; }

/* --- W SKRÓCIE I SPIS TREŚCI ---------------------------------------------- */

.tldr { margin: 0 0 22px; }
.tldr b { display: block; margin-bottom: 8px; }
.tldr p { margin: 0; color: var(--ink); }

.toc { background: #edf1e9; padding: 18px 20px; border-radius: 10px; margin: 22px 0 32px; max-width: 540px; }
.toc-title { display: block; margin-bottom: 6px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; color: var(--green); padding: 4px 0; font-size: 13px; }
.toc a::before { content: counter(toc) ". "; }
.toc a:hover { text-decoration: underline; }
.toc a.is-active { font-weight: 700; }

/* --- TREŚĆ ---------------------------------------------------------------- */

.article-content { min-height: 240px; font-size: 17px; line-height: 1.7; }
.article-content > * + * { margin-top: 1.1em; }
.article-content p { margin-bottom: 0; color: #2b3d37; }
.article-content h2 { font-size: 30px; line-height: 1.15; margin-top: 40px; }
.article-content h3 { font-size: 21px; margin-top: 1.6em; }
.article-content h4 { font-size: 17px; margin-top: 1.4em; }
.article-content strong { color: var(--ink); }

.article-content a:not(.btn) {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content ul,
.article-content ol { padding-left: 22px; color: #2b3d37; }
.article-content li + li { margin-top: .5em; }
.article-content li::marker { color: var(--green2); }

.article-content img { border-radius: var(--r); }
.article-content figure { margin: 2em 0; }
.article-content figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; text-align: center; }

.article-content blockquote {
  border-left: 3px solid var(--green2);
  padding: 4px 0 4px 24px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
}

.article-content blockquote cite { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); font-style: normal; margin-top: 12px; }

/* Tabele w treści zawsze przewijalne na wąskich ekranach. */
.article-content .wp-block-table,
.article-content table { display: block; overflow-x: auto; }
.article-content table { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.article-content th,
.article-content td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e6e8e2; }
.article-content thead th { background: #f7f8f3; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #566257; }

.article-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r); }

@media (max-width: 680px) {
  .article-content { font-size: 16px; }
  .article-content h2 { font-size: 25px; margin-top: 32px; }
}

/* --- BLOKI REDAKCYJNE ----------------------------------------------------- */

.rp-block { margin: 2.2em 0; }

.rp-block-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--green2);
  margin-bottom: 10px;
}

/* Box produktowy */
.product-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

@media (max-width: 600px) { .product-box { grid-template-columns: 1fr; } }

.product-box h3 { margin-bottom: 4px; }
.product-box .tagline { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.product-box p { font-size: 14px; color: var(--lead); margin: 12px 0 0; }
.product-box .rank-feats { display: flex; flex-wrap: wrap; gap: 8px; }

.product-box .chip {
  font-size: 12px;
  font-weight: 600;
  background: #f7faf6;
  color: #315747;
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid #d2ddd4;
}

.product-box .chip.good { background: var(--mint-tint); color: var(--green); }

.product-box-side { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 130px; }

.product-box .score {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f0f2eb;
  border-radius: var(--r);
  padding: 10px 18px;
}

.product-box .score b { font: 800 26px/1 var(--display); color: #355d41; }
.product-box .score b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.product-box .score span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; font-weight: 700; }

.product-box .rank-cta {
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  width: 100%;
  text-align: center;
  text-decoration: none !important;
}

.product-box .rank-cta:hover { background: #0d4435; }
.product-box .aff-note { font-size: 11px; color: var(--muted); }

/* Mini-ranking w treści */
.rp-block-mini-ranking .mini-rank { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }

.rp-block-mini-ranking .mini-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid #e8e7df;
}

.rp-block-mini-ranking .mini-card:last-child { border-bottom: 0; }
.rp-block-mini-ranking .mini-card.top { background: #f7faf5; }
.rp-block-mini-ranking .mini-pos { font: 800 16px var(--display); color: var(--muted); width: 22px; flex: none; text-align: center; }
.rp-block-mini-ranking .mini-card.top .mini-pos { color: var(--green); }
.rp-block-mini-ranking .mini-name { font-weight: 700; font-size: 15px; flex: 1; }
.rp-block-mini-ranking .mini-score { font: 800 16px var(--display); }
.rp-block-mini-ranking .mini-bar { width: 90px; height: 5px; background: #e7eae4; border-radius: 99px; margin-top: 4px; overflow: hidden; }
.rp-block-mini-ranking .mini-bar-fill { height: 100%; background: var(--green2); border-radius: 99px; }
.rp-block-more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--green); }

/* Box informacyjny */
.callout { display: flex; gap: 16px; border-radius: var(--r); padding: 18px 20px; border: 1px solid var(--line); }
.callout-icon { flex: none; }
.callout-icon .rp-icon { width: 22px; height: 22px; }
.callout-body h4 { font: 700 16px var(--display); margin-bottom: 6px; }
.callout-body p { font-size: 15px; margin: 0; }
.callout-body p + p { margin-top: .8em; }

.callout-info { background: #edf1e9; }
.callout-info .callout-icon { color: var(--green); }
.callout-wskazowka { background: #f4f4ee; }
.callout-wskazowka .callout-icon { color: var(--gold); }
.callout-uwaga { background: #fff7e7; border-color: #eddbb7; color: #59462d; }
.callout-uwaga .callout-icon { color: #a06a1c; }

/* Cytat */
.rp-block-cytat blockquote {
  border-left: 3px solid var(--green2);
  padding: 4px 0 4px 24px;
  margin: 0;
}

.rp-block-cytat blockquote p { font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--ink); }
.rp-block-cytat cite { display: block; font-family: var(--sans); font-size: 13px; color: var(--lead); font-style: normal; margin-top: 12px; font-weight: 700; }
.rp-block-cytat .cite-cred { font-weight: 400; color: var(--muted); }

/* CTA w treści */
.inline-cta {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  color: #f6f3e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.inline-cta h3 { color: #fff; }
.inline-cta p { font-size: 15px; color: #d0dbd2 !important; margin-top: 6px; }
.inline-cta .btn { text-decoration: none !important; background: #fff; color: var(--ink); border-color: #fff; }

/* --- ŹRÓDŁA, FAQ, AUTOR, POWIĄZANE ---------------------------------------- */

.article-sources,
.faq-bare,
.author-box,
.related { margin: 42px 0; }

.article-sources h2,
.faq-bare h2,
.related h2 { font-size: 30px; margin-bottom: 14px; }

.article-sources ul { padding-left: 22px; font-size: 14px; color: var(--lead); }
.article-sources li + li { margin-top: 6px; }
.article-sources a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }

.author-box {
  background: #f4f4ee;
  border-radius: var(--r);
  padding: 22px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.author-box-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: none; }
.author-box-copy { flex: 1; min-width: 240px; }
.author-box h2 { font-size: 26px; margin-bottom: 4px; }
.author-box-role { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.author-box p { font-size: 15px; color: var(--lead); margin-bottom: 12px; }
.author-box-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.author-box-links a { color: var(--green); }

.related { padding-top: 20px; border-top: 1px solid var(--line); }
.related .art-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 680px) { .related .art-grid { grid-template-columns: 1fr; } }

.footer-cta { margin-top: 42px; }
