:root {
    --gm-farbe-text: #222;
    --gm-gold: #b3a369;
    --gm-grau: #707070;
}

body {
    background: #f5f6f7;
    font-family: 'Segoe UI', Arial, sans-serif !important;
    color: var(--gm-farbe-text);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 32px 24px 24px 24px;
    box-sizing: border-box;
}

.lang-switch {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}
.lang-btn {
    min-width: 44px;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--gm-gold);
    border-radius: 6px;
    background: #fff;
    color: var(--gm-grau);
    cursor: pointer;
}
.lang-btn:hover {
    background: #f5f0e6;
}
.lang-btn.active {
    background: var(--gm-gold);
    color: #222;
    border-color: var(--gm-grau);
}

h1 {
    color: var(--gm-grau);
    text-align: center;
    margin-bottom: 24px;
    font-size: 2rem;
}

h2 {
    font-weight: bold !important;
    font-size: x-large !important;
}

h3 {
    font-weight: bold !important;
}

label {
    font-weight: 500;
    margin-top: 12px;
    display: block;
}

input[type="number"], input[type="range"], .choice-btn {
    color: var(--gm-grau);
    background: #fff;
    border: 2px solid var(--gm-gold);
    border-radius: 8px;
    font-size: 1.25rem;
    padding: 16px 12px;
    height: 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-top: 12px;
    margin-bottom: 18px;
}

.btn {
    background: var(--gm-gold) !important;
    color: #222 !important;
    border: 2px solid var(--gm-grau) !important;
    border-radius: 4px;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 600 !important;
    margin: 8px 8px 8px 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none !important;
    display: inline-block;
    text-align: center;
    text-transform: none !important;
}
.btn:hover {
    background: #222 !important;
    color: var(--gm-gold) !important;
    border-color: var(--gm-grau) !important;
}

.stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 32px 0 32px 0;
    gap: 0;
}
.stepper-step {
    width: 28px;
    height: 28px;
    background: #fff;
    border: 3px solid var(--gm-gold);
    border-radius: 50%;
    color: var(--gm-gold);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border 0.2s;
    z-index: 1;
}
.stepper-step.active {
    background: var(--gm-gold);
    color: #fff;
    border-color: var(--gm-gold);
}
.stepper-step.completed {
    background: #f5f0e6;
    color: #a08a4a;
}
.stepper-line {
    height: 3px;
    width: 26px;
    background: var(--gm-gold);
    margin: 0 -2px;
    z-index: 0;
}

.step {
    display: none;
}
.step.active {
    display: block;
}

.substep {
    display: none;
}
.substep.active {
    display: block;
}

.line-card {
    border-left: 4px solid var(--gm-gold);
}
.line-card + .line-card {
    margin-top: 4px;
}
.line-title {
    display: block;
    font-weight: 700;
    color: var(--gm-gold);
    font-size: 1.05rem;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.subheadline {
    text-align: center;
    font-size: 1.7em;
    margin: 24px 0 24px 0;
    font-weight: 600;
    color: #a08a4a;
    letter-spacing: 0.5px;
}

.choice-btns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.choice-btns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.choice-btn {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.3rem;
    padding: 12px 14px;
    line-height: 1.2;
    overflow-wrap: break-word;
    hyphens: auto;
    color: var(--gm-gold) !important;
    border: 2px solid var(--gm-gold) !important;
    background: #fff !important;
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
}
.choice-btns-3 .choice-btn {
    min-height: 72px;
    font-size: 1.05rem;
}
.choice-btn:hover, .choice-btn.active {
    background: var(--gm-gold) !important;
    color: #fff !important;
    border-color: var(--gm-gold) !important;
}

.zeitraum-card {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 12px 14px 10px 14px;
    position: relative;
}

.sub-question {
    font-weight: 600;
    color: #a08a4a;
    display: block;
    margin-bottom: 4px;
}

.slider-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}
.slider-inline input[type='range'] {
    flex: 1 1 0px;
    min-width: 100px;
    max-width: 300px;
    margin-left: 5px;
}
.slider-inline input[type="number"] {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    flex: 0 0 140px;
}

.purity-note {
    font-size: 0.9rem;
    color: #a08a4a;
    font-weight: 500;
    margin-top: 4px;
}

.info-box {
    background: #fffbe6;
    border: 1.5px solid var(--gm-gold);
    border-radius: 8px;
    color: #7a6a3a;
    font-size: 1.05em;
    padding: 12px 16px 10px 16px;
    margin: 18px 0 16px 0;
    box-shadow: 0 2px 8px rgba(179,163,105,0.07);
}
.info-box b {
    color: #a08a4a;
}
.info-box-soft {
    background: #f4f6fb;
    border-color: #7e9cd8;
    color: #3d5175;
    font-size: 0.95em;
}

#relatives-extra {
    margin-top: 8px;
}

