/* Strecken-Kern (11/2026). Farben und Radien aus dem OPTIFIN Design System:
   Blau #216197 / #174c73, Orange #f58220 (Hover Schiefer #344054), Text #101828 / #475467,
   Linien #eaecf0 / #d0d5dd, Flächen #f2f4f7 / #eff8ff, Radien 8 / 12 / 16 px. */

.kern { --k-blau: #216197; --k-blau-d: #174c73; --k-orange: #f58220; --k-text: #101828; --k-grau: #475467; --k-linie: #d0d5dd; --k-linie-h: #eaecf0; --k-flaeche: #f2f4f7; --k-hell: #eff8ff; --k-rot: #b42318;
  max-width: 800px; margin: 32px auto 72px; padding: 0 16px; box-sizing: border-box; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--k-grau); }
.kern *, .kern *::before, .kern *::after { box-sizing: border-box; }
.kern [hidden] { display: none !important; }

.kern-kopf h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.2; font-weight: 600; color: var(--k-text); }
.kern-einleitung { margin: 0 0 20px; font-size: 17px; line-height: 1.6; }
.kern-fortschritt { height: 6px; border-radius: 999px; background: var(--k-linie-h); overflow: hidden; }
.kern-fortschritt-balken { display: block; height: 100%; width: 0; background: var(--k-orange); border-radius: 999px; transition: width .3s ease; }
.kern-fortschritt-text { margin: 8px 0 0; font-size: 14px; color: var(--k-grau); }

.kern-abschnitt { margin: 28px 0 0; padding: 28px; border: 1px solid var(--k-linie-h); border-radius: 16px; background: #fff; }
.kern-abschnitt h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 0; border: 0; font-size: 22px; line-height: 1.3; font-weight: 600; color: var(--k-text); }
.kern-abschnitt h2::after, .kern-abschnitt h2::before { content: none; }
.kern-nr { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: var(--k-blau); color: #fff; font-size: 15px; font-weight: 600; flex-shrink: 0; }

.kern-feld { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.kern-feld:last-child { margin-bottom: 0; }
.kern-feld legend, .kern-label { display: block; margin: 0 0 8px; padding: 0; font-size: 16px; font-weight: 600; color: var(--k-text); }
.kern-stern { color: var(--k-orange); }
.kern-hinweis { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--k-grau); }
.kern-fehler { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: var(--k-rot); font-weight: 500; }
.kern-fehler:empty { display: none; }

.kern-eingabe { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--k-linie); border-radius: 8px; background: #fff; color: var(--k-text); font-size: 16px; line-height: 1.4; font-weight: 400; font-family: inherit; }
.kern-eingabe:focus { outline: none; border-color: var(--k-blau); box-shadow: 0 0 0 3px rgba(33, 97, 151, .18); }
.kern-kurz { max-width: 160px; }
textarea.kern-eingabe { min-height: 110px; resize: vertical; }
.kern-betrag { position: relative; max-width: 320px; }
.kern-betrag .kern-eingabe { padding-right: 40px; font-variant-numeric: tabular-nums; }
.kern-einheit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--k-grau); font-weight: 600; }
.kern-ungueltig .kern-eingabe { border-color: var(--k-rot); }

/* Kacheln (Vorhaben) und Pillen (kurze Auswahl) als Radio-/Checkbox-Gruppen */
.kern-optionen { display: flex; flex-wrap: wrap; gap: 8px; }
.kern-typ-kacheln .kern-optionen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kern-option { position: relative; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.kern-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.kern-option-label { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--k-text); }
.kern-option-text { display: block; font-size: 13px; line-height: 1.35; color: var(--k-grau); }

