/* Shared operating surfaces: content count must never determine the page width. */
html:has(body.workspace-mode){scrollbar-gutter:stable}
.workspace-mode{--page-title-size:28px;--section-title-size:22px;--workspace-copy-size:14px;--workspace-caption-size:12px}
.workspace-mode #app-main{min-width:0}
.workspace-mode .topbar{height:60px;min-height:60px;flex-shrink:0;box-sizing:border-box}
.workspace-mode .sidebar-note>.flow,.workspace-mode[data-app-view=workbench] .sidebar-note>.flow{font-size:12px}
.workspace-mode .brief-panel .form-section{overflow:auto;min-height:0}
.workspace-mode #templates-view,.workspace-mode #history-view,.workspace-mode #devices-view,
.workspace-mode[data-app-view=workbench][data-workbench=editor] #workbench-view,
.workspace-mode[data-workbench=results] #workbench-view{width:100%;max-width:none;min-width:0;margin:0;align-self:stretch;padding:24px 32px;box-sizing:border-box}
.workspace-mode .page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:68px;margin:0 0 20px}
.workspace-mode .page-heading>div:first-child{min-width:0}
.workspace-mode .page-heading h1{font-family:var(--display);font-size:var(--page-title-size);font-weight:600;line-height:1.45;letter-spacing:0;margin:0}
.workspace-mode .page-heading p,.workspace-mode .page-heading .intro-copy{font-size:var(--workspace-copy-size);line-height:1.65;margin:4px 0 0;max-width:none}
.workspace-mode .page-heading .button,.workspace-mode .workbench-tools .button{font-size:var(--workspace-copy-size);min-height:40px;padding:9px 14px;white-space:nowrap}
.workspace-mode .nav-item,.workspace-mode[data-app-view=workbench] .nav-item{font-size:14px}
.workspace-mode .workspace-label,.workspace-mode[data-app-view=workbench] .workspace-label,.workspace-mode .sidebar-note .small-title{font-size:12px}
.workspace-mode .brief-panel label,.workspace-mode .brief-panel .section-head h3,.workspace-mode .template-content p,
.workspace-mode .enterprise-product-copy p,.workspace-mode .history-search,.workspace-mode .project-row p{font-size:var(--workspace-copy-size)}
.workspace-mode .brief-panel .panel-heading h2,.workspace-mode .template-content h2,.workspace-mode .enterprise-product-copy h3,.workspace-mode .empty h2{font-size:var(--section-title-size);line-height:1.5}
.workspace-mode .template-actions .button,.workspace-mode .template-actions .text-button,.workspace-mode .enterprise-product-copy .text-button{font-size:var(--workspace-copy-size);min-height:40px}
.workspace-mode .template-list,.workspace-mode .enterprise-products{width:100%;min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.workspace-mode #template-list[hidden],.workspace-mode #enterprise-library[hidden]{display:none}
.workspace-mode .template-stage,.workspace-mode .enterprise-product-photo{height:280px;aspect-ratio:auto}
.workspace-mode .template-content,.workspace-mode .enterprise-product-copy{padding:20px 22px}
.workspace-mode .enterprise-product{background:var(--paper);border-radius:12px;overflow:hidden}
.workspace-mode .template-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:44px;margin:0 0 20px}
.workspace-mode .filter-group{display:flex;gap:8px;flex-wrap:wrap}
.workspace-mode .filter-group button{font:inherit;font-size:14px;line-height:1.4;min-height:40px;min-width:64px;padding:9px 14px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink)}
.workspace-mode .filter-group button.active{background:var(--green);border-color:var(--green);color:var(--paper)}
.workspace-mode .filter-group button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.workspace-mode .template-search{width:280px;max-width:100%;flex-shrink:0}
.workspace-mode .template-search input{font-size:14px;min-height:40px;width:100%}
.workspace-mode .library-sources{min-height:54px;margin:0 0 20px;padding-bottom:12px}
.workspace-mode .library-sources button{font-size:14px;min-height:40px;min-width:132px;padding:9px 16px}
.workspace-mode .catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:40px;margin:0 0 20px}
.workspace-mode .catalog-heading p{font-size:14px}.workspace-mode .catalog-heading>span{font-size:12px}
.workspace-mode .enterprise-device h3{font-size:var(--section-title-size)}
.workspace-mode #devices-content{min-width:0}.workspace-mode .enterprise-device-list{width:100%;gap:32px}
@media(min-width:851px) and (max-height:780px){.workspace-mode .workspace-label{margin-top:22px}.workspace-mode .sidebar-note{margin:22px 8px 12px;padding-top:16px}.workspace-mode .sidebar-note>.flow{gap:12px;margin:14px 0 10px}.workspace-mode .sidebar nav{margin-top:15px}}
@media(max-height:900px){
 .workspace-mode .brief-panel .form-section{padding-top:8px;padding-bottom:6px}
 .workspace-mode .brief-panel .section-head{margin-bottom:6px}
 .workspace-mode .brief-panel label{margin-bottom:6px}
 .workspace-mode .brief-panel input:not([type=checkbox]):not([type=file]),.workspace-mode .brief-panel select{margin-top:4px}
}
@media(min-width:851px) and (max-height:780px){.workspace-mode .brief-panel input:not([type=checkbox]):not([type=file]),.workspace-mode .brief-panel select{height:36px;min-height:36px;padding:6px 11px}}
@media(max-width:1050px){.workspace-mode .template-list,.workspace-mode .enterprise-products{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){
 .workspace-mode{--page-title-size:26px}
 .workspace-mode #templates-view,.workspace-mode #history-view,.workspace-mode #devices-view,
 .workspace-mode[data-app-view=workbench][data-workbench=editor] #workbench-view,
 .workspace-mode[data-workbench=results] #workbench-view{padding:18px 22px}
 .workspace-mode .sidebar nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .workspace-mode .nav-item,.workspace-mode[data-app-view=workbench] .nav-item{font-size:12px;min-width:0;gap:6px;padding:10px 8px}
 .workspace-mode .template-toolbar{flex-wrap:wrap;gap:12px}
 .workspace-mode .template-search{width:100%}
}
@media(max-width:620px){
 .workspace-mode .topbar{height:52px;min-height:52px}
 .workspace-mode{--page-title-size:24px;--section-title-size:21px}
 .workspace-mode #templates-view,.workspace-mode #history-view,.workspace-mode #devices-view,
 .workspace-mode[data-app-view=workbench][data-workbench=editor] #workbench-view,
 .workspace-mode[data-workbench=results] #workbench-view{padding:16px}
 .workspace-mode .page-heading{flex-wrap:wrap;gap:12px;min-height:0;margin-bottom:20px}
 .workspace-mode .page-heading>div:first-child{flex:1 1 100%}
 .workspace-mode .page-heading p{display:block;font-size:14px}
 .workspace-mode .workbench-tools{display:flex;justify-content:flex-start;gap:8px;flex-wrap:wrap}
 .workspace-mode .workbench-tools .button{font-size:13px;min-height:38px;padding:8px 12px}
 .workspace-mode .nav-item,.workspace-mode[data-app-view=workbench] .nav-item{font-size:12px;padding:10px 5px;gap:4px}
 .workspace-mode .nav-item .icon{display:none}.workspace-mode .nav-item b{font-size:11px;margin-left:2px}
 .workspace-mode .template-list,.workspace-mode .enterprise-products{grid-template-columns:minmax(0,1fr)}
 .workspace-mode .template-search input{font-size:16px}
 .workspace-mode .catalog-heading{flex-wrap:wrap;gap:6px;min-height:55px}
 .workspace-mode .template-content,.workspace-mode .enterprise-product-copy{padding:20px}
}
