/* ============================================================
   Bytovačka — statické obsahové stránky (/vzory, /navody, /srovnani)
   Editorial „právní knihovna": papírové pozadí, indigový brand,
   Fraunces (display) + Source Sans 3 (text).
   Cache-bust: odkazovat jako /obsah.css?v=N (nginx cache 1y).
   ============================================================ */

:root {
  --paper: #f6f4ef;
  --paper-deep: #efece4;
  --card: #fffdf8;
  --ink: #211d3a;
  --ink-soft: #514b74;
  --ink-faint: #837da6;
  --line: rgba(33, 29, 58, 0.14);
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-deep: #4f46e5;
  --brand-ghost: rgba(99, 102, 241, 0.08);
  --night: #0f172a;
  --night-2: #1e1b4b;
  --ok: #059669;
  --warn: #b45309;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --shadow-soft: 0 2px 6px rgba(33, 29, 58, 0.06), 0 12px 32px rgba(33, 29, 58, 0.08);
  --shadow-pop: 0 24px 60px rgba(33, 29, 58, 0.18);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; } /* kotvy nezajedou pod lepící hlavičku */

body {
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(33, 29, 58, 0.055) 1px, transparent 0) 0 0 / 34px 34px,
    var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.4em 0 0.5em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.2em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }

p { margin: 0 0 1.1em; }
a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }

strong { color: var(--ink); }

ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--brand); font-weight: 700; }

/* ---------- hlavička webu — stejná jako na úvodní stránce ----------
   Kopíruje AppBar z src/pages/LandingPage.tsx: tmavá lišta, logo +
   „Bytovačka" v přechodu, vpravo odkazy a hlavní výzva. Pod 900 px
   (MUI breakpoint md, kde i úvodka přepíná na menu) zbude logo, výzva
   a nabídka v <details>. Markup je ve všech stránkách totožný. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header__inner {
  max-width: 1200px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  min-width: 0;
  text-decoration: none;
}

.site-header__logo { width: 38px; height: 38px; display: block; flex-shrink: 0; }

.site-header__name {
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-header__nav { display: flex; align-items: center; gap: 0.25rem; }

.site-header__link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  white-space: nowrap;
}
.site-header__link:hover { color: #818cf8; background: rgba(255, 255, 255, 0.06); }

.site-header__cta {
  margin-left: 0.5rem;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-header__cta:hover { background: var(--grad-hover); color: #fff; }

.site-header a:focus-visible,
.site-header summary:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

/* mobilní nabídka — bez JS, jen <details> */
.site-header__menu { display: none; }

.site-header__menu > summary {
  list-style: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
}
.site-header__menu > summary::-webkit-details-marker { display: none; }
.site-header__menu > summary:hover { background: rgba(255, 255, 255, 0.08); }
.site-header__menu svg { width: 24px; height: 24px; fill: currentColor; display: block; }
.site-header__menu .site-header__close { display: none; }
.site-header__menu[open] .site-header__open { display: none; }
.site-header__menu[open] .site-header__close { display: block; }

.site-header__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
}
.site-header__panel a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header__panel a:last-child { border-bottom: none; }
.site-header__panel a:hover { color: #a5b4fc; }

.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;
}

@media (max-width: 899.98px) {
  .site-header__nav { display: none; }
  .site-header__menu { display: block; }
}

@media (max-width: 599.98px) {
  .site-header__inner { min-height: 64px; padding: 0.5rem 0.5rem 0.5rem 1rem; gap: 0.25rem; }
  .site-header__logo { width: 32px; height: 32px; }
  .site-header__name { font-size: 1.25rem; }
  .site-header__cta { margin-left: 0; padding: 0.55rem 0.85rem; font-size: 0.9rem; }
}

/* úzké telefony: jméno ustoupí, logo odkazuje domů dál */
@media (max-width: 359.98px) {
  .site-header__name { display: none; }
}

/* ---------- layout ---------- */

.shell { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

.crumbs {
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding: 1.1rem 0 0;
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--brand-deep); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 0.4em; opacity: 0.6; }

.hero { padding: 1.2rem 0 0.4rem; max-width: 780px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  background: var(--brand-ghost);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--brand-deep);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.32em 0.9em;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.hero .perex {
  font-size: 1.18rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3rem;
  padding: 1.4rem 0 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; gap: 2rem; }
}

