:root {
    --bg: #EDEED4;
    --panel: #FFFFFF;
    --notice: #D6DB9D;
    --green: #105929;
    --green-hover: #0B4520;
    --green-soft: #7DA37E;
    --line: #D1DBBE;
    --line-input: #CFD6BC;
    --ink: #323232;
    --ink-soft: #555550;
    --ink-mute: #75756A;
    --star: #A8532F;
    --radius-panel: 14px;
    --radius-box: 12px;
    --radius-btn: 8px;
    --radius-input: 6px;
    --bar-width: 1304px;
    --content-width: 862px;
    --panel-width: 641px;
    --font: "Filson Pro", "Sofia Pro", "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.funnel {
    min-height: 100vh;
    padding: 20px 24px 90px;
    background: var(--bg);
}

.funnel__bar {
    max-width: var(--bar-width);
    margin: 0 auto;
}

.progress {
    position: relative;
    height: 13px;
    display: flex;
    align-items: center;
}

.progress__track {
    position: absolute;
    left: 0;
    right: 0;
    height: 14px;
    bottom: 0;
    border-radius: 99px;
    border: 2px solid var(--green);
}

.progress__fill {
    position: relative;
    height: 13px;
    min-width: 13px;
    border-radius: 99px;
    background: var(--green);
    transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.funnel__grid {
    position: relative;
    max-width: var(--bar-width);
    margin: 0 auto;
}

.funnel__side {
    position: absolute;
    top: 40px;
    width: 200px;
}

.funnel__side--left { left: 0; text-align: left; }
.funnel__side--right { right: 0; top: 23px; text-align: right; }

.funnel__percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.funnel-back {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    text-decoration: underline;
    cursor: pointer;
}

.funnel-back:hover { color: var(--green); }

.funnel__content {
    max-width: var(--content-width);
    margin: 0 auto;
}

.step { animation: rise .28s ease both; }

@keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.step__inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding-top: 37px;
}

.cards,
.panel,
.actions,
.notice,
.bullets,
.steplist,
.footnote {
    max-width: var(--panel-width);
    margin-left: auto;
    margin-right: auto;
}

.step__title {
    margin: 0 0 20px;
    font-size: 36px;
    font-weight: 500;
    line-height: 1.22;
    letter-spacing: -.01em;
    text-align: center;
    color: var(--ink);
}

.step__subtitle {
    margin: 0 auto 33px;
    max-width: 100%;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ink);
    text-align: center;
}

.cards { display: grid; gap: 13px; }
.step__inner--nosub .step__title { margin-bottom: 32px; }
.cards--grid { grid-template-columns: 1fr 1fr; }

.card--choice {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-box);
    background: var(--panel);
    text-align: left;
    font: inherit;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
}

.card--choice:hover { border-color: var(--green-soft); transform: translateY(-1px); }

/* Karten, die auf einen redirect-Step zeigen, werden als <a> gerendert.
   Weder die Karte selbst noch ihre Textteile duerfen unterstrichen sein. */
a.card--choice,
a.card--choice:hover,
a.card--choice:focus,
a.card--choice:visited,
.card--choice .card__label,
.card--choice .card__hint,
.card--choice .card__text { text-decoration: none; }

a.card--choice:visited .card__label { color: var(--ink); }

.card--choice:focus-visible,
.btn:focus-visible,
.option:focus-within,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.card__icon {
    flex: 0 0 65px;
    width: 65px;
    height: 65px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--green);
    color: #fff;
}

.card__icon svg { width: 32px; height: 32px; }

/* --- Bilder statt SVG-Icons --------------------------------------------- */

.card__icon img,
.panel__icon img,
.bullets__icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Wrapper der Bullet-Grafik (frueher lag das SVG nackt im <li>) */
.bullets__icon {
    flex: 0 0 16px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: var(--green);
}

.bullets__icon svg { width: 16px; height: 16px; }

/* Bild soll den Slot randlos fuellen: 'class' => 'is-bild' */
.card__icon.is-bild,
.panel__icon.is-bild { background: none; border-radius: 0; }

