/* ui469-pc-only: one fixed desktop information architecture for every cockpit surface. */
:root {
  --ui466-canvas: 1280px;
  --ui466-sidebar: 238px;
  --ui466-gap: 18px;
}

html,
body,
#root,
#portal-root {
  min-width: var(--ui466-canvas) !important;
}

html body {
  overflow-x: auto !important;
  overflow-y: auto !important;
}

/* Narrow browser windows still show the complete PC canvas; there is no phone layout. */
html body #root,
html body #portal-root {
  width: max(var(--ui466-canvas), 100%) !important;
  max-width: none !important;
}

/* PC product contract: the visual canvas never collapses into a phone layout. */
html body #root,
html body #portal-root,
html body #root > *,
html body #portal-root > * {
  min-width: var(--ui466-canvas) !important;
}

/* The public site is desktop-only as well; keep its page rail on the same
   canvas so narrow browser windows never activate a phone composition. */
html body #root > .site-header,
html body #root > main,
html body #root > footer,
html body #root > .root-shell-loading {
  width: var(--ui466-canvas) !important;
  min-width: var(--ui466-canvas) !important;
  max-width: none !important;
}

html body #root .site-header > *,
html body #root main > *,
html body #root footer > * {
  min-width: 0 !important;
}

html body #root .site-header {
  min-width: var(--ui466-canvas) !important;
}

html body #root .site-header .menu-button,
html body #root .site-header .mobile-nav-actions,
html body #root .mobile-title {
  display: none !important;
}

html body #root .site-header .nav {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html body #portal-root main.portal-shell,
html body #root main.geo-admin-shell {
  box-sizing: border-box !important;
  width: max(var(--ui466-canvas), 100%) !important;
  min-width: var(--ui466-canvas) !important;
  margin-inline: 0 !important;
}

/* The desktop rail remains the only navigation model when the browser window is narrow. */
html body #portal-root main.portal-shell {
  display: grid !important;
  grid-template-columns: var(--ui466-sidebar) minmax(0, 1fr) !important;
  gap: var(--ui466-gap) !important;
  padding-inline: 0 !important;
}

html body #portal-root main.portal-shell .portal-header,
html body #root main.geo-admin-shell .geo-sidebar {
  width: var(--ui466-sidebar) !important;
  min-width: var(--ui466-sidebar) !important;
  max-width: var(--ui466-sidebar) !important;
  flex: 0 0 var(--ui466-sidebar) !important;
}

html body #portal-root main.portal-shell .portal-header {
  position: sticky !important;
  top: 16px !important;
  height: calc(100dvh - 32px) !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: auto !important;
}

html body #portal-root main.portal-shell .portal-content-stage,
html body #root main.geo-admin-shell .geo-workspace,
html body #root main.geo-admin-shell .geo-content {
  min-width: 0 !important;
  max-width: none !important;
}

html body #root main.geo-admin-shell {
  display: grid !important;
  grid-template-columns: var(--ui466-sidebar) minmax(0, 1fr) !important;
  gap: 0 !important;
}

html body #root main.geo-admin-shell .geo-sidebar {
  position: sticky !important;
  top: 0 !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: auto !important;
}

html body #root main.geo-admin-shell .geo-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  height: auto !important;
  min-height: 92px !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Remove phone-only affordances and their decorative motion from the rendered desktop product. */
html body #portal-root :is(.portal-mobile-nav, .mobile-nav, .mobile-nav-toggle, .mobile-menu, [data-mobile-only]),
html body #root :is(.geo-mobile-nav-hint, .mobile-portal-link, .mobile-nav, .mobile-nav-toggle, .mobile-nav-actions, .menu-button, .mobile-title, [data-mobile-only]) {
  display: none !important;
}

/* Keep the keyboard skip target compact; the fixed PC canvas must not turn it
   into a full-width grid item that extends beyond the canvas edge. */
html body #portal-root .portal-skip-link,
html body #root .geo-skip-link {
  width: max-content !important;
  min-width: 0 !important;
  max-width: max-content !important;
}

html body #root .desktop-title {
  display: inline !important;
}

html body #portal-root :is(.portal-mobile-nav, .mobile-nav, .mobile-menu)::before,
html body #root :is(.geo-mobile-nav-hint, .mobile-nav)::before {
  animation: none !important;
}

/* Keep dense desktop groups readable instead of allowing a narrow viewport rule to stack them. */
html body #portal-root main.portal-shell .portal-header .top-nav,
html body #root main.geo-admin-shell .geo-nav {
  display: grid !important;
  min-width: 0 !important;
  overflow: visible !important;
}

html body #root main.geo-admin-shell .geo-nav-group > summary {
  display: flex !important;
}

html body #root main.geo-admin-shell .geo-nav-group > .geo-nav-children {
  display: grid !important;
  min-width: 0 !important;
}

/* Final desktop cascade lock: legacy responsive layers contain repeated-ID
   selectors, so the PC contract must win with the same specificity. */
html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: var(--ui466-sidebar) minmax(0, 1fr) !important;
  grid-template-rows: auto 1fr !important;
  width: max(var(--ui466-canvas), 100%) !important;
  min-width: var(--ui466-canvas) !important;
  max-width: none !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow-x: clip !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-header,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell
  .geo-sidebar {
  box-sizing: border-box !important;
  grid-area: 1 / 1 / 3 !important;
  width: var(--ui466-sidebar) !important;
  min-width: var(--ui466-sidebar) !important;
  max-width: var(--ui466-sidebar) !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-status-strip,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell
  .geo-topbar {
  display: grid !important;
  grid-area: 1 / 2 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-content-stage,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell
  .geo-workspace {
  grid-area: 2 / 2 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  justify-self: stretch !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-status-strip {
  grid-template-columns: minmax(220px, 0.9fr) minmax(270px, 0.78fr) minmax(360px, 1.32fr) !important;
  overflow: hidden !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-content-stage {
  padding-inline: 12px !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-header
  .top-nav.sidebar-tree,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell
  .geo-sidebar
  .geo-nav {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: max-content !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-header {
  display: flex !important;
  flex-direction: column !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-header
  .client-nav-group,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell
  .geo-nav-group {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .portal-header
  .client-nav-group
  > button,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell
  .geo-nav-group
  > .geo-nav-children
  > button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

html body
  #portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root#portal-root
  main.portal-shell
  .project-picker,
html body
  #root#root#root#root#root#root#root#root#root#root
  main.geo-admin-shell
  .geo-topbar-actions {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (prefers-reduced-motion: reduce) {
  html body #portal-root *,
  html body #portal-root *::before,
  html body #portal-root *::after,
  html body #root *,
  html body #root *::before,
  html body #root *::after {
    animation: none !important;
    transition: none !important;
  }
}
