/* =====================================================================
   Magen-OP – Stylesheet
   Leitidee: der Notfallausweis selbst. Klinikrot, das blasse Kreuz der
   Karte, zweisprachige Beschriftung und DIN-Schrift wie auf Dokumenten.
   Schriften kommen aus dem Betriebssystem – keine externen Webfonts.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
    --rot: #b4141b;
    --rot-tief: #8f0f15;
    --rot-zart: #f8dcdd;
    --rot-hauch: #fdf2f2;
    --tinte: #1c2632;
    --tinte-2: #3a4551;
    --grau: #5b6570;
    --linie: #d6dbe1;
    --linie-zart: #e7eaee;
    --papier: #f2f3f5;
    --flaeche: #ffffff;
    --auf-rot: #ffffff;
    --gruen: #1b7447;
    --gruen-zart: #e2f2e9;
    --bernstein: #86520a;
    --bernstein-zart: #fbeed8;
    --fokus: #b4141b;

    --font-display: "DIN Condensed", "DIN Alternate", "Bahnschrift SemiCondensed", "Bahnschrift", "Roboto Condensed",
        "Arial Narrow", "DejaVu Sans Condensed", sans-serif-condensed, sans-serif;
    --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: 1.3125rem;
    --step-2: 1.625rem;
    --step-3: 2.0625rem;
    --step-4: clamp(2.2rem, 4.4vw, 2.75rem);
    --step-5: clamp(2.7rem, 6.6vw, 4.6rem);

    --radius: 6px;
    --radius-gross: 10px;
    /* Eckenradius einer Scheckkarte (ID-1: 3,18 mm bei 85,6 × 53,98 mm) */
    --radius-karte: 3.7% / 5.9%;
    --schatten-objekt: 0 1px 2px rgba(28, 38, 50, .10), 0 18px 36px -14px rgba(28, 38, 50, .38);
    --schatten-leise: 0 1px 2px rgba(28, 38, 50, .06), 0 6px 16px -10px rgba(28, 38, 50, .25);

    --breite: 1180px;
    --gutter: clamp(16px, 4vw, 40px);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --rot: #ea4a50;
        --rot-tief: #ff7076;
        --rot-zart: #3a1f24;
        --rot-hauch: #2a1a1e;
        --tinte: #e9edf1;
        --tinte-2: #c9d0d7;
        --grau: #9aa5b0;
        --linie: #34404c;
        --linie-zart: #29333d;
        --papier: #151b22;
        --flaeche: #1c242d;
        --auf-rot: #ffffff;
        --gruen: #5fc792;
        --gruen-zart: #173327;
        --bernstein: #f0b45a;
        --bernstein-zart: #352914;
        --fokus: #ff8a8f;
        --schatten-objekt: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 36px -14px rgba(0, 0, 0, .7);
        --schatten-leise: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px -10px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --rot: #ea4a50;
    --rot-tief: #ff7076;
    --rot-zart: #3a1f24;
    --rot-hauch: #2a1a1e;
    --tinte: #e9edf1;
    --tinte-2: #c9d0d7;
    --grau: #9aa5b0;
    --linie: #34404c;
    --linie-zart: #29333d;
    --papier: #151b22;
    --flaeche: #1c242d;
    --auf-rot: #ffffff;
    --gruen: #5fc792;
    --gruen-zart: #173327;
    --bernstein: #f0b45a;
    --bernstein-zart: #352914;
    --fokus: #ff8a8f;
    --schatten-objekt: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 36px -14px rgba(0, 0, 0, .7);
    --schatten-leise: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 16px -10px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: var(--font-text);
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--tinte);
    background: var(--flaeche);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.site-main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rot); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--rot-tief); text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
    overflow-wrap: break-word;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: .005em;
    margin: 0 0 .5em;
    color: var(--tinte);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
address { font-style: normal; }
code { font-size: .9em; background: var(--papier); padding: .1em .35em; border-radius: 4px; }

:focus-visible {
    outline: 3px solid var(--fokus);
    outline-offset: 2px;
    border-radius: 3px;
}

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--tinte); color: var(--flaeche); padding: .6em 1em; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: var(--flaeche); }