.card__icon.is-bild img,
.panel__icon.is-bild img { width: 100%; height: 100%; }

/* Bild soll den Slot fuellen und beschneiden: 'class' => 'is-bild is-cover' */
.card__icon.is-cover img,
.panel__icon.is-cover img { object-fit: cover; border-radius: inherit; }

/* ------------------------------------------------------------------------ */

.card__label { display: block; font-size: 24px; font-weight: 500; line-height: 1.25; }
.card__hint { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--ink); opacity: 0.7; }

.card__badge {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--notice);
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font: inherit;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-hover); }

.btn--ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: #F7F8EC; }

.btn--outline { background: transparent; border-color: var(--green); color: var(--green); }
.btn--outline:hover { background: rgba(16, 89, 41, .07); }

.btn--link {
    display: block;
    width: auto;
    margin: 0 auto;
    padding: 6px;
    background: none;
    border: 0;
    color: var(--ink-mute);
    font-size: 14px;
    text-decoration: underline;
}

.btn--compact { display: inline-block; width: auto; padding: 12px 24px; }

.btn--submit { margin-top: 33px; background: var(--green-soft); color: #fff; }
.btn--submit.is-ready { background: var(--green); }
.btn--submit.is-ready:hover { background: var(--green-hover); }
.btn--submit:not(.is-ready) { cursor: not-allowed; }

.btn[disabled] { opacity: .7; cursor: progress; }

.actions { display: grid; gap: 14px; margin-top: 36px; }

.notice {
    padding: 20px;
    border-radius: var(--radius-box);
    background: var(--notice);
    color: var(--ink);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

.notice__label {
    display: block;
    margin-bottom: 18px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--green);
}

/* Absaetze und Aufzaehlungen in der Hinweisbox (notice_html) */
.notice p { margin: 0 0 14px; }
.notice p:last-child { margin-bottom: 0; }

.notice ul {
    margin: 0;
    padding-left: 22px;
}

.notice li { padding-left: 2px; }
.notice li + li { margin-top: 8px; }
.notice a { color: var(--green); }

.notice--inset { margin-bottom: 36px; }
.notice--above { margin-bottom: 36px; }
.notice--above + .panel { margin-top: 0; }
.notice + .panel,
.notice + .steplist,
.notice + .bullets { margin-top: 36px; }

.bullets {
    list-style: none;
    margin: 0;
    padding: 20px;
    border-radius: var(--radius-box);
    background: var(--notice);
}

.bullets li {
    display: flex;
    gap: 11px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.bullets li + li { margin-top: 14px; }

.bullets svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: var(--green);
}

.steplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }

.steplist__item {
    display: flex;
    gap: 13px;
    padding: 17px 18px;
    border-radius: var(--radius-box);
    background: var(--panel);
}

.steplist__num {
    flex: 0 0 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.steplist__title { margin: 0 0 5px; font-size: 14px; font-weight: 700; }
.steplist__text { margin: 0 0 12px; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--ink); }
.steplist__body .btn { margin-top: 4px; }

.panel {
    margin-top: 0;
    padding: 23px;
    border-radius: var(--radius-panel);
    background: var(--panel);
}

.panel--center { text-align: center; padding: 30px 24px; }
.panel__text--last:last-child { margin-bottom: 0; }
.panel .btn--compact { margin-top: 4px; }

.panel__icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--notice);
    color: var(--green);
}

.panel__label {
    margin: 0 0 15px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--green);
}

.panel__label--divider { margin-top: 22px; }
.panel__title { margin: 0 0 6px; font-size: 15px; font-weight: 500; }
.panel__text { margin: 0 0 16px; font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--ink); }
.panel__note { margin: -6px 0 14px; font-size: 14px; font-weight: 400; color: var(--ink); }

.legal { margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink); }
.legal strong { color: var(--ink); }
.legal a { color: var(--green); }

.footnote {
    margin: 145px auto 0;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.65;
    color: var(--ink);
    text-align: center;
    white-space: pre-line;
}

