/* ==========================================================================
   Bydlení v číslech — vlastní styl.

   Web dřív stál na Tailwindu z CDN. To znamenalo ~100 kB blokujícího
   JavaScriptu, který v prohlížeči teprve dopočítával CSS, varování v konzoli
   a hlavně vzhled, který je od pohledu poskládaný ze šablony: každý blok
   byla bílá zaoblená karta se stínem.

   Tenhle styl je psaný jako redakční sazba — text teče v jednom sloupci,
   sekce oddělují linky, čísla jsou v tabulkách. Karty zůstaly jen tam, kde
   opravdu dávají smysl: přehled klíčových údajů a reklamní plocha.
   ========================================================================== */

:root {
  --ink:        #16181d;
  --ink-soft:   #454a52;
  --ink-mute:   #767c86;
  --ink-faint:  #9aa0a8;
  --rule:       #dcdee2;
  --rule-soft:  #ececee;
  --paper:      #ffffff;
  --tint:       #f6f6f4;
  --tint-warm:  #faf7f2;
  --accent:     #a01c1c;
  --accent-dk:  #7d1515;
  --link:       #1a4b8c;
  --pos:        #1a6b45;
  --neg:        #a3272b;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --measure: 40rem;      /* šířka textového sloupce */
  --wide:    64rem;      /* šířka pro tabulky a grafy */
  --gutter:  1.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Pojistka proti vodorovnému přetečení patří jen sem. Když stejné pravidlo
     dostal i <body>, stal se z něj vlastní scrollovací kontejner a přilepená
     hlavička ani obsah profilu se neměly čeho držet – position: sticky pak
     tiše nedělalo nic. */
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
svg { height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .8rem 1.1rem;
  font-weight: 600; font-size: .9rem;
}
.skip-link:focus { left: 0; }

/* --- Typografie ---------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 700; letter-spacing: -0.018em; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; font-family: var(--sans); font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 650; }

.kicker {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .55rem;
}
.kicker--mute { color: var(--ink-mute); }

/* Zjištění na stránce pro novináře. Číslo napřed a velké, výklad pod ním —
   redakce si z toho vybírá, ne čte souvisle. */
.novinari-zjisteni {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.8rem 2.4rem;
}
.zjisteni { border-top: 2px solid var(--ink); padding: .9rem 0 0; }
.zjisteni__cislo {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 .5rem;
  color: var(--accent);
}
.zjisteni__text { margin: 0; line-height: 1.6; font-size: .95rem; }

/* Našeptávač obcí. Vlastní, protože <datalist> se na iOS Safari
   nezobrazuje a uživatel na mobilu žádnou nabídku neviděl. */
.naseptavac-obal { display: block; position: relative; }

.naseptavac {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: 100%;
  margin: .2rem 0 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(22, 24, 29, .12);
  max-height: 15rem;
  overflow-y: auto;
}
.naseptavac__polozka {
  display: block;
  width: 100%;
  text-align: left;
  padding: .6rem .7rem;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  background: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.naseptavac__polozka:last-child { border-bottom: 0; }
.naseptavac__polozka:hover,
.naseptavac__polozka.je-aktivni { background: var(--tint); color: var(--accent); }

/* Hláška, když se název obce netrefí. */
.uvod__form .chyba-obec { grid-column: 1 / -1; margin: 0; }

.chyba-obec {
  margin: .5rem 0 0;
  padding: .6rem .8rem;
  border-left: 3px solid var(--accent);
  background: var(--tint);
  font-size: .88rem;
  line-height: 1.5;
}
.chyba-obec button {
  border: 0; background: none; padding: 0; font: inherit;
  color: var(--accent); text-decoration: underline; cursor: pointer;
}

/* Dekodér inzerátu. Výsledek je řada řádků, kde každý odpovídá na jednu
   otázku, kterou inzerát nezodpoví. Barevný proužek vlevo nese sdělení:
   šedá je konstatování, jantarová „na tohle se zeptejte“, červená
   „tady si dejte pozor“. */
.dekoder__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: .9rem;
  align-items: end;
  max-width: 60rem;
}
.dekoder__form label { display: block; min-width: 0; }
.dekoder__form label span {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin: 0 0 .3rem;
}
.dekoder__form input,
.dekoder__form select {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
.dekoder__hint {
  margin: .9rem 0 0;
  font-size: .82rem;
  color: var(--ink-mute);
  max-width: 42rem;
}
.dekoder__out { margin: 2rem 0 0; }
.dekoder__h {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  line-height: 1.25;
  margin: .3rem 0 1.2rem;
}
.dek-radek {
  border-left: 3px solid var(--rule);
  padding: .1rem 0 .1rem 1rem;
  margin: 0 0 1.1rem;
}
.dek-radek--dobre     { border-left-color: #1a6b45; }
.dek-radek--pozor     { border-left-color: #b8860b; }
.dek-radek--varovani  { border-left-color: var(--accent); }
.dek-radek__label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 .2rem;
}
.dek-radek__hodnota { font-size: 1.02rem; line-height: 1.5; }
.dek-radek__hodnota strong { font-size: 1.12rem; }
.dek-radek__pozn {
  font-size: .87rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: .3rem 0 0;
}
.dek-delta { color: var(--ink-mute); font-size: .9rem; }
.dek-overit {
  border-top: 1px solid var(--rule);
  margin: 1.6rem 0 0;
  padding: 1.1rem 0 0;
}
.dek-overit h3 { font-size: .95rem; margin: 0 0 .6rem; }
.dek-overit ul { margin: 0; padding-left: 1.1rem; }
.dek-overit li { line-height: 1.6; margin: 0 0 .5rem; font-size: .92rem; }

/* Vstupní blok hlavní strany.
   Web byl encyklopedie: ptal se „která obec vás zajímá“ a odpovídal
   průměrem. Tohle otáčí vstupní bod — nejdřív se zeptáme na člověka
   a teprve pak ukazujeme data, která pro něj platí. */
.uvod {
  border-bottom: 2px solid var(--ink);
  padding: 0 0 2rem;
  margin: 0 0 2.2rem;
}
.hero__h {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.15;
  margin: .3rem 0 .7rem;
}
.uvod__h {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  margin: .3rem 0 .7rem;
}
.uvod__lead {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 0 1.4rem;
}
/* Co člověk dostane výměnou za vyplnění. Na mobilu je formulář to první,
   co je vidět, a bez tohohle vypadal jako výslech. */
.uvod__co {
  margin: 0 0 1.4rem;
  padding: .9rem 1rem;
  background: var(--tint);
  border-left: 3px solid var(--accent);
}
.uvod__co-h {
  margin: 0 0 .5rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.uvod__co-list {
  margin: 0;
  padding: 0 0 0 1.05rem;
  font-size: .95rem;
  line-height: 1.6;
}
.uvod__co-list li { margin: 0 0 .2rem; }
.uvod__co-list li:last-child { margin: 0; }

.uvod__form-h {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
}
.uvod__form label span.uvod__napoveda {
  display: block;
  margin: .3rem 0 0;
  font-size: .78rem;
  font-weight: 400;
  color: var(--ink-mute);
}

.uvod__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .9rem;
  align-items: end;
  max-width: 56rem;
}
.uvod__form label { display: block; min-width: 0; }
.uvod__form label span {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin: 0 0 .3rem;
}
.uvod__form input {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
.uvod__form input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.uvod__skip {
  margin: 1rem 0 0;
  font-size: .85rem;
  color: var(--ink-mute);
}
.osobni__h {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  line-height: 1.2;
  margin: .3rem 0 .6rem;
}
.osobni__lead {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
  max-width: 42rem;
}
.osobni__edit {
  margin: 1rem 0 0;
  font-size: .82rem;
  display: flex;
  gap: 1.2rem;
}

/* Obsah profilu obce. Profil má patnáct sekcí a bez rozcestníku nahoře
   se ke školám nebo k dojížďce nikdo neproroluje. */
/* Obsah profilu obce.

   Profil má patnáct sekcí. Dokud nav jen stál pod hlavičkou a odscroloval
   pryč, byl k ničemu přesně ve chvíli, kdy ho člověk potřebuje. Teď zůstává
   pod hlavičkou a zvýrazňuje sekci, ve které právě jste.

   Na mobilu se nesmí zalomit do tří řádků – hlavička sama zabírá 94 px –,
   proto je to jednořádkový posuvný pruh jako hlavní navigace. */
.profil-nav {
  display: flex;
  gap: .1rem;
  margin: 1.6rem 0 0;
  padding: .15rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: .86rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--paper);
  position: sticky;
  top: var(--masthead-h, 3.75rem);
  z-index: 30;
}
.profil-nav::-webkit-scrollbar { display: none; }
.profil-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  padding: .45rem .6rem;
  border-bottom: 2px solid transparent;
}
.profil-nav a:hover,
.profil-nav a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.profil-nav a[aria-current="true"] {
  color: var(--ink);
  font-weight: 650;
  border-bottom-color: var(--ink);
}

/* Odsazení kotev tak, aby nadpis sekce neskončil pod oběma lištami. */
.kotva { scroll-margin-top: calc(var(--sticky-h, 9rem) + .8rem); }

.standfirst {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.4vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 1rem 0 0;
}

.dateline {
  font-size: .82rem;
  color: var(--ink-mute);
  margin: 1.35rem 0 0;
  padding-top: .85rem;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: baseline;
}
.dateline .sep { color: var(--ink-faint); }

.prose { max-width: var(--measure); }
.prose p { font-size: 1.03rem; line-height: 1.7; color: var(--ink-soft); }
.prose h3 { margin: 2rem 0 .6rem; }
.prose a { border-bottom: 1px solid rgba(26,75,140,.3); }

.note {
  font-size: .84rem;
  line-height: 1.6;
  color: var(--ink-mute);
}

.tabnum { font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* --- Rozvržení ----------------------------------------------------------- */

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--full { max-width: 76rem; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; padding: 2rem 0 3.5rem; }

section + section,
.block + .block {
  margin-top: 2.6rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--rule);
}
.block--plain + .block--plain { border-top: 0; padding-top: 0; margin-top: 1.6rem; }

.section-head { margin-bottom: 1.4rem; }
.section-head p { margin: .4rem 0 0; font-size: .9rem; color: var(--ink-mute); }

/* --- Hlavička a patička -------------------------------------------------- */

.masthead {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
}
.masthead__inner {
  max-width: 76rem; margin: 0 auto; padding: .5rem var(--gutter);
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
@media (min-width: 700px) {
  .masthead__inner { flex-direction: row; justify-content: space-between; gap: 1rem; height: 3.6rem; padding: 0 var(--gutter); }
}
.logo {
  font-family: var(--serif); font-weight: 700; font-size: 1.22rem;
  color: var(--ink); letter-spacing: -.02em; white-space: nowrap; text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--accent); }
.logo em { font-style: normal; color: var(--accent); }

/* Vodorovně posuvná navigace.

   min-width: 0 tu není kosmetika: jako flex položka se nav bez něj odmítá
   zmenšit pod šířku svého obsahu, takže overflow-x nemá co odříznout a celá
   stránka na mobilu přeteče. Projevilo se to až s osmou položkou v menu. */
.nav {
  display: flex;
  gap: .1rem;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  min-width: 0;
}
@media (max-width: 699px) {
  .nav { width: 100%; align-self: stretch; }
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: .87rem; font-weight: 550; color: var(--ink-soft);
  padding: .45rem .6rem; white-space: nowrap; text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.colophon {
  margin-top: 3rem; padding: 2.4rem 0 2.8rem;
  background: var(--ink); color: #b9bdc4; font-size: .86rem;
}
.colophon a { color: #e6e8eb; }
.colophon__top {
  display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: space-between;
  padding-bottom: 1.5rem; border-bottom: 1px solid #2c3038;
}
.colophon__brand { font-family: var(--serif); font-size: 1.1rem; color: #fff; font-weight: 600; }
.colophon nav { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.colophon__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  padding-top: 1.3rem; font-size: .8rem; color: #868c95;
}
.colophon__legal { margin-top: 1.1rem; font-size: .78rem; line-height: 1.6; color: #6d737b; max-width: 58rem; }

/* --- Drobečky ------------------------------------------------------------ */

.crumbs {
  font-size: .8rem; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: .3rem .45rem; align-items: center;
  margin-bottom: 1.5rem;
}
.crumbs a { color: var(--ink-mute); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--ink-faint); }
.crumbs strong { color: var(--ink); font-weight: 600; }

/* --- Přehled klíčových čísel (jediné místo, kde má karta smysl) ---------- */

.keyfacts {
  display: grid; gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--rule);
  background: var(--tint);
  margin: 1.9rem 0 0;
}
.keyfacts > div {
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.keyfacts > div:nth-child(2n) { border-right: 0; }
.keyfacts > div:nth-last-child(-n+2) { border-bottom: 0; }
.keyfacts dt {
  font-size: .74rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .3rem;
}
.keyfacts dd {
  margin: 0; font-family: var(--serif); font-size: 1.6rem; font-weight: 650;
  line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink);
}
.keyfacts dd span { font-family: var(--sans); font-size: .8rem; font-weight: 500; color: var(--ink-mute); }
.keyfacts .sub { font-size: .78rem; color: var(--ink-mute); margin-top: .3rem; line-height: 1.4; }

@media (min-width: 620px) {
  .keyfacts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .keyfacts > div:nth-child(2n) { border-right: 1px solid var(--rule); }
  .keyfacts > div:nth-child(4n) { border-right: 0; }
  .keyfacts > div:nth-last-child(-n+4) { border-bottom: 0; }
}

/* --- Tabulky ------------------------------------------------------------- */

.table-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }

table.data {
  width: 100%; border-collapse: collapse;
  font-size: .92rem; font-variant-numeric: tabular-nums;
}
table.data caption { text-align: left; font-size: .84rem; color: var(--ink-mute); padding-bottom: .6rem; }
table.data th, table.data td { padding: .58rem .7rem; text-align: left; }
table.data th:first-child, table.data td:first-child { padding-left: 0; }
table.data th:last-child, table.data td:last-child { padding-right: 0; }
table.data thead th {
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-mute); border-bottom: 1.5px solid var(--ink); padding-bottom: .5rem;
  white-space: nowrap;
}
table.data tbody tr { border-bottom: 1px solid var(--rule-soft); }
table.data tbody tr:hover { background: var(--tint); }
table.data tbody th { font-weight: 600; color: var(--ink); }
table.data .num { text-align: right; white-space: nowrap; }
table.data thead .num { text-align: right; }
table.data .strong { font-weight: 650; color: var(--ink); }
table.data .mute { color: var(--ink-mute); font-weight: 450; }
table.data tr.is-highlight { background: var(--tint-warm); }

/* Řazení sloupců v tabulkách */
.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: color .12s ease;
}
.sortable-th:hover {
  color: var(--accent);
}
.sort-indicator {
  display: inline-block;
  margin-left: .25rem;
  font-size: .7rem;
  color: var(--ink-mute);
  opacity: .5;
}
.sortable-th.is-sorted {
  color: var(--ink);
}
.sortable-th.is-sorted .sort-indicator {
  opacity: 1;
  color: var(--accent);
}

/* --- Poznámka / zvýrazněný odstavec ------------------------------------- */

.callout {
  border-left: 3px solid var(--accent);
  padding: .2rem 0 .2rem 1.15rem;
  margin: 1.8rem 0;
  max-width: var(--measure);
}
.callout h3 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .45rem; }
.callout p { font-family: var(--serif); font-size: 1.06rem; line-height: 1.62; color: var(--ink); margin: 0; }

