/* ==========================================================================
   Pipelines (Docs) — blocs d'AlphaEdge Pipeline en lecture seule.
   Même rendu que le Studio (static/api_app/css/studio/playground_pipelines.css,
   section .ppb) : le graphe est dessiné par pipeline-builder.js puis mis à
   l'échelle par pipelines/pipeline-blocks.js. Couleurs via les tokens --ae-*
   (ui-refresh.css) : le thème sombre suit automatiquement.
   ========================================================================== */

/* Cadre : hauteur posée par le JS (graphe à l'échelle) */
.pp-blocks {
    position: relative;
    width: 100%;
    min-height: 120px;
    overflow: hidden;
}

/* Échelle minimale atteinte (petits écrans) : le schéma défile horizontalement */
.pp-blocks.is-scrollable {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.pp-blocks__host.ppb {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    transform-origin: 0 0;
    font-family: inherit;
    color: var(--ae-ink);
}

/* style.css anime tout (* { transition: all }) : le graphe est positionné au pixel près
   (liens calculés d'après les blocs), donc aucune transition à l'intérieur. */
.pp-blocks,
.pp-blocks *,
.ppb-pop * {
    transition: none !important;
}

.pp-blocks:not(.is-ready) .pp-blocks__host {
    visibility: hidden;
}

/* Aperçu (hub) : non interactif */
.pp-blocks--static,
.pp-blocks--static * {
    pointer-events: none;
}

.pp-blocks--static .ppb-info {
    display: none;
}

/* Lecture seule : ni bibliothèque, ni outils, ni édition */
.ppb.is-view .ppb-addbar,
.ppb.is-view .ppb-toolbar,
.ppb.is-view .ppb-palette,
.ppb.is-view .ppb-drop-hint,
.ppb.is-view .ppb-node-del,
.ppb.is-view .ppb-link-del {
    display: none !important;
}

.ppb.is-view .ppb-port,
.ppb.is-view .ppb-link-g {
    pointer-events: none;
}

/* ---------- Familles de blocs ---------- */
.ppb-group--model { --ppb-c: #24439a; --ppb-soft: #dbe8ff; }
.ppb-group--detect { --ppb-c: #0f4c4a; --ppb-soft: #e3f6dc; }
.ppb-group--logic { --ppb-c: #4a5568; --ppb-soft: #edf0f4; }
.ppb-group--io { --ppb-c: #01123c; --ppb-soft: #e6e9f2; }
.ppb-group--extract { --ppb-c: #8a1f4f; --ppb-soft: #fbe6ef; }

html.dark .ppb-group--model { --ppb-c: #9db8f5; --ppb-soft: rgba(157, 184, 245, 0.15); }
html.dark .ppb-group--detect { --ppb-c: #bfe6a8; --ppb-soft: rgba(191, 230, 168, 0.13); }
html.dark .ppb-group--logic { --ppb-c: #b8c2d3; --ppb-soft: rgba(184, 194, 211, 0.13); }
html.dark .ppb-group--io { --ppb-c: #d7e3fb; --ppb-soft: rgba(215, 227, 251, 0.1); }
html.dark .ppb-group--extract { --ppb-c: #f2a7c8; --ppb-soft: rgba(242, 167, 200, 0.14); }

.ppb-block-icon,
.ppb-pop-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--ppb-soft);
    color: var(--ppb-c);
    font-size: 0.74rem;
}

.ppb-info {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ae-ink-faint);
    font-size: 0.78rem;
    cursor: help;
    transition: color var(--ae-ease), background var(--ae-ease);
}

.ppb-info:hover,
.ppb-info:focus-visible {
    outline: none;
    background: var(--ppb-soft);
    color: var(--ppb-c);
}

/* ---------- Canevas ---------- */
.ppb-stage {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
}

.ppb-scroller {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.ppb-canvas {
    position: relative;
    min-width: 100%;
    min-height: 100%;
}

.ppb-links {
    position: absolute;
    inset: 0 auto auto 0;
    overflow: visible;
    pointer-events: none;
}

.ppb-link-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 14;
}

.ppb-link {
    fill: none;
    stroke: #8b93a7;
    stroke-width: 2;
}

.ppb-arrow {
    fill: #8b93a7;
}

.ppb-link-g--yes .ppb-link,
.ppb-link-g--high .ppb-link {
    stroke: #16a34a;
}

.ppb-link-g--no .ppb-link,
.ppb-link-g--low .ppb-link {
    stroke: #e11d48;
    stroke-dasharray: 6 4;
}

.ppb-link--draft {
    display: none;
}

html.dark .ppb-link,
html.dark .ppb-arrow {
    stroke: #7b8296;
}

html.dark .ppb-arrow {
    fill: #7b8296;
    stroke: none;
}

html.dark .ppb-link-g--yes .ppb-link,
html.dark .ppb-link-g--high .ppb-link {
    stroke: #34d399;
}

html.dark .ppb-link-g--no .ppb-link,
html.dark .ppb-link-g--low .ppb-link {
    stroke: #fb7185;
}

/* ---------- Blocs ---------- */
.ppb-node {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
    width: 172px;
    padding: 8px 8px 10px;
    border: 1px solid var(--ae-line);
    border-top: 3px solid var(--ppb-c);
    border-radius: 12px;
    background: var(--ae-surface);
    box-shadow: 0 8px 20px -16px rgba(1, 18, 60, 0.5);
    color: var(--ae-ink);
    cursor: default;
    user-select: none;
}

.ppb-node.is-fixed {
    width: 150px;
    background: var(--ppb-soft);
}

/* Un peu plus large qu'au Studio : noms de modèles affichés en entier */
.pp-blocks .ppb-node:not(.is-fixed) {
    width: 212px;
}

html.dark .ppb-node {
    border-color: var(--ae-line-strong);
    border-top-color: var(--ppb-c);
    background: var(--ae-surface-2);
    box-shadow: 0 10px 22px -16px rgba(0, 0, 0, 0.9);
}

html.dark .ppb-node.is-fixed {
    background: var(--ae-surface-3);
}

.ppb-node-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ppb-node-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ppb-node-sub {
    margin-top: -6px;
    padding-left: 32px;
    color: var(--ae-ink-muted);
    font-size: 0.68rem;
    line-height: 1.3;
}

.ppb-node-caption {
    display: block;
    padding: 6px 10px;
    border: 1px solid var(--ae-line);
    border-radius: 8px;
    background: var(--ae-surface);
    color: var(--ae-ink-soft);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

html.dark .ppb-node-caption {
    border-color: var(--ae-line-strong);
    background: var(--ae-surface);
    color: var(--ae-ink);
}

.ppb-node-select,
.ppb-node-range {
    pointer-events: none;
}

/* ---------- Ports ---------- */
.ppb-port {
    position: relative;
    display: inline-flex;
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    border: 2px solid var(--ppb-c);
    border-radius: 50%;
    background: var(--ae-surface);
}

.ppb-port--in {
    position: absolute;
    top: -8px;
    left: 50%;
    margin-left: -6px;
}

.ppb-node-outs {
    position: absolute;
    right: 0;
    bottom: -7px;
    left: 0;
    display: flex;
    justify-content: center;
}

.ppb-node-outs.is-multi {
    justify-content: space-between;
    padding: 0 26px;
}

.ppb-port--out {
    background: var(--ppb-c);
}

.ppb-port--yes,
.ppb-port--high {
    border-color: #16a34a;
    background: #16a34a;
}

.ppb-port--no,
.ppb-port--low {
    border-color: #e11d48;
    background: #e11d48;
}

.ppb-port-label {
    position: absolute;
    top: 12px;
    left: 50%;
    padding: 0 4px;
    border-radius: 4px;
    background: var(--pp-blocks-bg, var(--ae-surface));
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    transform: translateX(-50%);
}

.ppb-port--yes .ppb-port-label,
.ppb-port--high .ppb-port-label { color: #15803d; }

.ppb-port--no .ppb-port-label,
.ppb-port--low .ppb-port-label { color: #be123c; }

html.dark .ppb-port--yes .ppb-port-label,
html.dark .ppb-port--high .ppb-port-label { color: #4ade80; }

html.dark .ppb-port--no .ppb-port-label,
html.dark .ppb-port--low .ppb-port-label { color: #fb7185; }

/* ---------- Bulle « info » : exemple animé (identique au Studio) ---------- */
.ppb-pop {
    --ppb-c: #01123c;
    position: fixed;
    z-index: 3100;
    width: 290px;
    padding: 12px;
    border: 1px solid var(--ae-line);
    border-radius: 14px;
    background: var(--ae-surface);
    box-shadow: 0 24px 50px -24px rgba(1, 18, 60, 0.55);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92) translateY(4px);
    clip-path: inset(0 0 100% 0 round 14px);
    transition: opacity 180ms ease, transform 220ms cubic-bezier(.2, 1.2, .4, 1), clip-path 260ms ease;
}

.ppb-pop.is-open {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0 round 14px);
}

.ppb-pop-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.ppb-pop-desc {
    margin: 8px 0 10px;
    color: var(--ae-ink-soft);
    font-size: 0.76rem;
    line-height: 1.45;
}

.ppb-pop-caption {
    margin: 8px 0 0;
    color: var(--ae-ink-muted);
    font-size: 0.7rem;
    font-style: italic;
    line-height: 1.4;
}

.ppb-viz {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: var(--ae-surface-2);
}

.ppb-viz-arrow {
    color: var(--ae-ink-muted);
    font-weight: 700;
    animation: ppb-arrow 1.2s ease-in-out infinite;
}

@keyframes ppb-arrow {
    50% { transform: translateX(3px); }
}

/* Mini page : en-tête, colonne, textes, image, tableau, pied de page */
.ppb-viz-page {
    position: relative;
    width: 116px;
    height: 150px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px -6px rgba(1, 18, 60, 0.4);
}

.ppb-viz-zone {
    position: absolute;
    display: block;
    border-radius: 2px;
    background: #e5e8ef;
    outline: 1.5px solid transparent;
    outline-offset: 1px;
}

.ppb-viz-header { top: 6px; left: 6px; right: 6px; height: 12px; background: #cbd3e1; }
.ppb-viz-aside { top: 24px; left: 6px; width: 12px; bottom: 22px; background: #dde3ee; }
.ppb-viz-zone.ppb-viz-text { left: 24px; right: 6px; height: 14px; display: flex; flex-wrap: wrap; gap: 2px; align-content: flex-start; }
.ppb-viz-zone.ppb-viz-text { background: repeating-linear-gradient(#e5e8ef 0 3px, transparent 3px 6px); }
.ppb-viz-t1 { top: 24px; }
.ppb-viz-t2 { top: 42px; }
.ppb-viz-t3 { top: 60px; }
.ppb-viz-image { top: 80px; left: 24px; width: 36px; height: 28px; background: linear-gradient(135deg, #bfdbfe, #c7d2fe); }
.ppb-viz-table { top: 80px; left: 64px; right: 6px; height: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding: 1px; background: #cbd3e1; }
.ppb-viz-table i { background: #fff; }
.ppb-viz-footer { bottom: 6px; left: 6px; right: 6px; height: 8px; background: #dde3ee; }

.ppb-viz-page--words .ppb-viz-zone.ppb-viz-text,
.ppb-viz-page--lines .ppb-viz-zone.ppb-viz-text {
    background: none;
}

.ppb-viz-word {
    display: block;
    height: 4px;
    margin-top: 1px;
    border-radius: 1px;
    background: #cbd3e1;
    outline: 1px solid transparent;
    animation: ppb-word 2.4s ease-in-out infinite;
}

@keyframes ppb-word {
    0%, 15% { outline-color: transparent; }
    25%, 80% { outline-color: #0d9488; background: #99f6e4; }
    100% { outline-color: transparent; }
}

.ppb-viz-page--lines .ppb-viz-zone.ppb-viz-text {
    animation: ppb-line 2.4s ease-in-out infinite;
}

.ppb-viz-page--lines .ppb-viz-word {
    animation: none;
}

.ppb-viz-page--lines .ppb-viz-t2 { animation-delay: 0.4s; }
.ppb-viz-page--lines .ppb-viz-t3 { animation-delay: 0.8s; }

@keyframes ppb-line {
    0%, 15% { outline-color: transparent; }
    30%, 80% { outline-color: #0d9488; background: rgba(13, 148, 136, 0.12); }
    100% { outline-color: transparent; }
}

.ppb-viz-page--layout .ppb-viz-zone {
    animation: ppb-zone 3.2s ease-in-out infinite;
}

.ppb-viz-page--layout .ppb-viz-aside { animation-delay: 0.2s; }
.ppb-viz-page--layout .ppb-viz-t1 { animation-delay: 0.4s; }
.ppb-viz-page--layout .ppb-viz-t2 { animation-delay: 0.5s; }
.ppb-viz-page--layout .ppb-viz-t3 { animation-delay: 0.6s; }
.ppb-viz-page--layout .ppb-viz-image { animation-delay: 0.8s; }
.ppb-viz-page--layout .ppb-viz-table { animation-delay: 1s; }
.ppb-viz-page--layout .ppb-viz-footer { animation-delay: 1.2s; }

@keyframes ppb-zone {
    0%, 10% { outline-color: transparent; }
    25%, 85% { outline-color: #0d9488; }
    100% { outline-color: transparent; }
}

.ppb-viz-page--table .ppb-viz-table,
.ppb-viz-page--image .ppb-viz-image,
.ppb-viz-page--header .ppb-viz-header,
.ppb-viz-page--footer .ppb-viz-footer,
.ppb-viz-page--aside .ppb-viz-aside,
.ppb-viz-page--text .ppb-viz-text {
    animation: ppb-focus 1.6s ease-in-out infinite;
}

.ppb-viz-page--table .ppb-viz-zone:not(.ppb-viz-table),
.ppb-viz-page--image .ppb-viz-zone:not(.ppb-viz-image),
.ppb-viz-page--header .ppb-viz-zone:not(.ppb-viz-header),
.ppb-viz-page--footer .ppb-viz-zone:not(.ppb-viz-footer),
.ppb-viz-page--aside .ppb-viz-zone:not(.ppb-viz-aside),
.ppb-viz-page--text .ppb-viz-zone:not(.ppb-viz-text) {
    opacity: 0.35;
}

@keyframes ppb-focus {
    0%, 100% { outline-color: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.35); }
    50% { outline-color: #16a34a; box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); }
}

.ppb-viz-forks {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
}

.ppb-viz-forks span {
    padding: 3px 7px;
    border-radius: 6px;
    animation: ppb-fade 2.4s ease-in-out infinite;
}

.ppb-viz-forks .is-yes { background: #dcfce7; color: #15803d; }
.ppb-viz-forks .is-no { background: #ffe4e6; color: #be123c; animation-delay: 1.2s; }

@keyframes ppb-fade {
    0%, 100% { opacity: 0.55; }
    40%, 60% { opacity: 1; }
}

.ppb-viz-scan {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 12px -6px rgba(1, 18, 60, 0.4);
    font-family: Georgia, serif;
    font-size: 0.6rem;
    filter: blur(0.4px) contrast(0.85);
    transform: rotate(-2deg);
}

.ppb-viz-scan.is-hand {
    font-family: "Segoe Script", "Bradley Hand", cursive;
    font-size: 0.66rem;
}

.ppb-viz-out {
    max-width: 120px;
}

.ppb-viz > .ppb-viz-out code {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    background: #0f172a;
    color: #a5f3fc;
    font-size: 0.6rem;
    line-height: 1.4;
    white-space: normal;
    animation: ppb-type 2.4s steps(20) infinite;
}

.ppb-viz > .ppb-viz-out.is-before code {
    background: #fff1f2;
    color: #be123c;
    text-decoration: line-through;
    animation: none;
}

.ppb-viz > .ppb-viz-out.is-after code {
    background: #dcfce7;
    color: #15803d;
}

@keyframes ppb-type {
    0% { clip-path: inset(0 100% 0 0); }
    60%, 100% { clip-path: inset(0 0 0 0); }
}

.ppb-viz-gauge {
    position: relative;
    flex: 1 1 100%;
    height: 10px;
    margin: 14px 4px 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, #fecdd3, #fde68a 55%, #bbf7d0);
}

.ppb-viz-gauge-fill {
    position: absolute;
    top: -3px;
    left: 0;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--ae-blue-deep, #01123c);
    box-shadow: 0 2px 6px rgba(1, 18, 60, 0.4);
    animation: ppb-gauge 3s ease-in-out infinite;
}

@keyframes ppb-gauge {
    0%, 100% { left: 64%; }
    50% { left: 92%; }
}

.ppb-viz-gauge-mark {
    position: absolute;
    top: -6px;
    width: 2px;
    height: 22px;
    background: #01123c;
}

.ppb-viz-gauge-mark::after {
    content: attr(data-label);
    position: absolute;
    top: -15px;
    left: 50%;
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%);
}

.ppb-viz-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 46px;
}

.ppb-viz-wave i {
    width: 4px;
    border-radius: 2px;
    background: #2563eb;
    animation: ppb-wave 1.2s ease-in-out infinite;
}

.ppb-viz-wave i.spk-a { background: #2563eb; }
.ppb-viz-wave i.spk-b { background: #f97316; }

@keyframes ppb-wave {
    50% { transform: scaleY(0.55); }
}


.ppb-pop-head strong {
    color: var(--ae-ink);
}

html.dark .ppb-pop {
    border-color: var(--ae-line-strong);
    background: var(--ae-surface-2);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.85);
}

html.dark .ppb-viz {
    background: rgba(255, 255, 255, 0.05);
}

html.dark .ppb-viz-gauge-mark {
    background: var(--ae-ink);
}

@media (prefers-reduced-motion: reduce) {
    .ppb-pop,
    .ppb-viz * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Bulle « info » : exemples « avant → après » empilés et alignés ---------- */
.ppb-viz-flow {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
}

.ppb-viz-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 8px 10px 9px;
    overflow: hidden;
    border: 1px solid var(--ae-line, #e2e4ea);
    border-radius: 8px;
    background: var(--ae-surface, #fff);
    text-align: left;
}

.ppb-viz > .ppb-viz-card {
    flex: 1 1 100%;
}

.ppb-viz-card-tag {
    margin-bottom: 2px;
    color: var(--ae-ink-muted, #6b6e7a);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ppb-viz-card-line {
    overflow: hidden;
    color: var(--ae-ink, #0c0c10);
    font-size: 0.7rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ppb-viz-card.is-source .ppb-viz-card-line {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ae-ink-soft, #3b3e48);
}

.ppb-viz-card.is-hand .ppb-viz-card-line {
    font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
    font-size: 0.74rem;
}

.ppb-viz-card.is-before .ppb-viz-card-line {
    font-family: inherit;
    color: var(--ae-ink-muted, #6b6e7a);
    text-decoration: line-through;
    text-decoration-color: color-mix(in srgb, var(--ae-ink-muted, #6b6e7a) 60%, transparent);
}

.ppb-viz-card.is-result {
    border-color: color-mix(in srgb, var(--ppb-c, #24439a) 30%, var(--ae-line, #e2e4ea));
    background: color-mix(in srgb, var(--ppb-soft, #dbe8ff) 45%, var(--ae-surface, #fff));
}

.ppb-viz-card.is-result .ppb-viz-card-tag {
    color: var(--ppb-c, #24439a);
}

.ppb-viz-card.is-result .ppb-viz-card-line {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.66rem;
    white-space: normal;
    animation: ppb-line-in 3.2s ease-out infinite both;
}

@keyframes ppb-line-in {
    0% { opacity: 0; transform: translateY(3px); }
    12%, 88% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}

/* Ligne de lecture qui parcourt l'image source */
.ppb-viz-scanline {
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    height: 2px;
    background: color-mix(in srgb, var(--ppb-c, #24439a) 55%, transparent);
    animation: ppb-scanline 3.2s ease-in-out infinite;
}

@keyframes ppb-scanline {
    0% { top: 18px; opacity: 0; }
    8% { opacity: 1; }
    32% { top: calc(100% - 4px); opacity: 1; }
    40%, 100% { top: calc(100% - 4px); opacity: 0; }
}

.ppb-viz-down {
    display: flex;
    align-self: center;
    justify-content: center;
    width: 20px;
    height: 14px;
    color: var(--ae-ink-faint, #9396a1);
    font-size: 0.62rem;
}

.ppb-viz > .ppb-viz-down {
    flex: 1 1 100%;
}

/* Exemples : teintes de la charte (plus de dégradés néon) */
.ppb-viz-image { background: #dbe8ff; }
.ppb-viz-wave i,
.ppb-viz-wave i.spk-a { background: #24439a; }
.ppb-viz-wave i.spk-b { background: #8a1f4f; }

@keyframes ppb-word {
    0%, 15% { outline-color: transparent; }
    25%, 80% { outline-color: #0f4c4a; background: #cdeec0; }
    100% { outline-color: transparent; }
}

@keyframes ppb-line {
    0%, 15% { outline-color: transparent; }
    30%, 80% { outline-color: #0f4c4a; background: rgba(15, 76, 74, 0.1); }
    100% { outline-color: transparent; }
}

@keyframes ppb-zone {
    0%, 10% { outline-color: transparent; }
    25%, 85% { outline-color: #0f4c4a; }
    100% { outline-color: transparent; }
}

html.dark .ppb-viz-card {
    border-color: var(--ae-line-strong, rgba(219, 232, 255, 0.16));
    background: var(--ae-surface, #1e1f24);
}

html.dark .ppb-viz-card.is-result {
    background: color-mix(in srgb, var(--ppb-soft) 60%, var(--ae-surface, #1e1f24));
}

html.dark .ppb-viz-wave i,
html.dark .ppb-viz-wave i.spk-a { background: #9db8f5; }
html.dark .ppb-viz-wave i.spk-b { background: #f2a7c8; }

@media (prefers-reduced-motion: reduce) {
    .ppb-viz-scanline { display: none; }
    .ppb-viz-card.is-result .ppb-viz-card-line { animation: none; }
}