.container { width: 100%; max-width: calc(var(--breite) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: calc(1440px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 46rem; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--tinte-2); max-width: 36em; }
.muted { color: var(--grau); }
.small { font-size: var(--step--1); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 48px; padding: .7em 1.25em;
    font: inherit; font-weight: 650; line-height: 1.2;
    border-radius: var(--radius); border: 2px solid transparent;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--rot); color: var(--auf-rot); }
.btn-primary:hover { background: var(--rot-tief); color: var(--auf-rot); }
:root[data-theme="dark"] .btn-primary:hover { background: #c7343a; }
.btn-secondary { background: transparent; color: var(--tinte); border-color: var(--linie); }
.btn-secondary:hover { border-color: var(--tinte); color: var(--tinte); }
.btn-ghost { background: transparent; color: var(--rot); padding-inline: .2em; min-height: auto; }
.btn-ghost:hover { color: var(--rot-tief); text-decoration: underline; }
.btn-danger { background: transparent; color: var(--rot); border-color: var(--rot); }
.btn-danger:hover { background: var(--rot); color: var(--auf-rot); }
.btn-small { min-height: 38px; padding: .45em .9em; font-size: var(--step--1); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

.button-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------- Kopfbereich ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--flaeche) 94%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--linie-zart);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--tinte); text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--tinte); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; color: var(--rot); flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1; letter-spacing: .01em; padding-top: .08em; }
.brand-sub { color: var(--grau); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 1.5rem; flex: 1; justify-content: space-between; }
.main-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav ul a {
    display: block; padding: .5rem .7rem; color: var(--tinte-2); text-decoration: none; font-weight: 550; border-radius: var(--radius);
}
.main-nav ul a:hover { color: var(--tinte); background: var(--papier); }
.main-nav a[aria-current="page"] { color: var(--rot); box-shadow: inset 0 -2px 0 var(--rot); border-radius: 0; }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-secondary { color: var(--tinte-2); font-weight: 550; text-decoration: none; }
.nav-secondary:hover { color: var(--rot); }

.theme-toggle {
    width: 40px; height: 40px; display: inline-grid; place-items: center;
    background: transparent; border: 1px solid var(--linie); border-radius: 50%; color: var(--tinte-2); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--tinte-2); color: var(--tinte); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
}

.nav-toggle { display: none; }

@media (max-width: 1020px) {
    .header-inner { justify-content: space-between; min-height: 64px; }
    .nav-toggle {
        display: inline-grid; place-items: center; width: 44px; height: 44px;
        background: transparent; border: 1px solid var(--linie); border-radius: var(--radius); cursor: pointer; color: var(--tinte);
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
        display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .2s ease;
    }
    .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle-bars::before { top: -6px; }
    .nav-toggle-bars::after { top: 6px; }
    .nav-open .nav-toggle-bars { background: transparent; }
    .nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
    .nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--flaeche); border-bottom: 1px solid var(--linie); padding: .5rem var(--gutter) 1.25rem;
        box-shadow: var(--schatten-leise);
    }
    .nav-open .main-nav { display: flex; }
    .main-nav ul { flex-direction: column; }
    .main-nav ul a { padding: .85rem 0; border-bottom: 1px solid var(--linie-zart); border-radius: 0; font-size: var(--step-1); }
    .main-nav a[aria-current="page"] { box-shadow: none; }
    .nav-actions { padding-top: 1rem; flex-wrap: wrap; }
    .nav-actions .btn { flex: 1; }
}

/* ---------- Meldungen ---------- */
.notice {
    margin: 1.25rem 0; padding: .9rem 1.1rem; border-radius: var(--radius);
    border: 1px solid var(--linie); border-left-width: 4px; background: var(--flaeche);
}
.notice p:last-child, .notice ul:last-child { margin-bottom: 0; }
.notice ul { margin-top: .25em; }
.notice-error { border-color: var(--rot); background: var(--rot-hauch); }
.notice-success { border-color: var(--gruen); background: var(--gruen-zart); }
.notice-warn { border-color: var(--bernstein); background: var(--bernstein-zart); }
.notice-info { border-left-color: var(--tinte-2); background: var(--papier); }