.sourcebox {
  background: var(--tint); border: 1px solid var(--rule);
  padding: 1.15rem 1.25rem; font-size: .84rem; line-height: 1.6; color: var(--ink-soft);
}
.sourcebox h2 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: .7rem; }
.sourcebox dl { display: grid; gap: .45rem 1.6rem; margin: 0 0 .8rem; }
.sourcebox dt { font-weight: 650; color: var(--ink); }
.sourcebox dd { margin: 0 0 .5rem; }
@media (min-width: 700px) {
  .sourcebox dl { grid-template-columns: 1fr 1fr; }
  .sourcebox dd { margin-bottom: 0; }
}

/* --- Štítky (bez emoji) -------------------------------------------------- */

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag {
  font-size: .76rem; font-weight: 600; letter-spacing: .01em;
  padding: .2rem .55rem; border: 1px solid var(--rule); color: var(--ink-soft);
  background: var(--paper); white-space: nowrap;
}
.tag--accent { border-color: rgba(160,28,28,.35); color: var(--accent); background: #fdf6f6; }
.tag--pos { border-color: rgba(26,107,69,.35); color: var(--pos); background: #f2f8f5; }
.tag--neg { border-color: rgba(163,39,43,.3); color: var(--neg); background: #fdf5f5; }

.rating { display: inline-flex; align-items: baseline; gap: .45rem; font-size: .88rem; }
.rating__dot { width: .62rem; height: .62rem; border-radius: 50%; flex: none; align-self: center; }
.rating--dostupne  .rating__dot { background: var(--pos); }
.rating--prumerne  .rating__dot { background: #b8860b; }
.rating--nakladne  .rating__dot { background: var(--neg); }

/* --- Srovnávací pruhy ---------------------------------------------------- */

.compare { display: grid; gap: 1.5rem 2.4rem; grid-template-columns: minmax(0, 1fr); }
.compare > * { min-width: 0; }
@media (min-width: 700px) { .compare { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
.compare__row { border-bottom: 1px solid var(--rule-soft); padding-bottom: 1rem; }
.compare__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.compare__label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.compare__value { font-family: var(--serif); font-size: 1.16rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare__track { position: relative; height: .45rem; background: var(--rule-soft); }
.compare__bar { height: 100%; background: var(--ink-soft); }
.compare__bar.is-better { background: var(--pos); }
.compare__bar.is-worse { background: #b8860b; }
.compare__mid { position: absolute; top: -.2rem; bottom: -.2rem; left: 50%; width: 1px; background: var(--ink-faint); }
.compare__foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: .45rem; font-size: .8rem; color: var(--ink-mute); }

/* --- Hlavní fotka obce --------------------------------------------------- */

.cityphoto { margin: 1.6rem 0 0; }
.cityphoto__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  max-height: 22rem; overflow: hidden; background: var(--tint);
  border: 1px solid var(--rule);
}
.cityphoto__frame img,
.cityphoto__frame svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cityphoto figcaption {
  display: flex; flex-wrap: wrap; gap: .2rem .8rem; justify-content: space-between;
  font-size: .78rem; color: var(--ink-mute); margin-top: .45rem;
}
.cityphoto figcaption a { color: var(--ink-mute); text-decoration: underline; text-underline-offset: 2px; }
.cityphoto figcaption a:hover { color: var(--ink); }
.cityphoto__credit { text-align: right; }

/* --- Obrázky a grafy ----------------------------------------------------- */

figure { margin: 0; }
figure.chart { margin: 1.4rem 0 0; }
figure.chart svg { display: block; width: 100%; }
figcaption { font-size: .82rem; line-height: 1.55; color: var(--ink-mute); margin-top: .7rem; }

.chart-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .8rem; color: var(--ink-soft); margin-top: .2rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-legend i { width: 1.1rem; height: 0; border-top-width: 2px; border-top-style: solid; display: inline-block; }

/* --- Tlačítka a odkazy --------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: var(--sans); font-size: .88rem; font-weight: 600;
  padding: .62rem 1.05rem; border: 1px solid var(--ink); cursor: pointer;
  background: var(--ink); color: #fff; text-decoration: none; transition: background .12s, color .12s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

.linklist { display: grid; gap: .1rem; grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr)); }
.linklist > * { min-width: 0; }
.linklist a {
  display: block; padding: .6rem .1rem; font-size: .88rem; color: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
}
.linklist a:hover { color: var(--accent); text-decoration: none; }
.linklist .meta { display: block; font-size: .78rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* --- Formuláře ----------------------------------------------------------- */

label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .3rem; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="search"], select {
  width: 100%; font: inherit; font-size: .92rem; padding: .5rem .65rem;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 0;
}
input:focus, select:focus { outline: 2px solid var(--link); outline-offset: -1px; border-color: var(--link); }
input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.field + .field { margin-top: .9rem; }
.field-row { display: grid; gap: .9rem; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }
.consent { display: flex; gap: .55rem; align-items: flex-start; font-size: .8rem; color: var(--ink-mute); }
.consent label { font-weight: 400; font-size: .8rem; color: var(--ink-mute); margin: 0; }
.consent input { margin-top: .25rem; accent-color: var(--accent); }
.form-error { color: var(--neg); font-size: .82rem; font-weight: 600; }

/* --- Postranní sloupec a konverzní bloky --------------------------------- */

.layout-split { display: grid; gap: 2.4rem; grid-template-columns: minmax(0, 1fr); }
.layout-split > * { min-width: 0; }
@media (min-width: 900px) { .layout-split { grid-template-columns: minmax(0,1fr) 19rem; gap: 3rem; } }

.aside-box { border: 1px solid var(--rule); padding: 1.15rem; }
.aside-box + .aside-box { margin-top: 1.4rem; }
.aside-box h2, .aside-box h3 { font-family: var(--sans); font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
.aside-box p { font-size: .85rem; color: var(--ink-soft); }
.aside-box--dark { background: var(--ink); border-color: var(--ink); color: #d3d6da; }
.aside-box--dark h2, .aside-box--dark h3 { color: #fff; }
.aside-box--dark p { color: #b0b5bc; }
.aside-box--dark .btn { background: #fff; color: var(--ink); border-color: #fff; }
.aside-box--dark .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.stat-line { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-bottom: 1px solid var(--rule-soft); font-size: .88rem; }
.stat-line:last-of-type { border-bottom: 0; }
.stat-line dt { color: var(--ink-mute); }
.stat-line dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- FAQ ----------------------------------------------------------------- */

.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--rule); padding: .95rem 0; }
.faq summary {
  font-family: var(--serif); font-size: 1.06rem; font-weight: 600; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 1.15rem; color: var(--ink-mute); flex: none; line-height: 1.2; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .7rem 0 0; font-size: .95rem; color: var(--ink-soft); }

/* --- Reklama ------------------------------------------------------------- */

.ad { margin: 2.4rem 0; text-align: center; }
.ad__label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .5rem; }
.ad-leaderboard { display: inline-block; width: 320px; height: 100px; }
@media (min-width: 500px) { .ad-leaderboard { width: 468px; height: 60px; } }
@media (min-width: 820px) { .ad-leaderboard { width: 728px; height: 90px; } }
.ad-rectangle { display: inline-block; width: 300px; height: 250px; }

/* --- Modální okna -------------------------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 60; background: rgba(22,24,29,.55); overflow-y: auto; }
.modal[hidden] { display: none; }
.modal__inner { min-height: 100%; display: flex; align-items: flex-start; justify-content: center; padding: 1.5rem 1rem 3rem; }
.modal__panel { background: var(--paper); border: 1px solid var(--rule); max-width: 33rem; width: 100%; padding: 1.6rem; position: relative; }
@media (min-width: 640px) { .modal__inner { align-items: center; } .modal__panel { padding: 2rem; } }
.modal__close {
  position: absolute; top: .8rem; right: .8rem; width: 2rem; height: 2rem;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-mute);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.modal__close:hover { background: var(--tint); color: var(--ink); }
.modal h2 { margin-bottom: .5rem; padding-right: 2.2rem; }
.calcbox { background: var(--tint); border: 1px solid var(--rule); padding: 1rem; margin: 1.1rem 0; }
.calcbox .field + .field { margin-top: .8rem; }
.calc-out { border-top: 1px solid var(--rule); margin-top: .9rem; padding-top: .7rem; }

/* --- Mapa ---------------------------------------------------------------- */

.mapwrap { display: grid; gap: 0; border: 1px solid var(--rule); grid-template-columns: minmax(0, 1fr); }
.mapwrap > * { min-width: 0; }
@media (min-width: 960px) { .mapwrap { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); } }
.mapcanvas { position: relative; background: var(--tint); padding: .75rem; min-width: 0; }
.mapcanvas__stage { position: relative; height: 300px; overflow: hidden; }
@media (min-width: 620px) { .mapcanvas__stage { height: 400px; } }
@media (min-width: 960px) { .mapcanvas__stage { height: 470px; } }
#svg-czech-map { width: 100%; height: 100%; cursor: grab; touch-action: none; }

/* Postupné odkrývání podle přiblížení mapy */
#map-cities-layer .pin {
  display: none;
  stroke: #fff;
  stroke-width: var(--pin-stroke, .7px);
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--pin-scale, 1));
  transition: stroke-width .12s ease;
}
#map-cities-layer .pin:hover, #map-cities-layer .pin:focus {
  stroke: var(--ink);
  stroke-width: calc(var(--pin-stroke, .7px) * 2.5);
  outline: none;
}
#map-cities-layer .pin.is-active {
  stroke: var(--ink);
  stroke-width: calc(var(--pin-stroke, .7px) * 2.5);
  display: inline !important;
}

#map-cities-layer .pin-label {
  display: none;
  text-anchor: middle;
  font-size: var(--label-size, 9px);
  font-weight: 700;
  fill: var(--ink);
  pointer-events: none;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 2.2px;
  stroke-linejoin: round;
}
#map-cities-layer .pin-label.is-active {
  display: inline !important;
}

