/* Mängelmelder – Anleitungen (15.10.2026). Druck mit WeasyPrint (bauen.sh). */
@page {
  size: A4;
  margin: 22mm 18mm 20mm 20mm;
  @top-left { content: string(kapitel); font: 8pt "Noto Sans", sans-serif; color: #6b7684; }
  @top-right { content: "Mängelmelder · Samtgemeinde Weser-Aue"; font: 8pt "Noto Sans", sans-serif; color: #6b7684; }
  @bottom-right { content: "Seite " counter(page) " von " counter(pages); font: 8pt "Noto Sans", sans-serif; color: #6b7684; }
  @bottom-left { content: "Stand 15.10.2026"; font: 8pt "Noto Sans", sans-serif; color: #6b7684; }
}
@page titel { margin: 0; @top-left { content: none; } @top-right { content: none; } @bottom-right { content: none; } @bottom-left { content: none; } }

:root { --blau: #2f5d8c; --blau2: #e3ecf5; --rot: #c62828; --orange: #ef6c00; --gruen: #2e7d32; --grau: #6b7684; --linie: #d6dde5; }
html { font-family: "Noto Sans", "DejaVu Sans", sans-serif; font-size: 10pt; line-height: 1.5; color: #1d232b; }
body { margin: 0; }
h1 { string-set: kapitel content(); font-size: 17pt; color: #2f5d8c; margin: 0 0 4mm; padding-bottom: 2mm; border-bottom: 2px solid #2f5d8c;
     page-break-before: always; break-after: avoid; }
h1 .nr { color: #6b7684; font-weight: 400; margin-right: 2mm; }
h2 { font-size: 12.5pt; color: #1d232b; margin: 6mm 0 2mm; break-after: avoid; }
h3 { font-size: 10.5pt; margin: 4mm 0 1.5mm; break-after: avoid; }
p { margin: 0 0 2.5mm; orphans: 3; widows: 3; }
ul, ol { margin: 0 0 3mm; padding-left: 6mm; }
li { margin-bottom: 1mm; }
a { color: #2f5d8c; text-decoration: none; }
code, .adr { font-family: "Noto Sans Mono", "DejaVu Sans Mono", monospace; font-size: 9pt; background: #f2f5f8; padding: 0 1mm; border-radius: 1mm; }
strong { font-weight: 700; }
.knopf { display: inline-block; background: #2f5d8c; color: #fff; font-weight: 600; font-size: 8.5pt; padding: 0 2mm; border-radius: 1mm; white-space: nowrap; }
.knopf.hell { background: #fff; color: #2f5d8c; border: 1px solid #2f5d8c; }
.marke { display: inline-block; background: #9c5a13; color: #fff; font-size: 7pt; font-weight: 700; padding: 0 1.2mm; border-radius: .7mm; letter-spacing: .05em; }

/* Kästen */
.tipp, .achtung, .merke { border-radius: 2mm; padding: 3mm 4mm; margin: 3mm 0 4mm; break-inside: avoid; }
.tipp { background: #e3ecf5; border-left: 1.2mm solid #2f5d8c; }
.achtung { background: #fdecea; border-left: 1.2mm solid #c62828; }
.merke { background: #edf6ee; border-left: 1.2mm solid #2e7d32; }
.tipp > :last-child, .achtung > :last-child, .merke > :last-child { margin-bottom: 0; }
.kasten-titel { font-weight: 700; display: block; margin-bottom: 1mm; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; margin: 2mm 0 4mm; font-size: 9pt; break-inside: avoid; }
th { text-align: left; background: #eef2f6; color: #3b4652; font-weight: 600; padding: 1.6mm 2mm; border-bottom: 1px solid #d6dde5; }
td { padding: 1.6mm 2mm; border-bottom: 1px solid #d6dde5; vertical-align: top; }
td:first-child { white-space: nowrap; }

/* Schrittlisten */
ol.schritte { list-style: none; padding: 0; counter-reset: s; }
ol.schritte > li { counter-increment: s; position: relative; padding-left: 10mm; margin-bottom: 2.5mm; break-inside: avoid; }
ol.schritte > li::before { content: counter(s); position: absolute; left: 0; top: -.3mm; width: 6.5mm; height: 6.5mm; border-radius: 50%;
  background: #2f5d8c; color: #fff; font-weight: 700; font-size: 9pt; text-align: center; line-height: 6.5mm; }

/* Bildschirmfotos mit Nummern */
figure { margin: 3mm 0 4mm; break-inside: avoid; }
figure .bild { position: relative; border: 1px solid #d6dde5; border-radius: 1.5mm; overflow: hidden; }
figure img { display: block; width: 100%; }
figcaption { font-size: 8.5pt; color: #6b7684; margin-top: 1.2mm; }
.nr-punkt { position: absolute; width: 6.5mm; height: 6.5mm; margin: -3.25mm 0 0 -3.25mm; border-radius: 50%; background: #c62828; color: #fff;
  font-weight: 700; font-size: 9pt; text-align: center; line-height: 6.5mm; border: .5mm solid #fff; box-shadow: 0 .3mm 1mm rgba(0,0,0,.35); }
.legende { list-style: none; padding: 0; margin: 2mm 0 4mm; }
.legende li { position: relative; padding-left: 9mm; margin-bottom: 1.6mm; break-inside: avoid; }
.legende li > b.n { position: absolute; left: 0; top: 0; width: 6mm; height: 6mm; border-radius: 50%; background: #c62828; color: #fff;
  font-size: 8.5pt; text-align: center; line-height: 6mm; }

/* Abbildungen (SVG) */
.abb { margin: 3mm 0 4mm; break-inside: avoid; text-align: center; }
.abb svg, .abb img { width: 100%; height: auto; }

/* Inhaltsverzeichnis */
.toc { list-style: none; padding: 0; margin: 4mm 0; }
.toc li { margin: 0 0 1.8mm; }
.toc a { color: #1d232b; }
.toc a::after { content: leader('.') target-counter(attr(href), page); color: #6b7684; }
.toc .nr { display: inline-block; width: 8mm; color: #2f5d8c; font-weight: 700; }

/* Titelseite */
.titelseite { page: titel; height: 297mm; position: relative; background: #2f5d8c; color: #fff; }
.titelseite .oben { padding: 38mm 56mm 0 22mm; }
.titelseite .klein { font-size: 10pt; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.titelseite h1.titel { string-set: none; page-break-before: avoid; font-size: 32pt; line-height: 1.15; color: #fff; border: 0; margin: 4mm 0 6mm; }
.titelseite .unter { font-size: 14pt; opacity: .92; max-width: 140mm; }
.titelseite .unten { position: absolute; left: 22mm; right: 22mm; bottom: 22mm; font-size: 9.5pt; opacity: .9; }
.titelseite .wappen { position: absolute; right: 22mm; top: 24mm; width: 26mm; }
.titelseite .bild img { width: 100%; display: block; }
.titelseite .bild { margin: 16mm 22mm 0; background: #fff; border-radius: 3mm; padding: 6mm; }

.zwei { display: flex; gap: 6mm; align-items: flex-start; }
.zwei > * { flex: 1; min-width: 0; }
.zwei > * + * { margin-left: 7mm; }   /* WeasyPrint 57 kennt kein gap in Flex */
.seitenumbruch { page-break-before: always; }
.klein-text { font-size: 8.5pt; color: #6b7684; }

.qr-tabelle td { vertical-align: middle; padding: 1.2mm 2mm; }
.qr-tabelle td:first-child { width: 22mm; }
.qr-tabelle img { width: 20mm; display: block; }

/* ---------- Bildschirmfassung (15.10.2026): dieselben Dateien als Webseite unter melden…/hilfe/ bzw. Verwaltung …/hilfe/ */
.pdf-leiste { display: none; }
@media screen {
  html { background: #e9eef3; }
  body { max-width: 210mm; margin: 0 auto; background: #fff; padding: 10mm 14mm 16mm; box-shadow: 0 0 12px rgba(0,0,0,.12); }
  .pdf-leiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; position: sticky; top: 0; z-index: 5;
    margin: -10mm -14mm 8mm; padding: 10px 14mm; background: #2f5d8c; color: #fff; font-size: 10pt; }
  .pdf-leiste a { color: #fff; font-weight: 600; text-decoration: underline; }
  .pdf-leiste a.knopf-pdf { background: #fff; color: #2f5d8c; text-decoration: none; padding: 5px 12px; border-radius: 4px; }
  .titelseite { height: auto; margin: -8mm -14mm 0; padding-bottom: 10mm; }
  .titelseite .unten { position: static; margin: 10mm 22mm 0; }
  h1 { margin-top: 14mm; padding-top: 2mm; }
  .toc a::after { content: none; }
  a:hover { text-decoration: underline; }
}
@media screen and (max-width: 760px) {
  body { padding: 0 16px 24px; box-shadow: none; }
  .pdf-leiste { margin: 0 -16px 20px; padding: 10px 16px; }
  .titelseite { margin: 0 -16px; }
  .titelseite .oben { padding: 24px 16px 0; }
  .titelseite .wappen { width: 18mm; right: 16px; top: 16px; }
  .titelseite h1.titel { font-size: 24pt; }
  .titelseite .bild { margin: 16px; }
  .titelseite .unten { margin: 16px; }
  .zwei { display: block; }
  .zwei > * + * { margin-left: 0; }
  table { display: block; overflow-x: auto; }
  td:first-child { white-space: normal; }
}
