/* funduszai.pl — portal design tokens + komponenty
   Hybryda: jasna baza redakcyjna + ciemne panele maszynowe.
   Typografia: Playfair Display (serif display) / Inter (tekst) / JetBrains Mono (dane). */

:root {
  --bg: #FAF9F6;
  --paper: #FFFFFF;
  --ink: #1C1B1B;
  --ink-soft: #55524E;
  --line: #E7E3DC;
  --accent: #B58900;        /* bursztyn — kolor marki (linki, CTA, podkreślenia) */
  --accent-deep: #8A6800;
  --accent-bg: #F8F1DD;
  --bull: #1A7F37;
  --bull-bg: #EAF4EC;
  --bear: #C5283D;
  --bear-bg: #FBECEE;
  --veto: #9A7400;
  --veto-bg: #F7EFD8;
  --machine-bg: #161B22;     /* grafit z lekkim navy (było #0D1117 — za twarda czerń) */
  --machine-panel: #1C2230;
  --machine-text: #D6DEE8;
  --machine-dim: #9DA7B3;
  --machine-border: #303A47;
  --machine-green: #4CC65E;
  --machine-red: #FF6B61;
  --machine-veto: #D4A72C;   /* kotwica dymka weta na taśmie (był martwy var) */
  /* Playfair TYLKO dla logo (ozdobny); treść/nagłówki = Lora (czytelny serif). */
  --display: "Playfair Display", Georgia, serif;
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", -apple-system, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--accent-deep); text-decoration-color: rgba(181,137,0,.45); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* ── Header ──────────────────────────────────────────── */
/* Pasek archiwum sezonu — nad headerem, sygnalizuje zamknięty zbiór analiz. */
.season-bar {
  background: var(--accent-bg);
  border-bottom: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft);
}
.season-bar .wrap { padding: 9px 22px; display: flex; gap: 10px;
  align-items: baseline; flex-wrap: wrap; }
.season-bar strong { color: var(--accent-deep); }
.season-bar a { color: var(--accent-deep); font-weight: 600; margin-left: auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px; height: 64px;
}
.logo {
  font-family: var(--display); font-weight: 800; font-size: 24px;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.logo:hover { color: var(--accent-deep); }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding: 4px 2px;
}
.nav a:hover, .nav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.btn-latest {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink);
  padding: 8px 14px; border-radius: 6px; text-decoration: none; white-space: nowrap;
}
.btn-latest:hover { background: var(--ink); color: var(--bg); }
@keyframes btn-latest-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(227,179,65,0); } 50% { box-shadow: 0 0 11px 1px rgba(227,179,65,0.55); } }
.btn-latest { animation: btn-latest-glow 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .btn-latest { animation: none; } }

/* ── Breadcrumb ──────────────────────────────────────── */
.breadcrumb {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); padding: 22px 0 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
.breadcrumb .bc-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb .sep { color: var(--line); }

/* ── HERO: wielki ludzki werdykt ─────────────────────── */
.hero { padding: 34px 0 12px; }
.hero-company {
  font-size: 19px; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
}
.ticker-chip {
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; background: var(--paper);
}
.hero-meta {
  display: flex; align-items: center; gap: 10px; margin-top: 6px;
}
.hero-range {
  font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--accent-deep);
}

/* ── Strony statyczne (jak-to-działa, o-funduszu…) ───────── */
.page-hero { padding: 46px 0 12px; }
.page-hero h1 {
  font-family: var(--serif); font-weight: 700; font-size: 41px;
  line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 14px;
}
/* deck/lead: czytelny sans pod nagłówkiem — ciemniejszy niż wyblakłe --ink-soft;
   pełna szerokość kontenera (bez wąskiej kolumny z pustką po prawej) */
.page-hero .lead {
  font-size: 18px; line-height: 1.62; color: #423e38; margin: 0;
}

/* Klocki statystyk posiedzenia (odcinek) — mini-infografika */
.posiedzenie-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 4px; }
.pstat {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 18px; min-width: 122px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}
.pstat-num { font-family: var(--mono); font-size: 24px; font-weight: 700; line-height: 1; }
.pstat-lab { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.pstat-bull .pstat-num { color: var(--bull); }
.pstat-bear .pstat-num { color: var(--bear); }
.pstat-veto .pstat-num { color: var(--veto); }

/* ── Historia: kalendarz sobót (kartki zdzieranego kalendarza) ── */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 16px; margin: 20px 0; }
.cal-page { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink); padding-bottom: 16px; transition: transform .09s ease, box-shadow .09s ease; }
.cal-page::before { content: ""; display: block; height: 11px; background: radial-gradient(circle 2.5px at 50% 50%, var(--ink-soft) 96%, transparent 100%); background-size: 17px 11px; background-repeat: repeat-x; background-position: center; opacity: .32; }
.cal-page:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(28,27,27,.13); }
.cal-top { background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .09em; padding: 6px 12px; display: flex; justify-content: space-between; align-items: center; }
.cal-top .cal-veto { font-weight: 500; }
.cal-day { font-family: var(--serif); font-size: 58px; font-weight: 700; line-height: 1; text-align: center; padding: 16px 0 0; }
.cal-weekday { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 14px; }
.cal-bar { height: 8px; background: rgba(248,81,73,0.50); margin: 0 14px 9px; border-radius: 5px; overflow: hidden; }
.cal-bar-up { display: block; height: 100%; background: rgba(63,185,80,0.85); }
.cal-split { text-align: center; font-family: var(--mono); font-size: 13.5px; font-weight: 600; }

