/* ==========================================================================
   Szablon JBiblioteka (Joomla 6)
   Wygląd: „PCJ JBiblioteka morski”; dostępność: WCAG 2.1 AA.
   Wszystkie rozmiary w rem – działa powiększanie A+/A- i powiększenie przeglądarki.
   ========================================================================== */

:root {
	--navy: #243680;
	--navy-dark: #1d2b66;
	--orange: #f28f0e;          /* tylko ozdobne linie */
	--orange-ui: #c46a00;       /* obramowania pól (min. 3:1) */
	--green: #12780f;           /* nagłówki (5,6:1 na białym) */
	--link: #0a640e;            /* linki w treści (7,4:1) */
	--link-hover: #063f09;
	--text: #000;
	--muted: #4a4a4a;
	--page: #ededed;
	--card: #fff;
	--rule: #dcdcdc;
	--focus: #243680;
	--focus-on-dark: #ffd34d;
	--footer: #2c2c2c;
	--shadow: 0 0 5px rgba(0, 0, 0, .2);
	--font-body: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	--font-head: 'Noto Serif', Georgia, 'Times New Roman', serif;
	--container: 71.25rem;      /* 1140 px */
	--gap: 1.875rem;            /* 30 px */
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--text);
	background: var(--footer);
	overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }
