/* AP Services - V2 Stylesheet.
   Bewusst dunkles Theme als FESTE Grundausrichtung (nicht nur via
   prefers-color-scheme) - siehe Auftrag "V2", Abschnitt 6: hochwertiges
   Anthrazit/Schwarz, kräftiges Blau als Akzent, modernes SaaS-/
   Software-Unternehmen. Kein Framework, kein Build-Schritt, keine
   externen Schriften/Icons/CDN-Abhängigkeiten - reines, schlankes CSS. */

:root {
    --bg: #0a0b0d;
    --bg-flaeche: #131519;
    --bg-flaeche-hover: #1b1e24;
    --bg-band: #0f2044;
    --rand: #262a31;
    --rand-hell: #33383f;
    --text: #f3f4f6;
    --text-schwach: #9aa1ac;
    --text-sehr-schwach: #858d9b; /* >= 4,7:1 auf allen Flächen (vorher #6b7280: nur 3,3-4,1:1) */
    --rand-eingabe: #6b7280; /* Rahmen von Eingabefeldern: >= 3:1 (WCAG 1.4.11) */
    --akzent: #3b82f6;
    --akzent-hell: #60a5fa;
    --akzent-dunkel: #2563eb;
    --hinweis: #f0b429;
    --fehler: #f87171;
    --erfolg: #34d399;
    --schriftart: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --max-breite: 1160px;
    --radius: 14px;
    --radius-klein: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* zusätzliches Sicherheitsnetz gegen horizontales Overflow */
}

body {
    font-family: var(--schriftart);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--akzent-hell);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Konsistente, deutlich sichtbare Fokuszustände (V3, Tastatur-Bedienbarkeit) -
   ersetzt den Browser-Standard durch einen an das AP-Blau angelehnten Ring. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--akzent-hell);
    outline-offset: 2px;
}

/* .knopf-primaer bekommt stattdessen den Glow unten (kein doppelter Ring) */
.knopf-primaer:focus-visible {
    outline: none;
}

