/* Structune Hub V17.7.4.432 — shared-shell A3 geometry, visible header and bounded drawers. */
:root{
  --v432-header-h:48px;
  --v432-footer-h:48px;
  --v432-a3-ratio:1.4142135623730951;
  --v432-available-h:calc(100dvh - var(--v432-header-h) - var(--v432-footer-h));
  --v432-viewport-w:calc(var(--v432-available-h) * var(--v432-a3-ratio));
  --v432-viewport-h:var(--v432-available-h);
  --v432-viewport-x:calc((100vw - var(--v432-viewport-w)) / 2);
  --v432-viewport-y:var(--v432-header-h);
  --v432-side-space:var(--v432-viewport-x);
  --v432-drawer-w:var(--v432-side-space);
}

html[data-structune-shell="v432"],
html[data-structune-shell="v432"] body.v432-shell-geometry{width:100%;height:100%;overflow:hidden!important}

/* Header and footer are included in the window height, never added outside it. */
html[data-structune-shell="v432"] body.v432-shell-geometry .topbar.v17-project-topbar{
  position:fixed!important;inset:0 0 auto 0!important;width:100vw!important;
  height:var(--v432-header-h)!important;min-height:var(--v432-header-h)!important;max-height:var(--v432-header-h)!important;
  display:flex!important;visibility:visible!important;opacity:1!important;z-index:5000!important;
}
html[data-structune-shell="v432"] body.v432-shell-geometry .v17-bottom-bar{
  position:fixed!important;inset:auto 0 0 0!important;width:100vw!important;
  height:var(--v432-footer-h)!important;min-height:var(--v432-footer-h)!important;max-height:var(--v432-footer-h)!important;
}