a { color: var(--link); text-decoration: underline; text-underline-offset: .15em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
p { margin: 0 0 1rem; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--green); line-height: 1.25; margin: 1.5rem 0 .75rem; font-weight: 700; }
h1 { font-size: 1.625rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.1875rem; }
h4 { font-size: 1.0625rem; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }
table { border-collapse: collapse; max-width: 100%; }
th, td { padding: .375rem .625rem; border: 1px solid var(--rule); vertical-align: top; }
th { background: #f5f5f5; text-align: left; }
blockquote { margin: 1rem 0; padding: .5rem 1rem; border-left: 4px solid var(--orange); background: #fafafa; }
::selection { background: var(--navy); color: #fff; }

/* Widoczny fokus (stary szablon go ukrywał: a:focus{outline:0}) */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.topbar :focus-visible, .site-footer__bar :focus-visible, .consent :focus-visible, .skip-links :focus-visible { outline-color: var(--focus-on-dark); }
main:focus, .col-left:focus { outline: none; }

.visually-hidden, .sr-only {
	position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
	margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.visually-hidden-focusable:not(:focus):not(:focus-within) { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 .9375rem; }
html[data-width="wide"] .container { max-width: 95%; }

/* ---------- Linki „Przejdź do…” ---------- */
.skip-links ul { list-style: none; margin: 0; padding: 0; }
.skip-links a {
	position: absolute; left: .5rem; top: -100vh; z-index: 10000;
	padding: .75rem 1.25rem; background: var(--navy-dark); color: #fff; font-weight: 700; text-decoration: underline;
}
.skip-links a:focus { top: .5rem; }

/* ---------- Pasek górny ---------- */
.topbar { background: var(--navy); color: #fff; border-bottom: 1px solid var(--orange); font-size: .8125rem; }
.topbar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 1.5rem; padding-top: .5rem; padding-bottom: .5rem; min-height: 4.5rem; }
.topbar a { color: #fff; }
.topbar p { margin: 0; }

.a11y-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
html.no-js .a11y-tools { display: none; }
.a11y-tools__group { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.a11y-tools__label { padding: 0 .25rem 0 .5rem; }
.tool {
	display: inline-flex; align-items: center; gap: .375rem; min-height: 1.75rem; min-width: 1.75rem; justify-content: center;
	padding: .125rem .375rem; border: 1px solid transparent; border-radius: 2px;
	background: transparent; color: #fff; font: inherit; line-height: 1.2; cursor: pointer;
}
.tool:hover { text-decoration: underline; }
.tool[aria-pressed="true"] { border-color: #fff; font-weight: 700; }
.tool--swatch { width: 1.875rem; font-weight: 400; border: 1px solid #fff; }
.tool--hc1 { background: #000; color: #fff; }
.tool--hc2 { background: #000; color: #ff0; }
.tool--hc3 { background: #ff0; color: #000; }
.tool--swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px #fff; }
.tool--box { border: 1px solid #fff; background: var(--navy-dark); width: 1.875rem; }
.tool--box[aria-pressed="true"] { background: #fff; color: var(--navy); }
.tool--font { font-weight: 700; padding: .125rem .25rem; min-width: 1.5rem; }
.tool__icon { display: inline-block; width: .875rem; height: .875rem; flex: none; background: currentColor; }
.tool__icon--sun { border-radius: 50%; width: .625rem; height: .625rem; box-shadow: 0 0 0 2px var(--navy), 0 0 0 3px currentColor; }
.tool__icon--half { border-radius: 50%; border: 2px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.tool__icon--fixed { background: repeating-linear-gradient(currentColor 0 2px, transparent 2px 4px); width: .625rem; }
.tool__icon--wide { background: repeating-linear-gradient(currentColor 0 2px, transparent 2px 4px); width: 1rem; }
.tool__icon--print { width: 1rem; height: 1rem; background: none; position: relative; border: 2px solid currentColor; border-radius: 2px; }

.topbar__mod--2 { display: flex; }
/* Ikony katalogów, Facebook, BIP (lista z modułu „top logosy”) */
.topbar .logo-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 2.25rem; list-style: none; margin: 0; padding: 0; }
.topbar .logo-list img { max-height: 3.125rem; width: auto; }
.topbar .logo-list a { display: inline-block; }

/* ---------- Pasek z wyszukiwarką ---------- */
.brandbar { background: #fff; border-bottom: 2px solid var(--orange); }
.brandbar__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5.75rem; padding-top: 1rem; padding-bottom: 1rem; }
.brandbar__logo img { max-height: 4rem; width: auto; }
.brandbar__search { margin-left: auto; width: min(100%, 15rem); }
.brandbar__search form { margin: 0; }
.brandbar__search .mod-finder__search, .brandbar__search .input-group { display: flex; }
.brandbar__search input[type="search"], .brandbar__search input[type="text"] {
	flex: 1; min-width: 0; height: 2.75rem; padding: .375rem .75rem; font: inherit; font-size: .875rem;
	border: 1px solid var(--orange-ui); border-right: 0; border-radius: 0; background: #fff; color: var(--text);
}
.brandbar__search input::placeholder { color: #595959; opacity: 1; }
.brandbar__search button {
	flex: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--orange-ui); border-radius: 0;
	background: #fff; color: var(--navy); cursor: pointer; font-size: 1rem;
}
.brandbar__search button:hover { background: var(--navy); color: #fff; }
.brandbar__search button .icon-search { margin: 0; }
.brandbar__search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* ---------- Strona ---------- */
.page { padding-top: var(--gap); padding-bottom: var(--gap); }
.page.container { max-width: none; background: var(--page); }
.page > * { max-width: calc(var(--container) - 1.875rem); margin-left: auto; margin-right: auto; }
html[data-width="wide"] .page > * { max-width: 95%; }

.layout { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 62.5em) {
	.layout.has-left { grid-template-columns: var(--jb-left) minmax(0, 1fr); }
	.layout.has-right { grid-template-columns: minmax(0, 1fr) var(--jb-right); }
	.layout.has-left.has-right { grid-template-columns: var(--jb-left) minmax(0, 1fr) var(--jb-right); }
}
@media (min-width: 45em) and (max-width: 62.4375em) {
	.layout.has-left { grid-template-columns: var(--jb-left) minmax(0, 1fr); }
	.layout.has-left .col-right { grid-column: 1 / -1; }
}

/* Karta z zagiętym narożnikiem (jak w starym szablonie) */
.card, .jb-module {
	position: relative; background: var(--card); border: 1px solid #f4f4f4; box-shadow: var(--shadow);
}
.card::before, .jb-module::before {
	content: ""; position: absolute; top: -1px; right: -1px; width: 1.25rem; height: 1.25rem; pointer-events: none;
	background: linear-gradient(to bottom left, var(--page) 50%, var(--orange) 50%, var(--orange) calc(50% + 1px), transparent calc(50% + 1.5px));
}
.jb-module { margin-bottom: var(--gap); }
.jb-module__body { padding: 0 var(--gap) var(--gap); }
.jb-module--notitle > .jb-module__body { padding-top: var(--gap); }
.jb-module__body > :last-child { margin-bottom: 0; }

/* Tytuł modułu i strony: zielony szeryf z podwójną linią po prawej */
.jb-module__title, .page-title, .com-content-category-blog > .page-header h1 {
	display: flex; align-items: center; gap: .9375rem;
	margin: 0; padding: 1.875rem var(--gap); font-family: var(--font-head); font-size: 1rem; font-weight: 700; line-height: 1.2; color: var(--green);
}
.jb-module__title::after, .page-title::after, .com-content-category-blog > .page-header h1::after {
	content: ""; flex: 1 1 2rem; min-width: 2rem; height: 4px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.card--main { padding: 0 var(--gap) var(--gap); min-height: 20rem; }
.card--main .page-title, .card--main .com-content-category-blog > .page-header h1 { padding-left: 0; padding-right: 0; }
.card--main > .page-header:first-child h1, .card--main > :first-child { margin-top: 0; }

/* Pas pod nagłówkiem: nazwa biblioteki + logo */
.page-top .jb-module__body { text-align: center; }
.page-top .jb-module__body p:empty, .page-top .jb-module__body p:has(> br:only-child) { display: none; }
.page-top img { max-height: 8.5rem; width: auto; }

/* ---------- Menu główne ---------- */
.col-left .mod-menu, .col-left .menu { list-style: none; margin: 0; padding: 0; }
.col-left .mod-menu li { margin: 0; padding: 0; border-bottom: 1px solid var(--rule); position: relative; }
.col-left .mod-menu li:last-child { border-bottom: 0; }
.col-left .mod-menu a, .col-left .mod-menu .mod-menu__separator, .col-left .mod-menu .mod-menu__heading {
	display: block; padding: .75rem 0; color: var(--text); text-decoration: none; font-size: .9375rem; line-height: 1.35;
}
.col-left .mod-menu a:hover { color: var(--link); text-decoration: underline; }
.col-left .mod-menu li.current > a, .col-left .mod-menu li.active > a { color: var(--link); font-weight: 600; padding-left: .625rem; border-left: 3px solid var(--orange); }
.col-left .mod-menu ul { list-style: none; margin: 0 0 .5rem; padding: 0 0 0 1rem; }
.col-left .mod-menu ul li { border-bottom: 0; }
.col-left .mod-menu ul a { padding: .375rem 0; font-size: .875rem; }
.col-left .mod-menu { display: block; }
.col-left .mod-menu > li { display: block; }
.col-left .mod-menu li.parent > a { padding-right: 2.75rem; }
.col-left .mod-menu__toggle-sub {
	position: absolute; right: 0; top: .5rem; width: 2rem; height: 2rem; justify-content: center;
	border: 1px solid var(--rule); background: var(--card); color: var(--text); cursor: pointer; font-size: 1.125rem; line-height: 1;
}
.col-left .mod-menu__toggle-sub:hover { border-color: var(--link); color: var(--link); }
.col-left .mod-menu__toggle-sub [class*="icon-"] { display: none; }
.col-left .mod-menu__toggle-sub::before { content: "+"; }
.col-left .mod-menu__toggle-sub[aria-expanded="true"]::before { content: "−"; }
.col-left .mod-menu__sub { padding-top: 0; }

/* Przycisk rozwijania menu na telefonie */
.menu-disclosure {
	display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem;
	padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.menu-disclosure__icon { flex: none; width: 2rem; height: 2rem; border: 1px solid var(--rule); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body); }
.menu-disclosure[aria-expanded="true"] .menu-disclosure__icon::before { content: "−"; }
.menu-disclosure[aria-expanded="false"] .menu-disclosure__icon::before { content: "+"; }

/* ---------- Kolumna prawa: logotypy ---------- */
.col-right .logo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.875rem; justify-items: center; }
.col-right .logo-list a { display: inline-block; }
.col-right .logo-list img { max-width: 100%; }

/* ---------- Okruszki ---------- */
.mod-breadcrumbs__wrapper { margin: 1rem 0 0; font-size: .8125rem; }
.mod-breadcrumbs, .breadcrumb { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.mod-breadcrumbs li + li::before, .breadcrumb-item + .breadcrumb-item::before { content: "›"; padding: 0 .5rem; color: var(--muted); }
.mod-breadcrumbs__here { margin-right: .375rem; }

/* ---------- Treść: blog ---------- */
.blog-items { display: grid; gap: 2.5rem var(--gap); margin-bottom: 1rem; }
@media (min-width: 36em) {
	.blog-items[class*="masonry-2"], .blog-items[class*="columns-2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.blog-items[class*="masonry-3"], .blog-items[class*="columns-3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62.5em) {
	.blog-items[class*="masonry-3"], .blog-items[class*="columns-3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.items-leading { margin-bottom: 2.5rem; }
.items-leading .blog-item + .blog-item { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.blog-item .page-header h2, .blog-item h2:first-child { margin: 0 0 .75rem; font-size: 1.0625rem; line-height: 1.3; }
.blog-item .page-header h2 a { color: var(--green); text-decoration: none; }
.blog-item .page-header h2 a:hover { text-decoration: underline; }
.blog-item .item-image { margin: 0 0 1rem; float: none; }
.blog-item .item-image img { display: block; }
.blog-item .item-content { font-size: .9375rem; }
.readmore { margin: .75rem 0 0; }
.readmore a, .readmore .btn {
	display: inline; padding: 0; border: 0; background: none; color: var(--text);
	font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
}
.readmore a:hover { color: var(--link); text-decoration: underline; }
.readmore [class^="icon-"] { display: none; }
.com-content-category-blog__links, .items-more { margin-top: 1.5rem; }
.items-more h2, .items-more h3 { font-size: 1rem; }

.badge { display: inline-block; padding: .125rem .5rem; font-size: .75rem; background: #fff3cd; color: #5c4400; border: 1px solid #c9a227; }

/* ---------- Treść: artykuł ---------- */
.com-content-article .page-header h1, .com-content-article .page-header h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.com-content-article .page-header h1 { padding-top: 1.875rem; }
.com-content-article__body { font-size: 1rem; }
.com-content-article__body img { height: auto; }
.com-content-article .item-image { margin: 0 0 1.25rem; }
.page-actions { display: flex; justify-content: flex-end; padding-top: 1.25rem; margin-bottom: -2.5rem; position: relative; z-index: 1; }
.page-actions__print {
	display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .75rem; min-height: 2.25rem;
	border: 1px solid var(--rule); background: #fff; color: var(--text); font: inherit; font-size: .8125rem; cursor: pointer;
}
.page-actions__print:hover { border-color: var(--link); color: var(--link); }
.view-article .com-content-article .page-header { padding-right: 7rem; }
.pagenavigation { margin-top: 2rem; }
.pagenavigation .pagination { display: flex; justify-content: space-between; gap: 1rem; }
.pagenavigation a { display: inline-flex; align-items: center; gap: .375rem; padding: .375rem .75rem; border: 2px solid var(--link); color: var(--link); text-decoration: none; font-size: .875rem; }
.pagenavigation a:hover { background: var(--link); color: #fff; }
.article-info { font-size: .8125rem; color: var(--muted); }
.article-info dt { display: none; }
.article-info dd { display: inline; margin: 0 1rem 0 0; }
.fields-container { list-style: none; padding: 0; }

/* Tabele w treści przewijają się poziomo na telefonie zamiast rozpychać stronę */
.com-content-article__body table, .item-content table { display: block; overflow-x: auto; }

/* ---------- Paginacja ---------- */
.com-content-category-blog__navigation, .pagination__wrapper { text-align: center; margin-top: 2rem; }
.com-content-category-blog__counter, .counter { font-size: .875rem; margin: 0 0 .5rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; list-style: none; margin: 0; padding: 0; }
.pagination .page-link, .pagination li > span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .5rem;
	border: 2px solid var(--link); background: #fff; color: var(--link); font-family: var(--font-head); font-size: .875rem; text-decoration: none;
}
.pagination a.page-link:hover { background: #e6f2e6; }
.pagination .active .page-link, .pagination [aria-current] { background: var(--link); color: #fff; }
.pagination .disabled .page-link { border-color: #9a9a9a; color: #595959; background: #f5f5f5; }

/* ---------- Formularze, przyciski, komunikaty ---------- */
input, select, textarea, button { font: inherit; }
.form-control, .form-select, input[type="text"], input[type="email"], input[type="search"], input[type="password"], input[type="tel"], textarea, select {
	max-width: 100%; padding: .5rem .75rem; border: 1px solid #767676; border-radius: 2px; background: #fff; color: var(--text);
}
label, .form-label { font-weight: 600; }
.btn, .btn-jb, button.btn, input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; gap: .375rem; min-height: 2.5rem; padding: .375rem 1rem;
	border: 2px solid var(--navy); border-radius: 2px; background: #fff; color: var(--navy); font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover, .btn-jb:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn-primary, .btn-jb--primary { background: var(--navy); color: #fff; }
.alert, joomla-alert { display: block; padding: 1rem 1.25rem; margin: 1rem 0; border: 1px solid #b6b6b6; border-left-width: 6px; background: #fff; color: var(--text); }
.alert-success, joomla-alert[type="success"] { border-left-color: #1e7e34; }
.alert-danger, .alert-error, joomla-alert[type="danger"] { border-left-color: #b00020; }
.alert-warning, joomla-alert[type="warning"] { border-left-color: #a35f00; }
.alert-info, joomla-alert[type="info"] { border-left-color: var(--navy); }
.linklike { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Wyniki wyszukiwania */
.com-finder__results-list { list-style: none; padding: 0; }
.com-finder__results-list li { margin-bottom: 1.5rem; }
.result__title { font-size: 1.0625rem; margin-bottom: .25rem; }
.result__taxonomy, .result__date, .result__url { font-size: .8125rem; color: var(--muted); }
.awesomplete > ul { background: #fff; border: 1px solid #767676; }

/* ---------- Dół strony ---------- */
.bottom { background: var(--page); padding: 0 0 var(--gap); }
.bottom .jb-module { margin-bottom: 0; }
.bottom .jb-module + .jb-module { margin-top: var(--gap); }

.site-footer { color: #e0e0e0; }
.site-footer__mods { background: var(--page); padding-bottom: var(--gap); color: var(--text); }
.site-footer__partners { background: #f3f3f3; color: #4a4a4a; text-align: center; padding: 1.875rem 0 1.25rem; font-size: .8125rem; }
.partner-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.875rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.partner-logos img { height: 3.125rem; width: auto; }
.site-footer__partners p { margin: 0; }
.site-footer__bar { background: var(--footer); padding: 1.5rem 0; font-size: .8125rem; }
.site-footer__bar-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 2rem; }
.site-footer__bar p { margin: 0; }
.site-footer__bar a, .site-footer__bar .linklike { color: #fff; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; margin: 0; padding: 0; }

/* ---------- Baner zgody na cookies ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; background: var(--navy-dark); color: #fff; box-shadow: 0 -2px 8px rgba(0, 0, 0, .35); border-top: 3px solid var(--orange); }
.consent[hidden] { display: none; }
.consent__in { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.consent__title { flex: 1 0 100%; margin: 0; font-size: 1rem; color: #fff; }
.consent__text { flex: 1 1 30rem; margin: 0; font-size: .875rem; }
.consent a { color: #fff; }
.consent__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.consent .btn-jb { border-color: #fff; background: transparent; color: #fff; }
.consent .btn-jb--primary { background: #fff; color: var(--navy-dark); }
.consent .btn-jb:hover { background: #fff; color: var(--navy-dark); }
body.has-consent-banner { padding-bottom: 9rem; }

/* ==========================================================================
   Układ na telefonach i tabletach
   ========================================================================== */
@media (max-width: 44.9375em) {
	:root { --gap: 1.25rem; }
	.topbar__in { justify-content: center; min-height: 0; }
	.a11y-tools { justify-content: center; }
	.topbar__mod { width: 100%; }
	.topbar .logo-list { justify-content: center; gap: .5rem 1.25rem; }
	.topbar .logo-list img { max-height: 2.75rem; }
	.brandbar__in { min-height: 0; }
	.brandbar__search { width: 100%; }
	.card--main { padding: 0 1rem 1.25rem; }
	.jb-module__title, .page-title { padding: 1.25rem var(--gap); }
	.jb-module__body { padding: 0 var(--gap) var(--gap); }
	.view-article .com-content-article .page-header { padding-right: 0; }
	.page-actions { margin-bottom: 0; }
	.site-footer__bar-in { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Tryb nocny (przyciemniony)
   ========================================================================== */
html[data-contrast="night"] {
	--page: #bebebe;
	--card: #e3e3e3;
	--rule: #9e9e9e;
	--green: #0b4f09;
	--link: #000;
	--link-hover: #000;
}
html[data-contrast="night"] .brandbar { background: #ccc; }
html[data-contrast="night"] .topbar { background: var(--navy-dark); }
html[data-contrast="night"] .card, html[data-contrast="night"] .jb-module { border-color: #cfcfcf; }
html[data-contrast="night"] img { filter: brightness(.9); }
html[data-contrast="night"] .site-footer__partners { background: #cfcfcf; }
html[data-contrast="night"] .pagination .page-link, html[data-contrast="night"] .submenu-toggle, html[data-contrast="night"] .page-actions__print { background: #e3e3e3; }

/* ==========================================================================
   Wysoki kontrast: biały na czarnym (hc1), żółty na czarnym (hc2), czarny na żółtym (hc3)
   Nadpisuje także kolory wpisane w treść artykułów.
   ========================================================================== */
html[data-contrast="hc1"] { --hc-bg: #000; --hc-fg: #fff; --hc-link: #fff; }
html[data-contrast="hc2"] { --hc-bg: #000; --hc-fg: #ff0; --hc-link: #ff0; }
html[data-contrast="hc3"] { --hc-bg: #ff0; --hc-fg: #000; --hc-link: #000; }

html[data-contrast^="hc"] { --focus: var(--hc-fg); --focus-on-dark: var(--hc-fg); background: var(--hc-bg); }
html[data-contrast^="hc"] body,
html[data-contrast^="hc"] body *:not(img):not(svg):not(svg *):not(.tool--swatch) {
	background-color: var(--hc-bg) !important;
	background-image: none !important;
	color: var(--hc-fg) !important;
	border-color: var(--hc-fg) !important;
	text-shadow: none !important;
	box-shadow: none !important;
}
html[data-contrast^="hc"] a, html[data-contrast^="hc"] a * { color: var(--hc-link) !important; text-decoration: underline !important; }
html[data-contrast^="hc"] a:hover { text-decoration-thickness: 3px !important; }
html[data-contrast^="hc"] .card, html[data-contrast^="hc"] .jb-module, html[data-contrast^="hc"] .brandbar,
html[data-contrast^="hc"] .topbar, html[data-contrast^="hc"] .consent, html[data-contrast^="hc"] .site-footer__bar { border: 1px solid var(--hc-fg) !important; }
html[data-contrast^="hc"] .card::before, html[data-contrast^="hc"] .jb-module::before { display: none; }
html[data-contrast^="hc"] .jb-module__title::after, html[data-contrast^="hc"] .page-title::after { border-color: var(--hc-fg) !important; }
html[data-contrast^="hc"] .pagination .active .page-link, html[data-contrast^="hc"] .pagination [aria-current],
html[data-contrast^="hc"] .tool[aria-pressed="true"]:not(.tool--swatch), html[data-contrast^="hc"] .btn-jb--primary {
	background-color: var(--hc-fg) !important; color: var(--hc-bg) !important;
}
html[data-contrast^="hc"] .tool__icon { background-color: currentColor !important; }
html[data-contrast^="hc"] .tool__icon--half { background: linear-gradient(90deg, currentColor 50%, transparent 50%) !important; }
html[data-contrast^="hc"] .tool__icon--fixed, html[data-contrast^="hc"] .tool__icon--wide { background: repeating-linear-gradient(currentColor 0 2px, transparent 2px 4px) !important; }
html[data-contrast^="hc"] .tool__icon--print, html[data-contrast^="hc"] .tool__icon--sun { background: none !important; }
html[data-contrast^="hc"] input::placeholder { color: var(--hc-fg) !important; }
html[data-contrast^="hc"] .tool--swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--hc-bg), 0 0 0 4px var(--hc-fg) !important; }
html[data-contrast^="hc"] img { background: #fff; }

/* ==========================================================================
   Ograniczony ruch i tryb wymuszonych kolorów systemu
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
@media (forced-colors: active) {
	.card::before, .jb-module::before { display: none; }
	.tool[aria-pressed="true"] { outline: 2px solid CanvasText; }
}

/* Paginacja bloga: licznik nad przyciskami */
.com-content-category-blog__navigation { display: flex; flex-direction: column-reverse; align-items: center; gap: .5rem; }
.com-content-category-blog__counter { float: none !important; padding: 0 !important; margin: 0; }

/* Tytuł menu jako przycisk na telefonie: bez linii ozdobnej */
.jb-module__title:has(.menu-disclosure)::after { display: none; }
@media (max-width: 44.9375em) {
	.a11y-tools__group { flex-wrap: nowrap; }
	.a11y-tools { gap: .5rem .75rem; }
}
