/* Evidka – danova-evidka.cz. Tokeny podle design/system.md, kap. 2. */
:root {
  color-scheme: light dark;
  --ink: #000000;
  --paper: #ffffff;
  --fill-1: #f5f5f5;
  --line: #e3e3e3;
  --line-2: #c4c4c4;
  --text-2: #5e5e5e;
  --text-3: #8c8c8c;
  --signal: #b3261e;
  --hover: rgba(0, 0, 0, 0.05);
  --press: rgba(0, 0, 0, 0.1);
  --gutter: 16px;
  --measure: 1080px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ffffff;
    --paper: #1e1e1e;
    --fill-1: #262626;
    --line: #363636;
    --line-2: #595959;
    --text-2: #ababab;
    --text-3: #7a7a7a;
    --signal: #f2b8b5;
    --hover: rgba(255, 255, 255, 0.07);
    --press: rgba(255, 255, 255, 0.13);
  }
}

@media (prefers-contrast: more) {
  :root { --line: var(--line-2); }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 8px 12px; z-index: 2; }

/* Záhlaví */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; text-decoration: none; }
.brand svg { display: block; height: 24px; width: auto; fill: var(--ink); }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--text-2); padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Úvod */
.hero { padding: 56px 0 48px; }
.hero .wrap { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) {
  .hero { padding: 88px 0 72px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; }
}
.lead { margin-top: 20px; font-size: 20px; color: var(--text-2); max-width: 34em; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { margin-top: 12px; font-size: 14px; color: var(--text-2); }

/* Tlačítka: ostré rohy, vrstva stavu místo stínu */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: 0;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none;
  background: transparent; color: var(--ink);
  position: relative;
}
.btn::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.btn:hover::after { background: var(--hover); }
.btn:active::after { background: var(--press); }
.btn-fill { background: var(--ink); color: var(--paper); }
.btn-fill:hover::after { background: rgba(127, 127, 127, 0.18); }
.btn[aria-disabled="true"] { border-style: dashed; }
.btn-fill[aria-disabled="true"] { background: transparent; color: var(--ink); }
.btn[aria-disabled="true"]:hover::after, .btn[aria-disabled="true"]:active::after { background: none; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Zástupný obsah: čárkovaný obrys jako koncept v aplikaci */
.placeholder {
  display: inline; padding: 1px 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  border: 1px dashed var(--line-2); color: var(--text-2);
  font-size: 0.9em;
}

/* Ukázka podání se součtem */
.sheet { border: 1px solid var(--line); background: var(--paper); }
.sheet-head { padding: 16px 20px; border-bottom: 1px solid var(--ink); }
.sheet-title { font-size: 19px; font-weight: 600; }
.sheet-head p + p { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 15px; }
.sheet th { text-align: left; font-weight: 400; color: var(--text-2); }
.sheet th, .sheet td { padding: 10px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sheet td { text-align: right; white-space: nowrap; }
.sheet tr.total th { color: var(--ink); font-weight: 600; border-bottom: 0; }
.sheet tr.total td { font-weight: 600; border-bottom: 0; }
.sum { display: inline-block; padding-bottom: 5px; border-bottom: 4px double var(--ink); }
.sheet-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }

/* Sekce */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding: 80px 0; } }
.section-intro { margin-top: 12px; color: var(--text-2); max-width: 40em; }
.section-intro.after-tiles { margin-top: 24px; }

/* Dlaždice se sdílenými linkami */
.tiles {
  margin-top: 32px; display: grid; grid-template-columns: 1fr;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tiles.three { grid-template-columns: repeat(3, 1fr); } }
.tile { padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tile p { margin-top: 8px; color: var(--text-2); font-size: 16px; }
.tile ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); font-size: 16px; }
.tile li + li { margin-top: 4px; }

.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }

.list { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.list li::before { content: ""; width: 14px; height: 10px; margin-top: 8px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }

.band { border: 1px solid var(--line); border-left: 4px solid var(--ink); padding: 16px 20px; color: var(--text-2); }
.band strong { color: var(--ink); }

/* Dlouhé texty (zásady, podpora) */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); }
.doc .meta { margin-top: 12px; color: var(--text-2); font-size: 15px; }
.doc h2 { font-size: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc h3 { margin-top: 28px; }
.doc p, .doc ul, .doc table, .doc .band { margin-top: 14px; }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc .band { margin-top: 24px; }
.table-scroll { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc thead th { font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--ink); }

/* Otázky */
.faq { margin-top: 24px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; padding: 18px 36px 18px 0; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 26px; width: 10px; height: 10px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.faq .answer { padding: 0 0 20px; color: var(--text-2); }
.faq .answer p + p { margin-top: 10px; }

.contact { margin-top: 20px; padding: 24px; border: 1px solid var(--line); display: grid; gap: 8px; }
.contact .addr { font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.contact .addr.placeholder { font-size: 17px; font-weight: 400; justify-self: start; }

/* Zápatí */
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 14px; color: var(--text-2); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

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

@media (max-width: 480px) {
  .brand svg { height: 20px; }
  .nav { gap: 14px; font-size: 14px; }
  .sheet th, .sheet td { padding: 10px 14px; }
  .sheet-head, .sheet-foot { padding-left: 14px; padding-right: 14px; }
  .tile { padding: 20px; }
}
@media (max-width: 400px) {
  .nav a[href$="#funkce"] { display: none; }
}

@media (max-width: 560px) {
  .doc table.stack { min-width: 0; }
  .doc table.stack thead { position: absolute; left: -9999px; }
  .doc table.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .doc table.stack td { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; padding: 2px 0; border: 0; }
  .doc table.stack td::before { content: attr(data-label); color: var(--text-2); font-size: 13px; padding-top: 2px; }
}
