:root {
    --color-primary: #004c70;
    --color-cta: #ea5b0c;
    --color-bg: #f5faff;
    --font-heading: Montserrat, sans-serif;
    --font-body: "Open Sans", sans-serif;
    /* Werte aus energie-faden-paket/tokens/tokens.css */
    --color-primary-dark: #00344f;
    --color-cta-text: #c2480a;
    --color-surface-tint: #e8f5ff;
    --ink: #0f1d25;
    --muted: #41484e;
    --line: #d6e5ef;
    --line-strong: #748a98;
    --surface: #fff;
    --radius: 16px;
    --radius-button: 12px;
    --shadow: 0 10px 28px rgba(0, 76, 112, 0.06);
    --shadow-card: 0 12px 32px rgba(0, 76, 112, 0.12);
    --content: 70rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--ink);
    line-height: 1.55;
}

main {
    flex: 1 0 auto;
    width: 100%;
    max-width: var(--content);
    margin: 0 auto;
    padding: 2.25rem 1.5rem 3rem;
}

a {
    color: var(--color-primary);
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 2px;
}

.site-header-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(0, 76, 112, 0.04);
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    max-width: var(--content);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--color-primary);
    text-decoration: none;
    min-height: 2.75rem;
}

.brand:hover {
    text-decoration: none;
}

/* Wortmarke: nie schmaler als 140 px (Logo-Regel), Seitenverhältnis 961,9 : 124. */
.brand-logo {
    display: block;
    width: 233px;
    min-width: 140px;
    max-width: 58vw;
    height: auto;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.15rem;
}

.site-nav a,
.nav-form button {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.site-nav a:hover,
.nav-form button:hover,
.site-nav a:focus-visible,
.nav-form button:focus-visible {
    background: #e7f1f7;
    text-decoration: none;
}

.site-nav a[aria-current="page"] {
    background: #e7f1f7;
}

.site-nav a.nav-strong {
    border: 1.5px solid var(--color-primary);
    background: var(--surface);
}

.site-nav a.nav-strong:hover {
    background: var(--color-primary);
    color: #fff;
}

.nav-form {
    display: inline;
    margin: 0;
}

.nav-form button {
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-check {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
}

main h1,
.prose h1,
.hero h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

main h1,
.prose h1 {
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    margin: 0 0 0.75rem;
}

main h2,
main h3,
.card h2,
.steps h2,
.trust h2,
.prose h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-primary);
}

main h3,
.prose h3 {
    font-weight: 700;
}

main h2,
.card h2,
.steps h2,
.trust h2,
.prose h2 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
}

.prose h2 {
    margin-top: 1.6rem;
}

.prose h3 {
    font-size: 1.05rem;
    margin: 1.25rem 0 0.4rem;
}

.lead {
    font-size: 1.12rem;
    margin: 0 0 1rem;
    color: var(--muted);
    max-width: 38rem;
}

body:not(.page-home) main > section:not(.account):not(:has(.cards)) {
    max-width: 44rem;
}

.hero h1 {
    font-size: clamp(2.05rem, 3.6vw, 2.85rem);
    max-width: 18em;
    margin: 0 0 0.35rem;
}

.hero h1::after {
    content: "";
    display: block;
    width: 3.25rem;
    height: 4px;
    margin-top: 1rem;
    border-radius: 999px;
    background: var(--color-cta);
}

