:root{color-scheme:light;--ink:#242921;--muted:#61675d;--line:#dcded4;--paper:#f8f8f2;--green:#28543d;--soft:#e7eee0;--white:#fff;--radius:12px}
*{box-sizing:border-box}
body{margin:0;min-height:100dvh;background:var(--paper);color:var(--ink);font:14px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:focus-visible,textarea:focus-visible{outline:2px solid var(--green);outline-offset:3px}
button:disabled{opacity:.45;cursor:default}
[data-icon]{display:inline-flex;align-items:center}
[data-icon] svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.top{height:69px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,4vw,60px);background:#fcfcf8}
.brand,.top-right,.panel-title{display:flex;align-items:center}
.brand{gap:0;font-size:20px;font-weight:750;letter-spacing:-.7px}
.brand>span:last-child{color:var(--green)}
.mark{display:grid;place-items:center;width:34px;height:34px;margin-right:10px;border-radius:9px;background:var(--green);color:#fff;font-size:23px;font-weight:400}
.top-right{gap:22px}
.workspace-label{color:var(--muted);font-size:13px}
.outline,.quiet,.examples button,.modes button,.zoom button{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:transparent;border:0}
.outline{border:1px solid var(--line);border-radius:8px;padding:8px 12px;background:var(--white);font-size:13px;font-weight:600}
.outline:hover,.examples button:hover,.quiet:hover,.zoom button:hover{background:var(--soft)}
main{width:min(1320px,calc(100% - 80px));margin:auto}
.intro{padding:47px 0 32px}
.kicker{display:flex;align-items:center;gap:8px;color:var(--green);font-size:11px;font-weight:750;letter-spacing:.15em}
.kicker span{width:15px;height:1px;background:var(--green)}
h1{margin:11px 0 8px;font:normal clamp(42px,5.3vw,77px)/1.08 Georgia,serif;letter-spacing:-.058em}
h1 em{color:var(--green);font-weight:normal}
h1 em span{color:#78926b}
.intro p{margin:0;color:var(--muted);font-size:15px;line-height:1.65}
.workbench{display:grid;grid-template-columns:minmax(285px, .77fr) minmax(0,1.43fr);gap:18px}
.panel{min-width:0;background:var(--white);border:1px solid var(--line);border-radius:var(--radius);display:flex;flex-direction:column;overflow:hidden}
.panel-head{min-height:63px;padding:0 19px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ebede5;gap:10px}
.panel-title{gap:10px}
.step{display:grid;place-items:center;width:30px;height:29px;border-radius:7px;background:var(--soft);color:var(--green);font:600 12px ui-monospace,monospace}
h2{font-size:15px;margin:0;font-weight:700;letter-spacing:-.01em}
.quiet{padding:5px 8px;border-radius:5px;color:var(--muted);font-size:12px}
.input-wrap{margin:17px 18px 0;border:1px solid var(--line);border-radius:9px;background:#fcfcf8;display:flex;flex-direction:column;flex:1}
.input-wrap:focus-within{border-color:var(--green)}
textarea{padding:14px;min-height:245px;flex:1;width:100%;border:0;resize:vertical;outline:none!important;background:transparent;line-height:1.65}
#count{align-self:flex-end;margin:0 12px 9px;font:11px ui-monospace,monospace;color:var(--muted)}
.examples{margin:15px 18px 0;color:var(--muted);font-size:12px}
.examples>div{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px}
.examples button{border:1px solid var(--line);border-radius:7px;padding:5px 8px;color:var(--ink)}
.examples svg{width:14px;height:14px;color:var(--green)}
.editor-footer{padding:16px 18px 18px}
#generate{width:100%;display:flex;align-items:center;justify-content:center;position:relative;gap:8px;min-height:44px;border:0;border-radius:8px;background:var(--green);color:white;font-weight:650}
#generate:hover:not(:disabled){background:#1b442f}
.shortcut{position:absolute;right:9px;border:1px solid #8daa99;border-radius:4px;padding:2px 5px;font-size:11px;font-weight:400}
.draft{border:1px solid #dfe7da;border-radius:5px;padding:4px 7px;color:var(--green);background:#f2f6ef;font:600 10px ui-monospace,monospace;letter-spacing:.05em}
.diagram-toolbar{padding:10px 15px;background:#fff}
.modes{display:inline-flex;gap:3px;padding:3px;background:#f1f2ec;border-radius:8px}
.modes button{border-radius:6px;padding:5px 9px;color:var(--muted);font-size:12px;white-space:nowrap}
.modes button:hover,.modes button[aria-pressed=true]{color:var(--green);background:white}
.modes button[aria-pressed=true]{box-shadow:0 1px 3px #24302724}
.canvas{position:relative;display:grid;place-items:center;min-height:334px;flex:1;margin:0 12px;border:1px solid #e3e5da;border-radius:9px;background:#fcfcf7 radial-gradient(#d6dbcd 1px,transparent 1px) 0 0/16px 16px;overflow:hidden}
#diagram{width:100%;height:100%;position:absolute;inset:0;overflow:auto;display:flex}
#diagram svg{display:block;flex:none;width:var(--scale,100%);height:var(--scale,100%);margin:auto}
.empty{margin:auto;padding:25px;text-align:center;color:var(--muted)}
.zoom{position:absolute;right:10px;bottom:10px;display:flex;background:white;border:1px solid var(--line);border-radius:7px;overflow:hidden}
.zoom button{height:28px;min-width:28px;font-size:15px}
.zoom #reset{font:11px ui-monospace,monospace;min-width:50px;border-inline:1px solid var(--line)}
.result-footer,footer{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px}
.result-footer{padding:10px 14px}
footer{padding:14px 1px 24px}
@media(max-width:800px){main{width:calc(100% - 36px)}.workbench{grid-template-columns:1fr}.intro{padding-top:32px}.canvas{min-height:370px}textarea{min-height:190px}}
@media(max-width:410px){.workspace-label,.shortcut,.desktop{display:none}.top{padding-inline:13px}.brand{font-size:17px}.mark{margin-right:6px}.outline{padding-inline:8px}.canvas{min-height:315px}.modes button{padding-inline:5px}}
[hidden]{display:none!important}
.top-right{gap:9px}
.workspace-label{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.generation{display:flex;align-items:center;justify-content:space-between;gap:10px}
.generation label{font-size:12px;color:var(--muted)}
.generation select,.provider-form input{min-width:0;background:#fcfcf8;border:1px solid var(--line);border-radius:7px;color:var(--ink);padding:6px 8px;font:inherit}
.generation select{max-width:75%;font-size:12px}
.ai-status{margin:6px 0 8px;min-height:1.4em;font-size:12px;color:var(--muted)}
#provider-dialog{width:min(500px,calc(100vw - 24px));max-height:90dvh;border:1px solid var(--line);border-radius:var(--radius);padding:20px;color:var(--ink)}
#provider-dialog::backdrop{background:#202b24a0}
.provider-head,.provider-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.provider-info{color:var(--muted);font-size:13px;margin:8px 0 14px}
.provider-form{display:grid;gap:7px;padding:10px 0;border-top:1px solid var(--line)}
.provider-form label{display:grid;gap:2px;font-size:12px}
.provider-state{color:var(--muted);font-size:12px}
@media(max-width:680px){.workspace-label{display:none}.top{height:auto;min-height:69px;gap:6px;padding-block:10px}.top-right{justify-content:flex-end;flex-wrap:wrap;gap:5px}.top-right .outline{font-size:11px;padding:6px}}
.kind-picker{display:flex;flex-wrap:wrap;gap:5px;margin:14px 18px 0}
.kind-picker button{background:#fcfcf8;border:1px solid var(--line);border-radius:7px;padding:6px 8px;font-size:12px}
.kind-picker button:hover,.kind-picker button[aria-pressed=true]{background:var(--soft);color:var(--green);border-color:#bacbb5}
.kind-picker+.input-wrap{margin-top:10px}
#screens{display:flex;flex-wrap:wrap}
#screens button{white-space:normal;text-align:left}
#screens:empty{display:none}
.canvas.prototype{min-height:410px}
.prototype #diagram{align-items:flex-start;padding-bottom:39px}
.prototype #diagram svg{width:min(var(--scale),var(--prototype-width));height:auto;margin:0 auto}