article.content { max-width: 700px; min-width: 0; }

/* paragrafová vsuvka (citace zákona) */
.law {
  border-left: 3px solid var(--brand);
  background: var(--brand-ghost);
  border-radius: 0 12px 12px 0;
  padding: 0.9rem 1.2rem;
  margin: 1.4rem 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
.law .par {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  color: var(--brand-deep);
  font-size: 1.02rem;
  display: block;
  margin-bottom: 0.2em;
}

.note {
  border: 1px solid rgba(180, 83, 9, 0.3);
  background: rgba(180, 83, 9, 0.06);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  margin: 1.4rem 0;
  font-size: 0.97rem;
}
.note strong:first-child { color: var(--warn); }

/* ---------- tabulky ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
th, td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--night-2); color: #e0e7ff; font-weight: 600; font-size: 0.88rem; }
tr:last-child td { border-bottom: none; }

/* Na telefonu se srovnávací tabulky (4 sloupce) jinak nevejdou a táhly by
   celou stránku do strany: zmenšit, a co přesto přeteče, posouvat jen
   uvnitř obalu .table-scroll (tabulka sama zůstává display: table, aby
   čtečky obrazovky neztratily řádky a sloupce). */
.table-scroll {
  overflow-x: auto;
  margin: 1.4rem 0;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.table-scroll > table { margin: 0; box-shadow: none; }

@media (max-width: 640px) {
  table { font-size: 0.84rem; }
  th, td { padding: 0.45rem 0.4rem; }
  th { font-size: 0.8rem; }
}

/* ---------- náhled dokumentu jako „papír" ---------- */

.sheet-wrap { margin: 1.8rem 0; perspective: 1200px; }

.sheet {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
  padding: 2.4rem 2.6rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #2b2745;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.sheet:hover { transform: rotate(-0.4deg) translateY(-4px); box-shadow: var(--shadow-pop); }

.sheet::after {
  content: '§';
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: rgba(99, 102, 241, 0.16);
  line-height: 1;
}

.sheet h4 {
  font-family: 'Fraunces', Georgia, serif;
  text-align: center;
  font-size: 1.15rem;
  margin: 0 0 0.3rem;
  letter-spacing: 0.01em;
}
.sheet .sub { text-align: center; color: var(--ink-faint); font-size: 0.85rem; margin: 0 0 1.5rem; }
.sheet p { margin: 0 0 0.8em; }
.sheet .fill { color: var(--ink-faint); letter-spacing: 0.08em; line-break: anywhere; overflow-wrap: anywhere; }
.sheet .field { margin: 0.55em 0; }
.sheet .choices { margin: 1em 0; padding-left: 0.2em; list-style: none; }
.sheet .choices li { margin-bottom: 0.5em; }
.sheet .box {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border: 1.5px solid var(--ink-soft);
  border-radius: 3px;
  margin-right: 0.55em;
  vertical-align: -0.1em;
}
.sheet .sig {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2.2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.sheet .sig div { flex: 1; border-top: 1px dotted var(--ink-faint); padding-top: 0.4rem; }

@media (max-width: 640px) { .sheet { padding: 1.5rem 1.2rem; } }

/* ---------- tlačítka stažení ---------- */

.downloads { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0; }

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-dl:hover { background: var(--grad-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(99, 102, 241, 0.45); }
.btn-dl .ext { font-size: 0.78rem; font-weight: 600; opacity: 0.85; background: rgba(255,255,255,0.18); padding: 0.15em 0.55em; border-radius: 6px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border: 1.5px solid rgba(99, 102, 241, 0.45);
  color: var(--brand-deep);
  text-decoration: none;
  font-weight: 600;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  transition: background 0.2s ease;
}
.btn-ghost:hover { background: var(--brand-ghost); }

/* ---------- boční panel ---------- */

aside.rail { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 1.3rem; }

.cta-card {
  background: linear-gradient(150deg, var(--night-2) 0%, #312e81 100%);
  border-radius: var(--radius);
  padding: 1.6rem;
  color: #e0e7ff;
  box-shadow: var(--shadow-pop);
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, transparent 70%);
  filter: blur(10px);
}
.cta-card h3 { color: #fff; margin: 0 0 0.5rem; font-size: 1.25rem; position: relative; }
.cta-card p { font-size: 0.93rem; color: rgba(224, 231, 255, 0.85); position: relative; }
.cta-card ul { list-style: none; padding: 0; margin: 0 0 1.2rem; position: relative; }
.cta-card li { padding-left: 1.5em; position: relative; font-size: 0.92rem; margin-bottom: 0.5em; }
.cta-card li::before { content: '✓'; position: absolute; left: 0; color: #a5b4fc; font-weight: 800; }
.cta-card .btn-dl { width: 100%; justify-content: center; box-shadow: none; position: relative; }
.cta-card .aux { display: block; text-align: center; margin-top: 0.7rem; font-size: 0.88rem; color: #a5b4fc; position: relative; }

.rail-nav {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-soft);
}
.rail-nav h3 { margin: 0 0 0.7rem; font-size: 1.05rem; }
.rail-nav ul { list-style: none; padding: 0; margin: 0; }
.rail-nav li { margin: 0; border-bottom: 1px solid var(--line); }
.rail-nav li:last-child { border-bottom: none; }
.rail-nav a { display: block; padding: 0.55rem 0; text-decoration: none; color: var(--ink-soft); font-size: 0.93rem; }
.rail-nav a:hover { color: var(--brand-deep); }
.rail-nav a[aria-current] { color: var(--brand-deep); font-weight: 700; }

@media (max-width: 900px) { aside.rail { position: static; } }

/* ---------- karty na hubu ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
  margin: 2rem 0 1rem;
  padding: 0;
  list-style: none;
}
.cards li { margin: 0; }

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-pop); border-color: rgba(99, 102, 241, 0.4); color: var(--ink); }
.card .tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: var(--brand-ghost);
  padding: 0.25em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.22rem; }
.card p { margin: 0 0 1rem; font-size: 0.94rem; color: var(--ink-soft); flex-grow: 1; }
.card .go { font-weight: 700; color: var(--brand-deep); font-size: 0.92rem; }
.card .go::after { content: ' →'; }

/* ---------- CTA pruh ---------- */

.band {
  background: var(--grad);
  border-radius: var(--radius);
  color: #fff;
  padding: 2rem 2.2rem;
  margin: 2.6rem 0;
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.35);
}
.band h2 { color: #fff; margin: 0 0 0.5rem; }
.band p { color: rgba(255, 255, 255, 0.92); max-width: 46em; }
.band .row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.2rem; }
.band .btn-solid {
  background: #fff;
  color: var(--brand-deep);
  font-weight: 800;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
}
.band .btn-solid:hover { background: #eef2ff; }
.band .btn-line {
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
}
.band .btn-line:hover { background: rgba(255, 255, 255, 0.12); }

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

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.3rem;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 2.6rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  color: var(--brand);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 1.3rem 1.1rem; color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- drobnosti ---------- */

.disclaimer {
  font-size: 0.85rem;
  color: var(--ink-faint);
  border-top: 1px dashed var(--line);
  padding-top: 1.2rem;
  margin-top: 3rem;
}

.updated { font-size: 0.85rem; color: var(--ink-faint); margin-top: 0.4rem; }

/* ---------- patička webu — stejná jako na úvodní stránce ---------- */

.site-footer {
  background: #0f172a;
  color: #9e9e9e;
  padding: 3rem 0;
  margin-top: 2rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.site-footer__inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
@media (max-width: 899.98px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
}
.site-footer__icon { width: 24px; height: 24px; fill: #818cf8; flex-shrink: 0; }
.site-footer__brand span {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-footer p { margin: 0; }

.site-footer__title {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.6;
  color: #a5b4fc;
  margin: 0 0 0.35em;
}
.site-footer__list { list-style: none; padding: 0; margin: 0; }
.site-footer__list li { margin: 0 0 0.5rem; }
.site-footer a { color: #9e9e9e; text-decoration: none; }
.site-footer a:hover { color: #a5b4fc; }
.site-footer__list a { overflow-wrap: anywhere; }
.site-footer a:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }

.site-footer .site-footer__fine {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  /* Úvodka má grey.600 (#757575) — na #0f172a jen 3,9 : 1; tady o odstín
     světlejší, aby drobné písmo splnilo WCAG AA (≈ 5 : 1). */
  color: #8a8a8a;
}
