/* HT+ Builder 2.0 — Build Health panel (Phase 2) */
#htb-adv2,#htb-adv{display:none!important} /* legacy analysis panels replaced by #htb-adv3 */

#htb-adv3{width:100%;margin:22px 0 0}
.hsc-wrap{border:1px solid #222a38;border-radius:18px;background:#0f1420;color:#e7ecf5;padding:18px 20px}
.hsc-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.hsc-head h3{margin:0;font-size:17px;color:var(--v3-acc,#f5b301)}
.hsc-est{color:#93a0b8;font-size:11.5px}
.hsc-empty{color:#93a0b8;text-align:center;padding:26px 12px;font-size:13px}

.hsc-rings{display:flex;align-items:center;gap:22px;margin:12px 0 4px;flex-wrap:wrap}
.hsc-ring{position:relative;width:66px;text-align:center}
.hsc-ring.big{width:130px}
.hsc-ring svg{width:100%;height:auto;transform:rotate(-90deg)}
.hsc-ring .tr{fill:none;stroke:#1d2534}
.hsc-ring .pr{fill:none;stroke-linecap:round;transition:stroke-dashoffset 1s cubic-bezier(.22,.8,.3,1)}
.hsc-rv{position:absolute;top:0;left:0;right:0;bottom:18px;display:flex;align-items:center;justify-content:center;gap:1px}
.hsc-ring .hsc-rv b{font-size:14px}
.hsc-ring.big .hsc-rv b{font-size:30px}
.hsc-ring.big .hsc-rv span{font-size:11px;color:#93a0b8;margin-top:10px}
.hsc-rl{font-size:10.5px;color:#93a0b8;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hsc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(66px,66px));gap:12px;flex:1}

.hsc-whys{margin:10px 0 2px;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px 14px}
.hsc-why summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-size:12.5px;font-weight:700;padding:6px 4px;border-radius:8px;color:#c6d0e2}
.hsc-why summary::-webkit-details-marker{display:none}
.hsc-why summary:hover{background:#141b29}
.hsc-why summary i{width:8px;height:8px;border-radius:50%;flex:none}
.hsc-ar{margin-inline-start:auto;color:#3a4356;font-size:10px;transition:transform .2s}
.hsc-why[open] .hsc-ar{transform:rotate(180deg)}
.hsc-why ul{margin:2px 0 8px;padding-inline-start:22px;color:#93a0b8;font-size:12px;line-height:1.55}

.hsc-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-top:1px solid #1a2130;font-size:12.5px;flex-wrap:wrap}
.hsc-rowl{color:#93a0b8;min-width:110px;font-weight:700}
.hsc-bar{flex:1;min-width:120px;height:8px;background:#1d2534;border-radius:5px;overflow:hidden}
.hsc-bar i{display:block;height:100%;border-radius:5px;transition:width .5s ease}
.hsc-pw .ok{color:var(--v3-ok,#34d399)}
.hsc-pw .bad{color:var(--v3-bad,#f87171)}

.hsc-fps{border-top:1px solid #1a2130;padding-top:10px;margin-top:4px}
.hsc-fps-h{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#93a0b8;font-size:12px;margin-bottom:8px}
.hsc-res button{background:transparent;border:1px solid #2a2f3e;color:#93a0b8;border-radius:8px;padding:3px 10px;margin-inline-start:5px;font-size:11.5px;cursor:pointer}
.hsc-res button.on{background:var(--v3-acc,#f5b301);border-color:var(--v3-acc,#f5b301);color:#1a1006;font-weight:800}
.hsc-fps-g{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.hsc-fps-i{display:flex;justify-content:space-between;align-items:center;background:#141b29;border:1px solid #1d2534;border-radius:10px;padding:8px 12px;font-size:12.5px}
.hsc-fps-i b{font-size:14px;color:var(--v3-acc,#f5b301)}

.hsc-sec{margin:14px 0 8px;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#93a0b8}
.hsc-warn{border:1px solid rgba(248,113,113,.35);background:rgba(248,113,113,.06);border-radius:12px;padding:10px 14px;margin-bottom:8px;font-size:13px}
.hsc-warn-t{font-weight:600}
.hsc-alts summary{cursor:pointer;color:var(--v3-info,#60a5fa);font-size:12px;margin-top:6px;list-style:none}
.hsc-alts summary::-webkit-details-marker{display:none}
.hsc-alt{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;text-align:start;background:#141b29;border:1px solid #1d2534;color:#e7ecf5;border-radius:10px;padding:8px 12px;margin-top:6px;font-size:12.5px;cursor:pointer}
.hsc-alt:hover{border-color:var(--v3-acc,#f5b301)}
.hsc-alt b{color:var(--v3-acc,#f5b301);white-space:nowrap}
.hsc-alt.inline{display:inline-flex;width:auto;padding:4px 12px;margin:0 0 0 8px;font-weight:700}
.hsc-sug{border:1px solid rgba(245,179,1,.3);background:rgba(245,179,1,.05);border-radius:12px;padding:10px 14px;margin-bottom:8px;font-size:13px;line-height:1.5}

body.ht-light .hsc-wrap{background:#fff;color:#1c2130;border-color:#e3e7ef}
body.ht-light .hsc-ring .tr{stroke:#edf0f6}
body.ht-light .hsc-why summary{color:#3c4356}
body.ht-light .hsc-why summary:hover,body.ht-light .hsc-fps-i,body.ht-light .hsc-alt{background:#f4f6fa;border-color:#e3e7ef;color:#1c2130}
body.ht-light .hsc-row{border-color:#edf0f6}
body.ht-light .hsc-bar{background:#edf0f6}
body.ht-light .hsc-fps,body.ht-light .hsc-whys{border-color:#edf0f6}

@media (max-width:700px){
  .hsc-wrap{padding:14px}
  .hsc-rings{gap:14px;justify-content:center}
  .hsc-grid{grid-template-columns:repeat(auto-fit,minmax(60px,60px));gap:9px;justify-content:center}
  .hsc-whys{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  .hsc-ring .pr,.hsc-bar i,.hsc-ar{transition:none}
}
