/*
  HÄPPI-Entscheidungsbaum: Stylesheet der App (C3.11, aus design/screens/haeppi.css hervorgegangen)
  Tokens und Bausteine nach Designkonzept_HAEPPI.md. Auf haev-rlp.de greifen die
  Divi-Variablen --gcid-haev-*, sonst die Ersatzwerte.
  Work Sans bringt die Website mit (assets/fonts.css im Child-Theme), deshalb hier kein @font-face.
  Alles ist an .hp bzw. body.hp-seite gebunden, damit Kopf und Fuß der Website unberührt bleiben.
*/

:root {
  --haeppi-primaer: var(--gcid-haev-blau, #003da5);
  --haeppi-primaer-tief: var(--gcid-haev-blau-tief, #002e7d);
  --haeppi-primaer-hell: var(--gcid-haev-blau-hell, #edf1f9);
  --haeppi-text: var(--gcid-haev-text, #232220);
  --haeppi-text-gedaempft: var(--gcid-haev-text-gedaempft, #6e6d69);
  --haeppi-flaeche: var(--gcid-haev-nebel, #f6f8fb);
  --haeppi-linie: var(--gcid-haev-linie, #e4e7ec);
  --haeppi-weiss: var(--gcid-haev-weiss, #ffffff);
  --haeppi-akzent: var(--gcid-haev-lime, #c4d600);

  --haeppi-gruen: var(--gcid-haev-gruen, #009a44);
  --haeppi-gruen-tief: var(--gcid-haev-gruen-tief, #007a36);
  --haeppi-gruen-hell: #eaf6ee;
  --haeppi-orange: var(--gcid-haev-orange, #f1b434);
  /* Gold für „Teilweise“ bewusst fest (21.10.): die Website hat #8a5a00/#fdf3df */
  --haeppi-orange-tief: #9c5d00;
  --haeppi-orange-hell: #fff6e0;
  --haeppi-rot: var(--gcid-haev-rot, #e1523d);
  --haeppi-rot-tief: var(--gcid-haev-rot-tief, #c0392b);
  --haeppi-rot-hell: #fcecea;

  --haeppi-radius: 12px;
  --haeppi-radius-karte: 18px;
  --haeppi-radius-button: 6px;
  --haeppi-abstand-block: 32px;
  --haeppi-abstand-sektion: 78px;
  --haeppi-schatten-karte: 0 1px 2px rgb(16 24 40 / .04), 0 12px 32px -12px rgb(0 61 165 / .14);
  --haeppi-schatten: 0 1px 2px rgb(16 24 40 / .05), 0 10px 24px -8px rgb(0 61 165 / .22);
  --haeppi-uebergang: .18s cubic-bezier(.2, .7, .3, 1);
}

:where(.hp, .hp *, .hp *::before, .hp *::after) { box-sizing: border-box; }

body.hp-seite { overflow-x: clip; background: var(--haeppi-flaeche); }

.hp {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400; /* die Website setzt 500 */
  line-height: 1.62;
  color: var(--haeppi-text);
  -webkit-font-smoothing: antialiased;
}
/* Divis Grundregeln für Überschriften und Absätze (padding-bottom, color #333) neutralisieren */
.hp :where(h1, h2, h3, h4, h5, h6, p) { padding-bottom: 0; }
.hp :where(h1, h2, h3, h4, h5, h6) { color: inherit; }
/* hidden muss auch gegen display: flex/grid der Bausteine gewinnen */
.hp [hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Gerüst ---------- */

.hp { max-width: 1120px; margin: 0 auto; padding: 0 16px 120px; }

/* Kopfband über die volle Fensterbreite, Inhalt darunter ragt hinein */
.hp-band { position: relative; isolation: isolate; padding: 28px 0 64px; }
.hp-band::before {
  content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw);
  background:
    radial-gradient(circle at 88% 18%, rgb(196 214 0 / .55) 0 7px, transparent 8px),
    radial-gradient(circle at 92% -30%, transparent 0 150px, rgb(0 61 165 / .08) 151px 153px, transparent 154px),
    radial-gradient(circle at 100% 120%, rgb(0 61 165 / .07) 0 210px, transparent 211px),
    var(--haeppi-primaer-hell);
}
.hp-band + * { margin-top: -40px; }
.hp-band ~ * { position: relative; z-index: 1; }

.hp-titel {
  font-size: clamp(32px, 4.4vw, 50px); font-weight: 650; line-height: 1.06; letter-spacing: -.025em;
  margin: 0 0 14px;
}
.hp-titel::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 14px; border-radius: 2px; background: var(--haeppi-akzent); }
.hp-kopf { margin: 0; }
.hp-kopf::after { width: 32px; margin-top: 10px; }
.hp-lead { font-size: 19px; line-height: 1.55; color: var(--haeppi-text-gedaempft); margin: 0; max-width: 34em; }
.hp-h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 16px; }
.hp-h3 { font-size: 21px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 12px; }
.hp-klein { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--haeppi-text-gedaempft); }
.hp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--haeppi-primaer); }

.hp-karte {
  background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte);
  box-shadow: var(--haeppi-schatten-karte); padding: 22px 20px;
}

.icon { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }
/* Icon-Plakette: getönte Fläche hinter dem Linien-Icon */
.icon-l, .hp-frage__kopf .icon, .hp-baustein legend .icon {
  box-sizing: content-box; padding: 10px; border-radius: 14px;
  background: var(--haeppi-primaer-hell); color: var(--haeppi-primaer);
}
.icon-l { width: 28px; height: 28px; padding: 12px; background: var(--haeppi-primaer); color: var(--haeppi-weiss); border-radius: 16px; }

.ja   { --stufe: var(--haeppi-gruen);       --stufe-tief: var(--haeppi-gruen-tief);  --stufe-hell: var(--haeppi-gruen-hell); }
.teil { --stufe: var(--haeppi-orange-tief); --stufe-tief: var(--haeppi-orange-tief); --stufe-hell: var(--haeppi-orange-hell); --stufe-fuellung: var(--haeppi-orange); }
.nein { --stufe: var(--haeppi-rot);         --stufe-tief: var(--haeppi-rot-tief);    --stufe-hell: var(--haeppi-rot-hell); }

/* ---------- Buttons ---------- */

.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 22px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.7; letter-spacing: .01em;
  border-radius: var(--haeppi-radius-button); border: 1px solid var(--haeppi-primaer);
  background: var(--haeppi-primaer); color: var(--haeppi-weiss);
  box-shadow: 0 6px 16px -6px rgb(0 61 165 / .55);
  text-decoration: none; cursor: pointer;
  transition: background var(--haeppi-uebergang), box-shadow var(--haeppi-uebergang), transform var(--haeppi-uebergang);
}
.hp-btn:hover { background: var(--haeppi-primaer-tief); border-color: var(--haeppi-primaer-tief); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgb(0 61 165 / .6); }
.hp-btn .icon { width: 20px; height: 20px; transition: transform var(--haeppi-uebergang); }
.hp-btn:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }
.hp-btn:hover .icon:first-child:not(:last-child) { transform: translateX(-3px); }
.hp-btn--sek { background: var(--haeppi-weiss); color: var(--haeppi-primaer); border-color: rgb(0 61 165 / .35); box-shadow: none; }
.hp-btn--sek:hover { background: var(--haeppi-primaer-hell); border-color: var(--haeppi-primaer); box-shadow: none; }
.hp-btn[aria-disabled="true"] {
  background: var(--haeppi-linie); border-color: var(--haeppi-linie);
  /* #5c5b57 statt text-gedaempft: auf --haeppi-linie 5,5:1 statt 4,2:1 (der Knopf bleibt bedienbar) */
  color: #5c5b57; cursor: not-allowed; box-shadow: none; transform: none;
}
.hp-btn--breit { width: 100%; }

:where(.hp) :where(a, button, input, summary, .hp-btn):focus-visible {
  outline: 3px solid var(--haeppi-primaer); outline-offset: 2px;
}
/* Überschriften erhalten beim Screenwechsel per Skript den Fokus (Screenreader), ohne sichtbaren Rahmen */
.hp [tabindex="-1"]:focus { outline: none; }

/* ---------- Stepper Handy ---------- */

.hp-fortschritt { margin: 0 0 24px; }
.hp-fortschritt__text { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--haeppi-text-gedaempft); }
.hp-fortschritt__text strong { font-weight: 600; color: var(--haeppi-text); }
.hp-fortschritt__segmente { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 8px 0 1em; padding: 0; list-style: none; }
.hp-fortschritt__segmente li { height: 6px; border-radius: 3px; background: var(--haeppi-linie); }
.hp-fortschritt__segmente .erledigt { background: var(--haeppi-akzent); }
.hp-fortschritt__segmente .aktiv { background: var(--haeppi-primaer); }

/* ---------- Stepper Desktop (Seitenleiste) ---------- */

.hp-leiste { display: none; }

.hp-stepper ol { list-style: none; margin: 0; padding: 0; }
.hp-stepper > ol > li { position: relative; }
/* Verbindungslinie zwischen den Kreisen */
.hp-stepper > ol > li:not(:last-child)::after {
  content: ""; position: absolute; left: 14px; top: 36px; bottom: -4px; width: 2px; border-radius: 1px;
  background: var(--haeppi-linie);
}
.hp-stepper > ol > li:has(.hp-schritt--erledigt):not(:last-child)::after { background: var(--haeppi-akzent); }
.hp-schritt { position: relative; z-index: 1; display: flex; gap: 14px; align-items: center; min-height: 44px; padding: 4px 0; font-size: 15px; line-height: 1.35; color: var(--haeppi-text-gedaempft); text-decoration: none; }
a.hp-schritt, button.hp-schritt { color: var(--haeppi-text); }
button.hp-schritt { width: 100%; margin: 0; border: 0; background: none; font: inherit; font-size: 15px; line-height: 1.35; text-align: left; cursor: pointer; }
:is(a, button).hp-schritt:hover .hp-schritt__name { color: var(--haeppi-primaer); }
.hp-schritt__kreis {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; border: 2px solid var(--haeppi-linie); background: var(--haeppi-weiss);
  font-size: 13px; font-weight: 600; color: var(--haeppi-text-gedaempft);
}
.hp-schritt__kreis .icon { width: 16px; height: 16px; }
.hp-schritt--erledigt .hp-schritt__kreis { border-color: var(--haeppi-akzent); background: var(--haeppi-akzent); color: var(--haeppi-text); }
.hp-schritt--aktiv { color: var(--haeppi-text); font-weight: 600; }
.hp-schritt--aktiv .hp-schritt__kreis { background: var(--haeppi-primaer); border-color: var(--haeppi-primaer); color: var(--haeppi-weiss); box-shadow: 0 0 0 5px var(--haeppi-primaer-hell); }
.hp-unterfragen { margin: 2px 0 8px 44px !important; position: relative; z-index: 1; }
.hp-unterfragen li { display: flex; gap: 10px; align-items: center; padding: 3px 0; font-size: 14px; color: var(--haeppi-text-gedaempft); }
.hp-unterfragen li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--haeppi-linie); }
.hp-unterfragen .erledigt::before { background: var(--haeppi-akzent); }
.hp-unterfragen .aktiv { color: var(--haeppi-primaer); font-weight: 600; }
.hp-unterfragen .aktiv::before { background: var(--haeppi-primaer); box-shadow: 0 0 0 3px var(--haeppi-primaer-hell); }

/* ---------- Leselegende ---------- */

.hp-legende { background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte); box-shadow: var(--haeppi-schatten-karte); padding: 22px 20px; }
.hp-legende h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.5; color: var(--haeppi-primaer); margin: 0 0 14px; }
.hp-legende ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hp-legende li { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; font-size: 15px; line-height: 1.4; }
.hp-legende li .icon { grid-row: span 2; width: 20px; height: 20px; padding: 8px; border-radius: 50%; box-sizing: content-box; background: var(--stufe-hell); color: var(--stufe-tief); }
.hp-legende li strong { font-weight: 600; }
.hp-legende li span { color: var(--haeppi-text-gedaempft); font-size: 14px; }
.hp-legende--kompakt { padding: 18px 20px; background: transparent; box-shadow: none; border: 1px solid var(--haeppi-linie); }
.hp-legende--kompakt ul { gap: 8px; }
.hp-legende--kompakt li { grid-template-columns: 28px 1fr; }
.hp-legende--kompakt li .icon { width: 16px; height: 16px; padding: 6px; }
.hp-legende--kompakt li span { display: none; }

/* ---------- Hinweise ---------- */

.hp-hinweis { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--haeppi-text-gedaempft); margin: 0; }
.hp-hinweis .icon { color: var(--haeppi-primaer); width: 20px; height: 20px; margin-top: 1px; }

