/* SOCE Phase 6 – Advanced Mathematics tools. Existing assets remain untouched. */
.soce-advanced-math { --soce-am-accent:#7656c9; --soce-am-tint:#f4f0ff; }
.soce-advanced-math .soce-tool__eyebrow-icon { background:#f0eaff; color:#6846bd; border-radius:11px; padding:7px 10px; }
.soce-advanced-math .soce-tool__header h2 { color:#2d2450; }
.soce-advanced-math .soce-tool__body { max-width:100%; }
.soce-advanced-math .soce-field textarea { width:100%; max-width:100%; box-sizing:border-box; min-height:76px; padding:12px; border:1px solid #d5cde9; border-radius:10px; background:#fff; color:#282238; font:inherit; line-height:1.5; }
.soce-advanced-math .soce-field input:focus, .soce-advanced-math .soce-field select:focus, .soce-advanced-math .soce-field textarea:focus { border-color:#8b6bd5; box-shadow:0 0 0 3px rgba(118,86,201,.12); outline:none; }
.soce-advanced-math button:not(.soce-tool__fullscreen-trigger):not(.soce-tool__mode-toggle):not(.soce-tool__exit-fullscreen) { background:linear-gradient(135deg,#7656c9,#5941a5); color:#fff; border:0; border-radius:9px; padding:11px 17px; font-weight:650; cursor:pointer; }
.soce-advanced-math button.soce-button--secondary { background:#eee9f8; color:#43336e; }
.soce-advanced-math .soce-result { border-left-color:#7656c9; background:#f5f2fc; color:#2f2850; line-height:1.65; }
.soce-advanced-math .soce-note { color:#6c657b; font-size:13px; line-height:1.6; }
.soce-am-equation { background:linear-gradient(110deg,#f2edff,#f6f3ff); border:1px solid #e5dcfb; border-radius:12px; text-align:center; color:#4f3a91; font-size:clamp(20px,3vw,27px); font-weight:700; letter-spacing:.02em; padding:18px 12px; }
.soce-am-complex-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.soce-am-complex-grid fieldset { border:1px solid #e3dcef; border-radius:12px; padding:14px; min-width:0; }
.soce-am-complex-grid legend { color:#5a458e; font-weight:700; padding:0 7px; }
.soce-am-matrix .soce-field textarea { min-height:100px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.soce-advanced-math .soce-tool__disclaimer { border-top-color:#eee8f8; }
.soce-advanced-math[data-theme="dark"] { --soce-am-tint:#27213b; }
.soce-advanced-math[data-theme="dark"] .soce-tool__header h2 { color:#f1eaff; }
.soce-advanced-math[data-theme="dark"] .soce-field textarea { background:#211d2d; color:#f3efff; border-color:#55496f; }
.soce-advanced-math[data-theme="dark"] .soce-am-equation { background:#28213b; color:#d9c9ff; border-color:#50436e; }
.soce-advanced-math[data-theme="dark"] .soce-am-complex-grid fieldset { border-color:#514765; }
.soce-advanced-math[data-theme="dark"] .soce-am-complex-grid legend { color:#d9c9ff; }
.soce-advanced-math[data-theme="dark"] .soce-result { background:#29233b; color:#f2edff; }
.soce-advanced-math[data-theme="dark"] .soce-note { color:#b5abc8; }
@media(max-width:640px){.soce-am-complex-grid{grid-template-columns:1fr}.soce-advanced-math .soce-tool__top{gap:12px}.soce-advanced-math .soce-field textarea{font-size:14px}}