.kern-typ-kacheln .kern-option { min-height: 84px; padding: 14px 14px 12px; border: 1.5px solid var(--k-linie-h); border-radius: 12px; background: #fff; transition: border-color .2s, background-color .2s; }
.kern-typ-kacheln .kern-option:hover { border-color: var(--k-blau); }
.kern-typ-kacheln .kern-option:has(input:checked) { border-color: var(--k-blau); background: var(--k-hell); box-shadow: inset 0 0 0 1px var(--k-blau); }

.kern-typ-pillen .kern-option, .kern-typ-mehrfach .kern-option { flex-direction: row; }
.kern-typ-pillen .kern-option-label, .kern-typ-mehrfach .kern-option-label { padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; border: 1.5px solid var(--k-linie); border-radius: 999px; background: #fff; font-weight: 500; transition: border-color .2s, background-color .2s, color .2s; }
.kern-typ-pillen .kern-option:hover .kern-option-label, .kern-typ-mehrfach .kern-option:hover .kern-option-label { border-color: var(--k-blau); }
.kern-typ-pillen input:checked + .kern-option-label, .kern-typ-mehrfach input:checked + .kern-option-label { background: var(--k-blau-d); border-color: var(--k-blau-d); color: #fff; }

.kern-option input:focus-visible + .kern-option-label, .kern-typ-kacheln .kern-option:has(input:focus-visible) { outline: 3px solid var(--k-orange); outline-offset: 2px; }
.kern-ungueltig .kern-typ-kacheln .kern-option, .kern-typ-kacheln.kern-ungueltig .kern-option { border-color: #f4b4ad; }

.kern-umleitung { margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; background: #fef6ee; color: var(--k-text); font-size: 15px; }
.kern-umleitung p { margin: 0; }
.kern-umleitung a { font-weight: 600; color: var(--k-blau); }

.kern-check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--k-text); cursor: pointer; }
.kern-check input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--k-blau); }
.kern-check a { color: var(--k-blau); font-weight: 600; }

/* Freiwillige Angaben */
.kern-mehr { margin: 22px 0 0; border-top: 1px solid var(--k-linie-h); }
.kern-mehr > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 14px 0 0; cursor: pointer; list-style: none; font-size: 15px; font-weight: 600; color: var(--k-blau); }
.kern-mehr > summary::-webkit-details-marker { display: none; }
.kern-mehr > summary::after { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: var(--k-hell); font-size: 20px; flex-shrink: 0; }
.kern-mehr[open] > summary::after { content: "\2212"; background: var(--k-blau); color: #fff; }
.kern-mehr-inhalt { padding: 18px 0 0; }

/* Absenden */
.kern-absenden { margin: 28px 0 0; text-align: center; }
.kern-knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; min-width: 260px; padding: 14px 28px; border: 0; border-radius: 8px; background: var(--k-orange); color: #fff; font-size: 17px; line-height: 1.2; font-weight: 600; font-family: inherit; cursor: pointer; transition: background-color .3s, box-shadow .3s, transform .3s; }
.kern-knopf:hover:not(:disabled) { background: #344054; box-shadow: 0 8px 15px rgba(0, 0, 0, .10); transform: scale(1.02); }
.kern-knopf:disabled { opacity: .6; cursor: wait; }
.kern-knopf:focus-visible { outline: 3px solid var(--k-blau); outline-offset: 3px; }
.kern-klein { margin: 10px 0 0; font-size: 13px; color: var(--k-grau); }
.kern-fehler-sammel { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #fef3f2; color: var(--k-rot); font-size: 15px; font-weight: 500; text-align: left; }
.kern-fehler-sammel a { color: var(--k-blau); font-weight: 600; }

.kern-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Danke */
.kern-danke { padding: 32px; border-radius: 16px; background: var(--k-flaeche); outline: none; }
.kern-danke .kern-danke-titel, .kern-danke h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.25; font-weight: 600; color: var(--k-text); }
.kern-danke h2:not(.kern-danke-titel) { margin: 24px 0 10px; padding: 0; border: 0; font-size: 19px; font-weight: 600; color: var(--k-text); }
.kern-danke p { font-size: 17px; line-height: 1.6; }
.kern-danke ul { margin: 0; padding-left: 20px; }
.kern-danke li { margin: 0 0 6px; font-size: 16px; line-height: 1.5; }
.kern-testmodus { margin: 20px 0 0; padding: 10px 14px; border-radius: 8px; background: #fef6ee; font-size: 14px !important; }

@media (max-width: 760px) {
  .kern-typ-kacheln .kern-optionen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kern-abschnitt { padding: 20px 16px; }
  .kern-kopf h1 { font-size: 28px; }
}
@media (max-width: 400px) {
  .kern-typ-kacheln .kern-optionen { grid-template-columns: minmax(0, 1fr); }
  .kern-typ-kacheln .kern-option { min-height: 0; }
  .kern-knopf { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .kern * { transition: none !important; } }

/* Das Theme setzt Absätze im Inhalt mobil auf 18px; die kleinen Texte der Strecke behalten ihre Größe. */
.kern p.kern-hinweis, .kern p.kern-fehler, .kern p.kern-fortschritt-text { font-size: 14px !important; line-height: 1.45 !important; }
.kern p.kern-klein { font-size: 13px !important; }
.kern p.kern-einleitung { font-size: 17px !important; }
.kern p.kern-fehler-sammel { font-size: 15px !important; }

/* Auf der Strecke keine zweite Aufforderung des Themes („Kostenlose Erstberatung“, Handy bis 380 px):
   sie führt weg von hier und passt bei Gewerbe nicht zum Honorar. */
.of-sticky-cta { display: none !important; }
.kern .kern-abschnitt h2 { margin-top: 0 !important; }
.kern .kern-kopf h1 { margin-top: 0 !important; }
