.sgf-app {
  --sgf-purple:#8c5a8c; --sgf-purple-soft:#f4edf5; --sgf-accent:#e88764; --sgf-yellow:#d9a230;
  --sgf-yellow-soft:#fbf3dd; --sgf-red:#b95c58; --sgf-red-soft:#fbebea; --sgf-line:#e8dfdb;
  --sgf-text:#302b29; --sgf-muted:#716966; --sgf-card:#fffdfa; --sgf-bg:#fbf8f6;
  color:var(--sgf-text); font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.5;
}
.sgf-app *{box-sizing:border-box}.sgf-shell{max-width:1180px;margin:24px auto;background:#fff;border:1px solid var(--sgf-line);border-radius:18px;overflow:hidden;box-shadow:0 12px 34px rgba(56,42,35,.07)}
.sgf-head{padding:28px 30px 24px;background:linear-gradient(135deg,#fff 0%,#fbf3ef 100%)}
.sgf-kicker{font-size:.79rem;text-transform:uppercase;letter-spacing:.08em;color:var(--sgf-purple);font-weight:850}.sgf-head h2{margin:5px 0 4px;font-size:2rem;line-height:1.1}.sgf-sub{margin:0;color:var(--sgf-muted)}
.sgf-privacy{margin-top:17px;padding:11px 13px;border-radius:9px;background:#fff;border:1px solid var(--sgf-line);font-size:.88rem;color:var(--sgf-muted)}
.sgf-steps{display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid var(--sgf-line);border-bottom:1px solid var(--sgf-line);background:#fff}.sgf-step-btn{border:0;border-right:1px solid var(--sgf-line);padding:12px 8px;background:#fff;color:var(--sgf-muted);cursor:pointer;font-weight:760}.sgf-step-btn:last-child{border-right:0}.sgf-step-btn.is-active{background:var(--sgf-purple-soft);color:var(--sgf-purple)}.sgf-step-btn.is-done{color:#4c724d}
.sgf-body{padding:28px 30px 34px}.sgf-panel h3{font-size:1.55rem;margin:0 0 6px}.sgf-lead{margin:0 0 18px;color:var(--sgf-muted)}.sgf-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.sgf-card{background:var(--sgf-card);border:1px solid var(--sgf-line);border-radius:14px;padding:17px}.sgf-card h4{margin:0 0 11px}.sgf-field{margin-bottom:14px}.sgf-field:last-child{margin-bottom:0}.sgf-field label{display:block;font-weight:760;margin-bottom:6px}.sgf-optional{font-weight:500;color:var(--sgf-muted);font-size:.82rem}.sgf-input,.sgf-select,.sgf-textarea{width:100%;border:1px solid #d8ceca;border-radius:9px;background:#fff;color:var(--sgf-text);padding:10px 11px}.sgf-input:focus,.sgf-select:focus,.sgf-textarea:focus{outline:2px solid rgba(140,90,140,.16);border-color:var(--sgf-purple)}.sgf-textarea{min-height:86px;resize:vertical}.sgf-textarea-short{min-height:78px}.sgf-source-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px}.sgf-check{display:flex;align-items:flex-start;gap:8px}.sgf-check input{margin-top:4px}
.sgf-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:25px 0 10px}.sgf-section-title h4{margin:0;font-size:1.1rem}.sgf-badge{display:inline-block;border-radius:999px;padding:6px 10px;font-size:.8rem;font-weight:830;background:var(--sgf-purple-soft);color:var(--sgf-purple)}.sgf-note{background:var(--sgf-purple-soft);border-left:4px solid var(--sgf-purple);padding:10px 12px;border-radius:8px;color:#5f4260;font-size:.91rem}.sgf-danger-note{background:var(--sgf-red-soft);border-left:4px solid var(--sgf-red);padding:10px 12px;border-radius:8px;color:#784545;font-size:.9rem}.sgf-spacer{height:10px}
.sgf-matrix-wrap{overflow-x:auto;border:1px solid var(--sgf-line);border-radius:14px;background:#fff}.sgf-matrix{width:100%;border-collapse:collapse;min-width:850px}.sgf-matrix th,.sgf-matrix td{padding:13px 12px;border-bottom:1px solid var(--sgf-line);vertical-align:top}.sgf-matrix th{background:#fbf7f5;text-align:left;font-size:.9rem}.sgf-matrix tr:last-child td{border-bottom:0}.sgf-cat-title{font-weight:820;margin-bottom:4px}.sgf-question{color:var(--sgf-muted);font-size:.9rem;max-width:580px}.sgf-parent-head{min-width:220px}.sgf-rating{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.sgf-rating button{min-height:42px;padding:7px 8px;border:1px solid #ded5d1;background:#fff;border-radius:8px;cursor:pointer;color:var(--sgf-text);font-size:.82rem;line-height:1.14}.sgf-rating button:hover{border-color:var(--sgf-accent)}.sgf-rating button.is-selected{color:#fff;border-color:transparent}.sgf-rating button[data-value="clear"].is-selected{background:var(--sgf-purple)}.sgf-rating button[data-value="partial"].is-selected{background:var(--sgf-yellow)}.sgf-rating button[data-value="none"].is-selected{background:#77706d}.sgf-rating button[data-value="na"].is-selected{background:#9e9895}
.sgf-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:24px;flex-wrap:wrap}.sgf-actions-right{display:flex;gap:8px;flex-wrap:wrap}.sgf-btn{border:1px solid var(--sgf-purple);background:var(--sgf-purple);color:#fff;border-radius:9px;padding:10px 15px;cursor:pointer;font-weight:820}.sgf-btn:hover{filter:brightness(.97)}.sgf-btn.secondary{background:#fff;color:var(--sgf-purple)}.sgf-btn.ghost{background:transparent;color:var(--sgf-muted);border-color:#cfc6c2}
.sgf-generated{border:1px solid #dfd2e2;background:#fff;border-radius:14px;padding:18px}.sgf-generated-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}.sgf-report-label{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:var(--sgf-muted);font-weight:800}.sgf-report-value{font-weight:820;margin-top:3px}.sgf-generated-reasons{margin:10px 0 14px;padding-left:20px;color:var(--sgf-muted)}
.sgf-report{margin-top:22px;background:#fff;border:1px solid var(--sgf-line);border-radius:14px;padding:28px}.sgf-report-brand{display:flex;justify-content:space-between;align-items:flex-end;border-bottom:3px solid var(--sgf-accent);padding-bottom:9px;margin-bottom:16px}.sgf-report-brand>div:first-child{display:flex;flex-direction:column}.sgf-report-brand strong{color:var(--sgf-purple);letter-spacing:.06em}.sgf-report-brand span{font-size:.82rem;color:var(--sgf-muted)}.sgf-brand-url{font-weight:800;color:var(--sgf-purple)}.sgf-report-head{margin-bottom:18px}.sgf-report-head h2{margin:0 0 4px;font-size:1.65rem}.sgf-report-meta{color:var(--sgf-muted);font-size:.9rem}.sgf-report-professional{margin-top:5px;font-size:.9rem;color:var(--sgf-text)}.sgf-report h3{font-size:1.12rem;margin:20px 0 7px;color:var(--sgf-purple)}.sgf-report p{margin:7px 0}.sgf-report-section{break-inside:avoid;page-break-inside:avoid}.sgf-report-note{font-size:.9rem;color:var(--sgf-muted);font-style:italic}.sgf-executive{padding:14px 16px;background:#fbf7fb;border-left:4px solid var(--sgf-purple);border-radius:9px}.sgf-method{font-size:.9rem;color:#514a47}.sgf-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.sgf-parent-chart{border:1px solid var(--sgf-line);border-radius:12px;padding:14px;background:#fffdfa}.sgf-parent-chart h4{text-align:center;margin:0 0 6px;color:var(--sgf-purple)}.sgf-tri-pie{display:block;width:205px;height:205px;margin:0 auto}.sgf-pie-name{font-size:11px;font-weight:800;fill:var(--sgf-text)}.sgf-pie-sub{font-size:7px;fill:var(--sgf-muted)}.sgf-tri-legend{display:grid;gap:5px;margin-top:6px;font-size:.83rem}.sgf-tri-legend-row{display:grid;grid-template-columns:13px 70px 1fr;gap:6px;align-items:center}.sgf-tri-dot{width:11px;height:11px;border-radius:50%;display:inline-block}.sgf-figure-note{font-size:.8rem;color:var(--sgf-muted);margin-top:8px}.sgf-report-footer{margin-top:26px;padding-top:11px;border-top:1px solid var(--sgf-line);font-size:.8rem;color:var(--sgf-muted);display:flex;justify-content:space-between;gap:12px}.sgf-report-footer strong{color:var(--sgf-purple)}.sgf-empty-report{color:var(--sgf-muted);font-style:italic}.sgf-login-note{padding:16px;border:1px solid #ddd;border-radius:8px}
@media (max-width:860px){.sgf-head,.sgf-body{padding-left:18px;padding-right:18px}.sgf-steps{grid-template-columns:1fr}.sgf-step-btn{border-right:0;border-bottom:1px solid var(--sgf-line);text-align:left}.sgf-grid-2,.sgf-chart-grid{grid-template-columns:1fr}.sgf-source-grid{grid-template-columns:1fr 1fr}.sgf-report-brand{align-items:flex-start;flex-direction:column;gap:6px}}
@media print{
  @page{
    size:A4 portrait;
    margin:7mm 7mm 18mm 7mm;
    @bottom-left{
      content:"Interne fachliche Arbeitshilfe · © Stark getrennt | Digitales Fachtool 1.0";
      font:7pt Arial,sans-serif;
      color:#555;
    }
    @bottom-right{
      content:"Seite " counter(page) " von " counter(pages);
      font:7pt Arial,sans-serif;
      color:#333;
    }
  }
  html,body{background:#fff!important;margin:0!important;padding:0!important}
  .sgf-app{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important}
  .sgf-shell{max-width:none!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}
  .sgf-head,.sgf-steps{display:none!important}
  .sgf-body{padding:0!important}
  .sgf-panel{display:none!important}
  .sgf-panel[data-panel="4"]{display:block!important}
  .sgf-panel[data-panel="4"]>*:not(.sgf-report){display:none!important}
  .sgf-report{display:block!important;position:static!important;width:100%!important;max-width:none!important;border:0!important;border-radius:0!important;padding:0!important;margin:0!important;box-shadow:none!important;color:#000!important;font-size:9.2pt!important;overflow:visible!important}
  .sgf-report *{visibility:visible!important;box-sizing:border-box!important}
  .sgf-no-print{display:none!important}
  .sgf-report-brand{border-bottom:2px solid #555}
  .sgf-report-brand strong,.sgf-brand-url,.sgf-report h3{color:#000!important}
  .sgf-report h2{font-size:16pt!important;margin-bottom:2mm!important}
  .sgf-report h3{font-size:11.5pt!important;margin:4.5mm 0 2mm!important}
  .sgf-report-head{padding:0 1mm 3mm!important;margin-bottom:2mm!important}
  .sgf-report-section{margin:0 1mm!important;break-inside:auto!important;page-break-inside:auto!important}
  .sgf-executive{padding:3mm 3.5mm!important;break-inside:auto!important;page-break-inside:auto!important}
  .sgf-chart-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4mm!important;width:100%!important;margin:0!important;align-items:start!important}
  .sgf-profile-card{min-width:0!important;max-width:100%!important;width:100%!important;border:1px solid #aaa!important;border-radius:2mm!important;padding:2.5mm!important;overflow:hidden!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .sgf-profile-card>h4{font-size:10.5pt!important;margin:0 0 1.5mm!important}
  .sgf-profile-row{grid-template-columns:minmax(0,42%) minmax(0,58%)!important;gap:1.5mm 2mm!important;padding:2mm!important;margin-top:1.5mm!important;border-radius:1.5mm!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .sgf-profile-label strong{font-size:8.9pt!important}.sgf-profile-label span{font-size:7.3pt!important;line-height:1.22!important}
  .sgf-profile-result{font-size:8.2pt!important;line-height:1.2!important;padding:1.4mm 1.8mm!important;border-radius:1.5mm!important;min-width:0!important;overflow-wrap:anywhere!important}
  .sgf-profile-spread{grid-column:1/-1!important;grid-template-columns:minmax(0,46%) minmax(0,54%)!important;gap:1.5mm!important;font-size:6.9pt!important;line-height:1.15!important;min-width:0!important}
  .sgf-profile-segments{min-width:0!important;gap:.8mm!important}
  .sgf-profile-segment{height:2.2mm!important;border-radius:.6mm!important}
  .sgf-figure-note{font-size:7.2pt!important;line-height:1.25!important;margin:2mm 1mm 0!important}
  .sgf-report p{margin:1.8mm 0!important;orphans:3;widows:3}
  .sgf-report-footer{position:relative!important;color:#333!important;border-top:1px solid #aaa!important;margin:5mm 1mm 0!important;padding:2.5mm 0 1mm!important;font-size:7.5pt!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .sgf-report-footer strong{color:#000!important}
  /* Hochformat: Profile untereinander und bewusst kompakter, damit jede Karte vollständig auf A4 passt. */
  .sgf-print-portrait .sgf-chart-grid{grid-template-columns:1fr!important;gap:2.5mm!important;max-width:174mm!important;margin:0 auto!important}
  .sgf-print-portrait .sgf-profile-card{padding:2mm 2.4mm!important;max-width:174mm!important;margin:0 auto!important}
  .sgf-print-portrait .sgf-profile-card>h4{font-size:9.4pt!important;margin:0 0 1mm!important}
  .sgf-print-portrait .sgf-profile-row{grid-template-columns:minmax(0,38%) minmax(0,62%)!important;padding:1.35mm 1.6mm!important;gap:.8mm 1.5mm!important;margin-top:1mm!important}
  .sgf-print-portrait .sgf-profile-label strong{font-size:7.8pt!important}
  .sgf-print-portrait .sgf-profile-label span{font-size:6.3pt!important;line-height:1.12!important}
  .sgf-print-portrait .sgf-profile-result{font-size:7pt!important;line-height:1.12!important;padding:1mm 1.2mm!important}
  .sgf-print-portrait .sgf-profile-spread{font-size:6pt!important;grid-template-columns:minmax(0,44%) minmax(0,56%)!important;gap:1mm!important}
  .sgf-print-portrait .sgf-profile-segment{height:1.8mm!important}
  .sgf-print-portrait .sgf-figure-note{max-width:174mm!important;margin:1.5mm auto 0!important;font-size:6.7pt!important}
  /* Querformat: beide Profile nebeneinander, ebenfalls mit Sicherheitsabstand zur Druckkante. */
  .sgf-print-landscape .sgf-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4mm!important;max-width:272mm!important;margin:0 auto!important}
  .sgf-print-landscape .sgf-profile-card{max-width:134mm!important;margin:0 auto!important}
}

/* 8.0.1 – klare Elternteil-Zuordnung und kantige Eingabefelder */
.sgf-input,.sgf-select,.sgf-textarea,.sgf-rating button{border-radius:0}
.sgf-parent-head.sgf-parent-a,.sgf-parent-cell.sgf-parent-a{background:#fff7f1}
.sgf-parent-head.sgf-parent-b,.sgf-parent-cell.sgf-parent-b{background:#f7f2f8}
.sgf-parent-head.sgf-parent-a,.sgf-parent-cell.sgf-parent-a{border-left:4px solid var(--sgf-accent)}
.sgf-parent-head.sgf-parent-b,.sgf-parent-cell.sgf-parent-b{border-left:4px solid var(--sgf-purple)}
.sgf-parent-head{font-weight:850}
.sgf-parent-card,.sgf-parent-block{border-radius:0}
.sgf-parent-card.sgf-parent-a,.sgf-parent-block.sgf-parent-a{background:#fff7f1;border-left:5px solid var(--sgf-accent)}
.sgf-parent-card.sgf-parent-b,.sgf-parent-block.sgf-parent-b{background:#f7f2f8;border-left:5px solid var(--sgf-purple)}
.sgf-parent-block{padding:12px 12px 14px;border:1px solid var(--sgf-line)}
.sgf-parent-block>strong{display:block;margin-bottom:7px;font-size:.93rem}

/* Lizenzaktivierung 1.0 */
.sgf-license-shell{max-width:760px;margin:36px auto;padding:0 16px}.sgf-license-card{border:1px solid #d8d8d8;background:#fff;padding:28px}.sgf-license-card h2{margin:4px 0 8px}.sgf-license-message{margin:14px 0;padding:12px 14px;border-left:4px solid #8c5a8c;background:#f7f3f7}.sgf-license-submit{margin-top:14px}.sgf-license-submit:disabled{opacity:.65;cursor:wait}.sgf-license-privacy{font-size:.9rem;line-height:1.5;margin-top:20px;color:#555}.sgf-license-input{text-transform:uppercase;letter-spacing:.035em}

/* Version 1.0 – qualitative Dimensionsprofile */
.sgf-field-help{margin-top:5px;font-size:.78rem;line-height:1.35;color:var(--sgf-muted)}
.sgf-profile-card{border:1px solid var(--sgf-line);border-radius:12px;padding:14px;background:#fffdfa}
.sgf-profile-card>h4{margin:0 0 10px;color:var(--sgf-purple);font-size:1.1rem}
.sgf-profile-row{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(190px,1.2fr);gap:9px 14px;padding:12px;border-radius:10px;margin-top:10px;break-inside:avoid;page-break-inside:avoid}
.sgf-profile-dynamics{background:#f8f2f8}.sgf-profile-protection{background:#fff9ea}.sgf-profile-burden{background:#fff3ef}
.sgf-profile-label{display:flex;flex-direction:column;gap:2px}.sgf-profile-label strong{font-size:.95rem;color:var(--sgf-text)}.sgf-profile-label span{font-size:.78rem;color:var(--sgf-muted)}
.sgf-profile-result{align-self:center;font-weight:800;line-height:1.3;padding:8px 10px;border-radius:8px;background:rgba(255,255,255,.68);text-align:center}
.sgf-profile-spread{grid-column:1/-1;display:grid;grid-template-columns:minmax(190px,auto) 1fr;gap:10px;align-items:center;font-size:.76rem;color:var(--sgf-muted)}
.sgf-profile-segments{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;min-width:160px}
.sgf-profile-segment{height:10px;border-radius:3px;background:#e5e4e8;border:1px solid rgba(0,0,0,.03)}
.sgf-profile-dynamics .sgf-profile-segment.is-hint{background:#a578ad}.sgf-profile-protection .sgf-profile-segment.is-hint{background:#e2ac38}.sgf-profile-burden .sgf-profile-segment.is-hint{background:#e48669}
.sgf-profile-segment.is-none{background:#dedde1}.sgf-profile-segment.is-na{background:repeating-linear-gradient(135deg,#f1f0f2 0,#f1f0f2 4px,#d8d6dc 4px,#d8d6dc 7px)}
@media (max-width:680px){.sgf-profile-row{grid-template-columns:1fr}.sgf-profile-spread{grid-template-columns:1fr}.sgf-profile-result{text-align:left}.sgf-profile-segments{min-width:0}}
@media print{.sgf-profile-card{border:1px solid #aaa}.sgf-profile-row{padding:8px}.sgf-profile-spread{font-size:8pt}.sgf-profile-segment{height:7px}}

.sgf-print-choice{display:flex;align-items:center;gap:7px;font-size:.82rem;font-weight:760;color:var(--sgf-muted)}.sgf-print-select{width:auto;min-width:130px;padding:8px 9px}

/* Herkunft der fachlichen Bewertungen in Bildschirm- und Druckbericht */
.sgf-source-subtitle { font-size: .88em; line-height: 1.5; color: #52606d; margin: .2em 0 1em; }
.sgf-result-source { display: block; margin-top: .3em; font-size: .75em; line-height: 1.4; font-weight: 400; color: #52606d; }
@media print { .sgf-source-subtitle, .sgf-result-source { color: #333 !important; break-inside: avoid; } }
/* Fachtool 2.3: Sicherheitshinweise werden nur bei vorhandenem Prüfanlass eingeblendet. */
.sgf-app [data-safety-preview][hidden]{display:none!important}
.sgf-safety-section{border-left:4px solid #b35d44;padding:12px 14px;background:#fff9f6}

/* Interne Zweckbindung und fachliche Exportfreigabe */
.sgf-approval{margin:14px 0;padding:14px 16px;border:1px solid #b9a4c4;border-radius:10px;background:#fbf8fc}
.sgf-approval label{display:flex;align-items:flex-start;gap:10px;line-height:1.45;cursor:pointer}
.sgf-approval input{flex:none;margin-top:4px;width:17px;height:17px}
.sgf-approval [data-approval-error]{color:#9d3428;font-weight:700}
.sgf-internal-label{background:#f3eef5;padding:9px 12px;border-left:4px solid #72507d;font-size:.9rem}
@media print{.sgf-internal-label{border:1px solid #777!important;padding:2mm!important;break-inside:avoid!important}}

/* Version 3.1: compact report title and end-of-report usage notice */
.sgf-report-subtitle{font-size:1.02rem;font-weight:700;color:var(--sgf-purple);margin:0 0 7px}
.sgf-internal-note{margin:16px 0 8px;padding:9px 12px;border:1px solid #d7ced9;border-radius:7px;background:#faf8fb;font-size:.84rem;line-height:1.4;break-inside:avoid;page-break-inside:avoid}
.sgf-internal-note strong{color:#4a3354}
.sgf-internal-note p{margin:4px 0 0}
.sgf-report-footer{text-align:center}
@media print{.sgf-internal-note{padding:2.5mm!important;border:1px solid #bbb!important;background:#fff!important;font-size:8pt!important;break-inside:avoid!important;page-break-inside:avoid!important}.sgf-report-subtitle{font-size:11pt!important}.sgf-report-footer{text-align:center!important}}

/* Report title in black in browser and printed PDF */
.sgf-report .sgf-report-head h2{color:#000!important}
@media print{.sgf-report .sgf-report-head h2{color:#000!important}}

/* Informationsquellen – kompakte Gruppen, mobil untereinander */
.sgf-source-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.sgf-source-group{display:flex;flex-direction:column;gap:7px;min-width:0}
.sgf-source-group>strong{margin-bottom:4px}
.sgf-choice-group{display:flex;flex-direction:column;gap:9px;margin-top:8px}
.sgf-choice-group .sgf-check,.sgf-source-group .sgf-check{align-items:flex-start;overflow-wrap:anywhere}
@media(max-width:900px){.sgf-source-groups{grid-template-columns:1fr}}
.sgf-field .sgf-choice-group label.sgf-check{display:flex;font-weight:400;margin-bottom:0;gap:8px;cursor:pointer}
.sgf-source-group label.sgf-check{display:flex;font-weight:400;cursor:pointer}
.sgf-choice-group input[type=radio],.sgf-source-group input[type=checkbox]{flex:0 0 auto}