/* ---------- Start ---------- */

.hp-start { display: grid; }
.hp-start__intro { padding-bottom: 76px; }
.hp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; font-size: 14px; font-weight: 500; }
.hp-meta .icon { color: var(--haeppi-primaer); width: 18px; height: 18px; }
.hp-meta { width: fit-content; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--haeppi-weiss); box-shadow: 0 1px 2px rgb(16 24 40 / .06); }
.hp-start .hp-legende { margin-top: -52px; }
.hp-start__weiter { margin-top: 28px; }
.hp-hinweise { display: grid; gap: 12px; }
/* Gespeicherter Stand: Fortsetzen oder neu beginnen */
.hp-fortsetzen { margin: 28px 0 0; padding: 16px 18px; border-radius: var(--haeppi-radius); background: var(--haeppi-primaer-hell); }
.hp-fortsetzen p { margin: 0; font-size: 15px; line-height: 1.5; }
.hp-fortsetzen__knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px !important; }
.hp-fortsetzen__knoepfe .hp-btn { flex: 1 1 160px; }

/* ---------- Frage ---------- */

.hp-inhalt { min-width: 0; background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte); box-shadow: var(--haeppi-schatten-karte); padding: 22px 18px 26px; }
.hp-kategorie { display: flex; gap: 16px; align-items: center; padding: 0 0 22px; margin: 0 0 24px; border-bottom: 1px solid var(--haeppi-linie); }
.hp-kategorie .hp-h3 { margin: 0 0 2px; }
.hp-kategorie p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--haeppi-text-gedaempft); }
.hp-kategorie .hp-einordnung {
  display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--haeppi-primaer-hell); color: var(--haeppi-primaer); font-size: 14px; font-weight: 600;
}