/* Stupně přiblížení (zoom-lvl-1 až 5).
   Selektor musí obsahovat #map-cities-layer, jinak ho přebije pravidlo
   "#map-cities-layer .pin { display: none }" – ID váží víc než dvě třídy
   a na mapě by pak nebyla vidět ani jedna tečka. Třída zoom-lvl-* sedí
   na stejném elementu jako to ID, proto se píše bez mezery. */
#map-cities-layer.zoom-lvl-1 .pin--t1 { display: inline; }
#map-cities-layer.zoom-lvl-1 .label--t1 { display: inline; }

#map-cities-layer.zoom-lvl-2 .pin--t1,
#map-cities-layer.zoom-lvl-2 .pin--t2 { display: inline; }
#map-cities-layer.zoom-lvl-2 .label--t1 { display: inline; }

#map-cities-layer.zoom-lvl-3 .pin--t1,
#map-cities-layer.zoom-lvl-3 .pin--t2,
#map-cities-layer.zoom-lvl-3 .pin--t3 { display: inline; }
#map-cities-layer.zoom-lvl-3 .label--t1,
#map-cities-layer.zoom-lvl-3 .label--t2 { display: inline; }

#map-cities-layer.zoom-lvl-4 .pin--t1,
#map-cities-layer.zoom-lvl-4 .pin--t2,
#map-cities-layer.zoom-lvl-4 .pin--t3,
#map-cities-layer.zoom-lvl-4 .pin--t4 { display: inline; }
#map-cities-layer.zoom-lvl-4 .label--t1,
#map-cities-layer.zoom-lvl-4 .label--t2,
#map-cities-layer.zoom-lvl-4 .label--t3 { display: inline; }

