:root {
    --purple: #8C3A76;
    --green: #87A732;
    --text: #2D2D2D;
    --muted: #667085;
    --border: #E4E7EC;
    --bg: #F7F8FA;
    --white: #FFFFFF;
}

* {
    box-sizing: border-box;
}

html {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
}

.wh-shell {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.wh-header {
    text-align: center;
    margin-bottom: 24px;
    animation: whLogoIn .75s ease-out both;
}

.wh-logo {
    display: block;
    width: min(240px, 70vw);
    height: auto;
    margin: 0 auto;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(45,45,45,.10);
}

.wh-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: clamp(22px, 4vw, 38px);
    box-shadow: 0 12px 35px rgba(45, 45, 45, .07);
    animation: whCardIn .7s ease-out both;
    animation-delay: .18s;
}

h1 {
    margin: 0 0 14px;
    color: var(--purple);
    font-size: clamp(1.7rem, 4vw, 2.25rem);
    line-height: 1.15;
}

h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

p {
    line-height: 1.6;
}

.wh-lead {
    margin: 0;
    color: var(--muted);
}

.wh-action {
    margin-top: 26px;
}

.wh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--purple);
    color: var(--white);
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.wh-button:hover,
.wh-button:focus-visible {
    filter: brightness(.94);
}

.wh-note,
.wh-error,
.wh-success {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 12px;
}

.wh-note {
    background: #F4F7F0;
    border-left: 4px solid var(--green);
}

.wh-error {
    background: #FFF3F3;
    border: 1px solid #EFCACA;
}

.wh-success {
    background: #F3F8ED;
    border: 1px solid #CADBB5;
}

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

altcha-widget {
    display: block;
    width: 100%;
    margin: 24px 0;
}

.wh-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
}

@media (max-width: 600px) {
    .wh-shell {
        width: calc(100% - 20px);
        padding-top: 20px;
    }

    .wh-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: clamp(22px, 4vw, 38px);
    box-shadow: 0 12px 35px rgba(45, 45, 45, .07);
    animation: whCardIn .7s ease-out both;
    animation-delay: .18s;
}

    .wh-button {
        width: 100%;
    }
}


@keyframes whLogoIn {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes whCardIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wh-header,
    .wh-card {
        animation: none !important;
    }

    * {
        scroll-behavior: auto !important;
    }
}


/* =========================================================
   KONTROLLE STARTSEITE – APP / INTERN LOOK
   ========================================================= */

.wh-home {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 16% 12%,
            rgba(140, 58, 118, .055),
            transparent 34%
        ),
        radial-gradient(
            circle at 84% 88%,
            rgba(135, 167, 50, .07),
            transparent 38%
        ),
        #f8f9f8;
}

.wh-home-shell {
    width: min(100% - 32px, 430px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 9vh 0 36px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wh-home-card {
    position: relative;
    overflow: hidden;

    background: #fff;
    border: 1px solid #e2e5e3;
    border-radius: 16px;

    box-shadow:
        0 18px 45px rgba(45, 45, 45, .09);

    animation: whCardIn .7s ease-out both;
}

.wh-home-card::before {
    content: "";
    display: block;
    height: 4px;
    width: 100%;
    background: var(--green);
}

.wh-home-head {
    display: flex;
    align-items: center;
    gap: 17px;

    padding: 27px 29px 18px;
}

.wh-home-logo {
    flex: 0 0 auto;

    width: 54px;
    height: 54px;

    object-fit: cover;
    border-radius: 12px;

    box-shadow:
        0 5px 14px rgba(45, 45, 45, .10);

    animation: whLogoIn .7s ease-out both;
}

.wh-home-brand {
    min-width: 0;
}

.wh-home-brandline {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 5px;

    color: var(--purple);
    font-size: .78rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .035em;
}

.wh-home-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;
    background: var(--green);
}

.wh-home h1 {
    margin: 0;

    color: #171717;
    font-size: 1.72rem;
    line-height: 1.12;
    font-weight: 750;
}

.wh-home-brand p {
    margin: 6px 0 0;

    color: var(--muted);
    font-size: .93rem;
    line-height: 1.45;
}

.wh-home-content {
    padding: 12px 29px 28px;
}

.wh-home-intro {
    margin: 0 0 23px;

    color: #505761;
    font-size: .95rem;
    line-height: 1.6;
}

.wh-home-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;

    padding: 12px 18px;

    border-radius: 9px;

    background: var(--purple);
    color: #fff;

    font-weight: 750;
    text-decoration: none;

    box-shadow:
        0 5px 13px rgba(140, 58, 118, .15);

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        filter .16s ease;
}

