/* A fixed workbench; only bounded content panes scroll. */
html.workbench,html.workbench body{height:100%;overflow:hidden;overscroll-behavior:none}
body>input.visually-hidden{position:fixed!important;left:0!important;top:0!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:0!important;clip-path:inset(50%);overflow:hidden;pointer-events:none}
html.workbench #app{height:var(--client-visible-height,100dvh)!important;min-height:0;overflow:hidden}
html.workbench .client-shell:not(.login-shell){height:100%!important;max-height:100%!important;overflow:hidden}
html.workbench .client-stage{overflow:hidden!important;padding:6px 10px max(8px,env(safe-area-inset-bottom))!important;min-height:0;min-width:0}
html.workbench .client-stage>.bw-workspace{height:100%!important;min-height:0!important;display:flex;flex-direction:column;overflow:hidden;gap:6px}
.bw-workspace>.bw-title{flex-shrink:0;margin:0;min-height:44px}.bw-title h1{margin:0;font-size:18px}
.bw-workspace>.bw-toolbar,.bw-workspace>.bw-pager{flex-shrink:0;margin:0;padding:4px;max-height:none!important}
.bw-workspace>.bw-split,.bw-workspace>.bw-table-wrap{flex:1;min-height:0;overflow:hidden}
.bw-workspace>.bw-table-wrap{overflow:auto}
.bw-split>.bw-list,.bw-split>.bw-detail{min-height:0;overflow:auto;overscroll-behavior:contain}
.client-stage .bw-workspace>.bw-error{flex-shrink:0;max-height:70px;overflow:auto}
#hs-connection{padding:2px 4px!important;left:5px!important;bottom:max(4px,env(safe-area-inset-bottom))!important;font-size:12px!important}
#hs-connection:has(button:nth-of-type(2)){max-width:min(600px,90vw);background:#fff6dc!important}
.hs-touch-menu{position:fixed;z-index:12000;display:grid;max-width:calc(100vw - 16px);max-height:calc(var(--client-visible-height,100dvh) - 16px);overflow:auto;padding:5px;min-width:170px;background:#fff;border:1px solid #cbd6e5;border-radius:7px;box-shadow:0 8px 28px #17203333}
.hs-touch-menu button{min-height:44px;text-align:left;border:0;background:white;color:#233b5d;font-size:15px;padding:8px 12px;border-radius:4px}.hs-touch-menu button:focus,.hs-touch-menu button:hover{background:#edf4ff}
[data-hs-hold]{-webkit-touch-callout:none;user-select:none}.bw-row,.style-group,[data-style-ref]{-webkit-touch-callout:none}
html.workbench .amz-screen .amz-grid{grid-template-columns:repeat(var(--amz-cols,4),minmax(0,1fr))!important;grid-template-rows:repeat(var(--amz-rows,3),minmax(0,1fr))!important}
.amz-dropdown-body input[type=range]{width:100%;min-height:44px}
.style-modal .style-dialog{height:94%;max-height:94%!important}
.style-modal .style-content{display:flex;flex-direction:column;gap:6px;flex:1;overflow:hidden!important;padding:8px;min-height:0}
.style-content>.bw-toolbar{flex-shrink:0;padding:0;margin:0;gap:6px;flex-wrap:nowrap}.style-content>.bw-toolbar input{min-width:50px;flex:1}
.style-help{font-size:12px;flex-shrink:0}.style-help>summary{min-height:26px!important}.style-help p{margin:3px}
.style-content>.style-split{display:grid!important;grid-template-columns:minmax(160px,25%) minmax(0,1fr)!important;flex:1;min-height:0;overflow:hidden;gap:8px}
html .style-split>.style-groups{overflow:auto!important;min-height:0;max-height:none!important;overscroll-behavior:contain}
.style-split>.style-members{display:flex;flex-direction:column;overflow:hidden;min-height:0}
.style-members>.bw-table-wrap{flex:1;min-height:0;overflow:auto!important;overscroll-behavior:contain}
.style-members>.bw-toolbar{flex-shrink:0;min-height:30px;padding:0;margin:0;gap:5px}.style-members>.bw-toolbar h3{font-size:14px}.style-members>.bw-toolbar small{font-size:11px}
.style-members .bw-table{display:table!important;min-width:760px!important;width:100%;border-collapse:collapse}
.style-members thead{display:table-header-group!important}.style-members tbody{display:table-row-group!important}
.style-members tr{display:table-row!important;padding:0!important;margin:0!important;border:0!important}
.style-members td,.style-members th{display:table-cell!important;padding:5px 7px!important;vertical-align:middle;line-height:1.35;font-size:12px}
.style-members th{height:auto!important;min-height:0!important;white-space:normal;position:sticky;top:0;background:#f0f4fa;z-index:1}
.style-members td:before{display:none!important}.style-members td img{width:65px;height:65px}
.style-members>.bw-pager{flex-shrink:0;margin:0}.style-group{padding:5px!important}.style-group img{width:44px;height:44px}
.style-editor{flex-shrink:0;max-height:35%;overflow:auto}.style-content>.bw-error{margin:0;max-height:50px;overflow:auto}
.analysis-toolbar{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:6px!important;align-items:center}
.analysis-toolbar .bw-field{min-width:100px;flex:1;gap:2px}.analysis-toolbar .bw-field span{font-size:11px}.analysis-toolbar input,.analysis-toolbar select{width:100%;min-width:100px}
.analysis-toolbar>button{flex:0 0 auto;min-width:56px;white-space:nowrap}
.analysis-quick-dates{margin:0!important;gap:5px}.bw-workspace:has(.analysis-table)>p{font-size:12px;margin:0}
.quote-toolbar{margin:0;gap:6px;flex-shrink:0;min-height:36px}.quote-snapshot{font-size:11px!important}
.quote-price-filters{margin:0;gap:6px;flex-shrink:0;flex-wrap:nowrap}.quote-price-filters input[name=q]{min-width:100px}.quote-price-filters select{max-width:180px}
.quote-price-scroll{height:auto!important;min-height:0!important;flex:1;overflow:auto}.quote-price-scroll td,.quote-price-scroll th{padding:7px 8px}
.quote-note,.quote-status{font-size:12px;margin:0}.quote-worksheet{flex:1;min-height:0;overflow:hidden;gap:6px;grid-template-columns:minmax(140px,.9fr) minmax(190px,1fr) minmax(300px,1.6fr)!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr) auto}
.quote-worksheet>.quote-materials{min-height:0;max-height:none;grid-column:1;overflow:auto}.quote-worksheet>.quote-materials:first-child{grid-row:1}.quote-worksheet>.quote-materials:not(:first-child){grid-row:2}
.quote-worksheet>.quote-fields{grid-column:2;min-height:0;overflow:auto;align-self:stretch;gap:4px}.quote-worksheet>.quote-fields:nth-child(2){grid-row:1}.quote-worksheet>.quote-fields:nth-child(6){grid-row:2}
.quote-worksheet>.quote-comparison{grid-column:3;grid-row:1/3;min-height:0;overflow:auto;gap:6px;align-items:start}
.quote-worksheet>.quote-divider,.quote-worksheet>.quote-footnote{display:none}
.quote-worksheet>.quote-rules{grid-column:1;grid-row:3;margin:0!important;font-size:12px;display:block;align-self:end}
.quote-worksheet>.quote-status{grid-column:2/4;grid-row:3;align-self:center}
.quote-worksheet .quote-preview{aspect-ratio:1.2;min-height:90px;max-height:140px}.quote-option p{min-height:0;font-size:11px;margin:3px 0}
.quote-worksheet .quote-field{grid-template-columns:65px minmax(50px,1fr) 28px;font-size:12px;gap:3px}
.quote-worksheet .quote-option .quote-field{grid-template-columns:55px minmax(48px,1fr) 24px}.quote-materials td,.quote-materials th{padding:7px 5px;font-size:12px}
.quote-foam{flex:1;display:flex;flex-direction:column;min-height:0;gap:6px}.quote-foam>.quote-materials{flex:1;height:auto;max-height:none;min-height:0}.quote-foam-fields{margin:0}.quote-foam-result{margin:0;min-height:0;padding:8px}
.ai-register-dialog{width:min(1060px,98vw)!important;height:94%;max-height:100%!important}.ai-register-dialog>.bw-dialog-body{display:flex;flex-direction:column;overflow:hidden;gap:6px;flex:1}
.ai-register-dialog .bw-form{display:none}.ai-register-toolbar{display:flex;align-items:center;gap:6px;flex-shrink:0;overflow-x:auto;white-space:nowrap}.ai-register-toolbar input[type=number]{width:65px;min-width:65px}.ai-register-toolbar select{min-width:85px}
.ai-register-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--ai-thumb,220px),1fr));gap:8px;overflow:auto;min-height:0;flex:1;align-content:start;padding:3px}
.ai-split-card{border:1px solid #cbd6e5;border-radius:5px;padding:6px;min-width:0}.ai-split-card.selected{border-color:#3278cf;background:#edf5ff}
.ai-split-preview{height:160px;position:relative;display:flex;align-items:center;justify-content:center;background:white;overflow:hidden}.ai-split-preview img{max-width:100%;max-height:100%;object-fit:contain}.ai-split-preview canvas{max-width:100%;max-height:100%;object-fit:contain}
.ai-split-card>header{display:flex;align-items:center;gap:5px;font-size:12px}.ai-split-card>header span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.ai-split-card>div:last-child{display:flex;align-items:center;justify-content:center;gap:5px}.ai-split-card input[type=number]{width:55px;min-width:0}.ai-register-status{font-size:12px;margin:0;flex-shrink:0;white-space:pre-wrap}
@media(max-width:900px){.quote-worksheet{grid-template-columns:minmax(130px,.8fr) minmax(180px,1fr) minmax(220px,1.25fr)!important}.quote-worksheet>.quote-comparison{grid-template-columns:1fr}.quote-worksheet .quote-preview{height:100px}.quote-price-filters{flex-wrap:wrap}.style-content>.bw-toolbar button{font-size:12px;padding:4px}.ai-register-grid{--ai-thumb:180px}}
@media(max-width:600px){.quote-worksheet{grid-template-columns:minmax(110px,.8fr) minmax(160px,1fr)!important;overflow:auto}.quote-worksheet>.quote-comparison{grid-column:1/-1;grid-row:3;grid-template-columns:1fr 1fr;overflow:visible}.quote-worksheet>.quote-rules{grid-row:4}.quote-worksheet>.quote-status{grid-column:2;grid-row:4}.quote-worksheet>.quote-materials,.quote-worksheet>.quote-fields{min-height:260px}}
/* Short keyboard view keeps every field reachable without scrolling the page. */
.client-keyboard .quote-worksheet{overflow:auto;grid-template-rows:minmax(270px,1fr) minmax(230px,1fr) auto}.client-keyboard .quote-worksheet>.quote-comparison{overflow:visible}

.workbench .bw-split.customer-screen:after{display:none!important;content:none!important}

.style-members th{white-space:nowrap!important;height:30px!important;box-sizing:border-box}.style-members .bw-table{min-width:1030px!important}.style-members td:last-child{min-width:120px;white-space:nowrap!important}.style-members th:last-child{min-width:120px}

.style-rank-records{max-height:140px;overflow:auto;overscroll-behavior:contain}.style-rank-records p{margin:5px 0}.style-members td details summary{min-height:32px}

/* V1.6.70 page audit: fixed frame, bounded content and compact native controls. */
.workbench-content-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.workbench .bw-workspace[data-workspace=messages]>.bw-summary{flex-shrink:0;gap:6px;margin:0}
.workbench [data-workspace=messages]>.bw-summary article{padding:6px;min-width:0}
.workbench [data-workspace=messages]>.bw-summary strong{font-size:21px}
.workbench [data-workspace=messages] .bw-record{padding:8px;margin-bottom:6px}
.workbench [data-workspace=peerIntel]>.bw-split,.workbench [data-workspace=photo]>.bw-split,.workbench [data-workspace=enterpriseIntel]>.bw-split{grid-template-columns:minmax(190px,25%) minmax(0,1fr);gap:8px}
.workbench [data-workspace=peerIntel] .bw-detail,.workbench [data-workspace=photo] .bw-detail,.workbench [data-workspace=enterpriseIntel] .bw-detail{padding:10px}
.workbench .bw-list [data-client-row]{padding:7px;margin-bottom:5px}
.workbench .bw-list [data-client-row]>div{min-width:0}
.workbench .bw-list [data-client-row] strong{overflow-wrap:anywhere;line-height:1.4}
.workbench .bw-list [data-client-row]:not(.client-company-node) [data-bw=detail]{display:none}
.workbench [data-workspace=peerIntel] .bw-detail>.bw-actions{display:flex;margin:4px 0;gap:6px}
.workbench [data-workspace=peerIntel] .bw-tabs{display:flex;flex-wrap:nowrap;overflow:auto;gap:5px;margin:6px 0}
.workbench [data-workspace=peerIntel] .bw-tabs button{white-space:nowrap;flex-shrink:0}
.workbench .peer-filter-bar{display:flex;flex-wrap:wrap;gap:5px;padding:6px;margin:5px 0}
.workbench .peer-filter-bar .bw-field{flex:1 1 135px;min-width:0;gap:2px;font-size:12px}
.workbench .peer-filter-bar .bw-field:first-child{flex-basis:150px}
.workbench .peer-filter-bar .bw-field input,.workbench .peer-filter-bar .bw-field select{width:100%;min-width:0}
.workbench .bw-detail>h2{font-size:17px;margin:0 0 8px;overflow-wrap:anywhere}
.workbench [data-workspace=photo] .bw-detail>.bw-kv>div,.workbench [data-workspace=enterpriseIntel] .bw-detail>.bw-kv>div{padding:5px 0}
.workbench [data-workspace=photo] .bw-detail>img{float:right;width:150px;height:140px;object-fit:contain;margin:0 0 8px 10px}
.workbench [data-workspace=photo] .bw-detail>.bw-actions{margin:4px 0}
.workbench [data-workspace=photo] .bw-detail>.bw-kv{clear:both}
.workbench [data-workspace=statistics]>.stats-middle{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:6px;overflow:hidden}
.workbench .stats-middle>.stats-panel{display:flex;flex-direction:column;min-height:0;margin:0;padding:8px;overflow:hidden}
.workbench .stats-middle>.stats-customer-detail{overflow:auto;display:block}
.workbench .stats-middle .stats-customer-table{flex:1;height:auto;min-height:0;overflow:auto}
.workbench [data-workspace=statistics]>.stats-panel{flex:0 1 180px;min-height:100px;margin:0;padding:8px;display:flex;flex-direction:column;overflow:hidden}
.workbench .stats-employee-table{flex:1;min-height:0;overflow:auto}
.workbench [data-workspace=usage]>.stats-panel{display:flex;flex-direction:column;flex:1;min-height:0;margin:0;padding:8px;overflow:hidden}
.workbench [data-workspace=usage] .usage-detail-table{flex:1;min-height:0;max-height:none;overflow:auto}
.workbench .stats-kpis{flex-shrink:0;gap:5px;margin:0}.workbench .stats-kpis>article{padding:6px}.workbench .stats-kpis strong{font-size:22px}
.workbench .stats-subtitle,.workbench .stats-note{font-size:12px;margin:0;padding:4px;flex-shrink:0}
.workbench .stats-panel h2{font-size:14px;margin:0 0 5px;flex-shrink:0}
.workbench .stats-panel>p{margin:3px;font-size:12px;flex-shrink:0}
.workbench .stats-panel .bw-table{min-width:650px}.workbench .stats-panel .bw-table th{white-space:nowrap;height:auto;line-height:1.3;padding:6px}
.workbench .bw-table-wrap{overscroll-behavior:contain}
@media(max-width:900px){
 .workbench [data-workspace=statistics]>.stats-middle{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .workbench .stats-detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .workbench .screen-toolbar .bw-field{flex-basis:120px}
}
/* A short viewport is the keyboard case; preserve reachability inside the workspace. */
@media(max-height:600px){
 .workbench [data-workspace=statistics],.workbench [data-workspace=usage]{overflow:auto!important}
 .workbench [data-workspace=statistics]>.stats-middle{flex:none;min-height:300px}
 .workbench [data-workspace=usage]>.stats-panel{flex:none;min-height:300px}
}