#map-cities-layer.zoom-lvl-5 .pin { display: inline; }
#map-cities-layer.zoom-lvl-5 .label--t1,
#map-cities-layer.zoom-lvl-5 .label--t2,
#map-cities-layer.zoom-lvl-5 .label--t3 { display: inline; }

#map-active-pulse {
  transform-box: fill-box;
  transform-origin: center;
}
#map-active-pulse circle {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--pin-scale, 1));
}

/* Vlastní HTML tooltip */
.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  padding: .4rem .7rem;
  font-size: .78rem;
  line-height: 1.35;
  z-index: 20;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap;
}
.map-tooltip strong { display: block; font-size: .84rem; font-weight: 700; color: var(--ink); }
.map-tooltip .meta { color: var(--ink-mute); font-size: .74rem; }

.mapzoom { position: absolute; right: .5rem; top: .5rem; display: flex; flex-direction: column; gap: .25rem; z-index: 5; }
.mapzoom button {
  width: 1.9rem; height: 1.9rem; border: 1px solid var(--rule); background: rgba(255,255,255,.95);
  color: var(--ink-soft); font-size: 1rem; line-height: 1; cursor: pointer;
}
.mapzoom button:hover { background: #fff; color: var(--ink); }
.mapinfo { padding: 1.5rem; border-top: 1px solid var(--rule); min-width: 0; }
@media (min-width: 960px) { .mapinfo { border-top: 0; border-left: 1px solid var(--rule); } }
.maplegend {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--ink-mute); margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--rule-soft);
}
.maplegend__items { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.maplegend__items i { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; margin-right: .3rem; }
.maplegend__count { font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.maptools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.maptools > * { min-width: 0; }
.segmented { display: inline-flex; border: 1px solid var(--rule); }
.segmented button {
  font: inherit; font-size: .84rem; font-weight: 600; padding: .42rem .8rem;
  background: var(--paper); border: 0; color: var(--ink-mute); cursor: pointer; white-space: nowrap;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* --- Přehledová mřížka (hlavní strana) ---------------------------------- */

.findings { display: grid; gap: 0; border-top: 1px solid var(--rule); grid-template-columns: minmax(0, 1fr); }
.findings > * { min-width: 0; }
@media (min-width: 640px) { .findings { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1000px) { .findings { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.findings a {
  display: block; padding: 1.2rem 0; border-bottom: 1px solid var(--rule); color: var(--ink);
}
@media (min-width: 640px) {
  .findings a { padding: 1.2rem 1.3rem; border-right: 1px solid var(--rule); }
  .findings a:first-child { padding-left: 0; }
  .findings a:last-child { border-right: 0; padding-right: 0; }
}
.findings a:hover { text-decoration: none; background: var(--tint); }
.findings h3 { font-size: 1.02rem; margin: .35rem 0 .4rem; }
.findings a:hover h3 { color: var(--accent); }
.findings p { font-size: .84rem; color: var(--ink-mute); line-height: 1.55; margin: 0; }

.hero { max-width: 46rem; padding: 1rem 0 0; }
.hero h1 { font-size: clamp(2.1rem, 6.5vw, 3.5rem); }
.hero .standfirst { max-width: 38rem; }
.headline-stats {
  display: flex; flex-wrap: wrap; gap: 1.1rem 2.2rem; margin-top: 1.7rem;
  padding-top: 1.2rem; border-top: 1px solid var(--rule);
}
.headline-stats div { min-width: 0; }
.headline-stats dt { font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-mute); }
.headline-stats dd {
  margin: .18rem 0 0; font-family: var(--serif); font-size: 1.32rem; font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* --- Duel / srovnávač ---------------------------------------------------- */

.versus { display: grid; gap: 1.6rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .versus { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2.6rem; } }
.versus__col { min-width: 0; }
.versus__col h2 { font-size: 1.4rem; }
.versus__col--a { border-top: 3px solid var(--ink); padding-top: .9rem; }
.versus__col--b { border-top: 3px solid var(--accent); padding-top: .9rem; }
.versus__col--b h2 { color: var(--accent); }
.verdict {
  font-family: var(--serif); font-size: 1.06rem; line-height: 1.6; color: var(--ink);
  background: var(--tint-warm); border-left: 3px solid var(--accent); padding: 1rem 1.2rem; margin-top: 1.8rem;
}

.picker { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.picker .field { margin: 0; min-width: 10rem; flex: 1 1 10rem; }

/* --- Sekce Analýzy ------------------------------------------------------- */
.analyses-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 680px) {
  .analyses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1040px) {
  .analyses-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.article-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.article-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.article-card h2, .article-card h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.35;
  margin: .4rem 0 .7rem;
  color: var(--ink);
}
.article-card:hover h2, .article-card:hover h3 {
  color: var(--accent);
}
.article-card p {
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 1.2rem;
  flex-grow: 1;
}
.article-card .stat-pill {
  display: inline-block;
  background: var(--tint-warm);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .55rem;
  margin-bottom: .8rem;
  align-self: flex-start;
}
.article-card .meta {
  font-size: .78rem;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule-soft);
  padding-top: .6rem;
}

/* Detail článku */
.article-prose {
  max-width: var(--measure);
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink);
  margin-top: 2rem;
}
.article-prose p {
  margin: 1.1rem 0;
}
.article-prose h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 2.2rem 0 .9rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule-soft);
}
.article-prose h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.article-prose .table-scroll {
  margin: 1.6rem 0;
}

/* --- Průvodce Kde bydlet ------------------------------------------------ */

.guide-page {
  padding-bottom: 3rem;
}

.guide-hero {
  margin-bottom: 2rem;
}

.guide-form-card {
  border: 1px solid var(--rule);
  background: var(--tint);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}
@media (max-width: 36rem) {
  .guide-form-card {
    padding: 1.1rem 1rem;
  }
}

.guide-form-header {
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.9rem;
}
.guide-form-header h2 {
  font-size: 1.35rem;
  margin: 0 0 0.3rem;
}
.guide-form-header p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
@media (min-width: 44rem) {
  .guide-grid {
    grid-template-columns: 1fr 1fr;
  }
  .guide-field--wide {
    grid-column: span 2;
  }
}

.guide-field {
  display: flex;
  flex-direction: column;
}

.guide-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.guide-input, .guide-select {
  width: 100%;
  max-width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.6rem 0.8rem;
  border-radius: 2px;
  box-sizing: border-box;
}
.guide-input:focus, .guide-select:focus {
  border-color: var(--ink);
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

.guide-input-affix {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.guide-input-affix .guide-input {
  padding-right: 5rem;
}
.guide-affix {
  position: absolute;
  right: 0.8rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
  pointer-events: none;
}

.guide-segmented {
  display: flex;
  border: 1px solid var(--rule);
  background: #ececee;
  border-radius: 2px;
  overflow: hidden;
}
.guide-seg-option {
  flex: 1;
  text-align: center;
  margin: 0;
  cursor: pointer;
}
.guide-seg-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.guide-seg-option span {
  display: block;
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background .1s ease, color .1s ease;
}
.guide-seg-option input:checked + span {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.guide-autocomplete-wrap {
  position: relative;
  width: 100%;
}
.guide-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--paper);
  border: 1px solid var(--rule);
  max-height: 18rem;
  overflow-y: auto;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  margin-top: 2px;
}
.guide-autocomplete-item {
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--rule-soft);
}
.guide-autocomplete-item:last-child {
  border-bottom: none;
}
.guide-autocomplete-item:hover {
  background: var(--tint);
}
.guide-autocomplete-dist {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-left: 0.3rem;
}
.guide-autocomplete-empty {
  padding: 0.8rem;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

.guide-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.5rem;
}
.guide-quick-label {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-right: 0.2rem;
}
.guide-pill {
  background: var(--paper);
  border: 1px solid var(--rule);
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--sans);
}
.guide-pill:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.guide-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 0.2rem;
}
.guide-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
}
.guide-checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.guide-privacy {
  margin-top: 1.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule-soft);
}
.guide-privacy p {
  font-size: 0.8rem;
  color: var(--ink-mute);
  line-height: 1.45;
  margin: 0;
}