.wh-home-button:hover {
    filter: brightness(.96);
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(140, 58, 118, .19);
}

.wh-home-button:focus-visible {
    outline: 3px solid rgba(140, 58, 118, .23);
    outline-offset: 3px;
}

.wh-home-security {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 0 29px;
    padding: 17px 0 23px;

    border-top: 1px solid #e4e6e5;

    color: #69707a;
    font-size: .78rem;
    line-height: 1.35;
}

.wh-home-security-badge {
    flex: 0 0 auto;

    padding: 4px 9px;

    border: 1px solid #b8ca7a;
    border-radius: 999px;

    background: #f4f8e9;
    color: #5d7612;

    font-size: .71rem;
    font-weight: 800;
}

.wh-home-footer {
    margin-top: 18px;

    text-align: center;

    color: #69707a;
    font-size: .78rem;
}


/* Mobile */

@media (max-width: 520px) {

    .wh-home-shell {
        width: min(100% - 22px, 430px);
        padding: 22px 0;
    }

    .wh-home-head {
        padding:
            24px
            21px
            17px;
    }

    .wh-home-content {
        padding:
            10px
            21px
            24px;
    }

    .wh-home-security {
        margin: 0 21px;
        padding-bottom: 21px;

        align-items: flex-start;
    }

    .wh-home-logo {
        width: 50px;
        height: 50px;
        border-radius: 11px;
    }

    .wh-home h1 {
        font-size: 1.55rem;
    }

    .wh-home-brandline {
        font-size: .72rem;
    }
}


/* Kleine Smartphones */

@media (max-width: 360px) {

    .wh-home-head {
        gap: 13px;
    }

    .wh-home-logo {
        width: 46px;
        height: 46px;
    }

    .wh-home-security {
        flex-direction: column;
        gap: 7px;
    }
}


/* Barrierearme Bewegung */

@media (prefers-reduced-motion: reduce) {

    .wh-home-card,
    .wh-home-logo {
        animation: none !important;
    }

    .wh-home-button {
        transition: none;
    }
}


/* =========================================================
   VORKONTROLLE – ONLINE-FORMULAR
   Desktop / Tablet / Mobile
   ========================================================= */

.wh-form-page {
    background:
        radial-gradient(
            circle at 10% 5%,
            rgba(140, 58, 118, .045),
            transparent 30%
        ),
        radial-gradient(
            circle at 92% 94%,
            rgba(135, 167, 50, .055),
            transparent 34%
        ),
        #f8f9f8;
}

.wh-form-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 44px;
}

.wh-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 20px;
}

.wh-form-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    min-width: 0;

    color: var(--text);
    text-decoration: none;
}

.wh-form-logo {
    display: block;

    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    object-fit: cover;
    border-radius: 13px;

    background: #fff;

    box-shadow:
        0 5px 15px rgba(45, 45, 45, .10);
}

.wh-form-brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}

.wh-form-brand-text strong {
    color: var(--purple);
    font-size: .96rem;
}

.wh-form-brand-text span {
    color: var(--muted);
    font-size: .82rem;
}

.wh-form-status {
    flex: 0 0 auto;

    padding: 7px 12px;

    border: 1px solid #cbd9a9;
    border-radius: 999px;

    background: #f3f7e9;
    color: #58710c;

    font-size: .78rem;
    font-weight: 800;
}

.wh-form-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 26px;
    align-items: center;

    padding: 28px 30px;

    background: #fff;

    border: 1px solid var(--border);
    border-top: 4px solid var(--green);
    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(45, 45, 45, .055);
}

