/* Project library, archive and call history share one readable type scale. */
.content-shell:has(.project-switch){container-type:inline-size}
.content-shell:has(.project-switch) #main{font-size:13px;line-height:1.65}
.content-shell:has(.project-switch) .panel-header{height:auto;min-height:136px;gap:18px}
.content-shell:has(.project-switch) #main>.panel-header{padding-bottom:20px}
.content-shell:has(.project-switch) .heading-line{min-width:0}
.content-shell:has(.project-switch) .heading-actions{max-width:none;margin-left:auto}
.content-shell:has(.project-switch) .heading-line .inline-description{min-width:0;font-size:12px!important;line-height:1.6;overflow-wrap:anywhere}
.content-shell:has(.project-switch) .toolbar{height:35px;min-height:35px;flex:none;flex-wrap:wrap}
.content-shell:has(.project-switch) :is(button,input,select,textarea){font-size:13px;line-height:1.5}
.content-shell:has(.project-switch) .toolbar .category-segments{max-width:none}
.content-shell:has(.project-switch) .toolbar .category-segments button{min-width:70px}
.content-shell:has(.project-switch) .toolbar .project-library-categories button{width:78px;min-width:78px;padding-inline:0}
.content-shell:has(.project-switch) .toolbar .search{min-width:150px}
.content-shell:has(.project-switch) .toolbar>select{max-width:164px;width:164px}
.content-shell:has(.project-switch) .project-switch .category-segments{height:35px;max-width:none}
.content-shell:has(.project-switch) .project-switch .category-segments button{height:33px;padding-inline:14px}
.content-shell:has(.project-switch) .project-switch>button{height:35px;padding-inline:14px}
.content-shell:has(.project-switch) :is(.library-detail h2,.archive-preview-heading h2,.archive-standards h2,.library-manager h2){font-size:19px;line-height:1.45;font-weight:600}
.content-shell:has(.project-switch) :is(.item h3,.library-detail h3,.archive-standards h3,.detail-label,.label){font-size:14px;line-height:1.5}
.content-shell:has(.project-switch) :is(.library-detail>p,.library-detail>.field p,.reference,.log-text,.library-manager-table th,.library-manager-table td){font-size:13px;line-height:1.8}
.content-shell:has(.project-switch) :is(.badge,.item p,.item small,.item .meta,.helper,.archive-path,.archive-caption,.archive-usage,.archive-toolbar p,.archive-toolbar-description,.library-selection-count,.panel-footer){font-size:12px;line-height:1.6}
.content-shell:has(.project-switch) .archive-file-type{font-size:11px;width:30px}
.content-shell:has(.project-switch) :is(.archive-folder,.archive-file){line-height:1.6}
.content-shell:has(.project-switch) .archive-root{font-size:13px;line-height:1.6}
.content-shell:has(.project-switch) #footer-context{font-size:12px;line-height:1.6}
.content-shell:has(.project-switch) .library-detail>.row{gap:12px;flex-wrap:wrap}
.content-shell:has(.project-switch) .library-detail>.row h2{min-width:0;overflow-wrap:anywhere}
.project-knowledge-manager-filter{display:flex;justify-content:flex-end;padding:4px 0 16px}
.project-knowledge-manager-filter label{display:flex;align-items:center;gap:10px;color:var(--muted)}
.project-knowledge-manager-filter select{height:35px;min-width:164px}
.content-shell #main>.page-body:is(.archive-files-body,.archive-rules-body){padding-top:18px}
.project-archive-subnav{display:flex;align-items:center;gap:16px;min-height:35px;flex:none;margin-bottom:18px}
.project-archive-subnav>.helper{margin:0;color:var(--muted);font-size:12px!important;font-weight:400!important;line-height:1.6!important}
.archive-rules-body:has(.project-archive-subnav){display:flex;flex-direction:column}
.archive-rules-body:has(.project-archive-subnav) .archive-standards{height:auto;flex:1}
.content-shell:has(.project-switch) .toolbar>.archive-header-actions,
.content-shell:has(.project-switch) .toolbar>[data-me-new],
.content-shell:has(.project-switch) .toolbar>[data-rule-add]{margin-left:auto}
.project-switch [data-project-call-return]{color:var(--blue);border-color:#b5c7f3;background:#f4f7ff}
.project-call-controls{display:flex;align-items:center;width:100%;min-width:0;min-height:35px;overflow:visible}
.content-shell:has(.project-switch) .toolbar .project-call-categories{height:35px;border:1px solid #b5c7f3;border-radius:8px;background:#edf3ff;overflow:hidden;gap:0}
.content-shell:has(.project-switch) .toolbar .project-call-categories button{height:33px;width:78px;min-width:78px;padding-inline:0;border:0;border-right:1px solid #b5c7f3;border-radius:0;background:#edf3ff;color:#315fae}
.content-shell:has(.project-switch) .toolbar .project-call-categories button:last-child{border-right:0}
.content-shell:has(.project-switch) .toolbar .project-call-categories button.active{border-color:#aeb7c4;background:#eef1f5;color:var(--ink)}
.project-call-member{display:flex;align-items:center;gap:8px;height:35px;margin-left:auto;padding-left:14px;color:#315fae;white-space:nowrap}
.project-call-member select{width:132px;height:29px;margin:0;border:1px solid #c8d6f3;border-radius:6px;background:#fff;padding:0 28px 0 9px;color:var(--ink)}
#memory-dialog :is(label,textarea,.memory-text){font-size:13px;line-height:1.85}
#memory-dialog .memory-empty h3{font-size:14px}

/* Reflow at the content window's width, including independently resized windows. */
@container (max-width:740px){
 .content-shell:has(.project-switch) .heading-line{flex-wrap:wrap}
 .content-shell:has(.project-switch) .toolbar{height:auto}
 .content-shell:has(.project-switch) .heading-line .inline-description{order:3;flex:1 0 100%;margin:0}
 .content-shell:has(.project-switch) .toolbar .search{order:3;flex:1 0 100%}
 .content-shell:has(.project-switch) .toolbar>button:last-child{margin-left:auto}
 .project-archive-subnav{flex-wrap:wrap;gap:8px}
}
@container (max-width:470px){
 .content-shell:has(.project-switch) .heading-actions{order:2;flex:1 0 100%;margin:0}
 .content-shell:has(.project-switch) .project-switch{flex-wrap:wrap}
 .content-shell:has(.project-switch) .toolbar>select{width:150px}
 .content-shell:has(.project-switch) .toolbar .project-library-categories{overflow-x:auto;max-width:100%;flex-shrink:1}
 .project-call-controls{flex-wrap:wrap;height:auto;padding:0}
 .content-shell:has(.project-switch) .toolbar .project-call-categories{width:100%;overflow-x:auto}
 .project-call-member{width:100%;height:auto;margin:6px 0 0;padding:6px 0 0;border-top:1px solid #c8d6f3;justify-content:flex-end}
}

.project-resource-limit{margin:20px 0;padding:14px 0;border-top:1px solid var(--line)}
.project-resource-limit>.row{align-items:flex-start;gap:16px}
.project-resource-limit>.row>div{min-width:0;flex:1}
.project-resource-limit p{margin:6px 0 0}
.project-resource-limit-empty{padding-bottom:0}

.project-archive-subnav>[data-memory-project]{margin-left:auto}
.content-shell:has(.project-switch) .memory-page :is(.memory-row-preview,.memory-text){font-size:13px;line-height:1.8}
.content-shell:has(.project-switch) .memory-page .memory-row-title{font-size:14px}
.project-preference-section #memory-list .memory-row:last-child{border-bottom:0}
