/* ================================================================
   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;
}

/* Stage-0 Gate Models — per-model champion/challenger comparison.
   Mirrors .mpi-detail-tags-section / .mpi-detail-tag-card conventions. */
.mpi-detail-stage0-models {
    margin-bottom: 1.35rem;
}
.mpi-detail-stage0-models > summary {
    cursor: pointer;
    list-style: none;
}
.mpi-detail-stage0-models > summary::-webkit-details-marker {
    display: none;
}
.mpi-stage0-heading {
    display: inline;
    margin: 0 0 0.35rem;
}
.mpi-stage0-empty {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.mpi-stage0-muted {
    color: var(--color-text-secondary);
    font-style: italic;
}
.mpi-stage0-model-cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.6rem;
}
.mpi-stage0-model-card {
    text-align: left;
    border: 1px solid var(--color-border);
    border-radius: 0.65rem;
    border-left: 4px solid var(--color-border);
    background: var(--color-bg-secondary);
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.mpi-stage0-model-champion {
    border-left-color: #6366f1;
}
.mpi-stage0-model-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}
.mpi-stage0-model-role {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary);
}
.mpi-stage0-role-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mpi-stage0-role-champion {
    background: rgba(99, 102, 241, 0.18);
    color: #6366f1;
}
.mpi-stage0-role-challenger {
    background: rgba(107, 114, 128, 0.18);
    color: #6b7280;
    text-transform: none;
    letter-spacing: normal;
}
.mpi-stage0-model-metrics {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.45rem;
}
.mpi-stage0-prob,
.mpi-stage0-threshold {
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'SFMono-Regular', Consolas, ui-monospace, monospace;
    color: var(--color-text-primary);
}
.mpi-stage0-decision-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mpi-stage0-decision-escalate {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.mpi-stage0-decision-hold {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
}
.mpi-stage0-decision-failopen {
    background: rgba(107, 114, 128, 0.18);
    color: #6b7280;
}
.mpi-stage0-decision-unknown {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    text-transform: none;
    letter-spacing: normal;
}
.mpi-stage0-model-version {
    font-size: 0.78rem;
    font-family: 'SFMono-Regular', Consolas, ui-monospace, monospace;
    color: var(--color-text-secondary);
    word-break: break-word;
    margin-bottom: 0.3rem;
}
/* Artifact date, rendered inline after the version. Colour/italics come from
   .mpi-stage0-muted (theme-var driven), so this only owns the spacing. */
.mpi-stage0-model-trained {
    margin-left: 0.5rem;
}
.mpi-stage0-model-reason {
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--color-text-secondary);
}

/* Light-mode contrast overrides — darken saturated badge text for readability. */
:root:not([data-theme="dark"]) .mpi-stage0-role-champion {
    color: #4338ca;
}
:root:not([data-theme="dark"]) .mpi-stage0-decision-escalate {
    color: #dc2626;
}
:root:not([data-theme="dark"]) .mpi-stage0-decision-hold {
    color: #b45309;
}
:root:not([data-theme="dark"]) .mpi-stage0-role-challenger,
:root:not([data-theme="dark"]) .mpi-stage0-decision-failopen {
    color: #4b5563;
}

/* Collapsed per-model signals sub-section inside each Stage-0 model card. */
.mpi-stage0-model-signals {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}
.mpi-stage0-model-signals > summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.mpi-stage0-model-signals-body {
    margin-top: 0.5rem;
}

/* --- Budget Allocator panel (PRD-STAGE0-BUDGET-ALLOCATOR-001) ------------
   Sibling of .mpi-detail-stage0-models. Answers "which lane paid for this
   adjudication, and did the score earn it that slot?" Theme-aware via the
   same tokens the surrounding drawer uses -- no hardcoded #fff/#000. */
