/* Kontakt-Panel: von rechts hereingleitendes Formular */
.kp-dunkel, .kp { --kp-ink: #2c2f34; --kp-feld: #ebe9e4; --kp-linie: rgba(44, 47, 52, .14); --kp-fein: rgba(44, 47, 52, .55); --kp-fehler: #b3261e; --kp-kurve: cubic-bezier(.22, .8, .24, 1); }
.kp [hidden], .kp-dunkel[hidden], .kp[hidden] { display: none !important; }

.kp-dunkel { position: fixed; inset: 0; z-index: 1190; background: rgba(32, 34, 38, .55); opacity: 0; transition: opacity .5s ease; touch-action: none; }
.kp-dunkel.offen { opacity: 1; }

.kp { --ink: #2c2f34; --ink-soft: #2c2f34; position: fixed; top: 0; right: 0; bottom: 0; z-index: 1200; width: min(560px, 100vw); display: flex; flex-direction: column; background: #fff; color: var(--kp-ink);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .18); transform: translateX(102%); transition: transform .55s var(--kp-kurve); overscroll-behavior: contain;
  font-family: var(--font-body, inherit); font-size: .95rem; line-height: 1.5; }
.kp.offen { transform: none; }
.kp *, .kp *::before, .kp *::after { box-sizing: border-box; }
.kp-rest { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.kp-kopf { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(20px, 4vw, 36px); border-bottom: 1px solid var(--kp-linie); }
.kp-titel { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: -.01em; color: var(--kp-ink); }
.kp-zu { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--kp-linie); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--kp-ink); transition: background-color .3s ease, transform .4s var(--kp-kurve); }
.kp-zu:hover { background: var(--kp-feld); transform: rotate(90deg); }
.kp-zu svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.kp-tabs { flex: none; display: flex; gap: 26px; padding: 22px clamp(20px, 4vw, 36px) 0; }
.kp-tabs button { position: relative; padding: 0 0 8px; background: none; border: none; cursor: pointer; font: inherit; font-family: var(--font-display); font-size: .88rem; font-weight: 500; color: var(--kp-fein); transition: color .3s ease; }
.kp-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--kp-ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--kp-kurve); }
.kp-tabs button.aktiv { color: var(--kp-ink); font-weight: 700; }
.kp-tabs button.aktiv::after { transform: none; }
.kp-tabs button:hover { color: var(--kp-ink); }

.kp-fortschritt { flex: none; display: flex; align-items: center; padding: 18px clamp(20px, 4vw, 36px) 0; }
.kp-fortschritt[hidden] { display: none; }
.kp-balken { flex: 1; display: flex; gap: 6px; }
.kp-balken i { position: relative; display: block; flex: 1; height: 3px; border-radius: 3px; background: var(--kp-linie); overflow: hidden; }
.kp-balken i::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: var(--kp-ink); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--kp-kurve); }
.kp-balken i.voll::after { transform: none; }
.kp-balken i.halb::after { transform: scaleX(.5); }
.kp-schritt { flex: none; font-size: .68rem; letter-spacing: .06em; color: var(--kp-fein); white-space: nowrap; }

.kp-koerper { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(20px, 4vw, 36px); scrollbar-width: thin; }
.kp-ansicht { display: flex; flex-direction: column; min-height: 100%; padding-top: clamp(14px, 3vh, 24px); }
.kp-ein { animation: kp-ein .5s var(--kp-kurve) both; }
@keyframes kp-ein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.kp-ueber { margin: 0 0 12px; font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--kp-fein); }
.kp-h { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.45rem, 2.4vw, 1.8rem); letter-spacing: -.03em; line-height: 1.12; color: var(--kp-ink); }
.kp-unter { margin: 10px 0 24px; font-size: .86rem; color: var(--kp-fein); }

