/*
Theme Name:   majsterowo
Theme URI:    https://majsterowo.pl/
Description:  Motyw potomny Blocksy dla majsterowo.pl: hub na stronie głównej, huby działów, czytelne wpisy z tabelami, FAQ, BHP i boksami partnerskimi.
Author:       Mateusz Wojdalski IT Studio
Template:     blocksy
Version:      2.0.0
Text Domain:  majsterowo-child
*/

/* =====================================================================
   0. Font (Archivo, zmienny: szerokość 68–100%, grubość 400–800, lokalnie, przycięty do PL)
   ===================================================================== */
@font-face {
	font-family: "Archivo";
	src: url("fonts/mj-latin.woff2") format("woff2");
	font-weight: 400 800;
	font-stretch: 68% 100%;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+20AC, U+2122, U+2192, U+2212;
}
@font-face {
	font-family: "Archivo";
	src: url("fonts/mj-pl.woff2") format("woff2");
	font-weight: 400 800;
	font-stretch: 68% 100%;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C;
}

/* =====================================================================
   1. Tokeny
   ===================================================================== */
html:root {
	--mj-ink: #191713;          /* grafit marki */
	--mj-ink-2: #2b2721;        /* grafit, powierzchnie na ciemnym */
	--mj-ink-3: #47413a;
	--mj-text: #2e2a25;
	--mj-muted: #655f56;
	--mj-on-dark: #cfc7ba;
	--mj-on-dark-2: #a59d90;
	--mj-orange: #f2872e;       /* pomarańcz marki: przyciski, taśma, akcenty */
	--mj-orange-deep: #a14a0b;  /* pomarańcz do tekstu na białym (kontrast 6:1) */
	--mj-orange-wash: #fdf1e6;
	--mj-bone: #ece6da;         /* „biel” z palety logo, tylko jako tło paneli */
	--mj-bone-2: #f6f3ec;
	--mj-line: #ddd5c6;
	--mj-paper: #ffffff;

	--mj-font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--mj-wrap: 1180px;
	--mj-gutter: clamp(16px, 4vw, 32px);
	--mj-r: 6px;
	--mj-r-s: 3px;

	/* Taśma miernicza: jeden motyw graficzny serwisu */
	--mj-tape:
		repeating-linear-gradient(90deg, var(--mj-ink) 0 2px, transparent 2px 100px) 0 0 / 100% 13px no-repeat,
		repeating-linear-gradient(90deg, var(--mj-ink) 0 1px, transparent 1px 50px) 0 0 / 100% 9px no-repeat,
		repeating-linear-gradient(90deg, var(--mj-ink) 0 1px, transparent 1px 10px) 0 0 / 100% 5px no-repeat,
		var(--mj-orange);

	/* Blocksy: paleta i typografia */
	--theme-palette-color-1: #a14a0b;
	--theme-palette-color-2: #191713;
	--theme-palette-color-3: #2e2a25;
	--theme-palette-color-4: #191713;
	--theme-palette-color-5: #ddd5c6;
	--theme-palette-color-6: #f6f3ec;
	--theme-palette-color-7: #ffffff;
	--theme-palette-color-8: #ffffff;
	--theme-font-family: var(--mj-font);
	--theme-text-color: var(--mj-text);
	--theme-headings-color: var(--mj-ink);
	--theme-link-initial-color: var(--mj-ink);
	--theme-link-hover-color: var(--mj-orange-deep);
	--theme-button-background-initial-color: var(--mj-ink);
	--theme-button-background-hover-color: var(--mj-orange);
	--theme-button-text-hover-color: var(--mj-ink);
}

html body {
	font-family: var(--mj-font);
	color: var(--mj-text);
	background: var(--mj-paper);
	font-stretch: 100%;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--mj-font);
	color: var(--mj-ink);
}
:focus-visible {
	outline: 3px solid var(--mj-orange);
	outline-offset: 2px;
}

.mj-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--mj-wrap) + 2 * var(--mj-gutter));
	margin-inline: auto;
	padding-inline: var(--mj-gutter);
}
.mj-wrap--narrow { max-width: calc(820px + 2 * var(--mj-gutter)); }

.mj-icon { width: 24px; height: 24px; display: block; }

/* =====================================================================
   2. Nagłówek Blocksy
   ===================================================================== */
html [data-header*="type-1"] { --header-height: 76px; }
html [data-header*="type-1"] .ct-header [data-row*="middle"] {
	--height: 76px;
	--theme-box-shadow: none;
	box-shadow: none;
	border-bottom: 1px solid var(--mj-line);
}
html [data-header*="type-1"] .ct-header [data-id="menu"] > ul > li > a {
	--theme-text-transform: none;
	--theme-font-weight: 600;
	--theme-font-size: 16px;
	--theme-link-initial-color: var(--mj-ink);
	--theme-link-hover-color: var(--mj-orange-deep);
	--theme-link-active-color: var(--mj-orange-deep);
	font-stretch: 92%;
}
html [data-header*="type-1"] .ct-header [data-id="menu"] .sub-menu {
	--theme-box-shadow: 0 14px 30px rgba(25, 23, 19, .18);
	--dropdown-divider: 1px solid rgba(255, 255, 255, .08);
	background: var(--mj-ink);
	border-top: 3px solid var(--mj-orange);
}
html [data-header*="type-1"] .ct-header [data-id="menu"] .sub-menu .ct-menu-link {
	--theme-font-size: 15px;
	--theme-link-initial-color: #f3efe7;
	--theme-link-hover-color: var(--mj-orange);
}
html .site-logo-container img { max-height: 46px !important; }
html [data-header*="type-1"] #offcanvas .ct-panel-inner { background-color: rgba(25, 23, 19, .98); }
html [data-header*="type-1"] #search-modal { background-color: rgba(25, 23, 19, .97); }
html [data-header*="type-1"] #search-modal .ct-search-form {
	--theme-button-background-initial-color: var(--mj-orange);
	--theme-button-background-hover-color: var(--mj-orange);
	--theme-form-border-radius: var(--mj-r);
}

/* Postęp czytania na wpisach: taśma, która wysuwa się razem z przewijaniem */
@supports (animation-timeline: scroll()) {
	body.single-post::before {
		content: "";
		position: fixed;
		inset: 0 0 auto 0;
		height: 6px;
		z-index: 100000;
		background:
			repeating-linear-gradient(90deg, var(--mj-ink) 0 1px, transparent 1px 10px) 0 0 / 100% 3px no-repeat,
			var(--mj-orange);
		transform-origin: 0 50%;
		transform: scaleX(0);
		animation: mj-tape-out linear both;
		animation-timeline: scroll(root);
		pointer-events: none;
	}
	@keyframes mj-tape-out { to { transform: scaleX(1); } }
}

/* =====================================================================
   3. Elementy wspólne
   ===================================================================== */
