:root{--ink:#162536;--muted:#607186;--blue:#235a98;--dark:#12375b;--blue-soft:#e9f2ff;--line:#d9e3ee;--white:#fff;--page:#f4f7fb;--accent:#d97b27;--green:#23926d;--warn:#925006;--shadow:0 5px 22px rgba(31,57,83,.06)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--page);font:15px/1.55 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink)}a{color:var(--blue)}button,select,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.44;cursor:default}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,#network-svg:focus-visible{outline:3px solid #f0ad52;outline-offset:2px}
.wrap{width:min(1536px,calc(100% - 42px));margin:auto}
/* Identical structure and dimensions to the Physics Lab common topbar. */
.lab-topbar{background:#173f69;color:#fff;width:100%;font-family:Arial,system-ui,sans-serif;box-sizing:border-box;position:relative;z-index:10}
.lab-topbar *{box-sizing:border-box}
.lab-topbar-inner{max-width:1100px;width:100%;margin:0 auto;padding:0 16px;min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.lab-topbar .lab-title{color:#fff!important;text-decoration:none!important;font-weight:700;font-size:17px;display:flex;align-items:center;gap:8px;white-space:nowrap}
.lab-topbar .lab-title:hover{text-decoration:underline!important}
.lab-title-icon{font-size:17px;display:inline-block;line-height:1}
.lab-topbar .lab-tool-version{color:#e0e9f4;font-size:13px;font-weight:400;text-align:right;white-space:nowrap}
.lab-breadcrumb{padding:12px 0 0;color:#4d6480;font-size:14px}
.lab-breadcrumb a{color:#2a66a0;text-decoration:underline;text-underline-offset:2px}
.lab-breadcrumb a:hover{color:#184f83}
.hero{padding:13px 0 25px;max-width:900px}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.13em;text-transform:uppercase;color:#2b699f;margin-bottom:10px}.hero h1{font-size:clamp(30px,4.2vw,49px);line-height:1.13;margin:0 0 17px;letter-spacing:-.035em}.hero p{font-size:18px;color:#52657b;max-width:760px;margin:0}.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.module-card{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;color:inherit;text-decoration:none;box-shadow:var(--shadow);transition:transform .18s,box-shadow .18s}.module-card:hover{transform:translateY(-3px);box-shadow:0 12px 35px #1d466522}.module-visual{height:160px;display:flex;justify-content:center;align-items:center}.graph-art{background:radial-gradient(circle at 20% 40%,#e0ecff,#c5daf2)}.petri-art{background:radial-gradient(circle at 20% 45%,#e9f5f4,#c6e3e1)}.module-visual svg{width:min(330px,75%);height:140px;fill:none;stroke:#4378aa;stroke-width:4}.module-visual svg circle{fill:#fff;stroke:#4378aa}.petri-art svg{stroke:#478f83}.petri-art svg rect{fill:#ffffff}.module-copy{padding:22px 25px 27px}.module-copy h2{font-size:24px;margin:0 0 8px}.module-copy p{color:var(--muted);margin:0;min-height:55px}.card-link{color:var(--blue);font-weight:700;display:inline-block;margin-top:16px}.home-info{margin:28px 0 60px;background:#eaf0f8;border-radius:13px;padding:23px 28px}.home-info h2{font-size:19px;margin:0 0 6px}.home-info p{margin:0;color:#53667c}
.page-heading{padding:7px 0 13px}.page-heading h1{font-size:clamp(26px,3.1vw,35px);margin:0 0 4px;letter-spacing:-.025em}.page-heading p{color:#596b7e;margin:0;font-size:16px}.lab-layout{display:grid;grid-template-columns:minmax(225px,270px) minmax(0,1fr) minmax(210px,250px);align-items:start;gap:16px}.panel{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.panel h2{font-size:17px;margin:0 0 17px;line-height:1.3}.panel h3{font-size:15px;margin:16px 0 10px}.control-panel,.properties-panel{padding:20px 18px}.control-panel{position:sticky;top:12px}.properties-panel{position:sticky;top:12px}.editor-panel{padding:16px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.section-heading h2,.section-heading h3{margin:0}.editor-chip{background:#e9f2fb;color:#24669e;border-radius:5px;font-size:12px;font-weight:800;padding:3px 8px}.editor-toolbar{display:flex;gap:6px;flex-wrap:wrap;padding:8px 0 12px;border-bottom:1px solid var(--line)}.tool-btn{padding:8px 12px;background:#f6f9fc;color:#374f66;border:1px solid #dbe4ed;border-radius:7px;font-weight:650;font-size:13px}.tool-btn:hover:not(:disabled),.small-btn:hover:not(:disabled){background:#eaf2fc}.tool-btn.is-active{background:#235b94;color:#fff;border-color:#235b94}.tool-danger{color:#a13a3a}.canvas-stage{height:clamp(255px,34vh,315px);position:relative;border:1px solid #dde6ee;background:#fff;border-radius:9px;overflow:hidden;margin-top:13px;scroll-margin-top:12px}.canvas-stage svg{display:block;width:100%;height:100%;user-select:none;-webkit-user-select:none;cursor:default}.canvas-stage svg.is-pan-tool{cursor:grab}.canvas-stage svg.is-connect-tool{cursor:crosshair}.draw-node{cursor:pointer}.draw-node .node-shape{fill:#fafdff;stroke:#487eae;stroke-width:2.6;transition:fill .12s,stroke .12s}.draw-node.transition .node-shape{fill:#ecf2fc;stroke:#496d99}.draw-node.place .node-shape{fill:#fcfdfd;stroke:#42877c}.draw-node.is-visited .node-shape{fill:#eef2ff}.draw-node.is-queued .node-shape{stroke:#a57d29;stroke-width:4}.draw-node.is-current .node-shape{stroke:#db8126;fill:#fff3e7;stroke-width:5}.draw-node.is-path .node-shape{fill:#fff0d9;stroke:#c87c18;stroke-width:4.2}.draw-node.is-enabled .node-shape{fill:#e7f8f0;stroke:#14926a;stroke-width:4.5}.draw-node.is-fired .node-shape{fill:#fff0dc;stroke:#df851d;stroke-width:5}.draw-node.is-selected .node-shape,.draw-node.is-pending .node-shape{stroke:#2668bd;stroke-width:5;stroke-dasharray:6 3}.vertex-label{font-weight:800;fill:#1b3b58;font-size:17px;pointer-events:none}.node-caption{font-size:16px;font-weight:650;fill:#243953;paint-order:stroke;stroke:#fff;stroke-width:4px;stroke-linejoin:round;pointer-events:none}.token-dot{fill:#234d65;pointer-events:none}.token-count{font-weight:800;fill:#234d65;font-size:21px;pointer-events:none}.edge-hit{stroke:transparent;pointer-events:stroke}.draw-edge{cursor:pointer}.edge-line{stroke:#687e97;pointer-events:none}.edge-active{stroke:#287cb9}.edge-selected{stroke:#2f78c8;stroke-width:4}.edge-path{stroke:#db882e}.edge-weight-bg{fill:#fff;stroke:#dae4ed;stroke-width:1;pointer-events:none}.edge-weight{fill:#263b52;font-size:15px;font-weight:800;pointer-events:none}
.mobile-pan-hint{display:none}.under-canvas-tools{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin:12px 0 6px}.view-group{display:flex;flex-wrap:wrap;gap:5px}.small-btn{border:1px solid #d9e4ee;border-radius:6px;background:#f7fafe;color:#38536c;padding:6px 9px;font-size:12px;font-weight:650}.simulation-panel{margin-top:10px;padding:11px 12px;background:#f8fbff;border:1px solid var(--line);border-radius:9px}.simulation-panel .section-heading{margin-bottom:5px}.simulation-panel h3{font-size:14px}.simulation-details{margin-top:13px;padding-top:12px;border-top:1px solid var(--line)}.counter{color:#52687e;font-size:12px;font-weight:700;background:#eff4fa;border-radius:7px;padding:5px 9px}.simulation-actions{display:flex;gap:7px;flex-wrap:wrap;margin:7px 0 0}.petri-quick-fire{display:flex;flex-direction:column;gap:6px;margin-top:10px;padding-top:9px;border-top:1px solid var(--line)}.petri-quick-fire[hidden]{display:none}.petri-fire-heading{font-size:12px;font-weight:800;color:#516c84}.btn{border:1px solid #cedbe8;background:#fff;color:#33506c;border-radius:7px;padding:9px 12px;font-size:13px;font-weight:700}.btn:hover:not(:disabled){background:#edf4fc}.btn-primary{border-color:#2465a3;background:#2465a3;color:white}.btn-primary:hover:not(:disabled){background:#154f86}.full{width:100%;margin-top:13px}.sim-explanation{color:#65778a;font-size:12px;line-height:1.5;margin:10px 0 12px}.stats-grid{display:grid;grid-template-columns:1fr 2fr;gap:10px}.stat{min-width:0;padding:10px 12px;border:1px solid #e0e8f1;background:#f9fbfd;border-radius:8px}.stat-label{color:#65768a;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.025em;margin-bottom:5px}.stat-value{font-weight:700}.stat-spaced{margin-top:12px}.chip-row{display:flex;flex-wrap:wrap;gap:5px}.data-chip{background:#edf3f9;color:#2c4f71;border:1px solid #dbe6ef;border-radius:6px;padding:3px 7px;font-size:12px;font-weight:700}.muted{color:#6e7f8f;font-size:13px;font-weight:400}.result{border-radius:8px;padding:12px 14px;margin:12px 0 5px;font-size:14px}.result-success{border:1px solid #b4ddca;background:#f0faf4;color:#176341}.result-warning{border:1px solid #e7c9a0;background:#fff8ed;color:#805019}.result-neutral{border:1px solid #dce5ee;background:#f5f8fb;color:#46617d}.result-details{margin-top:5px}.result-note{padding-top:8px}.fire-actions{display:flex;flex-wrap:wrap;gap:6px}.fire-button{background:#e8f6ee;color:#126547;border:1px solid #bedccc;border-radius:7px;padding:8px 12px;font-size:13px;font-weight:750}.fire-button:hover{background:#cbeddc}.marking-chips .data-chip{background:#fff;white-space:normal}.firing-details{margin-top:13px;border-left:3px solid #d89040;padding:7px 12px;background:#fffaf4;border-radius:0 6px 6px 0;font-size:13px}.firing-details div{margin-top:5px}
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:13px;font-size:13px;font-weight:650;color:#485e74}.field input,.field select,select{min-width:0;width:100%;padding:10px 9px;color:var(--ink);background:#fff;border:1px solid #c9d7e3;border-radius:7px}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.check-field{display:flex;align-items:flex-start;gap:8px;font-size:13px;color:#475e72;margin:4px 0 8px;cursor:pointer}.check-field input{margin-top:3px;accent-color:#2668a9}.examples-block{margin-top:21px;border-top:1px solid #e2e9f1;padding-top:9px}.examples-block h3{margin:8px 0}.example-links{display:flex;flex-direction:column;align-items:stretch;gap:2px}.example-link{text-align:left;color:#245e98;background:none;border:none;padding:6px 0;font-size:13px;font-weight:650;text-decoration:underline;text-underline-offset:3px;line-height:1.45}.example-link:hover{color:#154169}.example-link.example-blank{color:#657687;margin-top:4px}.control-help{border-top:1px solid #e5edf4;margin-top:18px;padding-top:15px;font-size:12px;line-height:1.55;color:#6e7e90}.selected-name{font-size:12px;color:#56728c;font-weight:700;margin-bottom:13px;background:#edf4fb;border-radius:6px;padding:6px 8px;overflow-wrap:anywhere}.properties-panel form .btn{width:100%;margin-top:5px}.editor-status{border-radius:8px;background:#f1f6fb;border:1px solid #e0e9f2;padding:10px;color:#385b79;font-size:13px;min-height:46px;overflow-wrap:anywhere}.editor-status[data-kind=error]{background:#fff3e8;border-color:#f0d2b4;color:#8a4b11}.help-note{font-size:12px;color:#728194;line-height:1.6;padding-top:10px;border-top:1px solid #e5edf4}.canvas-help{color:#718193;font-size:12px;margin:17px 0 35px}.footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 0 32px;margin-top:23px;border-top:1px solid #dce6ee;color:#718397;font-size:12px}
@media(max-width:1150px){.lab-layout{grid-template-columns:minmax(220px,260px) minmax(0,1fr)}.properties-panel{grid-column:1/-1;position:static}.control-panel{position:static}.canvas-stage{height:clamp(255px,34vh,300px)}}
@media(max-width:750px){.wrap{width:min(100% - 24px,600px)}.lab-topbar-inner{min-height:62px;gap:8px}.lab-topbar .lab-title{font-size:14px}.lab-topbar .lab-tool-version{font-size:11px}.lab-breadcrumb{padding:11px 0 0;font-size:13px}.home-grid{grid-template-columns:1fr}.hero{padding:12px 0 20px}.hero p{font-size:16px}.module-copy p{min-height:0}.page-heading{padding:7px 0 12px}.lab-layout{display:flex;flex-direction:column;gap:13px}.lab-layout>*{width:100%}.control-panel,.properties-panel{padding:16px}.editor-panel{padding:12px}.canvas-stage{height:clamp(225px,31vh,265px);overflow-x:auto;overflow-y:hidden}.canvas-stage svg{width:760px;max-width:none}.mobile-pan-hint{display:block;margin:9px 0 0;font-size:12px;color:#5b7188}.editor-toolbar{gap:5px}.tool-btn{padding:8px 10px}.stats-grid{grid-template-columns:1fr}.under-canvas-tools{gap:10px}.module-visual{height:145px}.sim-explanation{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Compact simulator: one viewport shows the drawing and the buttons beneath it. */
.simulation-panel{margin-top:7px;padding:9px 11px}.simulation-panel .section-heading{flex-wrap:wrap;justify-content:flex-start;gap:7px;margin-bottom:3px}.simulation-panel .section-heading h3{margin-right:4px}.simulation-feedback{flex:1;min-width:125px;color:#345c7e;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simulation-panel .counter{margin-left:auto;white-space:nowrap}.simulation-actions{margin-top:5px;gap:5px}.simulation-actions .btn{padding:7px 10px}.petri-quick-fire{margin-top:7px;padding-top:7px}.fire-button{padding:6px 10px}.mobile-pan-hint{margin-top:6px}.under-canvas-tools{margin-top:8px}.sim-explanation{margin-top:5px}
@media(max-width:750px){.simulation-panel .section-heading{row-gap:3px}.simulation-feedback{min-width:80px}.simulation-actions .btn{font-size:12px;padding:7px 8px}.fire-button{font-size:12px;padding:7px 9px}}

/* v0.1.3: compact, legible shared simulation surface. */
.canvas-stage{scroll-margin-top:10px}
.simulation-panel{background:#f7faff}
.simulation-feedback{font-size:13px;color:#244b73}
.draw-node.is-current .node-shape,.draw-node.is-fired .node-shape{filter:drop-shadow(0 0 4px rgba(224,131,36,.35))}
.draw-node.is-path .node-shape{filter:drop-shadow(0 0 4px rgba(224,131,36,.28))}
.under-canvas-tools .small-btn#action-autoArrange{border-color:#afc7df;background:#eaf3fc;color:#184d7e}
.under-canvas-tools .small-btn#action-autoArrange:hover{background:#dbeafa}
@media(max-width:750px){.canvas-stage{scroll-margin-top:8px}.simulation-panel .section-heading{align-items:center}}
/* Keep simulation feedback readable, especially where the panel is narrow. */
@media(max-width:750px){
 .simulation-panel .section-heading{flex-wrap:wrap;align-items:flex-start}
 .simulation-panel .section-heading h3{flex:0 0 auto}
 .simulation-feedback{white-space:normal;overflow:visible;text-overflow:clip;flex:1 1 130px;min-width:100px;line-height:1.35}
 .simulation-panel .counter{flex:0 0 auto}
}

/* v0.1.4 — reachability analysis is read-only; never expands the editing canvas. */
.reach-panel{margin-top:14px;padding:17px;min-width:0}
.reach-heading h3{font-size:16px;margin:0 0 5px;color:var(--ink)}
.reach-heading p{margin:0 0 12px;line-height:1.5}
.reach-controls{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin-bottom:12px}
.reach-controls label{font-size:13px;color:#485e74;font-weight:650}
.reach-controls input{width:76px;max-width:76px;padding:8px;border:1px solid #c9d7e3;border-radius:7px}
.reach-summary{font-size:12px;margin:5px 0;color:#455f78;font-weight:650;line-height:1.5}
.reach-warning{border-left:3px solid #d18a32;padding:8px 10px;background:#fff8ec;color:#765016;font-size:12px}
.reach-legend{display:flex;flex-wrap:wrap;gap:14px;margin:11px 0 6px;font-size:12px;color:#5e7388}
.reach-legend span:nth-child(1){color:#366891}.reach-legend span:nth-child(2){color:#247b59}.reach-legend span:nth-child(3){color:#a56023}
.reach-map-scroll{max-width:100%;overflow:auto;max-height:340px;border:1px solid #dfe8f0;border-radius:9px;background:#fff;overscroll-behavior:contain}
.reach-svg{display:block;max-width:none;user-select:none}
.reach-edge-line{stroke:#91a2b3;stroke-width:1.65;pointer-events:none}
.reach-edge-hit{stroke:transparent;stroke-width:21;pointer-events:stroke;cursor:pointer}
.reach-edge-label{font-size:10px;font-weight:700;fill:#476580;paint-order:stroke;stroke:white;stroke-width:4px;stroke-linejoin:round;pointer-events:none}
.reach-edge.reach-route .reach-edge-line{stroke:#df8e26;stroke-width:3}
.reach-node{cursor:pointer}
.reach-node circle{fill:#edf5ff;stroke:#5585b8;stroke-width:2.4}
.reach-node.is-complete circle{fill:#eaf8ef;stroke:#339569}
.reach-node.is-deadlock circle{fill:#fff0e4;stroke:#d48b3b}
.reach-node.is-selected circle{stroke:#124e9a;stroke-width:4.5}
.reach-node text{font-size:14px;font-weight:800;fill:#25415d;pointer-events:none}
.reach-node:focus circle,.reach-edge:focus .reach-edge-line{stroke:#185fb1;stroke-width:4}
.reach-selected{margin-top:12px;border-top:1px solid #e5ecf3;padding-top:12px;font-size:13px}
.reach-selected .chip-row{margin-top:8px}
.reach-selected .data-chip{white-space:normal}
.reach-trace{margin:10px 0 3px;overflow-wrap:anywhere;font-weight:650}
.reach-selected p.muted{margin-top:5px}
.reach-choices{padding-top:8px;font-size:13px}
.reach-choices .fire-actions{margin-top:7px}
.reach-actions{display:flex;gap:7px;flex-wrap:wrap;border-top:1px solid #e5ecf3;margin-top:14px;padding-top:12px}
.reach-actions .btn{padding:7px 9px}
.reach-preview-banner{font-size:13px;color:#365b86;border-left:3px solid #3776b7;background:#edf4fc;padding:8px 11px;margin-bottom:9px}
@media(max-width:750px){.reach-panel{padding:12px}.reach-controls{align-items:flex-end}.reach-map-scroll{max-height:310px}.reach-actions .btn{font-size:12px}}

.reach-scroll-hint{font-size:11px;margin:5px 0 1px}
/* v0.2.0 — logic circuits reuse the one SVG canvas, with named terminal pins. */
.logic-art{background:radial-gradient(circle at 25% 38%,#f0ecfe,#d9e1fb)}
.logic-art svg{stroke:#5b65a7}.logic-art svg rect,.logic-art svg circle{fill:#fff;stroke:#5b65a7}
.logic-art svg .logic-card-label{fill:#47548e;stroke:none;font-size:22px;font-weight:800}
.draw-node.input .node-shape{fill:#edf5ff;stroke:#447fae}
.draw-node.gate .node-shape{fill:#f4f0ff;stroke:#7b63b9}
.draw-node.output .node-shape{fill:#f3faf7;stroke:#418778}
.draw-node.logic-one .node-shape{fill:#e7f9ed;stroke:#21845a;stroke-width:3.3}
.draw-node.logic-zero .node-shape{fill:#f4f6f9;stroke:#60778f;stroke-width:2.8}
.draw-node.logic-unknown .node-shape{fill:#fff4e5;stroke:#bd8539;stroke-width:3}
.draw-node.is-selected .node-shape,.draw-node.is-pending .node-shape{stroke:#2668bd;stroke-width:4.5}
.logic-node-type{font-size:16px;font-weight:800;fill:#283d56;pointer-events:none}
.logic-node-value{font-size:24px;font-weight:800;fill:#1e624a;pointer-events:none}
.logic-node-caption{font-size:15px;font-weight:700;fill:#273e58;paint-order:stroke;stroke:#fff;stroke-width:4px;pointer-events:none}
.logic-port{cursor:crosshair}
.logic-port-hit{fill:transparent;stroke:transparent;stroke-width:3;pointer-events:all}
.logic-port-pin{fill:#fff;stroke:#45719e;stroke-width:2.3;pointer-events:none}
.logic-port:hover .logic-port-pin{fill:#ffcc72;stroke:#a36c0c}
.logic-port-name{font-size:11px;font-weight:800;fill:#48627e;pointer-events:none}
.edge-signal-one{stroke:#149060;stroke-width:4.5}
.edge-signal-zero{stroke:#71869b;stroke-width:3}
.edge-signal-unknown{stroke:#d19645;stroke-width:3;stroke-dasharray:8 5}
.logic-switches{display:flex;flex-wrap:wrap;gap:7px}
.logic-switch{border:1px solid #7fa6ce;border-radius:8px;background:#edf5ff;color:#194b7a;padding:8px 14px;font-size:14px;font-weight:800}
.logic-switch:hover{background:#dbeafa}
.logic-truth-table{border-collapse:collapse;width:100%;font-size:13px;font-variant-numeric:tabular-nums;text-align:center}
.logic-truth-table th,.logic-truth-table td{border:1px solid #dce5ed;padding:6px 10px}
.logic-truth-table th{background:#edf3fa;color:#31536f}
.logic-truth-table tr.is-current-row{background:#dff2e9;color:#165c42;font-weight:800}
.logic-table-scroll{overflow-x:auto;max-height:350px;overflow-y:auto;border:1px solid #dce5ed;border-radius:8px;margin-top:9px}
#cs-lab[data-mode="logic"] .canvas-stage{height:clamp(275px,39vh,340px)}
#cs-lab[data-mode="logic"] .petri-quick-fire{border-top:1px solid #dbe5ee}
@media(max-width:750px){#cs-lab[data-mode="logic"] .canvas-stage{height:clamp(245px,34vh,282px)}.logic-switch{font-size:13px;padding:7px 10px}}

/* Three equally prominent modules on wide screens; stack on phones. */
@media(min-width:1060px){.home-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v0.2.1 — ANSI logic symbols, while keeping the model and terminal positions unchanged. */
.logic-gate-symbol .node-shape{stroke-linejoin:round}
.logic-lead{fill:none;stroke:#607f9b;stroke-width:2.7;stroke-linecap:round;pointer-events:none}
.logic-xor-accent{fill:none;stroke:#627caa;stroke-width:2.7;stroke-linecap:round;pointer-events:none}
.logic-inversion-bubble{fill:#fff;stroke:#627caa;stroke-width:2.8;pointer-events:none}
.logic-one .logic-xor-accent,.logic-one .logic-inversion-bubble{stroke:#21845a}
.logic-zero .logic-xor-accent,.logic-zero .logic-inversion-bubble{stroke:#60778f}
.logic-unknown .logic-xor-accent,.logic-unknown .logic-inversion-bubble{stroke:#bd8539}
.draw-node.gate .logic-node-type{font-size:13px;letter-spacing:.01em}
.draw-node.gate .logic-node-value{font-size:18px}
.logic-port-name{paint-order:stroke;stroke:#fff;stroke-width:3.2px;stroke-linejoin:round}

.logic-art svg path{fill:none}
.logic-art svg .logic-card-body{fill:#fff;stroke:#5b65a7;stroke-width:3}
/* Allow clicking anywhere within the symbol to select the gate. */
.logic-node-type,.logic-node-value{pointer-events:none}

/* v0.3.0 – Graph lessons: fixed diagram, stack, components and cycle witnesses. */
.graph-endpoints[hidden]{display:none!important}
.draw-node.component-1 .node-shape{fill:#e7f3ff;stroke:#3774b6;stroke-width:3.3}
.draw-node.component-2 .node-shape{fill:#eaf8ee;stroke:#2a9169;stroke-width:3.3}
.draw-node.component-3 .node-shape{fill:#fff1df;stroke:#b87c2d;stroke-width:3.3}
.draw-node.component-4 .node-shape{fill:#f2ebff;stroke:#8960bd;stroke-width:3.3}
.draw-node.component-5 .node-shape{fill:#ffe9f0;stroke:#b95c83;stroke-width:3.3}
.draw-node.component-6 .node-shape{fill:#e8f7f7;stroke:#2b8b91;stroke-width:3.3}
.draw-node.is-active-component .node-shape{stroke:#16a48e;stroke-width:5}
.draw-node.is-ordered .node-shape{fill:#e7f2ff;stroke:#407cb8;stroke-width:3.4}
.draw-node.is-cycle .node-shape{fill:#ffe7dd;stroke:#c94538;stroke-width:5}
.draw-edge.edge-cycle .edge-line{stroke:#c94538;stroke-width:4.5}
.graph-component-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.graph-component-chip{border-radius:6px;border:1px solid #d1deeb;padding:5px 9px;font-size:13px;font-weight:650;background:#f4f7fc;color:#294663}
.graph-component-chip.component-1{background:#e7f3ff;border-color:#b9d5f2}
.graph-component-chip.component-2{background:#eaf8ee;border-color:#bfe3ce}
.graph-component-chip.component-3{background:#fff1df;border-color:#f0d2aa}
.graph-component-chip.component-4{background:#f2ebff;border-color:#d4c1f0}
.graph-component-chip.component-5{background:#ffe9f0;border-color:#f1bfce}
.graph-component-chip.component-6{background:#e8f7f7;border-color:#b2e0e0}
.graph-progress-note{margin:9px 0 4px;font-size:13px;color:#516a83}

.draw-node.is-stacked .node-shape{stroke:#6283c0;stroke-width:4}
.draw-node.is-current .node-shape{stroke:#db8126;stroke-width:5}

/* MST feedback: accepted orange, current candidate blue, cycle rejection red dashed. */
.draw-edge .edge-mst-rejected{stroke:#c45548;stroke-width:3;stroke-dasharray:7 5}
.draw-edge .edge-mst-candidate{stroke:#3980b8;stroke-width:3}
.draw-edge.edge-mst-rejected .edge-weight-bg{stroke:#d9a6a0}
.draw-edge.is-path .edge-weight-bg{stroke:#db882e}
.graph-endpoints label[hidden]{display:none!important}