.kp-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.kp-feld { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.kp-feld.breit { grid-column: 1 / -1; }
.kp-feld label, .kp-gl { margin: 0; font-size: .74rem; font-weight: 700; color: var(--kp-ink); }
.kp-feld label small { font-weight: 400; color: var(--kp-fein); font-size: .7rem; }
.kp-feld input, .kp-feld textarea { width: 100%; padding: 14px 15px; border: 1px solid transparent; border-radius: 3px; background: var(--kp-feld); color: var(--kp-ink); font: inherit; font-size: .88rem; transition: border-color .25s ease, background-color .25s ease; }
.kp-feld input::placeholder, .kp-feld textarea::placeholder { color: rgba(44, 47, 52, .42); }
.kp-feld input:focus, .kp-feld textarea:focus { outline: none; border-color: var(--kp-ink); background: #fff; }
.kp-feld textarea { resize: vertical; min-height: 120px; }
.kp .ungueltig:is(input, textarea) { border-color: var(--kp-fehler); }
.kp .kp-gruppe.ungueltig .kp-gl, .kp .kp-haken.ungueltig { color: var(--kp-fehler); }
.kp .kp-gruppe.ungueltig .kp-pille span { border-color: var(--kp-fehler); }
.kp .kp-haken.ungueltig input { outline: 1.5px solid var(--kp-fehler); }
.kp-klein { margin: 10px 0 0; font-size: .68rem; color: var(--kp-fein); line-height: 1.4; }

.kp-gruppe { margin-top: 26px; }
.kp-gruppe .kp-gl { margin-bottom: 11px; }
.kp-pillen { display: flex; flex-wrap: wrap; gap: 8px; }
.kp-pille { position: relative; cursor: pointer; }
.kp-pille input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kp-pille span { display: inline-block; padding: 9px 17px; border: 1px solid rgba(44, 47, 52, .28); border-radius: 999px; font-size: .8rem; font-weight: 500; color: var(--kp-ink); background: #fff; transition: background-color .3s ease, border-color .3s ease, color .3s ease; }
.kp-pille:hover span { border-color: var(--kp-ink); }
.kp-pille input:checked + span { background: var(--lilac-flaeche, #c9dcec); border-color: var(--kp-ink); font-weight: 700; }
.kp-pille input:focus-visible + span { outline: 2px solid var(--kp-ink); outline-offset: 2px; }

.kp-kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kp-kachel { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 15px; background: var(--kp-feld); border: 1px solid transparent; border-radius: 3px; cursor: pointer; transition: background-color .3s ease, border-color .3s ease; }
.kp-kachel input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kp-k-haupt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kp-k-haupt b { font-family: var(--font-display); font-size: .84rem; line-height: 1.2; }
.kp-k-haupt small { font-size: .68rem; line-height: 1.35; color: var(--kp-fein); }
.kp-k-punkt { flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; border: 1px solid rgba(44, 47, 52, .35); background: #fff; transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease; }
.kp-kachel:hover { border-color: rgba(44, 47, 52, .35); }
.kp-kachel:has(input:checked) { background: var(--lilac-flaeche, #c9dcec); border-color: var(--kp-ink); }
.kp-kachel input:checked ~ .kp-k-punkt { background: var(--kp-ink); border-color: var(--kp-ink); box-shadow: inset 0 0 0 3px #fff; }
.kp-kachel:has(input:focus-visible) { outline: 2px solid var(--kp-ink); outline-offset: 2px; }

.kp-block { padding: 24px 0; border-bottom: 1px solid var(--kp-linie); }
.kp-block:first-child { padding-top: 6px; }
.kp-bt { color: var(--kp-ink); display: flex; align-items: center; gap: 9px; margin: 0; font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; letter-spacing: -.02em; }
.kp-bt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--kp-ink); }
.kp-block .kp-gruppe { margin-top: 18px; }

.kp-haken { display: flex; align-items: flex-start; gap: 11px; margin-top: 24px; font-size: .78rem; line-height: 1.45; color: var(--kp-ink); cursor: pointer; }
.kp-haken input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--kp-ink); cursor: pointer; }
.kp-haken a, .kp-direkt a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.kp-direkt { margin: 22px 0 0; font-size: .76rem; color: var(--kp-fein); }
.kp-direkt a { color: var(--kp-ink); }
.kp-hinweis-fehler { margin: 14px 0 0; min-height: 0; font-size: .8rem; color: var(--kp-fehler); }
.kp-hinweis-fehler:empty { display: none; }

.kp-fuss { position: sticky; bottom: 0; z-index: 2; margin: auto -1px 0; padding: 18px 0 clamp(18px, 3vh, 28px); background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 24%); display: flex; justify-content: flex-end; gap: 12px; }
.kp-fuss-zwei { justify-content: space-between; }
.kp-fuss-eins { justify-content: flex-end; }
.kp-knopf { display: inline-flex; align-items: center; justify-content: center; padding: 14px 26px; border-radius: 999px; font: inherit; font-family: var(--font-display); font-size: .84rem; font-weight: 700; cursor: pointer; border: 1px solid var(--kp-ink); transition: background-color .3s ease, color .3s ease, transform .3s var(--kp-kurve), opacity .3s ease; }
.kp-knopf:hover { transform: translateY(-1px); }
.kp-voll { background: var(--kp-ink); color: #fff; }
.kp-leer { background: #fff; color: var(--kp-ink); border-color: rgba(44, 47, 52, .3); }
.kp-leer:hover { background: var(--kp-feld); }
.kp-knopf:disabled { opacity: .6; cursor: default; transform: none; }
.kp-knopf:focus-visible { outline: 2px solid var(--kp-ink); outline-offset: 3px; }

.kp-erfolg { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 0 80px; gap: 18px; }
.kp-haken-kreis { width: 62px; height: 62px; border-radius: 50%; background: var(--kp-ink); display: grid; place-items: center; margin-bottom: 6px; }
.kp-haken-kreis svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kp-erfolg-titel { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.kp-erfolg-text { max-width: 36ch; margin: 0 0 8px; font-size: .88rem; color: var(--kp-fein); }

@media (max-width: 560px) {
  .kp { width: 100vw; }
  .kp-raster { grid-template-columns: 1fr; }
  .kp-kacheln { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .kp, .kp-dunkel { transition-duration: .01s; }
  .kp-ein { animation: none; }
}

/* Globale Abschnitts-Regeln der Seite sollen im Panel nicht greifen */
.kp section, .kp .kp-schritt-box { padding: 0; margin: 0; background: none; min-height: 0; }
.kp section::before, .kp section::after { content: none; }
.kp h2, .kp h3, .kp h4, .kp p { text-transform: none; }

/* Ausgewählte Felder ohne Farbfläche: weiß mit dunklem Rand und Haken */
.kp-kachel:has(input:checked) { background: #fff; border-color: var(--kp-ink); box-shadow: inset 0 0 0 .5px var(--kp-ink); }
.kp-kachel input:checked ~ .kp-k-punkt { position: relative; background: var(--kp-ink); border-color: var(--kp-ink); box-shadow: none; }
.kp-kachel input:checked ~ .kp-k-punkt::after { content: ""; position: absolute; left: 4.5px; top: 2px; width: 4px; height: 7.5px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.kp-pille input:checked + span { background: var(--kp-ink); border-color: var(--kp-ink); color: #fff; font-weight: 600; }