.mpi-detail-budget-allocator { margin: 0 0 0.75rem 0; }
.mpi-lane-rows { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.4rem; }
.mpi-lane-row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.5rem; align-items: baseline; }
.mpi-lane-key { color: var(--color-text-secondary); font-size: 0.78rem; }
.mpi-lane-val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; min-width: 0; }
.mpi-lane-how { font-size: 0.72rem; }
.mpi-lane-cost { font-variant-numeric: tabular-nums; font-weight: 600; }
.mpi-lane-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent; white-space: nowrap;
}
/* Ranked is the arm under test -- given the only accent so it reads at a glance. */
.mpi-lane-ranked   { background: rgba(59,130,246,0.14); color: #1d4ed8; border-color: rgba(59,130,246,0.35); }
.mpi-lane-firehose { background: rgba(107,114,128,0.14); color: #374151; border-color: rgba(107,114,128,0.30); }
.mpi-lane-curated  { background: rgba(16,185,129,0.13); color: #047857; border-color: rgba(16,185,129,0.30); }
.mpi-lane-unknown  { background: rgba(245,158,11,0.14); color: #92400e; border-color: rgba(245,158,11,0.35); }
.mpi-lane-none     { background: transparent; color: var(--color-text-secondary); border-color: var(--color-border); }
/* Not a budget lane: the verifier bypasses try_reserve() and appears in no
   lane accounting. Given its own violet accent precisely so it does not read
   as a fourth peer of ranked/firehose/curated. */
.mpi-lane-verifier { background: rgba(139,92,246,0.14); color: #6d28d9; border-color: rgba(139,92,246,0.35); }
:root[data-theme="dark"] .mpi-lane-ranked,
:root:not([data-theme="light"]) .mpi-lane-ranked   { color: #93c5fd; }
:root[data-theme="dark"] .mpi-lane-firehose,
:root:not([data-theme="light"]) .mpi-lane-firehose { color: #d1d5db; }
:root[data-theme="dark"] .mpi-lane-curated,
:root:not([data-theme="light"]) .mpi-lane-curated  { color: #6ee7b7; }
:root[data-theme="dark"] .mpi-lane-unknown,
:root:not([data-theme="light"]) .mpi-lane-unknown  { color: #fcd34d; }
:root[data-theme="dark"] .mpi-lane-verifier,
:root:not([data-theme="light"]) .mpi-lane-verifier { color: #c4b5fd; }

/* --- Ranked Lane Trial panel (docs/plans/2026-08-16-ranked-lane-trial-dashboard-panel.md) ---
   Reuses the .mpi-lane-* colour tokens above rather than a second palette.
   Theme-aware via CSS variables throughout; only the semantic pass/warn/fail
   accents below are hardcoded, mirroring the .mpi-lane-* block's own pattern
   of a light-mode base colour plus a dark-mode override. */
.mpi-rlt { margin: 0 0 1rem 0; padding: 0.85rem 1rem; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-secondary); }
.mpi-rlt-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; font-weight: 600; color: var(--color-text-primary); margin-bottom: 0.6rem; }
.mpi-rlt-title i { width: 16px; height: 16px; }
.mpi-rlt-title-sub { font-weight: 400; font-size: 0.72rem; margin-left: 0.25rem; }
/* overflow-x: clip is a backstop, NOT a clamp: the >100% ranked fill below is
   deliberately unclamped and must stay visible, but an absolutely-positioned
   fill wider than its track would otherwise extend past the viewport and give
   the page body a horizontal scrollbar at narrow widths. `clip` (not `hidden`)
   so this does not turn the panel into a scroll container on the y axis. */
.mpi-rlt-body { display: flex; flex-direction: column; gap: 0.9rem; overflow-x: clip; }

.mpi-rlt-section { padding-top: 0.7rem; border-top: 1px solid var(--color-border); }
.mpi-rlt-section:first-child { padding-top: 0; border-top: none; }
.mpi-rlt-section-title { font-size: 0.82rem; font-weight: 600; color: var(--color-text-primary); margin-bottom: 0.4rem; }
.mpi-rlt-reason { font-size: 0.78rem; color: var(--color-text-secondary); line-height: 1.4; margin-top: 0.3rem; }

/* Degraded/empty states -- endpoint failure and zero spend are opposite
   conditions and must never look alike. */
.mpi-rlt-state { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.3rem 0; }
.mpi-rlt-state strong { font-size: 0.85rem; color: var(--color-text-primary); }
.mpi-rlt-state-error strong { color: #b91c1c; }
.mpi-rlt-state-notrunning strong { color: #92400e; }
:root[data-theme="dark"] .mpi-rlt-state-error strong,
:root:not([data-theme="light"]) .mpi-rlt-state-error strong { color: #fca5a5; }
:root[data-theme="dark"] .mpi-rlt-state-notrunning strong,
:root:not([data-theme="light"]) .mpi-rlt-state-notrunning strong { color: #fcd34d; }

/* Section 1: validity gate chip */
.mpi-rlt-gate-row { display: flex; align-items: center; gap: 0.6rem; }
.mpi-rlt-gate-chip { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; border: 1px solid transparent; }
.mpi-rlt-gate-pass { background: rgba(16,185,129,0.15); color: #047857; border-color: rgba(16,185,129,0.35); }
.mpi-rlt-gate-warn { background: rgba(245,158,11,0.15); color: #92400e; border-color: rgba(245,158,11,0.35); }
.mpi-rlt-gate-unknown { background: transparent; color: var(--color-text-secondary); border-color: var(--color-border); }
:root[data-theme="dark"] .mpi-rlt-gate-pass,
:root:not([data-theme="light"]) .mpi-rlt-gate-pass { color: #6ee7b7; }
:root[data-theme="dark"] .mpi-rlt-gate-warn,
:root:not([data-theme="light"]) .mpi-rlt-gate-warn { color: #fcd34d; }

/* Section 2: positives-per-dollar ratio */
.mpi-rlt-ratio-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.mpi-rlt-ratio-value { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mpi-rlt-ratio-pass { color: #047857; }
.mpi-rlt-ratio-fail { color: #b91c1c; }
.mpi-rlt-ratio-unknown { color: var(--color-text-secondary); }
/* Retired criterion (2026-09-09): the ratio is still shown as an observation,
   so it must read as neutral -- never the green/red of a pass/fail verdict. */
.mpi-rlt-ratio-retired { color: var(--color-text-secondary); font-weight: 600; }
.mpi-rlt-reason-retired {
  border-left: 3px solid #d97706;
  padding-left: 0.5rem;
  color: #7c2d12;
  background: rgba(217, 119, 6, 0.06);
}
:root[data-theme="dark"] .mpi-rlt-reason-retired,
:root:not([data-theme="light"]) .mpi-rlt-reason-retired {
  border-left-color: #fbbf24;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.08);
}
:root[data-theme="dark"] .mpi-rlt-ratio-pass,
:root:not([data-theme="light"]) .mpi-rlt-ratio-pass { color: #6ee7b7; }
:root[data-theme="dark"] .mpi-rlt-ratio-fail,
:root:not([data-theme="light"]) .mpi-rlt-ratio-fail { color: #fca5a5; }
.mpi-rlt-ratio-detail { font-size: 0.76rem; color: var(--color-text-secondary); margin-top: 0.25rem; font-variant-numeric: tabular-nums; }

/* Meters -- overflow-visible so a >100% fill (ranked's reserve is a floor,
   not a cap) literally extends past the track's right edge instead of being
   clamped. Do not add overflow:hidden here. */
.mpi-rlt-meter { margin-top: 0.35rem; max-width: 26rem; }
.mpi-rlt-meter-track { position: relative; height: 10px; border-radius: 5px; background: var(--color-bg-tertiary, #0c0c0c); border: 1px solid var(--color-border); overflow: visible; }
.mpi-rlt-meter-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 5px; min-width: 2px; }
.mpi-rlt-fill-ranked   { background: rgba(59,130,246,0.75); }
.mpi-rlt-fill-firehose { background: rgba(107,114,128,0.75); }
.mpi-rlt-fill-curated  { background: rgba(16,185,129,0.70); }
.mpi-rlt-fill-verifier { background: rgba(139,92,246,0.75); }
.mpi-rlt-meter-label { font-size: 0.74rem; color: var(--color-text-secondary); margin-top: 0.25rem; font-variant-numeric: tabular-nums; }

/* CEILING meter -- the exact opposite intent to the floor meters above, so it
   gets the opposite overflow rule. The verifier cap is a hard ceiling the gate
   refuses at, so a fill past the track would depict an impossible state and
   would read as the same "floor exceeded, healthy" signal the ranked meter
   deliberately gives. The renderer clamps to 100% too; this is the structural
   backstop, not the primary guard. */
.mpi-rlt-meter-ceiling .mpi-rlt-meter-track { overflow: hidden; }

/* Section 3 (verifier): the two non-numeric cap states. "Cap unknown" and
   "no cap configured" are different facts and neither may be shown as $0.00,
   which would read as a permanent cap-hit. */
.mpi-rlt-verifier-row { gap: 0.25rem; }
.mpi-rlt-verifier-nocap { margin-top: 0.35rem; font-style: italic; }

/* Cap-hit: the verifier is refusing second-opinion checks. Warn accent, not
   error -- adjudication is unaffected, so this must not read as an outage. */
.mpi-rlt-caphit {
  margin-top: 0.45rem; padding: 0.4rem 0.55rem;
  font-size: 0.76rem; line-height: 1.45;
  border-radius: 6px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.35);
  color: #92400e;
}
:root[data-theme="dark"] .mpi-rlt-caphit,
:root:not([data-theme="light"]) .mpi-rlt-caphit { color: #fcd34d; }

/* Task 7: a reserve raised mid-day shrinks a derived ceiling retroactively.
   Neutral/informational styling on purpose -- no breach occurred, so this must
   not carry the warn or error accent. */
.mpi-rlt-ceiling-changed {
  margin-top: 0.45rem; padding: 0.4rem 0.55rem;
  font-size: 0.76rem; line-height: 1.45;
  border-radius: 6px;
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.30);
  color: #1d4ed8;
}
:root[data-theme="dark"] .mpi-rlt-ceiling-changed,
:root:not([data-theme="light"]) .mpi-rlt-ceiling-changed { color: #93c5fd; }

/* Displacement: verifier spend restated as adjudications not performed. The
   number the whole section exists to make legible. */
.mpi-rlt-displacement {
  margin-top: 0.7rem; padding-top: 0.55rem;
  border-top: 1px dashed var(--color-border);
  font-size: 0.76rem; line-height: 1.45;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Section 3: per-lane spend rows */
.mpi-rlt-lane-rows { display: flex; flex-direction: column; gap: 0.65rem; }
.mpi-rlt-lane-row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.mpi-rlt-lane-note { font-size: 0.72rem; }

/* Section 4: confound presentation */
.mpi-rlt-confound-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-size: 0.78rem; color: var(--color-text-secondary); margin-bottom: 0.25rem; }
.mpi-rlt-confound-note { font-size: 0.74rem; color: var(--color-text-secondary); line-height: 1.4; margin-top: 0.2rem; }

/* Responsive: no horizontal scroll of the page body at narrow widths. The
   meter stops short of the full row on purpose -- at max-width:100% a ranked
   fill above 100% (expected: the reserve is a floor, not a cap) would run past
   the viewport edge. 78% leaves the overflow visible up to ~128% instead of
   trading it for a horizontally-scrolling page. */
@media (max-width: 768px) {
  .mpi-rlt-meter { max-width: 78%; }
}

/* --- Config-modal budget allocator split (docs/plans/2026-08-16-ranked-lane-trial-dashboard-panel.md Task 7) ---
   Sibling of the .mpi-rlt-* block above; reuses the same tokens and the same
   "light-mode base colour + dark-mode override" pattern rather than a second
   palette. Every colour is either a CSS variable or has both a light value and
   an explicit dark override -- no hardcoded #fff/#000, nothing defined only
   inside a dark-mode block. */
.mpi-rsv-readonly {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem;
  padding: 0.4rem 0.6rem;
  border: 1px dashed var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-secondary);
}
.mpi-rsv-readonly-value {
  font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
}
/* "requires deploy" -- the same warn accent the trial panel's not-running
   state uses, so the two read as the same class of message. */
.mpi-rsv-readonly-tag {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 1px 7px; border-radius: 10px; white-space: nowrap;
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
:root[data-theme="dark"] .mpi-rsv-readonly-tag,
:root:not([data-theme="light"]) .mpi-rsv-readonly-tag { color: #fcd34d; }

.mpi-rsv-summary:empty { display: none; }
.mpi-rsv-summary {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-secondary);
}
.mpi-rsv-ceiling { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.mpi-rsv-ceiling-label { font-size: 0.78rem; color: var(--color-text-secondary); }
.mpi-rsv-ceiling-value {
  font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--color-text-primary);
}
/* A zero or negative ceiling is the fatal case guardrail 1 reports -- it is
   deliberately NOT clamped to $0 in the arithmetic, so it must not read as a
   normal value here either. */
.mpi-rsv-ceiling-bad { color: #b91c1c; }
:root[data-theme="dark"] .mpi-rsv-ceiling-bad,
:root:not([data-theme="light"]) .mpi-rsv-ceiling-bad { color: #fca5a5; }

.mpi-rsv-formula {
  font-size: 0.74rem; line-height: 1.45; color: var(--color-text-secondary);
  margin-top: 0.25rem; font-variant-numeric: tabular-nums;
}
/* Warnings, never blockers: an operator mid-edit must still be able to save. */
.mpi-rsv-warning {
  font-size: 0.76rem; line-height: 1.45;
  margin-top: 0.5rem; padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
}
:root[data-theme="dark"] .mpi-rsv-warning,
:root:not([data-theme="light"]) .mpi-rsv-warning { color: #fcd34d; }
