/*  1 element */
.editor-block {
	padding: 60px 0;
}
.editor-block.padding-0{
	padding: 0!important;
}
/* Wszysstkie prócz 1 i ostatniego */
.editor-block + .editor-block {
	padding: 50px 0 50px;
}

/* Ostatni element editor block */
main .editor-block:not(:has(~ .editor-block)) {
	padding-bottom: 60px;
}

.editor-block .wrap > .heading {
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: 500;
	text-align: center;
	font-family: var(--display);
	margin: 0 auto 48px;
	color: var(--ink);
}

.editor-block .wrap .editor-block__before-heading {
	text-align: center;
	margin: 0 auto;
	padding: 0;
	margin-bottom: 16px;
	color: var(--brand);
	text-transform: uppercase;
	max-width: 800px;
}
.editor-block .wrap .editor-block__before-heading p {
	margin: 0;
	color: var(--brand);
}

.editor-block .editor-block__button {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 32px;
}
.editor-block .editor-block__button--left {
	justify-content: flex-start;
	/* desktop: wyrównanie do treści powyżej — .custom-col-12 ma padding-left:15px */
	padding-left: 15px;
}
@media (max-width: 768px) {
	.editor-block .editor-block__button {
		padding-left: 24px;
		padding-right: 24px;
	}
}

/* nagłówek wiersza (kicker + nagłówek) — w kolumnie z tekstem, wyrównany do lewej.
   Wysoka specyficzność, żeby ubić skalę .editor-block hX:not(.global-header). */
.editor-block .editor-row__head{margin-bottom:16px}
.editor-block .editor-row__head .eyebrow{display:inline-block;margin-bottom:10px}
.editor-block .editor-row__head .editor-row__title{display:block;font-family:var(--display);font-weight:700;text-transform:uppercase;line-height:1.02;letter-spacing:.5px;color:var(--ink);font-size:clamp(28px,3.4vw,42px);margin:0;text-align:left}

.editor-block h1,
.editor-block h2,
.editor-block h3,
.editor-block h4,
.editor-block h5,
.editor-block h6 {
	font-weight: 700;
	color: var(--ink);
	line-height: normal;
	font-family: var(--body);
}

.editor-block .custom-row .heading {
	margin-top: 0;
}
.editor-block .custom-row + .custom-row {
	margin-top: 80px;
}

.editor-block ul li,
.editor-block ol li {
	line-height: 28px;
}

.editor-block h2:not(.global-header) {
	font-size: 48px;
	line-height: 56px;
}

.editor-block h3:not(.global-header) {
	font-size: 33.18px;
	line-height: 44px;
}

.editor-block h4:not(.global-header) {
	font-size: 27.65px;
	line-height: 36px;
}

.editor-block h5:not(.global-header) {
	font-size: 23.04px;
	line-height: 32px;
}

.editor-block h6:not(.global-header) {
	font-size: 19.2px;
	line-height: 28px;
}
.editor-block p:has(img) {
	margin: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}
.custom-row {
	display: flex;
	flex-wrap: wrap;
	margin-right: -15px;
	margin-left: -15px;
}

.custom-col-12 {
	flex: 0 0 100%;
	max-width: 100%;
	padding-right: 15px;
	padding-left: 15px;
}

.custom-col-md-4,
.custom-col-md-6 {
	position: relative;
	width: 100%;
	padding-right: 15px;
	padding-left: 15px;
}

.custom-col-md-4 {
	flex: 0 0 33.333333%;
	max-width: 33.333333%;
}

.custom-col-md-6 {
	flex: 0 0 50%;
	max-width: 50%;
}

.custom-justify-around {
	justify-content: space-around;
}

.custom-justify-center {
	justify-content: center;
}

.editor-block p:has(> video) {
	margin: 0;
}

.editor-block img {
	max-width: 100%;
	height: auto;
}

.editor-block ol {
	display: block;
	list-style-type: decimal;
	margin-block-start: 1em;
	margin-block-end: 1em;
	margin-inline-start: 0px;
	margin-inline-end: 0px;
	padding-inline-start: 40px;
	unicode-bidi: isolate;
}

.editor-block ul {
	display: block;
	list-style-type: disc;
	margin-block-start: 1em;
	margin-block-end: 1em;
	margin-inline-start: 0px;
	margin-inline-end: 0px;
	padding-inline-start: 40px;
	unicode-bidi: isolate;
}
.editor-block table {
	max-width: 800px;
	margin: 0 auto;
	border: 0;
}

.editor-block table tr {
	padding: 12px 8px;
	font-weight: 400;
	border: 0;
	font-size: 18px;
}
.editor-block table tbody tr:nth-child(odd) {
	background-color: var(--paper);
}
.editor-block table thead tr:first-child * {
	color: var(--ink);
}
.editor-block table thead tr:nth-child(odd) * {
	background-color: var(--paper) !important;
}
.editor-block table thead tr:nth-child(even) * {
	background-color: #fff !important;
}
.editor-block table th {
	color: var(--muted);
	font-weight: 400;
	text-align: center !important;
	border: 0;
}

