/* Aurora Design Systems 40.1 — controlled zoom and responsive-stability layer.
   This stylesheet is deliberately loaded after legacy freeze rules.
   It preserves the desktop composition at normal widths, then allows a
   controlled reflow under browser zoom instead of crushing or clipping cards. */

:root {
  --aurora-page-gutter: clamp(16px, 2.4vw, 38px);
  --aurora-readable-max: 1920px;
}

html,
body {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

html {
  overflow-x: auto !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body {
  overflow-x: auto !important;
}

img,
picture,
svg,
video,
canvas {
  max-width: 100% !important;
  height: auto;
}

body > header,
header.aurora-uhd,
.site-header.aurora-uhd,
.aurora-uhd.site-header,
.site-header,
.ads-site-header,
.topbar,
.navbar,
.masthead {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

header.aurora-uhd .uhd-brand,
.site-header.aurora-uhd .uhd-brand,
.aurora-uhd .uhd-brand,
.site-header .brand {
  min-width: 0 !important;
}

header.aurora-uhd .uhd-search,
.site-header.aurora-uhd .uhd-search,
.aurora-uhd .uhd-search,
.top-search,
.ads-header-search {
  width: auto !important;
  min-width: min(280px, 100%) !important;
  max-width: 420px !important;
  flex: 1 1 320px !important;
}

header.aurora-uhd .uhd-nav,
.site-header.aurora-uhd .uhd-nav,
.aurora-uhd .uhd-nav,
nav.uhd-nav,
.top-nav,
.ads-nav {
  min-width: 0 !important;
  max-width: 100% !important;
  flex-wrap: wrap !important;
}

body.alpha-hospital-page,
body.ares-atlas-page,
body.space-atlas-page,
body.space-card-page,
body.space-systems-gateway {
  min-width: 0 !important;
}

@media (max-width: 1280px) {
  .page-shell,
  .page,
  .shell,
  .wrap,
  .container,
  .module-wrap,
  .site-main,
  .page-content,
  .content,
  .home-wow,
  .aurora-page,
  .bridge-wrap,
  .atlas-shell,
  .space-page-v2,
  .ah-shell,
  .ah-navwrap {
    width: calc(100% - (2 * var(--aurora-page-gutter))) !important;
    min-width: 0 !important;
    max-width: var(--aurora-readable-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .page-shell.simple.home-wow,
  body.alpha-hospital-page .ah-shell,
  body.alpha-hospital-page .ah-navwrap,
  body.ares-atlas-page .atlas-shell,
  body.space-atlas-page .atlas-shell,
  body.space-card-page .page-shell,
  body.space-card-page .shell,
  body.space-card-page .container,
  body.space-systems-gateway .page-shell,
  body.space-systems-gateway .space-page-v2 {
    width: calc(100% - (2 * var(--aurora-page-gutter))) !important;
    min-width: 0 !important;
    max-width: 1180px !important;
  }

  body > header,
  header.aurora-uhd,
  .site-header.aurora-uhd,
  .aurora-uhd.site-header,
  .site-header,
  .ads-site-header,
  .topbar,
  .navbar,
  .masthead {
    min-width: 0 !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  .home-grid,
  .home-card-grid,
  .card-grid,
  .cards-grid,
  .cards,
  .grid,
  .project-grid,
  .program-grid,
  .systems-grid,
  .research-grid,
  .division-grid,
  .feature-grid,
  .module-grid,
  .mission-grid,
  .doc-grid,
  .archive-grid,
  .book-grid,
  .books-grid,
  .organ-grid,
  .link-grid,
  .tile-grid,
  .gallery-grid,
  .render-grid,
  .figure-grid,
  .catalog-grid,
  .priority,
  .link-list,
  body.alpha-hospital-page .dept-grid,
  body.space-atlas-page .module-grid,
  body.space-card-page .module-grid,
  body.space-card-page .detail-grid,
  body.space-card-page .standards-grid,
  body.space-card-page .grid.tech-grid,
  body.space-card-page .grid.device-grid,
  body.space-card-page .folder-grid,
  body.space-card-page .navcards,
  body.space-systems-gateway .grid,
  body.space-systems-gateway .space-grid-v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .home-wow-card .card-content {
    width: min(68%, 700px) !important;
    min-width: 0 !important;
  }

  .home-wow-card::before {
    background-size: cover !important;
  }
}

@media (max-width: 920px) {
  header.aurora-uhd,
  .site-header.aurora-uhd,
  .aurora-uhd.site-header,
  .site-header,
  .ads-site-header {
    align-items: flex-start !important;
  }

  header.aurora-uhd .uhd-nav,
  .site-header.aurora-uhd .uhd-nav,
  .aurora-uhd .uhd-nav,
  .top-nav,
  .ads-nav {
    justify-content: flex-start !important;
  }

  .hero-grid,
  .split,
  .two-col,
  .two-column,
  .book-layout,
  .overview-grid,
  .detail-grid,
  .metrics-grid,
  .stats-grid,
  .dual-grid,
  .timeline-grid,
  .lead-grid,
  .featured-grid,
  .grid.featured,
  .wide-grid,
  .module-hero,
  .project-hero,
  .platform-section,
  .bridge-layout,
  body.space-atlas-page .atlas-board,
  body.space-atlas-page .hero-head {
    grid-template-columns: 1fr !important;
  }

  .home-grid,
  .home-card-grid,
  .card-grid,
  .cards-grid,
  .cards,
  .grid,
  .project-grid,
  .program-grid,
  .systems-grid,
  .research-grid,
  .division-grid,
  .feature-grid,
  .module-grid,
  .mission-grid,
  .doc-grid,
  .archive-grid,
  .book-grid,
  .books-grid,
  .organ-grid,
  .link-grid,
  .tile-grid,
  .gallery-grid,
  .render-grid,
  .figure-grid,
  .catalog-grid,
  body.alpha-hospital-page .dept-grid,
  body.space-atlas-page .module-grid,
  body.space-card-page .module-grid,
  body.space-card-page .detail-grid,
  body.space-card-page .standards-grid,
  body.space-card-page .grid.tech-grid,
  body.space-card-page .grid.device-grid,
  body.space-card-page .folder-grid,
  body.space-card-page .navcards,
  body.space-systems-gateway .grid,
  body.space-systems-gateway .space-grid-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.space-atlas-page .atlas-nav {
    position: static !important;
    max-height: none !important;
  }

  body.alpha-hospital-page .metrics,
  body.alpha-hospital-page .feature-strip,
  body.alpha-hospital-page .bottom-cta,
  body.space-systems-gateway .space-cap-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.space-systems-gateway .space-hero-copy {
    width: min(100%, 740px) !important;
    max-width: 100% !important;
    padding: clamp(26px, 5vw, 52px) !important;
  }

  body.space-systems-gateway .space-hero-copy h1 {
    font-size: clamp(46px, 10vw, 72px) !important;
  }
}

@media (max-width: 620px) {
  :root {
    --aurora-page-gutter: 14px;
  }

  header.aurora-uhd,
  .site-header.aurora-uhd,
  .aurora-uhd.site-header,
  .site-header,
  .ads-site-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  header.aurora-uhd .uhd-search,
  .site-header.aurora-uhd .uhd-search,
  .aurora-uhd .uhd-search,
  .top-search,
  .ads-header-search {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .home-grid,
  .home-card-grid,
  .card-grid,
  .cards-grid,
  .cards,
  .grid,
  .project-grid,
  .program-grid,
  .systems-grid,
  .research-grid,
  .division-grid,
  .feature-grid,
  .module-grid,
  .mission-grid,
  .doc-grid,
  .archive-grid,
  .book-grid,
  .books-grid,
  .organ-grid,
  .link-grid,
  .tile-grid,
  .gallery-grid,
  .render-grid,
  .figure-grid,
  .catalog-grid,
  body.alpha-hospital-page .dept-grid,
  body.alpha-hospital-page .metrics,
  body.alpha-hospital-page .feature-strip,
  body.alpha-hospital-page .support-grid,
  body.alpha-hospital-page .bottom-cta,
  body.space-atlas-page .module-grid,
  body.space-card-page .module-grid,
  body.space-card-page .detail-grid,
  body.space-card-page .standards-grid,
  body.space-card-page .grid.tech-grid,
  body.space-card-page .grid.device-grid,
  body.space-card-page .folder-grid,
  body.space-card-page .navcards,
  body.space-systems-gateway .grid,
  body.space-systems-gateway .space-grid-v2,
  body.space-systems-gateway .space-cap-row {
    grid-template-columns: 1fr !important;
  }

  .home-wow-card .card-content {
    width: 100% !important;
  }
}
