/* Viewport-constrained dialogs: header and actions remain visible. */
html[data-splash-disabled] #startup-splash{display:none}
.modal-backdrop{align-items:center;padding:20px;box-sizing:border-box;overflow:hidden}.desktop-shell .modal-backdrop{top:34px}.modal,.modal.settings-modal,.modal.search-modal{max-height:100%;max-width:min(100%,960px);display:flex;flex-direction:column;overflow:hidden;min-height:0}.modal-head{flex:0 0 auto}.modal>.modal-body{overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}.modal.settings-modal{height:min(760px,100%)}.settings-modal>.modal-body{overflow:hidden;flex:1}.settings-layout{min-height:0}.settings-tabs{overflow:auto}.settings-content{min-height:0}.modal.search-modal>.modal-body{overflow:auto}.modal-pinned-actions{flex:0 0 auto;padding:15px 24px;margin:0!important;border-top:1px solid var(--border);background:var(--panel);flex-wrap:wrap}.modal-pinned-actions button{white-space:normal}.modal-head h2{min-width:0;overflow-wrap:anywhere}.modal-head>.icon-button{flex-shrink:0}.project-tab{padding:0;flex-shrink:0;display:flex;align-items:stretch}.project-tab-open{display:flex;align-items:center;gap:9px;min-width:0;padding:12px 8px 12px 18px}.project-tab-open span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tab-close{display:flex;align-items:center;justify-content:center;padding:6px;width:30px;opacity:.65}.tab-close:hover{opacity:1;color:var(--accent);background:var(--hover)}.tab-close .icon{width:13px;height:13px}.project-central-button{display:flex;align-items:center;gap:11px;padding:11px 16px;margin:0 0 8px;border-radius:7px;font-size:11px;width:100%;text-align:left}.project-central-button.active{background:var(--accent-bg);color:var(--accent)}.project-dashboard .orbit-top h1{overflow-wrap:anywhere}.project-root-label{overflow-wrap:anywhere;font-size:11px!important}.dashboard-folders{max-height:260px;overflow:auto}.dashboard-folders button{display:flex;align-items:center;gap:12px;padding:13px 0;width:100%;text-align:left;border-bottom:1px solid var(--border);font-size:12px}.dashboard-folders span{flex:1;overflow-wrap:anywhere}.dashboard-folders small{color:var(--muted)}.backlink>span{min-width:0;overflow-wrap:anywhere}.backlink small{display:block;font-size:9px;color:var(--muted);margin-top:4px}.missing-links{font-size:11px;line-height:1.8}.missing-links code{display:block;overflow-wrap:anywhere;color:var(--muted)}.local-file-link{display:inline;max-width:100%;overflow-wrap:anywhere;text-align:left}.unresolved-link{text-decoration:underline dashed!important;opacity:.7}.embedded-image{display:block;margin:14px 0;border:1px solid var(--border);border-radius:8px;overflow:hidden}.embedded-image img{display:block;max-width:100%;max-height:480px;object-fit:contain}.project-preview{overflow-wrap:anywhere}
/* Grips remain keyboard accessible and persist independent widths. */
body:not(.connections-hidden) #main>.context-panel{position:relative;top:auto;right:auto;bottom:auto;width:var(--context-width,285px);flex:0 0 var(--context-width,285px);max-width:55%;box-shadow:none;min-width:0}.project-editor-grid.split{position:relative;grid-template-columns:minmax(0,var(--editor-ratio,50%)) minmax(0,1fr);grid-template-rows:minmax(0,1fr);overflow:hidden}.split-content{position:relative;grid-template-columns:minmax(0,var(--editor-ratio,50%)) minmax(0,1fr);gap:0}.split-content .editor,.split-content #preview{min-width:0;padding-left:18px;padding-right:18px}.editing-pane{position:relative}.pane-resizer{position:absolute;z-index:5;top:0;bottom:0;width:9px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none;border-radius:0}.pane-resizer:after{content:'';position:absolute;left:4px;top:0;bottom:0;width:1px;background:var(--border);transition:background .15s}.pane-resizer:hover:after,.pane-resizer:focus-visible:after{width:3px;left:3px;background:var(--accent)}.resize-context{left:0}.resize-editor{left:calc(var(--editor-ratio,50%) - 4px)}.resize-columns{right:-4px}.resizing-panes,.resizing-panes *{cursor:col-resize!important;user-select:none!important}.context-panel{scrollbar-width:thin}.context-panel>.context-title{position:relative}.split-content .format-toolbar{grid-column:1/-1}.editing-columns{min-width:0}.project-editor-grid textarea{border-right:1px solid var(--border);border-bottom:0}
/* Launch surface and welcome window share the existing theme tokens. */
#startup-splash{position:fixed;inset:0;z-index:999;background:#0d1320;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#d9eef1;transition:opacity .3s,visibility .3s;pointer-events:auto}.desktop-shell #startup-splash{top:34px}#startup-splash.splash-complete{opacity:0;visibility:hidden;pointer-events:none}.splash-orbit{width:150px;height:150px;display:grid;place-items:center;position:relative;margin-bottom:24px}.splash-orbit img{width:80px;animation:splash-breathe 1.8s ease-in-out infinite}.splash-orbit i{position:absolute;inset:0;border:1px solid #78e2df22;border-top-color:#78e2df;border-radius:50%;animation:splash-spin 2.2s linear infinite}.splash-orbit i:after{content:'';position:absolute;top:17px;right:17px;width:6px;height:6px;border-radius:50%;background:#78e2df;box-shadow:0 0 18px #78e2df}#startup-splash>strong{font:600 36px Manrope,system-ui;letter-spacing:-1.8px}#startup-splash>strong span{color:#78e2df}#startup-splash>p{color:#8295ae;font-size:12px;margin-top:12px}.splash-progress{margin-top:24px;width:130px;height:2px;overflow:hidden;background:#78e2df15}.splash-progress:before{content:'';display:block;width:45%;height:100%;background:#78e2df;animation:splash-load 1.2s ease-in-out infinite}.modal.launcher-modal{width:min(1020px,100%);max-width:1020px;height:min(660px,100%)}.launcher-modal>.modal-head{padding:18px 24px;border-bottom:1px solid var(--border)}.launcher-modal>.modal-head h2{font:500 12px Manrope,system-ui;color:var(--muted)}.launcher-modal>.modal-body{padding:0;flex:1;overflow:hidden;display:flex}.launcher-layout{display:grid;grid-template-columns:38% minmax(0,1fr);min-height:0;flex:1}.launcher-intro{padding:38px;background:radial-gradient(ellipse at 15% 15%,color-mix(in srgb,var(--accent) 12%,transparent),transparent 65%),color-mix(in srgb,var(--bg) 75%,transparent);border-right:1px solid var(--border);overflow:auto}.launcher-mark{margin-bottom:27px}.launcher-mark img{width:56px}.launcher-intro h1{font-size:27px;font-weight:500;color:var(--strong);letter-spacing:-.8px;line-height:1.25;margin:14px 0}.launcher-intro>p{font-size:12px;line-height:1.9;margin-bottom:28px}.launcher-intro>button{display:flex;width:100%;margin-top:12px;justify-content:flex-start;font-size:12px;gap:12px}.launcher-intro>.solid-button{flex-wrap:wrap}.launcher-intro button span{font-size:9px;opacity:.7;margin-left:auto}.launcher-recents{padding:32px;display:flex;flex-direction:column;overflow:hidden;min-height:0}.launcher-recents h2{font-size:22px;font-weight:500;color:var(--strong);margin:12px 0 20px}.launcher-recents h2 small{font-size:11px;color:var(--muted);margin-left:8px}.launcher-recents .side-search{margin:0;flex-shrink:0}.launcher-error:empty{display:none}.launcher-error{color:var(--purple)!important;font-size:11px!important}.launcher-foot{margin-top:auto;padding-top:20px;font-size:10px!important;flex-shrink:0}#recent-project-list{overflow:auto;min-height:0;flex:1;margin-top:16px;scrollbar-width:thin}.recent-project-row{display:flex;align-items:center;border-bottom:1px solid var(--border)}.recent-project-row[hidden]{display:none}.recent-project-row>button:first-child{display:flex;gap:14px;align-items:center;flex:1;min-width:0;padding:17px 8px;text-align:left}.recent-project-row>button:first-child:hover{background:var(--hover)}.recent-project-row>button:first-child>.icon:first-child{color:var(--accent);width:23px;flex-shrink:0}.recent-project-row>button:first-child>.icon:last-child{transform:rotate(180deg);width:14px;color:var(--muted)}.recent-project-row span{flex:1;min-width:0}.recent-project-row strong{display:block;color:var(--strong);font-size:13px;font-weight:500}.recent-project-row small{display:block;color:var(--muted);font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:5px}.recent-project-row time{display:block;font-size:9px;color:var(--subtle);margin-top:5px}.recent-project-empty{padding:32px 10px;font-size:12px;color:var(--muted);line-height:2}
@keyframes splash-spin{to{transform:rotate(360deg)}}@keyframes splash-breathe{50%{filter:drop-shadow(0 0 18px #78e2df44);transform:scale(1.05)}}@keyframes splash-load{from{transform:translateX(-100%)}to{transform:translateX(330%)}}
@media(max-width:900px){body:not(.connections-hidden) #main>.context-panel{position:absolute;right:0;top:0;bottom:0;max-width:65%;z-index:20;background:var(--panel);box-shadow:-12px 0 30px #0004}.launcher-intro{padding:25px}.launcher-recents{padding:24px}.launcher-intro h1{font-size:23px}.project-dashboard .orbit-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.project-document-toolbar{flex-wrap:wrap;gap:10px}.project-editor-grid textarea{min-height:0;padding:18px}.header-right .save-state{max-width:90px}}
@media(max-width:650px){.modal-backdrop{padding:10px}.modal-head,.settings-modal .modal-head{padding:14px 18px}.modal-pinned-actions{padding:12px 16px}.launcher-layout{grid-template-columns:1fr;overflow:auto}.launcher-modal>.modal-body{overflow:auto}.launcher-intro{border-right:0;border-bottom:1px solid var(--border)}.launcher-intro h1 br{display:none}.launcher-mark{display:none}.launcher-recents{min-height:260px;overflow:visible}#recent-project-list{max-height:260px;flex:none}.launcher-foot{padding-top:10px}.split-content{grid-template-columns:minmax(0,var(--editor-ratio,50%)) minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){#startup-splash *{animation:none!important}#startup-splash{transition:none}.pane-resizer:after{transition:none}}

.launcher-recents label.side-search{display:flex}.embedded-image:before{display:none}.header-left{min-width:0;flex:1}.header-right{flex-shrink:0}.breadcrumb{min-width:0;white-space:nowrap;overflow:hidden}.breadcrumb #crumb-folder{overflow:hidden;text-overflow:ellipsis}.breadcrumb #crumb-workspace{flex-shrink:0}@media(max-width:1150px){body:not(.connections-hidden) #main>.context-panel{position:absolute;right:0;top:0;bottom:0;max-width:65%;z-index:20;background:var(--panel);box-shadow:-12px 0 30px #0004}}@media(max-width:800px){.header-right .save-state{display:none}.header-left .separator{display:none}.breadcrumb #crumb-workspace{display:none}}
