/* =====================================================================
   Praktické IT — design system
   Tmavý i světlý režim, jeden soubor, žádné závislosti.
   ===================================================================== */

:root {
  --bg:        #0b0e14;
  --bg-soft:   #11151f;
  --surface:   #161b27;
  --surface-2: #1d2433;
  --border:    #263041;
  --text:      #e7ecf3;
  --text-dim:  #9aa6b8;
  --text-mute: #6b7689;
  --brand:     #6366f1;
  --brand-2:   #22d3ee;
  --accent:    #6366f1;
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1140px;
  --shadow:    0 10px 30px -12px rgba(0,0,0,.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  --bg:        #f7f8fb;
  --bg-soft:   #ffffff;
  --surface:   #ffffff;
  --surface-2: #f1f3f8;
  --border:    #e3e7ef;
  --text:      #0f1623;
  --text-dim:  #4a566b;
  --text-mute: #8390a4;
  --shadow:    0 12px 30px -16px rgba(20,30,60,.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.icon { vertical-align: middle; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 66px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px -6px var(--brand);
}
.brand-text { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; }
.brand-accent { color: var(--brand-2); }
.brand-logo { width: 38px; height: 38px; object-fit: contain; display: block; flex: 0 0 auto; }
.footer-brand .brand-logo { width: 40px; height: 40px; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--text-dim); font-weight: 500; font-size: .96rem;
}
.nav-list a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 4px 0; background: var(--text); border-radius: 2px; transition: .25s; }

.theme-toggle {
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  width: 40px; height: 40px; border-radius: 10px; font-size: 1.1rem; line-height: 1;
  display: grid; place-items: center; transition: .2s;
}
.theme-toggle:hover { border-color: var(--brand); transform: translateY(-1px); }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 72px; }
.hero-inner { position: relative; z-index: 2; max-width: 820px; }
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .78rem;
  font-weight: 700; color: var(--brand-2); margin: 0 0 18px;
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 22px; font-weight: 800; }
.grad {
  background: linear-gradient(110deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 1.2rem; color: var(--text-dim); max-width: 640px; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-glow {
  position: absolute; top: -180px; right: -120px; width: 620px; height: 620px;
  background: radial-gradient(circle at center, var(--brand) 0%, transparent 62%);
  opacity: .22; filter: blur(20px); z-index: 1; pointer-events: none;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 24px -10px var(--brand);
}
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); }

/* ---------------- Sections ---------------- */
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0 0 6px; font-weight: 700; }
.topics { padding: 40px 0 10px; }
/* Tříbarevný gradient nadpisu — barvy tří kategorií (IT modrá, Vývoj zelená, Foto jantarová) */
.section-title--tri {
  display: inline-block;
  background: linear-gradient(100deg, #3b82f6 0%, #10b981 52%, #f59e0b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topics-lead { color: var(--text-dim); font-size: 1.12rem; margin: 8px 0 0; max-width: 560px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.see-all { color: var(--text-dim); font-weight: 600; font-size: .95rem; white-space: nowrap; }

/* ---------------- Topic cards ---------------- */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 28px 0 60px; }
.topic-card {
  position: relative; padding: 30px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: .25s; overflow: hidden;
}
.topic-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent); opacity: .9;
}
.topic-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.topic-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; margin-bottom: 18px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
/* Barevné PNG ikonky kategorií — bez tónovaného čtverce, ať vyniknou */
.topic-icon--img { width: auto; height: auto; background: none; border-radius: 0; margin-bottom: 14px; }
.topic-icon--img img { height: 64px; width: auto; display: block; }
.topic-card h3 { margin: 0 0 8px; font-size: 1.25rem; }
.topic-card p { margin: 0 0 18px; color: var(--text-dim); }
.topic-link { color: var(--accent); font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: 6px; }

/* ---------------- Post cards ---------------- */
.latest { padding: 20px 0 80px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .25s; }
.post-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.post-card-link { color: var(--text); display: block; }
.post-card-link:hover { text-decoration: none; }
.post-cover { height: 180px; background-size: cover; background-position: center; background-color: var(--surface-2); }
.post-cover--blank { display: grid; place-items: center; color: var(--accent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface)); }
.post-body { padding: 20px 22px 24px; }
.post-body h3 { margin: 12px 0 8px; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.01em; }
.post-body p { margin: 0 0 14px; color: var(--text-dim); font-size: .96rem; }
.post-body time { color: var(--text-mute); font-size: .85rem; }

.badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent);
}

.empty { color: var(--text-dim); padding: 40px 0; }
.empty code { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-family: var(--mono); }

/* ---------------- Page head (listings) ---------------- */
.page-head { padding: 56px 0 30px; border-bottom: 1px solid var(--border); margin-bottom: 40px; position: relative; }
.page-head::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 90px; height: 3px; background: var(--accent); }
.page-lead { color: var(--text-dim); font-size: 1.1rem; max-width: 620px; margin: 8px 0 0; }

/* ---------------- Article ---------------- */
.article-head { padding: 50px 0 10px; }
.article-head-inner { max-width: 760px; margin: 0 auto; }
.breadcrumb { color: var(--text-mute); font-size: .9rem; margin-bottom: 18px; }
.breadcrumb a { color: var(--text-dim); }
.article-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -.03em; margin: 14px 0 16px; }
.article-meta { color: var(--text-mute); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.article-meta .tag { color: var(--accent); }
.article-cover { height: clamp(220px, 38vw, 420px); border-radius: var(--radius); background-size: cover; background-position: center; margin: 30px 0; max-width: 900px; margin-left: auto; margin-right: auto; }

/* ---------------- Prose (článek) ---------------- */
.prose { max-width: 780px; margin: 30px auto 0; font-size: 1.12rem; }
.prose > * { margin-top: 0; }
.prose h2 { font-size: 1.7rem; letter-spacing: -.02em; margin: 2.2em 0 .6em; padding-top: .3em; }
.prose h3 { font-size: 1.32rem; margin: 1.8em 0 .5em; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 90px; }
.prose p { margin: 0 0 1.3em; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.prose li { margin: .4em 0; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose img { border-radius: var(--radius-sm); margin: 1.6em 0; }
.prose figure { margin: 2em 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption {
  text-align: center; color: var(--text-mute); font-size: .9rem;
  margin-top: 12px; font-style: italic; line-height: 1.5;
}
/* Řada obrázků vedle sebe (2+ obrázků na sousedních řádcích) */
.prose .img-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin: 2em 0; align-items: start;
}
.prose .img-row figure { margin: 0; }
.prose .img-row img { width: 100%; height: auto; margin: 0; }
/* Volitelné velikosti/zarovnání obrázků (syntaxe {width=… .center …}) */
.prose img.img-full { width: 100%; max-width: 100%; }
.prose img.img-center, .prose figure img.img-center { margin-left: auto; margin-right: auto; }
.prose img.img-left  { float: left;  margin: .4em 1.6em 1em 0; }
.prose img.img-right { float: right; margin: .4em 0 1em 1.6em; }
@media (max-width: 560px) {
  .prose img.img-left, .prose img.img-right { float: none; margin: 1.6em auto; }
}
.prose strong { color: var(--text); font-weight: 700; }

.prose blockquote {
  margin: 1.8em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent);
  color: var(--text-dim); font-style: italic;
}
.prose blockquote p { margin: .4em 0; }

.prose code {
  font-family: var(--mono); font-size: .9em;
  background: var(--surface-2); color: var(--brand-2);
  padding: 2px 7px; border-radius: 6px;
}
.prose pre {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 20px 22px; overflow-x: auto;
  margin: 1.6em 0; font-size: .95rem; line-height: 1.55;
}
.prose pre code { background: none; color: var(--text); padding: 0; font-size: .92em; }

.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }

.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .98rem; }
.prose th, .prose td { padding: 11px 14px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 700; }
.prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface) 60%, transparent); }

.article-footer { max-width: 760px; margin: 50px auto 90px; padding-top: 26px; border-top: 1px solid var(--border); }

