*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: #f5f5f5; color: #1a1a1a; padding: 1.5rem; }
header { background: #1e293b; color: #f1f5f9; border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
header h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.4rem; }
header .meta { font-size: 0.82rem; color: #94a3b8; line-height: 1.6; }
header .counts { margin-top: 0.5rem; display: flex; gap: 1.25rem; font-size: 0.85rem; flex-wrap: wrap; }
header .counts span { background: #334155; padding: 0.15rem 0.6rem; border-radius: 4px; }
.disclaimer { background: #fef9c3; border: 1px solid #fde047; border-radius: 6px; padding: 0.6rem 1rem; font-size: 0.82rem; color: #713f12; margin-bottom: 1.25rem; }
.toolbar { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar button { padding: 0.4rem 0.85rem; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; cursor: pointer; font-size: 0.85rem; }
.toolbar button:hover { background: #f1f5f9; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.9rem 1rem; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s; user-select: none; }
.card:hover, .card:focus { box-shadow: 0 2px 8px rgba(0,0,0,0.1); border-color: #6366f1; outline: none; }
.card.active { border-color: #6366f1; box-shadow: 0 0 0 2px #c7d2fe; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.35rem; }
.card-label { font-weight: 600; font-size: 0.9rem; line-height: 1.3; }
.badge { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef9c3; color: #854d0e; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-health-green { background: #dcfce7; color: #166534; }
.badge-health-amber { background: #fef9c3; color: #854d0e; }
.badge-health-red { background: #fee2e2; color: #991b1b; }
.badge-ai { background: #ede9fe; color: #5b21b6; font-size: 0.65rem; margin-left: 0.25rem; }
.card-ai-summary { font-size: 0.78rem; color: #64748b; margin: 0.25rem 0 0.35rem; line-height: 1.35; }
.untested-tag { color: #64748b; font-style: italic; }
.card-health-note { font-size: 0.68rem; color: #94a3b8; margin-top: 0.35rem; font-style: italic; }
.card-meta { font-size: 0.78rem; color: #64748b; }
.detail-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.detail-panel h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }
.detail-panel .meta { font-size: 0.8rem; color: #64748b; margin-bottom: 0.85rem; }
.mermaid-wrap { overflow-x: auto; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.mermaid { font-size: 0.82rem; }
.issue-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.issue { font-size: 0.82rem; padding: 0.35rem 0.65rem; border-radius: 5px; }
.issue-error { background: #fee2e2; color: #7f1d1d; }
.issue-warn { background: #fef9c3; color: #713f12; }
.issue-info { background: #e0f2fe; color: #0c4a6e; }
.issue-low-confidence { opacity: 0.85; border-left: 3px solid #94a3b8; }
.prov-chip { font-size: 0.72rem; font-weight: 600; color: #64748b; background: #f1f5f9; padding: 0.1rem 0.35rem; border-radius: 3px; margin-right: 0.25rem; }
.sev { font-weight: 700; margin-right: 0.4rem; }
.no-issues { font-size: 0.82rem; color: #16a34a; }
.error-state { background: #fee2e2; border: 1px solid #fca5a5; border-radius: 8px; padding: 1rem 1.25rem; color: #991b1b; margin-bottom: 1rem; }
.badge-no-contract { background: #f1f5f9; color: #64748b; font-size: 0.65rem; }
.badge-contract { background: #dbeafe; color: #1e40af; font-size: 0.65rem; }
.health-filter { font-size: 0.82rem; display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.flow-path { margin-bottom: 0.75rem; font-size: 0.82rem; }
.drilldown-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.drill-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.cy-root { height: 360px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 1rem; background: #f8fafc; }
.edge-legend { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.75rem; margin-bottom: 0.5rem; }
.edge-legend i { display: inline-block; width: 12px; height: 3px; margin-right: 4px; vertical-align: middle; }
.node-detail { background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.82rem; }
.filter-chip { cursor: pointer; }
.hidden { display: none !important; }
.link-confirmed { border-left: 4px solid #16a34a; }
.link-broken { border-left: 4px solid #dc2626; }
.link-unresolved { border-left: 4px dashed #94a3b8; }
.eco-cluster { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem; }
.eco-links li { padding: 0.5rem 0.75rem; margin-bottom: 0.35rem; background: #f8fafc; border-radius: 4px; font-size: 0.82rem; list-style: none; }
button.disabled { opacity: 0.5; cursor: not-allowed; }