.site-test-banner {
    margin: 0;
    padding: 0.55rem 1.25rem;
    background: #7a1f12;
    color: #fff8f4;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

.hero-test-banner {
    margin: 0 0 1.5rem;
    padding: 1.35rem 1.4rem;
    border: 4px solid #7a1f12;
    border-radius: 14px;
    background: #fff1e8;
    color: #4a140c;
}

.hero-test-banner p {
    margin: 0;
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    line-height: 1.35;
}

.sku-choice-cards {
    display: grid;
    gap: 0.75rem;
    margin: 0.75rem 0 1.1rem;
}

@media (min-width: 40rem) {
    .sku-choice-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.sku-choice-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.05rem;
    border: 2px solid #c5d6e3;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.sku-choice-card:has(input:checked) {
    border-color: var(--color-cta);
    box-shadow: 0 0 0 3px rgba(234, 91, 12, 0.18);
}

.sku-choice-card input {
    margin: 0 0 0.15rem;
}

.sku-choice-card span {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero {
    padding: 2.25rem 1.5rem 2rem;
    border-radius: var(--radius);
    background: var(--color-surface-tint);
}

/* Haupt-Button der Marke: volles Orange nur mit Text ab 19 px fett, einer pro Ansicht. */
.hero .cta {
    margin-top: 1.35rem;
    padding: 16px 28px;
    background: var(--color-cta);
    font-family: var(--font-body);
    font-size: 1.1875rem;
    font-weight: 700;
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    margin-top: 0.25rem;
    padding: 0.7rem 1.3rem;
    background: #bf4a09;
    /* Markenorange abgedunkelt: weiße Schrift erreicht so mindestens 4,5 : 1 (WCAG AA). */
    background: color-mix(in srgb, var(--color-cta) 82%, #000);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    border: 0;
    border-radius: var(--radius-button);
    cursor: pointer;
}

.cta:hover,
.cta:focus {
    filter: brightness(0.95);
    text-decoration: none;
    color: #fff;
}

.test-finish {
    margin-left: 0.6rem;
    padding: 0.7rem 1.1rem;
    border: 2px dashed var(--color-primary);
    border-radius: 999px;
    background: transparent;
    color: var(--color-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.test-finish:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cta:disabled,
button.cta:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: none;
}

.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.card,
.trust,
.steps {
    margin: 1.25rem 0;
}

.card,
.unit-card,
.faq-suggest,
.faq-help {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    padding: 1.35rem 1.45rem 1.4rem;
    display: flex;
    flex-direction: column;
}

.card p:last-child {
    margin-top: auto;
    margin-bottom: 0;
}

.card p:last-child a:not(.cta) {
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
}

.card p:last-child a:not(.cta)::after {
    content: " →";
}

.steps {
    background: transparent;
    border: 0;
    padding: 0.25rem 0 0;
    box-shadow: none;
}

.steps ol {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem 1.15rem 1.15rem 1.15rem;
}

.steps li::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.7rem;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.trust {
    background: var(--color-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    padding: 1.45rem 1.5rem;
    box-shadow: none;
}

.trust h2,
.trust a {
    color: #fff;
}

.trust p:last-child {
    margin-bottom: 0;
}

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.site-footer-inner {
    max-width: var(--content);
    margin: 0 auto;
    padding: 1.6rem 1.5rem 2.2rem;
    font-size: 0.95rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.15rem;
    margin-bottom: 0.75rem;
}

.site-footer a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer p {
    margin: 0;
    max-width: 42rem;
    color: var(--muted);
}

.site-footer p.site-footer-operator {
    margin-top: 0.5rem;
}

.site-footer p.site-footer-operator a {
    font-weight: 400;
    text-decoration: underline;
}

.form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem 1.35rem 1.45rem;
    max-width: 40rem;
}

.form .field {
    margin: 0 0 1rem;
}

.form .field label,
.form fieldset.field legend {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.form .field input:not([type="checkbox"]):not([type="radio"]),
.form .field select,
.form .field textarea,
.filter-bar .field input,
.filter-bar .field select {
    width: 100%;
    max-width: none;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
}

.form .field textarea {
    min-height: 8rem;
    resize: vertical;
}

.form input[type="checkbox"],
.form input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    max-width: none;
    flex: 0 0 auto;
    margin: 0.15rem 0 0;
    padding: 0;
    border: 0;
    accent-color: var(--color-primary);
}

.form .form-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.form .field-check label,
.form .choice {
    font-weight: 400;
    font-family: var(--font-body);
    color: var(--ink);
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
}

.form .field-check label span,
.form .choice span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
}

.form .choice-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.15rem 0 0.35rem;
}

.form fieldset.field {
    border: 0;
    margin: 0 0 1rem;
    padding: 0;
}

.form .hint {
    display: block;
    font-weight: 400;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
}

.form .company-fields,
.form .xrechnung-fields,
.form .billing-address-fields {
    display: none !important;
}

.form:has(#customer-kind-company:checked) .company-fields,
.form:has(#want-xrechnung:checked) .xrechnung-fields,
.form:has(#billing-different:checked) .billing-address-fields {
    display: block !important;
}

.form:has(#customer-kind-company:checked) .withdrawal-waiver {
    display: none !important;
}

.form fieldset[data-address] {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 0.85rem;
}

.form button[name="intent"][value="quote"],
.form button[name="intent"][value="back"],
.form button[name="intent"][value="save"] {
    margin-right: 0.65rem;
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    background: #fff;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: 10px;
    cursor: pointer;
}

.form button.cta {
    border: 0;
}

.form .card,
.form .faq-help,
.form .faq-suggest {
    box-shadow: none;
    background: var(--color-bg);
}

.address-suggest {
    margin: 0.15rem 0 0.35rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 0.55rem 0.7rem 0.45rem;
}

.address-suggest[hidden] {
    display: none !important;
}

.address-suggest p {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--muted);
}

.address-suggest ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 14rem;
    overflow: auto;
}

.address-suggest button {
    display: block;
    width: 100%;
    text-align: left;
    font: inherit;
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    color: var(--color-primary);
}

.address-suggest button:hover,
.address-suggest button:focus {
    background: #eef6fb;
}

.field-mark {
    display: inline-block;
    min-width: 1.15em;
    margin-left: 0.35rem;
    font-weight: 700;
}

.field-mark.is-ok {
    color: #2e7d32;
}

.field-mark.is-bad {
    color: #c62828;
}

.field-error {
    display: block;
    color: #a32020;
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.flash {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin: 0 0 1rem;
}

.flash-ok {
    background: #e7f6ea;
    border-left: 4px solid #2e7d32;
}

.flash-error {
    background: #fdecea;
    border-left: 4px solid #c62828;
}

.ampel {
    border-left-width: 6px;
    border-left-style: solid;
}

.ampel-green {
    border-left-color: #2e7d32;
}

.ampel-yellow {
    border-left-color: #c9a227;
}

.ampel-red {
    border-left-color: #c62828;
}

.kennzahlen-grid {
    display: grid;
    gap: 0.75rem 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    margin: 0.75rem 0 0;
}

.kennzahlen-grid dt {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 600;
}

.step-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--muted);
}

.step-nav li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.step-nav .step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    border: 1.5px solid var(--line-strong);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
}