.required-hint { margin: 12px 0 0; font-size: 9px; color: var(--ink-mute); }
.field__help { margin: 5px 0 0; font-size: 10.5px; color: var(--ink-mute); }

.disclaimer { margin: 0 0 14px; padding-left: 16px; font-size: 12px; line-height: 1.7; color: var(--ink); }

.summary { margin-bottom: 16px; }
.summary__label {
    margin: 0 0 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--green);
}
.summary__value { margin: 0; font-size: 18px; font-weight: 400; line-height: 1.5; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 14px; }
.grid__cell { grid-column: 1 / -1; }
.grid__cell--half { grid-column: span 1; }
.grid__cell--hidden { display: none; }

.field__label {
    display: block;
    margin-bottom: 4px;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.field__label em { font-style: normal; color: var(--star); }

input[type=text], input[type=email], input[type=date], input[type=tel], input[type=number], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line-input);
    border-radius: var(--radius-input);
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
}

input::placeholder, textarea::placeholder { color: #9DA48D; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2375756A' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--green-soft);
}

[aria-invalid="true"] input,
[aria-invalid="true"] select,
[aria-invalid="true"] textarea { border-color: var(--star); }

.file { display: flex; align-items: center; gap: 10px; }
.file input[type=file] { display: none; }

.file__button {
    padding: 7px 13px;
    border: 0;
    border-radius: var(--radius-input);
    background: var(--green);
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.file__button:hover { background: var(--green-hover); }
.file__name { font-size: 12px; color: var(--ink-mute); }

.consent {
    align-items: flex-start;
    display: flex;
    gap: 9px;
    margin-top: 15px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink);
}

.consent input { margin-top: 2px; accent-color: var(--green); }
.consent em { font-style: normal; color: var(--star); }
.consent--inline { margin-top: 0; }

.error { margin: 14px 0 0; color: var(--star); font-size: 12px; }

.qgroup + .qgroup { margin-top: 26px; }
.question + .question { margin-top: 22px; }
.question__text { margin: 0 0 12px; font-size: 18px; font-weight: 400; line-height: 1.4; color: var(--ink); }
.question__optional { font-style: normal; color: var(--ink-mute); }

.options { display: flex; flex-wrap: wrap; }

.options--scale { border-right: 1px solid var(--line-input); }

.options--scale .option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 62px;
    padding: 3px 12px 4px;
    border-left: 1px solid var(--line-input);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
    color: var(--ink);
    cursor: pointer;
}
.step[data-step-id="quelle"] .options--scale,
.step[data-step-id="quelle"] .options--scale .option {
    border: 0;
}

.step[data-step-id="quelle"] .options--scale .option .option__label {
    text-align: left;
}

.options--scale .option:hover { background: rgba(214, 219, 157, .3); }
.options--scale .option input { margin: 0; accent-color: var(--green); }
.option__label em { display: block; font-style: normal; color: var(--ink-soft); }

.options--stack, .options--multi { flex-direction: column; }

.options--stack .option,
.options--multi .option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 9px 0;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}

.options--stack .option input,
.options--multi .option input { flex: 0 0 auto; margin: 0 8px 0 0; accent-color: var(--green); }

.question--list .options { flex-direction: column; }

.question--list .option {
    display: grid;
    grid-template-columns: 1fr 26px;
    align-items: center;
    padding: 11px 0;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.question--list .option input { justify-self: center; margin: 0; accent-color: var(--green); }
.question--list .option:hover { color: var(--green); }

.search { position: relative; }

/* Trefferliste poppt direkt unter den Suchfeldern auf */
.search__results {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 264px;
    overflow-y: auto;
    margin: 0;
    padding: 5px;
    list-style: none;
    border: 1px solid var(--line-input);
    border-radius: var(--radius-box);
    background: var(--panel);
    box-shadow: 0 14px 32px rgba(16, 89, 41, .18);
}

.search__results li {
    display: grid;
    gap: 2px;
    padding: 9px 11px;
    border-radius: var(--radius-input);
    cursor: pointer;
}

.search__results li:hover,
.search__results li.is-active { background: var(--notice); }

.search__name { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.search__meta { font-size: 12px; line-height: 1.4; color: var(--ink-mute); }

.search__status { margin: 5px 0 0; font-size: 10.5px; color: var(--ink-mute); }

.funnel__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    font-size: 12px;
    color: var(--ink-mute);
}

.spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(16, 89, 41, .25);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
    .funnel__side { position: static; width: auto; }
    .funnel__grid { display: flex; flex-direction: column; }
    .funnel__side--left { order: 1; margin-bottom: 4px; }
    .funnel__side--right { order: 0; margin-top: 15px; }
    .funnel__content { order: 2; }
}