.hp-frage { border: 0; margin: 0; padding: 0; min-width: 0; }
.hp-frage legend { padding: 0; float: left; width: 100%; }
.hp-frage legend + * { clear: both; }
.hp-frage legend > .hp-klein { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--haeppi-primaer); margin-bottom: 14px !important; }
.hp-frage__kopf { display: flex; gap: 16px; align-items: flex-start; }
.hp-frage__kopf .icon { width: 26px; height: 26px; }
.hp-frage__text { font-size: clamp(22px, 3.2vw, 28px); font-weight: 600; line-height: 1.22; letter-spacing: -.015em; margin: 0; }
/* Hinweis-Schalter unter der Frage, bündig mit dem Fragetext */
.hp-info {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 20px 0 0 62px; padding: 6px 14px 6px 10px;
  border: 1px solid rgb(0 61 165 / .3); border-radius: 999px; background: var(--haeppi-weiss);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--haeppi-primaer); cursor: pointer;
  transition: background var(--haeppi-uebergang), border-color var(--haeppi-uebergang);
}
.hp-info .icon { width: 18px; height: 18px; }
.hp-info:hover, .hp-info[aria-expanded="true"] { background: var(--haeppi-primaer-hell); border-color: transparent; }
.hp-info-text {
  margin: 12px 0 0 62px; padding: 12px 16px; border-radius: var(--haeppi-radius);
  background: var(--haeppi-flaeche); border: 1px solid var(--haeppi-linie); font-size: 15px; line-height: 1.5;
}

