/* ============================================================
   MediEcho – Home v8
   Overrides auf home7.css (nach dieser laden!): ruhigerer Hero,
   Portal-Karte im Viewport, Mobile-Fixes. index7v2 bleibt unberührt.
   ============================================================ */

/* --- Hero: Gradient nur auf „stärksten empfohlenen", Rest ruhig --- */

.hero-title .line-plain-text {
    display: inline-block;
    color: var(--anthracite, var(--navy));
}

/* Desktop-Schrift leicht reduziert: nur so passt „als eine der am
   stärksten" in EINE Zeile und kein Zeilenende landet auf einem
   Funktionswort (der/am) – vier saubere Zeilen statt fünf ausgefranster */
@media (min-width: 761px) {
    .hero-title {
        font-size: clamp(2.45rem, 3.55vw, 3.25rem);
    }
}

/* Auf einer einzelnen Zeile liefe der home7-Gradient am Ende in Navy –
   das letzte Wort würde fast schwarz. Grün länger halten. */
.hero-title .line-gradient-text {
    background: linear-gradient(120deg, var(--green) 0%, var(--green) 62%, var(--green-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* --- KI-Badges: „+ x weitere" als stille Pille --- */

.ai-logo-badge--more {
    padding-left: 12px;
    border: 1px dashed rgba(10, 37, 64, 0.2);
    background: transparent;
    box-shadow: none;
    color: #5d7086;
    font-weight: 600;
}

/* --- Chat-Karte: „+ x weitere"-Pillen gedämpft --- */

.hero-visual .ai-sources .src-more,
.hero-visual .ai-sources .reason.src-more {
    border: 1px dashed rgba(10, 37, 64, 0.16);
    background: transparent;
    color: #7b8ba0;
    font-weight: 600;
}

/* --- Portal-Karte: nicht mehr vom Viewport abgeschnitten.
       home7 schiebt den Stack mit right:-26% aus dem Container –
       auf Laptops (1025–1500px) wird er dadurch hart gekappt. --- */

/* Portal-Leiste: breit und flach unter der Chat-Karte statt hochkant
   daneben – schließt die Hero-Komposition nach unten ab */
@media (min-width: 761px) {
    .hero-visual {
        min-height: 520px;
    }

    /* Stapel-Collage: Chat-Karte als Herzstück, Google-Karte dockt
       oben rechts an, die Portal-Leiste schiebt sich definiert unter
       die Chat-Karte – rechte Kanten bündig */
    .hero-visual .chat-card {
        inset: 96px 0 auto auto;
        margin: 0;
    }

    .hero-visual .g-card {
        top: -16px;
        right: 0;
    }

    .hero-visual .portal-stack {
        position: absolute;
        top: 351px; /* taucht 16px unter die Chat-Karte (Unterkante 367) */
        right: 0;
        bottom: auto;
        left: 0;
        width: auto;
        z-index: 2; /* unter Chat (3) – gleiche Schindelung wie G-Karte über Chat */
    }

    .hero-visual .portal-stack .p-card {
        width: 100%;
        /* oben reine Pufferzone: die Chat-Karte deckt sie ab, der Titel
           startet dadurch an derselben Stelle wie ohne Überlappung */
        padding: 30px 18px 12px;
    }

    .hero-visual .p-card ul {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto auto;
        grid-auto-flow: column;
        column-gap: 26px;
        row-gap: 6px;
        margin-top: 8px;
    }

    .hero-visual .p-card li {
        padding: 2px 0;
        border-bottom: 0;
    }

    .hero-visual .portal-disclaimer {
        margin-top: 10px;
    }

    /* Notiz ohne Pfeil: ankert leicht rotiert an der oberen linken
       Ecke der Chat-Karte */
    .hero-visual .hand-note {
        top: 58px;
        left: 15%;
    }
}

/* Schmale Zweispalter (Laptops): die Spalte ist zu eng, die Notiz
   würde in die Google-Karte laufen – rein dekorativ, also weg.
   Portal-Leiste eine Stufe enger, sonst wird „DocInsider" gekappt. */
@media (min-width: 1025px) and (max-width: 1279px) {
    .hero-visual .hand-note {
        display: none;
    }

    /* Chat-Karte ist hier höher (Antwort bricht 4-zeilig) –
       Leiste tiefer, sonst deckt die Karte den Titel ab */
    .hero-visual .portal-stack {
        top: 368px;
    }

    .hero-visual .p-card ul {
        column-gap: 14px;
    }

    .hero-visual .p-card li {
        font-size: 0.74rem;
    }
}

/* KI-Badges: eine einzige Zeile auf allen Desktop-Breiten. Unter
   1280px (Laptops, Windows-Skalierung 125 % => ~1024px Viewport!)
   eine Stufe kompakter, damit die Reihe auch in der schmaleren
   Copy-Spalte hält. */
@media (min-width: 761px) {
    .ai-logo-badges {
        gap: 5px;
    }

    .ai-logo-badge {
        min-height: 31px;
        padding: 4px 8px 4px 5px;
        font-size: 0.8rem;
    }

    .ai-logo-badge img {
        width: 17px;
        height: 17px;
    }

    .ai-logo-badge--more {
        padding-left: 10px;
    }
}

@media (min-width: 1025px) {
    .ai-logo-badges {
        flex-wrap: nowrap;
    }
}

@media (min-width: 1280px) {
    .ai-logo-badges {
        gap: 6px;
    }

    .ai-logo-badge {
        min-height: 34px;
        padding: 5px 10px 5px 6px;
        font-size: 0.86rem;
    }

    .ai-logo-badge img {
        width: 20px;
        height: 20px;
    }

    .ai-logo-badge--more {
        padding-left: 12px;
    }
}

/* ============================================================
   KI-Meinungsbildung: HTML-Nachbau der WebP-Grafik (Schritt 3)
   Drei Zonen: Assessments -> Signale -> Veröffentlichungen
   ============================================================ */

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

.kmb-wrap {
    margin-top: 44px;
}

.kmb {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.98fr) 18px minmax(0, 1.02fr) 18px minmax(0, 1.3fr);
    gap: 16px;
    align-items: stretch;
}

.kmb-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.kmb-zone {
    margin: 0 0 14px;
    color: var(--green-dark, #6a9624);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

/* Leere Rinne zwischen den Zonen (mobil: vertikaler Verbinder) */

.kmb-flow {
    align-self: center;
}

/* --- Zone 1: Praxis-Fächer (Ihre Praxis + Top-3-Wettbewerber) --- */

.kmb-stack {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 92px;
}

.kmb-sheet {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 12px;
    /* Buttons zentrieren ihren Inhalt vertikal – Label muss oben sitzen */
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    appearance: none;
    padding: 9px 16px 0;
    background: #fdfefe;
    border: 1px solid rgba(10, 37, 64, 0.08);
    border-radius: 18px;
    box-shadow: 0 -8px 24px rgba(10, 37, 64, 0.05);
    text-align: left;
    font: 700 12.3px/1 Inter, sans-serif;
    color: #6b7c8f;
    cursor: pointer;
    transition: transform 0.25s ease, color 0.2s ease;
}

.kmb-sheet--1 { top: 60px; left: 0; right: 0; z-index: 3; }
.kmb-sheet--2 { top: 30px; left: 6px; right: 6px; z-index: 2; }
.kmb-sheet--3 { top: 0; left: 12px; right: 12px; z-index: 1; }

.kmb-sheet:hover,
.kmb-sheet:focus-visible {
    color: var(--green-dark, #6a9624);
}

.kmb-sheet:focus-visible {
    outline: 2px solid var(--green, #80b32c);
    outline-offset: 2px;
}

/* Reiter „Ihre Praxis" bekommt den grünen Punkt */
.kmb-sheet--own::before,
.kmb-card--own .kmb-card-title::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--green, #80b32c);
    vertical-align: 1px;
}

/* Hover über den Stapel: Karten fächern leicht auf */
@media (hover: hover) {
    .kmb-stack:hover .kmb-sheet--1 { transform: translateY(-4px); }
    .kmb-stack:hover .kmb-sheet--2 { transform: translateY(-7px); }
    .kmb-stack:hover .kmb-sheet--3 { transform: translateY(-10px); }
    .kmb-stack .kmb-sheet:hover { transform: translateY(-12px); }
}

.kmb-card {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 18px 14px;
    background: #fff;
    border: 1px solid rgba(10, 37, 64, 0.08);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(10, 37, 64, 0.10);
}

.kmb-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.kmb-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--anthracite, var(--navy));
}

.kmb-weekly {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f2f6fa;
    font-size: 10.5px;
    font-weight: 600;
    color: #6b7c8f;
    white-space: nowrap;
}

.kmb-weekly svg {
    width: 11px;
    height: 11px;
}

.kmb-matrix {
    width: 100%;
    margin: auto 0;
    border-collapse: collapse;
}

.kmb-matrix thead th {
    padding: 0 0 8px;
    vertical-align: bottom;
}

.kmb-matrix thead img {
    display: block;
    width: 16px;
    height: 16px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: #f6f9fc;
    box-shadow: 0 0 0 1px rgba(10, 37, 64, 0.06);
}

/* KI-Namen hochkant, von unten nach oben lesbar */
.kmb-ki-name {
    display: block;
    margin: 0 auto;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    max-height: 62px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #7b8ba0;
    white-space: nowrap;
}

.kmb-matrix tbody th {
    padding: 8px 8px 8px 0;
    border-top: 1px dashed var(--border, #e3ebf3);
    text-align: left;
    font-size: 12.5px;
    font-weight: 600;
    color: #40566d;
    white-space: nowrap;
}

.kmb-matrix tbody td {
    padding: 8px 2px;
    border-top: 1px dashed var(--border, #e3ebf3);
    text-align: center;
}

.kmb-matrix td::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d5dee8;
    vertical-align: middle;
}

.kmb-matrix td.ok::before {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: rgba(128, 179, 44, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.5 2.5 2.5 4.5-5' fill='none' stroke='%236a9624' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 9px no-repeat;
}

/* erwähnt, aber (noch) nicht empfohlen */
.kmb-matrix td.part::before {
    width: 13px;
    height: 13px;
    border: 1.5px solid rgba(128, 179, 44, 0.55);
    border-radius: 4px;
    background: rgba(128, 179, 44, 0.06);
}

/* Top-Empfehlung: wird als Erstes genannt */
.kmb-matrix td.top::before {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    background: rgba(128, 179, 44, 0.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1.4 7.4 4.3l3.2.4-2.3 2.2.6 3.1L6 8.5 3.1 10l.6-3.1L1.4 4.7l3.2-.4L6 1.4Z' fill='%236a9624'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Assessment-Frage klappt direkt unter der berührten Leistungszeile auf */

.kmb-matrix tr.kmb-qrow td {
    padding: 0;
    border-top: 0;
    text-align: left;
}

.kmb-matrix tr.kmb-qrow td::before {
    content: none;
}

.kmb-qbubble {
    display: block;
    max-height: 0;
    padding: 0 10px;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    border-radius: 10px 10px 10px 4px;
    background: #f2f6fa;
    font-size: 11.5px;
    line-height: 1.45;
    color: #40566d;
    transition: max-height 0.25s ease, opacity 0.2s ease,
        padding 0.25s ease, margin 0.25s ease;
}

.kmb-qrow.is-open .kmb-qbubble {
    max-height: 64px;
    padding: 7px 10px;
    margin: 3px 0 8px;
    opacity: 1;
}

.kmb-matrix tbody tr {
    cursor: default;
}

.kmb-matrix tbody tr:hover th {
    color: var(--green-dark, #6a9624);
}

@media (prefers-reduced-motion: reduce) {
    .kmb-qbubble {
        transition: none;
    }
}

/* Legende */

.kmb-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin: 8px 0 0;
    font-size: 10px;
    color: #8a99ab;
}

.kmb-legend .lg {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 3.5px;
    margin-left: 6px;
}

.kmb-legend .lg:first-child {
    margin-left: 0;
}

.kmb-legend .lg-ok {
    background: rgba(128, 179, 44, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.5 2.5 2.5 4.5-5' fill='none' stroke='%236a9624' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 7px no-repeat;
}

.kmb-legend .lg-part {
    border: 1.5px solid rgba(128, 179, 44, 0.55);
    background: rgba(128, 179, 44, 0.06);
}

.kmb-legend .lg-top {
    background: rgba(128, 179, 44, 0.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1.4 7.4 4.3l3.2.4-2.3 2.2.6 3.1L6 8.5 3.1 10l.6-3.1L1.4 4.7l3.2-.4L6 1.4Z' fill='%236a9624'/%3E%3C/svg%3E") center / 8px no-repeat;
}

.kmb-card-foot {
    margin: auto 0 0;
    padding-top: 10px;
    font-size: 11px;
    color: #7b8ba0;
}

/* --- Zone 2: Signal-Liste --- */

.kmb-signals .kmb-signal-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid rgba(10, 37, 64, 0.08);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(10, 37, 64, 0.08);
}

.kmb-signal {
    padding: 7px 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.kmb-signal + .kmb-signal {
    border-top: 1px dashed var(--border, #e3ebf3);
}

.kmb-signal-label {
    display: block;
    margin-bottom: 5px;
    font-size: 12.8px;
    font-weight: 600;
    color: var(--anthracite, var(--navy));
}

.kmb-bar {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
}

.kmb-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #a5cc63, var(--green, #80b32c));
    transition: width 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.kmb-in .kmb-bar i {
    width: var(--w, 50%);
}

.kmb-signal:nth-child(2) .kmb-bar i { transition-delay: 0.05s; }
.kmb-signal:nth-child(3) .kmb-bar i { transition-delay: 0.1s; }
.kmb-signal:nth-child(4) .kmb-bar i { transition-delay: 0.15s; }
.kmb-signal:nth-child(5) .kmb-bar i { transition-delay: 0.2s; }
.kmb-signal:nth-child(6) .kmb-bar i { transition-delay: 0.25s; }
.kmb-signal:nth-child(7) .kmb-bar i { transition-delay: 0.3s; }
.kmb-signal:nth-child(8) .kmb-bar i { transition-delay: 0.35s; }
.kmb-signal:nth-child(9) .kmb-bar i { transition-delay: 0.4s; }
.kmb-signal:nth-child(10) .kmb-bar i { transition-delay: 0.45s; }
.kmb-signal:nth-child(11) .kmb-bar i { transition-delay: 0.5s; }

.kmb-signal.is-key {
    background: rgba(128, 179, 44, 0.10);
}

.kmb-signal.is-key .kmb-bar i {
    background: linear-gradient(90deg, var(--green, #80b32c), var(--green-dark, #6a9624));
}

.kmb-signal:hover,
.kmb-signal:focus-visible,
.kmb-signal.is-active {
    background: rgba(128, 179, 44, 0.17);
}

/* --- Zone 3: Veröffentlichungs-Karten --- */

.kmb-pub-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 10px;
}

.kmb-pub {
    padding: 12px 12px 11px;
    background: #fff;
    border: 1px solid rgba(10, 37, 64, 0.08);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(10, 37, 64, 0.06);
    transition: opacity 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, transform 0.2s ease;
}

.kmb-pub h4 {
    margin: 0 0 7px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--anthracite, var(--navy));
}

.kmb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.kmb-tags span {
    padding: 3px 8px;
    border: 1px solid rgba(10, 37, 64, 0.06);
    border-radius: 999px;
    background: #f2f6fa;
    font-size: 10.5px;
    font-weight: 600;
    color: #4f6176;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Verknüpfungszustand: aktives Signal hebt seine Orte hervor */

.kmb-linking .kmb-pub {
    opacity: 0.42;
}

.kmb-linking .kmb-pub.is-hit {
    opacity: 1;
    border-color: rgba(128, 179, 44, 0.55);
    box-shadow: 0 16px 40px rgba(128, 179, 44, 0.22);
    transform: translateY(-2px);
}

.kmb-linking .kmb-pub.is-hit .kmb-tags span {
    background: rgba(128, 179, 44, 0.12);
    border-color: rgba(128, 179, 44, 0.25);
    color: var(--green-dark, #6a9624);
}

.kmb-hint {
    margin: 14px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: #7b8ba0;
}

/* Stufe B: Puls-Overlay Signal -> Veröffentlichungsorte (per JS gezeichnet) */

.kmb-linkflow {
    position: absolute;
    inset: 0;
    z-index: 10;
    overflow: visible;
    pointer-events: none;
}

.kmb-linkpath {
    fill: none;
    stroke: rgba(128, 179, 44, 0.38);
    stroke-width: 1.5;
}

.kmb-linkdot {
    fill: var(--green, #80b32c);
    filter: drop-shadow(0 0 4px rgba(128, 179, 44, 0.75));
}

/* Leerlauf-Reise: schwächere Linie, sanftes Aufglimmen der Stationen */

.kmb-linkpath--idle {
    stroke: rgba(128, 179, 44, 0.26);
}

.kmb-signal.is-glow {
    background: rgba(128, 179, 44, 0.09);
}

.kmb-pub.is-glow {
    border-color: rgba(128, 179, 44, 0.4);
    box-shadow: 0 12px 30px rgba(128, 179, 44, 0.16);
}

@media (prefers-reduced-motion: reduce) {
    .kmb-bar i {
        transition: none;
    }

    .kmb-sheet {
        transition: none;
    }
}

@media (max-width: 1024px) {
    .kmb {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    /* Vertikaler Verbinder zwischen den gestapelten Zonen */
    .kmb-flow::before {
        content: "";
        display: block;
        width: 0;
        height: 30px;
        margin: 0 auto;
        border-left: 2px dashed rgba(106, 150, 36, 0.35);
    }

    .kmb-pub-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .kmb-stack {
        padding-top: 80px;
    }

    .kmb-sheet--1 { top: 52px; }
    .kmb-sheet--2 { top: 26px; }

    .kmb-matrix tbody th {
        padding-right: 6px;
        font-size: 11.5px;
    }

    .kmb-matrix thead img {
        width: 14px;
        height: 14px;
    }
}

/* ============================================================
   Daten-Panorama (Schritt 1): 4 Analyseobjekte in den Ecken,
   Chancen-Kern im Zentrum, Pulse dazwischen.
   ============================================================ */

.pan-wrap {
    margin-top: 32px;
}

/* Navy-Bühne: dunkles Panel mit Punktraster – hier arbeitet die Maschine.
   Die vier Karten verdichten sich zur Mitte, der Chancen-Kreis liegt
   im Schnittpunkt darüber (kein Linien-Geflecht mehr).
   overflow bleibt sichtbar, damit die oberen Karten über die
   Kante ragen können (Verzahnung mit dem hellen Titelbereich). */
.pan {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
    border-radius: 26px;
    background:
        radial-gradient(720px 420px at 50% 52%, rgba(128, 179, 44, 0.10), transparent 68%),
        linear-gradient(155deg, #0a2540 0%, #062036 55%, #031e35 100%);
    /* weicher Navy-Schein auch nach oben: die Kante landet sanft im Hellen */
    box-shadow:
        0 40px 90px rgba(3, 30, 53, 0.35),
        0 -34px 70px -18px rgba(8, 34, 58, 0.28);
}

/* Punktraster-Textur */
.pan::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.5px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* --- Karten: Analyseobjekte --- */

/* Flip-Karte: vorne Daten, hinten der Erklärtext */
.pan-obj {
    position: relative;
    z-index: 3;
    perspective: 1400px;
}

.pan-flip {
    position: relative;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.4, 0.1, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
    .pan-obj:hover .pan-flip {
        transform: rotateY(180deg);
    }
}

.pan-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 70px rgba(2, 20, 38, 0.55);
}

.pan-face--front {
    position: relative;
    min-height: 100%;
    padding: 16px 16px 14px;
    background: #fff;
    transition: box-shadow 0.55s ease, border-color 0.55s ease;
}

.pan-face--back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 26px 30px;
    background: linear-gradient(150deg, #0e2c4b 0%, #062036 100%);
    transform: rotateY(180deg);
}

.pan-back-kicker {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green, #80b32c);
}

.pan-back-text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: #dbe6f0;
}

/* An-Glühen: in dieser Karte passiert gleich ein Update.
   Der weiche Schein liegt auf einem eigenen Pseudo-Element, damit er
   bei den oben herausragenden Karten auf den Navy-Bereich geclippt
   werden kann (im hellen Titelbereich kein grüner Schein). */
.pan-face--front::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    box-shadow: 0 0 34px rgba(128, 179, 44, 0.45);
    opacity: 0;
    transition: opacity 0.55s ease;
    pointer-events: none;
}

.pan-obj.is-live .pan-face--front {
    border-color: rgba(128, 179, 44, 0.7);
}

.pan-obj.is-live .pan-face--front::before {
    opacity: 1;
}

/* Desktop: 2x2 dicht an der Mitte, Kanal fuer den Chancen-Kreis */
@media (min-width: 1025px) {
    .pan-wrap {
        /* Karten ragen 42px über die Kante – gefühlter Abstand zum
           Titel = 78 - 42 = 36px plus Weißraum der Subline */
        margin-top: 78px;
    }

    .pan {
        grid-template-columns: 1fr 150px 1fr;
        grid-template-rows: auto 150px auto;
        gap: 0;
        padding: 26px;
    }

    .pan-obj--1 { grid-area: 1 / 1; }
    .pan-obj--2 { grid-area: 1 / 3; }

    /* Verzahnung: die oberen Karten überlappen die Navy-Kante */
    .pan-obj--1,
    .pan-obj--2 {
        margin-top: -68px;
    }

    /* Glow der herausragenden Karten erst ab der Navy-Kante
       (Kartenoberkante liegt 42px über der Kante) */
    .pan-obj--1 .pan-face--front::before,
    .pan-obj--2 .pan-face--front::before {
        clip-path: inset(42px -70px -70px -70px);
    }

    /* Kern, Halo & Echo zentrieren sich exakt auf die Kanal-Zelle (2/2)
       des Grids – damit stimmt der Abstand zu allen vier Karten, egal
       wie unterschiedlich hoch die Reihen sind. (.pan-Präfix nötig,
       weil die Basisregeln später im File stehen.) */
    .pan .pan-halo,
    .pan .pan-echo {
        /* relative statt static: die Ring-Kinder (inset:0) brauchen
           die eigene Box als Bezug, sonst spannen sie über das Panel */
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        grid-area: 2 / 2;
        align-self: center;
        justify-self: center;
    }
    .pan-obj--3 { grid-area: 3 / 1; }
    .pan-obj--4 { grid-area: 3 / 3; }

    /* Innenecken vom Kreis freihalten */
    .pan-obj--1 .pan-metrics { margin-right: 26px; width: calc(100% - 26px); }
    .pan-obj--2 .pan-ki-matrix { margin-left: 26px; width: calc(100% - 26px); }
    .pan-obj--3 .pan-profile { margin-right: 26px; }
    /* KI-Matrix: vertikal zentriert, Logos & Chips groesser */
    .pan-obj--2 .pan-face--front {
        display: flex;
        flex-direction: column;
    }

    .pan-obj--2 .pan-ki-matrix {
        margin: auto 0 8px;
    }

    .pan-obj--2 .pan-ki-matrix thead img {
        width: 20px;
        height: 20px;
    }

    .pan-obj--2 .pan-ki-matrix tbody th {
        padding: 9px 8px 9px 0;
        font-size: 12px;
    }

    .pan-obj--2 .pan-ki-matrix tbody td {
        padding: 9px 2px;
    }

    .pan-obj--2 .pan-ki-matrix td::before {
        width: 8px;
        height: 8px;
    }

    .pan-obj--2 .pan-ki-matrix td.ok::before {
        width: 14px;
        height: 14px;
        border-radius: 4.5px;
        background: rgba(128, 179, 44, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.5 2.5 2.5 4.5-5' fill='none' stroke='%236a9624' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 9px no-repeat;
    }

    .pan-obj--2 .pan-ki-matrix td.part::before {
        width: 14px;
        height: 14px;
        border-radius: 4.5px;
    }

    .pan-obj--2 .pan-ki-matrix td.top::before {
        width: 17px;
        height: 17px;
        border-radius: 4.5px;
        background: rgba(128, 179, 44, 0.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1.4 7.4 4.3l3.2.4-2.3 2.2.6 3.1L6 8.5 3.1 10l.6-3.1L1.4 4.7l3.2-.4L6 1.4Z' fill='%236a9624'/%3E%3C/svg%3E") center / 11px no-repeat;
    }

    /* Profil-Liste: von den Logos abgesetzt, groesser (viel Weissraum rechts) */
    .pan-obj--3 .pan-profile {
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px dashed var(--border, #e3ebf3);
        gap: 9px;
        font-size: 12.5px;
    }

    .pan-obj--3 .pan-profile li {
        grid-template-columns: 16px 1fr;
        max-height: 52px;
    }

    .pan-obj--3 .pan-profile i {
        width: 13px;
        height: 13px;
        margin-top: 2px;
    }
}

.pan-obj-kicker {
    margin: 0 0 3px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green-dark, #6a9624);
}

.pan-obj-title {
    margin: 0 0 12px;
    font-size: 15.5px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--anthracite, var(--navy));
}

.pan-obj-sub {
    margin: 0 0 10px;
    font-size: 10.5px;
    line-height: 1.4;
    color: #7b8ba0;
}

.pan-obj-meta {
    margin: 10px 0 0;
    font-size: 10.5px;
    font-weight: 600;
    color: #6b7c8f;
}

/* Mini-Visual: Bewertung */

.pan-rev {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f7fafc;
    border: 1px solid rgba(10, 37, 64, 0.05);
}

.pan-rev p {
    transition: opacity 0.22s ease;
}

.pan-rev p.is-swap {
    opacity: 0;
}

.pan-stars {
    display: block;
    margin-bottom: 3px;
    color: var(--star, #fbbf24);
    font-size: 11px;
    letter-spacing: 2px;
}

.pan-rev p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: #40566d;
}

.pan-rev mark {
    padding: 0 3px;
    border-radius: 3px;
    background: rgba(128, 179, 44, 0.18);
    color: inherit;
}

/* Logo-Reihen (Portale, Verzeichnisse) */

.pan-logos {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.pan-logos img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f6f9fc;
    box-shadow: 0 0 0 1px rgba(10, 37, 64, 0.07);
}

.pan-logos-more {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--green-dark, #6a9624);
}

/* Metrik-Tabelle: Sie vs. Wettbewerber A/B/C */

.pan-metrics {
    width: 100%;
    margin-top: 10px;
    /* separate statt collapse, damit border-radius auf .best greift */
    border-collapse: separate;
    border-spacing: 0;
    font-size: 10.5px;
    color: #40566d;
}

.pan-metrics thead th {
    padding: 0 4px 4px;
    text-align: center;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #8a99ab;
}

.pan-metrics thead th:first-child {
    text-align: left;
}

/* Gruppenzeile: „Ihre | Wettbewerber (A B C)" */
.pan-metrics .pan-metrics-group th {
    padding-bottom: 1px;
    font-size: 8.5px;
    color: #a8b5c4;
}

/* Portal-Logos wohnen in der leeren Kopf-Ecke der Tabelle */
.pan-metrics-logos {
    vertical-align: middle;
}

.pan-metrics-logos .pan-logos {
    display: inline-flex;
    gap: 5px;
    margin: 0;
}

.pan-metrics-logos .pan-logos img {
    width: 16px;
    height: 16px;
}

.pan-metrics .pan-metrics-group th[colspan] {
    border-bottom: 1px solid rgba(10, 37, 64, 0.12);
}

/* Werte-Wechsel: deutlich und lange genug fuers Auge */
.pan-metrics tbody td {
    transition: background-color 0.35s ease, color 0.35s ease;
    border-radius: 6px;
}

.pan-metrics td.flash {
    animation: pan-cellflash 2.6s ease;
}

@keyframes pan-cellflash {
    0% { background-color: rgba(128, 179, 44, 0.05); color: inherit; }
    12% { background-color: rgba(128, 179, 44, 0.45); color: #4d7413; font-weight: 800; }
    60% { background-color: rgba(128, 179, 44, 0.3); color: #4d7413; }
    100% { background-color: transparent; color: inherit; }
}

.pan-metrics tbody th {
    padding: 4px 4px 4px 0;
    border-top: 1px dashed var(--border, #e3ebf3);
    text-align: left;
    font-weight: 600;
    color: #6b7c8f;
    white-space: nowrap;
}

.pan-metrics tbody td {
    padding: 4px;
    border-top: 1px dashed var(--border, #e3ebf3);
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.pan-metrics td.best {
    background: rgba(128, 179, 44, 0.14);
    border-radius: 6px;
    color: var(--green-dark, #6a9624);
    font-weight: 800;
}

/* Mini-Assessment-Matrix (Echo aus Schritt 3) */

.pan-ki-matrix {
    width: 100%;
    border-collapse: collapse;
}

.pan-ki-matrix thead th {
    padding: 0 0 6px;
}

.pan-ki-matrix thead img {
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto;
    border-radius: 50%;
    background: #f6f9fc;
    box-shadow: 0 0 0 1px rgba(10, 37, 64, 0.06);
}

.pan-ki-matrix tbody th {
    padding: 5px 6px 5px 0;
    border-top: 1px dashed var(--border, #e3ebf3);
    text-align: left;
    font-size: 10.5px;
    font-weight: 600;
    color: #40566d;
    white-space: nowrap;
}

.pan-ki-matrix tbody td {
    padding: 5px 1px;
    border-top: 1px dashed var(--border, #e3ebf3);
    text-align: center;
}

.pan-ki-matrix td::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d5dee8;
    vertical-align: middle;
}

.pan-ki-matrix td.ok::before {
    width: 11px;
    height: 11px;
    border-radius: 3.5px;
    background: rgba(128, 179, 44, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.5 2.5 2.5 4.5-5' fill='none' stroke='%236a9624' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 7px no-repeat;
}

.pan-ki-matrix td.part::before {
    width: 11px;
    height: 11px;
    border: 1.5px solid rgba(128, 179, 44, 0.55);
    border-radius: 3.5px;
    background: rgba(128, 179, 44, 0.06);
}

.pan-ki-matrix td.top::before {
    width: 13px;
    height: 13px;
    border-radius: 3.5px;
    background: rgba(128, 179, 44, 0.22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 1.4 7.4 4.3l3.2.4-2.3 2.2.6 3.1L6 8.5 3.1 10l.6-3.1L1.4 4.7l3.2-.4L6 1.4Z' fill='%236a9624'/%3E%3C/svg%3E") center / 8px no-repeat;
}

/* Zellen-Upgrade: laenger sichtbarer Glow, damit die kleinen Chips auffallen */
.pan-ki-matrix td.flash::before {
    animation: pan-chipflash 2.2s ease;
}

@keyframes pan-chipflash {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(128, 179, 44, 0); }
    14% { transform: scale(1.5); box-shadow: 0 0 14px rgba(128, 179, 44, 0.85); }
    45% { transform: scale(1.12); box-shadow: 0 0 10px rgba(128, 179, 44, 0.55); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(128, 179, 44, 0); }
}

/* Profilzeilen mit Status-Ikonen */

.pan-profile {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 11px;
    line-height: 1.4;
    color: #40566d;
}

.pan-profile li {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 7px;
    align-items: start;
    max-height: 46px;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease;
}

/* Rotation: erledigen, ausblenden, nachrücken (wie im Chancen-Kern) */
.pan-profile li.is-done span {
    color: #9aa8b8;
    text-decoration: line-through;
    text-decoration-color: rgba(106, 150, 36, 0.5);
    transition: color 0.25s ease;
}

.pan-profile li.is-out {
    max-height: 0;
    margin-bottom: -7px;
    opacity: 0;
}

.pan-profile li.is-new {
    opacity: 0;
    transform: translateY(6px);
}

.pan-profile li {
    transition: max-height 0.35s ease, opacity 0.3s ease,
        margin 0.35s ease, transform 0.3s ease;
}

.pan-profile i {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-top: 1.5px;
    border-radius: 4px;
}

.pan-profile i.ok {
    background: rgba(128, 179, 44, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.5 2.5 2.5 4.5-5' fill='none' stroke='%236a9624' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 8px no-repeat;
}

.pan-profile i.gap {
    border: 1.5px dashed rgba(10, 37, 64, 0.3);
    background: transparent;
}

/* Profilschutz-Alarm: rotes Schild */
.pan-profile i.alert {
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 0.8 10.4 2.5 V6 C10.4 8.9 8.5 10.6 6 11.3 C3.5 10.6 1.6 8.9 1.6 6 V2.5 Z' fill='%23d64545'/%3E%3Cpath d='M6 3.4 V6.6' stroke='%23fff' stroke-width='1.4' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='8.6' r='0.9' fill='%23fff'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Wettbewerber-Hinweis: Ausrufezeichen */
.pan-profile i.note {
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5.2' fill='%23f3bd2f'/%3E%3Cpath d='M6 2.9 V6.7' stroke='%23fff' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='9' r='1' fill='%23fff'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Deutschland-Benchmark: Netzwerk-Effekt auf der Silhouette */

.pan-bench {
    display: block;
    width: 100%;
    max-width: 470px;
    height: auto;
    margin: 4px auto 0;
    border-radius: 12px;
    background: #f6f9fc;
    box-shadow: inset 0 0 0 1px rgba(10, 37, 64, 0.05);
}

/* Abstrakte Landkarte: Distrikt-Flächen + Straßennetz */
.bd-districts .d-a {
    fill: #fdfeff;
    stroke: #dfe8f1;
    stroke-width: 1.2;
}

.bd-districts .d-b {
    fill: #f1f5fa;
    stroke: #dfe8f1;
    stroke-width: 1.2;
}

.bd-streets path {
    fill: none;
    stroke: #d8e2ee;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.bd-streets path.soft {
    stroke-width: 1;
    stroke: #e2eaf3;
}

.bd-city-label {
    font: 700 10px Inter, sans-serif;
    fill: #6b7c8f;
    /* weißer Halo, damit die Labels auch auf dem Kartenbild lesbar bleiben */
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 3px;
}

.pan-bench .bd {
    stroke: #fff;
    stroke-width: 1.5;
}

.pan-bench .bd {
    fill: #0a2540;
    transition: fill 0.3s ease, r 0.3s ease;
}

.pan-bench .bd.fire {
    fill: var(--green, #80b32c);
}

.bd-you-ring {
    fill: none;
    stroke: var(--green, #80b32c);
    stroke-width: 2;
    transform-origin: center;
    transform-box: fill-box;
    animation: bd-breathe 3.4s ease-in-out infinite;
}

@keyframes bd-breathe {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.bd-you-core {
    fill: var(--green-dark, #6a9624);
}

.bd-you.is-hit .bd-you-core {
    filter: drop-shadow(0 0 6px rgba(128, 179, 44, 0.9));
}

.bd-you.is-hit .bd-you-ring {
    opacity: 1;
    stroke-width: 3;
}

.bd-you-label {
    font: 700 10px Inter, sans-serif;
    fill: #4d7413;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 3px;
}

.bd-arc {
    fill: none;
    stroke: rgba(128, 179, 44, 0.55);
    stroke-width: 1.6;
    stroke-dasharray: 2 5;
    stroke-linecap: round;
}

.bd-dot {
    fill: var(--green, #80b32c);
    filter: drop-shadow(0 0 4px rgba(128, 179, 44, 0.8));
}

@media (prefers-reduced-motion: reduce) {
    .bd-you-ring {
        animation: none;
    }
}

/* --- Bühnen-Elemente: Halo, Echo-Ringe, Leitbahnen --- */

.pan-halo {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 560px;
    height: 560px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(128, 179, 44, 0.16) 0%, transparent 62%);
    pointer-events: none;
}

/* MediEcho: der Kern sendet Echo-Ringe */
.pan-echo {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 235px;
    height: 235px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.pan-echo i {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(165, 204, 99, 0.35);
    border-radius: 50%;
    opacity: 0;
    animation: pan-echo 7.5s linear infinite;
}

.pan-echo i:nth-child(2) { animation-delay: 2.5s; }
.pan-echo i:nth-child(3) { animation-delay: 5s; }

@keyframes pan-echo {
    0% { transform: scale(0.9); opacity: 0; }
    12% { opacity: 0.55; }
    70% { opacity: 0.12; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* --- Zentrum: Chancen-Kern --- */

.pan-core {
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 250px;
    margin: 4px auto 8px;
    /* unten mehr Innenabstand: Inhalt rückt hoch, der letzte
       Chancen-Balken bekommt Luft zum Kreisrand */
    padding: 14px 20px 38px;
    text-align: center;
    background: #fff;
    border: 1.5px solid rgba(128, 179, 44, 0.55);
    border-radius: 50%;
    box-shadow: 0 30px 70px rgba(2, 20, 38, 0.6), 0 0 40px rgba(128, 179, 44, 0.12);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 1025px) {
    .pan-core {
        grid-area: 2 / 2;
        align-self: center;
        justify-self: center;
        margin: 0;
    }
}

.pan-core.is-glow {
    border-color: rgba(128, 179, 44, 0.95);
    box-shadow: 0 30px 70px rgba(2, 20, 38, 0.6), 0 0 46px rgba(128, 179, 44, 0.45);
}

.pan-count {
    margin: 0;
    font-size: 44px;
    font-weight: 900;
    line-height: 1.05;
    color: var(--green-dark, #6a9624);
}

.pan-core-label {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--anthracite, var(--navy));
}

/* Zähler-Zucken bei +1/-1 */
.pan-count.is-tick {
    animation: pan-tick 0.32s ease;
}

@keyframes pan-tick {
    0% { transform: scale(1); }
    45% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pan-chances {
    display: grid;
    gap: 8px;
    width: 178px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.pan-chances li {
    max-height: 48px;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease,
        transform 0.3s ease, margin 0.35s ease;
}

.pan-chances span {
    display: block;
    margin-bottom: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: #40566d;
    transition: color 0.2s ease;
}

.pan-chances i {
    display: block;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #a5cc63, var(--green, #80b32c));
    width: var(--p, 50%);
}

/* erledigt: Haken erscheint, Text wird gedämpft … */
.pan-chances li.is-done span {
    color: #9aa8b8;
    text-decoration: line-through;
    text-decoration-color: rgba(106, 150, 36, 0.5);
}

.pan-chances li.is-done span::before {
    content: "✓ ";
    font-weight: 800;
    color: var(--green-dark, #6a9624);
    text-decoration: none;
}

/* … dann klappt die Zeile zu und die nächste rückt nach */
.pan-chances li.is-out {
    max-height: 0;
    margin-bottom: -8px;
    opacity: 0;
}

.pan-chances li.is-new {
    opacity: 0;
    transform: translateY(6px);
}

/* --- Responsive: gestapelte Variante --- */

@media (max-width: 1024px) {
    .pan-halo,
    .pan-echo {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pan-echo i {
        animation: none;
    }
}

/* --- Schritt 2: KI-Bewertungsbühne + frei drehbare Bewertungskarte --- */

.patient-proof-ki-stage {
    width: min(calc(100% - 48px), 1232px);
    margin: 58px auto 0;
    padding: clamp(64px, 7vw, 92px) 0;
    border-radius: 26px;
    box-shadow: 0 40px 90px rgba(3, 30, 53, 0.35);
    overflow: hidden;
}

.patient-proof-ki-stage .ki-flow-path {
    animation: patient-ki-flow 5.8s linear infinite;
}

.patient-proof-ki-bottom {
    margin-top: clamp(36px, 4vw, 48px);
}

.patient-proof-ki-bottom p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.78);
}

@keyframes patient-ki-flow {
    to {
        stroke-dashoffset: -90;
    }
}

@media (prefers-reduced-motion: reduce) {
    .patient-proof-ki-stage .ki-flow-path {
        animation: none;
    }
}

.patient-proof-keyvisual .card3d-stage {
    position: relative;
    isolation: isolate;
    /* Lichtkegel hinter der Karte: groß genug, um seitlich und unter
       der Karte sichtbar zu bleiben, aber der Fade erreicht 0 VOR
       allen Panelkanten (oben bei ~6 % Bühnenhöhe) – ein circle
       wurde an der Oberkante hart gekappt => sichtbare Linie mittig.
       Der vertikale Verlauf liegt auf dem GANZEN Panel. */
    background: radial-gradient(ellipse 60% 52% at 50% 46%, rgba(255, 255, 255, 0.95) 0 26%, rgba(255, 255, 255, 0) 76%);
}

.patient-proof-keyvisual .card3d-stage::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 18%;
    right: 14%;
    bottom: -4%;
    height: 28%;
    border-radius: 50%;
    background: rgba(10, 37, 64, 0.36);
    filter: blur(38px);
    transform: translateX(1%) scaleX(1.13);
}

.card3d-canvas,
.patient-proof-keyvisual .card3d-fallback {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.card3d-canvas {
    z-index: 2;
    opacity: 0;
    cursor: grab;
    outline: none;
    touch-action: none;
    transition: opacity 0.25s ease;
}

.card3d-stage.is-dragging .card3d-canvas {
    cursor: grabbing;
}

.card3d-canvas:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(128, 179, 44, 0.55);
}

.patient-proof-keyvisual .card3d-fallback {
    z-index: 1;
    box-sizing: border-box;
    padding: clamp(22px, 6vw, 76px);
    object-fit: contain;
    filter: drop-shadow(0 28px 38px rgba(10, 37, 64, 0.22));
    transition: opacity 0.22s ease;
}

.card3d-stage.is-card3d-ready .card3d-canvas {
    opacity: 1;
}

.card3d-stage.is-card3d-ready .card3d-fallback {
    opacity: 0;
}

.card3d-stage.is-card3d-failed .card3d-fallback {
    opacity: 1;
}

/* --- Mobile: Overflow-Fixes.
       1) home7 setzt die Hero-Schrift auf min. 2.45rem und verbietet
          Umbrüche in den Gradient-Zeilen → Layout-Viewport wächst auf 467px.
       2) Der .nowrap-Span in der H2 von #ki-empfohlen ist breiter als 375px. --- */

@media (max-width: 760px) {
    .hero-title {
        /* Zeile 1 („Setzen Sie sich durch" + Unterstreichung) ist ein
           unumbrechbarer Block – die Schrift muss knapp darunter bleiben. */
        font-size: clamp(1.55rem, 8.2vw, 2.45rem);
    }

    .hero-title .line-gradient-text {
        white-space: normal;
    }

    .patient-proof-head h2 .nowrap {
        white-space: normal;
    }

    /* Lange Tabellenlabels dürfen auf kleinen Displays nicht die Karte
       über den Bildschirmrand hinaus verbreitern. */
    .pan {
        grid-template-columns: minmax(0, 1fr);
    }

    .pan-metrics tbody th {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .pan-metrics-logos .pan-logos {
        flex-wrap: wrap;
    }
}

/* ============================================================
   Marken-Schicht v1 (7.7.): Outfit als Headline-Schrift,
   Kicker-Orange für Eyebrows (abgedunkeltes Sternen-Gold –
   gleiche Farbfamilie wie die Bewertungssterne #fbbf24),
   handschriftliche Randnotiz pro Schritt-Sektion.
   ============================================================ */

:root {
    --kicker: #d97706;
    /* Heller als das geerbte #303437: fette Outfit-Headlines wirkten
       in Fast-Schwarz zu harsch (Jens). Alle var(--anthracite)-
       Verbraucher (Headlines, Karten-Titel, Buttons) ziehen mit. */
    --anthracite: #3e4a56;
}

/* Trust-Zeile („Bereits von 1.000+ …") im weichen Anthrazit */
.trust-label {
    color: var(--anthracite);
}

/* Zweit-CTA „So funktioniert's": gefüllt im Kicker-Amber */
.hero-ctas .btn-ghost {
    background: var(--kicker);
    border-color: var(--kicker);
    color: #fff;
}

.hero-ctas .btn-ghost:hover {
    background: #c26a05;
    border-color: #c26a05;
}

/* Google-Sterne: Anthrazit statt Gold, +30 % (17px -> 22px) */
.hero-visual .stars svg {
    width: 22px;
    height: 22px;
    fill: var(--anthracite);
}

/* „+ 8 weitere" als stille Pille – wie „+ 5 weitere" bei den KI-Logos */
.hero-visual .p-card li.portal-more span {
    padding: 2px 10px;
    border: 1px dashed rgba(10, 37, 64, 0.2);
    border-radius: 999px;
    background: transparent;
    color: var(--anthracite);
    font-weight: 600;
}

.hero-visual .portal-disclaimer {
    text-align: right;
}

/* Marken-Punkt: ersetzt den Satzpunkt in Headlines – Anthrazit-Kreis
   mit dem weißen Logo-Häkchen, skaliert über em mit der Schriftgröße */
.hl-dot {
    display: inline-block;
    /* Kalibriert: Outfit-800-Punkt hat 0.21em Ink-Durchmesser (Canvas-
       Messung); der Kreis braucht ~15 % mehr, weil das weiße Häkchen
       optische Masse frisst – 0.24em wirkt neben dem echten Punkt gleich */
    width: 0.24em;
    height: 0.24em;
    margin-left: 0.07em;
    /* Punkt-Glyphe sitzt 0.01em unter der Grundlinie (gemessen) */
    vertical-align: -0.01em;
    border-radius: 50%;
    background-color: var(--anthracite);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.8l3.4 3.4 6.6-7.6' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 74%;
    background-position: 50% 55%;
    background-repeat: no-repeat;
}

.hero-title,
h2,
h3 {
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -0.015em;
}

.eyebrow {
    color: var(--kicker);
}

.sec-note {
    display: inline-block;
    margin: 14px 0 0;
    transform: rotate(-2deg);
    font-family: 'Caveat', cursive;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    color: #2c4a68;
}

/* Navy-Ausreißer auf die weiche Anthrazit-Linie holen */
.ai-logo-badge {
    color: var(--anthracite);
}

.hero-visual .p-card li b {
    color: var(--anthracite);
}

/* Handschrift einheitlich als „Tinte" (wie .sec-note) */
.hero-visual .hand-note {
    color: #2c4a68;
}

/* Portal-Logos entsättigt: die Namen stehen daneben, die bunten
   Marken-Farben machen die Leiste sonst unnötig laut */
.hero-visual .p-card li img {
    filter: grayscale(1);
    opacity: 0.55;
}

/* ============================================================
   Modul-Badges: die vier Bereiche zusätzlich als buchbare Module
   ausweisen (Analyse-/Bewertungs-/KI-/Schutzmodul). Neutrale Pille
   in Anthrazit – kein neuer Farbton, damit die Seite ruhig bleibt.
   Paart 1:1 mit dem Bereich, nie als eigene Liste.
   ============================================================ */

/* Modul-Badge im Eyebrow (Jens 8.7.): Amber-Outline-Pille – weiße
   Füllung, Kontur + Schrift im Kicker-Amber, Text in Uppercase wie
   der Eyebrow. nowrap hält den Modulnamen (auch „KI-Modul") zusammen. */
.modul-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid var(--kicker);
    background: #fff;
    color: var(--kicker);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: 2px;
    white-space: nowrap;
}

/* Megamenü: jedes Modul mit grauem Rahmen wie im Preis-Menü,
   „Analysemodul:" als Label über dem Bereichstitel (Jens' Skizze).
   Die Links tragen -10px Rand fürs Hover-Bleed – bei 20px Kasten-
   Padding bleibt die Hover-Fläche sauber innerhalb der Kontur. */
.mega .mega-cols {
    gap: 18px;
}

.mega .mega-col {
    border: 1.5px solid #d6dfe5;
    border-radius: 16px;
    padding: 20px 20px 12px;
    box-shadow: 0 10px 26px rgba(10, 37, 64, .055);
    transition: box-shadow .2s ease;
}

.mega .mega-col:hover,
.mega .mega-col:focus-within {
    box-shadow: 0 16px 34px rgba(10, 37, 64, .1);
}

@media (prefers-reduced-motion: reduce) {
    .mega .mega-col {
        transition: none;
    }
}

.mega-modul-title {
    margin: 0 0 3px;
    color: var(--green-dark);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
}

/* ============================================================
   Schritt 2, 3D-Karten-Keyvisual: die Bühne ist der EINZIGE
   Container (Jens' Ansatz). Der Wrapper wird zum Panel, die Copy
   sitzt oben IN der Bühne (ohne eigene Karte), darunter dreht die
   3D-Karte in unveränderter Größe (Figure behält Aspect-Ratio,
   card3d.js misst per ResizeObserver die Stage – bleibt intakt).
   ============================================================ */
.patient-proof-keyvisual {
    overflow: hidden;
    border: 1px solid rgba(10, 37, 64, 0.08);
    border-radius: 24px;
    /* Der Bühnen-Verlauf liegt jetzt auf dem ganzen Panel – ein
       durchgehender Hintergrund vom Text bis unter die 3D-Karte */
    background: linear-gradient(180deg, #f8fbfd 0%, #edf4f8 100%);
    box-shadow: 0 28px 80px rgba(10, 37, 64, 0.1);
}

.patient-proof-keyvisual .patient-proof-copy {
    width: min(100%, 900px);
    margin: 0 auto;
    padding: clamp(30px, 4vw, 50px) clamp(22px, 3vw, 42px) clamp(4px, 1vw, 10px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.patient-proof-keyvisual .card3d-stage {
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}
