/* ============================================================
   DATAENERGO — styly blogu a chybové stránky
   Základ (tokeny, navigace, tlačítka, patička) odpovídá
   konzultace.html a energeticky-management-pro-verejne-instituce.html.
   Soubor je ruční; generátor tools/build_blog.py ho nepřepisuje.
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video, svg { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }

:root {
  /* Typografická škála — stejné role mají stejné hodnoty na všech stránkách */
  --fs-display:    clamp(1.9rem, 4vw, 3.2rem);   /* H1 podstránek, závěrečná výzva */
  --fs-h2:         clamp(1.7rem, 3.4vw, 2.8rem); /* nadpis sekce */
  --fs-card-title: 1.05rem;                      /* nadpis karty / kroku */
  --fs-perex:      1.0625rem;                    /* úvodní odstavec (17 px) */
  --fs-body:       .92rem;                       /* běžný odstavec, text karty */
  --fs-list:       .875rem;                      /* položka seznamu */
  --fs-note:       .82rem;                       /* poznámka, drobný text */
  --fs-label:      .68rem;                       /* štítek, číslo karty */
  --fs-eyebrow:    .76rem;                       /* nadtitulek sekce */
  --fs-nav:        .76rem;                       /* odkazy navigace */
  --lh-heading:    1.1;
  --lh-card-title: 1.3;
  --lh-perex:      1.78;
  --lh-body:       1.7;
  --lh-list:       1.55;
  --lh-note:       1.6;
  --bg:           #ffffff;
  --bg-mid:       #f7f8fa;
  --orange:       #e15b0e;
  --orange-dim:   #b34709;
  --white:        #ffffff;
  --text:         #111827;
  --text-sec:     #4b5563;
  --text-muted:   #6b7280;
  --border:       #e5e7eb;
  --container:    1200px;
  --radius:       6px;
  /* Blog: délka řádku čteného textu a velikost písma článku */
  --measure:      680px;
  --fs-prose:     1.0625rem;
  --lh-prose:     1.8;
}

