/* ── Zmienne ─────────────────────────────────────────────────────────────── */
:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --text: #191a1c;
  --muted: #5f646c;
  --faint: #6f747d;
  --line: #e8e3d9;
  --line-strong: #d8d1c4;
  --accent: #0d6e63;
  --accent-ink: #ffffff;
  --accent-soft: #e6f2ef;
  --hover: #f4f0e8;
  --danger: #a9352c;
  --mark: #ffe8a3;
  --mark-text: #2a2110;
  --shadow: 0 1px 2px rgba(25, 26, 28, 0.04), 0 10px 30px rgba(25, 26, 28, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --topbar-h: 64px;
  --search-panel-height: 68px;
  --wrap: 880px;
  --wrap-wide: 1180px;
}

html[data-theme="dark"] {
  --bg: #0e1012;
  --surface: #15181b;
  --text: #ecece9;
  --muted: #a5aab1;
  --faint: #8b9199;
  --line: #24282c;
  --line-strong: #343a40;
  --accent: #6fe3cd;
  --accent-ink: #062b26;
  --accent-soft: #10312c;
  --hover: #171b1f;
  --danger: #ff8f80;
  --mark: #4a3c12;
  --mark-text: #ffe9a8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #0e1012;
    --surface: #15181b;
    --text: #ecece9;
    --muted: #a5aab1;
    --faint: #8b9199;
    --line: #24282c;
    --line-strong: #343a40;
    --accent: #6fe3cd;
    --accent-ink: #062b26;
    --accent-soft: #10312c;
    --hover: #171b1f;
    --danger: #ff8f80;
    --mark: #4a3c12;
    --mark-text: #ffe9a8;
    color-scheme: dark;
  }
}

/* ── Podstawy ────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(
    900px 420px at 85% -10%,
    color-mix(in srgb, var(--accent) 7%, transparent),
    transparent 70%
  );
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(100% - 40px, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.9rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

kbd,
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.88em;
  background: var(--hover);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

/* ── Nagłówek ────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.topbar-inner {
  width: min(100% - 40px, var(--wrap-wide));
  margin-inline: auto;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.brand-name em {
  font-style: italic;
  color: var(--accent);
}

.tagline {
  margin: 0;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

#search-toggle.is-active {
  background: var(--hover);
  color: var(--accent);
}

#search-toggle.has-query {
  color: var(--accent);
}

.icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: block;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

body.is-loading .spin-target {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 22px 0 24px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.4vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.lede {
  margin: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Sterowanie ──────────────────────────────────────────────────────────── */
.search-panel {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 45;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow);
  animation: search-panel-in 0.14s ease-out;
}

@keyframes search-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.search-panel .search {
  width: 100%;
}

body.search-open #main {
  padding-top: var(--search-panel-height);
}

#main {
  transition: padding-top 0.14s ease;
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.96rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search input::placeholder {
  color: var(--faint);
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--faint);
  font-size: 1.2rem;
  line-height: 1;
}

.clear:hover {
  background: var(--hover);
  color: var(--text);
}

.search-active {
  margin: 4px 0 6px;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.search-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.search-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-chip strong {
  color: var(--text);
  font-weight: 600;
}

.search-chip-x {
  color: var(--faint);
  font-size: 1rem;
  line-height: 1;
}

/* ── Kategorie ───────────────────────────────────────────────────────────── */
.chips {
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
  display: flex;
  gap: 8px;
  margin: 0 -4px;
  padding: 12px 4px 12px;
  overflow-x: auto;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
}

.chips::-webkit-scrollbar {
  display: none;
}

/* Pasek przewijany myszką (public/chips.js). Kursor pojawia się tylko wtedy,
   gdy faktycznie jest co przewijać. */
.chips.is-scrollable {
  cursor: grab;
}

.chips.is-dragging {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  background: var(--hover);
  color: var(--text);
}

.chip.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.chip .count {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.62;
}

.chip.is-active .count {
  opacity: 1;
}

/* ── Lista ───────────────────────────────────────────────────────────────── */
.feed {
  display: flex;
  flex-direction: column;
}

/* Pierwsze malowanie: klient i tak zmieni kolejność (patrz public/boot.js).
   `visibility` zamiast `display` rezerwuje miejsce, więc nic nie skacze. */
html[data-feed-pending] #feed {
  visibility: hidden;
}

