/* Facility 9.1.1. A single shared presentation fix; no record or role changes. */
html body .ll-anchored-panel {
  box-sizing: border-box !important;
  height: auto !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  background: #fff !important;
  color: #204e43;
  border: 1px solid #bfd2c8 !important;
  border-radius: 10px !important;
  padding: 10px !important;
  box-shadow: 0 8px 26px #173d3926 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  font-size: calc(15px * var(--lab-text-scale, 1)) !important;
  line-height: 1.45 !important;
  z-index: 1000 !important;
}
html body .ll-anchored-panel::backdrop { background: transparent; pointer-events: none; }
html body .lab-main-menu > .ll-anchored-panel a {
  display: flex !important;
  justify-content: flex-start !important;
  text-align: left !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  font-size: calc(15px * var(--lab-text-scale, 1)) !important;
  line-height: 1.3 !important;
}
html body .ll-anchored-panel select {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
html body .lab-main-menu > .ll-anchored-panel select { width: 100% !important; }
html body .ll-anchored-panel p { font-size: inherit !important; line-height: inherit !important; }
html body .scope-popout > .ll-anchored-panel { padding: 12px !important; }
html body .lab-main-menu > summary { cursor: pointer; }
html body .lab-header .lab-main-menu { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; }
html body .lab-header .lab-primary nav { gap: 3px !important; flex-wrap: wrap !important; }
html body .lab-header .toolbar-tab { height: auto !important; min-height: 38px !important; }
html body .lab-header .main-current { display: none !important; }
html body :is(#ll2-app,#lles,#llpt) .scope-header > .scope-example-controls {
  display: flex !important; flex-flow: row wrap !important;
  align-items: flex-start !important; justify-content: flex-start !important;
  width: auto !important; max-width: 100% !important; min-width: 0 !important;
  gap: 4px !important; margin: 0 !important; flex: 0 1 auto !important;
}
html body :is(#ll2-app,#lles,#llpt) .scope-example-controls > button {
  flex: 0 0 32px !important; width: 32px !important; min-width: 32px !important;
  height: 34px !important; min-height: 34px !important; margin: 0 !important;
  padding: 4px !important;
}
html body :is(#ll2-app,#lles,#llpt) .scope-example-controls > .scope-example-menu {
  display: flex !important; flex-direction: column !important;
  flex: 0 1 auto !important; width: auto !important; min-width: 0 !important;
  max-width: calc(100% - 76px) !important; gap: 3px !important;
}
html body :is(#ll2-app,#lles,#llpt) .scope-example-controls select {
  width: auto !important; min-width: 0 !important; max-width: 100% !important;
  min-height: 34px !important; margin: 0 !important;
  font-size: calc(14px * var(--lab-text-scale, 1)) !important;
}
html body :is(#ll2-app,#lles,#llpt) .scope-header > .diagram-tools {
  flex: 0 1 auto !important; width: auto !important; max-width: 100% !important;
  margin: 0 0 0 auto !important; flex-wrap: wrap !important;
}
html body :is(#ll2-app,#lles,#llpt) .scope-header .scope-stage {
  width: auto !important; flex: 0 1 auto !important;
  margin: 6px auto 0 0 !important;
}
html body :is(#ll2-app,#lles,#llpt) :is(.scope-header,.section-scope-tools) :is(summary,select,button) {
  font-size: calc(14px * var(--lab-text-scale, 1)) !important;
}
html body :is(#ll2-app,#lles,#llpt) .scope-example-menu .example-access > summary {
  height: auto !important; min-height: 28px !important;
  font-size: calc(13px * var(--lab-text-scale, 1)) !important;
}
html body :is(#ll2-app,#lles,#llpt) .question-answer > summary {
  font-size: calc(14px * var(--lab-text-scale, 1)) !important;
  min-height: 32px !important;
}
@media (max-width: 700px) {
  html body .site-header.lab-header {
    display: flex !important; gap: 4px !important; padding: 6px 8px !important;
  }
  html body .lab-header .wordmark { gap: 7px !important; flex: 1 1 auto !important; min-width: 0; }
  html body .lab-header .wordmark > b { padding: 5px 9px 6px 6px !important; border-radius: 10px !important; }
  html body .lab-header .lab-primary { order: 4 !important; flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; }
  html body .lab-header .lab-primary nav { width: auto !important; gap: 0 !important; }
  html body .lab-header .lab-access-tools {
    order: 5 !important; flex: 0 0 auto !important; width: auto !important;
    margin-left: auto !important; gap: 3px !important;
  }
  html body .lab-header .lab-access-tools :is(.ll-reader-trigger,.lab-display-button) {
    width: 38px !important; min-width: 38px !important; height: 38px !important;
    min-height: 38px !important; padding: 6px !important; justify-content: center !important;
  }
  html body .lab-header .lab-access-tools .ll-reader-trigger > span,
  html body .lab-header .lab-access-tools .lab-display-button > span:last-child { display: none !important; }
  html body .lab-header .lab-access-tools .lab-display-button > span:first-child { font-size: 19px !important; }
  html body .lab-header .lab-access-menu { margin-left: 0 !important; }
  html body .lab-header .lab-primary .toolbar-tab { padding: 6px 7px !important; }
  html body .lab-main-menu > .ll-anchored-panel a { min-height: 44px !important; }
  html body :is(#ll2-app,#lles,#llpt) .scope-header { gap: 6px !important; }
  html body :is(#ll2-app,#lles,#llpt) .scope-header > .diagram-tools { margin-left: 0 !important; }
}
@media (max-width: 380px) {
  html body .lab-header .lab-primary .toolbar-tab { padding-inline: 5px !important; }
}
/* Match the core's component-specific rules while respecting text scaling. */
html body :is(#ll2-app,#lles,#llpt) .scope-header .scope-example-controls > .scope-example-menu {
  flex: 0 1 auto !important; min-width: 0 !important; max-width: calc(100% - 76px) !important;
}
html body :is(#ll2-app,#lles,#llpt) .scope-header .scope-example-controls .scope-popout > summary {
  font-size: calc(13px * var(--lab-text-scale, 1)) !important; height: auto !important; min-height: 28px !important;
}
html body :is(#ll2-app,#lles,#llpt) .ll-anchored-panel {
  font-size: calc(15px * var(--lab-text-scale, 1)) !important;
}
html body :is(#ll2-app,#lles,#llpt) .question-line .ll-anchored-panel p {
  font-size: inherit !important; line-height: 1.45 !important;
}
/* Header layout contract: whole groups occupy fixed grid areas; never orphan a control. */
html body .site-header.lab-header{display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto auto;grid-template-areas:'brand language navigation tools view';align-items:center!important;gap:6px 12px!important;padding:10px 18px!important}
html body .lab-header>.wordmark{grid-area:brand;margin:0!important;min-width:0;gap:8px!important}
html body .lab-header>.lab-language{grid-area:language;margin:0!important;min-width:0}
html body .lab-header>.lab-primary{grid-area:navigation;width:auto!important;min-width:0!important;margin:0!important;order:0!important}
html body .lab-header>.lab-access-tools{grid-area:tools;margin:0!important;width:auto!important;gap:5px!important;order:0!important;display:flex!important;flex-wrap:nowrap!important}
html body .lab-header>.lab-access-menu{grid-area:view;margin:0!important;justify-self:end}
html body .lab-header .lab-primary nav{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:3px!important;width:auto!important}
html body .lab-header .toolbar-tab,html body .lab-header>.lab-access-menu>summary{white-space:nowrap!important;margin:0!important;min-height:38px!important;padding:7px 10px!important}
html body .lab-header .wordmark>b{font-size:25px!important;padding:7px 10px!important;border-radius:12px!important}
html body .lab-header .wordmark>span{font-size:17px!important;white-space:nowrap}
@media(max-width:1279px){
 html body .site-header.lab-header{grid-template-columns:1fr auto auto auto;grid-template-areas:'brand language tools view' 'navigation navigation navigation navigation';gap:6px 10px!important}
 html body .lab-header>.lab-primary{border-top:1px solid #d5e3dc;padding-top:6px!important}
 html body .lab-header .lab-primary nav{justify-content:flex-start!important}
}
@media(max-width:759px){
 html body .site-header.lab-header{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:'brand language view' 'navigation navigation tools';padding:8px 10px!important;gap:6px!important}
 html body .lab-header>.lab-primary{border:0;padding:0!important}
 html body .lab-header .wordmark>span{font-size:15px!important}
 html body .lab-header .lab-language select{width:112px!important;padding:6px!important;font-size:14px!important;min-height:38px!important}
 html body .lab-header .toolbar-tab{padding:6px 7px!important;font-size:14px!important}
 html body .lab-header .toolbar-tab svg{display:inline-block!important;flex:none!important;width:20px!important;height:20px!important}
 html body .lab-header .lab-access-tools :is(.ll-reader-trigger,.lab-display-button){width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:5px!important;justify-content:center!important}
 html body .lab-header .lab-access-tools .ll-reader-trigger>span,html body .lab-header .lab-access-tools .lab-display-button>span:last-child{display:none!important}
 html body .lab-header .lab-access-tools .lab-display-button>span:first-child{font-size:19px!important}
}
@media(max-width:519px){
 html body .site-header.lab-header{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:'brand language view' 'navigation navigation tools'}
 html body .lab-header .wordmark>span{display:none!important}
 html body .lab-header .lab-primary nav{display:grid!important;grid-template-columns:1fr 1fr;gap:3px!important}
 html body .lab-header .lab-primary nav>*{width:100%!important;min-width:0!important}
 html body .lab-header .lab-primary .toolbar-tab{width:100%!important;justify-content:flex-start!important}
 html body .lab-header>.lab-access-tools{flex-direction:column!important;align-self:stretch;justify-content:center}
}
@media(max-width:519px){html body .site-header.lab-header .lab-primary nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