body {
  font-family: 'Inter', sans-serif;
  color: #111827;
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #f7f8fa; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 2000;
  padding: .6rem 1rem;
  background: #111827;
  color: #ffffff;
  font-size: var(--fs-note);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   UTILITY
   ============================================================ */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange-dim);
  display: inline-block;
  margin-bottom: 1.2rem;
}
.section-title {
  font-family: 'Manrope', sans-serif;
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: var(--lh-heading);
  letter-spacing: -.03em;
  color: #111827;
  margin-bottom: 1.2rem;
  text-wrap: balance;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: .85rem 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #e5e7eb;
  transition: padding .4s ease, box-shadow .4s ease;
}
.nav.scrolled {
  padding: .6rem 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.nav-logo-img { height: 24px; width: auto; display: block; }
.nav-links {
  display: flex; align-items: center; gap: 2rem; list-style: none; flex-wrap: nowrap;
}
.nav-links a {
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #4b5563;
  text-decoration: none;
  white-space: nowrap;
  transition: color .25s;
}
.nav-links a:hover { color: #111827; }
.nav-links a[aria-current] {
  color: #111827;
  box-shadow: inset 0 -2px 0 var(--orange);
  padding-bottom: .3rem;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.4rem !important;
  background: transparent !important;
  color: #111827 !important;
  border: 1px solid #111827 !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  letter-spacing: .10em !important;
  font-size: .75rem !important;
  text-transform: uppercase !important;
  transition: border-color .25s, color .25s !important;
}
.nav-cta:hover { border-color: var(--orange-dim) !important; color: var(--orange-dim) !important; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .65rem;
  margin: -.35rem -.65rem;
}
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: #111827; border-radius: 2px;
  transition: .3s;
}
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(5,5,5,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 4rem 1.5rem;
  overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: 'Manrope', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  text-align: center;
  color: #ffffff;
  text-decoration: none;
  transition: color .2s;
}
.nav-mobile a:hover,
.nav-mobile a[aria-current],
.nav-mobile .nav-mobile-cta { color: var(--orange); }
.nav-mobile-close {
  position: absolute;
  top: calc(1.5rem - .6rem); right: calc(1.8rem - .6rem);
  padding: .6rem;
  background: none; border: none;
  color: rgba(255,255,255,0.55); font-size: 1.8rem;
  cursor: pointer; transition: color .2s;
}
.nav-mobile-close:hover { color: #ffffff; }
@media (max-height: 560px) {
  .nav-mobile { gap: 1.3rem; justify-content: flex-start; }
  .nav-mobile a { font-size: 1.35rem; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .9rem 2.4rem;
  background: transparent;
  color: #111827;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #111827;
  border-radius: 0;
  transition: border-color .35s, color .35s;
}
.btn-primary:hover { border-color: var(--orange-dim); color: var(--orange-dim); }
.btn-primary .arr { transition: transform .35s ease; }
.btn-primary:hover .arr { transform: translateX(5px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 0;
  color: #4b5563;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .25s;
}
.btn-secondary:hover { color: #111827; }

/* ============================================================
   DROBEČKOVÁ NAVIGACE
   ============================================================ */
.crumbs { margin-bottom: 2.4rem; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .55rem;
  list-style: none;
  font-size: var(--fs-note);
  line-height: var(--lh-note);
  color: var(--text-muted);
}
.crumbs li { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
.crumbs li + li::before { content: '/'; color: #c5c9d0; }
.crumbs a {
  color: var(--text-sec);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.crumbs a:hover { color: var(--orange-dim); border-color: var(--orange-dim); }
.crumbs [aria-current="page"] {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 34ch;
}

/* ============================================================
   PŘEHLED ČLÁNKŮ — HLAVIČKA
   ============================================================ */
.b-hero {
  padding: 9rem 0 4.5rem;
  background: var(--bg-mid);
  border-bottom: 3px solid var(--orange);
}
.b-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2.5rem 5rem;
  align-items: end;
}
.b-hero-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.02;
  color: #111827;
  text-wrap: balance;
}
.b-hero-sub {
  font-size: var(--fs-perex);
  color: var(--text-sec);
  line-height: var(--lh-perex);
  max-width: 470px;
}
.b-hero-topics {
  margin-top: 1.4rem;
  font-size: var(--fs-note);
  line-height: var(--lh-note);
  color: var(--text-muted);
}
.b-hero-topics strong { color: var(--text); font-weight: 600; }

/* ============================================================
   PŘEHLED ČLÁNKŮ — SEZNAM
   ============================================================ */
.b-list { padding: 5rem 0 7rem; }
.b-empty {
  max-width: 560px;
  font-size: var(--fs-perex);
  color: var(--text-sec);
  line-height: var(--lh-perex);
}
.b-empty .btn-primary { margin-top: 2rem; }
.b-empty p a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: .22em;
}
.b-empty p a:hover { color: var(--orange-dim); }

/* Filtr kategorií — zobrazí se jen při větším množství článků */
.b-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.8rem;
  margin-bottom: 3.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.b-filter-label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: .4rem;
}
.b-filter button {
  background: none;
  border: none;
  padding: .45rem 0;
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-sec);
  cursor: pointer;
  transition: color .2s, box-shadow .2s;
}
.b-filter button:hover { color: var(--text); }
.b-filter button[aria-pressed="true"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--orange);
}

/* Karta článku: žádný rámeček, jen linka nad textem — funguje s obrázkem i bez něj */
.b-card {
  position: relative;
  display: flex;
  flex-direction: column;
}
.b-card[hidden] { display: none; }
.b-card-media {
  display: block;
  margin-bottom: 1.4rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-mid);
}
.b-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.b-card:hover .b-card-media img { transform: scale(1.025); }
.b-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 1.2rem;
  border-top: 1px solid #111827;
  transition: border-color .3s;
}
.b-card:hover .b-card-body { border-top-color: var(--orange); }
.b-card-cat {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange-dim);
  margin-bottom: .8rem;
}
.b-card-title {
  font-family: 'Manrope', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.22;
  color: #111827;
  margin-bottom: .8rem;
  text-wrap: balance;
}
.b-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color .25s;
}
/* Celá karta je klikací, odkazem zůstává jen nadpis */
.b-card-title a::after { content: ''; position: absolute; inset: 0; }
.b-card:hover .b-card-title a { color: var(--orange-dim); }
/* Fokus z klávesnice orámuje celou kartu (bez :has zůstane na odkazu) */
@supports selector(:has(*)) {
  .b-card-title a:focus-visible { outline: none; }
  .b-card:has(.b-card-title a:focus-visible) { outline: 2px solid var(--orange); outline-offset: 6px; }
}
.b-card-excerpt {
  font-size: var(--fs-body);
  color: var(--text-sec);
  line-height: var(--lh-body);
  margin-bottom: 1.2rem;
}
.b-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .5rem;
  font-size: var(--fs-note);
  color: var(--text-muted);
  line-height: var(--lh-note);
}
.b-card-meta span + span::before { content: '·'; margin-right: .5rem; color: #c5c9d0; }

.b-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4rem 2.6rem;
}
.b-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem 4rem; }
.b-grid--2 .b-card-title { font-size: 1.55rem; }

