/* ==========================================================================
   Przewodnik JDG – style główne
   Kierunek: Stripe Guides (układ, karta eksperta, spis treści)
             + Mercury (szeryf w tekście, „W skrócie”, metadane, linki).
   ========================================================================== */

/* ---------- Tokeny ---------- */
:root {
  --bg: #fdfdfc;
  --surface: #ffffff;
  --ink: #1d2129;
  --muted: #5b6170;
  --line: #e6e5df;
  --accent: #1f3b73;
  --accent-soft: #eaeff8;
  --sponsor: #8a5a00;
  --sponsor-soft: #fdf3dc;
  --live: #c8372d;       /* aktualności: kropka, etykieta „Nowe” i pozycja w menu */
  --live-soft: #fdecea;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 680px;   /* szerokość tekstu: ok. 70 znaków */
  --side: 220px;      /* kolumna boczna artykułu */
  --wide: 1040px;     /* szerokość układu */
  --gutter: 32px;
  --radius: 10px;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.container {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site-main { flex: 1 0 auto; }

/* ---------- Nagłówek strony ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 64px;
}

/* Logo: znak (kompas) + „Przewodnik” szeryfem + „JDG” Interem */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo__mark { width: 30px; height: 30px; flex: none; display: block; }
.logo__bg { fill: var(--accent); }
.logo__fg { fill: #fff; }
.logo__fg--back { opacity: 0.5; }
.logo__name { font: 600 21px/1 var(--serif); letter-spacing: -0.01em; }
.logo__tag {
  font: 650 13px/1 var(--sans); letter-spacing: 0.08em; color: var(--accent);
  margin-left: 6px; position: relative; top: -1px;
}
.logo--inverse { color: #fff; }
.logo--inverse .logo__bg { fill: #fff; }
.logo--inverse .logo__fg { fill: var(--accent); }
.logo--inverse .logo__tag { color: #b9c8e8; }

.nav { min-width: 0; }
.nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 22px;
  overflow-x: auto; scrollbar-width: none;
}
.nav__list::-webkit-scrollbar { display: none; }
.nav__list a {
  display: block; padding: 8px 0;
  font: 500 14px/1.2 var(--sans); color: var(--muted);
  text-decoration: none; white-space: nowrap;
}
.nav__list a:hover,
.nav__list .current-menu-item > a,
.nav__list .current-cat > a,
.nav__list .current-post-ancestor > a { color: var(--ink); }

/* „Aktualności” w menu: czerwień jak kropka i „Nowe” w sekcji aktualności */
.nav__list .menu-item--news > a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--live); font-weight: 600;
}
.nav__list .menu-item--news > a::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none;
}
.nav__list .menu-item--news > a:hover,
.nav__list .menu-item--news.current-menu-item > a,
.nav__list .menu-item--news.current-cat > a,
.nav__list .menu-item--news.current-post-ancestor > a { color: #a32b22; }
/* Na węższych ekranach menu przewija się w poziomie, więc „Aktualności” idą na początek, żeby było je widać */
@media (max-width: 900px) {
  .nav__list .menu-item--news { order: -1; }
}

/* ---------- Okruszki i etykiety ---------- */
.crumbs { font: 500 13px/1.4 var(--sans); color: var(--muted); }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs__sep, .crumbs .separator { margin-inline: 2px; color: var(--line); }

.label-sponsored {
  display: inline-block;
  font: 600 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sponsor); background: var(--sponsor-soft);
  padding: 6px 9px; border-radius: 4px;
}

.section-label {
  font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 24px;
}

/* ---------- Artykuł: nagłówek ---------- */
.article-hero { padding-top: 48px; padding-bottom: 32px; }
.article-hero__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.article-title {
  font: 500 46px/1.1 var(--serif); letter-spacing: -0.015em;
  margin: 18px 0 16px; max-width: 820px;
  text-wrap: balance;
}

.article-lead {
  font: 400 21px/1.5 var(--serif); color: var(--muted);
  margin: 0; max-width: 720px;
}

.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  margin-top: 24px;
  font: 400 14px/1.4 var(--sans); color: var(--muted);
}
.article-meta time, .article-meta b { color: var(--ink); font-weight: 500; }
.legal-state {
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 4px; font-weight: 500;
}
.article-meta .legal-state time { color: inherit; }

/* ---------- Artykuł: układ ---------- */
.article-grid {
  display: grid;
  grid-template-columns: var(--side) minmax(0, var(--measure));
  gap: 56px;
  padding-bottom: 72px;
}
.article-grid::before {
  content: ""; grid-column: 1 / -1; height: 1px; background: var(--line);
  margin-bottom: -28px;
}

.article-side { padding-top: 0; }
.article-side > * + * { margin-top: 20px; }

/* Mała karta autora / partnera */
.byline {
  display: flex; gap: 12px; align-items: flex-start;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.byline__avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font: 600 14px var(--sans);
}
.byline p { margin: 0; font: 400 13px/1.45 var(--sans); color: var(--muted); }
.byline a { color: var(--ink); text-decoration: none; }
.byline b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.byline--partner .byline__avatar { background: var(--sponsor-soft); color: var(--sponsor); }

/* Spis treści */
.toc { position: sticky; top: 20px; font: 400 14px/1.4 var(--sans); }
.toc__title {
  font: 600 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
  list-style: none; cursor: default; pointer-events: none;
}
.toc__title::-webkit-details-marker { display: none; }
.toc__list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc__list a {
  display: block; padding: 6px 0 6px 14px; margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none;
}
.toc__list a:hover { color: var(--ink); }
.toc__list a[aria-current] { color: var(--ink); font-weight: 500; border-left-color: var(--accent); }

/* ---------- W skrócie ---------- */
.summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px 8px; margin-bottom: 32px;
}
.summary__title {
  font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin: 0 0 12px; font: 400 18px/1.55 var(--serif); }

