
:root {
  color-scheme: only light;
  --bg: #fbf9f5;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --ink: #0f1a2e;
  --ink-2: #2f3d55;
  --muted: #5a6577;
  --brand: #1e3153;
  --accent: #f2a33c;
  --accent-text: #8a5300;
  --on-brand: #ffffff;
  --line: #e3ded3;
  --danger-soft: #fbeae8;
  --amber-soft: #fdf3e4;
  --success-soft: #eaf5ee;
  --muted-on-navy: #d8deea;
  --line-on-navy: #3c4d6e;
  --font-display: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --measure: 190mm;
}
* { box-sizing: border-box; }
/* The cover's width:100vw full-bleed (below) counts the scrollbar's own
 * width on most platforms, which would otherwise push the page a few pixels
 * wider than the visible viewport and add a second, horizontal scrollbar.
 * This keeps that overflow from ever becoming visible or scrollable; print
 * has no scrollbar and is unaffected. */
html { overflow-x: hidden; }
body {
  margin: 0; padding: 0 20px 24px; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 11pt; line-height: 1.55;
}
main { max-width: var(--measure); margin: 0 auto; }

/* --- Running band: product and document, on screen only ----------------- */
.doc-band {
  position: sticky; top: 0; z-index: 2;
  margin: 0 -20px 20px; padding: 10px 20px;
  background: var(--brand); color: #eee9df;
  font-family: var(--font-display); font-size: 10pt; letter-spacing: 0.01em;
}
.doc-band-inner {
  max-width: var(--measure); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline;
}
.doc-band-title { color: #cfcac0; }

/* --- Cover: flat navy, full-bleed, in both media, contents list included
   through to the customer's own fields anchored at its foot ------------- */
.doc-front { margin: 0 0 28px; }
.doc-cover {
  margin: 0 -20px 0; padding: 18mm 20px 14mm;
  background: var(--brand); color: #fff;
}
/* True full-bleed to the physical page edge (a fixed-pixel negative margin
 * only cancels the PARENT's own padding, and main sits between body and
 * this element with none of its own in print, only a max-width, so the rule
 * above alone left a white margin either side). Scoped to a cover with no
 * .cover-extra, i.e. one short enough to always fit one A4 page: width:100vw
 * interacts badly with Chrome's print pagination on a box that ALSO has to
 * split across pages, which is exactly the decree 410 pack's cover (its own
 * intro paragraph and ten-row index can run past one page): there the
 * simpler rule above is what actually renders correctly. */
.doc-cover:not(:has(.cover-extra)) {
  width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
.cover-mark { display: block; }
.cover-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 14mm; }
.cover-lockup { display: flex; align-items: center; gap: 9px; }
.cover-wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: #fff; line-height: 1; }
.cover-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted-on-navy); text-align: right; line-height: 1.6; }
.cover-meta code { background: none; padding: 0; color: inherit; }
.cover-kicker { margin: 0 0 4mm; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: #fff; }
.doc-cover h1 { color: #fff; font-size: 23pt; line-height: 1.18; margin: 0 0 10mm; border: 0; padding: 0; max-width: 150mm; }
.doc-cover blockquote { margin: 0 0 10mm; padding: 0; background: none; border: 0; color: var(--muted-on-navy); max-width: 130mm; }
.doc-cover blockquote p { margin: 0; }
.cover-stats { display: flex; gap: 14mm; flex-wrap: wrap; margin: 0 0 10mm; }
.cover-stat { display: flex; flex-direction: column; gap: 3px; }
.cover-stat .stat-val { font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; color: var(--accent); line-height: 1; }
.cover-stat .stat-lbl { font-size: 0.68rem; color: var(--muted-on-navy); text-transform: uppercase; letter-spacing: 0.05em; }
.cover-extra { color: var(--muted-on-navy); font-size: 0.86rem; margin: 0 0 10mm; }
.cover-extra table { color: #fff; }
.cover-extra th { background: none; color: #fff; border-bottom: 1px solid var(--line-on-navy); }
.cover-extra td { border-bottom: 1px solid var(--line-on-navy); }

/* Contents, INSIDE the cover between the stats and the fields (2026-09-22
 * refresh): typography only, the parent's own full-bleed panel already
 * supplies the navy background report-toc.ts's markup renders onto. */
.doc-toc { margin: 0 0 10mm; }
.doc-toc h2 {
  font-size: 0.68rem; margin: 0 0 6mm; padding: 5mm 0 0; border: 0; border-top: 1px solid var(--line-on-navy);
  color: var(--muted-on-navy); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.07em;
}
.doc-toc ul { margin: 0; padding-left: 0; list-style: none; column-gap: 12mm; }
/* Two columns once a fourth entry exists; three or fewer stay one column,
 * since a lone entry stranded in its own second column (the free sample's
 * three-item contents) read worse than a column that simply runs longer. */
.doc-toc ul:has(li:nth-child(4)) { columns: 2; }
.doc-toc li { margin: 0 0 4px; font-family: var(--font-mono); font-size: 0.82rem; break-inside: avoid; }
.doc-toc a { color: #fff; text-decoration: none; }
.doc-toc a:hover, .doc-toc a:focus { color: var(--accent); text-decoration: underline; }

.cover-facts { margin: 0; padding-top: 5mm; border-top: 2px solid var(--accent); display: flex; flex-wrap: wrap; gap: 4mm 14mm; }
.cover-fact {
  flex: 1 1 42mm; display: flex; flex-wrap: wrap; gap: 2px 12px;
  font-size: 10pt;
}
.cover-fact dt { flex: 0 0 100%; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-on-navy); }
.cover-fact dd { margin: 0; color: #fff; overflow-wrap: anywhere; }
.cover-fact dd code { background: none; padding: 0; color: inherit; }

/* --- Running header, at the two points the document breaks a page ------- */
.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 20px 0 7mm; padding: 0 0 6px; border-bottom: 1px solid var(--line);
}
.page-head-brand {
  display: flex; align-items: center; gap: 6px; color: var(--ink-2);
  font-weight: 700; font-family: var(--font-display); font-size: 0.86rem;
}
.page-head-brand svg { display: block; }
.section-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }

/* --- Body --------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--brand); }
h1 { font-size: 20pt; line-height: 1.25; margin: 0 0 12px; }
h2 {
  font-size: 15pt; margin: 26px 0 10px; padding-bottom: 5px;
  border-bottom: 2px solid var(--accent);
}
h2.page-start {
  display: flex; align-items: baseline; gap: 10px; margin-top: 0;
  padding-bottom: 0; border-bottom: 0;
}
h2.page-start .section-num {
  font-family: var(--font-display); font-weight: 700; font-size: 40pt;
  line-height: 0.8; color: var(--accent-text); flex: none;
}
h2.page-start .section-title { font-size: 15pt; }
h3 { font-size: 12pt; margin: 18px 0 8px; color: var(--ink); }
p { margin: 0 0 10px; }
ul { margin: 0 0 10px; padding-left: 20px; }
li { margin: 0 0 4px; }
a { color: var(--brand); }
strong { color: var(--ink); }
code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--surface-2); padding: 0 3px; border-radius: 3px;
  overflow-wrap: anywhere;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; }
.table-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Phone screens only (print is untouched, so the break-word note above still
 * holds on paper): a four-column table runs past a 390px viewport and scrolls
 * sideways inside .table-scroll. Non-breaking spaces after Czech one-letter
 * prepositions make whole phrases one unbreakable run, so tighter cells alone
 * do not help; on a phone a word broken at the cell edge beats a table that
 * scrolls. */
@media screen and (max-width: 480px) {
  table { font-size: 9pt; }
  th, td { padding: 5px 4px; overflow-wrap: anywhere; hyphens: auto; }
  /* Both selectors, so this always wins regardless of the :has() rule's own
   * specificity: a phone stays one column no matter how many entries. */
  .doc-toc ul, .doc-toc ul:has(li:nth-child(4)) { columns: 1; }
}
/* Hairline ledger, not a full grid: a bottom rule under each row and a
 * heavier one under the last, rather than a box round every cell, and the
 * header a rule rather than a fill (kill-list, 2026-09-22 refresh). No
 * vertical border anywhere. */
table { border-collapse: collapse; width: 100%; margin: 0; font-size: 9.5pt; }
th, td {
  padding: 6px 8px; text-align: left;
  /* break-word, not anywhere. "anywhere" broke Czech words at any character,
   * so a printed cell read "vyso" then "ka" on the next line. break-word
   * breaks only a word that would otherwise overflow its cell. "anywhere"
   * stays where a token has no word boundaries at all: a code span, and the
   * 64-character digest in the footer. */
  vertical-align: top; overflow-wrap: break-word;
}
td { border: 0; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 1px solid var(--brand); }
/* No fill, on screen or in print (2026-09-22 refresh: a solid header used to
 * differ between the two, filled on screen and text-only in print, because
 * Chrome prints with background graphics off by default and a navy fill with
 * white text then printed white on white. A rule needs no such guard: it
 * reaches paper on its own, so one declaration now serves both media. */
th {
  background: none; color: var(--brand); font-weight: 600;
  font-family: var(--font-display); border: 0; border-bottom: 1px solid var(--ink);
}
/* Status tints. The label is unchanged, so a greyscale print still reads. */
td.stav-open { background: var(--danger-soft); }
td.stav-partial { background: var(--amber-soft); }
td.stav-done { background: var(--success-soft); }
blockquote {
  margin: 0 0 12px; padding: 9px 14px; background: var(--surface);
  border-left: 3px solid var(--accent); color: var(--ink-2);
}
blockquote p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* --- Footer ------------------------------------------------------------- */
.doc-foot {
  max-width: var(--measure); margin: 32px auto 0; padding-top: 12px;
  border-top: 2px solid var(--accent); font-size: 9pt; color: var(--muted);
}
.doc-foot p { margin: 0 0 6px; }
.doc-foot code { font-family: var(--font-mono); overflow-wrap: anywhere; }

@page { size: A4; margin: 18mm 16mm; }
@page { @bottom-center { content: counter(page); font-family: ui-monospace, monospace; font-size: 8pt; color: #5a6577; } }
@page:first { margin: 0; }
@page:first { @bottom-center { content: none; } }
@media print {
  body { padding: 0; background: #ffffff; font-size: 10pt; }
  .doc-band { display: none; }
  /* Exactly three forced breaks in the whole document: after the cover, and
   * before the management summary and the quote appendix. Forcing one before
   * every h2 produced 37 pages of about 900 characters each. */
  .doc-front { break-after: page; page-break-after: always; }
  /* No break-inside: avoid here (unlike the original card-style cover this
   * replaces): the gap-report cover is always short enough to fit one page
   * regardless, but the decree 410 pack's cover also carries its own intro
   * paragraph and ten-row document index, which do not always fit one A4
   * page. Forcing the whole block to avoid splitting then pushed it whole
   * onto a fresh page it STILL didn't fit, stranding page 1 blank. Left free
   * to flow, it starts filling page 1 immediately and spills onto page 2
   * only when it must, which is the honest outcome for oversized content. */
  h2.page-start { break-before: page; page-break-before: always; }
  /* The running-header bar in front of a page-start heading carries the
   * ACTUAL break instead: h2.page-start keeps its own break-before above for
   * a heading with no bar in front of it, but a bar immediately followed by
   * its heading would otherwise force TWO breaks back to back, stranding the
   * bar alone on a blank page. The more specific selector below cancels the
   * heading's redundant one. */
  .page-head { break-before: page; page-break-before: always; break-after: avoid; page-break-after: avoid; }
  .page-head + h2.page-start { break-before: avoid; page-break-before: avoid; }
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  tr, li, blockquote { break-inside: avoid; page-break-inside: avoid; }
  thead { display: table-header-group; }
  .table-scroll { overflow: visible; }
  /* The cover fills the printable area exactly (A4, @page:first's own zero
   * margin makes that 297mm), and the customer's own fields plus the digest
   * anchor at its foot rather than trailing right after the contents list:
   * a flex column with only the LAST child's top margin set to auto pushes
   * that one child, and nothing above it, down to the container's own edge.
   *
   * Scoped to a cover with no .cover-extra: Chrome fragments a MULTI-page
   * flex container badly (clipped text, a background that stops mid-page),
   * and .cover-extra is exactly the signal that this cover might be one: it
   * is only ever the decree 410 pack's own intro paragraph and ten-row
   * index, the one case tall enough to spill past 297mm onto a second page.
   * A gap-report cover never carries it and always fits one page, so the
   * full-page treatment is safe there and skipped for the pack, which keeps
   * the ordinary, page-fragmenting block flow that already rendered it
   * correctly. */
  .doc-cover:not(:has(.cover-extra)) { display: flex; flex-direction: column; min-height: 297mm; }
  .doc-cover:not(:has(.cover-extra)) .cover-facts { margin-top: auto; }
  /* Chrome drops background colour in print unless the document asks for it.
   * The cover, the contents and the status tints are the places here where
   * colour carries the page's own meaning, not mere decoration. */
  .doc-cover, .doc-cover *, .doc-toc, .doc-toc *,
  td.stav-open, td.stav-partial, td.stav-done {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* break-inside: avoid alone. Pairing it with break-before: avoid gave the
   * engine a dilemma it had no good answer to when the footer did not fit
   * the remaining page (stay put and split anyway, since it may not start a
   * fresh page either): the free sample's four-line footer split 3/1 across
   * two pages, stranding the disclaimer alone. Free to move to a fresh page
   * whole, it never splits. */
  .doc-foot { break-inside: avoid; page-break-inside: avoid; }
}


.ukazka-banner {
  background: #fdecec; border: 1px solid #e0a3a3; color: #7a1c1c;
  padding: 10px 14px; margin: 0 0 16px; font-weight: 600; font-size: 10.5pt;
  border-radius: 6px;
}
.ukazka-watermark { display: none; }
@media print {
  .ukazka-watermark {
    display: block; position: fixed; inset: 0; z-index: 999; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'320'%20height%3D'170'%3E%3Ctext%20x%3D'0'%20y%3D'95'%20font-family%3D'sans-serif'%20font-size%3D'34'%20fill%3D'%2523c0392b'%20transform%3D'rotate(-28%20160%2085)'%20font-weight%3D'700'%3EUKAZKA%3C%2Ftext%3E%3C%2Fsvg%3E"); background-repeat: repeat; opacity: 0.16;
  }
}