img, svg {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.container {
    max-width: var(--max-breite);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Kopfzeile / Navigation ---------- */

.kopfzeile {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(10, 11, 13, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rand);
}

.kopfzeile-innen {
    max-width: var(--max-breite);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 20px;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.logo span {
    color: var(--akzent-hell);
}

.hauptnavigation {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    justify-content: center;
}

.hauptnavigation a {
    color: var(--text-schwach);
    font-weight: 500;
    font-size: 0.94rem;
    white-space: nowrap;
}

.hauptnavigation a:hover,
.hauptnavigation a.aktiv {
    color: var(--text);
    text-decoration: none;
}

.kopfzeile-cta {
    flex-shrink: 0;
}

/* Nur mobil sichtbarer "Projekt anfragen"-Eintrag im Hamburger-Menü (V3,
   Teil A Abschnitt 2) - auf Desktop bleibt ausschließlich .kopfzeile-cta
   sichtbar, siehe Media-Query unten. */
.nav-cta-mobil {
    display: none;
}

/* Mobile Navigation: <button aria-expanded> (siehe static/js/site.js).
   Ohne JavaScript (Klasse "js" fehlt) bleibt die Navigation als umbrechende
   Linkzeile unter dem Logo sichtbar. */
.menu-knopf {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    /* Touch-Fläche mind. ~44px, sichtbares Icon bleibt klein. */
    width: 44px;
    height: 44px;
    margin: -6px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: var(--radius-klein);
    cursor: pointer;
    flex-shrink: 0;
}

.menu-knopf span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-knopf[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-knopf[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-knopf[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
    .kopfzeile-innen {
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    /* Ohne JavaScript: Navigation als umbrechende Zeile unter dem Logo. */
    .hauptnavigation {
        order: 3;
        flex-basis: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px 20px;
    }

    .hauptnavigation a {
        padding: 8px 0;
    }

    .kopfzeile-cta {
        display: none;
    }

    .nav-cta-mobil {
        display: flex;
        margin: 4px 0;
    }

    /* Mit JavaScript: klassisches Klapp-Menü. */
    .js .kopfzeile-innen {
        height: 60px;
        min-height: 0;
        flex-wrap: nowrap;
        padding-top: 0;
        padding-bottom: 0;
    }

    .js .menu-knopf {
        display: flex;
    }

    .js .hauptnavigation {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-flaeche);
        border-bottom: 1px solid var(--rand);
        /* Deutlicher Schatten: das Menü schwebt als eigene Ebene über dem Inhalt. */
        box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5);
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 0;
        padding: 8px 0;
    }

    .js .hauptnavigation.offen {
        display: flex;
    }

    .js .hauptnavigation a {
        padding: 14px 24px;
        border-bottom: 1px solid var(--rand);
    }

    .js .hauptnavigation a.nav-cta-mobil {
        border-bottom: none;
        margin: 10px 24px 6px;
    }

    .js .hauptnavigation a:not(.nav-cta-mobil):last-of-type {
        border-bottom: none;
    }
}

/* ---------- Buttons ---------- */

.knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-klein);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

/* Weißer Text auf --akzent hatte nur 3,7:1; --akzent-dunkel erreicht 5,2:1. */
.knopf-primaer {
    background: var(--akzent-dunkel);
    color: #fff;
}

.knopf-primaer:hover {
    background: #1d4ed8;
    text-decoration: none;
    transform: translateY(-1px);
}

.knopf-primaer:hover,
.knopf-primaer:focus-visible {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.knopf-sekundaer {
    background: transparent;
    color: var(--text);
    border-color: var(--rand-hell);
}

.knopf-sekundaer:hover {
    border-color: var(--akzent-hell);
    color: var(--akzent-hell);
    text-decoration: none;
}

.knopf-reihe {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    /* Etwas kompakter (V3, Abschnitt 4): weniger horizontales Padding statt
       weniger Höhe - 13px vertikal + Schriftgröße ~15px halten die
       Touch-Fläche bei ca. 44px, wie gefordert. */
    .knopf {
        padding: 13px 22px;
        font-size: 0.92rem;
    }
}

/* ---------- Hero ---------- */

.hero {
    padding: 120px 0 96px;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.14), transparent),
        var(--bg);
    border-bottom: 1px solid var(--rand);
}

.hero .eyebrow {
    display: inline-block;
    color: var(--akzent-hell);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero p.lead {
    font-size: 1.2rem;
    color: var(--text-schwach);
    max-width: 620px;
    margin: 0 auto 36px;
}

.hero .knopf-reihe {
    justify-content: center;
    margin-bottom: 0;
}

/* Hero auf Smartphones ca. 20-25% kompakter (V3, Teil A Abschnitt 3) -
   Headline/Claim/Beschreibung bleiben inhaltlich unverändert, nur Abstände
   und Größen werden gezielt reduziert. */
@media (max-width: 480px) {
    .hero {
        padding: 68px 0 52px;
    }

    .hero .eyebrow {
        margin-bottom: 12px;
    }

    .hero h1 {
        font-size: clamp(1.85rem, 8vw, 2.4rem);
        margin-bottom: 14px;
    }

    .hero p.lead {
        font-size: 1.02rem;
        line-height: 1.5;
        margin: 0 auto 22px;
    }

    /* Buttons untereinander statt nebeneinander: automatisch gleich breit,
       optisch sauber ausgerichtet, ohne die Touch-Höhe zu verkleinern. */
    .hero .knopf-reihe {
        flex-direction: column;
        gap: 10px;
    }

    .hero .knopf-reihe .knopf {
        width: 100%;
    }
}

/* ---------- Abschnitte allgemein ---------- */

.abschnitt {
    padding: 88px 0;
    border-bottom: 1px solid var(--rand);
}

.abschnitt:last-of-type {
    border-bottom: none;
}

.abschnitt-kopf {
    max-width: 620px;
    margin: 0 0 48px;
}

.abschnitt-kopf.zentriert {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.abschnitt-kopf .eyebrow {
    display: block;
    color: var(--akzent-hell);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.abschnitt-kopf h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
    margin-bottom: 14px;
}

.abschnitt-kopf p {
    color: var(--text-schwach);
    margin: 0;
    font-size: 1.05rem;
}

.seiten-kopf {
    padding: 72px 0 44px;
    border-bottom: 1px solid var(--rand);
    background:
        radial-gradient(ellipse 60% 60% at 50% 0%, rgba(59, 130, 246, 0.10), transparent),
        var(--bg);
}

.seiten-kopf h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.5rem);
    margin-bottom: 12px;
}

.seiten-kopf p {
    color: var(--text-schwach);
    max-width: 640px;
    margin: 0;
    font-size: 1.05rem;
}

/* ---------- Karten ---------- */

.karten-raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* Wiederkehrendes AP-Services-Gestaltungsmotiv (V3, Abschnitt 6): ein
   dünner AP-blauer Top-Akzent auf allen "boxed" Elementen (Karten,
   Ablauf-Schritte, Individuelle-Lösungen-Block, Empty State) - EIN
   konsequent eingesetztes Motiv statt vieler verschiedener Effekte. */
.karte {
    background: var(--bg-flaeche);
    border: 1px solid var(--rand);
    border-top: 2px solid rgba(59, 130, 246, 0.45);
    border-radius: var(--radius);
    padding: 30px;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

a.karte {
    display: block;
    color: inherit;
}

/* @media (hover:hover): Hover-Effekt bewusst nur auf Geräten mit echtem
   Zeigegerät (Desktop) - auf Touch-Geräten bliebe ein :hover sonst nach dem
   Antippen "hängen", siehe Auftrag "keine unnötigen Mobile-Hover-Effekte". */
@media (hover: hover) {
    a.karte:hover {
        border-color: var(--rand-hell);
        transform: translateY(-2px);
        box-shadow: 0 10px 28px -12px rgba(59, 130, 246, 0.3);
        text-decoration: none;
    }
}

.karte .symbol {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--akzent-hell);
}

.karte .symbol svg {
    width: 22px;
    height: 22px;
}

.karte h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.karte p {
    margin: 0 0 14px;
    color: var(--text-schwach);
    font-size: 0.96rem;
}

.karte .karte-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--akzent-hell);
}

