/*
 * Pojedynczy wpis bloga (plansza Wpis): naglowek, ramka "W skrocie", spis tresci, tresc z edytora, autor, powiazane wpisy.
 * Wartosci z planszy handoff/plansze/Wpis.dc.html. Elementy tresci (tabele, cytaty, ramki, listy) dzialaja dla blokow edytora
 * i dla zwyklego HTML.
 */

/* ---------- Pasek folio: linki jak tekst ---------- */
.acp-folio a { color: inherit; text-decoration: none; }
@media (hover: hover) { .acp-folio a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; } }

/* ---------- Naglowek artykulu ---------- */
.acp-post-h1 { margin: 0; max-width: 1100px; font-family: var(--f-display); font-weight: 800; font-size: clamp(38px, 6vw, 88px); line-height: .96; letter-spacing: -.04em; text-wrap: balance; }
.acp-post-title__b { display: block; color: var(--green); }
.acp-post-lead { margin: 28px 0 0; max-width: 780px; line-height: 1.45; }
.acp-post-by { margin-top: 28px; display: flex; align-items: center; gap: 14px; }
/* <picture> ma display: contents, wiec jego <source> bylyby pustymi elementami flexa i dokladaly odstep. */
.acp-post-by source, .acp-author source { display: none; }
.acp-post-by__img { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; }
.acp-post-by__text { min-width: 0; font-size: 15.5px; line-height: 1.4; }
.acp-post-by__text strong { font-weight: 650; }
.acp-post-by__text a, .acp-author__name a { color: inherit; text-decoration: none; }
@media (hover: hover) { .acp-post-by__text a:hover, .acp-author__name a:hover { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; } }
.acp-post-by__text span { color: var(--label); }
.acp-post-by__date { display: none; }
@media (max-width: 520px) {
	/* Na telefonie srodkowy napis paska folio (data) jest ukryty, wiec date pokazujemy przy autorze. */
	.acp-post-by__date { display: block; }
}

/* ---------- Ramka "W skrocie" ---------- */
.acp-cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
@media (max-width: 860px) { .acp-cols3 { grid-template-columns: minmax(0, 1fr); } }
.acp-skrot { border-radius: var(--r-l); padding: clamp(24px, 3vw, 40px); }
.acp-skrot__grid { margin-top: 18px; }
.acp-skrot__item { min-width: 0; border-top: 1px solid var(--rule-dark); padding-top: 16px; }
.acp-skrot__v { font-family: var(--f-display); font-weight: 800; font-size: clamp(26px, 2.8vw, 40px); letter-spacing: -.03em; line-height: 1.05; color: var(--amber); }
.acp-skrot__item p { margin: 8px 0 0; font-size: 16.5px; color: var(--on-dark); }

