/* Desktop UI. Edit this file for widths above 750px. Independent from ui-mobile.css. */
/* Art direction: monochrome drafting desk. VARIANCE 6 / MOTION 3 / DENSITY 4. */
:root{font-family:'Golos Text',sans-serif;color:var(--project-text,#25272d);background:var(--project-background,#f6f7f9);font-synthesis:none;--accent:var(--project-accent,#4665cf);--accent-soft:var(--project-soft,#edf1fd);--border:var(--project-border,#e6e8ed);--muted:var(--project-muted,#767b86);--radius:12px}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none;transition:background .18s,color .18s,box-shadow .18s,transform .18s}button:disabled{opacity:.3;cursor:default}button:active:not(:disabled){transform:scale(.96)}button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.ui-icon{display:inline-block;width:20px;height:20px;background:currentColor;mask:var(--icon) center/contain no-repeat;-webkit-mask:var(--icon) center/contain no-repeat;flex-shrink:0}
header{height:72px;background:var(--project-surface,#fff);display:flex;align-items:center;padding:0 28px;gap:20px;border-bottom:1px solid var(--border);position:relative;z-index:6}.brand{display:flex;align-items:center;gap:10px;color:var(--project-text,#24272e);text-decoration:none;font-size:24px;font-weight:600;letter-spacing:-1.2px}.brandmark{position:relative;width:32px;height:34px;border:1.5px solid #2d3038;border-radius:5px;display:grid;place-items:center;font:italic 30px 'Neucha';transform:rotate(-7deg);background:var(--project-surface,#fff)}.brandmark span{position:absolute;right:3px;top:-2px;font-size:18px;color:var(--accent)}.brand-sub{font-size:12px;letter-spacing:.4px;font-weight:400;margin-left:-4px;margin-top:10px;color:#7d828c}.divider{height:24px;width:1px;background:var(--border)}.document-meta{font-size:12px;color:var(--project-muted,#89909c);margin-right:-10px}#title{border:0;width:260px;font-size:14px;font-weight:500;color:var(--project-text,#363a45);background:transparent;padding:6px}.saved{font-size:12px;color:var(--project-muted,#89909c)}.header-actions{margin-left:auto;display:flex;align-items:center;gap:22px}.plain{font-size:13px;color:var(--project-muted,#606672)}.plain span{margin-left:6px;border:1px solid var(--project-border,#d9dce3);border-radius:50%;display:inline-grid;place-items:center;width:18px;height:18px}.primary{display:inline-flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;background:#2b2f38;color:white;padding:12px 17px;border:1px solid #2b2f38;border-radius:7px;font-size:14px;font-weight:500}.primary:hover{background:#464c59}.primary .ui-icon{width:17px;height:17px}
.workspace{height:calc(100dvh - 104px);position:relative;display:flex}aside{position:absolute;z-index:5;left:20px;top:20px;bottom:88px;width:262px;background:var(--project-surface,#fff);border:1px solid var(--border);border-radius:var(--radius);padding:22px 17px 0;display:flex;flex-direction:column;box-shadow:0 4px 24px #222d4907;overflow:hidden}.library-heading{display:flex;align-items:center;justify-content:space-between}.library-heading h1{font-size:20px;font-weight:600;letter-spacing:-.6px;margin:0}.library-heading>span{font-size:12px;color:var(--project-muted,#788190);background:var(--project-soft,#f2f3f6);border-radius:4px;padding:3px 7px;font-variant-numeric:tabular-nums}.muted{font-size:12px;color:var(--project-muted,#7c8290);margin:8px 0 20px}.search{display:flex;align-items:center;gap:9px;border:1px solid var(--border);border-radius:6px;padding:11px 10px;background:var(--project-background,#fafbfc)}.search>.ui-icon{width:17px;height:17px;color:var(--project-muted,#8a909c)}.search input{border:0;outline:none;min-width:0;width:100%;font-size:14px;background:transparent;color:var(--project-text,#383e49)}.search input::placeholder{color:var(--project-muted,#89909c)}.search kbd{font:11px monospace;background:var(--project-surface,#fff);border:1px solid var(--project-border,#e1e4ea);padding:1px 5px;border-radius:3px;color:var(--project-muted,#939aa6)}.tabs{display:flex;gap:2px;margin-top:15px;border-bottom:1px solid var(--border);padding-bottom:13px}.tabs button{font-size:12px;padding:7px 10px;border-radius:5px;color:var(--project-muted,#747b89)}.tabs button.active{background:var(--accent-soft);color:var(--accent);font-weight:500}.collection{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--project-muted,#8a909c);margin:19px 1px 10px}.collection-count{font-variant-numeric:tabular-nums;font-size:11px}.icon-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;overflow:auto;flex:1;align-content:start;padding-bottom:16px;scrollbar-width:thin;scrollbar-color:#dfe2e9 transparent}.library-item{height:118px;border:1px solid transparent;border-radius:8px;background:var(--project-surface,#fff);padding:7px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.library-item:hover{background:var(--project-soft,#f4f6fc);border-color:#e5eafa}.library-item img{width:83px;height:83px;object-fit:contain;pointer-events:none}.library-item span{font-size:12px;line-height:1.3;color:var(--project-muted,#59616e);text-align:center}.sidebar-note{display:flex;align-items:center;gap:11px;border-top:1px solid var(--border);margin:0 -17px;padding:15px 17px;background:var(--project-background,#fcfcfd)}.note-key{font-size:22px;color:#8c96ab}.sidebar-note p{font-size:11px;line-height:1.6;color:var(--project-muted,#8a919e);margin:0}
main{flex:1;position:relative;overflow:hidden;touch-action:none;background-color:var(--project-background,#f8f9fb);background-image:radial-gradient(var(--project-grid,#d8dce5) .7px,transparent .7px);background-size:20px 20px}.canvas-label{position:absolute;top:28px;left:315px;display:flex;align-items:center;gap:12px;font-size:12px;color:var(--project-muted,#838b99);z-index:3;pointer-events:none}.canvas-document{font-weight:500;color:var(--project-muted,#707988)}.badge{font-size:11px;border-left:1px solid var(--project-border,#dce1e9);padding:0 12px;color:var(--project-muted,#a1a7b1)}#world{position:absolute;width:2400px;height:1800px;transform-origin:0 0}#connections{position:absolute;top:0;left:0;overflow:visible;pointer-events:none}#edges path{pointer-events:stroke;cursor:pointer}.node{position:absolute;width:184px;min-height:198px;display:flex;flex-direction:column;align-items:center;cursor:grab;border:1px solid transparent;border-radius:7px;padding:6px;user-select:none;z-index:2}.node.selected{border:1px solid var(--accent);background:#edf1fd60;box-shadow:0 0 0 3px #4665cf0b}.node img{width:164px;height:148px;object-fit:contain;pointer-events:none;mix-blend-mode:multiply}.node-label{font-family:'Neucha',cursive;font-size:20px;line-height:1.2;text-align:center;white-space:pre-wrap;max-width:200px;min-width:70px;padding:3px;cursor:text;outline:none}.node-label[contenteditable=true]{background:var(--project-surface,#fff);user-select:text;box-shadow:0 0 0 1px var(--accent);border-radius:4px}.node.block{min-height:76px;justify-content:center}.node.block:not(.selected){border-color:var(--project-border,#93a3c0);background:var(--project-surface,#fff)}.node.block .node-label{max-width:100%;overflow-wrap:anywhere}.node.text{min-height:40px;width:210px;justify-content:center}.port{position:absolute;width:10px;height:10px;background:var(--project-surface,#fff);border:1.5px solid var(--accent);border-radius:50%;opacity:0;cursor:crosshair;z-index:4}.node:hover .port,.node.selected .port,main.connect .port{opacity:1}.port.right{right:-6px;top:48%}.port.left{left:-6px;top:48%}.port.bottom{bottom:-6px;left:48%}.port.top{top:-6px;left:48%}.node.group{z-index:0;width:330px;height:360px;min-height:0;align-items:flex-start;border:1.5px dashed var(--node-color,#98a5bf);background:color-mix(in srgb,var(--node-color,#98a5bf) 4%,transparent);border-radius:12px;padding:0}.group .node-label{margin:-16px 0 0 16px;padding:5px 12px;background:var(--project-background,#f8f9fb);border-radius:4px;font:500 15px 'Golos Text';color:var(--project-muted,#657086);letter-spacing:.2px}.group.selected{outline:2px solid var(--accent)}
.tools{position:absolute;bottom:26px;left:calc(50% + 130px);transform:translateX(-50%);display:flex;gap:4px;align-items:center;background:var(--project-surface,#fff);border:1px solid var(--project-border,#e0e4ec);box-shadow:0 5px 20px #27365409;padding:7px;border-radius:11px;z-index:4}.tools button{width:42px;height:42px;border-radius:6px;display:grid;place-items:center;color:var(--project-muted,#7a8494);position:relative}.tools button .ui-icon{width:21px;height:21px}.tools button:hover:not(:disabled){background:#e9edf5;color:#354158;box-shadow:inset 0 0 0 1px #ced6e4}.tools button.active{background:var(--accent-soft);color:var(--accent)}.tools>span,.zoom>span{height:23px;width:1px;background:var(--border);margin:0 5px}.canvas-hint{position:absolute;bottom:103px;left:calc(50% + 130px);transform:translateX(-50%);font-size:12px;white-space:nowrap;color:var(--project-muted,#939baa);pointer-events:none}.canvas-hint span{padding:0 9px}.zoom{position:absolute;right:24px;bottom:33px;border:1px solid var(--project-border,#e0e4ec);border-radius:7px;padding:4px;display:flex;align-items:center;background:var(--project-surface,#fff);z-index:4}.zoom button{height:30px;min-width:29px;font-size:18px;color:var(--project-muted,#737e90);display:grid;place-items:center}.zoom .ui-icon{width:16px;height:16px}#zoom-value{font-size:12px;min-width:46px;font-variant-numeric:tabular-nums}.selection-panel{position:absolute;right:22px;top:75px;align-items:center;gap:13px;background:var(--project-surface,white);padding:12px;border:1px solid var(--border);border-radius:8px;z-index:4;font-size:12px;box-shadow:0 5px 20px #27365408}.selection-panel:not([hidden]){display:flex}.selection-panel>span{color:#7a8597}.swatches{display:flex;gap:7px}.swatches button{width:17px;height:17px;background:var(--swatch);border-radius:50%;border:2px solid var(--project-surface,#fff);outline:1px solid #dfe4ec}.selection-panel>button{display:grid;place-items:center;color:#8590a2;padding:3px}.selection-panel>button .ui-icon{width:18px;height:18px}.toast{position:absolute;bottom:160px;left:calc(50% + 130px);transform:translateX(-50%);background:var(--project-text,#303746);color:var(--project-surface,#fff);border-radius:7px;font-size:13px;padding:12px 18px;opacity:0;pointer-events:none;transition:opacity .2s;z-index:9}.toast.show{opacity:1}footer{height:32px;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 24px;font-size:11px;color:#929baa;background:var(--project-surface,#fff)}footer span{white-space:nowrap}footer #stats{font-variant-numeric:tabular-nums}dialog{border:1px solid var(--border);border-radius:12px;padding:35px;max-width:520px;color:#3a4352;box-shadow:0 20px 100px #26375422}dialog::backdrop{background:#27334b44;backdrop-filter:blur(3px)}dialog h2{font-size:25px;letter-spacing:-.7px}dialog ol{padding-left:22px;font-size:14px;line-height:1.7}dialog li{margin:12px 0}dialog p{font-size:12px;color:var(--project-muted,#788394);line-height:1.8}button.dialog-close:not(.primary){position:absolute;right:15px;top:12px;font-size:25px}.eyebrow{font-size:11px;letter-spacing:1px;color:#8b96a8}.empty-library{grid-column:1/-1;padding:30px 10px;font-size:14px;color:#7e899b;text-align:center}
@media(max-width:1150px){.saved,.plain,.document-meta{display:none}.tools{left:calc(50% + 120px)}.canvas-hint{display:none}.zoom{bottom:105px}.canvas-label{left:306px}.header-actions{gap:12px}}
@media(max-width:750px){header{height:64px;padding:0 16px;gap:12px}.brand{font-size:21px}.brand-sub,.divider,.canvas-label{display:none}#title{width:160px;font-size:12px;min-width:0}.header-actions{gap:0}.primary{padding:10px;font-size:12px}.workspace{height:calc(100dvh - 94px)}aside{left:10px;top:12px;bottom:92px;width:162px;padding:16px 10px 0}.library-heading h1{font-size:16px}.muted,.collection,.search kbd,.sidebar-note{display:none}.search{margin:15px 0;padding:8px}.search input{font-size:12px}.search>.ui-icon{width:14px;height:14px}.tabs{margin:0 0 12px;padding-bottom:10px;flex-wrap:wrap}.tabs button{font-size:11px;padding:5px 6px}.icon-grid{gap:0}.library-item{height:100px;padding:5px 2px}.library-item img{width:63px;height:63px}.library-item span{font-size:10px}.tools{left:50%;bottom:20px;gap:1px;padding:5px}.tools button{width:34px;height:36px}.tools>span{margin:0 3px}.tools button .ui-icon{width:19px;height:19px}.zoom{bottom:90px;right:12px}.selection-panel{right:10px;top:20px;gap:8px}.selection-panel>span{display:none}.toast{left:50%;bottom:160px;max-width:90%;text-align:center}footer{height:30px;padding:0 12px;font-size:10px}footer>span:last-child{display:none}}
@media(max-width:450px){header .brandmark{width:28px;height:30px}header .brand{font-size:19px;gap:7px}header #title{flex:1;width:70px}header .primary{font-size:0;padding:9px}header .primary>.ui-icon{width:19px;height:19px}.header-actions{flex-shrink:0}aside{width:116px;padding:14px 8px 0}.library-heading h1{font-size:14px}.library-heading>span,.tabs{display:none}.icon-grid{grid-template-columns:1fr}.library-item{height:95px}.library-item img{width:70px;height:70px}.library-item span{font-size:11px}.tools button{width:32px}.tools>span{margin:0 2px}footer{font-size:9px}}
@media(prefers-reduced-motion:reduce){button,.toast{transition:none}}

.canvas-hint{display:none}
/* Practice mode: a separate draft and a compact brief beside the canvas. */
.tasks-button{display:flex;align-items:center;gap:8px;border:1px solid var(--border);padding:10px 12px;border-radius:7px;font-size:13px;color:#4e586a;white-space:nowrap}.tasks-button:hover{background:var(--project-soft,#f3f5fa)}.tasks-button>.ui-icon{width:17px;height:17px}.task-count{font-size:10px;color:#6e7d9c;background:#edf1fa;padding:2px 5px;border-radius:3px}.tasks-dialog{width:min(760px,calc(100vw - 32px));max-width:760px;padding:38px}.tasks-dialog>h2{font-size:34px;line-height:1.1;letter-spacing:-1.3px;margin:18px 0 14px}.tasks-intro{max-width:460px}.task-card{display:grid;grid-template-columns:190px 1fr;border:1px solid var(--border);border-radius:9px;overflow:hidden;margin:24px 0}.task-card-art{position:relative;background:var(--project-soft,#f3f5fa);display:flex;align-items:center;justify-content:center}.task-card-art img{width:100px;height:120px;object-fit:contain}.task-card-art img+img{margin-left:-22px;margin-top:48px;transform:rotate(8deg)}.task-card-art>span{position:absolute;left:16px;top:16px;font:12px monospace;color:#9aa5ba}.task-card-details{padding:25px}.task-card-details h3{font-size:21px;letter-spacing:-.5px;margin:12px 0}.task-card-details p{font-size:14px;line-height:1.6;margin-bottom:20px}.tasks-preserve{border-top:1px solid var(--border);padding-top:16px;margin-bottom:0!important;font-size:12px!important}.task-level{font-size:11px;color:var(--project-muted,#8b95a5)}.task-panel{position:absolute;right:20px;top:20px;bottom:88px;width:302px;border:1px solid var(--border);border-radius:12px;background:var(--project-surface,#fff);z-index:5;padding:19px 20px;overflow:auto;box-shadow:0 4px 24px #222d4907}.task-panel[hidden]{display:none}.task-panel-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--accent);margin-bottom:19px;font-weight:500}.task-panel-top button{font-size:23px;color:#8a94a5;line-height:1}.task-panel h2{font-size:25px;letter-spacing:-.8px;line-height:1.15;margin:10px 0 15px}.task-story{font-size:13px;line-height:1.7;color:var(--project-muted,#727d8f);margin:0 0 18px}.task-requirements{padding:14px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.task-requirements h3{font-size:12px;font-weight:500;margin:0 0 8px}.task-requirements p{font-size:12px;color:var(--project-muted,#8993a4);line-height:1.6;margin:0}.task-progress{display:flex;justify-content:space-between;font-size:11px;margin-top:20px;color:var(--project-muted,#79859a);font-variant-numeric:tabular-nums}.task-progress-track{height:3px;background:var(--project-soft,#edf0f6);border-radius:2px;margin-top:9px}.task-progress-track span{height:100%;display:block;background:var(--accent);transition:width .2s}.check-mark{width:16px;height:16px;flex-shrink:0;display:grid;place-items:center;border:1px solid var(--project-border,#dfe5ee);border-radius:50%;font-size:12px;color:#a4afc0;margin-top:1px}.passed{color:#4f6284!important}.passed .check-mark{background:var(--project-soft,#eef2fd);border-color:#aebde6;color:var(--project-accent,#4665cf)}.missing .check-mark{border-color:#d2b59a;color:#b5875a}.task-panel-bottom{border-top:1px solid var(--border);padding-top:16px}.task-panel-bottom>.primary{width:100%;font-size:13px}.task-panel-bottom>p{font-size:10px;color:#9aa3b2;line-height:1.6;margin:10px 0 13px}.task-link{padding:0;font-size:11px;color:var(--project-muted,#7d89a0);text-decoration:underline;text-underline-offset:3px}.task-advice,.task-success{padding:13px;border-radius:7px;margin-bottom:16px;background:var(--project-soft,#f5f7fc);color:#687b9d;font-size:12px}.task-success{background:#eaf7ed;color:#2b6841}.task-advice b,.task-success b{font-size:12px;font-weight:500}.task-advice p,.task-success p{font-size:12px;line-height:1.6;margin:7px 0 0}.expand-task{position:absolute;right:20px;top:20px;z-index:5;padding:12px 15px;display:flex;align-items:center;gap:14px;background:var(--project-surface,#fff);border:1px solid var(--border);border-radius:7px;color:#657899;font-size:12px;box-shadow:0 4px 24px #222d4907}.expand-task[hidden]{display:none}#task-empty{position:absolute;left:calc(50% - 30px);top:40%;transform:translate(-50%,-50%);text-align:center;pointer-events:none;z-index:1}#task-empty[hidden]{display:none}#task-empty h2{font-size:23px;letter-spacing:-.7px;color:#7a879e;font-weight:500;margin:12px 0}#task-empty p{font-size:13px;line-height:1.8;color:#a0aabc}.empty-drawing{display:flex;justify-content:center;opacity:.65}.empty-drawing img{width:94px;height:94px;object-fit:contain}.empty-drawing img+img{margin-left:-8px;transform:rotate(9deg)}.task-active .selection-panel{right:344px}.task-active.task-collapsed .selection-panel{right:22px}.task-active .tools{left:calc(50% - 20px)}.task-active.task-collapsed .tools{left:calc(50% + 130px)}
@media(max-width:1300px){.header-actions{gap:12px}.header-actions .plain,.saved{display:none}}
@media(max-width:1150px){.task-panel{top:20px;bottom:88px;right:16px;width:302px}.task-active .selection-panel{right:22px;top:85px}.task-active .tools{left:calc(50% + 120px)}#task-empty{left:calc(50% + 120px);top:40%}.task-active:not(.task-collapsed) #task-empty{opacity:.25}}
@media(max-width:750px){.tasks-button{font-size:12px;padding:8px;gap:5px}.tasks-button .ui-icon,.task-count{display:none}header{gap:10px}#title{width:120px}.task-panel{top:10px;bottom:84px;right:10px;width:min(302px,calc(100vw - 20px));box-shadow:0 12px 40px #27334b22}.task-active .tools,.task-active.task-collapsed .tools{left:50%}.task-active .selection-panel{top:65px;right:10px}.expand-task{top:12px;right:10px;font-size:11px;padding:10px}#task-empty{left:calc(50% + 60px);top:43%;width:210px}#task-empty h2{font-size:17px}#task-empty p{font-size:11px}.empty-drawing img{width:70px;height:70px}.tasks-dialog{padding:25px}.tasks-dialog>h2{font-size:28px}.task-card{grid-template-columns:1fr}.task-card-art{height:125px}.task-card-art img{height:90px}.task-card-art img+img{margin-top:0}.task-card-details{padding:20px}.task-card-details h3{font-size:19px}}
@media(max-width:450px){header .brand{font-size:17px}header .brandmark{display:none}header #title{font-size:11px}.tasks-button{font-size:11px;padding:8px}.header-actions{gap:7px}}
.task-panel-bottom{position:sticky;bottom:-19px;background:var(--project-surface,#fff);margin:0 -20px -19px;padding:14px 20px 18px;box-shadow:0 -8px 14px #ffffffee}.task-secondary-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.task-card-status{font-size:11px;color:var(--project-accent,#4665cf);margin-left:12px}
/* Brand wordmark and document header. */
header{gap:22px}.brand{gap:10px;letter-spacing:0;flex-shrink:0}.brand-symbol{width:36px;height:36px;display:block}.brand-name{font-size:23px;font-weight:600;letter-spacing:-1.05px;line-height:1;display:flex;gap:5px;align-items:baseline}.brand-name>span{font-weight:400;color:var(--project-muted,#606a7c);letter-spacing:-.8px}.brand:hover .brand-name>span{color:var(--project-accent,#4665cf)}.document-meta{color:#939cac;font-size:12px;margin-right:-10px}#title{font-weight:500;letter-spacing:-.2px}.divider{height:25px;background:var(--project-border,#e1e5ee)}.canvas-label .badge{color:#929dad;font-size:11px}
@media(max-width:750px){header{gap:12px;padding:0 14px}.brand-symbol{width:29px;height:29px}.brand-name{font-size:19px;gap:4px}.brand{gap:7px}}
@media(max-width:450px){header{gap:9px;padding:0 12px}.brand-symbol{width:25px;height:25px}.brand-name{font-size:17px;letter-spacing:-.7px}.brand-name>span{letter-spacing:-.6px}.brand{gap:5px}header #title{min-width:0;flex:1}}
/* Main navigation is separate from document controls. */
header{height:72px;padding:0 28px;gap:48px;box-shadow:none}.main-nav{height:100%;display:flex;align-items:stretch;gap:30px}.main-nav a{display:flex;align-items:center;text-decoration:none;font-size:14px;color:var(--project-muted,#838c9c);position:relative;white-space:nowrap;transition:color .18s}.main-nav a:hover{color:var(--project-text,#343e50)}.main-nav a.active{color:var(--project-accent,#354e9e);font-weight:500}.main-nav a.active:after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--project-accent,#4665cf)}.main-nav a:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:5px}.workspace[hidden],.tasks-page[hidden]{display:none}.document-bar{position:absolute;left:310px;top:22px;z-index:3;max-width:calc(100% - 530px)}.document-bar #title{width:300px;max-width:100%;font-size:14px;color:var(--project-muted,#717e93);padding:8px;border-radius:5px;min-width:0}.document-bar #title:hover{background:var(--project-surface,#fff)}.canvas-actions{position:absolute;right:22px;top:20px;display:flex;align-items:center;gap:10px;z-index:4}.canvas-actions .primary{font-size:12px;padding:10px 13px}.canvas-help{width:32px;height:32px;border:1px solid var(--project-border,#dbe1eb);background:var(--project-surface,#fff);border-radius:50%;color:var(--project-muted,#8b97ad);font-size:14px}.canvas-help:hover{color:var(--project-accent,#4665cf);border-color:#a3b4df}.task-active:not(.task-collapsed) .canvas-actions{right:344px}.task-active .document-bar{max-width:calc(100% - 820px)}.task-active.task-collapsed .document-bar{max-width:calc(100% - 530px)}.task-active.task-collapsed .canvas-actions{top:70px}.tasks-page{height:calc(100dvh - 104px);overflow:auto;background:var(--project-background,#f8f9fb);max-width:none;width:100%;padding:60px 32px;color:#3a4352}.tasks-page-inner{max-width:960px;margin:0 auto}.tasks-page h2{font-size:40px;line-height:1.12;letter-spacing:-1.4px;margin:16px 0}.tasks-page .tasks-intro{font-size:15px;line-height:1.7;max-width:520px;color:var(--project-muted,#7b8699)}.tasks-page .task-card{max-width:760px;background:var(--project-surface,#fff);grid-template-columns:240px 1fr;margin:35px 0 28px}.tasks-page .task-card-details{padding:32px}.tasks-page .task-card-details p{color:#8490a3}.tasks-page .tasks-preserve{max-width:760px;color:#929db0;font-size:12px;line-height:1.7}.tasks-page .eyebrow{font-size:11px;letter-spacing:1px}
@media(max-width:1150px){.document-bar{left:305px;max-width:calc(100% - 495px)}.task-active:not(.task-collapsed) .canvas-actions{right:22px;top:75px}.task-active .document-bar{max-width:calc(100% - 495px)}.task-active:not(.task-collapsed) .canvas-actions{display:none}}
@media(max-width:750px){header{height:64px;padding:0 16px;gap:25px}.main-nav{gap:22px}.main-nav a{font-size:13px}.document-bar{left:184px;top:14px;max-width:calc(100% - 225px)}.document-bar #title{font-size:12px;width:180px}.canvas-actions{right:12px;top:auto;bottom:135px;gap:7px}.canvas-actions .primary{font-size:11px;padding:9px}.canvas-help{width:28px;height:28px}.task-active .document-bar,.task-active.task-collapsed .document-bar{max-width:calc(100% - 225px)}.task-active.task-collapsed .canvas-actions{top:auto;bottom:135px}.tasks-page{height:calc(100dvh - 94px);padding:36px 20px}.tasks-page h2{font-size:30px}.tasks-page .task-card{grid-template-columns:1fr}.tasks-page .task-card-art{height:150px}.tasks-page .task-card-details{padding:24px}.tasks-page .tasks-intro{font-size:14px}}
@media(max-width:450px){header{gap:20px;padding:0 12px}.main-nav{gap:17px}.main-nav a{font-size:12px}.brand-symbol{width:25px;height:25px}.brand-name{font-size:17px}.document-bar{left:140px;max-width:calc(100% - 158px)}.task-active .document-bar,.task-active.task-collapsed .document-bar{max-width:calc(100% - 158px)}.task-active.task-collapsed .document-bar{top:57px}}
footer{position:fixed;bottom:0;left:0;width:100%;z-index:6}.catalog-view footer{display:none}.catalog-view .tasks-page{height:calc(100dvh - 72px)}
@media(max-width:750px){.catalog-view .tasks-page{height:calc(100dvh - 64px)}}
.tabs[hidden]{display:none}.task-active .library-heading h1{font-size:18px;letter-spacing:-.4px}
@media(max-width:750px){.task-active .library-heading h1{font-size:14px}}
@media(max-width:450px){.task-active .library-heading h1{font-size:12px}}
.projects-page{height:calc(100dvh - 72px);overflow:auto;background:var(--project-background,#f8f9fb);padding:55px 32px}.projects-page[hidden]{display:none}.projects-inner{max-width:1080px;margin:0 auto}.projects-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:34px}.projects-heading h1{font-size:36px;letter-spacing:-1.2px;margin:15px 0 9px}.projects-heading p{font-size:14px;color:#929bad;margin:0}.projects-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.project-card{text-align:left;background:var(--project-surface,#fff);border:1px solid #e3e7ef;border-radius:10px;overflow:hidden;padding:0;transition:border-color .18s,transform .18s}.project-card:hover{border-color:#afbeda;transform:translateY(-2px)}.project-preview{height:160px;background-color:#f4f6fa;background-image:radial-gradient(#d5dce8 .7px,transparent .7px);background-size:16px 16px;display:flex;align-items:center;justify-content:center;gap:0;padding:15px;overflow:hidden}.project-preview img{width:66px;height:77px;object-fit:contain;min-width:0}.project-preview>span{font:20px 'Neucha';color:#a8b2c4}.project-card-info{padding:21px}.project-card-info h2{font-size:17px;letter-spacing:-.3px;line-height:1.4;margin:0 0 10px;overflow-wrap:anywhere}.project-card-info p{font-size:12px;color:#8b96a9;margin:0 0 18px}.project-card-info time{font-size:11px;color:#a2adbd}#projects-message{color:#8793a6;font-size:14px;margin-bottom:24px;line-height:1.7}#new-project-dialog{width:440px}#new-project-form label{display:block;font-size:13px;margin:25px 0 10px}#project-name{display:block;width:100%;border:1px solid #dce2ee;border-radius:6px;padding:12px;font-size:14px;color:#44516b}#new-project-error{font-size:12px;color:#a7664e;line-height:1.6;margin:12px 0}#new-project-form>.primary{margin-top:12px}.document-bar{display:flex;align-items:center;gap:7px}#back-projects{font-size:20px;color:#7e8da6;padding:4px}#save-status{cursor:pointer}.task-active #back-projects{display:none}
@media(max-width:1000px){.projects-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:750px){.projects-page{height:calc(100dvh - 64px);padding:35px 20px}.projects-heading h1{font-size:29px}.projects-heading{align-items:flex-start}.projects-heading>.primary{font-size:12px;padding:11px}.projects-heading .eyebrow{font-size:9px}.projects-heading p{font-size:12px}.project-card-info{padding:17px}.project-preview{height:130px}}
@media(max-width:480px){.projects-grid{grid-template-columns:1fr}.projects-heading{flex-wrap:wrap;gap:20px}.projects-heading h1{margin-top:12px}.project-preview{height:170px}.projects-page{padding:30px 18px}}

/* Keep connections above group backgrounds; wide transparent strokes make arrows easy to select. */
#connections{z-index:3}#edges .edge-line,#edges #connection-preview{pointer-events:none}#edges .edge-hit{pointer-events:stroke;cursor:pointer}#duplicate[hidden]{display:none}

.tasks-page-inner{max-width:1180px}.task-catalog-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}.task-catalog-heading h2{margin:12px 0;font-size:34px}.task-catalog-heading .tasks-intro{max-width:650px;margin:0}.task-total{font-size:13px;color:var(--project-muted,#8a95a7);white-space:nowrap}.task-filters{display:flex;gap:12px;margin-bottom:20px}.task-filters input,.task-filters select{background:var(--project-surface,#fff);border:1px solid #dfe4ee;border-radius:6px;padding:11px 13px;font:inherit;font-size:13px;color:var(--project-text,#48566d)}.task-filters input{width:320px;max-width:100%}.task-filters input:focus,.task-filters select:focus{outline:2px solid #4665cf44;outline-offset:1px}.task-table-scroll{overflow:auto;border:1px solid var(--project-border,#e0e5ee);border-radius:8px;background:var(--project-surface,#fff)}.task-table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}.task-table th{background:#f1f3f7;color:#8a95a6;font-weight:400;font-size:11px;padding:14px 18px;white-space:nowrap;position:sticky;top:0}.task-table td{border-top:1px solid #e9edf3;padding:19px 18px;vertical-align:middle}.task-table tr:hover td{background:#fafbfe}.task-number{color:#a0aabc;width:52px;font-variant-numeric:tabular-nums}.task-name{min-width:240px}.task-title-link{padding:0;color:var(--project-text,#344258);font-weight:500;font-size:14px;text-align:left}.task-title-link:hover{color:var(--project-accent,#4665cf)}.task-name p{font-size:12px;color:var(--project-muted,#929daf);line-height:1.5;margin:7px 0 0;max-width:440px}.task-difficulty,.task-duration{color:#7f8a9c;white-space:nowrap}.task-status{font-size:11px;white-space:nowrap;padding:5px 8px;border-radius:4px;background:#f2f4f7;color:#8c97a8}.task-status.started{background:#fff5e9;color:#a17b45}.task-status.complete{background:var(--project-soft,#eef2fd);color:var(--project-accent,#4665cf)}.task-action{text-align:right;white-space:nowrap}.task-open{padding:8px 10px;color:var(--project-accent,#4665cf);font-size:12px;border:1px solid #e0e6f2;border-radius:5px}.task-open:hover{background:var(--project-soft,#eef2fd);border-color:#b9c7e8}.tasks-pagination{display:flex;align-items:center;justify-content:space-between;margin:17px 0 30px;font-size:12px;color:var(--project-muted,#929daf)}.tasks-pagination>div{display:flex;align-items:center;gap:13px}.tasks-pagination button{border:1px solid var(--project-border,#dfe5ee);border-radius:5px;background:var(--project-surface,white);padding:6px 10px;color:#6b7b96}.tasks-pagination button:disabled{opacity:.35;cursor:default}.tasks-page .tasks-preserve{max-width:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.restart-task-button{font-size:12px;color:#647590;border:1px solid var(--project-border,#dce3ef);border-radius:6px;background:var(--project-surface,white);padding:9px 12px;white-space:nowrap}.restart-task-button:hover{border-color:#aebdde;color:var(--project-accent,#4665cf)}.restart-task-button[hidden]{display:none}#restart-task{font-size:12px;padding:8px 10px;border:1px solid var(--project-border,#dce3ef);border-radius:5px;text-decoration:none;color:#5f718d}
@media(max-width:900px){.task-difficulty{display:none}.task-table th,.task-table td{padding:14px 12px}.task-name{min-width:210px}.task-name p{max-width:320px}}
@media(max-width:600px){.task-catalog-heading{align-items:flex-start}.task-total{padding-top:18px}.task-filters{flex-wrap:wrap}.task-filters input{flex:1;min-width:160px}.task-filters select{max-width:150px}.task-number,.task-duration{display:none}.task-table th,.task-table td{padding:13px 10px}.task-name{min-width:170px}.task-name p{display:none}.task-title-link{font-size:12px}.task-status{font-size:10px;padding:4px}.task-open{font-size:10px;padding:7px}.task-active .canvas-actions{bottom:140px;right:12px}.task-active.task-collapsed .canvas-actions{bottom:140px}.tasks-page{padding:28px 16px}}

.port.left,.port.right{top:50%;transform:translateY(-50%)}.port.top,.port.bottom{left:50%;transform:translateX(-50%)}

.task-filters{flex-wrap:wrap}.library-item span{overflow-wrap:anywhere}.task-difficulty{font-weight:500}@media(max-width:900px){.task-table .task-difficulty{display:table-cell}}@media(max-width:600px){.task-table .task-difficulty{display:none}}

.task-name p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}@media(max-width:600px){.task-name p{display:none}}
.account-button{margin-left:auto;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:9px 16px;border:1px solid var(--project-border,#d8deea);border-radius:8px;background:var(--project-surface,white);color:var(--project-accent,#4665cf);font:inherit;font-size:13px;cursor:pointer}#account-dialog{width:min(440px,calc(100vw - 32px));max-height:85vh;overflow:auto;padding:30px;border:1px solid var(--project-border,#d8deea);border-radius:16px;color:var(--project-text,#303746)}#account-dialog::backdrop{background:#1b24334d}#account-dialog h2{font-size:25px;margin:12px 0}#account-dialog p{font-size:13px;line-height:1.6;color:var(--project-muted,#657086)}#account-dialog form{display:grid;gap:10px}#account-dialog label{font-size:13px}#account-dialog input{width:100%;box-sizing:border-box;border:1px solid var(--project-border,#d8deea);border-radius:8px;padding:11px;font:inherit}#account-dialog button{cursor:pointer}#account-dialog button:disabled{opacity:.5;cursor:wait}.account-close{float:right;background:none;border:0;font-size:24px}.google-login{width:100%;padding:12px;background:var(--project-surface,white);border:1px solid var(--project-border,#d8deea);border-radius:8px;font:inherit;margin-top:12px}.auth-divider{text-align:center;margin:18px 0;color:var(--project-muted,#657086);font-size:12px}.auth-actions{display:flex;gap:10px;margin:4px 0 10px}.auth-actions button{flex:1;padding:11px;border:1px solid var(--project-border,#d8deea);border-radius:8px}.phone-auth{margin-top:20px;border-top:1px solid #e6eaf0;padding-top:16px}.phone-auth summary{cursor:pointer;font-size:14px;margin-bottom:14px}#account-dialog #account-message{color:#b34a46}#account-signout{display:block;margin-top:20px;padding:10px 16px;background:var(--project-surface,white);border:1px solid var(--project-border,#d8deea);border-radius:8px}@media(max-width:600px){.account-button{max-width:100px;padding:8px}.main-nav{gap:10px}#account-dialog{padding:22px}}
.role-badge{display:inline-block;border:1px solid #d8d7ce;border-radius:20px;padding:5px 12px;font-size:12px}.task-edit{display:block;margin:8px 0 0 auto;font-size:12px;color:#565f47;text-decoration:underline;background:none;border:0;cursor:pointer}#task-editor{width:min(860px,94vw);max-height:90vh;box-sizing:border-box;padding:32px;border:1px solid #ccc8ba;border-radius:18px;background:#faf9f4;color:#242922}#task-editor::backdrop{background:rgba(30,35,28,.4)}#task-editor h2{font-size:28px;margin:8px 0}#task-editor h3{margin:28px 0 12px}#task-editor p{font-size:14px;line-height:1.5;color:#62665c}#task-editor label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500}#task-editor input:not([type=checkbox]),#task-editor textarea,#task-editor select{font:inherit;box-sizing:border-box;width:100%;border:1px solid #cfcec5;border-radius:7px;padding:10px;background:var(--project-surface,white);color:#242922}#task-editor textarea{resize:vertical}.editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.editor-fields label:nth-child(n+3):nth-child(-n+6){grid-column:1/-1}.editor-connection{display:grid;grid-template-columns:1fr 1fr 2fr auto;align-items:end;gap:10px;margin-bottom:12px}#editor-rules fieldset{border:1px solid #d8d5cb;border-radius:10px;padding:14px;display:grid;gap:10px;margin:16px 0}#editor-rules legend label{display:block;font-size:14px}#editor-rules input[type=checkbox]{accent-color:#4f6542}.editor-footer{display:flex;justify-content:flex-end;gap:12px;position:sticky;bottom:-32px;background:#faf9f4;padding:18px 0}#task-editor button:not(.primary):not(.dialog-close){border:1px solid #cacbbf;padding:9px 13px;border-radius:7px;background:var(--project-surface,#fff);font:inherit;cursor:pointer}#task-editor-message{color:#a3332a!important}#task-editor input:focus,#task-editor textarea:focus,#task-editor select:focus{outline:2px solid #87957b;outline-offset:2px}@media(max-width:650px){#task-editor{padding:22px}.editor-fields,.editor-connection{grid-template-columns:1fr}.editor-footer{bottom:-22px}}
.brand-name{font-family:'Neucha',cursive;font-size:32px;font-weight:400;letter-spacing:.1px;transform:rotate(-1.5deg);gap:7px}.brand-name>span{font-weight:400;letter-spacing:0;transform:rotate(2deg) translateY(1px)}.brand-symbol{transform:rotate(-2deg)}.edge-handle{pointer-events:all!important;cursor:grab;fill:white;stroke:var(--project-accent,#4665cf);stroke-width:2}#edge-sides{display:flex;gap:8px}#edge-sides[hidden]{display:none}#edge-sides label{font-size:11px;display:grid;gap:3px}#edge-sides select{max-width:135px;font:inherit;padding:5px;border:1px solid var(--project-border,#d9dce3);border-radius:5px;background:var(--project-surface,#fff)}.save-drawing{display:flex;align-items:center;gap:6px;border:1px solid var(--project-border,#d9dce3);border-radius:7px;background:var(--project-surface,white);color:var(--project-accent,#4665cf);padding:9px 12px;font:500 13px 'Golos Text';cursor:pointer}.save-drawing svg{width:19px;height:19px}.save-drawing:disabled{opacity:.5}.selection-panel{flex-wrap:wrap;max-width:min(420px,calc(100% - 24px))}@media(max-width:750px){.brand-name{font-size:27px}.save-drawing span{display:none}.save-drawing{padding:8px}}@media(max-width:450px){.brand-name{font-size:22px;gap:4px}.selection-panel{top:110px}}

.canvas-actions,.task-active:not(.task-collapsed) .canvas-actions,.task-active.task-collapsed .canvas-actions{display:flex;top:20px;bottom:auto}.save-drawing{width:40px;height:40px;padding:9px;justify-content:center}.save-drawing svg{width:21px;height:21px}@media(max-width:750px){.canvas-actions,.task-active:not(.task-collapsed) .canvas-actions,.task-active.task-collapsed .canvas-actions{top:14px;bottom:auto;right:12px}}
#task-editor.admin-task-panel{position:absolute;right:0;top:0;bottom:0;width:390px;max-width:none;max-height:none;box-sizing:border-box;margin:0;padding:28px 22px;overflow:auto;z-index:5;border:0;border-left:1px solid var(--project-border,#dce1e9);border-radius:0;background:var(--project-surface,#fff);color:var(--project-text,#303746)}#task-editor.admin-task-panel[hidden]{display:none}#task-editor.admin-task-panel h2{font-size:24px}.admin-task-panel .editor-fields{grid-template-columns:1fr;gap:12px}.admin-task-panel .editor-fields label{grid-column:1!important}.admin-task-panel .editor-connection{grid-template-columns:1fr 1fr}.admin-task-panel .editor-connection label:nth-child(3){grid-column:1/-1}.admin-task-panel .editor-footer{bottom:-28px;background:var(--project-surface,#fff);padding:15px 0}.reference-mode{flex-direction:row!important;align-items:center;margin:20px 0 5px}.reference-mode input{width:auto!important}.reference-note{font-size:12px!important}.admin-task-panel details{margin:22px 0}.admin-task-panel summary{cursor:pointer;font-size:13px;color:var(--project-muted,#657086)}.admin-editing .canvas-actions{right:410px!important;top:20px!important}.admin-editing .document-bar{max-width:calc(100% - 760px)}.admin-editing .main-nav #show-tasks{color:var(--project-accent,#354e9e)}.admin-saving #canvas{pointer-events:none;opacity:.7}.admin-editing #task-panel,.admin-editing #task-empty,.admin-editing #expand-task{display:none!important}@media(max-width:750px){#task-editor.admin-task-panel{top:auto;bottom:0;width:100%;height:45vh;border-top:1px solid var(--project-border,#dce1e9);border-left:0;padding:20px}body.admin-editing .workspace{position:relative}body.admin-editing #canvas{height:calc(100% - 45vh);align-self:flex-start}.admin-editing aside{bottom:calc(45vh + 12px)}.admin-editing .canvas-actions{right:12px!important;top:14px!important}.admin-editing .document-bar{max-width:calc(100% - 225px)}.admin-task-panel .editor-footer{bottom:-20px}.admin-editing #task-editor .editor-fields{grid-template-columns:1fr 1fr}}

.admin-editing .tools{left:calc((100% + 302px - 390px)/2)}.admin-editing .zoom,.admin-editing .selection-panel{right:410px}.admin-editing .zoom{bottom:90px}.admin-editing .canvas-hint{display:none}@media(max-width:750px){.admin-editing .tools{left:50%;bottom:12px}.admin-editing .zoom{right:12px;bottom:65px}.admin-editing .selection-panel{right:12px;top:65px}}
.editor-icon-picker{margin:0 0 24px}.editor-icon-picker>p{font-size:14px;line-height:1.5;color:var(--project-muted,#657086)}.editor-icon-picker summary{margin:16px 0;cursor:pointer;font-weight:600}.editor-icon-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.editor-icon-choice{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 5px 8px;min-width:0;border:1px solid var(--project-border,#dce2ec)!important;border-radius:10px;background:var(--project-surface,white);font-size:14px!important;line-height:1.3}.editor-icon-choice:hover{background:#f0f3ff;border-color:var(--project-accent,#4665cf)!important}.editor-icon-choice img{width:50px;height:46px;object-fit:contain}.editor-icon-action{position:absolute;top:3px;right:8px;font-size:20px;color:var(--project-accent,#4665cf)}.editor-icon-picker input{width:100%}

.port::before{content:"";position:absolute;width:calc(32px / var(--canvas-zoom,1));height:calc(32px / var(--canvas-zoom,1));left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%}.port:hover{background:#dfe7ff;box-shadow:0 0 0 7px #4665cf18}
.task-add-icon{width:100%;padding:11px 12px;margin:14px 0;border:1px dashed #aab8da;border-radius:8px;background:var(--project-soft,#f5f7ff);color:var(--project-accent,#354e9e);font:500 14px 'Golos Text';cursor:pointer}.task-add-icon[hidden]{display:none}.library-entry{position:relative;min-width:0}.library-entry>.library-item{width:100%}.library-remove{position:absolute;right:3px;top:3px;width:24px;height:24px;border:1px solid var(--project-border,#dce2ec);border-radius:50%;background:var(--project-surface,white);color:var(--project-muted,#657086);font-size:19px;line-height:1;cursor:pointer}.library-remove:hover{color:#a3332a;background:#fff1ed}#task-icon-dialog{width:min(620px,calc(100vw - 32px));max-height:85vh;overflow:auto;padding:28px;border:1px solid var(--project-border,#dce1e9);border-radius:16px;color:var(--project-text,#303746);background:var(--project-surface,white)}#task-icon-dialog::backdrop{background:#202a4655}#task-icon-dialog h2{margin:0 30px 20px 0;font-size:25px}.icon-dialog-search{display:grid;gap:7px;font-size:14px;margin-bottom:20px}.icon-dialog-search input{padding:12px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;font:inherit;width:100%;box-sizing:border-box}#task-icon-dialog .editor-icon-grid{grid-template-columns:repeat(4,minmax(0,1fr))}#task-icon-dialog .editor-icon-choice{min-height:105px;cursor:pointer}#task-icon-dialog .editor-icon-choice:disabled{opacity:.5;cursor:default;background:var(--project-soft,#f5f7fb)}#task-icon-message{font-size:14px;color:#2b6841;min-height:20px}#task-icon-done{display:block;margin-left:auto}@media(max-width:500px){#task-icon-dialog{padding:20px}#task-icon-dialog .editor-icon-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Task text stays in its reader layout until a field is explicitly edited. */
#task-editor .editor-panel-title{font-size:18px;margin:12px 0 5px}#task-editor .editor-panel-note{font-size:12px;color:var(--project-muted,#79859a);margin:0 0 18px}#task-editor .editor-check-settings{margin:0 0 22px}#task-editor .editor-fields{display:block}#task-editor .editor-preview-field{position:relative;padding-right:34px;min-width:0}#task-editor .editor-preview-value{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}#task-editor .editor-preview-value[hidden],#task-editor .editor-field-edit[hidden]{display:none}#task-editor button.editor-field-edit{position:absolute;right:0;top:0;display:grid;place-items:center;width:28px;height:28px;padding:5px;border:0;background:transparent;color:var(--project-muted,#8b95a5);border-radius:6px}#task-editor .editor-field-edit .ui-icon{width:17px;height:17px}#task-editor button.editor-field-edit:hover{background:var(--project-soft,#eef2fd);color:var(--project-accent,#4665cf)}#task-editor button.editor-field-edit:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}#task-editor .editor-preview-meta{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 14px;margin-bottom:14px}#task-editor .editor-preview-meta .editor-preview-value{font-size:11px;line-height:28px;color:var(--project-muted,#8b95a5)}#task-editor .editor-preview-heading h2{font-size:25px;letter-spacing:-.8px;line-height:1.15;margin:0 0 15px}#task-editor .editor-preview-story p{font-size:13px;line-height:1.7;color:var(--project-muted,#727d8f);margin:0 0 18px}#task-editor .editor-preview-section{padding:16px 0;border-top:1px solid var(--project-border,#e2e7ef)}#task-editor .editor-preview-section h3{font-size:12px;font-weight:500;margin:0 0 8px;color:var(--project-text,#303746)}#task-editor .editor-preview-section p{font-size:12px;color:var(--project-muted,#8993a4);line-height:1.6}#task-editor .editor-preview-success .editor-preview-field{padding:12px 42px 12px 12px;background:#eaf7ed;border-radius:7px}#task-editor .editor-preview-success p{color:#2b6841}#task-editor .editor-preview-success .editor-field-edit{top:8px;right:6px}#task-editor .editor-preview-catalog h4{font-size:14px;font-weight:500;margin:0 0 8px}#task-editor .editor-preview-catalog .editor-preview-field+.editor-preview-field{margin-top:8px}#task-editor .editor-preview-field.is-editing{padding-right:0;margin-bottom:12px}#task-editor .editor-preview-field input,#task-editor .editor-preview-field textarea,#task-editor .editor-preview-field select{border-color:#c8d4ee;color:var(--project-text,#303746);font-size:13px;line-height:1.6}#task-editor .editor-preview-field :is(input,textarea,select):focus{outline:2px solid var(--project-accent,#4665cf);outline-offset:1px}#task-editor .editor-inline-actions{display:flex;gap:8px;margin-top:8px}#task-editor .editor-inline-actions button{font-size:12px;padding:6px 10px;border-color:var(--project-border,#dce1e9)}#task-editor .editor-inline-actions button:first-child{color:var(--project-accent,#354e9e);background:var(--project-soft,#eef2fd);border-color:#d8e1fa}#task-editor .editor-preview-meta .is-editing{flex-basis:100%}#task-editor #reference-preview{width:100%;font-size:13px;color:var(--project-accent,#354e9e);border-color:var(--project-border,#dce1e9);margin:4px 0 0}#task-editor .editor-footer{gap:8px;border-top:1px solid var(--project-border,#e2e7ef);box-shadow:0 -8px 14px #ffffffee}#task-editor .editor-footer button{white-space:nowrap;font-size:12px;padding:10px 12px}#task-editor .editor-footer .primary{flex:1}#task-editor button:disabled{opacity:.5;cursor:wait}
#task-editor.admin-task-panel button.editor-field-edit{box-sizing:border-box;border:0;padding:5px;background:transparent}#task-editor.admin-task-panel button.editor-field-edit:hover{background:var(--project-soft,#eef2fd)}#task-editor.admin-task-panel .editor-inline-actions button{font-size:12px;padding:6px 10px}

#task-editor #task-editor-message[data-status="saved"]{color:#2b6841!important}#task-editor #task-editor-message[data-status="saving"]{color:var(--project-muted,#657086)!important}
.library-rename{position:absolute;left:3px;top:3px;display:grid;place-items:center;width:24px;height:24px;padding:4px;border:1px solid var(--project-border,#dce2ec);border-radius:6px;background:var(--project-surface,#fff);color:var(--project-muted,#657086);cursor:pointer}.library-rename .ui-icon{width:15px;height:15px}.library-rename:hover{color:var(--project-accent,#4665cf);background:var(--project-soft,#eef2fd)}#task-element-dialog{width:min(460px,calc(100vw - 32px));box-sizing:border-box;padding:28px;border:1px solid var(--project-border,#dce1e9);border-radius:16px;background:var(--project-surface,#fff);color:var(--project-text,#303746)}#task-element-dialog::backdrop{background:#202a4655}#task-element-dialog h2{margin:0 30px 22px 0;font-size:23px}.task-element-identity{display:flex;align-items:center;gap:18px}.task-element-identity img{width:82px;height:82px;object-fit:contain}.task-element-identity label{flex:1;min-width:0;display:grid;gap:8px;font-size:13px}.task-element-identity input{width:100%;box-sizing:border-box;padding:11px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;color:var(--project-text,#303746);font:inherit}.task-element-identity input:focus{outline:2px solid var(--project-accent,#4665cf);outline-offset:1px}.task-element-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.task-element-actions button{padding:10px 14px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;background:var(--project-surface,#fff);font:inherit;font-size:13px;cursor:pointer}.task-element-actions .primary{background:var(--project-text,#2b303b);color:var(--project-surface,#fff)}.library-rename:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
/* Project library and inspector. */
#search{width:100%;box-sizing:border-box;border:1px solid var(--project-border,#dce1e9);border-radius:8px;padding:10px 12px;margin:10px 0 0;background:var(--project-surface,#fff);font:inherit;font-size:13px}#search[hidden],#create-element[hidden]{display:none}.tabs{flex-wrap:wrap;gap:4px}.tabs button{padding:7px 9px}#create-element{margin:10px 0}.project-properties{position:absolute;right:0;top:0;bottom:0;width:300px;box-sizing:border-box;padding:24px 20px;overflow:auto;background:var(--project-surface,#fff);border-left:1px solid var(--project-border,#dce1e9);z-index:5}.project-properties[hidden]{display:none}.property-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.property-heading h2{font-size:17px;margin:0}.property-heading button{border:0;background:none;color:var(--project-muted,#8993a4);font-size:24px;cursor:pointer}.property-empty{color:var(--project-muted,#8993a4);font-size:13px;line-height:1.7}.property-kind{font-size:11px;color:var(--project-muted,#8993a4);margin:0 0 10px}.property-icon{display:block;width:95px;height:85px;object-fit:contain;margin:0 auto 20px}#property-fields label{display:grid;gap:8px;margin:16px 0;font-size:12px;color:var(--project-muted,#657086)}#property-fields input,#property-fields select{width:100%;box-sizing:border-box;border:1px solid var(--project-border,#dce1e9);border-radius:8px;padding:10px;background:var(--project-surface,white);font:inherit;color:var(--project-text,#303746);font-size:13px}#property-fields :is(input,select):focus{outline:2px solid var(--project-accent,#4665cf);outline-offset:1px}.property-button{width:100%;border:1px solid var(--project-border,#dce1e9);border-radius:8px;padding:10px;margin:4px 0;background:var(--project-surface,#fff);color:var(--project-muted,#657086);font:inherit;font-size:12px;cursor:pointer}.threat-action{color:#bd4355;border-color:#edc5cb;background:#fff5f6}.project-properties #selection-panel{position:static;display:flex;flex-wrap:wrap;padding:14px 0;margin-top:20px;border:0;border-top:1px solid var(--project-border,#e2e7ef);box-shadow:none;background:var(--project-surface,#fff);max-width:100%;transform:none}.project-properties #selection-panel[hidden]{display:none}.project-properties #selection-panel>span{display:none}.project-properties #edge-sides{width:100%;margin-bottom:12px}.project-properties #edge-sides label{flex:1}.project-properties #edge-sides select{width:100%}.project-properties-open .canvas-actions{right:320px}.project-properties-open .zoom{right:320px}.project-properties-open .tools{left:calc((100% + 302px - 300px)/2)}.project-properties-open .canvas-hint{right:320px}.edge-label{font:12px 'Golos Text';paint-order:stroke;stroke:var(--project-surface,#fff);stroke-width:5px;stroke-linejoin:round;pointer-events:all;cursor:pointer}
#custom-element-dialog{width:min(470px,calc(100vw - 32px));box-sizing:border-box;padding:28px;border:1px solid var(--project-border,#dce1e9);border-radius:16px;background:var(--project-surface,white);color:var(--project-text,#303746)}#custom-element-dialog::backdrop{background:#202a4655}#custom-element-dialog h2{margin:0 35px 20px 0;font-size:24px}#custom-element-preview{display:block;width:90px;height:80px;object-fit:contain;margin:0 auto 20px}#custom-element-form label{display:grid;gap:8px;margin:16px 0;font-size:13px}#custom-element-form :is(input:not([type=checkbox]),select){box-sizing:border-box;max-width:100%;width:100%;border:1px solid var(--project-border,#dce1e9);border-radius:8px;padding:11px;background:var(--project-surface,white);font:inherit;color:var(--project-text,#303746)}#custom-element-form .custom-threat-toggle{display:flex;align-items:center;gap:8px}.upload-note{font-size:11px;color:var(--project-muted,#8993a4)}#custom-element-error{color:#bd4355;font-size:12px}#custom-element-submit{display:block;width:100%;margin-top:20px}#custom-element-submit:disabled{opacity:.5}.project-properties-open .canvas-document{max-width:calc(100% - 610px)}
@media(max-width:1000px){.project-properties{top:auto;bottom:78px;right:12px;width:270px;max-height:55vh;border:1px solid var(--project-border,#dce1e9);border-radius:12px;padding:18px}.project-properties-open .canvas-actions{right:12px}.project-properties-open .zoom{right:12px}.project-properties-open .tools{left:50%}.project-properties-open .canvas-hint{display:none}.project-properties .property-heading{margin-bottom:12px}.property-icon{height:55px;margin-bottom:10px}}

/* Give the library the full workspace height and keep its controls compact. */
.workspace>aside{left:0;top:0;bottom:0;width:282px;padding:16px 14px 0;border-radius:0;border-top:0;border-bottom:0;border-left:0;box-shadow:none}
.workspace>aside>*{flex-shrink:0}
.library-heading h1{font-size:18px}
.library-controls{display:flex;align-items:center;gap:8px;margin-top:12px}
.library-controls[hidden]{display:none}
.library-controls #search{flex:1;min-width:0;width:0;height:34px;padding:7px 10px;margin:0;font-size:12px;border-radius:6px;background:var(--project-background,#fafbfc)}
.library-controls #search:focus{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
.library-controls #create-element{flex:0 0 34px;width:34px;height:34px;margin:0;padding:0;border:1px solid var(--project-border,#dce1e9);border-radius:6px;background:var(--project-soft,#f5f7ff);color:var(--project-accent,#354e9e);font-size:24px;line-height:1}
.library-controls #create-element:hover{background:#e8edfc;border-color:#aab8da}
aside .tabs{margin:10px 0 8px;padding-bottom:8px;gap:2px}
aside .tabs button{padding:6px 8px;font-size:11px}
aside .collection{display:none}
.task-active aside .collection{display:flex;margin:8px 0 10px;gap:8px;line-height:1.5}
aside #task-add-icon{padding:8px 10px;margin:10px 0;font-size:12px}
.workspace>aside>.icon-grid{min-height:0;flex:1;gap:4px;margin-top:12px;padding:4px 0 8px;overscroll-behavior:contain;scrollbar-gutter:stable}
aside .library-item{height:118px;padding:5px 3px;gap:3px}
aside .library-item img{width:88px;height:88px}
aside .library-item span{font-size:11px;line-height:1.3}
aside .sidebar-note{margin:0 -14px;padding:7px 14px;justify-content:center}
aside .sidebar-note p{font-size:10px;line-height:1.4}
@media(min-width:751px) and (max-width:1000px){.tools,.task-active .tools,.task-active.task-collapsed .tools,.project-properties-open .tools{left:calc(50% + 141px);gap:1px;padding:5px}.tools button{width:34px;height:36px}.tools>span{margin:0 3px}}
@media(max-width:750px){.workspace>aside{width:172px;bottom:78px;padding:12px 10px 0;border-bottom:1px solid var(--border);border-bottom-right-radius:10px}.library-controls{margin-top:10px;gap:4px}.library-controls #search{padding:6px;font-size:11px}.library-controls #create-element{flex-basis:30px;width:30px}.library-heading h1{font-size:16px}aside .tabs{margin-top:8px;gap:1px}aside .tabs button{padding:5px 6px;font-size:10px}aside .library-item{height:104px}aside .library-item img{width:64px;height:64px}aside .library-item span{font-size:10px}.workspace>aside>.icon-grid{gap:2px}aside .sidebar-note{display:none}}
@media(max-width:450px){.workspace>aside{width:126px;padding:12px 8px 0}.library-heading h1{font-size:14px}.library-controls{flex-wrap:wrap}.library-controls #search{flex-basis:100%;width:100%}.library-controls #create-element{flex-basis:100%;height:28px;font-size:21px}.workspace>aside>.icon-grid{margin-top:8px}aside .library-item{height:108px}aside .library-item img{width:78px;height:78px}aside .library-item span{font-size:11px}}

/* Tool lock follows the active-tool styling and stays usable on small screens. */
.tools #tool-lock.active{background:var(--accent-soft);color:var(--accent)}
@media(max-width:450px){.tools{gap:0;padding:4px}.tools button{width:29px}.tools>span{margin:0 2px}}
@media(min-width:1001px){.project-properties-open .zoom{bottom:100px}}

/* Hover remains visible even when a tool is already selected or locked. */
.tools button.active:hover:not(:disabled),.tools #tool-lock.active:hover:not(:disabled){background:#dce5ff;color:#304eb9;box-shadow:inset 0 0 0 1px #aebfe9}
.tools button>.ui-icon{pointer-events:none}
.tools button:disabled{box-shadow:none;cursor:not-allowed}

/* Connection mode uses the drawing cursor across the whole component. */
#canvas.connect .node:not(.group),#canvas.connect .node:not(.group) .node-label:not([contenteditable=true]){cursor:crosshair}

/* Screen-space marquee follows the canvas zoom and never intercepts input. */
#selection-marquee{position:absolute;border:1px solid var(--accent);background:#4665cf14;z-index:3;pointer-events:none}
#selection-marquee[hidden]{display:none}

/* Toolbar feedback is immediate, including after canvas selection. */
.tools button{transition:none}

/* Folder rows expand in place; their children stay on the same page. */
.task-table .task-folder-row td{padding:0;background:var(--project-soft,#f6f8fc)}
.task-folder-toggle{display:flex;align-items:center;gap:12px;width:100%;padding:18px;text-align:left;font:inherit;font-weight:500;color:var(--project-text,#344258);border-radius:0}
.task-folder-toggle:hover{background:#edf1f9}
.task-folder-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.task-folder-toggle>.ui-icon{width:20px;height:20px;flex-shrink:0}
.task-folder-chevron{font-size:22px;line-height:1;transition:transform .15s}
.task-folder-toggle[aria-expanded=true] .task-folder-chevron{transform:rotate(90deg)}
.task-folder-controls{display:flex;align-items:center}
.task-folder-controls .task-folder-toggle{flex:1;min-width:0}
.task-folder-rename{flex-shrink:0;margin:0 18px;font-size:12px;color:var(--accent);padding:8px}
#rename-task-folder-dialog{width:min(420px,calc(100vw - 48px))}
#rename-task-folder-form label{display:block;margin:20px 0 8px;font-size:13px}
#rename-task-folder-name{box-sizing:border-box;width:100%;padding:12px;border:1px solid var(--border);border-radius:6px;font:inherit}
#rename-task-folder-note{font-size:12px;color:#7f8a9c;line-height:1.5}
#rename-task-folder-error{font-size:13px;color:#a64350}
.task-in-folder .task-name{padding-left:38px}
.folder-count{font-size:11px;padding:2px 5px;border-radius:4px;background:#eef1f6;font-variant-numeric:tabular-nums}
.editor-journey label{display:grid;gap:8px;margin:14px 0;font-size:12px}
.editor-journey input,.editor-journey select{box-sizing:border-box;width:100%;max-width:100%;border:1px solid var(--project-border,#dce1e9);border-radius:6px;padding:9px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit}
@media(max-width:600px){.task-folder-toggle{font-size:12px;padding:14px 10px;gap:8px}.task-table .task-in-folder .task-name{padding-left:22px}}
@media(max-width:600px){.task-table .task-name{min-width:130px}.task-table td{padding:13px 8px}.task-table .task-status{font-size:9px;padding:5px}.task-table .task-open{padding:7px 5px}}
/* Protection badges keep a readable screen size and open the same editor in tasks and projects. */
.edge-protection{pointer-events:all;cursor:pointer}
.edge-protection circle{fill:var(--project-surface,#fff);stroke:#86b698}
.edge-protection:hover circle,.edge-protection:focus-visible circle{fill:#edf7e9;stroke:var(--project-accent,#4665cf)}
.edge-protection image,.edge-protection text{pointer-events:none}
.edge-protection text{fill:#3c7958;font-family:'Golos Text',sans-serif;font-weight:500}
#edge-protection-dialog{width:min(570px,calc(100vw - 32px));max-width:570px;max-height:85dvh;overflow:auto;padding:26px}
#edge-protection-title{margin:0 30px 8px 0;font-size:23px}
#edge-protection-caption{margin:0;color:#a14956;font-size:13px}
#edge-protection-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0}
.protection-choice{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 6px;border:1px solid #e1e8de;border-radius:9px;background:#fcfdfb;color:#526951;font-size:12px}
.protection-choice img{width:80px;height:80px;object-fit:contain;pointer-events:none}
.protection-choice:hover{background:#f0f7ea;border-color:#a8c5a5}
.protection-choice[aria-pressed=true]{background:#edf6e7;border-color:#80ab7e}
.protection-check{position:absolute;right:7px;top:5px;color:#518251;font-size:18px}
#edge-protection-done{display:block;margin-left:auto}
.protection-action{color:#427a54;border-color:#b8d3b3;background:#f5fbf1}
@media(max-width:450px){#edge-protection-dialog{padding:20px}#edge-protection-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Panning belongs to the world transform; focusing badges must not scroll the canvas. */
#canvas{overflow:clip}
.protection-drag-ghost{position:fixed;z-index:20;width:54px;height:54px;display:grid;place-items:center;transform:translate(-50%,-50%);pointer-events:none;background:var(--project-surface,#fff);border:1px solid #86b698;border-radius:50%;box-shadow:0 4px 16px #27365420}
.protection-drag-ghost img{width:44px;height:44px}
.edge-line.protection-drop-target{stroke:#639b69;stroke-width:4px}
.tabs button[hidden]{display:none}
.node.connection-target{outline:2px solid var(--project-accent,#4665cf);outline-offset:5px;border-radius:10px}
/* Task brief sits below the canvas; the right sidebar always shows properties. */
.task-active .workspace{--task-dock-height:min(260px,34vh);--task-space:var(--task-dock-height)}.task-active.task-collapsed .workspace{--task-space:44px}
.task-active #task-panel{left:302px;right:300px;top:auto;bottom:0;width:auto;height:var(--task-dock-height);box-sizing:border-box;border-radius:0;border:0;border-top:1px solid var(--border);padding:14px 20px;overflow:hidden;box-shadow:0 -4px 18px #222d4907}
.task-active .task-panel-top{height:22px;margin:0 0 12px}.task-active #task-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 180px;gap:22px;height:calc(100% - 34px);min-height:0}
.task-active .task-summary,.task-active .task-conditions{overflow:auto;min-height:0;padding-right:6px;scrollbar-width:thin}.task-active #task-panel h2{font-size:21px;margin:8px 0}.task-active .task-story{margin-bottom:12px}.task-active .task-requirements{padding:10px 0;border-bottom:0}.task-active .task-progress{margin-top:0}
.task-active .task-panel-bottom{position:static;margin:0;padding:0 0 0 18px;border-top:0;border-left:1px solid var(--border);box-shadow:none;overflow:auto}.task-active .task-secondary-actions{flex-wrap:wrap;gap:10px}.task-active .tools,.task-active.task-collapsed .tools{bottom:calc(var(--task-space) + 16px);left:calc((100% + 302px - 300px)/2)}.task-active .zoom{bottom:calc(var(--task-space) + 90px)}.task-active .canvas-hint{display:none}
.task-active #expand-task{left:302px;right:300px;top:auto;bottom:0;height:44px;box-sizing:border-box;border-radius:0;justify-content:flex-start}.task-active #task-empty{left:calc((100% + 302px - 300px)/2);top:30%;opacity:1}
@media(max-width:1200px){.task-active #task-details{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.task-active .task-panel-bottom{grid-column:1/-1;border-left:0;border-top:1px solid var(--border);padding:12px 0}.task-active #task-panel{overflow:auto}.task-active #task-details{height:auto}.task-active .task-panel-bottom>.primary{width:auto;padding:10px 20px}.task-active .task-panel-bottom>p{display:none}.task-active .task-secondary-actions{display:inline-flex;margin-left:15px}}
@media(max-width:1000px){.task-active #task-panel,.task-active #expand-task{right:0}.task-active .tools,.task-active.task-collapsed .tools{left:calc((100% + 302px)/2)}.task-active .project-properties{bottom:calc(var(--task-space) + 78px);max-height:calc(100% - var(--task-space) - 100px)}.task-active #task-empty{left:calc((100% + 302px)/2)}}
@media(max-width:750px){.task-active #task-panel,.task-active #expand-task{left:182px;padding:12px}.task-active #task-details{grid-template-columns:1fr;gap:14px}.task-active .task-panel-bottom{grid-column:auto}.task-active .task-secondary-actions{display:flex;margin:12px 0 0}.task-active .tools,.task-active.task-collapsed .tools{left:50%}.task-active #task-empty{left:calc((100% + 182px)/2)}}
@media(max-width:450px){.task-active #task-panel,.task-active #expand-task{left:136px}.task-active #task-empty{left:calc((100% + 136px)/2);width:170px}.task-active #task-panel h2{font-size:18px}}
#collapse-task{display:grid;place-items:center;width:30px;height:30px;border-radius:6px;flex-shrink:0}#collapse-task:hover{background:var(--project-soft,#eef2fd);color:var(--project-accent,#4665cf)}#collapse-task:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
.library-item.library-previewing{background:var(--project-soft,#eef2fd);box-shadow:inset 0 0 0 1px #afbee8;border-radius:8px}#property-actions[hidden]{display:none}.property-button:disabled{opacity:.5;cursor:default}body.admin-library-preview .project-properties{width:390px;z-index:6}.sidebar-note p{line-height:1.5}
.property-description{margin:16px 0 20px;padding:14px;background:var(--project-soft,#f5f7fb);border:1px solid #e4e9f1;border-radius:10px}.property-description h3{font-size:12px;font-weight:600;color:#4d5d78;margin:0 0 7px}.property-description h3:not(:first-child){margin-top:14px}.property-description p{font-size:13px;line-height:1.65;color:var(--project-muted,#657086);margin:0;overflow-wrap:anywhere}
.community-page{height:calc(100dvh - 80px);overflow:auto;background:var(--project-soft,#f8f9fc)}.community-page[hidden]{display:none}.community-inner{max-width:1150px;margin:0 auto;padding:48px 32px 80px}.community-heading{display:flex;gap:24px;align-items:start;justify-content:space-between}.community-heading h1{font-size:36px;letter-spacing:-1px;margin:12px 0}.community-heading p{max-width:640px;font-size:14px;line-height:1.7;color:var(--project-muted,#7d89a0)}.community-create{display:flex;gap:8px;flex-shrink:0}.community-create button{font-size:12px;padding:12px 15px}.community-tabs{display:flex;gap:8px;border-bottom:1px solid var(--project-border,#dce1e9);padding:20px 0 12px;flex-wrap:wrap}.community-tabs button{padding:10px 14px;border-radius:7px;color:var(--project-muted,#7d89a0);font-size:13px}.community-tabs .active{background:var(--project-soft,#eef2fd);color:var(--project-accent,#4665cf)}.community-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:24px}.community-card{background:var(--project-surface,white);border:1px solid var(--project-border,#e0e5ee);border-radius:12px;padding:24px;display:flex;flex-direction:column;align-items:start;min-width:0}.community-card>img{width:90px;height:85px;object-fit:contain;align-self:center;margin-bottom:18px}.community-card h2{font-size:20px;margin:4px 0 10px;overflow-wrap:anywhere}.community-card>p{font-size:13px;line-height:1.65;color:var(--project-muted,#7d89a0);white-space:pre-wrap;overflow-wrap:anywhere}.community-author{font-size:11px!important;margin-top:auto}.community-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;width:100%}.community-card-actions button{font-size:12px}.community-empty{grid-column:1/-1;color:var(--project-muted,#7d89a0);font-size:14px;padding:30px 0}.community-status{display:inline-block;font-size:11px;padding:5px 9px;border-radius:5px;background:#f1f3f8;color:var(--project-muted,#7d89a0)}.community-status.pending{background:#fff4df;color:#a4712c}.community-status.approved{background:#eaf7ed;color:#2b6841}.community-status.rejected{background:#fff0f1;color:#b44d61}.community-review-note{padding:10px;background:#fff6eb;border-radius:6px}.community-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 40px);box-sizing:border-box;padding:30px;border:1px solid var(--project-border,#dce1e9);border-radius:14px;overflow:auto;color:var(--project-text,#303746)}.community-dialog::backdrop{background:#202a4655}.community-dialog h2{font-size:25px;margin:0 32px 18px 0}.community-dialog h3{font-size:14px;margin-top:22px}.community-dialog p{font-size:13px;line-height:1.7;color:var(--project-muted,#7d89a0);white-space:pre-wrap;overflow-wrap:anywhere}.community-field{display:grid;gap:8px;font-size:13px;color:var(--project-muted,#657086);margin:18px 0}.community-field input,.community-field textarea,.community-field select,.community-reference select{padding:11px;box-sizing:border-box;width:100%;border:1px solid var(--project-border,#dce1e9);border-radius:7px;font:inherit;background:var(--project-surface,white);color:var(--project-text,#303746)}.community-field input[type=checkbox]{width:20px;height:20px}.community-form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.community-form-actions button{font-size:12px;padding:12px 16px}.community-reference{padding:16px;border:1px solid var(--project-border,#dce1e9);border-radius:10px;margin-top:22px}.community-reference h3{margin:0}.community-reference select{margin-top:12px}.community-diagram{background:var(--project-soft,#f8f9fc);border:1px solid var(--project-border,#dce1e9);border-radius:9px;padding:12px;margin:12px 0}.community-diagram svg{display:block;width:100%;max-height:400px}.community-finish{position:absolute;top:64px;left:322px;z-index:6;font-size:12px;padding:11px 14px}.community-finish[hidden]{display:none}#custom-element-form textarea{padding:11px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;font:inherit;box-sizing:border-box;width:100%}
@media(max-width:900px){.community-heading{display:block}.community-create{margin:20px 0}.community-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.community-inner{padding:30px 20px}.community-finish{left:190px}}
@media(max-width:600px){.community-grid{grid-template-columns:1fr}.community-dialog{padding:24px}.community-heading h1{font-size:29px}.main-nav{gap:4px}.main-nav a{padding:8px;font-size:11px}.community-finish{left:145px;max-width:calc(100% - 155px)}}
.community-project-select{width:100%;padding:12px;border:1px solid var(--project-border,#dce1e9);border-radius:7px;font:inherit}.community-diagram svg text{fill:var(--project-text,#303746)}
.community-language{display:flex;align-items:center;gap:10px;margin:16px 0;color:var(--project-muted,#657086);font-size:14px}.community-language select,#custom-element-language{padding:8px 12px;border:1px solid #dce1ec;border-radius:8px;background:var(--project-surface,white);color:var(--project-text,#303746);font:inherit}
/* The inspector occupies a stable area; switching its content never moves the camera. */
.task-active .workspace,.task-active.task-collapsed .workspace{--task-space:0px}
.project-properties #task-panel,.task-active .project-properties #task-panel{position:static;inset:auto;width:100%;height:auto;min-height:0;border:0;border-radius:0;box-shadow:none;padding:0;overflow:visible;background:transparent}
.project-properties #task-details,.task-active .project-properties #task-details{display:block;height:auto}
.project-properties #task-details[hidden]{display:none}
.project-properties .task-panel-bottom,.task-active .project-properties .task-panel-bottom{position:static;border-left:0;border-top:1px solid var(--border);padding:16px 0;margin-top:20px;overflow:visible}
.project-properties .task-panel-bottom>.primary{width:100%}.project-properties .task-secondary-actions{display:flex;flex-wrap:wrap;margin:12px 0 0}.project-properties .task-summary,.project-properties .task-conditions{overflow:visible}
.task-active .tools,.task-active.task-collapsed .tools{bottom:16px}.task-active .zoom{bottom:90px}
.task-active .project-properties{bottom:0;max-height:none}.project-properties #expand-task,.task-active .project-properties #expand-task{position:static;inset:auto;width:100%;height:auto;white-space:normal;text-align:left}
.inspector-tabs{display:flex;gap:8px;border-bottom:1px solid var(--border);margin:0 0 18px;padding-bottom:10px}.inspector-tabs[hidden]{display:none}.inspector-tabs button{border:0;background:transparent;color:var(--project-muted,#738096);font:inherit;font-size:13px;padding:8px 9px;border-radius:7px;cursor:pointer}.inspector-tabs button.active{background:#edf1fc;color:#3b58aa}.diagram-comment{border-bottom:1px solid var(--border);padding:14px 0}.diagram-comment p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6;margin:10px 0}.comment-author{display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:var(--project-muted,#657086)}.comment-author time{font-size:11px;color:#8b96a8}.comment-form{margin-top:20px}.comment-form label{display:block;font-size:13px;color:var(--project-muted,#657086)}.comment-form textarea{display:block;box-sizing:border-box;width:100%;margin:8px 0 12px;padding:10px;border:1px solid #dce1ec;border-radius:8px;resize:vertical;font:inherit}.comment-form .primary{width:100%}.comment-form p{font-size:12px;color:#bd4355}
.node-protection{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;padding:2px;border:1.5px solid #86b698;border-radius:50%;background:var(--project-surface,#fff);cursor:pointer;z-index:4}.node-protection img{width:100%!important;height:100%!important;object-fit:contain;margin:0!important;pointer-events:none}.node-protection:hover,.node-protection:focus-visible{background:#edf7e9;border-color:var(--project-accent,#4665cf)}.node.protection-drop-target{outline:2px solid #639b69;outline-offset:5px;border-radius:10px}
@media(max-width:1000px){.task-active .project-properties{bottom:78px;max-height:65vh}.task-active .tools,.task-active.task-collapsed .tools{left:50%}}
/* Language is a compact header preference, separate from workspace navigation. */
.header-actions{margin-left:auto;display:flex;align-items:center;gap:14px;flex-shrink:0;align-self:center}.header-actions .account-button{margin-left:0;max-width:180px}
.language-switch{display:flex;align-items:center;gap:2px;padding:3px;border:1px solid #e2e6ee;border-radius:10px;background:#f3f5f9;box-sizing:border-box;flex-shrink:0}
.language-switch button{display:flex;align-items:center;justify-content:center;min-width:39px;height:29px;padding:0 9px;border:0;border-radius:7px;background:transparent;color:#8490a3;font-family:'Golos Text',sans-serif;font-size:12px;font-weight:500;letter-spacing:.25px;line-height:1;cursor:pointer;transition:background .15s,color .15s,box-shadow .15s}
.language-switch button:hover{color:var(--project-accent,#4665cf);background:#e9edf7}.language-switch button[aria-pressed=true]{background:var(--project-surface,#fff);color:#3b55a4;box-shadow:0 1px 3px #26375a14,0 0 0 1px #dde3ee80}.language-switch button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
@media(max-width:900px) and (min-width:751px){header{gap:25px;padding:0 20px}.main-nav{gap:20px}.header-actions{gap:10px}.header-actions .account-button{max-width:110px}}
@media(max-width:750px){header{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:56px 44px;gap:0 12px;height:100px;padding:0 16px;box-sizing:border-box}.brand{grid-column:1;grid-row:1;width:max-content}.header-actions{grid-column:2;grid-row:1;gap:9px}.header-actions .account-button{max-width:80px;padding:8px 10px;font-size:12px}.main-nav{grid-column:1/-1;grid-row:2;gap:26px;height:44px;min-width:0}.main-nav a{font-size:13px}.language-switch{border-radius:9px;padding:2px}.language-switch button{height:28px;min-width:35px;padding:0 7px}.workspace{height:calc(100dvh - 132px)}.projects-page,.community-page,.catalog-view .tasks-page{height:calc(100dvh - 100px)}}
@media(max-width:350px){header{padding:0 12px;column-gap:8px}.brand-name{font-size:16px}.header-actions{gap:6px}.header-actions .account-button{max-width:62px;padding:8px}.main-nav{gap:20px}}
@media(prefers-reduced-motion:reduce){.language-switch button{transition:none}}
#global-component-dialog .community-field input[type=file]{font-size:12px}.component-load-notice{font-size:12px;line-height:1.5;color:var(--project-muted,#7b8699);padding:8px 0}.component-load-notice[hidden]{display:none}#global-component-message{font-size:13px;line-height:1.5;color:#bd4355}#global-component-save{width:100%;margin-top:16px}
.component-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}.component-tags span{font-size:11px;color:#697891;background:#f0f3f8;border:1px solid #e1e7ef;border-radius:5px;padding:4px 7px;overflow-wrap:anywhere}
.zone-draw-preview{position:absolute;z-index:2;pointer-events:none;border:1.5px dashed #6b84ba;border-radius:12px;background:#92a5cf12;box-sizing:border-box}.zone-draw-preview[hidden]{display:none}.zone-resize-handle{position:absolute;display:none;width:10px;height:10px;box-sizing:border-box;border:1.5px solid var(--project-accent,#4665cf);border-radius:3px;background:var(--project-surface,#fff);z-index:5}.group.selected .zone-resize-handle{display:block}.zone-resize-handle.nw{top:-5px;left:-5px;cursor:nwse-resize}.zone-resize-handle.ne{top:-5px;right:-5px;cursor:nesw-resize}.zone-resize-handle.sw{bottom:-5px;left:-5px;cursor:nesw-resize}.zone-resize-handle.se{bottom:-5px;right:-5px;cursor:nwse-resize}.zone-resize-handle:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}

.project-properties .swatches{width:100%;display:grid;grid-template-columns:repeat(6,26px);gap:12px;padding:3px 2px}.project-properties .swatches button{width:26px;height:26px}.project-properties .swatches button:hover{outline:2px solid var(--project-muted,#8993a4)}.project-properties .swatches button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

#custom-element-form [hidden]{display:none!important}#property-fields textarea{width:100%;box-sizing:border-box;border:1px solid var(--project-border,#dce1e9);border-radius:8px;padding:10px;background:var(--project-surface,white);font:inherit;color:var(--project-text,#303746);font-size:13px;resize:vertical}#property-fields textarea:focus{outline:2px solid var(--accent);outline-offset:1px}#property-fields .custom-threat-toggle{display:flex;align-items:center;gap:8px}#property-fields .custom-threat-toggle input{width:auto}

.property-icon-wrap{position:relative;width:108px;margin:0 auto 20px}.property-icon-wrap .property-icon{margin:0;width:108px;height:95px}.property-icon-edit{position:absolute;right:0;bottom:0;width:28px;height:28px;display:grid;place-items:center;background:var(--project-surface,#fff);border:1px solid var(--project-border,#dce1e9);border-radius:50%;color:var(--project-muted,#657086);box-shadow:0 2px 6px #27365412;cursor:pointer}.property-icon-edit .ui-icon{width:15px;height:15px}.property-icon-edit:hover{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}.property-icon-edit:focus-visible{outline:2px solid var(--accent);outline-offset:3px}#property-icon-dialog{width:min(360px,calc(100vw - 32px));box-sizing:border-box}#property-icon-form label{display:grid;gap:8px;margin:16px 0;font-size:12px;color:var(--project-muted,#657086)}#property-icon-form select,#property-icon-form input{width:100%;box-sizing:border-box;border:1px solid var(--project-border,#dce1e9);border-radius:8px;padding:10px;background:var(--project-surface,white);font:inherit;color:var(--project-text,#303746)}#property-icon-form [hidden]{display:none}#property-icon-message{color:#bd4355}#property-icon-form .primary{width:100%}

.sidebar-view-switch{display:flex;gap:3px;padding:3px;margin-bottom:14px;background:var(--project-soft,#f0f2f7);border:1px solid var(--project-border,#e1e5ed);border-radius:8px}.sidebar-view-switch button{flex:1;min-width:0;padding:7px 4px;font-size:11px;border-radius:5px;color:var(--project-muted,#788394)}.sidebar-view-switch button.active{background:var(--project-surface,#fff);color:var(--project-accent,#354e9e);box-shadow:0 1px 3px #27365412}.sidebar-view-switch button:focus-visible,.object-tree-item:focus-visible{outline:2px solid var(--accent);outline-offset:2px}aside.show-object-tree>:not(.sidebar-view-switch):not(#object-tree):not(.panel-dismiss-common){display:none!important}#object-tree{display:flex;flex:1;min-height:0;flex-direction:column}#object-tree[hidden]{display:none}.object-tree-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.object-tree-heading h2{font-size:15px;margin:0}.object-tree-heading>span{font-size:11px;color:var(--project-muted,#8993a4)}.object-tree-list{overflow:auto;min-height:0;flex:1;padding:2px 3px 10px;overscroll-behavior:contain}.object-tree-row{display:grid;grid-template-columns:16px 24px minmax(0,1fr);gap:5px;align-items:center;min-height:38px;padding:3px 5px;border-radius:6px;cursor:pointer}.object-tree-row:hover{background:#f2f4f9}.object-tree-item.selected>.object-tree-row{background:var(--project-soft,#eaf0ff);color:var(--project-accent,#354e9e);box-shadow:inset 0 0 0 1px #cbd7f7}.object-tree-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.object-tree-icon{width:24px;height:24px;object-fit:contain;display:grid;place-items:center;color:#7c88a0;font-size:17px}.object-tree-toggle{width:16px;height:24px;color:var(--project-muted,#788394);font-size:17px;display:grid;place-items:center}.object-tree-children{margin-left:13px;padding-left:3px;border-left:1px solid #e4e8f0}.object-tree-connections{font-size:11px;color:var(--project-muted,#8993a4);margin:18px 4px 7px}.object-tree-hint{font-size:10px;color:var(--project-muted,#8993a4);line-height:1.5;margin:0;padding:8px 0}.layout-controls h3{font-size:13px;margin:20px 0 12px}.layout-controls>p{font-size:11px;color:var(--project-muted,#788394);margin:14px 0 8px}.layout-align-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.layout-align-grid button{font-size:11px;line-height:1.4;min-height:38px;padding:8px 4px;border:1px solid var(--project-border,#dce1e9);border-radius:6px;color:var(--project-muted,#657086);background:var(--project-surface,#fff)}.layout-align-grid button:hover:not(:disabled){background:var(--project-soft,#eef2fd);border-color:#b6c5ea}.layout-align-grid button:disabled{opacity:.4;cursor:default}.layout-align-grid button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media(max-width:750px){.sidebar-view-switch{margin-bottom:10px}.sidebar-view-switch button{font-size:10px;padding:6px 1px}.object-tree-heading h2{font-size:12px}.object-tree-row{grid-template-columns:12px 20px minmax(0,1fr);gap:3px;padding:3px 2px}.object-tree-name{font-size:10px}.object-tree-icon{width:20px;height:20px}.object-tree-children{margin-left:8px;padding-left:2px}.object-tree-hint{font-size:9px}}

body.admin-library-preview .project-properties{width:min(390px,calc(100vw - 24px))}

#property-icon-dialog{width:min(700px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:28px;overflow:auto}#property-icon-title{font-size:22px;margin:0 0 18px}#property-icon-search{width:100%;margin-bottom:12px}.icon-picker-categories{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:16px}.icon-picker-categories button{padding:7px 10px;font-size:12px;color:var(--project-muted,#788394);border-radius:6px}.icon-picker-categories button.active{background:var(--project-soft,#eaf0ff);color:var(--project-accent,#354e9e)}.icon-picker-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px;max-height:min(46dvh,430px);overflow:auto;padding:3px;overscroll-behavior:contain}.icon-picker-option{display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px 5px;min-height:112px;border:1px solid var(--project-border,#e2e7ef);border-radius:8px;background:var(--project-surface,#fff);font-size:11px;line-height:1.4;color:var(--project-muted,#657086);cursor:pointer}.icon-picker-option img{width:72px;height:67px;object-fit:contain}.icon-picker-option:hover{background:var(--project-soft,#f5f7fc);border-color:#bdcbe8}.icon-picker-option.active{background:#eef3ff;border:2px solid var(--project-accent,#4665cf);padding:9px 4px;color:var(--project-accent,#354e9e)}.icon-picker-option:focus-visible,.icon-picker-categories button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.icon-picker-selection{display:flex;align-items:center;gap:12px;border-top:1px solid var(--project-border,#e2e7ef);margin-top:16px;padding-top:14px;font-size:12px;color:var(--project-muted,#657086)}.icon-picker-selection .property-icon{width:44px;height:40px;margin:0}.icon-picker-empty{grid-column:1/-1;text-align:center;padding:30px;color:var(--project-muted,#8993a4)}@media(max-width:500px){#property-icon-dialog{padding:22px 16px}.icon-picker-library{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.icon-picker-option img{width:60px;height:58px}.icon-picker-option{font-size:10px;min-height:102px}.icon-picker-categories button{padding:6px 7px;font-size:11px}}

.property-heading h2{margin-right:auto}.property-heading #delete{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;padding:6px;margin-right:8px;font-size:inherit;color:var(--project-muted,#657086);border:1px solid var(--project-border,#dce1e9);border-radius:7px;background:var(--project-surface,#fff);cursor:pointer}.property-heading #delete{color:#bd4355;border-color:#edc5cb}.property-heading #delete .ui-icon{width:19px;height:19px}.property-heading #delete:hover:not(:disabled){background:#fff0f2;color:#a12d40;border-color:#edc5cb}.property-heading #delete:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.property-heading #delete:disabled{opacity:.5;cursor:wait}.property-heading #delete[hidden]{display:none}

.project-properties .property-heading{position:sticky;top:0;z-index:2;background:var(--project-surface,#fff);padding:6px 0}

#nodes{position:relative;z-index:2;isolation:isolate}.object-tree-row{grid-template-columns:16px 24px minmax(0,1fr) 38px}.object-tree-actions{display:flex;gap:2px;opacity:0;pointer-events:none}.object-tree-actions button{width:18px;height:25px;padding:0;display:grid;place-items:center;border-radius:4px;font-size:15px;color:var(--project-muted,#657086)}.object-tree-item.selected>.object-tree-row .object-tree-actions,.object-tree-row:hover>.object-tree-actions,.object-tree-item:focus-within>.object-tree-row .object-tree-actions{opacity:1;pointer-events:auto}.object-tree-actions button:hover:not(:disabled){background:#d9e3fa;color:var(--project-accent,#354e9e)}.object-tree-actions button:disabled{opacity:.25;cursor:default}.object-tree-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.object-tree-item.layer-drop-before>.object-tree-row{box-shadow:inset 0 2px 0 var(--accent)}.object-tree-item.layer-drop-after>.object-tree-row{box-shadow:inset 0 -2px 0 var(--accent)}@media(max-width:750px){.object-tree-row{grid-template-columns:12px 20px minmax(0,1fr)}.object-tree-actions{grid-column:2/-1;display:none;justify-content:flex-end}.object-tree-item.selected>.object-tree-row .object-tree-actions,.object-tree-item:focus-within>.object-tree-row .object-tree-actions{display:flex}}

.object-tree-row{user-select:none;cursor:grab}.object-tree-row:active{cursor:grabbing}

#property-fields>label{display:grid;gap:7px;font-size:12px;color:#68768c}#property-fields>label input,#property-fields>label textarea{width:100%;box-sizing:border-box}#property-fields>.primary{width:100%;margin-top:12px}#property-fields>a.property-button{display:block;text-align:center;text-decoration:none}.public-project-page{max-width:1100px;margin:auto;padding:34px 28px 80px}.public-project-heading{display:flex;justify-content:space-between;gap:16px}.public-project-page h1{font-size:32px;margin:28px 0 14px}.public-project-description{white-space:pre-wrap;line-height:1.6;overflow-wrap:anywhere}.public-project-diagram{margin:24px 0;border:1px solid var(--project-border,#dce2ec);border-radius:16px;background:var(--project-soft,#f8f9fc);padding:24px;overflow:hidden}.public-project-diagram svg{display:block;width:100%;max-height:650px}.public-project-comments{max-width:680px;margin:32px auto}.public-project-comments .comment-form textarea{width:100%;box-sizing:border-box;min-height:90px}.public-project-comments .comment-form button{margin-top:10px}.public-project-comments .diagram-comment p{white-space:pre-wrap;overflow-wrap:anywhere}

.public-project-page{height:calc(100dvh - 80px);overflow:auto;box-sizing:border-box;width:100%}.public-project-page[hidden]{display:none}.public-project-diagram .community-diagram{border:0;padding:0;margin:0}.public-project-diagram svg{max-height:650px}.public-project-heading button{font-size:13px}

/* The first-project invitation uses the same illustrated components as the editor. */
.projects-empty[hidden]{display:none}
.projects-page.is-empty{padding-top:0;padding-bottom:0;overflow-x:hidden}
.projects-page.is-empty .projects-inner{min-height:100%;display:flex;flex-direction:column}
.projects-page.is-empty .projects-heading,.projects-page.is-empty .projects-grid{display:none}
.projects-empty{position:relative;isolation:isolate;display:grid;place-items:center;flex:1;min-height:560px}
.starter-diagram{position:absolute;z-index:-1;top:50%;left:50%;width:1080px;height:600px;transform:translate(-50%,-50%);pointer-events:none;opacity:.62;mask-image:radial-gradient(ellipse at center,#000 45%,transparent 75%);-webkit-mask-image:radial-gradient(ellipse at center,#000 45%,transparent 75%);background-image:radial-gradient(#ccd4e2 .7px,transparent .7px);background-size:24px 24px}
.starter-connections{position:absolute;inset:0;width:100%;height:100%;color:#a3b1cc}
.starter-node{position:absolute;width:130px;text-align:center;color:#75829a;font:18px 'Neucha',sans-serif}
.starter-node img{display:block;width:100px;height:100px;object-fit:contain;margin:0 auto 7px}
.starter-user{left:65px;top:155px;transform:rotate(-5deg)}
.starter-browser{left:325px;top:75px;transform:rotate(3deg)}
.starter-server{left:810px;top:160px;transform:rotate(4deg)}
.starter-database{left:810px;top:375px;transform:rotate(-3deg)}
.starter-cloud{left:505px;top:440px;transform:rotate(-4deg)}
.starter-email{left:65px;top:355px;transform:rotate(3deg)}
.projects-empty-content{position:relative;text-align:center;padding:50px 30px;background:radial-gradient(ellipse,var(--project-background,#f8f9fb) 48%,#f8f9fbeb 65%,#f8f9fb00 74%)}
.projects-empty-content .eyebrow{color:var(--accent);font-size:11px;letter-spacing:1.6px}
.projects-empty-content h1{font-size:clamp(32px,4vw,46px);line-height:1.14;letter-spacing:-1.6px;margin:19px 0 18px;font-weight:700}
.projects-empty-content p{font-size:15px;line-height:1.7;color:var(--project-muted,#737e91);margin:0 0 28px}
.projects-empty-content .primary{background:var(--accent);padding:15px 24px;border-radius:8px;font-size:14px;box-shadow:0 5px 14px #4665cf20;white-space:nowrap}
.projects-empty-content .primary:hover{background:#3654bb;box-shadow:0 7px 18px #4665cf30;transform:translateY(-2px)}
.projects-page.is-empty #projects-message{text-align:center;max-width:560px;align-self:center;margin:0 0 30px;font-size:12px;color:var(--project-muted,#737e91)}
.projects-page.is-empty #projects-message:empty{display:none}
@media(min-width:1600px){.projects-page.is-empty .projects-inner{max-width:1280px}.starter-diagram{transform:translate(-50%,-50%) scale(1.12)}}
@media(max-width:750px){.projects-empty{min-height:500px}.starter-diagram{transform:translate(-50%,-50%) scale(.8);opacity:.42}.projects-empty-content{padding:42px 16px}.projects-empty-content h1{letter-spacing:-1px}.projects-empty-content p{font-size:14px}.projects-page.is-empty #projects-message{margin-bottom:22px}}
@media(max-width:480px){.projects-empty{min-height:440px}.starter-diagram{transform:translate(-50%,-50%) scale(.65);opacity:.32}.projects-empty-content{padding:36px 8px}.projects-empty-content .eyebrow{font-size:9px;letter-spacing:1.1px}.projects-empty-content p{font-size:13px}.projects-page.is-empty{overflow-x:hidden}}
@media(prefers-reduced-motion:reduce){.projects-empty-content .primary{transition:none}.projects-empty-content .primary:hover{transform:none}}

.projects-tabs{display:flex;align-items:center;gap:8px;margin-bottom:28px}.projects-tabs button{display:flex;align-items:center;gap:7px;padding:10px 14px;border-radius:8px;font-size:13px;color:var(--project-muted,#737e91)}.projects-tabs button[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent)}.projects-tabs .ui-icon{width:17px;height:17px}.projects-page.is-empty .projects-tabs{margin:24px 0 0;flex-shrink:0}.project-card-open{display:block;width:100%;padding:0;text-align:left}.project-card-open:focus-visible{outline-offset:-3px}.project-card-actions{display:flex;justify-content:flex-end;gap:10px;padding:0 17px 16px}.project-card-actions button{font-size:12px;padding:8px 10px;border-radius:6px;color:var(--accent)}.project-card-actions button:hover{background:var(--accent-soft)}.project-card-actions .project-remove{color:#a94848}.project-card-actions .project-remove:hover{background:#fceeee}.projects-trash-empty{grid-column:1/-1;color:var(--muted);padding:55px 0;text-align:center;font-size:14px}.project-dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.project-dialog-actions button{padding:12px 16px;border-radius:7px;font-size:13px}.danger-button{background:#b43c3c;color:white}.danger-button:hover{background:#982e2e}#delete-project-dialog{max-width:440px}#delete-project-description{font-size:14px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere}#delete-project-error{color:#a94848;font-size:13px;line-height:1.5}

/* Saved projects sit on a simple canvas grid. */
.projects-page{position:relative;isolation:isolate;background-color:var(--project-background,#f8f9fb);background-image:radial-gradient(#dbe1ec .8px,transparent .8px);background-size:24px 24px}
.projects-inner{position:relative;z-index:1}
.projects-page.is-empty{background-image:none}
.project-card{box-shadow:0 3px 16px #34456b05;background:var(--project-surface,#fff)}

.projects-heading #new-project[hidden]{display:none}

/* Account and integration keys use the existing application palette. */
.user-page{height:calc(100dvh - 72px);overflow:auto;padding:40px 24px 80px;background:var(--project-background,#f8f9fb)}.user-inner{max-width:980px;margin:0 auto}.user-back{display:inline-block;color:var(--muted);font-size:13px;text-decoration:none;margin-bottom:28px}.user-back:hover{color:var(--accent)}.user-heading{display:flex;align-items:center;gap:18px;margin-bottom:38px}.user-heading h1{font-size:30px;letter-spacing:-1px;margin:0 0 8px}.user-heading p{margin:0;color:var(--project-muted,#626b7a);font-size:14px;overflow-wrap:anywhere}.user-heading>button{margin-left:auto;border:1px solid var(--border);background:var(--project-surface,#fff);padding:10px 16px;border-radius:7px;font-size:13px}.user-avatar{width:56px;height:56px;flex-shrink:0;border-radius:16px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:24px;font-weight:600}.user-section{background:var(--project-surface,#fff);border:1px solid var(--border);border-radius:12px;padding:30px;margin-bottom:24px}.user-section h2,#user-guest h2{margin:0 0 10px;font-size:21px;letter-spacing:-.5px}.user-note{color:var(--project-muted,#626b7a);line-height:1.7;font-size:14px;margin:0 0 26px}.key-create{padding:22px;background:var(--project-background,#f8f9fb);border:1px solid var(--border);border-radius:8px}.key-create>label{display:block;font-size:13px;font-weight:500}.key-create input:not([type=checkbox]){display:block;width:100%;margin-top:9px;border:1px solid var(--project-border,#cdd3df);border-radius:6px;padding:12px;background:var(--project-surface,white);color:var(--project-text,#25272d)}.key-create fieldset{border:0;padding:0;margin:22px 0}.key-create legend{font-size:13px;font-weight:500;margin-bottom:12px}.key-scopes{display:grid;grid-template-columns:1fr 1fr;gap:14px}.key-scopes label{display:flex;align-items:center;gap:9px;font-size:13px;color:#4a5362}.key-scopes input{width:16px;height:16px;accent-color:var(--accent);margin:0}.key-create-bottom{display:flex;justify-content:space-between;align-items:center;gap:16px}.key-create-bottom span{font-size:12px;color:var(--project-muted,#626b7a)}.key-list-heading{display:flex;align-items:center;justify-content:space-between;margin-top:28px}.key-list-heading h3{font-size:15px;margin:0}.key-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 0;border-bottom:1px solid var(--border)}.key-row:last-child{border-bottom:0}.key-info{min-width:0}.key-info h4{margin:0 0 8px;font-size:14px;font-weight:500;overflow-wrap:anywhere}.key-info code{font-size:13px;color:var(--project-muted,#626b7a)}.key-info p{font-size:12px;line-height:1.6;color:var(--project-muted,#626b7a);margin:8px 0 0}.key-revoke{color:#a53b3b;font-size:12px;padding:9px 12px;border:1px solid #eed8d8;border-radius:6px;flex-shrink:0}.key-revoke:hover{background:#fff3f3}.keys-empty,#keys-message{font-size:13px;color:var(--project-muted,#626b7a);line-height:1.6}#keys-message:empty{display:none}#keys-message.is-error,#revoke-error{color:#a53b3b}.key-secret{background:var(--accent-soft);border:1px solid #cbd5f5;border-radius:8px;padding:20px;margin-top:20px}.key-secret h3{font-size:16px;margin:0 0 10px}.key-secret p{font-size:13px;color:#465474;line-height:1.6}.key-secret-value{display:flex;gap:10px;align-items:center;margin-bottom:16px}.key-secret-value input{width:100%;min-width:0;font:13px monospace;padding:12px;border:1px solid #b7c4e9;border-radius:6px;background:var(--project-surface,#fff)}.key-secret-value button,.user-config button{padding:10px 12px;border:1px solid var(--project-border,#cdd3df);border-radius:6px;background:var(--project-surface,#fff);font-size:12px;white-space:nowrap}.connection-endpoints{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-bottom:26px}.connection-endpoints h3{font-size:14px;margin:0 0 12px}.connection-endpoints code{display:block;font-size:13px;overflow-wrap:anywhere;line-height:1.6}.connection-endpoints a,.connection-endpoints p{display:block;font-size:12px;margin:10px 0 0;color:var(--accent)}.user-config{border-top:1px solid var(--border);padding:18px 0}.user-config summary{cursor:pointer;font-size:13px;font-weight:500}.user-config p{font-size:13px;color:var(--project-muted,#626b7a);line-height:1.6}.user-config pre{overflow:auto;font-size:12px;line-height:1.7;background:var(--project-background,#f6f7f9);padding:18px;border-radius:6px}.user-revoke-dialog{max-width:460px}.user-revoke-dialog p,#user-guest p{font-size:14px;line-height:1.7;color:var(--project-muted,#626b7a)}#account-button.active{color:var(--accent);background:var(--accent-soft)}#user-view[hidden],#user-content[hidden],#user-guest[hidden],#key-secret[hidden]{display:none}
@media(max-width:640px){.user-page{padding:24px 16px 60px}.user-section{padding:20px 16px}.user-heading{gap:12px;flex-wrap:wrap}.user-heading h1{font-size:24px}.user-heading>div:nth-child(2){flex:1;min-width:0}.user-heading>button{margin-left:68px}.key-create{padding:16px}.key-scopes,.connection-endpoints{grid-template-columns:1fr}.key-create-bottom{align-items:flex-start;flex-direction:column}.key-create-bottom button{width:100%}.key-secret-value{flex-direction:column;align-items:stretch}.key-row{gap:12px}.user-note code{overflow-wrap:anywhere}}

@media(max-width:750px){.user-page{height:calc(100dvh - 100px)}}
@media(max-width:450px){.user-page{height:calc(100dvh - 100px)}}

.node-protection.selected{border-color:var(--accent);box-shadow:0 0 0 3px #4665cf33;background:var(--accent-soft)}.edge-protection.selected circle{stroke:var(--accent);fill:var(--accent-soft)}.edge-protection.selected{filter:drop-shadow(0 0 3px #4665cf88)}.protection-remove{color:#a53b3b;border-color:#eed8d8}

.property-editable{margin:18px 0}.property-editable-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--project-muted,#657086);font-size:12px}.property-text-edit{display:grid;place-items:center;width:28px;height:28px;border-radius:5px;color:var(--project-muted,#657086)}.property-text-edit:hover{background:var(--accent-soft);color:var(--accent)}.property-text-edit .ui-icon{width:16px;height:16px}.property-text-value{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.6;margin:6px 0 0;color:var(--project-text,#303746)}.property-description .property-editable:first-child{margin-top:0}.property-description .property-editable:last-child{margin-bottom:0}.property-description .property-editable-heading{font-weight:600}.property-editable form{margin-top:8px}.property-editable input,.property-editable textarea{width:100%;font:inherit;font-size:14px;line-height:1.6;padding:10px;border:1px solid var(--project-border,#cdd3df);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-text,#303746)}.property-editable textarea{resize:vertical;min-height:100px}.property-edit-actions{display:flex;gap:8px;margin-top:8px}.property-edit-actions button{padding:8px 10px;border-radius:5px;font-size:12px}.property-edit-actions button:first-child{background:var(--accent);color:white}.property-edit-actions button:last-child{background:#f0f2f6}.property-editable [hidden]{display:none}

.key-usage-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:24px 0 0;padding:20px 0;border-top:1px solid var(--border)}.usage-metric span{display:block;font-size:12px;color:var(--project-muted,#626b7a)}.usage-metric strong{display:block;margin-top:8px;font-size:27px;font-weight:600;font-variant-numeric:tabular-nums}.usage-summary-note{grid-column:1/-1;font-size:12px;color:var(--project-muted,#626b7a);margin:0}.usage-note{font-size:12px;color:var(--project-muted,#626b7a);line-height:1.7;margin:0 0 24px}.key-usage{display:grid;grid-template-columns:1fr 1fr;gap:14px 24px;margin:16px 0 0}.key-usage>div:last-child{grid-column:1/-1}.key-usage dt{font-size:11px;color:var(--project-muted,#626b7a);margin-bottom:5px}.key-usage dd{font-size:12px;color:var(--project-text,#303746);margin:0;font-variant-numeric:tabular-nums}.key-row{align-items:flex-start}.key-row .key-revoke{margin-top:4px}.key-info .usage-since{font-size:11px}@media(max-width:450px){.key-usage{grid-template-columns:1fr;gap:12px}.usage-metric strong{font-size:23px}.key-usage-summary{gap:10px}}

.component-fields{border-top:1px solid var(--border);padding-top:18px;margin-top:20px}.component-fields-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.component-fields-heading h3{font-size:13px}.component-fields-heading button{font-size:12px;color:var(--accent);padding:6px}.component-fields>label{display:block;font-size:12px;color:var(--project-muted,#626b7a);margin:14px 0}.component-fields input,.component-fields select,.component-fields-dialog input:not([type=checkbox]),.component-fields-dialog select,.component-fields-dialog textarea,.global-component-fields input:not([type=checkbox]),.global-component-fields select,.global-component-fields textarea{display:block;width:100%;border:1px solid var(--project-border,#cdd3df);border-radius:6px;background:var(--project-surface,white);color:var(--project-text,#303746);padding:10px;margin-top:8px;font:inherit;font-size:13px}.component-fields p{font-size:12px;color:var(--project-muted,#626b7a);line-height:1.6}.component-fields [hidden]{display:none}.component-fields-dialog{width:min(560px,calc(100vw - 32px));max-height:85dvh;overflow:auto}.component-field-row{padding:18px;border:1px solid var(--border);border-radius:8px;margin:16px 0;background:var(--project-background,#f8f9fb)}.component-field-row label{display:block;font-size:13px;margin:12px 0}.component-field-row .field-custom-toggle{display:flex;align-items:center;gap:8px}.field-custom-toggle input{width:auto!important;margin:0!important;accent-color:var(--accent)}#component-fields-error{font-size:13px;color:#a53b3b}.global-component-fields{margin:22px 0}

#mcp-admin-settings[hidden]{display:none}#mcp-instructions-form>label{display:block;font-size:13px;margin-bottom:10px}#mcp-instructions-text{width:100%;resize:vertical;min-height:280px;font:13px/1.7 monospace;color:var(--project-text,#303746);border:1px solid var(--project-border,#cdd3df);border-radius:7px;padding:16px;background:var(--project-background,#f8f9fb)}#mcp-instructions-version{margin:12px 0 20px}.mcp-instructions-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.mcp-instructions-actions>button:not(.primary){padding:10px;font-size:12px;color:var(--accent)}#mcp-instructions-message{font-size:13px;line-height:1.6;color:#465474}#mcp-instructions-message.is-error{color:#a53b3b}

.task-learning{margin-top:16px;border-top:1px solid var(--border);padding-top:12px;overflow-wrap:anywhere}
.task-learning[hidden]{display:none}.task-learning summary{cursor:pointer;font-weight:600;font-size:13px}
.task-learning section{margin-top:18px}.task-learning h3{font-size:13px;margin:6px 0}.task-learning p,.task-learning li{font-size:12px;line-height:1.65}
.task-learning ul{padding-left:18px}.task-learning a{color:var(--accent,#5155a6);text-decoration:underline}.standard-kind{font-size:10px;font-weight:600;color:#526078}
.standard-kind.required{color:#9a4a2d}.standard-kind.conditional{color:#73509c}.standard-reviewed{color:var(--muted,#697386)}

/* Protection badges use transform for positioning; button press must preserve it. */
button.node-protection:active:not(:disabled){transform:translate(-50%,-50%)}.node-protection{transition:background .18s,border-color .18s,box-shadow .18s}

#task-folders[hidden]{display:none}

/* Project notes use the same quiet surface as component descriptions. */
.property-editable[data-editable="project-description"]{margin:22px 0;padding:14px 16px 16px;border:1px solid var(--project-border,#dfe5ee);border-radius:12px;background:#f7f9fc;min-width:0}
.property-editable[data-editable="project-description"] .property-editable-heading{font-weight:600;color:#56657c}
.property-editable[data-editable="project-description"] .property-text-edit{flex-shrink:0;border:1px solid transparent;border-radius:6px}
.property-editable[data-editable="project-description"] .property-text-edit:hover{border-color:#dbe1ed;background:var(--project-surface,#fff)}
.property-editable[data-editable="project-description"] .property-text-value{font-size:13px;line-height:1.75;color:var(--project-text,#465268);margin-top:10px}
.property-editable[data-editable="project-description"] textarea{box-sizing:border-box;background:var(--project-surface,#fff);min-height:180px}
.property-editable[data-editable="project-description"]:focus-within{border-color:#aebbd9}

/* Resize boundaries sit outside scrolling panels, so they stay easy to grab. */
.panel-resize-grip{position:absolute;top:0;bottom:0;width:10px;margin-left:-5px;cursor:col-resize;touch-action:none;z-index:8;outline:none}
.panel-resize-grip[hidden]{display:none}
.panel-resize-grip:focus-visible:not([data-pointer-focus]){outline:none;background:var(--accent-soft)}.panel-resizing .panel-resize-grip{background:transparent}
.panel-resizing,.panel-resizing *{cursor:col-resize!important;user-select:none!important}
@media(min-width:751px){
 .workspace>aside{width:var(--library-width,282px)}
 .workspace .project-properties,body.admin-library-preview .workspace .project-properties{width:var(--inspector-width,300px)}
 #task-editor.admin-task-panel{width:var(--inspector-width,390px)}
 .workspace .document-bar{left:calc(var(--library-width,282px) + 28px);max-width:calc(100% - var(--library-width,282px) - var(--canvas-right-space,0px) - 110px)}
 .workspace .canvas-actions,.workspace .zoom{right:calc(var(--canvas-right-space,0px) + 22px)!important}
 .workspace .tools,.task-active .workspace .tools,.task-active.task-collapsed .workspace .tools,.admin-editing .workspace .tools{left:calc((100% + var(--canvas-left-space,302px) - var(--canvas-right-space,0px))/2)}
 .workspace .toast,.workspace .canvas-hint,.task-active .workspace #task-empty{left:calc((100% + var(--canvas-left-space,302px) - var(--canvas-right-space,0px))/2)}
 .workspace .community-finish{left:calc(var(--library-width,282px) + 40px)}
 .workspace .selection-panel{right:calc(var(--canvas-right-space,0px) + 22px)}
 .workspace #expand-task{left:var(--canvas-left-space,302px);right:var(--canvas-right-space,0px)}
}

/* Compact rule tables with an independent standard selector. */
#tasks-dialog [hidden]{display:none!important}
.standards-note{color:var(--project-muted,#657086);font-size:13px;line-height:1.5;margin:0 0 12px}
.standards-toolbar{margin-bottom:16px}
.standards-toolbar label{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--project-muted,#657086)}
.standards-toolbar select{font:inherit;padding:7px 10px;border:1px solid var(--project-border,#dce1e9);border-radius:5px;background:var(--project-surface,white);color:var(--project-text,#303746)}
.standards-layout{display:grid;grid-template-columns:245px minmax(0,1fr);gap:24px;align-items:start}
.standards-nav{display:flex;flex-direction:column;gap:2px;max-height:65vh;overflow:auto}
.standard-select{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;border:0;border-radius:4px;background:transparent;padding:8px 10px;text-align:left;font:inherit;font-size:13px;line-height:1.35;color:var(--project-text,#465268);cursor:pointer}
.standard-select:hover{background:var(--project-soft,#edf0f6)}
.standard-select[aria-pressed=true]{background:#e8edf9;color:var(--project-accent,#3653ab);font-weight:600}
.standard-count{color:var(--project-muted,#657086);font-size:12px;font-variant-numeric:tabular-nums}
.standard-table-panel{min-width:0}
.standard-table-panel>h3{font-size:18px;margin:0 0 6px}
.standard-scope{font-size:13px;color:var(--project-muted,#657086);line-height:1.5;margin:0 0 8px}
.standard-results,.standard-sources{font-size:12px;color:var(--project-muted,#657086);margin:0 0 10px}
.standard-sources{margin:12px 0 0}
.standard-table-scroll{max-height:65vh;overflow:auto;border:1px solid var(--project-border,#dce1e9);border-radius:5px}
.standard-rules-table{width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:13px;line-height:1.45;min-width:650px}
.standard-rules-table th,.standard-rules-table td{padding:8px 10px;border-bottom:1px solid #e3e7ee;vertical-align:top}
.standard-rules-table thead th{position:sticky;top:0;background:#edf0f5;z-index:1;font-size:12px;color:var(--project-muted,#657086);font-weight:500;white-space:nowrap}
.standard-rules-table tbody th{font-weight:600;width:22%;color:var(--project-text,#303746)}
.standard-rules-table tbody td:first-child{color:#8892a3;width:32px;font-variant-numeric:tabular-nums}
.standard-rules-table tbody td:nth-child(2){width:110px;white-space:nowrap}
.standard-rules-table tbody td:last-child{color:var(--project-text,#465268)}
.standard-rules-table tbody tr:last-child>*{border-bottom:0}
.standard-rules-table tbody tr:hover{background:#f0f3f8}
.standard-rules-table .standard-kind{font-size:11px;line-height:1.4;padding:2px 5px;display:inline-block}
@media(max-width:850px){.standards-layout{grid-template-columns:1fr;gap:16px}.standards-nav{flex-direction:row;max-height:none;overflow:auto;padding-bottom:4px}.standard-select{flex:0 0 auto;width:auto;max-width:240px}.standard-table-scroll{max-height:70vh}}
.standards-page.tasks-page{padding-top:24px}
.standards-page .task-catalog-heading{margin-bottom:14px}
.standards-page .task-catalog-heading h2{font-size:26px;margin:5px 0 8px}
.standards-page .tasks-intro{font-size:13px;line-height:1.5;max-width:920px}
.standards-page .task-filters{margin-bottom:12px}
.standards-page .task-filters input{padding:8px 10px}
.standards-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.standards-tab,.standard-create,.standard-actions button,.standards-load-error button{font:inherit;font-size:12px;padding:7px 10px;border:1px solid var(--project-border,#dce1e9);border-radius:5px;background:var(--project-surface,#fff);color:var(--project-text,#465268);cursor:pointer}
.standards-tab[aria-pressed=true]{color:var(--project-accent,#3653ab);background:#e8edf9;border-color:#c8d2ed}
.standard-create{margin-left:auto;color:var(--project-accent,#3653ab)}
.standards-toolbar label{margin-left:12px}
.standard-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0 12px;font-size:12px;color:var(--project-muted,#657086)}
.standard-actions span{margin-right:auto}
.standards-load-error{font-size:13px;color:#9b4c3e;display:flex;gap:10px;align-items:center}
.standard-editor{width:min(1100px,calc(100vw - 32px));max-width:1100px;max-height:90dvh;padding:20px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;color:var(--project-text,#303746);background:var(--project-surface,#fff)}
.standard-editor::backdrop{background:#19243c66}
.standard-editor-header{display:flex;justify-content:space-between;gap:20px;align-items:center}
.standard-editor-header h2{font-size:22px;margin:0}
.standard-editor button{cursor:pointer;font:inherit;font-size:12px;border:1px solid var(--project-border,#dce1e9);border-radius:4px;padding:6px 9px;background:#f7f8fa;color:var(--project-text,#465268)}
.standard-editor button.primary{background:var(--project-accent,#4665cf);color:white;border-color:var(--project-accent,#4665cf)}
.standard-editor button:disabled{opacity:.4;cursor:default}
.standard-editor-fields{display:grid;grid-template-columns:120px 1fr;gap:10px;margin-top:16px}
.standard-editor-fields>textarea{grid-column:1/-1}
.standard-editor input,.standard-editor textarea,.standard-editor select{width:100%;box-sizing:border-box;font:inherit;font-size:13px;line-height:1.45;padding:7px;border:1px solid var(--project-border,#dce1e9);border-radius:4px;background:var(--project-surface,white);color:var(--project-text,#303746)}
.standard-editor textarea{resize:vertical;min-height:54px}
.standard-editor-note{font-size:12px;color:var(--project-muted,#657086);line-height:1.5;margin:10px 0}
.standard-editor-scroll{max-height:52dvh;overflow:auto;border:1px solid var(--project-border,#dce1e9);border-radius:4px}
.standard-editor .standard-rules-table{min-width:820px}
.standard-editor .standard-rules-table td:nth-child(2){width:140px}
.standard-editor .standard-rules-table td:nth-child(3){width:23%}
.standard-editor .standard-rules-table td:last-child{width:92px;white-space:nowrap}
.standard-editor .standard-rules-table td:last-child button{padding:4px 6px;margin:0 2px}
.standard-editor-footer{display:flex;gap:12px;align-items:center;margin-top:12px;font-size:12px;color:var(--project-muted,#657086);flex-wrap:wrap}
.standard-editor-footer .primary{margin-left:auto}
.standard-editor-error{color:#a14742;margin:0;max-width:55%;line-height:1.4}
@media(max-width:650px){.standards-toolbar label{margin-left:0}.standard-create{margin-left:0}.standard-editor{padding:12px}.standard-editor-error{max-width:100%}}
/* Mobile panels are full-screen views, with the canvas as the default. */
.mobile-panel-tabs,.mobile-panel-header,.mobile-chat-progress{display:none}
@media(max-width:750px){
 .workspace>aside>.icon-grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px;margin-top:12px}
 .workspace aside .library-item{height:104px}.workspace aside .library-item img{width:68px;height:68px}
 .workspace .library-controls{display:flex;gap:8px}.workspace .library-controls #search{flex:1;min-width:0;font-size:16px}
 .workspace .panel-resize-grip{display:none}
}

@media(max-width:750px){header .main-nav{width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}header .main-nav a{flex-shrink:0}}

/* Touch dragging starts after a short hold; quick swipes scroll the library. */
#library .library-item{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.library-touch-ghost{position:fixed;width:100px;height:100px;transform:translate(-50%,-65%);pointer-events:none;z-index:1000;background:#ffffffed;border:1px solid #aab8da;border-radius:12px;box-shadow:0 6px 24px #27365430;display:grid;place-items:center}
.library-touch-ghost img{width:86px;height:86px;object-fit:contain}
#canvas.library-touch-drop{box-shadow:inset 0 0 0 2px var(--accent)}

@media(any-pointer:coarse){#library .library-item,#library .library-item img{-webkit-user-drag:none}}

/* Mobile component deletion is in the property heading. */
@media(max-width:750px){
 .workspace .project-properties #properties-close{display:none!important}
 .workspace .project-properties #selection-panel{margin-top:28px;padding-top:20px;gap:16px}
 .workspace .project-properties .property-heading>#delete{flex:0 0 44px;width:44px;height:44px;margin-left:auto;margin-right:0;padding:10px;border:1px solid #edc5cb;border-radius:7px;background:var(--project-surface,#fff);color:#bd4355;touch-action:manipulation}
 .workspace .project-properties .property-heading>#delete .ui-icon{width:21px;height:21px}
 .workspace .project-properties .property-heading>#delete:active{background:#fff0f2}
}

#canvas.touch-panning{cursor:grabbing}

/* Both mobile canvas controls share one baseline and one bottom inset. */
.canvas-control-row{display:contents}
@media(max-width:750px){
 .workspace #canvas .canvas-control-row{display:flex;position:absolute;left:10px;right:10px;bottom:10px;align-items:center;gap:8px;z-index:4;pointer-events:none}
 .workspace #canvas .canvas-control-row .tools,.workspace #canvas .canvas-control-row .zoom{position:static;transform:none;margin:0;height:48px;box-sizing:border-box;border-radius:10px;pointer-events:auto}
 .workspace #canvas .canvas-control-row .tools{flex:1 1 auto;min-width:0;max-width:none;padding:5px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:none}
 .canvas-control-row .tools::-webkit-scrollbar{display:none}
 .workspace #canvas .canvas-control-row .zoom{flex:0 0 auto;padding:6px;box-shadow:0 5px 20px #27365409}
 .workspace #canvas .canvas-control-row .zoom button{height:34px}
}

@media(pointer:coarse){
 #canvas .port{touch-action:none;-webkit-touch-callout:none}
 #canvas .port::before{width:calc(44px / var(--canvas-zoom,1));height:calc(44px / var(--canvas-zoom,1))}
}

/* Exercise launch: assemble the miniature diagram, then reveal the workspace. */
.task-launch{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px;background:rgba(248,250,252,.97);color:#29313d;cursor:pointer;animation:task-launch-veil 1150ms ease both}
.task-launch-card{width:min(100%,520px);text-align:center;animation:task-launch-card 1150ms cubic-bezier(.2,.7,.2,1) both}
.task-launch-drawing{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:30px;height:86px}
.task-launch-node{display:grid;place-items:center;flex:0 0 82px;width:82px;height:82px;border:1px solid #d6e1ec;border-radius:18px;background:var(--project-surface,#fff);animation:task-launch-node 420ms cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--index)*110ms)}
.task-launch-node img{display:block;width:66px;height:66px;object-fit:contain}
.task-launch-link{height:2px;width:34px;position:relative;background:#90afd0;transform-origin:left;animation:task-launch-link 340ms 240ms ease both}
.task-launch-link::after{content:'';position:absolute;right:0;top:-3px;width:6px;height:6px;border-top:2px solid #90afd0;border-right:2px solid #90afd0;transform:rotate(45deg)}
.task-launch-label{margin:0 0 10px;font-size:12px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#60768d}
.task-launch-card h2{margin:0;font-size:clamp(24px,5vw,34px);line-height:1.2;font-weight:650;letter-spacing:-.025em;overflow-wrap:anywhere}
.task-launch-meta{margin:14px 0 28px;color:#74808e;font-size:13px;line-height:1.6}
.task-launch-progress{margin:auto;width:104px;height:3px;border-radius:4px;background:#e2e9f0;overflow:hidden}
.task-launch-progress span{display:block;height:100%;background:#6d96c1;transform-origin:left;animation:task-launch-progress 850ms ease both}
@keyframes task-launch-veil{0%{opacity:0}12%,78%{opacity:1}100%{opacity:0}}
@keyframes task-launch-card{0%{opacity:0;transform:translateY(12px)}20%,78%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-8px)}}
@keyframes task-launch-node{from{opacity:0;transform:translateY(14px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes task-launch-link{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes task-launch-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(max-width:480px){.task-launch-drawing{gap:8px}.task-launch-node{flex-basis:68px;width:68px;height:68px;border-radius:14px}.task-launch-node img{width:56px;height:56px}.task-launch-link{width:22px}}
@media(prefers-reduced-motion:reduce){.task-launch,.task-launch-card,.task-launch-node,.task-launch-link,.task-launch-progress span{animation:none}}

.account-language-settings{margin-top:22px;padding-top:18px;border-top:1px solid var(--border)}
.account-language-settings h3{margin:0 0 14px;font-size:16px}
.account-language-settings label{display:grid;gap:8px;font-size:13px;color:var(--project-muted,#59616e);max-width:360px}
.account-language-settings select{width:100%;padding:11px 12px;border:1px solid var(--project-border,#cdd3df);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit}
.account-language-settings [data-language-status]{font-size:12px;color:#a53b3b;margin:8px 0 0}
.account-language-settings [data-language-status]:empty{display:none}

/* Optional analytics remain disabled until the visitor makes a choice. */
#cookie-consent{position:fixed;z-index:12000;bottom:max(20px,env(safe-area-inset-bottom));left:20px;width:min(460px,calc(100vw - 40px));max-height:calc(100dvh - 40px);overflow:auto;padding:24px;background:var(--project-surface,#fff);color:var(--project-text,#303746);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 36px #202b4426}
#cookie-consent h2{font:600 18px/1.4 'Golos Text',sans-serif;margin:0 0 12px;letter-spacing:-.3px}
#cookie-consent p{font-size:13px;line-height:1.7;color:var(--project-muted,#626b7a);margin:0 0 18px}
.cookie-consent-actions{display:flex;gap:12px}.cookie-consent-actions button{flex:1;padding:11px 16px;border:1px solid var(--project-border,#cdd3df);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:500 13px/1.5 'Golos Text',sans-serif;cursor:pointer}
.cookie-consent-actions button:hover{background:#f0f2f6}
#cookie-settings{padding:10px 16px;border:1px solid var(--border);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:400 13px/1.5 'Golos Text',sans-serif;cursor:pointer}
#cookie-consent button:focus-visible,#cookie-settings:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#cookie-consent[hidden],#cookie-settings[hidden],#cookie-consent [hidden]{display:none}
@media(max-width:480px){#cookie-consent{left:12px;bottom:max(12px,env(safe-area-inset-bottom));width:calc(100vw - 24px);padding:20px}}

/* Keep touch gestures on the canvas from selecting labels in mobile Safari. */
@media(max-width:750px),(any-pointer:coarse){
 #canvas,#canvas .node-label{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
 #canvas .node-label[contenteditable=true],#canvas input,#canvas textarea{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
}

/* Desktop inspector mode is selected explicitly, independently of canvas selection. */
/* Both side panels share a fixed bottom tab bar, outside scrolling content. */
/* Shared segmented control; theme colors must apply equally to both panels. */
.workspace :is(.sidebar-view-switch,.desktop-inspector-tabs){position:static;display:flex;flex:0 0 auto;gap:3px;margin:12px 0 0;padding:3px;background:var(--project-soft,#eef1fb);border:1px solid var(--project-border,#dce2eb);border-radius:8px}
.workspace :is(.sidebar-view-switch,.desktop-inspector-tabs,.mobile-panel-tabs) button{flex:1;min-width:0;min-height:34px;padding:7px 10px;border:0;border-radius:5px;background:transparent;color:var(--project-muted,#788394);font:500 12px/1.5 'Golos Text',sans-serif;cursor:pointer}
.workspace :is(.sidebar-view-switch,.desktop-inspector-tabs,.mobile-panel-tabs) button:hover{background:var(--project-surface,#fff);color:var(--project-text,#303746)}
.workspace :is(.sidebar-view-switch,.desktop-inspector-tabs,.mobile-panel-tabs) button:is(.active,[aria-pressed=true]){background:var(--project-surface,#fff);color:var(--project-accent,#4665cf);box-shadow:0 1px 3px #27365412}
.workspace :is(.sidebar-view-switch,.desktop-inspector-tabs,.mobile-panel-tabs) button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:1px}
.workspace>aside{padding-bottom:14px}
.inspector-content{display:contents}
@media(min-width:751px){
 .workspace .project-properties:not([hidden]){display:flex;flex-direction:column;overflow:hidden;padding-bottom:14px}
 .inspector-content{display:block;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
 .desktop-inspector-tabs[hidden]{display:none}
}

@media(max-width:750px){.desktop-inspector-tabs{display:none}}

/* Folder step navigation in the exercise inspector. */
.task-active .task-panel-top.task-step-picker,.task-step-picker{position:relative;height:auto;min-height:30px}
#task-step-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:7px 0;border:0;background:transparent;color:var(--accent);font:inherit;font-size:12px;line-height:1.5;text-align:left;cursor:pointer}
#task-step-toggle>span{min-width:0;overflow-wrap:anywhere}#task-step-toggle>svg{flex-shrink:0;color:var(--project-muted,#8993a4);transition:transform .15s}#task-step-toggle[aria-expanded=true]>svg{transform:rotate(180deg)}#task-step-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
#task-step-menu{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:40;max-height:min(320px,35dvh);overflow-y:auto;overscroll-behavior:contain;padding:5px;border:1px solid var(--border);border-radius:9px;background:var(--project-surface,#fff);box-shadow:0 8px 24px #222d4920}
#task-step-menu[hidden]{display:none}#task-step-menu>button{display:flex;align-items:flex-start;gap:9px;width:100%;border:0;border-radius:5px;padding:10px 8px;color:#4e586a;background:transparent;text-align:left;font:inherit;font-size:12px;line-height:1.5;cursor:pointer}#task-step-menu>button:hover,#task-step-menu>button:focus-visible{background:var(--project-soft,#f3f5fa);outline:none}#task-step-menu>button[aria-current=step]{color:var(--project-accent,#4665cf);background:var(--project-soft,#eef2fd)}#task-step-menu>button:disabled{color:var(--project-muted,#8993a4);cursor:default}
.task-step-number{flex:0 0 22px;font-variant-numeric:tabular-nums}.task-step-text{flex:1;min-width:0;overflow-wrap:anywhere}.task-step-text>span,.task-step-text>small{display:block}.task-step-text>small{font-size:10px;margin-top:3px}.task-step-current{margin-left:auto}

/* Task check signals stay separate from editable diagram data. */
.task-signal-layer{pointer-events:none}
#task-signal-status{font-size:12px;line-height:1.5;color:#596575;margin:0 0 12px;padding:10px 12px;background:#f1f5f5;border-radius:8px}

.task-signal-celebration{position:absolute;inset:0;z-index:6;pointer-events:none;overflow:hidden}
.task-signal-success{position:absolute;top:18%;left:50%;transform:translateX(-50%);padding:13px 22px;border:1px solid #b6ddc9;border-radius:16px;background:#f0fff8;box-shadow:0 8px 32px #16865e24;color:#126443;font-size:18px;font-weight:600;white-space:nowrap;animation:task-success-in .25s ease-out both}
.task-firework{position:absolute;width:0;height:0}
.task-firework i{position:absolute;width:5px;height:5px;border-radius:50%;background:var(--spark-color);box-shadow:0 0 7px var(--spark-color);opacity:0;animation:task-firework-burst 1.35s ease-out var(--burst-delay) both}
@keyframes task-firework-burst{0%{opacity:0;transform:translate(0,0) scale(.4)}12%{opacity:1}65%{opacity:1;transform:translate(var(--dx),var(--dy)) scale(1)}100%{opacity:0;transform:translate(var(--dx),calc(var(--dy) + 55px)) scale(.2)}}
@keyframes task-success-in{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){.task-signal-success{animation:none}.task-firework{display:none}}
@media(min-width:751px){.task-signal-celebration{left:var(--canvas-left-space,302px);right:var(--canvas-right-space,0px)}}

.run-task-signal{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:40px;padding:0 12px;border:1px solid var(--project-border,#d9dce3);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-accent,#4665cf);font:500 12px 'Golos Text';white-space:nowrap;cursor:pointer}
.run-task-signal[hidden]{display:none}.run-task-signal svg{width:18px;height:18px;flex-shrink:0}.run-task-signal:hover{background:#edf2ff;border-color:#a3b4df}.run-task-signal:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
@media(min-width:751px){.task-active .workspace .document-bar{max-width:max(0px,calc(100% - var(--library-width,282px) - var(--canvas-right-space,0px) - 270px))}}
@media(max-width:750px){.task-active .workspace .document-bar{max-width:calc(100% - 220px)}.run-task-signal{height:40px;padding:0 10px;font-size:12px}}

#restart-task.canvas-restart{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:9px;border:1px solid var(--project-border,#d9dce3);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-muted,#657086);cursor:pointer;flex-shrink:0}
#restart-task.canvas-restart[hidden]{display:none}#restart-task.canvas-restart .ui-icon{width:20px;height:20px}#restart-task.canvas-restart:hover{background:#fff6ec;color:#a1662b;border-color:#d9bb96}#restart-task.canvas-restart:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
@media(min-width:751px){.task-active .workspace .document-bar{max-width:max(0px,calc(100% - var(--library-width,282px) - var(--canvas-right-space,0px) - 320px))}}
@media(max-width:750px){.task-active .workspace .document-bar{max-width:calc(100% - 270px)}}

#restart-task-dialog{position:fixed;inset:58dvh 0 auto;margin:0 auto;transform:translateY(-50%);width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto;padding:26px;border:1px solid var(--project-border,#dce1e9);border-radius:18px;background:var(--project-surface,#fff);color:var(--project-text,#303746);box-shadow:0 20px 70px #202a462b}
#restart-task-dialog::backdrop{background:#202a4640;backdrop-filter:blur(2px)}
#restart-task-dialog h2{margin:0 0 10px;font-size:23px;line-height:1.25;letter-spacing:-.5px}
#restart-task-dialog p{margin:0;color:var(--project-muted,#727d8f);font-size:13px;line-height:1.65}
.restart-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.restart-dialog-actions button{padding:11px 16px;border:1px solid var(--project-border,#dce1e9);border-radius:9px;font:500 13px 'Golos Text';cursor:pointer}
.restart-dialog-actions button:not(.primary){background:var(--project-surface,#fff);color:var(--project-muted,#657086)}.restart-dialog-actions button:not(.primary):hover{background:#f3f5f9}
.restart-dialog-actions button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
@media(max-width:450px){#restart-task-dialog{padding:22px}.restart-dialog-actions button{min-height:44px;flex:1}}

#canvas-signal-actions{position:relative}#canvas-signal-actions[hidden]{display:none}
.canvas-next-task{position:absolute;top:calc(100% + 8px);left:0;min-width:100%;padding:11px 13px;border:1px solid #16865e;border-radius:8px;background:#16865e;color:var(--project-surface,#fff);box-shadow:0 4px 12px #16865e1f;font:500 12px 'Golos Text';white-space:nowrap;cursor:pointer}
.canvas-next-task[hidden]{display:none}.canvas-next-task:hover{background:#116c4b;border-color:#116c4b}.canvas-next-task:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
@media(max-width:750px){.canvas-next-task{min-height:44px}}

/* Exercise discussion is a single section below the brief. */
#task-comments{margin-top:24px;padding-top:20px;border-top:1px solid var(--border)}
#task-comments h3{margin:0 0 10px;font-size:15px}

/* Reading and writing architecture articles. */
.articles-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:24px}
.article-card{padding:26px;border:1px solid var(--line,#e0e3e8);border-radius:16px;background:var(--project-surface,#fff);display:flex;flex-direction:column;align-items:flex-start}
.article-card h3{font-size:23px;line-height:1.3;margin:16px 0 12px}.article-card a{color:inherit;text-decoration:none}.article-card a:hover{text-decoration:underline}.article-card p{font-size:15px;line-height:1.7;color:var(--project-muted,#657086);margin:0 0 24px}.article-time{font-size:13px;color:var(--project-muted,#657086);margin-top:auto}
.article-back{margin:12px 0 24px}.article-reader{max-width:800px;margin:0 auto 48px;padding:32px 40px;background:var(--project-surface,#fff);border:1px solid var(--line,#e0e3e8);border-radius:16px;overflow-wrap:anywhere}.article-reader h1{font-size:36px;line-height:1.2;margin:0 0 20px}.article-lead{font-size:19px;line-height:1.7;color:var(--project-muted,#657086)}.article-body{font-size:17px;line-height:1.85;overflow-wrap:anywhere;white-space:normal}.article-body p{white-space:pre-line;margin:0 0 20px}.article-body h2{font-size:24px;line-height:1.3;margin:32px 0 16px}.article-body ul{padding-left:24px;margin:0 0 24px}.article-body li{margin-bottom:10px}
.article-editor{width:min(860px,calc(100vw - 32px));max-height:90dvh;padding:28px;border:1px solid #dfe3e9;border-radius:16px;color:var(--project-text,#303746);background:var(--project-surface,#fff)}.article-editor::backdrop{background:#18233266}.article-editor form>label{display:block;font-size:14px;font-weight:500;margin:18px 0}.article-editor input,.article-editor textarea,.article-editor select{display:block;width:100%;margin-top:8px;padding:12px;border:1px solid #d4dae3;border-radius:8px;background:var(--project-surface,#fff);color:inherit;font:inherit;box-sizing:border-box}.article-editor textarea{resize:vertical;line-height:1.6}.article-editor details{margin:20px 0}.article-editor summary{cursor:pointer}.article-editor .article-body{padding:20px;background:#f7f8fa;margin-top:12px}
@media(max-width:1000px){.articles-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.articles-grid{grid-template-columns:1fr}.article-reader{padding:22px 18px}.article-reader h1{font-size:28px}.article-body{font-size:16px}.article-editor{padding:18px}.article-editor .standard-editor-header{align-items:flex-start}}
.article-figure{margin:24px 0 30px}.article-figure a{display:block}.article-figure img{display:block;width:100%;height:auto;border-radius:12px;background:var(--project-soft,#f5f7fc)}.article-figure figcaption{font-size:14px;line-height:1.5;color:var(--project-muted,#657086);margin:10px 0 0}.article-body>.article-figure:first-child{margin-top:8px}.article-cover{display:block;width:100%;height:180px;object-fit:contain;background:var(--project-soft,#f5f7fc);border-radius:10px;margin-bottom:20px}

/* Learning catalog and course curriculum. */
#learning-courses[hidden],.learning-back[hidden],.task-filters[hidden]{display:none}
.learning-back{padding:0;margin:0 0 24px;color:var(--accent);font-size:13px}
.learning-course{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr);overflow:hidden;background:var(--project-surface,#fff);border:1px solid var(--project-border,#e0e5ee);border-radius:8px}
.learning-course-body{padding:38px}.learning-course h3{margin:18px 0;font-size:30px;letter-spacing:-.8px;line-height:1.2;color:var(--project-text,#344258)}.learning-course p{max-width:540px;color:var(--project-muted,#7b8699);font-size:14px;line-height:1.75}.learning-course .learning-course-meta{margin:24px 0 20px;color:var(--project-text,#48566d);font-size:12px}.learning-course progress{display:block;appearance:none;width:100%;height:5px;border:0;border-radius:3px;background:var(--project-soft,#edf0f6);accent-color:var(--accent)}.learning-course progress::-webkit-progress-bar{background:var(--project-soft,#edf0f6);border-radius:3px}.learning-course progress::-webkit-progress-value{background:var(--accent);border-radius:3px}.learning-course progress::-moz-progress-bar{background:var(--accent)}.learning-course .learning-course-progress{font-size:12px;margin:9px 0 24px}.learning-course .primary{padding:12px 18px;font-size:13px}
.learning-course-art{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px;background:var(--project-soft,#f0f3fa);padding:32px}.learning-course-art>div{position:relative;display:flex;align-items:center;gap:18px;width:190px;padding:12px 20px;border:1px solid var(--project-border,#dce3ef);border-radius:6px;background:var(--project-surface,#fff);color:var(--project-muted,#65738b);font-size:13px;box-sizing:border-box}.learning-course-art>div+div:before{content:'';position:absolute;left:50%;top:-27px;height:26px;border-left:1px solid #a5b4d0}.learning-course-art img{width:46px;height:46px;object-fit:contain}.learning-module-number{color:var(--project-muted,#8a95a7);font-size:12px;font-variant-numeric:tabular-nums}
.learning-back:focus-visible,.learning-course button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
@media(max-width:650px){.learning-course{grid-template-columns:1fr}.learning-course-body{padding:26px}.learning-course h3{font-size:26px}.learning-course-art{display:none}}

#learning-curriculum[hidden],#learning-practice-return[hidden]{display:none}
.learning-summary{display:flex;gap:24px;align-items:center;margin:0 0 28px;color:var(--project-muted,#7b8699);font-size:13px}.learning-summary progress{width:180px;height:5px;accent-color:var(--accent)}
.learning-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:40px;align-items:start}.learning-outline{display:grid;gap:4px;position:sticky;top:0}.learning-step{display:flex;align-items:flex-start;gap:12px;text-align:left;padding:14px 12px;border:1px solid transparent;border-radius:6px;color:var(--project-muted,#65738b)}.learning-step[aria-current=step]{background:var(--project-soft,#eef2fd);border-color:#d9e1f7;color:var(--project-accent,#354e9e)}.learning-step:hover{background:var(--project-soft,#f0f3fa)}.learning-step-number{font-size:12px;padding-top:2px;font-variant-numeric:tabular-nums;color:var(--project-muted,#8a95a7)}.learning-step strong{display:block;font-size:13px;font-weight:500;line-height:1.5}.learning-step small{display:block;font-size:11px;line-height:1.6;margin-top:5px;color:#8590a3}.learning-step-content{min-width:0}.learning-step-content>h3{font-size:27px;line-height:1.25;letter-spacing:-.6px;color:var(--project-text,#344258);margin:12px 0 28px}.learning-section-title{font-size:15px;font-weight:500;margin:28px 0 14px;color:var(--project-text,#48566d)}.learning-theory{padding:26px;margin:0 0 16px;border:1px solid var(--project-border,#e0e5ee);background:var(--project-surface,white);border-radius:8px}.learning-theory h5,.learning-practice h5{font-size:18px;line-height:1.4;letter-spacing:-.2px;font-weight:500;color:var(--project-text,#344258);margin:10px 0 14px}.learning-theory p,.learning-practice p{font-size:14px;line-height:1.85;color:var(--project-muted,#65738b)}.learning-theory-flow{display:flex;align-items:center;justify-content:center;gap:24px;background:var(--project-soft,#f6f8fc);padding:20px;margin:18px 0;border-radius:6px}.learning-theory-flow>span{display:flex;align-items:center}.learning-theory-flow img{width:60px;height:60px;object-fit:contain}.learning-flow-divider{font-size:24px;color:#9da9be}.learning-read{font-size:12px;color:var(--accent);padding:9px 12px;border:1px solid var(--project-border,#dce3ef);border-radius:5px}.learning-read[aria-pressed=true]{background:var(--project-soft,#eef2fd);border-color:#d9e1f7}.learning-note{font-size:11px;line-height:1.7;color:var(--project-muted,#929daf)}.learning-practice{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;padding:24px 0;border-top:1px solid var(--project-border,#e0e5ee)}.learning-practice p{font-size:13px}.learning-practice-actions{display:flex;align-items:flex-end;flex-direction:column;gap:12px;justify-content:center}.learning-practice-actions small{max-width:150px;font-size:11px;line-height:1.6;color:var(--project-muted,#929daf)}.learning-step-controls{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:18px;margin:24px 0 40px;border-top:1px solid var(--project-border,#e0e5ee);padding-top:24px}.learning-step-controls button{font-size:12px}.learning-step-controls .primary{margin-left:auto;padding:12px 16px}.learning-step-controls p{font-size:13px;line-height:1.7;color:var(--project-muted,#65738b)}.learning-step:focus-visible,.learning-read:focus-visible,.learning-step-controls button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}#learning-practice-return{display:block;text-align:left;font-size:11px;margin:0 0 20px;padding:0;line-height:1.6}
@media(max-width:850px){.learning-layout{grid-template-columns:220px minmax(0,1fr);gap:24px}.learning-practice{grid-template-columns:1fr}.learning-practice-actions{align-items:flex-start}.learning-practice-actions small{max-width:none}}
@media(max-width:650px){.learning-layout{grid-template-columns:1fr;gap:28px}.learning-outline{position:static;display:flex;overflow-x:auto;gap:8px;padding-bottom:8px}.learning-step{min-width:210px;flex:0 0 210px;padding:12px}.learning-theory{padding:20px}.learning-theory-flow{gap:16px}.learning-theory-flow img{width:48px;height:48px}.learning-summary{gap:16px;flex-wrap:wrap}.learning-step-content>h3{font-size:25px}}

.learning-quiz{border-top:1px solid var(--project-border,#e0e5ee);margin-top:24px;padding-top:22px}.learning-quiz h6{font-size:16px;font-weight:500;color:var(--project-text,#344258);margin:0 0 8px}.learning-quiz .learning-quiz-note{font-size:12px;color:#8590a3;margin:0 0 20px}.learning-question{border:0;padding:0;margin:0 0 22px;min-width:0}.learning-question legend{font-size:14px;font-weight:500;line-height:1.7;color:var(--project-text,#48566d);margin-bottom:10px;max-width:100%;padding:0}.learning-option{display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid var(--project-border,#e0e5ee);border-radius:5px;font-size:13px;line-height:1.65;color:var(--project-muted,#65738b);cursor:pointer;margin:7px 0}.learning-option:hover{background:var(--project-soft,#f6f8fc)}.learning-option:has(input:checked){border-color:#9bacdd;background:var(--project-soft,#eef2fd);color:var(--project-accent,#354e9e)}.learning-option input{flex:0 0 auto;width:15px;height:15px;margin:3px 0 0;accent-color:var(--accent)}.learning-option:focus-within{outline:2px solid var(--accent);outline-offset:2px}.learning-theory .learning-answer{font-size:12px;line-height:1.8;margin:10px 0 0;padding:10px 12px;background:var(--project-soft,#f6f8fc);border-left:2px solid var(--project-muted,#8a95a7)}.learning-theory .correct{color:#28734e}.learning-theory .incorrect{color:#a64350}.learning-theory .learning-answer.correct{border-left-color:#438260}.learning-theory .learning-answer.incorrect{border-left-color:#b7636e}.learning-theory .learning-quiz-result{font-size:13px;line-height:1.7;font-weight:500;margin:0 0 16px}.learning-quiz-result:focus{outline:2px solid var(--accent);outline-offset:4px}
@media(max-width:650px){.learning-option{padding:10px;font-size:13px}.learning-question legend{font-size:13px}}

/* Illustrated Solution Architect lessons */
.learning-lesson-index{display:grid;gap:9px;margin:0 0 24px}.learning-lesson-index a{font-size:13px;color:var(--project-accent,#354e9e);line-height:1.6;text-decoration:underline;text-underline-offset:3px}.learning-theory{scroll-margin-top:20px}.learning-theory h6{font-size:15px;line-height:1.5;font-weight:600;color:var(--project-text,#344258);margin:26px 0 8px}.learning-video,.learning-illustration{margin:18px 0}.learning-video video{display:block;width:100%;aspect-ratio:16/9;background:#0f172a;border-radius:6px}.learning-video figcaption,.learning-illustration figcaption{font-size:11px;color:var(--project-muted,#65738b);line-height:1.7;margin-top:9px}.learning-illustration img{display:block;width:100%;height:auto;border-radius:6px}.learning-transcript{margin:14px 0 22px;padding:12px 14px;border:1px solid var(--project-border,#e0e5ee);border-radius:6px}.learning-transcript summary{font-size:12px;color:var(--project-accent,#354e9e);cursor:pointer}.learning-theory .learning-video-error{font-size:12px;color:#a64350}.learning-transcript p{font-size:13px}.learning-step-content{overflow-wrap:anywhere}

@media(max-width:900px){.learning-layout{grid-template-columns:1fr;gap:28px}.learning-outline{position:static;display:flex;overflow-x:auto;gap:8px;padding-bottom:8px}.learning-step{min-width:220px;flex:0 0 220px;padding:12px}}

/* Course outline: every submodule stays available while reading one lesson. */
.learning-outline{max-height:calc(100dvh - 150px);overflow-y:auto;overscroll-behavior:contain;padding-right:6px;scrollbar-width:thin}.learning-module{min-width:0}.learning-module>.learning-step{width:100%}.learning-submodules{list-style:none;margin:0 0 16px;padding:0 0 0 12px}.learning-submodule{display:flex;align-items:baseline;gap:10px;padding:9px 10px;border-radius:5px;color:var(--project-muted,#65738b);text-decoration:none;font-size:12px;line-height:1.6}.learning-submodule-number{flex-shrink:0;min-width:26px;font-size:11px;font-variant-numeric:tabular-nums;color:#8491a6}.learning-submodule:hover{background:var(--project-soft,#f0f3fa)}.learning-submodule[aria-current=page]{background:#e7edfc;color:var(--project-accent,#354e9e);font-weight:600}.learning-submodule[aria-current=page] .learning-submodule-number{color:inherit}.learning-submodule:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:900px){.learning-outline{max-height:340px;align-items:start;overflow:auto}.learning-module{flex:0 0 260px;width:260px}.learning-module>.learning-step{min-width:0}.learning-submodules{padding-left:4px;margin-bottom:0}}

/* Course navigation uses one highlight, reserved for the current lesson. */
.learning-layout{grid-template-columns:260px minmax(0,1fr);gap:36px}.learning-outline{gap:6px;border-right:1px solid var(--project-border,#e1e5ed);padding-right:18px}.learning-module{padding-bottom:10px}.learning-module>.learning-step{display:grid;grid-template-columns:22px minmax(0,1fr);gap:8px;padding:10px 4px;border:0;border-radius:0;color:var(--project-text,#445269);background:transparent}.learning-module>.learning-step[aria-current=step]{background:transparent;border:0;color:var(--project-text,#344258)}.learning-module>.learning-step:hover{background:transparent;color:var(--project-accent,#354e9e)}.learning-step-number{font-size:11px;padding-top:2px}.learning-step strong{font-size:12px;font-weight:600;line-height:1.5}.learning-step small{font-size:10px;line-height:1.4;margin-top:4px;color:#8b95a7}.learning-submodules{margin:2px 0 6px;padding:0 0 0 21px}.learning-submodule{display:grid;grid-template-columns:25px minmax(0,1fr);gap:8px;padding:8px 9px;font-size:12px;line-height:1.5;font-weight:400;border-radius:4px}.learning-submodule-number{min-width:0;font-size:10px;color:#9aa3b1}.learning-submodule[aria-current=page]{background:#e9eef9;font-weight:500;color:var(--project-accent,#354e9e)}.learning-edit-course{margin-left:auto;padding:9px 12px;border:1px solid #d7dfed;border-radius:5px;color:var(--project-accent,#354e9e);font-size:12px}.learning-load-error{font-size:12px;line-height:1.6;color:#916231}.learning-load-error button{font-size:12px;text-decoration:underline}
@media(max-width:900px){.learning-layout{grid-template-columns:1fr}.learning-outline{border-right:0;padding-right:0;gap:12px}.learning-module{border:1px solid var(--project-border,#e1e5ed);border-radius:6px;padding:8px;flex-basis:260px}.learning-submodules{padding-left:12px}}

/* Course authoring */
.course-editor{height:calc(100dvh - 72px);min-height:0;width:100%;padding:0;color:var(--project-text,#344258);background:var(--project-surface,#fff);overflow:hidden}.course-editor[hidden]{display:none}.course-editor>form{display:flex;flex-direction:column;height:100%;min-height:0;max-width:1440px;margin:0 auto}.course-editor .course-editor-header{position:static;flex:none;display:flex;align-items:center;height:auto;min-height:0;gap:24px;margin:0;padding:20px 24px;border-bottom:1px solid var(--project-border,#e1e5ed);background:var(--project-surface,#fff)}.course-editor h1{font-size:22px;line-height:1.4;margin:0;font-weight:600}.course-editor h1:focus{outline:none}.course-editor h2{font-size:20px;margin:0;font-weight:600}.course-editor button{font:inherit;font-size:12px;padding:8px 11px;border:1px solid var(--project-border,#dce2eb);border-radius:5px;background:var(--project-surface,#fff);color:var(--project-text,#445269);cursor:pointer}.course-editor button:disabled{opacity:.45;cursor:default}.course-editor button.primary{background:var(--project-accent,#415fa7);color:white;border-color:var(--project-accent,#415fa7)}.course-editor-body{display:grid;grid-template-columns:300px minmax(0,1fr);flex:1;overflow:auto;min-height:0;overscroll-behavior:contain}.course-editor-settings{padding:22px;background:#f7f8fb;border-right:1px solid var(--project-border,#e1e5ed);display:flex;flex-direction:column;gap:16px;align-self:stretch}.course-editor-content{min-width:0;padding:22px;display:flex;flex-direction:column;gap:18px}.course-editor-field{display:flex;flex-direction:column;gap:7px;font-size:12px;line-height:1.5;color:var(--project-muted,#65738b)}.course-editor input,.course-editor textarea,.course-editor select{width:100%;min-width:0;border:1px solid #d7dfeb;border-radius:5px;padding:9px 10px;background:var(--project-surface,#fff);color:var(--project-text,#344258);font:inherit;font-size:13px;line-height:1.6}.course-editor textarea{resize:vertical}.course-editor input:focus,.course-editor textarea:focus,.course-editor select:focus{outline:2px solid #b2c3ec;outline-offset:1px}.course-editor-note{font-size:11px;line-height:1.7;color:#8791a2;margin:0}.course-editor-blocks{display:grid;gap:18px}.course-editor-block{min-width:0;border:1px solid var(--project-border,#dce2eb);border-radius:7px;padding:16px;display:grid;gap:14px;margin:0}.course-editor legend{font-size:12px;font-weight:600;padding:0 7px;color:var(--project-text,#445269)}.course-editor-block-actions,.course-editor-topic-actions{display:flex;gap:6px;flex-wrap:wrap}.course-editor-block-actions{justify-content:flex-end}.course-editor details{min-width:0;border:1px solid var(--project-border,#e1e5ed);border-radius:5px;padding:12px}.course-editor details .course-editor-field{margin-top:12px}.course-editor summary{font-size:12px;font-weight:500;cursor:pointer;color:var(--project-text,#445269)}.course-editor-quizzes fieldset{min-width:0;border:1px solid var(--project-border,#e1e5ed);border-radius:5px;padding:12px;margin:14px 0}.course-editor .course-editor-footer{position:static;display:flex;align-items:center;justify-content:flex-end;gap:18px;padding:16px 24px;margin:0;border-top:1px solid var(--project-border,#e1e5ed);background:var(--project-surface,#fff);flex:none}.course-editor-error{flex:1;font-size:12px;line-height:1.6;color:#a3434f;margin:0}.course-editor>p{padding:24px}.course-editor button:focus-visible{outline:2px solid var(--project-accent,#415fa7);outline-offset:2px}
@media(max-width:700px){.course-editor .course-editor-header{flex-wrap:wrap;gap:12px}.course-editor h1{font-size:18px}.course-editor-body{grid-template-columns:1fr}.course-editor-settings{border-right:0;border-bottom:1px solid var(--project-border,#e1e5ed);padding:16px}.course-editor-content{padding:16px}.course-editor .course-editor-header,.course-editor .course-editor-footer{padding:16px}.course-editor h2{font-size:17px}}
.course-editor .course-editor-footer{height:auto;min-height:68px}

.learning-step small,.learning-submodule-number{color:var(--project-muted,#65738b)}
.course-editor-add-blocks{display:flex;flex-wrap:wrap;gap:8px}.course-editor-caption-row,.course-editor-option-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin:12px 0}.course-editor-image-fields{display:grid;gap:14px}.course-editor-question{min-width:0;border:1px solid var(--project-border,#dce2eb);border-radius:6px;padding:14px;margin:12px 0;display:grid;gap:12px}.learning-content-block{min-width:0}
@media(max-width:650px){.course-editor-caption-row,.course-editor-option-row{grid-template-columns:1fr}.course-editor-caption-row>button,.course-editor-option-row>button{justify-self:start}}

/* Independent course blocks and a restrained inline text toolbar. */
.course-rich-field{border:1px solid var(--line,#dce1ec);border-radius:9px;overflow:hidden;background:var(--surface,var(--project-surface,#fff))}
.course-rich-toolbar{display:flex;gap:4px;flex-wrap:wrap;padding:7px;border-bottom:1px solid var(--line,#dce1ec);background:var(--bg,#f7f8fb)}
.course-rich-toolbar button{min-width:34px;padding:5px 9px;font-size:14px}
.course-rich-toolbar button[aria-pressed=true]{background:#e8edff;color:#354ba8;border-color:#b6c5f4}
.course-rich-toolbar button[data-command=bold]{font-weight:800}.course-rich-toolbar button[data-command=italic]{font-style:italic}.course-rich-toolbar button[data-command=underline]{text-decoration:underline}
.course-rich-input{min-height:calc(1.7em + 24px);max-height:none;overflow:visible;padding:16px;line-height:1.7;outline:none;white-space:pre-wrap;overflow-wrap:anywhere}
.course-rich-input:focus{box-shadow:inset 0 0 0 2px #8da4eb}.course-rich-input:empty:before{content:attr(data-placeholder);color:#8893a8}
.course-rich-input p{margin:0 0 12px}.course-rich-input a,.learning-rich-text a{color:#3659b8;text-decoration:underline}
.learning-rich-text{white-space:pre-wrap;overflow-wrap:anywhere}.learning-rich-text ul,.learning-rich-text ol{padding-left:26px;line-height:1.75}.learning-rich-text li{margin-bottom:6px}
.learning-content-block .learning-block-heading{margin:28px 0 10px;font-weight:500;line-height:1.4;letter-spacing:-.2px;color:var(--project-text,#344258);text-wrap:pretty}.learning-content-block h2.learning-block-heading{font-size:22px}.learning-content-block h3.learning-block-heading{font-size:20px}.learning-content-block h4.learning-block-heading{font-size:18px}.learning-content-block:first-child .learning-block-heading{margin-top:0}@media(max-width:650px){.learning-content-block h2.learning-block-heading{font-size:20px}.learning-content-block h3.learning-block-heading{font-size:18px}.learning-content-block h4.learning-block-heading{font-size:17px}}
.course-rich-input{font-size:16px;color:var(--project-text,#344258);font-weight:400}.course-rich-input span{font:inherit;color:inherit}.course-rich-input strong,.course-rich-input b{font-weight:700}.course-rich-input p{font-size:inherit;color:inherit}
.learning-rich-text p{font-size:15px;line-height:1.8;color:inherit}

.course-image-ai{display:grid;gap:12px;padding:16px;border:1px solid #dbe3f5;border-radius:8px;background:#f5f7fd;min-width:0}.course-editor .course-image-ai h3{font-size:15px;font-weight:600;margin:0;color:var(--project-text,#344258)}.course-image-ai>button{justify-self:start;background:var(--project-accent,#415fa7);color:var(--project-surface,#fff);border-color:var(--project-accent,#415fa7)}.course-image-ai textarea{min-height:0}.course-image-preview{display:block;width:100%;max-height:360px;object-fit:contain;background:#f7f8fb;border:1px solid var(--project-border,#e1e5ed);border-radius:7px}

/* Contextual insertion between course blocks, with keyboard and touch access. */
.course-editor .course-editor-delete{display:inline-flex;align-items:center;justify-content:center;width:36px;min-height:34px;padding:7px;color:#c44343;border-color:#efd6d6;background:var(--project-surface,#fff)}
.course-editor .course-editor-delete:hover{color:#a52c2c;background:#fff0f0;border-color:#dfaaaa}.course-editor-delete .ui-icon{width:18px;height:18px;background-color:currentColor;mask:var(--icon) center/contain no-repeat;-webkit-mask:var(--icon) center/contain no-repeat}
.course-editor-blocks{gap:0}.course-editor-insert{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:36px;margin:-8px 0;isolation:isolate}.course-editor-insert.is-first{margin:0 0 8px}
.course-editor-insert:before{content:'';position:absolute;top:18px;left:0;right:0;height:1px;background:#bdccef;opacity:0;transition:opacity .15s;z-index:-1}
.course-editor .course-editor-insert-toggle{width:30px;height:30px;min-height:30px;border-radius:50%;padding:0;font-size:22px;line-height:1;display:grid;place-items:center;background:var(--project-surface,#fff);color:var(--project-accent,#415fa7);border-color:#aebfe4;opacity:0;transition:opacity .15s}
.course-editor-insert:hover:before,.course-editor-insert:focus-within:before,.course-editor-insert:hover>.course-editor-insert-toggle,.course-editor-insert:focus-within>.course-editor-insert-toggle,.course-editor-insert.is-first>.course-editor-insert-toggle{opacity:1}
.course-editor-insert-menu{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;padding:12px;margin:8px 0 12px;background:var(--project-surface,#fff);border:1px solid var(--project-border,#dce2eb);border-radius:8px;box-shadow:0 4px 16px #24324712;max-width:100%}.course-editor-insert-menu[hidden]{display:none}
@media(hover:none),(pointer:coarse){.course-editor .course-editor-insert-toggle,.course-editor-insert:before{opacity:1}}

/* Account and administration: one focused section at a time. */
.user-page .user-inner{max-width:1180px}.profile-layout{display:grid;grid-template-columns:215px minmax(0,1fr);gap:32px;align-items:start}.profile-menu{display:flex;flex-direction:column;gap:5px;position:sticky;top:0;padding:6px 0}.profile-menu button{display:block;text-align:left;width:100%;padding:12px 14px;border-radius:7px;color:var(--project-muted,#626b7a);font-size:14px;line-height:1.4;min-height:44px}.profile-menu button:hover{background:#eef1f7;color:var(--project-text,#344258)}.profile-menu button[aria-current=page]{background:#e8edfb;color:#354fa2;font-weight:600}.profile-menu-label{margin:24px 14px 6px;font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:#7b8495}.profile-panels{min-width:0}.profile-panels>.user-section{margin-bottom:0}.profile-panels [data-profile-section][hidden]{display:none}.profile-panel>.user-section:last-child{margin-bottom:0}.profile-menu button:focus-visible,.admin-content-links button:focus-visible{outline:2px solid var(--project-accent,#415fa7);outline-offset:2px}
.openai-key-status{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 0 24px;color:#41516c;font-size:14px}.openai-key-status code{font-size:13px;color:#717c8f}.openai-profile form>label{display:block;font-size:13px;font-weight:500;margin-bottom:10px}.openai-profile input{display:block;width:100%;padding:13px;border:1px solid var(--project-border,#cdd3df);border-radius:6px;font:inherit;font-size:15px;background:var(--project-surface,#fff);color:var(--project-text,#25272d)}.openai-profile input:focus{outline:2px solid #b2c3ec;outline-offset:1px}.openai-profile .usage-note{margin:12px 0 24px}.openai-key-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.openai-key-actions button{min-height:42px;padding:10px 14px;border-radius:6px;font-size:13px}.openai-profile #openai-key-message{font-size:13px;line-height:1.7;color:#526783;margin:18px 0 0}.openai-profile #openai-key-message.is-error{color:#a53b3b}.admin-content-links{display:flex;flex-direction:column;gap:2px}.admin-content-links button{display:flex;flex-direction:column;gap:6px;text-align:left;padding:18px 0;border-bottom:1px solid #e6e9ef}.admin-content-links button:last-child{border-bottom:0}.admin-content-links strong{color:#344c8f;font-size:15px;font-weight:600}.admin-content-links span{font-size:13px;color:#727d90}.admin-content-links button:hover strong{text-decoration:underline}
@media(max-width:760px){.profile-layout{grid-template-columns:1fr;gap:20px}.profile-menu{position:static;display:flex;flex-direction:row;flex-wrap:wrap;gap:6px}.profile-menu button{width:auto;flex:0 1 auto;font-size:13px;padding:10px 12px}.profile-menu-label{width:100%;margin:14px 0 4px}.profile-panels .user-section{padding:22px}.user-page{padding-left:16px;padding-right:16px}}
.admin-task-picker{margin-top:22px;display:grid;gap:12px}.admin-task-picker[hidden]{display:none}.admin-task-picker label{font-size:13px;color:var(--project-muted,#626b7a)}.admin-task-picker select{width:100%;padding:12px;border:1px solid var(--project-border,#cdd3df);border-radius:6px;background:var(--project-surface,white);font:inherit;font-size:14px}.admin-task-picker button{justify-self:start;padding:12px 16px;border-radius:6px;font-size:13px}

/* Keep the block name and its controls in one compact row. */
.course-editor-block{padding:10px 12px;gap:8px}.course-editor-block-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px}.course-editor .course-editor-block-header h3{font-size:12px;font-weight:600;line-height:1.4;margin:0;color:var(--project-text,#445269)}.course-editor-block-header .course-editor-block-actions{flex-wrap:nowrap;gap:4px;flex-shrink:0}.course-editor .course-editor-block-actions button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-height:28px;padding:0;font-size:16px}.course-editor .course-editor-block-actions .course-editor-delete{width:28px}.course-editor-block-actions .course-editor-delete .ui-icon{width:15px;height:15px}.course-rich-toolbar{gap:3px;padding:4px}.course-editor .course-rich-toolbar button{min-width:28px;height:28px;min-height:28px;padding:3px 6px;font-size:13px}.course-editor-block .course-rich-input{padding:12px}
@media(pointer:coarse){.course-editor .course-editor-block-actions button{width:36px;height:36px;min-height:36px}.course-editor .course-editor-block-actions .course-editor-delete{width:36px}.course-editor .course-rich-toolbar button{min-width:34px;height:34px}}

.course-image-actions{display:flex;flex-wrap:wrap;gap:8px}.course-editor details.course-image-ai{display:block;padding:10px 12px;background:#f7f9fd}.course-editor details.course-image-ai>summary{margin:0}.course-editor details.course-image-ai[open]>button{margin:12px 0}.course-editor details.course-image-ai .course-editor-note{margin:8px 0 0}
.course-media-library{width:min(850px,calc(100vw - 24px));max-height:calc(100dvh - 40px);padding:24px;border:1px solid var(--project-border,#dce2eb);border-radius:10px;background:var(--project-surface,#fff);color:var(--project-text,#344258);overflow:auto}.course-media-library::backdrop{background:#24324766}.course-media-library-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.course-media-library-header h2{font-size:21px;margin:0}.course-media-library button{padding:9px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:6px;background:var(--project-surface,#fff);color:var(--project-text,#445269);font:inherit;font-size:13px;cursor:pointer}.course-media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.course-media-library .course-media-item{display:flex;flex-direction:column;gap:8px;padding:8px;text-align:left;min-width:0}.course-media-item img{width:100%;aspect-ratio:4/3;object-fit:contain;background:var(--project-soft,#f5f7fb);border-radius:4px}.course-media-item span{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.course-media-item:hover{border-color:#839dd7;background:var(--project-soft,#f5f7ff)}.course-media-library button:focus-visible{outline:2px solid var(--project-accent,#415fa7);outline-offset:2px}.course-media-library [hidden]{display:none}
.learning-lesson-kind{font-size:12px;color:#677ba5;margin:0 0 8px}.learning-final-assignment{border-top:1px solid var(--project-border,#dce2eb);padding-top:20px;margin-top:20px}.learning-final-assignment h6{font-size:18px;margin:0 0 10px}
@media(max-width:550px){.course-media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.course-media-library{padding:16px}.course-image-actions>button{flex:1 1 180px}}

/* Text inputs follow their content rather than reserving empty rows. */
.course-rich-input>:last-child{margin-bottom:0}.course-editor textarea{box-sizing:border-box;min-height:0;max-height:none;overflow-y:hidden;resize:none}

.course-rich-input img,.learning-rich-text img{display:block;width:auto;max-width:100%;height:auto;max-height:440px;object-fit:contain;margin:12px 0;border-radius:6px}.course-rich-input img{cursor:default}.course-rich-input img:only-child,.learning-rich-text img:only-child{margin:0}.course-rich-image-tools{position:relative;display:flex}.course-rich-image-menu{position:absolute;left:0;top:calc(100% + 6px);z-index:5;display:flex;flex-direction:column;gap:4px;min-width:195px;padding:8px;background:var(--project-surface,#fff);border:1px solid var(--project-border,#dce2eb);border-radius:7px;box-shadow:0 5px 18px #24324720}.course-rich-image-menu[hidden]{display:none}.course-editor .course-rich-image-menu button{text-align:left;height:auto;min-height:34px;justify-content:flex-start;white-space:nowrap}.course-rich-field{overflow:visible}.course-rich-toolbar{border-radius:9px 9px 0 0}
.course-rich-input img{cursor:pointer}.course-rich-input img.course-rich-image-selected{outline:3px solid #8298ec;outline-offset:3px}.course-rich-toolbar .course-rich-image-delete{margin-left:auto;color:#dc3838;border-color:#f1cccc}.course-rich-toolbar .course-rich-image-delete[hidden]{display:none}

.course-rich-image-size{display:flex;align-items:center;gap:12px;padding:8px 12px;background:#f6f7fb;border-top:1px solid var(--project-border,#dce2eb);font-size:13px}.course-rich-image-size[hidden]{display:none}.course-rich-image-size input[type=range]{width:150px;max-width:45%;padding:0;min-height:0;accent-color:#485db2}.course-rich-image-size output{min-width:38px;font-variant-numeric:tabular-nums}

.course-image-preview{height:auto}
.course-matching{margin:20px 0;padding:18px;border:1px solid var(--project-border,#dce2eb);border-radius:10px}.course-matching-stage{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(45px,12vw,140px);padding:8px 0}.course-matching-column{display:grid;gap:20px;min-width:0;z-index:1}.course-matching-image{display:flex;align-items:center;justify-content:center;width:100%;min-height:90px;padding:8px;border:2px solid var(--project-border,#dce2eb);border-radius:9px;background:var(--project-surface,#fff);cursor:pointer}.course-matching-image img{display:block;width:100%;height:clamp(90px,16vw,170px);object-fit:contain}.course-matching-image[aria-pressed=true]{border-color:var(--project-accent,#4c62b5);outline:3px solid #dce4ff}.course-matching-image.is-connected{border-color:#8496cc}.course-matching-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.course-matching-lines path{fill:none;stroke:#637cc2;stroke-width:3;vector-effect:non-scaling-stroke}.course-matching-lines path.is-correct{stroke:#238359}.course-matching-lines path.is-incorrect{stroke:#ce4e4e}.course-matching-controls{display:flex;gap:10px;flex-wrap:wrap}.course-matching-feedback{min-height:1.5em}.course-matching-pair{border:1px solid var(--project-border,#dce2eb);border-radius:8px;padding:12px}.course-matching-pair-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.course-matching-pair .course-image-preview{max-height:160px}.course-matching-pair h4{margin:4px 0 10px}@media(max-width:600px){.course-matching{padding:10px}.course-matching-pair-columns{grid-template-columns:1fr}.course-matching-image{padding:4px}}

.course-matching-image{position:relative;overflow:visible;user-select:none}.course-matching-image[data-matching-side=left]{cursor:crosshair}.course-matching-port{position:absolute;top:50%;width:22px;height:22px;transform:translateY(-50%);border:3px solid #637cc2;border-radius:50%;background:var(--project-surface,#fff);box-shadow:0 0 0 4px var(--project-surface,#fff);z-index:2;touch-action:none;cursor:crosshair}.course-matching-image[data-matching-side=left] .course-matching-port{right:-12px}.course-matching-image[data-matching-side=right] .course-matching-port{left:-12px}.course-matching-image[aria-pressed=true] .course-matching-port{background:var(--project-surface,#fff);box-shadow:0 0 0 5px #dce4ff}.course-matching-stage.is-connecting [data-matching-side=right]{border-color:#a5b5e4}.course-matching-image.is-target{outline:3px solid #bacbf5;border-color:var(--project-accent,#4c62b5)!important}.course-matching-image.is-target .course-matching-port{background:var(--project-surface,#fff)}.course-matching-image.is-connected .course-matching-port{background:#637cc2}.course-matching-lines path.is-preview{stroke:#405abe;stroke-width:3;stroke-dasharray:7 5;opacity:.9}.course-matching-hint{font-size:13px;color:#536388}

.course-editor .course-editor-check{display:flex;align-items:center;gap:9px;font-size:13px;margin:8px 0}.course-editor-check input[type=checkbox]{width:17px;height:17px;min-height:0;padding:0;flex-shrink:0;accent-color:var(--project-accent,#4c62b5)}.learning-assignment-disclosure{margin:16px 0;border:1px solid var(--project-border,#dce2eb);border-radius:9px;background:var(--project-surface,#fff)}.learning-assignment-disclosure>summary{padding:15px 18px;cursor:pointer;color:#3e549e;font-weight:600}.learning-assignment-disclosure[open]>summary{border-bottom:1px solid #e7ebf3}.learning-assignment-body{padding:0 16px 16px}.learning-assignment-body>.course-matching{margin-bottom:0}.course-matching.is-frameless{border:0;padding:4px 0}.course-matching.is-frameless .course-matching-image{border-color:transparent!important;background:transparent;box-shadow:none;outline:none;padding:0}.course-matching.is-frameless .course-matching-image:focus-visible{outline:2px solid #9eafe1;outline-offset:4px}.course-matching.is-frameless .course-matching-image.is-target .course-matching-port{box-shadow:0 0 0 5px #dce4ff}.course-matching.is-frameless .course-matching-image img{border-radius:0}

.learning-step-content>.learning-lesson-header{margin:0 0 22px}.learning-module-caption{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 12px;margin:0 0 10px;color:#7b879a;font-size:13px;line-height:1.6}.learning-module-number{font-size:10px;letter-spacing:1px;font-weight:600;white-space:nowrap}.learning-lesson-header .learning-lesson-title{margin:0;color:var(--project-text,#344258);font-size:30px;line-height:1.25;letter-spacing:-.6px;font-weight:650;text-wrap:balance}.learning-theory>.learning-content-block:first-child>.learning-block-heading{margin-top:0}.learning-theory>.learning-content-block:first-child>p:first-child{margin-top:0}@media(max-width:650px){.learning-lesson-header .learning-lesson-title{font-size:25px;letter-spacing:-.35px}.learning-module-caption{font-size:12px}.learning-step-content>.learning-lesson-header{margin-bottom:18px}}

.learning-assignment-disclosure>summary .learning-assignment-description{display:block;margin:6px 0 0 16px;font-size:13px;font-weight:400;line-height:1.6;color:var(--project-muted,#738096);white-space:pre-line;overflow-wrap:anywhere}

.course-editor .course-image-alignment{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 12px;font-size:13px;color:var(--project-muted,#65738b);background:#f6f7fb}.course-editor .course-image-alignment select{width:auto;min-width:120px;max-width:100%;padding:6px 10px;font-size:13px}.learning-illustration[data-align=left],.course-image-preview[data-align=left],.course-rich-input img[data-align=left],.learning-rich-text img[data-align=left]{margin-left:0;margin-right:auto}.learning-illustration[data-align=center],.course-image-preview[data-align=center],.course-rich-input img[data-align=center],.learning-rich-text img[data-align=center]{margin-left:auto;margin-right:auto}.learning-illustration[data-align=right],.course-image-preview[data-align=right],.course-rich-input img[data-align=right],.learning-rich-text img[data-align=right]{margin-left:auto;margin-right:0}

.learning-image-carousel{margin:18px 0}.learning-image-carousel-counter{font-size:12px!important;color:#8290a5!important;margin:0 0 8px}.learning-image-carousel-status{font-size:13px!important;min-height:0;color:var(--project-muted,#536585)!important}.learning-image-carousel-status:empty{display:none}.learning-image-carousel-form .learning-question{margin-top:18px}.learning-image-carousel-form .learning-illustration{margin-top:12px}

.learning-submodule[data-locked=true]{color:#8491a4}.learning-submodule[data-locked=true] .learning-submodule-number{font-size:13px}
.learning-locked{max-width:580px;margin:32px 0;padding:28px;border:1px solid #dce3ee;border-radius:16px;background:#f8faff}.learning-locked h4{margin:14px 0 10px;font-size:23px;line-height:1.3}.learning-locked p{line-height:1.6;color:var(--project-muted,#536585)}.learning-locked-badge{font-size:12px;font-weight:600;color:var(--project-muted,#536585)}.learning-waitlist{display:grid;gap:16px;margin-top:24px}.learning-waitlist[hidden]{display:none}.learning-waitlist>label:first-child{display:grid;gap:8px;font-size:14px}.learning-waitlist input[type=email]{box-sizing:border-box;width:100%;padding:12px;border:1px solid #c7d1e0;border-radius:8px;background:var(--project-surface,#fff);color:#17243b;font:inherit}.learning-waitlist-consent{display:flex;align-items:flex-start;gap:9px;font-size:12px;line-height:1.5;color:var(--project-muted,#536585)}.learning-waitlist-consent input{margin:3px 0 0;flex-shrink:0}.learning-waitlist button{justify-self:start;padding:12px 18px}.learning-waitlist-status:empty{display:none}@media(max-width:600px){.learning-locked{padding:20px}.learning-waitlist button{width:100%}}

/* Inline assessments read as the next learning action. */
.learning-assignment-disclosure{margin:24px 0;border:1px solid #c5d0ee;border-left:4px solid #465bb2;border-radius:10px;background:#f3f6ff;overflow:hidden}
.learning-assignment-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:24px;list-style:none;padding:22px 24px;color:#24345f;cursor:pointer}
.learning-assignment-disclosure>summary::-webkit-details-marker{display:none}
.learning-assignment-disclosure>summary::marker{content:''}
.learning-assignment-copy{display:grid;gap:6px;min-width:0}
.learning-assignment-eyebrow{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#52669f}
.learning-assignment-title{font-size:18px;font-weight:700;line-height:1.35;color:#24345f}
.learning-assignment-disclosure>summary .learning-assignment-description{margin:0;font-size:14px;line-height:1.5;color:#53617b}
.learning-assignment-action{display:inline-flex;align-items:center;justify-content:center;gap:12px;flex-shrink:0;padding:11px 16px;border:1px solid #4055a7;border-radius:7px;background:#4055a7;color:var(--project-surface,#fff);font-size:13px;font-weight:600;line-height:1.4}
.learning-assignment-action::after{content:'→';font-size:17px;line-height:1}
.learning-assignment-close{display:none}
.learning-assignment-disclosure>summary:hover{background:var(--project-soft,#eaf0ff)}
.learning-assignment-disclosure>summary:hover .learning-assignment-action{background:#33478f}
.learning-assignment-disclosure>summary:focus-visible{outline:3px solid #637bd3;outline-offset:-4px;border-radius:7px}
.learning-assignment-disclosure[open]{background:var(--project-surface,#fff)}
.learning-assignment-disclosure[open]>summary{background:#f3f6ff;border-bottom:1px solid #d8e0f1}
.learning-assignment-disclosure[open] .learning-assignment-start{display:none}
.learning-assignment-disclosure[open] .learning-assignment-close{display:inline}
.learning-assignment-disclosure[open] .learning-assignment-action{background:var(--project-surface,#fff);color:#4055a7;border-color:#c5d0ee}
.learning-assignment-disclosure[open] .learning-assignment-action::after{content:'↑'}
.learning-assignment-disclosure[open]>summary:hover .learning-assignment-action{background:var(--project-soft,#eaf0ff)}
.learning-assignment-body{padding:4px 24px 24px}
@media(max-width:600px){.learning-assignment-disclosure>summary{align-items:flex-start;flex-direction:column;gap:16px;padding:18px}.learning-assignment-action{align-self:stretch}.learning-assignment-title{font-size:17px}.learning-assignment-body{padding:4px 18px 18px}}

@media(max-width:750px){.course-editor{height:calc(100dvh - 100px)}}

.course-matching-help{position:relative;z-index:3;width:max-content;margin:0 0 4px auto}.course-matching-help>summary{display:grid;place-items:center;width:30px;height:30px;padding:0;list-style:none;border:1px solid var(--project-border,#dce2eb);border-radius:50%;background:var(--project-surface,#fff);color:var(--project-muted,#65738b);font-size:15px;font-weight:500;cursor:pointer}.course-matching-help>summary::-webkit-details-marker{display:none}.course-matching-help>summary:hover,.course-matching-help[open]>summary{color:var(--project-accent,#415fa7);border-color:#aebfe4;background:var(--project-soft,#f5f7fc)}.course-matching-help>summary:focus-visible{outline:2px solid var(--project-accent,#415fa7);outline-offset:3px}.course-matching-help-content{position:absolute;top:calc(100% + 8px);right:0;width:min(360px,calc(100vw - 64px));padding:16px 18px;background:var(--project-surface,#fff);border:1px solid var(--project-border,#dce2eb);border-radius:8px;box-shadow:0 6px 24px #24324720;overflow-wrap:anywhere}.course-matching-help-content h6{margin:0 0 8px;font-size:14px;line-height:1.5}.learning-theory .course-matching-help-content p,.course-matching-help-content p{margin:0 0 8px;font-size:13px;line-height:1.65;color:var(--project-muted,#65738b)}.course-matching-help-content p:last-child{margin-bottom:0}

.course-editor-question-toolbar{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 16px;min-width:0}.course-editor-question-toolbar>.course-image-actions{order:-1;margin-right:auto}.course-editor-question-toolbar>.course-editor-block-actions{flex-wrap:nowrap;margin-left:auto}.course-editor-question-pager{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 12px}.course-editor .course-editor-question-pager button{min-width:34px;min-height:34px}.course-editor .course-editor-question-pager button[aria-current=page]{background:var(--project-accent,#415fa7);border-color:var(--project-accent,#415fa7);color:var(--project-surface,#fff)}.course-editor .course-editor-question-pager button:last-child{margin-left:auto}

.course-editor-question{container-type:inline-size;gap:12px}.course-editor-question-fields,.course-editor-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;min-width:0}.course-editor-question-fields>.course-editor-field:only-child{grid-column:1/-1}.course-editor-options-grid>.course-editor-option-row{grid-template-columns:minmax(0,1fr) 32px;align-items:end;gap:6px;margin:0;min-width:0}.course-editor-options-grid .course-editor-field{min-width:0;gap:4px}.course-editor .course-editor-options-grid textarea{padding:7px 9px;line-height:1.5}.course-editor .course-editor-options-grid .course-editor-delete{width:32px;min-height:34px;padding:6px;margin-bottom:1px}.course-editor-option-settings{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;min-width:0}.course-editor-option-settings>button{flex-shrink:0}.course-editor-option-settings>select{flex:1;width:auto;min-width:200px}.course-editor-question>.course-editor-field{gap:4px}@container(max-width:560px){.course-editor-question-fields,.course-editor-options-grid{grid-template-columns:minmax(0,1fr)}}

/* Matching exercises can use smaller cards without scaling text or touch targets. */
.course-matching-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-bottom:4px}
.course-matching-toolbar .course-matching-help{margin:0}
.course-matching-size{padding:5px 10px;min-height:32px;border:1px solid var(--project-border,#dce2eb);border-radius:6px;background:var(--project-surface,#fff);color:#536388;font-size:13px;cursor:pointer}
.course-matching-size[aria-pressed=true]{background:#eef2ff;border-color:#9eafe1;color:#3e549e}
.course-matching-size:focus-visible{outline:2px solid var(--project-accent,#415fa7);outline-offset:3px}
.course-matching.is-compact .course-matching-stage{max-width:640px;margin-inline:auto;gap:clamp(45px,8vw,90px);padding:4px 0}
.course-matching.is-compact .course-matching-column{gap:10px}
.course-matching.is-compact .course-matching-image{min-height:0;padding:4px}
.course-matching.is-compact.is-frameless .course-matching-image{padding:0}
.course-matching.is-compact .course-matching-image img{height:clamp(70px,12vw,100px)}

/* Author-defined matching layout keeps ports next to the image cards. */
.course-matching.has-custom-layout .course-matching-stage{width:min(100%,calc(var(--matching-image-size)*2 + var(--matching-column-gap)));max-width:none;margin-inline:auto;gap:min(var(--matching-column-gap),25%);padding:4px 0}
.course-matching.has-custom-layout .course-matching-column{gap:var(--matching-row-gap)}
.course-matching.has-custom-layout .course-matching-image{min-height:0;padding:4px}
.course-matching.has-custom-layout.is-frameless .course-matching-image{padding:0}
.course-matching.has-custom-layout .course-matching-image img{height:auto;aspect-ratio:1;object-fit:contain}
.course-matching-layout{margin:16px 0;padding:16px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:#f7f9fc}
.course-matching-layout-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px 20px}
.course-editor .course-matching-layout input[type=range]{width:100%;min-height:32px;padding:0;accent-color:var(--project-accent,#415fa7);cursor:pointer}
.course-matching-layout-preview{max-height:420px;overflow:auto;background:var(--project-surface,#fff);margin:0;padding:16px}
.course-matching-layout-preview .course-matching-image{cursor:default}

/* Interactive user journey shares the right inspector footprint. */
#user-journey-panel{position:absolute;display:block;left:auto;right:16px;top:82px;bottom:76px;width:300px;padding:20px;overflow:auto;background:var(--project-surface,#fff);border:1px solid #dfe3ed;border-radius:18px;box-shadow:0 10px 35px #30374612;z-index:35;box-sizing:border-box}#user-journey-panel[hidden]{display:none}.journey-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.journey-heading h2{font-size:19px;margin:0}.journey-heading button{font-size:24px;border:0;background:transparent}#user-journey-panel p{font-size:13px;line-height:1.6;color:var(--project-muted,#657086)}#user-journey-panel [data-description]{font-size:15px;color:var(--project-text,#303746)}#user-journey-panel label{display:grid;gap:8px;font-size:13px}#user-journey-panel select{max-width:100%;padding:8px;border:1px solid #dfe3ed;border-radius:8px}.journey-steps{display:grid;gap:6px;margin-top:18px}.journey-steps button{text-align:left;padding:9px 12px;border:1px solid #e2e6ef;background:var(--project-surface,#fff);border-radius:9px}.journey-steps button[aria-current=true]{background:var(--project-soft,#edf1ff);border-color:var(--project-accent,#4665cf);color:var(--project-accent,#3654bc)}.journey-user{position:absolute;width:42px;height:42px;border-radius:50%;border:3px solid var(--project-surface,#fff);background:var(--project-accent,#4665cf);color:var(--project-surface,#fff);box-shadow:0 2px 14px #4665cf88;z-index:30;cursor:grab;touch-action:none;user-select:none}.journey-user:active{cursor:grabbing}.journey-note{font-size:11px!important}.journey-settings label{display:grid;gap:7px;margin:15px 0}.journey-settings input,.journey-settings select{width:100%;box-sizing:border-box;padding:10px;border:1px solid #dfe3ed;border-radius:9px}.journey-settings-actions{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:750px){#user-journey-panel{top:auto;right:8px;left:8px;bottom:76px;width:auto;max-height:36vh;padding:14px}.journey-steps{display:flex;overflow:auto}.journey-steps button{flex-shrink:0}}

/* Architecture chat fills the inspector; composer and model choice stay at its foot. */
.inspector-content[hidden],#architecture-chat[hidden]{display:none!important}.desktop-inspector-tabs button[hidden]{display:none}#architecture-chat{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.architecture-chat-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0}.architecture-chat-heading h2{font-size:18px;margin:0}.architecture-chat-heading button{font-size:22px;padding:5px}.architecture-chat-context{margin:8px 0 14px;font-size:12px;color:var(--project-muted,#788394);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.architecture-chat-messages{flex:1;min-height:70px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.architecture-chat-empty{font-size:14px;color:var(--project-muted,#788394);line-height:1.6}.architecture-chat-message{padding:12px;border-radius:10px;background:var(--project-soft,#f5f7fb);margin:0 0 12px;overflow-wrap:anywhere}.architecture-chat-message.is-user{background:var(--project-soft,#edf1ff)}.architecture-chat-message strong{font-size:11px;color:var(--project-muted,#657086)}.architecture-chat-message p{font-size:14px;line-height:1.6;white-space:pre-wrap;margin:7px 0 0}.architecture-chat-pending{font-size:13px;color:var(--project-muted,#657086)}#architecture-chat [data-status]{font-size:12px;line-height:1.5;color:#9d4354;margin:7px 0;flex-shrink:0}.architecture-chat-composer{flex-shrink:0;border-top:1px solid var(--project-border,#e1e5ed);padding-top:12px}.architecture-chat-composer textarea{display:block;width:100%;box-sizing:border-box;resize:vertical;min-height:65px;max-height:140px;padding:10px;border:1px solid var(--project-border,#dce2eb);border-radius:9px;background:var(--project-surface,#fff);font:inherit;font-size:13px}.architecture-chat-composer [data-send]{display:block;width:100%;margin-top:8px;padding:10px;border-radius:8px}.architecture-chat-model{margin-top:12px}.architecture-chat-model label{display:block;font-size:11px;color:var(--project-muted,#788394);margin-bottom:5px}.architecture-chat-model>div{display:flex;gap:5px}.architecture-chat-model select{flex:1;min-width:0;width:100%;padding:8px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);font-size:12px}.architecture-chat-model button{padding:7px;font-size:18px}.architecture-chat-note{font-size:10px;line-height:1.5;color:#8992a2;margin:8px 0 0}.architecture-chat-composer button:disabled{opacity:.5;cursor:default}
@media(max-width:750px){body .workspace[data-mobile-panel=chat] .project-properties:not([hidden]){display:flex;flex-direction:column;overflow:hidden}.workspace[data-mobile-panel=chat]>#component-library{display:none!important}#architecture-chat{height:100%}.architecture-chat-heading h2{font-size:16px}.architecture-chat-context{margin:3px 0 6px}.architecture-chat-composer{padding-top:7px}.architecture-chat-composer textarea{min-height:48px;max-height:90px}.architecture-chat-model{margin-top:7px}.architecture-chat-note{margin-top:4px}.architecture-chat-messages{min-height:50px}}
@media(max-width:750px){
 #architecture-chat{height:auto}.architecture-chat-context{display:none}.architecture-chat-messages{min-height:24px}.architecture-chat-composer{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:0 7px}.architecture-chat-composer textarea{grid-column:1;min-height:48px;height:48px;resize:none}.architecture-chat-composer [data-send]{grid-column:2;margin:0;height:48px;padding:0;font-size:0}.architecture-chat-composer [data-send]::after{content:'↑';font-size:22px}.architecture-chat-model,.architecture-chat-note{grid-column:1/-1}.architecture-chat-model select{height:32px;padding:5px 8px}.architecture-chat-model label{margin-bottom:3px}.architecture-chat-model button{padding:3px 7px}.architecture-chat-note{font-size:9px;line-height:1.4}#architecture-chat [data-status]{margin:4px 0;font-size:11px}
}

/* Fully hidden panels release their canvas space. Edge buttons restore them. */
.workspace.left-panel-hidden>#component-library,.workspace.left-panel-hidden #resize-left-panel,.workspace.right-panel-hidden #project-properties,.workspace.right-panel-hidden #task-editor,.workspace.right-panel-hidden #user-journey-panel,.workspace.right-panel-hidden #resize-right-panel{display:none!important}
.panel-dismiss{flex:0 0 30px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:7px;font-size:23px;line-height:1;color:var(--project-muted,#788394);background:transparent}.panel-dismiss:hover{background:var(--project-soft,#f0f2f7);color:var(--project-text,#303746)}.library-heading h1{flex:1}.library-heading .panel-dismiss{margin-left:8px}.editor-panel-title>.panel-dismiss{float:right}.panel-restore{position:absolute;top:74px;z-index:40;min-height:36px;padding:7px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:9px;background:var(--project-surface,#fff);color:var(--project-muted,#657086);box-shadow:0 2px 9px #27365412;font-size:12px}.panel-restore-left{left:12px}.panel-restore-right{right:12px}.panel-restore[hidden]{display:none}.workspace .project-properties #properties-close{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;font-size:23px}
@media(min-width:751px){.workspace.left-panel-hidden .document-bar{left:28px;max-width:calc(100% - var(--canvas-right-space,0px) - 270px)}.workspace.left-panel-hidden .community-finish{left:40px}}


/* Agent drawing progresses visibly while retaining one complete undoable edit. */
[data-agent-pending]{opacity:0!important;pointer-events:none!important}.agent-node-enter{animation:agent-node-appear 260ms ease-out both}@keyframes agent-node-appear{from{opacity:0;filter:blur(2px);translate:0 10px}to{opacity:1;filter:none;translate:0 0}}
#agent-drawing-progress{position:absolute;left:50%;top:76px;transform:translateX(-50%);max-width:min(540px,70%);padding:10px 16px;border:1px solid #cdd7f2;border-radius:12px;background:#f3f6ffff;color:var(--project-accent,#3654bc);font-size:13px;box-shadow:0 3px 16px #27365412;z-index:32;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
@media(max-width:750px){#agent-drawing-progress{top:70px;max-width:88%;font-size:11px;padding:7px 10px}}@media(prefers-reduced-motion:reduce){.agent-node-enter{animation:none}}

.agent-skills-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:24px;margin:24px 0}.agent-skill-list{display:grid;gap:8px;margin-bottom:14px}.agent-skill-list button{text-align:left;border:1px solid #e0e5ef;border-radius:8px;padding:10px 12px;background:var(--project-surface,#fff);overflow-wrap:anywhere}.agent-skill-list button[aria-pressed=true]{border-color:var(--project-accent,#4665cf);background:var(--project-soft,#edf1ff);color:var(--project-accent,#3654bc)}.agent-skills-settings form>label{display:grid;gap:7px;margin-bottom:16px}.agent-skills-settings input:not([type=checkbox]),.agent-skills-settings textarea{box-sizing:border-box;width:100%;font:inherit;padding:10px;border:1px solid var(--project-border,#dce2eb);border-radius:8px}.agent-skills-settings textarea{min-height:300px;line-height:1.6;resize:vertical}.agent-skills-settings .agent-skill-enabled{display:flex;align-items:center;gap:8px}.architecture-chat-skills{font-size:10px;line-height:1.4;color:#7c879a;margin:0 0 10px;flex-shrink:0}.architecture-chat-skills:empty{display:none}
@media(max-width:750px){.agent-skills-layout{grid-template-columns:1fr;gap:16px}.agent-skill-list{display:flex;overflow:auto}.agent-skill-list button{flex-shrink:0;max-width:200px}.architecture-chat-skills{display:none}}
.architecture-chat-skill-settings{align-self:flex-start;font-size:11px;color:var(--project-accent,#4665cf);margin:0 0 9px;padding:0;flex-shrink:0}.architecture-chat-skill-settings[hidden]{display:none}

/* The main workspace focuses on drawing and video. Legacy documents retain their data. */
.main-nav #show-tasks,.main-nav #nav-standards,.main-nav #nav-articles,.main-nav #nav-community{display:none!important}
#project-properties #selection-panel{display:none!important}
.property-editable[data-editable="name"]{margin-top:12px;margin-bottom:12px;position:relative;padding-right:32px}
.property-editable[data-editable="name"] .property-editable-heading{position:absolute;right:0;top:0}
.property-editable[data-editable="name"] .property-text-value{font-size:20px;font-weight:600;line-height:1.4;margin:0}
.property-editable[data-editable="name"]:has(form){padding-right:0}
.agent-skill-list{max-height:65vh;overflow:auto}
#create-diagram-video{padding:10px 14px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-accent,#3654bc);font:inherit;cursor:pointer}
.diagram-video-dialog{width:min(900px,90vw);max-height:90dvh;overflow:auto;border:1px solid var(--project-border,#dce2eb);border-radius:16px;padding:24px}
.diagram-video-dialog .video-format{display:grid;gap:8px;margin:16px 0;font-weight:500}
.diagram-video-dialog .video-format select{width:100%;padding:10px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit}
.diagram-video-dialog video{display:block;width:100%;max-height:55dvh;object-fit:contain;margin:16px 0;border-radius:8px;background:var(--project-background,#f6f7f9)}
.diagram-video-dialog .video-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.diagram-video-dialog [hidden]{display:none}
@media(max-width:750px){#create-diagram-video{font-size:12px;padding:8px}.agent-skill-list{max-height:220px}}

.architecture-chat-skills{max-height:76px;overflow:auto}
.agent-skills-layout [data-filter]{box-sizing:border-box;width:100%;padding:10px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;margin-bottom:12px;font:inherit}
@media(min-width:751px){body:not(.task-active) .workspace .document-bar{max-width:calc(100% - var(--library-width,282px) - var(--canvas-right-space,0px) - 400px)}}
@media(max-width:750px){body:not(.task-active) .workspace .document-bar{max-width:calc(100% - 24px)}body:not(.task-active) .workspace .canvas-actions{top:52px!important}body:not(.task-active) .document-bar #title{min-width:0;text-overflow:ellipsis}}
.story-controls{display:flex;gap:8px;margin:18px 0 8px;flex-wrap:wrap}.story-controls button{padding:10px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-soft,#f5f7fb);font:inherit;font-size:13px;cursor:pointer}.story-controls .primary{background:var(--project-accent,#4665cf);color:var(--project-surface,#fff);border-color:var(--project-accent,#4665cf)}.story-transcript{margin:20px 0}.story-transcript summary{cursor:pointer;color:var(--project-accent,#4665cf);font-size:13px}.story-transcript p{white-space:pre-wrap}.node.story-active-node .node-label{background:var(--project-soft,#edf1ff);box-shadow:0 0 0 7px var(--project-soft,#edf1ff);border-radius:4px;color:var(--project-accent,#3654bc)!important}
.node.story-active-node>img{transform-origin:center;filter:drop-shadow(0 0 10px #4665cf55)}
.node.story-active-node[data-story-animation=pulse]>img{animation:story-image-pulse 1.6s ease-in-out infinite}
.node.story-active-node[data-story-animation=sway]>img{animation:story-image-sway 1.8s ease-in-out infinite}
.node.story-active-node[data-story-paused=true]>img{animation-play-state:paused}
@keyframes story-image-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.055)}}
@keyframes story-image-sway{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg)}}
@media(prefers-reduced-motion:reduce){.node.story-active-node>img{animation:none!important}}
.story-animation-setting{display:grid;gap:6px;margin:12px 0;font-size:12px;color:var(--project-muted,#657086)}
.story-animation-setting select{min-height:40px;padding:8px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit}
#user-journey-panel [data-generate]{padding:10px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;font:inherit;color:var(--project-accent,#4665cf);cursor:pointer}#user-journey-panel [hidden]{display:none!important}
#diagram-style-button{flex-shrink:0;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 10px;border:1px solid var(--project-border,#dce2eb);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-muted,#52647e);font:inherit;font-size:12px;cursor:pointer}#diagram-style-button[hidden]{display:none}#diagram-style-dialog{width:min(540px,calc(100vw - 32px));box-sizing:border-box;border:1px solid var(--project-border,#dce2eb);border-radius:16px;padding:28px;max-height:90dvh;overflow:auto}#diagram-style-dialog h2{margin:0 0 12px;font-size:22px}#diagram-style-dialog p{color:var(--project-muted,#657086);font-size:13px;line-height:1.6}#diagram-style-dialog label{display:grid;gap:8px;margin:20px 0 0;font-size:13px;color:var(--project-muted,#52647e)}#diagram-style-dialog select,#diagram-style-dialog textarea{box-sizing:border-box;width:100%;padding:12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;font:inherit;background:var(--project-surface,#fff);color:var(--project-text,#303746)}#diagram-style-dialog textarea{resize:vertical;min-height:130px}#diagram-style-dialog .style-note{font-size:12px}#diagram-style-dialog [data-error]{color:#bd4355}.style-dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:24px}.style-dialog-actions button{padding:10px 14px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;cursor:pointer}.style-dialog-actions .primary{border-color:#2b2f38}.document-bar{display:flex;align-items:center;gap:6px}.document-bar #title{min-width:0;flex:1;text-overflow:ellipsis}
#canvas[data-diagram-style=minimal] .node-label{font-family:'Golos Text',sans-serif;font-weight:500}#canvas[data-diagram-style=comic] .node-label{font-weight:700}#canvas[data-diagram-style=watercolor],#canvas[data-diagram-style=storybook]{background-color:#faf8f3}#canvas[data-diagram-style=blueprint]{background-color:#f0f5fc}#canvas[data-diagram-style=blueprint] .node-label{font-family:monospace;color:#305c9e}#canvas[data-diagram-style=blueprint] .edge-line{stroke:#305c9e}#canvas[data-diagram-style=isometric] .node-label{font-family:'Golos Text',sans-serif}
@media(max-width:750px){#diagram-style-button{max-width:120px;font-size:11px;padding:6px 8px}#diagram-style-dialog{padding:20px}}

.architecture-chat-heading{justify-content:flex-end;gap:8px}.architecture-chat-heading [data-clear]{margin-left:auto}

/* The complete story shares the inspector scroll area with project properties. */
#project-properties #user-journey-panel{position:static;inset:auto;width:100%;max-height:none;padding:20px 0 0;margin-top:20px;overflow:visible;border:0;border-top:1px solid var(--border);border-radius:0;box-shadow:none;z-index:auto}
#project-properties #user-journey-panel .journey-steps{display:none}
#project-properties #user-journey-panel .story-transcript{margin:16px 0}
#project-properties #user-journey-panel .story-transcript p{color:var(--project-text,#303746);overflow-wrap:anywhere;line-height:1.75}

.diagram-video-dialog .video-narration{display:flex;align-items:center;gap:8px;margin-top:16px}
.diagram-video-dialog .video-sound-note{font-size:13px;color:var(--project-muted,#657086)}

.node.image-sized{min-height:64px;min-width:64px}.node.image-sized>img{width:100%;height:calc(100% - 30px);min-height:0;flex:1}.node.image-sized>.node-label{flex-shrink:0;max-width:100%}.image-resize-handle{position:absolute;display:none;z-index:3;touch-action:none}.node.selected>.image-resize-handle{display:block}main.connect .image-resize-handle{display:none!important}.image-resize-handle.n,.image-resize-handle.s{left:8px;right:8px;height:8px;cursor:ns-resize}.image-resize-handle.n{top:-4px}.image-resize-handle.s{bottom:-4px}.image-resize-handle.e,.image-resize-handle.w{top:8px;bottom:8px;width:8px;cursor:ew-resize}.image-resize-handle.e{right:-4px}.image-resize-handle.w{left:-4px}.image-resize-handle.nw,.image-resize-handle.ne,.image-resize-handle.sw,.image-resize-handle.se{width:10px;height:10px;background:var(--project-surface,#fff);border:1.5px solid var(--accent);border-radius:2px}.image-resize-handle.nw{top:-5px;left:-5px;cursor:nwse-resize}.image-resize-handle.ne{top:-5px;right:-5px;cursor:nesw-resize}.image-resize-handle.sw{bottom:-5px;left:-5px;cursor:nesw-resize}.image-resize-handle.se{bottom:-5px;right:-5px;cursor:nwse-resize}

/* Project colors apply to the editor, its controls and the public story. */
body[data-project-theme]{background:var(--project-background);color:var(--project-text);--accent:var(--project-accent);--accent-soft:var(--project-soft);--border:var(--project-border);--muted:var(--project-muted)}
body[data-project-theme] #canvas{background-color:var(--project-background);background-image:radial-gradient(var(--project-grid) .7px,transparent .7px)}
body[data-project-theme] :is(#canvas .node-label,.brand,.main-nav a.active,#title){color:var(--project-text)}
body[data-project-theme] :is(.node img,.library-item img,.community-diagram img){mix-blend-mode:normal}
body[data-project-theme] :is(.group .node-label,.node-label[contenteditable=true]){background:var(--project-background)}
body[data-project-theme] .edge-label{fill:var(--project-muted);stroke:var(--project-background)}
body[data-project-theme] :is(.tools,.zoom,.document-bar,.canvas-actions,.architecture-chat-composer,.public-project-diagram){background:var(--project-surface);border-color:var(--project-border);color:var(--project-text)}
body[data-project-theme] :is(input,textarea,select){background-color:var(--project-surface);color:var(--project-text);border-color:var(--project-border)}
body[data-project-theme] :is(.primary,.architecture-chat-send){background:var(--project-accent);color:var(--project-accent-text);border-color:var(--project-accent)}
body[data-project-theme] :is(button,a):focus-visible{outline:2px solid var(--project-accent);outline-offset:3px}
.project-theme-preview{display:grid;gap:10px;padding:20px;border:1px solid;border-radius:10px;margin:12px 0 20px}.project-theme-preview span{font-size:11px}.project-theme-preview strong{font-size:18px}.project-theme-preview i{width:56px;height:5px;border-radius:3px}
.brand-name{font-family:'Golos Text',sans-serif;transform:none;display:block;font-size:18px;letter-spacing:-.6px;line-height:1.12;max-width:158px;white-space:normal}.brand-name>span{display:block;font:inherit;color:inherit;transform:none;letter-spacing:inherit}
@media(max-width:750px){.brand-name{font-size:14px;max-width:118px}.brand{gap:7px}header{column-gap:12px}.main-nav{gap:12px}}

body[data-project-theme] :is(#diagram-style-button,.canvas-actions button,.architecture-chat-model button,.panel-visibility-toggle){color:var(--project-accent)}
body[data-project-theme] :is(.library-bottom-tabs,.library-view-tabs,.library-panel-tabs){background:var(--project-soft);color:var(--project-text)}
body[data-project-theme] #architecture-chat [data-status]{color:var(--project-muted)}
body[data-project-theme] :is(textarea,input)::placeholder{color:var(--project-muted);opacity:1}
body[data-project-theme] #diagram-style-dialog{background:var(--project-surface);color:var(--project-text)}
body[data-project-theme] .community-diagram{background:var(--project-background)}

.personal-library-status{grid-column:1/-1;padding:12px 4px;color:var(--project-muted,#657086);font-size:12px;line-height:1.5}.personal-library-status button{width:100%;padding:10px;border:1px solid var(--border);border-radius:7px;color:var(--accent)}

#project-theme-confirmation{width:min(720px,calc(100vw - 32px));max-height:90dvh;overflow:auto;padding:28px;border:1px solid var(--project-border,#dce1e9);border-radius:16px;background:var(--project-surface,#fff);color:var(--project-text,#25272d)}#project-theme-confirmation::backdrop{background:#0008}#project-theme-confirmation h2{font-size:24px;line-height:1.25;margin:0 0 12px}#project-theme-confirmation p{font-size:14px;line-height:1.6}#project-theme-confirmation h3{font-size:13px;font-weight:500}.theme-comparison{display:grid;grid-template-columns:1fr 1fr;gap:16px}.theme-comparison section{min-width:0}.theme-preview-scene{padding:16px;border:1px solid;border-radius:8px}.theme-preview-scene>span:first-child{font-size:16px;font-weight:600}.theme-preview-scene p{font-size:12px!important}.theme-preview-action{display:inline-block;padding:8px 12px;border-radius:6px;font-size:12px}.theme-preview-swatches{display:flex;gap:6px}.theme-preview-swatches span{width:24px;height:24px;border-radius:50%;border:1px solid}.project-theme-preview strong{overflow-wrap:anywhere}.theme-comparison .project-theme-preview{height:calc(100% - 42px);margin-bottom:0;align-content:start}
@media(max-width:550px){#project-theme-confirmation{padding:20px}.theme-comparison{grid-template-columns:1fr}#project-theme-confirmation .style-dialog-actions{flex-wrap:wrap}#project-theme-confirmation .style-dialog-actions button{flex:1}}

/* Big Bunch of Stories: a canvas for books, art, life and technology. */
header .brand-symbol{width:38px;height:38px;transform:none;background:#4665cf;border-radius:10px;padding:5px}
header .brand-name{font-size:19px;line-height:1.08;font-weight:600;letter-spacing:-.7px}
.projects-page{background:#f8f9fb;color:#252b38;padding:32px 40px 64px}
.projects-tabs{margin-bottom:28px}.projects-page.is-empty{padding:28px 40px 60px}
.projects-page.is-empty .projects-inner{display:block;min-height:0;max-width:1180px}
.projects-inner{max-width:1180px}.projects-empty{display:grid;grid-template-columns:1.05fr 1fr;gap:52px;min-height:370px;align-items:center;margin-bottom:54px;isolation:auto}
.projects-empty-content{padding:24px 0;text-align:left;background:none}
.projects-empty-content .eyebrow{font-size:11px;letter-spacing:1.5px;color:#4665cf}
.projects-empty-content h1{font-size:clamp(34px,3.9vw,54px);line-height:1.12;letter-spacing:-2px;margin:20px 0}
.projects-empty-content p{font-size:15px;line-height:1.8;color:#596579;max-width:510px;margin-bottom:26px}
.projects-empty-content .primary{background:#4665cf;color:#fff;box-shadow:none;padding:15px 22px;border-radius:9px}
.projects-empty-content .primary:hover{background:#354fae;box-shadow:none;transform:none}
.story-example{min-width:0;border:1px solid #d5deed;border-radius:18px;background:#eef2fa;padding:26px;transform:rotate(-1.5deg)}
.story-example-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;color:#435169}.story-example-heading .ui-icon{width:22px;height:22px;color:#4665cf}
.story-example-flow{display:grid;grid-template-columns:1fr 20px 1fr 20px 1fr;align-items:center;gap:5px;margin:32px 0 26px;text-align:center}.story-example-flow>div{min-width:0}.story-example-flow img{width:100%;max-width:110px;aspect-ratio:1;object-fit:contain;display:block;margin:0 auto 14px}.story-example-flow>span{font:26px 'Neucha',sans-serif;color:#4665cf}.story-example-flow div span{font:21px 'Neucha',sans-serif;color:#303746}
.story-example>p{font-size:12px;line-height:1.6;color:#596579;margin:0 0 18px}.story-example-open{font:500 13px 'Golos Text',sans-serif;color:#354fae;padding:0 0 4px;border-bottom:1px solid #b9c5e8}.story-example-open:hover{border-color:#354fae}
.story-starters{margin:0 0 36px}.story-starters[hidden]{display:none}.story-starters h2{font-size:24px;letter-spacing:-.7px;line-height:1.3;margin:0 0 9px}.story-starters>p{font-size:13px;color:#596579;line-height:1.7;margin:0 0 22px}
.story-starters-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.story-starter{display:flex;flex-direction:column;align-items:flex-start;text-align:left;padding:20px 18px;border:1px solid #dce2ec;border-radius:12px;background:#fff;min-width:0;transition:border-color .18s,background .18s}
.story-starter:hover{background:#f0f3fb;border-color:#8c9ed9}.story-starter img{width:64px;height:64px;object-fit:contain;margin-bottom:20px}.story-starter-topic{color:#4665cf;font-size:11px;margin-bottom:9px}.story-starter strong{font:600 15px/1.4 'Golos Text',sans-serif;color:#303746;margin-bottom:10px}.story-starter-summary{font-size:12px;line-height:1.65;color:#596579}.story-starter:disabled{opacity:.6;cursor:wait}
.story-starters #story-starters-note{margin:20px 0 0;font-size:12px;max-width:740px}
.projects-page:not(.is-empty) .story-starters{margin:0 0 36px}.projects-heading .eyebrow{display:none}
.projects-page.is-empty #projects-message{text-align:left;max-width:none;margin:16px 0 0;color:#596579}
.story-starter:focus-visible,.story-example-open:focus-visible{outline:2px solid #4665cf;outline-offset:5px}
@media(max-width:1000px){.projects-empty{gap:28px}.story-starters-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.story-example{padding:20px}.projects-empty-content h1{font-size:39px}}
@media(max-width:750px){header .brand-name{font-size:14px}header .brand-symbol{width:30px;height:30px;padding:4px;border-radius:8px}.projects-page,.projects-page.is-empty{padding:24px 20px 40px}.projects-empty{grid-template-columns:1fr;gap:12px;margin-bottom:40px;min-height:0}.projects-empty-content{padding:16px 0 20px}.projects-empty-content h1{font-size:40px;letter-spacing:-1.5px}.projects-empty-content p{font-size:14px}.story-example{transform:none;max-width:560px;padding:22px}.story-example-flow{margin:20px 0}.story-example-flow img{max-width:85px}.story-starters-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.story-starters h2{font-size:23px}.story-starter{padding:18px 16px}.projects-tabs{margin-bottom:14px}.main-nav a{font-size:12px}.projects-heading h1{font-size:30px}}
@media(max-width:400px){header{padding:0 10px;gap:8px}.main-nav{gap:9px}.main-nav a{font-size:11px}.account-button{padding:8px;font-size:11px}header .brand-symbol{display:none}.projects-empty-content h1{font-size:34px}.story-starter strong{font-size:14px}.story-example-flow div span{font-size:18px}}
@media(prefers-reduced-motion:reduce){.story-starter{transition:none}}

.projects-page #new-project{background:#4665cf;color:white;box-shadow:none;white-space:nowrap}.projects-page #new-project:hover{background:#354fae}
.story-starter[data-story-template="literature"],.story-starter[data-story-template="nature"]{background:#eef2fa}
.story-starter[data-story-template="life"]{background:#f3f5f9}
.story-starter:hover{background:#e6ecf9}

/* The Story tab is a document: title, then editable prose. Playback lives on the canvas toolbar. */
#project-properties #user-journey-panel{padding:0;margin-top:28px;border:0}
#project-properties #user-journey-panel :is(.story-controls,[data-status],[data-stage],[data-description],[data-steps],[data-generate]){display:none!important}
#project-properties #user-journey-panel .story-transcript{margin:0}
#user-journey-panel .story-transcript .property-editable-heading>span{display:none}
#project-properties .story-transcript .property-editable{margin:0 0 20px}
#project-properties .story-transcript .property-text-value{margin-top:0;font-size:14px;line-height:1.8;color:var(--project-text,#303746)}

#project-properties.story-document>.inspector-content>.property-heading{justify-content:flex-end;margin-bottom:14px}#project-properties.story-document .property-heading h2{display:none}
#project-properties .story-transcript .property-editable{position:relative;padding-right:24px;margin-bottom:22px}
#project-properties .story-transcript .property-editable-heading{position:absolute;top:0;right:0;margin:0}
#project-properties .story-transcript .property-text-edit{opacity:0;transition:opacity .15s}
#project-properties .story-transcript .property-editable:hover .property-text-edit,#project-properties .story-transcript .property-editable:focus-within .property-text-edit{opacity:1}
@media(hover:none){#project-properties .story-transcript .property-text-edit{opacity:1}}
.projects-empty{justify-items:stretch}
@media(max-width:400px){.projects-empty-content h1{font-size:28px;letter-spacing:-1px;line-height:1.18}}

/* Editor controls share typography, corners and interaction feedback. */
.workspace{--editor-control-radius:8px}
.workspace :is(.canvas-actions button,#diagram-style-button){min-height:40px;border-radius:var(--editor-control-radius);font:500 12px/1.5 'Golos Text',sans-serif}
.workspace :is(.canvas-actions button,#diagram-style-button,.library-controls #create-element):hover{background:var(--project-soft,#eef1fb);border-color:var(--project-accent,#4665cf)}
.workspace :is(.library-controls #search,.architecture-chat-model select,.architecture-chat-composer textarea){border-radius:var(--editor-control-radius);font:400 12px/1.5 'Golos Text',sans-serif;border-color:var(--project-border,#dce2eb);color:var(--project-text,#303746)}
.workspace :is(.library-controls #search,.architecture-chat-model select,.architecture-chat-composer textarea):focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
.workspace :is(.architecture-chat-heading button,.architecture-chat-model [data-refresh],#properties-close,.panel-dismiss){width:30px;height:30px;flex:0 0 30px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--editor-control-radius);color:var(--project-muted,#788394)}
.workspace :is(.architecture-chat-heading button,.architecture-chat-model [data-refresh],#properties-close,.panel-dismiss):hover{background:var(--project-soft,#eef1fb);color:var(--project-accent,#4665cf)}
@media(max-width:750px){
 .workspace .desktop-inspector-tabs{display:none}
 .workspace .mobile-panel-tabs{background:var(--project-soft,#eef1fb)}
 .workspace .mobile-panel-tabs button{min-width:max-content;font-size:13px}
}

/* Keep the mobile composer inside the visual viewport, including the iOS keyboard. */
@media(max-width:750px){
 body.mobile-editor{overflow:hidden;overscroll-behavior:none}
 body.mobile-editor>header,body.mobile-editor>footer{display:none}
 body.mobile-editor .workspace{position:fixed;inset:var(--mobile-viewport-top,0px) auto auto var(--mobile-viewport-left,0px);height:var(--mobile-viewport-height,100dvh);width:var(--mobile-viewport-width,100%);display:grid;grid-template-rows:minmax(0,1fr) auto;isolation:isolate;background:var(--project-background,#f8f9fb)}
 body.mobile-editor .workspace #canvas{grid-row:1;width:100%;height:100%;min-height:0;visibility:visible}
 body.mobile-editor .workspace .mobile-panel-tabs{display:none}
 body.mobile-editor .workspace .mobile-panel-tabs button{flex:1;min-width:0;min-height:40px;padding:6px 4px;font-size:12px;white-space:nowrap}
 body.mobile-editor .workspace .mobile-panel-tabs button[hidden]{display:none}
 body.mobile-editor .workspace>aside,body.mobile-editor .workspace #project-properties,body.mobile-editor .workspace #task-editor{display:none!important}
 body.mobile-editor .workspace #architecture-chat{grid-row:2;display:flex;position:relative;inset:auto;min-width:0;width:100%;height:auto;min-height:0;max-height:none;box-sizing:border-box;margin:0;padding:8px 12px calc(12px + env(safe-area-inset-bottom));background:var(--project-surface,#fff);z-index:9;border:0;border-radius:0;overflow:visible}
 body.mobile-editor .workspace #architecture-chat[hidden]{display:none!important}
 .mobile-editor #architecture-chat>:is(.architecture-chat-heading,.architecture-chat-context,.architecture-chat-skills,.architecture-chat-skill-settings,.architecture-chat-messages){display:none}
 .mobile-editor #architecture-chat .architecture-chat-composer{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:8px;padding:0;border:0}
 .mobile-editor #architecture-chat .architecture-chat-composer textarea{grid-column:1;height:52px;min-height:52px;max-height:max(52px,min(240px,calc(var(--mobile-viewport-height,100dvh) * .4)));overflow-y:hidden;padding:13px 12px;font-size:16px;line-height:24px;resize:none;scroll-margin:0}
 .mobile-editor #architecture-chat .architecture-chat-composer [data-send]{grid-column:2;height:52px;margin:0;padding:0;border-radius:10px}
 .mobile-editor #architecture-chat .architecture-chat-model,.mobile-editor #architecture-chat .architecture-chat-note{display:none}
 /* Status takes its own row in the composer, never covering canvas tools. */
 .mobile-editor #architecture-chat .mobile-chat-progress:not([hidden]){display:block;flex:0 0 auto;min-width:0;margin:0 0 6px;padding:0;font-size:12px;line-height:20px;color:var(--project-muted,#657086);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-editor #architecture-chat [data-status]:not(:empty){display:block;flex:0 0 auto;max-height:64px;overflow:auto;margin:0 0 8px;padding:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
 .mobile-editor #architecture-chat [data-status]:empty{display:none}
 body.mobile-editor .workspace .mobile-panel-header:not([hidden]){position:absolute;inset:0 0 auto;display:flex;align-items:center;gap:16px;height:48px;padding:0 12px;background:var(--project-surface,#fff);z-index:15}
 .mobile-panel-header button{min-height:44px;padding:8px 4px;font-size:15px;color:var(--project-accent,#4665cf)}
 .mobile-panel-header strong{font-size:15px;font-weight:500}
 body.mobile-editor .workspace:not([data-mobile-panel=canvas]):not([data-mobile-panel=chat]){display:block;background:var(--project-surface,#fff)}
 body.mobile-editor .workspace:not([data-mobile-panel=canvas]):not([data-mobile-panel=chat]) #canvas{visibility:hidden;pointer-events:none}
 body.mobile-editor .workspace[data-mobile-panel=components]>#component-library,
 body.mobile-editor .workspace:is([data-mobile-panel=story],[data-mobile-panel=properties],[data-mobile-panel=task])>#project-properties:not([hidden]),
 body.mobile-editor.admin-editing .workspace[data-mobile-panel=task]>#task-editor:not([hidden]){display:flex!important;flex-direction:column;position:absolute;inset:48px 0 0;width:100%;height:auto;max-height:none;box-sizing:border-box;margin:0;padding:16px 16px max(16px,env(safe-area-inset-bottom));border:0;border-radius:0;box-shadow:none;overflow:auto;z-index:11}
 body.mobile-editor.admin-editing .workspace[data-mobile-panel=task]>#project-properties{display:none!important}
 body.mobile-editor .workspace:not([data-mobile-panel=canvas]):not([data-mobile-panel=chat])>#architecture-chat{display:none}
 .mobile-editor .workspace .panel-restore,.mobile-editor .workspace .panel-dismiss,.mobile-editor .workspace #properties-close{display:none!important}
 .mobile-editor .workspace .document-bar{inset:10px 12px auto;max-width:calc(100% - 24px)!important}
 .mobile-editor .workspace .document-bar #title{width:100%;font-size:16px;min-width:0}
 .mobile-editor .workspace .canvas-actions{top:60px!important;right:12px!important}
 .mobile-editor .workspace #canvas .canvas-control-row{display:none}
 .mobile-editor .workspace #canvas .canvas-control-row .tools{max-width:calc(100% - 48px)}
 .mobile-editor .workspace #canvas .canvas-control-row .zoom{padding:4px}
 .mobile-editor .workspace #canvas .zoom>:not(#fit){display:none}
 .mobile-editor .workspace .toast{bottom:80px}
 .mobile-editor .workspace .property-heading{flex-shrink:0}
 .mobile-editor .workspace .inspector-content{min-height:0;overflow:auto}
 /* Safari focuses small controls by zooming the page; keep every editor field readable. */
 body.mobile-editor :is(.workspace,dialog) :is(input,textarea,select,[contenteditable=true]){font-size:16px!important}
 .mobile-editor #agent-drawing-progress{display:none}
}
/* Request activity stays visible above the composer, including the mobile canvas. */
#architecture-chat .architecture-chat-pending{display:none}
#architecture-chat .architecture-chat-activity{display:flex;flex-direction:column;align-items:stretch;gap:4px;flex-shrink:0;min-width:0;margin:0 0 8px;padding:0}
#architecture-chat .architecture-chat-activity[hidden],#architecture-chat .architecture-chat-queue[hidden]{display:none}
#architecture-chat .architecture-chat-activity .mobile-chat-progress[hidden]{display:none!important}
#architecture-chat .architecture-chat-activity .mobile-chat-progress,body.mobile-editor .workspace #architecture-chat .architecture-chat-activity .mobile-chat-progress{display:block;flex:1;min-width:0;margin:0;padding:0;font-size:12px;line-height:1.5;color:var(--project-muted,#657086);white-space:normal;overflow-wrap:anywhere}
#architecture-chat .architecture-chat-queue{flex-shrink:0;max-height:130px;overflow:auto;margin:0 0 8px;padding:0 4px;color:var(--project-muted,#657086);font-size:12px}
#architecture-chat .architecture-chat-queue>p{margin:0 0 4px;font-weight:500}
#architecture-chat .architecture-chat-queue>div{display:flex;align-items:center;gap:8px;min-width:0}
#architecture-chat .architecture-chat-queue span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#architecture-chat .architecture-chat-queue button{flex:0 0 36px;min-height:36px;padding:0;font-size:20px;color:inherit}
#architecture-chat :is([data-send],.architecture-chat-queue button):focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
@keyframes chat-request-spin{to{transform:rotate(360deg)}}
#architecture-chat .architecture-chat-composer [data-send][data-mode=stop]{position:relative;font-size:0}
#architecture-chat .architecture-chat-composer [data-send][data-mode=stop]::before{content:'';position:absolute;left:50%;top:50%;width:28px;height:28px;margin:-14px 0 0 -14px;box-sizing:border-box;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;opacity:.85;animation:chat-request-spin 1s linear infinite}
#architecture-chat .architecture-chat-composer [data-send][data-mode=stop]::after{content:'■';display:inline-block;font-size:12px;line-height:1}
@media(prefers-reduced-motion:reduce){#architecture-chat .architecture-chat-composer [data-send][data-mode=stop]::before{animation:none}}

#architecture-chat .architecture-chat-active-request{margin:0;max-height:72px;overflow:auto;font-size:12px;line-height:1.5;font-weight:500;color:var(--project-text,#303746);white-space:pre-wrap;overflow-wrap:anywhere}
.object-description-button{display:none}
.object-description-sheet{position:fixed;inset:auto 0 0;width:100%;max-width:none;height:50dvh;max-height:50dvh;box-sizing:border-box;margin:0;padding:20px 20px max(20px,env(safe-area-inset-bottom));border:1px solid var(--project-border,#e1e5ed);border-bottom:0;border-radius:20px 20px 0 0;background:var(--project-surface,#fff);color:var(--project-text,#303746);box-shadow:0 -12px 40px #27365420;overflow:hidden}
.object-description-sheet[open]{display:flex;flex-direction:column;gap:12px}
.object-description-sheet::backdrop{background:#18233850}
.object-description-sheet>header{height:auto;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;margin:0;padding:0;border:0;background:transparent}
.object-description-sheet h2{margin:0;min-width:0;font-size:20px;line-height:1.3;overflow-wrap:anywhere}
.object-description-sheet>header button{flex:0 0 44px;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:var(--project-soft,#f5f7fb);color:var(--project-text,#303746);font-size:26px}
.object-description-content{flex:1;min-width:0;min-height:0;max-width:100%;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
.object-description-content p{margin:0;font-size:16px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.object-description-sheet button:focus-visible,.object-description-button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
@media(max-width:750px){
 .mobile-editor .workspace #canvas .object-description-button:not([hidden]){display:block;position:absolute;right:12px;bottom:12px;z-index:5;max-width:min(65%,260px);min-height:44px;padding:10px 16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--project-border,#dce2eb);border-radius:22px;background:var(--project-surface,#fff);color:var(--project-accent,#4665cf);box-shadow:0 4px 16px #27365414;font:500 14px/1.5 'Golos Text',sans-serif;touch-action:manipulation}
}

.object-description-actions{display:flex;margin-top:20px;padding-top:12px;border-top:1px solid var(--project-border,#e1e5ed)}
.object-description-delete{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 12px;border:1px solid var(--project-border,#e1e5ed);border-radius:10px;color:#b43c3c;background:var(--project-surface,#fff);font:500 14px/1.5 'Golos Text',sans-serif}
.object-description-delete:hover{background:var(--project-soft,#f5f7fb)}
.object-delete-icon{display:inline-block;flex:0 0 20px;width:20px;height:20px;background:currentColor;mask:url(assets/ui/trash.svg) center/contain no-repeat;-webkit-mask:url(assets/ui/trash.svg) center/contain no-repeat}

/* The story uses the same half-screen reading surface as object descriptions. */
.object-description-actions[hidden],#object-story-content[hidden]{display:none}
#object-story-content>#user-journey-panel{position:static;inset:auto;width:100%;max-height:none;margin:0;padding:0;overflow:visible;border:0;border-radius:0;box-shadow:none}
#object-story-content .journey-steps{display:none}
#object-story-content .story-transcript{margin:16px 0}
#object-story-content .story-transcript .property-text-value{font-size:16px;line-height:1.7;color:var(--project-text,#303746)}
#object-story-content,#object-story-content [data-transcript],#object-story-content .story-edit-form{min-width:0;max-width:100%;overflow-wrap:anywhere}
#object-story-content #user-journey-panel :is(p,h3){max-width:100%;overflow-wrap:anywhere}
#object-story-content .story-transcript .property-text-value+.property-text-value{margin-top:1em}
@media(max-width:750px){
 body.mobile-editor:not(.task-active) #canvas-signal-actions{display:none}
 .object-description-sheet{inset:auto;left:var(--mobile-viewport-left,0px);top:calc(var(--mobile-viewport-top,0px) + var(--mobile-viewport-height,100dvh) * .5);width:var(--mobile-viewport-width,100%);height:calc(var(--mobile-viewport-height,100dvh) * .5);max-height:calc(var(--mobile-viewport-height,100dvh) * .5)}
}

.node.group.shaped-zone{border:0;background:transparent;pointer-events:none}.shaped-zone .zone-outline{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.shaped-zone .zone-outline>*{fill:color-mix(in srgb,var(--node-color,#98a5bf) 6%,transparent);stroke:var(--node-color,#98a5bf);stroke-width:calc(1.5px / var(--canvas-zoom,1));stroke-dasharray:calc(7px / var(--canvas-zoom,1)) calc(7px / var(--canvas-zoom,1));pointer-events:all;cursor:grab}.shaped-zone .node-label,.shaped-zone .zone-resize-handle{pointer-events:auto;z-index:1}.shaped-zone.selected .zone-outline>*{stroke:var(--accent);stroke-width:calc(2px / var(--canvas-zoom,1))}

#architecture-chat button.architecture-chat-active-request{display:block;width:100%;padding:0;border:0;background:none;text-align:left;font:inherit;font-size:12px;line-height:1.5;cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.architecture-chat-history{box-sizing:border-box;width:min(640px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:80dvh;overflow:hidden;padding:0;border:1px solid var(--project-border,#dce2eb);border-radius:14px;background:var(--project-surface,#fff);color:var(--project-text,#303746)}
.architecture-chat-history[open]{display:flex;flex-direction:column}
.architecture-chat-history::backdrop{background:#0006}
.architecture-chat-history-header{display:flex;align-items:center;gap:16px;flex-shrink:0;padding:12px 16px;border-bottom:1px solid var(--project-border,#dce2eb)}
.architecture-chat-history-header h2{min-width:0;margin:0;font-size:20px;line-height:1.3;overflow-wrap:anywhere}
.architecture-chat-history-back{flex-shrink:0;min-height:44px;padding:8px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-accent,#3654bc);font:inherit;font-size:16px;cursor:pointer;touch-action:manipulation}
.architecture-chat-history-back:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
.architecture-chat-history-messages{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px}
.architecture-chat-history .architecture-chat-message{min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.architecture-chat-history p{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:750px){
 dialog.architecture-chat-history{position:fixed;inset:var(--mobile-viewport-top,0px) auto auto var(--mobile-viewport-left,0px);width:var(--mobile-viewport-width,100vw);height:var(--mobile-viewport-height,100dvh);max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none}
 .architecture-chat-history-header{padding:calc(8px + env(safe-area-inset-top,0px)) 12px 8px;gap:12px}
 .architecture-chat-history-header h2{font-size:18px;letter-spacing:-.3px}
 .architecture-chat-history-messages{flex:1;padding:16px 12px calc(16px + env(safe-area-inset-bottom,0px))}
 .architecture-chat-history .architecture-chat-message p{font-size:16px;line-height:1.5}
}


/* History remains reachable when mobile canvas tools are hidden. */
.canvas-history{position:absolute;left:calc(var(--canvas-left-space,302px) + 14px);bottom:26px;display:flex;gap:6px;z-index:4}
.canvas-history[hidden]{display:none}
@media(max-width:750px){.workspace #canvas .canvas-history{left:12px;bottom:12px}}
.canvas-history .canvas-history-button{display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#354158);touch-action:manipulation}
.canvas-history-button .ui-icon{width:21px;height:21px}
.canvas-history .canvas-history-button:disabled{opacity:.35;cursor:default}
.canvas-history .canvas-history-button:hover:not(:disabled){background:var(--accent-soft,#e9edf5)}

#story-video-actions{margin:20px 0 12px}
#story-video-actions[hidden]{display:none}
#story-video-actions #create-diagram-video{width:100%;min-height:44px;touch-action:manipulation}

.story-edit-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}
.story-edit-heading strong{font-size:13px;color:var(--project-muted,#657086)}
#user-journey-panel .story-transcript .story-edit-all{opacity:1;min-width:44px;min-height:44px;touch-action:manipulation}
.story-edit-all[hidden]{display:none}
.story-edit-form{display:grid;gap:18px}
.story-edit-form label{display:grid;gap:8px;font-size:12px;color:var(--project-muted,#657086)}
.story-edit-form textarea{box-sizing:border-box;width:100%;min-height:120px;resize:vertical;padding:12px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit;font-size:16px;line-height:1.6}
.story-edit-form .property-edit-actions{position:sticky;bottom:0;padding:12px 0;background:var(--project-surface,#fff)}

.architecture-chat-feedback{display:flex;align-items:center;gap:6px;margin-top:10px}
.architecture-chat-feedback button{display:grid;place-items:center;min-width:36px;min-height:36px;padding:6px 9px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--project-muted,#657086);font-size:14px;cursor:pointer;touch-action:manipulation}
.architecture-chat-feedback button:hover{background:var(--project-surface,#fff)}
.architecture-chat-feedback button[aria-pressed=true]{border-color:var(--project-accent,#4665cf);background:var(--project-surface,#fff);color:var(--project-text,#354158)}
.architecture-chat-feedback button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
@media(max-width:750px){.architecture-chat-feedback button{min-width:44px;min-height:44px}}
#rename-project-dialog{box-sizing:border-box;width:min(440px,calc(100vw - 32px));padding:24px;border:1px solid var(--project-border,#dce1e9);border-radius:16px;background:var(--project-surface,#fff);color:var(--project-text,#303746)}
#rename-project-dialog::backdrop{background:#202a4655}
#rename-project-dialog h2{margin:0 0 20px;font-size:22px}
#rename-project-dialog label{display:block;margin-bottom:8px;font-size:14px}
#rename-project-name{box-sizing:border-box;width:100%;padding:11px;border:1px solid var(--project-border,#dce1e9);border-radius:8px;background:var(--project-surface,#fff);color:inherit;font:inherit;font-size:16px}
#canvas #title{cursor:default;pointer-events:none}
.document-bar #rename-project{flex:0 0 44px;width:44px;height:44px;display:grid;place-items:center;padding:10px;border-radius:8px;touch-action:manipulation}
.document-bar #rename-project[hidden]{display:none}
.document-bar #rename-project{color:var(--project-muted,#717e93)}
.document-bar #rename-project .ui-icon{width:18px;height:18px}
.document-bar #rename-project:hover{background:var(--project-surface,#fff)}
.document-bar #rename-project:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
#object-description-title:focus{outline:none}
.architecture-chat-message .architecture-chat-time{display:block;margin-top:8px;font-size:11px;line-height:1.4;color:var(--project-muted,#657086);font-variant-numeric:tabular-nums}

/* Full-screen reading uses the same story element so editing and playback stay intact. */
.object-description-sheet>header h2{flex:1;order:0}
.story-reader-expand[hidden]{display:none}
.object-description-sheet[data-expanded=true]{inset:0;width:100%;height:100dvh;max-height:100dvh;margin:0;padding:max(16px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));border:0;border-radius:0}
.object-description-sheet[data-expanded=true] .object-description-content{width:100%;max-width:900px;margin-inline:auto}
.object-description-sheet[data-expanded=true] #object-story-content .story-transcript .property-text-value{font-size:18px;line-height:1.8}
@media(max-width:750px){
 .object-description-sheet[data-expanded=true]{inset:auto;left:var(--mobile-viewport-left,0px);top:var(--mobile-viewport-top,0px);width:var(--mobile-viewport-width,100%);max-width:var(--mobile-viewport-width,100%);height:var(--mobile-viewport-height,100dvh);max-height:var(--mobile-viewport-height,100dvh)}
 .object-description-sheet{-webkit-text-size-adjust:100%;text-size-adjust:100%}
 .object-description-sheet>header{min-width:0}
 .object-description-sheet>header button[hidden]{display:none}
 .object-description-sheet[data-expanded=true] #object-story-content .story-transcript .property-text-value{font-size:16px;line-height:1.7}
}

.project-preview>.community-diagram{width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;background:none;overflow:hidden}.project-preview>.community-diagram>svg{display:block;width:100%;height:100%;max-height:none}

.story-style-controls{margin-bottom:16px}.story-style-button{width:100%;text-align:left}
.object-description-sheet>header.story-sheet-handle{position:relative;touch-action:none;user-select:none;cursor:ns-resize;padding-top:12px}
.object-description-sheet>header.story-sheet-handle::before{content:"";position:absolute;top:0;left:50%;width:36px;height:4px;margin-left:-18px;border-radius:4px;background:var(--project-muted,#929bad);opacity:.5}
.object-description-sheet>header.story-sheet-handle:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px;border-radius:8px}

.node.group .zone-texture{position:absolute;inset:0;border-radius:inherit;background-size:300px 300px;pointer-events:none}.node.group .node-label{position:relative;z-index:1}.node.group:has(.zone-texture) .node-label{background:color-mix(in srgb,var(--panel,#fff) 88%,transparent);border-radius:6px;padding:3px 8px;width:fit-content;max-width:calc(100% - 24px)}

/* Object details keep the illustration large and open into the same full-screen reader. */
.object-description-image{display:block;width:100%;height:clamp(180px,30dvh,340px);object-fit:contain;margin:0 0 18px;border-radius:12px}
.object-description-image[hidden],.object-description-expand[hidden]{display:none}
.object-description-expand span{display:block;width:22px;height:22px;margin:auto;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5'/%3E%3C/svg%3E") center/contain no-repeat}
.object-description-sheet[data-expanded=true] .object-description-image{height:60dvh;max-height:680px}

/* Explicit marker colors also work when SVG context-stroke is unavailable. */
#canvas[data-diagram-style=blueprint] .edge-marker path{stroke:#305c9e}
#canvas[data-diagram-style=blueprint] .edge-marker[data-filled=true] path{fill:#305c9e}
#edges .edge-line.protection-drop-target,#edges .edge-marker:has(+.edge-line.protection-drop-target) path{stroke:#639b69}
#edges .edge-marker[data-filled=true]:has(+.edge-line.protection-drop-target) path{fill:#639b69}
#edges .edge-line.story-active-edge,#edges .edge-marker:has(+.edge-line.story-active-edge) path{stroke:var(--project-accent,#4665cf)}
#edges .edge-marker[data-filled=true]:has(+.edge-line.story-active-edge) path{fill:var(--project-accent,#4665cf)}

/* Keep style controls inside the viewport, including their intrinsic grid sizes. */
#diagram-style-dialog{position:fixed;inset:0;margin:auto;min-width:0;max-width:calc(100vw - 24px);overflow-x:hidden;overscroll-behavior:contain}
#diagram-style-dialog form,#diagram-style-dialog form>*{min-width:0;max-width:100%;box-sizing:border-box}
#diagram-style-dialog label{grid-template-columns:minmax(0,1fr)}
#diagram-style-dialog select,#diagram-style-dialog textarea{min-width:0;max-width:100%;font-size:16px}
#diagram-style-dialog :is(p,h2,summary){overflow-wrap:anywhere}
#diagram-style-dialog .style-theme-details{margin-top:20px;font-size:13px}
#diagram-style-dialog .style-theme-details summary{cursor:pointer;color:var(--project-muted,#657086)}
#diagram-style-dialog .style-dialog-actions{position:sticky;bottom:0;flex-wrap:wrap;padding-top:12px;background:var(--project-surface,#fff)}
@media(max-width:750px){
 #diagram-style-dialog{left:var(--mobile-viewport-left,0px);top:var(--mobile-viewport-top,0px);right:auto;bottom:auto;transform:none;margin:12px;width:calc(var(--mobile-viewport-width,100vw) - 24px);max-width:calc(var(--mobile-viewport-width,100vw) - 24px);max-height:calc(var(--mobile-viewport-height,100dvh) - 24px);padding:20px 16px}
 #diagram-style-dialog h2{font-size:20px}
 #diagram-style-dialog .style-dialog-actions button{min-height:44px;flex:1}
}

/* Playback leaves three quarters of the screen available to the story camera. */
.object-description-sheet[data-story-playback=true][data-expanded=false]{inset:auto 0 0;width:100%;height:25dvh;max-height:25dvh;padding:8px 20px max(8px,env(safe-area-inset-bottom));gap:4px}
.object-description-sheet[data-story-playback=true]::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
.object-description-sheet[data-story-playback=true] .object-description-content{max-width:900px;width:100%;margin-inline:auto}
.object-description-sheet[data-story-playback=true] #user-journey-panel :is([data-style-controls],.story-transcript,[data-generate],.journey-steps){display:none!important}
.object-description-sheet[data-story-playback=true] .story-controls{margin:0 0 4px}
.object-description-sheet[data-story-playback=true] #user-journey-panel [data-status]{margin:2px 0;font-size:11px}
.object-description-sheet[data-story-playback=true] #user-journey-panel [data-stage]{margin:4px 0;font-size:15px}
.object-description-sheet[data-story-playback=true] #user-journey-panel [data-description]{margin:4px 0;font-size:14px;line-height:1.5}
@media(min-width:751px){
 .object-description-sheet[data-story-playback=true][data-expanded=false]{height:auto;max-height: min(30dvh,240px);padding:12px 24px 16px}
 .object-description-sheet[data-story-playback=true][data-expanded=false]>header{min-height:32px;padding-top:0;cursor:default}
 .object-description-sheet[data-story-playback=true][data-expanded=false]>header::before{display:none}
 .object-description-sheet[data-story-playback=true][data-expanded=false]>header button{flex-basis:32px;width:32px;height:32px}
}
@media(max-width:750px){
 .object-description-sheet[data-story-playback=true][data-expanded=false]{inset:auto;left:var(--mobile-viewport-left,0px);top:calc(var(--mobile-viewport-top,0px) + var(--mobile-viewport-height,100dvh) * .75);width:var(--mobile-viewport-width,100%);height:calc(var(--mobile-viewport-height,100dvh) * .25);max-height:calc(var(--mobile-viewport-height,100dvh) * .25);padding-inline:14px}
}


/* Desktop inspector: content and production tools above the shared bottom navigation. */
@media(min-width:751px){
 .workspace #project-properties{padding:16px;gap:0}
 .workspace #project-properties>.desktop-inspector-tabs{order:1;margin:12px 0 0;padding:3px}
 #project-properties.story-document>.inspector-content>.property-heading{margin:0 0 8px;min-height:28px}
 #project-properties.story-document .inspector-content{scrollbar-gutter:stable}
 #project-properties.story-document #property-fields>.property-editable[data-editable=name]{margin:0 0 20px}
 #project-properties.story-document #property-fields>.property-editable[data-editable=name] .property-editable-heading{margin:0}
 #project-properties.story-document #property-fields>.property-editable[data-editable=name] .property-text-value{margin:0;padding:0 64px 0 0;font-size:20px;line-height:1.35;letter-spacing:-.4px;font-weight:600;overflow-wrap:anywhere}
 #project-properties.story-document #property-fields>.property-editable[data-editable=name]{position:relative}
 #project-properties.story-document #property-fields>.property-editable[data-editable=name] .property-text-edit{position:absolute;right:36px;top:0}
 #project-properties.story-document #user-journey-panel{display:flex;flex-direction:column;gap:20px;margin:0;padding:0}
 #project-properties.story-document #user-journey-panel[hidden]{display:none}
 #project-properties.story-document .story-transcript{order:0;margin:0}
 #project-properties.story-document .story-transcript .property-editable{padding:0;margin:0 0 16px}
 #project-properties.story-document .story-transcript .property-editable-heading{position:static;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px}
 #project-properties.story-document .story-transcript .property-editable-heading>span{display:block;color:var(--project-muted,#657086);font-size:12px;font-weight:500}
 #project-properties.story-document .story-transcript .property-text-edit{opacity:1;flex:0 0 28px}
 #project-properties.story-document .story-transcript .property-text-value{margin:0;font-size:13px;line-height:1.75}
 #project-properties.story-document .property-text-placeholder{display:block;box-sizing:border-box;width:100%;min-height:112px;padding:12px;border:1px dashed var(--project-border,#dce2eb);border-radius:8px;background:var(--project-background,#f8f9fc);color:var(--project-muted,#657086);text-align:left;align-content:start;font-family:inherit;cursor:text}
 #project-properties.story-document .property-text-placeholder:hover{border-color:var(--project-accent,#4665cf)}
 #project-properties.story-document #story-video-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:20px 0 0;padding:0}
 #project-properties.story-document #story-video-actions[hidden]{display:none}
 #story-video-actions>h3{grid-column:1/-1;margin:0 0 4px;color:var(--project-muted,#657086);font-size:12px;line-height:1.5;font-weight:500}
 #project-properties.story-document #story-video-actions :is(#edit-animations,#create-diagram-video){width:100%;min-width:0;min-height:36px;box-sizing:border-box;margin:0;padding:8px 10px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:500 12px/1.4 'Golos Text',sans-serif;cursor:pointer}
 #project-properties.story-document #story-video-actions #create-diagram-video{background:var(--project-accent,#4665cf);border-color:var(--project-accent,#4665cf);color:var(--project-accent-text,#fff)}
 #project-properties.story-document #story-video-actions button:hover{filter:brightness(.96)}
 #project-properties.story-document :is(button,textarea,input):focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
}
@media(max-width:750px){#story-video-actions>h3{display:none}}

.property-text-placeholder{padding:0;border:0;background:none;color:inherit;font:inherit;text-align:inherit}
@media(min-width:751px){
 #project-properties.story-document>.inspector-content>.property-heading{position:static;min-height:36px;height:auto;margin:0 0 12px;padding:0}
 #project-properties.story-document #properties-close{position:absolute;top:19px;right:16px}
 #project-properties.story-document>#story-video-actions{flex:0 0 auto;border-top:1px solid var(--project-border,#dce2eb);padding-top:16px;margin-top:16px}
 #project-properties.story-document .story-transcript .property-text-placeholder{padding:12px}
}

.workspace #project-properties>#properties-close[hidden]{display:none!important}
@media(min-width:751px){.workspace #project-properties>#properties-close{position:absolute;top:19px;right:16px}}


/* Document navigation lives in the main header, outside the canvas. */
.workspace .document-bar #title,.workspace .document-bar #rename-project{display:none!important}
.workspace .document-bar{width:40px;max-width:none!important;gap:0;padding:0;border:0;background:transparent;box-shadow:none}
@media(min-width:751px){
 .workspace .document-bar{top:12px;left:calc(var(--library-width,282px) + 12px)}
 .workspace.left-panel-hidden .document-bar{left:12px}
 .workspace .canvas-actions{top:12px;right:calc(var(--canvas-right-space,0px) + 12px)!important;gap:4px;padding:0;border:0;background:transparent;box-shadow:none}
 .workspace .canvas-actions :is(.run-task-signal,.save-drawing,.canvas-restart){box-sizing:border-box;min-height:40px;height:40px;border:1px solid var(--project-border,#dce2eb);border-radius:9px;background:var(--project-surface,#fff);box-shadow:0 1px 3px #27365408}
 .workspace .canvas-actions .run-task-signal{padding:0 10px;font-size:12px}
 .workspace .canvas-actions :is(.save-drawing,.canvas-restart){width:40px;padding:10px}
 .workspace .canvas-actions .save-drawing svg{width:18px;height:18px}
 .workspace .canvas-actions button:hover{background:var(--project-soft,#eef1fb)}
 .workspace .canvas-actions button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
}
@media(max-width:750px){
 .mobile-editor .workspace .document-bar{inset:10px auto auto 12px;max-width:none!important}
 body.mobile-editor:not(.task-active) .workspace .canvas-actions{top:10px!important;right:12px!important}
}

/* Desktop story playback belongs to the Story inspector. */
#story-playback-actions[hidden]{display:none!important}
@media(min-width:751px){
 #project-properties>#story-playback-actions{flex:0 0 auto;margin-top:16px;padding-top:16px;border-top:1px solid var(--project-border,#dce2eb)}
 #project-properties #story-playback-actions .run-task-signal{width:100%;min-height:38px;justify-content:center;font-size:12px;background:var(--project-soft,#eef1fb);border-color:var(--project-border,#dce2eb);color:var(--project-accent,#4665cf)}
 #project-properties #story-playback-actions .run-task-signal:hover{border-color:var(--project-accent,#4665cf)}
 #project-properties.story-document>#story-playback-actions:not([hidden])+#story-video-actions{border-top:0;margin-top:12px;padding-top:0}
}

/* Media fills the visible structural draft as each image becomes available. */
.node[data-agent-placeholder]{border:2px dashed var(--project-border,#8895ac);background:var(--project-surface,#fff);border-radius:12px}
.node[data-agent-placeholder]>img{visibility:hidden}
/* Animate only the picture area; labels, ports and selection stay interactive. */
.node[data-agent-placeholder]::before{content:'';position:absolute;inset:10px 10px 48px;border-radius:8px;pointer-events:none;background:linear-gradient(110deg,transparent 25%,color-mix(in srgb,var(--project-accent,#627bd4) 16%,transparent) 48%,transparent 70%),var(--project-soft,#eef1fb);background-size:240% 100%;animation:agent-media-wait 2.8s ease-in-out infinite}
.node[data-agent-placeholder]::after{content:'';position:absolute;top:calc(50% - 24px);left:calc(50% - 6px);width:12px;height:12px;background:var(--project-accent,#627bd4);border-radius:50%;pointer-events:none;animation:agent-media-wait 2.8s ease-in-out infinite}
.node[data-agent-placeholder]>.node-label{position:relative}
.node[data-agent-generating]{border-color:var(--project-accent,#627bd4);animation:agent-media-pulse 1.8s ease-in-out infinite}
.node[data-agent-generating]::before{animation:agent-media-shimmer 1.6s ease-in-out infinite}
.node[data-agent-generating]::after{top:calc(50% - 36px);left:calc(50% - 18px);width:30px;height:30px;background:transparent;border:3px solid color-mix(in srgb,var(--project-accent,#627bd4) 20%,transparent);border-top-color:var(--project-accent,#627bd4);border-right-color:var(--project-accent,#627bd4);animation:agent-media-spin 1s linear infinite}
@keyframes agent-media-wait{0%,100%{opacity:.35}50%{opacity:.8}}
@keyframes agent-media-shimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}
@keyframes agent-media-spin{to{transform:rotate(360deg)}}
@keyframes agent-media-pulse{50%{box-shadow:0 0 0 7px color-mix(in srgb,var(--project-accent,#627bd4) 18%,transparent)}}
@media(prefers-reduced-motion:reduce){
 .node[data-agent-placeholder]::before,.node[data-agent-placeholder]::after,.node[data-agent-generating]{animation:none;opacity:1}
 .node[data-agent-generating]{outline:2px solid var(--project-accent,#627bd4);outline-offset:3px}
}

.property-heading .property-edit-button{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;box-sizing:border-box;color:var(--project-muted,#657086);border:1px solid var(--project-border,#dce1e9);border-radius:7px;padding:8px;margin-right:8px;cursor:pointer}.property-edit-button .ui-icon{width:20px;height:20px}.property-edit-button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}.property-heading .property-edit-button:hover{background:var(--project-soft,#eef2fd);color:var(--project-accent,#4665cf)}.property-heading .property-edit-button[hidden]{display:none}#property-edit-dialog{width:min(520px,calc(100vw - 32px));max-height:85dvh;overflow:auto}#property-edit-dialog label{display:grid;gap:8px;margin:18px 0;font-size:13px;color:var(--project-muted,#657086)}#property-edit-dialog input,#property-edit-dialog textarea,#property-edit-dialog select{box-sizing:border-box;width:100%;padding:10px;border:1px solid var(--project-border,#cdd3df);border-radius:7px;font:inherit;line-height:1.6;background:var(--project-surface,#fff);color:var(--project-text,#303746)}#property-edit-dialog textarea{resize:vertical}

#property-fields>.property-editable[data-editable="name"]{padding-right:0}

/* Chat navigation and a compact model row leave room for the conversation. */
#architecture-chat .architecture-chat-heading{justify-content:flex-start;gap:4px;margin-bottom:4px}
#architecture-chat .architecture-chat-heading :is([data-chats],[data-clear]){width:auto;flex:0 1 auto;min-width:0;height:30px;padding:0 8px;font-size:12px;line-height:1.3;white-space:nowrap}
#architecture-chat .architecture-chat-heading [data-clear]{margin-left:auto}
#architecture-chat .architecture-chat-model{margin-top:4px;min-width:0}
#architecture-chat .architecture-chat-model>div{align-items:center;gap:2px}
#architecture-chat .architecture-chat-model select{width:auto;max-width:calc(100% - 32px);flex:0 1 auto;height:30px;min-height:30px;padding:3px 24px 3px 4px;border-color:transparent;background-color:transparent;font-size:11px;color:var(--project-muted,#657086);text-overflow:ellipsis}
#architecture-chat .architecture-chat-model select:hover{background-color:var(--project-soft,#eef1fb)}
#architecture-chat .architecture-chat-model button{height:30px;padding:0;font-size:15px}
#architecture-chat .architecture-chat-note{margin:2px 0 0;font-size:10px;line-height:1.4}
.architecture-chat-conversation-list{padding:8px;overflow:auto;min-height:0}
.architecture-chat-conversation{display:flex;flex-direction:column;gap:5px;text-align:left;width:100%;padding:12px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer}
.architecture-chat-conversation:hover,.architecture-chat-conversation[aria-current=true]{background:var(--project-soft,#eef1fb)}
.architecture-chat-conversation strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}
.architecture-chat-conversation span{display:block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;color:var(--project-muted,#657086)}
.architecture-chat-conversation:focus-visible,#architecture-chat .architecture-chat-heading button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
@media(max-width:750px){
 body.mobile-editor .workspace #architecture-chat>.architecture-chat-heading{display:flex}
 body.mobile-editor .workspace #architecture-chat .architecture-chat-model{display:block;grid-column:1/-1;margin:0}
 body.mobile-editor .workspace #architecture-chat .architecture-chat-heading :is([data-chats],[data-clear]){height:36px}
 body.mobile-editor .workspace #architecture-chat .architecture-chat-model select{font-size:16px}
}

.plan-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.plan-card{border:1px solid var(--border,#d9dee8);border-radius:14px;padding:18px;background:var(--surface,#fff)}.plan-card h3{margin:0 0 16px}.plan-card p{font-size:14px;line-height:1.5}.plan-profile form{margin-top:28px;max-width:540px}.plan-profile label{display:grid;gap:8px;margin:16px 0}.plan-profile .plan-consent{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.5}.plan-consent input{width:auto;flex:none;margin-top:3px}.plan-profile [data-admin]{margin-top:28px}.plan-profile [data-leads]{overflow-wrap:anywhere}@media(max-width:750px){.plan-cards{grid-template-columns:1fr}}

/* Keep the inspector destinations visible above its scrolling content. */
@media(min-width:751px){
 .workspace #project-properties>.desktop-inspector-tabs{order:-1;margin:0 0 18px}
 .workspace #project-properties>.desktop-inspector-tabs button{padding-inline:6px;white-space:nowrap}
 .workspace #project-properties>#properties-close{position:static;align-self:flex-end;margin-top:8px}
}

/* Desktop canvas controls share one height and bottom inset. */
@media(min-width:751px){
 .workspace #canvas .tools,.workspace #canvas .zoom{bottom:26px;height:58px;box-sizing:border-box}
}

/* Keep the chat focus ring inside the field so the panel cannot clip it. */
#architecture-chat #architecture-chat-question:focus{
 border-color:var(--project-accent,#4665cf);
 outline:2px solid var(--project-accent,#4665cf);
 outline-offset:-2px;
}

/* Compact model label above the prompt; send stays inside the field. */
#architecture-chat .architecture-chat-composer{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
#architecture-chat .architecture-chat-composer textarea{grid-column:1/-1;grid-row:2;height:76px;padding-right:54px;resize:none}
#architecture-chat .architecture-chat-model{grid-column:1/-1;grid-row:1;margin:0}
#architecture-chat .architecture-chat-model select{appearance:none;field-sizing:content;max-width:100%;height:32px;min-height:32px;padding:4px 24px 4px 0;border:0;border-radius:4px;background-color:transparent;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23868b94' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 4px center;color:var(--project-text,#303746);font-size:13px;cursor:pointer}
#architecture-chat .architecture-chat-model select:disabled{cursor:default;opacity:.5}
#architecture-chat .architecture-chat-model [data-refresh]{display:none}
#architecture-chat .architecture-chat-composer [data-send]{grid-column:1/-1;grid-row:2;align-self:end;justify-self:end;z-index:1;width:36px;height:36px;min-height:36px;margin:8px;padding:7px;border:0;border-radius:8px;background:transparent;color:var(--project-text,#303746);box-shadow:none;font-size:0}
#architecture-chat .architecture-chat-composer [data-send]:hover:not(:disabled){background:var(--project-soft,#eef1fb)}
#architecture-chat .architecture-chat-composer [data-send]:not([data-mode=stop]){font-size:0}
#architecture-chat .architecture-chat-composer [data-send]:not([data-mode=stop])::after{content:'';display:block;width:22px;height:22px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4v7a3 3 0 0 1-3 3H4m6-6-6 6 6 6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
#architecture-chat .architecture-chat-composer [data-send]:focus-visible{outline-offset:0}
#architecture-chat .architecture-chat-note{grid-column:1/-1;grid-row:3;margin:0}
@media(max-width:750px){
 body.mobile-editor .workspace #architecture-chat .architecture-chat-model{grid-column:1/-1;grid-row:1}
 .mobile-editor #architecture-chat .architecture-chat-composer textarea{grid-column:1/-1;grid-row:2;height:52px;padding-right:54px}
 .mobile-editor #architecture-chat .architecture-chat-composer [data-send]{grid-column:1/-1;grid-row:2;width:36px;height:36px;margin:8px;padding:7px}
}

/* Model selection shares the chat surface and links directly to personal keys. */
#architecture-chat .architecture-chat-model>div{display:flex;align-items:center;flex-wrap:wrap;gap:2px 10px;min-width:0}
#architecture-chat #architecture-chat-model{display:none!important}
#architecture-chat .chat-model-picker{position:relative;min-width:0;max-width:100%;flex:0 1 auto}
#architecture-chat .chat-model-picker summary{display:flex;align-items:center;gap:8px;min-height:34px;padding:4px 7px;margin-left:-7px;border-radius:7px;cursor:pointer;list-style:none;color:var(--project-text,#303746);font-size:13px;line-height:1.4}
#architecture-chat .chat-model-picker summary::-webkit-details-marker{display:none}
#architecture-chat .chat-model-picker summary:hover,#architecture-chat .chat-model-picker[open] summary{background:var(--project-soft,#eef1fb)}
#architecture-chat .chat-model-picker summary:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:-2px}
#architecture-chat [data-model-name]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
#architecture-chat .chat-model-chevron{width:6px;height:6px;flex:0 0 6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 3px 3px;color:var(--project-muted,#657086)}
#architecture-chat .chat-model-popover{position:absolute;bottom:calc(100% + 8px);left:0;width:min(310px,calc(var(--inspector-width,340px) - 34px));max-width:calc(100vw - 48px);max-height:min(420px,60dvh);overflow:auto;padding:6px;border:1px solid var(--project-border,#dce2eb);border-radius:12px;background:var(--project-surface,#fff);box-shadow:0 8px 28px #2432471a;z-index:30}
#architecture-chat .chat-model-menu-title{padding:7px 9px;margin:0;color:var(--project-muted,#657086);font-size:11px;font-weight:500}
#architecture-chat .chat-model-option{display:grid;grid-template-columns:minmax(0,1fr) 20px;gap:3px 8px;width:100%;height:auto;min-height:52px;padding:9px;text-align:left;border-radius:7px;color:var(--project-text,#303746);font-size:13px}
#architecture-chat .chat-model-option>span:first-child{grid-column:1;overflow-wrap:anywhere}
#architecture-chat .chat-model-option small{grid-column:1;font-size:11px;color:var(--project-muted,#657086)}
#architecture-chat .chat-model-option>span:last-child{grid-column:2;grid-row:1/3;align-self:center;color:var(--project-accent,#4665cf)}
#architecture-chat .chat-model-option:hover,#architecture-chat .chat-model-option[aria-pressed=true]{background:var(--project-soft,#eef1fb)}
#architecture-chat .chat-model-option:focus-visible,#architecture-chat .chat-model-settings:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:-2px}
#architecture-chat .chat-model-settings{display:flex;justify-content:space-between;gap:8px;padding:12px 9px;margin-top:5px;border-top:1px solid var(--project-border,#dce2eb);border-radius:0 0 7px 7px;color:var(--project-accent,#4665cf);font-size:12px;text-decoration:none}
#architecture-chat .chat-model-settings:hover{background:var(--project-soft,#eef1fb)}
#architecture-chat .chat-token-remaining{font-size:10px;line-height:1.5;color:var(--project-muted,#657086);font-variant-numeric:tabular-nums}
#architecture-chat .chat-model-budget,#architecture-chat .chat-model-empty{font-size:11px;line-height:1.5;color:var(--project-muted,#657086);padding:7px 9px;margin:0}
#architecture-chat .architecture-chat-composer [data-send]{display:grid;place-items:center;background:#4665cf;color:#fff;border-radius:50%;padding:7px}
#architecture-chat .architecture-chat-composer [data-send]:hover:not(:disabled){background:#3654c0}
#architecture-chat .architecture-chat-composer [data-send]:not([data-mode=stop])::after{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 19V5m-6 6 6-6 6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
@media(max-width:750px){
 #architecture-chat .chat-model-picker summary{min-height:40px;font-size:14px}
 #architecture-chat .chat-model-option{min-height:56px}
}

/* Object reading panels share the same top navigation and content hierarchy. */
.workspace>aside>.sidebar-view-switch{order:-1;margin:0 0 18px}
#project-properties.object-document .property-heading{justify-content:space-between;align-items:center;gap:8px;margin-bottom:20px;min-width:0}
#project-properties.object-document .property-heading h2{display:block;flex:1;min-width:0;margin:0;font-size:20px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}
#project-properties.object-document .property-heading .property-edit-button{flex:none;white-space:nowrap;margin:0;min-height:32px;box-sizing:border-box}
#project-properties.object-document .property-heading #delete{margin-right:0}
#project-properties.object-document #property-fields{display:flow-root}
#project-properties.object-document .property-icon-wrap{float:left;width:56px;height:56px;margin:0 14px 18px 0;cursor:zoom-in}
#project-properties.object-document .property-icon-wrap .property-icon{width:56px;height:56px;object-fit:contain}
#project-properties.object-document #property-fields>.property-editable[data-editable="name"]{display:none}
#project-properties.object-document [data-editable="name"]>.property-text-value{font-size:20px;font-weight:650;line-height:1.35;margin:0}
#project-properties.object-document .property-description{clear:both;background:transparent;border:0;border-radius:0;padding:0;margin:20px 0}
.object-content{display:grid;gap:16px;white-space:normal;min-width:0;clear:both}
.object-content p,.property-description .object-content p{white-space:pre-wrap;margin:0;font-size:14px;line-height:1.7;color:var(--project-text,#303746);overflow-wrap:anywhere}
.object-content figure{margin:0;min-width:0}
.object-content-image{display:block;width:100%;padding:0;background:var(--project-soft,#f5f7fb);border:1px solid var(--project-border,#dce1e9);border-radius:8px;overflow:hidden;cursor:zoom-in}
.object-content-image img{display:block;width:100%;height:auto;max-height:320px;object-fit:contain}
.object-content figcaption{margin-top:7px;font-size:12px;line-height:1.5;color:var(--project-muted,#657086);overflow-wrap:anywhere}
.object-content-code{min-width:0;border:1px solid var(--project-border,#dce1e9);border-radius:8px;overflow:hidden;background:var(--project-soft,#f5f7fb)}
.object-code-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 12px;border-bottom:1px solid var(--project-border,#dce1e9);font-size:11px;color:var(--project-muted,#657086)}
.object-code-heading button{font:inherit;padding:4px;color:inherit;cursor:pointer}
.object-content pre{margin:0;padding:14px;overflow:auto;tab-size:2;font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--project-text,#303746);white-space:pre}
.object-content code{font:inherit}
.object-block-row{border:1px solid var(--project-border,#dce1e9);border-radius:8px;padding:12px;margin:0 0 12px;display:grid;gap:10px}
.object-block-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}
.object-block-heading button{padding:5px 9px;color:var(--project-muted,#657086);cursor:pointer}
.object-block-toolbar{display:flex;flex-wrap:wrap;gap:6px}
.object-block-toolbar button{border:1px solid var(--project-border,#dce1e9);padding:8px 10px;border-radius:6px;font-size:12px;color:var(--project-accent,#4665cf);cursor:pointer}
#property-edit-dialog .object-code-input{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;white-space:pre}
.object-block-status{font-size:12px;color:var(--project-muted,#657086)}
.object-image-viewer{box-sizing:border-box;width:calc(100vw - 40px);max-width:1400px;max-height:calc(100dvh - 40px);padding:44px 20px 20px;background:var(--project-surface,#fff);color:var(--project-text,#303746);border:0;border-radius:12px;overflow:auto}
.object-image-viewer::backdrop{background:#101827c9}
.object-image-viewer>img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 140px);object-fit:contain;margin:auto}
.object-image-viewer>p{text-align:center;font-size:13px;overflow-wrap:anywhere}
.object-image-close{position:absolute;right:8px;top:6px;width:36px;height:36px;font-size:26px;color:inherit;cursor:pointer}
.object-image-viewer button:focus-visible,.object-content button:focus-visible,.property-icon-wrap:focus-visible,.object-description-image:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
.object-description-image{cursor:zoom-in}
@media(max-width:750px){
 .mobile-editor #architecture-chat .architecture-chat-composer [data-send]{width:44px;height:44px;min-height:44px;margin:4px;border-radius:50%}
}

.account-plan,.story-visibility{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:auto;border:1px solid var(--project-border,#dce1e9);border-radius:999px;background:var(--project-surface,#fff);color:var(--project-muted,#657086);font:inherit;font-size:12px;font-weight:500;line-height:1;padding:8px 13px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.story-visibility{margin:0 0 12px}.account-plan:hover,.story-visibility:hover{border-color:var(--project-accent,#4665cf);color:var(--project-accent,#4665cf);background:var(--project-soft,#f8f9fc)}.account-plan:focus-visible,.story-visibility:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}.story-visibility:disabled{opacity:.5;cursor:wait}@media(max-width:400px){.header-actions .account-plan{padding:7px 9px;font-size:11px}}

.empty-trash{flex-shrink:0;padding:10px 16px;border:1px solid #edc5cb;border-radius:8px;background:var(--project-surface,#fff);color:#bd4355;font:inherit;font-size:13px;cursor:pointer}.empty-trash:hover:not(:disabled){background:#fff5f6}.empty-trash:disabled{opacity:.45;cursor:default}.empty-trash:focus-visible{outline:2px solid #bd4355;outline-offset:3px}

/* Keep catalog navigation anchored when switching between stories and trash. */
.projects-page,.projects-page.is-empty{padding:32px 40px 64px}
.projects-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 28px;flex-wrap:wrap}
.projects-page .projects-toolbar .projects-tabs{margin:0;flex-shrink:0}
.projects-toolbar .projects-tabs button{min-height:40px;box-sizing:border-box;line-height:20px}
.projects-toolbar .empty-trash{min-height:40px;box-sizing:border-box;line-height:20px}
.projects-toolbar .empty-trash[hidden]{display:none}
@media(max-width:750px){.projects-page,.projects-page.is-empty{padding:24px 20px 40px}.projects-toolbar{gap:12px;margin-bottom:14px}.projects-toolbar .projects-tabs{gap:4px}.projects-toolbar .projects-tabs button{padding:10px}.projects-toolbar .empty-trash{padding:10px 12px}}

/* Inspiration starts with navigation and search, without a duplicate heading. */
.workspace>aside>.library-heading[hidden],.workspace .library-controls #create-element[hidden]{display:none}
.workspace>aside>.library-controls{margin-top:0}

/* Closing belongs to the panel, independently of its selected tab. */
@media(min-width:751px){
 .workspace>aside>.sidebar-view-switch,.workspace #project-properties>.desktop-inspector-tabs{margin-right:40px}
 .workspace :is(aside,#project-properties)>.panel-dismiss-common{position:absolute;top:22px;right:14px;z-index:5;cursor:pointer}
}
.workspace #project-properties #properties-close{display:none!important}

/* Keep send/stop icons centered independently of the accessible text label. */
#architecture-chat .architecture-chat-composer [data-send]{position:relative}
#architecture-chat .architecture-chat-composer [data-send]::after{position:absolute;left:50%;top:50%;margin:0;transform:translate(-50%,-50%)}
#architecture-chat .architecture-chat-composer [data-send][data-mode=stop]::after{content:'';display:block;width:8px;height:8px;border-radius:1px;background:currentColor;mask:none}

/* Chat attachment picker sits inside the left side of the prompt. */
.chat-attachments{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.chat-attachment{display:flex;align-items:center;gap:5px;max-width:100%;min-width:0;padding:4px 7px;border:1px solid var(--project-border,#dbe2ea);border-radius:8px;background:var(--project-surface,#fff)}
.chat-attachment img{width:36px;height:36px;object-fit:cover;border-radius:4px}
.chat-attachment button{border:0;background:transparent;color:var(--project-text,#172033);cursor:pointer;font:inherit;font-size:12px;padding:5px}
.chat-attachment .chat-attachment-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;text-align:left}
.chat-attachment button:focus-visible,.chat-attachment-controls button:focus-visible{outline:2px solid var(--project-accent,#2563eb);outline-offset:2px}

#architecture-chat .architecture-chat-composer>.chat-attachment-controls{grid-column:1/-1;grid-row:2;align-self:end;justify-self:start;position:relative;z-index:4;width:40px;height:40px;margin:6px}
#architecture-chat .chat-attachment-controls>[data-attach]{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:var(--project-soft,#f1f3f8);color:var(--project-muted,#657086);cursor:pointer;transition:background .15s ease,color .15s ease}
#architecture-chat .chat-attachment-controls>[data-attach] svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;pointer-events:none}
#architecture-chat .chat-attachment-controls>[data-attach]:hover:not(:disabled),#architecture-chat .chat-attachment-controls>[data-attach][aria-expanded=true]{background:var(--project-soft,#eef1fb)}
#architecture-chat .chat-attachment-controls>[data-attach]:disabled{opacity:.5;cursor:wait}
#architecture-chat .chat-attachment-controls>[data-attach]:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:0}
#architecture-chat .chat-attachment-menu{position:absolute;bottom:calc(100% + 10px);left:0;width:230px;max-width:calc(100vw - 40px);padding:6px;border:1px solid var(--project-border,#dbe2ea);border-radius:12px;background:var(--project-surface,#fff);color:var(--project-text,#303746);box-shadow:0 8px 28px #17203324}
#architecture-chat .chat-attachment-menu[hidden]{display:none}
#architecture-chat .chat-attachment-menu>button{display:block;width:100%;padding:11px 12px;border:0;border-radius:7px;background:transparent;color:inherit;font:inherit;font-size:14px;text-align:left;cursor:pointer}
#architecture-chat .chat-attachment-menu>button:hover,#architecture-chat .chat-attachment-menu>button:focus-visible{background:var(--project-soft,#eef1fb);outline:0}
#architecture-chat .chat-attachment-menu>p{margin:6px 12px;font-size:11px;line-height:1.5;color:var(--project-muted,#64748b)}
#architecture-chat .architecture-chat-composer textarea{padding-left:52px}
#architecture-chat .architecture-chat-composer>[data-attachments]{grid-column:1/-1;grid-row:3}
#architecture-chat .architecture-chat-composer>[data-attachments]:empty{display:none}
#architecture-chat .architecture-chat-composer>.architecture-chat-note{grid-row:4}

.generation-settings-form{margin-top:24px}
.generation-settings-form fieldset{border:0;padding:0;margin:0;min-width:0;display:grid;gap:12px}
.generation-settings-form label{display:grid;gap:6px;min-width:0}
.generation-settings-form select{width:100%;max-width:100%;min-width:0}

#architecture-chat .architecture-chat-latest-reply{display:none}

.unified-existing-key{margin:20px 0;padding:16px;border:1px solid var(--project-border,#dce2eb);border-radius:12px}
.unified-existing-key[hidden]{display:none}
.unified-existing-key>summary{cursor:pointer;font-weight:500;line-height:1.5}
.story-timeline{display:flex;align-items:center;gap:12px;width:100%;margin:8px 0}
.story-timeline input[type=range]{flex:1;min-width:0;width:100%;height:32px;margin:0;padding:0;accent-color:var(--project-accent,#4665cf);cursor:pointer}
.story-timeline [data-position]{flex:none;font-size:12px;font-variant-numeric:tabular-nums;color:var(--project-muted,#657086)}
#project-properties #user-journey-panel .story-timeline{display:none}

#architecture-chat .chat-selection-context{margin:6px 0;padding:0;border:0;border-radius:0;background:none;color:var(--project-text,#303746);font-size:13px;font-weight:500;line-height:1.4;overflow-wrap:anywhere}
#architecture-chat .chat-selection-context[hidden]{display:none}

/* Locked backgrounds let canvas interactions pass through, including SVG contours. */
.node.group.zone-locked,.node.group.zone-locked *{pointer-events:none}.node.group.zone-locked .zone-resize-handle{display:none}

/* Compact project catalog: use available width and keep each row easy to scan. */
.projects-page:not(.is-empty){padding:20px 32px 40px}
.projects-page:not(.is-empty) .projects-inner{max-width:1600px}
.projects-page:not(.is-empty) .projects-toolbar{margin-bottom:12px}
.projects-page .projects-heading{gap:20px;margin-bottom:20px}
.projects-page .projects-heading h1{font-size:28px;letter-spacing:-.7px;margin:0 0 6px}
.projects-page .projects-heading p{font-size:13px;line-height:1.5}
.projects-page .projects-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;align-items:start}
.projects-page .project-card{display:flex;flex-direction:column;min-width:0;height:100%}
.projects-page .project-card-open{flex:1;min-width:0}
.projects-page .project-preview{height:128px;padding:10px}
.projects-page .project-card-info{padding:12px 14px 4px}
.projects-page .project-card-info h2{font-size:15px;line-height:1.4;letter-spacing:-.2px;margin:0 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:42px}
.projects-page .project-card-info p{font-size:12px;line-height:1.5;margin:0 0 6px}
.projects-page .project-card-info time{display:block;font-size:11px;line-height:1.5}
.projects-page .project-card-info time+p{font-size:11px;margin:0;color:var(--project-muted,#737e91)}
.projects-page .project-card-actions{gap:6px;padding:2px 6px 6px}
.projects-page .project-card-actions button{min-height:32px;padding:6px 8px}

/* Account name and plan share a single profile button. */
.header-actions .account-button{display:inline-flex;align-items:center;gap:10px;max-width:260px;min-width:0}.account-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-button .account-plan{border:0;border-left:1px solid var(--project-border,#dce1e9);border-radius:0;padding:2px 0 2px 10px;background:transparent;color:inherit;font-size:11px;cursor:inherit}.account-button .account-plan[hidden]{display:none}.account-button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}

/* Profile selects: consistent spacing, chevron and keyboard focus. */
.user-page select:not([multiple]):not([size]){
 appearance:none;
 box-sizing:border-box;
 min-height:42px;
 padding:10px 42px 10px 14px;
 border:1px solid var(--project-border,#d8deea);
 border-radius:10px;
 background-color:var(--project-surface,#fff);
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5' fill='none' stroke='%23717b8d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-repeat:no-repeat;
 background-position:right 14px center;
 color:var(--project-text,#303746);
 font:inherit;
 font-size:14px;
 line-height:20px;
 cursor:pointer;
}
.user-page select:not([multiple]):not([size]):hover:not(:disabled){border-color:var(--project-accent,#4665cf)}
.user-page select:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
.user-page select:disabled{opacity:.5;cursor:not-allowed}
.account-language-settings label{max-width:280px}
@supports (appearance:base-select){
 .user-page select:not([multiple]):not([size]),.user-page select:not([multiple]):not([size])::picker(select){appearance:base-select}
 .user-page select:not([multiple]):not([size])::picker-icon{display:none}
 .user-page select:not([multiple]):not([size])::picker(select){margin-block:6px;padding:5px;border:1px solid var(--project-border,#d8deea);border-radius:12px;background:var(--project-surface,#fff);color:var(--project-text,#303746);box-shadow:0 8px 24px #18243b14}
 .user-page select:not([multiple]):not([size]) option{padding:10px 12px;gap:10px;border-radius:7px;font-size:14px;line-height:20px;cursor:pointer}
 .user-page select:not([multiple]):not([size]) option:hover,.user-page select:not([multiple]):not([size]) option:focus{background:var(--project-soft,#eef2fd);outline:none}
 .user-page select:not([multiple]):not([size]) option:checked{background:var(--project-soft,#eef2fd);color:var(--project-accent,#4665cf);font-weight:500}
}

/* Compact provider list with an on-demand editor. */
.provider-toolbar,.provider-form-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0 14px}
.provider-toolbar h3,.provider-form-heading h3{margin:0;font-size:15px}
.provider-toolbar button,.provider-form-heading button{border:1px solid var(--project-border,#d8deea);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-accent,#4665cf);padding:8px 12px;font:inherit;font-size:13px;cursor:pointer}
.provider-connections{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:24px}
.provider-empty{margin:0;padding:16px 0;color:var(--project-muted,#657086);font-size:13px}
#profile-personal-llm .provider-card{display:grid;grid-template-columns:1fr auto;gap:6px 20px;text-align:left;max-width:100%;min-width:220px;padding:14px 16px;border:1px solid var(--project-border,#d8deea);border-radius:10px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit;cursor:pointer}
.provider-card strong{font-size:14px;font-weight:600}.provider-card span{font-size:12px;color:var(--project-muted,#657086)}.provider-card small{grid-column:1/-1;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--project-muted,#657086)}
#profile-personal-llm .provider-card:hover{border-color:var(--project-accent,#4665cf);background:var(--project-soft,#eef2fd)}
#profile-personal-llm [data-provider-form]{max-width:520px;padding:20px;margin-bottom:24px;border:1px solid var(--project-border,#d8deea);border-radius:12px;background:var(--project-background,#f8f9fb)}
#profile-personal-llm [data-provider-form][hidden]{display:none}
#profile-personal-llm .provider-form-heading{margin-top:0}
#profile-personal-llm [data-message]:empty{display:none}
.provider-card:focus-visible,.provider-toolbar button:focus-visible,.provider-form-heading button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}

/* Generation preferences: connections first, independent assignments below. */
#profile-personal-llm{padding:32px;--generation-line:var(--project-border,#dce2eb)}
#profile-personal-llm .generation-page-heading{padding-bottom:24px;border-bottom:1px solid var(--generation-line)}
#profile-personal-llm h2{font-size:25px;letter-spacing:-.7px}
#profile-personal-llm .user-note{margin:0;max-width:60ch}
#profile-personal-llm .usage-note{font-size:13px;line-height:1.6;color:var(--project-muted,#626b7a);margin:6px 0 0}
#profile-personal-llm .provider-toolbar{margin:26px 0 16px;align-items:center}
#profile-personal-llm h3{font-size:17px;letter-spacing:-.25px;margin:0}
#profile-personal-llm button{font:inherit;font-size:13px;line-height:1.4;cursor:pointer}
#profile-personal-llm button:disabled{cursor:default;opacity:.5}
#profile-personal-llm .provider-toolbar button{white-space:nowrap;padding:10px 14px;background:var(--project-accent,#4665cf);color:#fff;border-color:transparent}
#profile-personal-llm .provider-connections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:0}
#profile-personal-llm .provider-card{min-width:0;width:100%;padding:16px;gap:10px;text-align:left}
#profile-personal-llm .provider-card strong{font-size:15px}
#profile-personal-llm .provider-card span{font-family:monospace;align-self:center}
#profile-personal-llm .provider-card small{color:var(--project-accent,#4665cf);font-size:12px;max-width:none}
#profile-personal-llm .provider-empty{grid-column:1/-1;padding:24px;border:1px dashed var(--generation-line);border-radius:10px;line-height:1.6}
#profile-personal-llm [data-provider-form]{max-width:none;margin:16px 0 0;padding:24px;background:var(--project-background,#f8f9fb)}
#profile-personal-llm .provider-form-heading{margin:0 0 20px}
#profile-personal-llm .provider-editor-fields{max-width:600px}
#profile-personal-llm label{font-size:13px;font-weight:500;line-height:1.5}
#profile-personal-llm input,#profile-personal-llm select{font:inherit;font-weight:400;font-size:14px;min-height:44px;color:var(--project-text,#303746);background-color:var(--project-surface,#fff);border:1px solid var(--generation-line);border-radius:8px}
#profile-personal-llm input:focus-visible,#profile-personal-llm button:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:3px}
#profile-personal-llm .provider-key-input{display:flex;align-items:center;background:var(--project-surface,#fff);border:1px solid var(--generation-line);border-radius:8px;overflow:hidden}
#profile-personal-llm .provider-key-input input{min-width:0;flex:1;border:0;border-radius:0}
#profile-personal-llm .provider-key-input button{border:0;background:none;color:var(--project-accent,#4665cf);padding:12px}
#profile-personal-llm .provider-catalog-action{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
#profile-personal-llm .provider-catalog-action button,#profile-personal-llm .journey-settings-actions button{padding:10px 14px;border:1px solid var(--generation-line);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#303746)}
#profile-personal-llm .journey-settings-actions .primary{background:var(--project-accent,#4665cf);border-color:transparent;color:#fff}
#profile-personal-llm [data-delete]{color:var(--project-muted,#626b7a)}
#profile-personal-llm [data-provider-form]>.usage-note{margin:18px 0}
#profile-personal-llm [role=status]{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#profile-personal-llm [role=status]:empty{display:none}
#profile-personal-llm .generation-settings-form{margin-top:32px;border-top:1px solid var(--generation-line);padding-top:28px}
#profile-personal-llm .generation-heading{margin-bottom:8px}
#profile-personal-llm .generation-task{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.5fr);gap:24px;padding:24px 0;border-bottom:1px solid var(--generation-line)}
#profile-personal-llm .generation-task h4{margin:0 0 6px;font-size:15px;font-weight:600}
#profile-personal-llm .generation-task-heading p{font-size:13px;line-height:1.6;color:var(--project-muted,#626b7a);margin:0;max-width:28ch}
#profile-personal-llm .generation-task-fields{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:12px;align-content:start}
#profile-personal-llm .generation-task-fields label{margin:0;gap:7px}
#profile-personal-llm .generation-voice{grid-column:1/-1}
#profile-personal-llm .generation-availability{grid-column:1/-1;margin:0;font-size:12px;line-height:1.6;color:var(--project-muted,#626b7a)}
#profile-personal-llm .generation-availability:empty{display:none}
#profile-personal-llm .generation-footer{padding-top:8px}
#profile-personal-llm .generation-footer .journey-settings-actions{margin-top:18px}
#profile-personal-llm .unified-existing-key{font-size:13px;background:var(--project-background,#f8f9fb);margin-bottom:0}
@media(min-width:751px) and (max-width:1050px){#profile-personal-llm{padding:24px}#profile-personal-llm .generation-task{grid-template-columns:1fr;gap:16px}#profile-personal-llm .generation-task-heading p{max-width:none}}

/* Library previews share the generation status of their canvas objects. */
.library-item[data-agent-placeholder]{position:relative}
.library-item[data-agent-placeholder]>img{visibility:hidden}
.library-item[data-agent-placeholder]::before{content:'';position:absolute;top:7px;left:50%;transform:translateX(-50%);width:64%;height:64%;border-radius:12px;background:linear-gradient(110deg,transparent 25%,color-mix(in srgb,var(--project-accent,#627bd4) 16%,transparent) 48%,transparent 70%),var(--project-soft,#eef1fb);background-size:240% 100%;animation:agent-media-shimmer 2.8s ease-in-out infinite;pointer-events:none}
.library-item[data-agent-generating]::before{animation-duration:1.6s}
@media(prefers-reduced-motion:reduce){.library-item[data-agent-placeholder]::before{animation:none}}

/* Reserve the selection row so the composer stays put when selection changes. */
#architecture-chat .chat-prompt-field{grid-column:1/-1;grid-row:2;min-width:0;border:1px solid var(--project-border,#dce2eb);border-radius:var(--editor-control-radius,9px);background:var(--project-surface,#fff)}
#architecture-chat .chat-prompt-field:focus-within{outline:2px solid var(--project-accent,#4665cf);outline-offset:-2px}
#architecture-chat .chat-prompt-field .chat-selection-context{margin:0 12px 12px 52px;padding:3px 8px;min-height:24px;width:fit-content;max-width:calc(100% - 116px);box-sizing:border-box;border-radius:6px;background:var(--project-soft,#edf1ff);font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#architecture-chat .chat-prompt-field #architecture-chat-question{border:0;background:transparent;padding-left:12px;padding-right:12px;text-align:left}
#architecture-chat .chat-prompt-field #architecture-chat-question:focus{outline:none}

#architecture-chat .chat-prompt-field .chat-selection-context[hidden]{display:block!important;visibility:hidden}

/* Model assignments opened from the chat composer. */
#architecture-chat .chat-model-trigger{display:flex;align-items:center;gap:10px;max-width:100%;padding:6px 8px;text-align:left;color:var(--project-text,#303746);font:500 13px 'Golos Text',sans-serif;border-radius:8px}
#architecture-chat .chat-model-trigger>span:first-child{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
#architecture-chat .chat-model-trigger small{font-size:10px;font-weight:400;color:var(--project-muted,#657086)}
#architecture-chat .chat-model-trigger:hover{background:var(--project-soft,#eef1fb)}
#chat-generation-dialog{box-sizing:border-box;width:min(820px,calc(100vw - 48px));max-width:820px;max-height:88dvh;padding:28px;border:1px solid var(--project-border,#dce2eb);border-radius:16px;background:var(--project-surface,#fff);color:var(--project-text,#303746);overflow:auto}
#chat-generation-dialog::backdrop{background:#202a4666}
#chat-generation-dialog .chat-generation-header{display:flex;align-items:center;justify-content:space-between;gap:20px}
#chat-generation-dialog h2{margin:0;font-size:24px}
#chat-generation-dialog button{cursor:pointer;font:inherit;font-size:13px;padding:10px 14px;border-radius:8px}
#chat-generation-dialog :is(.chat-generation-intro,.usage-note){font-size:13px;line-height:1.6;color:var(--project-muted,#657086)}
#chat-generation-dialog .generation-heading{display:none}
#chat-generation-dialog .generation-settings-form{margin-top:8px}
#chat-generation-dialog .generation-task{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr);gap:24px;padding:20px 0;border-bottom:1px solid var(--project-border,#dce2eb)}
#chat-generation-dialog h4{margin:0 0 6px;font-size:15px}
#chat-generation-dialog .generation-task-heading p{margin:0;font-size:12px;line-height:1.6;color:var(--project-muted,#657086)}
#chat-generation-dialog .generation-task-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;min-width:0}
#chat-generation-dialog label{font-size:12px}
#chat-generation-dialog select{box-sizing:border-box;padding:10px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:inherit;font:inherit;font-size:13px}
#chat-generation-dialog :is(.generation-voice,.generation-availability){grid-column:1/-1}
#chat-generation-dialog .generation-availability{margin:0;font-size:12px;color:var(--project-muted,#657086)}
#chat-generation-dialog .generation-availability:empty{display:none}
#chat-generation-dialog .journey-settings-actions{display:flex;gap:10px;flex-wrap:wrap}
#chat-generation-dialog .chat-model-settings{font-size:13px;margin-top:12px;padding:12px 0}
#chat-generation-dialog :is(button,select,a):focus-visible,#architecture-chat .chat-model-trigger:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}

#architecture-chat .architecture-chat-model .chat-model-trigger{box-sizing:border-box;flex:1 1 100%;min-width:0;width:100%;height:auto;justify-content:space-between;align-items:flex-start;padding:8px;text-align:left}
#architecture-chat .chat-model-summary{flex:1;display:grid;gap:6px;min-width:0}
#architecture-chat .chat-model-summary-row{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px;align-items:baseline;font-size:12px;line-height:1.5}
#architecture-chat .chat-model-summary-row small{font-size:11px}
#architecture-chat .chat-model-summary-row>span{overflow-wrap:anywhere}
#architecture-chat .chat-model-trigger .chat-model-chevron{margin-top:5px;flex-shrink:0}

#architecture-chat .chat-model-controls{display:grid;grid-template-columns:minmax(0,1fr) 36px;align-items:start;width:100%;min-width:0}
#architecture-chat .architecture-chat-model .chat-model-collapse{display:grid;place-items:center;box-sizing:border-box;width:36px;height:36px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--project-muted,#657086);cursor:pointer}
#architecture-chat .chat-model-collapse:hover{background:var(--project-soft,#eef1fb)}
#architecture-chat .chat-model-collapse .chat-model-chevron{transform:rotate(225deg);margin:4px 0 0}
#architecture-chat .architecture-chat-model[data-collapsed=true] .chat-model-summary-row:not(:first-child){display:none}
#architecture-chat .architecture-chat-model[data-collapsed=true] .chat-model-chevron{transform:rotate(45deg);margin:0 0 4px}
#architecture-chat .chat-model-collapse:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}

/* Speech choices belong to the playback window, outside the document inspector. */
.story-speech-settings{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:12px 0 16px}
.story-speech-settings label{display:grid;gap:6px;flex:1 1 180px;min-width:0;font-size:12px;color:var(--project-muted,#657086)}
.story-speech-settings select{width:100%;min-width:0;box-sizing:border-box;min-height:40px;padding:8px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit;font-size:13px}
.story-speech-settings button{min-height:40px;padding:8px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-soft,#eef2fd);color:var(--project-text,#303746);font:inherit;font-size:12px;cursor:pointer}
.story-speech-settings [data-speech-status]{flex:1 0 100%;margin:0;font-size:12px;color:var(--project-muted,#657086)}
.story-speech-settings [data-speech-status]:empty{display:none}
#project-properties #user-journey-panel .story-speech-settings{display:none}


/* Full-screen video workspace; preview aspect ratio follows the export canvas. */
.diagram-video-dialog.video-studio{box-sizing:border-box;position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:var(--project-surface,#fff);color:var(--project-text,#303746);overflow:auto}
.video-studio[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.video-studio-header{display:flex;align-items:center;gap:20px;padding:16px 24px;border-bottom:1px solid var(--project-border,#dce2eb)}
.video-studio-header>div{flex:1;min-width:0}.video-studio-header h2{margin:0;font-size:20px}.video-studio-header [data-project-title]{display:block;margin-top:3px;color:var(--project-muted,#657086);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.video-studio button,.video-studio [data-download]{padding:10px 16px;min-height:40px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit;font-size:13px;cursor:pointer;text-decoration:none}
.video-studio button.primary{background:var(--project-accent,#4665cf);color:#fff;border-color:transparent}.video-studio button:disabled{opacity:.55;cursor:wait}
.video-studio-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:0}
.video-studio-view{display:flex;flex-direction:column;align-items:center;min-width:0;min-height:0;padding:24px;background:#e9ecf1;overflow:auto}
.video-studio-stage{width:100%;min-height:0;flex:1;display:flex;align-items:center;justify-content:center}
.video-studio-frame{display:flex;align-items:center;justify-content:center;max-width:100%;height:100%;min-height:0;aspect-ratio:9/16;box-shadow:0 8px 32px #20283820;background:#f6f7f9}
.video-studio-frame canvas{display:block;width:auto;height:100%;max-width:100%;max-height:100%;aspect-ratio:9/16;object-fit:contain}
.video-studio[data-format=landscape] .video-studio-frame,.video-studio[data-format=landscape] .video-studio-frame canvas{aspect-ratio:16/9}
.diagram-video-dialog.video-studio video{display:block;width:auto;height:100%;max-width:100%;max-height:100%;aspect-ratio:9/16;object-fit:contain;margin:0;border-radius:0}
.video-studio[data-format=landscape] video{aspect-ratio:16/9}
.video-preview-controls{display:flex;align-items:center;gap:12px;width:100%;max-width:640px;margin-top:20px;flex-shrink:0}.video-preview-controls input{min-width:0;flex:1;accent-color:var(--project-accent,#4665cf)}.video-preview-controls output{font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.video-studio [data-preview-note]{font-size:12px;color:#596476;text-align:center;max-width:600px;margin:10px 0 0}
.video-studio-settings{position:static;width:auto;display:block;border-radius:0;box-shadow:none;padding:24px;overflow:auto;border:0;border-left:1px solid var(--project-border,#dce2eb)}
.video-studio-settings label{display:grid;gap:8px;margin:0 0 16px;font-size:13px;font-weight:500}.video-studio-settings output{float:right;color:var(--project-muted,#657086);font-variant-numeric:tabular-nums}
.video-studio-settings select{box-sizing:border-box;width:100%;padding:10px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:inherit;font:inherit;min-width:0}
.video-studio-settings input[type=range]{width:100%;margin:0;accent-color:var(--project-accent,#4665cf)}
.video-studio-settings fieldset{margin:24px 0 0;padding:20px 0 0;border:0;border-top:1px solid var(--project-border,#dce2eb);min-width:0}.video-studio-settings legend{padding:0 8px 0 0;font-size:14px;font-weight:600}.video-studio-settings .video-check{display:flex;align-items:center;gap:8px}.video-studio-settings input[type=checkbox]{accent-color:var(--project-accent,#4665cf);width:16px;height:16px}
.video-studio [data-voice-status]{font-size:12px;color:var(--project-muted,#657086)}
.video-studio-footer{display:flex;align-items:center;gap:12px;padding:12px 24px;border-top:1px solid var(--project-border,#dce2eb);min-height:40px}.video-studio-footer [data-status]{flex:1;margin:0;font-size:13px}.video-studio [hidden]{display:none!important}

.video-studio-stage{container-type:size}
.video-studio .video-studio-frame{width:min(100cqw,calc(100cqh * 9 / 16));height:auto;max-height:100%;flex-shrink:0}
.video-studio .video-studio-frame canvas{width:100%;height:auto;max-height:none}
.video-studio[data-format=landscape] .video-studio-frame{width:min(100cqw,calc(100cqh * 16 / 9))}
.diagram-video-dialog.video-studio video{width:min(100cqw,calc(100cqh * 9 / 16));height:auto;max-height:100%}
.video-studio[data-format=landscape] video{width:min(100cqw,calc(100cqh * 16 / 9))}

/* The story can be resized continuously from its upper edge. */
.object-description-sheet .story-sheet-resize{position:absolute;z-index:10;top:0;left:0;right:0;height:14px;cursor:ns-resize;touch-action:none;user-select:none}
.object-description-sheet .story-sheet-resize::after{content:"";position:absolute;top:4px;left:50%;width:40px;height:4px;transform:translateX(-50%);border-radius:4px;background:var(--project-muted,#929bad);opacity:.6}
.object-description-sheet .story-sheet-resize:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:-2px}
.object-description-sheet[data-resized=true]{inset:auto;left:var(--mobile-viewport-left,0px);top:calc(var(--mobile-viewport-top,0px) + var(--mobile-viewport-height,100dvh) - clamp(140px,var(--story-height),var(--mobile-viewport-height,100dvh)));width:var(--mobile-viewport-width,100%);height:clamp(140px,var(--story-height),var(--mobile-viewport-height,100dvh));max-height:var(--mobile-viewport-height,100dvh)}
.object-description-sheet[data-story-playback=true][data-expanded=false][data-resized=true]{height:clamp(140px,var(--story-height),var(--mobile-viewport-height,100dvh));max-height:var(--mobile-viewport-height,100dvh);top:calc(var(--mobile-viewport-top,0px) + var(--mobile-viewport-height,100dvh) - clamp(140px,var(--story-height),var(--mobile-viewport-height,100dvh)));bottom:auto;padding-top:18px}

.video-studio-footer [data-speech-progress]{width:140px;max-width:100%;height:8px;accent-color:var(--project-accent,#4665cf);flex-shrink:0}

.video-studio-settings textarea{box-sizing:border-box;width:100%;max-width:100%;min-height:80px;resize:vertical;padding:10px 12px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-surface,#fff);color:inherit;font:inherit;line-height:1.4}
.video-studio-settings .video-background-hint,.video-studio [data-background-status]{font-size:12px;line-height:1.5;color:var(--project-muted,#657086);overflow-wrap:anywhere}
.video-studio-settings [data-background-generate],.video-studio-settings [data-background-remove]{margin-bottom:16px;max-width:100%}


.node.library-replace-target{outline:3px solid var(--accent);outline-offset:6px;box-shadow:0 0 0 9px #5265d91a;border-radius:12px}

/* Animation controls are temporarily hidden. */
#edit-animations,#animate-selection,.story-animation-setting,.diagram-video-dialog label:has(select[data-animation]){display:none!important}

/* The saved story sequence is independent from the drawing order. */
.story-order{margin:0 0 20px;padding-bottom:16px;border-bottom:1px solid var(--project-border,#dce2eb);min-width:0}
.story-order h3{margin:0 0 8px;font-size:14px}
.story-order-help{font-size:12px;line-height:1.5;color:var(--project-muted,#657086);margin:0 0 12px}
.story-order-list{margin:0;padding:0;list-style:none;display:grid;gap:10px}
.story-order-list li{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid var(--project-border,#dce2eb);border-radius:10px;background:var(--project-surface,#fff);font-size:12px;overflow-wrap:anywhere}
.story-order-list li::marker{color:var(--project-muted,#657086);font-variant-numeric:tabular-nums}
.story-order-card{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.story-order-card>span{grid-column:2;grid-row:1;display:block;font-weight:600;line-height:1.4}
.story-order-members{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.story-order-member{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;font-size:11px;color:var(--project-muted,#657086)}
.story-order-member img{width:32px;height:32px;object-fit:contain;flex:none}
.story-order-actions{display:flex;justify-content:flex-end;gap:3px;margin-top:0}
.story-order button{min-height:32px;padding:5px 9px;border:1px solid var(--project-border,#dce2eb);border-radius:7px;background:var(--project-soft,#eef2fd);color:var(--project-text,#303746);font:inherit;font-size:12px;cursor:pointer}
.story-order button:disabled{opacity:.4;cursor:default}
.story-order button:focus-visible,.story-order select:focus-visible{outline:2px solid var(--project-accent,#4665cf);outline-offset:2px}
.story-order-add{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.story-order-add select{box-sizing:border-box;flex:1 1 100%;width:100%;min-width:0;min-height:36px;padding:6px;border:1px solid var(--project-border,#dce2eb);border-radius:7px;background:var(--project-surface,#fff);color:var(--project-text,#303746);font:inherit;font-size:12px}
.object-description-sheet[data-story-playback=true] [data-story-order]{display:none!important}

.story-order-card>.story-order-members{grid-column:1;grid-row:1;margin:0}
.story-order-actions button{min-height:28px;padding:3px 6px}
.story-order-list .story-order-zone,.story-order-card.is-zone{display:block}
.story-order-card.is-zone>.story-order-members{margin-top:8px}
.story-order-zone>.story-order-actions{margin-top:8px}

/* Drag-and-drop ordering; touch scrolling remains available outside the grip. */
.story-order-draggable{cursor:grab;user-select:none;-webkit-user-select:none}
.story-order-draggable.is-dragging{opacity:.65;border-color:var(--project-accent,#4665cf);box-shadow:0 0 0 2px var(--project-soft,#eef2fd);cursor:grabbing}
.story-order-actions .story-order-drag-handle{touch-action:none;cursor:grab;font-size:20px;line-height:1;min-width:32px}
.story-order-actions .story-order-drag-handle[aria-pressed=true]{cursor:grabbing}

/* Manual scene insertion stays above the sequence, including on long stories. */
.story-order>.story-order-add:not(.story-order-manage){margin:0 0 14px;padding:12px;border:1px solid var(--project-border,#dce2eb);border-radius:10px;background:var(--project-surface,#fff)}
#user-journey-panel .story-order .story-order-picker{display:grid;gap:7px;flex:1 1 100%;width:100%;margin:0;font-size:12px;font-weight:500;color:var(--project-muted,#657086)}
.story-order .story-order-picker select{width:100%;font-weight:400}
.story-order .story-order-picker-hint{margin:0;font-size:12px;line-height:1.5}

/* Story actions share one aligned toolbar above the title. */
#project-properties.story-document>.inspector-content>.property-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;height:auto;margin:0 0 16px;padding:0}
#project-properties.story-document .property-heading>.story-visibility{position:static;display:inline-flex;align-items:center;justify-content:center;order:-1;flex:none;width:auto;height:36px;min-height:36px;box-sizing:border-box;margin:0 auto 0 0;padding:0 12px;border:1px solid var(--project-border,#dce2eb);border-radius:999px;background:var(--project-surface,#fff);color:var(--project-muted,#657086);font:500 12px/1 'Golos Text',sans-serif;align-self:center}
#project-properties.story-document .property-heading>#edit-properties{margin:0;align-self:center;flex:none}
#project-properties:not(.story-document) .property-heading>.story-visibility{display:none}
.story-order-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px}
.story-order-heading h3{flex:1;min-width:0;margin:0}
#user-journey-panel .story-order-heading .story-order-plus{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0;font-size:26px;line-height:1;border-radius:8px;color:var(--project-accent,#4665cf)}
.story-order-add[hidden]{display:none!important}

/* Video production is offered only inside the open story reader. */
.object-description-sheet>.story-reading-actions{display:flex;flex:0 0 auto;justify-content:flex-end;margin:0;padding:12px 0 0;border-top:1px solid var(--project-border,#dce2eb)}
.object-description-sheet>.story-reading-actions[hidden]{display:none}

/* Sequence help is optional; editing enables reference drops from the canvas. */
#user-journey-panel .story-order-heading .story-order-help-button{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;min-height:28px;padding:0;border-radius:50%;font:600 15px/1 'Golos Text',sans-serif;color:var(--project-muted,#657086);background:var(--project-surface,#fff)}
.story-order-help[hidden]{display:none!important}
.story-order-editbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.story-order-edit-hint{flex-basis:100%;margin:0!important;font-size:12px!important;line-height:1.5}
.story-order-editbar .story-order-edit-button{min-height:36px;padding:7px 12px}
.story-order-editbar .story-order-edit-button[aria-pressed=true]{background:var(--project-accent,#4665cf);color:#fff}
.story-order-dropzone[data-story-dropzone]{min-height:80px;border:1px dashed var(--project-border,#c3cce0);border-radius:12px;padding:10px;transition:background .12s,border-color .12s}
.story-order-dropzone.is-canvas-over{background:var(--project-soft,#eef2fd);border-color:var(--project-accent,#4665cf)}
.story-order-drop-hint{margin:10px 0 0!important;padding:14px 8px;text-align:center;font-size:12px!important;color:var(--project-muted,#657086)}
.story-order-list .story-order-drop-before::before{content:'';position:absolute;left:0;right:0;top:-6px;height:3px;border-radius:2px;background:var(--project-accent,#4665cf);pointer-events:none}
.story-order-dropzone.drop-at-end .story-order-drop-hint{box-shadow:inset 0 3px var(--project-accent,#4665cf)}
.story-order-canvas-ghost{position:fixed;pointer-events:none;z-index:99999;max-width:240px;padding:10px 14px;border:1px solid var(--project-accent,#4665cf);border-radius:10px;background:var(--project-surface,#fff);color:var(--project-text,#303746);box-shadow:0 6px 24px #26375430;font:500 13px/1.4 'Golos Text',sans-serif}
body.story-order-editing #canvas .node{cursor:copy}
.object-description-sheet[data-story-order-editing=true]>.story-reading-actions{display:none}
.object-description-sheet[data-story-order-editing=true]{z-index:80;inset:80px 0 0 auto;width:min(380px,45vw);height:calc(100dvh - 80px);max-height:calc(100dvh - 80px);border-radius:12px 0 0 12px;padding:16px}

/* A locked zone can still be referenced by the story without being moved. */
body.story-order-editing #canvas .node.group.zone-locked,body.story-order-editing #canvas .node.group.zone-locked .node-label{pointer-events:auto}

/* Keep sequence help beside its title and editing on the same row. */
.story-order-heading{justify-content:flex-start;gap:8px}
.story-order-heading h3{flex:0 1 auto;min-width:0}
#user-journey-panel .story-order-heading .story-order-edit-button{flex:0 0 auto;margin-left:auto;min-height:36px;padding:7px 10px;font-size:13px;white-space:nowrap}
#user-journey-panel .story-order-heading .story-order-edit-button[aria-pressed=true]{background:var(--project-accent,#4665cf);color:#fff}

/* Give narration text its own uncluttered editing surface inside the reader. */
#user-journey-panel[data-text-editing=true]>:not(.story-transcript){display:none!important}
#user-journey-panel[data-text-editing=true] .story-edit-heading{display:none}
#user-journey-panel[data-text-editing=true] .story-transcript{margin:0}
.object-description-sheet:has(#user-journey-panel[data-text-editing=true])>.story-reading-actions{display:none}
.story-edit-form textarea{scroll-margin-block:12px}

/* The reader reuses the editor conversation and draft. */
.object-description-sheet>.story-reading-actions{gap:10px;align-items:center}
.story-reading-actions .story-chat-button{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;padding:12px;border:0;border-radius:50%;background:var(--project-accent,#4665cf);color:#fff;cursor:pointer;box-shadow:0 4px 14px #263b6a24}
.story-chat-button svg{width:24px;height:24px;pointer-events:none}
.story-chat-button:focus-visible{outline:3px solid var(--project-accent,#4665cf);outline-offset:3px}
.story-chat-dialog{box-sizing:border-box;margin:auto;padding:16px;border:1px solid var(--project-border,#dce2eb);border-radius:18px;background:var(--project-surface,#fff);color:var(--project-text,#202632);overflow:hidden}
.story-chat-dialog[open]{display:flex;flex-direction:column;gap:12px}
.story-chat-dialog::backdrop{background:#18243966}
.story-chat-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto}
.story-chat-dialog h2{margin:0;font-size:18px}
.story-chat-dialog>header button{flex:0 0 44px;width:44px;height:44px;border:0;border-radius:10px;background:var(--project-soft,#eef2fd);color:inherit;font-size:24px;cursor:pointer}
.story-chat-hint{flex:0 0 auto;margin:0;color:var(--project-muted,#657086);font-size:13px;line-height:1.5}
.story-chat-host{display:flex;flex:1;min-height:0;min-width:0;overflow:auto}
.story-chat-dialog #architecture-chat{flex:1;min-width:0;min-height:0;height:auto;overflow:auto}
.story-chat-dialog{width:min(520px,calc(100vw - 48px));height:min(740px,calc(100dvh - 48px));max-height:calc(100dvh - 48px)}

.story-reading-actions .story-chat-button{position:relative}
.story-chat-button[data-busy=true]::after{content:"";position:absolute;inset:5px;border:2px solid #ffffff60;border-top-color:#fff;border-radius:50%;animation:story-chat-spin .85s linear infinite;pointer-events:none}
.story-chat-button[data-busy=true] svg{opacity:.6}
.story-chat-button[data-error=true]::after{content:"!";position:absolute;top:-3px;right:-3px;display:grid;place-items:center;width:20px;height:20px;box-sizing:border-box;border:2px solid var(--project-surface,#fff);border-radius:50%;background:#b83e48;color:#fff;font:700 12px/1 sans-serif;pointer-events:none}
@keyframes story-chat-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.story-chat-button[data-busy=true]::after{animation:none}}

#architecture-chat [data-status][hidden]{display:none!important}

.object-description-sheet:not([data-expanded=true])>.story-reading-actions{display:none}

.object-description-sheet .story-reading-play{display:flex;flex:1;min-width:0}
.object-description-sheet .story-reading-play[hidden]{display:none}
.story-reading-play [data-play]{width:100%;min-height:48px;padding:10px 16px;border:1px solid var(--project-accent,#4665cf);border-radius:8px;background:var(--project-accent,#4665cf);color:var(--project-accent-text,#fff);font:500 14px/1.4 'Golos Text',sans-serif;cursor:pointer}
.story-reading-play [data-play]:disabled{opacity:.5;cursor:default}
.object-description-sheet .story-reading-video{margin-top:24px;padding:16px 0;border-top:1px solid var(--project-border,#dce2eb)}
.story-reading-video #create-diagram-video{width:100%;min-height:44px;padding:10px 16px;border:1px solid var(--project-border,#dce2eb);border-radius:8px;background:var(--project-soft,#eef2fd);color:var(--project-accent,#4665cf);font:500 14px/1.4 'Golos Text',sans-serif;cursor:pointer}
.story-reading-video #create-diagram-video:disabled{opacity:.45;cursor:default}
.object-description-sheet .story-reading-video[hidden],.object-description-sheet:not([data-expanded=true]) .story-reading-video,.object-description-sheet[data-story-order-editing=true] .story-reading-video{display:none}

.object-description-sheet[data-expanded=true] #user-journey-panel .story-controls{display:none}

/* Playback temporarily clears the editor panels without changing their settings. */
body:has(#object-description-sheet[open][data-story-playback=true]) .workspace{--canvas-left-space:0px!important;--canvas-right-space:0px!important}
body:has(#object-description-sheet[open][data-story-playback=true]) .workspace>:not(#canvas){display:none!important}
body:has(#object-description-sheet[open][data-story-playback=true]) .workspace #canvas{width:100%;min-width:0;visibility:visible!important}
body:has(#object-description-sheet[open][data-story-playback=true]) #canvas :is(.tools,.zoom,.document-bar,.object-description-button){display:none!important}

/* Compact playback keeps transport controls still; only the passage scrolls. */
.object-description-sheet[data-story-playback=true][data-expanded=false] .object-description-content{display:flex;overflow:hidden;overscroll-behavior:contain}
.object-description-sheet[data-story-playback=true][data-expanded=false] #object-story-content{display:flex;flex:1;min-height:0;min-width:0}
.object-description-sheet[data-story-playback=true][data-expanded=false] #object-story-content>#user-journey-panel{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden}
.object-description-sheet[data-story-playback=true][data-expanded=false] #user-journey-panel :is(.story-speech-settings,.story-animation-setting){display:none!important}
.object-description-sheet[data-story-playback=true][data-expanded=false] #user-journey-panel :is(.story-controls,.story-timeline){flex:0 0 auto}
.object-description-sheet[data-story-playback=true][data-expanded=false] .story-playback-text{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
.object-description-sheet[data-story-playback=true][data-expanded=false] [data-seek]{touch-action:none}

#architecture-chat .architecture-chat-model .chat-no-images{display:flex;align-items:center;gap:7px;width:fit-content;min-height:24px;margin:2px 0 0;color:var(--project-text,#303746);font-size:12px;cursor:pointer}
#architecture-chat .chat-no-images input{margin:0;accent-color:var(--project-accent,#4665cf)}