.step-nav .is-current {
    font-weight: 700;
    color: var(--color-primary);
}

.step-nav .is-current .step-no,
.step-nav .is-done .step-no {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -4rem;
    z-index: 50;
    padding: 0.6rem 1rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 0 0 10px 10px;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

main:focus {
    outline: none;
}

.nav-check:focus-visible + .nav-toggle {
    outline: 3px solid var(--color-cta);
    outline-offset: 2px;
}

.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    background: #fff;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: 10px;
    cursor: pointer;
}

.button-danger {
    color: #a32020;
    border-color: #a32020;
}

.button-danger:hover,
.button-danger:focus-visible {
    background: #a32020;
    color: #fff;
}

.add-object {
    margin: 1.5rem 0;
}

.add-object > summary {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.add-object[open] > summary {
    margin-bottom: 0.9rem;
}

.form .form-section-title {
    margin: 1.75rem 0 0.9rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
    font-size: 1.1rem;
}

.form [hidden] {
    display: none !important;
}

/* Formular in Schritten (intake.js). Ohne JavaScript bleiben alle Abschnitte sichtbar. */
.form-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.4rem;
    padding: 0;
    list-style: none;
}

.form-steps button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    background: #fff;
    color: var(--muted);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
}

.form-steps .step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    border: 1.5px solid var(--line-strong);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
}

.form-steps .is-current button {
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
}

