:root {
    --aimpera-teal: #008FAA;
    --aimpera-teal-dark: #00707F;
    --aimpera-navy: #1E324D;
    --color-bg: #F7F9FA;
    --color-surface: #FFFFFF;
    --color-border: #E1E7EA;
    --color-text: #1E324D;
    --color-text-muted: #5B6B7A;
    --color-danger: #C0392B;
    --color-danger-bg: #FDECEA;
    --color-success-bg: #E7F6F1;
    --focus-ring: 0 0 0 3px rgba(0, 143, 170, 0.35);
    --radius: 12px;
    --max-width: 640px;
}

* { box-sizing: border-box; }

[x-cloak] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--aimpera-teal-dark); }

.site-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: var(--aimpera-navy);
    text-decoration: none;
    font-size: 1.1rem;
}

.brand__logo {
    height: 28px;
    width: auto;
    display: block;
}

.lang-switch {
    display: flex;
    gap: 4px;
}

.lang-switch a {
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    border: 1px solid transparent;
}

.lang-switch a[aria-current="true"] {
    /* --aimpera-teal gegen weißen Text nur 3.81:1 (< WCAG AA 4.5:1) – siehe .btn-primary weiter unten. */
    background: var(--aimpera-teal-dark);
    color: #fff;
    font-weight: 600;
}

.lang-switch a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

main {
    flex: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 16px 64px;
}

.site-footer {
    padding: 20px 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.site-footer a { color: var(--color-text-muted); }

/* Progress */
.progress-wrap {
    margin-bottom: 28px;
}

.progress-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.progress-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    background: var(--aimpera-teal);
    transition: width 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .progress-bar__fill,
    .card-option {
        transition: none !important;
        animation: none !important;
    }
}

/* Step */
.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--aimpera-navy);
    margin: 0 0 8px;
}

.step-help {
    color: var(--color-text-muted);
    margin: 0 0 24px;
}

/* Option cards */
.options-grid {
    display: grid;
    gap: 12px;
}

.card-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 18px 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    cursor: pointer;
    font: inherit;
    color: var(--color-text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.card-option:hover:not(:disabled) {
    border-color: var(--aimpera-teal);
}

.card-option[aria-pressed="true"] {
    border-color: var(--aimpera-teal);
    background: var(--color-success-bg);
}

.card-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.card-option__title {
    font-weight: 700;
    display: block;
}

.card-option__subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Form controls */
.field {
    margin-bottom: 20px;
}

.field legend,
.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.field .hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.text-input,
.select-input,
textarea.text-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text);
}

textarea.text-input {
    min-height: 100px;
    resize: vertical;
}

.field-error {
    color: var(--color-danger);
    font-size: 0.85rem;
    margin-top: 6px;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    /* --aimpera-teal gegen weißen Text erreicht nur 3.81:1 (< WCAG AA 4.5:1 für Normaltext).
       --aimpera-teal-dark erreicht ~6.27:1 und wird daher für den Ruhezustand verwendet;
       beim Hover auf das hellere --aimpera-teal wechseln (kein Dauerzustand, rein visuelles Feedback). */
    background: var(--aimpera-teal-dark);
    color: #fff;
}

.btn-primary:hover:not(:disabled) { background: var(--aimpera-teal); }

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-muted);
}

.btn-secondary:hover { color: var(--color-text); }

.btn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    gap: 12px;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Summary */
.summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.summary-row:last-child { border-bottom: none; }

.summary-row dt { color: var(--color-text-muted); }
.summary-row dd { margin: 0; font-weight: 600; text-align: right; }

.privacy-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

/* Alert boxes */
.alert {
    padding: 16px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-error {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.alert-success {
    background: var(--color-success-bg);
    color: #1E5E4A;
}

/* Confirmation */
.confirmation-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Compact layout */
.compact-grid {
    display: grid;
    gap: 24px;
}

.compact-section-title {
    font-weight: 700;
    color: var(--aimpera-navy);
    margin-bottom: 12px;
}

@media (min-width: 640px) {
    .field-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}