/* ── Historia: heatmapa decyzji (spółki × soboty) — pełna szerokość ── */
.hm-wrap { overflow-x: auto; margin: 18px 0; }
.heatmap { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px 5px; font-family: var(--mono); }
.hm-col-ticker { width: 58px; }
.heatmap th, .heatmap td { padding: 0; }
.heatmap .hm-mlabel { font-size: 11px; color: var(--ink-soft); text-align: left; padding: 0 4px 5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.heatmap .hm-date { font-size: 11px; color: var(--ink-soft); height: 18px; text-align: center; font-weight: 400; }
.heatmap .hm-ticker { position: sticky; left: 0; background: var(--bg); text-align: right; padding-right: 9px; }
.heatmap .hm-ticker a { font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--accent); }
/* dymek nazwy spółki: na PRAWO (lewa krawędź .hm-wrap by go przycięła) */
.heatmap .hm-ticker a[data-name]:hover::after { left: calc(100% + 8px); right: auto; bottom: auto; top: 50%; transform: translateY(-50%); }
.heatmap .hm-ticker a:hover { color: var(--accent); }
.hm-cell { height: 28px; border-radius: 4px; }
.hm-cell a { display: block; width: 100%; height: 100%; line-height: 28px; text-align: center; font-size: 11px; color: #fff; text-decoration: none; }
.hm-v { font-size: 16px; font-weight: 700; }
.hm-good { background: rgba(63,185,80,0.82); }
.hm-bad  { background: rgba(248,81,73,0.82); }
.hm-open { background: repeating-linear-gradient(45deg, rgba(227,179,65,0.60) 0, rgba(227,179,65,0.60) 4px, rgba(227,179,65,0.28) 4px, rgba(227,179,65,0.28) 8px); }
.hm-empty { background: transparent; }
.hm-cell.hm-good:hover, .hm-cell.hm-bad:hover, .hm-cell.hm-open:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.hm-legend { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 14px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hm-k { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.hm-howto { font-size: 16.5px; color: var(--ink); line-height: 1.55; margin: 6px 0 16px; }
.hm-howto .hm-click { font-weight: 700; border-bottom: 2px dotted var(--accent); }
/* mobile: zamiast ściskać 15 kolumn do zera — min-width wymusza poziomy scroll
   w .hm-wrap (sticky .hm-ticker trzyma kontekst spółki); komórki zostają tykalne */
@media (max-width: 640px) {
  .heatmap { width: auto; min-width: 580px; }
}

.flow-steps { list-style: none; margin: 24px 0; padding: 0; counter-reset: krok; }
.flow-steps li {
  position: relative; padding: 18px 64px 18px 74px; margin: 14px 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  counter-increment: krok;
}
.flow-steps li::before {
  content: counter(krok); position: absolute; left: 22px; top: 20px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink);
  color: var(--bg); font-family: var(--mono); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.flow-steps li strong.krok-title { display: block; font-size: 17px; margin-bottom: 4px; }
.krok-ico { position: absolute; right: 20px; top: 18px; color: var(--ink-soft); line-height: 0; }
.krok-ico svg { width: 30px; height: 30px; display: block; }
.flow-steps li .krok-when {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-deep); display: block; margin-bottom: 2px;
}

.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 20px 0; }
.cast-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px;
}
.cast-card.cast-boss { grid-column: 1 / -1; border-left: 4px solid var(--accent); }
.cast-card .cast-name { font-weight: 700; font-size: 16.5px; }
.cast-ico { display: inline-block; vertical-align: -3px; margin-right: 7px; color: var(--ink-soft); }
.cast-ico svg { width: 18px; height: 18px; display: inline-block; }
.cast-card .cast-role {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-soft); margin: 2px 0 8px;
}
.cast-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.cast-pair { display: flex; gap: 8px; align-items: baseline; }
.cast-vs { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
/* nagłówki trzech szczebli obsady (zarząd / eksperci / analitycy) */
.cast-tier-head { font-family: var(--serif); font-size: 25px; letter-spacing: -0.01em;
  margin: 40px 0 2px; padding-top: 18px; border-top: 1px solid var(--line); }
/* link do X prezesa pod jego biogramem */
.cast-x { margin-top: 12px !important; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13.5px; }
.cast-x-ico { font-weight: 700; color: var(--ink); margin-right: 4px; }
.cast-x a { color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.cast-x a:hover { text-decoration: underline; }

/* ── Jak to działa: rozszerzone pojedynki byk vs niedźwiedź ── */
.duel { display: flex; flex-direction: column; gap: 16px; margin: 20px 0; }
.duel-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.duel-topic { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--bg); }
.duel-topic-sub { text-transform: none; letter-spacing: .01em; font-weight: 500; color: var(--ink-soft); }
.duel-sides { display: grid; grid-template-columns: 1fr 1fr; }
.duel-side { padding: 22px 24px; }
.duel-side.bull { border-right: 1px solid var(--line); }
.duel-fighter { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.duel-side.bull .duel-fighter { color: var(--bull); }
.duel-side.bear .duel-fighter { color: var(--bear); }
.duel-fighter span { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-left: 6px; }
.duel-side p { margin: 0; font-size: 14.5px; color: var(--ink); line-height: 1.72; }
@media (max-width: 720px) {
  .duel-sides { grid-template-columns: 1fr; }
  .duel-side.bull { border-right: none; border-bottom: 1px solid var(--line); }
}
.cast-name.bull-name { color: var(--bull); }
.cast-name.bear-name { color: var(--bear); }

.scale-band {
  background: var(--machine-bg); color: var(--machine-text); border-radius: 14px;
  padding: 36px 40px; margin: 40px 0; font-family: var(--mono);
}
.scale-band h2 {
  font-family: var(--serif); color: #fff; font-size: 30px; margin: 0 0 6px;
}
.scale-band .scale-sub { color: var(--machine-dim); font-size: 14px; margin-bottom: 26px; }
.scale-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.scale-item .num { font-size: 34px; font-weight: 700; color: var(--machine-green); }
.scale-item .num.cost { color: var(--machine-red); }
.tech-head {
  margin-top: 30px; font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--machine-green);
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tech-tags span {
  font-size: 11.5px; color: var(--machine-dim); border: 1px solid var(--machine-border);
  border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}
.scale-item .what { font-size: 12.5px; color: var(--machine-text); margin-top: 2px; line-height: 1.5; }
.scale-foot { margin-top: 26px; font-size: 13px; color: var(--machine-dim); border-top: 1px solid var(--machine-border); padding-top: 16px; }

.qa-list { margin: 16px 0; }
.qa-list details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.qa-list summary { cursor: pointer; font-weight: 600; font-size: 16.5px; padding: 12px 0; list-style: none; }
.qa-list summary::-webkit-details-marker { display: none; }
.qa-list summary::before { content: "▸ "; color: var(--accent); }
.qa-list details[open] summary::before { content: "▾ "; }
.qa-list .qa-a { padding: 0 0 14px 22px; color: var(--ink-soft); }

/* ── Hero-band landingu: cyferki płynące wokół wejścia ─ */
.hero-band {
  background: var(--machine-bg); color: var(--machine-text);
  width: 100vw; margin-left: calc(50% - 50vw);
  overflow: hidden;
}
.hero-band-inner {
  max-width: 920px; margin: 0 auto; padding: 44px 24px 40px; text-align: center;
}
.hero-band h1 {
  font-family: var(--serif); font-weight: 700; color: #fff;
  font-size: 56px; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 18px;
}
.hero-band-sub { font-size: 18px; color: var(--machine-dim); line-height: 1.7; margin: 0 0 26px; }
.hero-band-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-hero {
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  background: var(--machine-green); color: var(--machine-bg);
  padding: 12px 22px; border-radius: 8px; text-decoration: none;
}
.btn-hero:hover { filter: brightness(1.12); color: var(--machine-bg); }
.btn-hero-ghost { background: transparent; color: var(--machine-text); border: 1px solid var(--machine-border); }
.btn-hero-ghost:hover { color: #fff; border-color: var(--machine-dim); filter: none; }

.tape { overflow: hidden; font-family: var(--mono); }
.tape-track {
  display: flex; width: max-content; flex-wrap: nowrap;
  will-change: transform; animation: tape-scroll var(--dur, 90s) linear infinite;
}
.tape-track.tape-rev { animation-direction: reverse; }
.tape-track > span { flex: none; white-space: nowrap; margin-right: 34px; }
.tape-track em { font-style: normal; }
@keyframes tape-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-track { animation: none; } }
.tape-1 { font-size: 16px; font-weight: 600; padding: 14px 0; border-bottom: 1px solid var(--machine-border); }
.tape-2 { font-size: 14px; padding: 12px 0; border-top: 1px solid var(--machine-border); }
.tape-3 { font-size: 15px; padding: 12px 0 18px; opacity: .95; }
.t-up { color: var(--machine-green); } .t-down { color: var(--machine-red); }
.t-veto { color: var(--machine-veto); } .t-dim { color: var(--machine-dim); }
.tape-2 b { color: var(--machine-text); font-weight: 600; }

@media (max-width: 720px) {
  .hero-band h1 { font-size: 34px; }
  .hero-band-inner { padding: 32px 16px 28px; }
}

/* ── Archiwum odcinków ───────────────────────────────── */
.episode-row {
  display: flex; align-items: baseline; gap: 18px;
  padding: 16px 20px; margin: 10px 0; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
}
.episode-row:hover { border-color: var(--accent); }
.episode-row .ep-date { font-family: var(--mono); font-weight: 700; font-size: 15px; white-space: nowrap; }
.episode-row .ep-stats { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.episode-row .ep-hl { flex: 1; font-size: 13.5px; color: var(--ink-soft); font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-row .ep-go { color: var(--accent-deep); }

/* karty spółek jako linki */
a.cast-card { text-decoration: none; color: var(--ink); display: block; }
a.cast-card:hover { border-color: var(--accent); }

/* esej */
.essay-body { font-size: 17px; line-height: 1.75; max-width: 760px; }
.essay-body h2 { font-family: var(--serif); font-size: 24px; margin: 1.4em 0 .5em; }

@media (max-width: 720px) {
  .episode-row { flex-wrap: wrap; gap: 8px; }
  .episode-row .ep-hl { white-space: normal; flex-basis: 100%; }
  .ledger { overflow-x: auto; }
  .ledger table { min-width: 560px; }
}

.disclaimer-full {
  font-size: 13px; color: var(--ink-soft); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 20px 24px; margin: 36px 0;
}

@media (max-width: 720px) {
  .page-hero h1 { font-size: 29px; }
  .scale-band { padding: 24px 20px; }
}
.hero-verdict {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em;
  font-size: 46px; line-height: 1.15; margin: 10px 0 12px;
}
.hero-verdict.up { color: var(--bull); }
.hero-verdict.down { color: var(--bear); }
.hero-sub { font-size: 18px; color: var(--ink-soft); margin: 0 0 6px; }
.hero-sub strong { color: var(--ink); }
.hero-prev { font-size: 16.5px; margin: 14px 0 0; }
.hero-prev .good { color: var(--bull); }
.hero-prev .bad { color: var(--bear); }
.hero-prev .pending { color: var(--ink-soft); font-weight: 400; }

.chip {
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.chip-up   { background: var(--bull-bg); color: var(--bull); border: 1.5px solid var(--bull); }
.chip-down { background: var(--bear-bg); color: var(--bear); border: 1.5px solid var(--bear); }
.chip-sm { font-size: 12px; padding: 3px 10px; border-width: 1px; }
.badge-veto {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  background: var(--veto-bg); color: var(--veto); border: 1.5px dashed var(--veto);
  padding: 6px 12px; border-radius: 6px; white-space: nowrap;
}
.summary-thesis {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: 21px; line-height: 1.55; margin: 18px 0 6px; color: var(--ink);
  border-left: 3px solid var(--accent); padding-left: 18px;
}
.perf-pos { color: var(--bull); font-weight: 700; }
.perf-neg { color: var(--bear); font-weight: 700; }
.perf-fresh { color: var(--ink-soft); font-style: italic; }

/* ── Nawigator dat: karton ze złotą belką — celowo INNY niż breadcrumb
   (mono-caps bez ramki) i spis treści (goły wiersz), żeby było widać,
   że tu porusza się po DATACH ──────────────────────────── */
.date-nav {
  display: block; margin: 14px 0 28px; padding: 12px 16px 13px;
  background: var(--paper); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px;
  font-family: var(--mono); font-size: 13px;
}
.date-nav .dn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.date-nav .dn-others { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.date-nav .dn-label { color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.date-nav a, .date-nav .dn-current {
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--bg);
  white-space: nowrap;
}
.date-nav a:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-bg); }
.date-nav .dn-current { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }

/* ── Sekcje + nagłówki fabularne ─────────────────────── */
/* Nagłówki fabularne — DUŻE pytania prowadzące czytelnika (nie etykiety). */
.story-head {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em;
  font-size: 31px; line-height: 1.3; margin: 0 0 10px;
}
.story-lead { font-size: 17px; color: var(--ink-soft); margin: 0 0 20px; }
.section { margin: 64px 0; }
.chip-plain { border: 1px solid var(--line); color: var(--ink-soft); background: var(--paper); font-weight: 500; }

/* ── Karta prozy (gawęda, dokument Dyrektora) ────────── */
.prose-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 30px 36px; box-shadow: 0 1px 2px rgba(28,27,27,.04);
}
.prose-card .speaker {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px;
}
.speaker-name { font-weight: 700; font-size: 15.5px; }
.speaker-role { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); letter-spacing: .05em; text-transform: uppercase; }
.prose-card p { margin: 0 0 1.1em; }
.prose-card p:last-child { margin-bottom: 0; }
.prose-card h1, .prose-card h2, .prose-card h3 {
  font-family: var(--serif); letter-spacing: -0.01em; margin: 1.3em 0 .55em;
  line-height: 1.3;
}
.prose-card h1 { font-size: 24px; } .prose-card h2 { font-size: 21px; }
.prose-card h3 { font-size: 18px; }
.prose-card h4 {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
  margin: 1.6em 0 .5em;
}
.prose-card ul, .prose-card ol { margin: .5em 0 1em; padding-left: 1.4em; }
.prose-card li { margin-bottom: .45em; }

.veto-box {
  background: var(--veto-bg); border: 1.5px dashed var(--veto); border-radius: 10px;
  padding: 16px 20px; margin: 18px 0;
}
.veto-box .veto-head {
  font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--veto);
  letter-spacing: .1em; margin-bottom: 8px;
}
.veto-box .veto-quote { font-style: italic; }

.reflection {
  margin-top: 16px; padding: 14px 18px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-left: 3px solid var(--ink-soft);
  color: var(--ink); font-size: 15.5px; font-style: italic;
}
.reflection .refl-title {
  display: block; font-style: normal; font-family: var(--mono);
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-soft); margin-bottom: 6px;
}