/* Zachęta do zapisu na newsletter — celowo inna niż karta artykułu. */
.signup {
  margin: 18px 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.signup-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signup-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.signup-text {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.signup-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.15s ease;
}

.signup-btn:hover {
  filter: brightness(1.08);
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-inline: -16px;
  padding: 22px 16px;
  border-bottom: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.16s ease;
}

.card.has-thumb {
  grid-template-columns: minmax(0, 1fr) 152px;
}

.card:hover {
  background: var(--hover);
}

.card:last-child {
  border-bottom: 0;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.012em;
  text-wrap: pretty;
  transition: color 0.15s ease;
}

.card:hover .card-title {
  color: var(--accent);
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 0.72rem;
}

.kicker .source {
  color: var(--accent);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.kicker .sep {
  opacity: 0.55;
}

.kicker .cat {
  letter-spacing: 0.055em;
  text-transform: uppercase;
  font-size: 0.63rem;
}

.kicker time {
  font-variant-numeric: tabular-nums;
}

.card-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.52;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.72rem;
}

.card-foot .also {
  color: var(--muted);
}

.thumb {
  display: block;
  align-self: start;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: var(--hover);
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .thumb img {
  transform: scale(1.035);
}

/* wyróżniony pierwszy artykuł */
.card.card--lead {
  grid-template-columns: 1.08fr 1fr;
  gap: 24px;
  align-items: stretch;
  padding-top: 20px;
  padding-bottom: 24px;
}

.card.card--lead .thumb {
  order: -1;
  width: 100%;
  height: 100%;
  min-height: 250px;
  aspect-ratio: auto;
  border-radius: 14px;
}

.card.card--lead .card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card.card--lead .card-title {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.16;
  letter-spacing: -0.022em;
}

.card.card--lead .card-summary {
  -webkit-line-clamp: 3;
  font-size: 0.94rem;
}

.card.card--lead .kicker {
  order: -1;
  margin-bottom: 0;
}

mark {
  padding: 0 1px;
  border-radius: 3px;
  background: var(--mark);
  color: var(--mark-text);
}

/* ── Więcej / pusty stan ─────────────────────────────────────────────────── */
.more-wrap {
  display: flex;
  justify-content: center;
  padding: 30px 0 10px;
}

.more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.more:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.empty {
  padding: 60px 16px 40px;
  text-align: center;
}

.empty-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.empty-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── Szkielet ────────────────────────────────────────────────────────────── */
.skeleton {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.skeleton-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--hover) 25%, var(--line) 37%, var(--hover) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
}

.sk.title {
  height: 20px;
  width: 92%;
}

.sk.title.short {
  width: 62%;
}

.sk.meta {
  width: 38%;
  height: 10px;
}

.sk.line {
  width: 100%;
}

.sk.line.short {
  width: 74%;
}

.sk.thumb {
  aspect-ratio: 16 / 10;
  height: auto;
  border-radius: 10px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.noscript {
  max-width: 640px;
  margin: 40px auto;
  font-family: var(--sans);
}

/* ── Strony statyczne ───────────────────────────────────────────────────── */
.page {
  padding-top: 44px;
}

.page article {
  max-width: 760px;
}

.page .back {
  margin: 0 0 22px;
  font-size: 0.86rem;
}

.page .back a {
  color: var(--muted);
  text-decoration: none;
}

.page .back a:hover {
  color: var(--accent);
}

.page .eyebrow {
  margin-bottom: 10px;
}

.page h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.4vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.page .page-lede {
  margin: 0 0 34px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.page .manifest-lede {
  margin: 0 0 30px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page .manifest-callout {
  margin: 26px 0 30px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--hover);
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.45;
  color: var(--text);
}

.page .manifest-points {
  margin: 18px 0 28px;
  padding-left: 0;
  list-style: none;
}

.page .manifest-points li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 14px;
}

.page .manifest-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Wsparcie ────────────────────────────────────────────────────────────── */
.page .donate {
  margin: 22px 0 10px;
}

.page .donate-link {
  display: inline-block;
  border-radius: 999px;
  line-height: 0;
  text-decoration: none;
}

.page .donate img {
  display: block;
  width: 204px;
  max-width: 100%;
  height: auto;
}

.page .donate-note {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.88rem;
}

.page h2 {
  margin: 38px 0 12px;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.page p,
.page li {
  font-size: 1rem;
  line-height: 1.75;
}

.page p {
  margin: 0 0 14px;
}

.page ul {
  margin: 0 0 18px;
  padding-left: 1.25rem;
}

.page li {
  margin: 0 0 7px;
}

.page article a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.page article a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.page code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--hover);
  font-size: 0.9em;
}

.page .page-meta {
  margin-top: 36px;
  color: var(--faint);
  font-size: 0.82rem;
}

/* ── Strona portali ──────────────────────────────────────────────────────── */
.page .sources-group {
  margin: 0 0 34px;
}

.page .sources-group h2 {
  margin: 0 0 12px;
}

.page .sources-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page .source {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.page .source-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.page .source-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.page .source-desc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ── Stopka ──────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 50px;
  padding: 26px 0 50px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer p {
  margin: 0 0 8px;
}

.footer strong {
  color: var(--text);
  font-weight: 600;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  margin: 0;
}

.footer-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-link--donate {
  color: var(--accent);
  font-weight: 600;
}

.footer .footer-copy {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 0.76rem;
}

/* ── Prośba o wsparcie ──────────────────────────────────────────────────── */
.support {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 89;
  width: min(92vw, 360px);
  padding: 18px 44px 18px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.support-title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.support-text {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.support-cta {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.support-cta:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}

.support-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
}

.support-close:hover {
  background: var(--hover);
  color: var(--text);
}

@media (max-width: 640px) {
  .support {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }
}

/* ── Zgoda na analitykę ─────────────────────────────────────────────────── */
.consent {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 95;
  width: min(92vw, 620px);
  padding: 16px 18px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.consent[hidden] {
  display: none;
}

.consent-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.consent-title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
}

.consent-text {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.consent-btn {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.consent-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.consent-btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.consent-btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, var(--text));
  color: var(--accent-ink);
}

@media (max-width: 560px) {
  .consent {
    bottom: 0;
    width: 100%;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
  }

  .consent-actions {
    justify-content: stretch;
  }

  .consent-btn {
    flex: 1 1 auto;
  }
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  max-width: min(92vw, 460px);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.84rem;
  text-align: center;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ── Responsywność ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tagline {
    display: none;
  }
}

@media (max-width: 760px) {
  .card.card--lead {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .card.card--lead .thumb {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .card.card--lead .card-title {
    font-size: clamp(1.4rem, 5vw, 1.7rem);
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-h: 58px;
    --search-panel-height: 64px;
  }

  .wrap {
    width: min(100% - 28px, var(--wrap));
  }

  .footer-meta {
    justify-content: flex-start;
  }

  .search-panel {
    padding: 8px 0 10px;
  }

  .topbar-inner {
    width: min(100% - 28px, var(--wrap-wide));
  }

  .brand-name {
    font-size: 1.12rem;
  }

  .card,
  .skeleton {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 14px;
    margin-inline: -10px;
    padding: 18px 10px;
  }

  .card.card--lead {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-summary {
    font-size: 0.87rem;
    -webkit-line-clamp: 2;
  }

  .card.card--lead .card-title {
    font-size: 1.42rem;
  }

  .sk.thumb {
    aspect-ratio: 1 / 1;
  }

  .chips {
    margin-inline: -2px;
    padding-inline: 2px;
  }
}

@media (max-width: 420px) {
  .card,
  .skeleton {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .kicker .cat {
    display: none;
  }

  .kicker .cat + .sep {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover .thumb img {
    transform: none;
  }
}
