/*
 * Wersja Google (włącznik w panelu admina): tematy „Cała historia” na głównej i strona /temat/{id}.
 * Ładowany tylko przy włączonej wersji; kolory z tokenów app.css (--zn-*), więc działa też ciemny motyw.
 */
:root { --zn-temat: #0f6b5c; --zn-temat-bg: #e0f0eb; }
html[data-bs-theme="dark"] { --zn-temat: #5fc9b3; --zn-temat-bg: #173029; }

/* Kółko z pierwszą literą serwisu, kolor stały dla domeny (Tematy::kolor) */
.zn-fav { box-sizing: border-box; flex: 0 0 auto; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: hsl(var(--h) 55% 42%); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; border: 2px solid var(--zn-surface, #fff); }

/* Główna: karty tematów nad listą */
.zn-tematy { margin-bottom: 20px; }
.zn-tematy-naglowek { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--zn-meta); text-align: left; }
.zn-tematy-siatka { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.zn-temat { display: flex; flex-direction: column; min-width: 0; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--zn-line); }
html[data-bs-theme="dark"] .zn-temat { background: var(--zn-surface); }
.zn-temat-img img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: var(--zn-thumb-bg); }
.zn-temat-body { display: grid; gap: 7px; padding: 12px 14px 14px; }
.zn-temat-gora { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.zn-temat-tag { display: inline-block; padding: 3px 9px; border-radius: 99px; background: var(--zn-temat-bg); color: var(--zn-temat); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.zn-temat-zrodla { display: inline-flex; align-items: center; }
.zn-temat-zrodla .zn-fav + .zn-fav { margin-left: -4px; }
.zn-temat-zrodla b { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--zn-text); white-space: nowrap; }
.zn-temat-tytul { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; }
.zn-temat-tytul a { color: var(--zn-text); text-decoration: none; }
.zn-temat-tytul a:hover { text-decoration: underline; }
.zn-temat-meta { font-size: 12.5px; color: var(--zn-meta); }
.zn-temat-inne { display: grid; gap: 7px; margin: 2px 0 0; padding: 9px 0 0; border-top: 1px solid var(--zn-line); list-style: none; }
.zn-temat-inne li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; margin: 0; padding: 0; }
.zn-temat-inne .zn-fav { display: grid; width: 22px; height: 22px; min-width: 22px; margin: 1px 0 0; padding: 0; }
.zn-temat-inne a { min-width: 0; color: var(--zn-desc); text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.zn-temat-inne a:hover span { text-decoration: underline; }
.zn-temat-inne b { display: block; font-size: 11.5px; font-weight: 600; color: var(--zn-meta); }
.zn-temat-inne span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.zn-temat-wiecej { font-size: 13.5px; font-weight: 600; color: var(--zn-temat); text-decoration: none; }
.zn-temat-wiecej:hover { text-decoration: underline; }
@media (max-width: 767px) { .zn-tematy-siatka { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
    .zn-tematy { margin: 0 0 12px; padding: 0 12px; }
    .zn-temat-tytul { font-size: 16.5px; }
}

/* Strona tematu: zdjęcie z tytułem, pod nim oś czasu źródeł */
.zn-temat-strona { padding-top: 0; overflow: hidden; }
.zn-temat-hero { position: relative; margin: 0 -20px 20px; }
.zn-temat-hero img { display: block; width: 100%; height: 300px; object-fit: cover; background: var(--zn-thumb-bg); }
.zn-temat-hero-t { position: absolute; inset: auto 0 0; display: grid; gap: 6px; justify-items: start; padding: 60px 24px 18px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); color: #fff; }
.zn-temat-hero-t h1 { margin: 0; color: #fff; font-size: 28px; line-height: 1.2; font-weight: 700; text-wrap: balance; }
.zn-temat-hero-t > span:last-child { font-size: 13px; opacity: .88; }
.zn-temat-hero .zn-temat-tag { background: rgba(255, 255, 255, .92); color: #0f6b5c; }
.zn-os { margin: 0; padding: 0; list-style: none; }
.zn-os li { position: relative; display: grid; grid-template-columns: 52px 26px minmax(0, 1fr); gap: 12px; padding-bottom: 18px; scroll-margin-top: 90px; }
.zn-os li::after { content: ""; position: absolute; left: 76px; top: 28px; bottom: 0; width: 2px; background: var(--zn-line); }
.zn-os li:last-child::after { display: none; }
.zn-os-czas { font-size: 12.5px; line-height: 26px; color: var(--zn-meta); font-variant-numeric: tabular-nums; }
.zn-os .zn-fav { width: 26px; height: 26px; position: relative; z-index: 1; }
.zn-os-karta { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--zn-line); border-radius: 10px; min-width: 0; }
.zn-os li:target .zn-os-karta { border-color: var(--zn-temat); box-shadow: 0 0 0 2px var(--zn-temat-bg); }
.zn-os-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--zn-thumb-bg); }
.zn-os-domena { font-size: 12px; font-weight: 600; color: var(--zn-meta); text-decoration: none; }
.zn-os-tytul { display: block; margin: 3px 0 8px; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--zn-text); text-decoration: none; overflow-wrap: anywhere; }
.zn-os-tytul:hover { text-decoration: underline; }
.zn-os-linki { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.zn-os-linki a { color: var(--zn-temat); font-weight: 600; text-decoration: none; }
.zn-os-linki a.zn-os-wpis { color: var(--zn-meta); font-weight: 400; }
@media (max-width: 600px) {
    .zn-temat-hero { margin: 0 -14px 16px; }
    .zn-temat-hero img { height: 230px; }
    .zn-temat-hero-t { padding: 50px 14px 14px; }
    .zn-temat-hero-t h1 { font-size: 21px; }
    .zn-os li { grid-template-columns: 22px minmax(0, 1fr); gap: 10px; }
    .zn-os li::after { left: 10px; top: 26px; }
    .zn-os-czas { grid-column: 2; grid-row: 1; line-height: 22px; }
    .zn-os .zn-fav { grid-column: 1; grid-row: 1; width: 22px; height: 22px; }
    .zn-os-karta { grid-column: 2; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 10px; }
    .zn-os-tytul { font-size: 15px; }
}
