/* New-page-only safeguards; shared styles and existing tools are untouched. */
.math-expansion .field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.math-expansion .field,.math-expansion .input-wrap{min-width:0}.math-expansion .field-grid .full{grid-column:1/-1}.math-expansion [hidden]{display:none!important}.math-expansion .result-number{font-size:clamp(28px,4vw,56px);line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}.math-expansion .fact strong,.math-expansion .result-sentence,.math-expansion .step-equation,.math-expansion .step-solution li{min-width:0;overflow-wrap:anywhere}.math-expansion .step-equation{white-space:pre-wrap;font-size:13px;line-height:1.8}.math-expansion.long-result .result-number{font-size:24px}@media(max-width:560px){.math-expansion .field-grid{grid-template-columns:minmax(0,1fr)}.math-expansion .result-number{font-size:32px}body[data-calculator="inequality"] .result-number,.math-expansion.long-result .result-number{font-size:20px}}
.math-expansion .coefficient-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.math-expansion .field textarea{display:block;width:100%;min-width:0;border:1px solid var(--line,rgba(255,255,255,.12));border-radius:12px;background:rgba(0,0,0,.16);color:inherit;padding:14px;font:15px/1.7 ui-monospace,Consolas,monospace;resize:vertical;outline-offset:2px}.math-expansion .field textarea::placeholder{color:var(--muted,#85929f)}html[data-theme="light"] .math-expansion .field textarea{background:rgba(255,255,255,.8)}@media(max-width:560px){.math-expansion .coefficient-grid{grid-template-columns:minmax(0,1fr)}}