.step-error {
    display: none;
    background: #fff6e6;
    color: #a05a00;
    border: 2px solid #ffb84d;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0 18px 0;
    font-size: 1.08rem;
    font-weight: 500;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(255,184,77,0.08);
}
.step-error.active {
    display: flex;
}
.step-error:before {
    content: "\26A0";
    font-size: 1.3em;
    margin-right: 8px;
    display: inline-block;
}

.step-nav {
    margin-top: 24px;
    text-align: center;
}

.content-box {
    margin-top: 24px;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
#resultInputDataContent,
#resultLegalContent,
#resultPflichtteilContent,
#resultFreeContent {
    line-height: 1.6;
    font-size: medium;
}
.result-data-row {
    margin: 6px 0;
}

/* Ergebnis-Tabellen (Erben / Pflichtteil) */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.98rem;
}
.result-table th,
.result-table td {
    text-align: left;
    padding: 8px 8px;
    border-bottom: 1px solid #e6e6e6;
    vertical-align: top;
}
.result-table th {
    color: var(--gm-grau);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.result-table td.num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.result-table tr.total-row td {
    border-top: 2px solid #d0d0d0;
    border-bottom: none;
    font-weight: 700;
    padding-top: 10px;
}
.heir-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: baseline;
}
.heir-sub {
    display: block;
    color: #888;
    font-size: 0.82rem;
    margin-top: 2px;
}
.pt-none {
    color: #b06a00;
    font-size: 0.9rem;
    font-style: italic;
}

.result-lead {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.free-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2e7d32;
    margin: 6px 0 4px 0;
}
.free-quote-badge {
    display: inline-block;
    background: #edf7ed;
    border: 1px solid #4caf50;
    color: #2e7d32;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 12px;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.voraus-hint {
    margin-top: 12px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    border-top: 1px dashed #d0d0d0;
    padding-top: 10px;
}

/* Verteilungsbalken */
.distbar {
    position: relative;
    display: flex;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0 14px 0;
    background: #eee;
}
.distbar-seg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    padding: 0 4px;
    border-right: 2px solid #fff;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.distbar-seg:last-child {
    border-right: 0;
}
.distlegend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 4px;
}
.distlegend-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #444;
}
.distlegend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
}
.numline-caption {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0 0 0;
}

.disclaimer {
    margin-top: 24px;
    text-align: left;
    font-size: 0.95rem;
    color: #666;
}
.disclaimer-button {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.info-text-before-disclaimer {
    margin-top: 28px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}
.info-text-before-disclaimer p {
    margin: 0;
}
.info-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.lawyer-box {
    display: flex;
    align-items: center;
    gap: 16px;
}
.lawyer-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.lawyer-info { flex: 1; }
.lawyer-more-info {
    margin-top: 12px;
    text-align: center;
}
.lawyer-more-info-link {
    font-size: 0.9rem;
    color: #666;
    text-decoration: underline;
}
.lawyer-name {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
}
.lawyer-description {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

#reset-form {
    display: block;
    margin: 24px auto 0 auto;
}

/* Scoped Typografie-Reset gegen Theme-Regeln */
body .erbrechner-container,
body .erbrechner-container *,
body .erbrechner-container *::before,
body .erbrechner-container *::after {
    font-family: 'Segoe UI', Arial, sans-serif !important;
    letter-spacing: normal !important;
}
body .erbrechner-container button,
body .erbrechner-container .choice-btn,
body .erbrechner-container .btn,
body .erbrechner-container input {
    text-transform: none !important;
}
body .erbrechner-container .choice-btn {
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

@media (max-width: 600px) {
    .container {
        padding: 12px 4vw 18px 4vw;
    }
    h1 {
        font-size: 1.3rem;
    }
    .choice-btns {
        grid-template-columns: 1fr;
    }
    .choice-btns-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .choice-btn {
        font-size: 1.1rem;
        padding: 18px 0;
        min-width: 0;
    }
    .choice-btns-3 .choice-btn {
        font-size: 0.9rem;
        padding: 10px 2px;
        min-height: 84px;
    }
    .stepper-step {
        width: 22px;
        height: 22px;
        font-size: 0.85rem;
    }
    .stepper-line {
        width: 16px;
    }
    input[type="number"], input[type="range"], .choice-btn {
        font-size: 1.1rem;
        padding: 0px 8px;
        height: 44px;
        margin-bottom: 0px;
    }
    .choice-btns-3 .choice-btn {
        height: auto;
    }
    .slider-inline {
        flex-direction: column;
        align-items: flex-start;
    }
    .slider-inline input[type="number"] {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        flex: 1 1 auto;
    }
    input[type="range"] {
        width: 100%;
        margin-right: 0;
    }
    .btn {
        font-size: 0.98rem;
        padding: 8px 10px;
    }
    .info-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    .result-table {
        font-size: 0.9rem;
    }
    .result-table th, .result-table td {
        padding: 6px 4px;
    }
    .lawyer-box {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .lawyer-photo {
        width: 70px;
        height: 70px;
    }
}