/* Hlavní (nejnovější) článek */
.b-feature { margin-bottom: 5rem; }
.b-feature .b-card-title {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  letter-spacing: -.035em;
  line-height: 1.1;
  margin-bottom: 1.2rem;
}
.b-feature .b-card-excerpt {
  font-size: var(--fs-perex);
  line-height: var(--lh-perex);
  max-width: 560px;
  margin-bottom: 1.6rem;
}
.b-feature.has-media {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: stretch;
}
.b-feature.has-media .b-card-media { order: 2; margin-bottom: 0; aspect-ratio: 4 / 3; }
.b-feature:not(.has-media) .b-card-body {
  padding-top: 2rem;
  border-top-width: 3px;
}
.b-feature:not(.has-media) .b-card-title { max-width: 900px; }
.b-feature:not(.has-media) .b-card-excerpt { max-width: 680px; }
.b-more-title {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ============================================================
   ČLÁNEK — HLAVIČKA
   ============================================================ */
.a-head {
  padding: 8.5rem 0 4rem;
  background: var(--bg-mid);
  border-bottom: 3px solid var(--orange);
}
.a-head-inner { max-width: 900px; }
.a-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.08;
  color: #111827;
  margin-bottom: 1.6rem;
  text-wrap: balance;
}
.a-perex {
  font-size: clamp(1.0625rem, 1.6vw, 1.22rem);
  color: var(--text-sec);
  line-height: 1.7;
  max-width: var(--measure);
  margin-bottom: 2.2rem;
}
.a-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid #d9dce1;
  max-width: var(--measure);
}
.a-meta-item { display: flex; flex-direction: column; gap: .15rem; }
.a-meta-label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.a-meta-value {
  font-size: var(--fs-list);
  font-weight: 500;
  color: var(--text);
  line-height: var(--lh-list);
}
.a-draft {
  display: inline-block;
  margin-bottom: 1.6rem;
  padding: .45rem .8rem;
  background: #111827;
  color: #ffffff;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ============================================================
   ČLÁNEK — TĚLO
   ============================================================ */
.a-body { padding: 4rem 0 5rem; }
.a-cover { margin: 0 0 4rem; }
.a-cover img {
  display: block;
  width: 100%;
  max-height: 640px;
  object-fit: cover;
  background: var(--bg-mid);
}
.a-cover figcaption,
.prose figcaption {
  margin-top: .8rem;
  font-size: var(--fs-note);
  color: var(--text-muted);
  line-height: var(--lh-note);
}
.a-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--measure));
  gap: 0 5rem;
}
.a-layout.has-toc {
  grid-template-columns: minmax(0, var(--measure)) minmax(200px, 260px);
}
.a-main { min-width: 0; }
.a-layout.has-toc .a-main { grid-column: 1; grid-row: 1; }

