/* ═══════════════════════════════════════════════════════════════
   SKAN DNIA — redesign strony publicznej
   Kierunek: japoński minimalizm redakcyjny (ma · asymetria · hanko)
   Typografia: Cormorant Garamond / IBM Plex Sans / IBM Plex Mono
   Kontrakt DOM: bez zmian — ten plik obsługuje klasy generowane
   przez publicDomRenderer.js / consent.js / publicChrome.js.
   Panel admina: /admin doładowuje admin-legacy.css (oryginał).
   ═══════════════════════════════════════════════════════════════ */

/* ── Fonty (self-hosted, bez CDN — zgodnie z polityką prywatności) ── */
/* @font-face wklejone z redesign/fontfaces.css podczas builda */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/cormorant-garamond/cormorant-garamond-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─────────────────────────────────────────
   TOKENY
   ───────────────────────────────────────── */
:root {
  --sd-paper: #f5f3ec;
  --sd-well: #eeebe1;
  --sd-surface: #fbfaf4;
  --sd-ink: #171511;
  --sd-ink2: #45423a;
  --sd-ink3: #716c5f;
  --sd-ink4: #97917f;
  --sd-line: #ddd8c9;
  --sd-line2: #aaa494;
  --sd-accent: #b23a26;
  --sd-accent-ink: #f7f4ec;
  --sd-shadow: 0 12px 40px rgba(20, 17, 10, 0.18);

  --sd-serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sd-sans: "IBM Plex Sans", "Source Sans 3", -apple-system, "Segoe UI", sans-serif;
  --sd-mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --sd-gutter: clamp(20px, 4.5vw, 64px);
  --sd-maxw: 1440px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --sd-paper: #141210;
  --sd-well: #0f0e0c;
  --sd-surface: #1b1916;
  --sd-ink: #eae4d4;
  --sd-ink2: #c6bfac;
  --sd-ink3: #928b79;
  --sd-ink4: #6b6555;
  --sd-line: #2b2821;
  --sd-line2: #4c4638;
  --sd-accent: #d96a4f;
  --sd-accent-ink: #16130f;
  --sd-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --sd-paper: #141210;
    --sd-well: #0f0e0c;
    --sd-surface: #1b1916;
    --sd-ink: #eae4d4;
    --sd-ink2: #c6bfac;
    --sd-ink3: #928b79;
    --sd-ink4: #6b6555;
    --sd-line: #2b2821;
    --sd-line2: #4c4638;
    --sd-accent: #d96a4f;
    --sd-accent-ink: #16130f;
    --sd-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

@media (min-width: 1100px) {
  html[data-layout="wide"]:not([data-route="admin"]) {
    --sd-maxw: 1920px;
  }
}

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

html {
  background: var(--sd-paper);
}

body {
  margin: 0;
  background: var(--sd-paper);
  color: var(--sd-ink);
  font-family: var(--sd-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--sd-accent);
  color: var(--sd-accent-ink);
}

h1, h2, h3, h4, h5, h6, p, dl, dd, dt, figure {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
}

a {
  color: var(--sd-ink);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

a:hover {
  color: var(--sd-accent);
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
  font: inherit;
  color: var(--sd-ink);
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--sd-accent);
  outline-offset: 3px;
}

summary {
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

section[id] {
  scroll-margin-top: 72px;
}

@keyframes sd-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Wspólne drobne elementy ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--sd-ink);
  color: var(--sd-paper);
  padding: 10px 18px;
  font-family: var(--sd-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.skip-link:focus {
  left: 0;
  color: var(--sd-paper);
}

.accent-bar {
  height: 3px;
  background: var(--sd-accent);
}

.overline {
  display: block;
  font-family: var(--sd-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

.empty-state {
  padding: 48px 0;
  font-family: var(--sd-serif);
  font-size: 24px;
  font-style: italic;
  color: var(--sd-ink3);
}

.manual-status {
  font-family: var(--sd-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--sd-ink3);
}

/* ─────────────────────────────────────────
   RAMA STRONY
   ───────────────────────────────────────── */
.page-frame {
  max-width: var(--sd-maxw);
  margin: 0 auto;
  padding: 0 var(--sd-gutter);
}

/* ─────────────────────────────────────────
   PASEK GÓRNY
   ───────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding: 13px 0;
  border-bottom: 1px solid var(--sd-line);
}

.topbar-date {
  font-family: var(--sd-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  white-space: nowrap;
}

.topbar-nav {
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
}

.topbar-nav a {
  font-family: var(--sd-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

.topbar-nav a:hover {
  color: var(--sd-accent);
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* przełączniki: treść / motyw */
.reading-switcher,
.template-switcher,
.theme-switcher {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  overflow: hidden;
}

.reading-switcher-label {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-family: var(--sd-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-ink4);
  border-right: 1px solid var(--sd-line);
}

.reading-switcher button,
.template-switcher button,
.theme-switcher button {
  appearance: none;
  background: none;
  border: none;
  padding: 6px 11px;
  cursor: pointer;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.reading-switcher button + button,
.template-switcher button + button,
.theme-switcher button + button {
  border-left: 1px solid var(--sd-line);
}

.reading-switcher button:hover,
.template-switcher button:hover,
.theme-switcher button:hover {
  color: var(--sd-ink);
}

.reading-switcher button[aria-pressed="true"],
.template-switcher button[aria-pressed="true"],
.theme-switcher button[aria-pressed="true"] {
  background: var(--sd-ink);
  color: var(--sd-paper);
}

.theme-switcher button svg {
  display: block;
}

.layout-toggle {
  appearance: none;
  background: none;
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  padding: 6px 9px;
  cursor: pointer;
  color: var(--sd-ink3);
  display: none;
  align-items: center;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.layout-toggle:hover {
  color: var(--sd-ink);
  border-color: var(--sd-ink);
}

.layout-toggle[aria-pressed="true"] {
  background: var(--sd-ink);
  border-color: var(--sd-ink);
  color: var(--sd-paper);
}

@media (min-width: 1100px) {
  .layout-toggle {
    display: inline-flex;
  }
}

/* ─────────────────────────────────────────
   MASTHEAD
   ───────────────────────────────────────── */
.masthead {
  position: relative;
  padding: clamp(44px, 6.5vw, 80px) 0 clamp(32px, 4.5vw, 56px);
}

.masthead-eyebrow {
  display: block;
  font-family: var(--sd-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sd-accent);
  margin-bottom: 20px;
}

.masthead-title-row {
  display: flex;
  align-items: flex-end;
  gap: clamp(16px, 2.5vw, 28px);
  flex-wrap: wrap;
}

.masthead-title {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: clamp(56px, 8.2vw, 100px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  color: var(--sd-ink);
}

.masthead-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--sd-accent);
  border-radius: 2px;
  margin-bottom: 8px;
  flex: none;
  user-select: none;
}

.masthead-seal span {
  font-family: var(--sd-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--sd-accent-ink);
}

.masthead-tagline {
  font-family: var(--sd-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  margin-top: 24px;
}

/* ─────────────────────────────────────────
   PASEK WYDANIA + STATYSTYKI
   ───────────────────────────────────────── */
.edition-strip {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  border-top: 2px solid var(--sd-ink);
  border-bottom: 1px solid var(--sd-line);
  padding: 18px 0;
}

.edition-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}

.edition-label {
  font-family: var(--sd-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sd-ink);
}

.mode-pill {
  align-self: flex-start;
  font-family: var(--sd-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  border: 1px solid var(--sd-line2);
  padding: 2px 8px;
}

.edition-switch {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  overflow: hidden;
  align-self: flex-start;
}

.edition-switch a {
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  padding: 5px 12px;
}

.edition-switch a + a {
  border-left: 1px solid var(--sd-line);
}

.edition-switch a[aria-current="true"] {
  background: var(--sd-ink);
  color: var(--sd-paper);
}

.edition-switch a[aria-disabled="true"] {
  color: var(--sd-ink4);
  cursor: default;
  opacity: 0.55;
}

.edition-stats {
  display: flex;
  gap: clamp(22px, 3.5vw, 52px);
  flex-wrap: wrap;
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-block + .stat-block {
  border-left: 1px solid var(--sd-line);
  padding-left: clamp(22px, 3.5vw, 52px);
}

.stat-block dd {
  font-family: var(--sd-serif);
  font-weight: 500;
  font-size: 37px;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--sd-ink);
}

.stat-block dt {
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

#stat-strong {
  color: var(--sd-accent);
}

/* ─────────────────────────────────────────
   SEKCJE — wspólny szkielet + numeracja
   ───────────────────────────────────────── */
main {
  counter-reset: sd-section;
}

.daily-synthesis-section,
.evening-delta-section,
.weekly-synthesis-section,
.weekly-section-digests-section,
.section-digests-section,
.topic-threads-section,
.topics-section,
.archive-section,
.sources-section {
  padding: clamp(40px, 5.5vw, 68px) 0;
  border-bottom: 1px solid var(--sd-line);
  counter-increment: sd-section;
}

.sources-section {
  border-bottom: none;
}

.section-head {
  margin-bottom: clamp(24px, 3.5vw, 40px);
}

.section-head .overline::before {
  content: counter(sd-section, decimal-leading-zero);
  color: var(--sd-accent);
  margin-right: 14px;
  letter-spacing: 0.1em;
}

.section-head h2 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  margin-top: 12px;
  text-wrap: balance;
}

/* ─────────────────────────────────────────
   HERO — sygnał dnia + najkrótszy skan
   ───────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(280px, 1fr);
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(40px, 5.5vw, 68px) 0;
  border-bottom: 1px solid var(--sd-line);
}

.lead-story .overline {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--sd-accent);
  margin-bottom: 24px;
}

.lead-story .overline::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--sd-accent);
}

.lead-headline {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 18ch;
  text-wrap: balance;
}

.lead-summary {
  max-width: 66ch;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.lead-summary p {
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--sd-ink2);
}

/* panel pewności pod leadem (Co wiadomo / Czego nie wiadomo / Co obserwować) */
.lead-certainty-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin-top: 32px;
  border-top: 1px solid var(--sd-line);
  padding-top: 26px;
}

.certainty-section h3 {
  font-family: var(--sd-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  margin-bottom: 13px;
}

.certainty-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.certainty-section li {
  font-size: 14px;
  line-height: 1.58;
  color: var(--sd-ink2);
  padding-left: 16px;
  position: relative;
}

.certainty-section li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sd-ink4);
}

.certainty-section:last-of-type li::before {
  color: var(--sd-accent);
}

.certainty-note {
  grid-column: 1 / -1;
  font-family: var(--sd-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--sd-accent);
  border-left: 2px solid var(--sd-accent);
  padding-left: 14px;
}

/* najkrótszy skan */
.digest {
  border-left: 1px solid var(--sd-line);
  padding-left: clamp(24px, 3vw, 40px);
  align-self: start;
}

.digest-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sd-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sd-ink);
}

.digest-title::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--sd-accent);
  flex: none;
}