/* ---------- Abschnitte ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-papier { background: var(--papier); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--tinte-2); font-size: var(--step-1); line-height: 1.5; }

.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.2rem, 6.6vw, 4.6rem); margin-bottom: .3em; }

/* ---------- Startseite: Hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: var(--step-5); line-height: .98; margin-bottom: .35em; max-width: 9.5em; }
.hero .lead { margin-bottom: 1.75rem; }
.hero-note { margin-top: 1.25rem; color: var(--grau); font-size: var(--step--1); }

.hero-stage { position: relative; aspect-ratio: 1.12; }
/* das blasse Kreuz der Karte als Bühne */
.hero-stage::before {
    content: ""; position: absolute; inset: 2% 6% 2% 10%;
    background:
        linear-gradient(var(--rot-zart), var(--rot-zart)) center / 34% 100% no-repeat,
        linear-gradient(var(--rot-zart), var(--rot-zart)) center / 100% 34% no-repeat;
    border-radius: 12px;
}
.hero-stage figure { margin: 0; position: absolute; }
.hero-stage img { width: 100%; }
.stage-papier { width: 34%; right: 3%; top: 3%; transform: rotate(7deg); z-index: 1; filter: drop-shadow(0 14px 18px rgba(28, 38, 50, .28)); }
.stage-karte { width: 76%; left: 4%; top: 24%; transform: rotate(-5deg); z-index: 2; }
.stage-karte img { border-radius: var(--radius-karte); box-shadow: var(--schatten-objekt); border: 1px solid rgba(28, 38, 50, .12); background: #fff; }
.stage-chip { width: 25%; left: 58%; top: 60%; transform: rotate(12deg); z-index: 3; filter: drop-shadow(0 14px 16px rgba(28, 38, 50, .35)); }

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-stage { max-width: 560px; width: 100%; margin: 0 auto; }
}

/* ---------- Startseite: zweisprachige Felder ---------- */
.emergency-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.field-sheet {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-gross);
    border-top: 6px solid var(--rot);
}
.field-sheet > div { padding: 1.15rem 1.35rem 1.25rem; border-bottom: 1px solid var(--linie-zart); }
.field-sheet > div:nth-child(odd) { border-right: 1px solid var(--linie-zart); }
.field-sheet > div:nth-last-child(-n+2) { border-bottom: 0; }
.field-sheet dt { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.1; }
.field-sheet dt span { display: block; font-family: var(--font-text); font-weight: 400; font-size: var(--step--1); color: var(--grau); font-style: italic; margin-top: .15em; }
.field-sheet dd { margin: .55rem 0 0; color: var(--tinte-2); font-size: .98rem; line-height: 1.5; }
@media (max-width: 860px) {
    .emergency-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .field-sheet { grid-template-columns: 1fr; }
    .field-sheet > div:nth-child(odd) { border-right: 0; }
    .field-sheet > div:nth-last-child(2) { border-bottom: 1px solid var(--linie-zart); }
}

