/* Tvůj Rodokmen – styly právních stránek (zásady, podmínky) */
:root {
  --primary: #6B4E3D;
  --primary-dark: #563E30;
  --primary-soft: #F1E8DF;
  --green: #2F5D50;
  --green-soft: #E3EFEA;
  --amber: #B7793A;
  --amber-soft: #F7EBDC;
  --bg: #FAF7F2;
  --bg-alt: #F3EEE7;
  --surface: #FFFFFF;
  --text: #2B211B;
  --muted: #6E6159;
  --border: #E7DFD5;
  --border-strong: #CDBFB1;
  --todo-bg: #FFF1B8;
  --todo-text: #5A4300;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #D7B49A; --primary-dark: #E8CDB8; --primary-soft: #3A2C23;
    --green: #8FC3AD; --green-soft: #1F332C; --amber: #E0A766; --amber-soft: #3A2B1A;
    --bg: #17120F; --bg-alt: #1E1814; --surface: #241D18;
    --text: #F1E8DF; --muted: #B3A497; --border: #3A3029; --border-strong: #554638;
    --todo-bg: #4A3B0A; --todo-text: #FFE9A3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #D7B49A; --primary-dark: #E8CDB8; --primary-soft: #3A2C23;
  --green: #8FC3AD; --green-soft: #1F332C; --amber: #E0A766; --amber-soft: #3A2B1A;
  --bg: #17120F; --bg-alt: #1E1814; --surface: #241D18;
  --text: #F1E8DF; --muted: #B3A497; --border: #3A3029; --border-strong: #554638;
  --todo-bg: #4A3B0A; --todo-text: #FFE9A3;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 55%, transparent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand span { font: 600 1.2rem var(--serif); white-space: nowrap; }
.back { font-size: .92rem; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.back:hover { color: var(--text); }
@media (max-width: 480px) { .back .long { display: none; } }

.page-head { padding: 56px 0 32px; }
.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 0 0 14px; }
.meta { color: var(--muted); font-size: .95rem; }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 80px; }
.toc { position: sticky; top: 88px; font-size: .9rem; }
.toc h2 { font: 700 .75rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a::before { content: counter(t) ". "; }
.toc a:hover { background: var(--bg-alt); color: var(--text); }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
}

article { max-width: 760px; counter-reset: sec; }
article section { padding-top: 8px; margin-bottom: 36px; counter-increment: sec; }
article h2 { font-size: 1.55rem; margin: 0 0 14px; }
article h2::before { content: counter(sec) ". "; color: var(--amber); }
article h3 { font-size: 1.15rem; margin: 22px 0 8px; }
article p { margin: 0 0 12px; }
article ul, article ol { margin: 0 0 14px; padding-left: 1.3rem; }
article li { margin-bottom: 6px; }
article li::marker { color: var(--amber); }

.summary { background: var(--green-soft); border-radius: 16px; padding: 22px 24px; margin-bottom: 40px; }
.summary h2 { font-size: 1.2rem; margin: 0 0 10px; }
.summary h2::before { content: none; }
.summary ul { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 0 0 16px; }
.card p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background: var(--bg-alt); }
tr:last-child td { border-bottom: 0; }

.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 .3em; border-radius: 4px; font-weight: 600; }

footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: .88rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media print {
  .site-header, .toc, footer { display: none; }
  .layout { grid-template-columns: 1fr; }
  .todo { background: none; border: 1px dashed #999; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
