/* ============================================
   maseo360 — Blog Post Template (Poradnik)
   Uses tokens from styles.css
   ============================================ */

/* ---------- POST HEADER ---------- */
.post-head {
  padding: 8px 0 40px;
}
.post-head__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.post-head__cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.post-head__cat:hover { background: var(--accent); color: var(--accent-ink); }
.post-head__cat--outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}
.post-head__cat--outline:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

.post-head__h1 {
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  max-width: 22ch;
  margin: 0 0 28px;
}
.post-head__h1 em { font-style: normal; color: var(--accent); }

.post-head__lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 32px;
}

.post-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.post-head__author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.post-head__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-warm-deep);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
}
.post-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-head__author-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.2;
}
.post-head__author-txt strong { font-weight: 500; font-size: 15px; color: var(--ink); }
.post-head__author-txt span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.post-head__meta-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--muted-soft);
}
.post-head__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.post-head__meta-item svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.post-head__share {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
}
.post-head__share a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.post-head__share a:hover {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.post-head__share svg { width: 15px; height: 15px; }

/* ---------- POST COVER ---------- */
.post-cover {
  margin: 32px 0 48px;
  position: relative;
  aspect-ratio: 16/5;
  max-height: 360px;
  background: var(--bg-warm-deep);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}
.post-cover::before {
  content: "";
  position: absolute; inset: 16px;
  border: 1px dashed rgba(10,10,10,0.18);
  border-radius: 18px;
  pointer-events: none;
}
.post-cover::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 28px, rgba(10,10,10,0.035) 28px 29px);
  pointer-events: none;
}
.post-cover__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  z-index: 1;
  padding: 10px 18px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.post-cover__caption {
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  z-index: 2;
}

/* ---------- INLINE TOC (before scroll) ---------- */
.post-toc-inline {
  margin: 0 0 64px;
  padding: 32px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
}
.post-toc-inline::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--r-lg) - 8px);
  pointer-events: none;
}
.post-toc-inline__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}
.post-toc-inline__head h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.post-toc-inline__head h3::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(0,208,132,0.18);
}
.post-toc-inline__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-toc-inline__list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(5, auto);
  gap: 2px 28px;
  counter-reset: tocinline;
  position: relative;
}
@media (max-width: 720px) { .post-toc-inline__list { grid-template-columns: 1fr; } }
.post-toc-inline__list li {
  counter-increment: tocinline;
}
.post-toc-inline__list a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px dashed transparent;
  line-height: 1.45;
  transition: color 0.15s, border-color 0.15s, padding 0.15s;
}
.post-toc-inline__list a::before {
  content: counter(tocinline, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  padding-top: 3px;
  flex-shrink: 0;
}
.post-toc-inline__list a:hover {
  color: var(--accent);
  padding-left: 4px;
}

/* ---------- POST BODY LAYOUT (3-col w/ sticky sides) ---------- */
.post-body {
  /* Use longhand — shorthand would override the horizontal padding inherited
     from .container-wide (both classes sit on the same <section>). */
  padding-top: 0;
  padding-bottom: 96px;
  background: var(--bg);
  position: relative;
}
@media (max-width: 720px) {
  .post-body { padding-bottom: 56px; }
}
.post-body__grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 1180px) {
  .post-body__grid { grid-template-columns: 200px minmax(0, 1fr) 240px; gap: 36px; }
}
@media (max-width: 980px) {
  .post-body__grid { grid-template-columns: 1fr; gap: 0; }
  /* Sticky sidebars are NOT rendered on mobile (handled by JS + .js-only class) */
}