/* ---------- Startseite: Vergleich der Ausführungen ---------- */
.compare {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto 1fr auto auto;
    border: 1px solid var(--linie); border-radius: var(--radius-gross); background: var(--flaeche);
}
.compare-item {
    display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0;
    padding: 0 0 1.5rem; border-right: 1px solid var(--linie);
}
.compare-item:last-child { border-right: 0; }
.compare-media {
    display: flex; align-items: center; justify-content: center; height: 230px; padding: 1.25rem; margin: 0 0 1.25rem;
    background: var(--papier); border-bottom: 1px solid var(--linie); overflow: hidden;
}
.compare-item:first-child .compare-media { border-top-left-radius: var(--radius-gross); }
.compare-item:last-child .compare-media { border-top-right-radius: var(--radius-gross); }
.compare-media img { max-height: 190px; width: auto; max-width: 100%; object-fit: contain; }
.compare-media .is-card { border-radius: var(--radius-karte); box-shadow: var(--schatten-leise); border: 1px solid rgba(28, 38, 50, .12); background: #fff; }
.compare-item h3 { padding: 0 1.5rem; margin-bottom: .3em; font-size: var(--step-3); }
.compare-item > p { padding: 0 1.5rem; color: var(--tinte-2); margin-bottom: 1rem; }
.compare-specs { margin: 0; padding: 0 1.5rem; }
.compare-specs div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; padding: .55rem 0; border-top: 1px solid var(--linie-zart); font-size: .97rem; }
.compare-specs dt { color: var(--grau); }
.compare-specs dd { margin: 0; }
.compare-price { padding: 1.1rem 1.5rem 0; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); }
.compare-price small { font-family: var(--font-text); font-weight: 400; font-size: var(--step--1); color: var(--grau); margin-right: .3em; }
.compare-actions { padding: 1rem 1.5rem 0; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

@media (max-width: 900px) {
    .compare { grid-template-columns: 1fr; grid-template-rows: none; border: 0; background: none; gap: 1.5rem; }
    .compare-item { grid-row: auto; grid-template-rows: none; border: 1px solid var(--linie); border-radius: var(--radius-gross); background: var(--flaeche); }
    .compare-item:last-child { border-right: 1px solid var(--linie); }
    .compare-media { border-radius: var(--radius-gross) var(--radius-gross) 0 0; height: 200px; }
    .compare-media img { max-height: 160px; }
}

/* ---------- Ablauf (echte Reihenfolge) ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding-top: 4.25rem; }
.steps li::before {
    content: counter(step); position: absolute; top: 0; left: 0;
    width: 3rem; height: 3rem; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1; padding-top: .1em;
    color: var(--rot); border: 2px solid var(--rot); border-radius: 50%; background: var(--flaeche);
}
.steps li:not(:last-child)::after {
    content: ""; position: absolute; top: 1.5rem; left: 3.75rem; right: -1.5rem; height: 2px;
    background: repeating-linear-gradient(90deg, var(--linie) 0 8px, transparent 8px 14px);
}
.steps h3 { font-size: var(--step-2); }
.steps p { color: var(--tinte-2); margin: 0; }
@media (max-width: 760px) {
    .steps { grid-template-columns: 1fr; }
    .steps li { padding: 0 0 0 4.5rem; min-height: 3rem; }
    .steps li:not(:last-child)::after { top: 3.6rem; bottom: -1.25rem; left: 1.45rem; right: auto; width: 2px; height: auto;
        background: repeating-linear-gradient(180deg, var(--linie) 0 8px, transparent 8px 14px); }
}

/* ---------- Bild + Text ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-reverse > :first-child { order: 2; }
.screen-shot {
    margin: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-gross);
    padding: clamp(.75rem, 2vw, 1.25rem); box-shadow: var(--schatten-leise);
}
.screen-shot a { display: block; cursor: zoom-in; }
.screen-shot img { border-radius: 4px; margin: 0 auto; max-height: 560px; width: auto; }
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
    .split-reverse > :first-child { order: 0; }
}

.credentials {
    display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.25rem; margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.25rem; background: var(--flaeche); border: 1px dashed var(--linie); border-radius: var(--radius);
    max-width: 24rem;
}
.credentials dt { color: var(--grau); }
.credentials dd { margin: 0; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq-nav { position: sticky; top: 96px; }
.faq-nav ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--linie); }
.faq-nav a { display: block; padding: .45rem 0 .45rem 1rem; margin-left: -2px; color: var(--tinte-2); text-decoration: none; border-left: 2px solid transparent; }
.faq-nav a:hover { color: var(--rot); border-left-color: var(--rot); }
.faq-group { margin-bottom: 3rem; scroll-margin-top: 96px; }
.faq-group h2 { font-size: var(--step-3); }
@media (max-width: 860px) {
    .faq-layout { grid-template-columns: 1fr; }
    .faq-nav { position: static; }
    .faq-nav ul { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; }
    .faq-nav a { border: 1px solid var(--linie); border-radius: 999px; padding: .4rem .9rem; margin: 0; }
}

.faq-list { border-top: 1px solid var(--linie); }
.faq-item { border-bottom: 1px solid var(--linie); }
.faq-item summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
    padding: 1.1rem 0; font-weight: 650; font-size: 1.08rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ""; flex-shrink: 0; width: .7rem; height: .7rem; margin-right: .3rem;
    border-right: 2px solid var(--rot); border-bottom: 2px solid var(--rot); transform: rotate(45deg) translateY(-3px);
    transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-item summary:hover { color: var(--rot); }
.faq-answer { padding: 0 2rem 1.25rem 0; color: var(--tinte-2); max-width: 44rem; }

/* ---------- Produktseiten ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; padding-bottom: clamp(3rem, 7vw, 6rem); }
.gallery { display: grid; gap: 1.25rem; }
.gallery-item { margin: 0; background: var(--papier); border-radius: var(--radius-gross); padding: clamp(1.25rem, 4vw, 2.5rem); }
.gallery-item a { display: block; cursor: zoom-in; }
.gallery-item img { margin: 0 auto; max-height: 520px; width: auto; }
.gallery-item .is-card { border-radius: var(--radius-karte); box-shadow: var(--schatten-objekt); border: 1px solid rgba(28, 38, 50, .12); background: #fff; }
.gallery-item figcaption { text-align: center; color: var(--grau); font-size: var(--step--1); margin-top: 1rem; }
.gallery-two { grid-template-columns: 1fr 1fr; }
.product-info { position: sticky; top: 96px; }
.product-info h1 { font-size: var(--step-4); }
.price-list { list-style: none; padding: 0; margin: 1.5rem 0; border-top: 1px solid var(--linie); }
.price-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--linie); }
.price-list strong { font-family: var(--font-display); font-size: var(--step-1); white-space: nowrap; }
.spec-list { margin: 2rem 0 0; }
.spec-list div { padding: .8rem 0; border-top: 1px solid var(--linie-zart); display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.spec-list dt { color: var(--grau); }
.spec-list dd { margin: 0; }
.spec-list dd ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 900px) {
    .product-layout { grid-template-columns: 1fr; }
    .product-info { position: static; }
}
@media (max-width: 560px) {
    .gallery-two { grid-template-columns: 1fr; }
    .spec-list div { grid-template-columns: 1fr; gap: .15rem; }
}

/* ---------- Formulare ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-bottom: clamp(3rem, 7vw, 6rem); }
@media (max-width: 960px) { .form-layout { grid-template-columns: 1fr; } }

fieldset { border: 0; padding: 0; margin: 0 0 2.75rem; min-width: 0; }
legend {
    display: flex; align-items: baseline; gap: .6rem; width: 100%;
    font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); line-height: 1.1;
    padding: 0 0 .7rem; margin-bottom: 1.25rem; border-bottom: 2px solid var(--tinte);
}
legend .step-no { color: var(--rot); }
.fieldset-hint { color: var(--grau); margin: -.5rem 0 1.25rem; }

.field { margin-bottom: 1.15rem; }
.field label, .field .label { display: block; font-weight: 650; margin-bottom: .35rem; }
.field .hint { display: block; color: var(--grau); font-size: var(--step--1); font-weight: 400; margin-top: .1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"],
input[type="password"], input[type="search"], select, textarea {
    width: 100%; min-height: 48px; padding: .65rem .8rem;
    font: inherit; color: var(--tinte); background: var(--flaeche);
    border: 1px solid var(--linie); border-radius: var(--radius);
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 6.5rem; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--grau); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rot); box-shadow: 0 0 0 3px var(--rot-zart); }
input[type="file"] { font: inherit; width: 100%; padding: .9rem; border: 1px dashed var(--linie); border-radius: var(--radius); background: var(--papier); }

.check { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .9rem; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; accent-color: var(--rot); flex-shrink: 0; }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Produktauswahl in der Bestellung */
.product-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.product-choice {
    position: relative; display: grid; grid-template-columns: 4.5rem 1fr; gap: .9rem; align-items: center;
    padding: .9rem 1rem .9rem .9rem; border: 2px solid var(--linie); border-radius: var(--radius-gross); cursor: pointer;
    background: var(--flaeche); transition: border-color .15s ease, background-color .15s ease;
}
.product-choice:hover { border-color: var(--grau); }
.product-choice.is-selected { border-color: var(--rot); background: var(--rot-hauch); }
.product-choice input { position: absolute; top: .8rem; right: .8rem; width: 1.2rem; height: 1.2rem; accent-color: var(--rot); margin: 0; }
.product-choice:has(input:focus-visible) { outline: 3px solid var(--fokus); outline-offset: 2px; }
.product-choice img { width: 4.5rem; height: 3.4rem; object-fit: contain; }
.product-choice .choice-name { display: block; font-weight: 650; padding-right: 1.5rem; line-height: 1.3; }
.product-choice .choice-price { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); margin-top: .2rem; }