/* ── Tablica poprzednich decyzji ─────────────────────── */
.ledger {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 22px; margin-top: 18px;
  /* UWAGA: bez overflow-x tutaj — .ledger-head-row th jest position:sticky
     (top:64px) i scroll-kontener przykleiłby nagłówek WEWNĄTRZ panelu
     (nagłówek najeżdżał na 1. wiersz). Mieszczenie się kolumn pilnują
     szerokości w serial.html.j2; mobile ma scroll w media query. */
}
.ledger-head {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px;
}
.ledger-pos { font-size: 13.5px; color: var(--ink-soft); margin: 6px 0 10px; }
.ledger table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger td {
  padding: 9px 12px 9px 0; border-top: 1px solid var(--line); vertical-align: top;
}
.ledger tr:first-child td { border-top: none; }
.ledger .when { font-family: var(--mono); color: var(--ink-soft); white-space: nowrap; width: 78px; }
.ledger .dir { font-family: var(--mono); font-weight: 700; white-space: nowrap; width: 86px; }
.ledger .dir.up { color: var(--bull); } .ledger .dir.down { color: var(--bear); }
.ledger .perf { font-family: var(--mono); white-space: nowrap; width: 130px; }
.ledger .verdict { white-space: nowrap; width: 130px; font-weight: 600; }
.ledger .verdict-good { color: var(--bull); }
.ledger .verdict-bad { color: var(--bear); }
.ledger .verdict-pending { color: var(--ink-soft); font-weight: 400; }
.ledger .thesis { color: var(--ink-soft); font-size: 13px; font-style: italic; }

/* ── Debata: bąbelki ─────────────────────────────────── */
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.bubble { max-width: 78%; }
.bubble.side-right { align-self: flex-end; }
.bubble.side-left  { align-self: flex-start; }
.bubble.side-center{ align-self: center; max-width: 92%; }
.bubble-head { display: flex; align-items: baseline; gap: 8px; margin: 0 6px 5px; }
.bubble-name { font-weight: 700; font-size: 13.5px; }
.bubble-tag  { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 1.5px 7px; border-radius: 4px; }
.tone-bull .bubble-tag { color: var(--bull); background: var(--bull-bg); }
.tone-bear .bubble-tag { color: var(--bear); background: var(--bear-bg); }
.tone-neutral .bubble-tag { color: var(--ink-soft); background: var(--line); }
.bubble-body {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; font-size: 15.5px;
}
.tone-bull .bubble-body { border-color: rgba(26,127,55,.4); background: linear-gradient(0deg, var(--paper), var(--bull-bg) 400%); border-radius: 12px 12px 4px 12px; }
.tone-bear .bubble-body { border-color: rgba(197,40,61,.4); background: linear-gradient(0deg, var(--paper), var(--bear-bg) 400%); border-radius: 12px 12px 12px 4px; }
.bubble-body p { margin: 0 0 .8em; } .bubble-body p:last-child { margin-bottom: 0; }
.bubble-body ul, .bubble-body ol { margin: .4em 0; padding-left: 1.3em; }

.confession {
  margin-top: 10px; padding: 14px 18px; border-radius: 8px;
  background: var(--accent-bg); border-left: 3px solid var(--accent);
  font-size: 15.5px; font-style: italic; color: var(--ink);
}
.confession .cam {
  font-style: normal; font-family: var(--mono); font-size: 12px;
  font-weight: 700; letter-spacing: .08em; color: var(--accent-deep);
  display: block; margin-bottom: 6px;
}

/* ── Zwijane sekcje (details) ────────────────────────── */
details.fold { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin: 16px 0; }
details.fold > summary {
  cursor: pointer; list-style: none; padding: 16px 22px;
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 12px; color: var(--ink);
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; color: var(--accent); font-size: 15px; transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary .count {
  margin-left: auto; color: var(--ink-soft); font-weight: 400;
  font-family: var(--mono); font-size: 12.5px;
}
details.fold > .fold-body { padding: 8px 22px 22px; border-top: 1px dashed var(--line); }

/* ── Pasek maszyny: lejek etapów (cały fundusz na jednej spółce) ─────── */
.pipeline {
  display: flex; align-items: stretch; gap: 6px; flex-wrap: nowrap;
  /* overflow-x:auto wymusza clip osi Y → hover translateY(-1px) ucinał górną
     ramkę przycisku; padding w pionie daje jej miejsce. */
  margin: 0 0 12px; overflow-x: auto; padding: 3px 2px;
}
.pipeline-hint {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; font-weight: 700;
  color: var(--accent-deep); text-align: center; margin: 22px 0 9px;
}
.pipeline .pl-step {
  flex: 1 1 0; min-width: 96px; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 1px 2px rgba(28,27,27,.07);   /* lekko „uniesiony" → wygląda na przycisk */
  transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
}
.pipeline .pl-step:hover { border-color: var(--accent); background: var(--accent-bg);
  transform: translateY(-2px); box-shadow: 0 4px 13px rgba(181,137,0,.22); }
.pipeline .pl-step:hover .pl-lab { color: var(--accent-deep); }
.pipeline .pl-step:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(28,27,27,.1); }
.pipeline .pl-n { font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1; }
.pipeline .pl-lab { font-size: 11.5px; line-height: 1.25; color: var(--ink-soft); text-align: center; }
.pipeline .pl-arrow { align-self: center; color: var(--accent); font-size: 17px; flex: 0 0 auto; }
.pipeline .pl-boss .pl-n { color: var(--accent-deep); }
.pipeline .pl-veto { border-color: var(--veto); background: var(--veto-bg); }
.pipeline .pl-veto .pl-n { color: var(--veto); }