/* Sticky TOC (left) */
.post-toc-side {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 0;
}
.post-toc-side__head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.post-toc-side__head::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.post-toc-side__list {
  list-style: none;
  padding: 0; margin: 0;
  counter-reset: tocside;
  display: flex; flex-direction: column; gap: 0;
  position: relative;
}
.post-toc-side__list::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}
.post-toc-side__list li {
  counter-increment: tocside;
  position: relative;
}
.post-toc-side__list a {
  display: block;
  padding: 10px 0 10px 16px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.15s, border-color 0.15s, padding 0.15s;
  position: relative;
}
.post-toc-side__list a::before {
  content: counter(tocside, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-soft);
  letter-spacing: 0.05em;
  margin-right: 8px;
}
.post-toc-side__list a:hover {
  color: var(--ink);
  padding-left: 20px;
}
.post-toc-side__list a.is-active {
  color: var(--accent-ink);
  border-left-color: var(--accent);
  font-weight: 500;
}
.post-toc-side__list a.is-active::before { color: var(--accent); }
.post-toc-side__progress {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.post-toc-side__bar {
  display: block;            /* span → block so height applies */
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.post-toc-side__bar-fill {
  display: block;            /* span → block so width/height apply */
  height: 100%;
  width: 0%;                 /* JS will animate from 0 → scroll% */
  background: var(--accent);
  box-shadow: 0 0 6px rgba(0, 208, 132, 0.7);
  border-radius: 2px;
  transition: width 0.2s ease-out;
}

/* Sticky mini form (right) */
.post-sideform {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.015), 0 20px 40px -28px rgba(10,10,10,0.1);
  position: sticky;
}
.post-sideform__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.post-sideform__badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,208,132,0.2);
}
.post-sideform h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.2;
  font-weight: 500;
}
.post-sideform h3 em { font-style: normal; color: var(--accent); }
.post-sideform p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
}
.post-sideform__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-sideform__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}
.post-sideform input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s;
}
.post-sideform input:focus {
  outline: none; border-color: var(--accent);
}
.post-sideform__submit {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  margin-top: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}
.post-sideform__submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.post-sideform__consent {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.post-sideform__consent a { color: var(--accent-ink); border-bottom: 1px dashed currentColor; }
.post-sideform__divider {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.post-sideform__divider strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.post-sideform__divider a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-sideform__divider a:hover { color: var(--accent); }

/* ---------- POST PROSE (article content) ---------- */
.post-prose {
  max-width: 720px;
  min-width: 0;                 /* shrink within grid track */
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  /* Prevent any unbreakable inline element (long URL, code, etc.) from
     pushing the column wider than its parent on mobile */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.post-prose * { min-width: 0; }
.post-prose > *:first-child { margin-top: 0; }

.post-prose h2 {
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 72px 0 20px;
  scroll-margin-top: 96px;
  font-weight: 500;
  position: relative;
  padding-top: 24px;
}
.post-prose h2::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.post-prose h3 {
  font-size: clamp(22px, 1.9vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 48px 0 14px;
  scroll-margin-top: 96px;
  font-weight: 500;
  color: var(--ink);
}

.post-prose h4 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 32px 0 10px;
  scroll-margin-top: 96px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-prose h4::before {
  content: "▸";
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}

.post-prose p {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
}
.post-prose p.post-prose__lead {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

/* Bolded text = accent green (only inside actual prose paragraphs/lists) */
.post-prose > p strong, .post-prose > p b,
.post-prose > ul strong, .post-prose > ul b,
.post-prose > ol strong, .post-prose > ol b,
.post-prose > h2 strong, .post-prose > h3 strong, .post-prose > h4 strong,
.post-prose .post-callout strong,
.post-prose blockquote strong {
  font-weight: 600;
  color: var(--accent-ink);
  background: linear-gradient(to top, rgba(0,208,132,0.12) 28%, transparent 28%);
  padding: 0 2px;
}
/* Hard reset for non-prose strong inside the article wrapper (author bio, etc.) */
.post-author-bio strong,
.post-foot strong,
.post-sideform strong,
.post-toc-side strong,
.post-toc-inline strong,
.post-readalso__list strong {
  background: none !important;
  padding: 0 !important;
  color: var(--ink);
}

/* Inline links = accent */
.post-prose a:not(.post-readalso__link):not(.post-prose__cta) {
  color: var(--accent-ink);
  border-bottom: 1px solid var(--accent);
  transition: background 0.15s, color 0.15s;
  padding: 0 2px;
}
.post-prose a:not(.post-readalso__link):not(.post-prose__cta):hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Lists */
.post-prose ul, .post-prose ol {
  padding: 0; margin: 0 0 28px;
  list-style: none;
}
.post-prose ul li,
.post-prose ol li {
  position: relative;
  padding: 4px 0 4px 36px;
  margin-bottom: 6px;
  line-height: 1.65;
  font-size: 16.5px;
}
.post-prose ul li::before {
  content: "";
  position: absolute;
  left: 6px; top: 15px;
  width: 14px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.post-prose ul li::after {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 18px; height: 10px;
  border-left: 2px solid transparent;
  transition: border-color 0.15s;
}
.post-prose ol { counter-reset: olist; }
.post-prose ol li { counter-increment: olist; padding-left: 44px; }
.post-prose ol li::before {
  content: counter(olist, decimal-leading-zero);
  position: absolute;
  left: 0; top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  font-weight: 600;
  width: 28px;
  height: 24px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 6px;
  letter-spacing: 0.03em;
}

/* Nested lists */
.post-prose ul ul, .post-prose ol ol, .post-prose ul ol, .post-prose ol ul {
  margin: 8px 0 4px;
}
.post-prose ul ul li::before { background: var(--muted-soft); }

/* Definition-style list */
.post-prose .post-prose__checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 28px 0 32px;
}
.post-prose__checklist li {
  padding-left: 36px;
  margin-bottom: 0;
}
.post-prose__checklist li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 2px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  background-image: none;
}
.post-prose__checklist li::after { display: none; }

/* Figures / images */
.post-prose figure {
  margin: 40px 0;
}
.post-prose figure > div.post-fig {
  aspect-ratio: 16/9;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.post-prose figure > div.post-fig::before {
  content: "";
  position: absolute; inset: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  pointer-events: none;
}
.post-prose figure > div.post-fig::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 32px, rgba(10,10,10,0.03) 32px 33px);
  pointer-events: none;
}
.post-prose figure > div.post-fig span {
  position: relative;
  z-index: 2;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.post-prose figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  text-align: center;
  font-style: normal;
}

/* Wide figure (breaks out of prose) */
.post-prose figure.post-fig--wide {
  margin-left: -40px;
  margin-right: -40px;
}
@media (max-width: 720px) { .post-prose figure.post-fig--wide { margin-left: 0; margin-right: 0; } }

/* Pull quote */
.post-prose blockquote {
  margin: 44px 0;
  padding: 28px 28px 28px 36px;
  border-left: 3px solid var(--accent);
  background: var(--bg-warm);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 21px;
  font-family: var(--font-display);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  position: relative;
}
.post-prose blockquote p { font-size: 21px; line-height: 1.5; margin: 0; }
.post-prose blockquote strong { background: none; padding: 0; color: var(--accent-ink); }
.post-prose blockquote footer {
  margin-top: 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* Info / tip callout */
.post-callout {
  margin: 40px 0;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--bg-warm);
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
}
.post-callout__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 16px;
  flex-shrink: 0;
}
.post-callout h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: 0;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--ink);
  display: block;
}
.post-callout h4::before { display: none; }
.post-callout p {
  font-size: 15px;
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

/* ---------- PROSE TABLE ---------- */
.post-prose table, .post-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 14.5px;
  background: var(--bg);
}
.post-table thead th {
  background: var(--ink);
  color: var(--dark-ink);
  padding: 16px 18px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.post-table thead th:last-child { border-right: 0; }
.post-table tbody td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  border-right: 1px dashed var(--line);
  vertical-align: top;
  line-height: 1.5;
}
.post-table tbody td:last-child { border-right: 0; }
.post-table tbody tr:nth-child(even) td { background: var(--bg-warm); }
.post-table tbody td:first-child { font-weight: 500; color: var(--ink); }
.post-table .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
}
.post-table .dash {
  color: var(--muted-soft);
  font-family: var(--font-mono);
}
.post-table .pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ---------- BAR CHART ---------- */
.post-chart {
  margin: 40px 0;
  padding: 28px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  position: relative;
}
.post-chart__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line-strong);
}
.post-chart__head h4 {
  font-size: 15px;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  display: block;
}
.post-chart__head h4::before { display: none; }
.post-chart__head .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.post-chart__body {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 12px 14px;
  align-items: center;
  margin-top: 20px;
}
.post-chart__row-label {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.post-chart__row-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.post-chart__bar {
  position: relative;
  height: 22px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.post-chart__bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--accent);
  border-radius: 3px 0 0 3px;
  transition: width 0.4s ease-out;
}
.post-chart__bar-fill--muted { background: var(--muted-soft); }
.post-chart__bar-fill--dark { background: var(--ink); }
.post-chart__val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  letter-spacing: 0.03em;
}
.post-chart__val em {
  font-style: normal;
  color: var(--accent-ink);
  font-size: 11px;
  margin-left: 4px;
}
.post-chart__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.post-chart__legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-chart__legend::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 3px;
}
.post-chart__legend--muted::before { background: var(--muted-soft); }
.post-chart__legend--dark::before { background: var(--ink); }