.order-summary {
    position: sticky; top: 96px; padding: 1.5rem; border: 1px solid var(--linie); border-radius: var(--radius-gross);
    background: var(--papier);
}
.order-summary h2 { font-size: var(--step-2); }
.order-summary ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.order-summary li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--linie); }
.order-summary .summary-empty { color: var(--grau); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin: 0 0 1.25rem; }
.summary-total strong { font-family: var(--font-display); font-size: var(--step-3); }
.order-summary .small { margin: 1rem 0 0; color: var(--grau); }
@media (max-width: 960px) { .order-summary { position: static; } }

/* ---------- Bestellung ansehen / Zahlung ---------- */
.order-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: flex-end; }
.order-number { font-family: var(--font-display); font-weight: 700; font-size: var(--step-5); line-height: .95; letter-spacing: .02em; }
.order-number small { display: block; font-family: var(--font-text); font-size: var(--step--1); font-weight: 400; color: var(--grau); letter-spacing: 0; margin-bottom: .4rem; }

.progress { list-style: none; padding: 0; margin: 2rem 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.progress li { position: relative; padding-top: 1.6rem; color: var(--grau); font-size: var(--step--1); }
.progress li::before { content: ""; position: absolute; top: 0; left: 0; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--linie); background: var(--flaeche); z-index: 1; }
.progress li::after { content: ""; position: absolute; top: .45rem; left: 1rem; right: 0; height: 2px; background: var(--linie); }
.progress li:last-child::after { display: none; }
.progress li.done { color: var(--tinte); font-weight: 650; }
.progress li.done::before { background: var(--rot); border-color: var(--rot); }
.progress li.done::after { background: var(--rot); }
.progress li span { display: block; font-weight: 400; color: var(--grau); }