/* ---------- Treść (prose) ---------- */
.prose { font: 400 19px/1.65 var(--serif); color: var(--ink); }
.prose > * { margin-block: 0 1.1em; }
.prose > :last-child { margin-bottom: 0; }

.prose a {
  color: inherit;
  text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: #b9bcc4; text-underline-offset: 3px;
}
.prose a:hover { text-decoration-color: var(--accent); }

/* Śródtytuły szeryfem, jak wszystkie tytuły w serwisie. Inter zostaje dla etykiet i interfejsu. */
.prose h2 {
  font: 600 29px/1.22 var(--serif); letter-spacing: -0.01em;
  margin: 1.8em 0 0.5em; text-wrap: balance;
}
.prose h3 { font: 600 22px/1.3 var(--serif); margin: 1.6em 0 0.45em; }
.prose h4 { font: 600 19px/1.35 var(--serif); margin: 1.4em 0 0.4em; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }

.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--muted); }

.prose strong { font-weight: 600; }

.prose blockquote, .prose .wp-block-quote {
  margin-inline: 0; padding-left: 20px; border-left: 3px solid var(--line);
  color: var(--muted); font-style: italic;
}

.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-element-caption {
  font: 400 14px/1.5 var(--sans); color: var(--muted); margin-top: 8px;
}

.prose hr, .prose .wp-block-separator {
  border: 0; height: 1px; background: var(--line); margin-block: 2em;
}

.prose code {
  font-size: 0.85em; background: #f1f1ec; padding: 2px 5px; border-radius: 4px;
}

/* Tabele: częste przy stawkach i progach */
.prose table, .prose .wp-block-table table {
  width: 100%; border-collapse: collapse;
  font: 400 15px/1.5 var(--sans);
}
.prose .wp-block-table { overflow-x: auto; }
.prose .wp-block-table table { border: 0; }
.prose .wp-block-table thead { border-bottom: 0; }
.prose th, .prose td,
.prose .wp-block-table th, .prose .wp-block-table td {
  text-align: left; padding: 10px 12px; vertical-align: top;
  border: 0; border-bottom: 1px solid var(--line);
}
.prose th, .prose thead td { font-weight: 600; background: var(--surface); border-bottom: 2px solid var(--ink); }

/* Ramka „Uwaga” – blok Grupa ze stylem „Uwaga” */
.prose .is-style-uwaga {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 14px 18px; border-radius: 0 8px 8px 0;
  font: 400 16px/1.55 var(--sans);
}
.prose .is-style-uwaga > * { margin-block: 0 0.6em; }
.prose .is-style-uwaga > :last-child { margin-bottom: 0; }

/* Rozwijane pytania (blok Szczegóły) – na FAQ lepiej zwykłe H3 + akapit */
.prose details { border-bottom: 1px solid var(--line); padding-block: 12px; }
.prose summary { font: 600 19px/1.4 var(--serif); cursor: pointer; }