.mj-section-title {
	margin: 0;
	font-size: clamp(1.75rem, 3.2vw, 2.4rem);
	font-weight: 780;
	font-stretch: 74%;
	line-height: 1.05;
	letter-spacing: -.005em;
}
.mj-band { padding-block: clamp(48px, 7vw, 88px); }
.mj-band__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .5rem 2rem;
	margin-bottom: clamp(24px, 3vw, 36px);
}
.mj-band__desc {
	margin: 0;
	max-width: 46ch;
	color: var(--mj-muted);
	font-size: 1rem;
	line-height: 1.5;
}
.mj-band__desc a {
	color: var(--mj-ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--mj-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.mj-ruler {
	height: 16px;
	background: var(--mj-tape);
}

.mj-badge {
	display: inline-block;
	padding: .2em .6em .25em;
	border-radius: var(--mj-r-s);
	font-size: .78rem;
	font-weight: 650;
	line-height: 1.2;
	white-space: nowrap;
	background: var(--mj-paper);
	color: var(--mj-ink);
	box-shadow: inset 0 0 0 1px var(--mj-line);
}
.mj-badge--ranking { background: var(--mj-orange); color: var(--mj-ink); box-shadow: none; }
.mj-badge--porownanie { background: var(--mj-ink); color: #fff; box-shadow: none; }
.mj-badge--wybor { background: var(--mj-bone); color: var(--mj-ink); box-shadow: none; }

/* Wyszukiwarka */
.mj-search {
	position: relative;
	display: flex;
	max-width: 640px;
	background: var(--mj-paper);
	border-radius: var(--mj-r);
	box-shadow: 0 0 0 1px var(--mj-line);
}
.mj-search__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--mj-muted);
	pointer-events: none;
}
.mj-search .mj-search__input {
	flex: 1;
	min-width: 0;
	height: 56px;
	margin: 0;
	padding: 0 12px 0 48px;
	border: 0;
	border-radius: var(--mj-r) 0 0 var(--mj-r);
	background: transparent;
	color: var(--mj-ink);
	font: 500 1.05rem/1 var(--mj-font);
	box-shadow: none;
}
.mj-search .mj-search__input::placeholder { color: #8b8478; }
.mj-search .mj-search__input:focus { outline: none; }
.mj-search:focus-within { box-shadow: 0 0 0 3px var(--mj-orange); }
.mj-search .mj-search__btn {
	flex: none;
	height: 56px;
	margin: 0;
	padding: 0 1.4rem;
	border: 0;
	border-radius: 0 var(--mj-r) var(--mj-r) 0;
	background: var(--mj-orange);
	color: var(--mj-ink);
	font: 700 1.02rem/1 var(--mj-font);
	cursor: pointer;
}
.mj-search .mj-search__btn:hover { background: #ff9640; }

/* Okruszki */
.mj-crumbs {
	margin: 0 0 1.25rem;
	font-size: .875rem;
	color: var(--mj-muted);
}
.mj-crumbs a { color: var(--mj-muted); text-decoration: none; }
.mj-crumbs a:hover { color: var(--mj-ink); text-decoration: underline; }
.mj-crumbs--dark, .mj-crumbs--dark a { color: var(--mj-on-dark-2); }
.mj-crumbs--dark a:hover { color: #fff; }
.mj-crumbs .breadcrumb_last { color: inherit; }

/* Karty */
.mj-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: clamp(20px, 2.4vw, 32px);
}
.mj-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--mj-paper);
	border: 1px solid var(--mj-line);
	border-radius: var(--mj-r);
	overflow: hidden;
	transition: border-color .15s ease;
}
.mj-card:hover { border-color: var(--mj-ink); }
.mj-card__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--mj-bone);
	overflow: hidden;
}
.mj-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mj-card__media .mj-badge {
	position: absolute;
	left: 12px;
	top: 12px;
}
.mj-card__media .mj-badge--poradnik { box-shadow: none; }
.mj-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 20px 20px;
}
.mj-card__cat {
	margin: 0 0 .35rem;
	font-size: .85rem;
	font-weight: 600;
	color: var(--mj-orange-deep);
}
.mj-card__title {
	margin: 0 0 .6rem;
	font-size: 1.3rem;
	font-weight: 760;
	font-stretch: 80%;
	line-height: 1.15;
}
.mj-card__title a { color: var(--mj-ink); text-decoration: none; }
.mj-card__title a::after { content: ""; position: absolute; inset: 0; } /* cała karta klikalna */
.mj-card { position: relative; }
.mj-card__title a:hover { text-decoration: underline; text-decoration-color: var(--mj-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mj-card__excerpt {
	margin: 0 0 1rem;
	font-size: .95rem;
	line-height: 1.5;
	color: var(--mj-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mj-card__meta {
	margin: auto 0 0;
	font-size: .82rem;
	color: var(--mj-muted);
}

/* Paginacja */
.mj-pagination { margin-top: 48px; }
.mj-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mj-pagination a, .mj-pagination span {
	display: inline-flex;
	align-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	justify-content: center;
	border: 1px solid var(--mj-line);
	border-radius: var(--mj-r-s);
	color: var(--mj-ink);
	text-decoration: none;
	font-weight: 600;
}
.mj-pagination .current { background: var(--mj-ink); border-color: var(--mj-ink); color: #fff; }
.mj-pagination a:hover { border-color: var(--mj-ink); }

/* =====================================================================
   4. Karta warsztatowa (v2): papier milimetrowy, linie wymiarowe, tabliczki, naklejki
   ===================================================================== */
html:root {
	--mj-sheet: #fbfaf6;
	--mj-grid-minor: rgba(242, 135, 46, .085);
	--mj-grid-major: rgba(242, 135, 46, .2);
	--mj-arrow-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='8'%3E%3Cpath d='M0 4 9 0v8z' fill='%23191713'/%3E%3C/svg%3E");
	--mj-arrow-dark-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='8'%3E%3Cpath d='M9 4 0 0v8z' fill='%23191713'/%3E%3C/svg%3E");
	--mj-arrow-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='8'%3E%3Cpath d='M0 4 9 0v8z' fill='%23191713'/%3E%3C/svg%3E");
}

/* Papier milimetrowy: 1 mm = 8 px, kratka 5 mm = 40 px, w pomarańczu marki */
.mj-paper {
	background-color: var(--mj-sheet);
	background-image:
		linear-gradient(var(--mj-grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--mj-grid-major) 1px, transparent 1px),
		linear-gradient(var(--mj-grid-minor) 1px, transparent 1px),
		linear-gradient(90deg, var(--mj-grid-minor) 1px, transparent 1px);
	background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
	background-position: -1px -1px;
	--mj-dim-bg: var(--mj-sheet);
}

/* Linia wymiarowa: kreska ze strzałkami, linie pomocnicze na końcach, etykieta z prawdziwą liczbą */
.mj-dim {
	--mj-dim-color: var(--mj-ink);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 20px;
	margin: 0 0 14px;
	color: var(--mj-dim-color);
	background: var(--mj-arrow-dark) 1px 50% / 9px 8px no-repeat, var(--mj-arrow-dark-r) calc(100% - 1px) 50% / 9px 8px no-repeat;
}
.mj-dim::before {
	content: "";
	position: absolute;
	left: 1px;
	right: 1px;
	top: 50%;
	height: 1px;
	background: currentColor;
	transform-origin: 0 50%;
}
.mj-dim::after {
	content: "";
	position: absolute;
	inset: 0;
	border-inline: 1px solid currentColor;
}
.mj-dim__label {
	position: relative;
	padding: 0 .7em;
	background: var(--mj-dim-bg, #fff);
	font-size: .8rem;
	font-weight: 650;
	font-stretch: 82%;
	line-height: 1;
	white-space: nowrap;
}
.mj-js .mj-dim::before { transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.mj-js .mj-dim .mj-dim__label { opacity: 0; transition: opacity .4s ease .55s; }
.mj-js .mj-dim.is-drawn::before { transform: scaleX(1); }
.mj-js .mj-dim.is-drawn .mj-dim__label { opacity: 1; }
.mj-dim--section { margin-bottom: 22px; }

/* Tabliczka rysunkowa */
.mj-tb {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	border: 2px solid var(--mj-ink);
	background: var(--mj-paper);
	color: var(--mj-ink);
}
.mj-tb__cell {
	padding: .55rem .75rem .6rem;
	border-right: 1px solid var(--mj-ink);
	border-bottom: 1px solid var(--mj-ink);
	min-width: 0;
}
.mj-tb__cell:nth-child(2n) { border-right: 0; }
.mj-tb__cell:nth-last-child(-n+2) { border-bottom: 0; }
.mj-tb dt {
	margin: 0 0 .2rem;
	font-size: .74rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--mj-muted);
}
.mj-tb dd {
	margin: 0;
	font-size: 1.9rem;
	font-weight: 800;
	font-stretch: 72%;
	line-height: 1;
}
.mj-tb dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--mj-orange); text-underline-offset: 3px; }

/* Naklejka typu treści (jak etykieta na skrzynce narzędziowej) */
.mj-sticker,
.mj-card__media .mj-badge {
	display: inline-block;
	padding: .26em .65em .3em;
	border-radius: 4px;
	font-size: .8rem;
	font-weight: 750;
	font-stretch: 88%;
	line-height: 1.15;
	white-space: nowrap;
	background: var(--mj-paper);
	color: var(--mj-ink);
	box-shadow: 0 0 0 2px #fff, 0 3px 6px rgba(25, 23, 19, .28);
	transform: rotate(-2.5deg);
}
.mj-sticker--ranking, .mj-card__media .mj-badge--ranking { background: var(--mj-orange); color: var(--mj-ink); }
.mj-sticker--porownanie, .mj-card__media .mj-badge--porownanie { background: var(--mj-ink); color: #fff; }
.mj-sticker--wybor, .mj-card__media .mj-badge--wybor { background: #ffd9a8; color: var(--mj-ink); }
.mj-sticker--poradnik, .mj-card__media .mj-badge--poradnik { background: #fff; color: var(--mj-ink); box-shadow: 0 0 0 2px #fff, inset 0 0 0 1.5px var(--mj-ink), 0 3px 6px rgba(25, 23, 19, .28); }

/* Ramka zdjęcia z narożnikami jak na arkuszu */
.mj-frame {
	position: relative;
	margin: 0;
	padding: 8px;
	background: var(--mj-paper);
	border: 1px solid var(--mj-ink);
}
.mj-frame img { display: block; width: 100%; height: auto; }
.mj-frame::before {
	content: "";
	position: absolute;
	inset: -9px;
	pointer-events: none;
	background:
		linear-gradient(var(--mj-orange), var(--mj-orange)) 0 0 / 20px 3px no-repeat,
		linear-gradient(var(--mj-orange), var(--mj-orange)) 0 0 / 3px 20px no-repeat,
		linear-gradient(var(--mj-orange), var(--mj-orange)) 100% 0 / 20px 3px no-repeat,
		linear-gradient(var(--mj-orange), var(--mj-orange)) 100% 0 / 3px 20px no-repeat,
		linear-gradient(var(--mj-orange), var(--mj-orange)) 0 100% / 20px 3px no-repeat,
		linear-gradient(var(--mj-orange), var(--mj-orange)) 0 100% / 3px 20px no-repeat,
		linear-gradient(var(--mj-orange), var(--mj-orange)) 100% 100% / 20px 3px no-repeat,
		linear-gradient(var(--mj-orange), var(--mj-orange)) 100% 100% / 3px 20px no-repeat;
}

/* Pieczątka */
.mj-stamp {
	display: block;
	width: 132px;
	height: 132px;
	color: var(--mj-orange-deep);
	font-family: var(--mj-font);
	opacity: .88;
	transform: rotate(-12deg);
}

/* Ilustracje wektorowe */
.mj-art { display: block; width: 100%; height: auto; }
.mj-art .a { stroke: var(--mj-orange); }
.mj-art .d { stroke-width: 1.2; opacity: .75; }
.mj-art text { fill: currentColor; stroke: none; font: 600 10px/1 var(--mj-font); opacity: .8; }

/* Nagłówki sekcji */
.mj-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: .6rem 2rem;
	margin-bottom: 18px;
}
.mj-head__desc {
	margin: 0;
	max-width: 48ch;
	color: var(--mj-muted);
	font-size: 1rem;
	line-height: 1.55;
}
.mj-head__desc a,
.mj-how__note a,
.mj-team__links a {
	color: var(--mj-ink);
	font-weight: 650;
	text-decoration: underline;
	text-decoration-color: var(--mj-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.mj-section-title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 800;
	font-stretch: 70%;
	line-height: 1;
	letter-spacing: -.005em;
}
.mj-band { padding-block: clamp(56px, 8vw, 104px); }

/* ---------- Hero: zdjęcie + wideo, tekst na zaciemnieniu ---------- */
.mj-hero {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: clamp(600px, 86vh, 800px);
	overflow: hidden;
	background: var(--mj-ink);
	color: #ece6da;
}
.mj-hero__media { position: absolute; inset: 0; z-index: -2; }
.mj-hero__poster,
.mj-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 62% 60%;
}
.mj-hero__video { opacity: 0; transition: opacity 1.4s ease; }
.mj-hero__video.is-playing { opacity: 1; }
.mj-hero__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(25, 23, 19, .94) 0%, rgba(25, 23, 19, .82) 32%, rgba(25, 23, 19, .35) 60%, rgba(25, 23, 19, .08) 100%),
		linear-gradient(0deg, rgba(25, 23, 19, .7) 0%, rgba(25, 23, 19, 0) 38%);
}
.mj-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
	gap: 40px clamp(32px, 5vw, 80px);
	align-items: end;
	padding-block: 120px 56px;
}
.mj-hero__title {
	margin: 0 0 1.1rem;
	max-width: 17ch;
	color: #fff;
	font-size: clamp(2.7rem, 6.2vw, 5rem);
	font-weight: 800;
	font-stretch: 68%;
	line-height: .96;
	letter-spacing: -.01em;
	text-wrap: balance;
}
.mj-hero__lead {
	margin: 0 0 1.8rem;
	max-width: 52ch;
	font-size: clamp(1.05rem, 1.5vw, 1.2rem);
	line-height: 1.55;
	color: #e3dccf;
}
.mj-hero .mj-search { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.mj-hero__popular {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .4rem .9rem;
	margin-top: 1.2rem;
	font-size: .95rem;
}
.mj-hero__popular p { margin: 0; color: #bfb6a8; }
.mj-hero__popular ul { display: flex; flex-wrap: wrap; gap: .3rem 0; margin: 0; padding: 0; list-style: none; }
.mj-hero__popular li:not(:last-child)::after { content: "/"; margin: 0 .55rem; color: #8a8174; }
.mj-hero__popular a {
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(242, 135, 46, .8);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.mj-hero__popular a:hover { color: var(--mj-orange); }
.mj-hero__sheet {
	padding: 14px 16px 16px;
	background-color: rgba(251, 250, 246, .96);
	background-image:
		linear-gradient(var(--mj-grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--mj-grid-major) 1px, transparent 1px);
	background-size: 40px 40px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
	--mj-dim-bg: #fbfaf6;
	color: var(--mj-ink);
}

@keyframes mj-kenburns {
	from { transform: scale(1) translate3d(0, 0, 0); }
	to { transform: scale(1.12) translate3d(-3%, 2%, 0); }
}

/* Taśma miernicza: wysuwa się raz przy wejściu */
.mj-tape { height: 36px; overflow: hidden; background: var(--mj-orange); }
.mj-tape__svg { display: block; height: 36px; width: 2400px; max-width: none; }
.mj-js .mj-tape__svg { transform: translateX(-35%); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.mj-js .mj-tape.is-drawn .mj-tape__svg { transform: translateX(0); }

/* ---------- Działy ---------- */
.mj-depts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(14px, 2vw, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.mj-dept { margin: 0; }
.mj-dept__link {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--mj-paper);
	border: 1px solid var(--mj-line);
	color: var(--mj-ink);
	text-decoration: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.mj-dept__media { display: block; aspect-ratio: 1; overflow: hidden; background: #e9dcc6; }
.mj-dept__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.mj-dept__body {
	display: grid;
	grid-template-columns: 30px 1fr;
	column-gap: 10px;
	align-items: center;
	padding: 14px 14px 16px;
	border-top: 1px solid var(--mj-line);
}
.mj-dept__icon { grid-row: span 2; color: var(--mj-orange-deep); }
.mj-dept__icon .mj-icon { width: 28px; height: 28px; }
.mj-dept__name { font-size: 1.22rem; font-weight: 780; font-stretch: 76%; line-height: 1.1; }
.mj-dept__count { font-size: .85rem; color: var(--mj-muted); }
a.mj-dept__link:hover { border-color: var(--mj-ink); box-shadow: 6px 6px 0 var(--mj-orange); }
a.mj-dept__link:hover .mj-dept__media img { transform: scale(1.05); }
.mj-dept.is-empty .mj-dept__media img { filter: grayscale(.7); opacity: .75; }
.mj-dept.is-empty .mj-dept__count { color: var(--mj-orange-deep); font-weight: 600; }

/* ---------- Zestawienie rankingów (jak lista części na rysunku) ---------- */
.mj-rankings { padding-top: 0; }
.mj-bom { border: 2px solid var(--mj-ink); background: var(--mj-paper); }
.mj-bom__row {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 140px 190px 104px;
	align-items: center;
	column-gap: 16px;
	padding: 10px 16px;
	border-top: 1px solid var(--mj-line);
	color: var(--mj-ink);
	text-decoration: none;
	transition: background-color .15s ease;
}
.mj-bom__row--head {
	border-top: 0;
	padding-block: 9px;
	background: var(--mj-ink);
	color: #ece6da;
	font-size: .78rem;
	font-weight: 650;
}
a.mj-bom__row:hover { background: #fff6ec; }
.mj-bom__pos { font-size: 1.4rem; font-weight: 800; font-stretch: 70%; color: var(--mj-orange-deep); }
.mj-bom__title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mj-bom__thumb { flex: none; width: 52px; height: 52px; overflow: hidden; background: var(--mj-bone); }
.mj-bom__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mj-bom__name { font-weight: 650; line-height: 1.3; }
a.mj-bom__row:hover .mj-bom__name { text-decoration: underline; text-decoration-color: var(--mj-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mj-bom__cat, .mj-bom__date { font-size: .9rem; color: var(--mj-muted); }

/* ---------- Kalkulatory: grafitowa plansza ---------- */
.mj-calcs {
	background-color: var(--mj-ink);
	background-image:
		linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px),
		linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
	background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
	color: #ece6da;
}
.mj-calcs .mj-section-title { color: #fff; }
.mj-head--dark .mj-head__desc { color: #bfb6a8; }
.mj-calcgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2.4vw, 28px);
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}
.mj-calc {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 22px 24px 24px;
	background: #221f1a;
	border: 1px solid #47413a;
}
.mj-calc__art { display: block; width: 150px; margin-bottom: 14px; color: #ece6da; }
.mj-calc__title { margin: 0 0 .5rem; color: #fff; font-size: 1.5rem; font-weight: 800; font-stretch: 74%; line-height: 1.05; }
.mj-calc__desc { margin: 0 0 1.4rem; color: #bfb6a8; font-size: .97rem; line-height: 1.5; }
.mj-calc__btn {
	align-self: flex-start;
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.15rem;
	border-radius: 3px;
	background: var(--mj-orange);
	color: var(--mj-ink);
	font-weight: 750;
	text-decoration: none;
	box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15);
}
.mj-calc__btn:hover { background: #fff; color: var(--mj-ink); }

/* ---------- Jak pracujemy ---------- */
.mj-how { background-color: var(--mj-sheet); }
.mj-how { background-image: linear-gradient(var(--mj-grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--mj-grid-major) 1px, transparent 1px), linear-gradient(var(--mj-grid-minor) 1px, transparent 1px), linear-gradient(90deg, var(--mj-grid-minor) 1px, transparent 1px); background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px; }
.mj-how__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr);
	gap: 48px clamp(32px, 6vw, 88px);
	align-items: start;
}
.mj-how .mj-head__desc { margin: .8rem 0 2rem; }
.mj-steps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 34px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: mjstep;
}
.mj-step {
	position: relative;
	margin: 0;
	padding: 20px 20px 18px 20px;
	background: var(--mj-paper);
	border: 1px solid var(--mj-ink);
	counter-increment: mjstep;
}
.mj-step::before {
	content: counter(mjstep);
	position: absolute;
	top: -16px;
	left: 16px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid var(--mj-ink);
	background: var(--mj-orange);
	color: var(--mj-ink);
	font-weight: 800;
	font-stretch: 75%;
	font-size: 1.05rem;
}
.mj-step__art { display: block; width: 64px; margin: 4px 0 10px auto; color: var(--mj-ink); }
.mj-step h3 { margin: 0 0 .4rem; font-size: 1.2rem; font-weight: 780; font-stretch: 80%; line-height: 1.15; }
.mj-step p { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--mj-text); }
.mj-how__facts { position: relative; padding-top: 112px; }
.mj-how__stamp { position: absolute; top: -24px; right: 4px; z-index: 1; }
.mj-tb--facts { grid-template-columns: 1fr; box-shadow: 8px 8px 0 var(--mj-ink); }
.mj-tb--facts .mj-tb__cell {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-right: 0;
	border-bottom: 1px solid var(--mj-ink);
}
.mj-tb--facts .mj-tb__cell:nth-last-child(-n+2) { border-bottom: 1px solid var(--mj-ink); }
.mj-tb--facts .mj-tb__cell:last-child { border-bottom: 0; }
.mj-tb--facts dt { margin: 0; font-size: .92rem; color: var(--mj-text); max-width: 22ch; }
.mj-tb--facts dd { font-size: 2.1rem; color: var(--mj-ink); }
.mj-tb--facts .mj-tb__cell:first-child { background: var(--mj-orange); }
.mj-tb--facts .mj-tb__cell:first-child dt { color: var(--mj-ink); font-weight: 650; }
.mj-how__note { margin: 1.4rem 0 0; font-size: .9rem; color: var(--mj-muted); }

/* ---------- Redakcja ---------- */
.mj-team__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px clamp(32px, 6vw, 88px);
	align-items: center;
}
.mj-team__text p { max-width: 56ch; margin: 1rem 0 0; font-size: 1.08rem; line-height: 1.65; }
.mj-team__links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }

/* ---------- Najnowsze ---------- */
.mj-latest { padding-top: 0; }
.mj-card { border-radius: 2px; }
.mj-card:hover { border-color: var(--mj-ink); box-shadow: 6px 6px 0 var(--mj-orange); }
.mj-card__media { border-bottom: 1px solid var(--mj-line); }

/* =====================================================================
   5. Hub działu i wyszukiwarka (v2)
   ===================================================================== */
.mj-hub { border-bottom: 1px solid var(--mj-line); }
.mj-hub > .mj-wrap { padding-block: clamp(24px, 4vw, 44px) clamp(36px, 5vw, 60px); }
.mj-hub__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
	gap: 32px clamp(32px, 6vw, 96px);
	align-items: end;
}
.mj-hub--search .mj-wrap { display: block; }
.mj-hub__row { display: flex; align-items: center; gap: 16px; margin-bottom: .8rem; }
.mj-hub__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	border: 2px solid var(--mj-ink);
	background: var(--mj-orange);
	color: var(--mj-ink);
}
.mj-hub__icon .mj-icon { width: 32px; height: 32px; }
.mj-hub__title {
	margin: 0;
	font-size: clamp(2.3rem, 5.4vw, 4rem);
	font-weight: 800;
	font-stretch: 68%;
	line-height: .98;
}
.mj-hub__desc { max-width: 60ch; font-size: 1.1rem; line-height: 1.55; color: var(--mj-text); }
.mj-hub__desc p { margin: 0 0 .5rem; }
.mj-hub__count { margin: .4rem 0 1.4rem; color: var(--mj-orange-deep); font-weight: 650; }
.mj-hub__quick { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--mj-ink); }
.mj-hub__quick p { margin: 0 0 .5rem; font-size: .9rem; color: var(--mj-muted); }
.mj-hub__quick ul { display: flex; flex-wrap: wrap; gap: .35rem 0; margin: 0; padding: 0; list-style: none; }
.mj-hub__quick li:not(:last-child)::after { content: "/"; margin: 0 .55rem; color: #b3a995; }
.mj-hub__quick a { color: var(--mj-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--mj-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mj-hub__media .mj-frame { box-shadow: 8px 8px 0 var(--mj-ink); }
.mj-archive__body { padding-block: clamp(36px, 5vw, 60px) clamp(56px, 8vw, 96px); }
.mj-empty { max-width: 640px; font-size: 1.05rem; }

/* =====================================================================
   6. Wpis
   ===================================================================== */
.mj-post-head > .mj-wrap { padding-top: clamp(20px, 3vw, 36px); }
.mj-post-head__kicker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .9rem;
	margin: 0 0 1rem;
}
.mj-post-head__cat {
	font-size: .92rem;
	font-weight: 600;
	color: var(--mj-orange-deep);
	text-decoration: none;
}
.mj-post-head__cat:hover { text-decoration: underline; }
.mj-post-head__title {
	margin: 0 0 1rem;
	max-width: 24ch;
	font-size: clamp(2.1rem, 4.6vw, 3.5rem);
	font-weight: 800;
	font-stretch: 72%;
	line-height: 1.02;
	letter-spacing: -.005em;
}
.mj-post-head__lead {
	margin: 0 0 1.25rem;
	max-width: 62ch;
	font-size: clamp(1.08rem, 1.5vw, 1.22rem);
	line-height: 1.55;
	color: var(--mj-muted);
}
.mj-post-head__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 0;
	margin: 0 0 clamp(20px, 3vw, 32px);
	padding: 0;
	list-style: none;
	font-size: .9rem;
	color: var(--mj-muted);
}
.mj-post-head__meta li { margin: 0; }
.mj-post-head__meta li + li { margin-left: .9rem; padding-left: .9rem; border-left: 1px solid var(--mj-line); }
.mj-post-head__media { margin-bottom: clamp(28px, 4vw, 48px); }
.mj-post-head__media img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 600px;
	object-fit: cover;
	border-radius: var(--mj-r);
}

/* Układ: spis treści + kolumna tekstu */
.mj-article { padding-bottom: clamp(40px, 6vw, 72px); }
.mj-article .mj-prose { max-width: 820px; margin-inline: auto; }
@media (min-width: 1100px) {
	.mj-article.has-toc {
		display: grid;
		grid-template-columns: 250px minmax(0, 820px);
		gap: 56px;
		justify-content: center;
	}
	.mj-article.has-toc .mj-prose { margin-inline: 0; }
	.mj-toc { position: relative; }
	.mj-toc__box {
		position: sticky;
		top: 24px;
		max-height: calc(100vh - 48px);
		overflow: auto;
	}
	.admin-bar .mj-toc__box { top: 56px; }
}
.mj-toc__box {
	margin-bottom: 28px;
	border-top: 2px solid var(--mj-ink);
	font-size: .93rem;
}
.mj-toc__title {
	padding: .8rem 0;
	cursor: pointer;
	font-weight: 750;
	font-stretch: 85%;
	font-size: 1.05rem;
	color: var(--mj-ink);
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.mj-toc__title::-webkit-details-marker { display: none; }
.mj-toc__title::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--mj-orange-deep); }
.mj-toc__box[open] .mj-toc__title::after { content: "–"; }
.mj-toc__list {
	margin: 0;
	padding: 0 0 .5rem;
	list-style: none;
	counter-reset: mjtoc;
}
.mj-toc__list li {
	margin: 0;
	counter-increment: mjtoc;
	border-bottom: 1px solid var(--mj-line);
}
.mj-toc__list a {
	display: grid;
	grid-template-columns: 1.6rem 1fr;
	padding: .5rem 0;
	color: var(--mj-text);
	text-decoration: none;
	line-height: 1.35;
}
.mj-toc__list a::before {
	content: counter(mjtoc);
	color: var(--mj-orange-deep);
	font-weight: 700;
	font-stretch: 80%;
}
.mj-toc__list a:hover { color: var(--mj-ink); text-decoration: underline; text-decoration-color: var(--mj-orange); }

/* Typografia tekstu */
.mj-prose {
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--mj-text);
}
.mj-prose > * { margin-top: 0; margin-bottom: 1.2em; }
.mj-prose > :where(p, ul, ol, h2, h3, h4, blockquote, .mj-bhp) { max-width: 42rem; }
.mj-prose h2 {
	margin-top: 2.2em;
	margin-bottom: .6em;
	font-size: clamp(1.7rem, 3vw, 2.15rem);
	font-weight: 780;
	font-stretch: 76%;
	line-height: 1.1;
	scroll-margin-top: 24px;
}
.mj-prose h2::before {
	content: "";
	display: block;
	width: 44px;
	height: 5px;
	margin-bottom: .55em;
	background: var(--mj-orange);
}
.mj-prose h3 {
	margin-top: 1.7em;
	margin-bottom: .45em;
	font-size: 1.3rem;
	font-weight: 720;
	font-stretch: 88%;
	line-height: 1.25;
}
.mj-prose a {
	color: var(--mj-ink);
	text-decoration: underline;
	text-decoration-color: var(--mj-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.mj-prose a:hover { color: var(--mj-orange-deep); }
.mj-prose strong { font-weight: 680; color: var(--mj-ink); }
.mj-prose ul, .mj-prose ol { padding-left: 1.4em; }
.mj-prose li { margin-bottom: .45em; }
.mj-prose li::marker { color: var(--mj-orange-deep); font-weight: 700; }
.mj-prose ul > li::marker { content: "■  "; font-size: .7em; color: var(--mj-orange); }
.mj-prose figure.wp-block-image { margin-block: 2em; }
.mj-prose figure.wp-block-image img { border-radius: var(--mj-r); height: auto; }
.mj-prose figcaption, .mj-prose .wp-element-caption {
	margin-top: .6em;
	font-size: .88rem;
	line-height: 1.45;
	color: var(--mj-muted);
	text-align: left;
}
.mj-prose blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 1rem 1.2rem;
	border-left: 4px solid var(--mj-ink);
	background: var(--mj-bone-2);
	font-size: 1.05rem;
	font-style: normal;
}
.mj-prose blockquote p { margin: 0 0 .6em; }
.mj-prose blockquote > :last-child { margin-bottom: 0; }
.mj-prose > p:empty { display: none; }

/* Tabele porównawcze */
.mj-prose .mj-table {
	max-width: none;
	margin-block: 1.8em 2.2em;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--mj-line);
	border-radius: var(--mj-r);
}
.mj-prose .mj-table table {
	width: 100%;
	min-width: 560px;
	margin: 0;
	border-collapse: collapse;
	font-size: .95rem;
	line-height: 1.45;
}
.mj-prose .mj-table th,
.mj-prose .mj-table thead td {
	padding: .75em .9em;
	background: var(--mj-ink);
	color: #fff;
	font-weight: 700;
	font-stretch: 88%;
	text-align: left;
	vertical-align: bottom;
	border: 0;
}
.mj-prose .mj-table td {
	padding: .7em .9em;
	vertical-align: top;
	border: 0;
	border-top: 1px solid var(--mj-line);
	background: var(--mj-paper);
}
.mj-prose .mj-table tbody tr:nth-child(even) td { background: var(--mj-bone-2); }
.mj-prose .mj-table tbody td:first-child { font-weight: 650; color: var(--mj-ink); }
.mj-prose .mj-table figcaption { padding: .6em .9em; margin: 0; }
@media (max-width: 760px) {
	.mj-prose .mj-table th:first-child,
	.mj-prose .mj-table td:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		box-shadow: 1px 0 0 var(--mj-line);
	}
	.mj-prose .mj-table::before {
		content: "Tabela przewija się w bok";
		position: sticky;
		left: 0;
		display: block;
		padding: .45em .9em;
		font-size: .8rem;
		color: var(--mj-muted);
		background: var(--mj-bone-2);
		border-bottom: 1px solid var(--mj-line);
	}
}

/* Boks „Przyda się …” (dawny inline style) */
.mj-prose .mj-shopbox {
	max-width: none;
	margin-block: 2em;
	border: 1px solid var(--mj-line);
	border-radius: var(--mj-r);
	background: var(--mj-paper);
	overflow: hidden;
}
.mj-shopbox__title {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: 0;
	padding: .85rem 1.1rem;
	background: var(--mj-bone);
	color: var(--mj-ink);
	font-weight: 750;
	font-stretch: 88%;
	font-size: 1.08rem;
	line-height: 1.3;
}
.mj-shopbox__title .mj-icon { flex: none; color: var(--mj-orange-deep); width: 22px; height: 22px; }
.mj-prose .mj-shopbox__list { margin: 0; padding: 0; list-style: none; max-width: none; }
.mj-prose .mj-shopbox__list > li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .6rem 1.2rem;
	margin: 0;
	padding: .85rem 1.1rem .85rem 2.3rem;
	position: relative;
	border-top: 1px solid var(--mj-line);
	font-size: 1rem;
	line-height: 1.5;
}
.mj-prose .mj-shopbox__list > li::marker { content: none; }
.mj-prose .mj-shopbox__list > li::before {
	content: "";
	position: absolute;
	left: 1.1rem;
	top: calc(.85rem + .6em);
	width: 7px;
	height: 7px;
	background: var(--mj-orange);
}
.mj-prose .mj-shopbox__list > li:first-child { border-top: 0; }
.mj-shopbox__text { flex: 1 1 260px; }
.mj-prose .mj-shopbox.has-aff .mj-shopbox__list > li { align-items: flex-start; }
.mj-prose .mj-shopbox.has-aff .mj-shopbox__list > li::before { top: calc(1rem + .6em); }
.mj-prose .mj-shopbox.has-aff .mj-shopbox__text { padding-top: .15rem; }

/* Przycisk partnerski z mu-plugina majsterowo-aff.php */
.mj-prose .mj-aff {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .9rem;
	margin: 1.4em 0;
	padding: .9rem 1.1rem;
	max-width: 42rem;
	background: var(--mj-orange-wash);
	border-left: 4px solid var(--mj-orange);
	border-radius: 0 var(--mj-r-s) var(--mj-r-s) 0;
}
.mj-prose .mj-shopbox .mj-aff {
	flex: none;
	flex-direction: column;
	align-items: flex-end;
	gap: .3rem;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}
.mj-prose .mj-aff .mj-aff__btn,
.mj-prose .mj-cta .mj-cta__btn {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: .55rem 1.15rem;
	border-radius: var(--mj-r-s);
	background: var(--mj-orange);
	color: var(--mj-ink);
	font-weight: 750;
	font-size: 1rem;
	line-height: 1.25;
	text-decoration: none;
	box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14);
}
.mj-prose .mj-aff .mj-aff__btn:hover,
.mj-prose .mj-aff .mj-aff__btn:focus-visible,
.mj-prose .mj-cta .mj-cta__btn:hover { background: var(--mj-ink); color: #fff; box-shadow: none; }
.mj-prose .mj-aff .mj-aff__note,
.mj-prose .mj-cta .mj-cta__note {
	display: inline-block;
	padding: .1em .45em;
	border: 1px solid #cdbfa9;
	border-radius: 2px;
	font-size: .78rem;
	line-height: 1.4;
	color: var(--mj-muted);
	background: var(--mj-paper);
}

/* [mj_cta] — nowy boks afiliacyjny */
.mj-prose .mj-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	max-width: none;
	margin-block: 2em;
	padding: 1.3rem 1.4rem;
	background: var(--mj-ink);
	border-radius: var(--mj-r);
	color: var(--mj-on-dark);
}
.mj-cta__text { flex: 1 1 320px; }
.mj-prose .mj-cta__title { margin: 0 0 .25rem; color: #fff; font-weight: 760; font-stretch: 85%; font-size: 1.25rem; line-height: 1.2; }
.mj-prose .mj-cta__desc { margin: 0; font-size: .97rem; line-height: 1.5; }
.mj-cta__action { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.mj-prose .mj-cta .mj-cta__note { background: transparent; border-color: var(--mj-ink-3); color: var(--mj-on-dark-2); }

/* BHP i ostrzeżenia: pas ostrzegawczy */
.mj-prose .mj-bhp {
	position: relative;
	padding: 1rem 1.2rem 1rem 1.6rem;
	background: #fff6ec;
	border-radius: 0 var(--mj-r-s) var(--mj-r-s) 0;
	font-size: 1.02rem;
	line-height: 1.6;
}
.mj-prose .mj-bhp::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 8px;
	background: repeating-linear-gradient(-45deg, var(--mj-ink) 0 6px, var(--mj-orange) 6px 12px);
}
.mj-prose .mj-bhp strong:first-child { color: var(--mj-orange-deep); }
.mj-prose blockquote.mj-bhp { border-left: 0; font-size: 1.02rem; }
.mj-prose blockquote.mj-bhp > :last-child { margin-bottom: 0; }
.mj-prose h2.mj-h-bhp::before,
.mj-prose h3.mj-h-bhp::before {
	width: 64px;
	height: 8px;
	background: repeating-linear-gradient(-45deg, var(--mj-ink) 0 6px, var(--mj-orange) 6px 12px);
}
.mj-prose h3.mj-h-bhp::before { content: ""; display: block; margin-bottom: .5em; }

/* FAQ */
.mj-prose .mj-faq { max-width: 42rem; margin-block: 2.4em 2em; }
.mj-prose .mj-faq h2 { margin-top: 0; }
.mj-faq__item { border-top: 1px solid var(--mj-line); }
.mj-faq__item:last-child { border-bottom: 1px solid var(--mj-line); }
.mj-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0;
	cursor: pointer;
	list-style: none;
}
.mj-faq__item summary::-webkit-details-marker { display: none; }
.mj-faq__item summary::after {
	content: "+";
	flex: none;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--mj-line);
	border-radius: var(--mj-r-s);
	color: var(--mj-orange-deep);
	font-size: 1.2rem;
	line-height: 1;
}
.mj-faq__item[open] summary::after { content: "–"; background: var(--mj-ink); border-color: var(--mj-ink); color: #fff; }
.mj-prose .mj-faq__item summary h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; }
.mj-faq__a { padding: 0 0 1rem; }
.mj-faq__a > :last-child { margin-bottom: 0; }