.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.panel { border: 1px solid var(--linie); border-radius: var(--radius-gross); padding: 1.4rem 1.5rem; background: var(--flaeche); }
.panel-wide { grid-column: 1 / -1; }
.panel h2 { font-size: var(--step-2); margin-bottom: .75rem; }
.panel-accent { border-top: 5px solid var(--rot); }
@media (max-width: 760px) { .panels { grid-template-columns: 1fr; } }

.data-list { margin: 0; }
.data-list div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--linie-zart); }
.data-list div:first-child { border-top: 0; }
.data-list dt { color: var(--grau); }
.data-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .data-list div { grid-template-columns: 1fr; gap: .1rem; } }

.copy-value { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.copy-btn {
    font: inherit; font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; cursor: pointer;
    background: transparent; color: var(--tinte-2); border: 1px solid var(--linie);
}
.copy-btn:hover { border-color: var(--tinte-2); }
.copy-btn.is-copied { background: var(--gruen-zart); border-color: var(--gruen); color: var(--gruen); }

.product-lines { list-style: none; padding: 0; margin: 0; }
.product-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--linie-zart); }
.product-lines li.total { border-bottom: 0; font-weight: 700; padding-top: .8rem; }
.product-lines li.total span:last-child { font-family: var(--font-display); font-size: var(--step-2); }

.passfoto-thumb { width: 7rem; border-radius: var(--radius); border: 1px solid var(--linie); margin-bottom: 1rem; }

.login-card { max-width: 30rem; padding: clamp(1.5rem, 4vw, 2.25rem); border: 1px solid var(--linie); border-top: 6px solid var(--rot); border-radius: var(--radius-gross); background: var(--flaeche); }

/* ---------- Status-Pillen ---------- */
.pill {
    display: inline-block; padding: .2em .7em; border-radius: 999px; font-size: .82rem; font-weight: 650; line-height: 1.4;
    background: var(--papier); color: var(--tinte-2); border: 1px solid var(--linie); white-space: nowrap;
}
.pill-ok { background: var(--gruen-zart); color: var(--gruen); border-color: transparent; }
.pill-warn { background: var(--bernstein-zart); color: var(--bernstein); border-color: transparent; }
.pill-alarm { background: var(--rot-hauch); color: var(--rot); border-color: var(--rot-zart); }
.pill-muted { background: transparent; color: var(--grau); }
.pill-neutral { background: var(--papier); }

/* ---------- Rechtstexte ---------- */
.prose { max-width: 44rem; padding-bottom: clamp(3rem, 7vw, 6rem); }
.prose h2 { font-size: var(--step-2); margin-top: 2.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--tinte-2); }

