/* Flyer: Öffentlicher Sektor (/de/flyer/oeffentlicher-sektor).
   Builds on flyer-common.css. Spine of the page is the dependency map
   (one compromised remote access -> shared municipal IT provider -> six
   municipalities), rendered as an inline SVG whose colors come from the
   --fp-* tokens plus one petrol second accent (--ps-accent2). The
   letters A-D on the map point into the "Wo wir ansetzen" list next to
   it, so map and list read as one figure. Everything else (incident strip,
   two regulation bands, three-column modules/process/delivery, CTA) runs
   tight so the compact version stays on one A4 page. Extended version
   adds the procurement checklist and a FAQ block (.flyer-extra). */

.flyer-page {
  --ps-accent2: #33b8b8;
  --ps-accent2-soft: rgba(51, 184, 184, 0.14);
  --ps-accent2-border: rgba(51, 184, 184, 0.45);
}
@media print {
  .flyer-page {
    --ps-accent2: #137676;
    --ps-accent2-soft: #e3f2f2;
    --ps-accent2-border: #9fd0d0;
  }
}

/* ---- header ---- */
.ps-sheet .flyer-logo { margin-bottom: 10px; height: 30px; }
.ps-sheet .flyer-h1 { font-size: clamp(1.35rem, 2.4vw, 1.6rem); letter-spacing: 0; line-height: 1.25; margin-bottom: 0.45rem; max-width: 30em; }
.ps-sheet .flyer-subline { font-size: 0.84rem; line-height: 1.5; margin-bottom: 0.55rem; max-width: 52em; }

.ps-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 0.9rem; padding: 0; list-style: none; }
.ps-trust li { display: flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; color: var(--fp-muted); }
.ps-trust svg { flex-shrink: 0; width: 12px; height: 12px; color: var(--fp-accent); }

.ps-kicker {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-accent2);
}

.ps-h2 {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fp-muted);
  margin: 0 0 0.4rem;
  break-after: avoid;
}

/* ---- incident strip ---- */
.ps-incident {
  border-top: 1px solid var(--fp-border);
  border-bottom: 1px solid var(--fp-border);
  padding: 0.5rem 0 0.6rem;
  margin-bottom: 0.9rem;
  break-inside: avoid;
}
.ps-incident-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
.ps-incident-date { font-size: 0.7rem; font-weight: 700; color: var(--fp-muted-2); font-variant-numeric: tabular-nums; }
.ps-incident-title { font-size: 0.94rem; font-weight: 800; color: var(--fp-text); margin: 0 0 0.45rem; line-height: 1.25; }

.ps-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 0.35rem;
  padding: 0;
  list-style: none;
}
.ps-stages li {
  position: relative;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--fp-text);
  line-height: 1.45;
  padding: 0.55rem 0.7rem;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-radius: 7px;
}
.ps-stages li + li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--ps-accent2);
}
.ps-stage-num {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ps-accent2);
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.ps-incident-lesson { font-size: 0.74rem; color: var(--fp-muted); line-height: 1.45; margin: 0 0 5px; }
.ps-source { font-size: 0.66rem; color: var(--fp-muted-2); line-height: 1.45; margin: 0; }

/* ---- dependency map ---- */
.ps-map-section { margin-bottom: 0.9rem; }
.ps-map-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 14px; align-items: start; }

.ps-map { display: block; width: 100%; height: auto; font-family: var(--font-family); }
.ps-map .m-struct { stroke: var(--fp-border); stroke-width: 1.2; }
.ps-map .m-spread { stroke: var(--ps-accent2); stroke-width: 1.3; stroke-dasharray: 4 3; opacity: 0.8; }
.ps-map .m-attack { stroke: var(--ps-accent2); stroke-width: 2; }
.ps-map .m-arrowhead { fill: var(--ps-accent2); }
.ps-map .m-entry { fill: var(--ps-accent2-soft); stroke: var(--ps-accent2); stroke-width: 1.5; }
.ps-map .m-hub-halo { fill: none; stroke: var(--ps-accent2-border); stroke-width: 1; stroke-dasharray: 3 3; }
.ps-map .m-hub { fill: var(--fp-accent-soft); stroke: var(--fp-accent); stroke-width: 1.5; }
.ps-map .m-muni circle { fill: var(--ps-accent2-soft); stroke: var(--ps-accent2); stroke-width: 1.3; }
.ps-map .m-lbl { font-size: 9.5px; font-weight: 600; fill: var(--fp-muted); }
.ps-map .m-lbl-hub { font-size: 10px; font-weight: 700; fill: var(--fp-text); }
.ps-map .m-lbl-muni text { font-size: 9px; font-weight: 600; fill: var(--fp-muted); }
.ps-map .m-mark { font-size: 9px; font-weight: 800; fill: var(--fp-accent); letter-spacing: 0.04em; }
.ps-map .m-sub rect { fill: var(--fp-accent); }
.ps-map .m-sub text { font-size: 8.5px; font-weight: 800; fill: var(--fp-on-accent); }
.ps-map .m-sub .m-sub-lbl { font-size: 8.5px; font-weight: 600; fill: var(--fp-muted); }