/* ---------- Uklad: spis tresci i tresc ---------- */
.acp-art { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px 72px; align-items: start; }
.acp-art--solo { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) { .acp-art { grid-template-columns: minmax(0, 1fr); } }
.acp-toc { min-width: 0; }
.acp-toc__label { padding-bottom: 12px; }
.acp-toc__list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--ink); }
.acp-toc__list li { border-top: 1px solid var(--ink); padding: 10px 0; display: flex; gap: 12px; }
.acp-toc__no { flex: none; font-family: var(--f-mono); font-size: 12px; line-height: 1.55; color: var(--green); padding-top: 3px; }
.acp-toc__list a { min-width: 0; color: var(--ink); text-decoration: none; font-size: 15.5px; line-height: 1.35; font-weight: 550; }
.acp-toc__list a.is-current { color: var(--green); }
@media (hover: hover) { .acp-toc__list a:hover { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; } }
@media (min-width: 861px) {
	/* Dlugi artykul: spis tresci jedzie z czytelnikiem, zeby lewa kolumna nie zostawala pusta. */
	.acp-toc { position: sticky; top: calc(var(--header-h) + var(--acp-bar) + 24px); max-height: calc(100vh - var(--header-h) - var(--acp-bar) - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}

/* ---------- Tresc artykulu ---------- */
.acp-post-body { min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 20px; font-size: 19px; line-height: 1.65; color: #23342D; }
.acp-post-body > * { margin: 0; min-width: 0; }
.acp-post-body h2, .acp-post-body h3, .acp-post-body h4 { scroll-margin-top: calc(var(--header-h) + var(--acp-bar) + 20px); color: var(--ink); font-family: var(--f-display); font-weight: 800; }
.acp-post-body h2 { margin: 20px 0 0; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -.03em; line-height: 1.08; }
.acp-post-body > :first-child { margin-top: 0; }
.acp-post-body h3 { margin: 8px 0 0; font-size: 24px; letter-spacing: -.025em; line-height: 1.15; }
.acp-post-body h4 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.02em; line-height: 1.2; }
.acp-post-body a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.acp-post-body a:hover { color: var(--green); }
.acp-post-body strong { font-weight: 650; color: var(--ink); }
.acp-post-body img { border-radius: var(--r-m); }
.acp-post-body figure { margin: 0; }
.acp-post-body figcaption { margin-top: 8px; font-size: 14.5px; color: var(--label); }

/* Listy: kropka w kolorze tekstu, liczby w kolorze akcentu. */
.acp-post-body ul, .acp-post-body ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.acp-post-body li { position: relative; margin: 0; padding-left: 20px; line-height: 1.5; }
.acp-post-body ul > li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.acp-post-body ol { counter-reset: acp-li; }
.acp-post-body ol > li { counter-increment: acp-li; padding-left: 38px; }
.acp-post-body ol > li::before { content: counter(acp-li, decimal-leading-zero); position: absolute; left: 0; top: .32em; font-family: var(--f-mono); font-size: 12px; line-height: 1.55; color: var(--green); }
.acp-post-body li > ul, .acp-post-body li > ol { margin-top: 10px; }

/* Tabela: naglowki mono, cienkie linie, ostatni wiersz stopki jako suma. */
.acp-post-body .wp-block-table, .acp-post-body .acp-table-wrap { overflow-x: auto; max-width: 100%; }
.acp-post-body table { width: 100%; min-width: 560px; border-collapse: collapse; border: 0; font-variant-numeric: tabular-nums; font-size: 16.5px; line-height: 1.55; color: var(--ink); }
.acp-post-body .wp-block-table thead, .acp-post-body .wp-block-table tfoot { border: 0; }
.acp-post-body table th, .acp-post-body table td { text-align: left; vertical-align: top; padding: 14px 16px; border: 0; border-top: 1px solid #C9CFCB; font-weight: 500; }
.acp-post-body table thead th { padding: 0 16px 12px; border-top: 0; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 500; color: var(--label); }
.acp-post-body table thead th:last-child { color: var(--green); }
.acp-post-body table tr > :first-child { padding-left: 0; }
.acp-post-body table tr > :last-child { padding-right: 0; }
.acp-post-body table tfoot td, .acp-post-body table tfoot th { border-top: 2px solid var(--ink); font-weight: 800; }
.acp-post-body table td strong { font-weight: 800; }

/* Cytat: gruba bursztynowa linia, pismo naglowkowe. */
.acp-post-body blockquote { margin: 16px 0; border: 0; border-left: 6px solid var(--amber); padding: 4px 0 4px 24px; font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.025em; line-height: 1.2; color: var(--ink); }
.acp-post-body blockquote p { margin: 0; }
.acp-post-body blockquote p + p { margin-top: .5em; }
.acp-post-body blockquote cite { display: block; margin-top: 10px; font-family: var(--f-mono); font-size: 11.5px; font-style: normal; font-weight: 400; letter-spacing: .09em; text-transform: uppercase; color: var(--label); }

/* Ramki obok siebie: blok "Kolumny" (albo grupa .acp-boxes), kazda kolumna ze stylem "Ramka" / "Ramka bursztynowa". */
.acp-post-body .wp-block-columns, .acp-post-body .acp-boxes { display: flex; flex-wrap: wrap !important; align-items: stretch !important; gap: 20px; margin: 0; }
.acp-post-body .wp-block-columns > .wp-block-column, .acp-post-body .acp-boxes > * { flex: 1 1 300px !important; min-width: 0; margin: 0; }
.acp-post-body .is-style-acp-box, .acp-post-body .is-style-acp-box-amber, .acp-post-body .acp-box { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--ink); border-radius: var(--r-l); padding: 26px 28px; color: var(--ink); }
.acp-post-body .is-style-acp-box-amber, .acp-post-body .acp-box--amber { background: var(--amber); border-color: var(--amber); }
.acp-post-body .is-style-acp-box > *, .acp-post-body .is-style-acp-box-amber > *, .acp-post-body .acp-box > * { margin: 0; }
.acp-post-body .is-style-acp-box h3, .acp-post-body .is-style-acp-box-amber h3, .acp-post-body .acp-box h3 { margin: 0; }
.acp-post-body .is-style-acp-box li, .acp-post-body .is-style-acp-box-amber li, .acp-post-body .acp-box li { font-size: 17px; line-height: 1.45; }
.acp-post-body .is-style-acp-box ul > li::before, .acp-post-body .is-style-acp-box-amber ul > li::before, .acp-post-body .acp-box ul > li::before { top: .56em; }
.acp-post-body .is-style-acp-box-amber a:hover, .acp-post-body .acp-box--amber a:hover { color: var(--ink); }

/* Kod. */
.acp-post-body pre { margin: 0; padding: 16px 18px; overflow-x: auto; max-width: 100%; background: var(--mist); border-radius: var(--r-s); font-family: var(--f-mono); font-size: 14px; line-height: 1.6; color: var(--ink); white-space: pre; }
.acp-post-body :not(pre) > code { padding: 2px 6px; background: var(--mist); border-radius: 4px; font-family: var(--f-mono); font-size: .85em; }
.acp-post-body hr { width: 100%; height: 0; border: 0; border-top: 1px solid var(--ink); }
.acp-post-body iframe, .acp-post-body video { max-width: 100%; }
.acp-post-body .acp-note, .acp-post-body .acp-sources { font-size: 16px; line-height: 1.55; color: var(--label); }
.acp-post-body .acp-sources li { line-height: 1.45; }

/* Pytania na koncu artykulu. */
.acp-post-body .acp-faq__q { font-size: 22px; }
.acp-post-body .acp-faq__a { font-size: 17px; }

@media (max-width: 520px) {
	.acp-post-body { font-size: 17px; }
	.acp-post-body .is-style-acp-box, .acp-post-body .is-style-acp-box-amber, .acp-post-body .acp-box { padding: 22px 20px; }
}

/* ---------- Autor ---------- */
.acp-author { border-top: 2px solid var(--ink); padding-top: 28px; display: flex; align-items: center; gap: 28px 40px; flex-wrap: wrap; }
.acp-author__img { width: 108px; height: 108px; flex: none; border-radius: var(--r-l); object-fit: cover; }
.acp-author__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.acp-author__name { font-family: var(--f-display); font-weight: 800; font-size: 28px; letter-spacing: -.03em; line-height: 1.55; }
.acp-author__text p { margin: 0; max-width: 620px; font-size: 16.5px; color: var(--text); }
.acp-author__btn { padding: 15px 24px; }

/* ---------- Powiazane wpisy ---------- */
.acp-more__all { color: var(--ink); text-underline-offset: 4px; }
.acp-more__grid { margin-top: 18px; }
.acp-more__card { min-width: 0; border-top: 2px solid var(--ink); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.acp-more__title { font-family: var(--f-display); font-weight: 800; font-size: 24px; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; transition: transform .28s var(--ease); }
@media (hover: hover) {
	.acp-more__card:hover { color: var(--ink); }
	.acp-more__card:hover .acp-more__title { transform: translateX(8px); }
}
@media (prefers-reduced-motion: reduce) { .acp-more__title { transition: none; } }
