/* Depotsteuer – Druck (Nachweis-Ansicht, Browser-Druck als PDF).
   Wird nur mit media="print" geladen. A4, Tabellen brechen sauber um,
   Navigation und Bedienelemente entfallen. */

@page {
  size: A4;
  margin: 18mm 16mm 20mm 20mm;
  @bottom-right {
    content: "Seite " counter(page) " von " counter(pages);
    font-family: "Fira Sans", Arial, sans-serif;
    font-size: 8pt;
    color: #44525C;
  }
  @bottom-left {
    content: "Depotsteuer – Ausfüllhilfe, keine Steuerberatung";
    font-family: "Fira Sans", Arial, sans-serif;
    font-size: 8pt;
    color: #44525C;
  }
}

:root {
  --papier: #FFFFFF;
  --papier-tief: #F1F3F2;
  --steg: 11mm;
  --rand: 0mm;
  --lesespalte: none;
  --seitenbreite: none;
  --t-seite: 20pt;
  --t-titel: 14pt;
  --t-gross: 11.5pt;
}

html { font-size: 10pt; }
body {
  display: block;
  min-height: 0;
  background: #fff;
  color: #000;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Bedienung entfällt auf Papier */
.kopf, .sprung, .meldungen, .kopier, .fz__aktion, .fz__verweis,
.knopf, .knopfreihe, .aktionsform, .seitenkopf__aktionen,
.nicht-drucken, #ansage { display: none !important; }
.nur-druck { display: revert; }

.seite { max-width: none; margin: 0; padding: 0 0 0 var(--steg); }
.seite > * { max-width: none; }
.fuss { border-top: 0.5pt solid #000; margin-top: 8mm; }
.fuss__innen { padding: 2mm 0 0 var(--steg); }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { break-after: avoid; }
p, li, dd { orphans: 3; widows: 3; }

/* Umbruchhilfen für die Nachweis-Seite */
.seitenumbruch-vor { break-before: page; }
.seitenumbruch-nach { break-after: page; }
.zusammenhalten { break-inside: avoid; }

/* Formularzeilen: bleiben zusammen, Feld ohne Aktionsspalte */
.seite > .fa { max-width: none; }
.fa__spalten, .fz { grid-template-columns: calc(var(--nr) - var(--a3)) minmax(0, 1fr) 14mm 38mm; }
.fa__spalten > :last-child { display: none; }
.fz { break-inside: avoid; }
/* Der Abschnittskopf (Titel, Vordruck, Hinweis) bleibt in sich zusammen und bei seinen
   Zeilen - sonst steht die Überschrift am Blattende und die Zeile auf dem nächsten Blatt. */
.fa__kopf { break-inside: avoid; break-after: avoid; }
.fa__spalten { break-after: avoid; }

/* Tabellen: nicht scrollen, sondern umbrechen; Kopf auf jeder Seite wiederholen */
.tabelle { overflow: visible; max-height: none; }
.tabelle table { font-size: 8.5pt; }
.tabelle thead { display: table-header-group; }
.tabelle tfoot { display: table-row-group; }
.tabelle thead th, .tabelle tfoot > tr > *,
.tabelle--erste-fest th:first-child, .tabelle--erste-fest td:first-child {
  position: static;
  box-shadow: none;
}
.tabelle tr { break-inside: avoid; }
/* Kurze Tabellen (bis sechs Zeilen) bleiben ganz beisammen: sonst steht am Seitenende
   nur der Tabellenkopf und die Zeilen beginnen auf der nächsten Seite. */
.tabelle:not(:has(tbody tr:nth-child(7))) { break-inside: avoid; }
.tabelle th, .tabelle td { padding: 1.4mm 2mm; }
.tabelle thead th { white-space: normal; }
.wp { min-width: 30mm; max-width: 60mm; }

.rechnung tr, .prueffall, .meldung, .kennzahlen__eintrag, .leer, .merkmale > * { break-inside: avoid; }
.kennzahlen__wert { font-size: 13pt; }

/* Aufgeklapptes zeigt seinen Inhalt; basis.js öffnet vor dem Druck alle Abschnitte. */
.aufklapp > summary::before { display: none; }
.aufklapp > summary { min-height: 0; }
.aufklapp__inhalt { padding-left: 0; }

.schritte { display: none; }