.form-steps .is-current .step-no {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.form-steps .has-error button {
    border-color: #b3261e;
}

.form-steps .has-error .step-no {
    border-color: #b3261e;
    color: #b3261e;
}

.form.has-steps .form-step > .form-section-title {
    margin-top: 1rem;
    font-size: 1.25rem;
}

.form .form-step-lead {
    margin: -0.4rem 0 1rem;
}

.form .form-step fieldset.field > legend {
    font-size: 1.02rem;
    margin-bottom: 0.5rem;
}

.form-step-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.65rem;
    margin: 1.5rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--line);
}

.form .step-back {
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    background: #fff;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    border-radius: 10px;
    cursor: pointer;
}

.form .step-next {
    margin-left: auto;
}

.price {
    margin: 0.35rem 0 0.6rem;
    font-size: 1.05rem;
}

.price strong {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-primary);
}

.hero .hint {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.order-summary p {
    margin: 0.2rem 0;
}

.account-offer {
    margin: 1rem 0;
}

.account-offer ul {
    margin: 0.35rem 0 0.75rem;
    padding-left: 1.2rem;
}

.account-offer li {
    margin: 0.2rem 0;
}

.status {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #e7f0f6;
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.status-fertig {
    background: #e5f4ea;
    color: #0d5c2e;
}

.status-bezahlt {
    background: #fff4e8;
    color: #8a3b00;
}

.status-offen {
    background: #e7f0f6;
    color: var(--color-primary);
}

.expiry-note {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #fff4e8;
    color: var(--color-primary);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
    margin: 0 0 1.5rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-bar .field {
    margin: 0;
    flex: 1 1 12rem;
}

.filter-bar .field label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary);
    margin-bottom: 0.3rem;
}

.filter-actions {
    margin: 0;
}

.object-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.object-table th,
.object-table td {
    text-align: left;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.object-table th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: #e8f2f8;
}

.object-table tr:last-child td {
    border-bottom: 0;
}

.object-units {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.unit-cards {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.unit-card {
    padding: 0.95rem 1.05rem;
}

.unit-card h3 {
    margin: 0 0 0.35rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.unit-card h3 a {
    text-decoration: none;
}

.unit-card h3 a:hover {
    text-decoration: underline;
}

.unit-card p {
    margin: 0.25rem 0;
}

.unit-card .cta,
.unit-card form {
    margin-top: 0.55rem;
}

.table-scroll {
    overflow-x: auto;
}

.faq-suggest,
.faq-help {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
}

.faq-suggest h2 {
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
}

.faq-suggest p,
.faq-help p {
    margin: 0.35rem 0 0;
}

.faq-suggest summary,
.faq-help summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary);
}

.prose {
    max-width: 42rem;
}

.prose p,
.prose li {
    font-size: 1.05rem;
}

.prose .cta {
    margin-right: 0.75rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--color-cta);
    outline-offset: 2px;
}

@media (max-width: 47.99rem) {
    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.35rem 0 0.5rem;
    }

    .nav-check:checked ~ .site-nav {
        display: flex;
    }

    .table-scroll {
        display: none;
    }

    .nav-form {
        display: block;
    }

    .nav-form button,
    .site-nav a {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (min-width: 40rem) {
    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .form fieldset[data-address] {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
    }

    .form fieldset[data-address] > legend,
    .form fieldset[data-address] > .field[data-field="wohnung"] {
        grid-column: 1 / -1;
    }
}

@media (min-width: 48rem) {
    .nav-toggle {
        display: none;
    }

    .object-cards-only {
        display: none;
    }

    .unit-cards {
        grid-template-columns: 1fr 1fr;
    }

    .steps ol {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Hausmodell im Bedarfsformular (hausmodell.js). */
.hausmodell {
    margin: 0 0 1.4rem;
}

.hm-stage {
    position: relative;
    overflow: hidden;
    height: min(52vh, 24rem);
    min-height: 15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(#dcefff, #f3f9ff 62%, #eef3ea);
    touch-action: pan-y;
    /* Das Modell bleibt beim Ausfüllen sichtbar, unter der festen Kopfzeile. */
    position: sticky;
    top: 4.5rem;
    z-index: 2;
}

@media (max-width: 40rem) {
    .hm-stage {
        height: 38vh;
        min-height: 13rem;
    }
}

.hm-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.hm-stage.hm-nogl {
    position: static;
    height: auto;
    min-height: 0;
    border: 0;
    background: none;
}

.hm-nogl .hm-labels,
.hm-nogl .hm-views {
    display: none;
}

.hm-labels {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hm-lab {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.1rem 0.5rem 0.1rem 0.15rem;
    white-space: nowrap;
    pointer-events: auto;
    background: var(--surface);
    border: 1.5px solid var(--color-primary);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 76, 112, 0.18);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.hm-lab b {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
}

.hm-lab.is-sel {
    border-color: var(--color-cta);
}

.hm-lab.is-sel b {
    background: var(--color-cta);
}

.hm-lab.is-off {
    border-style: dashed;
    border-color: var(--line-strong);
    color: var(--muted);
}

.hm-lab.is-off b {
    background: var(--line-strong);
}

.hm-lab.is-pick {
    cursor: pointer;
}

.hm-lab.is-pick:hover,
.hm-lab.is-pick:focus-visible {
    border-color: var(--color-cta);
}

.hm-lab.is-back {
    opacity: 0;
    pointer-events: none;
}

.hm-plan .hm-lab.is-back {
    opacity: 1;
    pointer-events: auto;
}

.hm-lab input {
    width: 3.4rem;
    padding: 0 0.1rem;
    border: 0;
    border-bottom: 2px solid var(--color-cta);
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: right;
}

.hm-lab.hm-north {
    padding: 0.1rem 0.5rem;
    border-color: #b3261e;
    color: #b3261e;
}

.hm-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 1.5rem;
    color: var(--muted);
    text-align: center;
}

/* Grundriss-Vorschau: Hinweis oben, damit die Wandbezeichnungen frei bleiben. */
.hm-empty.is-caption {
    inset: 0 0 auto 0;
    display: block;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font-size: 0.9rem;
    text-align: left;
    pointer-events: none;
}

.hm-warn {
    margin: 0.8rem 0;
    padding: 0.8rem 1rem;
    border: 2px solid var(--color-cta);
    border-radius: 0.6rem;
    background: #fff4ec;
}

.hm-warn p {
    margin: 0.3rem 0 0.7rem;
}

.hm-warn-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hm-warn-btns button {
    min-height: 2.6rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.hm-sub {
    margin: 0.8rem 0 0.4rem;
    font-weight: 700;
}

.hm-seg.hm-gauben {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.hm-seg.hm-gauben .hm-opt {
    display: grid;
    justify-items: start;
    gap: 0.1rem;
    border-radius: 0.7rem;
    text-align: left;
}

.hm-gauben svg {
    width: 2.4rem;
    height: 1.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.hm-gauben small {
    color: var(--muted);
    font-size: 0.75rem;
}

.hm-nogl .hm-empty {
    position: static;
    padding: 0 0 0.5rem;
    text-align: left;
}

.hm-views {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.hm-views button {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.15rem 0.6rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--color-primary);
    font-size: 0.8rem;
    cursor: pointer;
}

.hm-toast {
    position: absolute;
    left: 50%;
    top: 0.6rem;
    max-width: 90%;
    padding: 0.25rem 0.9rem;
    transform: translateX(-50%);
    background: var(--color-primary);
    border-radius: 999px;
    color: #fff;
    font-size: 0.85rem;
    text-align: center;
}

.hm-panel h3,
.hm-result h3 {
    margin: 1.3rem 0 0.45rem;
    font-size: 1rem;
}

.hm-panel .hint {
    margin: -0.2rem 0 0.6rem;
}

.hm-opts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.6rem, 1fr));
    gap: 0.5rem;
}

.hm-opt,
.hm-tool {
    display: grid;
    gap: 0.2rem;
    justify-items: start;
    min-height: 2.75rem;
    padding: 0.55rem 0.7rem;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 12px;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.hm-opt small,
.hm-tool small {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.3;
}

.hm-opt svg {
    width: 3rem;
    height: 2.1rem;
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-linejoin: round;
}

.hm-opt[aria-pressed="true"],
.hm-tool[aria-pressed="true"] {
    background: #fff1e8;
    border-color: var(--color-cta);
    box-shadow: inset 0 0 0 1px var(--color-cta);
}

.hm-seg {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.hm-seg .hm-opt {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
}

.hm-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.7rem;
}

.hm-fld {
    margin: 0;
}

.hm-fld.hm-narrow {
    max-width: 16rem;
    margin-top: 0.7rem;
}

.hm-fld label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.hm-in {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hm-in input {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.45rem 0.6rem;
    background: #fff;
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    color: var(--ink);
    font: inherit;
}

.hm-tip {
    margin: 0.8rem 0 0;
    padding: 0.55rem 0.75rem;
    background: #eaf4fb;
    border-radius: 10px;
    font-size: 0.87rem;
}

.hm-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.hm-stepper button,
.hm-pm button {
    width: 2.6rem;
    height: 2.6rem;
    background: #fff;
    border: 1.5px solid var(--color-primary);
    border-radius: 50%;
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.hm-pm button[disabled] {
    opacity: 0.35;
    cursor: default;
}

.hm-stepper strong {
    min-width: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-align: center;
}

.hm-rose {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 5.6rem));
    gap: 0.4rem;
}

.hm-rose .hm-opt {
    justify-items: center;
    padding: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.hm-mid {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
}

.hm-rows {
    display: grid;
    gap: 0.4rem;
}

.hm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.hm-row .hm-tool {
    flex: 1;
}

.hm-pm {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.hm-pm strong {
    min-width: 1.2rem;
    text-align: center;
}

.hm-selbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.7rem;
    padding: 0.5rem 0.7rem;
    background: #fff1e8;
    border: 1.5px solid var(--color-cta);
    border-radius: 10px;
    font-size: 0.9rem;
}

.hm-selbox button {
    min-height: 2.4rem;
    padding: 0.3rem 0.9rem;
    background: #fff;
    border: 1.5px solid var(--color-primary);
    border-radius: 10px;
    color: var(--color-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.hm-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.5rem;
}

.hm-totals div {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.hm-totals span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.hm-totals strong {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.hm-scroll {
    overflow-x: auto;
}

.hm-result table {
    width: 100%;
    margin-top: 0.6rem;
    border-collapse: collapse;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

.hm-result th,
.hm-result td {
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

.hm-result th:first-child,
.hm-result td:first-child {
    text-align: left;
}

.hm-result thead th {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.hm-result .hm-off td {
    color: var(--muted);
}

/* „i“-Knopf mit Erklärung in einfacher Sprache */
.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.25rem;
    padding: 0;
    border: 1.5px solid var(--color-primary);
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    font: italic 700 0.9rem/1 Georgia, 'Times New Roman', serif;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
}

.info-btn::after {
    content: '';
    position: absolute;
    inset: -0.6rem;
}

.info-btn:hover,
.info-btn[aria-expanded="true"] {
    background: var(--color-primary);
    color: #fff;
}

.info-btn:focus-visible {
    outline: 3px solid var(--color-accent, #f60);
    outline-offset: 2px;
}

.info-btn[hidden],
.info-text[hidden],
.field-error[hidden] {
    display: none;
}

.form .info-text,
.info-text {
    display: block;
    margin: 0.15rem 0 0.5rem;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 6px 6px 0;
    background: #f1f6fa;
    color: var(--text, #1c2b36);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Pflichtfelder: offen und ausgefüllt deutlich unterscheiden */
.field-req {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.08rem 0.5rem;
    border-radius: 999px;
    background: #fff1e0;
    border: 1px solid #e8862a;
    color: #8a4a00;
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
    white-space: nowrap;
}

.field-req[hidden] {
    display: none;
}

.form [data-field].is-open,
.form [data-field].is-done {
    padding-left: 0.75rem;
    border-left: 4px solid #e8862a;
}

.form [data-field].is-done {
    border-left-color: #2e7d32;
}

.form [data-field].is-done .field-req {
    background: #e7f6ea;
    border-color: #2e7d32;
    color: #1b5e20;
}

.form [data-field].is-open input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form [data-field].is-open select {
    border-color: #e8862a;
    background-color: #fffaf3;
}

.form [data-field].is-done input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form [data-field].is-done select {
    border-color: #2e7d32;
}

.form-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    font-size: 0.86rem;
    color: var(--muted);
}

.form-legend .field-req {
    margin-left: 0;
    margin-right: 0.35rem;
}

.form-legend .is-done-chip {
    background: #e7f6ea;
    border-color: #2e7d32;
    color: #1b5e20;
}

/* „Was fehlt noch“ auf jeder Seite */
.step-missing {
    margin: 1.2rem 0 0.4rem;
    padding: 0.8rem 1rem;
    border: 1px solid #e8862a;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fffaf3;
}

.step-missing.is-complete {
    border-color: #2e7d32;
    background: #f0f9f1;
    color: #1b5e20;
}

.step-missing ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.step-missing li button {
    padding: 0.3rem 0.7rem;
    min-height: 2.2rem;
    border: 1px solid #e8862a;
    border-radius: 999px;
    background: #fff;
    color: #8a4a00;
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
}

.step-missing li button:hover {
    background: #fff1e0;
}

.step-missing .hint {
    margin-top: 0.5rem;
}

.form-steps .step-open {
    display: inline-grid;
    place-items: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.4rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #e8862a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.form-steps .step-open[hidden] {
    display: none;
}

.form-steps .is-complete:not(.is-current) .step-no {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.field-prefilled {
    color: #6a4a00;
}

/* Fotos */
.photo-field {
    margin: 0 0 1.1rem;
}

.photo-list {
    margin: 0.2rem 0 0.4rem;
    padding: 0;
    list-style: none;
}

.photo-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.6rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    background: #f0f9f1;
    color: #1b5e20;
    font-size: 0.92rem;
}

.photo-list button.photo-remove {
    min-height: 2.2rem;
    padding: 0.2rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--color-primary);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.photo-list label.photo-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    font-weight: 400;
    font-size: 0.85rem;
}

.photo-field input[type="file"] {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.7rem;
    border: 2px dashed var(--line);
    border-radius: 8px;
    background: #fafcfd;
    font: inherit;
}

.photo-field.is-busy input[type="file"] {
    opacity: 0.5;
    pointer-events: none;
}

/* Fenster am Modell: eingesetzte Teile, Größe ändern */
.hm-panel h4 {
    margin: 1rem 0 0.35rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--muted);
}

.hm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.3rem 0 0.6rem;
}

.hm-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 2.6rem;
    padding: 0.3rem 0.7rem;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.hm-chip small {
    font-weight: 400;
    color: var(--muted);
}

.hm-chip[aria-pressed="true"] {
    border-color: #ea5b0c;
    background: #fff4ec;
}

.hm-selbox {
    display: block;
}

.hm-size {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.6rem 0.9rem;
    margin-top: 0.5rem;
}

.hm-size label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
}

.hm-size .hm-in input {
    width: 5.5rem;
}

/* Breite Bildschirme: mehr Platz, Felder nebeneinander, das Haus bleibt neben den Angaben stehen */

@media (min-width: 62rem) {
    body:not(.page-home) main > section.intake:not(.account):not(:has(.cards)) {
        max-width: 76rem;
    }

    .intake > h1,
    .intake > p {
        max-width: 46rem;
    }

    .intake .form {
        max-width: none;
    }

    .intake .form-step:not([hidden]),
    .intake .form-step fieldset.field:not([hidden]):not([data-address]):not(.photo-fields) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.75rem;
        align-items: start;
    }

    .intake .form-step > *,
    .intake .form-step fieldset.field > * {
        grid-column: 1 / -1;
    }

    .intake .form-step > .field:not(.field-check):not(fieldset),
    .intake .form-step fieldset.field > .field:not(.field-check):not(fieldset) {
        grid-column: auto;
    }

    .intake .form-step > .field[hidden],
    .intake .form-step fieldset.field > .field[hidden] {
        display: none;
    }

    .intake .photo-fields {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.75rem;
    }

    .intake .photo-fields > legend,
    .intake .photo-fields > .hint {
        grid-column: 1 / -1;
    }

    .intake .hausmodell {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 1fr);
        column-gap: 1.75rem;
        align-items: start;
    }

    .intake .hausmodell > * {
        grid-column: 2;
    }

    .intake .hausmodell > .hm-stage {
        grid-column: 1;
        grid-row: 1 / span 6;
        height: min(calc(100vh - 7rem), 40rem);
        min-height: 22rem;
        top: 5rem;
    }

    .intake .hausmodell > .hm-stage.hm-nogl {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

/* Tablet: Modell oben, bleibt beim Scrollen sichtbar */
@media (min-width: 40.01rem) and (max-width: 61.99rem) {
    .hm-stage {
        height: 42vh;
        min-height: 16rem;
    }
}

/* Smartphone: kompakter, große Tippflächen, Modell macht beim Tippen Platz */
@media (max-width: 40rem) {
    .form {
        padding: 1rem 0.85rem 1.2rem;
    }

    .hm-stage {
        height: 34vh;
        min-height: 12rem;
        top: 3.6rem;
        margin-left: -0.35rem;
        margin-right: -0.35rem;
    }

    .hausmodell.hm-typing .hm-stage {
        height: 22vh;
        min-height: 8.5rem;
    }

    /* Am Smartphone dreht man mit dem Finger: die Wand-Knöpfe würden das Modell verdecken. */
    .hm-views button[data-view]:not([data-view="top"]) {
        display: none;
    }

    /* Oben rechts, damit die Knöpfe das Längenfeld der vorderen Wand nicht verdecken. */
    .hm-views {
        left: auto;
        bottom: auto;
        top: 0.4rem;
        right: 0.4rem;
    }

    .hm-views button {
        min-width: 2.4rem;
        min-height: 2.4rem;
    }

    .form-legend {
        font-size: 0.8rem;
    }

    .hm-opts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-steps {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 0.3rem;
    }

    .form-steps li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .form-step-nav {
        display: flex;
        flex-direction: column-reverse;
        gap: 0.6rem;
    }

    .form-step-nav button {
        width: 100%;
        min-height: 3rem;
    }

    .form .field input:not([type="checkbox"]):not([type="radio"]),
    .form .field select {
        font-size: 1rem;
        min-height: 2.9rem;
    }
}

/* Speicherstand: bleibt beim Ausfüllen unten rechts sichtbar. */
.save-pill {
    position: fixed;
    right: 0.8rem;
    bottom: 0.8rem;
    z-index: 30;
    margin: 0;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: var(--muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.save-pill.is-ok {
    color: #1f6b3a;
    border-color: #9fcfb0;
}

.save-pill.is-bad {
    color: #a12a1c;
    border-color: #e2a79f;
    background: #fff3f1;
    font-weight: 700;
}

/* Smartphone im Querformat: wenig Höhe. Das Modell steht links und bleibt stehen, die Angaben laufen rechts daneben. */
@media (orientation: landscape) and (max-height: 33rem) and (min-width: 34rem) {
    .intake .hausmodell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 0.9rem;
        align-items: start;
    }

    .intake .hausmodell > * {
        grid-column: 2;
    }

    .intake .hausmodell > .hm-stage,
    .intake .hausmodell.hm-typing > .hm-stage {
        grid-column: 1;
        grid-row: 1 / span 6;
        height: calc(100vh - 5.2rem);
        height: calc(100dvh - 5.2rem);
        min-height: 10rem;
        top: 4.6rem;
        margin-left: 0;
        margin-right: 0;
    }

    .intake .hausmodell > .hm-stage.hm-nogl {
        grid-column: 1 / -1;
        grid-row: auto;
        height: auto;
    }

    .hm-views button[data-view]:not([data-view="top"]) {
        display: none;
    }

    .hm-views {
        left: auto;
        bottom: auto;
        top: 0.4rem;
        right: 0.4rem;
    }

    .hm-views button {
        min-width: 2.4rem;
        min-height: 2.4rem;
    }

    .hm-opts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-panel > h3:first-child {
        margin-top: 0;
    }
}
