/* Stable workspace: fixed desktop navigation and contextual actions at every width. */
.workspace-scroll { display: contents; }
.with-app-shell { height: 100dvh; overflow: hidden; }
.with-app-shell .app-stage { height: 100dvh; min-height: 0; overflow: hidden; }
.with-app-shell .app-header { display: flex; position: relative; flex-shrink: 0; }
.with-app-shell .workspace-scroll { display: block; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-padding-block: 20px; }
.with-app-shell .page-shell { padding-top: 28px; padding-bottom: 40px; }
.with-app-shell .app-sidebar { height: 100dvh; z-index: 60; }
.with-app-shell .app-sidebar > * { flex-shrink: 0; }
.detached-editor :is(.app-sidebar,.app-header,.sidebar-scrim) { display: none !important; }
.with-app-shell.detached-editor .app-stage { margin-left: 0; }
@media(min-width:901px) {
    .with-app-shell .form-aside { top: 16px; max-height: calc(100dvh - 180px); }
    /* A grid column instead of a fixed offset, so the content follows the menu width. */
    .with-app-shell { display: grid; grid-template-columns: auto minmax(0, 1fr); }
    .with-app-shell .app-stage { grid-area: 1 / 2; }
    .with-app-shell .app-sidebar { grid-area: 1 / 1; position: relative; inset: auto; background: var(--ee-surface-muted); color: var(--ink); box-shadow: none; }
    .with-app-shell .app-sidebar .sidebar-menu-item > a { color: var(--ink); }
    .with-app-shell .app-sidebar .sidebar-menu-item:hover,.with-app-shell .app-sidebar .sidebar-menu-item:has(>a.active) { background: var(--accent-soft); }
    .with-app-shell .app-sidebar :is(.sidebar-menu-group>h2,.sidebar-section-heading h2,.sidebar-section-heading span,.sidebar-brand small,.sidebar-account span,.favorite-navigation-empty) { color: var(--muted); }
    .with-app-shell .app-sidebar .sidebar-brand strong { color: var(--ee-action); }
    .with-app-shell :is(.nav-toggle,.sidebar-scrim) { display: none; }
}
@media(max-width:900px) {
    .with-app-shell .sidebar-scrim { z-index: 55; }
}
@media print {
    .app-sidebar,.app-header,.sidebar-scrim,.workspace-bottom { display:none!important; }
    .with-app-shell,.with-app-shell .app-stage { height: auto; overflow: visible; }
    .with-app-shell { display: block; }
    .with-app-shell .app-stage { margin-left: 0; }
    .with-app-shell .workspace-scroll { display: block; overflow: visible; }
}