/* ── Pasek liczb: skala pracy ─────────────────────────────────────────── */
.stats-strip {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft);
  letter-spacing: .01em; margin: 0 0 30px; line-height: 1.7;
}
.stats-strip strong { color: var(--ink); }

/* ── Pasek prasy: nagłówki, które fundusz przeczytał przed decyzją ─────── */
.press-strip {
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  padding: 18px 22px; margin: 0 0 28px;
}
.press-strip .press-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin-bottom: 10px;
}
.press-strip .press-kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep);
}
.press-strip .press-count {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
}
.press-strip .press-list { list-style: none; margin: 0; padding: 0; }
.press-strip .press-item {
  display: grid; grid-template-columns: 104px 158px 1fr;
  column-gap: 14px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid var(--line);
}
.press-strip .press-item:first-child { border-top: 0; }
.press-strip .press-date,
.press-strip .press-src {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft);
  white-space: nowrap;
}
.press-strip .press-src { overflow: hidden; text-overflow: ellipsis; }
.press-strip .press-title {
  font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
a.press-title { text-decoration-color: rgba(181,137,0,.35); }
a.press-title:hover { color: var(--accent-deep); }
@media (max-width: 640px) {
  .press-strip { padding: 14px 16px; }
  .press-strip .press-item { display: block; }
  .press-strip .press-date::after { content: " · "; }
  .press-strip .press-date, .press-strip .press-src { display: inline; }
  .press-strip .press-title { margin-top: 2px; }
}

/* ── Panel „decyzja w 30 s" ───────────────────────────────────────────── */
.decision30 {
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 14px; background: var(--paper);
  padding: 20px 24px; margin: 0 0 40px;
}
.decision30 .d30-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 18px; margin-bottom: 16px;
}
.d30-kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep);
}
.d30-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); }
.d30-conf .dot { color: var(--line); font-size: 10px; letter-spacing: 1px; }
.d30-conf .dot.on { color: var(--accent); }
.d30-conf-lab { margin-left: 5px; }
/* Dwie decyzje: Dyrektor rekomenduje → Prezes wybiera ostatecznie */
.d30-decisions { margin: 0 0 22px; display: flex; flex-direction: column; gap: 0; }
.d30-dec-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.d30-dec-final { border-bottom: none; }
.d30-dec-who { font-size: 15px; color: var(--ink); }
.d30-dec-final .d30-dec-who { font-weight: 800; }
.d30-dec-role {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); margin-left: 4px;
}
.d30-dec-call { font-weight: 800; font-size: 16px; white-space: nowrap; }
.d30-dec-call.up { color: var(--bull); }
.d30-dec-call.down { color: var(--bear); }
.d30-dec-note { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; }
.d30-dec-note.is-veto {
  color: var(--veto); font-weight: 700; background: var(--veto-bg);
  border-radius: 8px; padding: 9px 13px;
}
.d30-vs-cap { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 12px; }
.d30-duels { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.d30-duel-dom {
  font-family: var(--mono); font-size: 14.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-deep); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.d30-duel-dom::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.d30-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.d30-side { border-radius: 10px; padding: 13px 15px; font-size: 14.5px; line-height: 1.55; }
.d30-side p { margin: 0; }  /* pełny tekst pola — bez ucinania (decyzja usera) */
.d30-side-head { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.d30-bull { background: var(--bull-bg); } .d30-bull .d30-side-head { color: var(--bull); }
.d30-bear { background: var(--bear-bg); } .d30-bear .d30-side-head { color: var(--bear); }
.d30-confess {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 13px; font-style: italic; line-height: 1.5; color: var(--ink-soft);
}
.d30-confess .cam {
  display: block; font-style: normal; font-family: var(--mono); font-size: 10.5px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 4px;
}
/* „Co może pójść nie tak" — strefa zagrożenia, wyeksponowana z dramą */
.d30-risks {
  margin: 22px 0 4px; padding: 18px 22px;
  background: var(--bear-bg); border: 1px solid rgba(197,40,61,.28);
  border-left: 5px solid var(--bear); border-radius: 12px;
}
.d30-risks-head {
  font-family: var(--display); font-size: 21px; font-weight: 800;
  letter-spacing: -0.01em; color: var(--bear); line-height: 1.15; margin-bottom: 4px;
}
.d30-risks-sub {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 14px;
}
.d30-risk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.d30-risk-list .risk-item {
  position: relative; padding-left: 30px; font-size: 16px; line-height: 1.5; color: var(--ink);
}
.d30-risk-list .risk-item::before {
  content: "⚠"; position: absolute; left: 0; top: 1px; font-size: 16px; color: var(--bear);
}
.decision30 .veto-box.d30-veto { margin: 14px 0 0; }

/* ── Gawęda Prezesa — gwóźdź programu (otwarta, wyeksponowana) ─────────── */
.gaweda-feature {
  border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: 16px; background: var(--accent-bg);
  padding: 26px 30px; margin: 0 0 44px;
}
.gaweda-feature .gf-kicker {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 8px;
}
.gaweda-feature .gf-speaker {
  font-family: var(--display); font-size: 23px; font-weight: 800;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.2; margin-bottom: 18px;
}
.gaweda-feature .gf-role {
  font-family: var(--mono); font-size: 12px; font-weight: 400;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
}
.gaweda-feature .gf-says {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 12px;
}
.gaweda-feature .gf-body { font-size: 18px; line-height: 1.72; }
.gaweda-feature .gf-body p { margin: 0 0 1em; }
.gaweda-feature .gf-body p:first-of-type { font-size: 20px; }
.gaweda-feature .gf-body p:last-child { margin-bottom: 0; }

/* ── Raport Dyrektora — nagłówek dokumentu + streszczenie ─────────────── */
.dir-report-head { border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 18px; }
.dir-report-head .drh-label {
  display: block; font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; color: var(--ink);
}
.dir-report-head .drh-meta {
  display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 4px;
}
.dir-summary {
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 14px 18px; margin: 0 0 20px; font-size: 16px; line-height: 1.6;
}
.dir-summary .ds-label {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 6px;
}

/* ── Zwijane ROZDZIAŁY karty (głębia pod żądanie) ─────────────────────── */
.section.is-chapter { margin: 16px 0; }
.chapter-fold { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.chapter-fold > summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  display: flex; align-items: center; gap: 14px;
}
.chapter-fold > summary::-webkit-details-marker { display: none; }
.chapter-fold > summary::before {
  content: "▸"; color: var(--accent); font-size: 16px; flex: 0 0 auto; transition: transform .15s;
}
.chapter-fold[open] > summary::before { transform: rotate(90deg); }
.chapter-fold[open] > summary { border-bottom: 1px dashed var(--line); }
.chapter-fold .cf-titles { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.chapter-fold .cf-kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep);
}
.chapter-fold .cf-head {
  font-family: var(--display); font-size: 20px; font-weight: 800;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.22;
}
.chapter-fold .cf-count {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  white-space: nowrap; flex: 0 0 auto;
}
.chapter-fold .cf-body { padding: 18px 22px 24px; }
.chapter-fold:hover { border-color: #D8D2C7; }

/* Jednolite przyciski CTA w nagłówkach rozdziałów — jeden na rozdział */
.cf-count.cf-cta-btn {
  display: inline-block; font-family: var(--mono); font-size: 13.5px; font-weight: 800;
  letter-spacing: .02em; color: #fff; background: var(--accent-deep);
  padding: 8px 15px; border-radius: 999px; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.chapter-fold > summary:hover .cf-cta-btn { background: var(--accent); transform: translateY(-1px); }

@media (max-width: 640px) {
  .d30-vs { grid-template-columns: 1fr; }
  .chapter-fold > summary { flex-wrap: wrap; }
  .chapter-fold .cf-count { display: none; }
  /* CTA zostaje widoczne i ląduje pod tytułem (chowamy tylko zwykłe liczniki) */
  .chapter-fold .cf-count.cf-cta-btn { display: inline-block; margin-top: 8px; white-space: normal; }
  .chapter-fold .cf-head { font-size: 18px; }
  .pipeline .pl-lab { font-size: 11px; }
}

/* Briefy analityków: pełnoprawna proza + tabele md (nie mogą rozjeżdżać layoutu). */
.brief-body { padding-top: 16px; font-size: 15.5px; }
.brief-body p { margin: 0 0 1em; }
.brief-body h1, .brief-body h2, .brief-body h3 {
  font-family: var(--serif); font-size: 19px; margin: 1.2em 0 .5em; line-height: 1.3;
}
.brief-body h4 {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
  margin: 1.5em 0 .5em;
}
.brief-body ul, .brief-body ol { margin: .5em 0 1em; padding-left: 1.4em; }
.brief-body li { margin-bottom: .4em; }
.brief-body table, .prose-card table {
  display: block; max-width: 100%; overflow-x: auto;
  border-collapse: collapse; font-size: 13.5px; font-family: var(--mono);
  margin: 14px 0;
}
.brief-body td, .brief-body th, .prose-card td, .prose-card th {
  border: 1px solid var(--line); padding: 6px 12px; white-space: nowrap;
}
.brief-body th, .prose-card th { background: var(--bg); font-weight: 700; text-align: left; }

/* ── Machine teaser / panele ─────────────────────────── */
.machine-band {
  background: var(--machine-bg); color: var(--machine-text);
  border-radius: 12px; padding: 22px 26px; margin: 36px 0;
  font-family: var(--mono);
}
.machine-band a { color: var(--machine-green); text-decoration: none; }
.machine-band a:hover { text-decoration: underline; }
.machine-band .m-flash { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.machine-band .m-flash-tag {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--machine-red);
  padding: 4px 10px; border-radius: 5px; white-space: nowrap;
}
.machine-band .m-flash-head { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.machine-band .m-sub { font-size: 12.5px; color: var(--machine-dim); }
.machine-band .m-title { font-size: 23px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 8px; }
/* dymki nazw na taśmach-marquee przycina overflow:hidden (potrzebny dla marquee) — wyłączamy je tu */
.tape a[data-name]:hover::after { content: none; }
.machine-band .m-cta {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 16px;
  background: var(--machine-green); color: var(--machine-bg);
  padding: 15px 30px; border-radius: 8px; text-decoration: none; margin-top: 24px;
}
.machine-band .m-cta:hover { filter: brightness(1.12); color: var(--machine-bg); text-decoration: none; }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  margin-top: 60px; border-top: 1px solid var(--line); padding: 26px 0 40px;
  font-size: 13px; color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer-grid .f-head {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 10px;
}
.footer-grid nav { display: flex; flex-direction: column; gap: 7px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  /* full-bleed hero karty: margines = mobilny padding wrap (16), inaczej 6px przepełnienia.
     .wrap-prefix podbija specyficzność nad bazową regułą .hero.hero-up (jest niżej w pliku). */
  .wrap .hero.hero-up, .wrap .hero.hero-down { margin-left: -16px; margin-right: -16px; }
  /* nagłówek w dwóch rzędach: logo + CTA, pod spodem pełna nawigacja */
  .site-header .wrap { gap: 4px 14px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; }
  .nav { order: 3; flex-basis: 100%; gap: 16px; margin-left: 0; overflow-x: auto; }
  .nav a { white-space: nowrap; font-size: 13.5px; padding: 2px 0 6px; }
  .btn-latest { margin-left: auto; font-size: 11px; padding: 6px 10px; }
  .hero-verdict { font-size: 32px; }
  .machine-band .m-flash-head { font-size: 18px; }
  .machine-band .m-cta { display: block; text-align: center; font-size: 15px; padding: 14px 18px; }
  .story-head { font-size: 24px; }
  .summary-thesis { font-size: 19px; }
  .bubble { max-width: 94%; }
  .bubble-body { font-size: 16.5px; line-height: 1.7; }
  .prose-card { padding: 18px 18px; }
  .ledger .thesis { display: none; }
}

/* Tytuły pudełek highlightów na landingu — duże, filmowe */
.hl-title {
  font-family: var(--serif); font-weight: 700; font-size: 21px;
  letter-spacing: -0.01em; margin-bottom: 10px; color: var(--ink);
}

/* ── Highlighty tygodnia: wizytówki spółek (nazwa + pozycja + sparkline + fraza) ── */
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(282px, 1fr)); gap: 16px; margin: 20px 0; }
.hl-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 18px 14px; text-decoration: none; color: var(--ink);
}
.hl-card:hover { border-color: var(--accent); }
.hl-kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 9px;
}
.hl-name {
  font-family: var(--serif); font-weight: 700; font-size: 23px;
  letter-spacing: -0.01em; line-height: 1.08;
  /* Rezerwa na 2 linie — długie nazwy (PZU, Pekao) nie rozjeżdżają
     wysokości sąsiednich wizytówek w rzędzie. */
  min-height: calc(1.08em * 2);
}
.hl-pos-row { margin-top: 8px; }
.hl-pos {
  display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700;
  white-space: nowrap; padding: 3px 10px; border-radius: 999px;
}
.hl-pos-up { color: var(--bull); background: var(--bull-bg); }
.hl-pos-down { color: var(--bear); background: var(--bear-bg); }
.hl-spark { margin: 12px 0 2px; }
.hl-spark .drama-svg { height: 84px; }
.hl-spark-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin: 1px 0 2px; }
.hl-phrase { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.38; color: var(--ink); margin: 9px 0 2px; }
.hl-news {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hl-news .hl-news-meta {
  display: block; font-family: var(--mono); font-weight: 400; font-size: 12px;
  color: var(--ink-soft); margin-bottom: 4px; letter-spacing: .02em;
}
.hl-go { margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--accent-deep); }
.hl-card:hover .hl-go { color: var(--ink); }
@media (max-width: 720px) { .hl-name { font-size: 21px; } .hl-phrase { font-size: 17px; } }

