/* Metal weight workbench. Uses the shared --ink/--muted/--line/--paper/--white/--blue tokens so dark mode follows the site. */
.mw-page .sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.mw-page{max-width:1320px}
.mw-heading h1{font-size:clamp(28px,4vw,42px);line-height:1.25;margin:8px 0 12px}
.mw-family{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.mw-family a{font-size:14px;line-height:1.4;border:1px solid var(--line);background:var(--white);border-radius:999px;padding:8px 14px;color:var(--ink);text-decoration:none}
.mw-family a[aria-current=page]{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.mw-workbench{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:0;border:1px solid var(--line);border-radius:18px;background:var(--white);overflow:hidden;box-shadow:0 14px 42px rgba(23,42,71,.06)}
.mw-form{padding:22px 24px;border-right:1px solid var(--line);min-width:0}
.mw-step{border:0;margin:0 0 18px;padding:0;min-width:0}
.mw-step legend{display:flex;align-items:center;gap:9px;font-weight:700;font-size:16px;margin-bottom:11px;color:var(--ink)}
.mw-step legend span{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--blue-soft);color:var(--blue);font-size:13px}
.mw-row,.mw-grid,.mw-dims,.mw-helper{display:grid;gap:12px}
.mw-row{grid-template-columns:minmax(0,1fr) 150px}
.mw-grid,.mw-dims,.mw-helper{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.mw-helper{margin-bottom:12px;padding:12px;border-radius:12px;background:var(--blue-soft)}
.mw-field{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--muted);min-width:0}
.mw-field>span:first-child{line-height:1.35}
.mw-field input,.mw-field select{width:100%;min-height:44px;border:1px solid var(--line);border-radius:10px;padding:8px 11px;font:inherit;font-size:16px;color:var(--ink);background:var(--white);box-sizing:border-box;min-width:0}
.mw-field input:focus,.mw-field select:focus{outline:2px solid var(--blue);outline-offset:1px;border-color:var(--blue)}
.mw-locked input{background:var(--paper);color:var(--muted)}
.mw-join{display:flex;gap:6px;min-width:0}.mw-join input{flex:1 1 auto}.mw-join select{flex:0 0 auto;width:auto;min-width:66px}
.mw-shapes{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.mw-shape{position:relative;cursor:pointer}
.mw-shape input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.mw-shape-tile{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;padding:9px 6px 8px;border:1px solid var(--line);border-radius:12px;font-size:13px;line-height:1.3;color:var(--ink);background:var(--white);min-height:86px;box-sizing:border-box}
.mw-shape-tile svg{width:40px;height:40px;fill:var(--muted);stroke:var(--muted);stroke-width:1.2;stroke-linejoin:round}
.mw-shape-tile svg .hole{fill:var(--white)}
.mw-shape input:checked+.mw-shape-tile{border-color:var(--blue);background:var(--blue-soft);box-shadow:inset 0 0 0 1px var(--blue)}
.mw-shape input:checked+.mw-shape-tile svg{fill:var(--blue);stroke:var(--blue)}
.mw-shape input:checked+.mw-shape-tile svg .hole{fill:var(--blue-soft)}
.mw-shape input:focus-visible+.mw-shape-tile{outline:2px solid var(--blue);outline-offset:2px}
.mw-units{display:inline-flex;flex-wrap:wrap;gap:4px;padding:4px;border:1px solid var(--line);border-radius:11px;margin-bottom:12px;background:var(--paper)}
.mw-units label{position:relative}.mw-units input{position:absolute;opacity:0}
.mw-units span{display:block;padding:7px 13px;border-radius:8px;font-size:14px;cursor:pointer;color:var(--muted)}
.mw-units input:checked+span{background:var(--white);color:var(--ink);font-weight:600;box-shadow:0 1px 3px rgba(23,42,71,.12)}
.mw-units input:focus-visible+span{outline:2px solid var(--blue)}
.mw-check{display:flex;gap:8px;align-items:flex-start;margin-top:12px;font-size:14px;color:var(--muted)}.mw-check input{width:18px;height:18px;margin-top:2px}
.mw-output{padding:22px 24px;background:var(--paper);min-width:0}
.mw-error{background:#fdecec;color:#a42323;border:1px solid #f2c2c2;border-radius:10px;padding:10px 12px;margin:0 0 12px;font-size:15px}
.mw-price{grid-column:1/-1}.mw-price input{max-width:220px}
.mw-result-head{display:grid;grid-template-columns:250px minmax(0,1fr);gap:16px;align-items:center}
.mw-diagram{background:var(--white);border:1px solid var(--line);border-radius:14px;aspect-ratio:6/5;display:grid;place-items:center}
.mw-diagram svg{width:100%;height:100%}
.mw-solid{fill:#8aa1bd;stroke:#4d6684;stroke-width:1.2}.mw-hole{fill:var(--white);stroke:#4d6684;stroke-width:1.2}.mw-rib{stroke:#4d6684;stroke-width:2;fill:none}
.mw-dimline{stroke:var(--blue);stroke-width:1.2;fill:none}.mw-dim{font-size:13px;fill:var(--ink);font-family:inherit}.mw-dim-soft{fill:var(--muted)}
.mw-overline{margin:0;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.mw-total{margin:2px 0;font-size:16px;color:var(--ink)}.mw-total strong{font-size:clamp(34px,4.6vw,48px);line-height:1.1;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.mw-total-alt{margin:0;color:var(--muted);font-variant-numeric:tabular-nums}
.mw-cost{margin:8px 0 0;font-weight:700;color:#14734f;font-size:18px}
.mw-metrics{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px;margin:18px 0 12px}
.mw-metrics div{background:var(--white);border:1px solid var(--line);border-radius:11px;padding:10px 12px;min-width:0}
.mw-metrics dt{font-size:13px;color:var(--muted);margin:0 0 3px}.mw-metrics dd{margin:0;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.mw-formula{white-space:pre-line;font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 14px;overflow-wrap:anywhere}
.mw-actions{display:flex;flex-wrap:wrap;gap:8px}
.mw-actions button,.mw-list-head button{min-height:42px;border:1px solid var(--line);border-radius:10px;padding:8px 14px;font:inherit;font-size:15px;background:var(--white);color:var(--ink);cursor:pointer}
.mw-actions button.primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.mw-actions button:disabled{opacity:.5;cursor:not-allowed}
.mw-toast{margin:10px 0 0;font-size:14px;color:#14734f}
.mw-lengths{margin-top:16px}.mw-lengths summary{cursor:pointer;font-weight:600;color:var(--ink);font-size:15px;padding:4px 0}
.mw-table-wrap{position:relative;overflow-x:auto;margin:10px 0;border:1px solid var(--line);border-radius:12px;background:var(--white)}
.mw-table{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.mw-table caption{text-align:left;font-weight:600;padding:10px 12px 4px;color:var(--ink)}
.mw-table th,.mw-table td{padding:8px 12px;border-top:1px solid var(--line);text-align:left;white-space:nowrap;color:var(--ink)}
.mw-table thead th{font-size:13px;color:var(--muted);font-weight:600;background:var(--paper)}
.mw-table tbody th{font-weight:600}
.mw-table tfoot th,.mw-table tfoot td{font-weight:700;background:var(--paper)}
.mw-table-note{font-size:13px;color:var(--muted);line-height:1.6}
.mw-list,.mw-mesh{margin-top:22px;border:1px solid var(--line);border-radius:16px;background:var(--white);padding:18px 20px}
.mw-list-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.mw-list-head h2,.mw-mesh h2{margin:0;font-size:20px}.mw-list-head div{display:flex;gap:8px;flex-wrap:wrap}
.mw-remove{border:0;background:none;font-size:20px;line-height:1;color:var(--muted);cursor:pointer;min-width:36px;min-height:36px}
.mw-mesh p{color:var(--muted);margin:6px 0 14px}
.mw-chart{border:1px solid var(--line);border-radius:12px;padding:6px 12px;margin:10px 0;background:var(--white)}.mw-chart summary{cursor:pointer;font-weight:600;padding:6px 0}
.mw-guide h2{margin-top:30px}
html[data-xunl-theme="dark"] .mw-solid{fill:#5b7393;stroke:#a9bdd8}html[data-xunl-theme="dark"] .mw-hole,html[data-xunl-theme="dark"] .mw-rib{stroke:#a9bdd8}
html[data-xunl-theme="dark"] .mw-error{background:#3a1a1d;color:#ffb4b4;border-color:#6d2c31}
html[data-xunl-theme="dark"] .mw-cost,html[data-xunl-theme="dark"] .mw-toast{color:#6fd6a6}
@media(max-width:980px){.mw-workbench{grid-template-columns:1fr}.mw-form{border-right:0;border-bottom:1px solid var(--line)}}
@media(max-width:560px){.mw-form,.mw-output{padding:16px}.mw-row{grid-template-columns:1fr}.mw-result-head{grid-template-columns:1fr}.mw-diagram{max-width:300px}.mw-shapes{grid-template-columns:repeat(3,minmax(0,1fr))}.mw-grid,.mw-dims,.mw-helper{grid-template-columns:1fr}.mw-list,.mw-mesh{padding:14px}}
@media print{.mw-family,.mw-form,.mw-actions,.mw-remove,.mw-list-head div{display:none!important}.mw-workbench{display:block;border:0;box-shadow:none}}
.mw-page .guide-layout>*{min-width:0}