/* ---------- Fußbereich ---------- */
.site-footer { background: #18212b; color: #c8d0d8; margin-top: auto; }
.site-footer a { color: #e8ecf0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1.4fr; gap: 2rem; padding-top: 3.5rem; padding-bottom: 2.5rem; }
.site-footer h2 { font-family: var(--font-text); font-size: var(--step--1); font-weight: 700; color: #fff; margin-bottom: .9rem; letter-spacing: .02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.footer-brand p { max-width: 20rem; margin-top: 1rem; }
.brand-footer, .brand-footer:hover { color: #fff; }
.brand-footer .brand-mark { color: #e0383f; }
.footer-bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.5rem; font-size: var(--step--1); }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid #2d3945; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal .link-button { color: #e8ecf0; text-decoration: none; }
.footer-quiet { color: inherit !important; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Bildvergrößerung ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1200px); max-height: 92vh; }
.lightbox::backdrop { background: rgba(10, 14, 19, .82); }
.lightbox img { max-width: min(94vw, 1200px); max-height: 88vh; width: auto; margin: 0 auto; border-radius: 6px; background: #fff; }
.lightbox-close {
    position: fixed; top: 14px; right: 18px; width: 46px; height: 46px; border-radius: 50%;
    border: 0; background: #fff; color: #1c2632; font-size: 1.8rem; line-height: 1; cursor: pointer;
}

/* ---------- Cookie-Banner ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--flaeche); border-top: 3px solid var(--rot); box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .3); padding: 1.1rem 0; }
.cookie-inner { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-inner p { margin: 0; max-width: 46rem; font-size: .95rem; }
.cookie-actions { display: flex; gap: .6rem; }

/* =====================================================================
   Admin-Bereich
   ===================================================================== */
body.admin { background: var(--papier); }
.admin-header { background: var(--flaeche); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 50; }
.admin-header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; }
.admin-header-actions { display: flex; align-items: center; gap: 1rem; }
.admin-header-actions form { margin: 0; }
.admin-tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: thin; }
.admin-tabs a { padding: .7rem .9rem; color: var(--tinte-2); text-decoration: none; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; }
.admin-tabs a:hover { color: var(--tinte); }
.admin-tabs a[aria-current="page"] { color: var(--rot); border-bottom-color: var(--rot); }
.admin-main { padding-top: 1.75rem; padding-bottom: 4rem; flex: 1; }
.admin-main h1 { font-size: var(--step-4); margin-bottom: .2em; }
.admin-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.admin-title p { margin: 0; color: var(--grau); }

.admin-card { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-gross); padding: 1.25rem 1.4rem; margin-bottom: 1.5rem; }
.admin-card h2 { font-size: var(--step-2); }

.counters { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.counter { display: flex; align-items: baseline; gap: .5rem; padding: .55rem .9rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.counter strong { font-family: var(--font-display); font-size: var(--step-2); line-height: 1; }
.counter span { color: var(--grau); font-size: var(--step--1); }
.counter.is-alarm { border-color: var(--rot); }
.counter.is-alarm strong { color: var(--rot); }

.filter-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1.25rem; }
.filter-bar .field { margin: 0; }
.filter-bar .field-grow { flex: 1 1 16rem; }

.table-wrap { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-gross); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th { text-align: left; font-size: var(--step--1); color: var(--grau); font-weight: 650; padding: .75rem 1rem; background: var(--papier); border-bottom: 1px solid var(--linie); white-space: nowrap; }
.data-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--linie-zart); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table tr.row-warn > td:first-child { box-shadow: inset 4px 0 0 var(--rot); }
.data-table tr.row-current > td { background: var(--rot-hauch); }
.data-table tr.detail-row > td { background: var(--papier); padding: 1.25rem 1.25rem 1.5rem; }
.data-table tfoot td { font-weight: 700; background: var(--papier); border-top: 1px solid var(--linie); }

.order-cell strong { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .02em; }
.meta-lines { display: grid; gap: .1rem; margin-top: .3rem; font-size: .82rem; color: var(--grau); }
.meta-lines .is-warn { color: var(--rot); font-weight: 650; }
.meta-lines .is-due { color: var(--bernstein); font-weight: 650; }

.name-toggle { background: none; border: 0; padding: 0; font: inherit; font-weight: 650; color: var(--tinte); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--linie); text-underline-offset: .25em; }
.name-toggle:hover { color: var(--rot); text-decoration-color: currentColor; }
.name-toggle[aria-expanded="true"] { color: var(--rot); }

