/* ============================================================
   NA ZAMKOWYM — Poradnik (lista, kategorie, artykuł)
   Te same tokeny co styl.css: granat marki, zieleń, karty 16 px
   ============================================================ */

/* ---------- nagłówek listy ---------- */
.blog-head { background: var(--tint-2); border-bottom: 1px solid var(--line); padding-block: clamp(40px, 5vw, 80px) clamp(28px, 3vw, 44px); }
.blog-head .sec-head { margin-bottom: clamp(20px, 2.4vw, 30px); max-width: 780px; }
main .blog-head .sec-head h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.06; }
.blog-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-chips .chip { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; background: #fff; border-color: var(--line); }
.blog-chips .chip span { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.blog-chips .chip:hover { border-color: var(--line-2); background: #fff; }
.blog-chips .chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.blog-chips .chip[aria-current="page"] span { color: rgba(255,255,255,.6); }

.blog-list { padding-top: clamp(32px, 4vw, 64px); }

/* ---------- karty wpisów ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(18px, 2.2vw, 28px); }
.posts.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.pcard {
  display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-card); overflow: hidden;
  transition: box-shadow .18s, border-color .18s, transform .18s; position: relative;
}
.pcard:hover { box-shadow: var(--sh-card); border-color: var(--line-2); transform: translateY(-2px); }
.pcard-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s ease; }
.pcard:hover .pcard-img img { transform: scale(1.035); }
.pcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard-cat { align-self: flex-start; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); text-decoration: none; position: relative; z-index: 2; }
.pcard-cat:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcard-t { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.25; letter-spacing: -.01em; }
.pcard-t a { color: var(--ink); text-decoration: none; }
.pcard-t a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-t a:hover { color: var(--accent); }
.pcard-ex { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.pcard-meta { margin: auto 0 0; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.pcard-meta span, .post-meta > span, .badge.quiet { display: inline-flex; align-items: center; gap: 6px; }
.pcard-meta svg, .post-meta svg, .badge svg { width: 15px; height: 15px; flex: none; }

/* pierwszy wpis — duża karta */
.pcard.feat { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.pcard.feat .pcard-img { aspect-ratio: auto; min-height: 340px; }
.pcard.feat .pcard-body { padding: clamp(24px, 3vw, 44px); justify-content: center; gap: 14px; }
.pcard.feat .pcard-t { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.1; }
.pcard.feat .pcard-ex { font-size: 16px; }
.pcard.feat .pcard-meta { margin-top: 4px; }
.pcard.feat .btn { align-self: flex-start; position: relative; z-index: 2; margin-top: 6px; }
.pcard.feat .btn svg { width: 17px; height: 17px; }
@media (max-width: 860px) { .pcard.feat { grid-template-columns: 1fr; } .pcard.feat .pcard-img { min-height: 0; aspect-ratio: 16 / 10; } }

/* okładka zastępcza */
.cover-fb { display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; min-height: 180px; padding: 22px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(129,162,191,.55) 0%, rgba(129,162,191,0) 55%), linear-gradient(135deg, var(--accent) 0%, var(--ink) 100%); }
.cover-fb span { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.cover-fb .logo-svg { height: 52px; align-self: flex-end; color: #fff; opacity: .85; }

/* paginacja */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: clamp(28px, 3.4vw, 48px); }
.pager .page-numbers { min-width: 44px; height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-btn); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.pager a.page-numbers:hover { border-color: var(--ink); }
.pager .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .dots { border-color: transparent; }

.blog-cta { margin-top: clamp(40px, 5vw, 72px); }

/* ---------- artykuł: pasek postępu ---------- */
.readbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; pointer-events: none; }
.readbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--steel)); transform-origin: 0 50%; transform: scaleX(0); }
.admin-bar .readbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .readbar { top: 46px; } }