/* ---------- Stopka artykułu: źródła, szczegóły, zastrzeżenie ---------- */
.article-footer {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  font: 400 14px/1.6 var(--sans); color: var(--muted);
}
.article-footer > * + * { margin-top: 28px; }
.article-footer__title {
  font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 12px;
}
.article-footer a { color: var(--muted); text-underline-offset: 2px; }
.article-footer a:hover { color: var(--ink); }

.sources__list { margin: 0; padding-left: 20px; }
.sources__list li { margin-bottom: 4px; }
.sources__type { color: var(--ink); font-weight: 500; }

.details__list {
  margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px 24px;
}
.details__list dt { font-size: 12px; color: var(--muted); }
.details__list dd { margin: 2px 0 0; color: var(--ink); font-weight: 500; }
.details__list dd a { color: var(--ink); }

.disclaimer { margin-bottom: 0; font-size: 13px; font-style: italic; }

/* ---------- Ramka autora pod artykułem ---------- */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  margin-top: 32px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font: 400 15px/1.55 var(--sans);
}
.author-box__avatar { width: 72px; height: 72px; border-radius: 50%; flex: none; object-fit: cover; }
.author-box p { margin: 0; }
.author-box__label {
  font: 600 11px/1 var(--sans) !important; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px !important;
}
.author-box__name { font-weight: 600; font-size: 17px; }
.author-box__name a { color: var(--ink); text-decoration: none; }
.author-box__cred { color: var(--muted); margin-top: 2px !important; }
.author-box__bio { margin-top: 10px !important; }
.author-box__more { display: inline-block; margin-top: 10px; font-weight: 500; text-decoration: none; }
.author-box__more:hover { text-decoration: underline; }
.author-box--partner { background: var(--sponsor-soft); border-color: #f1e2bd; }
.author-box--partner a { color: var(--sponsor); }

/* ---------- Karty artykułów ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  margin-bottom: 72px;
}
.related .cards { margin-bottom: 0; }
.card { border-top: 1px solid var(--line); padding-top: 18px; }
.card__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 22px; }
.card__cat {
  font: 600 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.card .label-sponsored { font-size: 10px; padding: 4px 6px; }
.card__title { font: 500 21px/1.3 var(--serif); margin: 10px 0 10px; text-wrap: balance; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card__meta { margin: 0; font: 400 13px/1.4 var(--sans); color: var(--muted); }

/* Karta z obrazkiem: obrazek zastępuje linię nad kartą */
.card--image { border-top: 0; padding-top: 0; }
.card__image {
  display: block; margin-bottom: 16px;
  aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 8px; background: var(--accent-soft);
}
.card__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.card:hover .card__image img { transform: scale(1.02); }
/* Zastępnik grafiki: kompas na jasnym granacie */
.card__image--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--accent);
}
.card__image--empty svg { width: 44px; height: 44px; fill: currentColor; opacity: .5; }

.related { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 56px; }

/* ---------- Obrazek wyróżniający we wpisie ---------- */
.article-image { margin: 32px 0 0; max-width: calc(var(--side) + 56px + var(--measure)); }
.article-image img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); background: var(--accent-soft);
}
.article-image figcaption { margin-top: 8px; font: 400 13px/1.5 var(--sans); color: var(--muted); }

/* ---------- Wyróżniony wpis na stronie głównej ---------- */
/* Tekst z lewej, obrazek 16:9 z prawej (nigdy nie przycinany, bo grafiki mają napisy). */
.featured {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 48px; align-items: start;
  margin: 0 0 56px; padding: 32px 0 56px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
}
.featured__image { display: block; border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); }
.featured__image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.featured__image:hover img { transform: scale(1.015); }
.featured__eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 16px;
  font: 600 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.featured__cat { color: var(--accent); }
.featured__cat::before { content: "·"; margin-right: 10px; color: var(--muted); }
.featured .label-sponsored { font-size: 10px; padding: 4px 6px; }
.featured__title { font: 500 34px/1.14 var(--serif); letter-spacing: -0.01em; margin: 0 0 16px; text-wrap: balance; }
.featured__title a { color: var(--ink); text-decoration: none; }
.featured__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.featured__lead { font: 400 18px/1.55 var(--serif); color: var(--muted); margin: 0 0 18px; }
.featured__meta { font: 400 13px/1.4 var(--sans); color: var(--muted); margin: 0; }
.featured--text { grid-template-columns: minmax(0, 820px); }