/* The shell itself is the A3 work region. Page content scrolls inside it. */
html[data-structune-shell="v432"] body.v432-shell-geometry .app:not(.access-mode){
  position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;min-height:0!important;
  display:block!important;background:var(--v17-bar,#0B1723)!important;
}
html[data-structune-shell="v432"] body.v432-shell-geometry .shell{
  position:fixed!important;left:var(--v432-viewport-x)!important;top:var(--v432-viewport-y)!important;
  width:var(--v432-viewport-w)!important;min-width:0!important;max-width:var(--v432-viewport-w)!important;
  height:var(--v432-viewport-h)!important;min-height:0!important;max-height:var(--v432-viewport-h)!important;
  display:block!important;overflow:visible!important;background:var(--v17-view,#1f2933)!important;
  aspect-ratio:var(--v432-a3-ratio) / 1!important;
}
/* The header is a child of .shell on every application route. Keep the shell
   unclipped so the fixed header can occupy y=0..48, while each work host keeps
   its own existing bounded overflow behaviour inside the A3 rectangle. */
html[data-structune-shell="v432"] body.v432-shell-geometry :is(.workspace,.content){
  position:absolute!important;inset:0!important;left:0!important;right:0!important;top:0!important;bottom:0!important;
  width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;min-height:0!important;
}
html[data-structune-shell="v432"] body.v432-shell-geometry[class*="-constrained"] .content > .view,
html[data-structune-shell="v432"] body.v432-shell-geometry #view-ar-site-setout{
  left:0!important;right:0!important;width:100%!important;max-width:100%!important;min-width:0!important;
}

/* Persistent desktop lanes use the exact space remaining beside the A3 viewport. */
html[data-structune-shell="v432"] body.v432-shell-geometry .sidebar{
  position:fixed!important;left:0!important;top:var(--v432-header-h)!important;bottom:var(--v432-footer-h)!important;
  width:var(--v432-drawer-w)!important;min-width:0!important;max-width:none!important;height:auto!important;margin:0!important;
}
html[data-structune-shell="v432"] body.v432-shell-geometry .side-panels,
html[data-structune-shell="v432"] body.v432-shell-geometry #view-ar-view .ar-view-side-panels,
html[data-structune-shell="v432"] body.v432-shell-geometry .ar-site-setout-side{
  position:fixed!important;right:0!important;top:var(--v432-header-h)!important;bottom:var(--v432-footer-h)!important;
  width:var(--v432-drawer-w)!important;min-width:0!important;max-width:none!important;height:auto!important;
}
html[data-structune-shell="v432"][data-shell-layout="full"] body.v432-shell-geometry.v17-left-open .sidebar{transform:translateX(0)!important}
html[data-structune-shell="v432"][data-shell-layout="full"] body.v432-shell-geometry.v17-right-open .side-panels{transform:translateX(0)!important}

/* Drawer handles follow the calculated drawer edge without resizing the viewport. */
html[data-structune-shell="v432"] body.v432-shell-geometry.v17-left-open button.v17-left-handle{left:calc(var(--v432-drawer-w) - var(--structune-drawer-opener-width,27px))!important}
html[data-structune-shell="v432"] body.v432-shell-geometry.v17-right-open button.v17-right-handle{right:var(--v432-drawer-w)!important}

/* Compact navigation rail. Context content becomes an overlay because it is not useful at rail width. */
html[data-structune-shell="v432"][data-shell-layout="rail"] body.v432-shell-geometry .sidebar :is(.brand,.brand-tag,.nav span,.side-footer){display:none!important}
html[data-structune-shell="v432"][data-shell-layout="rail"] body.v432-shell-geometry .sidebar .nav{padding:10px 4px!important}
html[data-structune-shell="v432"][data-shell-layout="rail"] body.v432-shell-geometry .sidebar :is(.nav a,.nav button){justify-content:center!important;padding:11px 4px!important;gap:0!important}
html[data-structune-shell="v432"][data-shell-layout="rail"] body.v432-shell-geometry .side-panels{
  width:min(360px,86vw)!important;min-width:0!important;max-width:min(360px,86vw)!important;transform:translateX(102%)!important;
}
html[data-structune-shell="v432"][data-shell-layout="rail"] body.v432-shell-geometry.v17-right-open .side-panels{transform:translateX(0)!important}
html[data-structune-shell="v432"][data-shell-layout="rail"] body.v432-shell-geometry.v17-right-open button.v17-right-handle{right:min(360px,86vw)!important}

/* Width-limited screens use overlay drawers; opening either drawer never changes A3 geometry. */
html[data-structune-shell="v432"][data-shell-layout="overlay"] body.v432-shell-geometry .sidebar,
html[data-structune-shell="v432"][data-shell-layout="overlay"] body.v432-shell-geometry .side-panels{
  width:min(360px,86vw)!important;min-width:0!important;max-width:min(360px,86vw)!important;
}
html[data-structune-shell="v432"][data-shell-layout="overlay"] body.v432-shell-geometry.v17-left-open button.v17-left-handle{left:calc(min(360px,86vw) - var(--structune-drawer-opener-width,27px))!important}
html[data-structune-shell="v432"][data-shell-layout="overlay"] body.v432-shell-geometry.v17-right-open button.v17-right-handle{right:min(360px,86vw)!important}

/* Align the header brand with the navigation lane at the desktop reference geometry. */
html[data-structune-shell="v432"][data-shell-layout="full"] body.v432-shell-geometry .topbar.v17-project-topbar .v17-topbar-brand{
  width:var(--v432-drawer-w)!important;min-width:var(--v432-drawer-w)!important;max-width:var(--v432-drawer-w)!important;flex-basis:var(--v432-drawer-w)!important;
}
html[data-structune-shell="v432"][data-shell-layout="rail"] body.v432-shell-geometry .topbar.v17-project-topbar .v17-topbar-brand .brand-tag{display:none!important}

/* Tools remain inside the 48px footer and retain their existing interaction model. */
html[data-structune-shell="v432"] body.v432-shell-geometry .v17-bottom-bar > :is(.v17-tools-fab,.ar-tools-fab){bottom:auto!important}

@media (max-width:820px){
  html[data-structune-shell="v432"] body.v432-shell-geometry .topbar.v17-project-topbar{padding-right:8px!important}
  html[data-structune-shell="v432"] body.v432-shell-geometry .v17-bottom-copyright{max-width:calc(100vw - 20px)!important}
}
