.ecg-chart{
margin:28px 0;
--chgreen:  var(--green,  #00ad02);
--chneutral:#363B40;
--chrival:  #A7AEAB;
--chink:    var(--ink,    #161A1D);
--chmuted:  var(--muted,  #6B7280);
--chgrid:   var(--hair,   #E5E7EB);
}
.ecg-chart svg{ width:100%; height:auto; display:block; }
.ecg-chart svg text{ font-family:inherit; }
.ecg-chart-title{ font-weight:800; font-size:19px; color:var(--chink); margin:0 0 4px; }
.ecg-chart figcaption{ color:var(--chmuted); font-size:12.5px; margin-top:6px; }
.ecg-chart .chgridline{ stroke:var(--chgrid); stroke-width:1; }
.ecg-chart .chlab{ fill:var(--chmuted); font-size:13px; }
.ecg-chart .chval{ fill:var(--chink); font-size:15px; font-weight:700; }
.ecg-chart .chsave{ fill:var(--chgreen); font-size:14px; font-weight:700; }
.ecg-chart .chbar-ev{ fill:var(--chgreen); }
.ecg-chart .chbar-pt{ fill:var(--chneutral); }
.ecg-chart .chbar-rv{ fill:var(--chrival); }
.ecg-chart .chline{ stroke-width:2; fill:none; }
.ecg-chart .chline-ev{ stroke:var(--chgreen); }
.ecg-chart .chline-pt{ stroke:var(--chneutral); }
.ecg-chart .chdot-ev{ fill:var(--chgreen); }
.ecg-chart .chdot-pt{ fill:var(--chneutral); } .ecgch-tools{ display:flex; justify-content:flex-end; margin-top:4px; }
.ecgch-edit, .ecgch-reset{
font:600 12.5px/1 inherit; font-family:inherit; color:var(--chgreen);
background:none; border:1px solid var(--chgreen); border-radius:6px;
padding:6px 12px; cursor:pointer;
}
.ecgch-edit:hover, .ecgch-reset:hover{ background:var(--chgreen); color:#fff; }
.ecgch-panel{
display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
gap:10px 14px; align-items:end; margin-top:10px; padding:14px;
border:1px solid var(--chgrid); border-radius:8px;
}
.ecgch-field{ display:flex; flex-direction:column; gap:4px; }
.ecgch-field span{ font-size:11.5px; color:var(--chmuted); }
.ecgch-field input{
font:inherit; font-size:14px; color:var(--chink); background:transparent;
border:1px solid var(--chgrid); border-radius:6px; padding:6px 8px; width:100%;
}
.ecgch-field input:focus{ outline:2px solid var(--chgreen); outline-offset:1px; }
.ecgch-reset{ align-self:end; }
.ecgch-panel[hidden]{ display:none; } .ecg-chart .chname{ fill:var(--chink); font-size:14px; font-weight:700; }
.ecg-chart svg.is-compact .chlab{ font-size:12.5px; } .ecg-chart-results{
display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center;
margin-top:10px; font-size:14px; color:var(--chink);
}
.ecg-chart-results .chres{ display:inline-flex; align-items:center; gap:7px; }
.ecg-chart-results .chres i{ width:16px; height:3px; border-radius:2px; background:var(--chneutral); flex:none; }
.ecg-chart-results .chres-ev i{ background:var(--chgreen); }
.ecg-chart-results .chres b{ font-weight:700; }
.ecg-chart-results .chres span{ color:var(--chmuted); }
.ecg-chart-results .chres-save{ color:var(--chgreen); font-weight:700; }
.ecg-chart-results[hidden]{ display:none; } .ecg-chart-body{ position:relative; }
.ecg-chart svg.has-hover{ cursor:crosshair; touch-action:pan-y; outline:none; }
.ecg-chart svg.has-hover:focus-visible{ outline:2px solid var(--chgreen); outline-offset:2px; border-radius:4px; }
.ecg-chart .chguide{ stroke:var(--chmuted); stroke-width:1; stroke-dasharray:3 3; }
.ecg-chart .chhover circle{ stroke:var(--paper, #fff); stroke-width:2; }
.ecgch-tip{
position:absolute; top:0; left:0; z-index:2; pointer-events:none;
display:flex; flex-direction:column; gap:3px; min-width:170px;
padding:8px 11px; border-radius:8px; font-size:13px; line-height:1.35; color:var(--chink);
background:var(--paper, #fff); border:1px solid var(--chgrid);
box-shadow:0 4px 14px rgba(0,0,0,.14);
}
.ecgch-tip b{ font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--chmuted); }
.ecgch-tip span{ display:flex; align-items:center; gap:7px; white-space:nowrap; }
.ecgch-tip span i{ width:14px; height:3px; border-radius:2px; background:var(--chneutral); flex:none; }
.ecgch-tip .ev i{ background:var(--chgreen); }
.ecgch-tip span em{ font-style:normal; font-weight:700; margin-left:auto; padding-left:12px; }
.ecgch-tip .save{ color:var(--chgreen); font-weight:700; margin-top:2px; }
.ecgch-tip .save.dearer{ color:var(--chink); }
.ecgch-tip[hidden]{ display:none; }