.health-root { display:grid; gap:18px; padding:10px 0 18px; }
.health-root > .button { justify-self:start; }
.health-big.risk-heading { font-size:32px; color:#d92d20; line-height:1.4; }
.health-big.risk-heading + .health-outof { font-size:17px; }
[data-theme="dark"] .health-big.risk-heading, [data-theme="dark"] .health-status.danger, [data-theme="dark"] .health-alert { color:#ff817a; }
@media (max-width:720px) { .health-dimension-value { flex-wrap:wrap; } .health-dimension-value::after { width:100%; font-size:12px; color:var(--muted); } }
.health-root h2 { margin:0; font-size:30px; line-height:1.25; }
.health-root h3 { margin:0; font-size:18px; }
.health-root p { line-height:1.65; }
.health-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.health-heading p { margin:6px 0; font-size:16px; color:var(--muted); }
.health-pilot { background:var(--accent-soft); color:var(--green); border-radius:6px; padding:7px 10px; font-size:12px; white-space:nowrap; }
.health-surface { min-width:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); padding:24px; }
.health-summary-grid { display:grid; grid-template-columns:1.65fr 1fr; gap:18px; }
.health-evidence-grid { display:grid; grid-template-columns:1.15fr 1fr; gap:18px; align-items:start; }
.health-compact .health-dimension-head,.health-compact .health-dimension-row { grid-template-columns:minmax(150px,1fr) 65px 80px; gap:12px; }
.health-compact .health-dimension-head > span:nth-child(2),.health-compact .health-dimension-row > span:nth-child(2) { display:none; }
.health-summary { display:grid; grid-template-columns:minmax(160px,.85fr) 1.2fr; gap:28px; align-items:center; }
.health-eyebrow { font-size:13px; color:var(--muted); font-weight:650; }
.health-big { font-size:clamp(34px,3.6vw,54px); line-height:1.2; font-weight:800; margin:16px 0 6px; letter-spacing:-.03em; }
.health-big.has-score { color:var(--green); font-size:clamp(56px,5.4vw,80px); }
.health-outof { font-size:26px; font-weight:700; color:var(--muted); margin-bottom:18px; }
.health-status { display:inline-block; padding:7px 10px; border-radius:6px; font-size:13px; font-weight:650; line-height:1.45; }
.health-status.pending { background:rgba(245,158,11,.11); color:var(--orange); }
.health-status.danger { background:rgba(239,68,68,.1); color:#d92d20; }
.health-status.good { background:var(--accent-soft); color:var(--green); }
.health-facts { border-left:1px solid var(--line); padding-left:26px; }
.health-fact-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.health-fact-grid strong { display:block; font-size:32px; margin-top:10px; }
.health-fact-grid .hint { display:block; margin-top:5px; }
.health-summary-note { margin-top:22px; padding-top:20px; border-top:1px solid var(--line); }
.health-summary-note p { font-weight:600; margin:9px 0 0; }
.health-priorities h3 { padding-bottom:15px; border-bottom:1px solid var(--line); }
.health-priority { display:flex; align-items:center; gap:13px; width:100%; text-align:left; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; color:var(--text); padding:17px 0; cursor:pointer; }
.health-priority > span:nth-child(2) { flex:1; min-width:0; }
.health-priority strong { display:block; font-size:14px; }
.health-priority small { display:block; color:var(--muted); line-height:1.5; margin-top:4px; }
.health-step { background:var(--accent-soft); color:var(--green); padding:7px 10px; border-radius:50%; font-weight:700; }
.health-priority > i { color:var(--muted); }
.health-buttons { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.health-primary { background:var(--accent) !important; color:#063b1a !important; border-color:var(--accent) !important; }
.health-section-heading { display:flex; align-items:center; gap:16px; justify-content:space-between; margin-bottom:18px; flex-wrap:wrap; }
.health-dimension-head, .health-dimension-row { display:grid; grid-template-columns:minmax(190px,1.1fr) minmax(180px,1.7fr) 100px 100px; gap:20px; align-items:center; }
.health-dimension-head { color:var(--muted); font-size:12px; padding:0 8px 14px; }
.health-dimension-row { border:0; border-top:1px solid var(--line); width:100%; border-radius:0; background:transparent; padding:17px 8px; text-align:left; color:var(--text); cursor:pointer; font-size:14px; }
.health-dimension-row:hover, .health-priority:hover, .health-risk-row:hover { background:var(--accent-soft); }
.health-dimension-row > span:first-child { display:flex; align-items:center; gap:16px; }
.health-dimension-row > span:first-child > i { width:20px; font-size:17px; }
.health-dimension-row > span:nth-child(n+3) { color:var(--muted); }
.health-dimension-value { display:flex; align-items:center; gap:18px; }
.health-track { background:var(--bar-track); height:12px; flex:1; border-radius:20px; overflow:hidden; }
.health-track > span { display:block; background:var(--accent); height:100%; border-radius:20px; }
.health-text-button { padding:3px 0; border:0; background:transparent; color:var(--text); text-align:left; text-decoration:underline; text-underline-offset:4px; cursor:pointer; font-weight:600; line-height:1.6; }
.health-root td .hint { display:block; margin-top:5px; }
.health-alert { display:flex; align-items:center; flex-wrap:wrap; gap:12px; background:rgba(239,68,68,.06); border:1px solid rgba(239,68,68,.3); color:#d92d20; padding:16px 22px; border-radius:8px; }
.health-alert .button { margin-left:auto; }
.health-risk-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.health-risk-row { display:flex; align-items:center; text-align:left; padding:10px; gap:12px; background:transparent; border:0; color:var(--text); cursor:pointer; }
.health-risk-row > span { flex:1; min-width:0; }
.health-risk-row strong { display:block; font-size:13px; line-height:1.55; }
.health-risk-row small { display:block; font-size:12px; color:var(--muted); margin-top:4px; }
.health-risk-row.triggered > i:first-child { color:#d92d20; }
.health-risk-row.clear > i:first-child { color:var(--green); }
.health-risk-row.unknown > i:first-child { color:var(--orange); }
.health-footer { display:flex; align-items:center; flex-wrap:wrap; gap:16px; justify-content:space-between; padding:16px 0; color:var(--muted); font-size:12px; }
.health-footer > div { display:flex; gap:8px; }
.health-old { padding:12px 16px; background:var(--accent-soft); color:var(--muted); margin:0; border-radius:6px; }
.health-backdrop { display:none; position:fixed; inset:0; z-index:30; background:rgba(15,23,42,.12); justify-content:flex-end; }
.health-backdrop.open { display:flex; }
.health-drawer { width:min(560px,100%); height:100dvh; background:var(--surface); color:var(--text); box-shadow:-4px 0 20px rgba(0,0,0,.08); display:flex; flex-direction:column; }
.health-drawer-heading { display:flex; align-items:flex-start; gap:16px; justify-content:space-between; padding:24px; border-bottom:1px solid var(--line); }
.health-drawer-heading h2 { margin:0; font-size:21px; line-height:1.45; }
.health-drawer-body { overflow:auto; padding:24px; line-height:1.65; font-size:14px; }
.health-drawer-body h3 { margin:24px 0 10px; font-size:16px; }
.health-drawer-body p { margin:10px 0; }
.health-repo-switch { display:flex; border:1px solid var(--line); border-radius:6px; margin:20px 0; }
.health-repo-switch button { flex:1; border:0; background:transparent; color:var(--text); padding:11px; border-radius:5px; cursor:pointer; font-weight:650; }
.health-repo-switch button[aria-pressed="true"] { background:var(--accent); color:#063b1a; }
.health-metric-big { font-size:52px; font-weight:780; line-height:1.2; margin:20px 0 8px; }
.health-detail-scores { display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:22px 0; border-block:1px solid var(--line); margin-top:20px; }
.health-detail-scores span { display:block; font-size:12px; color:var(--muted); }
.health-detail-scores strong { display:block; font-size:26px; margin-top:8px; }
.health-meta { display:grid; grid-template-columns:140px minmax(0,1fr); font-size:12px; gap:10px 14px; line-height:1.6; }
.health-meta dt { color:var(--muted); }
.health-meta dd { margin:0; overflow-wrap:anywhere; }
.health-sources { padding:0; list-style:none; }
.health-sources li { border-bottom:1px solid var(--line); padding:12px 0; overflow-wrap:anywhere; }
.health-method-metric { border-top:1px solid var(--line); margin-top:20px; }
.health-root [tabindex="-1"] { scroll-margin-top:calc(var(--header-height) + 14px); }
@media (max-width:1000px) { .health-summary-grid { grid-template-columns:1fr; } .health-risk-list { grid-template-columns:1fr; gap:0; } .health-risk-row { border-top:1px solid var(--line); } .health-dimension-head,.health-dimension-row { grid-template-columns:minmax(150px,1fr) minmax(130px,1fr) 65px 65px; gap:12px; } }
@media (max-width:1100px) { .health-evidence-grid { grid-template-columns:1fr; } }
@media (max-width:720px) { .health-compact .health-dimension-row { grid-template-columns:1fr 70px; } .health-compact .health-dimension-row > span:nth-child(4) { display:block; grid-column:1 / -1; grid-row:2; } }
@media (max-width:720px) { .health-root { gap:14px; } .health-surface { padding:18px; } .health-root h2 { font-size:26px; } .health-heading { flex-wrap:wrap; } .health-summary { grid-template-columns:1fr; gap:20px; } .health-facts { border-left:0; padding-left:0; border-top:1px solid var(--line); padding-top:20px; } .health-dimension-head { display:none; } .health-dimension-row { grid-template-columns:1fr 70px; gap:12px; } .health-dimension-row > span:nth-child(2) { grid-column:1 / -1; grid-row:2; } .health-dimension-row > span:nth-child(3) { grid-column:2; grid-row:1; text-align:right; } .health-dimension-row > span:nth-child(4) { display:none; } .health-dimension-row > span:nth-child(2)::after { content:attr(data-coverage); } .health-track { min-width:120px; } .health-drawer { width:100%; } .health-drawer-heading,.health-drawer-body { padding:20px; } .health-meta { grid-template-columns:105px minmax(0,1fr); } .health-root .button,.health-drawer .button { min-height:44px; } .health-root table { min-width:580px; } .health-footer { align-items:flex-start; } }

.health-collection { margin: 0 0 18px; padding: 14px 20px; }
.health-collection summary { cursor: pointer; font-weight: 600; line-height: 1.6; }
.health-collection summary i { margin-right: 6px; color: var(--muted); }
.health-collection[open] summary { margin-bottom: 12px; }

.health-history-selects { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.health-history-selects label { display:grid; gap:8px; min-width:0; font-size:13px; }
.health-history-selects select { width:100%; min-width:0; padding:10px; color:var(--text); background:var(--panel, var(--bg)); border:1px solid var(--line); border-radius:6px; }
.health-trend svg { display:block; width:100%; max-height:370px; }
.health-trend svg text { fill:var(--muted); font-size:12px; }
.health-trend circle:focus { outline:2px solid var(--text); }
.health-trend .button[aria-pressed="false"] { opacity:.55; }
.health-history-table { max-height:260px; overflow:auto; }
.health-action-row { display:grid; grid-template-columns:minmax(160px,1fr) 160px 120px; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); }
.health-action-row small { grid-column:1 / -1; color:var(--muted); }
.health-wide { width:min(1100px,100%); }
@media(max-width:720px) { .health-history-selects { grid-template-columns:1fr; } .health-action-row { grid-template-columns:1fr; } .health-action-row small { grid-column:1; } }

.health-workspace-form { display:grid; gap:14px; margin:20px 0 32px; padding-bottom:24px; border-bottom:1px solid var(--line); }
.health-workspace-form label,.health-workspace-detail label { display:grid; gap:6px; }
.health-workspace-form input,.health-workspace-form select,.health-workspace-form textarea,.health-workspace-detail textarea { width:100%; min-height:44px; padding:10px; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.health-workspace-form textarea,.health-workspace-detail pre { font:13px/1.5 ui-monospace,monospace; }
.health-workspace-detail pre { white-space:pre-wrap; overflow-wrap:anywhere; padding:16px; border:1px solid var(--line); border-radius:8px; max-height:460px; overflow:auto; }
.health-workspace-form .button { justify-self:start; }
.health-record-key { text-align:left; overflow-wrap:anywhere; max-width:480px; white-space:normal; }

.health-auto-score .health-big.has-score { color:var(--text); }
.health-auto-denominator { font-size:24px; color:var(--muted); font-weight:500; }
.health-auto-metric { padding:16px 0; border-bottom:1px solid var(--line); }
.health-auto-metric > summary { display:grid; grid-template-columns:minmax(0,1fr) 110px 85px; gap:14px; align-items:center; cursor:pointer; min-height:44px; }
.health-auto-metric > summary > span::before { content:'▸'; display:inline-block; width:20px; color:var(--muted); }
.health-auto-metric[open] > summary > span::before { content:'▾'; }
.health-auto-metric summary small { color:var(--muted); }
.health-auto-evidence { margin:14px 0; padding:12px; border:1px solid var(--line); border-radius:8px; min-width:0; }
.health-auto-evidence p,.health-auto-evidence a { overflow-wrap:anywhere; }
.health-auto-evidence a { display:block; margin:8px 0; }
.health-extended { border-top:1px solid var(--line); padding-top:22px; }
.health-extended > summary { cursor:pointer; font-size:16px; font-weight:650; padding:14px 0; line-height:1.6; }
.health-extended[open] { display:grid; gap:18px; }
@media(max-width:720px) { .health-auto-metric > summary { grid-template-columns:minmax(0,1fr) 82px; gap:10px; } .health-auto-metric summary small { grid-column:1/-1; padding-left:20px; } .health-auto-score .health-summary { gap:18px; } }

.health-auto-dimensions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.health-auto-dimensions > div { display:grid; gap:8px; }
.health-auto-dimensions strong { font-size:22px; }
.health-auto-dimensions small { color:var(--muted); }
.health-auto-track { height:5px; border-radius:4px; background:var(--line); }
.health-auto-track span { display:block; height:100%; background:var(--green); border-radius:4px; }
@media(max-width:720px) { .health-auto-dimensions { grid-template-columns:1fr; gap:16px; } }