.hp-antworten { display: grid; gap: 10px; margin: 26px 0 0; padding: 0; }
.hp-antwort {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px 12px 12px;
  background: var(--haeppi-weiss); border: 1.5px solid var(--haeppi-linie); border-radius: var(--haeppi-radius);
  font-weight: 500; cursor: pointer;
  transition: border-color var(--haeppi-uebergang), box-shadow var(--haeppi-uebergang), transform var(--haeppi-uebergang), background var(--haeppi-uebergang);
}
.hp-antwort:hover { border-color: rgb(0 61 165 / .45); transform: translateY(-1px); box-shadow: var(--haeppi-schatten-karte); }
/* Stufen-Plakette links */
.hp-antwort .icon { order: 1; width: 20px; height: 20px; padding: 9px; box-sizing: content-box; border-radius: 50%; background: var(--stufe-hell); color: var(--stufe-tief); transition: background var(--haeppi-uebergang), color var(--haeppi-uebergang); }
/* Auswahlpunkt rechts */
.hp-antwort input {
  order: 3; appearance: none; flex: none; width: 22px; height: 22px; margin: 0 0 0 auto; border-radius: 50%;
  border: 2px solid #848a94; background: var(--haeppi-weiss); transition: all var(--haeppi-uebergang);
}
.hp-antwort > :not(input):not(svg) { order: 2; }
.hp-antwort input:checked { border-color: var(--stufe-tief); box-shadow: inset 0 0 0 4px var(--haeppi-weiss); background: var(--stufe-tief); }
.hp-antwort:has(input:checked) {
  border-color: var(--stufe-tief); border-width: 2px; padding: 11.5px 15.5px 11.5px 11.5px; background: var(--stufe-hell);
  font-weight: 600; box-shadow: var(--haeppi-schatten); transform: none;
}
.hp-antwort:has(input:checked) .icon { background: var(--stufe-tief); color: var(--haeppi-weiss); }
.hp-antwort.teil:has(input:checked) .icon { background: var(--haeppi-orange); color: var(--haeppi-text); }

.hp-rueckmeldung {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start;
  margin: 22px 0 0; padding: 16px 18px; border-radius: var(--haeppi-radius);
  background: var(--stufe-hell); border: 1px solid color-mix(in srgb, var(--stufe-tief) 25%, transparent);
  animation: hp-einblenden .25s ease-out both;
}
.hp-rueckmeldung__titel { display: contents; }
.hp-rueckmeldung__titel .icon { grid-row: span 2; width: 18px; height: 18px; padding: 8px; box-sizing: content-box; border-radius: 50%; background: var(--stufe-tief); color: var(--haeppi-weiss); }
.hp-rueckmeldung__titel { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--stufe-tief); }
.hp-rueckmeldung p { margin: 0; }
.hp-rueckmeldung > p:last-child { font-weight: 600; font-size: 17px; line-height: 1.4; }
@keyframes hp-einblenden { from { opacity: 0; transform: translateY(8px); } }

.hp-navigation {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgb(228 231 236 / .8);
}
.hp-navigation .hp-btn { flex: 1; }