.digest-title::after {
  content: "60 sekund";
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--sd-ink4);
}

.digest-list {
  list-style: none;
  counter-reset: sd-digest;
  margin-top: 6px;
}

.digest-list li {
  counter-increment: sd-digest;
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--sd-line);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--sd-ink);
}

.digest-list li::before {
  content: "0" counter(sd-digest);
  font-family: var(--sd-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--sd-accent);
  padding-top: 3px;
  flex: none;
}

/* ─────────────────────────────────────────
   SYNTEZA DNIA / TYGODNIA / DELTA WIECZORNA
   ───────────────────────────────────────── */
.daily-synthesis,
.weekly-synthesis-section .daily-synthesis {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.daily-synthesis h3 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.14;
  max-width: 24ch;
  text-wrap: balance;
  margin-bottom: 6px;
}

.daily-synthesis p {
  font-size: 16px;
  line-height: 1.78;
  color: var(--sd-ink2);
}

.evening-delta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(24px, 3.5vw, 44px);
}

.evening-delta-intro {
  grid-column: 1 / -1;
  max-width: 68ch;
}

.evening-delta-intro h3,
.evening-delta > h3 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.14;
  text-wrap: balance;
}

.evening-delta-intro p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--sd-ink2);
  margin-top: 12px;
}

