.tap-tool{display:grid;grid-template-columns:minmax(0,1fr) 360px;grid-template-areas:"result form";align-items:start;gap:16px;padding-top:24px;padding-bottom:40px}
.tap-tool [hidden]{display:none}
.tap-form{grid-area:form}
.tap-result{grid-area:result}
.tap-panel{min-width:0;padding:17px;border:1px solid #dce4ef;border-radius:14px;background:#fff}
.tap-panel h2,.tap-panel h3{margin:0;color:#1e3553}
.tap-panel h2{font-size:17px}
.tap-panel h3{font-size:15px}
.tap-panel h3 span{color:#536780;font-size:12px;font-weight:500}
.tap-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tap-spec{margin:10px 0;color:#17489d;font-size:18px;font-weight:750}
.tap-button{min-height:34px;padding:6px 9px;border:1px solid #cad6e6;border-radius:7px;background:#fff;color:#263b58;cursor:pointer;font:inherit;font-size:12px}
.tap-button:hover{background:#eaf2ff}
.tap-tool :is(button,input,select,summary,a,textarea):focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.tap-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.tap-wide{grid-column:1/-1}
.tap-field{display:grid;min-width:0;gap:4px;color:#435675;font-size:12px;font-weight:650}
.tap-field input,.tap-field select,#tap-copy-status textarea{box-sizing:border-box;width:100%;min-width:0;min-height:38px;padding:6px 8px;border:1px solid #cbd6e5;border-radius:7px;background:#fff;color:#142844;font:inherit;font-size:14px;font-weight:400}
.tap-field input[aria-invalid=true]{border-color:#a83530}
.tap-depth-settings{min-width:0;margin:14px 0 0;padding:9px;border:1px solid #dce4ef;border-radius:8px}
.tap-depth-settings legend{padding:0 5px;color:#1e3553;font-size:13px;font-weight:700}
.tap-depth-settings .tap-fields{margin-top:0}
.tap-diagrams{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:8px}
.tap-card{min-width:0;padding:10px;border:1px solid #dce4ef;border-radius:8px;background:#f8faff}
.tap-value{margin:5px 0;color:#17489d;font-size:clamp(16px,2.4vw,22px);font-weight:750;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.tap-cut{display:flex;justify-content:space-between}
.tap-card>.tap-cut,.tap-stepped{height:54px;margin-top:8px;border-block:1px solid #6d84a3;background:#fff}
.tap-cut span{width:calc((100% - var(--hole)) / 2);height:100%;background:repeating-linear-gradient(135deg,#c8d8f1 0 6px,#dbe6f6 6px 10px)}
.tap-cut span:first-child{border-right:1px solid #6d84a3}
.tap-cut span:last-child{border-left:1px solid #6d84a3}
.tap-stepped .tap-upper-cut{height:50%;--hole:var(--counterbore-gap)}
.tap-stepped .tap-through-cut{height:50%}
.tap-drill-cut{--hole:var(--drill-gap)}
.tap-through-cut{--hole:var(--through-gap)}
.tap-stepped .tap-through-cut span{border-top:1px solid #6d84a3}
.tap-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:8px 0 0;font-variant-numeric:tabular-nums}
.tap-metrics div{min-width:0;padding:5px;border:1px solid #dce4ef;border-radius:6px;background:#fff;overflow-wrap:anywhere}
.tap-metrics dt{color:#435675;font-size:11px}
.tap-metrics dd{margin:2px 0 0;color:#142844;font-size:13px;font-weight:700}
.tap-fits [data-current]{border-color:#8cb4f5;background:#eaf2ff}
.tap-note,.tap-alert,.tap-sources{margin:8px 0 0;color:#495d78;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.tap-alert,#tap-depth-status[data-alert]{padding:7px 9px;border:1px solid #f0c6c7;border-radius:7px;background:#fff1ee;color:#922c24}
.tap-note:empty{display:none}
.tap-head-details,.tap-sources{margin-top:12px;padding-top:9px;border-top:1px solid #dce4ef}
.tap-sources summary{cursor:pointer;color:#1e3553;font-weight:650}
.tap-sources ul{margin:6px 0 0;padding-left:18px}
.tap-sources li+li{margin-top:4px}
.tap-sources a{color:#174fb0}
#tap-copy-status textarea{display:block;margin-top:5px;min-height:110px}
@media(max-width:900px){.tap-tool{grid-template-columns:minmax(0,1fr);grid-template-areas:"form" "result"}}
@media(max-width:420px){.tap-panel{padding:11px}}
