/* Composition of shared tokens. Fachcontroller and IDs remain page-owned. */
body.entovia-shell,body.entovia-auth{margin:0;background:var(--ws-paper);color:var(--ws-text);font:400 14px/1.45 var(--ws-font)}
.entovia-shell *,.entovia-auth *{box-sizing:border-box}
.entovia-shell [hidden],.entovia-auth [hidden]{display:none!important}
.entovia-shell :is(button,input,select,textarea),.entovia-auth :is(button,input,select,textarea){font:inherit;max-width:100%}
.entovia-shell :is(button,.button,input:not([type=checkbox]):not([type=radio]),select),.entovia-auth :is(button,.button,input:not([type=checkbox]):not([type=radio]),select){min-height:44px;border-radius:var(--ws-radius-control)}
.entovia-shell :is(button,.button),.entovia-auth :is(button,.button){min-width:44px;background:var(--ws-forest);color:var(--ws-white);border:1px solid var(--ws-forest);font-weight:500;box-shadow:none}
.entovia-shell :is(button,.button).secondary,.entovia-auth :is(button,.button).secondary{background:var(--ws-white);color:var(--ws-forest);border-color:var(--ws-control)}
.entovia-shell :is(input,textarea,select),.entovia-auth :is(input,textarea,select){color:var(--ws-text);background:var(--ws-white);border-color:var(--ws-control)}
.entovia-shell :is(a,button,input,select,textarea,summary):focus-visible,.entovia-auth :is(a,button,input,select,textarea,summary):focus-visible{outline:2px solid var(--ws-forest);outline-offset:3px;box-shadow:0 0 0 3px var(--ws-white)}
.entovia-shell h1,.entovia-auth h1{font-size:24px;line-height:1.25;font-weight:600;letter-spacing:-.025em}
.entovia-shell h2,.entovia-auth h2{font-size:16px;line-height:1.4;font-weight:600}
.entovia-shell h3,.entovia-auth h3{font-size:15px;line-height:1.4;font-weight:600}
.entovia-shell :is(.panel,.summary-card,.candidate),.entovia-auth .auth-card{border-radius:var(--ws-radius);box-shadow:none}
.entovia-shell :is(.muted,.method,small),.entovia-auth :is(.muted,.lead,.mode-note,small){color:var(--ws-muted)}
.entovia-shell :is(.notice.error,.form-message){color:var(--ws-error)}
.entovia-shell main{min-width:0;max-width:none;padding:24px 28px 40px}
.entovia-shell .topbar{display:flex;align-items:center;background:var(--ws-white);border-bottom:1px solid var(--ws-line);min-height:72px;padding:12px 28px;gap:16px;flex-wrap:wrap}
.entovia-shell .topbar :is(a,button){min-height:44px;display:inline-flex;align-items:center}
.entovia-shell .topbar .account{flex-wrap:wrap;gap:12px}
.entovia-shell .topbar>.ws-header-context{display:flex;align-items:center;gap:12px;flex:1 1 22rem;min-width:0;max-width:640px}
.entovia-shell .ws-project-control{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.entovia-shell .ws-project-control>label,.entovia-shell .ws-project-control>.field>span{font-size:12px;color:var(--ws-muted);font-weight:500}
.entovia-shell .ws-project-control>select,.entovia-shell .ws-project-control>.field{width:100%;min-width:0;margin:0}
.entovia-shell .topbar>.account{display:flex;align-items:center;justify-content:flex-end;margin-left:auto;flex:0 1 auto;min-width:0}
.entovia-shell .ws-account-details{margin:0;min-width:0;max-width:18rem}
.entovia-shell .ws-account-details>summary{font-size:14px;font-weight:500;white-space:nowrap;padding:10px 4px}
.entovia-shell .ws-account-details>code{display:block;max-width:100%;padding:8px 12px;background:var(--ws-field);border-radius:var(--ws-radius-control);overflow-wrap:anywhere}
.entovia-shell .ws-explanation{margin:8px 0;min-width:0}
.entovia-shell .ws-explanation>summary{font-weight:500}
.entovia-shell .brand img,.entovia-auth .brand img{filter:none}
.entovia-shell .brand,.entovia-auth .brand{color:var(--ws-forest)}
.entovia-shell .brand small,.entovia-auth .brand small{color:var(--ws-muted)}
.entovia-shell .heading{margin-bottom:24px}
.entovia-shell :is(pre,code,dd,.task-key){overflow-wrap:anywhere}
.entovia-shell summary,.entovia-auth summary{min-height:44px;padding:12px 0;cursor:pointer;color:var(--ws-forest);font-size:13px}
.entovia-shell details,.entovia-auth details{max-width:100%;margin-top:8px}
.entovia-shell details code,.entovia-auth details code{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
.entovia-shell .skip-link,.entovia-auth .skip-link{position:fixed;top:8px;left:12px;transform:translateY(calc(-100% - 16px));clip-path:inset(50%);z-index:100;background:var(--ws-white);color:var(--ws-forest);padding:12px}
.entovia-shell .skip-link:focus,.entovia-auth .skip-link:focus{top:8px;transform:none;clip-path:none}
.entovia-shell.ws-mounted{position:relative;min-height:100vh}
.entovia-shell .ws-sidebar{position:absolute;inset:0 auto 0 0;width:var(--ws-sidebar);min-height:100vh;background:var(--ws-paper);border-right:1px solid var(--ws-line);z-index:30}
.ws-sidebar-content{position:sticky;top:0;max-height:100vh;overflow:auto;padding:20px 12px}
.ws-brand{display:flex;align-items:center;gap:12px;min-height:44px;margin:0 12px 24px;color:var(--ws-forest);text-decoration:none;font-size:18px;line-height:1.25;font-weight:500}
.ws-brand span{min-width:0;overflow-wrap:anywhere}
.ws-brand img{width:28px;height:28px}
.ws-area-list{display:flex;flex-direction:column;gap:2px}
.ws-area-list a{position:relative;display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;color:var(--ws-muted);text-decoration:none;border-radius:var(--ws-radius-control);font-size:13px}
.ws-area-list a:hover{background:var(--ws-field);color:var(--ws-forest)}
.ws-area-list a[aria-current]{color:var(--ws-forest);font-weight:500}
.ws-area-list a[aria-current]::before{content:'';position:absolute;left:1px;top:10px;bottom:10px;width:3px;background:var(--ws-forest);border-radius:2px}
.ws-area-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.ws-context{font-size:12px;color:var(--ws-muted);margin:20px 12px;overflow-wrap:anywhere}
.ws-nav-message{font-size:12px;color:var(--ws-muted);padding:12px}
.entovia-shell>.topbar,.entovia-shell>main,.entovia-shell>footer,.entovia-shell>noscript{margin-left:var(--ws-sidebar)}
.entovia-shell.ws-mounted .topbar>.brand{display:none}
.entovia-shell .topbar .ws-menu-toggle{display:none;min-width:44px;padding:8px 12px;background:var(--ws-white);color:var(--ws-forest);border:1px solid var(--ws-control)}
.ws-badges{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center}
.ws-badge{display:inline-flex;align-items:center;gap:5px;border-radius:var(--ws-radius-control);padding:3px 7px;font-size:12px;line-height:1.45;font-weight:500;color:var(--ws-forest);background:var(--ws-field);border:1px solid var(--ws-border)}
.ws-badge::before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}
.ws-badge-ai{border-style:dashed;color:var(--ws-forest)}
.ws-badge-test{color:var(--ws-warning)}
.ws-demo-badge[hidden]{display:none}
.ws-badge-unknown{color:var(--ws-muted)}
.ws-badge-approved{border-color:var(--ws-forest)}
.ws-time{display:inline;max-width:100%;font-variant-numeric:tabular-nums}
.ws-time-details{display:block;margin-top:2px;font-weight:400;font-size:12px}
.ws-time-details summary{min-height:32px;padding:4px 0!important}
.entovia-shell :is(.table-scroll,.json){max-width:100%;overflow:auto}
.entovia-shell footer{border-top:1px solid var(--ws-line);color:var(--ws-muted);background:var(--ws-paper);font-size:12px}
@media(max-width:899px){
 .entovia-shell .ws-sidebar{display:none;position:fixed;top:var(--ws-menu-top,72px);width:min(288px,calc(100vw - 24px));min-height:0;overflow:auto;border:1px solid var(--ws-control);box-shadow:none}
 .ws-sidebar-content{position:static;max-height:none;overflow:visible}
 .entovia-shell .ws-sidebar[data-open=true]{display:block}
 .entovia-shell .topbar .ws-menu-toggle{display:inline-flex;align-items:center;justify-content:center}
 .entovia-shell>.topbar,.entovia-shell>main,.entovia-shell>footer,.entovia-shell>noscript{margin-left:0}
 .entovia-shell.ws-mounted .topbar>.brand{display:flex}
 .entovia-shell .topbar{padding:12px 16px;gap:8px}
 .entovia-shell main{padding:20px 16px 32px}
 .entovia-shell .topbar>.ws-header-context{order:3;flex-basis:100%;max-width:none;width:100%}
 .entovia-shell .topbar>.account{width:auto;flex:1;justify-content:flex-end;font-size:12px}
}
@media(max-width:619px){
 .entovia-shell main{padding:20px 12px 28px}
 .entovia-shell h1,.entovia-auth h1{font-size:22px}
 .entovia-shell .topbar{padding:10px 12px}
 .entovia-shell :is(.panel-heading,.project-bar){flex-wrap:wrap;min-width:0}
 .entovia-shell :is(.panel,.summary-card,.detail-content){min-width:0}
 .entovia-shell :is(.topbar,.panel-heading,.project-bar)>*{max-width:100%;min-width:0}
}
@media(prefers-reduced-motion:reduce){.entovia-shell *,.entovia-auth *{scroll-behavior:auto!important}}

/* Accepted variant A is the default. Keep page controllers and domain states
   unchanged; html:root preserves the prototype selector specificity. */
html:root :is(body.entovia-shell,body.entovia-auth){
 background:var(--ws-page-background);background-attachment:fixed;
}
html:root :is(.entovia-shell,.entovia-auth) :is(h1,h2,h3){
 color:var(--ws-heading-color);
}
html:root .entovia-shell :is(.panel,.summary-card,.candidate),
html:root .entovia-auth .auth-card{
 border-radius:var(--ws-card-radius);box-shadow:var(--ws-card-shadow);
}
html:root .entovia-shell :is(.station-detail-panel,.area-detail-panel)>.panel-heading{
 background:var(--ws-soft-green);
}
html:root .entovia-shell .summary-card{
 background:var(--ws-metric-background);
}
html:root .entovia-shell .summary-card .metric{
 color:var(--ws-heading-color);
}
/* Nested live/operations sections stay part of their existing parent card. */
html:root .station-map-workspace #station-live-host .live-panel,
html:root .station-map-workspace .operational-fallback>.panel{
 box-shadow:none;border-radius:0;
}
html:root .entovia-shell .ws-sidebar{
 background:var(--ws-nav-background);border-color:var(--ws-nav-line);
}
html:root .ws-brand{color:var(--ws-nav-brand)}
html:root .ws-brand img{filter:var(--ws-logo-filter)}
html:root .ws-area-list a{color:var(--ws-nav-text)}
html:root .ws-area-list a:hover{
 background:var(--ws-nav-hover-background);color:var(--ws-nav-hover-text);
}
html:root .ws-area-list a[aria-current]{
 background:var(--ws-nav-active-background);color:var(--ws-nav-active-text);
}
html:root .ws-area-list a[aria-current]::before{background:var(--ws-lime)}
html:root .ws-area-list a[aria-current] .ws-area-icon{color:var(--ws-lime)}
html:root :is(.ws-context,.ws-nav-message){color:var(--ws-nav-context)}
html:root .entovia-shell .ws-sidebar :is(a,button):focus-visible{
 outline:3px solid var(--ws-nav-focus);outline-offset:3px;box-shadow:0 0 0 3px var(--ws-nav-focus-gap);
}
/* Match only primary actions, never station rows, map controls or box tools. */
html:root :is(.entovia-shell,.entovia-auth) :is(button[type=submit],.button,.profile-actions>button,#capture-review-prepare):not(.secondary){
 border-radius:var(--ws-action-radius);background:var(--ws-forest);color:var(--ws-paper);
 border-color:var(--ws-forest);box-shadow:var(--ws-action-shadow);
}
html:root :is(.entovia-shell,.entovia-auth) :is(button[type=submit],.button,.profile-actions>button,#capture-review-prepare):not(.secondary):not(:disabled):hover{
 background:var(--ws-evergreen);border-color:var(--ws-evergreen);filter:none;
}
/* Empty CSS shape: decorative, no new text or accessible name. */
html:root :is(.entovia-shell,.entovia-auth) :is(button[type=submit],.button,.profile-actions>button,#capture-review-prepare):not(.secondary)::after{
 content:'';display:inline-block;flex:none;width:16px;height:16px;margin-left:8px;
 background:var(--ws-action-icon);clip-path:polygon(0 44%,66% 44%,40% 18%,50% 8%,94% 50%,50% 92%,40% 82%,66% 56%,0 56%);
}
html:root :is(.entovia-shell,.entovia-auth) :is(button[type=submit],.button,.profile-actions>button,#capture-review-prepare):not(.secondary):focus-visible{
 outline:3px solid var(--ws-forest);outline-offset:3px;box-shadow:0 0 0 3px var(--ws-white),var(--ws-action-shadow);
}
html:root .entovia-auth .auth-story{
 background:var(--ws-auth-background);color:var(--ws-auth-text);
}
html:root .entovia-auth .auth-story .brand{color:var(--ws-auth-text)}
html:root .entovia-auth .auth-story .brand img{filter:var(--ws-logo-filter)}
html:root .entovia-auth .auth-story :is(p,small){color:var(--ws-auth-muted)}
html:root .entovia-auth .auth-story a:focus-visible{
 outline:3px solid var(--ws-nav-focus);outline-offset:5px;box-shadow:0 0 0 3px var(--ws-nav-focus-gap);
}
html:root .entovia-auth .auth-panel{background:transparent}
html:root .entovia-auth .auth-card{
 padding:28px;background:var(--ws-white);border:1px solid var(--ws-line);box-shadow:var(--ws-feature-shadow);
}
/* Brand lime belongs to navigation/actions. Actual evidence keeps dedicated
   text, border patterns and subdued status colors, never a lime approval. */
html:root .entovia-shell .ws-badge-ai{
 color:var(--ws-status-ai-text);border-color:var(--ws-status-ai-text);border-style:dashed;background:var(--ws-white);
}
html:root .entovia-shell .ws-badge-approved{
 color:var(--ws-status-approved-text);border-color:var(--ws-status-approved-text);background:var(--ws-white);
}
html:root .entovia-shell .ws-badge-test{
 color:var(--ws-warning);background:var(--ws-soft-orange);border-color:var(--ws-warning);
}
html:root .entovia-map-marker:is(.state-fresh,.state-delivering,.state-liefert)>span{
 background:var(--ws-status-fresh-surface);
}
html:root .entovia-shell .site-area-key{
 color:var(--ws-forest);
}
html:root .entovia-shell .bkg-attribution{
 display:flex;flex-wrap:wrap;align-items:center;gap:0 4px;
}
html:root .entovia-shell .bkg-attribution a{
 display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;max-width:100%;
}
@media(max-width:899px){
 html:root .entovia-shell .ws-sidebar{box-shadow:var(--ws-feature-shadow)}
}
@media(max-width:619px){
 html:root .entovia-auth .auth-card{padding:20px}
}

/* Fixed public legal links share accessible targets on every page group. */
.entovia-shell footer,.entovia-auth .ws-legal-footer{
 display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 20px;
 border-top:1px solid var(--ws-line);background:var(--ws-paper);color:var(--ws-muted);
 font-size:12px;text-align:center;
}
.entovia-shell .ws-legal-links,.entovia-auth .ws-legal-links{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0 16px;
 max-width:100%;
}
.entovia-shell .ws-legal-links a,.entovia-auth .ws-legal-links a{
 display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;
 max-width:100%;padding:8px 4px;border-radius:var(--ws-radius-control);color:var(--ws-muted);
 font-size:12px;overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:3px;
}
.entovia-shell .ws-legal-links a:hover,.entovia-auth .ws-legal-links a:hover{color:var(--ws-forest)}
.entovia-shell .ws-legal-links a:focus-visible,.entovia-auth .ws-legal-links a:focus-visible{
 outline:3px solid var(--ws-forest);outline-offset:3px;box-shadow:0 0 0 3px var(--ws-white);
}

/* Shared frame and neutral first paint; no cached account or project content. */
.entovia-shell .topbar{position:sticky;top:0;z-index:25;view-transition-name:workspace-header}
.entovia-shell .ws-sidebar{view-transition-name:workspace-navigation}
.entovia-shell main{position:relative;min-height:calc(100vh - 150px)}
.entovia-shell :is(#main,#page-title,#observations,#motion-panel,#project-management,#operations-panel){scroll-margin-top:112px}
.ws-area-list[data-loading=true]:empty::before{content:'';display:block;height:398px;margin:4px 12px;border-radius:6px;opacity:.28;background:repeating-linear-gradient(to bottom,var(--ws-nav-text) 0 12px,transparent 12px 44px);width:68%}
.ws-loading-skeleton{position:absolute;inset:112px 28px auto;z-index:5;min-height:280px;padding:24px;border:1px solid var(--ws-line);border-radius:var(--ws-radius);background:var(--ws-white);color:var(--ws-muted);pointer-events:none}
.ws-loading-skeleton>span{display:block;margin-bottom:28px;font-size:13px}
.ws-loading-skeleton>div{height:16px;margin:18px 0;border-radius:4px;background:var(--ws-field);max-width:86%}
.ws-loading-skeleton>div:nth-of-type(2){max-width:64%}
.ws-loading-skeleton>div:nth-of-type(3){max-width:74%;height:100px}
.ws-loading-error{pointer-events:auto;min-height:180px}
.ws-loading-error button{margin-top:16px}
::view-transition-group(workspace-header),::view-transition-group(workspace-navigation),::view-transition-group(root){animation-duration:160ms;animation-timing-function:ease-out}
@media(max-width:899px){.entovia-shell :is(#main,#page-title,#observations,#motion-panel,#project-management,#operations-panel){scroll-margin-top:210px}.ws-loading-skeleton{inset:112px 16px auto}}
@media(prefers-reduced-motion:reduce){::view-transition-group(*){animation:none!important}}

/* Keep uncertain identity text out of first paint. The page controller still
   owns all authentication actions; the neutral account slot has fixed size. */
.entovia-shell[data-ws-phase=loading] .topbar :is(.ws-project-control,.account){position:relative;min-height:44px}
.entovia-shell[data-ws-phase=loading] .topbar .ws-project-control{min-height:66px}
.entovia-shell[data-ws-phase=loading] .topbar :is(.ws-project-control,.account)>*{visibility:hidden}
.entovia-shell[data-ws-phase=loading] .topbar :is(.ws-project-control,.account)::after{content:'';position:absolute;left:0;right:0;top:22px;height:32px;border-radius:var(--ws-radius-control);background:var(--ws-field)}
.entovia-shell[data-ws-phase=loading] main>:not(.heading):not(#ws-loading-skeleton){visibility:hidden}
.entovia-shell[data-ws-phase=loading] main{min-height:calc(100vh - 150px);padding-bottom:360px}
.entovia-shell .ws-nav-message{min-height:42px;margin:0}
.ws-loading-skeleton{height:280px;min-height:280px}
/* Cross-document transitions retain only the outgoing frame while the new
   document confirms its own access. The hold is bounded; no data is cached. */
html[data-ws-frame-pending]::view-transition-group(workspace-header),html[data-ws-frame-pending]::view-transition-group(workspace-navigation){animation-duration:1200ms}
html[data-ws-frame-pending]::view-transition-old(workspace-header),html[data-ws-frame-pending]::view-transition-old(workspace-navigation){animation:none;opacity:1}
html[data-ws-frame-pending]::view-transition-new(workspace-header),html[data-ws-frame-pending]::view-transition-new(workspace-navigation){animation:none;opacity:0}

/* Page styles load after the shared sheet. Keep the common frame geometry
   explicit so Review's initially empty controls cannot shrink the header. */
html:root .entovia-shell .topbar{min-height:96px;padding:12px 28px;gap:16px;align-items:center}
html:root .entovia-shell .topbar>.ws-header-context{min-height:66px}
html:root .entovia-shell .topbar>.account{min-height:44px;min-width:152px}
html:root .entovia-shell .ws-project-control>label{margin:0}
@media(max-width:899px){html:root .entovia-shell .topbar{min-height:156px;padding:12px 16px;gap:8px}}
@media(max-width:619px){html:root .entovia-shell .topbar{padding:12px}}