.ps-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.ps-legend li { display: flex; align-items: center; gap: 6px; font-size: 0.66rem; color: var(--fp-muted-2); }
.ps-leg { display: inline-block; width: 10px; height: 10px; flex-shrink: 0; }
.ps-leg-entry { background: var(--ps-accent2-soft); border: 1.5px solid var(--ps-accent2); transform: rotate(45deg) scale(0.8); }
.ps-leg-hub { background: var(--fp-accent-soft); border: 1.5px solid var(--fp-accent); border-radius: 2px; }
.ps-leg-muni { background: var(--ps-accent2-soft); border: 1.5px solid var(--ps-accent2); border-radius: 50%; }

.ps-map-text { font-size: 0.76rem; color: var(--fp-muted); line-height: 1.5; margin: 0 0 0.6rem; }
.ps-surfaces { display: flex; flex-direction: column; gap: 8px; margin: 0.4rem 0 0; padding: 0; list-style: none; }
.ps-surfaces li { display: flex; gap: 8px; align-items: flex-start; }
.ps-idx {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: var(--fp-accent);
  color: var(--fp-on-accent);
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.ps-surfaces h3 { font-size: 0.78rem; font-weight: 700; color: var(--fp-text); margin: 0 0 2px; line-height: 1.3; }
.ps-surfaces p { font-size: 0.72rem; color: var(--fp-muted); line-height: 1.45; margin: 0; }

/* ---- regulation bands ---- */
.ps-reg { margin-bottom: 0.95rem; }
.ps-reg-bands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-reg-band {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--fp-surface);
  border: 1px solid var(--fp-border);
  border-left: 3px solid var(--ps-accent2);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
}
.ps-reg-label {
  flex-shrink: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-accent2);
  white-space: nowrap;
  align-self: stretch;
  text-align: center;
}
.ps-reg-band h3 { font-size: 0.82rem; font-weight: 700; color: var(--fp-text); margin: 0 0 4px; line-height: 1.3; }
.ps-reg-band p { font-size: 0.72rem; color: var(--fp-muted); line-height: 1.45; margin: 0; }
.ps-reg-note { font-size: 0.7rem; color: var(--fp-muted-2); line-height: 1.45; margin: 0.55rem 0 0; }

/* ---- bottom three columns ---- */
.ps-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-bottom: 0.95rem;
  break-inside: avoid;
}
.ps-modules, .ps-process, .ps-delivery { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
/* Kompaktfassung: nur noch die vier Module, je Zeile eine Kurzzeile in zwei
   Spalten. Ablauf und Ergebnis stehen in der Langfassung - auf einer Seite
   waren alle drei Spalten nebeneinander schlicht zu viel. */
.ps-modules { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.ps-modules li { display: flex; gap: 8px; align-items: baseline; }
.ps-modules li h3 { flex-shrink: 0; }
.flyer-page[data-version="extended"] .ps-bottom { grid-template-columns: 1.15fr 1.05fr 0.95fr; }
.flyer-page[data-version="extended"] .ps-modules { grid-template-columns: 1fr; gap: 10px; }
.flyer-page[data-version="extended"] .ps-modules li { display: block; }
.ps-modules h3 { font-size: 0.78rem; font-weight: 700; color: var(--fp-text); margin: 0 0 2px; line-height: 1.3; }
.ps-modules h3::before { content: "\2192\00a0"; color: var(--fp-accent); }
.ps-modules p { font-size: 0.72rem; color: var(--fp-muted); line-height: 1.45; margin: 0; }

.ps-process { gap: 11px; }
.ps-process li { display: flex; gap: 8px; align-items: flex-start; }
.ps-step {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--fp-accent-soft);
  color: var(--fp-accent);
  border: 1px solid var(--fp-accent-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 800;
}
.ps-process h3 { font-size: 0.78rem; font-weight: 700; color: var(--fp-text); margin: 0 0 2px; }
.ps-process p { font-size: 0.72rem; color: var(--fp-muted); line-height: 1.45; margin: 0; }

.ps-delivery { gap: 10px; }
.ps-delivery li { display: flex; gap: 7px; align-items: flex-start; }
.ps-delivery svg { flex-shrink: 0; width: 14px; height: 14px; margin-top: 1px; color: var(--ps-accent2); }
.ps-delivery p { font-size: 0.72rem; color: var(--fp-text); line-height: 1.45; margin: 0; }

/* ---- extended-only blocks ---- */
.ps-extra { margin-bottom: 1rem; }
.ps-extra-intro { font-size: 0.76rem; color: var(--fp-muted); line-height: 1.45; margin: 0 0 0.6rem; max-width: 60em; }
.ps-vergabe-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; margin: 0; padding: 0; list-style: none; }
.ps-vergabe-list li { display: flex; gap: 9px; align-items: flex-start; }
.ps-vergabe-list .ps-idx { background: var(--ps-accent2); }
.ps-vergabe-list h3 { font-size: 0.8rem; font-weight: 700; color: var(--fp-text); margin: 0 0 2px; }
.ps-vergabe-list p { font-size: 0.72rem; color: var(--fp-muted); line-height: 1.45; margin: 0; }

.ps-faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.ps-faq-item h3 { font-size: 0.82rem; font-weight: 700; color: var(--fp-text); margin: 0 0 3px; line-height: 1.3; }
.ps-faq-item p { font-size: 0.74rem; color: var(--fp-muted); line-height: 1.45; margin: 0; }

/* Kein erzwungener Seitenumbruch mehr: der Umbruchschutz in flyer-common.css
   verteilt die Abschnitte von selbst, der harte break-before liess Seite 1
   auf 81 Prozent abbrechen. */

/* ---- CTA ---- */
.ps-cta {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
  align-items: center;
  background: var(--fp-accent-soft);
  border: 1px solid var(--fp-accent-border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  break-inside: avoid;
}
.ps-cta h2 { font-size: 0.95rem; font-weight: 800; color: var(--fp-text); margin: 0 0 0.3rem; }
.ps-cta p { font-size: 0.76rem; color: var(--fp-muted); line-height: 1.5; margin: 0; }
.ps-cta-url { margin-top: 0.5rem !important; font-size: 0.72rem !important; color: var(--fp-text) !important; font-weight: 700; }
.ps-cta-url span { font-weight: 600; color: var(--fp-muted-2); }

.ps-cta-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: stretch; }
.ps-cta-actions .ps-contact { grid-column: 1 / -1; }
.ps-btn {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--fp-accent);
  color: var(--fp-on-accent) !important;
  text-decoration: none !important;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 7px 10px;
}
.ps-btn-ghost { background: transparent; color: var(--fp-accent) !important; border: 1px solid var(--fp-accent-border); }
.ps-contact { border-top: 1px solid var(--fp-accent-border); padding-top: 0.55rem; margin-top: 0; font-size: 0.74rem; gap: 1px; flex-direction: row; justify-content: space-between; flex-wrap: wrap; }

