:root {
    --brand: #e2001a;          /* TSR-Rot */
    --brand-2: #b50016;        /* Hover/Dunkler */
    --brand-accent: #e2001a;   /* Buttons */
    --brand-ink: #ffffff;      /* Text auf Brand */
    --ink: #1d1d1b;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --soft: #f7f8fa;
    --error: #b91c1c;
    --ok: #14784c;
    --shadow: 0 2px 6px rgba(0,0,0,.04);
    --radius: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    padding: 18px 32px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}
.brand {
    display: flex;
    align-items: center;
    margin-right: 28px;
}
.brand img {
    display: block;
    height: 40px;
    width: auto;
}
.topbar-title {
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
}

.progress {
    height: 4px;
    background: var(--line);
    position: relative;
}
.progress-bar {
    height: 100%;
    background: var(--brand-accent);
    transition: width .25s ease;
    position: relative;
}
.progress-bar span {
    position: absolute;
    top: 6px;
    right: 0;
    transform: translateX(0);
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 2px;
}

.page {
    max-width: 820px;
    margin: 40px auto;
    padding: 0 32px;
    flex: 1 0 auto;
    width: 100%;
}

.step { display: none; animation: fadeIn .2s ease; }
.step.is-active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }

h1 {
    font-size: 26px;
    color: var(--ink);
    margin: 8px 0 18px;
    font-weight: 600;
}
p { margin: 0 0 14px; color: #333; }

.hints {
    background: var(--soft);
    border-left: 3px solid var(--brand);
    padding: 12px 16px;
    margin: 18px 0;
    font-size: 13px;
    color: #444;
}
.hints p { margin: 0 0 6px; }
.hints p:last-child { margin-bottom: 0; }

.field {
    display: block;
    margin-bottom: 18px;
}
.field .label, .label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=file]):not([type=hidden]),
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c4c9d2;
    border-radius: var(--radius);
    font-size: 15px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(226,0,26,.15);
}
input.invalid, select.invalid, textarea.invalid {
    border-color: var(--error);
}
.field .hint {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.field .error {
    display: block;
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
    min-height: 14px;
}

.radio-group {
    border: 0;
    padding: 0;
    margin: 0 0 18px;
}
.radio-group legend { padding: 0; margin-bottom: 8px; }
.radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
}
.radio input { margin: 0; }

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 26px;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--brand);
    color: var(--brand-ink);
}
.btn-primary:hover { background: var(--brand-2); }
.btn-primary:disabled { background: #cfd6da; color: #6a727a; cursor: not-allowed; }
.btn-outline {
    background: #fff;
    color: var(--brand);
    border-color: var(--brand);
}
.btn-outline:hover { background: #fff5f6; }
.btn-download {
    background: var(--brand);
    color: var(--brand-ink);
    padding: 14px 26px;
}
.btn-download:hover { background: var(--brand-2); }

.summary {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin: 8px 0 4px;
}
.summary h3 {
    color: var(--ink);
    margin: 14px 0 6px;
    font-size: 15px;
    border-bottom: 2px solid var(--brand);
    padding-bottom: 4px;
}
.summary h3:first-child { margin-top: 0; }
.summary .row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 10px;
    padding: 4px 0;
    font-size: 14px;
}
.summary .row .k { color: var(--muted); }
.summary .row .v { color: var(--ink); word-break: break-word; }

.download-wrap {
    margin-top: 24px;
    text-align: center;
}

.footer {
    padding: 18px 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}
.footer-addr { color: var(--muted); }
.footer-links { display: flex; gap: 18px; }
.footer a {
    color: var(--brand);
    text-decoration: none;
}
.footer a:hover { text-decoration: underline; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: var(--error);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    font-size: 14px;
}

@media (max-width: 640px) {
    .topbar { padding: 14px 18px; }
    .brand { padding: 12px 16px; margin-right: 16px; }
    .page { padding: 0 18px; margin: 24px auto; }
    .summary .row { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
    h1 { font-size: 22px; }
}