.wh-form-eyebrow {
    margin-bottom: 7px;

    color: var(--purple);

    font-size: .76rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.wh-form-hero h1 {
    margin: 0;

    color: #1d1d1d;

    font-size: clamp(1.55rem, 2.7vw, 2.05rem);
    line-height: 1.15;
}

.wh-form-hero p {
    max-width: 720px;

    margin: 10px 0 0;

    color: #59616c;
    font-size: .95rem;
    line-height: 1.55;
}

.wh-form-security {
    padding: 15px 16px;

    border: 1px solid #dbe4c7;
    border-radius: 11px;

    background: #f7f9f2;
}

.wh-form-security strong,
.wh-form-security span {
    display: block;
}

.wh-form-security strong {
    margin-bottom: 4px;

    color: #4f6512;
    font-size: .84rem;
}

.wh-form-security span {
    color: #68706f;
    font-size: .79rem;
    line-height: 1.45;
}

.wh-form-test-note {
    margin-top: 16px;
    padding: 13px 15px;

    border: 1px solid #e7d6e3;
    border-left: 4px solid var(--purple);
    border-radius: 10px;

    background: #fcf9fb;
    color: #58515a;

    font-size: .86rem;
    line-height: 1.5;
}

.wh-form-test-note strong {
    color: var(--purple);
}

.wh-form-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 18px 0;
}

.wh-form-nav a {
    display: inline-flex;
    align-items: center;

    min-height: 38px;

    padding: 8px 12px;

    border: 1px solid #dde1e5;
    border-radius: 9px;

    background: #fff;
    color: #4c535c;

    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.wh-form-nav a:hover,
.wh-form-nav a:focus-visible {
    border-color: #cdb3c6;
    color: var(--purple);
}

.wh-form-intro {
    margin-bottom: 18px;
    padding: 20px 22px;

    border: 1px solid #dce6c8;
    border-left: 4px solid var(--green);
    border-radius: 12px;

    background: #f7f9f3;
    color: #4f565e;

    font-size: .92rem;
    line-height: 1.62;
}

.wh-form-section {
    margin-bottom: 18px;

    overflow: hidden;

    border: 1px solid #e2e5e8;
    border-radius: 14px;

    background: #fff;

    box-shadow:
        0 7px 22px rgba(45, 45, 45, .04);

    scroll-margin-top: 14px;
}

.wh-form-section-head {
    padding: 17px 20px;

    border-bottom: 1px solid #e5e7e9;

    background: #fbfbfc;
}

.wh-form-section-head h2 {
    margin: 0;

    color: var(--purple);

    font-size: 1.08rem;
    line-height: 1.3;
}

.wh-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px 22px;

    padding: 22px;
}

.wh-field {
    min-width: 0;
}

.wh-field--wide {
    grid-column: 1 / -1;
}

.wh-field-label {
    display: block;

    margin: 0 0 8px;

    color: #30343a;

    font-size: .91rem;
    line-height: 1.4;
    font-weight: 750;
}

.wh-required {
    margin-left: 4px;

    color: var(--purple);
}

.wh-input,
.wh-textarea {
    display: block;

    width: 100%;
    max-width: 100%;

    border: 1px solid #cfd4da;
    border-radius: 9px;

    background: #fff;
    color: var(--text);

    font: inherit;
    font-size: 16px;

    outline: none;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.wh-input {
    min-height: 48px;

    padding: 10px 12px;
}

.wh-textarea {
    min-height: 122px;

    padding: 12px;

    line-height: 1.5;

    resize: vertical;
}

.wh-input:focus,
.wh-textarea:focus {
    border-color: var(--purple);

    box-shadow:
        0 0 0 3px rgba(140, 58, 118, .12);
}

.wh-field-help {
    margin-top: 6px;

    color: var(--muted);

    font-size: .78rem;
    line-height: 1.45;
}

.wh-choice-field {
    min-width: 0;

    margin: 0;
    padding: 0;

    border: 0;
}

.wh-choice-field legend {
    width: 100%;
    padding: 0;
}

.wh-choice-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(min(230px, 100%), 1fr)
        );

    gap: 9px;
}

.wh-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    min-width: 0;
    min-height: 48px;

    padding: 11px 13px;

    border: 1px solid #d9dde2;
    border-radius: 9px;

    background: #fff;

    color: #41474e;

    font-size: .88rem;
    line-height: 1.4;

    cursor: pointer;

    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.wh-choice:hover {
    border-color: #c6b0c0;
}