/* ---------------- 404 ---------------- */
.error-page { text-align: center; padding: 110px 0 130px; }
.error-code { font-size: 6rem; font-weight: 800; margin: 0; line-height: 1; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { margin: 8px 0 12px; }
.error-page p { color: var(--text-dim); margin-bottom: 28px; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; padding: 48px 24px 30px; }
.footer-brand { display: flex; gap: 14px; align-items: center; max-width: 320px; }
.footer-brand p { margin: 2px 0 0; color: var(--text-dim); font-size: .92rem; }
.footer-nav, .footer-social { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-social a { color: var(--text-dim); font-size: .95rem; }
.footer-nav a:hover, .footer-social a:hover { color: var(--text); }
.footer-bottom { padding: 0 24px 36px; color: var(--text-mute); font-size: .88rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .topic-grid, .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topic-grid, .card-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; order: 3; }
  .main-nav { margin-left: auto; }
  .nav-list {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 12px; gap: 2px; display: none;
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 12px 14px; }
  .hero { padding: 60px 0 50px; }
  .footer-inner { flex-direction: column; gap: 24px; }
}

/* ---------------- Vyhledávání ---------------- */
.search-form { margin: 0; }
.search-form input {
  width: 180px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: .92rem; transition: .2s;
}
.search-form input::placeholder { color: var(--text-mute); }
.search-form input:focus { outline: none; border-color: var(--brand); width: 220px; }

.search-big { display: flex; gap: 12px; margin-top: 18px; max-width: 560px; }
.search-big input {
  flex: 1; padding: 14px 20px; border-radius: 999px; font-size: 1.05rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.search-big input:focus { outline: none; border-color: var(--brand); }

.search-count { color: var(--text-dim); margin-bottom: 24px; }
.search-results { display: flex; flex-direction: column; gap: 14px; }
.search-result {
  display: block; padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: .2s;
}
.search-result:hover { border-color: var(--accent); transform: translateX(4px); text-decoration: none; }
.search-result h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.search-result p { margin: 0 0 8px; color: var(--text-dim); font-size: .96rem; }
.search-result time { color: var(--text-mute); font-size: .85rem; }
mark { background: color-mix(in srgb, var(--brand-2) 30%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }

/* ---------------- Štítky (tagy) ---------------- */
.article-meta a.tag { color: var(--accent); text-decoration: none; transition: .15s; }
.article-meta a.tag:hover { text-decoration: underline; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); line-height: 1.2; transition: .2s;
}
.tag-pill:hover { border-color: var(--brand); color: var(--brand-2); transform: translateY(-2px); text-decoration: none; }
.tag-count { color: var(--text-mute); font-size: .72em; background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }

/* ---------------- Foto galerie (masonry) ---------------- */
.gallery-intro { margin-bottom: 30px; }
.gallery { columns: 3 280px; column-gap: 16px; margin: 10px 0 70px; }
.gallery-item { margin: 0 0 16px; break-inside: avoid; }
.gallery-trigger {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; line-height: 0;
}
.gallery-trigger img { width: 100%; transition: transform .4s ease, filter .3s ease; }
.gallery-trigger:hover img { transform: scale(1.05); filter: brightness(1.05); }
.gallery-item figcaption { color: var(--text-mute); font-size: .85rem; padding: 8px 4px 0; line-height: 1.4; }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center;
  background: rgba(6,8,13,.94); backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; animation: lb-fade .2s ease; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lb-stage { margin: 0; max-width: 90vw; max-height: 88vh; text-align: center; }
.lb-image { max-width: 90vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 30px 80px -20px #000; }
.lb-caption { color: #cfd6e2; margin-top: 14px; font-size: .95rem; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: #fff; cursor: pointer; border-radius: 999px; display: grid; place-items: center;
  transition: .2s; backdrop-filter: blur(4px);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 22px; right: 22px; width: 46px; height: 46px; font-size: 1.8rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 2rem; }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #aab3c2; font-size: .9rem; }

/* ---------------- App prezentace ---------------- */
.app-hero { position: relative; overflow: hidden; padding: 56px 0 64px; border-bottom: 1px solid var(--border); }
.app-hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); margin: 14px 0 20px; }
.app-hero-text h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.03em; margin: 0 0 12px; }
.app-tagline { font-size: 1.25rem; color: var(--text-dim); margin: 0 0 28px; max-width: 460px; }
.app-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.app-price { color: var(--text-dim); font-weight: 600; }
.app-hero-shot img { border-radius: var(--radius); box-shadow: var(--shadow); margin-left: auto; max-height: 460px; }
.app-body { margin: 44px auto 0; }
.app-body h2 { font-size: 1.5rem; }

.feedback-box {
  max-width: 760px; margin: 50px auto 90px; padding: 34px 36px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  border: 1px solid var(--border); text-align: center;
}
.feedback-box h2 { margin: 0 0 10px; font-size: 1.4rem; }
.feedback-box p { color: var(--text-dim); margin: 0 0 22px; }

