/* Kontenplan – Druck / PDF (A4 hochkant) */

@page {
  size: A4 portrait;
  margin: 16mm 15mm 19mm;
  @bottom-left {
    content: "Kontenplan";
    font: 7.5pt "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
    color: #7a8394;
  }
  @bottom-right {
    content: "Seite " counter(page) " von " counter(pages);
    font: 7.5pt "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
    color: #7a8394;
  }
}

html, body { background: #fff !important; color: #161b26 !important; }
body > *:not(#printArea) { display: none !important; }

#printArea {
  display: block !important;
  font: 9.6pt/1.38 "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  color: #161b26;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Titelkopf */
.p-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 10mm;
  padding-bottom: 4.5mm; margin-bottom: 7mm;
  border-bottom: 1.6pt solid #161b26;
}
.p-head h1 { margin: 0; font: 700 28pt/1 Georgia, "Times New Roman", serif; letter-spacing: -.01em; }
.p-sub { margin: 2.2mm 0 0; font-size: 9pt; color: #5a6272; }
.p-meta { text-align: right; font-size: 8.5pt; line-height: 1.5; color: #5a6272; white-space: nowrap; }

/* Klasse */
.p-klasse { margin: 0 0 8mm; }
.p-klasse.pb { break-before: page; }
.p-head + .p-klasse.pb { break-before: auto; }

.p-khead {
  display: flex; align-items: center; gap: 4.5mm;
  margin: 0 0 2.5mm; padding: 2mm 0;
  border-top: 1pt solid #161b26; border-bottom: .5pt solid #bdb7a6;
  break-after: avoid;
}
.p-kd { width: 11mm; text-align: center; font: 700 21pt/1 Georgia, "Times New Roman", serif; }
.p-kt { font-weight: 700; font-size: 11.5pt; line-height: 1.2; }
.p-kc { margin-left: auto; font-size: 8.5pt; color: #6a7284; white-space: nowrap; }

/* Gruppe */
.p-gruppe { margin: 0 0 3mm; }
.p-gruppe h3 {
  margin: 3.2mm 0 .8mm; font-size: 7.8pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; color: #5a6272;
  break-after: avoid;
}
.p-gruppe ul { list-style: none; margin: 0; padding: 0; }
.p-gruppe li {
  display: grid; grid-template-columns: 15mm minmax(0, 1fr) 19mm; column-gap: 4mm; align-items: baseline;
  padding: 1.05mm 0; border-bottom: .4pt solid #e1ddd0;
  break-inside: avoid;
}
.p-gruppe li:last-child { border-bottom: 0; }
.n { font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.b { overflow-wrap: anywhere; }
.a { text-align: right; font-size: 7.6pt; font-weight: 600; color: #5d6678; white-space: nowrap; }
.a::before { content: ""; display: inline-block; width: 1.5mm; height: 1.5mm; margin-right: 1.3mm; border-radius: 50%; background: currentColor; vertical-align: .05em; }
.a-aktiv { color: #1d5fd1; }
.a-passiv { color: #7a3fd1; }
.a-aufwand { color: #b8420d; }
.a-ertrag { color: #157a3c; }