/* Dłuższy opis pod listą w kategorii */
.term-text { max-width: var(--measure); margin: 0 0 72px; padding-top: 32px; border-top: 1px solid var(--line); }

/* ---------- Strony list i strony stałe ---------- */
.page-hero { padding: 48px 0 40px; max-width: 820px; }
.page-hero--home { padding-top: 64px; padding-bottom: 40px; }
.page-hero--narrow { max-width: var(--measure); margin-inline: auto; }
.page-hero .crumbs { margin-bottom: 14px; }
.page-title { font: 500 44px/1.12 var(--serif); letter-spacing: -0.015em; margin: 0 0 14px; text-wrap: balance; }
.page-lead { font: 400 20px/1.55 var(--serif); color: var(--muted); margin: 0; }
.page-lead p { margin: 0 0 0.8em; }

.page .prose--page { max-width: var(--measure); margin: 0 auto 72px; }

.author-hero { display: flex; gap: 28px; align-items: flex-start; }
.author-hero__avatar { width: 112px; height: 112px; border-radius: 50%; flex: none; object-fit: cover; }
.author-hero__cred { font: 500 16px/1.4 var(--sans); color: var(--accent); margin: 0 0 14px; }

.empty { color: var(--muted); padding-bottom: 72px; }

/* Stronicowanie */
.pagination { margin: -16px 0 72px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; font: 500 14px/1 var(--sans); }
.pagination .page-numbers {
  display: inline-block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); text-decoration: none; background: var(--surface);
}
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .page-numbers.dots { border: 0; background: none; }

/* Wyszukiwarka */
.search-form { display: flex; gap: 8px; margin-top: 20px; max-width: 520px; }
.search-form input[type="search"] {
  flex: 1; min-width: 0; padding: 12px 14px;
  font: 400 16px/1.2 var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.search-form button {
  padding: 12px 18px; font: 600 15px/1.2 var(--sans); color: #fff;
  background: var(--accent); border: 0; border-radius: 8px; cursor: pointer;
}

/* ---------- Aktualności: kropka, sekcja na głównej, oś czasu ---------- */
.live-dot {
  position: relative; display: inline-block; flex: none;
  width: 10px; height: 10px; border-radius: 50%; background: #b9bcc4;
}
.live-dot.is-live { background: var(--live); }
.live-dot.is-live::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live);
  animation: pjdg-pulse 1.8s ease-out infinite;
}
@keyframes pjdg-pulse {
  from { transform: scale(1); opacity: 0.55; }
  to { transform: scale(3.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot.is-live::after { animation: none; }
}

.more-link { margin: -40px 0 72px; font: 600 14px/1 var(--sans); }
.more-link a { color: var(--accent); text-decoration: none; }
.more-link a:hover { text-decoration: underline; }

.news { margin: 0 0 80px; padding-top: 28px; border-top: 2px solid var(--ink); }
.news__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; margin-bottom: 32px; }
.news__title {
  display: flex; align-items: center; gap: 14px;
  font: 500 34px/1.1 var(--serif); letter-spacing: -0.01em; margin: 0;
}
.news__desc { flex: 1 1 300px; margin: 0; font: 400 15px/1.5 var(--sans); color: var(--muted); }
.news__all { font: 600 14px/1 var(--sans); color: var(--accent); text-decoration: none; white-space: nowrap; }
.news__all:hover { text-decoration: underline; }

.news__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }

.news-lead__image { margin-bottom: 16px; }
.news-lead__title { font: 500 26px/1.22 var(--serif); letter-spacing: -0.01em; margin: 8px 0 10px; text-wrap: balance; }
.news-lead__title a { color: var(--ink); text-decoration: none; }
.news-lead__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.news-lead__lead { margin: 0; font: 400 17px/1.55 var(--serif); color: var(--muted); }

/* Oś czasu */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 1px; background: var(--line);
}
.timeline__item { position: relative; padding: 0 0 26px 32px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: 0; top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline__item.is-new .timeline__dot { background: var(--live); border-color: var(--live); box-shadow: 0 0 0 4px var(--live-soft); }

.timeline__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0;
  font: 600 12px/1.3 var(--sans); color: var(--accent);
}
.timeline__new {
  display: none;
  font: 600 10px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--live); background: var(--live-soft); padding: 4px 6px; border-radius: 4px;
}
.is-new .timeline__new { display: inline-block; }
.timeline__meta .label-sponsored { font-size: 10px; padding: 4px 6px; }

