/* Świadome Editorial Premium 1.0.0 | moduły czytelnicze */
body.single-post article.type-post.swep-article {
  --swep-accent: var(--sw-accent, #35685d);
  --swep-head: var(--sw-head, #192d3a);
  --swep-line: var(--sw-line, #dce5e0);
  --swep-soft: var(--sw-soft, #f3f6f2);
  --swep-brass: var(--sw-brass, #b28b50);
  --swep-font: var(--sw-font, system-ui, -apple-system, "Segoe UI", Arial, sans-serif);
  --swep-text-size: 18px;
  --swep-lead-size: 22px;
  --swep-initial-size: 78px;
}
body.single-post #primary article.type-post .swep-comfort,
body.single-post article.type-post .swep-comfort {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  width: 100%;
  max-width: var(--sw-width,860px);
  margin: 0 auto 20px;
  padding: 10px 0;
  border-block: 1px solid var(--swep-line);
  color: #475b57;
  font: 500 13px/1.5 var(--swep-font);
}
.swep-reading-info,.swep-controls {display:flex;align-items:center;gap:7px;flex-wrap:wrap;}
.swep-reading-info svg {display:block;width:19px;height:19px;flex:none;color:var(--swep-accent);}
body.single-post article.type-post .swep-comfort button.swep-button {
  display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
  min-width:36px;min-height:36px;padding:5px 9px;margin:0;
  border:1px solid var(--swep-line);border-radius:5px;
  background:#fff;color:var(--swep-head);font:600 13px/1.3 var(--swep-font);
  text-transform:none;letter-spacing:normal;box-shadow:none;cursor:pointer;
}
body.single-post article.type-post .swep-comfort button.swep-button:hover:not(:disabled),
body.single-post article.type-post .swep-comfort button.swep-button[aria-pressed="true"] {background:var(--swep-accent);border-color:var(--swep-accent);color:#fff;}
body.single-post article.type-post .swep-comfort button.swep-button:disabled {opacity:.45;cursor:default;}
body.single-post article.type-post .swep-comfort button:focus-visible,
body.single-post article.type-post .swep-toc :is(a,summary):focus-visible {outline:2px solid var(--swep-accent);outline-offset:3px;}
.swep-font-status {min-width:37px;text-align:center;font-variant-numeric:tabular-nums;}
body.single-post #primary article.type-post .entry-content > details.swep-toc,
body.single-post article.type-post .entry-content > details.swep-toc {
  box-sizing:border-box;width:100%;max-width:var(--sw-width,860px);margin:0 auto 38px;
  padding:0;border:1px solid var(--swep-line);border-radius:7px;
  background:#fff;color:var(--swep-head);font:400 16px/1.55 var(--swep-font);
}
body.single-post article.type-post .entry-content details.swep-toc > summary.swep-toc-summary {
  list-style:none;display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:17px 20px;margin:0;cursor:pointer;color:var(--swep-head);font-weight:600;
}
.swep-toc-summary::-webkit-details-marker {display:none;}
.swep-toc-summary::before {content:"";width:4px;height:25px;border-radius:2px;flex:none;background:linear-gradient(to bottom,var(--swep-brass) 0 7px,var(--swep-accent) 7px 100%);}
.swep-toc-summary::after {content:"";width:8px;height:8px;flex:none;border-right:2px solid var(--swep-accent);border-bottom:2px solid var(--swep-accent);transform:rotate(45deg);margin-right:3px;margin-bottom:4px;}
.swep-toc[open] > .swep-toc-summary::after {transform:rotate(225deg);margin-bottom:-4px;}
.swep-toc-title {font-size:17px;}
.swep-toc-count {font-size:13px;font-weight:400;color:#53645f;margin-left:auto;}
body.single-post article.type-post .swep-toc-nav {padding:4px 23px 20px;border-top:1px solid var(--swep-line);}
body.single-post article.type-post .swep-toc ol {margin:0;padding:0 0 0 22px;list-style-type:decimal;}
body.single-post article.type-post .swep-toc ol.swep-toc-sublist {list-style-type:lower-alpha;margin-top:8px;}
body.single-post article.type-post .swep-toc li {margin:9px 0;padding-left:4px;}
body.single-post article.type-post .swep-toc li::marker {color:var(--swep-accent);font-weight:600;}
body.single-post article.type-post .entry-content .swep-toc a {color:var(--swep-head);text-decoration:none;font-weight:500;overflow-wrap:anywhere;}
body.single-post article.type-post .entry-content .swep-toc a:hover {color:var(--swep-accent);text-decoration:underline;text-underline-offset:3px;}
body.single-post article.type-post .swep-anchor {scroll-margin-top:100px;}
.swep-progress {position:fixed;left:0;right:0;top:0;height:4px;z-index:9990;pointer-events:none;background:rgba(53,104,93,.13);}
.swep-progress[hidden] {display:none!important;}
.swep-progress-fill {height:100%;background:linear-gradient(90deg,#35685d 0 88%,#b28b50 88% 100%);transform-origin:left center;transform:scaleX(0);}
/* Tylko po zmianie rozmiaru przez czytelnika. Domyślna typografia pozostaje bez zmian. */
body.single-post #primary article.type-post.swep-font-adjusted .entry-content,
body.single-post article.type-post.swep-font-adjusted .entry-content {font-size:calc(var(--swep-text-size) * var(--swep-scale,1)) !important;}
body.single-post #primary article.type-post.swep-font-adjusted .entry-content > p:is(.article-lead,.editorial-lead,.is-style-article-lead),
body.single-post #primary article.type-post.swep-font-adjusted .entry-content:not(:has(> p:is(.article-lead,.editorial-lead,.is-style-article-lead))) > p:first-of-type:not(.no-lead,.has-background,.has-text-align-center,.has-text-align-right,h1 ~ p,h2 ~ p,h3 ~ p,h4 ~ p,h5 ~ p,h6 ~ p) {font-size:calc(var(--swep-lead-size) * var(--swep-scale,1)) !important;}
body.single-post #primary article.type-post.swep-font-adjusted .entry-content > p:is(.article-lead,.editorial-lead,.is-style-article-lead)::first-letter,
body.single-post #primary article.type-post.swep-font-adjusted .entry-content:not(:has(> p:is(.article-lead,.editorial-lead,.is-style-article-lead))) > p:first-of-type:not(.no-lead,.has-background,.has-text-align-center,.has-text-align-right,h1 ~ p,h2 ~ p,h3 ~ p,h4 ~ p,h5 ~ p,h6 ~ p)::first-letter {font-size:calc(var(--swep-initial-size) * var(--swep-scale,1));}
body.single-post #primary article.type-post.swep-font-adjusted .entry-content .editorial-callout {font-size:calc(17px * var(--swep-scale,1));}
body.single-post #primary article.type-post.swep-font-adjusted .entry-content .editorial-callout > p:first-child {font-size:calc(18px * var(--swep-scale,1));}
body.single-post #primary article.type-post.swep-font-adjusted .entry-content .wp-block-table table {font-size:calc(15px * var(--swep-scale,1));}
body.single-post #primary article.type-post.swep-font-adjusted .entry-content figcaption {font-size:calc(14px * var(--swep-scale,1));}
body.single-post #primary article.type-post.swep-font-adjusted .entry-content .swep-toc-nav {font-size:calc(16px * var(--swep-scale,1));}
/* Kontrast ograniczony do artykułu: zachowuje semantyczne tła i białe litery na ciemnych blokach. */
body.single-post article.type-post.swep-high-contrast {--sw-head:#101820;--sw-text:#141414;--sw-accent:#164c3f;--sw-soft:#f0f3f0;--sw-line:#86928d;--swep-head:#101820;--swep-accent:#164c3f;--swep-line:#86928d;--swep-soft:#f0f3f0;background:#fff !important;}
body.single-post #primary article.type-post.swep-high-contrast .entry-content {color:#141414;}
body.single-post #primary article.type-post.swep-high-contrast .entry-content > p:not(.has-text-color,.has-background),
body.single-post #primary article.type-post.swep-high-contrast .entry-content > :is(ul,ol):not(.has-text-color,.has-background) {color:#141414 !important;}
body.single-post #primary article.type-post.swep-high-contrast .entry-content > p:not(.has-background) a:not(.wp-element-button,.wp-block-button__link),
body.single-post #primary article.type-post.swep-high-contrast .entry-content > :is(ul,ol):not(.has-background) a:not(.wp-element-button,.wp-block-button__link) {color:#124b3c;text-decoration:underline;text-decoration-thickness:2px;}
body.single-post #primary article.type-post.swep-high-contrast .entry-content figcaption {color:#26332e;}
@media (max-width:600px) {
  body.single-post article.type-post.swep-article {--swep-text-size:17px;--swep-lead-size:19px;--swep-initial-size:60px;}
  body.single-post article.type-post .swep-comfort {gap:8px;padding:10px 0;margin-bottom:16px;}
  body.single-post article.type-post .swep-comfort button.swep-button {min-width:40px;min-height:44px;}
  .swep-controls {gap:5px;}
  body.single-post article.type-post .entry-content details.swep-toc > summary.swep-toc-summary {padding:14px;}
  body.single-post article.type-post .swep-toc-nav {padding:4px 15px 15px;}
  body.single-post #primary article.type-post.swep-font-adjusted .entry-content .editorial-callout {font-size:calc(16px * var(--swep-scale,1));}
}
@media print {.swep-comfort,.swep-progress,.swep-toc {display:none!important;}}