.editor-block table td {
	color: var(--ink);
	border: 0;
	text-align: center !important;
}

@media (max-width: 1200px) {
	.editor-block ol {
		margin-block-start: 0.75em;
		margin-block-end: 0.75em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 30px;
		unicode-bidi: isolate;
	}

	.editor-block ul {
		margin-block-start: 0.75em;
		margin-block-end: 0.75em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 30px;
		unicode-bidi: isolate;
	}
}

@media (max-width: 992px) {
	.editor-block .wrap {
		max-width: 600px;
	}
	.custom-col-12 {
		flex: 0 0 100%;
		max-width: 100%;
		padding-right: 15px;
		padding-left: 15px;
	}
	.editor-block img {
		display: block;
		max-width: 600px;
		width: 100%;
		margin: 0 auto;
		height: auto;
	}
	.editor-block video {
		max-height: 450px;
	}
	.custom-row.mobile-swap {
		flex-direction: column-reverse;
	}
	.editor-block .custom-row + .custom-row{
		margin-top: 40px;
	}
}
@media (max-width: 768px) {
	.editor-block ol {
		margin-block-start: 0.5em;
		margin-block-end: 0.5em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 20px;
		unicode-bidi: isolate;
		word-wrap: break-word;
	}

	.editor-block ul {
		margin-block-start: 0.5em;
		margin-block-end: 0.5em;
		margin-inline-start: 0px;
		margin-inline-end: 0px;
		padding-inline-start: 20px;
		unicode-bidi: isolate;
		word-wrap: break-word;
	}

	.custom-col-12 {
		padding-right: 20px;
		padding-left: 20px;
	}
	.editor-block {
		padding: 40px 0px;
	}
	main .editor-block:not(:has(~ .editor-block)) {
		padding: 40px 0;
	}

	.editor-block h2:not(.global-header) {
		font-size: 40px;
		line-height: 52px;
	}

	.editor-block h3:not(.global-header) {
		font-size: 32px;
	}
	.editor-block h4:not(.global-header) {
		font-size: 28px;
	}
	.editor-block h5:not(.global-header) {
		font-size: 26px;
	}
	.editor-block h6:not(.global-header) {
		font-size: 24px;
	}
	.editor-block .wrap > .heading {
		margin-bottom: 24px;
	}
}

@media (max-width: 576px) {
	.editor-block h2:not(.global-header) {
		font-size: 30px;
		line-height: 38px;
	}
	.editor-block h3:not(.global-header) {
		font-size: 28px;
		line-height: 36px;
	}
	.editor-block h4:not(.global-header) {
		font-size: 26px;
		line-height: 34px;
	}
	.editor-block h5:not(.global-header) {
		font-size: 24px;
		line-height: 32px;
	}
	.editor-block h6:not(.global-header) {
		font-size: 22px;
		line-height: 30px;
	}
}


.editor-block .custom-row {
	margin-right: -40px;
	margin-left: -40px;
}

.editor-block .custom-col-md-6 {
	padding-right: 40px;
	padding-left: 40px;
}

@media (max-width: 992px) {
	.editor-block .custom-row {
		margin-right: -15px;
		margin-left: -15px;
	}

	.editor-block .custom-col-md-6 {
		padding-right: 15px;
		padding-left: 15px;
	}
}

@media (min-width: 993px) {
	.editor-block .custom-col-md-6 > h3:first-child,
	.editor-block .custom-col-md-6 > h2:first-child,
	.editor-block .custom-col-md-6 > h4:first-child,
	.editor-block .custom-col-md-6 > h5:first-child,
	.editor-block .custom-col-md-6 > h6:first-child {
		margin-top: 0;
	}
}
/* === POWIĘKSZONE GAPY === */
/* Jeśli się nie spodoba — usuń wszystko poniżej tego komentarza */

.editor-block .custom-row {
	margin-right: 0;
	margin-left: 0;
	column-gap: 120px;
	row-gap: 0;
}

.editor-block .custom-col-md-6 {
	flex: 0 0 calc(50% - 60px);
	max-width: calc(50% - 60px);
	padding-right: 0;
	padding-left: 0;
}

@media (max-width: 1280px) {
	.editor-block .custom-row {
		column-gap: 60px;
	}

	.editor-block .custom-col-md-6 {
		flex: 0 0 calc(50% - 30px);
		max-width: calc(50% - 30px);
	}
}

@media (max-width: 992px) {
	.editor-block .custom-row {
		column-gap: 0;
		margin-right: -15px;
		margin-left: -15px;
	}

	.editor-block .custom-col-md-6 {
		flex: 0 0 100%;
		max-width: 100%;
		padding-right: 15px;
		padding-left: 15px;
	}
}



/* ============================= */
/* FRONTPAGE — WYRÓŻNIENIE SEKCJI */
/* ============================= */

/* === ZDJĘCIA Z EFEKTEM 3D === */