/* Obsah článku — na desktopu v pravém sloupci, na mobilu rozbalovací nad textem */
.a-toc { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 6.5rem; }
/* Navigace se nekopíruje s textem: sbalený obsah by se jinak vložil jako prázdné číslované položky */
.a-toc { -webkit-user-select: none; user-select: none; }
.a-toc summary {
  list-style: none;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.a-toc summary::-webkit-details-marker { display: none; }
.a-toc ol { list-style: none; display: flex; flex-direction: column; gap: .15rem; }
.a-toc ol ol { margin: .15rem 0 .3rem .9rem; }
.a-toc a {
  display: block;
  padding: .35rem 0 .35rem .9rem;
  border-left: 2px solid transparent;
  font-size: var(--fs-note);
  line-height: 1.45;
  color: var(--text-sec);
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.a-toc a:hover { color: var(--text); }
.a-toc a.is-active { color: var(--text); border-left-color: var(--orange); font-weight: 600; }

/* ============================================================
   ČLÁNEK — TYPOGRAFIE TEXTU
   ============================================================ */
.prose {
  font-size: var(--fs-prose);
  line-height: var(--lh-prose);
  color: #1f2937;
  overflow-wrap: break-word;
}
.prose > * + * { margin-top: 1.3em; }
.prose h2, .prose h3, .prose h4 {
  font-family: 'Manrope', sans-serif;
  color: #111827;
  scroll-margin-top: 6.5rem;
  text-wrap: balance;
}
.prose h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.18;
  margin-top: 2.6em;
}
.prose h3 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
  margin-top: 2em;
}
.prose h4 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.8em;
}
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose h2 + h3 { margin-top: 1.5em; }
.prose > :first-child { margin-top: 0; }
.prose strong { font-weight: 600; color: #111827; }
.prose a {
  color: #111827;
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color .2s, text-decoration-thickness .2s;
}
.prose a:hover { color: var(--orange-dim); text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .5em; }
.prose li > ul, .prose li > ol { margin-top: .5em; }
.prose ul > li::marker { color: var(--orange); }
.prose ol > li::marker { color: var(--orange-dim); font-weight: 700; font-size: .92em; }
.prose blockquote {
  margin-top: 2em;
  margin-bottom: 2em;
  padding: .2rem 0 .2rem 1.6rem;
  border-left: 3px solid var(--orange);
  font-family: 'Manrope', sans-serif;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: #111827;
}
.prose blockquote + * { margin-top: 0; }
.prose blockquote p + p { margin-top: .8em; }
.prose blockquote cite,
.prose blockquote footer {
  display: block;
  margin-top: .8rem;
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-note);
  font-style: normal;
  font-weight: 500;
  color: var(--text-muted);
}
.prose hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3em 0;
}
.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: .88em;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  padding: .08em .35em;
}
.prose pre {
  background: #141414;
  color: #f3f4f6;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  font-size: .86rem;
  line-height: 1.6;
}
.prose pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }
.prose figure { margin-top: 2.4em; margin-bottom: 2.4em; }
.prose figure img { display: block; width: 100%; height: auto; background: var(--bg-mid); }
.prose figure + * { margin-top: 0; }

/* Tabulky se posouvají uvnitř vlastního kontejneru, stránku nikdy nerozšíří */
.table-wrap {
  margin-top: 2em;
  margin-bottom: 2em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 2px solid #111827;
}
.table-wrap + * { margin-top: 0; }
.table-wrap:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.prose th, .prose td {
  padding: .75rem 1rem .75rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose th {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-sec);
  /* Hlavičky se zalamují jen mezi slovy; dlouhý popis sloupce tak tabulku nerozšíří */
  white-space: normal;
  overflow-wrap: normal;
}
.prose caption {
  caption-side: bottom;
  text-align: left;
  padding-top: .7rem;
  font-size: var(--fs-note);
  color: var(--text-muted);
}

/* ============================================================
   ČLÁNEK — ZDROJE, VÝZVA
   ============================================================ */
.a-sources {
  margin-top: 4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.a-sources-title {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.a-sources ol {
  padding-left: 1.4em;
  font-size: var(--fs-note);
  line-height: var(--lh-note);
  color: var(--text-sec);
}
.a-sources li + li { margin-top: .5rem; }
.a-sources li::marker { color: var(--text-muted); }
.a-sources a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #c5c9d0;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
.a-sources a:hover { color: var(--orange-dim); text-decoration-color: var(--orange-dim); }

.a-cta {
  margin-top: 4rem;
  padding: 2.2rem 2.4rem 2.4rem;
  background: var(--bg-mid);
  border-left: 3px solid var(--orange);
}
.a-cta-title {
  font-family: 'Manrope', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: #111827;
  margin-bottom: .7rem;
  text-wrap: balance;
}
.a-cta-text {
  font-size: var(--fs-body);
  color: var(--text-sec);
  line-height: var(--lh-body);
  max-width: 520px;
  margin-bottom: 1.6rem;
}

/* ============================================================
   SOUVISEJÍCÍ ČLÁNKY
   ============================================================ */
.a-related {
  padding: 5rem 0 6rem;
  background: var(--bg-mid);
  border-top: 1px solid var(--border);
}
.a-related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  margin-bottom: 2.8rem;
}
.a-related-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: var(--lh-heading);
  color: #111827;
}

