/* Focus is a mode of the primary workspace; auxiliary state is retained, not deleted. */
body.page-maximized .rs-layout,body.page-maximized .pk-page .pk-layout.rs-layout,body.page-maximized .pd-page .pd-layout.rs-layout,body.page-maximized #workspace.task-collection{grid-template-columns:minmax(0,1fr)!important;min-width:0!important}
body.page-maximized .rs-layout>.side,body.page-maximized .rs-layout>.pd-side,body.page-maximized .rs-layout>.pk-side,body.page-maximized .rs-layout>.rs-handle,body.page-maximized .task-collection>.sidepanel,body.page-maximized .task-collection>.splitter,body.page-maximized .collab-inspector{display:none!important}
body.page-maximized .collab-workspace.has-selection{grid-template-columns:minmax(0,1fr)!important}
body.page-maximized [data-shell=maximize]{background:#eef5ff;color:#1769d2;border-color:#b9d4ff}
/* Fixed-size icon control in both modes; the label is exposed by title / aria-label. */
.global-controls [data-shell=maximize]{width:32px;min-width:32px;height:32px;flex:0 0 32px;padding:4px;gap:0;box-sizing:border-box}
.global-controls [data-shell=maximize] .ds-icon{flex:none;margin:0}
.aux-origin-highlight{outline:1px solid #b6d6ff;outline-offset:4px;border-radius:4px}.aux-aligned-content{transition:none}.aux-locate-origin{margin-bottom:8px!important;font-size:12px!important}
.side-overview{container-type:inline-size}.overview-counts{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;margin-bottom:32px!important}
.overview-counts>.overview-type{display:block;width:100%;min-width:0;padding:0 8px;border:0;border-radius:4px;background:transparent;text-align:left;font-size:13px;color:#35445a}
.overview-counts>.overview-type:hover{background:#f0f5fb}.overview-type-head{display:flex;align-items:center;justify-content:space-between;gap:8px;white-space:nowrap;line-height:24px}.overview-type-head strong{font-size:16px;font-weight:600}.overview-type-head strong span{font-weight:400;color:#8996a5;margin-left:8px}.overview-type-states{display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:4px;color:#737d8c;font-size:12px;line-height:20px}.overview-type-states>span{white-space:nowrap}
@container(min-width:560px){.overview-counts{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

.panel-module-switch:disabled{opacity:1;color:inherit;cursor:default;background:transparent}

/* Collaboration reading follows the same peer-panel frame as document editing. */
.collab-workspace.rs-layout>.collab-inspector{border:0;border-left:1px solid #e8edf3;border-radius:0;background:#fff;align-self:start}
.collab-workspace.rs-layout .inspector-head>strong{display:none}
.collab-workspace.rs-layout .inspector-head{justify-content:flex-start;margin:0 0 16px}
.collab-workspace.rs-layout .collab-primary{padding:0;min-width:0}
.collab-workspace.rs-layout .expansion-bar{padding:8px 16px;margin:0;min-width:0;flex-wrap:wrap}
.inspector-empty{padding:16px 0;color:#66758b;line-height:1.7}.inspector-empty h3{font-size:14px;color:#35445a}
.context-product-selected{outline:1px solid #91caff;outline-offset:-1px;background:#f4f8ff!important}
.product-preview-action{padding:4px 8px;white-space:nowrap}
.context-selection>h4{font-size:14px;line-height:22px;overflow-wrap:anywhere}
@media(max-width:899px){.collab-workspace.rs-layout{grid-template-columns:minmax(0,1fr) 12px var(--rs-width,326px)!important}.collab-workspace.rs-layout>.side{display:block!important}}

/* Context replacements are not scroll anchors; primary rows retain their position. */
.context-selection,.document-aux-view{overflow-anchor:none}

/* This application manages contextual alignment explicitly. Browser anchoring
   must not apply a second, competing document-scroll correction. */
html:has(body.task-frame-active){overflow-anchor:none}
.context-selection,.context-object{display:flow-root}
.task-panel-head ~ .context-selection > h3,
.task-panel-head ~ .document-aux-view > h3{display:none}

/* Bounded contextual selection: no layout shift, no implicit hover selection. */
.page-title .context-zone,#products .context-zone{font:inherit;color:inherit;background:transparent;border:0;border-radius:4px;padding:0;min-height:0;height:auto;cursor:pointer;text-align:left;box-shadow:none}
.page-title .context-zone:hover,#products .context-zone:hover{background:#e6f4ff}
.page-title .context-zone:focus-visible,#products .context-zone:focus-visible{outline:2px solid #1890ff;outline-offset:4px}
.page-title .context-zone.context-zone-selected,#products .context-zone.context-zone-selected{box-shadow:0 2px 0 #1890ff}
.context-rule-list{margin:16px 0}.context-rule-list dt{font-weight:600;margin-top:16px}.context-rule-list dd{margin:4px 0 0}.context-rule-list dd p{margin:4px 0 0;color:#657080}.context-selection [hidden]{display:none!important}

/* Region selection has no button-sized border or padding; controls remain independent. */
.context-region{position:relative;outline-offset:-2px}
.context-region:hover{box-shadow:inset 3px 0 #c5e2fb}
.context-region:focus-visible{outline:2px solid #1890ff}
.context-region.context-zone-selected{outline:1px solid #91caff;outline-offset:-1px;box-shadow:none;background-color:#f4f8ff!important}
.context-region.context-zone-selected button{cursor:pointer}
.item-view-more{flex:none}
.item-context-menu{position:fixed;z-index:10000;width:240px;padding:8px;background:#fff;border:1px solid #e3e7ed;border-radius:6px;box-shadow:0 8px 32px #15253b24;font-size:14px}
.item-context-menu p{margin:4px 8px 8px;color:#657080;font-size:12px}
.item-context-menu button{width:100%;display:flex;align-items:center;gap:8px;text-align:left;background:transparent;border:0;padding:8px;border-radius:4px;min-height:32px}
.item-context-menu button:hover,.item-context-menu button:focus-visible{background:#e6f4ff;outline:0}
.context-mode-check{width:16px;color:#1890ff;flex:none}

/* View switch + preference menu form one right-aligned toolbar unit. */
.item-toolbar .item-display-tools{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto;white-space:nowrap}
.item-toolbar .item-display-tools .item-view-switch{display:flex;margin:0;gap:4px;flex:none}
.item-toolbar .item-display-tools .item-view-more{margin:0;width:32px;height:32px;padding:4px;flex:none}

.product-action-dropdown{position:fixed;z-index:10001;min-width:192px;padding:4px;background:white;border:1px solid #e3e7ed;border-radius:6px;box-shadow:0 8px 32px #15253b24;overflow-y:auto}
.product-action-dropdown button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:4px;padding:8px 16px;font-size:14px;line-height:22px;white-space:nowrap}
.product-action-dropdown button:hover:not(:disabled),.product-action-dropdown button:focus-visible{background:#e6f4ff;outline:none}
.product-action-dropdown button:disabled{cursor:not-allowed;color:#98a1ad}.product-action-dropdown .danger{color:#c33434}

/* List display controls form one unit after search/filter/sort. */
.collection-display-tools{display:flex;align-items:center;gap:8px;flex:none}
.collection-display-more summary{list-style:none;display:grid;place-items:center;width:32px;height:32px;padding:4px;border:1px solid #dfe3e8;border-radius:6px;cursor:pointer;background:#fff}
.collection-display-more summary::-webkit-details-marker{display:none}
.collection-display-menu{position:fixed;z-index:10002;min-width:208px;padding:4px;border:1px solid #e3e7ed;border-radius:6px;background:#fff;box-shadow:0 8px 32px #15253b24}
.collection-display-menu button{display:block;min-height:32px;width:100%;margin:0;padding:4px 16px;line-height:22px;border:0;text-align:left;background:transparent}
.collection-display-menu button:hover,.collection-display-menu button:focus-visible{background:#e6f4ff}
/* Action cell reserves room for preview + menu, avoiding inherited double insets. */
#products.item-view-list .product-table th:last-child,#products.item-view-list .product-table td:last-child{width:128px;min-width:128px;padding:8px 16px;text-align:right}
#products .product-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap}
#products .product-row-actions>.icon{width:32px;height:32px;min-width:32px;padding:4px;margin:0;display:grid;place-items:center;flex:none}
#products .product-row-actions>.product-preview-action{margin:0;padding:4px 8px;min-height:32px}
#products.item-view-cards .product-table td:last-child{width:auto;min-width:0;padding:0;margin:0;align-self:start}
.product-action-dropdown{max-width:calc(100vw - 16px);box-sizing:border-box}
.product-action-dropdown button{margin:0;min-height:32px;padding:4px 16px;line-height:22px;box-sizing:border-box}
@media(max-width:700px){#products.item-view-list .product-table td:last-child{position:static;width:auto;min-width:0;grid-column:1/-1;padding:0}#products.item-view-list .product-table .product-row-actions{justify-content:flex-end}}
