/* ============================================================
   CASE STORY — czytelnia: sticky spis treści + rozdziały-proza
   Schemat wspólny; kolory/fonty sterowane zmiennymi --st-* na .st-section
   ============================================================ */

.st-section {
  /* DOMYŚLNE TOKENY — każda strona nadpisuje na .st-section */
  --st-serif: Georgia, "Times New Roman", serif;
  --st-mono: ui-monospace, monospace;
  --st-title-font: var(--st-serif);
  --st-title-weight: 500;
  --st-title-transform: none;
  --st-title-size: clamp(30px, 4.2vw, 46px);
  --st-title-tracking: -0.01em;
  --st-ink: #1b1b1d;
  --st-ink2: #3a3a3e;
  --st-muted: #8a8a90;
  --st-faint: #b6b6bc;
  --st-line: rgba(0,0,0,0.10);
  --st-accent: #2D5AF7;
  --st-accent-soft: rgba(45,90,247,0.14);

  padding: 96px 0 100px;
}

.st-inner { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.st-lede { max-width: 1180px; margin: 0 auto 8px; padding: 0 28px; }
.st-eyebrow {
  display: inline-block; font-family: var(--st-mono);
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--st-accent); margin-bottom: 14px;
}
.st-headline {
  font-family: var(--st-title-font); font-weight: var(--st-title-weight);
  text-transform: var(--st-title-transform);
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.06;
  letter-spacing: var(--st-title-tracking); color: var(--st-ink);
  margin: 0 0 8px; max-width: 760px; text-wrap: balance;
}
.st-headline em { font-style: italic; color: var(--st-accent); }

/* layout */
.st-wrap {
  max-width: 1180px; margin: 28px auto 0; padding: 0 28px;
  display: grid; grid-template-columns: 230px 1fr; gap: 72px; align-items: start;
}

/* ---- spis treści ---- */
.st-toc { position: sticky; top: 104px; align-self: start; }
.st-toc-label {
  font-family: var(--st-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--st-faint);
  padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--st-line);
}
.st-toc-list { list-style: none; margin: 0; padding: 0; position: relative; }
.st-toc-link {
  position: relative; display: flex; align-items: baseline; gap: 13px;
  width: 100%; text-align: left; background: none; border: 0; font: inherit;
  padding: 11px 0; cursor: pointer; color: var(--st-muted);
  transition: color .18s, padding-left .18s;
}
.st-toc-link .n {
  font-family: var(--st-mono); font-size: 11px; font-weight: 500;
  color: var(--st-faint); min-width: 18px; transition: color .18s;
}
.st-toc-link .t { font-size: 14.5px; font-weight: 500; line-height: 1.3; transition: color .18s; }
.st-toc-link:hover { color: var(--st-ink2); }
.st-toc-link:hover .t { color: var(--st-ink2); }
.st-toc-link.active { color: var(--st-ink); padding-left: 14px; }
.st-toc-link.active .n { color: var(--st-accent); }
.st-toc-link.active .t { color: var(--st-ink); }
.st-toc-link::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 0; background: var(--st-accent); border-radius: 2px;
  transition: height .28s ease;
}
.st-toc-link.active::before { height: 20px; }

/* ---- rozdziały ---- */
.st-chapters { min-width: 0; }
.st-ch { padding: 0 0 12px; scroll-margin-top: 104px; }
.st-ch + .st-ch { border-top: 1px solid var(--st-line); padding-top: 64px; margin-top: 56px; }
.st-ch-kicker { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.st-ch-num {
  font-family: var(--st-mono); font-size: 13px; font-weight: 500;
  color: var(--st-accent); letter-spacing: 0.06em;
}
.st-ch-eyebrow {
  font-family: var(--st-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--st-faint);
}
.st-ch-title {
  font-family: var(--st-title-font); font-weight: var(--st-title-weight);
  text-transform: var(--st-title-transform);
  font-size: var(--st-title-size); line-height: 1.08;
  letter-spacing: var(--st-title-tracking); color: var(--st-ink); margin: 0 0 24px;
  text-wrap: balance;
}
.st-ch-body {
  font-family: var(--st-serif); font-weight: 400;
  font-size: clamp(18px, 1.45vw, 20px); line-height: 1.62;
  color: var(--st-ink2); max-width: 620px;
}
.st-ch-body p { margin: 0 0 18px; }
.st-ch-body p:last-child { margin-bottom: 0; }
.st-ch-body p.lead:first-letter {
  float: left; font-family: var(--st-title-font); font-weight: var(--st-title-weight);
  font-size: 2.4em; line-height: 0.66; padding: 0.04em 0.5rem 0 0; color: var(--st-ink);
}
.st-ch-body ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.st-ch-body li { position: relative; padding-left: 26px; font-size: 17.5px; line-height: 1.5; }
.st-ch-body li::before {
  content: ""; position: absolute; left: 0; top: 0.66em;
  width: 14px; height: 2px; background: var(--st-accent); border-radius: 1px;
}
.st-ch-body strong, .st-ch-body b { color: var(--st-ink); font-weight: 600; }
.st-pull {
  font-family: var(--st-serif); font-style: italic;
  font-size: clamp(20px, 2.2vw, 25px); line-height: 1.4;
  color: var(--st-ink); margin: 26px 0; padding-left: 22px;
  border-left: 2px solid var(--st-accent); max-width: 620px;
}

/* responsywność: spis treści jako poziomy pasek u góry */
@media (max-width: 880px) {
  .st-section { padding: 64px 0 72px; }
  .st-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .st-toc {
    min-width: 0;
    position: sticky; top: 0; z-index: 20; align-self: stretch;
    margin: 0 -28px 18px; padding: 12px 28px;
    background: var(--st-toc-bg, rgba(255,255,255,0.9));
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--st-line);
  }
  .st-toc-label { display: none; }
  .st-toc-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .st-toc-list::-webkit-scrollbar { display: none; }
  .st-toc-link {
    flex: none; white-space: nowrap; padding: 7px 13px;
    border: 1px solid var(--st-line); border-radius: 999px;
  }
  .st-toc-link::before { display: none; }
  .st-toc-link.active { padding-left: 13px; border-color: var(--st-accent); background: var(--st-accent-soft); }
  .st-toc-link .t { font-size: 13px; }
  .st-ch-body { max-width: none; }
  .st-ch + .st-ch { padding-top: 44px; margin-top: 40px; }
}
