/*! NBC v7.541 · calculator runtime stability · scroll anchoring and interaction containment */
body.service-process #sollweg-echtweg,
body.service-process [data-process-reality-app],
body.service-process .rf-process-model,
body.service-erp #erp-belastungsprobe,
body.service-erp #erp-belastungsprobe .rf-provider-model{
  overflow-anchor:none!important;
}

/* ERP P0: Inspector is a non-layout side panel. Opening it must not move the
   provider matrix or force the complete calculator below it to reflow. */
html body#nbc-page.service-erp #erp-belastungsprobe .ec-providers.ec-providers--rails > .ec-editor.ec-editor--inline.ec-editor--between{
  position:fixed!important;
  z-index:1200!important;
  top:96px!important;
  right:max(20px,calc((100vw - min(1680px,94vw))/2))!important;
  bottom:auto!important;
  left:auto!important;
  width:min(520px,calc(100vw - 40px))!important;
  max-width:520px!important;
  max-height:calc(100dvh - 120px)!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  margin:0!important;
  border:1px solid rgba(184,230,198,.20)!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,rgba(14,31,22,.985),rgba(8,19,13,.99))!important;
  box-shadow:0 28px 90px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.025)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  contain:layout style paint!important;
  will-change:opacity,transform!important;
  transform:translateZ(0)!important;
  transition:none!important;
  animation:none!important;
}
@media(max-width:760px){
  html body#nbc-page.service-erp #erp-belastungsprobe .ec-providers.ec-providers--rails > .ec-editor.ec-editor--inline.ec-editor--between{
    top:auto!important;
    right:10px!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    left:10px!important;
    width:auto!important;
    max-width:none!important;
    max-height:72dvh!important;
    border-radius:20px!important;
    padding:16px!important;
  }
}

/* Process mobile P0: the three progressive editor stages have different natural
   content heights. Advancing from Ursache to Wirkung previously collapsed the live
   calculator by ~86px in the click frame and forced a full-page mobile reflow.
   Keep only the currently open stage on one shared geometry; closed stages remain
   compact and the optional stable-dependency panel can still expand when requested. */
@media(max-width:700px){
  html body.service-process #sollweg-echtweg .rf-process-editor fieldset.pr-dock-group.is-mobile-open{
    min-height:576px!important;
  }
}

/* v7.541 P0: keep one fully styled Inspector panel prewarmed off the interaction path.
   Visibility only is toggled on click; fixed geometry is already resolved during idle. */
html body#nbc-page.service-erp #erp-belastungsprobe .ec-editor.ec-editor--inline.ec-editor--between[data-prewarmed="true"]{
  visibility:visible!important;
  opacity:.001!important;
  pointer-events:none!important;
  user-select:none!important;
}

/* v7.541 P0 staged Inspector paint: keep geometry stable while painting the
   header, primary controls and evidence layer in separate frames. */
html body#nbc-page.service-erp #erp-belastungsprobe .ec-editor.ec-editor--inline.ec-editor--between[data-open-phase="head"] :is(.ec-inspector-grid,.ec-evidence-details,.ec-proof-callout),
html body#nbc-page.service-erp #erp-belastungsprobe .ec-editor.ec-editor--inline.ec-editor--between[data-open-phase="fields"] :is(.ec-evidence-details,.ec-proof-callout){
  visibility:hidden!important;
}
