.neural-latch-widget{box-sizing:border-box;width:min(64rem,100vw - 3rem);color:var(--diagram-ink);background:var(--diagram-background);border:1px solid var(--diagram-border);border-radius:16px;margin:0 0 2.5rem;padding:24px 28px 20px;font:14px/1.5 ui-sans-serif,system-ui,sans-serif}.neural-latch-widget *{box-sizing:border-box}.neural-latch-widget header{justify-content:space-between;align-items:center;gap:12px;display:flex}.neural-latch-widget h2{letter-spacing:-.025em;color:var(--diagram-ink);margin:0;font-size:23px;font-weight:600;line-height:1.2}.neural-latch-widget button{cursor:pointer;background:var(--diagram-surface);color:var(--diagram-ink);border:1px solid var(--diagram-border);font:inherit;white-space:nowrap;border-radius:6px;padding:7px 11px;font-size:12px}.neural-latch-widget button:hover{background:var(--diagram-control-soft)}.neural-latch-widget button:focus-visible{outline:2px solid var(--diagram-focus);outline-offset:3px}.neural-latch-widget .set{color:var(--diagram-signal)}.neural-latch-widget .reset{color:var(--diagram-control)}.neural-latch-widget .memory{color:var(--diagram-state)}.neural-latch-widget button.set,.neural-latch-widget button.reset{border-color:currentColor}.neural-latch-widget svg{width:100%;display:block;overflow:visible}.neural-latch-widget .latch-circuit{background-image:radial-gradient(var(--diagram-grid) .65px, transparent .65px);background-size:18px 18px;max-height:440px;margin:18px 0 0}.neural-latch-widget svg text{fill:var(--diagram-ink);text-anchor:middle;font-family:ui-monospace,SFMono-Regular,monospace;font-size:15px}.neural-latch-widget .latch-wire{fill:none;stroke:var(--diagram-wire);stroke-width:2.5px;transition:stroke .3s}.neural-latch-widget .latch-wire[data-active=true]{stroke:currentColor;stroke-dasharray:5 5;animation:1.4s linear infinite latch-flow}.neural-latch-widget .latch-source circle{fill:var(--diagram-control-soft);stroke:var(--diagram-wire);stroke-width:2px;transition:fill .3s,stroke .3s}.neural-latch-widget .latch-source[data-active=true] circle{fill:currentColor;stroke:currentColor}.neural-latch-widget .latch-source[data-active=true] .latch-bit{fill:var(--diagram-on-accent)}.neural-latch-widget .latch-bit{font-size:26px}.neural-latch-widget .latch-label{font-size:13px;font-weight:600}.neural-latch-widget .latch-weight{fill:currentColor;font-size:18px}.neural-latch-widget .latch-neuron circle{fill:var(--diagram-surface);stroke:var(--diagram-logic);stroke-width:1.5px}.neural-latch-widget circle.latch-halo{fill:var(--diagram-logic-soft);stroke:none;opacity:.7}.neural-latch-widget .latch-small{fill:var(--diagram-muted);font-size:10px}.neural-latch-widget .latch-sum{font-size:33px}.neural-latch-widget .latch-threshold{font-size:15px}.neural-latch-widget .latch-output circle{fill:var(--diagram-control-soft);stroke:var(--diagram-wire);stroke-width:2px;transition:fill .3s}.neural-latch-widget .latch-output[data-active=true] circle{fill:var(--diagram-state);stroke:var(--diagram-state)}.neural-latch-widget .latch-output[data-active=true] circle.latch-halo{fill:var(--diagram-state-soft);stroke:none}.neural-latch-widget .latch-output[data-active=true] .latch-output-bit{fill:var(--diagram-on-accent)}.neural-latch-widget .latch-output-bit{font-size:43px}.neural-latch-widget .latch-delay rect{fill:var(--diagram-state-soft);stroke:var(--diagram-state)}.neural-latch-widget .latch-delay text{fill:var(--diagram-state);font-size:12px}.neural-latch-widget .latch-feedback-label{fill:var(--diagram-state);font-size:15px}.neural-latch-widget .latch-equation{text-align:center;border-bottom:1px solid var(--diagram-border);padding:12px 0;font-family:ui-monospace,SFMono-Regular,monospace;font-size:14px}.neural-latch-widget .latch-caption{align-items:baseline;gap:18px;margin:14px 0;display:flex}.neural-latch-widget .latch-caption span{color:var(--diagram-muted);white-space:nowrap;letter-spacing:.08em;font-variant-numeric:tabular-nums;font-size:10px}.neural-latch-widget .latch-caption p{margin:0;font-size:15px}.neural-latch-widget .latch-history{margin-bottom:18px}.neural-latch-widget .latch-history text{fill:var(--diagram-muted);font-size:11px}.neural-latch-widget .latch-history polyline{stroke:currentColor;stroke-width:2.5px;fill:none}.neural-latch-widget .latch-guide{stroke:var(--diagram-grid);stroke-width:1px}.neural-latch-widget .latch-current-step{fill:var(--diagram-control-soft)}.neural-latch-widget footer{border-top:1px solid var(--diagram-border);flex-wrap:wrap;justify-content:space-between;gap:10px;padding-top:14px;display:flex}.neural-latch-widget .latch-playback,.neural-latch-widget .latch-controls{gap:6px;display:flex}.neural-latch-widget footer p{color:var(--diagram-muted);text-align:right;flex-basis:100%;margin:0;font-size:11px}.neural-latch-widget[data-expanded]{z-index:2147483647;border:0;border-radius:0;flex-direction:column;width:100%;height:100dvh;margin:0;display:flex;position:fixed;inset:0;overflow:auto}.neural-latch-widget[data-expanded] .latch-circuit{flex:1;min-height:250px;max-height:none}.neural-latch-widget[data-expanded] .latch-history{flex-shrink:0;max-height:115px}@media (min-width:768px){.neural-latch-widget{margin-left:calc(min(48rem,100vw)/2 + min(64rem,100vw - 3rem)/-2)}.neural-latch-widget[data-expanded]{margin-left:0}}@media (max-width:600px){.neural-latch-widget{padding:18px 14px}.neural-latch-widget h2{font-size:20px}.neural-latch-widget .latch-circuit{max-height:none}.neural-latch-widget .latch-equation{font-size:10px}.neural-latch-widget .latch-caption{gap:10px;min-height:44px}.neural-latch-widget .latch-caption p{font-size:13px}.neural-latch-widget footer{justify-content:center}.neural-latch-widget footer p{text-align:center}.neural-latch-widget button{padding:7px 9px;font-size:11px}.neural-latch-widget .latch-history{min-height:75px}}@keyframes latch-flow{to{stroke-dashoffset:-20px}}@media (prefers-reduced-motion:reduce){.neural-latch-widget .latch-wire[data-active=true]{animation:none}.neural-latch-widget *{transition:none!important}}
.latch-function-figure{margin:2rem 0}.latch-function-figure svg{width:100%;height:auto;margin:0;display:block}.latch-function-figure figcaption{text-align:center;color:var(--diagram-muted);margin-top:.75rem;font-size:.85em}.latch-value-table{max-width:100%;overflow-x:auto}.latch-value-table table{table-layout:auto;width:100%}.latch-value-table :is(th,td){background:var(--diagram-background);padding-inline:.75rem}.latch-value-table td{white-space:nowrap;font-variant-numeric:tabular-nums}.latch-value-table[data-inputs="2"] :is(th,td):nth-child(-n+2),.latch-value-table[data-inputs="3"] :is(th,td):nth-child(-n+3){white-space:nowrap;background:var(--diagram-signal-soft);width:1%}.latch-function-figure .latch-symbol-compact{display:none}@media (max-width:600px){.latch-function-figure .latch-symbol-wide{display:none}.latch-function-figure .latch-symbol-compact{display:block}}