.ps-sheet .flyer-footer-legal { margin-top: 0.6rem; padding-top: 0.45rem; font-size: 0.68rem; }

@media (max-width: 700px) {
  .ps-stages { grid-template-columns: 1fr 1fr; }
  .ps-stages li + li::before { display: none; }
  .ps-map-layout, .ps-reg-bands, .ps-bottom, .ps-vergabe-list, .ps-faq-grid, .ps-cta { grid-template-columns: 1fr; }
}

/* Der Umbruchschutz in flyer-common.css haelt die direkten Kinder eines
   --flow-Abschnitts zusammen. Bei diesen beiden ist das direkte Kind die
   ganze Liste, die dadurch komplett auf die naechste Seite sprang und
   Seite 1 bei 74 Prozent enden liess. Hier bricht die Liste, ihre Punkte
   bleiben zusammen. */
@media print {
  .ps-vergabe-list, .ps-faq-grid { break-inside: auto; }
  .ps-vergabe-list > li, .ps-faq-grid > .ps-faq-item { break-inside: avoid; }
}

/* Langfassung: zwei Seiten statt einer, also mehr Luft. Gleiche Inhalte,
   groesserer Satz - die Kompaktfassung bleibt davon unberuehrt. */
.flyer-page[data-version="extended"] .ps-surfaces p,
.flyer-page[data-version="extended"] .ps-reg-band p,
.flyer-page[data-version="extended"] .ps-modules p,
.flyer-page[data-version="extended"] .ps-process p,
.flyer-page[data-version="extended"] .ps-delivery p,
.flyer-page[data-version="extended"] .ps-vergabe-list p { font-size: 0.78rem; line-height: 1.55; }
.flyer-page[data-version="extended"] .ps-surfaces h3,
.flyer-page[data-version="extended"] .ps-modules h3,
.flyer-page[data-version="extended"] .ps-process h3 { font-size: 0.82rem; margin-bottom: 3px; }
.flyer-page[data-version="extended"] .ps-map-text { font-size: 0.8rem; }
.flyer-page[data-version="extended"] .ps-incident-lesson { font-size: 0.78rem; }
.flyer-page[data-version="extended"] .ps-surfaces { gap: 17px; }
.flyer-page[data-version="extended"] .ps-modules,
.flyer-page[data-version="extended"] .ps-process,
.flyer-page[data-version="extended"] .ps-delivery { gap: 14px; }
.flyer-page[data-version="extended"] .ps-vergabe-list { gap: 13px 22px; }
.flyer-page[data-version="extended"] .ps-faq-grid { gap: 12px 24px; }
.flyer-page[data-version="extended"] .ps-extra,
.flyer-page[data-version="extended"] .ps-bottom { margin-bottom: 1.2rem; }
.flyer-page[data-version="extended"] .ps-incident,
.flyer-page[data-version="extended"] .ps-map-section,
.flyer-page[data-version="extended"] .ps-reg { margin-bottom: 1.15rem; }
.flyer-page[data-version="extended"] .ps-reg-band { padding: 0.95rem 1rem; }
