:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#211b28;background:#f4f1f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input,textarea{font:inherit}button{cursor:pointer}.app-shell{display:grid;grid-template-columns:270px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:#17131f;color:#fff;padding:24px 18px;display:flex;flex-direction:column;border-right:1px solid #282231}.logo-row{display:flex;align-items:center;gap:12px;padding:0 8px 28px}.logo-row div:last-child{display:flex;flex-direction:column}.logo-row strong{font-family:Georgia,serif;font-size:22px}.logo-row span{font-size:11px;color:#a99fb3;text-transform:uppercase;letter-spacing:.12em}.brand-mark{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#8f62ff,#da77f2);color:#fff;box-shadow:0 12px 30px #8f62ff44}.brand-mark.small{width:38px;height:38px;border-radius:12px}.sidebar nav button,.logout{border:0;background:transparent;color:#c9c1d0;width:100%;display:flex;gap:10px;align-items:center;padding:11px 12px;border-radius:10px;text-align:left}.sidebar nav button.active,.sidebar nav button:hover{background:#2a2333;color:#fff}.sidebar-heading{display:flex;justify-content:space-between;align-items:center;color:#756b80;text-transform:uppercase;font-size:10px;font-weight:800;letter-spacing:.12em;padding:28px 10px 10px}.sidebar-heading button{background:transparent;border:0;color:#877c91}.project-list{display:flex;flex-direction:column;gap:5px;overflow:auto}.project{position:relative;width:100%;display:grid;grid-template-columns:32px 1fr;gap:8px;border:0;background:transparent;color:#d6d0dc;text-align:left;padding:9px;border-radius:11px}.project:hover,.project.active{background:#292231}.project-icon{width:30px;height:30px;border-radius:9px;background:#382d45;display:grid;place-items:center}.project b,.project small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project b{font-size:12px}.project small{font-size:10px;color:#8f8498;margin-top:3px}.status{display:inline-flex;width:max-content;border-radius:99px;padding:4px 8px;font-size:9px;font-style:normal;font-weight:900;text-transform:uppercase;letter-spacing:.06em;background:#ece8ef;color:#665b6e}.project .status{position:absolute;right:8px;bottom:5px;transform:scale(.8);transform-origin:right bottom}.status-ready,.status-published{background:#dff6e9;color:#167144}.status-draft{background:#fff0cc;color:#8b5a00}.status-deleted,.status-archived{background:#eee;color:#777}.connection-card{margin-top:auto;border:1px solid #302938;border-radius:14px;padding:12px;background:#1d1824}.connection-card div{display:grid;grid-template-columns:22px 1fr;align-items:center;font-size:10px;color:#958b9e;padding:7px}.connection-card b{grid-column:2;color:#e1dce6;font-size:11px}.logout{margin-top:8px}.main-content{padding:28px 34px 60px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.eyebrow{margin:0 0 7px;color:#8c799a;font-size:10px;font-weight:900;letter-spacing:.16em}.topbar h1{margin:0;font-family:Georgia,serif;font-size:34px}.primary-button,.secondary-button,.publish-button{border:0;border-radius:12px;display:flex;justify-content:center;align-items:center;gap:9px;font-weight:800;padding:12px 16px}.primary-button{background:#6f43d6;color:#fff;box-shadow:0 10px 25px #6f43d633}.secondary-button{background:#fff;color:#44394d;border:1px solid #e6e0e9}.publish-button{width:100%;background:#17131f;color:#fff}.primary-button:disabled,.publish-button:disabled,.secondary-button:disabled{opacity:.55;cursor:not-allowed}.message{display:flex;align-items:center;gap:9px;padding:12px 14px;border-radius:12px;margin-bottom:18px;font-size:13px}.message.success{background:#e5f7ed;color:#12683e}.message.error{background:#fff0f0;color:#a33232}.message button{margin-left:auto;border:0;background:transparent;color:inherit;font-size:20px}.intro-card{display:flex;justify-content:space-between;gap:30px;background:#221b2a;color:#fff;padding:30px;border-radius:22px;box-shadow:0 20px 50px #2b203022}.intro-card h2{font-family:Georgia,serif;font-size:28px;margin:0 0 10px}.intro-card p:not(.eyebrow){max-width:680px;color:#beb5c5;line-height:1.6;margin:0}.workflow{display:flex;align-items:center;gap:8px;white-space:nowrap}.workflow span{background:#32283d;border:1px solid #453651;border-radius:99px;padding:9px 11px;font-size:10px;font-weight:800}.workflow svg{width:13px;color:#756a7f}.filter-row{display:flex;gap:8px;margin:24px 0 16px;flex-wrap:wrap}.filter-row button{border:1px solid #ded7e2;background:#fff;padding:8px 13px;border-radius:99px;font-size:11px;font-weight:800;color:#776b7d}.filter-row button.active{background:#6f43d6;border-color:#6f43d6;color:#fff}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px}.template-card{background:#fff;border:1px solid #e9e3eb;border-radius:17px;overflow:hidden;box-shadow:0 8px 24px #392c3e0b}.template-image{height:190px;background:#ddd6e2 center/cover no-repeat;position:relative}.template-image span{position:absolute;top:12px;left:12px;background:#17131fcc;color:#fff;padding:6px 9px;border-radius:99px;font-size:9px;font-weight:900;text-transform:uppercase}.template-body{padding:17px}.template-body h3{margin:0 0 7px;font-family:Georgia,serif;font-size:19px}.template-body p{height:36px;overflow:hidden;color:#817584;font-size:12px;line-height:1.5}.template-body>div{display:flex;justify-content:space-between;align-items:center;margin-top:14px}.template-body button{border:0;background:#f0e9ff;color:#6638c9;border-radius:10px;padding:9px 11px;font-weight:800;font-size:11px;display:flex;gap:6px;align-items:center}.studio-layout{display:grid;grid-template-columns:355px minmax(0,1fr);gap:20px}.control-column{display:flex;flex-direction:column;gap:16px}.panel{background:#fff;border:1px solid #e7e0e9;border-radius:17px;padding:20px}.panel h2{font-family:Georgia,serif;margin:0 0 7px;font-size:22px}.source-panel p:not(.eyebrow){color:#887d8c;font-size:12px}.panel-title{display:flex;justify-content:space-between;color:#6f43d6}.panel label,.auth-card label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:900;color:#635969;margin-top:16px}.panel input,.panel textarea,.auth-card input{width:100%;border:1px solid #ddd5e1;border-radius:10px;padding:11px 12px;color:#26202b;outline:none;background:#fdfcfd}.panel textarea{resize:vertical;line-height:1.5}.panel input:focus,.panel textarea:focus,.auth-card input:focus{border-color:#8c63e7;box-shadow:0 0 0 3px #8c63e719}.panel .primary-button{width:100%;margin-top:16px}.helper,.blocked-note{font-size:11px;color:#958a99;line-height:1.5}.blocked-note{display:flex;gap:7px;color:#9a6b1a}.preview-column{min-width:0}.preview-toolbar{height:52px;background:#211a28;color:#fff;border-radius:16px 16px 0 0;padding:0 18px;display:flex;align-items:center;justify-content:space-between;font-size:11px}.preview-toolbar div{display:flex;align-items:center;gap:8px}.preview-toolbar>span{color:#95899e;max-width:55%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dot{width:8px;height:8px;border-radius:50%;background:#64d898;box-shadow:0 0 0 4px #64d89822}.preview-column iframe{display:block;width:100%;height:670px;border:1px solid #dcd5df;border-top:0;background:#fff;border-radius:0 0 16px 16px}.quality-panel{display:grid;grid-template-columns:110px 1fr;gap:18px;background:#fff;border:1px solid #e7e0e9;border-radius:17px;padding:20px;margin-top:16px}.score-ring{width:96px;height:96px;border-radius:50%;display:grid;place-content:center;text-align:center;background:conic-gradient(#6f43d6 0 90%,#eee8f1 90%);position:relative}.score-ring:after{content:"";position:absolute;inset:8px;border-radius:50%;background:#fff}.score-ring strong,.score-ring span{position:relative;z-index:1}.score-ring strong{font-size:27px}.score-ring span{font-size:9px;text-transform:uppercase;color:#8c8190}.quality-heading{display:flex;justify-content:space-between}.quality-heading h3{margin:0}.quality-heading span{font-size:10px;font-weight:900}.quality-heading .good{color:#1e814e}.quality-heading .warn{color:#a06a11}.check-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:13px}.check{display:flex;gap:7px;padding:8px;border-radius:9px;background:#f7f5f8;font-size:10px}.check svg{flex:0 0 auto}.check b,.check small{display:block}.check small{color:#887d8c;margin-top:2px;line-height:1.3}.check.passed svg{color:#258650}.check.failed{background:#fff0f0}.check.failed svg{color:#b23b3b}.warning-box,.error-box{background:#fff3d8;color:#8c6113;border-radius:9px;padding:9px 11px;font-size:11px;margin-top:10px}.auth-shell{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 20%,#7d4bca44,transparent 35%),#17131f}.auth-card{width:min(420px,calc(100% - 32px));background:#fff;border-radius:24px;padding:34px;box-shadow:0 30px 80px #0006}.auth-card h1{font-family:Georgia,serif;font-size:34px;margin:15px 0 8px}.auth-card>p:not(.eyebrow){color:#796f7d;line-height:1.55}.auth-card .primary-button{width:100%;margin-top:20px}.error-box{display:flex;gap:7px;background:#fff0f0;color:#a33232}.empty-small{font-size:11px;color:#716878;padding:10px}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1100px){.studio-layout{grid-template-columns:1fr}.control-column{display:grid;grid-template-columns:1fr 1fr}.source-panel{grid-column:1/-1}.workflow{display:none}}@media(max-width:760px){.app-shell{display:block}.sidebar{position:static;height:auto}.project-list,.connection-card{display:none}.main-content{padding:20px 14px}.topbar{align-items:flex-start;gap:12px}.topbar h1{font-size:27px}.intro-card{padding:22px}.studio-layout{display:block}.control-column{display:block}.panel{margin-bottom:14px}.preview-column iframe{height:560px}.quality-panel{grid-template-columns:1fr}.check-grid{grid-template-columns:1fr}.template-grid{grid-template-columns:1fr}}
.icon{display:inline-grid;place-items:center;min-width:1em;font-style:normal;line-height:1}.workflow b{color:#756a7f;font-size:16px}.connection-card .icon{grid-row:1/3}
.change-panel{background:#fff;border:1px solid #e7e0e9;border-radius:17px;padding:18px 20px;margin-top:16px}.change-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.change-heading h3{margin:0;font-size:17px}.change-heading>span{font-size:10px;font-weight:900;color:#177548;background:#e7f7ee;border-radius:999px;padding:6px 9px}.change-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:14px}.change-grid>div{background:#f7f5f8;border-radius:11px;padding:12px}.change-grid strong,.change-grid span{display:block}.change-grid strong{font-size:20px;color:#2b2332}.change-grid span{font-size:9px;color:#817685;line-height:1.35;margin-top:4px}.change-panel details{margin-top:12px;border-top:1px solid #eee8f0;padding-top:10px}.change-panel summary{cursor:pointer;font-size:10px;font-weight:900;color:#6f43d6}.change-panel ul{margin:9px 0 0;padding-left:18px;color:#746a78;font-size:10px;line-height:1.5}@media(max-width:760px){.change-grid{grid-template-columns:1fr 1fr}}

.message.progress{background:#eee8ff;color:#5d36ba}.message.progress .icon{animation:pulse 1.2s ease-in-out infinite}@keyframes pulse{50%{opacity:.35}}

/* Structural Composer v0.2 */
.mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;background:#f3eef7;padding:5px;border-radius:12px;margin-bottom:18px}.mode-tabs button{border:0;background:transparent;color:#756a7e;padding:10px 8px;border-radius:9px;font-weight:900;font-size:10px;display:flex;align-items:center;justify-content:center;gap:6px}.mode-tabs button.active{background:#fff;color:#6237c4;box-shadow:0 4px 12px #3c2a4a15}.composer-panel select{width:100%;border:1px solid #ddd5e1;border-radius:10px;padding:10px 11px;color:#26202b;background:#fdfcfd;outline:none}.composer-panel select:focus{border-color:#8c63e7;box-shadow:0 0 0 3px #8c63e719}.library-loading{display:flex;align-items:center;gap:8px;margin:16px 0;padding:13px;background:#f3eefc;border-radius:11px;color:#613db2;font-size:11px;font-weight:800}.library-summary{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:18px 0 9px}.library-summary>span{background:#f4f1f6;color:#716677;border-radius:99px;padding:6px 9px;font-size:9px;font-weight:900}.library-summary button{margin-left:auto;border:0;background:transparent;color:#6f43d6;font-size:10px;font-weight:900}.section-mixer{border:1px solid #e8e1eb;border-radius:13px;overflow:hidden;max-height:430px;overflow-y:auto}.section-slot{display:grid;grid-template-columns:25px 28px minmax(100px,.8fr) minmax(160px,1.4fr);align-items:center;gap:7px;padding:10px;border-bottom:1px solid #eee8f0;background:#faf9fb;opacity:.62}.section-slot:last-child{border-bottom:0}.section-slot.enabled{opacity:1;background:#fff}.slot-order{width:22px;height:22px;border-radius:7px;background:#eee8f3;color:#766a7d;display:grid;place-items:center;font-size:9px;font-weight:900}.slot-toggle{margin:0!important;display:block!important}.slot-toggle input{position:absolute;opacity:0;pointer-events:none}.slot-toggle span{display:block;width:25px;height:15px;border-radius:99px;background:#d7d0dc;position:relative}.slot-toggle span:after{content:"";position:absolute;width:11px;height:11px;border-radius:50%;background:#fff;top:2px;left:2px;box-shadow:0 1px 3px #0002;transition:.2s}.slot-toggle input:checked+span{background:#7446d8}.slot-toggle input:checked+span:after{transform:translateX(10px)}.slot-toggle input:disabled+span{opacity:.75}.slot-copy b,.slot-copy small{display:block}.slot-copy b{font-size:10px;color:#3d3443}.slot-copy small{font-size:8px;color:#94899a;margin-top:2px}.section-slot select{padding:8px 9px;font-size:9px;border-radius:8px}.secondary-button.full{width:100%;margin-top:12px}.structural-report .change-heading>span{text-transform:capitalize}.composition-order{margin:14px 0 0;padding:0;list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:7px}.composition-order li{background:#f7f5f8;border-radius:10px;padding:9px 11px;display:flex;justify-content:space-between;gap:10px;font-size:9px}.composition-order b{color:#332b39}.composition-order span{color:#877b8b;text-align:right}.source-panel{border-left:4px solid #7547d8}.blocked-note:before{content:"!";font-weight:900}.preview-column iframe{min-height:720px}@media(max-width:1350px){.studio-layout{grid-template-columns:420px minmax(0,1fr)}}@media(max-width:1100px){.studio-layout{grid-template-columns:1fr}.control-column{display:grid;grid-template-columns:1fr 1fr}.composer-panel{grid-column:1/-1}.source-panel{grid-column:1/-1}}@media(max-width:760px){.control-column{display:block}.section-slot{grid-template-columns:22px 26px 1fr}.section-slot select{grid-column:1/-1}.composition-order{grid-template-columns:1fr}.mode-tabs{grid-template-columns:1fr}.library-summary button{margin-left:0}}

/* Structural Composer v0.2.1: explicit source template pool */
.source-pool{margin-top:18px;border:1px solid #e8e1eb;border-radius:13px;padding:12px;background:#fbf9fc}.source-pool-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.source-pool-heading>div b,.source-pool-heading>div small{display:block}.source-pool-heading>div b{font-size:11px;color:#3d3443}.source-pool-heading>div small{font-size:9px;color:#8e8294;margin-top:3px;line-height:1.35}.source-pool-heading button{border:0;background:#eee7fb;color:#6237c4;border-radius:8px;padding:7px 9px;font-size:9px;font-weight:900}.source-pool-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-height:235px;overflow:auto;margin-top:10px;padding-right:3px}.panel label.source-template-choice{display:grid;grid-template-columns:36px 1fr;align-items:center;gap:8px;margin:0;padding:8px;border:1px solid #e8e1eb;border-radius:10px;background:#fff;cursor:pointer;position:relative;min-width:0}.panel label.source-template-choice.selected{border-color:#7750d9;background:#f5f1ff;box-shadow:0 0 0 2px #7750d912}.source-template-choice input{position:absolute;opacity:0;pointer-events:none}.source-thumb{width:36px;height:31px;border-radius:7px;background:#ded7e5 center/cover no-repeat}.source-template-choice>span:last-child{min-width:0}.source-template-choice b,.source-template-choice small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.source-template-choice b{font-size:9px;color:#352e3b}.source-template-choice small{font-size:8px;color:#938899;margin-top:2px}.source-template-choice.selected:after{content:'✓';position:absolute;top:5px;right:6px;width:15px;height:15px;border-radius:50%;display:grid;place-items:center;background:#7345d6;color:#fff;font-size:8px;font-weight:900}.pool-help{font-size:9px;color:#8e8294;margin:8px 1px 0;line-height:1.4}.section-step-title{margin:12px 2px 8px}.section-step-title b,.section-step-title small{display:block}.section-step-title b{font-size:11px;color:#3d3443}.section-step-title small{font-size:9px;color:#918597;margin-top:2px}.css-recovery-details{margin-top:12px}.css-recovery-details ul{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:6px}.css-recovery-details li{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;border-radius:8px;background:#f6f4f7;font-size:9px}.css-recovery-details li.good b{color:#20784c}.css-recovery-details li.bad{background:#fff0f0}.css-recovery-details li.bad b{color:#ab3434}.css-recovery-details li span{color:#827787;text-align:right}@media(max-width:760px){.source-pool-grid{grid-template-columns:1fr}}