/* ---------- Produktkarte mit echtem Screenshot (V3, Teil B) ---------- */

.produkt-karte {
    padding: 0;
    overflow: hidden;
}

.produkt-karte .screenshot {
    width: 100%;
    height: auto;
    /* Bewusst KEIN aspect-ratio/object-fit:cover mehr - das hat bei der
       Rechnungssoftware (sehr breiter Screenshot) Text mittig abgeschnitten.
       Ohne erzwungenes Seitenverhältnis wird das Bild immer vollständig und
       unbeschnitten angezeigt (V3, Abschnitt 17: "kein Abschneiden"). */
    display: block;
    border-bottom: 1px solid var(--rand);
}

.produkt-karte .produkt-karte-inhalt {
    padding: 26px 30px 30px;
}

.badge-testversion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(52, 211, 153, 0.12);
    color: var(--erfolg);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ---------- Individuelle Lösungen (Text + CTA) ---------- */

.text-cta-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: var(--bg-flaeche);
    border: 1px solid var(--rand);
    border-top: 2px solid rgba(59, 130, 246, 0.45);
    border-radius: var(--radius);
    padding: 44px;
}

.text-cta-block .text {
    flex: 1 1 380px;
}

.text-cta-block h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.text-cta-block p {
    color: var(--text-schwach);
    margin: 0;
    max-width: 560px;
}

/* ---------- Ablauf / Prozess-Schritte ---------- */

.ablauf-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.ablauf-schritt {
    background: var(--bg-flaeche);
    border: 1px solid var(--rand);
    border-top: 2px solid rgba(59, 130, 246, 0.45);
    border-radius: var(--radius);
    padding: 26px 20px;
    position: relative;
}

.ablauf-schritt .nummer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.14);
    color: var(--akzent-hell);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.ablauf-schritt h3 {
    font-size: 0.98rem;
    margin-bottom: 6px;
}

.ablauf-schritt p {
    color: var(--text-schwach);
    font-size: 0.88rem;
    margin: 0;
}

@media (max-width: 980px) {
    .ablauf-liste {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .ablauf-liste {
        grid-template-columns: 1fr;
    }
}

/* ---------- Empty State (eigene Software) ---------- */

.leerer-zustand {
    text-align: center;
    padding: 56px 32px;
    background: var(--bg-flaeche);
    border: 1px dashed var(--rand-hell);
    border-top: 2px solid rgba(59, 130, 246, 0.45);
    border-radius: var(--radius);
}

.leerer-zustand .symbol {
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--akzent-hell);
}

.leerer-zustand .symbol svg {
    width: 26px;
    height: 26px;
}

.leerer-zustand h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.leerer-zustand p {
    color: var(--text-schwach);
    max-width: 460px;
    margin: 0 auto;
}

/* ---------- Abschluss-CTA-Band ---------- */

.cta-band {
    background: linear-gradient(135deg, var(--bg-band), #0a0b0d 120%);
    /* Etwas stärkerer Abschluss der Startseite (V3, Abschnitt 12/27): der
       obere Rand nutzt denselben Blau-Akzent wie Karten/Ablauf, zusätzlich
       ein sehr dezenter innerer Glow - kein zusätzliches neues Motiv. */
    border-top: 2px solid rgba(59, 130, 246, 0.45);
    border-bottom: 1px solid var(--rand);
    box-shadow: inset 0 1px 60px rgba(59, 130, 246, 0.08);
    padding: 88px 0;
    text-align: center;
}

.cta-band h2 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    margin-bottom: 16px;
}

