/* Fahrplan (Etappe 8, 22.09.2026): Reiter in der Akte, Portal-Reiter, Druckfassung A4 hoch. */

/* ---------------------------------------------------------- Board + Portal */
.fp .zeile-block .zeile-neben { display: inline; }
.fp-kopf-knoepfe { margin-top: 0; flex-wrap: wrap; justify-content: flex-end; }
.fp-luecken { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--linie); border-radius: 10px; }
.fp-luecken ul { margin: 4px 0 0; }
/* Das Detail ist ein Grid (style.css); ohne minmax(0, 1fr) weitet eine breite
   Tabelle die Spur und die Seite bekommt bei 390 px einen Querbalken (22.09.) */
.fp-detail { padding: 6px 14px 16px 14px; grid-template-columns: minmax(0, 1fr); }
.fp-detail > * { min-width: 0; max-width: 100%; overflow-x: auto; }
@media (max-width: 640px) {
  .fp-tabelle th.rechts, .fp-tabelle td.rechts { white-space: normal; }
  .fp-tabelle th, .fp-tabelle td { padding: 5px 6px; font-size: 13px; }
  .fp-zeile { flex-direction: column; gap: 2px; }
  .fp-zeile .eck-label { min-width: 0; }
  .fp-kachel-wert { font-size: 19px; }
}
.fp-detail h4 { margin: 14px 0 6px; font-size: 14.5px; }
.fp-detail h5 { margin: 10px 0 4px; font-size: 13px; font-weight: 600; }
.fp-text-titel { border-top: 1px solid var(--linie); padding-top: 12px; margin-top: 18px !important; }
.fp-luecke {
  margin: 8px 0 12px; padding: 10px 12px; border-left: 3px solid var(--laeuft); border-radius: 6px;
  background: var(--flaeche2); font-size: 14px; line-height: 1.45;
}
.fp-block { margin: 6px 0 10px; }
.fp-zeile { padding: 4px 0; border-bottom: none; display: flex; gap: 10px; align-items: baseline; }
.fp-zeile .eck-label { min-width: 190px; flex: none; }
.fp-liste { margin: 4px 0 8px; padding-left: 20px; }
.fp-liste li { margin: 2px 0; }
.fp-tabelle { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
.fp-tabelle th, .fp-tabelle td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.fp-tabelle th { font-size: 12.5px; color: var(--gedimmt); font-weight: 550; }
.fp-tabelle th.rechts, .fp-tabelle td.rechts { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fp-tabelle tfoot td { font-weight: 600; border-bottom: none; border-top: 2px solid var(--linie); }
.fp-summe { margin: 4px 0 10px; }
.fp-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.fp-kachel { border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; background: var(--flaeche); }
.fp-kachel-wert { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fp-beob { margin: 8px 0 12px; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 10px; }
.fp-beob-kopf { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.fp-beob-titel { font-weight: 550; }
.fp-beob-feld { margin: 8px 0 0; }
.fp-beob-feld p { margin: 2px 0 0; white-space: pre-wrap; line-height: 1.5; }
.fp-phase { padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; }
.fp-phase-offen { border-style: dashed; }
.fp-phase-kopf { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
/* Kapitel 7 und 8 (16.10.2026): Vorhaben mit Kundentexten, Verweis auf die Broschuere */
.fp-vorhaben { padding: 10px 12px; border: 1px solid var(--linie); border-radius: 10px; }
.fp-vorhaben .fp-beob-label, .fp-phase .fp-beob-label { display: block; margin-top: 8px; }
.fp-verweis { margin-top: 12px; padding: 8px 12px; border-left: 3px solid var(--linie); }
.fp-eckdaten { padding: 8px 12px; border: 1px solid var(--linie); border-radius: 10px; }
.fp-text p { white-space: pre-wrap; line-height: 1.55; }
.fp-text-folgt { font-style: italic; }
.fp-text-knoepfe { margin-top: 6px; flex-wrap: wrap; align-items: center; }
.fp-textarea { width: 100%; min-height: 160px; resize: vertical; }
.fp-form textarea, .fp-form input { width: 100%; }
.fp-auswahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 4px 0 8px; }
.fp-haken { display: block; margin: 2px 0; font-size: 13.5px; color: var(--schrift); }
.fp-haken input { width: auto; margin-right: 6px; }
.fp-vorschau { padding-top: 10px; }
.fp-vorschau .fp-liste { margin-top: 2px; }
.fp-begriffe dt { font-weight: 600; margin-top: 8px; }
.fp-begriffe dd { margin: 2px 0 0; color: var(--gedimmt); }
.fp-herkunft { margin: -4px 0 6px; }

/* Kundenfassung (16.10.2026): Nutzen, Summenkasten, kleine Matrix, Begleitung,
   Grafik der technischen Einrichtung (su-*) */
.fp-summenkasten { margin: 8px 0 14px; padding: 10px 14px; border: 1px solid var(--akzent); border-radius: 12px; }
.fp-summenkasten:empty { display: none; }
.fp-summenkasten h4 { margin-top: 2px !important; }
.fp-nutzen p { margin: 2px 0 0; line-height: 1.5; }
.fp-nutzen-text { color: var(--gedimmt); }
.fp-vorhaben-kompakt p { margin: 3px 0 0; line-height: 1.45; }
.fp-nutzen-zeile { margin-top: 4px; }
.fp-ausblick { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--akzent); font-size: 1.04em; line-height: 1.55; }
.fp-matrix-klein { max-width: 420px; margin: 14px auto 6px; }
.fp-matrix-klein .mx-wrap { max-width: none; margin: 4px 0; }
.fp-spaeter h4 { margin-top: 14px; }
.fp-begleitung dt { font-weight: 600; margin-top: 8px; }
.fp-begleitung dd { margin: 2px 0 0; line-height: 1.5; }
.fp-annahmen { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--linie); font-size: .94em; }
.fp-annahmen h4 { margin-top: 0 !important; font-size: 13.5px; }
.fp-phase-kompakt p { margin: 4px 0 0; }
.fp-deck-satz { margin: 18px 0 0; font-size: 16px; max-width: 32em; line-height: 1.5; }
.fp-deck-inhalt { margin-top: 36px; }
.fp-weitere > .gedimmt { margin: 4px 0 8px; }
.su-wrap { margin: 8px 0 14px; }
.su-svg { width: 100%; height: auto; display: block; font-family: inherit; }
.su-box { fill: var(--flaeche2); stroke: var(--linie); stroke-width: 1.2; }
.su-akzent { stroke: var(--akzent); stroke-width: 1.8; }
.su-bib { fill: var(--flaeche); stroke: var(--akzent); stroke-width: 1.4; }
.su-kachel { fill: var(--flaeche2); stroke: var(--linie); stroke-width: 1; }
.su-unter { fill: var(--flaeche); stroke-dasharray: 5 4; }
.su-leiste { fill: var(--akzent); fill-opacity: .12; stroke: var(--akzent); stroke-width: 1.2; }
.su-titel { fill: var(--schrift); font-size: 12.5px; font-weight: 650; }
.su-text { fill: var(--schrift); font-size: 11px; }
.su-klein { fill: var(--gedimmt); font-size: 10.5px; }
.su-leiste-text { fill: var(--schrift); font-size: 12px; font-weight: 600; }
.su-pfeil { stroke: var(--gedimmt); stroke-width: 1.6; }
.su-pfeilspitze { fill: var(--gedimmt); }

/* Kurzprofil in der Kundenkarte und im Akte-Kopf (Schritt 0) */
.kp-zeile { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; }
.kp-zeile a { color: inherit; }
.kp-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; }
.kp-block h4 { margin: 0 0 4px; font-size: 12.5px; color: var(--gedimmt); text-transform: uppercase; letter-spacing: .06em; }
.kp-block p { margin: 0; line-height: 1.5; white-space: pre-wrap; }
.kp-leer { color: var(--gedimmt); font-style: italic; }

/* ------------------------------------------------------------ Druckfassung */
#fahrplan-druck { background: #f3f3ef; min-height: 100vh; }
#fahrplan-druck .fp-druck-seite { max-width: 880px; margin: 0 auto; padding: 16px 16px 40px; }
#fahrplan-druck .fp-druck-leiste {
  position: sticky; top: 8px; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid #ddd; border-radius: 10px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px); margin-bottom: 12px;
}
#fahrplan-druck .fp-druck-leiste .knopf-zeile { margin: 0; }
.fp-dokument {
  --grund: #fff; --flaeche: #fff; --flaeche2: #f4f4f0; --linie: #d9d9d2; --schrift: #111; --gedimmt: #666;
  --akzent: #6c4ff7; --gut: #2f8f3e; --schlecht: #c93c34; --laeuft: #b07d12;
  background: #fff; color: #111; padding: 28px 36px; border-radius: 12px; font-size: 14.5px; line-height: 1.55;
}
.fp-dokument h1 { font-size: 34px; margin: 40px 0 8px; }
.fp-dokument h2 { font-size: 22px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid #111; }
.fp-dokument h4 { margin: 16px 0 6px; font-size: 15px; }
.fp-dokument h5 { margin: 10px 0 4px; font-size: 13.5px; color: #444; }
.fp-dokument .abzeichen { color: #444; border-color: #d9d9d2; background: #f4f4f0; }
.fp-dokument .fp-luecke { background: #faf7ee; border-left-color: #b07d12; }
.fp-dokument a { color: #111; }
.fp-blatt { padding: 8px 0 24px; }
.fp-blatt + .fp-blatt { border-top: 1px dashed #d9d9d2; margin-top: 12px; padding-top: 24px; }
.fp-deckblatt { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.fp-marke { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: #666; }
.fp-deck-kunde { font-size: 20px; margin: 6px 0 0; }
.fp-deck-datum { margin: 24px 0 0; color: #444; }
.fp-deck-fuss { margin-top: 60px; }
.fp-inhaltsverzeichnis { padding-left: 24px; }
.fp-inhaltsverzeichnis li { margin: 4px 0; }
.fp-inhalt-hinweis { margin-top: 18px; }
.fp-kap4-bild { margin-top: 12px; }
/* Der eingebettete Prozess-Druck: keine Pfadnavigation, keine eigene Leiste */
.fp-kap4-bild .pz-pfad, .fp-kap4-bild .pz-druck-leiste { display: none !important; }
.fp-kap4-bild .pz-breit { width: 100%; margin-left: 0; }
.fp-druck-fuss { text-align: center; margin: 14px 0 0; }

@media print {
  #fahrplan-druck { background: #fff; }
  #fahrplan-druck .fp-druck-seite { max-width: none; padding: 0; margin: 0; }
  .fp-dokument { padding: 0; border-radius: 0; font-size: 11.5pt; }
  .fp-dokument h1 { font-size: 30pt; }
  .fp-dokument h2 { font-size: 17pt; }
  .fp-blatt { break-before: page; padding: 0; border-top: none !important; margin-top: 0 !important; }
  .fp-deckblatt { break-before: auto; min-height: 160mm; }
  .fp-kap4 { page: kapitel4; }
  /* Kapitel 7 (Punkt 112): die grosse Matrix als Querseite */
  .fp-kap7 { page: kapitel7; }
  .fp-kap7 .mx-wrap { break-inside: avoid; }
  /* 16.10.2026: die Vorhaben-Bloecke auf der Querseite zweispaltig */
  .fp-kap7 .fp-vorhaben-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
  .fp-kap7 .fp-vorhaben-liste > h4 { grid-column: 1 / -1; }
  .fp-kap7 .fp-vorhaben { margin: 0 0 10px; }
  /* Kapitel 8 (Schritt 4): die Zeitachse als Querseite, hell wie das Dokument */
  .fp-kap8 { page: kapitel8; }
  .fp-kap8 .za-wrap, .fp-kap8 .fp-phase { break-inside: avoid; }
  .fp-kap4 .pz-druck-blatt { break-after: page; }
  .fp-kap4 .pz-druck-blatt:last-child { break-after: auto; }
  .fp-tabelle tr, .fp-beob, .fp-phase, .fp-kachel, .fp-luecke, .fp-vorhaben { break-inside: avoid; }
  /* Kundenfassung (16.10.2026): alles A4 hoch, Matrix klein, Grafik am Stueck */
  .su-wrap, .fp-matrix-klein, .fp-summenkasten, .fp-begleitung, .fp-ausblick { break-inside: avoid; }
  .fp-spaeter li { break-inside: avoid; }
  .fp-spaeter h4 { break-after: avoid; }
  .fp-matrix-klein { max-width: 88mm; }
  /* Vorhaben und Phasen kompakt: ohne Rahmen, Trennlinie, duerfen umbrechen
     (lange Kundentexte liessen sonst halbe Seiten leer) */
  .fp-kap-vorhaben .fp-vorhaben, .fp-kap-weg .fp-phase {
    break-inside: auto; border: none; border-top: 1px solid #d9d9d2; border-radius: 0;
    margin: 0; padding: 6px 0 8px; font-size: 10.5pt; }
  .fp-kap-vorhaben .fp-vorhaben-kopf, .fp-kap-vorhaben .fp-phase-kopf, .fp-kap-weg .fp-phase-kopf { break-after: avoid; }
  .fp-kap-vorhaben .fp-beob-feld { margin-top: 4px; }
  .fp-kap-vorhaben .fp-vorhaben-liste > h4 { margin-top: 10px; }
  .fp-tabelle thead { display: table-header-group; }
  .fp-dokument h2, .fp-dokument h4 { break-after: avoid; }
  .kein-druck, body.fp-druckansicht #thema-frei { display: none !important; }
}
