.teaching-tools{position:fixed;right:24px;top:78px;z-index:1200;width:min(340px,calc(100vw - 48px));max-height:calc(100dvh - 110px);overflow:auto;padding:22px;border:1px solid #ffffffc9;border-radius:22px;background:#f9fbf9f5;backdrop-filter:blur(20px);color:#253f39;box-shadow:0 18px 60px #173c3526,0 2px 8px #173c3510;font:13px system-ui;box-sizing:border-box}.teaching-tools[hidden]{display:none}.teaching-tools header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.teaching-tools header small{font-size:11px;color:#71847e;letter-spacing:1px}.teaching-tools h2{font-size:21px;font-weight:650;letter-spacing:-.5px;margin:6px 0 0}.teaching-tools header button{border:0;background:transparent;font-size:24px;color:#73877f}.teaching-tools nav{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.teaching-tools button,.teaching-tools select,.teaching-tools input{font:inherit;color:inherit;border:1px solid #dce5e0;border-radius:9px;background:#fff;padding:8px;box-sizing:border-box}.teaching-tools button{cursor:pointer;min-height:36px;transition:background .15s,box-shadow .15s}.teaching-tools button:hover{background:#eef6f1;border-color:#accab9}.teaching-tools button:active{background:#cdebdc}.teaching-tools button:focus-visible,.teaching-tools input:focus-visible,.teaching-tools select:focus-visible{outline:2px solid #167e63;outline-offset:2px}.teaching-tools .teaching-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.teaching-picker button{min-height:83px;padding:10px 4px;background:#f1f5f1;border-color:transparent;font-size:11px}.teaching-picker svg{display:block;width:52px;height:36px;margin:0 auto 5px;fill:#f4dda588;stroke:#806c3d;stroke-width:1.5;stroke-linejoin:round}.teaching-picker [aria-pressed=true]{background:#e2f1e8;border-color:#73a48e;box-shadow:0 0 0 1px #73a48e}.teaching-tools select{width:100%;background:#fff}.teaching-hint{font-size:11px;line-height:1.8;color:#71847c;margin:14px 0}.teaching-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.teaching-fields label{font-size:11px;color:#6b7f76}.teaching-fields input{display:block;width:100%;margin-top:5px;font-size:14px;font-variant-numeric:tabular-nums}.teaching-tools .teaching-primary{background:#1b7058;color:#fff;border-color:#1b7058}.teaching-tools output{display:block;border-top:1px solid #e2e9e4;padding-top:14px;margin-top:14px;font-size:11px;color:#6b7f76;line-height:1.8}.teaching-tools .teaching-labs-link{background:transparent;border:0;color:#527568;font-size:11px;padding-left:0}.teaching-instruments{position:fixed;z-index:1000;pointer-events:none;overflow:hidden}.teaching-instruments g{pointer-events:auto;touch-action:none}.teaching-instrument{cursor:grab;fill:#edcf8b;fill-opacity:calc(var(--instrument-opacity)*.38);stroke:#776137;stroke-opacity:var(--instrument-opacity);stroke-width:.45;stroke-linejoin:round;filter:drop-shadow(0 1px 1px #6b583c26)}.teaching-instrument text{font:3px system-ui;stroke:none;fill:#604e2d;fill-opacity:1;text-anchor:middle;pointer-events:none}.teaching-instrument path{fill:none}.teaching-instrument circle{fill:#edcf8b22}.teaching-controls{fill:none;stroke:#197c61;pointer-events:none!important}.teaching-control-arm{stroke-width:1;stroke-dasharray:3 3;vector-effect:non-scaling-stroke;pointer-events:none}.teaching-pivot{fill:white;stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:none}.teaching-rotate-hit{fill:transparent;stroke:none;pointer-events:all;cursor:crosshair}.teaching-rotate{fill:#fff;stroke:#197c61;stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:all;cursor:crosshair;filter:drop-shadow(0 2px 3px #173c3530)}.teaching-controls text{font-family:system-ui;stroke:none;fill:#197c61;text-anchor:middle;pointer-events:none}.teaching-controls .teaching-rotate-icon{pointer-events:all;cursor:crosshair}.teaching-controls .teaching-angle{paint-order:stroke;stroke:#fff;stroke-width:3;stroke-linejoin:round;font-weight:650}@media(max-width:600px){.teaching-tools{right:12px;top:auto;bottom:14px;width:min(310px,calc(100vw - 24px));max-height:48dvh;padding:16px;border-radius:18px}.teaching-tools .teaching-picker{grid-template-columns:repeat(5,1fr)}.teaching-picker button{min-height:64px;font-size:9px}.teaching-picker svg{width:36px;height:28px}.teaching-tools h2{font-size:18px}}
/* Printed graduations sit inside the instrument, separate from gesture controls. */
.teaching-instrument .instrument-body{fill:#edcf8b;fill-opacity:calc(var(--instrument-opacity)*.42);stroke:#887044;stroke-width:.45}.teaching-instrument .instrument-tick{stroke:#66532f;stroke-width:.32;fill:none}.teaching-instrument .instrument-number,.teaching-instrument .instrument-outer-number{font:2.8px system-ui;fill:#5e4a26}.teaching-instrument .instrument-inner-number{font:2.7px system-ui;fill:#237865}.teaching-instrument .instrument-unit{font:2px system-ui;fill:#796c52}.teaching-instrument .instrument-angle-label{font:2.4px system-ui;fill:#6b5731}.teaching-instrument .instrument-baseline{stroke:#927a4b;stroke-width:.5}.teaching-instrument .instrument-center{stroke:#167b63;stroke-width:.5;fill:white}.teaching-instrument .compass-guide{fill:none;stroke:#578878;stroke-width:.3;stroke-dasharray:1.8 1.5;opacity:.4;pointer-events:none}.teaching-instrument .compass-radius-guide{stroke:#578878;stroke-width:.3;stroke-dasharray:1 1.5;pointer-events:none}.teaching-instrument .compass-leg{fill:#d7dfe1;fill-opacity:1;stroke:#677d84;stroke-width:.6}.teaching-instrument .compass-pencil-leg{fill:#b3c9c6}.teaching-instrument .compass-needle{stroke:#54636b;stroke-width:.7}.teaching-instrument .compass-pencil{stroke:#255f52;stroke-width:2}.teaching-instrument .compass-pencil-tip{fill:#374540;stroke:#374540;stroke-width:.3}.teaching-instrument .compass-grip{fill:#326f60;fill-opacity:1;stroke:#27594e;stroke-width:.4}.teaching-instrument .compass-hinge{fill:#eff4f2;fill-opacity:1;stroke:#567268;stroke-width:.6}.teaching-instrument .compass-tip-hit{fill:transparent;stroke:none;pointer-events:all;cursor:crosshair}.teaching-instrument .compass-tip{fill:white;stroke:#197c61;stroke-width:.6;pointer-events:all;cursor:crosshair}.teaching-instrument .instrument-radius-label{font:3px system-ui;fill:#26745e}
.teaching-tools .teaching-icon-actions{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.teaching-icon-actions button{height:42px;min-width:0;display:grid;place-items:center}.teaching-icon-actions svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.teaching-icon-actions [data-action=remove]{color:#a55252}.teaching-edge-hits{fill:none;stroke:transparent;pointer-events:stroke!important;cursor:crosshair}.teaching-edge-hits path{pointer-events:stroke}.teaching-stroke-preview{fill:none;vector-effect:non-scaling-stroke;pointer-events:none;stroke-linecap:round}.teaching-dial .teaching-dial-face{fill:#fffdf5;fill-opacity:.94;stroke:#8a8474;stroke-width:.6;vector-effect:non-scaling-stroke;pointer-events:all;cursor:grab}.teaching-dial path{stroke:#706b61;stroke-width:.75;vector-effect:non-scaling-stroke;pointer-events:none}.teaching-dial .teaching-dial-active{stroke:#e5333f;stroke-width:2}.teaching-dial .teaching-rotate{fill:none;stroke:transparent;filter:none;pointer-events:stroke;cursor:crosshair}.teaching-dial .teaching-dial-move{fill:transparent;stroke:none;pointer-events:all;cursor:grab}.teaching-dial .teaching-dial-number{fill:#292d28;stroke:none;font-weight:600;pointer-events:all;cursor:grab}
.teaching-instrument .instrument-angle-guide{stroke:#c94b4b;stroke-width:.5;stroke-dasharray:2 1.5;fill:none}
.teaching-close-tool{pointer-events:all!important;cursor:pointer;touch-action:none}.teaching-close-tool circle{fill:#fffffff2;stroke:#bdc9c1;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:all}.teaching-close-tool path{fill:none;stroke:#64766d;stroke-width:1.4;vector-effect:non-scaling-stroke;pointer-events:all}.teaching-close-tool:hover circle,.teaching-close-tool:focus circle{fill:#fff0ef;stroke:#cf6b6b}.teaching-close-tool:hover path{stroke:#c54141}
.teaching-tools .teaching-category-tabs{display:grid;grid-template-columns:1fr 1fr;background:#eaf0eb;border-radius:10px;padding:3px;margin:0 0 14px}.teaching-category-tabs button{background:transparent;border:0;font-size:12px}.teaching-category-tabs [aria-pressed=true]{background:#fff;box-shadow:0 1px 4px #203d2520;color:#17684f}.smart-math-section [hidden],.smart-basic-content[hidden],.smart-math-section[hidden]{display:none!important}.smart-math-section label{display:block;font-size:11px;color:#5a7165;margin:10px 0}.smart-math-section input,.smart-math-section select{display:block;width:100%;margin-top:5px;min-width:0}.smart-parameter-grid,.smart-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px}.smart-parameter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.smart-math-section .smart-check{display:flex;align-items:center;gap:8px}.smart-check input{width:auto;margin:0}.smart-submit-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.smart-presets select{background:#edf5f0}.smart-math-svg text{font-family:system-ui}
.smart-picker-label{display:block;font-size:11px;color:#5a7165;margin:10px 0 5px}.smart-tool-picker{position:relative}.smart-tool-picker [data-smart-picker]{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:40px;background:#fff}.smart-tool-picker [data-smart-current]{display:flex;align-items:center;gap:9px}.smart-tool-picker svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}.smart-tool-picker .smart-picker-chevron{width:15px;height:15px;color:#73887c}.smart-tool-menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px;margin-top:6px;border:1px solid #dce6df;border-radius:12px;background:#f0f5f1;max-height:290px;overflow:auto}.smart-tool-menu button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:72px;font-size:10px;padding:8px 3px;text-align:center}.smart-tool-menu [aria-pressed=true]{background:#dfeee5;border-color:#70a48b;color:#165b45}.smart-tool-menu button:focus-visible{outline:2px solid #197b5d;outline-offset:1px}
.smart-math-section .smart-check-options{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:8px 0}.smart-math-section .smart-check-options .smart-check{margin:0;display:flex;white-space:nowrap}.smart-check-options input{flex:none}
.smart-point-handle{pointer-events:all;cursor:grab;touch-action:none}.smart-point-handle .smart-point-hit{fill:transparent;stroke:none;pointer-events:all}.smart-point-handle .smart-point-dot{fill:#fff;stroke:#188465;stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:all}.smart-point-handle text{fill:#13765c;pointer-events:none;font-weight:600}
.overlay-item.is-active-selection:has(.smart-math-svg){z-index:1000!important}
.smart-math-section .smart-submit-row>[data-smart-create],.smart-math-section .smart-submit-row>[data-smart-new]{grid-column:auto;min-height:38px;font-size:13px!important;background:#e4f1e9!important;color:#245e49!important;border:1px solid #c6dfd1!important;box-shadow:none}.smart-math-section .smart-submit-row>[data-smart-create]:hover,.smart-math-section .smart-submit-row>[data-smart-new]:hover{background:#d9ecdf!important}.smart-math-section .smart-submit-row>[aria-pressed=true],.smart-math-section .smart-submit-row>[aria-pressed=true]:hover,.smart-math-section .smart-submit-row>[data-smart-create]:active,.smart-math-section .smart-submit-row>[data-smart-new]:active{background:#226c54!important;color:#fff!important;border-color:#226c54!important;box-shadow:0 0 0 2px #bedacb}

.smart-math-svg .smart-point-letter{font-family:KaTeX_Math,"Cambria Math","STIX Two Math","Times New Roman",serif;font-style:italic;font-weight:400;pointer-events:none}.smart-math-svg .smart-annotation-text{font-family:KaTeX_Main,"Cambria Math","STIX Two Math","Times New Roman",serif}.smart-parameter-grid[hidden]{display:none!important}
@font-face{font-family:CxaiMathLetters;src:url('./vendor/katex/fonts/KaTeX_Math-Italic.woff2') format('woff2');font-style:italic;font-weight:400;font-display:swap}@font-face{font-family:CxaiMathText;src:url('./vendor/katex/fonts/KaTeX_Main-Regular.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}.smart-math-svg .smart-point-letter{font-family:CxaiMathLetters,"Cambria Math",serif;font-style:italic}.smart-math-svg .smart-annotation-text{font-family:CxaiMathText,"Cambria Math",serif}
.overlay-item:has(.smart-math-svg){min-width:0;min-height:0;border:0}
.smart-formula-row{display:flex;align-items:end;gap:8px;min-width:0}.smart-formula-row .smart-expression-field{flex:1;min-width:0}.smart-formula-row .smart-parameter-grid{display:flex;gap:6px;flex:none}.smart-formula-row .smart-parameter-grid label{width:46px;min-width:0}.smart-formula-row input{padding-left:6px;padding-right:4px}.smart-formula-row:has(.smart-expression-field[hidden]){display:block}

/* Advanced instruments have an independent browser adapter. */
.teaching-tools .teaching-category-tabs:has([data-math-tab=advanced]){grid-template-columns:repeat(3,minmax(0,1fr))}.teaching-category-tabs button{min-width:0;padding:9px 4px}.advanced-tools-section[hidden],.advanced-tools-section [hidden]{display:none!important}.advanced-tools-section>label,.advanced-fields label{display:block;font-size:11px;color:#5a7165;margin:10px 0}.advanced-tools-section input,.advanced-tools-section select{display:block;width:100%;min-width:0;margin-top:5px}.advanced-picker{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px}.advanced-picker button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:76px;font-size:11px;padding:8px 3px}.advanced-picker svg{width:42px;height:32px;fill:none;stroke:#466f5d;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}.advanced-picker [aria-pressed=true]{background:#deeee5;border-color:#68a98b}.advanced-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px}.advanced-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:12px 0}.advanced-actions button{font-size:11px;padding:8px 3px}.advanced-actions [aria-pressed=true]{background:#d8ebe0}.advanced-drawing{display:flex;flex-wrap:wrap;gap:8px}.advanced-drawing button{flex:1;font-size:12px;background:#e4f1e9;color:#245e49;border-color:#c6dfd1}.advanced-drawing button:active{background:#226c54;color:white}.advanced-tools-section input:disabled{opacity:.6}.advanced-instruments{touch-action:none}.advanced-instruments .adv-instrument{stroke:#65756b;stroke-width:.6;fill:none;opacity:var(--adv-opacity);cursor:grab}.adv-body text{font:3px CxaiMathText,serif;fill:#3b6552;stroke:none;text-anchor:middle;pointer-events:none}.adv-body .adv-plate{stroke:#d9d8af;stroke-width:9;stroke-linecap:round}.adv-body .adv-link{stroke:#7b9990;stroke-width:2;stroke-linecap:round}.adv-body .adv-tick{stroke:#756944;stroke-width:.3}.adv-body .adv-tick-number{font:2.4px system-ui;fill:#736843}.adv-body .adv-measure{font-size:3.5px}.adv-body .adv-angle-arc{stroke:#267d62;stroke-width:.5}.adv-body .adv-curve-board{fill:#d7e8e2;fill-opacity:.65;stroke:#749f90;stroke-width:.5}.adv-body .adv-curve-edge{stroke:#347e65;stroke-width:.8}.adv-body .adv-guide{stroke:#91aca0;stroke-width:.4;stroke-dasharray:2 1.5}.adv-body .adv-needle{stroke:#566961;stroke-width:.7}.adv-body .adv-hinge{fill:#f4f8f6;stroke:#648779}.adv-body .adv-rail{stroke:#98ada3;stroke-width:3;stroke-linecap:round}.adv-body .adv-slider{fill:#d8e8e1;stroke:#4b7763;stroke-width:.6}.adv-body .adv-ellipse-guide{stroke:#619b82;stroke-width:.5;stroke-dasharray:2 1.5}.adv-edge-hit{fill:none;stroke:transparent;pointer-events:stroke!important;cursor:crosshair}.advanced-instruments [data-adv-mode]{touch-action:none}.adv-handle-hit{fill:transparent;stroke:none;pointer-events:all;cursor:crosshair}.adv-handle{fill:#fff;stroke:#277e60;stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:all;cursor:crosshair}.adv-pivot>circle{fill:#fffffff5;stroke:#6d9584;stroke-width:1.2;vector-effect:non-scaling-stroke;cursor:grab}.adv-pivot>text{fill:#315b49;stroke:none;text-anchor:middle;cursor:grab}.adv-pivot .adv-rotate-ring{fill:none;stroke:#95afa226;stroke-dasharray:2 3;vector-effect:none;pointer-events:stroke;cursor:crosshair}.advanced-stroke-preview{fill:none;pointer-events:none!important}.advanced-stroke-preview *{pointer-events:none!important;vector-effect:non-scaling-stroke;stroke-linecap:round}

.adv-pivot .adv-dial-tick{fill:none;stroke:#7e8a80;stroke-width:.7;vector-effect:non-scaling-stroke;pointer-events:none}.adv-pivot .adv-dial-active{fill:none;stroke:#e53340;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}.adv-pivot .adv-rotate-ring{stroke:transparent;stroke-dasharray:none}

svg.teaching-instruments:focus,svg.teaching-instruments:focus-visible{outline:none}
