:root{font:13px/1.5 Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#243047;background:#f0f3f8;--split:40%;--accent:#5863d9}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #dce2ec;border-radius:7px;background:#fff;padding:7px 11px;color:#40506b}button:hover{background:#eff1ff;border-color:#b8bfe7}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.primary{background:var(--accent);color:#fff;border-color:var(--accent)}header{height:65px;background:#fff;border-bottom:1px solid #dde3ee;padding:0 22px;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;gap:10px;align-items:center;font-size:20px;color:#5863d9}.brand b{font-size:17px;color:#25314b;letter-spacing:-.5px}.brand span{font-size:9px;letter-spacing:1.5px;color:#8994a9;margin-left:18px}.actions{display:flex;gap:7px}main{height:calc(100vh - 96px);display:grid;grid-template-columns:var(--split) 8px 1fr;padding:14px}.panel{background:#fff;border:1px solid #dbe2ed;border-radius:11px;overflow:hidden;min-width:0;min-height:0;display:flex;flex-direction:column;box-shadow:0 3px 12px #24395b04}.panelhead{height:49px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 17px;border-bottom:1px solid #e6eaf1;font-size:10px;letter-spacing:1px}.panelhead span{font-size:11px;letter-spacing:0;color:#8a95a9}.panelhead b{color:#5b6880}#editor{flex:1;overflow:auto;background:#fbfcff}.cm-editor{height:100%;font:13px/1.9 SFMono-Regular,Consolas,monospace}.cm-scroller{overflow:auto!important}.cm-gutters{background:#f6f8fc!important;border:0!important;color:#a0abc0!important}.cm-content{padding:17px 0}.cm-line{padding:0 16px}.cm-focused{outline:none!important}.cm-activeLine{background:#eef1f96b!important}footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #e6eaf1;padding:9px 13px;color:#8a95a9;font-size:10px;min-height:34px}.status{height:31px;padding:5px 20px;display:flex;justify-content:space-between;color:#8490a5;font-size:11px}nav{display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid #e6eaf1;flex-wrap:wrap}nav button{font-size:11px}.spacer{flex:1}#canvas{flex:1;position:relative;overflow:hidden;background-color:#f7f9fd;background-image:radial-gradient(#d9e0ed .8px,transparent .8px);background-size:20px 20px;outline:none;min-height:160px}#canvas:focus{box-shadow:inset 0 0 0 2px #7f88e3}#scene{position:absolute;top:35px;right:35px;bottom:35px;left:35px;transform-origin:center;display:flex;align-items:center;justify-content:center;pointer-events:none}#scene svg{max-width:100%!important;max-height:100%;width:100%;height:100%;overflow:visible;pointer-events:auto}g.node{cursor:pointer}.selected>rect,.selected>polygon,.selected>circle,.selected>path,.selected>ellipse{stroke:#6259e8!important;stroke-width:3.5px!important;filter:drop-shadow(0 2px 5px #6260d933)}.flowchart-link{pointer-events:stroke;cursor:pointer;stroke-width:2.5px!important}.selected-edge{stroke:#6759eb!important;stroke-width:4px!important}.handle{position:absolute;width:10px;height:10px;border:2px solid #6263da;border-radius:50%;background:#fff;padding:0;transform:translate(-50%,-50%);pointer-events:auto;cursor:crosshair}#handles{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}#marquee{position:absolute;display:none;border:1px solid #6b6fe0;background:#686cec15;pointer-events:none}#notice{display:none;background:#fff6df;border-bottom:1px solid #f1d89d;padding:9px 14px;color:#856029;font-size:11px;max-height:100px;overflow:auto}#notice.show{display:block}#divider{cursor:col-resize}#menu{position:fixed;z-index:10;padding:6px;background:#fff;border:1px solid #dce2ec;box-shadow:0 12px 35px #24304726;border-radius:10px;width:240px}#menu button{display:block;text-align:left;width:100%;border:0;padding:9px}dialog{border:1px solid #dce2ec;border-radius:14px;padding:24px;width:450px;max-width:90vw;box-shadow:0 20px 80px #18233d44;color:#25314b}dialog::backdrop{background:#1d294c44;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}h2{font-size:18px;margin:0 0 18px}label{display:block;font-size:12px;color:#69768e;margin-bottom:15px}input,select{display:block;width:100%;border:1px solid #dce2ec;padding:10px;border-radius:7px;background:#fff;color:#27354e;margin-top:5px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.error{color:#af4545}#shape-list{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:45vh;overflow:auto;margin:14px 0}#shape-list button{text-align:left}#more{margin-right:8px}.stacked{grid-template-columns:1fr;grid-template-rows:40% 8px 1fr}.stacked #divider{cursor:default}@media(max-width:850px){.brand span{display:none}header{padding:0 12px}.actions button{font-size:10px;padding:6px}main{grid-template-columns:1fr;grid-template-rows:40% 8px 1fr;padding:8px}.panelhead{height:35px}.status span:last-child{display:none}footer span:last-child{display:none}}#menu .context-shapes{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin-bottom:4px}#menu .context-shapes button{font-size:10px;padding:7px;background:#f5f6fc;border-radius:5px}#menu{max-height:calc(100vh - 20px);overflow:auto}#menu .compact-shapes{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;max-height:230px;overflow:auto;padding:3px}#menu .compact-shapes button{height:38px;padding:3px;display:grid;place-items:center;background:#f5f6fc;border:1px solid transparent}#menu .compact-shapes button[aria-pressed=true]{border-color:#858ce4;background:#e9ebff}#menu .compact-shapes svg{width:29px;height:29px}#menu .node-fields{padding:5px}#menu .node-fields label{margin:7px 0;font-size:10px}#menu .node-fields input{padding:7px;font-size:12px}#menu .node-fields .error{font-size:11px;margin:4px 0}#menu .node-fields .primary{text-align:center;background:var(--accent);color:#fff}#menu details{border-top:1px solid #e8ebf3;padding-top:5px;margin-top:5px}#menu summary{cursor:pointer;color:#79859a;font-size:11px;padding:4px}#menu [hidden]{display:none!important}#shape-list{grid-template-columns:repeat(6,1fr)}#shape-list button{padding:5px;display:grid;place-items:center}#shape-list svg,#menu .context-shapes svg{width:29px;height:29px}#menu{overscroll-behavior:contain;max-width:calc(100vw - 16px);overflow:auto}#menu .compact-shapes{max-height:min(230px,30vh)}#menu .node-fields input{min-width:0}#menu summary{-webkit-user-select:none;user-select:none}g.cluster{cursor:pointer}.selected-group>rect{stroke:#6259e8!important;stroke-width:3px!important;stroke-dasharray:7 3}.drop-target>rect{stroke:#249573!important;stroke-width:4px!important;fill:#dcfce7!important}#drag-hint{position:fixed;z-index:30;pointer-events:none;background:#25324a;color:#fff;padding:6px 10px;border-radius:6px;font-size:11px;box-shadow:0 4px 16px #1b284333}g.node{-webkit-user-select:none;user-select:none}g.node[data-subgraph-id]>rect{stroke-dasharray:6 3;fill:#f5f6fc}.shortcut-trigger{display:flex;gap:7px;align-items:center}kbd{font:10px/1.5 ui-monospace,SFMono-Regular,monospace;border:1px solid #d7ddea;border-bottom:2px solid #cbd3e4;border-radius:5px;padding:2px 6px;background:#f7f9fd;color:#53617a;white-space:nowrap}.shortcut-dialog{width:790px;max-height:calc(100dvh - 32px);padding:26px;overflow:auto}.shortcut-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:22px}.shortcut-heading h2{font-size:23px;letter-spacing:-.6px;margin:4px 0}.shortcut-heading p{margin:0;color:#8993a5;font-size:12px}.shortcut-eyebrow{font-size:9px;letter-spacing:1.6px;color:#6974d7;font-weight:700}.shortcut-close{font-size:22px;line-height:22px;padding:3px 9px;border:0;color:#8490a5}.shortcut-sections{display:grid;grid-template-columns:1fr 1fr;gap:14px}.shortcut-sections section{background:#f7f9fd;border:1px solid #e6eaf3;border-radius:10px;padding:13px}.shortcut-sections h3{font-size:11px;letter-spacing:.04em;color:#6672a0;margin:0 0 8px}.shortcut-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;font-size:11px;padding:6px 0}.shortcut-row small{display:block;font-size:10px;line-height:1.5;color:#919bae;margin-top:3px;max-width:190px}.key-badges{display:flex;gap:3px;flex-wrap:wrap;justify-content:flex-end}.shortcut-note{background:#efefff;border:1px solid #e2e2fc;border-radius:8px;padding:10px 12px;font-size:10px;color:#727c9f;margin-top:16px}.shortcut-done{display:block;margin:16px 0 0 auto;padding:8px 25px}@media(max-width:600px){.shortcut-sections{grid-template-columns:1fr}.shortcut-dialog{padding:18px}.shortcut-heading p{max-width:230px}}.colour-panel{border-top:1px solid #e8ebf3;border-bottom:1px solid #e8ebf3;padding:9px 5px;margin:5px 0}.colour-heading{display:flex;align-items:center;justify-content:space-between;font-size:10px;font-weight:600;color:#6a7790;margin-bottom:7px}.colour-current{font-weight:400;color:#929caf}.colour-swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}#menu .colour-swatch{height:27px;padding:0;border-radius:6px;border:1px solid #c8d0df;display:grid;place-items:center;text-align:center;font-size:16px;line-height:1;min-width:0}#menu .colour-swatch[data-colour=default]{background:repeating-linear-gradient(135deg,#fff 0,#fff 5px,#e9edf6 5px,#e9edf6 10px)}#menu .colour-swatch[aria-pressed=true]{outline:2px solid #6571d8;outline-offset:1px}#menu .colour-swatch:hover{box-shadow:0 0 0 2px #7483c83b}#menu .colour-swatch:focus-visible{outline:2px solid #5763d8;outline-offset:2px}html,body,#app{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}main{min-height:0}.source,.preview{min-height:0}#canvas{min-height:0;overscroll-behavior:none;touch-action:none}#editor,.cm-scroller{overscroll-behavior:contain}#menu,dialog{overscroll-behavior:contain}#scene{top:24px;right:24px;bottom:24px;left:24px}.connection-hit{fill:none;stroke:transparent;stroke-width:14px;pointer-events:stroke;vector-effect:non-scaling-stroke;cursor:pointer}.flowchart-link.edge-thickness-thick{stroke-width:4px!important}.flowchart-link.selected-edge{stroke-width:3px!important}.flowchart-link.edge-thickness-thick.selected-edge{stroke-width:5px!important}#menu .connection-editor{padding:5px}#menu .connection-heading{font-size:12px;font-weight:700;color:#536280}.connection-endpoints{font:10px ui-monospace,monospace;color:#909bb0;margin:4px 0 12px;overflow-wrap:anywhere}#menu .connection-editor label{font-size:10px;margin:7px 0}#menu textarea{font:12px/1.5 inherit;width:100%;resize:vertical;min-height:54px;max-height:120px;border:1px solid #dce2ec;border-radius:7px;padding:7px;color:#27354e;background:#fff;margin-top:4px}.connection-ends{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}#menu .endpoint-toggle{display:flex;flex-direction:column;align-items:center;gap:2px;border:1px solid #e0e4ef;background:#f7f9fd;padding:7px;min-width:0;font-size:10px}#menu .endpoint-toggle[aria-pressed=true],#menu .connection-types button[aria-pressed=true]{border-color:#7d86db;background:#eeefff;color:#525cbd}.endpoint-icon{font-size:23px;line-height:24px}.endpoint-toggle[aria-pressed=false] .endpoint-icon{opacity:.2}.endpoint-toggle small{font:9px ui-monospace,monospace;color:#909bb0;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.connection-preview{height:35px;display:grid;place-items:center;color:#6974c8}.connection-preview svg{height:28px;width:100%}.connection-section-label{font-size:10px;color:#7a879e;margin:5px 0}.connection-types{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}#menu .connection-types button{border:1px solid #e1e6f0;border-radius:6px;background:#f8faff;padding:5px 3px;display:grid;place-items:center;font-size:10px}.connection-types svg{width:44px;height:14px}.connection-editor .error{font-size:10px}#menu .connection-editor>.primary{text-align:center;background:var(--accent);color:#fff;margin-top:9px}#menu textarea{font-family:inherit;font-size:12px;line-height:1.5}.context-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#6c7892;font-size:11px;font-weight:600;margin:0 0 6px;padding:0 4px}#menu .delete-icon{display:grid;place-items:center;width:29px;height:29px;padding:5px;background:#fff3f3;color:#d64755;border:1px solid #ffe1e3;border-radius:7px;flex:none}#menu .delete-icon:hover{background:#ffe4e6;border-color:#f4aeb7;color:#bf263a}.delete-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.autosave-feedback{padding:7px 5px 2px;font-size:10px;color:#969fb0}.autosave-feedback .error{font-size:10px;color:#bf4350;margin:3px 0 0}.context-editor[data-save-state=saving] .autosave-status{color:#7d89ae}.context-editor[data-save-state=invalid] .autosave-status{color:#bf4350}#menu .connection-editor{padding:4px}.context-editor .compact-shapes{margin-top:3px}#scene g.node,#scene g.node *{-webkit-user-select:none!important;user-select:none!important}main{height:calc(100dvh - 136px)}#key-hints{height:40px;display:flex;align-items:center;gap:14px;padding:0 20px;background:#fff;border-top:1px solid #dce2ec;color:#69768e;font-size:10px;overflow:hidden;-webkit-user-select:none;user-select:none}.hint-mode{flex:none;font-size:10px;font-weight:600;color:#5863a0;min-width:55px}.hint-keys{display:flex;align-items:center;gap:14px;overflow-x:auto;min-width:0;height:100%;scrollbar-width:thin}.key-hint{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;flex:none}.key-hint kbd{font:10px/1.4 ui-monospace,SFMono-Regular,monospace;padding:2px 5px;color:#53617c;background:#f6f8fc;border:1px solid #dce2ec;border-bottom-width:2px;border-radius:4px;box-shadow:0 1px 1px #24304705}@media(max-width:600px){#key-hints{padding:0 10px;gap:9px}.hint-keys{gap:10px}}#canvas,#canvas *,.canvas-dragging,.canvas-dragging *{-webkit-user-select:none!important;user-select:none!important}#canvas img{-webkit-user-drag:none}.zoom-controls{position:absolute;right:10px;bottom:10px;z-index:2;display:flex;flex-direction:column;align-items:center;gap:5px;padding:7px 3px;width:52px;height:235px;max-height:calc(100% - 20px);overflow-y:auto;scrollbar-width:thin;border:1px solid #dce2ec;border-radius:999px;background:#ffffffed;box-shadow:0 2px 9px #24304712;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.zoom-controls button{display:grid;place-items:center;flex:none;min-width:28px;height:25px;border:0;border-radius:999px;padding:0 7px;font-size:15px;line-height:1;background:transparent}.zoom-controls #fit{font-size:10px;width:42px;margin-top:2px;background:#eff1ff}.zoom-controls button:hover{background:#e7eaff}.zoom-controls #zoom-preset{flex:none;width:46px;margin:0;padding:4px 0;border:0;border-radius:999px;background:transparent;font-size:10px;color:#53617c;cursor:pointer;text-align:center}.zoom-controls #zoom-slider{writing-mode:vertical-lr;direction:rtl;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto;flex:1;min-height:50px;width:20px;margin:0;padding:0;border:0;accent-color:#6263da;background:transparent;cursor:ns-resize}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.brand .tools-home{display:inline-flex;align-items:center;gap:5px;text-decoration:none;color:#7d87a0;font-size:17px;margin-right:4px}.brand .tools-home span{display:inline;font-size:11px;letter-spacing:0;margin:0;color:inherit}.brand .tools-home:hover{color:#5863d9}.brand .brand-separator{display:inline;font-size:15px;letter-spacing:0;margin:0 3px 0 0;color:#c9cfdd}@media(max-width:600px){.brand{gap:5px}.brand b{font-size:13px}.brand .tools-home span{display:none}.brand .brand-separator{margin-right:0}.actions{gap:3px}.actions button{padding:6px 5px;font-size:9px}}@font-face{font-family:Inter;src:url(/fonts/inter-latin.woff2) format("woff2");font-style:normal;font-weight:100 900;font-display:swap}@font-face{font-family:Bricolage Grotesque;src:url(/fonts/bricolage-latin.woff2) format("woff2");font-style:normal;font-weight:200 800;font-display:swap}:root{--core-olive:#3f4a24;--core-cream:#f6efe3;--core-orange:#b34a00;--bg-subtle:#dedaca;--fg-muted:#565f3d;--border:#c4c3b0}:root{color:var(--core-olive);background:var(--core-cream);--accent:var(--core-orange)}body,header,.panel,#menu,dialog,#editor,#key-hints{background:var(--core-cream);color:var(--core-olive)}header,.panel,#menu,dialog,#key-hints{border-color:var(--border)}header .brand,header .brand b{color:var(--core-olive)}.brand b,h2,.shortcut-heading h2{font-family:Bricolage Grotesque,system-ui,sans-serif}.brand .tools-home,.brand .brand-separator,.status,.context-heading,.node-fields label,.connection-editor label,.connection-section-label,.connection-endpoints,.hint-mode,.autosave-feedback{color:var(--fg-muted)}button,input,select,#menu textarea{background:var(--core-cream);color:var(--core-olive);border-color:var(--border)}button:hover,#menu button:hover{background:var(--bg-subtle);border-color:#888d71}.primary{background:var(--core-orange);color:var(--core-cream);border-color:var(--core-orange)}#canvas{background-color:var(--core-cream);background-image:radial-gradient(#c4c3b0 .8px,transparent .8px)}#canvas:focus{box-shadow:inset 0 0 0 2px var(--core-orange)}.cm-gutters{background:#eee8da!important;color:#888d71!important}.cm-activeLine{background:#dedaca66!important}.cm-activeLineGutter{background:#dedaca!important}.cm-content{caret-color:var(--core-olive)}#menu .compact-shapes button,#menu .connection-types button,#menu .endpoint-toggle{background:#eee8da;border-color:var(--border);color:var(--core-olive)}#menu .compact-shapes button[aria-pressed=true],#menu .connection-types button[aria-pressed=true],#menu .endpoint-toggle[aria-pressed=true]{background:#dedaca;box-shadow:inset 0 0 0 1px var(--core-olive);border-color:var(--core-olive);color:var(--core-olive)}#menu .colour-panel{border-color:var(--border)}.colour-heading,.colour-current,#menu .connection-editor label{color:var(--fg-muted)}#menu .colour-swatch[aria-pressed=true]{outline-color:var(--core-olive)}#menu .delete-icon{background:#f4dfd4;color:#a12d1f;border-color:#dbb5a5}#menu .delete-icon:hover{background:#edd0c0}.zoom-controls{background:#f6efe3f2;border-color:var(--border);box-shadow:0 2px 9px #3f4a2412}.zoom-controls #zoom-preset{color:var(--core-olive)}.zoom-controls #zoom-slider{accent-color:var(--core-orange)}.zoom-controls button:hover{background:var(--bg-subtle)}.key-hint kbd,.key-badges kbd{color:var(--core-olive);background:#eee8da;border-color:var(--border)}#key-hints{color:var(--fg-muted)}.shortcut-sections section{border-color:var(--border)}.shortcut-sections h3,.shortcut-row,.shortcut-heading p{color:var(--core-olive)}.shortcut-note{background:var(--bg-subtle);border-color:var(--border);color:var(--fg-muted)}.shortcut-close,.shortcut-done{color:var(--core-olive)}.shortcut-done{color:var(--core-cream)}#marquee{border-color:var(--core-orange);background:#b34a0015}.handle{border-color:var(--core-orange);background:var(--core-cream)}.selected>rect,.selected>polygon,.selected>circle,.selected>path,.selected>ellipse{stroke:var(--core-orange)!important;filter:drop-shadow(0 2px 5px #b34a0020)}.selected-edge,.selected-group>rect{stroke:var(--core-orange)!important}.connection-preview{color:var(--core-olive)}.endpoint-toggle small{color:var(--fg-muted)}.brand .mermaid-mark{width:24px;height:24px;flex:none;border-radius:5px}@media(max-width:600px){.brand .mermaid-mark{width:20px;height:20px}}
