/* ================================================================
   MPI Drawer (#mpi-detail-panel) — shared CSS
   ----------------------------------------------------------------
   Extracted from web/malware-intel.html so the same drawer renders
   correctly on web/malware-intel-list.html (List view) and any
   future page that mounts the MPI package detail drawer via
   web/static/js/malware-intel.js.

   The kanban page (malware-intel.html) keeps a duplicate copy of
   these rules in its inline <style> block; that is intentional —
   identical rules cascade to the same result. The list page now
   picks up the shared file; the kanban page picks up both (this
   file first via <link>, then its inline <style> as overrides).

   Includes light + dark mode rules, drawer tag/verdict/consensus
   sections, per-stage rerun pills (used inside drawer verdict
   tabs), pipeline stage tracker (drawer + kanban card), and the
   mpi-pulse keyframe animation.
   ================================================================ */

/* ----------------------------------------------------------------
   Per-stage rerun pill — small inline button shown in each
   verdict tab inside the drawer.
   ---------------------------------------------------------------- */
.mpi-verdict-tab-rerun {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.4rem 0;
}
.mpi-btn-rerun-stage {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #6366f1;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s, color 0.15s;
}
.mpi-btn-rerun-stage:hover:not(:disabled) {
    background: #6366f1;
    color: #fff;
}
.mpi-btn-rerun-stage:disabled {
    opacity: 0.55;
    cursor: wait;
}

/* "Triage detail" button used inside the drawer header. */
.mpi-btn-triage-detail {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid #3b82f6;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}
.mpi-btn-triage-detail:hover {
    background: #3b82f6;
    color: #fff;
}

/* ----------------------------------------------------------------
   Detail side panel — main drawer container
   ---------------------------------------------------------------- */
#mpi-detail-panel {
    position: fixed;
    top: 0;
    right: -860px;
    width: min(860px, 96vw);
    max-width: 100vw;
    height: 100vh;
    background: var(--color-bg-primary);
    border-left: 1px solid var(--color-border);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
}

#mpi-detail-panel.open {
    right: 0;
}

.mpi-detail-content {
    padding: 1.75rem;
}

.mpi-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--color-bg-primary);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.mpi-detail-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-text-primary);
    word-break: break-all;
}

.mpi-detail-version {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}

.mpi-detail-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.mpi-detail-close:hover {
    color: var(--color-text-primary);
}