.wh-choice:focus-within {
    border-color: var(--purple);

    box-shadow:
        0 0 0 3px rgba(140, 58, 118, .10);
}

.wh-choice input {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;

    margin: 1px 0 0;

    accent-color: var(--purple);
}

.wh-choice span {
    min-width: 0;
}

.wh-choice:has(input:checked) {
    border-color: #c8a8be;

    background: #fbf7fa;
}

.wh-matrix {
    min-width: 0;

    margin: 0;
    padding: 0;

    border: 0;
}

.wh-matrix legend {
    width: 100%;
    padding: 0;
}

.wh-matrix-list {
    display: grid;
    gap: 12px;
}

.wh-matrix-row {
    min-width: 0;

    padding: 15px;

    border: 1px solid #e0e3e6;
    border-radius: 11px;

    background: #fafbfb;
}

.wh-matrix-title {
    margin-bottom: 11px;

    color: #383d43;

    font-size: .88rem;
    line-height: 1.4;
    font-weight: 750;
}

.wh-matrix-choices {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 8px;
}

.wh-choice--compact {
    min-height: 44px;

    padding: 9px 10px;

    background: #fff;

    font-size: .82rem;
}

.wh-matrix-note {
    display: block;

    margin-top: 11px;
}

.wh-matrix-note > span {
    display: block;

    margin-bottom: 6px;

    color: #68707a;

    font-size: .78rem;
    font-weight: 700;
}

.wh-content-box {
    padding: 18px;

    border: 1px solid #dce1e5;
    border-radius: 11px;

    background: #fafbfb;
}

.wh-content-box h3 {
    margin: 0 0 9px;

    color: #30343a;

    font-size: .96rem;
    line-height: 1.35;
}

.wh-content-text {
    color: #555d66;

    font-size: .86rem;
    line-height: 1.58;
}

.wh-form-bottom-note {
    margin-top: 18px;
    padding: 14px 16px;

    border-radius: 10px;

    background: #f2f4f5;
    color: #636b73;

    font-size: .84rem;
    line-height: 1.5;
}

.wh-state-card {
    max-width: 720px;

    margin: 52px auto 0;
    padding: 30px;

    text-align: center;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: #fff;

    box-shadow:
        0 10px 30px rgba(45, 45, 45, .06);
}

.wh-state-card h1 {
    margin-bottom: 12px;
}

.wh-state-card p {
    color: var(--muted);
}

.wh-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    margin: 0 auto 15px;

    border-radius: 50%;

    background: #eef5df;
    color: #65800f;

    font-size: 1.25rem;
    font-weight: 800;
}

.wh-form-footer {
    display: flex;
    justify-content: center;
    gap: 8px;

    margin-top: 24px;

    color: var(--muted);

    font-size: .78rem;
}


/* Tablet */