.timeline__title { font: 500 19px/1.35 var(--serif); margin: 6px 0 0; text-wrap: pretty; }
.timeline__title a { color: var(--ink); text-decoration: none; }
.timeline__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.timeline__excerpt { margin: 8px 0 0; font: 400 16px/1.55 var(--serif); color: var(--muted); }

/* Archiwum aktualności: szersze pozycje z miniaturą */
.timeline--archive { max-width: 860px; margin-bottom: 64px; }
.timeline--archive .timeline__item { padding-bottom: 36px; }
.timeline--archive .timeline__title { font-size: 22px; }
.timeline__item--thumb { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; }
.timeline__thumb { display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--accent-soft); }
.timeline__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.page-title--live { display: flex; align-items: center; gap: 16px; }
.page-title--live .live-dot { width: 12px; height: 12px; }

/* Etykieta „Aktualność” w nagłówku wpisu */
.news-badge {
  font: 600 11px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: 5px 8px; border-radius: 4px;
}

/* ---------- Stopka: ciemny granat ---------- */
.site-footer {
  --footer-bg: #13254a;
  --footer-text: #c3cde2;
  --footer-line: rgba(255, 255, 255, 0.12);
  background: var(--footer-bg); color: var(--footer-text);
  padding: 56px 0 28px;
}
.site-footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.site-footer__brand p { margin: 16px 0 0; max-width: 340px; font: 400 15px/1.55 var(--serif); color: var(--footer-text); }
.site-footer__title {
  font: 600 11px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; margin: 6px 0 16px;
}
.site-footer__list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.site-footer__list li { margin-bottom: 10px; }
.site-footer__list a { color: var(--footer-text); text-decoration: none; }
.site-footer__list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 48px; font-size: 13px; color: #8f9cb8;
}
/* Linia w obrębie treści, nie od krawędzi do krawędzi */
.site-footer__bottom::before {
  content: ""; flex-basis: 100%; height: 1px; background: var(--footer-line); margin-bottom: 12px;
}
.site-footer__bottom p { margin: 0; }
.site-footer__quick { display: flex; gap: 20px; }
.site-footer__quick a { display: inline-flex; align-items: center; gap: 6px; }
.site-footer__bottom a { color: #8f9cb8; text-decoration: none; }
.site-footer__bottom a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }

/* ---------- Telefon i tablet ---------- */
@media (max-width: 900px) {
  .news__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .news__title { font-size: 28px; }
  .news__all { order: 3; }
  .timeline__item--thumb { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; }
  .timeline--archive .timeline__title { font-size: 19px; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
  .featured { grid-template-columns: 1fr; gap: 20px; padding: 24px 0 40px; margin-bottom: 40px; }
  .featured__image { order: -1; }
  .featured__title { font-size: 27px; }
  .featured__lead { font-size: 17px; }
  .article-image { margin-top: 24px; }

  :root { --gutter: 20px; }

  .article-hero { padding-top: 32px; padding-bottom: 24px; }
  .article-title { font-size: 34px; }
  .article-lead { font-size: 19px; }

  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article-grid::before { margin-bottom: 20px; }
  .article-side { margin-bottom: 24px; }

  /* Spis treści na telefonie: zwijany, nieprzyklejony */
  .toc {
    position: static;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 16px;
  }
  .toc__title { pointer-events: auto; cursor: pointer; margin: 0; display: flex; justify-content: space-between; }
  .toc__title::after { content: "+"; font-size: 16px; line-height: 11px; }
  .toc[open] .toc__title::after { content: "–"; }
  .toc[open] .toc__list { margin-top: 12px; }

  .prose { font-size: 18px; }
  .prose h2 { font-size: 25px; }
  .prose h3 { font-size: 20px; }
  .summary li { font-size: 17px; }

  .cards { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .page-title { font-size: 34px; }
  .page-lead { font-size: 18px; }
  .author-hero { flex-direction: column; gap: 16px; }
  .author-hero__avatar { width: 80px; height: 80px; }
}

@media (max-width: 600px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 14px; }
  .nav { width: 100%; }
  .author-box { flex-direction: column; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  .site-header, .site-footer, .article-side, .related, .skip-link { display: none; }
  .article-grid { display: block; }
  body { background: #fff; }
}
