/* /blog/ i wpisy /<slug>/ */

/* ---------- lista ---------- */
.filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter__btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white);
  font-size: var(--fs-sm); font-weight: 500; color: var(--text); transition: border-color .15s, background-color .15s, color .15s;
}
.filter__btn:hover { border-color: var(--ink); color: var(--ink); }
.filter__btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.filter__count { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.filter__btn[aria-pressed="true"] .filter__count { color: #b9c2cb; }
.filter__status { margin-top: 1.25rem; font-size: var(--fs-xs); color: var(--muted); }
.no-js .filter, .filter__status:empty { display: none; }

.post-rows { margin-top: 1.5rem; border-top: 1px solid var(--line-strong); }
.post-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr) minmax(0, 3fr);
  gap: .5rem var(--gap); padding-block: 1.75rem; border-bottom: 1px solid var(--line);
}
.post-row__date { font-size: var(--fs-sm); color: var(--muted); padding-top: .3rem; font-variant-numeric: tabular-nums; }
.post-row__title { font-size: clamp(1.25rem, 1.15rem + .45vw, 1.5625rem); line-height: 1.3; font-weight: 500; }
.post-row__title a { color: inherit; text-decoration: none; }
.post-row__title a::after { content: ""; position: absolute; inset: 0; }
.post-row:hover .post-row__title a { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.post-row__excerpt { margin-top: .55rem; color: var(--muted); font-size: var(--fs-sm); max-width: 44rem; }
.post-row__cat { font-size: var(--fs-sm); font-weight: 600; color: var(--gold-deep); padding-top: .3rem; text-align: right; }
.post-row__time { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-xs); margin-top: .25rem; }
@media (max-width: 960px) {
  .post-row { grid-template-columns: 1fr; padding-block: 1.5rem; }
  .post-row__date { order: -1; padding: 0; font-size: var(--fs-xs); }
  .post-row__cat { text-align: left; padding: 0; font-size: var(--fs-xs); }
  .post-row__time { display: inline; margin-left: .75rem; }
}

/* ---------- wpis ---------- */
.post-hero { background: var(--mist); border-bottom: 1px solid var(--line); padding-block: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem) clamp(2.5rem, 1.75rem + 3vw, 4.5rem); }
.post-hero .crumbs li:last-child { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-hero__main { margin-top: clamp(2rem, 1.5rem + 2.5vw, 4rem); max-width: 50rem; }
.post-hero__cat a { font-size: var(--fs-sm); font-weight: 600; color: var(--gold-deep); text-decoration: none; }
.post-hero__cat a:hover { text-decoration: underline; text-underline-offset: .2em; }
.post-hero h1 { margin-top: .9rem; font-size: clamp(2rem, 1.5rem + 2vw, 3.125rem); line-height: 1.12; }
.post-meta { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin-top: 1.75rem; font-size: var(--fs-sm); color: var(--muted); }
.post-meta li { display: inline-flex; align-items: center; gap: .5rem; }
.post-meta .icon { width: 1.05rem; height: 1.05rem; color: var(--gold); }
.post-meta a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }

.post-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--section); }
.post-toc { grid-column: 1 / span 3; }
.post-toc__inner { position: sticky; top: calc(var(--header-h) + 2rem); max-height: calc(100vh - var(--header-h) - 4rem); overflow-y: auto; overscroll-behavior: contain; padding-right: .5rem; scrollbar-width: thin; }
.post-toc__title { display: block; list-style: none; font-size: var(--fs-xs); font-weight: 650; color: var(--ink); padding-bottom: .75rem; border-bottom: 1px solid var(--ink); pointer-events: none; }
.post-toc__title::-webkit-details-marker { display: none; }
.post-toc ol { list-style: none; padding: 0; margin: 0; }
.post-toc li { border-bottom: 1px solid var(--line); }
.post-toc a { display: block; padding: .6rem 0; font-size: .875rem; line-height: 1.45; color: var(--muted); text-decoration: none; }
.post-toc a:hover { color: var(--ink); }
.post-toc a.is-active { color: var(--ink); box-shadow: inset 2px 0 0 var(--gold); padding-left: .75rem; }
.post-toc.is-empty { visibility: hidden; }
.post-body { grid-column: 5 / span 8; min-width: 0; }
.post-body .prose { max-width: 41rem; }
.post-body .prose > p:first-child { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink); }
.post-inline-cta { padding: 1rem 1.25rem; background: var(--mist); border-left: 2px solid var(--gold); }

.post-talk {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 1.5rem 2rem; align-items: center;
  margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--steel-soft); border-radius: var(--radius); max-width: 41rem;
}
.post-talk__img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 58% 20%; border-radius: var(--radius); }
.post-talk h2 { font-size: clamp(1.375rem, 1.25rem + .6vw, 1.75rem); }
.post-talk p { margin-top: .75rem; }
.post-talk .btn-row { margin-top: 1.5rem; }
.post-disclaimer { margin-top: 2rem; max-width: 41rem; font-size: var(--fs-xs); color: var(--muted); }

@media (max-width: 1080px) {
  /* Na węższych ekranach spis treści jest zwijanym boksem nad treścią */
  .post-toc { grid-column: 1 / -1; max-width: 41rem; width: 100%; margin: 0 auto 2.5rem; }
  .post-toc.is-empty { display: none; }
  .post-toc__inner { position: static; max-height: none; overflow: visible; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
  .post-toc__title { pointer-events: auto; cursor: pointer; position: relative; padding: 1rem 3rem 1rem 1.25rem; border-bottom: 0; font-size: var(--fs-sm); }
  .post-toc__title::after { content: ""; position: absolute; right: 1.25rem; top: 50%; width: .5rem; height: .5rem; margin-top: -.35rem; border: solid var(--gold); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
  .post-toc__inner[open] .post-toc__title { border-bottom: 1px solid var(--line); }
  .post-toc__inner[open] .post-toc__title::after { transform: rotate(-135deg); margin-top: -.1rem; }
  .post-toc ol { padding: .25rem 1.25rem .5rem; }
  .post-toc li:last-child { border-bottom: 0; }
  .post-body { grid-column: 1 / -1; }
  .post-body .prose, .post-disclaimer { margin-inline: auto; }
  .post-talk { margin-inline: auto; }
}
@media (max-width: 560px) {
  .post-talk { grid-template-columns: 1fr; }
  .post-talk__img { width: 6rem; }
  .post-talk .btn { width: 100%; }
}
