/* ===== Dokument auf einem A4-Blatt (Stift-Editor, Hintergrund „Dokument“) =====
   Feste Breite und mitgelieferte Schriften: Auf jedem Gerät bricht der Text an
   denselben Stellen um – nur so liegen die Striche überall gleich. Maße wie die
   Schulvorlage (Grundvorlage.ott): Ränder 1,27 / 2 / 1 / 2,5 cm, Arial 11 pt.
   Liberation Sans/Mono haben dieselben Zeichenbreiten wie Arial/Courier New. */

@font-face { font-family: 'LM Sans'; src: url('../fonts/LiberationSans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'LM Sans'; src: url('../fonts/LiberationSans-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'LM Sans'; src: url('../fonts/LiberationSans-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'LM Sans'; src: url('../fonts/LiberationSans-BoldItalic.woff2') format('woff2'); font-weight: 700; font-style: italic; }
@font-face { font-family: 'LM Mono'; src: url('../fonts/LiberationMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'LM Mono'; src: url('../fonts/LiberationMono-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; }

.lm-paper {
  /* Papier bleibt hell, auch im dunklen Design der App. */
  --text-primary: #111827; --text-secondary: #4b5563;
  --bg-primary: #ffffff; --bg-secondary: #f8fafc; --border: #cbd5e1;
  box-sizing: border-box;
  width: 21cm; min-height: 29.7cm;
  padding: 1.27cm 2cm 1cm 2.5cm;
  background: #fff; color: var(--text-primary);
  font-family: 'LM Sans', 'Liberation Sans', Arial, sans-serif;
  font-size: 11pt; line-height: 1.15;
  overflow-wrap: break-word;
}
.lm-paper.lm-landscape { width: 29.7cm; min-height: 21cm; }
/* A4 quer wie im Druck (use_template_width im Renderer): Schreibfelder ohne Breite,
   Tabellen und Bilder in „ganzer Breite“ (16,5 cm) nutzen die ganze Zeile. */
.lm-landscape .docspec .ds-karo { max-width: 100%; }
.lm-landscape .docspec .ds-table:not([style*="width"]) { width: 100%; }
.lm-landscape .docspec .ds-image-full > img,
.lm-landscape .docspec .ds-group-full > .ds-group-box { width: 100% !important; }
/* Schreibfeld in einer Zelle: Die Tabelle hat sonst nichts, woran sie ihre Breite misst. */
.lm-paper .docspec .ds-table:has(.ds-karo):not([style*="width"]) { width: 100%; }
.lm-paper .docspec { line-height: 1.15; overflow-wrap: break-word; }
.lm-paper code, .lm-paper pre, .lm-paper kbd { font-family: 'LM Mono', 'Liberation Mono', 'Courier New', monospace; }
.lm-paper .ds-karo { position: relative; }
/* Auf dem festen Blatt kein Bildlauf in Formeln (overflow-x: auto erzwänge bei 1,15 Zeilenhöhe eine senkrechte Leiste). */
.lm-paper .docspec .ds-formula { overflow: visible; }
