.system-health {display:grid;gap:1.25rem;max-width:1100px;margin:auto;font-size:1rem;line-height:1.5;}
.system-health-summary {display:flex;align-items:center;justify-content:space-between;gap:1.25rem;padding:1.5rem;border:1px solid var(--border);border-radius:16px;background:var(--surface);}
.system-health h2 {margin:.2rem 0;font-size:clamp(1.5rem,4vw,2rem);letter-spacing:-.025em;}
.system-health p {margin:.4rem 0;color:var(--muted);}
.system-health-notice {padding:.75rem 1rem;border-left:3px solid var(--product-accent);background:var(--surface-muted);border-radius:0 8px 8px 0;}
.system-health-context {display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem;color:var(--muted);font-size:.875rem;}
.system-health-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;}
.system-health-check {padding:1.25rem;background:var(--surface);border:1px solid var(--border-soft);border-radius:12px;min-width:0;overflow-wrap:anywhere;}
.system-health-check-title {display:flex;align-items:start;justify-content:space-between;gap:.75rem;flex-wrap:wrap;}
.system-health-check h3 {font-size:1rem;line-height:1.4;margin:0;font-weight:600;}
.system-health-check small {display:block;margin-top:.8rem;font-size:.875rem;color:var(--muted);}
.system-health-badge {font-size:.875rem;font-weight:600;white-space:nowrap;padding:.18rem .6rem;border:1px solid var(--border);border-radius:20px;color:var(--muted);}
.system-health-badge[data-status="passed"] {color:var(--product-accent);border-color:var(--product-accent);}
.system-health-badge[data-status="failed"] {color:var(--danger);border-color:currentColor;}
:root[data-theme="light"] .system-health-badge[data-status="failed"] {color:#9e3038;}
.system-health-badge[data-status="stale"] {border-style:dashed;}
.system-health-detail {padding:1rem 1.25rem;border:1px solid var(--border-soft);border-radius:12px;background:var(--surface);}
.system-health-detail summary {cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600;}
.system-health-bars {height:90px;display:flex;align-items:end;gap:3px;margin:1rem 0;}
.system-health-bar {flex:1;min-width:2px;max-width:24px;height:var(--bar-height);background:var(--product-accent);border-radius:3px 3px 0 0;}
.system-health-bar.has-failures {background:var(--danger);}
.system-health-links {display:flex;align-items:center;flex-wrap:wrap;gap:1rem;}
.system-health-links a {color:var(--product-accent);display:inline-flex;align-items:center;min-height:44px;text-underline-offset:3px;}
body .app-shell .system-health button {min-height:44px;font-size:.875rem;}
.system-health :focus-visible {outline:2px solid var(--product-accent);outline-offset:4px;}
@media(max-width:640px) {.system-health-grid{grid-template-columns:1fr}.system-health-summary{align-items:stretch;flex-direction:column;padding:1.1rem}.system-health-check{padding:1rem}.system-health-links{align-items:stretch;flex-direction:column}.system-health-links>*{justify-content:center;text-align:center}}

.system-health button[aria-disabled="true"] {opacity:.65;cursor:default;}
