/* System Health page (health.js). Signal tokens only. */
:root,[data-theme=dark]{--health-fail:#ff9b93;--health-fail-bg:#3b1f22}
[data-theme=light]{--health-fail:#a4261d;--health-fail-bg:#fdeceb}
.health-page{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:16px;padding-bottom:8px}
.health-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.health-head p{margin:0}
.health-actions{display:flex;flex-wrap:wrap;gap:8px}
.health-actions a.btn{display:inline-flex;align-items:center;text-decoration:none}
.health-overall{display:flex;align-items:center;gap:10px;margin:0;padding:14px 16px;border-radius:10px;font-weight:600;border:1px solid var(--line);background:var(--panel)}
.health-overall svg{width:20px;height:20px;flex:none}
.health-overall[data-state=ok]{color:var(--accent)}
.health-overall[data-state=warn]{background:var(--attention-bg);color:var(--attention);border-color:transparent}
.health-overall[data-state=fail]{background:var(--health-fail-bg);color:var(--health-fail);border-color:transparent}
.health-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:16px;align-items:start}
.health-card{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:18px 20px;display:flex;flex-direction:column;gap:2px;min-width:0}
.health-card h2{margin:0 0 8px;font-size:16px}
.health-row{display:flex;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.health-card h2+.health-row{border-top:0;padding-top:4px}
.health-dot{width:10px;height:10px;border-radius:50%;flex:none;margin-top:6px;background:var(--muted)}
.health-row[data-state=ok] .health-dot{background:var(--accent)}
.health-row[data-state=warn] .health-dot{background:var(--attention)}
.health-row[data-state=fail] .health-dot{background:var(--health-fail)}
.health-row-body{min-width:0;flex:1;display:flex;flex-direction:column;gap:4px}
.health-row-action{margin-top:4px}
.health-row-body p{margin:0;line-height:1.5;overflow-wrap:anywhere}
.health-row-body>p:first-of-type{color:var(--muted)}
.health-fix{padding:8px 10px;border-radius:7px;background:var(--notice-warning-bg);color:var(--notice-warning-ink);font-size:13px}
.health-row[data-state=fail] .health-fix{background:var(--health-fail-bg);color:var(--health-fail)}
.health-tools{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--line)}
.health-tools>.btn{align-self:flex-start}
.health-copy{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.health-copy-label{font-size:13px;font-weight:600}
.health-copy-row{display:flex;gap:8px;align-items:stretch;min-width:0}
.health-copy-row code{flex:1;min-width:0;padding:8px 10px;border-radius:7px;background:var(--inset);border:1px solid var(--line);font-size:12px;overflow-x:auto;white-space:nowrap}
.health-errors{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.health-errors details{border:1px solid var(--line);border-radius:8px;padding:8px 10px}
.health-errors summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;cursor:pointer}
.health-errors summary small{color:var(--muted);margin-inline-start:auto}
.health-errors details p{margin:8px 0 0;font-size:13px}
.health-error-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;padding:1px 6px;border-radius:5px;background:var(--inset)}
.health-note{margin:0}
.health-list{margin:6px 0 0;padding-inline-start:18px;display:flex;flex-direction:column;gap:4px;font-size:13px}
.health-events{margin-top:8px}
.health-events summary{cursor:pointer;font-size:13px;font-weight:600;min-height:32px;display:flex;align-items:center}
.health-numbers{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px;font-size:13px}
.health-numbers li{display:grid;gap:2px;padding:6px 10px;border-radius:7px;background:var(--inset);border-inline-start:3px solid var(--line)}
.health-numbers li.warn{border-inline-start-color:var(--attention)}
.health-numbers li.fail{border-inline-start-color:var(--danger,#b42318)}
.health-numbers small{color:var(--muted)}
.health-numbers span{color:var(--muted);font-size:12px}