.evening-delta-group {
  border-top: 1px solid var(--sd-line2);
  padding-top: 16px;
}

.evening-delta-group h4 {
  font-family: var(--sd-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sd-accent);
  margin-bottom: 12px;
}

.evening-delta-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.evening-delta-group li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--sd-ink2);
  padding-left: 16px;
  position: relative;
}

.evening-delta-group li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--sd-ink4);
}

/* ─────────────────────────────────────────
   MAPA DNIA — syntezy sekcji
   ───────────────────────────────────────── */
.section-digests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(28px, 4vw, 52px) clamp(32px, 4vw, 64px);
}

.section-digest-card {
  border-top: 1px solid var(--sd-line2);
  padding-top: 18px;
  min-width: 0;
}

.section-digest-card .topic-meta {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-accent);
}

.section-digest-card h3 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  margin-top: 12px;
  text-wrap: balance;
}

.section-digest-card > p:not(.topic-meta) {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--sd-ink2);
  margin-top: 12px;
}

/* ─────────────────────────────────────────
   WĄTKI WRACAJĄCE
   ───────────────────────────────────────── */
.topic-thread-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 0 clamp(32px, 4vw, 64px);
}

.topic-thread-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--sd-line);
}

.topic-thread-card .topic-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

.topic-thread-title {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.42;
  color: var(--sd-ink);
}

