/*
 * Wide-screen composition guardrails.
 *
 * Korthos' analytical pages already use bounded reading widths. Directory and
 * profile shells are intentionally denser, but allowing those shells to span
 * an unlimited viewport makes cards and two-column modules look stretched on
 * full-HD and ultrawide displays or when a browser is zoomed out. Keep laptop
 * behavior unchanged, then center a stable working canvas.
 */
:root {
  --korthos-wide-shell-max: 1480px;
}

@media (min-width: 1500px) {
  html body > main:not(#profile-main):not(#product-main):not(.k-section):not(.private-page),
  html body.page-scp > .scp-wrap {
    width: 100% !important;
    max-width: var(--korthos-wide-shell-max) !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }

  /*
   * Name newer public shells explicitly. This keeps their wide-screen
   * contract stable even when a page-specific redesign carries a later,
   * wider !important rule (Market Overview previously expanded to 1760px).
   */
  html body.marketplace-page > main.market-page,
  html body.discovery-listing-page > main.discovery-shell,
  html body.discovery-intake-page > main.intake-shell,
  html body.discovery-commercial-page > main.discovery-page,
  html body.page-funding-monitor > .fm-body-shell > main.page-main.fm-page-main,
  html body.page-market-signals > main.ms-shell,
  html body.page-markets-overview > .fm-body-shell > main.page-main.fm-page-main {
    width: 100% !important;
    max-width: var(--korthos-wide-shell-max) !important;
    margin-inline: auto !important;
    box-sizing: border-box !important;
  }

  html body.company-directory-page .page-content .ecosystem-directory-shell,
  html body.product-directory-page .k-section.signal-feed-page .product-directory-shell,
  html body.supplier-directory-page .supplier-directory-shell,
  html body.component-directory-page .component-directory-shell,
  html body.research-artifact-page .supplier-directory-shell.research-layout,
  html body.product-research-page .directory-shell {
    width: 100% !important;
    max-width: var(--korthos-wide-shell-max) !important;
    margin-inline: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body.component-directory-page .k-section.signal-feed-page > .component-directory-shell {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body main#profile-main.profile.page-container.ecosystem-profile-page .profile-desktop-shell,
  html body.page-product main#product-main.profile.ecosystem-profile-page .product-desktop-shell {
    width: 100% !important;
    max-width: var(--korthos-wide-shell-max) !important;
    margin-inline: auto !important;
  }
}
