/* Isolated additions; existing Math pages and shared styles are unchanged. */
.math-expansion .equation-row{grid-column:1/-1;min-width:0;margin:0;padding:16px;border:1px solid var(--line,rgba(255,255,255,.1));border-radius:12px}.math-expansion .equation-row legend{padding:0 8px;color:var(--gold,#f4bd46);font-weight:700;font-size:14px}.math-expansion .coefficient-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}.math-expansion .three-variable .coefficient-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.math-expansion #polynomial{font-family:ui-monospace,Consolas,monospace}.math-expansion .result-number{font-size:clamp(26px,3vw,48px)}.math-expansion .step-equation{white-space:pre-wrap;font-size:13px;line-height:1.8}.math-expansion .step-solution li{min-width:0;overflow-wrap:anywhere}html[data-theme="light"] .math-expansion .equation-row legend{color:#9b6800}@media(max-width:560px){.math-expansion .coefficient-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.math-expansion .equation-row{padding:12px}.math-expansion .result-number{font-size:28px}}