/* Hands-on models added in handson-164: place-value blocks, coordinate plane, area rectangle.
   Builds on .hands-on, .ho-readout, .ho-value and .ho-range in style.css. */

/* Place-value blocks */
.ho-blk-cols{display:grid;gap:10px;margin:8px 0 10px}
.ho-blk-col{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border-radius:14px;background:#fff;border:1px solid #e1dccb;min-width:0}
.ho-blk-head{font-weight:800;color:#28433d;font-size:16px}
.ho-blk-draw{width:100%;max-width:150px}
.ho-blk-svg{display:block;width:100%;height:auto}
.ho-blk-one{fill:#f0a43a;stroke:#7a4b11;stroke-width:1.5}
.ho-blk-ten rect{fill:#8ccfb6;stroke:#2f5a50;stroke-width:1.5}
.ho-blk-ten path{stroke:#2f5a50;stroke-width:.8}
.ho-blk-hundred rect{fill:#b9d3ee;stroke:#3f5f7a;stroke-width:1.5}
.ho-blk-hundred path{stroke:#3f5f7a;stroke-width:.6;opacity:.7}
.ho-blk-group{fill:none;stroke:#b4572e;stroke-width:2.5;stroke-dasharray:6 4}
.ho-blk-count{font-size:24px;font-weight:800;color:#1b4d45;line-height:1}
.ho-blk-btns{display:flex;gap:8px}
.ho-blk-btn{min-width:48px;min-height:48px;padding:0;font-size:26px;font-weight:800;line-height:1;border-radius:14px}
.ho-blk-trades{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 6px}
.ho-blk-trade{min-height:44px;font-size:15px;background:#fff1d6;color:#7a4b11;border:2px dashed #e0a24a}
.ho-blk-trade[hidden]{display:none}
.ho-blk-sum{font-size:15px;color:#5b726c}
.ho-blocks .ho-readout{flex-wrap:wrap}

/* Coordinate plane */
.ho-plot-svg{display:block;width:100%;max-width:460px;height:auto;margin:4px auto 8px;touch-action:none;cursor:crosshair;user-select:none;background:#fffdf5;border-radius:12px;border:1px solid #e1dccb}
.ho-plot-svg:focus-visible{outline:3px solid #f0a43a;outline-offset:3px}
.ho-plot-grid{stroke:#d7dfd5;stroke-width:1}
.ho-plot-grid.axis{stroke:#2f5a50;stroke-width:2.5}
.ho-plot-svg text{font:600 12px system-ui,sans-serif;fill:#28433d;paint-order:stroke;stroke:#fffdf5;stroke-width:3px}
.ho-plot-svg .ho-plot-axis-name{font-size:15px;font-weight:800;font-style:italic}
.ho-plot-svg .ho-plot-tag{font-size:13px;font-weight:800;fill:#3f5f7a;paint-order:stroke;stroke:#fffdf5;stroke-width:4px}
.ho-plot-given{fill:#3f6fa0;stroke:#fff;stroke-width:2}
.ho-plot-mirror{stroke:#b4572e;stroke-width:3;stroke-dasharray:9 6}
.ho-plot-vector{stroke:#6a4ea0;stroke-width:3;stroke-dasharray:7 5;fill:none}
.ho-plot-arrowhead{fill:#6a4ea0}
.ho-plot-center{stroke:#b4572e;stroke-width:3;stroke-linecap:round}
.ho-plot-pick[hidden]{display:none}
.ho-plot-pick circle{fill:#f0a43a;stroke:#7a4b11;stroke-width:3}
.ho-plot-pick text{font-size:15px;font-weight:800;fill:#7a4b11;paint-order:stroke;stroke:#fffdf5;stroke-width:4px}
.ho-plot-steps{display:flex;flex-wrap:wrap;gap:10px 18px;margin:4px 0 6px}
.ho-plot-axis{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:700}
.ho-plot-axis output{display:inline-block;min-width:2.2em;text-align:center;font-weight:800;color:#1b4d45}
.ho-plot-btn{min-width:48px;min-height:48px;padding:0;font-size:22px;font-weight:800;line-height:1;border-radius:14px}

/* Area rectangle for quadratic word problems */
.ho-rect-svg{display:block;width:100%;height:auto;max-width:640px}
.ho-rect-shape{fill:#8ccfb6;stroke:#2f5a50;stroke-width:3;transition:width .2s ease,height .2s ease}
.hands-on.balanced .ho-rect-shape{fill:#a8dc9a}
.ho-rect-svg text{font:700 24px system-ui,sans-serif;fill:#28433d}
.ho-rect-svg .ho-rect-target{fill:#7a4b11}
.ho-plot-svg .ho-plot-mirror-tag{fill:#b4572e}
.ho-plot-svg .ho-plot-vector-tag{fill:#6a4ea0}

@media(max-width:600px){
 .ho-blk-cols{gap:6px}
 .ho-blk-col{padding:8px 4px}
 .ho-blk-btns{gap:4px}
 .ho-blk-btn{min-width:44px;min-height:44px}
 .ho-plot-svg text{font-size:14px}
 .ho-rect-svg text{font-size:32px}
}
@media(prefers-reduced-motion:reduce){
 .ho-rect-shape{transition:none}
}
@media(max-width:420px){.ho-blk-btns{flex-direction:column-reverse;width:100%;gap:6px}.ho-blk-btn{width:100%;min-width:0}.ho-blk-head{font-size:14px;overflow-wrap:anywhere}}
