/* Schematy budowy ksiąg w artykułach ([schemat id="..."], includes/schemat.php). */

.bwr-sch {
	--bwr-black: #111111;
	--bwr-yellow: #f8cf00;
	--bwr-yellow-soft: #fff6c7;
	--bwr-text: #444444;
	--bwr-muted: #777777;
	--bwr-line: #e6e6e6;
	--bwr-bg: #f6f6f4;
	margin: 32px 0 36px;
	padding: 22px 20px 18px;
	border-radius: 16px;
	background: var(--bwr-bg);
	font-family: "Poppins", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--bwr-text);
}

.bwr-sch p {
	margin: 0;
}

.bwr-sch__head {
	display: block;
	margin: 0 0 18px;
}

.bwr-sch__kicker {
	display: inline-block;
	margin: 0 0 8px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--bwr-yellow);
	color: var(--bwr-black);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.bwr-sch__title {
	display: block;
	font-size: 19px;
	line-height: 1.3;
	color: var(--bwr-black);
}

.bwr-sch__intro {
	display: block;
	margin-top: 6px;
	color: var(--bwr-text);
}

.bwr-sch__ref {
	display: inline-block;
	padding: 0 7px;
	border-radius: 6px;
	background: #ffffff;
	border: 1px solid var(--bwr-line);
	font-size: 13px;
	font-weight: 600;
	color: var(--bwr-black);
	white-space: nowrap;
}

.bwr-sch__desc {
	display: block;
	margin-top: 4px;
}

.bwr-sch__note {
	margin-top: 8px !important;
	font-size: 14px;
	font-style: italic;
	color: var(--bwr-muted);
}

.bwr-sch__foot {
	margin-top: 16px !important;
	padding-top: 12px;
	border-top: 1px solid var(--bwr-line);
	font-size: 13px;
	color: var(--bwr-muted);
}

.bwr-sch__c0 { background: var(--bwr-black); color: #ffffff; }
.bwr-sch__c1 { background: var(--bwr-yellow); color: var(--bwr-black); }
.bwr-sch__c2 { background: #8a8a84; color: #ffffff; }
.bwr-sch__c3 { background: var(--bwr-yellow-soft); color: var(--bwr-black); border: 1px solid #ead98a; }

/* ---- oś czasu ---- */

.bwr-sch__os {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bwr-sch__os::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 7px;
	width: 2px;
	background: var(--bwr-black);
}

.bwr-sch__os-item {
	position: relative;
	margin: 0 0 16px;
	padding-left: 30px;
}

.bwr-sch__os-item:last-child {
	margin-bottom: 0;
}

.bwr-sch__os-item::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 0;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--bwr-yellow);
	border: 2px solid var(--bwr-black);
	box-sizing: border-box;
}

.bwr-sch__os-item.bwr-sch--hipoteza::before {
	background: #ffffff;
	border-style: dashed;
}

.bwr-sch__os-when {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--bwr-muted);
}

.bwr-sch__os-title {
	display: block;
	color: var(--bwr-black);
}

.bwr-sch__os-text {
	display: block;
}

.bwr-sch__os-meta {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	color: var(--bwr-muted);
}

.bwr-sch__tag {
	display: inline-block;
	margin-left: 4px;
	padding: 0 7px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid var(--bwr-line);
	font-size: 12px;
	color: var(--bwr-text);
}

/* ---- pasek części księgi ---- */

.bwr-sch__bar {
	display: flex;
	gap: 3px;
	margin: 0 0 18px;
	height: 38px;
}

.bwr-sch__bar-seg {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
}

.bwr-sch__parts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bwr-sch__parts li {
	display: flex;
	gap: 12px;
	margin: 0 0 12px;
}

.bwr-sch__num {
	flex: 0 0 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	box-sizing: border-box;
}

.bwr-sch__parts strong {
	color: var(--bwr-black);
}

.bwr-sch__line {
	margin-top: 18px;
	padding: 16px;
	border-radius: 12px;
	background: #ffffff;
}

.bwr-sch__line-name {
	margin-bottom: 10px !important;
	font-weight: 700;
	color: var(--bwr-black);
}

.bwr-sch__line ol {
	margin: 0;
	padding: 0 0 0 20px;
}

.bwr-sch__line li {
	margin: 0 0 6px;
}