@media (max-width: 760px) {
    .funnel { padding: 16px 18px 70px; }
    .step__title { font-size: 26px; }
    .step__subtitle { font-size: 16px; }
    .card__label { font-size: 19px; }
    .question__text { font-size: 16px; }
    .question--list .option { font-size: 16px; }
    .grid { grid-template-columns: 1fr; }
    .grid__cell--half { grid-column: 1 / -1; }
    .cards--grid { grid-template-columns: 1fr; }
    .options--scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); border-right: 0; }
    .options--scale .option { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.debug {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    background: #1D2318;
    color: #E4E8D5;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11.5px;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .25);
}

.debug__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 16px;
    background: #101509;
    border-bottom: 1px solid #2F3A24;
}

.debug__bar strong { color: #A8D08A; font-weight: 600; }
.debug__hint { flex: 1; color: #8A9377; }

.debug__toggle {
    padding: 4px 10px;
    border: 1px solid #3D4A2E;
    border-radius: 5px;
    background: transparent;
    color: #E4E8D5;
    font: inherit;
    cursor: pointer;
}

.debug__toggle:hover { background: #2A3320; }

.debug__body {
    overflow-y: auto;
    padding: 12px 16px 18px;
}

.debug.is-collapsed .debug__body { display: none; }

.debug__empty { margin: 0; color: #8A9377; }

.debug__entry {
    padding: 12px 0;
    border-bottom: 1px solid #2F3A24;
}

.debug__entry:first-child { padding-top: 0; }
.debug__time { margin-bottom: 7px; color: #8A9377; }

.debug__table { border-collapse: collapse; margin-bottom: 8px; }
.debug__table th {
    padding: 2px 14px 2px 0;
    color: #8A9377;
    font-weight: 400;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}
.debug__table td { padding: 2px 0; word-break: break-word; }

.debug__label { margin: 8px 0 3px; color: #A8D08A; }

.debug pre {
    margin: 0;
    padding: 9px 11px;
    border-radius: 6px;
    background: #101509;
    color: #D5DCC4;
    white-space: pre-wrap;
    word-break: break-all;
}

.step[data-step-id="q_symptombeginn"] .options.options--scale {
    flex-wrap: nowrap;
}
.step[data-step-id="q_symptombeginn"] .options.options--scale .option {
justify-content: center;
}

.step[data-step-id="q_symptombeginn"] .question--scale:first-of-type .options.options--scale .option {
    width: 25%;
}
.step[data-step-id="q_symptombeginn"] .question--scale:last-of-type .options.options--scale .option:first-of-type {
    width: 50%;
}

.marke {
    font-size: 0.62em;
    line-height: 0;
    vertical-align: super;
    letter-spacing: 0;
}

.step[data-step-id="verdacht_ja"] .grid + .panel__label {
    margin-top: 20px;
    margin-bottom: 10px;
}

.step[data-step-id="pkv_anleitung"] .steplist {
    margin: 0 auto;
}

.step[data-step-id="code_einloesen"] .panel__title {
    font-weight: 600;
    font-size: 18px;
}

.step[data-step-id="wie_gehts_weiter"] .bullets {
    margin: 0 auto;
}

.footnote a {
    color: #323232CC;
    text-decoration: underline;
}

.is-bild.code-eingeben {
    width: 64px;
    height: 64px;
}

.legal p { margin: 0 0 14px; }
.legal p:last-child { margin-bottom: 0; }

.consent span a {
    color: var(--green);
}