/* Keep the three-column workspace from shifting when routes have different
   document heights. Published lists are often scrollable while an empty draft
   page is not; reserving the scrollbar gutter prevents a whole-page jump. */
html{overflow-y:scroll;scrollbar-gutter:stable}
body,#app{min-height:100vh}
/* The browser owns the main page scroll.  Earlier revisions locked the page
   to the viewport and made all three columns independently scrollable; that
   produced three competing scrollbars on the home page. */
body:has(#app > .layout){overflow:visible}
#app:has(> .layout){height:auto;overflow:visible}
#app > .layout{
  height:auto;
  min-height:calc(100vh - 58px)!important;
  overflow:visible;
  align-items:start;
  padding-bottom:40px;
}
#app > .layout > .left-panel,
#app > .layout > .content,
#app > .layout > .right-panel{
  min-height:initial;
  overflow:visible;
  scrollbar-gutter:auto;
  overscroll-behavior:auto;
}
#app > .layout > .left-panel,
#app > .layout > .right-panel{height:auto}
#app > .layout > .content{height:auto;padding-bottom:0}
html.scitrace-workspace-switcher-ready #project-list > .project{visibility:hidden}

/* Group-scoped navigation: a person may be a member in one group and PI in another. */
#project-list{display:flex;flex-direction:column;gap:10px}
/* Use the left panel's actual content column as one shared alignment grid. */
.left-panel .workspace-nav-heading{margin:28px 0 12px}
.left-panel .workspace-project-search{margin:-4px 0 9px}
.left-panel .side-links{padding-left:0;padding-right:0}
.workspace-nav-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.workspace-nav-heading>span{min-width:0}
.workspace-search-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid #e1e9ed;border-radius:8px;background:#fff;color:#718793;cursor:pointer;font:inherit;transition:.16s ease}
.workspace-search-toggle:hover,.workspace-search-toggle[aria-expanded="true"]{border-color:#ffd3a2;background:#fff8f0;color:#ef7800}
.workspace-project-search{display:grid;grid-template-columns:minmax(0,1fr) 28px;align-items:center;gap:4px;margin:-4px 10px 9px;padding:4px 5px 4px 9px;border:1px solid #e1eaee;border-radius:9px;background:#fff;box-shadow:0 5px 14px rgba(38,64,78,.055)}
.workspace-project-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#314c5f;font:12px inherit}
.workspace-project-search input::placeholder{color:#9aa8b1}
.workspace-project-search button{width:26px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:#81929d;font-size:17px;cursor:pointer}
.workspace-project-search button:hover{background:#fff2e5;color:#ef7800}
.workspace-group{padding:9px 8px 8px;border:1px solid #edf1f3;border-radius:11px;background:linear-gradient(180deg,#fcfdfd,#fff);box-shadow:0 2px 8px rgba(32,62,80,.025)}
.workspace-group:first-child{padding-top:9px;border-top:1px solid #edf1f3}
.workspace-group-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:0 2px 8px;color:#496273;min-width:0}
.workspace-group-head>div{min-width:0}
.workspace-group-head b{display:block;color:#294255;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-group-head small{display:block;margin-top:2px;color:#94a4af;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-role{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border-radius:999px;padding:2px 7px;font-size:11px;font-weight:700;line-height:1.45;white-space:nowrap;background:#eef4f7;color:#587080}
.workspace-role-pi{background:#fff0df;color:#d66d00}
.workspace-role-manager{background:#eaf4ff;color:#34739b}
.workspace-role-system_admin{background:#f1ecff;color:#6b53b3}
.workspace-group-actions{display:flex;align-items:center;gap:4px;flex:0 0 auto}
.workspace-group-toggle{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:6px;background:transparent;color:#778d9b;font-size:16px;cursor:pointer;transition:transform .16s ease,background .16s ease}
.workspace-group-toggle:hover{background:#eef4f6;color:#35576b}
.workspace-group.is-collapsed .workspace-group-toggle{transform:rotate(-90deg)}
.workspace-projects{display:grid;gap:5px}
.workspace-group.is-collapsed .workspace-projects{display:none}
.workspace-creator{display:grid;gap:4px;padding:2px 0}
.workspace-creator-head{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;height:30px;border:0;border-radius:7px;padding:0 7px;background:transparent;color:#66808f;text-align:left;font:inherit;font-size:11px;font-weight:750;cursor:pointer}
.workspace-creator-head:hover{background:#f3f7f8;color:#35576b}
.workspace-creator-head span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-creator-head em{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;margin-left:4px;border-radius:999px;background:#eef4f6;color:#76909e;font-style:normal;font-size:10px}
.workspace-creator-head i{flex:0 0 auto;color:#7d929f;font-size:15px;font-style:normal;transition:transform .16s ease}
.workspace-creator.is-collapsed .workspace-creator-head i{transform:rotate(-90deg)}
.workspace-creator-projects{display:grid;gap:5px;padding-left:5px}
.workspace-creator.is-collapsed .workspace-creator-projects{display:none}
.workspace-project{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:48px;border:1px solid transparent;border-radius:8px;padding:9px 8px;text-align:left;background:#fff;color:#385365;box-shadow:none;cursor:pointer;transition:background .16s ease,border-color .16s ease}
.workspace-project:hover{background:#f6f9fa;border-color:#e5edef}
.workspace-project.active{background:#fff5e9;border-color:#ffd9ae;box-shadow:inset 3px 0 0 #ff8a00}
.workspace-project-code{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:34px;max-width:55px;height:23px;overflow:hidden;text-overflow:ellipsis;border-radius:6px;background:#edf3f6;color:#597182;padding:0 5px;font-size:10px;font-weight:700;white-space:nowrap}
.workspace-project.active .workspace-project-code{background:#ffe5c7;color:#c86600}
.workspace-project-copy{display:flex;align-items:center;min-width:0;min-height:28px}
.workspace-project-copy b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#274254;font-size:13px;line-height:1.4}
.workspace-empty{padding:8px 4px;color:#91a0ab;font-size:12px}
/* Existing-account picker in the PI member library. */
.draft-row-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.outline.danger{border-color:#f1c6c6;color:#bd4f4f}.outline.danger:hover{background:#fff7f7}
/* Published and draft libraries share one calm, aligned reading layout. */
.library-header{align-items:center!important;min-height:70px;margin-bottom:16px!important}.library-header h1{margin-bottom:4px!important}.library-header p{max-width:560px;margin-bottom:0!important}.library-create-action{margin-left:auto!important;min-height:38px;padding:9px 17px!important;border-radius:9px!important;white-space:nowrap}.published-list{display:grid;gap:12px}.published-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:18px;margin:0!important;padding:20px!important;border-radius:13px!important;box-shadow:0 8px 22px rgba(31,70,83,.045)!important}.published-card-main{min-width:0}.published-row .post-head{gap:9px;min-height:32px}.published-row .post-head .avatar{margin-right:0}.published-row .post-head b{font-size:13px;color:#314b5e}.published-row .post-head small{display:block;margin-top:1px;line-height:1.45}.published-row h3{margin:13px 0 7px!important;color:#20394d;font-size:16px!important;line-height:1.45}.published-preview{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:0!important;color:#5f7686!important;font-size:13px;line-height:1.72!important}.published-card-footer{display:flex;align-items:center;gap:9px;min-width:0;margin-top:13px;color:#91a0aa}.published-card-footer small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-state,.draft-state-label{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:700;line-height:1.2}.record-state{background:#edf8f5;color:#168568}.published-detail-action{align-self:center!important;margin:0!important;padding:8px 12px!important;color:#ce6e0d!important;border-color:#f1c995!important;white-space:nowrap}.draft-card-topline{display:flex;align-items:center;gap:8px;min-height:20px}.draft-card-topline small{color:#8798a3;font-size:12px}.draft-state-label{background:#fff3e3;color:#d87812}.draft-log-card{border-color:#ede4d8!important;background:linear-gradient(135deg,#fff 0%,#fffdfa 100%)}.draft-log-card .published-card-footer{padding-top:11px;border-top:1px solid #f0ebe4}.draft-row-actions{display:grid;gap:8px;align-self:center}.draft-row-actions .outline{margin:0!important;min-width:86px;white-space:nowrap}.primary-outline{border-color:#f0be83!important;background:#fff9f1!important;color:#ca6c0e!important}.library-empty-state{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:15px;min-height:132px;padding:24px;border:1px dashed #d9e3e8;border-radius:13px;background:#fff;text-align:left;color:#607687}.library-empty-state>span{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#f1f7f8;color:#668794;font-size:19px}.library-empty-state strong{display:block;color:#29485c;font-size:15px}.library-empty-state p{margin:5px 0 0;color:#82949f;font-size:13px;line-height:1.6}.draft-empty-state{border-color:#efd9c1;background:linear-gradient(135deg,#fffdfa,#fff7ec)}.draft-empty-state>span{background:#fff0de;color:#dc7b17}.draft-empty-state .publish{margin:0!important;white-space:nowrap}@media(max-width:620px){.library-header{align-items:flex-start!important;gap:12px}.library-create-action{margin-left:0!important}.published-row{grid-template-columns:1fr;gap:14px}.published-detail-action{align-self:start!important}.draft-row-actions{display:flex;width:100%}.library-empty-state{grid-template-columns:40px minmax(0,1fr)}.library-empty-state button{grid-column:2;justify-self:start;margin:3px 0 0!important}}
.post-comment-count{display:inline-flex;align-items:center;color:#8a9aa4;font-size:12px}