.mpi-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.mpi-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.mpi-detail-meta-purl {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.mpi-detail-purl {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #94a3b8;
    background: var(--color-bg-tertiary, #0c0c0c);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.07);
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mpi-purl-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.mpi-purl-copy-btn:hover { color: #94a3b8; border-color: rgba(255,255,255,0.22); }
.mpi-purl-copy-btn--done { color: #4ade80; border-color: rgba(74,222,128,0.35); }
.mpi-purl-registry-link {
    font-size: 0.78rem;
    color: #7dd3fc;
    text-decoration: none;
}
.mpi-purl-registry-link:hover { text-decoration: underline; }
.mpi-detail-scanid {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
}

.mpi-detail-status {
    font-weight: 600;
}

.mpi-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.mpi-detail-tags-section {
    margin-bottom: 1.35rem;
}
.mpi-detail-tags-heading {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: var(--color-text-primary);
}
.mpi-detail-tags-hint {
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--color-text-secondary);
}
.mpi-detail-tags-cards {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.85rem;
}
.mpi-detail-tag-card {
    position: relative;
    z-index: 1;
    text-align: left;
    border: 1px solid var(--color-border);
    border-radius: 0.65rem;
    border-left: 4px solid var(--tag-accent, #6366f1);
    background: var(--color-bg-secondary);
    padding: 1rem 1.1rem 1rem;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.mpi-detail-tag-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.mpi-detail-tag-titles {
    min-width: 0;
    flex: 1;
}
.mpi-detail-tag-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}
.mpi-detail-tag-name {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'SFMono-Regular', Consolas, ui-monospace, monospace;
    color: var(--color-text-primary);
    word-break: break-word;
}
.mpi-detail-tag-count {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}
.mpi-detail-tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.mpi-detail-tag-sev,
.mpi-detail-tag-cat,
.mpi-detail-tag-id {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mpi-detail-tag-sev {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}
.mpi-detail-tag-cat {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}
.mpi-detail-tag-id {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    text-transform: none;
    letter-spacing: normal;
    font-family: 'SFMono-Regular', Consolas, ui-monospace, monospace;
}
.mpi-detail-tag-expand {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 0.45rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    cursor: pointer;
}
.mpi-detail-tag-expand:hover {
    border-color: var(--color-accent, #6366f1);
    color: var(--color-accent, #6366f1);
}
.mpi-detail-tag-blurb {
    margin: 0.65rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--color-text-primary);
}
.mpi-muted {
    color: var(--color-text-secondary);
    font-style: italic;
}
.mpi-detail-tag-hovertip {
    display: none;
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: calc(100% - 2px);
    z-index: 6;
    padding: 0.75rem 0.9rem;
    border-radius: 0.5rem;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--color-text-primary);
}
.mpi-detail-tag-hovertip strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}
.mpi-detail-tip-body {
    margin: 0;
    color: var(--color-text-secondary);
}
.mpi-detail-tip-mitre {
    margin: 0.5rem 0 0;
    font-size: 0.76rem;
    font-family: 'SFMono-Regular', Consolas, ui-monospace, monospace;
    color: var(--color-text-primary);
}
@media (hover: hover) and (pointer: fine) {
    .mpi-detail-tag-card:hover {
        z-index: 8;
    }
    .mpi-detail-tag-card:hover .mpi-detail-tag-hovertip {
        display: block;
    }
    .mpi-detail-tag-card.expanded:hover .mpi-detail-tag-hovertip {
        display: none;
    }
}
.mpi-detail-tag-expanded {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--color-border);
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--color-text-primary);
}
.mpi-detail-tag-expanded[hidden] {
    display: none !important;
}
.mpi-detail-tag-card.expanded .mpi-detail-tag-expanded {
    display: block !important;
}
.mpi-detail-tag-d-name {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}
.mpi-detail-tag-d-desc {
    margin: 0 0 0.65rem;
}
.mpi-detail-tag-d-mitre {
    margin: 0 0 0.5rem;
}
.mpi-detail-tag-d-sub {
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}
.mpi-detail-tag-d-id {
    margin: 0.5rem 0;
    font-size: 0.8rem;
}
.mpi-detail-tag-evidence-wrap {
    margin-top: 0.65rem;
}
.mpi-detail-tag-evidence {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}
.mpi-detail-tag-evidence li {
    margin: 0.25rem 0;
    font-size: 0.82rem;
}
.mpi-detail-tag-evidence code {
    font-size: 0.8rem;
    word-break: break-all;
}
.mpi-detail-tag-alt {
    color: var(--color-text-secondary);
}

.mpi-detail-verdicts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* 3-column verdicts for v3.2 */
.mpi-detail-verdicts-3col { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 600px) {
    .mpi-detail-verdicts {
        grid-template-columns: 1fr;
    }
    .mpi-detail-verdicts-3col { grid-template-columns: 1fr; }
}

/* Consensus card — theme-aware */
.mpi-consensus-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    margin-bottom: 1rem;
}
.mpi-consensus-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mpi-consensus-header h4 { margin: 0; font-size: 0.95rem; color: var(--color-text-primary); }
.mpi-consensus-dots { display: flex; gap: 4px; }
.mpi-agree-dot { font-size: 14px; }
.mpi-agree-agree { color: #16a34a; }
.mpi-agree-partial { color: #d97706; }
.mpi-agree-disagree { color: #dc2626; }
.mpi-agree-unknown { color: #6b7280; }
[data-theme="dark"] .mpi-agree-agree { color: #22c55e; }
[data-theme="dark"] .mpi-agree-partial { color: #f59e0b; }
[data-theme="dark"] .mpi-agree-disagree { color: #ef4444; }
.mpi-action-chip { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.75em; margin-top: 4px; }
.mpi-action-block { background: #ef4444; color: white; }
.mpi-action-clear { background: #22c55e; color: white; }
.mpi-action-review { background: #f59e0b; color: #111; }
.mpi-rule-trace { margin-top: 8px; font-size: 0.8em; }
.mpi-rule-trace summary { cursor: pointer; color: var(--color-text-secondary); }
.mpi-rule-trace ul { margin: 4px 0; padding-left: 20px; color: var(--color-text-primary); }

.mpi-verdict-block {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 0.65rem;
    padding: 1.2rem 1.25rem;
}

.mpi-verdict-block h4 {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.mpi-verdict-label {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.mpi-verdict-malicious { color: #dc2626; }
.mpi-verdict-benign { color: #16a34a; }
.mpi-verdict-suspicious { color: #d97706; }
.mpi-verdict-unknown { color: var(--color-text-secondary); }
[data-theme="dark"] .mpi-verdict-malicious { color: #ef4444; }
[data-theme="dark"] .mpi-verdict-benign { color: #22c55e; }
[data-theme="dark"] .mpi-verdict-suspicious { color: #f59e0b; }

.mpi-verdict-reasoning {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
}

.mpi-no-data {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

.mpi-voter-detail-link {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #245EE9;
    text-decoration: none;
}
.mpi-voter-detail-link:hover { text-decoration: underline; }

/* Verdict tabs */
.mpi-verdict-tabs { margin-bottom: 1.25rem; }
.mpi-verdict-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 0;
}
.mpi-verdict-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.mpi-verdict-tab-btn:hover { color: var(--color-text-primary); }
.mpi-verdict-tab-btn.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}
.mpi-verdict-tab-btn .mpi-tab-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}
.mpi-verdict-tab-pane { display: none; }
.mpi-verdict-tab-pane.active { display: block; }
.mpi-verdict-pane-inner {
    padding: 1rem 0;
}
.mpi-verdict-pane-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.mpi-verdict-pane-model {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-family: monospace;
    background: var(--color-bg-secondary);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}
.mpi-verdict-full-reasoning {
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--color-bg-tertiary, #0c0c0c);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
}

.mpi-verdict-verbose {
    margin-top: 0.6rem;
    border: 1px solid var(--color-border, #2d3748);
    border-radius: 6px;
    background: var(--color-bg-secondary, #111827);
}
.mpi-verdict-verbose-toggle {
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.45rem 0.75rem;
    user-select: none;
    list-style: none;
}
.mpi-verdict-verbose-toggle::-webkit-details-marker { display: none; }
.mpi-verdict-verbose-toggle::before { content: '\25B6\0020'; font-size: 0.7rem; }
details.mpi-verdict-verbose[open] .mpi-verdict-verbose-toggle::before { content: '\25BC\0020'; }
.mpi-verdict-verbose-body {
    border-top: 1px solid var(--color-border, #2d3748);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 280px;
    overflow-y: auto;
}
.mpi-verdict-verbose-row {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.5;
    padding: 0.3rem 0.4rem;
    background: var(--color-bg-tertiary, #0c0c0c);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}
.mpi-sig-score {
    font-size: 0.75rem;
    background: rgba(99,102,241,0.18);
    color: #a5b4fc;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
}
.mpi-sig-file {
    font-size: 0.75rem;
    color: #7dd3fc;
    background: rgba(0,0,0,0.25);
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
}
.mpi-sig-desc { color: #94a3b8; font-size: 0.78rem; }
.mpi-sig-conf { color: #94a3b8; font-size: 0.75rem; }

.mpi-btn-dispute {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.mpi-btn-dispute:hover { background: rgba(251, 191, 36, 0.28); }

.mpi-btn-confirm {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.mpi-btn-confirm:hover { background: rgba(239, 68, 68, 0.28); }

.mpi-btn-reopen {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}
.mpi-btn-reopen:hover { background: rgba(96, 165, 250, 0.22); }
.mpi-verdict-pending {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-style: italic;
    padding: 1rem 0;
}

.mpi-detail-iocs {
    margin-bottom: 1.5rem;
}

.mpi-detail-iocs h4,
.mpi-provenance h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.mpi-ioc-group {
    margin-bottom: 0.75rem;
}

.mpi-ioc-group strong {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-secondary);
}

.mpi-ioc-group ul {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
}

.mpi-ioc-group li {
    font-size: 0.8rem;
    padding: 0.2rem 0;
    color: var(--color-text-primary);
    word-break: break-all;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.mpi-provenance ol {
    padding-left: 1.25rem;
    margin: 0;
}

.mpi-provenance li {
    font-size: 0.8rem;
    padding: 0.2rem 0;
    color: var(--color-text-secondary);
}

/* Review actions */
.mpi-review-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.mpi-btn {
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mpi-btn-approve {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.mpi-btn-approve:hover {
    background: rgba(239, 68, 68, 0.25);
}

.mpi-btn-reject {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.mpi-btn-reject:hover {
    background: rgba(34, 197, 94, 0.25);
}

.mpi-btn-escalate {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.mpi-btn-escalate:hover {
    background: rgba(168, 85, 247, 0.25);
}

.mpi-btn-secondary {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.mpi-btn-submit-review {
    background: #F36717;
    color: white;
}

.mpi-btn-submit-review:hover {
    background: #e05a0f;
}

.mpi-btn-primary {
    background: #F36717;
    color: white;
}

.mpi-btn-primary:hover {
    background: #e05a0f;
}

.mpi-review-note-area {
    margin-top: 1rem;
}

.mpi-review-note {
    width: 100%;
    border: 1px solid var(--color-border);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.85rem;
    resize: vertical;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

.mpi-detail-loading,
.mpi-detail-error {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.mpi-detail-error h3 {
    color: #ef4444;
    margin-bottom: 0.5rem;
}

/* ----------------------------------------------------------------
   Tab badge — used inside drawer verdict tab buttons
   (also used by analytics tab switcher on kanban page; included
   here so it renders correctly inside the drawer on any host page).
   ---------------------------------------------------------------- */
.mpi-tab-badge { background: var(--color-bg-secondary); padding: 0.1rem 0.5rem; border-radius: 10px; font-size: 0.75rem; margin-left: 0.4rem; }

/* ----------------------------------------------------------------
   Pipeline stage tracker — used inside drawer AND on kanban cards
   ---------------------------------------------------------------- */
.mpi-stage-tracker { display: flex; align-items: center; gap: 0; margin: 0.75rem 0; padding: 0.5rem 0; }
.mpi-stage { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.mpi-stage-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--color-border); background: var(--color-bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; z-index: 1; transition: all 0.3s; }
.mpi-stage-dot.done { background: #22c55e; border-color: #22c55e; color: #fff; }
.mpi-stage-dot.active { background: #6366f1; border-color: #6366f1; color: #fff; animation: mpi-pulse 1.5s infinite; }
.mpi-stage-dot.fail { background: #ef4444; border-color: #ef4444; color: #fff; }
.mpi-stage-dot.skip { opacity: 0.3; }
.mpi-stage-dot.pending { background: #f97316; border-color: #f97316; color: #fff; opacity: 0.8; }
.mpi-stage-label { font-size: 0.65rem; color: var(--color-text-secondary); margin-top: 0.25rem; text-align: center; white-space: nowrap; }
.mpi-stage-label.active { color: #6366f1; font-weight: 600; }
.mpi-stage-label.done { color: #16a34a; }
.mpi-stage-label.pending { color: #ea580c; font-weight: 600; }
[data-theme="dark"] .mpi-stage-label.done { color: #22c55e; }
[data-theme="dark"] .mpi-stage-label.pending { color: #f97316; }
.mpi-stage-connector { flex: 1; height: 2px; background: var(--color-border); min-width: 12px; margin-top: -12px; }
.mpi-stage-connector.done { background: #22c55e; }
.mpi-stage-connector.active { background: linear-gradient(90deg, #22c55e, #6366f1); }
.mpi-stage-detail { font-size: 0.6rem; color: var(--color-text-secondary); margin-top: 0.15rem; }
@keyframes mpi-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); } 50% { box-shadow: 0 0 0 6px rgba(99,102,241,0); } }

/* Mini stage tracker for kanban cards (kept here to share keyframe). */
.mpi-card-stages { display: flex; align-items: center; gap: 2px; margin: 0.3rem 0; }
.mpi-card-stage-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); }
.mpi-card-stage-dot.done { background: #22c55e; }
.mpi-card-stage-dot.active { background: #6366f1; animation: mpi-pulse 1.5s infinite; }
.mpi-card-stage-dot.fail { background: #ef4444; }
.mpi-card-stage-dot.pending { background: #f97316; }
.mpi-card-stage-line { width: 8px; height: 2px; background: var(--color-border); }
.mpi-card-stage-line.done { background: #22c55e; }

/* ----------------------------------------------------------------
   Light-mode contrast overrides for dark-first drawer surfaces.
   The drawer was originally dark-themed; force readable colors
   on light pages so panels, code blocks, and verbose rows remain
   legible in both modes.
   ---------------------------------------------------------------- */
:root:not([data-theme="dark"]) .mpi-detail-purl {
    color: #475569;
    background: #f8fafc;
    border-color: #e5e7eb;
}
:root:not([data-theme="dark"]) .mpi-purl-copy-btn {
    color: #6b7280;
    border-color: #e5e7eb;
}
:root:not([data-theme="dark"]) .mpi-purl-copy-btn:hover {
    color: #1f2937;
    border-color: #cbd5e1;
}
:root:not([data-theme="dark"]) .mpi-verdict-full-reasoning {
    color: #1f2937;
    background: #f8fafc;
}
:root:not([data-theme="dark"]) .mpi-verdict-verbose-row {
    color: #1f2937;
    background: #f8fafc;
    border-color: #e5e7eb;
}
:root:not([data-theme="dark"]) .mpi-verdict-verbose-toggle {
    color: #6b7280;
}
:root:not([data-theme="dark"]) .mpi-sig-file {
    color: #0369a1;
    background: rgba(125, 211, 252, 0.18);
}
:root:not([data-theme="dark"]) .mpi-sig-desc,
:root:not([data-theme="dark"]) .mpi-sig-conf {
    color: #6b7280;
}