/* Prasa pod Debatą tygodnia */
.debata-press {
  margin-top: 16px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.debata-press .dp-kicker {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 8px;
}
.debata-press .dp-list { list-style: none; margin: 0; padding: 0; }
.debata-press .dp-list li {
  display: grid; grid-template-columns: 104px 158px 1fr; column-gap: 14px;
  align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line);
  font-size: 14.5px; font-weight: 600; line-height: 1.45;
}
.debata-press .dp-list li:first-child { border-top: 0; }
.debata-press .dp-date, .debata-press .dp-src {
  font-family: var(--mono); font-weight: 400; font-size: 11.5px;
  color: var(--ink-soft); white-space: nowrap;
}
.debata-press .dp-src { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .debata-press .dp-list li { display: block; }
  .debata-press .dp-date::after { content: " · "; }
  .debata-press .dp-date, .debata-press .dp-src { display: inline; }
}

/* ── Debata tygodnia: jedno starcie byk↔niedźwiedź (reuse bąbli z karty) ── */
.debata-tyg { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; align-items: start; }
.debata-tyg .bubble { max-width: 100%; }
.debata-tyg .bubble-body { max-height: 232px; overflow: hidden; position: relative; }
.debata-tyg .bubble-body::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: linear-gradient(transparent, var(--paper)); pointer-events: none;
}
@media (max-width: 720px) { .debata-tyg { grid-template-columns: 1fr; } }