/* ---------- LINE/TREND CHART (SVG-based, simple) ---------- */
.post-chart--trend { padding: 28px 28px 20px; }
.post-chart--trend .post-chart__svg {
  display: block;
  width: 100%;
  height: 220px;
  margin-top: 12px;
}
.post-chart--trend .grid-line {
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.post-chart--trend .y-label,
.post-chart--trend .x-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--muted);
  letter-spacing: 0.04em;
}
.post-chart--trend .line-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.post-chart--trend .line-area {
  fill: rgba(0,208,132,0.1);
  stroke: none;
}
.post-chart--trend .point {
  fill: var(--bg);
  stroke: var(--accent);
  stroke-width: 2;
}
.post-chart--trend .point-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--ink);
  font-weight: 600;
}

/* ---------- READ-ALSO INLINE BLOCK ---------- */
.post-readalso {
  margin: 44px 0;
  padding: 24px 28px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}
.post-readalso::before {
  content: "";
  position: absolute;
  left: -1px; top: -1px; bottom: -1px;
  width: 6px;
  background: var(--accent);
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.post-readalso__icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent-ink);
  flex-shrink: 0;
  margin-top: 2px;
}
.post-readalso__icon svg { width: 18px; height: 18px; }
.post-readalso__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.post-readalso__label::after {
  content: "";
  height: 1px; width: 32px;
  background: var(--accent);
}
.post-readalso__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0; margin: 0;
  list-style: none;
}
.post-readalso__list li {
  padding: 0 !important;
  margin: 0 !important;
}
.post-readalso__list li::before,
.post-readalso__list li::after { display: none !important; }
.post-readalso__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-warm);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15.5px;
  color: var(--ink) !important;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.15s, background 0.15s, gap 0.15s;
  text-decoration: none !important;
  background-image: none !important;
}
.post-readalso__link::before {
  content: "→";
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  flex-shrink: 0;
  font-size: 15px;
  transition: transform 0.15s;
}
.post-readalso__link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  gap: 14px;
  color: var(--accent-ink) !important;
}
.post-readalso__link small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .post-readalso { grid-template-columns: 1fr; padding: 20px 22px; }
  .post-readalso__icon { display: none; }
}