.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }

.status-form { display: grid; gap: .35rem; min-width: 13.5rem; }
.status-form .check { margin: 0; font-size: .9rem; gap: .5rem; }
.status-form .check input { width: 1.05rem; height: 1.05rem; margin-top: .2rem; }
.status-form input[type="text"] { min-height: 36px; padding: .35rem .6rem; font-size: .88rem; }
.status-form [data-step] { padding-left: .9rem; border-left: 2px solid var(--linie); }
.status-form .btn { margin-top: .35rem; justify-self: start; }

.action-list { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; min-width: 11rem; }
.action-list form { margin: 0; }
.action-list a, .action-list button.link-action {
    font: inherit; font-size: .9rem; color: var(--tinte-2); background: none; border: 0; padding: .15rem 0; cursor: pointer; text-decoration: none;
}
.action-list a:hover, .action-list button.link-action:hover { color: var(--rot); text-decoration: underline; }
.action-list .danger { color: var(--rot); }
.action-list hr { width: 100%; border: 0; border-top: 1px solid var(--linie-zart); margin: .25rem 0; }

.detail-grid { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.detail-grid h3 { font-family: var(--font-text); font-size: .85rem; color: var(--grau); margin-bottom: .4rem; font-weight: 650; }
.detail-grid p { margin: 0 0 .4rem; }
.detail-photo img { width: 8rem; border-radius: var(--radius); border: 1px solid var(--linie); background: #fff; }
.detail-photo a { cursor: zoom-in; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.related { margin-top: .6rem; }
.related summary { cursor: pointer; color: var(--rot); font-weight: 600; font-size: .9rem; }
.related table { margin-top: .6rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }

.price-table input { max-width: 9rem; text-align: right; }

.admin-login { min-height: 100vh; display: grid; place-items: center; padding: var(--gutter); background: var(--papier); }

/* Tabellen auf kleinen Bildschirmen als Karten */
@media (max-width: 900px) {
    .data-table.responsive thead { display: none; }
    .data-table.responsive, .data-table.responsive tbody, .data-table.responsive tr, .data-table.responsive td { display: block; width: 100%; }
    .data-table.responsive tr { border-bottom: 1px solid var(--linie); padding: .5rem 0; }
    .data-table.responsive td { border: 0; padding: .45rem 1rem; }
    .data-table.responsive td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; color: var(--grau); font-weight: 650; margin-bottom: .15rem; }
    .data-table.responsive .num { text-align: left; }
    .detail-grid { grid-template-columns: 1fr; }
    .admin-header-actions > a { display: none; }
}

/* ---------- Druck ---------- */
@media print {
    .site-header, .site-footer, .nav-toggle, .cookie-banner, .btn, .admin-header { display: none !important; }
    body { background: #fff; color: #000; }
}

/* ---------- Kleinigkeiten ---------- */
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { color: var(--rot); }
.more-link { margin-top: 1.5rem; font-weight: 650; }
.product-choice.pay-choice { grid-template-columns: auto 1fr; align-items: start; }
.product-choice.pay-choice input { position: static; margin-top: .2rem; }
.product-choice.pay-choice .choice-name { padding-right: 0; }
.product-choice.pay-choice .small { display: block; }
.spaced { margin-top: 1.25rem; }
.pt-0 { padding-top: 0; }
.panels-page { padding-bottom: clamp(3rem, 7vw, 6rem); }
a.counter { text-decoration: none; color: var(--tinte); }
a.counter:hover { border-color: var(--grau); }
.counter[aria-current="true"] { border-color: var(--tinte); box-shadow: inset 0 -3px 0 var(--tinte); }
.field .product-choice { display: grid; font-weight: 400; margin: 0; }
.product-choice .choice-name { overflow-wrap: anywhere; hyphens: auto; }
.action-list button.link-action.danger { color: var(--rot); }
.related-toggle { margin-top: .6rem; background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; font-weight: 650; color: var(--rot); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.related-toggle[aria-expanded="true"] { text-decoration: none; }
.related-title { font-family: var(--font-text); font-size: 1rem; margin-bottom: .75rem; }
.detail-row .data-table { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