/* ---- kroki (schodki) ---- */

.bwr-sch__steps {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bwr-sch__steps li {
	margin: 0 0 10px calc(min(var(--bwr-sch-i), 7) * 12px);
}

.bwr-sch__step {
	padding: 12px 14px;
	border-radius: 12px;
	background: #ffffff;
	border: 1px solid var(--bwr-line);
}

.bwr-sch__step-head strong {
	color: var(--bwr-black);
}

/* ---- tabela porównania ---- */

.bwr-sch__table-wrap {
	overflow-x: auto;
}

.bwr-sch__table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0 6px;
	font-size: 14px;
}

.bwr-sch__table th,
.bwr-sch__table td {
	padding: 10px 12px;
	border: 0;
	background: #ffffff;
	text-align: left;
	vertical-align: top;
}

.bwr-sch__table thead th {
	background: var(--bwr-black);
	color: #ffffff;
	font-weight: 700;
}

.bwr-sch__table thead td {
	background: transparent;
}

.bwr-sch__table tbody th {
	font-weight: 700;
	color: var(--bwr-black);
	background: var(--bwr-yellow-soft);
}

.bwr-sch__table tr > :first-child {
	border-radius: 10px 0 0 10px;
}

.bwr-sch__table tr > :last-child {
	border-radius: 0 10px 10px 0;
}

@media (max-width: 640px) {
	.bwr-sch__table,
	.bwr-sch__table tbody,
	.bwr-sch__table tr,
	.bwr-sch__table th,
	.bwr-sch__table td {
		display: block;
		width: auto;
	}

	.bwr-sch__table thead {
		display: none;
	}

	.bwr-sch__table tr {
		margin: 0 0 12px;
		border-radius: 12px;
		overflow: hidden;
		background: #ffffff;
	}

	.bwr-sch__table tr > :first-child,
	.bwr-sch__table tr > :last-child {
		border-radius: 0;
	}

	.bwr-sch__table td::before {
		content: attr(data-kol);
		display: block;
		font-size: 12px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.03em;
		color: var(--bwr-muted);
	}
}

/* ---- kanapki i klamry ---- */

.bwr-sch__sandwiches {
	display: grid;
	gap: 16px;
}

.bwr-sch__sandwich-title {
	margin-bottom: 8px !important;
	font-weight: 700;
	color: var(--bwr-black);
}

.bwr-sch__outer {
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--bwr-black);
	color: #ffffff;
}

.bwr-sch__outer > p .bwr-sch__ref {
	background: var(--bwr-yellow);
	border-color: var(--bwr-yellow);
}

.bwr-sch__inner {
	margin: 10px 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: #ffffff;
	color: var(--bwr-text);
}

.bwr-sch__inner p + p {
	margin-top: 6px;
}

/* ---- grupy ---- */

.bwr-sch__groups {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.bwr-sch__group {
	padding: 12px 14px;
	border-radius: 12px;
	background: #ffffff;
}

.bwr-sch__group-name strong {
	color: var(--bwr-black);
}

.bwr-sch__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.bwr-sch__chips li {
	margin: 0;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--bwr-yellow-soft);
	font-size: 14px;
	color: var(--bwr-black);
}

/* ---- trasy ---- */

.bwr-sch__routes {
	display: grid;
	gap: 14px;
}

.bwr-sch__route {
	padding: 12px 14px;
	border-radius: 12px;
	background: #ffffff;
}

.bwr-sch__route-name strong {
	color: var(--bwr-black);
}

.bwr-sch__stops {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 4px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.bwr-sch__stops li {
	margin: 0;
	padding: 3px 10px;
	border-radius: 8px;
	background: var(--bwr-bg);
	font-size: 14px;
}

.bwr-sch__stops li {
	position: relative;
}

.bwr-sch__stops li + li {
	margin-left: 20px;
}

.bwr-sch__stops li + li::before {
	content: "→";
	position: absolute;
	left: -17px;
	color: var(--bwr-muted);
}

.bwr-sch__route .bwr-sch__desc,
.bwr-sch__group .bwr-sch__desc {
	margin-top: 10px;
}

@media (max-width: 640px) {
	.bwr-sch {
		padding: 18px 14px 14px;
	}

	.bwr-sch__steps li {
		margin-left: calc(min(var(--bwr-sch-i), 7) * 5px);
	}
}

/* ---------- mapa księgi (typ „struktura”, assets/schemat.js) ---------- */

.bwr-st__label {
	margin: 16px 0 6px !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bwr-muted);
}

