/* HF74 SOURCE REPAIR: one stable row for menu and one for tools. */
.app > .top{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:7px!important;padding:8px 12px!important;min-height:0!important;height:auto!important;width:100%!important;box-sizing:border-box!important;overflow:visible!important;align-items:stretch!important}
.app > .top > .top-row{position:relative!important;display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:0!important;min-height:54px!important;height:auto!important;width:100%!important;min-width:0!important;padding:6px 9px!important;margin:0!important;box-sizing:border-box!important;overflow:visible!important;border-radius:11px!important}
.app > .top > .top-row > .row-label{display:none!important}
.app > .top > .top-row > .row-inner{position:relative!important;display:flex!important;flex-flow:row nowrap!important;align-items:center!important;align-content:center!important;gap:8px!important;min-width:0!important;width:100%!important;max-width:100%!important;padding:0!important;margin:0!important;overflow:visible!important;transform:none!important}
.app > .top .top-group{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;gap:6px!important;min-width:0!important;position:relative!important;transform:none!important}
.app > .top .menu-row .menu-primary{flex:1 1 auto!important;min-width:0!important;max-width:none!important;overflow:visible!important}
.app > .top .menu-row .brand{display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;min-width:0!important;max-width:190px!important;width:auto!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.app > .top .menu-row .brand .site-wordmark{white-space:nowrap!important;min-width:0!important;font-size:clamp(12px,1vw,16px)!important}
.app > .top .menu-row .site-logo{flex:0 0 35px!important;width:35px!important;height:35px!important;max-width:35px!important}
.app > .top .menu-row .workshop-menus{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;gap:4px!important;min-width:0!important;max-width:none!important;width:auto!important;overflow:visible!important;transform:none!important}
.app > .top .workshop-menus > details.menu-drop{flex:0 0 auto!important;position:relative!important;align-self:center!important;margin:0!important;height:36px!important;min-height:36px!important;transform:none!important;translate:none!important}
.app > .top .workshop-menus > details.menu-drop > summary{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;height:36px!important;min-height:36px!important;padding:6px 9px!important;margin:0!important;transform:none!important;translate:none!important;white-space:nowrap!important;font-size:12px!important}
.app > .top .menu-row .menu-meta{flex:0 0 auto!important;min-width:0!important;margin-left:auto!important;gap:6px!important;max-width:none!important;overflow:visible!important}
.app > .top .menu-row #filename{flex:0 1 180px!important;width:180px!important;min-width:95px!important;max-width:180px!important;box-sizing:border-box!important}
.app > .top .menu-row #diagramType{flex:0 1 190px!important;width:190px!important;min-width:120px!important;max-width:190px!important;box-sizing:border-box!important}
.app > .top .menu-row #s2d-language-switch{flex:0 0 auto!important;margin-left:3px!important}
.app > .top .tool-row .toolbar-primary{display:flex!important;flex:1 1 auto!important;min-width:0!important;flex-wrap:nowrap!important;align-items:center!important;gap:5px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important}
.app > .top .tool-row .toolbar-status{display:flex!important;flex:0 1 auto!important;min-width:0!important;margin-left:auto!important;align-items:center!important;gap:6px!important;white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}
.app > .top .tool-row .toolbar-secondary{display:flex!important;flex:0 0 auto!important;align-items:center!important;gap:5px!important;white-space:nowrap!important}
.app > .top .tool-row .row-inner button{flex:0 0 auto!important;position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;transform:none!important;margin-top:0!important;margin-bottom:0!important}
.app > .top .tool-row .row-inner #zoomLabel,.app > .top .tool-row .row-inner .autosave-state{flex:0 0 auto!important;position:static!important;transform:none!important;white-space:nowrap!important}
.app > .top .hf73-build-tag{display:none!important}
/* Dropdown must anchor to View button, not the viewport or body. */
.app > .top .workshop-menus details.menu-drop > .menu-entries:not(.s2d-menu-portal){position:absolute!important;top:calc(100% + 5px)!important;left:0!important;right:auto!important;bottom:auto!important;width:max-content!important;min-width:220px!important;max-width:min(310px,calc(100vw - 20px))!important;max-height:min(65dvh,510px)!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:99999!important;transform:none!important}
#s2dHF64ViewGroups{overflow-y:auto!important;overflow-x:hidden!important;max-height:min(65dvh,510px)!important}
#s2dHF64ViewGroups details.hf64-view-group{position:relative!important;display:block!important;width:100%!important;max-width:100%!important;transform:none!important;margin:4px 0!important}
#s2dHF64ViewGroups details.hf64-view-group > summary{display:flex!important;align-items:center!important;justify-content:space-between!important;height:auto!important;min-height:37px!important;padding:8px 10px!important;white-space:normal!important}
@media(max-width:1500px){.app > .top .menu-row .brand{max-width:154px!important}.app > .top .menu-row .brand .site-wordmark{font-size:12px!important}.app > .top .menu-row .workshop-menus{gap:2px!important}.app > .top .menu-row #filename{width:140px!important;max-width:140px!important}.app > .top .menu-row #diagramType{width:155px!important;max-width:155px!important}}
@media(max-width:1140px){.app > .top .menu-row .row-inner{overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important}.app > .top .menu-row .menu-primary{flex:0 0 auto!important}.app > .top .menu-row .menu-meta{margin-left:0!important;flex:0 0 auto!important}}
@media(max-width:780px){.app > .top .top-row{flex-direction:row!important;align-items:center!important}.app > .top .top-row .row-inner{flex-direction:row!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}.app > .top .top-group{flex-wrap:nowrap!important}.app > .top .menu-row .menu-primary{flex:0 0 auto!important}}

/* HF75R2: navigation menus are fixed-height peers; portal positioned at the click target. */
.app > .top .workshop-menus > details.menu-drop{height:36px!important;max-height:36px!important;align-self:center!important;display:block!important;position:relative!important;contain:none!important}
.app > .top .workshop-menus > details.menu-drop > summary{height:36px!important;min-height:36px!important;line-height:20px!important;position:relative!important;display:flex!important;align-items:center!important}
.app > .top .workshop-menus > details.menu-drop > .menu-entries{position:absolute!important;top:calc(100% + 5px)!important;left:0!important;max-height:min(65dvh,510px)!important;z-index:99999!important}
body > .s2d-menu-portal{position:fixed!important;max-height:calc(100dvh - 100px)!important;z-index:2147483000!important}
.app > .top .menu-row .menu-primary,.app > .top .menu-row .workshop-menus{align-items:center!important;align-content:center!important}
.app > .top .menu-row .workshop-menus{flex-wrap:nowrap!important}
.app > .top #s2dProjectNavigation > summary{white-space:nowrap!important}

/* HF75-R2.1: Diagram name & type moved out of global header; keep same input IDs/handlers. */
#hf75r21DiagramMeta{display:flex;align-items:end;flex-wrap:wrap;gap:9px;padding:8px 13px;
  background:#12324b;border-bottom:1px solid #315c77;flex:0 0 auto;box-sizing:border-box;min-width:0}
#hf75r21DiagramMeta label{display:flex;flex-direction:column;gap:3px;min-width:170px;flex:1 1 200px;
  color:#d3efff;font:600 11px/1.2 system-ui,sans-serif}
#hf75r21DiagramMeta label:last-child{flex:0 1 265px}
#hf75r21DiagramMeta #filename,#hf75r21DiagramMeta #diagramType{
  height:34px;width:100%!important;min-width:0!important;max-width:100%!important;
  padding:5px 10px;border-radius:7px;border:1px solid #4b7394;
  color:#effaff;background:#10283d;box-sizing:border-box}
#hf75r21DiagramMeta[hidden]{display:none!important}
#s2dEditorEmptyWorkspace #hf75r21HomeReturn{
  background:#166182;color:white;border:1px solid #55bdd8;border-radius:9px;
  padding:10px 16px;margin:8px auto 0;font-weight:650;cursor:pointer}
#s2dEditorEmptyWorkspace #hf75r21HomeReturn:focus-visible{outline:3px solid #f7b650;outline-offset:2px}
@media(max-width:900px){#hf75r21DiagramMeta label:last-child{flex:1 1 180px}}
