/*
 * Dateipfad: assets/css/bi-anleitung.css
 * Anleitung «So funktioniert's» (anleitung.php, includes/anleitung/sec_overview.php & sec_topic.php)
 * Gleicher Stil wie Ratgeber, Beispiele & Roadmap. Mobile first.
 */

.gd-page {
    background-color: var(--bg-body, #f8fafc);
    color: var(--text-main, #0f172a);
}
.gd-page *, .gd-page *::before, .gd-page *::after { box-sizing: border-box; }
html.gd-noscroll, html.gd-noscroll body { overflow: hidden !important; }

/* =========================================================================
   GEMEINSAME BAUSTEINE
   ========================================================================= */
.gd-section {
    max-width: 1160px;
    width: 100%;
    min-width: 0;
    margin: 0 auto 70px;
    padding: 0 5%;
    scroll-margin-top: 90px;
}
.gd-section-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 28px;
}
.gd-section-head h2 {
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin: 0 0 10px;
    color: var(--text-main, #0f172a);
}
.gd-section-head p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
}
.gd-badge {
    --gd-accent: var(--primary-color, #2771c8);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gd-accent);
    background: rgba(39, 113, 200, 0.08);
    background: color-mix(in srgb, var(--gd-accent) 9%, transparent);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border: 1px solid color-mix(in srgb, var(--gd-accent) 24%, transparent);
    margin-bottom: 12px;
}
.gd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    white-space: nowrap;
}
.gd-chip.is-live {
    color: #047857;
    background: rgba(16, 185, 129, 0.09);
    border-color: rgba(16, 185, 129, 0.28);
}
.gd-center { text-align: center; margin-top: 24px; }
.gd-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 14px;
    border: 1.5px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.gd-btn-outline:hover {
    border-color: var(--primary-color, #2771c8);
    color: var(--primary-color, #2771c8);
    transform: translateY(-2px);
}
.gd-empty {
    text-align: center;
    padding: 34px 20px;
    border: 1px dashed var(--border-color, #cbd5e1);
    border-radius: 20px;
    color: var(--text-muted, #64748b);
    background: var(--bg-card, #ffffff);
}
.gd-empty i { font-size: 1.8rem; margin-bottom: 8px; display: block; opacity: 0.7; }
.gd-empty p { margin: 0; }

/* Formatierte Texte aus dem Admin-Tool */
.gd-prose p { margin: 0 0 10px; }
.gd-prose p:last-child { margin-bottom: 0; }
.gd-prose ul { margin: 0 0 10px; padding-left: 20px; }
.gd-prose ul:last-child { margin-bottom: 0; }
.gd-prose li { margin-bottom: 4px; }
.gd-prose strong { color: var(--text-main, #0f172a); font-weight: 800; }
.gd-prose a {
    color: var(--primary-color, #2771c8);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* =========================================================================
   ÜBERSICHT
   ========================================================================= */
.gd-path-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.gd-path-card {
    --gd-accent: var(--primary-color, #2771c8);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 22px;
    border-radius: 24px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.gd-path-card:hover {
    transform: translateY(-3px);
    border-color: rgba(148, 163, 184, 0.45);
    border-color: color-mix(in srgb, var(--gd-accent) 45%, transparent);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}
.gd-path-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #ffffff;
    background: var(--gd-accent);
    background: linear-gradient(135deg, var(--gd-accent), color-mix(in srgb, var(--gd-accent) 65%, #0f172a));
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--gd-accent) 30%, transparent);
}
.gd-path-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.gd-path-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gd-accent);
}
.gd-path-title { font-size: 1.15rem; font-weight: 900; color: var(--text-main, #0f172a); }
.gd-path-text { font-size: 0.86rem; color: var(--text-muted, #64748b); line-height: 1.5; }
.gd-path-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gd-accent);
    background: rgba(39, 113, 200, 0.08);
    background: color-mix(in srgb, var(--gd-accent) 10%, transparent);
}
.gd-practice-note {
    margin: 18px auto 0;
    max-width: 820px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
    font-size: 0.88rem;
    line-height: 1.5;
}
.gd-practice-note i { color: #10b981; font-size: 1.1rem; margin-top: 2px; }

.gd-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.gd-topic-card {
    --gd-accent: var(--primary-color, #2771c8);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 20px 18px;
    border-radius: 22px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.gd-topic-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0;
    height: 4px;
    background: var(--gd-accent);
    opacity: 0.85;
}
.gd-topic-card:hover {
    transform: translateY(-3px);
    border-color: rgba(148, 163, 184, 0.45);
    border-color: color-mix(in srgb, var(--gd-accent) 40%, transparent);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}
.gd-topic-top { display: flex; align-items: center; justify-content: space-between; }
.gd-topic-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--gd-accent);
    background: rgba(39, 113, 200, 0.08);
    background: color-mix(in srgb, var(--gd-accent) 11%, transparent);
}
.gd-topic-num { font-size: 0.8rem; font-weight: 900; color: var(--border-color, #cbd5e1); letter-spacing: 1px; }
.gd-topic-title { font-size: 1.04rem; font-weight: 900; line-height: 1.3; color: var(--text-main, #0f172a); }
.gd-topic-teaser { font-size: 0.86rem; color: var(--text-muted, #64748b); line-height: 1.5; flex: 1; }
.gd-topic-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.gd-topic-go {
    margin-top: 6px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--gd-accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gd-faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.gd-faq-item {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
}
.gd-faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-weight: 800;
    font-size: 0.93rem;
    line-height: 1.4;
    color: var(--text-main, #0f172a);
}
.gd-faq-item summary::-webkit-details-marker { display: none; }
.gd-faq-item summary > i:first-child { color: var(--primary-color, #2771c8); flex-shrink: 0; }
.gd-faq-item summary span { flex: 1; min-width: 0; }
.gd-faq-chevron { color: var(--text-muted, #94a3b8); transition: transform 0.2s ease; flex-shrink: 0; }
.gd-faq-item[open] .gd-faq-chevron { transform: rotate(180deg); }
.gd-faq-body {
    padding: 0 16px 16px 42px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted, #475569);
}

/* =========================================================================
   THEMEN-SEITE
   ========================================================================= */
.gd-topic-page { --gd-accent: var(--primary-color, #2771c8); }

.gd-crumbs {
    max-width: 1240px;
    margin: 0 auto;
    padding: 22px 5% 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
}
.gd-crumbs a { color: var(--text-muted, #64748b); text-decoration: none; }
.gd-crumbs a:hover { color: var(--primary-color, #2771c8); }
.gd-crumb-sep { font-size: 0.6rem; opacity: 0.6; }
.gd-crumbs span[aria-current] { color: var(--text-main, #0f172a); }

.gd-topic-head {
    max-width: 1240px;
    margin: 0 auto;
    padding: 22px 5% 26px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}
.gd-draft-note {
    position: absolute;
    top: 0;
    right: 5%;
    font-size: 0.74rem;
    font-weight: 800;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 4px 10px;
    border-radius: 10px;
}
.gd-step-offline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 800;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 8px;
    border-radius: 8px;
    margin: 0 0 6px 6px;
    vertical-align: middle;
}
.gd-topic-head-icon {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #ffffff;
    background: var(--gd-accent);
    background: linear-gradient(135deg, var(--gd-accent), color-mix(in srgb, var(--gd-accent) 62%, #0f172a));
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--gd-accent) 30%, transparent);
}
.gd-topic-head-text { min-width: 0; flex: 1; }
.gd-topic-head .gd-badge { --gd-accent: inherit; margin-bottom: 8px; }
.gd-topic-head h1 {
    font-size: clamp(1.7rem, 4.4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.6px;
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--text-main, #0f172a);
    overflow-wrap: anywhere;
}
.gd-lead {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
    max-width: 760px;
    margin-bottom: 14px;
}
.gd-head-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Aufteilung: Schritte + Übung */
.gd-layout {
    max-width: 1240px;
    margin: 0 auto 60px;
    padding: 0 5%;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr);
}
.gd-layout.no-demo { max-width: 900px; }

/* Übung (Handy zuerst: oben) */
.gd-demo-col { min-width: 0; }
.gd-demo-panel {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 26px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-margin-top: 80px;
}
.gd-demo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 4px 0 8px;
}
.gd-demo-bar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 900;
    color: var(--text-main, #0f172a);
    min-width: 0;
}
.gd-demo-bar-title i { color: #10b981; }
.gd-demo-bar-actions { display: flex; gap: 6px; flex-shrink: 0; }
.gd-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-body, #f8fafc);
    color: var(--text-main, #0f172a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.88rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gd-icon-btn:hover, .gd-icon-btn.is-on {
    background: var(--primary-color, #2771c8);
    border-color: var(--primary-color, #2771c8);
    color: #ffffff;
}

.gd-design-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 4px;
}
.gd-design-switch::-webkit-scrollbar { display: none; }
/* Mit Maus (Computer): umbrechen statt seitlich scrollen – so ist jedes Design erreichbar */
@media (hover: hover) and (pointer: fine) {
    .gd-design-switch { flex-wrap: wrap; overflow-x: visible; row-gap: 6px; }
}
.gd-design-label { font-size: 0.76rem; font-weight: 800; color: var(--text-muted, #64748b); white-space: nowrap; }
.gd-design-pill {
    flex-shrink: 0;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}
.gd-design-pill.is-active {
    background: var(--text-main, #0f172a);
    border-color: var(--text-main, #0f172a);
    color: #ffffff;
}
.gd-design-pill.is-soon { opacity: 0.55; cursor: default; }
.gd-design-pill em {
    font-style: normal;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    padding: 1px 5px;
    border-radius: 6px;
    margin-left: 3px;
}

.gd-device {
    position: relative;
    height: min(72vh, 680px);
    min-height: 460px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-body, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
}
.gd-device iframe {
    display: block;
    /* iPhone: «1px + min-width 100%» verhindert, dass Safari den Rahmen breiter macht als den Platz */
    width: 1px;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    border: 0;
    background: var(--bg-body, #f8fafc);
}
.gd-device-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-body, #f8fafc);
    color: var(--text-muted, #64748b);
    font-size: 0.88rem;
    font-weight: 700;
    z-index: 2;
    transition: opacity 0.25s ease;
}
.gd-device-loader.is-hidden { opacity: 0; pointer-events: none; }
.gd-demo-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: var(--text-muted, #64748b);
    padding: 0 6px 2px;
    line-height: 1.4;
}
.gd-demo-foot i { color: #10b981; }

/* Vollbild (vor allem fürs Handy) */
.gd-demo-panel.is-full {
    position: fixed;
    inset: 0;
    z-index: 100000;
    border-radius: 0;
    border: none;
    padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
    margin: 0;
}
.gd-demo-panel.is-full .gd-device { height: auto; flex: 1; min-height: 0; }
html.gd-noscroll { overscroll-behavior: none; }
.gd-demo-panel.is-full { overscroll-behavior: contain; animation: gdSheetIn 0.22s ease-out; }
@keyframes gdSheetIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
/* Bei offener Tastatur (iPhone): nur die Übung, nichts darunter */
.gd-demo-panel.is-kb .gd-demo-cap,
.gd-demo-panel.is-kb .gd-demo-foot,
.gd-demo-panel.is-kb .gd-design-switch { display: none !important; }
.gd-demo-panel.is-full.has-cap .gd-demo-foot { display: none; }
/* Wischen auf Leiste & Schritt-Anzeige soll nicht die Seite dahinter bewegen (Tippen geht weiterhin) */
.gd-demo-panel.is-full .gd-demo-bar { touch-action: none; }
.gd-demo-panel.is-full .gd-design-switch { touch-action: pan-x; }

/* Schritt-Anzeige unter der Übung (Handy, Übung über die ganze Seite) */
.gd-demo-cap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 12px 10px;
    border-radius: 18px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 -6px 22px rgba(15, 23, 42, 0.06);
}
.gd-demo-cap[hidden] { display: none; }
.gd-cap-head { display: flex; align-items: flex-start; gap: 10px; touch-action: none; }
.gd-cap-num.gd-step-marker { width: 32px; height: 32px; border-radius: 10px; font-size: 0.88rem; }
.gd-demo-cap.is-tipp .gd-cap-num { color: #059669; background: rgba(16, 185, 129, 0.14); }
.gd-demo-cap.is-achtung .gd-cap-num { color: #ffffff; background: #f59e0b; }
.gd-demo-cap.is-done .gd-cap-num { background: #10b981; color: #ffffff; }
.gd-demo-cap.is-done .gd-cap-num > :not(.gd-step-check) { display: none; }
.gd-demo-cap.is-done .gd-cap-num .gd-step-check { display: inline-block; }
.gd-cap-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gd-cap-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.7rem; font-weight: 800; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: 0.4px; }
.gd-cap-state:empty { display: none; }
.gd-cap-state { text-transform: none; letter-spacing: 0; padding: 1px 7px; border-radius: 999px; color: #b45309; background: rgba(245, 158, 11, 0.14); }
.gd-demo-cap.is-done .gd-cap-state { color: #047857; background: rgba(16, 185, 129, 0.12); }
.gd-cap-title { font-size: 0.98rem; font-weight: 900; line-height: 1.3; color: var(--text-main, #0f172a); }
.gd-cap-close {
    width: 40px;
    height: 40px;
    margin: -4px -4px 0 0;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-body, #f8fafc);
    color: var(--text-main, #0f172a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
}
.gd-cap-body {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted, #475569);
    max-height: 21vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.gd-cap-body > :first-child { margin-top: 0; }
.gd-cap-body > :last-child { margin-bottom: 0; }
.gd-cap-nav { display: flex; align-items: center; gap: 8px; touch-action: none; }
.gd-cap-btn {
    height: 42px;
    min-width: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-body, #f8fafc);
    color: var(--text-main, #0f172a);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
}
.gd-cap-btn:disabled { opacity: 0.4; cursor: default; }
.gd-cap-btn.is-show { color: var(--gd-accent); border-color: color-mix(in srgb, var(--gd-accent) 35%, transparent); background: color-mix(in srgb, var(--gd-accent) 7%, transparent); }
.gd-cap-btn.is-show[hidden] { display: none; }
.gd-cap-btn.is-next { margin-left: auto; background: var(--primary-color, #2771c8); border-color: var(--primary-color, #2771c8); color: #ffffff; }
.gd-demo-cap.is-done .gd-cap-btn.is-next { background: #10b981; border-color: #10b981; }

/* Kleine bzw. niedrige Handys (z. B. iPhone SE): Schritt-Anzeige kompakter, damit die Übung gross bleibt */
@media (max-height: 720px) {
    .gd-demo-cap { padding: 9px 10px 8px; gap: 6px; border-radius: 16px; }
    .gd-cap-title { font-size: 0.9rem; }
    .gd-cap-num.gd-step-marker { width: 28px; height: 28px; border-radius: 9px; font-size: 0.8rem; }
    .gd-cap-body { font-size: 0.84rem; line-height: 1.45; max-height: 13vh; }
    .gd-cap-btn { height: 38px; min-width: 38px; font-size: 0.82rem; }
    .gd-cap-close { width: 36px; height: 36px; }
    .gd-demo-panel.is-full { gap: 6px; }
}

/* iPhone: kein Zoom per Doppeltipp auf Knöpfen der Anleitung (mit zwei Fingern zoomen bleibt möglich) */
body.gd-page { touch-action: manipulation; }
.gd-page button, .gd-page a, .gd-page summary { touch-action: manipulation; }
@media (prefers-reduced-motion: reduce) {
    .gd-demo-panel.is-full { animation: none; }
}

/* Schritte */
.gd-steps-col { min-width: 0; }
.gd-progress {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.gd-progress-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-muted, #64748b);
    margin-bottom: 9px;
}
.gd-progress-text i { color: #f59e0b; }
.gd-progress-text strong { color: var(--text-main, #0f172a); }
.gd-progress-track { height: 8px; border-radius: 8px; background: var(--bg-body, #f1f5f9); overflow: hidden; }
.gd-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 8px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.4s ease;
}
.gd-progress.is-complete { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.05); }

.gd-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gd-step {
    display: flex;
    gap: 14px;
    padding: 18px 18px;
    border-radius: 20px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    scroll-margin-top: 90px;
}
.gd-step.is-active { border-color: color-mix(in srgb, var(--gd-accent) 50%, transparent); box-shadow: 0 10px 26px color-mix(in srgb, var(--gd-accent) 14%, transparent); }
.gd-step.is-tipp { background: rgba(16, 185, 129, 0.04); border-color: rgba(16, 185, 129, 0.22); }
.gd-step.is-achtung { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.35); }
.gd-step.is-problem { padding: 0; border: none; background: none; box-shadow: none; display: block; }
.gd-step.is-problem .gd-faq-item { width: 100%; }

.gd-step-marker {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--gd-accent);
    background: rgba(39, 113, 200, 0.08);
    background: color-mix(in srgb, var(--gd-accent) 11%, transparent);
    transition: background 0.25s ease, color 0.25s ease;
}
.gd-step.is-tipp .gd-step-marker { color: #059669; background: rgba(16, 185, 129, 0.14); }
.gd-step.is-achtung .gd-step-marker { color: #ffffff; background: #f59e0b; }
.gd-step-check { display: none; }
.gd-step.is-done .gd-step-marker { background: #10b981; color: #ffffff; }
.gd-step.is-done .gd-step-marker > :not(.gd-step-check) { display: none; }
.gd-step.is-done .gd-step-check { display: inline-block; }

.gd-step-content { min-width: 0; flex: 1; }
.gd-step-kind {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #64748b);
    margin-bottom: 3px;
}
.gd-step.is-tipp .gd-step-kind { color: #059669; }
.gd-step.is-achtung .gd-step-kind { color: #b45309; }
.gd-step-title {
    font-size: 1.03rem;
    font-weight: 900;
    line-height: 1.35;
    margin: 4px 0 6px;
    color: var(--text-main, #0f172a);
}
.gd-step-body { font-size: 0.93rem; line-height: 1.6; color: var(--text-muted, #475569); }
.gd-step-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gd-show-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 12px;
    border: 1.5px solid rgba(148, 163, 184, 0.45);
    border: 1.5px solid color-mix(in srgb, var(--gd-accent) 35%, transparent);
    background: rgba(39, 113, 200, 0.08);
    background: color-mix(in srgb, var(--gd-accent) 7%, transparent);
    color: var(--gd-accent);
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}
.gd-show-btn:hover { background: var(--gd-accent); color: #ffffff; }
.gd-try-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #b45309;
    background: rgba(245, 158, 11, 0.1);
    border: 1px dashed rgba(245, 158, 11, 0.45);
}
.gd-try-done { display: none; }
.gd-step.is-done .gd-try-pill { color: #047857; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.35); }
.gd-step.is-done .gd-try-pill i::before { content: "\f00c"; }
.gd-step.is-done .gd-try-open { display: none; }
.gd-step.is-done .gd-try-done { display: inline; }

/* Nächste offene Übung («Jetzt du») */
.gd-step.is-next {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.14);
}
.gd-step.is-next .gd-try-pill {
    border-style: solid;
    background: rgba(245, 158, 11, 0.16);
    animation: gdNextPulse 1.8s ease-in-out infinite;
}
.gd-step.is-next .gd-try-open::before { content: "Jetzt du: "; }
@keyframes gdNextPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35); }
    50%      { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .gd-step.is-next .gd-try-pill { animation: none; }
}

/* Weiter / Zurück */
.gd-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}
.gd-pager-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    text-decoration: none;
    color: var(--text-main, #0f172a);
    min-width: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.gd-pager-link:hover { border-color: var(--primary-color, #2771c8); transform: translateY(-2px); }
.gd-pager-link.is-next { text-align: right; grid-column: 2; }
.gd-pager-dir { font-size: 0.74rem; font-weight: 800; color: var(--primary-color, #2771c8); text-transform: uppercase; letter-spacing: 0.4px; }
.gd-pager-link strong { font-size: 0.92rem; line-height: 1.35; }

/* Weitere Themen */
.gd-more { margin-bottom: 60px; }
.gd-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.gd-mini-card {
    --gd-accent: var(--primary-color, #2771c8);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    text-decoration: none;
    color: var(--text-main, #0f172a);
    font-weight: 800;
    font-size: 0.88rem;
    line-height: 1.3;
    min-width: 0;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.gd-mini-card:hover { border-color: color-mix(in srgb, var(--gd-accent) 45%, transparent); transform: translateY(-2px); }
.gd-mini-card span:not(.gd-mini-icon) { flex: 1; min-width: 0; }
.gd-mini-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gd-accent);
    background: rgba(39, 113, 200, 0.08);
    background: color-mix(in srgb, var(--gd-accent) 11%, transparent);
}
.gd-mini-arrow { color: var(--text-muted, #94a3b8); font-size: 0.75rem; }

/* Rückmeldung nach einer Übung */
.gd-toast {
    position: fixed;
    left: 50%;
    bottom: calc(22px + env(safe-area-inset-bottom));
    transform: translate(-50%, 16px);
    z-index: 100010;
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: calc(100% - 28px);
    padding: 12px 18px;
    border-radius: 16px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.gd-toast i { color: #34d399; }
.gd-toast.is-warn i { color: #fbbf24; }
.gd-toast.is-warn i::before { content: "\f05a"; }
.gd-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
/* Übung über die ganze Seite (Handy): Meldung oben, damit sie die Schritt-Anzeige nicht verdeckt */
html.gd-sheet-open .gd-toast { top: calc(10px + env(safe-area-inset-top)); bottom: auto; transform: translate(-50%, -16px); }
html.gd-sheet-open .gd-toast.is-visible { transform: translate(-50%, 0); }

/* =========================================================================
   GRÖSSERE BILDSCHIRME
   ========================================================================= */
@media (min-width: 1000px) {
    .gd-layout.has-demo {
        grid-template-columns: minmax(0, 1fr) 440px;
        gap: 34px;
        align-items: stretch; /* rechte Spalte so hoch wie die Schritte -> Übung bleibt beim Scrollen stehen */
    }
    .gd-layout.has-demo .gd-demo-col { grid-column: 2; grid-row: 1; align-self: stretch; }
    .gd-layout.has-demo .gd-steps-col { grid-column: 1; grid-row: 1; align-self: start; }
    .gd-demo-col .gd-demo-panel:not(.is-full) {
        position: sticky;
        top: 88px;
    }
    .gd-demo-panel:not(.is-full) .gd-device {
        height: calc(100vh - 264px);
        max-height: 820px;
        min-height: 520px;
    }
    #gdDemoFull { display: none; }
}

@media (max-width: 999px) {
    .gd-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gd-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .gd-section { margin-bottom: 52px; }
    .gd-path-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .gd-path-card { padding: 16px; gap: 12px; border-radius: 20px; }
    .gd-path-icon { width: 48px; height: 48px; font-size: 1.2rem; border-radius: 15px; }
    .gd-path-arrow { display: none; }
    .gd-topic-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .gd-mini-grid { grid-template-columns: minmax(0, 1fr); }
    .gd-topic-head { gap: 14px; padding-top: 16px; flex-direction: column; }
    .gd-topic-head-icon { width: 54px; height: 54px; font-size: 1.35rem; border-radius: 17px; }
    .gd-draft-note { position: static; align-self: flex-start; }
    .gd-step { padding: 15px 14px; gap: 12px; border-radius: 18px; }
    .gd-step-marker { width: 32px; height: 32px; border-radius: 10px; font-size: 0.88rem; }
    .gd-step-body { font-size: 0.92rem; }
    .gd-pager { grid-template-columns: minmax(0, 1fr); }
    .gd-pager-link.is-next { grid-column: 1; }
    .gd-device { height: 68vh; min-height: 420px; }
    .gd-faq-body { padding-left: 16px; }
}

@media print {
    .gd-demo-col, .gd-toast, .gd-step-actions, .gd-pager { display: none !important; }
}

/* =========================================================================
   SCHALTER «GRATIS | ALLE» (Übung «Event verwalten»)
   Nach den Regeln des Funktionsumfangs, nicht nach einem Tarif:
   «Alle» = alles sichtbar, was nicht in der Gratis-Version enthalten ist, ist gold umrandet.
   ========================================================================= */
.gd-plan-toggle {
    height: 36px;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-body, #f1f5f9);
    display: inline-flex;
    align-items: stretch;
    gap: 2px;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.gd-plan-seg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.gd-plan-ring {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    border: 2px solid #d4a72c;
    box-sizing: border-box;
    flex-shrink: 0;
}
.gd-plan-toggle[aria-pressed="false"] .gd-plan-seg.is-free,
.gd-plan-toggle[aria-pressed="true"] .gd-plan-seg.is-all {
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
}
.gd-plan-toggle:focus-visible { outline: 2px solid var(--primary-color, #2771c8); outline-offset: 2px; }

/* =========================================================================
   HÄUFIGE FRAGEN IM THEMA (aus dem FAQ-Tool)
   ========================================================================= */
.gd-topic-faq { margin-top: 26px; }
.gd-topic-faq.is-main { margin-top: 0; }
.gd-topic-faq .gd-faq-list { max-width: none; }
.gd-topic-faq-title {
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--text-main, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}
.gd-topic-faq-title i { color: var(--gd-accent, var(--primary-color, #2771c8)); }
.gd-topic-faq-more {
    margin: 14px 2px 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-muted, #64748b);
    overflow-wrap: anywhere;
}
.gd-topic-faq-more a { color: var(--primary-color, #2771c8); font-weight: 700; }

/* =========================================================================
   «HAT DIR DIESE ANLEITUNG GEHOLFEN?»
   ========================================================================= */
.gd-feedback {
    margin-top: 26px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px dashed var(--border-color, #cbd5e1);
    background: var(--bg-body, #f8fafc);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
}
.gd-feedback-q { font-weight: 800; font-size: 0.92rem; color: var(--text-main, #0f172a); }
.gd-feedback-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.gd-feedback-btn {
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gd-feedback-btn:hover { border-color: var(--primary-color, #2771c8); color: var(--primary-color, #2771c8); }
.gd-feedback.is-done .gd-feedback-btn { pointer-events: none; opacity: 0.5; }
.gd-feedback.is-done .gd-feedback-btn.is-picked { opacity: 1; border-color: #10b981; color: #10b981; }
.gd-feedback-thanks { flex-basis: 100%; font-size: 0.85rem; color: #047857; font-weight: 700; }
.gd-feedback-thanks i { color: #e11d48; }

/* Leiste über der Übung: auf schmalen Handys nichts überlappen lassen */
.gd-demo-bar { flex-wrap: wrap; row-gap: 8px; }
.gd-demo-bar-title { flex: 1 1 140px; }
.gd-demo-bar-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-width: 420px) {
    .gd-demo-bar.has-premium .gd-demo-bar-title span { display: none; }
    .gd-demo-bar.has-premium .gd-demo-bar-title { flex: 0 0 auto; }
    .gd-plan-seg { padding: 0 9px; }
}

/* Handy: Übung etwas breiter (weniger Rand), damit Einladung & Verwaltung nicht zu schmal werden */
@media (max-width: 480px) {
    .gd-demo-col { margin-left: -10px; margin-right: -10px; }
    .gd-demo-panel { padding: 8px 6px; border-radius: 20px; }
    .gd-device { border-radius: 16px; }
    .gd-demo-bar { padding: 2px 2px 0 6px; }
    .gd-demo-foot { padding: 0 4px 2px; }
}

/* Häufige Fragen: gleiche Karten wie auf der FAQ-Seite (assets/css/bi-feedback.css) */
.gd-topic-faq .faq-accordion-list { max-width: none; gap: 12px; }
.gd-topic-faq.is-main .faq-accordion-list { max-width: 920px; }
#hilfe .faq-accordion-list { max-width: 920px; }

/* «Hat dir diese Anleitung geholfen?» mit Daumen (bi-feedback.css) */
.gd-feedback .bi-fb-bar { margin: 0; padding: 0; border: none; width: 100%; }
.gd-feedback .bi-fb-label { font-size: 0.92rem; font-weight: 800; color: var(--text-main, #0f172a); }
.gd-feedback .bi-fb-bar.has-vote .bi-fb-label { color: #047857; font-size: 0.86rem; }
.gd-feedback .bi-fb-bar.has-vote-down .bi-fb-label { color: #b45309; }