.guide-results {
  margin-top: 2.5rem;
}

.guide-results-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 1.5rem;
}
.guide-results-title {
  font-size: 1.45rem;
  margin: 0;
}
.guide-results-sub {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0.25rem 0 0;
}
/* Nejdelší položka („Nejlepší shody s vaším zadáním“) určuje vnitřní šířku
   selectu. Jako flex položka se bez min-width: 0 nesmrskne, takže na úzkém
   displeji roztahovala celou stránku. Dokud měl <body> overflow-x: hidden,
   bylo to jen oříznuté a nebylo to vidět. */
.guide-sort-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.guide-sort-label {
  color: var(--ink-mute);
  white-space: nowrap;
}
.guide-select--compact {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  width: auto;
  min-width: 0;
  max-width: 100%;
}

.guide-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.guide-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: border-color .15s ease;
}
@media (max-width: 36rem) {
  .guide-card {
    padding: 1.1rem 1rem;
  }
}
.guide-card:hover {
  border-color: var(--ink-soft);
}

.guide-card__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.85rem;
}
.guide-card__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.guide-card__title:hover {
  color: var(--accent);
  text-decoration: underline;
}
.guide-card__subtitle {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 0.2rem 0 0;
}
.guide-card__badge {
  background: var(--tint-warm);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  align-self: flex-start;
}
.guide-card__badge--target {
  background: #e8f3ec;
  color: var(--pos);
}