/* ---------- POST FOOTER: tags + share + author bio ---------- */
.post-foot {
  max-width: 720px;
  margin: 64px 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.post-foot__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.post-foot__tags .label-k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  margin-right: 6px;
  align-self: center;
}
.post-foot__tag {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none;
}
.post-foot__tag:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.post-author-bio {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  padding: 28px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  align-items: center;
}
@media (max-width: 640px) {
  .post-author-bio { grid-template-columns: 64px 1fr; }
  .post-author-bio__cta { grid-column: 1 / -1; }
}
.post-author-bio__avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-warm-deep);
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.post-author-bio__avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author-bio__txt strong {
  display: block;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.post-author-bio__txt span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 2px 0 8px;
}
.post-author-bio__txt p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  max-width: 48ch;
}
.post-author-bio__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.post-author-bio__cta:hover {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}

/* ---------- RELATED POSTS CAROUSEL ---------- */
.post-related {
  background: var(--bg-warm);
  padding: 96px 0 112px;
  position: relative;
  overflow: hidden;
}
.post-related__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.post-related__head-txt { max-width: 640px; }
.post-related__head h2 {
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.025em;
  margin: 12px 0 10px;
  font-weight: 500;
}
.post-related__head h2 em { font-style: normal; color: var(--accent); }
.post-related__head p {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 46ch;
  line-height: 1.55;
}
.post-related__controls {
  display: inline-flex;
  gap: 8px;
}
.post-related__nav {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}
.post-related__nav:hover {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  transform: translateY(-1px);
}
.post-related__nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.post-related__nav svg { width: 18px; height: 18px; }

.post-related__rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 2px 24px;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
  scrollbar-width: none;
}
.post-related__rail::-webkit-scrollbar { display: none; }