.topic-thread-status {
  align-self: flex-start;
  font-family: var(--sd-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--sd-line2);
  padding: 2px 8px;
  color: var(--sd-ink3);
  order: -1;
}

.topic-thread-status[data-status="growing"] {
  color: var(--sd-accent);
  border-color: var(--sd-accent);
}

.topic-thread-status[data-status="returns"] {
  color: var(--sd-ink);
  border-color: var(--sd-ink);
}

.topic-thread-previous {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--sd-ink3);
  border-left: 2px solid var(--sd-line2);
  padding-left: 12px;
}

a.topic-thread-previous:hover {
  color: var(--sd-accent);
}

.topic-thread-meta {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--sd-ink4);
}

/* ─────────────────────────────────────────
   ZAKŁADKI SEKCJI (sticky)
   ───────────────────────────────────────── */
.section-tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--sd-paper) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sd-line);
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar {
  display: none;
}

.section-tabs button {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 16px 12px;
  cursor: pointer;
  font-family: var(--sd-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.section-tabs button:hover {
  color: var(--sd-ink);
}

.section-tabs button[aria-selected="true"] {
  color: var(--sd-ink);
  border-bottom-color: var(--sd-accent);
}

/* ─────────────────────────────────────────
   TEMATY DNIA
   ───────────────────────────────────────── */
.topic-grid {
  display: flex;
  flex-direction: column;
}

.topic-card {
  padding: 30px 0;
  border-bottom: 1px solid var(--sd-line);
  min-width: 0;
}

.topic-card-header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 12px 18px;
  flex-wrap: wrap;
}

.topic-card .topic-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.topic-meta-separator {
  display: none;
}

.topic-section-name {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-accent);
}

.topic-source-count {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

/* pewność: znaczniki ■■■■□ + etykieta */
.confidence {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

.confidence::before {
  font-size: 10.5px;
  letter-spacing: 2px;
  color: var(--sd-ink);
}

.confidence[data-level="very-high"]::before { content: "■\2009■\2009■\2009■\2009■"; }
.confidence[data-level="high"]::before      { content: "■\2009■\2009■\2009■\2009□"; }
.confidence[data-level="medium"]::before    { content: "■\2009■\2009■\2009□\2009□"; color: var(--sd-ink3); }
.confidence[data-level="low"]::before       { content: "■\2009□\2009□\2009□\2009□"; color: var(--sd-ink4); }

.topic-card h2 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: clamp(23px, 2.4vw, 29px);
  line-height: 1.16;
  margin-top: 13px;
  max-width: 30ch;
  text-wrap: balance;
}

.topic-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--sd-ink2);
  max-width: 70ch;
  margin-top: 11px;
}

.topic-continuity {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 1.5;
  color: var(--sd-ink3);
  margin-top: 12px;
}

.topic-continuity strong {
  font-family: var(--sd-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sd-ink4);
  align-self: center;
}

.topic-continuity a {
  border-bottom: 1px solid var(--sd-line);
}

/* ── tiering wizualny: mocne tematy większe, pojedyncze sygnały kompaktowe ── */
.topic-card:has(.confidence[data-level="very-high"]) {
  padding: 36px 0;
}

.topic-card:has(.confidence[data-level="very-high"]) h2 {
  font-size: clamp(25px, 2.7vw, 32px);
  max-width: 26ch;
}

.topic-card:has(.confidence[data-level="very-high"]) .topic-summary {
  font-size: 15.5px;
}

.topic-card:has(.confidence[data-level="low"]) {
  padding: 22px 0;
}

.topic-card:has(.confidence[data-level="low"]) h2 {
  font-family: var(--sd-sans);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: 0;
  max-width: 60ch;
  margin-top: 10px;
}

.topic-card:has(.confidence[data-level="low"]) .topic-summary {
  font-size: 14px;
}

/* ── szczegóły tematu ── */
.topic-evidence {
  margin-top: 16px;
}

