/* MoselSolar-Funnel in Heyflow-Optik
   Aufbau und Maße nach Robins Heyflow-Nachbau (app.advocura.legal/widerspruch/): Kopfleiste, Schrittanzeige,
   schmale Spalte, große Antwortkarten mit Auswahlkreis, Zurück-Quadrat + „Weiter“. Eigene Datei, kein Heyflow-CSS.
   Farben und Schriften nach moselsolar.com: Petrol #26484b / #1b3839, Grün-Verlauf #65c021 -> #c7e907,
   helles Grün #f4fedf, Bricolage Grotesque (Überschriften) und Raleway (Text), lokal eingebunden. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap; src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/raleway-latin.woff2") format("woff2"); }

:root {
  --ms-petrol: #26484b;
  --ms-petrol-dark: #1b3839;
  --ms-lime: linear-gradient(46deg, #65c021 10%, #c7e907 100%);
  --ms-lime-line: #8fd11a;
  --ms-green-text: #3f7f12;
  --ms-tint: #f4fedf;
  --ms-soft: #f7faf3;
  --ms-text: #24302f;
  --ms-muted: #5b6a68;
  --ms-line: #d3ddd8;
  --ms-red: #b3261e;
  --hf-col: 420px;
  --hf-head: "Bricolage Grotesque", "Trebuchet MS", Arial, sans-serif;
  --hf-body: "Raleway", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #fff; color: var(--ms-text); font: 400 16px/1.55 var(--hf-body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: var(--ms-petrol); }
button, input, select, textarea { font: inherit; }
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Kopf (wie Heyflow-Header) ---------- */
.hf-header { background: var(--ms-petrol); color: #fff; }
.hf-header__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 16px 12px; text-align: center; }
.hf-header__logo img { width: 190px; height: auto; aspect-ratio: 1024 / 205; }
.hf-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0; font: 500 13px/1.35 var(--hf-head); color: rgba(255, 255, 255, 0.92); }
.hf-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hf-trust span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--ms-lime); flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 0h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4zm14.2 7.3-1.4-1.4-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 0h16a4 4 0 0 1 4 4v16a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4zm14.2 7.3-1.4-1.4-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat; }
.hf-progress { height: 4px; background: #e4ebe7; }
.hf-progress__bar { height: 100%; width: 4%; background: var(--ms-lime); transition: width 300ms ease; }

/* ---------- Hauptbereich (heyflow-main / heyflow-form) ---------- */
.main { flex: 1; width: 100%; }
.main > form { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 10px 40px; }
section[data-type="user"] { opacity: 0; padding-top: 6px; }
section[data-type="user"].visible { opacity: 1; animation: hfSlideIn 200ms ease-in; }
section[data-type="user"]:focus { outline: none; }
@keyframes hfSlideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.block { width: 100%; max-width: var(--hf-col); margin: 0 auto; }
.text-block { max-width: 600px; text-align: center; }

/* Schrittanzeige (steps-list) */
.steps-block { max-width: 460px; padding: 18px 0 6px; }
.steps-list { position: relative; display: flex; justify-content: space-between; }
.steps-option { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #aab7b2; }
.steps-option:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: #e1e8e4; }
.steps-option.done:not(:last-child)::after { background: var(--ms-petrol); }
.steps-option .graphics-container { width: 26px; height: 26px; }
.steps-option .graphics-container svg { width: 26px; height: 26px; }
.steps-option .label { font: 500 14.5px/1.2 var(--hf-head); white-space: nowrap; }
.steps-option.done, .steps-option.current { color: var(--ms-petrol); }
.steps-option.current .label { font-weight: 700; }

/* Überschriften */
.hf-headline { margin: 26px auto 6px; max-width: 560px; color: var(--ms-petrol); font: 700 30px/1.16 var(--hf-head); letter-spacing: -0.015em; text-wrap: balance; }
.hf-headline span { background: linear-gradient(transparent 64%, rgba(143, 209, 26, 0.55) 64%); padding: 0 2px; }
.hf-question { margin: 10px auto 0; color: var(--ms-petrol-dark); font: 600 17px/1.4 var(--hf-head); }
.hf-title { margin: 22px auto 0; max-width: 520px; color: var(--ms-petrol); font: 700 27px/1.2 var(--hf-head); letter-spacing: -0.01em; text-wrap: balance; }
.hf-title:focus { outline: none; }
.hf-lead { max-width: 480px; margin: 10px auto 0; color: var(--ms-muted); font-size: 16px; text-align: center; }
.hf-note { max-width: 480px; margin: 10px auto 0; color: var(--ms-muted); font-size: 15px; text-align: center; }

/* Antwortkarten (multiple-choice) */
.hf-body { max-width: var(--hf-col); margin: 22px auto 0; }
.hf-body--start { margin-top: 14px; padding: 16px 0 8px; background: var(--ms-tint); border-radius: 0; }
.multiple-choice-block { border: 0; padding: 0; margin: 0 auto; min-width: 0; }
.multiple-choice { display: flex; flex-direction: column; gap: 10px; }
.multiple-choice-option { position: relative; display: block; cursor: pointer; }
.multiple-choice-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.option-content {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0.85em 1em;
  border: 1.5px solid var(--ms-lime-line); border-radius: 6px; background: #fff;
  transition: background-color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
}
.option-content .selector { flex: 0 0 22px; width: 22px; height: 22px; border: 1.5px solid #b9c5c1; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.option-content .selector.checkbox { border-radius: 5px; }
.option-content .selector svg { width: 13px; height: 13px; color: #fff; opacity: 0; }
.option-content .emoji { flex: none; font-size: 22px; line-height: 1; }
.option-content .label { min-width: 0; color: var(--ms-petrol-dark); font: 500 16.5px/1.35 var(--hf-body); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (hover: hover) { .multiple-choice-option:hover .option-content { background: var(--ms-soft); border-color: var(--ms-petrol); } }
.multiple-choice-option input:focus-visible + .option-content { outline: 3px solid var(--ms-lime-line); outline-offset: 3px; }
.multiple-choice-option input:checked + .option-content { background: var(--ms-tint); border-color: var(--ms-petrol); box-shadow: inset 0 0 0 1px var(--ms-petrol); }
.multiple-choice-option input:checked + .option-content .label { font-weight: 700; }
.multiple-choice-option input:checked + .option-content .selector { border-color: var(--ms-petrol); background: var(--ms-petrol); box-shadow: inset 0 0 0 4px #fff; }
.multiple-choice-option input:checked + .option-content .selector.checkbox { box-shadow: none; }
.multiple-choice-option input:checked + .option-content .selector svg { opacity: 1; }
/* kurze Antworten zweispaltig (Heyflow mc-grid), damit „Weiter“ auf dem Handy sichtbar bleibt */
.is-compact .multiple-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.is-compact .option-content { min-height: 56px; height: 100%; padding: 0.75em 0.8em; gap: 10px; }
.is-compact .option-content .label { font-size: 15.5px; }
.is-compact .option-content .emoji { font-size: 19px; }
.mc-chips { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.mc-chips .multiple-choice-option-container { flex: 1 1 calc(50% - 8px); }
.mc-chips .option-content { min-height: 50px; }

/* Eingabefelder */
.hf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; max-width: var(--hf-col); }
.hf-grid > .block { grid-column: span 2; max-width: none; }
.hf-grid > .is-half { grid-column: span 1; }
.hf-body > .hf-field + .hf-field, .hf-body > .block + .block { margin-top: 14px; }
.hf-grid > .block + .block { margin-top: 0; }
.hf-label { display: block; margin: 0 0 6px; padding: 0; color: var(--ms-petrol); font: 600 15px/1.35 var(--hf-head); }
.hf-optional { color: var(--ms-muted); font-weight: 500; }
.hf-input {
  width: 100%; min-height: 54px; padding: 13px 14px; border: 1.5px solid var(--ms-line); border-radius: 6px;
  background: #fff; color: var(--ms-petrol-dark); font: 500 16.5px/1.4 var(--hf-body); appearance: none; -webkit-appearance: none;
}
.hf-textarea { min-height: 96px; resize: vertical; }
.hf-select { padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2326484b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.hf-input::placeholder { color: #8b9894; }
.hf-input:focus { outline: none; border-color: var(--ms-petrol); box-shadow: 0 0 0 4px rgba(143, 209, 26, 0.3); }
.hf-help { margin: 6px 0 0; color: var(--ms-muted); font-size: 14px; }
.hf-error { margin: 6px 0 0; color: var(--ms-red); font: 600 14px/1.4 var(--hf-head); }
.hf-error--box { max-width: var(--hf-col); margin: 14px auto 0; padding: 12px 14px; border: 1px solid #e6b3ae; border-radius: 6px; background: #fff4f2; }
[data-invalid] .hf-input { border-color: var(--ms-red); background: #fffafa; }
[data-invalid] .option-content { border-color: #e09a93; }

/* Einwilligung */
.hf-consent-block { margin-top: 18px; }
.hf-consent { display: flex; gap: 12px; padding: 14px 14px; border: 1.5px solid var(--ms-line); border-radius: 6px; background: var(--ms-soft); font-size: 14px; line-height: 1.55; cursor: pointer; text-align: left; }
.hf-consent input { flex: 0 0 22px; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ms-petrol); }
.hf-consent[data-invalid] { border-color: var(--ms-red); background: #fffafa; }
.hf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Navigation (Zurück-Quadrat + Weiter) */
.navigation-block { margin-top: 26px; }
.navigation-container { display: flex; gap: 14px; align-items: stretch; }
.navigation-container--stack { flex-direction: column; gap: 12px; }
button.back { flex: 0 0 56px; height: 54px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: rgba(38, 72, 75, 0.09); color: var(--ms-petrol); cursor: pointer; }
button.back svg { width: 22px; height: 22px; }
button.back:hover { background: rgba(38, 72, 75, 0.16); }
button.generic-button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 12px 20px; border: 0; border-radius: 8px; cursor: pointer; font: 600 17px/1.2 var(--hf-head); transition: background-color 150ms ease, transform 150ms ease; }
button.generic-button svg { width: 20px; height: 20px; flex: none; }
.hf-next { background: var(--ms-petrol); color: #fff; box-shadow: 0 10px 22px rgba(27, 56, 57, 0.2); }
.hf-next:hover { background: var(--ms-petrol-dark); }
.hf-next[disabled] { opacity: 0.65; cursor: progress; }
.hf-secondary { background: #fff; color: var(--ms-petrol); border: 1.5px solid var(--ms-line) !important; }
.hf-secondary:hover { border-color: var(--ms-petrol) !important; }
button:focus-visible { outline: 3px solid var(--ms-lime-line); outline-offset: 3px; }
.hf-skip { max-width: var(--hf-col); margin: 16px auto 0; text-align: center; }
.hf-link { border: 0; background: none; padding: 6px; color: var(--ms-petrol); font: 600 15px/1.4 var(--hf-head); text-decoration: underline; text-decoration-color: var(--ms-lime-line); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.hf-start-note { margin-top: 18px; color: var(--ms-muted); font-size: 15px; }
.hf-start-note strong { color: var(--ms-petrol); }

/* Hinweis- und Danke-Seite */
.is-exit, .is-success { text-align: center; padding-top: 30px !important; }
.hf-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; }
.hf-icon svg { width: 32px; height: 32px; }
.hf-icon--info { background: var(--ms-tint); color: var(--ms-petrol); box-shadow: 0 0 0 10px rgba(143, 209, 26, 0.12); }
.hf-icon--done { background: var(--ms-lime); color: var(--ms-petrol-dark); box-shadow: 0 0 0 10px rgba(143, 209, 26, 0.16); }
.is-exit .navigation-block, .is-success .hf-next-list { max-width: var(--hf-col); margin-left: auto; margin-right: auto; }
.is-success .hf-title span { display: block; }
.hf-next-title { margin: 30px auto 0; color: var(--ms-petrol); font: 700 20px/1.3 var(--hf-head); }
.hf-next-list { list-style: none; margin: 14px auto 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.hf-next-list li { display: flex; gap: 14px; padding: 16px; border: 1.5px solid var(--ms-lime-line); border-radius: 8px; background: linear-gradient(58deg, #fff 31%, var(--ms-tint) 100%); }
.hf-next-index { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--ms-lime); color: var(--ms-petrol-dark); font: 700 14px/1 var(--hf-head); }
.hf-next-list strong { display: block; color: var(--ms-petrol); font: 700 16.5px/1.3 var(--hf-head); }
.hf-next-list p { margin: 4px 0 0; color: var(--ms-text); font-size: 15px; line-height: 1.5; }

/* Fuß */
.footer-container footer { padding: 22px 16px 28px; color: #7d8a86; font-size: 12.5px; text-align: center; }
.footer-container footer p { margin: 0 0 6px; }
.footer-container footer nav { display: flex; justify-content: center; gap: 16px; }
.footer-container footer a { color: var(--ms-muted); }

@media (min-width: 768px) {
  .hf-header__inner { padding: 16px 16px 14px; }
  .hf-header__logo img { width: 220px; }
  .hf-headline { font-size: 38px; margin-top: 36px; }
  .hf-title { font-size: 32px; margin-top: 28px; }
  .hf-body--start { background: transparent; padding-top: 6px; }
  .is-start .hf-body--start { position: relative; }
  .is-start .hf-body--start::before { content: ""; position: absolute; inset: -14px -28px -10px; z-index: -1; border-radius: 14px; background: var(--ms-tint); }
  section[data-type="user"] { position: relative; z-index: 0; }
}
@media (max-width: 340px) {
  .is-compact .multiple-choice { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .hf-grid > .is-half { grid-column: span 2; }
  .mc-chips .multiple-choice-option-container { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
