.csw-calculator.csw-rebar-weight [hidden]{display:none!important}
.csw-rebar-weight .csw-form__grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px}
.csw-rebar-weight .csw-field{min-width:0}.csw-rebar-weight .csw-utility-wide{grid-column:1/-1}
.csw-rebar-weight textarea.csw-field__input{height:auto;min-height:140px;resize:vertical;white-space:pre;font:14px monospace}
.csw-rebar-weight .csw-field__hint{font-size:13px;color:#475569;overflow-wrap:anywhere}
.csw-rebar-weight .csw-utility-error{color:#b42318;font-size:13px}.csw-rebar-weight .csw-utility-error:empty{display:none}
.csw-rebar-weight [aria-invalid="true"]{border-color:#b42318!important}
.csw-rebar-weight .csw-button{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;color:#fff!important;background:#0f766e!important;width:100%;min-height:44px}
.csw-rebar-weight .csw-button *{color:#fff!important}.csw-rebar-weight .csw-button:disabled{opacity:.65}
.csw-rebar-weight .csw-utility-table{overflow:auto;margin:20px 0;max-width:100%}.csw-rebar-weight table{border-collapse:collapse;width:100%;font-size:14px}.csw-rebar-weight th,.csw-rebar-weight td{text-align:left;padding:8px;border:1px solid #cbd5e1;overflow-wrap:anywhere}.csw-rebar-weight caption{text-align:left;font-weight:700;margin-bottom:8px}.csw-rebar-weight .csw-utility-input-value{white-space:pre-wrap}
.csw-rebar-weight .csw-utility-total{padding:20px;background:#ecfdf5;border-radius:10px}.csw-rebar-weight .csw-utility-total strong{display:block;font-size:30px;color:#065f46;overflow-wrap:anywhere}
.csw-rebar-weight .csw-utility-note,.csw-rebar-weight .csw-utility-notes{background:#f8fafc;padding:12px;border-radius:8px;font-size:14px}
.csw-rebar-weight svg{width:100%;height:auto;display:block}.csw-rebar-weight .csw-utility-diagram{margin:20px 0}.csw-rebar-weight .csw-utility-actions{display:flex;gap:12px;margin:20px 0}.csw-rebar-weight details{margin:20px 0}.csw-rebar-weight :is(input,select,textarea,button,summary):focus-visible{outline:3px solid #0f766e!important;outline-offset:3px}
@media(max-width:767px){.csw-rebar-weight .csw-form__grid{grid-template-columns:minmax(0,1fr)!important}.csw-rebar-weight .csw-utility-actions{flex-direction:column}}

/* Clear choices and short help, with details available beside every field. */
.csw-rebar-weight :is(.csw-section,.csw-choice-field){border:0;padding:0;margin:0;min-width:0}
.csw-rebar-weight .csw-setup{padding:20px;background:#f2f8f7;border:1px solid #d6e8e4;border-radius:12px}
.csw-rebar-weight .csw-setup>.csw-field+.csw-field{margin-top:22px}
.csw-rebar-weight .csw-choice-field>legend{font-size:14px;font-weight:700;color:#17345c;margin:0 0 10px;padding:0}
.csw-rebar-weight .csw-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.csw-rebar-weight .csw-choice{position:relative;display:flex;cursor:pointer;min-width:0;margin:0}
.csw-rebar-weight .csw-choice input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;padding:0;margin:0;border:0;min-height:0}
.csw-rebar-weight .csw-choice__body{display:flex;flex:1;flex-direction:column;gap:5px;justify-content:center;min-height:54px;box-sizing:border-box;padding:13px 14px;background:#fff;border:1px solid #c3d3d0;border-radius:8px;color:#34495e;transition:border-color .15s,background .15s;overflow-wrap:anywhere}
.csw-rebar-weight .csw-choice__body strong{font-size:15px;line-height:1.35;color:inherit}
.csw-rebar-weight .csw-choice__body>span{font-size:12px;line-height:1.45;color:#526579}
.csw-rebar-weight .csw-choice input:checked+.csw-choice__body{background:#e2f3ef;border-color:#0f766e;box-shadow:inset 0 0 0 1px #0f766e;color:#075e56}
.csw-rebar-weight .csw-choice input:checked+.csw-choice__body strong:before{content:'✓';display:inline-block;margin-right:7px;font-weight:800}
.csw-rebar-weight .csw-choice input:focus-visible+.csw-choice__body{outline:3px solid #0f766e;outline-offset:3px}
.csw-rebar-weight .csw-choice:hover .csw-choice__body{border-color:#0f766e}
.csw-rebar-weight .csw-choices--segments .csw-choice__body>span{display:none}
.csw-rebar-weight .csw-choices--segments .csw-choice__body{text-align:center;align-items:center;min-height:48px;padding:10px 8px}
.csw-rebar-weight .csw-section{border-top:1px solid #e2e8ed;margin-top:28px;padding-top:20px}
.csw-rebar-weight .csw-section>legend{float:left;width:100%;font-size:17px;line-height:1.4;font-weight:700;color:#17345c;padding:0;margin:0 0 5px}
.csw-rebar-weight .csw-section__note{clear:both;font-size:13px;line-height:1.5;color:#5e6d82;margin:0 0 18px;overflow-wrap:anywhere}
.csw-rebar-weight .csw-field__hint{line-height:1.5;margin:7px 0 0}
.csw-rebar-weight .csw-required-note{margin:24px 0 14px}
.csw-rebar-weight .csw-result{text-align:left;overflow-wrap:anywhere}
.csw-rebar-weight .csw-result :is(p,li,td,strong){overflow-wrap:anywhere}
.csw-rebar-weight .csw-method{font-size:14px;line-height:1.6;color:#475569;overflow-wrap:anywhere}
@media(max-width:767px){.csw-rebar-weight .csw-setup{padding:14px}.csw-rebar-weight .csw-choices--cards{grid-template-columns:minmax(0,1fr)}.csw-rebar-weight .csw-choice__body strong{font-size:14px}.csw-rebar-weight .csw-section{margin-top:24px}}
@media(prefers-reduced-motion:reduce){.csw-rebar-weight .csw-choice__body{transition:none}}
@media(max-width:480px){.csw-rebar-weight .csw-choices--segments{grid-template-columns:minmax(0,1fr)}}

/* Input sketch is deliberately symbolic; the server result carries exact counts. */
.csw-calculator.csw-rebar-weight{max-width:1040px}
.csw-rebar-weight .csw-setup{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:14px 24px}
.csw-rebar-weight .csw-setup>.csw-field+.csw-field{margin-top:0}
.csw-rebar-weight .csw-setup .csw-field__hint{display:none}
.csw-rebar-weight .csw-section{margin-top:22px;padding-top:16px}
.csw-rebar-weight .csw-section>legend{margin-bottom:16px}
.csw-rebar-weight .csw-section>.csw-form__grid{clear:both}
.csw-rebar-weight .csw-mesh-layout{clear:both;display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
.csw-rebar-weight .csw-input-sketch{margin:0;padding:14px;background:#f3f8f7;border:1px solid #d6e8e4;border-radius:10px;min-width:0;align-self:start}
.csw-rebar-weight .csw-input-sketch figcaption{font-size:14px;font-weight:700;margin:0 0 8px}
.csw-rebar-weight .csw-input-sketch svg{max-width:480px;margin:auto}
.csw-rebar-weight .csw-sketch-layers,.csw-rebar-weight .csw-sketch-note{font-size:12px;line-height:1.5;margin:8px 0 0;overflow-wrap:anywhere}
.csw-rebar-weight [data-preview-mark].is-active{color:#a34800}
.csw-rebar-weight svg text[data-preview-mark].is-active,.csw-rebar-weight svg .is-active text{fill:#a34800;stroke:none;font-weight:700}
.csw-rebar-weight svg path[data-preview-mark].is-active,.csw-rebar-weight svg .is-active path{stroke:#a34800;stroke-width:2.5;fill:none}
.csw-rebar-weight .csw-sketch-layers.is-active{background:#fff2da;border-radius:4px}
.csw-rebar-weight .csw-quick-result{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.csw-rebar-weight .csw-quick-result__item{padding:18px 14px;background:#f0f5f9;border-radius:10px;min-width:0}
.csw-rebar-weight .csw-quick-result span{font-size:13px;line-height:1.4;display:block}
.csw-rebar-weight .csw-quick-result strong{display:block;font-size:23px;line-height:1.4;margin-top:8px;overflow-wrap:anywhere}
.csw-rebar-weight .csw-quick-result .csw-utility-total{padding:18px 14px;min-width:0}
.csw-rebar-weight .csw-quick-note{font-size:12px;line-height:1.5;color:#526579;margin:10px 0}
.csw-rebar-weight .csw-wire-total{font-size:14px;padding:12px;background:#eef6fb;border-radius:8px}
.csw-rebar-weight .csw-result-details>summary{cursor:pointer;color:#0f766e;font-size:15px;padding:10px 0;font-weight:600}
@media(min-width:1000px){.csw-rebar-weight .csw-mesh-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.csw-rebar-weight .csw-input-sketch{grid-column:2;grid-row:1}.csw-rebar-weight .csw-mesh-layout>.csw-form__grid{grid-column:1;grid-row:1;align-content:start}}
@media(max-width:999px){.csw-rebar-weight .csw-setup{grid-template-columns:minmax(0,1fr)}}
@media(max-width:767px){.csw-rebar-weight .csw-setup{grid-template-columns:minmax(0,1fr)}.csw-rebar-weight .csw-quick-result{grid-template-columns:minmax(0,1fr)}.csw-rebar-weight .csw-quick-result__item,.csw-rebar-weight .csw-quick-result .csw-utility-total{padding:14px}.csw-rebar-weight .csw-quick-result strong{font-size:24px}.csw-rebar-weight .csw-input-sketch{padding:10px}}
@media(max-width:480px){.csw-calculator.csw-rebar-weight{padding:16px}.csw-rebar-weight .csw-input-sketch svg text{font-size:24px}.csw-rebar-weight .csw-input-sketch svg text[data-preview-mark="slab_width_m"]{font-size:22px}}

/* Основные свойства материала остаются видимыми; подробности открываются по запросу. */
.csw-rebar-weight .csw-sketch-toggle{margin:0;min-width:0;font-size:14px}
.csw-rebar-weight .csw-sketch-toggle>summary{cursor:pointer;color:#0f766e;padding:8px 0;line-height:1.5}
.csw-rebar-weight .csw-section--material .csw-form__grid{align-items:start}
.csw-rebar-weight .csw-sketch-toggle{grid-column:1/-1}
.csw-rebar-weight .csw-sketch-toggle[open]{margin-bottom:8px}
.csw-rebar-weight .csw-mesh-layout{grid-template-columns:minmax(0,1fr)}
.csw-rebar-weight .csw-mesh-layout>.csw-form__grid{grid-column:1;grid-row:auto}
.csw-rebar-weight .csw-choices--cards .csw-choice__body>span{display:none}
.csw-rebar-weight .csw-help-entry{border-top:1px solid #e2e8ed;padding:12px 0}
.csw-rebar-weight .csw-help-entry p{margin:6px 0;font-size:13px}
@media(min-width:1000px){.csw-rebar-weight .csw-mesh-layout:has(>.csw-sketch-toggle[open]){grid-template-columns:repeat(2,minmax(0,1fr))}.csw-rebar-weight .csw-mesh-layout:has(>.csw-sketch-toggle[open])>.csw-sketch-toggle{grid-column:2;grid-row:1}.csw-rebar-weight .csw-mesh-layout:has(>.csw-sketch-toggle[open])>.csw-form__grid{grid-column:1;grid-row:1}}

/* Компактная панель: подпись слева, связанные варианты в общей полосе. */
.csw-rebar-weight .csw-setup{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px;background:#f8fafb;border-color:#e2e8ed;border-radius:10px}
.csw-rebar-weight .csw-setup .csw-choice-field>legend{float:left;width:110px;margin:0;padding:15px 8px 0 0;box-sizing:border-box;font-size:13px;line-height:1.4}
.csw-rebar-weight .csw-setup .csw-choices{margin-left:110px;gap:4px;padding:4px;background:#edf2f4;border-radius:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
.csw-rebar-weight .csw-setup .csw-choice__body{min-height:44px;padding:9px 10px;text-align:center;align-items:center;border:1px solid transparent;border-radius:6px;background:transparent;color:#475569;box-shadow:none}
.csw-rebar-weight .csw-setup .csw-choice__body strong{font-size:14px;font-weight:500;line-height:1.4}
.csw-rebar-weight .csw-setup .csw-choice input:checked+.csw-choice__body{background:#fff;border-color:#aacfc9;color:#075e56;box-shadow:0 1px 3px #17345c14}
.csw-rebar-weight .csw-setup .csw-choice:hover .csw-choice__body{border-color:#0f766e}
@media(min-width:1000px){.csw-rebar-weight .csw-setup{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}.csw-rebar-weight .csw-setup .csw-choice-field>legend{float:none;width:auto;padding:0;margin-bottom:6px}.csw-rebar-weight .csw-setup .csw-choices{margin-left:0}}
@media(max-width:480px){.csw-rebar-weight .csw-setup{padding:10px;gap:12px}.csw-rebar-weight .csw-setup .csw-choice-field>legend{float:none;width:auto;padding:0;margin-bottom:6px}.csw-rebar-weight .csw-setup .csw-choices{margin-left:0}.csw-rebar-weight .csw-setup .csw-choices--segments{grid-template-columns:minmax(0,1fr)}.csw-rebar-weight .csw-setup .csw-choice__body{padding:9px 6px}.csw-rebar-weight .csw-setup .csw-choice__body strong{font-size:13px;white-space:nowrap}.csw-rebar-weight .csw-setup .csw-choice input:checked+.csw-choice__body strong:before{margin-right:5px}}