/* ---------------- Kopírovat kód ---------------- */
.prose pre { position: relative; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; padding: 5px 12px; font-size: .78rem;
  border-radius: 7px; cursor: pointer; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border); opacity: 0; transition: .2s;
}
.prose pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); border-color: var(--brand); }

/* ---------------- Responsive doplňky ---------------- */
@media (max-width: 860px) {
  .gallery { columns: 2 180px; }
  .app-hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .app-hero-shot img { margin: 0 auto; max-height: 340px; }
}
@media (max-width: 640px) {
  .gallery { columns: 2 130px; }
  .search-form { display: none; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .search-big { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}

/* ---------------- Tisk (čistý výstup bez navigace) ---------------- */
@media print {
  .site-header, .site-footer, .skip-link, .breadcrumb,
  .article-footer, .theme-toggle, .search-form, .copy-btn,
  .hero-glow, .nav-toggle { display: none !important; }

  html, body { background: #fff !important; color: #000 !important; }
  .container { max-width: 100%; padding: 0; }
  .prose { max-width: 100%; font-size: 11pt; }
  .prose a { color: #000; text-decoration: underline; }
  .prose pre, .prose code {
    background: #f3f3f3 !important; color: #000 !important;
    border: 1px solid #ccc;
  }
  .prose pre { white-space: pre-wrap; word-break: break-word; }
  .prose th { background: #eee !important; }
  .prose th, .prose td { border: 1px solid #999; }
  .badge { border: 1px solid #999; color: #000 !important; background: none !important; }
  h1, h2, h3, h4 { color: #000 !important; page-break-after: avoid; }
  pre, table, figure, blockquote { page-break-inside: avoid; }
  .article-head { padding-top: 0; }
}

/* --- Doba čtení (nenápadně v metadatech článku) --- */
.article-meta .read-time { color: var(--text-mute); }

/* --- Stránkování výpisů --- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 44px 0 8px; }
.pagination .page-btn {
  padding: 9px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-weight: 600; transition: .2s;
}
.pagination .page-btn:hover { border-color: var(--brand); color: var(--brand-2); text-decoration: none; transform: translateY(-2px); }
.pagination .page-info { color: var(--text-mute); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* --- Související články pod článkem --- */
.related { margin: 56px auto 8px; }
.related-title { font-size: 1.25rem; margin: 0 0 22px; }

/* --- Diskuze: přehled témat --- */
.thread-list { display: flex; flex-direction: column; gap: 12px; }
.thread-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); transition: .2s;
}
.thread-row:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.thread-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.thread-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-count { color: var(--text-mute); font-size: .88rem; white-space: nowrap; }

/* --- Diskuze: vlákno --- */
.discuss-inner { max-width: 720px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; display: flex; flex-direction: column; gap: 14px; }
.comment { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.comment-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.comment-name { font-weight: 700; }
.comment-time { color: var(--text-mute); font-size: .82rem; margin-left: auto; }
.comment-body { color: var(--text-dim); line-height: 1.6; }

/* --- Diskuze: formulář --- */
.discuss-form-title { font-size: 1.15rem; margin: 0 0 16px; }
.discuss-form { display: flex; flex-direction: column; gap: 14px; }
.discuss-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.discuss-form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--text-dim); }
.discuss-form input, .discuss-form textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; color: var(--text); font: inherit; font-size: .95rem; width: 100%;
}
.discuss-form input:focus, .discuss-form textarea:focus { outline: none; border-color: var(--brand); }
.discuss-form textarea { resize: vertical; }
.discuss-form button { align-self: flex-start; }
.discuss-note { color: var(--text-mute); font-size: .82rem; margin: 0; }
.discuss-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Hlášky (flash) --- */
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 24px; font-size: .95rem; }
.flash--ok { background: rgba(16,185,129,.12); color: #10b981; border: 1px solid rgba(16,185,129,.35); }
.flash--err { background: rgba(239,68,68,.10); color: #ef4444; border: 1px solid rgba(239,68,68,.30); }

@media (max-width: 560px) { .discuss-form .form-row { grid-template-columns: 1fr; } }

/* --- Tlačítka u appky (feedback) a galerie --- */
.feedback-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gallery-discuss { margin-top: 36px; text-align: center; }
