.printdoc { max-width: 900px; margin: 0 auto; padding: 16px; }
.printdoc .toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.printdoc h1 { font-size: 28px; }
.printdoc h2 { font-size: 20px; margin: 24px 0 8px; }
.printdoc .warn { border: 2px solid var(--bad); padding: 10px 14px; border-radius: var(--radius); }
.tablewrap { overflow-x: auto; }
.printdoc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.printdoc th, .printdoc td { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); }
.printdoc thead th { border-bottom: 2px solid var(--ink); }
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --ink: #000; --muted: #333; --line: #999; --bad: #000; color-scheme: light;
    --tc-rot: #a00000; --tc-orange: #8a4500; --tc-gruen: #145c36; --tc-blau: #1a4a99; --tc-grau: #444444; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .noprint { display: none !important; }
  .printdoc { max-width: none; padding: 0; }
  .printdoc section { break-inside: auto; }
  .printdoc h2 { break-after: avoid; }
  .printdoc tr { break-inside: avoid; }
  .printdoc thead { display: table-header-group; }
  a { color: #000; text-decoration: none; }
  .printdoc section.doc-page { break-before: page; }
  .printdoc .warn { border: 2px solid #000; }
}

/* Formate im Doku-Text: Ausrichtung, unterstrichen, markiert, Aufgabenkästchen */
.doc-body .al-links, .editor-preview .al-links { text-align: left; }
.doc-body .al-zentriert, .editor-preview .al-zentriert { text-align: center; }
.doc-body .al-rechts, .editor-preview .al-rechts { text-align: right; }
.doc-body .al-blocksatz, .editor-preview .al-blocksatz { text-align: justify; hyphens: auto; }
/* Textfarbe und -größe aus der Blockmarke (::: zentriert rot gross): nur feste Klassen, Farben aus den Tokens */
.doc-body .tc-rot, .editor-preview .tc-rot { color: var(--tc-rot); }
.doc-body .tc-orange, .editor-preview .tc-orange { color: var(--tc-orange); }
.doc-body .tc-gruen, .editor-preview .tc-gruen { color: var(--tc-gruen); }
.doc-body .tc-blau, .editor-preview .tc-blau { color: var(--tc-blau); }
.doc-body .tc-grau, .editor-preview .tc-grau { color: var(--tc-grau); }
.doc-body .tc-rot :is(h1, h2, h3), .editor-preview .tc-rot :is(h1, h2, h3) { color: var(--tc-rot); }
.doc-body .tc-orange :is(h1, h2, h3), .editor-preview .tc-orange :is(h1, h2, h3) { color: var(--tc-orange); }
.doc-body .tc-gruen :is(h1, h2, h3), .editor-preview .tc-gruen :is(h1, h2, h3) { color: var(--tc-gruen); }
.doc-body .tc-blau :is(h1, h2, h3), .editor-preview .tc-blau :is(h1, h2, h3) { color: var(--tc-blau); }
.doc-body .tc-grau :is(h1, h2, h3), .editor-preview .tc-grau :is(h1, h2, h3) { color: var(--tc-grau); }
.doc-body .ts-klein, .editor-preview .ts-klein { font-size: 0.875em; --ts-k: 0.875; }
.doc-body .ts-gross, .editor-preview .ts-gross { font-size: 1.25em; --ts-k: 1.25; }
.doc-body .ts-sehr-gross, .editor-preview .ts-sehr-gross { font-size: 1.6em; --ts-k: 1.6; }
.doc-body [class*="ts-"] h1, .editor-preview [class*="ts-"] h1 { font-size: calc(26px * var(--ts-k, 1)); }
.doc-body [class*="ts-"] h2, .editor-preview [class*="ts-"] h2 { font-size: calc(20px * var(--ts-k, 1)); }
.doc-body [class*="ts-"] h3, .editor-preview [class*="ts-"] h3 { font-size: calc(17px * var(--ts-k, 1)); }
.doc-body u, .editor-preview u { text-decoration: underline; text-underline-offset: 2px; }
.doc-body mark, .editor-preview mark { background: var(--mark-bg, #ffe680); color: var(--mark-ink, #1a1a1a); padding: 0 2px; }
.doc-body input[type="checkbox"], .editor-preview input[type="checkbox"] { margin-right: 6px; }
.doc-body li:has(> input[type="checkbox"]), .editor-preview li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.2em; }
@media print { .doc-body mark { background: #ffe680 !important; color: #000; print-color-adjust: exact; -webkit-print-color-adjust: exact; } }

.printdoc .doc-toc { border: 0; padding: 0; background: none; }
.printdoc .doc-toc ol, .printdoc .doc-toc ul { padding-left: 1.4em; }