/* ── Klikalne tickery — wszędzie widać, że to link ───── */
.ticker-link {
  font-family: var(--mono); font-weight: 700; color: var(--accent-deep);
  text-decoration: underline; text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.ticker-link:hover { color: var(--ink); text-decoration-style: solid; }
.tape-link {
  color: inherit; font-weight: 700;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
}
.tape-link:hover { color: #fff; text-decoration-style: solid; }

/* ── TOP/FLOP infografika ────────────────────────────── */
.topflop { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.tf-head {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px;
}
.tf-head-pos { color: var(--bull); } .tf-head-neg { color: var(--bear); }
.tf-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.tf-row .ticker-link { width: 52px; flex: none; font-size: 14px; }
.tf-bar-wrap { flex: 1; height: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.tf-bar { height: 100%; border-radius: 3px; }
.tf-bar.pos { background: linear-gradient(90deg, var(--bull-bg), var(--bull)); }
.tf-bar.neg { background: linear-gradient(90deg, var(--bear-bg), var(--bear)); }
.tf-val { font-family: var(--mono); font-size: 13px; width: 72px; text-align: right; flex: none; }
@media (max-width: 720px) { .topflop { grid-template-columns: 1fr; } }


/* ── Nagłówek tablicy decyzji ────────────────────────── */
.ledger-head-row th {
  text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
  padding: 0 12px 8px 0; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.ledger-head-row th span { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--accent-deep); }
.when-ago { font-size: 12px; color: var(--ink-soft); }

.ledger-today td { background: var(--accent-bg); }
.ledger-today td:first-child { border-radius: 6px 0 0 6px; }
.ledger-today td:last-child { border-radius: 0 6px 6px 0; }
.ledger-today .when strong { font-family: var(--mono); }

/* ── /spolki/: screenery (pełne rankingi) ────────────── */
.screener { column-count: 2; column-gap: 56px; }
.screener-row { break-inside: avoid; }
.screener .rank {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  width: 28px; text-align: right; flex: none;
}
.screener .hit-detail {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  width: 56px; text-align: right; flex: none; white-space: nowrap;
}
@media (max-width: 860px) { .screener { column-count: 1; } }

/* ── /spolki/: wizytówki spółek ──────────────────────── */
.spolka-card .sp-decision {
  margin: 14px 0 12px; padding: 11px 14px; border-radius: 8px;
  font-size: 13px; line-height: 1.45;
}
.sp-decision.up   { background: var(--bull-bg); color: var(--bull); }
.sp-decision.down { background: var(--bear-bg); color: var(--bear); }
.sp-decision-label { display: block; font-size: 12.5px; color: var(--ink-soft); }
.sp-decision strong {
  display: block; font-family: var(--mono); font-size: 18px; margin: 3px 0 1px;
}
.sp-decision-sub { display: block; font-size: 12.5px; color: var(--ink-soft); }
.sp-stats { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13.5px; }
.sp-stats li { margin: 4px 0; }
.sp-stats li span { color: var(--ink-soft); font-size: 12.5px; }
.sp-thesis { font-style: italic; color: var(--ink-soft); margin: 0; font-size: 13.5px; }

/* ── Serial: jawny przycisk „analiza z tego dnia →" ──── */
.analysis-link {
  display: inline-block; text-decoration: none; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.analysis-link strong {
  display: block; font-family: var(--mono); font-size: 13px;
  color: var(--ink); white-space: nowrap;
}
.analysis-link span {
  display: block; font-size: 11.5px; color: var(--accent-deep);
  white-space: nowrap; margin-top: 2px;
}
.analysis-link:hover { border-color: var(--accent); background: var(--accent-bg); }

/* ── Usability runda 3 (propozycje 3-40) ─────────────── */

/* #7: taśmy landingu zatrzymują się pod kursorem */
.tape:hover .tape-track { animation-play-state: paused; }

/* #13: zebra + podświetlenie wierszy tabel */
.ledger tr:nth-child(even):not(.ledger-today):not(.ledger-head-row) td { background: #F6F4EF; }
.ledger tr:not(.ledger-today):not(.ledger-head-row):hover td { background: var(--accent-bg); }

/* #10: nagłówek tabeli przyklejony przy scrollu (desktop) */
.ledger-head-row th { position: sticky; top: 64px; background: var(--paper); z-index: 5; }

/* #14: proza nie szersza niż ~70 znaków */
.prose-card p, .prose-card li { max-width: 70ch; }

/* #15: kicker rozdziału nad nagłówkiem fabularnym */
.chapter-kicker {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep);
  margin-bottom: 6px;
}

/* #12: legenda symboli nad tabelami */
.legend {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  margin: 0 0 10px; letter-spacing: .02em;
}

/* #4: spis treści karty — celowo BEZ ramki (odróżnia się od kartonu dat);
   spory margines dolny, żeby nie najeżdżał na kolorową ramkę hero */
.karta-toc {
  display: flex; align-items: baseline; gap: 6px 18px; flex-wrap: wrap;
  font-size: 14px; margin: 20px 0 34px; padding: 0;
}
.karta-toc .toc-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.karta-toc a {
  color: var(--ink); white-space: nowrap;
  text-decoration: underline; text-decoration-style: dotted;
  text-decoration-color: var(--accent); text-underline-offset: 4px;
}
.karta-toc a:hover { color: var(--accent-deep); }

/* #5: strzałki starsza/nowsza w nawigatorze dat */
.date-nav .dn-arrow { font-weight: 700; color: var(--accent-deep); }

/* #8: sąsiednie spółki w breadcrumbie — własny wiersz (nie tłoczone w jedną linię) */
.bc-neighbors { gap: 10px; }

/* #9: powrót na górę długiej strony */
.to-top {
  position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink-soft); text-decoration: none; font-size: 18px;
  box-shadow: 0 2px 8px rgba(28,27,27,.10); z-index: 40;
}
.to-top:hover { border-color: var(--accent); color: var(--accent-deep); }

/* #38: pasek postępu czytania (CSS scroll-timeline; brak wsparcia = brak paska) */
@supports (animation-timeline: scroll()) {
  .read-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 100%;
    background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
    animation: read-grow linear; animation-timeline: scroll(root); z-index: 100;
  }
  @keyframes read-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* #34: hero karty z pasem tła w kolorze kierunku */
.hero.hero-up, .hero.hero-down {
  border-radius: 14px; padding-left: 22px; padding-right: 22px;
  margin-left: -22px; margin-right: -22px;
}
.hero.hero-up   { background: linear-gradient(135deg, var(--bull-bg) 0%, rgba(255,255,255,0) 60%); }
.hero.hero-down { background: linear-gradient(135deg, var(--bear-bg) 0%, rgba(255,255,255,0) 60%); }

/* #19: pierwszy akapit dokumentu Dyrektora jako lead */
.dir-doc > p:first-of-type { font-size: 19px; line-height: 1.65; }

/* #33: kafelek spółki — krawędź w kolorze decyzji + strzałka na hover */
.spolka-card { position: relative; }
.spolka-card.edge-up   { border-left: 3px solid var(--bull); }
.spolka-card.edge-down { border-left: 3px solid var(--bear); }
.spolka-card::after {
  content: "→"; position: absolute; top: 14px; right: 16px;
  color: var(--accent-deep); font-weight: 700; opacity: 0; transition: opacity .15s;
}
.spolka-card:hover::after { opacity: 1; }

/* #6: szukajka na /spolki/ */
.filter-input {
  width: 100%; max-width: 420px; margin: 0 0 18px; padding: 11px 16px;
  font: 500 15px/1.4 var(--sans); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
}
.filter-input:focus { outline: none; border-color: var(--accent); }

/* #32: sparkline wyniku — pełna szerokość karty (wykres był za mały) */
.sp-spark { margin: 6px 0 10px; }
.sp-spark svg { width: 100%; height: auto; display: block; }
.sp-spark-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin: 2px 0 0; }
.serial-spark { margin-top: 16px; }
.serial-spark .spark-caption { font-size: 14.5px; margin-top: 6px; }
.serial-spark .spark-caption span { color: var(--ink-soft); font-size: 13px; }

/* #3: klikalny cały wiersz tabeli odcinka (nawigacja przez JS — patrz odcinek.html.j2) */
/* cursor jawnie na komórkach — nie polegamy na dziedziczeniu (nad tekstem bywał I-beam/auto) */
.row-clickable, .row-clickable td { cursor: pointer; }
.row-clickable:hover td { background: var(--accent-bg); }

/* #39: druk karty — czysta typografia bez chrome */
@media print {
  .site-header, .site-footer, .date-nav, .breadcrumb, .karta-toc,
  .machine-band, .to-top, .read-progress, .hero-band, .tape { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .prose-card, .ledger, .cast-card { border: none; box-shadow: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
}
.bc-neighbors .bc-label { color: var(--ink-soft); font-size: 11px; }

/* ── „Tydzień na wykresach" — dramatyczne panele landingu ── */
.drama-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.drama-card {
  display: block; background: var(--machine-bg); border: 1px solid var(--machine-border);
  border-radius: 12px; padding: 18px 18px 16px; color: var(--machine-text);
  text-decoration: none;
}
.drama-card:hover { border-color: var(--accent); }
.drama-title {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: #fff;
}
.drama-name { font-size: 12.5px; color: var(--machine-dim); margin: 2px 0 12px; }
.drama-svg { width: 100%; height: 140px; display: block; }
.drama-num { font-family: var(--mono); font-size: 30px; font-weight: 700; margin-top: 10px; }
.drama-sub { font-size: 12.5px; color: var(--machine-dim); margin-top: 2px; }
.drama-dec { font-family: var(--mono); font-size: 12px; margin-top: 10px; color: var(--machine-text); }
@media (max-width: 860px) { .drama-grid { grid-template-columns: 1fr; } }

/* ── Warianty JASNE landingu (odczernienie góry — Etap 1) ──────────────
   NIE nadpisują ciemnych klas bazowych (.machine-band/.drama-card są też
   na karcie i Platformie) — to osobne klasy-warianty. */
.stats-band {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 26px; font-family: var(--mono);
}
.stats-band .m-flash { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.stats-band .m-flash-tag {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 4px 10px; border-radius: 5px; white-space: nowrap;
}
.stats-band .m-flash-head { font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
.stats-band .scale-item .num { color: var(--bull); }
.stats-band .scale-item .num.cost { color: var(--accent-deep); }
.stats-band .scale-item .num[data-dir="down"] { color: var(--bear); }
.stats-band .scale-item .what { color: var(--ink-soft); }

/* pasek rozliczeń (relokacja dawnej taśmy-2) — statyczny, czytelny */
.settle-strip { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 18px 0 4px; font-family: var(--mono); font-size: 13px; }
.settle-lab { color: var(--ink-soft); font-weight: 600; }
.settle-item { text-decoration: none; color: var(--ink); white-space: nowrap; }
.settle-item em { font-style: normal; font-weight: 700; }
.settle-item.good em { color: var(--bull); }
.settle-item.bad em { color: var(--bear); }
.settle-item:hover { color: var(--accent-deep); }

/* CTA bursztynowy (zamiast zielonego maszynowego m-cta na jasnym tle) */
.btn-accent {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: 16px;
  background: var(--accent); color: #fff; padding: 14px 28px; border-radius: 8px;
  text-decoration: none; margin-top: 22px;
}
.btn-accent:hover { background: var(--accent-deep); color: #fff; text-decoration: none; }

/* „Tydzień na wykresach" na jasno (kolor linii wykresu = sentyment, w site.py) */
.drama-card.drama-light { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.drama-card.drama-light .drama-title { color: var(--ink); }
.drama-card.drama-light .drama-name,
.drama-card.drama-light .drama-sub { color: var(--ink-soft); }
.drama-card.drama-light .drama-dec { color: var(--accent-deep); }
.drama-card.drama-light:hover { border-color: var(--accent); }

/* złote „ai" w logo — AI jest w funduszu, spółki są prawdziwe */
.logo .logo-ai { color: var(--accent); }
.logo:hover .logo-ai { color: var(--accent-deep); }

/* ── „Platforma danych zasilająca fundusz" ───────────── */
.plat-band { margin: 0; }
.plat-lead {
  font-family: var(--sans); font-size: 15.5px; line-height: 1.65;
  color: var(--machine-text); max-width: 74ch; margin: 14px 0 24px;
}
.plat-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin: 0 0 28px; }
.plat-nums .pn {
  font-size: 36px; font-weight: 700; color: var(--machine-green);
  letter-spacing: -0.02em; white-space: nowrap;
}
.plat-nums .pw { font-family: var(--sans); font-size: 12.5px; color: var(--machine-text); line-height: 1.55; margin-top: 4px; }
.plat-flow { margin: 6px 0 20px; }
.pf-row { display: flex; flex-wrap: wrap; align-items: stretch;
  border: 1px solid var(--machine-border); border-radius: 8px; overflow: hidden;
  background: rgba(255,255,255,0.03); }
.pf-row span {
  flex: 1; text-align: center; white-space: nowrap;
  color: var(--machine-text); font-size: 12.5px; padding: 10px 12px;
  border-right: 1px solid var(--machine-border);
}
.pf-row span:last-child { border-right: none; }
.pf-core { border-color: rgba(63,185,80,.45); }
.pf-core span { color: #fff; border-right-color: rgba(63,185,80,.28); }
.pf-out { border-color: var(--accent); }
.pf-out span { color: #E3B341; font-weight: 700; white-space: normal; }
.pf-arrow { font-size: 15px; font-weight: 600; color: var(--machine-text); text-align: center; margin: 14px 0; letter-spacing: .02em; }
@media (max-width: 860px) {
  .plat-nums { grid-template-columns: 1fr 1fr; }
  .pf-row span { white-space: normal; min-width: 40%; border-right: none; }
}

/* ── „Cytat tygodnia" — dramatyczne wejście po liczbach ── */
.quote-day { margin-top: 26px; border-top: 1px solid var(--machine-border); padding-top: 20px; }
.qd-intro {
  font-family: var(--serif); font-style: italic; font-size: 15px;
  color: var(--machine-dim); margin-bottom: 14px;
}
.qd-label {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; color: #E3B341; margin-bottom: 12px;
}
.qd-text {
  margin: 0; font-family: var(--serif); font-style: italic;
  font-size: 20px; line-height: 1.6; color: #fff;
  border-left: 3px solid var(--accent); padding-left: 18px;
}
.qd-who {
  font-family: var(--mono); font-size: 12px; color: var(--machine-dim);
  margin-top: 12px; padding-left: 21px;
}
.qd-who a { color: var(--machine-green); }
@media (max-width: 720px) { .qd-text { font-size: 17px; } }

/* ── FOMO: zegar odcinka + zakład tygodnia ───────────── */
.hero-countdown {
  font-family: var(--mono); font-size: 13.5px; color: #fff;
  margin-top: 20px;
}
.hero-countdown strong { color: #fff; }

/* ── Landing: piktogramowy pasek „Jak to działa" (jasny box) ── */
.howflow { display: flex; align-items: stretch; justify-content: space-between; gap: 4px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px 16px; margin: 18px 0; }
.howflow-step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; padding: 4px 6px; }
.hf-ico { color: var(--ink); line-height: 0; }
.hf-svg { width: 32px; height: 32px; display: block; }
.hf-lab { font-size: 12.5px; color: var(--ink); line-height: 1.35; }
.hf-arrow { align-self: center; color: var(--ink-soft); font-size: 18px; flex: none; }
@media (max-width: 720px) {
  .howflow { flex-direction: column; gap: 6px; padding: 18px; }
  .hf-arrow { transform: rotate(90deg); }
  .howflow-step { flex-direction: row; gap: 12px; justify-content: flex-start; text-align: left; }
  .hf-svg { width: 26px; height: 26px; }
}
.bet-line {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft);
  margin-top: 10px;
}
.bet-line.bet-won { color: var(--bull); }
.bet-line.bet-lost { color: var(--bear); }

/* ── Wykres kursu na karcie (PIT, pod hero) ──────────── */
.price-chart {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px 10px;
}
.pc-svg { width: 100%; height: auto; display: block; }
/* CTA do galerii „oczami agenta" — od nowej linii, wyraźny (nie „quiet") */
a.chart-cta {
  display: inline-block; margin: 4px 0 14px;
  font-size: 16.5px; font-weight: 700; color: var(--accent-deep);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
a.chart-cta:hover { color: var(--accent); }

/* ── Tooltip z nazwą spółki na tickerach (czysty CSS) ── */
a[data-name] { position: relative; }
a[data-name]:hover::after {
  content: attr(data-name);
  position: absolute; left: 50%; bottom: calc(100% + 7px);
  transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  line-height: 1.3; letter-spacing: 0; text-transform: none;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
  z-index: 70; pointer-events: none;
  box-shadow: 0 2px 8px rgba(28,27,27,.18);
}
/* górna taśma hero: dymek pod spodem, żeby nie uciekał poza pasek */
.tape-1 a[data-name]:hover::after { bottom: auto; top: calc(100% + 7px); }

/* dyskretny link (nie przyciąga wzroku — kontekstowe „zobacz więcej") */
a.quiet {
  color: var(--ink-soft); font-size: 14.5px;
  text-decoration: underline; text-decoration-style: dotted;
  text-underline-offset: 3px;
}
a.quiet:hover { color: var(--accent-deep); }

/* ── Newsletter (Kit/ConvertKit) — przemalowane pod paletę portalu ───────── */
.newsletter-form { max-width: 540px; margin: 4px auto 0; }
/* zdejmij dziwny górny padding Kit (robił miejsce na badge „Built with Kit") */
.newsletter-form .formkit-form { max-width: 540px !important; }
.newsletter-form .formkit-form[data-style="clean"],
.newsletter-form .formkit-form[min-width~="700"] [data-style="clean"],
.newsletter-form .formkit-form[min-width~="800"] [data-style="clean"] {
  padding: 0 !important;
}
.newsletter-form .formkit-fields { gap: 10px; }
.newsletter-form .formkit-field,
.newsletter-form .formkit-submit { margin: 0 !important; }
/* pole e-mail */
.newsletter-form .formkit-input {
  font-family: var(--sans) !important;
  font-size: 15px !important;
  color: var(--ink) !important;
  background: var(--paper) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  padding: 13px 15px !important;
  box-shadow: none !important;
}
.newsletter-form .formkit-input::placeholder { color: var(--ink-soft); opacity: .75; }
.newsletter-form .formkit-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-bg) !important;
  outline: none !important;
}
/* przycisk */
.newsletter-form .formkit-submit {
  background: var(--accent) !important;
  border-radius: 8px !important;
  transition: background .15s ease;
}
.newsletter-form .formkit-submit:hover { background: var(--accent-deep) !important; }
.newsletter-form .formkit-submit > span {
  font-family: var(--mono) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: .01em;
  color: #fff !important;
  padding: 13px 22px !important;
}
.newsletter-form .formkit-submit:hover > span { background: transparent !important; }
/* badge „Built with Kit" — dyskretny */
.newsletter-form .formkit-powered-by-convertkit-container { margin: 6px 0 0 !important; opacity: .4; }
/* wiadomość pod formularzem (X) — normalny tekst, nie drobny druk */
.prose-card .newsletter-after {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  max-width: none;
  margin: 18px 0 0;
  text-align: center;
}
.newsletter-after a { color: var(--accent-deep); font-weight: 600; }
/* nota prawna — drobny druk */
.prose-card .newsletter-legal {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: none;
  margin: 10px 0 0;
  text-align: center;
}
.newsletter-legal a { color: var(--accent-deep); }

/* ── Nauka: editorialne wiersze artykułów (eksponujemy nieliczne eseje) ──── */
.essay-list {
  max-width: 860px;
  margin: 10px auto 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.essay-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 30px;
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 38px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.essay-row:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0,0,0,.07);
  text-decoration: none;
}
.er-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 58px;
  line-height: .9;
  color: var(--accent);
  padding-top: 4px;
  border-right: 1px solid var(--line);
  padding-right: 30px;
  margin-right: -2px;
}
.er-month {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.er-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink);
  margin: 8px 0 0;
}
.er-teaser {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 13px 0 0;
}
.er-read {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-deep);
  margin-top: 20px;
}
.essay-row:hover .er-read { color: var(--accent); }
@media (max-width: 640px) {
  .essay-row { grid-template-columns: 1fr; gap: 10px; padding: 26px 24px; }
  .er-num { border-right: 0; padding-right: 0; font-size: 40px; }
}

/* ── Nauka: zaproszenie do współtworzenia ───────────────────────────────── */
.nauka-invite {
  max-width: 860px;
  margin: 26px auto 0;
  background: var(--accent-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 44px;
  text-align: center;
}
.ni-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.ni-head {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.2;
  color: var(--ink);
  margin: 10px 0 0;
}
.ni-lead {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 16px auto 0;
}
.ni-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 20px;
  margin-top: 26px;
}
.ni-actions .btn-accent { margin-top: 0; }
.ni-or {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-soft);
}
.ni-or a { color: var(--accent-deep); font-weight: 600; }

/* ── Strona prawna (regulamin / polityka prywatności) ───────────────────── */
.legal-doc h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin: 26px 0 8px;
}
.legal-doc h3:first-child { margin-top: 0; }
.legal-doc p {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.legal-doc p strong { color: var(--ink); }
.legal-doc a { color: var(--accent-deep); }

/* ── Odcinek/historia: wyraźny CTA „kliknij analizę w tabeli" (ludzie się gubią) ── */
.ledger-cta {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-deep);
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 10px 20px;
  /* więcej powietrza pod CTA (do nagłówka) */
  margin: 0 0 38px;
}
/* mniej powietrza nad CTA — ściągamy całą sekcję bliżej kafelków statystyk */
.section.section-cta { margin-top: 10px; }

/* Strzałka prowadząca wzrok do klikalnej tabeli odcinka */
.ledger-arrow {
  text-align: center;
  font-size: 30px;
  line-height: 1;
  color: var(--accent);
  margin: 4px 0 6px;
  animation: ledger-bounce 1.4s ease-in-out infinite;
}
@keyframes ledger-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}
@media (prefers-reduced-motion: reduce) { .ledger-arrow { animation: none; } }

/* ============================================================
   Film wyjaśniający (komponent wideo: plakat + klik)
   Reużywany na /jak-to-dziala/ i na landingu (_video.html.j2).
   ============================================================ */
.video-block { margin: 40px 0; }
.video-block > .video-head {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px; line-height: 1.2; color: var(--ink);
  text-align: center; margin: 0 0 6px;
}
.video-block > .video-sub {
  text-align: center; color: var(--ink-soft);
  font-size: 16px; margin: 0 auto 22px; max-width: 640px;
}
.video-wrap {
  position: relative; width: 100%; max-width: 880px;
  margin: 0 auto; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--ink);
  box-shadow: 0 10px 34px rgba(28, 27, 27, 0.14);
}
.video-wrap video { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-cap {
  text-align: center; margin: 12px 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; letter-spacing: 0.02em; color: var(--ink-soft);
}

/* Wariant dwukolumnowy (landing V2): wideo + krótkie copy obok. */
.video-split {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: 30px; align-items: center;
}
.video-split .video-wrap { max-width: none; }
.video-split .video-copy h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px; line-height: 1.18; color: var(--ink); margin: 0 0 12px;
}
.video-split .video-copy p { color: var(--ink-soft); font-size: 17px; margin: 0 0 16px; }
@media (max-width: 760px) {
  .video-split { grid-template-columns: 1fr; gap: 18px; }
  .video-block > .video-head { font-size: 22px; }
  .video-split .video-copy h2 { font-size: 23px; }
}