.topic-evidence summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sd-accent);
  padding: 4px 0;
  transition: color 0.15s ease;
}

.topic-evidence summary:hover {
  color: var(--sd-ink);
}

.topic-evidence summary::after {
  content: "+";
  font-size: 12px;
}

.topic-evidence[open] summary::after {
  content: "−";
}

.topic-evidence[open] > *:not(summary) {
  animation: sd-reveal 0.25s ease;
}

.topic-why {
  font-size: 14px;
  line-height: 1.62;
  color: var(--sd-ink2);
  max-width: 66ch;
  border-left: 2px solid var(--sd-line2);
  padding-left: 16px;
  margin-top: 16px;
}

.topic-why::before {
  content: "Dlaczego istotne";
  display: block;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sd-ink4);
  margin-bottom: 4px;
}

.evidence-note {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--sd-ink3);
  max-width: 66ch;
  margin-top: 14px;
}

.evidence-summary {
  font-family: var(--sd-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: var(--sd-ink3);
  margin-top: 8px;
}

.topic-certainty {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 22px;
  margin-top: 20px;
  border-top: 1px solid var(--sd-line);
  padding-top: 18px;
}

.topic-certainty .certainty-section li {
  font-size: 13.5px;
}

/* źródła tematu */
.source-links {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  border-top: 1px solid var(--sd-line);
}

.source-link {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--sd-line);
}

.source-link:last-child {
  border-bottom: none;
}

.source-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sd-ink);
}

.source-title {
  font-size: 13px;
  line-height: 1.5;
  color: var(--sd-ink3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-meta {
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sd-ink4);
  white-space: nowrap;
}

a.source-link:hover .source-name {
  color: var(--sd-accent);
}

/* ─────────────────────────────────────────
   ARCHIWUM
   ───────────────────────────────────────── */
.archive-controls {
  display: flex;
  align-items: flex-end;
  gap: 14px 22px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--sd-line);
  padding-bottom: 22px;
}

.archive-controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--sd-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sd-ink4);
}

.archive-controls input,
.archive-controls select {
  appearance: none;
  background: transparent;
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  padding: 8px 12px;
  font-family: var(--sd-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--sd-ink);
  min-width: 130px;
}

.archive-controls input:focus,
.archive-controls select:focus {
  outline: none;
  border-color: var(--sd-ink);
}

.archive-controls input[type="search"] {
  min-width: 200px;
}

.archive-controls select {
  background-image: linear-gradient(45deg, transparent 50%, var(--sd-ink3) 50%),
    linear-gradient(135deg, var(--sd-ink3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 12px) 55%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

#archive-clear-filters {
  appearance: none;
  background: none;
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-ink2);
  transition: border-color 0.15s ease, color 0.15s ease;
}

#archive-clear-filters:hover {
  border-color: var(--sd-ink);
  color: var(--sd-ink);
}

.archive-summary {
  flex-basis: 100%;
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

.archive-list {
  display: flex;
  flex-direction: column;
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--sd-line);
}

.archive-item > strong {
  font-family: var(--sd-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  font-variant-numeric: tabular-nums;
}

.archive-item[aria-current="page"] > strong::before {
  content: "●";
  color: var(--sd-accent);
  margin-right: 8px;
  font-size: 8px;
  vertical-align: 1px;
}

.archive-item > span {
  grid-column: 1 / -1;
  font-family: var(--sd-serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.3;
  color: var(--sd-ink);
  max-width: 60ch;
  text-wrap: balance;
}

.archive-item > small {
  grid-column: 1 / -1;
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sd-ink4);
}

.archive-signals {
  grid-column: 1 / -1;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--sd-ink3);
  max-width: 70ch;
}

.archive-topic-links {
  grid-column: 1 / -1;
  list-style: none;
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
}

.archive-topic-links a {
  font-size: 12.5px;
  color: var(--sd-ink3);
  border-bottom: 1px solid var(--sd-line);
}

.archive-topic-links a:hover {
  color: var(--sd-accent);
}

.archive-editions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  border: 1px solid var(--sd-line);
  border-radius: 2px;
  overflow: hidden;
  align-self: start;
}