.bwr-st__bar {
	display: flex;
	gap: 4px;
	min-height: 56px;
}

.bwr-st__seg {
	display: flex;
	flex: 0 1 auto;
	flex-direction: column;
	justify-content: center;
	gap: 1px;
	min-width: 30px;
	padding: 6px 10px;
	border-radius: 10px;
	box-sizing: border-box;
	text-decoration: none !important;
	line-height: 1.2;
	overflow: hidden;
	transition: opacity 0.15s ease;
}

.bwr-sch .bwr-st__seg.bwr-sch__c0,
.bwr-sch .bwr-st__seg.bwr-sch__c2,
.bwr-sch .bwr-st__chap.bwr-sch__c0,
.bwr-sch .bwr-st__chap.bwr-sch__c2 {
	color: #ffffff;
}

.bwr-sch .bwr-st__seg.bwr-sch__c1,
.bwr-sch .bwr-st__chap.bwr-sch__c1 {
	color: #111111;
}

.bwr-sch .bwr-st__seg.bwr-sch__c3,
.bwr-sch .bwr-st__chap.bwr-sch__c3 {
	color: var(--bwr-black);
}

.bwr-st__seg-num {
	font-size: 15px;
	font-weight: 700;
}

.bwr-st__seg-name {
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bwr-st__seg--narrow {
	align-items: center;
	padding-right: 4px;
	padding-left: 4px;
}

.bwr-st__seg--narrow .bwr-st__seg-name {
	display: none;
}

.bwr-st__seg:focus-visible,
.bwr-st__chap:focus-visible,
.bwr-st__verse-btn:focus-visible,
.bwr-st__ch-btn:focus-visible {
	outline: 3px solid var(--bwr-black);
	outline-offset: 2px;
}

.bwr-st.is-js .bwr-st__seg:not(.is-on) {
	opacity: 0.5;
}

.bwr-st.is-js .bwr-st__seg.is-on {
	outline: 2px solid var(--bwr-black);
	outline-offset: 2px;
}

.bwr-sch .bwr-st__chapters {
	margin: 0 !important;
	padding: 0 !important;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 4px;
	list-style: none;
}

.bwr-sch .bwr-st__chapters li {
	margin: 0;
}

.bwr-st__chap {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	transition: opacity 0.15s ease;
}

.bwr-st.is-js .bwr-st__chap.is-dim {
	opacity: 0.35;
}

.bwr-st__chap[aria-current] {
	outline: 2px solid var(--bwr-black);
	outline-offset: 2px;
	opacity: 1 !important;
}

.bwr-st__panels {
	margin-top: 18px;
}

.bwr-st__panel {
	padding: 18px 18px 14px;
	border: 1px solid var(--bwr-line);
	border-radius: 12px;
	background: #ffffff;
}

.bwr-st__panel + .bwr-st__panel {
	margin-top: 12px;
}

.bwr-st__panel[hidden] {
	display: none;
}

.bwr-st__panel-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 10px;
}

.bwr-st__panel-title {
	margin: 0 !important;
	font-size: 18px !important;
	line-height: 1.3 !important;
	color: var(--bwr-black);
}

.bwr-st__panel-meta {
	margin-top: 4px !important;
	font-size: 13px;
	color: var(--bwr-muted);
}

.bwr-st__desc {
	margin: 0 0 6px !important;
}

.bwr-st__sub {
	margin: 18px 0 8px !important;
	font-size: 12px !important;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.3 !important;
	text-transform: uppercase;
	color: var(--bwr-muted);
}

.bwr-sch .bwr-st__verses,
.bwr-sch .bwr-st__chlist {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.bwr-sch .bwr-st__verse,
.bwr-sch .bwr-st__ch {
	margin: 0 0 6px;
	border: 1px solid var(--bwr-line);
	border-radius: 10px;
	background: var(--bwr-bg);
}

.bwr-sch button.bwr-st__verse-btn,
.bwr-sch button.bwr-st__ch-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 10px 12px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: transparent !important;
	font-family: "Poppins", sans-serif !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: 0 !important;
	text-align: left;
	text-transform: none;
	color: var(--bwr-black) !important;
	cursor: pointer;
}