.editor-block.frontpage .custom-col-md-6 p:has(> a > img),
.editor-block.frontpage .custom-col-md-6 p:has(> img) {
	position: relative;
	perspective: 1200px;
}

.editor-block.frontpage .custom-col-md-6 a:has(img),
.editor-block.frontpage .custom-col-md-6 img {
	display: block;
	border-radius: 24px;
	overflow: hidden;
	transform-style: preserve-3d;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);

}

/* Naprzemienne pochylenie — pierwsza, trzecia kolumna ze zdjęciem pochyla się w prawo */
.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:first-child img {
	transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}

.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:last-child img {
	transform: perspective(1200px) rotateY(6deg) rotateX(2deg);
}

/* Wariant gdy obrazek jest po prawej stronie */
.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:first-child img {
	transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}

.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:last-child img {
	transform: perspective(1200px) rotateY(6deg) rotateX(2deg);
}

/* Hover — wyrównanie do frontu i mocniejszy cień */
.editor-block.frontpage .custom-col-md-6 a:hover img,
.editor-block.frontpage .custom-col-md-6 img:hover {
	transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-6px);

}

/* Dekoracyjny element za zdjęciem — "podkładka" */
.editor-block.frontpage .custom-col-md-6 p:has(img)::before {
	content: '';
	position: absolute;
	width: 80%;
	height: 80%;
	top: 12%;
	background: var(--brand);
	border-radius: 24px;
	opacity: 0.18;
	opacity: .5;
	z-index: -1;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:first-child p:has(img)::before {
	left: -24px;
	transform: rotate(-3deg);
}

.editor-block.frontpage .custom-row:nth-child(odd) .custom-col-md-6:last-child p:has(img)::before {
	right: -24px;
	transform: rotate(3deg);
}

.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:first-child p:has(img)::before {
	left: -24px;
	transform: rotate(-3deg);
}

.editor-block.frontpage .custom-row:nth-child(even) .custom-col-md-6:last-child p:has(img)::before {
	right: -24px;
	transform: rotate(3deg);
}

/* === LINIA POD NAGŁÓWKIEM === */

.editor-block.frontpage .custom-col-md-6 h2:first-child,
.editor-block.frontpage .custom-col-md-6 h3:first-child,
.editor-block.frontpage .custom-col-md-6 h4:first-child {
	position: relative;
	padding-bottom: 20px;
	margin-bottom: 20px;
}

.editor-block.frontpage .custom-col-md-6 h2:first-child::after,
.editor-block.frontpage .custom-col-md-6 h3:first-child::after,
.editor-block.frontpage .custom-col-md-6 h4:first-child::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 64px;
	height: 4px;
	background: var(--brand);
	border-radius: 4px;
}

/* === DROBNE POPRAWKI TYPOGRAFICZNE === */

.editor-block.frontpage .custom-col-md-6 p {
	font-size: 17px;
	line-height: 28px;
	color: var(--muted);
}

.editor-block.frontpage .custom-col-md-6 p strong,
.editor-block.frontpage .custom-col-md-6 p b {
	color: var(--ink);
	font-weight: 700;
}

.editor-block.frontpage .custom-row + .custom-row {
	margin-top: 120px;
}

/* === RESPONSYWNOŚĆ === */

@media (max-width: 1280px) {
	.editor-block.frontpage .custom-col-md-6 p:has(img)::before {
		width: 75%;
		height: 75%;
	}
}

@media (max-width: 992px) {
	.editor-block.frontpage .custom-row + .custom-row {
		margin-top: 60px;
	}

	/* Wyłączenie 3D na mobile — wszystkie obrazki płaskie */
	.editor-block.frontpage .custom-col-md-6 img,
	.editor-block.frontpage .custom-row .custom-col-md-6:first-child img,
	.editor-block.frontpage .custom-row .custom-col-md-6:last-child img {
		transform: none;
	}

	.editor-block.frontpage .custom-col-md-6 p:has(img)::before {
		width: 90%;
		height: 90%;
		left: 5% !important;
		right: auto !important;
		top: 8%;
		transform: rotate(-2deg);
	}

	.editor-block.frontpage .custom-col-md-6 h2:first-child,
	.editor-block.frontpage .custom-col-md-6 h3:first-child,
	.editor-block.frontpage .custom-col-md-6 h4:first-child {
		padding-bottom: 16px;
		margin-top: 24px;
	}

	.editor-block.frontpage .custom-col-md-6 h2:first-child::after,
	.editor-block.frontpage .custom-col-md-6 h3:first-child::after,
	.editor-block.frontpage .custom-col-md-6 h4:first-child::after {
		width: 56px;
		height: 3px;
	}
}

@media (max-width: 768px) {
	.editor-block.frontpage .custom-col-md-6 p {
		font-size: 16px;
		line-height: 26px;
	}
}
/* === TABELE W TREŚCI (cenniki itp.) === */
/* Wrapper .table-wrap = przewijanie w poziomie na wąskich ekranach; padding na komórkach
   (reguła `table tr{padding}` wyżej nic nie robi — padding działa tylko na th/td). */
