/* Scoped to this category; the completed construction tools are unchanged. */
.math-layout{min-width:0;color:var(--fg)}
.math-layout .utility-section{min-width:0;margin:0 0 28px;padding:0}
.math-layout .utility-section>h2{font-size:1.05rem;margin:0 0 18px;line-height:1.4}
.math-layout .utility-answer{padding:24px;background:var(--soft);margin-bottom:0}
.math-layout .utility-answer .result{margin:0 0 16px;background:transparent;border:0;padding:0;box-shadow:none}
.math-layout .result-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0 0}
.math-layout [hidden]{display:none!important}
.math-layout input,.math-layout select,.math-layout textarea{max-width:100%}
.math-layout .out{min-width:0;overflow-wrap:anywhere}
.math-layout .table-wrap{max-width:100%;overflow:auto}
.math-layout .stats{font-variant-numeric:tabular-nums}
.math-layout button:focus-visible,.math-layout a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:640px){.math-layout .utility-answer{padding:18px} .math-layout .btn{min-height:44px} .math-layout .grid{grid-template-columns:1fr}}

#tool:has(.math-layout){background:var(--card);color:var(--fg);padding:28px;border:1px solid var(--border);box-shadow:none}
.math-layout{display:grid;grid-template-columns:minmax(240px,.75fr) minmax(0,1.6fr);gap:32px;align-items:start}
.math-layout .utility-answer{padding:24px}
.math-layout .utility-answer .result-actions{margin:0 0 18px}
.math-layout .math-examples{gap:8px}
.math-layout td:not(:first-child),.math-layout th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.math-layout .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:800px){#tool:has(.math-layout){padding:20px}.math-layout{grid-template-columns:1fr;gap:12px}.math-layout .utility-answer{padding:18px}.math-layout .big-num{font-size:2rem}}

.math-layout .practical-panel{margin:20px 0 0;border:1px solid var(--border);border-radius:6px;background:var(--card);min-width:0}
.math-layout .practical-panel>summary{padding:13px 16px;font-size:.9rem;font-weight:600;cursor:pointer}
.math-layout .practical-body{padding:4px 16px 18px;min-width:0}
.math-layout .practical-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.math-layout .practical-field{display:block;font-size:.85rem;font-weight:600;margin:10px 0}
.math-layout .practical-field input,.math-layout .practical-field select,.math-layout .practical-field textarea{display:block;margin-top:5px;width:100%;font-weight:400}
.math-layout .practical-result{margin-top:14px;overflow-wrap:anywhere}
.math-layout .practical-number{font-size:2rem;font-weight:600;line-height:1.25}
.math-layout .practical-number span{font-size:.88rem;font-weight:400;display:block;margin-top:6px}
.math-layout .practical-body .btn{margin:8px 7px 0 0}
.math-layout .practical-body td{font-variant-numeric:tabular-nums}
.math-layout .practical-panel table{font-size:.88rem}
.math-layout .practical-result .table-wrap{overflow-x:auto}
@media(max-width:700px){.math-layout .practical-fields{grid-template-columns:1fr}.math-layout .practical-number{font-size:1.6rem}.math-layout .practical-body{padding:4px 12px 16px}}

#tool:has(.math-layout){border:0;padding:32px}
.math-layout .utility-answer{background:var(--soft);padding:28px}
.math-layout .utility-section>h2{font-size:1.05rem}
.math-layout.utility-lcm-calculator .utility-answer .result{font-family:Georgia,serif}
.math-layout.utility-lcm-calculator .utility-answer .stat .val{font-size:2rem}
.math-layout.utility-standard-deviation-calculator{grid-template-columns:minmax(280px,1fr) minmax(0,1.6fr)}
.math-layout .practical-panel .table-wrap{max-width:100%}
@media(max-width:800px){#tool:has(.math-layout){padding:22px}.math-layout.utility-standard-deviation-calculator{grid-template-columns:1fr}.math-layout .utility-answer{padding:20px}}