/* Metodologia przy rankingach */
.mj-prose .mj-method {
	display: flex;
	gap: 1rem;
	max-width: 42rem;
	margin-top: 2.5em;
	padding: 1.2rem 1.3rem;
	background: var(--mj-bone-2);
	border: 1px solid var(--mj-line);
	border-radius: var(--mj-r);
	font-size: 1rem;
	line-height: 1.6;
}
.mj-method__icon { flex: none; color: var(--mj-orange-deep); }
.mj-prose .mj-method p { margin: 0; }
.mj-prose .mj-method .mj-method__title { margin-bottom: .3rem; font-weight: 750; color: var(--mj-ink); }

/* Kalkulatory z mu-plugina: kolory marki zamiast bursztynu */
.mj-prose :is(.mag-farba, .mag-plyt, .mag-kalk) {
	--amber: #f2872e;
	--amber-deep: #a14a0b;
	--amber-wash: #fdf1e6;
	--grafit: #191713;
	--grafit-2: #2b2721;
	--ink: #191713;
	max-width: none;
	margin-block: 2.2em;
	font-family: var(--mj-font);
	scroll-margin-top: 24px;
}

/* Redakcja, powiązane, komentarze */
.mj-post-foot { padding-bottom: clamp(40px, 6vw, 64px); }
.mj-byline {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	max-width: 820px;
	margin-inline: auto;
	padding-top: 1.5rem;
	border-top: 2px solid var(--mj-ink);
}
.mj-byline__avatar { border-radius: 50%; flex: none; }
.mj-byline__name { margin: 0 0 .2rem; font-weight: 750; color: var(--mj-ink); }
.mj-byline__bio { margin: 0; color: var(--mj-muted); font-size: .97rem; line-height: 1.55; }
.mj-byline__bio a { color: var(--mj-ink); text-decoration-color: var(--mj-orange); text-underline-offset: 3px; }
.mj-related {
	padding-block: clamp(40px, 6vw, 72px);
	background: var(--mj-bone-2);
	border-top: 1px solid var(--mj-line);
}
.mj-related .mj-section-title { margin-bottom: 28px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.mj-comments { padding-block: clamp(40px, 6vw, 64px); }
.mj-comments .ct-comments { max-width: none; }

/* Strony (O nas, metodologia, polityka): wąska kolumna i te same nagłówki co we wpisach */
body.page #main { --theme-block-max-width: 46rem; --theme-block-wide-max-width: 46rem; }
body.page #main .hero-section,
body.page #main .entry-content { max-width: 46rem; margin-inline: auto; }
body.page .page-title { font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-stretch: 72%; font-weight: 800; line-height: 1.04; }
body.page .entry-content { font-size: 1.1rem; line-height: 1.7; }
body.page .entry-content h2 {
	margin-top: 2em;
	font-size: clamp(1.6rem, 2.8vw, 2rem);
	font-weight: 780;
	font-stretch: 76%;
	line-height: 1.1;
}
body.page .entry-content h2::before {
	content: "";
	display: block;
	width: 44px;
	height: 5px;
	margin-bottom: .55em;
	background: var(--mj-orange);
}
body.page .entry-content ul > li::marker { content: "■  "; font-size: .7em; color: var(--mj-orange); }
body.page .entry-content li { margin-bottom: .45em; }
body.page .entry-content a {
	color: var(--mj-ink);
	text-decoration: underline;
	text-decoration-color: var(--mj-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* Stopka: krój i obrys formularza w kolorach marki */
#footer.ct-footer { font-family: var(--mj-font); }


/* =====================================================================
   6b. Wpis v2: nagłówek na papierze, tabliczka, tabliczki ostrzegawcze, etykieta produktu
   ===================================================================== */
.mj-post-head { border-bottom: 1px solid var(--mj-line); margin-bottom: clamp(28px, 4vw, 48px); }
.mj-post-head > .mj-wrap { padding-block: clamp(18px, 3vw, 32px) clamp(28px, 4vw, 48px); }
.mj-post-head__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 1000px) {
	.mj-post-head__grid.has-media { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: end; }
}
.mj-post-head__title { max-width: 20ch; font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.mj-post-head__lead { color: var(--mj-text); }
.mj-tb--post { grid-template-columns: repeat(4, minmax(0, auto)); max-width: 640px; background: var(--mj-paper); }
.mj-tb--post .mj-tb__cell { border-bottom: 0; border-right: 1px solid var(--mj-ink); }
.mj-tb--post .mj-tb__cell:last-child { border-right: 0; }
.mj-tb--post dd { font-size: 1.05rem; font-weight: 700; font-stretch: 85%; line-height: 1.3; }
.mj-tb--post .mj-sticker { font-size: .78rem; margin-top: .1rem; }
.mj-post-head__media .mj-frame { box-shadow: 10px 10px 0 var(--mj-ink); }
.mj-post-head__media .mj-frame img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; max-height: none; }
.mj-post-head__media .mj-dim { margin-bottom: 16px; }

/* Tabliczka ostrzegawcza BHP (zamiast pasa) */
.mj-prose .mj-bhp {
	position: relative;
	padding: 1.05rem 1.2rem 1.05rem 4.4rem;
	background: #fff4e3;
	border: 2px solid var(--mj-ink);
	border-radius: 4px;
	box-shadow: 4px 4px 0 var(--mj-ink);
	font-size: 1.02rem;
	line-height: 1.6;
}
.mj-prose .mj-bhp::before {
	content: "";
	position: absolute;
	left: 1rem;
	top: 1rem;
	bottom: auto;
	width: 2.5rem;
	height: 2.2rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 35'%3E%3Cpath d='M20 2 38 33H2z' fill='%23f2872e' stroke='%23191713' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M20 12v10' stroke='%23191713' stroke-width='3.4' stroke-linecap='round'/%3E%3Ccircle cx='20' cy='27.5' r='2' fill='%23191713'/%3E%3C/svg%3E") 0 0 / contain no-repeat;
}
.mj-prose .mj-bhp::after {
	content: "";
	position: absolute;
	inset: 6px;
	pointer-events: none;
	background:
		radial-gradient(circle, #8a8174 1.6px, transparent 2.2px) 0 0 / 8px 8px no-repeat,
		radial-gradient(circle, #8a8174 1.6px, transparent 2.2px) 100% 0 / 8px 8px no-repeat,
		radial-gradient(circle, #8a8174 1.6px, transparent 2.2px) 0 100% / 8px 8px no-repeat,
		radial-gradient(circle, #8a8174 1.6px, transparent 2.2px) 100% 100% / 8px 8px no-repeat;
}
.mj-prose blockquote.mj-bhp { border-left: 2px solid var(--mj-ink); }
.mj-prose h2.mj-h-bhp::before,
.mj-prose h3.mj-h-bhp::before { background: repeating-linear-gradient(-45deg, var(--mj-ink) 0 6px, var(--mj-orange) 6px 12px); }

/* Boks zakupowy jako etykieta produktu */
.mj-prose .mj-shopbox {
	border: 2px solid var(--mj-ink);
	border-radius: 4px;
	box-shadow: 6px 6px 0 var(--mj-orange);
	overflow: visible;
}
.mj-shopbox__title {
	position: relative;
	background: var(--mj-ink);
	color: #fff;
	border-bottom: 2px dashed #8a8174;
	padding-block: .9rem;
}
.mj-shopbox__title .mj-icon { color: var(--mj-orange); }
.mj-shopbox__title::before,
.mj-shopbox__title::after {
	content: "";
	position: absolute;
	bottom: -9px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--mj-paper);
	border: 2px solid var(--mj-ink);
}
.mj-shopbox__title::before { left: -10px; clip-path: inset(0 0 0 50%); }
.mj-shopbox__title::after { right: -10px; clip-path: inset(0 50% 0 0); }

/* Metodologia z pieczątką */
.mj-prose .mj-method { position: relative; align-items: center; background: var(--mj-sheet); border: 1px solid var(--mj-ink); }
.mj-method__stamp { flex: none; width: 92px; height: 92px; }

/* Spis treści jak legenda arkusza */
.mj-toc__box { border-top: 3px solid var(--mj-ink); }
.mj-toc__list a::before { font-size: 1.05rem; }

/* Tabele: gruba ramka jak na rysunku */
.mj-prose .mj-table { border: 2px solid var(--mj-ink); border-radius: 0; }

/* Powiązane i komentarze */
.mj-related { background-color: var(--mj-sheet); }
.mj-byline { border-top: 3px solid var(--mj-ink); }

/* Strony statyczne: arkusz */
body.page #main .hero-section { padding-top: clamp(24px, 4vw, 48px); }

/* Stopka: grafit z siatką, działy w dwóch kolumnach */
html body #footer.ct-footer {
	background-image:
		linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 40px 40px;
}
html body #mjstr-foot .mj-foot-depts { columns: 2; column-gap: 1.4rem; }
html body #mjstr-foot .mj-foot-depts li { break-inside: avoid; }

/* =====================================================================
   7. Responsywność
   ===================================================================== */
@media (max-width: 760px) {
	html [data-header*="type-1"] { --header-height: 64px; }
	html [data-header*="type-1"] .ct-header [data-row*="middle"] { --height: 64px; }
	.site-logo-container img { max-height: 38px !important; }
	.mj-hub__icon { width: 48px; height: 48px; }
	.mj-search .mj-search__btn { padding: 0 1rem; }
	.mj-search .mj-search__input { font-size: 1rem; padding-left: 44px; }
	.mj-prose { font-size: 1.0625rem; }
	.mj-prose .mj-shopbox__list > li { padding-left: 2.1rem; }
	.mj-prose .mj-shopbox .mj-aff { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
	body.single-post::before { display: none; }
}

/* =====================================================================
   8. Responsywność v2
   ===================================================================== */
@media (max-width: 1099px) {
	.mj-depts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mj-calcgrid { grid-template-columns: 1fr; }
	.mj-calc { display: grid; grid-template-columns: 120px 1fr; column-gap: 20px; align-items: start; }
	.mj-calc__art { grid-row: span 3; width: 120px; margin: 0; }
	.mj-calc__btn { grid-column: 2; }
	.mj-how__grid, .mj-team__grid { grid-template-columns: 1fr; }
	.mj-how__facts { max-width: 520px; }
	.mj-bom__row { grid-template-columns: 44px minmax(0, 1fr) 130px 96px; }
	.mj-bom__cat { display: none; }
	.mj-bom__row--head span:nth-child(4) { display: none; }
}
@media (max-width: 860px) {
	.mj-hero { min-height: 0; }
	.mj-hero__inner { grid-template-columns: 1fr; padding-block: 220px 28px; gap: 28px; }
	.mj-hero__scrim {
		background: linear-gradient(180deg, rgba(25, 23, 19, .15) 0%, rgba(25, 23, 19, .55) 30%, rgba(25, 23, 19, .93) 58%, rgba(25, 23, 19, .97) 100%);
	}
	.mj-hero__poster, .mj-hero__video { object-position: 50% 30%; height: 64%; bottom: auto; }
	.mj-hero__poster { transform-origin: 55% 40%; animation: mj-kenburns 22s ease-in-out infinite alternate; }
	.mj-hub__grid { grid-template-columns: 1fr; }
	.mj-hub__media { max-width: 320px; }
}
@media (max-width: 760px) {
	.mj-hero__title { font-size: clamp(2.4rem, 11vw, 3.2rem); }
	.mj-hero__inner { padding-top: 200px; }
	.mj-tb dd { font-size: 1.6rem; }
	.mj-tb--post { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mj-tb--post .mj-tb__cell:nth-child(2) { border-right: 0; }
	.mj-tb--post .mj-tb__cell:nth-child(-n+2) { border-bottom: 1px solid var(--mj-ink); }
	.mj-steps { grid-template-columns: 1fr; gap: 26px; }
	.mj-dept__body { grid-template-columns: 1fr; padding: 10px 10px 12px; row-gap: 2px; }
	.mj-dept__icon { display: none; }
	.mj-dept__name { font-size: 1.08rem; }
	.mj-bom__row--head { display: none; }
	.mj-bom__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "typ date"; row-gap: 8px; padding: 12px; }
	.mj-bom__pos { display: none; }
	.mj-bom__title { grid-area: title; }
	.mj-bom__typ { grid-area: typ; }
	.mj-bom__date { grid-area: date; text-align: right; }
	.mj-calc { grid-template-columns: 1fr; }
	.mj-calc__art { grid-row: auto; width: 120px; margin-bottom: 12px; }
	.mj-calc__btn { grid-column: auto; justify-self: start; }
	.mj-how__facts { padding-top: 96px; }
	.mj-how__stamp { width: 104px; height: 104px; top: -8px; }
	.mj-prose .mj-bhp { padding-left: 3.9rem; }
	.mj-prose .mj-bhp::before { left: .8rem; width: 2.2rem; }
	.mj-method__stamp { width: 72px; height: 72px; }
}

/* =====================================================================
   9. Newsletter w stopce (mu-plugin majsterowo-newsletter.php, bez JS)
   ===================================================================== */
#footer .mj-nl { max-width: 470px; margin: 0 auto; text-align: left; font-family: var(--mj-font); }
#footer .mj-nl__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#footer .mj-nl__row { display: flex; }
#footer .mj-nl__email {
	flex: 1;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #5a534a;
	border-right: 0;
	border-radius: 3px 0 0 3px;
	background: #211e19;
	color: #fff;
	font: 500 1rem/1 var(--mj-font);
	box-shadow: none;
}
#footer .mj-nl__email::placeholder { color: #a59d90; }
#footer .mj-nl__email:focus { outline: 2px solid var(--mj-orange); outline-offset: 0; }
#footer .mj-nl__btn {
	flex: none;
	height: 48px;
	margin: 0;
	padding: 0 1.25rem;
	border: 0;
	border-radius: 0 3px 3px 0;
	background: var(--mj-orange);
	color: var(--mj-ink);
	font: 750 1rem/1 var(--mj-font);
	cursor: pointer;
	box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15);
}
#footer .mj-nl__btn:hover { background: #fff; }
#footer .mj-nl__consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: .75rem; font-size: .8rem; line-height: 1.45; color: #bfb6a8; cursor: pointer; }
#footer .mj-nl__consent input { flex: none; width: 17px; height: 17px; margin: .1rem 0 0; accent-color: var(--mj-orange); }
#footer .mj-nl__consent a { color: #f3efe7; text-decoration: underline; text-decoration-color: var(--mj-orange); text-underline-offset: 2px; }
#footer .mj-nl__msg { margin: .75rem 0 0; padding: .6rem .8rem; border-left: 3px solid; font-size: .9rem; line-height: 1.45; }
#footer .mj-nl__msg--ok { border-color: #6cc276; background: rgba(108, 194, 118, .12); color: #e7f5e8; }
#footer .mj-nl__msg--err { border-color: var(--mj-orange); background: rgba(242, 135, 46, .14); color: #fde9d6; }