/* ── Sekcja „Wyniki" (/wyniki) — belka, tabele wariantów, wnioski ────────
   Prefiks .wy- (port makiety gielda-story/makieta_wyniki.html na tokeny
   portalu). Rankingi na tej samej stronie używają istniejących klas
   .screener/.tf-row. */
.wy-strip { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.wy-stat { flex: 1 1 180px; background: var(--paper); border: 1px solid var(--line);
           border-radius: 10px; padding: 14px 16px; }
.wy-label { font-size: 12.5px; color: var(--ink-soft); text-transform: uppercase;
            letter-spacing: 0.04em; margin-bottom: 2px; font-family: var(--sans); }
.wy-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums;
            font-family: var(--mono); }
.wy-note { font-size: 12.5px; color: var(--ink-soft); }
.wy-pos { color: var(--bull); } .wy-neg { color: var(--bear); }
.wy-explain { background: var(--paper); border: 1px solid var(--line);
              border-left: 4px solid var(--accent); border-radius: 10px;
              padding: 16px 20px; margin: 14px 0 34px; }
.wy-explain h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em;
                 color: var(--accent-deep); margin: 0 0 6px; font-family: var(--sans); }
.wy-explain p { font-size: 14.5px; margin: 0; }
.wy-explain b { font-weight: 600; }