/* ============================================================
   CHYBOVÁ STRÁNKA 404
   ============================================================ */
.e-hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 9rem 0 6rem;
  background: var(--bg-mid);
  border-bottom: 3px solid var(--orange);
}
.e-hero-inner { max-width: 680px; }
.e-hero-title {
  font-family: 'Manrope', sans-serif;
  font-size: var(--fs-display);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: var(--lh-heading);
  color: #111827;
  margin-bottom: 1.4rem;
}
.e-hero-sub {
  font-size: var(--fs-perex);
  color: var(--text-sec);
  line-height: var(--lh-perex);
  margin-bottom: 2.4rem;
}
.e-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.2rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #141414;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 2.2rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.footer-logo-img { height: 24px; width: auto; display: block; opacity: .85; }
.footer-copy {
  font-size: var(--fs-note);
  color: rgba(255,255,255,0.58);
  letter-spacing: .04em;
  text-align: center;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  margin: .6rem 0 .4rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem 2rem;
  list-style: none;
}
.footer-links a {
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  transition: color .2s;
}
.footer-links--services a {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
}
.footer-links a:hover { color: var(--orange); }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1ms !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
  .nav-links { gap: 1.5rem; }
}
@media (max-width: 1100px) {
  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 1024px) {
  .a-layout.has-toc { grid-template-columns: minmax(0, var(--measure)); }
  .a-layout.has-toc .a-main { grid-row: auto; }
  .a-toc {
    grid-column: 1; grid-row: auto;
    position: static;
    margin-bottom: 2.6rem;
    border: 1px solid var(--border);
    background: var(--bg-mid);
  }
  .a-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 1rem 1.2rem;
    border-bottom: none;
    cursor: pointer;
    color: var(--text);
  }
  .a-toc summary::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--orange-dim);
  }
  .a-toc[open] summary::after { content: '−'; }
  .a-toc[open] summary { border-bottom: 1px solid var(--border); }
  .a-toc details > ol { padding: .8rem 1.2rem 1rem; }
}
@media (max-width: 960px) {
  .b-hero-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-feature.has-media { grid-template-columns: 1fr; gap: 0; }
  .b-feature.has-media .b-card-media { order: 0; margin-bottom: 1.6rem; aspect-ratio: 16 / 9; }
}
@media (max-width: 860px) {
  .b-hero  { padding: 8rem 0 3.5rem; }
  .a-head  { padding: 7.5rem 0 3rem; }
  .b-list  { padding: 3.5rem 0 5rem; }
  .a-body  { padding: 3rem 0 4rem; }
  .a-cover { margin-bottom: 3rem; }
}
@media (max-width: 640px) {
  .b-grid, .b-grid--2 { grid-template-columns: 1fr; gap: 3rem; }
  .b-feature { margin-bottom: 3.5rem; }
  .b-card-title, .b-grid--2 .b-card-title { font-size: 1.25rem; }
  .crumbs { margin-bottom: 1.8rem; }
  .crumbs [aria-current="page"] { max-width: 22ch; }
  .a-meta { gap: .9rem 1.6rem; }
  .a-cover { margin-left: -1.2rem; margin-right: -1.2rem; }
  .a-cover figcaption { padding: 0 1.2rem; }
  .prose blockquote { font-size: 1.12rem; padding-left: 1.2rem; }
  .a-cta { padding: 1.8rem 1.4rem 2rem; margin-left: -1.2rem; margin-right: -1.2rem; }
  .a-cta .btn-primary { width: 100%; padding-left: 1rem; padding-right: 1rem; }
  .a-related { padding: 4rem 0 4.5rem; }
  .footer-links { gap: .7rem 1.4rem; }
}
@media (max-width: 480px) {
  .container, .nav-inner { padding: 0 1.2rem; }
  .b-hero  { padding: 7rem 0 3rem; }
  .a-head  { padding: 6.8rem 0 2.6rem; }
  .e-hero  { padding: 7rem 0 4rem; min-height: 60vh; }
}
@media (max-width: 320px) {
  .container, .nav-inner { padding: 0 1rem; }
  .a-cover, .a-cta { margin-left: -1rem; margin-right: -1rem; }
}
@media print {
  .nav, .nav-mobile, .a-toc, .a-cta, .a-related, .footer, .skip-link { display: none !important; }
  .a-head { padding: 0 0 1.5rem; background: none; }
}