/* ---------- DNA ---------- */

.hp-dna-liste { display: grid; gap: 12px; margin: 24px 0 0; }
.hp-baustein {
  margin: 0; padding: 16px; border: 1.5px solid var(--haeppi-linie); border-radius: var(--haeppi-radius); min-width: 0;
  background: var(--haeppi-weiss); transition: border-color var(--haeppi-uebergang);
}
.hp-baustein legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; display: flex; gap: 14px; align-items: center; font-weight: 500; line-height: 1.45; }
.hp-baustein legend .icon { width: 20px; height: 20px; padding: 9px; border-radius: 12px; }
.hp-baustein legend + * { clear: both; }
/* Segmentschalter */
.hp-segmente { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: var(--haeppi-flaeche); }
.hp-segment {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 8px;
  border: 1.5px solid transparent; border-radius: 7px;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: background var(--haeppi-uebergang), border-color var(--haeppi-uebergang);
}
.hp-segment:hover { background: var(--haeppi-weiss); }
.hp-segment input { position: absolute; opacity: 0; pointer-events: none; }
.hp-segment .icon { width: 18px; height: 18px; color: var(--stufe-tief); }
.hp-segment:has(input:checked) { border-color: var(--stufe-tief); background: var(--stufe-hell); font-weight: 600; box-shadow: 0 2px 6px -2px rgb(16 24 40 / .15); }
.hp-segment:has(input:focus-visible) { outline: 3px solid var(--haeppi-primaer); outline-offset: 2px; }
.hp-zaehler { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; font-size: 14px; font-weight: 600; }
.hp-zaehler::after { content: ""; flex: 1; max-width: 160px; height: 6px; border-radius: 3px; background: linear-gradient(var(--haeppi-akzent), var(--haeppi-akzent)) 0 / calc(var(--anteil, 5 / 7) * 100%) 100% no-repeat, var(--haeppi-linie); }

/* ---------- Ergebnis ---------- */

.hp-ergebnis { display: grid; gap: 20px; }
.hp-ergebnis > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }

.hp-status {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "bild bild" "score name" "text text" "fokus fokus";
  gap: 14px 18px; align-items: center; padding: 24px 22px; border-radius: var(--haeppi-radius-karte);
  background: var(--stufe-hell); box-shadow: var(--haeppi-schatten-karte);
  border: 1px solid color-mix(in srgb, var(--stufe-tief) 22%, transparent);
}
.hp-status img { grid-area: bild; width: 180px; height: 135px; justify-self: center; }
/* Schriftgröße schrumpft erst unter 372 px Breite, damit „HÄPPI-“ bei 320 px neben Ring und Icon passt */
.hp-status__name { grid-area: name; display: flex; flex-direction: column; margin: 0; font-size: clamp(22px, 7vw, 26px); font-weight: 650; line-height: 1.1; letter-spacing: -.02em; color: var(--stufe-tief); }
.hp-status__name > span { display: flex; align-items: center; gap: 8px; hyphens: auto; overflow-wrap: break-word; }
.hp-status__name > span .icon { width: 26px; height: 26px; }
.hp-status__name small { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--haeppi-text-gedaempft); margin-bottom: 4px; }
.hp-status__text { grid-area: text; margin: 0; }
.hp-status__fokus { grid-area: fokus; margin: 0; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--stufe-tief) 20%, transparent); font-size: 15px; line-height: 1.5; }

/* Punkte-Ring */
.hp-score {
  grid-area: score; position: relative; display: grid; place-content: center; text-align: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: conic-gradient(var(--stufe-tief) calc(var(--anteil) * 1turn), rgb(255 255 255 / .9) 0);
}
.hp-score::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--stufe-hell); }
.hp-score > * { position: relative; }
.hp-score__zahl { font-size: 30px; font-weight: 650; line-height: 1; letter-spacing: -.02em; }
.hp-score__max { font-size: 12px; font-weight: 500; color: var(--haeppi-text-gedaempft); }

.hp-abschnitt { background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte); box-shadow: var(--haeppi-schatten-karte); padding: 22px 20px; }
.hp-abschnitt > .hp-h3 { margin-bottom: 16px; }

.hp-bereiche { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; hyphens: auto; }
.hp-bereiche th, .hp-bereiche td { padding: 12px 0; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--haeppi-linie); }
.hp-bereiche tbody tr:last-child > * { border-bottom: 0; padding-bottom: 0; }
.hp-bereiche thead th { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--haeppi-text-gedaempft); padding-top: 0; }
.hp-bereiche tbody th { font-weight: 600; padding-right: 12px; }
.hp-bereiche .zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; font-weight: 600; }
.hp-bereiche .ampel { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--stufe-tief); font-weight: 500; font-size: 13px; }
.hp-bereiche .ampel .icon { width: 16px; height: 16px; }
.hp-balken { height: 8px; margin-top: 8px; border-radius: 4px; background: var(--haeppi-flaeche); box-shadow: inset 0 0 0 1px var(--haeppi-linie); overflow: hidden; }
.hp-balken span { display: block; height: 100%; border-radius: 4px; background: var(--stufe-fuellung, var(--stufe)); box-shadow: inset 0 0 0 1px var(--stufe-tief); }