.post-related__card {
  flex: 0 0 360px;
  scroll-snap-align: start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.post-related__card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
}
@media (max-width: 640px) {
  .post-related__card { flex-basis: 82%; }
}
.post-related__img {
  aspect-ratio: 16/10;
  background: var(--bg-warm-deep);
  display: grid; place-items: center;
  position: relative;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.post-related__img::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px dashed rgba(10,10,10,0.18);
  border-radius: 10px;
}
.post-related__img--green { background: var(--accent); color: var(--accent-ink); }
.post-related__img--dark { background: var(--ink); color: var(--dark-muted); }
.post-related__img--dark::before { border-color: rgba(255,255,255,0.18); }

.post-related__tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  z-index: 2;
}

.post-related__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.post-related__body h3 {
  font-size: 19px;
  letter-spacing: -0.015em;
  line-height: 1.3;
  font-weight: 500;
  margin: 0;
}
.post-related__body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.post-related__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.post-related__foot .arrow {
  color: var(--accent);
  font-weight: 600;
  transition: transform 0.15s;
}
.post-related__card:hover .post-related__foot .arrow { transform: translateX(4px); }

.post-related__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.post-related__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  cursor: pointer;
  border: 0;
  transition: background 0.15s, width 0.2s;
  padding: 0;
}
.post-related__dot.is-active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ============================================
   maseo360 — WP-specific overrides
   ============================================ */

/* JS injected sidebars only render >980px (gating done in PHP markup, this is paranoia layer) */
@media (max-width: 980px) {
  .js-only { display: none !important; }
}
@media (min-width: 981px) {
  .mobile-only { display: none !important; }
  .post-mobile-form { display: none !important; }
}

/* Mobile form section wrapper — small spacing only */
.post-mobile-form {
  padding: 32px 0 16px;
}
.post-sideform--mobile {
  position: static;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: none;
}

/* Cover with real WP photo (overrides placeholder styling when photo present) */
.post-cover--photo {
  padding: 0;
  background: var(--bg-warm-deep, var(--bg-warm));
  border-color: var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 7;
  max-height: 480px;
  position: relative;
}
.post-cover--photo::before,
.post-cover--photo::after { display: none; }
.post-cover__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Featured image inside post content — same softer card look */
.post-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin: 8px 0;
}
.post-prose .wp-block-image figure,
.post-prose .wp-block-image { margin: 32px 0; }
.post-prose .wp-block-image img { border-radius: var(--r-md); }

/* Code (inline + block) */
.post-prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink);
  background-image: none;
}
.post-prose pre {
  margin: 28px 0;
  padding: 20px 22px;
  background: var(--ink);
  color: #f5f5ee;
  border-radius: var(--r-md);
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
}
.post-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* HR — dotted divider in prose */
.post-prose hr {
  border: 0;
  height: 8px;
  background-image: radial-gradient(circle, var(--muted-soft) 1px, transparent 1.2px);
  background-size: 10px 8px;
  background-repeat: repeat-x;
  background-position: 0 50%;
  margin: 48px 0;
  opacity: 0.55;
}

/* Tables — server-side wrapped by maseo360_wrap_tables() in <div class="post-prose__scroll">.
   The wrapper provides horizontal scroll on narrow screens; the table itself
   keeps its native table layout (no display:block hack). */
.post-prose__scroll {
  margin: 32px 0 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg);
  /* Subtle right-edge cue when content is scrollable */
  background-image: linear-gradient(to right, transparent 92%, rgba(0,208,132,0.08));
  background-attachment: local;
}
.post-prose__scroll > table,
.post-prose__scroll > .post-table,
.post-prose__scroll > .wp-block-table > table,
.post-prose__scroll > figure.wp-block-table > table {
  margin: 0;
  border: 0;
  border-radius: 0;
  width: 100%;
}

@media (max-width: 720px) {
  .post-prose__scroll > table,
  .post-prose__scroll table {
    width: max-content;
    min-width: 100%;
    white-space: normal;
    font-size: 13.5px;
  }
  .post-prose__scroll thead th { padding: 12px 14px; }
  .post-prose__scroll tbody td { padding: 10px 14px; }
}