@media (max-width: 860px) {

    .wh-form-hero {
        grid-template-columns: 1fr;
    }

    .wh-form-security {
        max-width: 100%;
    }

    .wh-matrix-choices {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* Smartphone */

@media (max-width: 640px) {

    .wh-form-shell {
        width: calc(100% - 16px);
        padding: 12px 0 28px;
    }

    .wh-form-header {
        gap: 10px;

        margin-bottom: 12px;
    }

    .wh-form-logo {
        width: 48px;
        height: 48px;

        flex-basis: 48px;

        border-radius: 11px;
    }

    .wh-form-brand-text strong {
        font-size: .88rem;
    }

    .wh-form-brand-text span {
        font-size: .74rem;
    }

    .wh-form-status {
        padding: 6px 9px;

        font-size: .7rem;
    }

    .wh-form-hero {
        gap: 17px;

        padding: 21px 18px;

        border-radius: 13px;
    }

    .wh-form-hero h1 {
        font-size: 1.45rem;
    }

    .wh-form-hero p {
        font-size: .89rem;
    }

    .wh-form-test-note {
        margin-top: 12px;
    }

    .wh-form-nav {
        gap: 6px;

        margin: 13px 0;
    }

    .wh-form-nav a {
        min-height: 40px;

        padding: 8px 10px;

        font-size: .76rem;
    }

    .wh-form-intro {
        padding: 17px 16px;

        font-size: .87rem;
    }

    .wh-form-section {
        margin-bottom: 13px;

        border-radius: 12px;
    }

    .wh-form-section-head {
        padding: 15px 16px;
    }

    .wh-form-section-head h2 {
        font-size: 1rem;
    }

    .wh-form-grid {
        grid-template-columns: 1fr;

        gap: 18px;

        padding: 17px 15px;
    }

    .wh-field--wide {
        grid-column: auto;
    }

    .wh-choice-grid {
        grid-template-columns: 1fr;
    }

    .wh-choice {
        min-height: 50px;
    }

    .wh-textarea {
        min-height: 135px;
    }

    .wh-content-box {
        padding: 15px;
    }
}


/* Kleine Smartphones */

@media (max-width: 430px) {

    .wh-form-brand-text span {
        display: none;
    }

    .wh-matrix-choices {
        grid-template-columns: 1fr;
    }

    .wh-matrix-row {
        padding: 13px;
    }

    .wh-form-footer {
        flex-wrap: wrap;
    }
}


/* Barrierearme Bewegung */

@media (prefers-reduced-motion: reduce) {

    .wh-input,
    .wh-textarea,
    .wh-choice {
        transition: none;
    }
}


/* =========================================================
   VORKONTROLLE – SPEICHERN
   ========================================================= */

.wh-save-message,
.wh-save-error {
    margin: 0 0 16px;
    padding: 13px 15px;

    border-radius: 10px;

    font-size: .88rem;
    line-height: 1.45;
    font-weight: 700;
}

.wh-save-message {
    border: 1px solid #cadbb5;
    border-left: 4px solid var(--green);

    background: #f3f8ed;
    color: #4f6512;
}

.wh-save-error {
    border: 1px solid #efcaca;
    border-left: 4px solid #b83c3c;

    background: #fff3f3;
    color: #7a2828;
}

.wh-form-actions {
    display: flex;
    justify-content: flex-end;

    position: sticky;
    bottom: 12px;
    z-index: 10;

    margin-top: 18px;
    padding: 12px;

    border: 1px solid #e0e3e6;
    border-radius: 12px;

    background: rgba(255, 255, 255, .96);

    box-shadow:
        0 7px 24px rgba(45, 45, 45, .09);
}

@media (max-width: 640px) {

    .wh-form-actions {
        bottom: 8px;

        padding: 9px;
    }

    .wh-form-actions .wh-button {
        width: 100%;
        min-height: 52px;
    }
}


/* =========================================================
   VORKONTROLLE – PERSÖNLICHER WIEDERAUFNAHME-LINK
   ========================================================= */

.wh-resume-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin: 0 0 16px;
    padding: 15px 16px;

    border: 1px solid #dde0e3;
    border-radius: 11px;

    background: #f8f9fa;
}

.wh-resume-box-text {
    display: grid;
    gap: 3px;
}

.wh-resume-box-text strong {
    color: var(--text);
    font-size: .9rem;
}

.wh-resume-box-text span {
    max-width: 720px;

    color: #62666a;
    font-size: .8rem;
    line-height: 1.45;
}

.wh-resume-link-button {
    flex: 0 0 auto;

    border: 1px solid rgba(140, 58, 118, .32);

    background: #fff;
    color: var(--purple);
}

.wh-resume-link-button:hover {
    background: rgba(140, 58, 118, .06);
}

.wh-resume-link-button.is-copied {
    border-color: rgba(135, 167, 50, .45);

    background: #f3f8ed;
    color: #536b14;
}

.wh-resume-link-button:disabled {
    cursor: wait;
    opacity: .78;
}

.wh-form-actions {
    gap: 10px;
    flex-wrap: wrap;
}


@media (max-width: 640px) {

    .wh-resume-box {
        align-items: stretch;
        flex-direction: column;

        gap: 12px;

        padding: 14px;
    }

    .wh-resume-box .wh-resume-link-button {
        width: 100%;
        min-height: 48px;
    }

    .wh-form-actions {
        flex-direction: column;
    }

    .wh-form-actions .wh-resume-link-button {
        width: 100%;
        min-height: 46px;
    }
}
