/* Verejne stranky katalogu pro vyhledavace (app/routes/verejne.py). Rychle: zadne externi fonty ani skripty. */
:root {
  --bg: #F6F6FB; --surface: #FFFFFF; --surface-2: #EEEFF6; --text: #11142A; --muted: #62677D; --line: #E3E5EE;
  --brand: #4044EE; --brand-ink: #FFFFFF; --navy: #0A132D; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B1020; --surface: #141A2E; --surface-2: #1C2440; --text: #EEF0F8; --muted: #A2A8BE; --line: #252D48; --brand: #6B6EF5; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
/* odkazy v textu (odstavce, drobečková navigace, patička) nejen barvou – přístupnost */
p a, li a, .crumbs a, .foot a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
p a.btn, li a.btn, .card a, a.card, .eps a, .chips a, .chip { text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2 { font-family: Ubuntu, Roboto, system-ui, sans-serif; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(26px, 4vw, 38px); margin: 4px 0 8px; }
h2 { font-size: 21px; margin: 0 0 14px; }
.muted { color: var(--muted); }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 10px max(16px, calc((100% - 1180px) / 2));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
/* dotyková zařízení: rozmazání pod přilepenou lištou se při posouvání přepočítává každý snímek (jako v aplikaci) */
@media (pointer: coarse) { .top { background: var(--bg); backdrop-filter: none; } }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 22px/1 Ubuntu, Roboto, sans-serif; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 9px; }
.nav { display: flex; gap: 16px; flex: 1; font-weight: 500; overflow-x: auto; white-space: nowrap; }
.nav a { color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; border: 1px solid var(--brand); white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 48px; display: grid; gap: 30px; }
.crumbs { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.lead { font-size: 17px; color: var(--muted); max-width: 70ch; margin: 0; }
section > p, .detail p { max-width: 75ch; }

.detail { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; }
.detail .cover img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 40px rgba(10, 19, 45, .25); }
.kicker { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.by { margin: 0 0 14px; font-size: 18px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.price { margin: 6px 0 0; display: flex; align-items: baseline; gap: 10px; }
.price b { font: 700 30px/1.1 Ubuntu, Roboto, system-ui, sans-serif; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); font-size: 15px; }
.price { flex-wrap: wrap; }
.price .rrp { flex-basis: 100%; color: var(--muted); font-size: 14px; }
.price + .cta { margin-top: 10px; }
.perks { list-style: none; margin: -6px 0 18px; padding: 0; display: grid; gap: 4px; font-size: 14.5px; color: var(--muted); }
.perks li { padding-left: 24px; position: relative; }
.twa .price, .twa .perks, .twa .cta .buy, .twa .card .p, .twa .kupit-lista { display: none !important; }   /* aplikace z Google Play: bez cen a nákupu */
.perks li::before { content: ""; position: absolute; left: 3px; top: .38em; width: 11px; height: 6px; border-left: 2px solid #1E9E61; border-bottom: 2px solid #1E9E61; transform: rotate(-45deg); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.why ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.card { display: grid; gap: 4px; color: var(--text); align-content: start; }
.card:hover { text-decoration: none; }
.card:hover .t { color: var(--brand); }
.card img, .card .ph { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.card.pod img, .card.audio img, .card.audio .ph { aspect-ratio: 1; }
.card .ph { display: grid; place-items: center; padding: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.card .t { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .a, .card .m { font-size: 13px; color: var(--muted); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .p { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.chip span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--brand); text-decoration: none; }

.eps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.eps li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.eps li a { font-weight: 500; }
.eps .muted { font-size: 14px; }

.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 18px; font-size: 15px; }

.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { max-width: 1180px; margin: 0 auto; padding: 24px 16px 36px; display: grid; gap: 8px; font-size: 14px; }
.foot p { margin: 0; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; gap: 8px 14px; }
  .top .btn { margin-left: auto; min-height: 34px; padding: 0 12px; font-size: 13px; }
  .nav { order: 3; flex: 1 1 100%; gap: 18px; font-size: 15px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .detail { grid-template-columns: 1fr; gap: 14px; }
  .detail .cover { max-width: 150px; }
  .cta .btn { flex: 1 1 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
}

/* tematicke vybery (/tema/<slug>, /temata) */
.tema-hero { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 16px; margin: 4px 0 18px; background: var(--surface-2); }
.lead p { margin: 0 0 10px; }
@media (min-width: 700px) { .tema-hero { aspect-ratio: 3 / 1; max-height: 380px; } }
@media (min-width: 1000px) { .tema-hero ~ .lead { column-count: 2; column-gap: 40px; max-width: none; } .tema-hero ~ .lead p { break-inside: avoid-column; } }
.tema-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.tema-card { display: grid; gap: 6px; color: var(--text); }
.tema-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.tema-card .t { font-weight: 700; font-size: 17px; }
.tema-card .a { font-size: 14px; color: var(--muted); line-height: 1.4; }

/* informacni stranky (jak nakupovat, caste dotazy, kontakt) */
.info-page { max-width: 760px; }
.info-page h2 { font-size: 20px; margin: 22px 0 6px; }
.steps { padding-left: 22px; display: grid; gap: 10px; }
.steps b { display: block; }

/* clanky (/clanky/<slug>) */
.article .article-body { font-size: 17px; line-height: 1.65; }
.article .article-body h2 { font-size: 22px; margin: 26px 0 8px; }
.article .article-body img { max-width: min(100%, 280px); height: auto; border-radius: 8px; margin: 4px 0 14px 24px; float: right; }
.article .article-body table { border-collapse: collapse; display: block; overflow-x: auto; }
.article .article-body td, .article .article-body th { border: 1px solid var(--line, #ddd); padding: 6px 10px; }
@media (max-width: 560px) { .article .article-body img { float: none; display: block; margin: 8px auto 14px; } }
/* pruvodci (app/routes/pruvodce.py): srovnavaci tabulky a rozcestnik */
.tbl { overflow-x: auto; margin: 10px 0 14px; }
.cmp { border-collapse: collapse; width: 100%; font-size: 15px; }
.cmp th, .cmp td { border-bottom: 1px solid var(--line, rgba(127,127,127,.25)); padding: 8px 10px; text-align: left; vertical-align: top; }
.cmp thead th { font-weight: 600; }
.cmp tbody th { font-weight: 600; white-space: nowrap; }
.guide-list { list-style: none; padding: 0; display: grid; gap: 14px; }
.guide h3 { font-size: 17px; margin: 16px 0 4px; }

/* knihy pro posluchace podcastu: hned pod prehravacem epizody / podcastu, jedna rada */
.ep-books { margin-top: 8px; }
.ep-books > p.muted { margin: -4px 0 14px; font-size: 15px; }

/* mobil: spodni lista „Koupit“ na strance titulu (web/kupit-lista.js) */
.kupit-lista { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(10, 19, 45, .12); }
.kupit-lista[hidden] { display: none; }
.kupit-lista .kl-t { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.kupit-lista b { font: 700 19px/1.2 Ubuntu, Roboto, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.kupit-lista small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kupit-lista .btn { min-height: 44px; padding: 0 26px; }
.kupit-on body { padding-bottom: 72px; }
@media (min-width: 721px) { .kupit-lista { display: none !important; } .kupit-on body { padding-bottom: 0; } }