.guide-card__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.guide-card__sec-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  margin: 0 0 0.6rem;
}

.guide-card__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
  gap: 0.8rem 1.2rem;
}

.guide-stat {
  display: flex;
  flex-direction: column;
}
.guide-stat__label {
  font-size: 0.75rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}
.guide-stat__val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.guide-stat__val--text {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-soft);
}
.guide-stat__sub {
  font-size: 0.76rem;
  color: var(--ink-mute);
  margin-top: 0.1rem;
}

.guide-card__drawback {
  background: #fdf5f5;
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  margin-top: 0.2rem;
}
.guide-drawback__label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.guide-drawback__text {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.45;
}

.guide-card__footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule-soft);
}

.guide-empty {
  border: 1px dashed var(--rule);
  background: var(--tint);
  padding: 2rem;
  border-radius: 2px;
}
@media (max-width: 36rem) {
  .guide-empty {
    padding: 1.2rem 1rem;
  }
}
.guide-empty__inner {
  max-width: 44rem;
}
.guide-empty h3 {
  font-size: 1.25rem;
  margin: 0 0 0.6rem;
  color: var(--accent);
}
.guide-empty__desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.guide-breakdown-list {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.5;
}
.guide-breakdown-list li {
  margin-bottom: 0.35rem;
}
.guide-empty__actions {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: 1rem 1.2rem;
  border-radius: 2px;
  font-size: 0.88rem;
}
.guide-empty__actions strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.guide-empty__actions ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.guide-empty__actions li {
  margin-bottom: 0.25rem;
}

