/* ACE Complexity Lab. Uses the site palette: ink #10233a, blue #336699, orange #f39510. */
.lab .lab-toc{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:22px;font-weight:700;font-size:14px}
.lab .lab-toc a{color:#336699;text-underline-offset:3px}
.lab-alert{border-left:4px solid #f39510;background:#fff7ea;padding:12px 16px;border-radius:8px;color:#10233a;max-width:75ch}
.lab-panel{background:#fff;border:1px solid #dbe4ef;border-radius:14px;padding:clamp(16px,3vw,26px);margin-top:26px;box-shadow:0 12px 30px #10233a0d}
.lab-panel h3{margin-top:0}
.lab-panel p,.lab-steps li{color:#33465c;max-width:75ch}
.lab-steps{max-width:80ch;padding-left:22px;display:grid;gap:10px;color:#33465c}
.lab-controls,.lab-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin:12px 0}
.lab label{font-weight:700;font-size:14px;color:#10233a}
.lab fieldset{border:1px solid #dbe4ef;border-radius:10px;padding:12px 16px;margin:0;display:grid;gap:8px;min-width:0}
.lab fieldset.lab-row{display:flex}
.lab legend{font:700 15px/1.2 'Bricolage Grotesque','Open Sans',sans-serif;color:#10233a;padding:0 6px}
.lab input[type=range]{width:min(100%,340px);accent-color:#336699}
.lab input[type=number],.lab select,.lab textarea{font:inherit;font-size:15px;border:1px solid #9fb3c8;border-radius:8px;padding:7px 10px;background:#fff;color:#10233a;max-width:100%}
.lab input[type=number]{width:7em}
.lab textarea{width:100%;font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.lab :is(input,select,textarea,button,a,[tabindex]):focus-visible{outline:3px solid #f39510;outline-offset:2px}
.lab-btn{font:700 14px/1 'Open Sans',sans-serif;padding:11px 15px;border-radius:8px;border:2px solid #10294b;background:#fff;color:#10233a;cursor:pointer;min-height:44px}
.lab-btn:hover{background:#eef6fc}.lab-btn:disabled{opacity:.5;cursor:not-allowed}
.lab-btn.primary-lab{background:#336699;color:#fff}.lab-btn.primary-lab:hover{background:#4079ab}
.lab-btn[aria-pressed=true]{background:#10233a;color:#fff}
.lab-grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:20px;align-items:start}
.lab-help{font-size:14px;color:#46566a}
.lab-results{margin-top:14px}
.lab-big{font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere;background:#f4f7fb;border-radius:8px;padding:10px 12px;max-height:9em;overflow:auto}
.lab-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0}
.lab-metrics div{background:#f4f7fb;border:1px solid #dbe4ef;border-radius:10px;padding:10px 12px}
.lab-metrics dt{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#46566a}
.lab-metrics dd{margin:2px 0 0;font:700 20px/1.3 'Bricolage Grotesque','Open Sans',sans-serif;color:#10233a;overflow-wrap:anywhere}
.lab .good{color:#17714f;font-weight:700}.lab .bad{color:#b3261e;font-weight:700}
.lab-scroll{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
.lab table{border-collapse:collapse;font-size:14px;margin:10px 0;min-width:100%}
.lab th,.lab td{border-bottom:1px solid #dbe4ef;padding:6px 10px;text-align:left;font-variant-numeric:tabular-nums}
.lab caption{text-align:left;font-weight:700;padding-bottom:6px;color:#10233a}
.lab tr.cur{background:#fff7ea}
.lab code{overflow-wrap:anywhere}
.lab-figure{margin:18px 0 8px}.lab-figure svg{width:100%;height:auto;display:block}
.lab-figure figcaption{font-size:14px;color:#46566a;margin-top:6px}
.lab svg{font-size:12px}.lab svg text{font-family:'Open Sans',sans-serif;fill:#46566a}
.lab svg .grid{stroke:#e3eaf2}.lab svg .cursor{stroke:#f39510;stroke-dasharray:4 3}
.lab svg .series{fill:none;stroke-width:2.5}
.lab .s0{stroke:#b3261e;fill:#b3261e}.lab .s1{stroke:#336699;fill:#336699}.lab .s2{stroke:#17714f;fill:#17714f}
.lab svg .series.s1{stroke-dasharray:7 4}.lab svg path.series{fill:none}
.lab svg text.lbl{font-weight:700;stroke:none}
.lab-tag{display:inline-block;font:700 12px/1.2 'Open Sans',sans-serif;letter-spacing:.08em;text-transform:uppercase;background:#fff0dc;color:#7a3f00;border-radius:6px;padding:6px 9px}
.lab-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px}
.lab-legend span:before{content:"";display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px;vertical-align:-1px;background:var(--c)}
.k-dec{--c:#336699}.k-unit{--c:#f39510}.k-conf{--c:#b3261e}.k-sat{--c:#17714f}.k-fail{--c:#8a99ab}.k-prune{--c:#c9d4e0}
.lab-tree{border:1px solid #dbe4ef;border-radius:10px;background:#fbfcfe;max-height:520px;overflow:auto}
.lab-tree svg{display:block}
#c-svg .tn{opacity:0;transition:opacity .25s ease}
#c-svg .tn.on{opacity:1}
#c-svg .edge{stroke:#9fb3c8;stroke-width:1.5}
#c-svg .prune{stroke:#c9d4e0;stroke-width:2;stroke-dasharray:3 3}
#c-svg .node{fill:#336699;stroke:#fff;stroke-width:2}
#c-svg .st-conflict .node{fill:#b3261e}#c-svg .st-sat .node{fill:#17714f;r:12}#c-svg .st-failed .node{fill:#8a99ab}
#c-svg .units{fill:#a35a00;font-weight:700;font-size:11px}
#c-svg .elbl{font-size:11px}
.lab-log{font-size:14px;max-height:260px;overflow:auto;color:#33465c}
#d-graph{width:100%;max-width:460px;height:auto;display:block}
#d-graph .fe{stroke:#9fb3c8;stroke-width:1.2}#d-graph .fe.neg{stroke-dasharray:1 3}
#d-graph .fe.cross{stroke:#f39510;stroke-width:2;stroke-dasharray:6 4}
#d-graph .fc{fill:#10233a}#d-graph .fc.g1{fill:#5a7d9f}
#d-graph .fv circle{fill:#336699;stroke:#fff;stroke-width:2}#d-graph .fv.g1 circle{fill:#17714f}
#d-graph .fv.bnd circle{stroke:#f39510;stroke-width:3}
#d-graph .fv text{fill:#fff;font-weight:700;font-size:10px;pointer-events:none}
#d-graph .fv{cursor:pointer}#d-graph .fv:focus{outline:none}#d-graph .fv:focus-visible circle{stroke:#10233a;stroke-width:4}
#d-graph .gl{font-weight:700}#d-graph .gl.hi{fill:#a35a00}
.k-b0:before,.k-b1:before{content:"";display:inline-block;width:12px;height:12px;margin-right:6px;vertical-align:-1px;background:#8a99ab}
.k-b1:before{background:#336699}
.lab svg .bar.b0{fill:#8a99ab}.lab svg .bar.b1{fill:#336699}.lab svg .whisk{stroke:#10233a;stroke-width:1.5}
@media(max-width:600px){.lab-panel{padding:14px}.lab-metrics dd{font-size:17px}.lab .lab-row>*{flex:1 1 auto}}
@media(prefers-reduced-motion:reduce){#c-svg .tn{transition:none}}