.hp-schritte { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.hp-schritte li {
  counter-increment: s; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: var(--haeppi-radius); background: var(--haeppi-flaeche);
}
.hp-schritte li::before {
  content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; background: var(--haeppi-primaer); color: var(--haeppi-weiss); font-size: 15px; font-weight: 650;
}
.hp-schritte strong { font-weight: 600; line-height: 1.35; }
/* Lange Komposita (z. B. „Organisationsentwicklung“) trennen statt bei 320 px überzulaufen */
.hp-schritte strong, .hp-schritte span { hyphens: auto; overflow-wrap: break-word; }
.hp-schritte span { font-size: 14px; line-height: 1.4; color: var(--haeppi-text-gedaempft); }

.hp-dna-felder { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.hp-dna-felder li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--haeppi-primaer-hell); font-size: 15px; font-weight: 500; line-height: 1.3; }
.hp-dna-felder .icon { width: 16px; height: 16px; padding: 5px; box-sizing: content-box; border-radius: 50%; background: var(--haeppi-weiss); color: var(--haeppi-primaer); }

.hp-uebersicht { margin-top: 20px; padding: 6px 20px; background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte); box-shadow: var(--haeppi-schatten-karte); }
.hp-uebersicht[open] { padding-bottom: 20px; }
.hp-uebersicht summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 0; font-weight: 600; color: var(--haeppi-primaer); cursor: pointer; list-style: none; }
.hp-uebersicht summary::-webkit-details-marker { display: none; }
.hp-uebersicht summary::before { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .15s; margin: 0 4px; }
.hp-uebersicht[open] summary::before { transform: rotate(45deg); }
.hp-antworttabelle { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.hp-antworttabelle caption { text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--haeppi-primaer); padding: 22px 0 8px; }
.hp-antworttabelle th, .hp-antworttabelle td { padding: 10px 10px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--haeppi-linie); }
.hp-antworttabelle thead th { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--haeppi-text-gedaempft); }
.hp-antworttabelle tbody th { font-weight: 400; }
.hp-antworttabelle .nr { color: var(--haeppi-text-gedaempft); white-space: nowrap; width: 2.5em; font-variant-numeric: tabular-nums; }
.hp-antworttabelle .stufe { white-space: nowrap; color: var(--stufe-tief); font-weight: 600; }
.hp-antworttabelle .stufe .icon { width: 18px; height: 18px; margin-right: 4px; vertical-align: -3px; }
.hp-antworttabelle .leer { color: var(--haeppi-text-gedaempft); }
/* Handy: jede Antwort als Block (Nr. + Frage, darunter Antwort und Rückmeldung); im Druck bleibt die Tabelle */
@media screen and (max-width: 767px) {
  .hp-antworttabelle thead { display: none; }
  .hp-antworttabelle tr { display: grid; grid-template-columns: 2.5em 1fr; padding: 12px 0; border-bottom: 1px solid var(--haeppi-linie); }
  .hp-antworttabelle tbody th, .hp-antworttabelle td { border: 0 !important; padding: 0 !important; }
  .hp-antworttabelle .stufe { grid-column: 2; margin-top: 4px; }
  .hp-antworttabelle td:last-child { grid-column: 2; }
  .hp-antworttabelle .leer { display: none; }
}

/* CTA als blaue Fläche */
.hp-cta {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 26px 22px; border-radius: var(--haeppi-radius-karte);
  background: var(--haeppi-primaer); color: var(--haeppi-weiss); box-shadow: var(--haeppi-schatten);
}
.hp-cta::before { content: ""; position: absolute; z-index: -1; right: -70px; top: -70px; width: 200px; height: 200px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .12); }
.hp-cta::after { content: ""; position: absolute; z-index: -1; right: 28px; top: 26px; width: 12px; height: 12px; border-radius: 50%; background: var(--haeppi-akzent); }
.hp-cta .hp-h3 { display: flex; align-items: center; gap: 12px; color: var(--haeppi-weiss); }
.hp-cta .hp-h3 .icon { width: 20px; height: 20px; padding: 8px; box-sizing: content-box; border-radius: 12px; background: rgb(255 255 255 / .14); color: var(--haeppi-weiss); }
.hp-cta p { margin: 0 0 12px; }
.hp-cta .hp-klein { margin-bottom: 20px; color: rgb(255 255 255 / .85); }
.hp-cta .hp-btn { background: var(--haeppi-weiss); color: var(--haeppi-primaer); border-color: var(--haeppi-weiss); box-shadow: 0 8px 20px -8px rgb(0 0 0 / .4); }
.hp-cta .hp-btn:hover { background: var(--haeppi-primaer-hell); }
.hp-cta :focus-visible { outline-color: var(--haeppi-weiss); }
.hp-offen { background: rgb(196 214 0 / .25); color: var(--haeppi-weiss); padding: 0 4px; border-radius: 3px; }