/* Post-head meta — stack on small screens; share moves below */
@media (max-width: 720px) {
  .post-head__meta { gap: 14px 18px; }
  .post-head__share { margin-left: 0; flex-basis: 100%; }

  /* Mobile sanity — anything in the post body stays within the viewport */
  .post-head, .post-head > *,
  .post-prose, .post-prose > *,
  .post-body, .post-body__grid, .post-body__grid > * { max-width: 100%; min-width: 0; }
  .post-prose h1, .post-prose h2, .post-prose h3, .post-prose h4,
  .post-head__h1, .post-head__lead {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  /* Drop the inline strong padding so it doesn't push text over the edge */
  .post-prose > p strong, .post-prose > p b,
  .post-prose > ul strong, .post-prose > ol strong { padding: 0; }
}

/* Share-link copy "✓ Skopiowane" feedback */
.post-head__share a.is-copied { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Related photo */
.post-related__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* NOTE: do NOT set overflow on .post-body — it breaks position:sticky on
   .post-toc-side and .post-sideform--sticky. Horizontal-scroll guard is on
   <html><body> via overflow-x: clip in styles.css. */

/* ============================================
   FULL MOBILE OVERFLOW AUDIT
   Every element that could push content beyond the viewport gets a max-width,
   min-width or overflow-x rule here.
   ============================================ */

/* Iframes (YouTube/Vimeo embeds in content) — responsive */
.post-prose iframe,
.post-prose embed,
.post-prose object,
.post-prose video {
  max-width: 100%;
  width: 100%;
  height: auto;
}
.post-prose .wp-block-embed iframe { aspect-ratio: 16 / 9; height: auto; }

/* Pre/code blocks — already have overflow:auto, just make sure */
.post-prose pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

/* Charts — bar grid sometimes too tight on small screens */
@media (max-width: 720px) {
  .post-chart {
    padding: 20px 16px;
    margin: 28px 0;
  }
  .post-chart__body {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }
  .post-chart__row-label { font-size: 13px; }
  .post-chart__bar { width: 100%; }
  .post-chart__val  { text-align: left; }
  .post-chart--trend .post-chart__svg { height: 180px; }
  .post-chart__head { gap: 8px 14px; }
  .post-chart__foot { gap: 12px; font-size: 10px; }
}

/* Read-also block on phones */
@media (max-width: 720px) {
  .post-readalso { padding: 18px 18px; gap: 12px; }
  .post-readalso__link { padding: 10px 12px; font-size: 14.5px; }
}

/* Callout on phones */
@media (max-width: 720px) {
  .post-callout {
    grid-template-columns: 36px 1fr;
    gap: 14px;
    padding: 18px 18px;
  }
  .post-callout__icon { width: 36px; height: 36px; font-size: 14px; }
}

/* Inline TOC on phones */
@media (max-width: 720px) {
  .post-toc-inline { padding: 22px 20px; margin-bottom: 40px; }
  .post-toc-inline__head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .post-toc-inline__list a { font-size: 14.5px; }
}

/* Post-cover safety */
.post-cover { max-width: 100%; }
.post-cover--photo { aspect-ratio: 16 / 9; max-height: none; }
@media (max-width: 720px) {
  .post-cover--photo { aspect-ratio: 16 / 10; border-radius: var(--r-md); }
}

/* Author bio on small phones */
@media (max-width: 480px) {
  .post-author-bio { padding: 22px 18px; gap: 14px; }
  .post-author-bio__avatar { width: 56px; height: 56px; font-size: 16px; }
  .post-author-bio__txt strong { font-size: 16px; }
  .post-author-bio__txt p { font-size: 13.5px; }
  .post-author-bio__cta { padding: 9px 14px; font-size: 12px; width: 100%; justify-content: center; }
}

/* Related cards rail */
@media (max-width: 560px) {
  .post-related { padding: 56px 0 64px; }
  .post-related__card { flex-basis: 86%; }
  .post-related__head h2 { font-size: clamp(24px, 6vw, 32px); }
  .post-related__rail { padding-left: 16px; padding-right: 16px; margin: 0 -16px; }
}

/* Post-head share */
.post-head__share a { flex-shrink: 0; }

/* Wide figures */
@media (max-width: 720px) {
  .post-prose figure.post-fig--wide { margin-left: 0; margin-right: 0; }
}

/* Final safety net */
.post-prose, .post-prose__scroll { max-width: 100%; }

/* ---------- Mobile reading progress bar ---------- */
.post-progress {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  height: 3px;
  background: rgba(0, 208, 132, 0.12);
  overflow: hidden;
  margin-bottom: 4px;
}
.post-progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 208, 132, 0.85), 0 0 18px rgba(0, 208, 132, 0.4);
  border-radius: 0 999px 999px 0;
  transition: width .12s ease-out;
}