.wy-scroll { overflow-x: auto; }
.wy-table { width: 100%; border-collapse: collapse; background: var(--paper);
            border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
            font-size: 14.5px; min-width: 560px; }
.wy-table th, .wy-table td { padding: 10px 14px; text-align: right;
            border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.wy-table th:first-child, .wy-table td:first-child { text-align: left; }
.wy-table thead th { background: #F3EFE7; font-size: 12.5px; text-transform: uppercase;
            letter-spacing: 0.04em; color: var(--ink-soft); font-family: var(--sans); }
.wy-table tr:last-child td { border-bottom: none; }
tr.wy-bench td { color: var(--ink-soft); background: #FBFAF7; }
.wy-tag { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 10px;
          border-radius: 99px; background: #E9E2D2; color: #4A4335;
          border: 1px solid #D6CDB8; vertical-align: 1px; font-family: var(--sans); }
.wy-table th.wy-var-h, .wy-table td.wy-var { text-align: left; }
.wy-table td.wy-var { color: var(--ink-soft); }
.wy-table.wy-why th, .wy-table.wy-why td { text-align: left; }
.wy-table.wy-why td:first-child { font-weight: 600; }
.wy-table.wy-why td:last-child { color: var(--ink-soft); }

.wy-comments { margin: 14px 0 0; padding: 0; font-size: 13.5px; color: var(--ink-soft);
               list-style: none; }
.wy-comments li { margin: 7px 0 7px 18px; }
.wy-comments b { color: var(--ink); font-weight: 600; }

.wy-wnioski { margin-top: 40px; background: var(--paper); border: 1px solid var(--line);
              border-left: 4px solid var(--accent); border-radius: 10px;
              padding: 20px 24px; }
.wy-wnioski h2 { margin: 0 0 12px; font-size: 19px; }
.wy-wnioski ol { margin: 0 0 0 20px; padding: 0; }
.wy-wnioski li { margin: 9px 0; font-size: 15px; }
.wy-wnioski li em { color: var(--ink-soft); font-style: normal; font-size: 13.5px; }
.wy-h2 { margin-top: 52px; }