.cta-band p {
    color: var(--text-schwach);
    max-width: 560px;
    margin: 0 auto 32px;
    font-size: 1.05rem;
}

/* ---------- Rechtstext-/Prosa-Seiten ---------- */

.textseite h2 {
    font-size: 1.25rem;
    margin: 40px 0 12px;
}

.textseite h2:first-of-type {
    margin-top: 0;
}

.textseite p, .textseite li {
    color: var(--text-schwach);
}

.hinweisbox {
    background: rgba(240, 180, 41, 0.08);
    border: 1px solid rgba(240, 180, 41, 0.35);
    border-radius: var(--radius-klein);
    padding: 18px 22px;
    margin-bottom: 40px;
    font-size: 0.95rem;
}

.hinweisbox strong {
    display: block;
    margin-bottom: 4px;
    color: var(--hinweis);
}

.platzhalter {
    background: rgba(240, 180, 41, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    font-style: italic;
    color: var(--text);
}

/* ---------- Screenshot-Galerie + Lightbox (V3, Teil B) ---------- */

.screenshot-galerie {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.screenshot-miniatur {
    display: block;
    padding: 0;
    border: 1px solid var(--rand);
    border-radius: var(--radius-klein);
    overflow: hidden;
    background: var(--bg-flaeche);
    cursor: zoom-in;
}

.screenshot-miniatur img {
    width: 100%;
    height: auto;
}

@media (hover: hover) {
    .screenshot-miniatur:hover {
        border-color: var(--akzent);
    }
}

/* Lightbox als natives <dialog> (siehe software_detail.html / site.js). */
dialog.lightbox {
    border: none;
    background: transparent;
    padding: 24px;
    margin: 0;
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    color: var(--text);
}

dialog.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

dialog.lightbox::backdrop {
    background: rgba(5, 6, 8, 0.92);
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-klein);
}

.lightbox-schliessen {
    position: absolute;
    top: 20px;
    right: 24px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    width: 44px;
    height: 44px;
}

/* ---------- Funktionen-Liste (Produktdetailseite) ---------- */

.funktionen-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px 24px;
}

.funktionen-liste li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.funktionen-liste svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--erfolg);
}

/* ---------- Kontaktdaten-Liste ---------- */

.kontakt-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 20px;
    max-width: 440px;
}

.kontakt-liste li {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rand);
}

.kontakt-liste .bezeichnung {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-sehr-schwach);
}

/* ---------- Formular (Projektanfrage) ---------- */