.archive-editions a {
  font-family: var(--sd-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  padding: 4px 10px;
}

.archive-editions a + a {
  border-left: 1px solid var(--sd-line);
}

.archive-editions a[aria-current="page"] {
  background: var(--sd-ink);
  color: var(--sd-paper);
}

.archive-editions a[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}

/* karta "pełne archiwum" */
a.archive-more-item {
  display: grid;
  gap: 4px;
  padding: 22px 0;
  border-bottom: 1px solid var(--sd-line);
}

a.archive-more-item > strong {
  font-family: var(--sd-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sd-accent);
}

a.archive-more-item > span {
  font-family: var(--sd-serif);
  font-weight: 500;
  font-size: 21px;
  color: var(--sd-ink);
}

a.archive-more-item > small {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sd-ink4);
}

a.archive-more-item > em {
  font-family: var(--sd-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sd-ink2);
  margin-top: 6px;
}

a.archive-more-item > em::after {
  content: " →";
}

a.archive-more-item:hover > em {
  color: var(--sd-accent);
}

/* grupowanie tygodnie/miesiące na trasie /archive */
.archive-period {
  margin-bottom: 36px;
}

.archive-period-head {
  display: flex;
  align-items: baseline;
  gap: 10px 24px;
  flex-wrap: wrap;
  border-top: 2px solid var(--sd-ink);
  padding-top: 12px;
  margin-bottom: 4px;
}

.archive-period-head h3 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: 24px;
}

.archive-period-head h3 a {
  border-bottom: none;
}

.archive-period-head p {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink4);
}

.archive-period-head .archive-signals {
  flex-basis: 100%;
}

.archive-period-grid {
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────────────
   STAN ŹRÓDEŁ
   ───────────────────────────────────────── */
.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 0 32px;
}

.source-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--sd-line);
}

.source-summary-total {
  font-family: var(--sd-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sd-ink);
}

.source-summary-legend {
  display: inline-flex;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.source-summary-group {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sd-ink3);
}

.source-summary-dot {
  width: 10px;
  height: 10px;
  align-self: center;
  flex: none;
}

.source-summary-group[data-level="good"] .source-summary-dot { background: var(--sd-ink); }
.source-summary-group[data-level="watch"] .source-summary-dot { background: var(--sd-line2); }
.source-summary-group[data-level="weak"] .source-summary-dot { border: 1px solid var(--sd-line2); }
.source-summary-group[data-level="fail"] .source-summary-dot { background: var(--sd-accent); }

.source-summary-group strong {
  font-weight: 500;
  color: var(--sd-ink);
}

.source-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--sd-line);
  min-width: 0;
}

.source-row > strong {
  font-size: 13px;
  font-weight: 400;
  color: var(--sd-ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--sd-mono);
  font-size: 10.5px;
  color: var(--sd-ink4);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}

.source-tag::before {
  content: "";
  width: 9px;
  height: 9px;
  align-self: center;
  flex: none;
}

.source-tag.good::before { background: var(--sd-ink); }
.source-tag.watch::before { background: var(--sd-line2); }
.source-tag.weak::before { border: 1px solid var(--sd-line2); }
.source-tag.fail::before { background: var(--sd-accent); }

.source-row:has(.source-tag.fail) > strong {
  color: var(--sd-accent);
}

.source-tag.fail {
  color: var(--sd-accent);
}

/* ─────────────────────────────────────────
   LOGOWANIE ADMINA (publiczna część /admin)
   ───────────────────────────────────────── */
.admin-login {
  padding: clamp(40px, 6vw, 72px) 0;
}

.admin-login-panel {
  max-width: 520px;
  border: 1px solid var(--sd-ink);
  background: var(--sd-surface);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-login-panel h2 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: 30px;
}

.admin-login-panel p {
  font-size: 14px;
  color: var(--sd-ink2);
}

.admin-login-panel label {
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sd-ink4);
}

.admin-login-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-login-actions input {
  flex: 1;
  min-width: 200px;
  background: transparent;
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  padding: 9px 12px;
  font-family: var(--sd-mono);
  font-size: 13px;
}

.admin-login-actions button {
  appearance: none;
  background: var(--sd-ink);
  color: var(--sd-paper);
  border: 1px solid var(--sd-ink);
  border-radius: 2px;
  padding: 9px 18px;
  cursor: pointer;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.admin-login-actions button:hover {
  background: var(--sd-accent);
  border-color: var(--sd-accent);
  color: var(--sd-accent-ink);
}

/* ─────────────────────────────────────────
   STOPKA
   ───────────────────────────────────────── */
.site-footer {
  border-top: 2px solid var(--sd-ink);
  margin-top: clamp(40px, 6vw, 72px);
}

.site-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  padding: 40px 0 56px;
}