.bwr-sch button.bwr-st__verse-btn:hover,
.bwr-sch button.bwr-st__ch-btn:hover {
	background: rgba(128, 128, 128, 0.14) !important;
}

.bwr-st__why,
.bwr-st__ch-title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	line-height: 1.4;
}

.bwr-st__verse-btn .bwr-sch__ref {
	flex: 0 0 auto;
}

.bwr-st__ch-num {
	flex: 0 0 auto;
	min-width: 28px;
	padding: 1px 0;
	border-radius: 6px;
	background: #ffffff;
	border: 1px solid var(--bwr-line);
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

.bwr-st__chev {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin: 0 4px 3px 0;
	border-right: 2px solid var(--bwr-muted);
	border-bottom: 2px solid var(--bwr-muted);
	transform: rotate(45deg);
	transition: transform 0.15s ease;
}

.bwr-st__verse-btn[aria-expanded="true"] .bwr-st__chev,
.bwr-st__ch-btn[aria-expanded="true"] .bwr-st__chev {
	margin-bottom: -3px;
	transform: rotate(225deg);
}

.bwr-st:not(.is-js) .bwr-st__chev {
	display: none;
}

.bwr-st__quote,
.bwr-st__ch-body {
	padding: 0 14px 12px;
	font-size: 15px;
}

.bwr-st__quote[hidden],
.bwr-st__ch-body[hidden] {
	display: none;
}

.bwr-st__v sup {
	margin-right: 1px;
	font-size: 11px;
	font-weight: 700;
	color: var(--bwr-muted);
}

.bwr-st__quote-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 8px !important;
	font-size: 13px;
	color: var(--bwr-muted);
}

.bwr-st__quote-foot a,
.bwr-st__read {
	font-weight: 600;
	color: var(--bwr-black);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bwr-sch .bwr-st__chips {
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
}

.bwr-sch .bwr-st__chips li {
	margin: 0;
}

.bwr-st__chip {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 6px;
	padding: 5px 11px;
	border: 1px solid var(--bwr-line);
	border-radius: 999px;
	background: var(--bwr-bg);
	font-size: 13px;
	line-height: 1.35;
	color: var(--bwr-black);
	text-decoration: none !important;
}

a.bwr-st__chip:hover {
	border-color: var(--bwr-black);
}

.bwr-st__chip--article {
	background: var(--bwr-yellow-soft);
	border-color: #ead98a;
}

.bwr-st__chip-ref {
	font-size: 12px;
	color: var(--bwr-muted);
}

.bwr-st__chip-tag {
	padding: 0 7px;
	border-radius: 999px;
	background: var(--bwr-yellow);
	color: #111111;
	font-size: 11px;
	font-weight: 700;
}

.bwr-st__ch-note {
	margin: 0 0 8px !important;
	font-size: 14px;
	font-style: italic;
	color: var(--bwr-muted);
}

.bwr-sch .bwr-st__ch-list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.bwr-sch .bwr-st__ch-list li {
	margin: 0 0 8px;
	font-size: 14px;
}

.bwr-st__ch-links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	margin-top: 4px !important;
	font-size: 14px;
}

.bwr-st__listen {
	color: var(--bwr-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bwr-st__listen span {
	font-weight: 700;
	color: var(--bwr-black);
}

@media (max-width: 640px) {
	.bwr-st__seg {
		padding: 6px 6px;
	}

	.bwr-st__seg-name {
		display: none;
	}

	.bwr-st__seg {
		align-items: center;
	}

	.bwr-st__panel {
		padding: 16px 14px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bwr-st__seg,
	.bwr-st__chap,
	.bwr-st__chev {
		transition: none;
	}
}

/* Linki w mapie: zwykłe podkreślenie zamiast żółtego z artykułu. */
.bwr-sch.bwr-sch--struktura a.bwr-st__read,
.bwr-sch.bwr-sch--struktura a.bwr-st__listen,
.bwr-sch.bwr-sch--struktura .bwr-st__quote-foot a {
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-decoration-color: currentColor !important;
	text-underline-offset: 3px;
}

@media (min-width: 641px) {
	.bwr-st__seg:not(.bwr-st__seg--narrow) .bwr-st__seg-name {
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
}