/* ---------- artykuł: nagłówek ---------- */
.post-head { background: var(--tint-2); border-bottom: 1px solid var(--line); padding-block: clamp(36px, 5vw, 76px) 0; }
.post-head-in { max-width: 860px; padding-bottom: clamp(28px, 3.4vw, 48px); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.post-tags a.badge { text-decoration: none; }
.post-tags a.badge:hover { background: var(--green-100); }
.badge.quiet { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
main .post .post-head h1 { font-size: clamp(30px, 4.2vw, 54px); line-height: 1.08; margin-bottom: 18px; }
.post-lead { font-size: clamp(17px, 1.45vw, 20px); max-width: 62ch; margin-bottom: 26px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.post-by { gap: 10px !important; }
.post-by b { display: block; font-weight: 600; color: var(--ink); line-height: 1.25; }
.post-by small { display: block; font-size: 12px; color: var(--ink-3); }
.post-av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.post-av .logo-svg { height: 22px; color: #fff; }
.post-av.big { width: 64px; height: 64px; }
.post-av.big .logo-svg { height: 34px; }
.post-cover { margin-bottom: calc(-1 * clamp(40px, 6vw, 96px)); position: relative; z-index: 1; }
.post-cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 20px; box-shadow: var(--sh-card); }
.post-cover figcaption { text-align: right; }
.post-head:has(.post-cover) + .wrap .post-grid { padding-top: clamp(64px, 8vw, 132px); }

/* ---------- artykuł: układ ---------- */
.post-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 4vw, 72px); padding-block: clamp(36px, 4.5vw, 72px) clamp(48px, 5vw, 88px); align-items: start; }
.post-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.post-main { max-width: 760px; min-width: 0; }
.post-grid.no-toc .post-main { margin-inline: auto; }
.post-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 22px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 1000px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-side { position: static; max-height: none; overflow: visible; }
  .post-main { margin-inline: auto; width: 100%; }
  .side-share { display: none !important; }
}