.hp-aktionen { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Rückfrage vor „Neu starten“ (ersetzt die Knopfzeile) */
.hp-rueckfrage { margin-top: 24px; padding: 16px 18px; border-radius: var(--haeppi-radius); background: var(--haeppi-rot-hell); border-left: 4px solid var(--haeppi-rot-tief); }
.hp-fortsetzen .hp-rueckfrage { margin-top: 14px; background: var(--haeppi-weiss); }
.hp-rueckfrage p { margin: 0; font-size: 15px; line-height: 1.5; }
.hp-rueckfrage__knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px !important; }
.hp-rueckfrage__knoepfe .hp-btn { flex: 1 1 160px; }
.hp-rueckfrage .hp-btn:not(.hp-btn--sek) { background: var(--haeppi-rot-tief); border-color: var(--haeppi-rot-tief); box-shadow: none; }
.hp-rueckfrage .hp-btn:not(.hp-btn--sek):hover { background: #a02f23; border-color: #a02f23; }
.hp-aktionen .hp-btn { flex: 1 1 200px; }

/* ---------- Nur Handy ---------- */

@media (max-width: 767px) {
  .hp-frage__kopf { flex-direction: column; gap: 14px; }
  .hp-frage__kopf .icon { width: 22px; height: 22px; padding: 9px; border-radius: 12px; }
  .hp-info, .hp-info-text { margin-left: 0; }
  .hp-baustein legend { align-items: flex-start; gap: 12px; }
  .hp-baustein legend .icon { width: 22px; height: 22px; padding: 0; background: none; margin-top: 1px; }
}

/* Sehr schmal (320 px, 400 % Zoom): Ja/Teilweise/Nein brauchen nebeneinander 259 px, die
   Knopfleiste mit 22 px Innenabstand 320 px — deshalb Segmente stapeln, Knöpfe enger */
@media (max-width: 359.98px) {
  .hp-segmente { grid-template-columns: minmax(0, 1fr); }
  .hp-navigation .hp-btn { padding-inline: 14px; }
}

/* ---------- Desktop ab 768 px ---------- */

@media (min-width: 768px) {
  .hp { padding: 0 32px var(--haeppi-abstand-sektion); }
  .hp-band { padding: 44px 0 88px; }
  .hp-band + * { margin-top: -56px; }

  .hp-raster { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
  .hp-leiste { display: grid; gap: 16px; position: sticky; top: 24px; }
  .hp-stepper { background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte); box-shadow: var(--haeppi-schatten-karte); padding: 20px 20px 16px; }
  .hp-fortschritt { display: none; }
  .hp-inhalt { background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte); box-shadow: var(--haeppi-schatten-karte); padding: 36px 40px 40px; }
  .hp-inhalt > * { max-width: 680px; }

  .hp-antworten { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

  .hp-navigation {
    position: static; padding: 24px 0 0; margin-top: var(--haeppi-abstand-block);
    background: none; border: 0; border-top: 1px solid var(--haeppi-linie); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .hp-navigation .hp-btn { flex: 0 0 auto; }

  .hp-start { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "intro intro" "weiter legende"; column-gap: 56px; align-items: start; }
  .hp-start__intro { grid-area: intro; padding-bottom: 96px; }
  .hp-start .hp-legende { grid-area: legende; margin-top: -64px; padding: 28px; }
  .hp-start__weiter {
    grid-area: weiter; margin-top: -64px; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between;
    padding: 28px; background: var(--haeppi-weiss); border-radius: var(--haeppi-radius-karte); box-shadow: var(--haeppi-schatten-karte);
  }
  .hp-start__weiter > p { margin-top: 28px !important; }
  .hp-start .hp-btn--breit { width: auto; }

  .hp-segmente { max-width: 380px; margin-left: 52px; }

  .hp-ergebnis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .hp-ergebnis > div { gap: 24px; }
  .hp-status { grid-template-columns: auto minmax(0, 1fr) 150px; grid-template-areas: "score name bild" "text text bild" "fokus fokus bild"; padding: 28px; }
  .hp-status img { width: 150px; height: 113px; align-self: center; }
  .hp-abschnitt, .hp-cta { padding: 28px; }
  .hp-uebersicht { margin-top: 24px; padding: 8px 28px; }
  .hp-uebersicht[open] { padding-bottom: 28px; }
  .hp-aktionen .hp-btn { flex: 0 0 auto; }
  .hp-antworttabelle { table-layout: fixed; }
  .hp-antworttabelle .nr { width: 3em; }
  .hp-antworttabelle thead th:nth-child(2) { width: 50%; }
  .hp-antworttabelle thead th:nth-child(3) { width: 9.5em; }
}

/* ---------- Micro-Interactions ---------- */

/* Punkte-Ring zählt hoch, Balken wachsen, neuer Screen blendet ein */
@property --anteil { syntax: "<number>"; inherits: true; initial-value: 0; }
.hp-score { animation: hp-ring .9s cubic-bezier(.2, .7, .3, 1) .15s both; }
@keyframes hp-ring { from { --anteil: 0; } }
.hp-balken span { animation: hp-balken .7s cubic-bezier(.2, .7, .3, 1) .2s both; transform-origin: left; }
@keyframes hp-balken { from { transform: scaleX(0); } }
/* nur Deckkraft: ein transform würde die fixierte Handy-Navigation an die Karte binden */
.hp-wechsel { animation: hp-auf .3s ease-out both; }
@keyframes hp-auf { from { opacity: 0; } }
.hp-antwort input:checked { animation: hp-tupfer .25s ease-out; }
@keyframes hp-tupfer { 50% { transform: scale(1.18); } }
.hp-segment:has(input:checked) .icon { animation: hp-tupfer .25s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .hp, .hp * { transition: none !important; animation: none !important; }
}

/* ---------- Druck / PDF (UX-Konzept 3.8) ---------- */

@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  * { animation: none !important; transition: none !important; box-shadow: none !important; }
  body.hp-seite { background: #fff; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .hp { font-size: 10pt; line-height: 1.4; }
  /* Kopf und Fuß der Website (Divi-Theme-Builder) bzw. der Platzhalter in der Vorschau */
  .et-l--header, .et-l--footer, .site-header, .hp-aktionen, .hp-rueckfrage, .hp-navigation, .hp-cta .hp-btn, .hp-uebersicht summary, .hp-leiste, .hp-fortschritt { display: none !important; }
  .hp { max-width: none; padding: 0; }
  .hp-band { padding: 0 0 10px; }
  .hp-band::before { display: none; }
  .hp-band + * { margin-top: 0; }
  .hp-titel { font-size: 20pt; margin: 0 0 4px; }
  .hp-titel::after { margin-top: 6px; }
  .hp-lead { font-size: 11pt; }
  .hp-klein, .hp-hinweis, .hp-status__fokus, .hp-cta p { font-size: 9.5pt; }

  .hp-ergebnis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hp-ergebnis > div { gap: 10px; }
  .hp-status, .hp-abschnitt, .hp-cta { padding: 12px 14px; border: 1px solid #c9ced6; break-inside: avoid; }
  .hp-status { grid-template-columns: auto 1fr; grid-template-areas: "score name" "text text" "fokus fokus"; gap: 8px 12px; }
  .hp-status img { display: none; }
  .hp-status__name { font-size: 15pt; }
  .hp-score { width: 64px; height: 64px; }
  .hp-score::before { inset: 6px; }
  .hp-score__zahl { font-size: 18pt; }
  .hp-h3 { font-size: 12pt; margin-bottom: 8px !important; }
  .hp-bereiche, .hp-antworttabelle, .hp-schritte span { font-size: 9pt; }
  .hp-bereiche th, .hp-bereiche td { padding: 6px 0; }
  .hp-schritte { gap: 6px; }
  .hp-schritte li { padding: 6px 10px; grid-template-columns: 24px 1fr; }
  .hp-schritte li::before { width: 24px; height: 24px; font-size: 10pt; }
  .hp-dna-felder li { font-size: 9pt; padding: 3px 10px 3px 4px; }
  /* CTA ohne blaue Fläche, damit es schwarz-weiß lesbar bleibt */
  .hp-cta { background: #fff; color: var(--haeppi-text); }
  .hp-cta::before, .hp-cta::after { display: none; }
  .hp-cta .hp-h3, .hp-cta .hp-klein { color: var(--haeppi-text); }
  .hp-cta .hp-h3 .icon { background: var(--haeppi-primaer-hell); color: var(--haeppi-primaer); }

  .hp-uebersicht { margin-top: 10px; padding: 0 !important; break-before: auto; }
  .hp-antworttabelle { table-layout: fixed; }
  .hp-antworttabelle caption { padding: 10px 0 4px; }
  .hp-antworttabelle th, .hp-antworttabelle td { padding: 4px 8px 4px 0; }
  .hp-antworttabelle .nr { width: 3em; }
  .hp-antworttabelle thead th:nth-child(2) { width: 50%; }
  .hp-antworttabelle thead th:nth-child(3) { width: 8.5em; }
  .hp-antworttabelle tr { break-inside: avoid; }
}