.formular-flaeche {
    background: var(--bg-flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 720px;
}

.formular-raster {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.formular-feld {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.formular-feld.voll {
    grid-column: 1 / -1;
}

.formular-feld label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.formular-feld .optional {
    font-weight: 400;
    color: var(--text-sehr-schwach);
}

.formular-feld input[type="text"],
.formular-feld input[type="email"],
.formular-feld input[type="tel"],
.formular-feld select,
.formular-feld textarea {
    background: var(--bg);
    border: 1px solid var(--rand-eingabe);
    border-radius: var(--radius-klein);
    padding: 12px 14px;
    color: var(--text);
    font-family: inherit;
    /* Bewusst 16px (nicht kleiner): iOS Safari zoomt beim Fokussieren eines
       Eingabefelds automatisch hinein, wenn dessen Schriftgröße < 16px ist -
       siehe Auftrag "V3", Abschnitt 5. */
    font-size: 16px;
    width: 100%;
}

.formular-feld input:focus,
.formular-feld select:focus,
.formular-feld textarea:focus {
    outline: none;
    border-color: var(--akzent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.formular-feld textarea {
    resize: vertical;
    min-height: 140px;
}

.radio-gruppe {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-chip {
    position: relative;
}

.radio-chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.radio-chip span {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--rand-eingabe);
    font-size: 0.86rem;
    color: var(--text-schwach);
}

.radio-chip input:checked + span {
    background: var(--akzent-dunkel);
    border-color: var(--akzent-dunkel);
    color: #fff;
}

/* Das eigentliche <input> ist unsichtbar (opacity:0) - ohne diese Regel wäre
   ein Tastatur-Fokus auf dem Chip unsichtbar (V3: "Fokuszustände funktionieren"). */
.radio-chip input:focus-visible + span {
    outline: 2px solid var(--akzent-hell);
    outline-offset: 2px;
}

.checkbox-zeile {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-schwach);
    margin: 8px 0 24px;
}

.checkbox-zeile input {
    margin-top: 3px;
}

.formular-meldung {
    border-radius: var(--radius-klein);
    padding: 16px 18px;
    margin-bottom: 24px;
    font-size: 0.92rem;
}

.formular-meldung.hinweis {
    background: rgba(240, 180, 41, 0.1);
    border: 1px solid rgba(240, 180, 41, 0.35);
}

.formular-meldung.fehler {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.formular-meldung.fehler ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

@media (max-width: 620px) {
    .formular-raster {
        grid-template-columns: 1fr;
    }

    .formular-flaeche {
        padding: 26px;
    }
}

/* ---------- Mobile Typografie-Feinschliff (V3, Teil A Abschnitt 5) ----------
   Überschriften bleiben unverändert dominant (h1/h2 nutzen bereits clamp());
   hier wird ausschließlich Fließtext/Absatzabstand auf kleinen Displays
   etwas kompakter gemacht, ohne unter sinnvolle Mindestgrößen zu gehen. */

@media (max-width: 480px) {
    body {
        line-height: 1.55;
    }

    .abschnitt {
        padding: 64px 0;
    }

    .abschnitt-kopf {
        margin-bottom: 32px;
    }

    .abschnitt-kopf p,
    .text-cta-block p,
    .cta-band p {
        font-size: 0.98rem;
        line-height: 1.5;
    }

    .karte p {
        font-size: 0.92rem;
    }
}

/* ---------- Fußzeile ---------- */

.fusszeile {
    padding: 48px 0;
}

.fusszeile-innen {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.fusszeile nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.fusszeile nav a,
.fusszeile p {
    color: var(--text-sehr-schwach);
    font-size: 0.86rem;
    margin: 0;
}

/* ---------- Barrierefreiheit ---------- */

.ueberspringen {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    background: var(--akzent-dunkel);
    color: #fff;
    padding: 10px 16px;
    border-radius: var(--radius-klein);
    font-weight: 600;
}

.ueberspringen:focus {
    top: 12px;
    text-decoration: none;
}

main:focus {
    outline: none;
}

.nur-lesegeraet {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.menu-knopf:focus-visible,
.screenshot-miniatur:focus-visible,
.lightbox-schliessen:focus-visible {
    outline: 2px solid var(--akzent-hell);
    outline-offset: 2px;
}

/* ---------- Formular-Ergänzungen (Fehlerzuordnung, Honeypot, Status) ---------- */

.pflicht {
    color: var(--fehler);
    font-weight: 700;
}

.formular-hinweis {
    color: var(--text-schwach);
    font-size: 0.88rem;
    margin: 0 0 20px;
}

.feld-hinweis,
.feld-fehler {
    margin: 0;
    font-size: 0.86rem;
}

.feld-hinweis {
    color: var(--text-schwach);
}

.feld-fehler {
    color: var(--fehler);
    font-weight: 600;
}

.formular-feld [aria-invalid="true"],
.radio-fieldset[aria-invalid="true"] {
    border-color: var(--fehler);
}

.formular-feld input[aria-invalid="true"]:focus,
.formular-feld textarea[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

.formular-meldung:focus {
    outline: 2px solid var(--akzent-hell);
    outline-offset: 2px;
}

.formular-meldung.fehler a {
    color: var(--text);
    text-decoration: underline;
}

.radio-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

.radio-fieldset legend {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0;
    margin-bottom: 8px;
}

.radio-fieldset legend .optional {
    font-weight: 400;
    color: var(--text-sehr-schwach);
}

.checkbox-zeile input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Honeypot: aus dem Layout und dem Tab-Fluss genommen, für Bots im HTML sichtbar. */
.feld-honig {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sende-status {
    min-height: 1.4em;
    margin: 12px 0 0;
    color: var(--text-schwach);
    font-size: 0.9rem;
}

.knopf.sendet {
    opacity: 0.7;
    cursor: progress;
}

/* ---------- Hilfsklassen (ersetzen frühere Inline-Styles) ---------- */

.container-schmal {
    max-width: 760px;
}

.container-text {
    max-width: 720px;
}

.abstand-oben {
    margin-top: 24px;
}

.abstand-oben-klein {
    margin-top: 14px;
}

.abstand-oben-gross {
    margin-top: 48px;
}

.abstand-unten {
    margin-bottom: 20px;
}

.text-cta-block--spalte {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

.seiten-kopf .badge-testversion {
    margin-top: 16px;
}

.hinweisbox.abstand-oben-gross {
    margin-top: 32px;
}

.fehlercode {
    color: var(--akzent-hell);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.stand {
    margin-top: 40px;
    font-size: 0.86rem;
    color: var(--text-sehr-schwach);
}

/* ---------- Reduzierte Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }

    .knopf-primaer:hover {
        transform: none;
    }
}