/* spis treści */
.toc details { border: 1.5px solid var(--line); background: #fff; margin: 0; }
.toc summary { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 14px 16px; justify-content: flex-start; gap: 10px; }
.toc summary svg { width: 17px; height: 17px; color: var(--green); }
.toc summary::after { margin-left: auto; }
.toc ol { list-style: none; margin: 0; padding: 0 8px 10px; counter-reset: toc; }
.toc li a { display: block; padding: 8px 10px 8px 14px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.4; transition: color .15s, border-color .15s, background .15s; }
.toc li.lv3 a { padding-left: 26px; font-size: 13px; color: var(--ink-3); }
.toc li a:hover { color: var(--accent); background: var(--tint-2); }
.toc li a.on { color: var(--ink); border-left-color: var(--green); font-weight: 600; background: var(--green-050); }
.toc-left { margin: 10px 2px 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.toc-left b { color: var(--green); }

/* udostępnianie */
.side-share span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sh { font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .12s; }
.sh svg { width: 18px; height: 18px; flex: none; }
.sh:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.sh[hidden] { display: none; }
.share-row.big .sh { width: auto; height: auto; border-radius: 99px; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.share-row.big .sh.native { background: var(--green); border-color: var(--green); color: #fff; }
.post-share { margin-top: clamp(36px, 4vw, 56px); padding: clamp(20px, 2.4vw, 28px); border-radius: var(--r-card); background: var(--tint-2); border: 1.5px solid var(--line); }
.post-share p { margin-bottom: 14px; color: var(--ink-2); }
.post-share p b { color: var(--ink); }

/* autor */
.post-author { margin-top: 20px; display: flex; gap: 20px; align-items: flex-start; padding: clamp(20px, 2.4vw, 28px); border-radius: var(--r-card); border: 1.5px solid var(--line); }
.post-author .tiny { margin: 0 0 2px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.post-author .h3 { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.25; margin-bottom: 8px; }
.author-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.author-contacts .pill { width: auto; padding: 9px 16px; font-size: 14px; }
@media (max-width: 560px) { .post-author { flex-direction: column; } }

/* poprzedni / następny */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.pn { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: var(--r-card); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.pn:hover { border-color: var(--accent); box-shadow: var(--sh-card); }
.pn span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pn span svg { width: 15px; height: 15px; }
.pn b { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.pn.next { text-align: right; grid-column: 2; }
.pn.next span { justify-content: flex-end; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .pn.next { grid-column: 1; } }

.related .related-all { margin: clamp(24px, 3vw, 36px) 0 0; text-align: center; }
.post-end { padding-top: 0; }
.related + .post-end { padding-top: clamp(56px, 6.5vw, 112px); }

/* do góry + komunikat */
.totop { position: fixed; right: var(--pad); bottom: 24px; z-index: 66; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--sh-pop); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s, background .15s; }
.totop.on { opacity: 1; transform: none; }
.totop:hover { background: var(--accent); }
.totop svg { width: 20px; height: 20px; }
.totop[hidden] { display: none; }
.copied { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 130; margin: 0; padding: 12px 18px; border-radius: var(--r-btn); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--sh-pop); }
.copied[hidden] { display: none; }

/* ---------- treść artykułu ---------- */
.prose { font-size: clamp(16.5px, 1.2vw, 18px); line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; }
.prose > p:first-child { font-size: 1.08em; color: var(--ink); }
.prose h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; margin-top: 2.1em; scroll-margin-top: 96px; position: relative; }
.prose h3 { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.25; margin-top: 1.7em; scroll-margin-top: 96px; position: relative; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.h-anchor { margin-left: .35em; color: var(--line-2); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .15s, color .15s; }
.prose h2:hover .h-anchor, .prose h3:hover .h-anchor, .h-anchor:focus { opacity: 1; }
.h-anchor:hover { color: var(--green); }
.prose a { color: var(--accent); text-decoration-color: var(--accent-100); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 500; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose a.ext::after { content: "↗"; font-size: .8em; margin-left: .15em; }
.prose strong, .prose b { font-weight: 600; }
.prose ul, .prose ol { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 1.7em; }
.prose li + li { margin-top: .5em; }
.prose ul > li::before { content: ""; position: absolute; left: .35em; top: .72em; width: 8px; height: 8px; border-radius: 3px; background: var(--green); }
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; }
.prose ol > li::before { content: counter(li); position: absolute; left: 0; top: .2em; width: 1.35em; height: 1.35em; border-radius: 50%; background: var(--accent-050); color: var(--accent); font-size: .78em; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--green); font-size: 1.1em; color: var(--ink-2); }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.2em; }
.prose figure img { width: 100%; }
.prose .cmp { font-size: 14.5px; line-height: 1.45; }
.prose .cmp a { font-weight: 600; text-decoration: none; }
.prose .cmp tbody tr:hover { background: var(--tint-2); }
.prose .cmp td.num, .prose .cmp .num { font-variant-numeric: tabular-nums; }
.prose .nz-table .cmp th, .prose .nz-table .cmp td { white-space: nowrap; }
.prose table:not(.cmp) { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose table:not(.cmp) th, .prose table:not(.cmp) td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose table:not(.cmp) thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.nz-table { border: 1.5px solid var(--line); border-radius: var(--r-card); }
.nz-table .cmp tr:last-child > * { border-bottom: 0; }
.nz-src { font-size: 12.5px !important; color: var(--ink-3); margin-top: .6em !important; }
.nz-empty { padding: 16px 18px; border-radius: var(--r-btn); background: var(--tint-2); font-size: 15px; }

/* ramki w treści */
.tldr { padding: clamp(18px, 2.2vw, 26px); border-radius: var(--r-card); background: var(--green-050); border: 1.5px solid var(--green-100); }
.tldr > p:first-child { font-size: 12px !important; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: .6em; }
.tldr ul { margin: 0; }
.tldr li { font-size: .95em; }
.note { padding: 16px 20px; border-radius: var(--r-btn); background: var(--tint-2); border-left: 3px solid var(--accent); font-size: .95em; }
.note.amber { background: var(--amber-bg); border-left-color: var(--amber-strong); }
.note.green { background: var(--green-050); border-left-color: var(--green); }
.keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.keyfacts div { background: var(--tint-2); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; }
.keyfacts b { display: block; font-size: clamp(18px, 1.7vw, 22px); font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.keyfacts span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.steps { counter-reset: st; }
.prose .nz-cta { margin-block: 2em; }
.prose .nz-cta h3 { margin: 0 0 6px; color: #fff; }
.prose .nz-cta p { color: rgba(255,255,255,.72); font-size: 15px; }
.prose .nz-cta a { color: #fff; text-decoration: none; }
.prose .nz-cta .btn.green { color: #fff; }

/* FAQ w treści */
.prose .faq-head { margin-bottom: .2em; }
.prose details.faq { margin: 0 0 10px; }
.prose details.faq + details.faq { margin-top: 0; }
.prose details.faq summary { font-size: 16px; }
.prose details.faq > :not(summary) { padding: 0 20px 18px; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }

.blog-cta .ctaband, .post-end .ctaband { margin: 0; }

/* ---------- druk ---------- */
@media print {
  .topbar, .crumbs, .readbar, .post-side, .post-share, .post-nav, .related, .post-end, .foot, .totop, .copied, .pre, .stickybar, .h-anchor { display: none !important; }
  .post-head { background: none; border: 0; padding-top: 0; }
  .post-cover { margin-bottom: 0; }
  .post-grid { display: block; padding: 0; }
  .prose { font-size: 12pt; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* tabela przewijana w bok — cień przy prawej krawędzi */
.prose .scrollx.can-scroll { background: linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left / 40px 100% no-repeat local, linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right / 40px 100% no-repeat local, radial-gradient(farthest-side at 100% 50%, rgba(26,34,43,.14), transparent) right / 14px 100% no-repeat scroll; }
.crumbs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