.site-footer-inner > p {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-footer-inner > p::before {
  content: "SKAN DNIA";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  background: var(--sd-accent);
  border-radius: 2px;
  color: var(--sd-accent-ink);
  font-size: 5.5px;
  letter-spacing: 0.12em;
  text-align: center;
  line-height: 1.5;
  padding: 2px;
}

.site-footer-links {
  display: flex;
  gap: 10px 22px;
  flex-wrap: wrap;
  align-items: baseline;
}

.site-footer-links a,
.footer-link-button {
  font-family: var(--sd-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  border-bottom: 1px solid var(--sd-line);
  padding-bottom: 1px;
}

.footer-link-button {
  appearance: none;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  cursor: pointer;
}

.site-footer-links a:hover,
.footer-link-button:hover {
  color: var(--sd-accent);
}

/* ─────────────────────────────────────────
   ZGODA / PRYWATNOŚĆ (consent.js)
   ───────────────────────────────────────── */
.consent-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 70;
  width: min(400px, calc(100vw - 48px));
  background: var(--sd-surface);
  border: 1px solid var(--sd-ink);
  padding: 24px 26px;
  box-shadow: var(--sd-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: sd-reveal 0.3s ease;
}

.consent-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consent-copy .overline {
  color: var(--sd-accent);
}

.consent-copy h2 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
}

.consent-copy p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--sd-ink2);
}

.consent-copy a {
  align-self: flex-start;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sd-ink3);
  border-bottom: 1px solid var(--sd-line);
}

.consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button {
  appearance: none;
  background: none;
  color: var(--sd-ink2);
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--sd-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.button:hover {
  border-color: var(--sd-ink);
  color: var(--sd-ink);
}

.button-primary {
  background: var(--sd-ink);
  border-color: var(--sd-ink);
  color: var(--sd-paper);
}

.button-primary:hover {
  background: var(--sd-accent);
  border-color: var(--sd-accent);
  color: var(--sd-accent-ink);
}

.icon-button {
  appearance: none;
  background: none;
  border: 1px solid var(--sd-line2);
  border-radius: 2px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-family: var(--sd-mono);
  font-size: 13px;
  color: var(--sd-ink3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  border-color: var(--sd-ink);
  color: var(--sd-ink);
}

.consent-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--sd-ink) 30%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.consent-modal-panel {
  width: min(560px, 100%);
  max-height: min(84vh, 720px);
  overflow-y: auto;
  background: var(--sd-surface);
  border: 1px solid var(--sd-ink);
  padding: 30px 34px;
  box-shadow: var(--sd-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: sd-reveal 0.25s ease;
}

.consent-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.consent-modal-head .overline {
  color: var(--sd-accent);
  margin-bottom: 8px;
}

.consent-modal-head h2 {
  font-family: var(--sd-serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
}

.consent-options {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--sd-line);
}

.consent-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--sd-line);
}

.consent-option strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--sd-ink);
}

.consent-option p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--sd-ink3);
  margin-top: 3px;
  max-width: 48ch;
}

.consent-option-toggle {
  cursor: pointer;
}

.consent-option-toggle input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 22px;
  flex: none;
  border: 1px solid var(--sd-line2);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  background: transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.consent-option-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sd-ink3);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.consent-option-toggle input[type="checkbox"]:checked {
  background: var(--sd-ink);
  border-color: var(--sd-ink);
}

.consent-option-toggle input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: var(--sd-paper);
}

.consent-required {
  font-family: var(--sd-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sd-ink4);
  border: 1px solid var(--sd-line);
  padding: 3px 9px;
  white-space: nowrap;
}

.consent-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--sd-ink3);
}

.consent-modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body[data-consent-modal-open],
body[data-consent-modal-open="true"] {
  overflow: hidden;
}

/* ─────────────────────────────────────────
   TRYBY CZYTANIA (Krótko / Standard / Szerzej)
   ───────────────────────────────────────── */
html[data-reading-mode="brief"]:not([data-route="admin"]) .daily-synthesis-section,
html[data-reading-mode="brief"]:not([data-route="admin"]) .section-digests-section,
html[data-reading-mode="brief"]:not([data-route="admin"]) .weekly-section-digests-section,
html[data-reading-mode="brief"]:not([data-route="admin"]) .topic-threads-section,
html[data-reading-mode="brief"]:not([data-route="admin"]) .lead-certainty-panel,
html[data-reading-mode="brief"]:not([data-route="admin"]) .topic-evidence {
  display: none !important;
}

