.math-gate-toggle{width:100%;height:48px;display:flex;align-items:center;justify-content:center;border:2px solid var(--math-border);border-radius:var(--math-radius-sm);background:var(--math-surface);cursor:pointer;transition:all .2s ease;font-family:SF Mono,Fira Code,Consolas,monospace}.math-gate-toggle .math-gate-toggle-val{font-size:24px;font-weight:800;color:var(--math-error);transition:all .2s ease}.math-gate-toggle.active{border-color:var(--math-success);background:#10b9811a}.math-gate-toggle.active .math-gate-toggle-val{color:var(--math-success)}.math-gate-toggle:hover{border-color:var(--math-primary);transform:scale(1.02)}.math-gate-visual{display:block}.math-gate-svg .math-gate-wire{transition:stroke .25s ease}.math-gate-svg .math-gate-wire--interactive{cursor:pointer}.math-gate-svg .math-gate-wire--interactive:hover{stroke-width:4.5}.math-gate-svg .math-gate-wire--on{stroke-dasharray:6 4;animation:mathGateDashflow .9s linear infinite}@keyframes mathGateDashflow{0%{stroke-dashoffset:20}to{stroke-dashoffset:0}}.math-gate-svg .math-gate-body{transition:stroke .25s ease,fill .25s ease}.math-gate-svg .math-gate-led--on{animation:mathGateLedPulse 1.4s ease-in-out infinite;transform-origin:340px 90px}@keyframes mathGateLedPulse{0%,to{opacity:1}50%{opacity:.82}}.math-gate-formula{margin:14px auto 0;max-width:420px;padding:10px 14px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;font-family:SF Mono,Fira Code,Consolas,monospace;font-size:15px;color:var(--math-text);background:var(--math-surface-alt);border-radius:var(--math-radius-sm);border:1px solid var(--math-border)}.math-gate-formula:empty{display:none}.math-gate-formula-expr{font-weight:700;color:var(--math-primary)}.math-gate-formula-arrow{color:var(--math-primary);opacity:.55;font-weight:700}.math-gate-formula-calc{font-weight:600}.math-gate-formula-result{display:inline-block;min-width:22px;padding:2px 8px;border-radius:6px;text-align:center;font-weight:800;color:#fff;margin-left:4px}.math-gate-formula-result.on{background:var(--math-success)}.math-gate-formula-result.off{background:var(--math-error)}.math-gate-overline{display:inline-block;border-top:1.8px solid currentColor;padding-top:1px;line-height:1.1}.math-truth-table tr.math-truth-row--active{background:var(--math-primary-soft)}.math-truth-table tr.math-truth-row--active td{font-weight:800}.math-truth-table tr.math-truth-row--flash{animation:mathTruthFlash .5s ease-out}@keyframes mathTruthFlash{0%{background:var(--math-primary-glow);box-shadow:inset 0 0 0 2px var(--math-primary)}to{background:var(--math-primary-soft);box-shadow:inset 0 0 0 0 transparent}}.math-gate-inputs-row{display:flex;flex-direction:row!important;gap:12px}.math-gate-inputs-row .math-field{flex:1 1 0!important;min-width:0!important}.math-gate-type-row .math-field{flex:1 1 100%;min-width:0;width:100%}.math-gate-hint{margin-top:14px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px;color:var(--math-text);opacity:.65}.math-gate-hint i{font-size:14px;color:var(--math-primary);opacity:.7}@media(max-width:640px){.math-gate-hint{display:none}.math-gate-formula{font-size:13px;padding:8px 10px;gap:6px}.math-gate-inputs-row{gap:10px}.math-gate-toggle{height:44px}.math-gate-toggle .math-gate-toggle-val{font-size:20px}.math-tool-panel[data-tool=logic-gates] .math-actions-row .math-btn{font-size:13px;padding-left:8px;padding-right:8px}}