.editor-block .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:16px 0 36px}
.editor-block .table-wrap table{width:100%;max-width:800px;min-width:520px;border-collapse:collapse}
.editor-block table th,
.editor-block table td{padding:12px 10px;line-height:1.4;font-size:16px}
.editor-block table th{font-family:var(--display);font-weight:600;text-transform:uppercase;letter-spacing:.5px;font-size:13px}
.editor-block.cennik-dostaw table td:last-child{font-weight:700;white-space:nowrap}
.editor-block .table-wrap + h3,
.editor-block .table-wrap + h2{margin-top:8px}
.editor-block h2:not(.global-header) + p,
.editor-block h3:not(.global-header) + p{margin-top:8px}
.editor-block p.small{font-size:14px;color:var(--muted)}
.editor-block ul.list-lead li{margin-bottom:10px}
.editor-block ul.list-lead li strong{color:var(--ink)}
@media (max-width:768px){
  .editor-block table th,.editor-block table td{padding:10px 8px;font-size:15px}
}

/* === DOKUMENTY (Edytor z klasą .dokument lub .cennik-dostaw: cennik, polityka cookies…) === */
.editor-block:is(.cennik-dostaw,.dokument) .wrap > .heading{font-size:clamp(34px,5vw,56px);font-weight:700;text-transform:uppercase;letter-spacing:.5px;line-height:1;margin-bottom:36px}
.editor-block:is(.cennik-dostaw,.dokument) .editor-block__before-heading{font-family:var(--display);font-weight:600;font-size:13px;letter-spacing:.8px}
.editor-block:is(.cennik-dostaw,.dokument) p{font-size:16px;line-height:1.7;color:var(--ink-2)}
.editor-block:is(.cennik-dostaw,.dokument) h2:not(.global-header){font-family:var(--display);font-weight:700;text-transform:uppercase;letter-spacing:.5px;font-size:34px;line-height:1.1;margin:56px 0 18px}
.editor-block:is(.cennik-dostaw,.dokument) h3:not(.global-header){font-family:var(--body);font-weight:600;font-size:17px;line-height:1.45;color:var(--ink-2);margin:26px 0 10px}
.editor-block:is(.cennik-dostaw,.dokument) .table-wrap{margin:0 0 8px}
.editor-block:is(.cennik-dostaw,.dokument) .table-wrap table{max-width:none;min-width:480px}
.editor-block:is(.cennik-dostaw,.dokument) table:not(.doc-table) th,
.editor-block:is(.cennik-dostaw,.dokument) table:not(.doc-table) td{text-align:left!important;padding:12px 14px}
.editor-block:is(.cennik-dostaw,.dokument) table:not(.doc-table) thead tr *{background:var(--ink)!important;color:#fff!important}
.editor-block.cennik-dostaw table th:last-child,
.editor-block.cennik-dostaw table td:last-child{text-align:right!important}
.editor-block.cennik-dostaw table td:last-child{color:var(--brand);font-weight:700}
.editor-block.dokument table:not(.doc-table){min-width:640px}
.editor-block:is(.cennik-dostaw,.dokument) table:not(.doc-table) tbody tr{border-bottom:1px solid var(--line)}
.editor-block:is(.cennik-dostaw,.dokument) table:not(.doc-table) tbody tr:nth-child(odd){background:var(--paper)}
.editor-block:is(.cennik-dostaw,.dokument) ul.list-lead{padding-inline-start:20px}
.editor-block:is(.cennik-dostaw,.dokument) ul.list-lead li{line-height:1.65;color:var(--ink-2)}
@media (max-width:768px){
  .editor-block:is(.cennik-dostaw,.dokument) h2:not(.global-header){font-size:28px;line-height:1.1;margin-top:40px}
  .editor-block:is(.cennik-dostaw,.dokument) h3:not(.global-header){font-size:16px}
  .editor-block:is(.cennik-dostaw,.dokument) table:not(.doc-table) th,.editor-block:is(.cennik-dostaw,.dokument) table:not(.doc-table) td{padding:10px 10px}
}

/* === TABELE NA MOBILE: układ „kartowy” (JS w main.js nadaje .table--stack + data-label) === */
@media (max-width:640px){
  .editor-block .table-wrap{overflow:visible;margin:0 0 8px}
  .editor-block .table-wrap table.table--stack{min-width:0;max-width:none}
  .editor-block table.table--stack:not(.doc-table),
  .editor-block table.table--stack:not(.doc-table) tbody,
  .editor-block table.table--stack:not(.doc-table) tr,
  .editor-block table.table--stack:not(.doc-table) td{display:block;width:100%}
  .editor-block table.table--stack:not(.doc-table) thead{display:none}
  .editor-block table.table--stack:not(.doc-table) tbody tr{border:1px solid var(--line);border-radius:var(--radius);padding:4px 14px;margin:0 0 10px;background:#fff!important}
  .editor-block table.table--stack:not(.doc-table) td{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:9px 0!important;text-align:left!important;border-bottom:1px solid var(--line);white-space:normal}
  .editor-block table.table--stack:not(.doc-table) td:last-child{border-bottom:0}
  .editor-block table.table--stack:not(.doc-table) td::before{content:attr(data-label);flex:0 0 auto;font-family:var(--display);font-weight:600;font-size:12px;letter-spacing:.6px;text-transform:uppercase;color:var(--muted)}
  .editor-block table.table--stack:not(.doc-table) td > *{text-align:right}
  .editor-block table.table--stack:not(.doc-table) td{text-align:right!important}
  .editor-block.cennik-dostaw table.table--stack td:last-child{color:var(--brand);font-weight:700;font-size:17px}
  /* cennik: pierwszy wiersz karty (gabaryt / waga) jako tytuł */
  .editor-block:is(.cennik-dostaw,.dokument) table.table--stack:not(.doc-table) td:first-child{font-family:var(--display);font-weight:700;text-transform:uppercase;letter-spacing:.5px;font-size:16px;color:var(--ink)}
}
@media (max-width:768px){
  /* dokument: tekst do lewej także na mobile (globalna reguła centruje .editor-block) */
  .editor-block:is(.cennik-dostaw,.dokument) .custom-col-12,
  .editor-block:is(.cennik-dostaw,.dokument) p,
  .editor-block:is(.cennik-dostaw,.dokument) h2:not(.global-header),
  .editor-block:is(.cennik-dostaw,.dokument) h3:not(.global-header),
  .editor-block:is(.cennik-dostaw,.dokument) ul{text-align:left}
}

/* =====================================================================
   DOKUMENTY PRAWNE (regulamin, polityka prywatności, polityka zwrotów)
   Układ jak w PDF-ach Prokonsumencki.pl: numer w osobnej kolumnie z wysuniętym wcięciem,
   sekcje „1. TYTUŁ”, spis treści, tabele z obramowaniem.

   TREŚĆ = HTML w polu Edytora. Sekcja z klasą „dokument” ma tylko zakładkę „Tekstowy”
   (functions.php, acf/prepare_field). Numery są TEKSTEM, nie licznikiem <ol> — po wklejeniu
   z Worda przeglądarka liczyła każdy poziom od 1. Dopisując punkt, przenumeruj kolejne
   (tak jak prawnicy w DOCX). Jeden akapit = jedna linia: wpautop robi <br> z nowej linii.

   Ściąga:
     Sekcja 5.       <h2 class="doc-h" id="pkt-5"><span class="doc-num">5.</span> TYTUŁ</h2>
                     + w spisie: <li><a href="#pkt-5"><span class="doc-num">5.</span> TYTUŁ</a></li>
     Punkt 5.1.      <p class="doc-pkt doc-pkt--1"><span class="doc-num">5.1.</span> Treść</p>
     5.1.1. / 5.1.1.1. / 5.1.1.1.1.  → doc-pkt--2 / doc-pkt--3 / doc-pkt--4
     Akapit bez numeru pod punktem   <p class="doc-txt doc-pkt--1">…</p>  (poziom jak punkt wyżej)
     Punktor         <p class="doc-pkt doc-pkt--bullet">…</p>  (kropka z CSS)
     Tabela          <div class="table-wrap"><table class="doc-table"><thead>…</thead><tbody>…</tbody></table></div>
     Pobierz PDF     <div class="doc-download"><a class="doc-download__link" href="/…/plik.pdf" download>Pobierz … (PDF)</a></div>
   ===================================================================== */
.editor-block.dokument{
  --doc-fs:15.5px;
  --doc-lh:1.7;
  --doc-c:var(--ink-2);
  --doc-line:#d9d2c8;                 /* obramowania tabel — ciemniej niż --line, jak w PDF */
  /* szerokość kolumny numeru dla kolejnych poziomów (1.1. / 1.4.1. / 2.1.1.1. / 4.1.2.1.1.).
     Liczone od rozmiaru TEKSTU, nie w em — inaczej nagłówek sekcji (większy font) odsuwał
     tytuł dalej niż tekst punktów, a w PDF oba stoją w jednej linii */
  --ind-1:calc(var(--doc-fs) * 3.1); --ind-2:calc(var(--doc-fs) * 4.1);
  --ind-3:calc(var(--doc-fs) * 5.1); --ind-4:calc(var(--doc-fs) * 6.3);
}
/* treść dokumentu na szerokość strony A4 — wiersz ~100 znaków jak w PDF */
.editor-block.dokument .custom-col-12{max-width:920px;margin-inline:auto}
.editor-block.dokument .wrap > .heading{max-width:920px;margin-inline:auto;text-align:center;
  font-size:clamp(28px,3.6vw,42px);line-height:1.08;margin-bottom:34px}

/* ---------- akapity i numeracja ---------- */
.editor-block.dokument :is(.doc-pkt,.doc-txt){
  position:relative;margin:0 0 10px;font-size:var(--doc-fs);line-height:var(--doc-lh);color:var(--doc-c);
  text-align:justify;hyphens:auto;-webkit-hyphens:auto;
}
.editor-block.dokument .doc-pkt--1{padding-left:var(--ind-1)}
.editor-block.dokument .doc-pkt--2{padding-left:var(--ind-2)}
.editor-block.dokument .doc-pkt--3{padding-left:var(--ind-3)}
.editor-block.dokument .doc-pkt--4{padding-left:var(--ind-4)}
.editor-block.dokument .doc-pkt > .doc-num{
  position:absolute;left:0;top:0;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;
}
/* punktor (lista nienumerowana w treści) — węższa kolumna niż numery.
   Kropka rysowana na AKAPICIE (::before), nie w pustym <span>: edytor WP (TinyMCE) przy każdym
   „Zaktualizuj” wycina puste spany — tak 23.09 zniknęły kropki na polityce zwrotów */
.editor-block.dokument .doc-pkt--bullet:not([class*="doc-pkt--1"]):not([class*="doc-pkt--2"]){padding-left:1.4em}
.editor-block.dokument :is(.doc-pkt--bullet,.doc-cell-p--bullet)::before{
  content:"";position:absolute;left:0;width:6px;height:6px;border-radius:50%;background:var(--brand);
  top:calc(var(--doc-fs) * var(--doc-lh) / 2 - 3px);          /* środek pierwszego wiersza */
}
.editor-block.dokument .doc-cell-p--bullet{position:relative;padding-left:1.2em}
.editor-block.dokument .doc-cell-p--bullet::before{top:calc(14px * 1.55 / 2 - 3px)}

/* ---------- nagłówki sekcji „1. POSTANOWIENIA OGÓLNE” ---------- */
.editor-block.dokument h2.doc-h{
  position:relative;padding-left:var(--ind-1);margin:44px 0 16px;
  font-family:var(--display);font-weight:700;text-transform:uppercase;letter-spacing:.4px;
  font-size:24px;line-height:1.2;color:var(--ink);text-align:left;
  scroll-margin-top:120px;               /* kotwice ze spisu treści nie chowają się pod headerem */
}
.editor-block.dokument h2.doc-h > .doc-num{position:absolute;left:0;top:0;font-size:inherit}
/* nagłówek bez numeru (np. informacja o odstąpieniu od umowy) */
.editor-block.dokument h2.doc-h--plain{padding-left:0;margin-top:0}

/* ---------- spis treści ---------- */
.editor-block.dokument .doc-toc{
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px 24px 18px;margin:0 0 30px;
}
.editor-block.dokument .doc-toc__title{
  font-family:var(--display);font-weight:700;letter-spacing:.8px;font-size:14px;color:var(--ink);margin:0 0 10px;
}
.editor-block.dokument .doc-toc__title strong{font-weight:inherit}
.editor-block.dokument ol.doc-toc__list{list-style:none;margin:0;padding:0}
.editor-block.dokument .doc-toc__list li{margin:0;padding:0;list-style:none}
.editor-block.dokument .doc-toc__list li::before{content:none;display:none}
.editor-block.dokument .doc-toc__list a{
  display:flex;gap:10px;padding:4px 0;font-size:13.5px;line-height:1.45;letter-spacing:.2px;
  color:var(--ink-2);text-decoration:none;transition:color .15s;
}
.editor-block.dokument .doc-toc__list a:hover{color:var(--brand)}
.editor-block.dokument .doc-toc__list .doc-num{flex:0 0 2em;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}

/* ---------- wstęp (wyśrodkowany, kursywa — jak w PDF) ---------- */
.editor-block.dokument p.doc-intro{
  max-width:780px;margin:0 auto 34px;text-align:center;font-size:14.5px;line-height:1.65;color:var(--ink-2);
}

/* ---------- linki w dokumencie ---------- */
.editor-block.dokument :is(.doc-pkt,.doc-txt,.doc-intro,.doc-table,.doc-form) a{
  color:var(--brand);text-decoration:underline;text-underline-offset:2px;word-break:break-word;
}
.editor-block.dokument :is(.doc-pkt,.doc-txt,.doc-intro,.doc-table,.doc-form) a:hover{color:var(--brand-600)}

/* ---------- pobieranie PDF (bloczek nad spisem treści i nad wzorem formularza) ----------
   Ikona w CSS, nie <svg> w treści — edytor wizualny WP wycina SVG przy zapisie strony */
.editor-block.dokument .doc-download{
  display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px 28px;margin:0 0 14px;text-align:right;
}
.editor-block.dokument .doc-download__link{
  display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;line-height:1.35;
  color:var(--ink);text-decoration:none;transition:color .15s;
}
.editor-block.dokument .doc-download__link::before{
  content:"";flex:0 0 20px;width:20px;height:20px;background:var(--brand);
  --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpath d='M12 17v-6'/%3E%3Cpath d='M9.5 14.5 12 17l2.5-2.5'/%3E%3C/svg%3E");
  -webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat;
}
.editor-block.dokument .doc-download__link:hover{color:var(--brand);text-decoration:underline;text-underline-offset:3px}
.editor-block.dokument .doc-download__link:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
/* nad ramką wzoru formularza (pkt 13) — bliżej ramki */
.editor-block.dokument .doc-download + .doc-form{margin-top:0}
/* polityka zwrotów: bloczek nad nagłówkiem bez numeru (ten ma margin-top:0) */
.editor-block.dokument .doc-download + h2.doc-h--plain{margin-top:12px}

/* ---------- tabele (jak w PDF: pełne obramowanie, jasny nagłówek, bez zebry) ---------- */
.editor-block.dokument .table-wrap{margin:14px 0 22px var(--ind-1)}
.editor-block.dokument table.doc-table{
  width:100%;min-width:0;max-width:none;border-collapse:collapse;table-layout:fixed;background:#fff;
}
.editor-block.dokument .doc-table :is(th,td){
  border:1px solid var(--doc-line);padding:12px 14px;vertical-align:top;text-align:left;
  font-size:14px;line-height:1.55;color:var(--doc-c);background:#fff;
}
.editor-block.dokument .doc-table thead th{
  background:var(--paper);color:var(--ink);font-weight:700;text-align:center;vertical-align:middle;
}
/* ogólne reguły tabel Edytora centrują komórki z !important (.editor-block table td/th) —
   w dokumencie treść komórek do lewej, tylko nagłówek kolumn wyśrodkowany, jak w PDF */
.editor-block.dokument .doc-table :is(th,td){text-align:left!important}
.editor-block.dokument .doc-table thead th{text-align:center!important}
/* ogólne reguły tabel Edytora dają <th> font Saira wersalikami 13px, a wierszom zebrę —
   w dokumencie nagłówek ma być zwykłym pogrubionym tekstem, jak w PDF */
.editor-block.dokument .doc-table th{font-family:var(--body);text-transform:none;letter-spacing:0;font-size:14px}
.editor-block.dokument .doc-table tr{background:none}
.editor-block.dokument .doc-table .doc-cell--shaded{background:var(--paper)}
.editor-block.dokument .doc-table th.doc-cell--shaded{color:var(--ink);font-weight:700}
/* tabela „etykieta scalona na N wierszy | treść” — w PDF etykieta ma ~1/3 szerokości */
.editor-block.dokument .doc-table th[scope="rowgroup"]{width:34%}
.editor-block.dokument .doc-cell-p{margin:0 0 8px;font-size:inherit;line-height:inherit;color:inherit;text-align:left}
.editor-block.dokument .doc-cell-p:last-child{margin-bottom:0}
.editor-block.dokument .doc-cell-p--num{position:relative;padding-left:1.7em}
.editor-block.dokument .doc-cell-p--num > .doc-num{position:absolute;left:0;top:0;font-weight:600}

/* ---------- wzór formularza odstąpienia ---------- */
.editor-block.dokument .doc-form{
  margin:26px 0 0;padding:26px 28px;border:1px solid var(--doc-line);border-radius:var(--radius);background:#fff;
}
.editor-block.dokument .doc-form p{font-size:var(--doc-fs);line-height:var(--doc-lh);color:var(--doc-c);margin:0 0 12px}
.editor-block.dokument .doc-form .doc-form__title{text-align:center;font-weight:700;color:var(--ink);font-size:17px;margin:0 0 4px}
.editor-block.dokument .doc-form .doc-form__sub{text-align:center;font-size:13.5px;font-style:italic;margin:0 0 22px}
.editor-block.dokument .doc-form .doc-form__line{position:relative;padding-left:1.6em}
.editor-block.dokument .doc-form .doc-form__line > .doc-num{position:absolute;left:0;top:0}
.editor-block.dokument .doc-form .doc-form__addr{text-align:center;margin:-4px 0 18px}
.editor-block.dokument .doc-form .doc-form__note{font-size:13.5px;margin:18px 0 0}

/* ---------- mobile ---------- */
@media (max-width:768px){
  .editor-block.dokument{--doc-fs:15px;--ind-1:calc(var(--doc-fs) * 2.8);--ind-2:calc(var(--doc-fs) * 3.6);
    --ind-3:calc(var(--doc-fs) * 4.5);--ind-4:calc(var(--doc-fs) * 5.5)}
  .editor-block.dokument :is(.doc-pkt,.doc-txt){text-align:left}
  .editor-block.dokument h2.doc-h{font-size:20px;margin-top:34px}
  .editor-block.dokument .wrap > .heading{text-align:center}
  .editor-block.dokument p.doc-intro{text-align:center}
  .editor-block.dokument .doc-toc{padding:16px 16px 14px}
  .editor-block.dokument .table-wrap{margin-left:0}
}
@media (max-width:640px){
  /* tabele jako karty: każda komórka pod poprzednią, etykieta NAD treścią
     (data-label z <thead> dokleja main.js). Tekst do lewej — komórki to akapity. */
  .editor-block.dokument .table-wrap{overflow:visible}
  .editor-block.dokument table.doc-table,
  .editor-block.dokument table.doc-table :is(thead,tbody,tr,th,td){display:block;width:100%}
  .editor-block.dokument table.doc-table thead{display:none}
  .editor-block.dokument table.doc-table tbody tr{border:1px solid var(--doc-line);border-radius:var(--radius);margin:0 0 12px;overflow:hidden}
  .editor-block.dokument .doc-table :is(th,td){border:0;border-bottom:1px solid var(--doc-line);padding:12px 14px}
  .editor-block.dokument .doc-table tr > :last-child{border-bottom:0}
  .editor-block.dokument .doc-table td[data-label]::before{
    content:attr(data-label);display:block;margin:0 0 5px;
    font-family:var(--display);font-weight:700;font-size:12px;letter-spacing:.6px;text-transform:uppercase;color:var(--muted);
  }
  /* pierwsza komórka karty (cel przetwarzania) jako tytuł karty */
  .editor-block.dokument .doc-table.table--stack td:first-child{background:var(--paper);color:var(--ink);font-weight:600}
}

/* =====================================================================
   DRUK / „Zapisz jako PDF” dokumentów prawnych.
   PDF-y do pobrania to PLIKI w Mediach (decyzja usera 23.09). Po zmianie treści: otworzyć stronę
   → Drukuj → Zapisz jako PDF → wgrać → podmienić href w linijce .doc-download.
   Na wydruku zostaje samo logo + dokument (bez menu, okruszków, stopki, banera cookies),
   wymiary jak w PDF-ach z 23.09. Numeracja „Strona X z Y” = @page margin boxes (Chrome 131+;
   Safari/Firefox drukują bez numeracji).
   ===================================================================== */
@media print{
  @page{
    size:A4;margin:15mm 16mm 18mm;
    @bottom-right{content:"Strona " counter(page) " z " counter(pages);font-family:Inter,Arial,sans-serif;font-size:7.5pt;color:#76726e}
    @top-center{content:""}   /* pusty margines górny: Chrome nie dokleja wtedy daty i tytułu karty */
  }
  body:has(.editor-block.dokument){background:#fff}
  body:has(.editor-block.dokument) :is(.skip-link,.topbar,.searchmodal,.backdrop,.footer,.toast,.cart-drawer,.sc-widget,
    .mainnav,.header__actions,.burger,main > :not(.editor-block.dokument)){display:none!important}
  body:has(.editor-block.dokument) .header{position:static;border:0;box-shadow:none;background:none;margin:0 0 4mm}
  body:has(.editor-block.dokument) .header__inner{height:auto;justify-content:center;padding:0}
  body:has(.editor-block.dokument) .header .logo__img{height:15mm;width:auto;border-radius:0}

  .editor-block.dokument{
    --doc-fs:9.4pt;--doc-lh:1.5;
    --ind-1:calc(var(--doc-fs) * 3.1);--ind-2:calc(var(--doc-fs) * 4.1);
    --ind-3:calc(var(--doc-fs) * 5.1);--ind-4:calc(var(--doc-fs) * 6.3);
    padding:0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;
  }
  .editor-block.dokument .wrap{max-width:none;padding:0;margin:0}
  .editor-block.dokument .custom-row{margin:0}
  .editor-block.dokument .custom-col-12{max-width:none;padding:0}
  .editor-block.dokument .wrap > .heading{font-size:19pt;line-height:1.08;margin:0 0 7mm}
  .editor-block.dokument .doc-download{display:none}
  .editor-block.dokument :is(.doc-pkt,.doc-txt){text-align:justify;margin:0 0 1.9mm;orphans:3;widows:3}
  .editor-block.dokument h2.doc-h{font-size:12.5pt;margin:6mm 0 2.6mm;break-after:avoid}
  .editor-block.dokument .doc-toc{padding:4mm 5mm 3.5mm;margin:0 0 6mm;break-inside:avoid}
  .editor-block.dokument .doc-toc__title{font-size:8.8pt;margin:0 0 1.8mm}
  .editor-block.dokument .doc-toc__list a{font-size:8.6pt;line-height:1.5;padding:0}
  .editor-block.dokument p.doc-intro{font-size:8.8pt;line-height:1.55;margin:0 auto 6mm}
  .editor-block.dokument .table-wrap{margin:2.5mm 0 4mm var(--ind-1);overflow:visible}
  .editor-block.dokument .doc-table :is(th,td){font-size:8.4pt;line-height:1.45;padding:2.2mm 2.6mm}
  .editor-block.dokument .doc-table tr{break-inside:avoid}
  .editor-block.dokument .doc-form{padding:5mm 6mm;margin-top:4mm;break-inside:avoid}
  .editor-block.dokument .doc-form p{font-size:var(--doc-fs)}
  .editor-block.dokument .doc-form .doc-form__title{font-size:10.5pt}
  .editor-block.dokument .doc-form .doc-form__sub{font-size:8.6pt}
  .editor-block.dokument .doc-form .doc-form__note{font-size:8.4pt;margin-top:3mm}
}