html[data-reading-mode="brief"]:not([data-route="admin"]) .topic-card {
  padding-top: 22px;
  padding-bottom: 22px;
}

html[data-reading-mode="deep"]:not([data-route="admin"]) .topic-evidence {
  display: block;
}

/* ─────────────────────────────────────────
   TRASA /archive
   ───────────────────────────────────────── */
[data-route="archive"] .edition-strip,
[data-route="archive"] .hero,
[data-route="archive"] .daily-synthesis-section,
[data-route="archive"] .evening-delta-section,
[data-route="archive"] .weekly-synthesis-section,
[data-route="archive"] .weekly-section-digests-section,
[data-route="archive"] .section-digests-section,
[data-route="archive"] .topic-threads-section,
[data-route="archive"] .section-tabs,
[data-route="archive"] .topics-section,
[data-route="archive"] .sources-section {
  display: none;
}

[data-route="archive"] .archive-section {
  border-bottom: none;
}

/* ─────────────────────────────────────────
   TRYB SZEROKI (data-layout="wide")
   ───────────────────────────────────────── */
@media (min-width: 1100px) {
  html[data-layout="wide"]:not([data-route="admin"]) .section-digests {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-layout="wide"]:not([data-route="admin"]) .topic-thread-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-layout="wide"]:not([data-route="admin"]) .hero {
    grid-template-columns: minmax(0, 2.4fr) minmax(300px, 1fr);
  }

  html[data-layout="wide"]:not([data-route="admin"]) .lead-summary,
  html[data-layout="wide"]:not([data-route="admin"]) .daily-synthesis {
    max-width: 78ch;
  }

  html[data-layout="wide"]:not([data-route="admin"]) .source-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  html[data-layout="wide"]:not([data-route="admin"]) .topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(40px, 4vw, 80px);
    align-items: start;
  }

  html[data-layout="wide"]:not([data-route="admin"]) .topic-card:has(.confidence[data-level="very-high"]) {
    grid-column: 1 / -1;
  }

  html[data-layout="wide"]:not([data-route="admin"]) .archive-list:not(:has(.archive-period)),
  html[data-layout="wide"]:not([data-route="admin"]) .archive-period-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(40px, 4vw, 80px);
  }
}

/* ─────────────────────────────────────────
   RESPONSYWNOŚĆ
   ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .digest {
    border-left: none;
    border-top: 2px solid var(--sd-ink);
    padding-left: 0;
    padding-top: 22px;
  }
}

@media (max-width: 860px) {
  .topbar {
    gap: 10px 20px;
  }

  .topbar-nav {
    order: 3;
    flex-basis: 100%;
    gap: 8px 18px;
  }

  .edition-stats {
    flex-basis: 100%;
  }

  .stat-block dd {
    font-size: 30px;
  }

  .source-link {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .source-title {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .masthead {
    padding-top: 36px;
  }

  .masthead-seal {
    width: 38px;
    height: 38px;
  }

  .masthead-seal span {
    font-size: 7.5px;
  }

  .lead-summary p {
    font-size: 16px;
  }

  .archive-item {
    grid-template-columns: 1fr;
  }

  .archive-editions {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 8px;
  }

  .consent-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .consent-modal {
    padding: 12px;
  }

  .consent-modal-panel {
    padding: 24px 22px;
  }

  .topic-card-header {
    gap: 8px 14px;
  }
}

@media (max-width: 480px) {
  .reading-switcher-label {
    display: none;
  }

  .edition-stats {
    gap: 18px;
  }

  .stat-block + .stat-block {
    padding-left: 18px;
  }

  .stat-block dd {
    font-size: 26px;
  }
}

/* ─────────────────────────────────────────
   DRUK
   ───────────────────────────────────────── */
@media print {
  .accent-bar,
  .topbar,
  .section-tabs,
  .consent-banner,
  .consent-modal,
  .archive-controls,
  .site-footer-links,
  .edition-switch,
  .archive-editions {
    display: none !important;
  }

  html, body {
    background: #fff;
  }

  body {
    color: #000;
    font-size: 11pt;
  }

  .page-frame {
    max-width: none;
    padding: 0;
  }

  .topic-card,
  .section-digest-card,
  .archive-item {
    break-inside: avoid;
  }

  .lead-headline,
  .masthead-title {
    color: #000;
  }
}