/* --- Utility ------------------------------------------------------------- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
.stack > * + * { margin-top: 1.1rem; }
.mt0 { margin-top: 0; }

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

/* ==========================================================================
   Živý srovnávač obcí (/porovnat/)

   Dvousloupcové srovnání musí být čitelné i na 360 px. Popisek metriky proto
   nesedí vedle hodnot, ale nad nimi přes celou šířku — obě hodnoty tak mají
   i na úzkém displeji polovinu místa a nezalamují se po slabikách.
   ========================================================================== */
.cmp-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
  align-items: end;
  margin: 1.6rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--rule);
}
.cmp-picker__field { display: block; min-width: 0; }
.cmp-picker__field > span {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin: 0 0 .3rem;
}
.cmp-picker__field input {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
.cmp-picker__field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.cmp-swap {
  justify-self: start;
  padding: .5rem .9rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.cmp-swap:hover { border-color: var(--accent); color: var(--accent); }

.cmp-hint { margin: .7rem 0 0; font-size: .85rem; color: var(--ink-mute); }

/* Hlavičky obou obcí drží stejné dělení jako buňky níž, aby čísla seděla
   pod správným názvem. */
.cmp-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  padding: 0 0 .9rem;
  border-bottom: 2px solid var(--ink);
}
.cmp-head__name {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  line-height: 1.15;
  margin: 0;
}
.cmp-head__name a { color: inherit; text-decoration: none; }
.cmp-head__name a:hover { color: var(--accent); text-decoration: underline; }
.cmp-head__place {
  margin: .2rem 0 0;
  font-size: .78rem;
  color: var(--ink-mute);
}

.cmp-group { margin: 1.8rem 0 0; }
.cmp-group__h {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 .2rem;
}

.cmp-row { padding: .85rem 0; border-bottom: 1px solid var(--rule-soft); }
.cmp-row__label {
  margin: 0 0 .5rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.cmp-row__cells {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.cmp-cell { min-width: 0; }
.cmp-cell__val {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.cmp-cell__val--none { color: var(--ink-mute); font-style: italic; }
.cmp-cell__note {
  margin: .3rem 0 0;
  font-size: .74rem;
  line-height: 1.35;
  color: var(--ink-mute);
}
.cmp-cell__note strong { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.cmp-bar {
  margin: .4rem 0 0;
  height: 4px;
  background: var(--rule-soft);
  border-radius: 2px;
  overflow: hidden;
}
.cmp-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

@media (min-width: 40rem) {
  .cmp-picker {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
  }
  .cmp-swap { justify-self: center; margin-bottom: .1rem; }
  .cmp-row {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: baseline;
  }
  .cmp-row__label { margin: 0; }
  /* Hlavička si drží dva stejné sloupce a jen se odsadí o šířku popisků,
     aby názvy obcí seděly přesně nad svými hodnotami. */
  .cmp-head { margin-left: calc(13rem + 1.4rem); }
}

@media print {
  .masthead, .nav, .ad, .modal, .aside-box, .mapzoom { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
}
