/* Workspace chrome follows the 1440px / 390px app container, not the demo viewport. */
:root .workspace-header{display:flex;align-items:center;gap:18px;justify-content:flex-start;position:sticky;top:0;z-index:40;min-height:70px;padding:11px 24px;background:#fff;border-bottom:1px solid #e1e5ea;flex-wrap:nowrap}
:root .workspace-header[hidden]{display:none}
.workspace-header button{font-family:Archivo,Arial,sans-serif}
:root .workspace-header .workspace-brand{display:flex;align-items:center;flex:none;min-height:44px;padding:0;background:none;border-radius:8px}
.workspace-brand>span{display:block;position:relative;width:108px;height:32px;overflow:hidden}
.workspace-brand img{position:absolute;max-width:none;width:119px;height:40px;left:-7px;top:-7px;object-fit:contain}
.workspace-header-divider{width:1px;height:30px;flex:none;background:#e9edf1}
.workspace-context{display:flex;align-items:center;gap:10px;min-width:0;max-width:440px;margin-right:auto;text-align:left}
:root .workspace-header button.workspace-context{padding:8px 12px;min-height:46px;background:none;border-radius:9px;white-space:normal}
.workspace-estate-mark{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:9px;background:var(--workspace-accent);font-size:10px;font-weight:750;color:#1a1d24;letter-spacing:.02em}
.workspace-estate-mark svg{width:16px;height:16px}
.workspace-context-label{display:flex;flex:1;flex-direction:column;min-width:0;gap:3px}
.workspace-context-label strong{font-size:14px;font-weight:650;color:#1a1d24;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25}
.workspace-context-label small{font-size:10px;line-height:1.2;color:#8a939f;font-weight:450}
.workspace-context>svg{width:15px;height:15px;color:#87919c;flex:none;margin-left:6px}
.workspace-header-actions{display:flex;align-items:center;gap:7px;flex:none;margin-left:auto}
:root .workspace-header .workspace-nav-button{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:550;min-height:42px;padding:10px 12px;background:transparent;color:#65717e;border-radius:10px}
.workspace-nav-button svg{width:16px;height:16px;flex:none}
:root .workspace-header .workspace-nav-button.selected{background:#f1f4f6;color:#283542}
:root .workspace-header button:hover{background:#f5f7f9}
.workspace-profile{position:relative;margin-left:8px}
.workspace-profile>summary{list-style:none;display:flex;align-items:center;gap:9px;min-height:44px;padding:3px 0;cursor:pointer}
.workspace-profile>summary::-webkit-details-marker{display:none}
.workspace-profile>summary::marker{content:''}
.workspace-profile>summary>svg{width:13px;height:13px;color:#8a949e}
.workspace-profile-avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#eef2f5;color:#4e5c6a;font-size:11px;font-weight:650;flex:none}
.workspace-profile-name{font-size:12px;font-weight:550;color:#4b5865;max-width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.workspace-profile-menu{position:absolute;right:0;top:calc(100% + 12px);width:250px;border:1px solid #e1e7ec;border-radius:14px;padding:7px;background:white;box-shadow:0 12px 38px #1524321c}
.workspace-profile-info{padding:10px 10px 14px;margin-bottom:5px;border-bottom:1px solid #edf0f3;display:flex;flex-direction:column;gap:4px}
.workspace-profile-info strong{font-size:13px;font-weight:650}.workspace-profile-info span{font-size:12px;color:#72808b}.workspace-profile-info small{font-size:10px;color:#939ca5}
:root .workspace-header .workspace-profile-menu>button{display:block;text-align:left;width:100%;padding:10px;font-size:12px;min-height:40px;background:transparent;color:#51616e}
.workspace-preview-controls{border-top:1px solid #edf0f3;padding:12px 10px 7px;margin-top:6px}
.workspace-preview-controls>small{display:block;font-size:10px;color:#9aa2ab;margin-bottom:9px}
.workspace-preview-controls>div{display:grid;grid-template-columns:1fr 1fr;gap:6px}
:root .workspace-header .workspace-preview-controls button{font-size:11px;padding:8px 5px;min-height:36px;background:#f4f6f8;color:#7a8590;border-radius:7px}
:root .workspace-header .workspace-preview-controls button[aria-pressed=true]{background:#1a1d24;color:white}
.workspace-profile summary:focus-visible{outline:2px solid #65717e;outline-offset:4px;border-radius:8px}
:root .appheader{display:none}
.workspace-access-summary>strong{font-size:16px;display:block}.workspace-access-summary>p{font-size:12px;color:#7e8995;margin:5px 0 20px}
.workspace-switch-search{position:relative;display:block;margin:18px 0 12px}
.workspace-switch-search>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);pointer-events:none;width:17px;height:17px;color:#909aa5}
.workspace-switch-search .routing-search{margin:0;padding-left:40px;min-height:46px;width:100%;font-size:14px}
#switchResults{display:grid;gap:5px}
.workspace-switch-item{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px;border:1px solid transparent;border-radius:11px;background:white;width:100%;text-align:left}
.workspace-switch-item:hover{background:#f5f7f9}.workspace-switch-item.current{background:#f7f9fa;border-color:#e5eaee}
.workspace-switch-code,.workspace-switch-icon{width:34px;height:34px;display:grid;place-items:center;flex:none;border-radius:9px;font-size:10px;font-weight:700;color:#1a1d24}
.workspace-switch-icon{background:#eef3f6}.workspace-switch-icon svg{width:16px;height:16px}
.workspace-switch-item>span:nth-child(2){flex:1;min-width:0}.workspace-switch-item b{display:block;font-size:13px;font-weight:600;line-height:1.4}.workspace-switch-item small{display:block;font-size:11px;color:#919aa4;margin-top:3px}
.workspace-switch-item em{font-size:10px;font-style:normal;color:#8c969e;flex:none}
.workspace-switch-empty{font-size:12px;color:#8c969e;padding:24px 12px;text-align:center}
@container app (max-width:1050px){:root .workspace-header{padding:10px 18px;gap:14px}.workspace-profile-name{display:none}.workspace-context{max-width:360px}}
@container app (max-width:760px){
 :root .workspace-header{min-height:66px;padding:9px 14px;gap:10px}
 .workspace-brand>span{width:75px;height:24px}.workspace-brand img{width:83px;height:28px;left:-5px;top:-5px}
 .workspace-header-divider{display:none}
 .workspace-estate-mark{display:none}
 .workspace-context{max-width:none;flex:1;gap:5px}
 :root .workspace-header button.workspace-context{padding:8px 10px;gap:7px}
 .workspace-context-label strong{font-size:12px;line-height:1.3}.workspace-context-label small{font-size:9px}
 .workspace-context>svg{margin-left:1px;width:13px;height:13px}
 .workspace-header-actions{gap:1px;margin-left:0}
 :root .workspace-header .workspace-nav-button{padding:9px;min-width:36px;min-height:40px}
 .workspace-nav-button>span{display:none}.workspace-nav-button svg{width:16px;height:16px}
 .workspace-profile{margin-left:2px}.workspace-profile>summary{gap:0}.workspace-profile>summary>svg{display:none}.workspace-profile-avatar{width:30px;height:30px;font-size:10px}
 .workspace-profile-menu{right:-2px;max-width:calc(100vw - 28px)}
 .workspace-switch-search .routing-search{font-size:16px}
}

/* Mobile workspace identity gets its own row, preserving full estate names. */
@container app (max-width:760px){
 :root .workspace-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:7px 14px}
 .workspace-header .workspace-brand{grid-column:1;grid-row:1}
 .workspace-header-actions{grid-column:2;grid-row:1;gap:4px}
 :root .workspace-header button.workspace-context{grid-column:1/-1;grid-row:2;width:100%;max-width:none;padding:5px 0;min-height:44px;margin:0}
 .workspace-context-label strong{white-space:normal;overflow:visible;text-overflow:clip;font-size:13px}
 .workspace-context-label small{display:none}
 :root .workspace-header .workspace-nav-button,.workspace-profile>summary{min-width:44px;min-height:44px;justify-content:center}
}
