/* NS PARTNERS — Responsive stabilization 3.9.163 / 3.9.164.
   Scoped overrides loaded after primary theme CSS. No content or desktop layout changes. */
@media (max-width: 1280px) and (min-width: 1025px) {
  /* Avoid desktop navigation colliding on 13-inch laptops. */
  .site-header .nav-menu-wrap, .site-header #ns-primary-menu {display:none!important;}
  .site-header .nav-toggle {display:flex!important;}
  .site-header .nav-inner {padding-inline:clamp(18px,2.6vw,32px)!important;}
  .site-header .nav-cta {display:none!important;}
  .site-header .mobile-nav {max-width:100vw;}
}
@media (max-width: 1024px) {
  /* Mobile menu must remain usable when labels wrap and browser zoom is enabled. */
  .mobile-nav {height:calc(100dvh - var(--nav-h));bottom:auto;max-height:calc(100dvh - var(--nav-h));overscroll-behavior:contain;}
  .mobile-nav a {overflow-wrap:anywhere;}
  .nav-inner {min-width:0;}
  .sub-nav {max-width:100%;overscroll-behavior-inline:contain;}
  .sub-nav a {white-space:nowrap;flex-shrink:0;}
  /* Prevent grid items and form controls causing document-wide overflow. */
  .grid2 > *, .grid3 > *, .grid4 > *, .ns-connect-grid > *,
  .footer-top > *, .split > * {min-width:0;max-width:100%;}
  input,select,textarea {max-width:100%;}
  .ns-article-body img, .ns-editorial-content-wrap img {max-width:100%;height:auto;}
  .ns-article-body iframe,.ns-editorial-content-wrap iframe {max-width:100%;}
  .ns-article-body table,.ns-editorial-content-wrap table {max-width:100%;}
  .ns-insights-v2 .ns-featured-inner {grid-template-columns:minmax(0,1fr)!important;}
  .ns-insights-v2 .ns-featured-img {width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;max-height:none!important;}
  .ns-insights-v2 .ns-featured-img img {display:block!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;object-position:center center!important;}
  .ns-insights-v2 .ns-featured-body {min-width:0;}
  .ns-about-v21 .ns-talent-modal-panel {max-width:calc(100vw - 24px);}
}
@media (max-width: 768px) {
  /* Respect full editorial illustrations and avoid cropped media in Posts. */
  body.single-post .ns-editorial-cover img.ns-editorial-cover-image {max-width:100%!important;width:auto!important;height:auto!important;max-height:none!important;object-fit:contain!important;}
  body.single-post .ns-editorial-masthead,body.single-post .ns-editorial-content-wrap {max-width:100%;}
  .ns-article-body figure,.ns-article-body .wp-block-image {max-width:100%;}
  .ns-article-body .wp-block-embed {max-width:100%;overflow:hidden;}
  .ns-article-body .wp-block-embed iframe {max-width:100%;}
  .ns-insights-v2 .ns-featured, .ns-insights-v2 .ns-featured-inner {width:100%;max-width:100%;min-width:0;}
  .ns-insights-v2 .ns-featured-title {overflow-wrap:break-word;hyphens:auto;}
  .ns-insights-v2 .ns-featured-body {padding:clamp(20px,5vw,34px)!important;}
  .ns-about-v21 #people .ns-talent-track-wrap {width:100%;max-width:100%;overflow:hidden!important;}
  .ns-about-v21 #people .ns-talent-card {min-width:0;}
  .ns-about-v21 .ns-talent-modal-panel {inset:0!important;max-width:100vw!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(135px,34dvh) minmax(0,1fr)!important;}
  .ns-about-v21 .ns-talent-modal-content {min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;padding:26px 20px 70px!important;}
  .ns-about-v21 .ns-talent-modal-media {min-height:0!important;overflow:hidden;}
  .ns-about-v21 .ns-talent-modal-close {z-index:15;min-width:44px;min-height:44px;}
  /* All wide tables (fund share classes, compliance and articles) scroll inside their section. */
  .ns-single-fund table,.ns-fund-prose table,.ns-legal-table, .ns-article-body table {display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .ns-single-fund .ns-fund-keyfacts {grid-template-columns:repeat(2,minmax(0,1fr));}
  .ns-single-fund .ns-fund-layout {grid-template-columns:minmax(0,1fr);}
  .ns-single-fund .ns-fund-side {position:static;max-width:100%;}
  .ns-single-fund .ns-fund-hero-grid {grid-template-columns:minmax(0,1fr);}
  .ns-single-fund .ns-sc-select-row {grid-template-columns:minmax(0,1fr);gap:10px;}
  .ns-single-fund select,.ns-single-fund input,.ns-single-fund textarea {max-width:100%;}
}
@media (max-width: 480px) {
  .ns-about-v21 #people .ns-talent-carousel-section {padding-inline:14px!important;}
  .ns-about-v21 #people.ns-about-people-carousel {padding-inline:14px!important;}
  .ns-about-v21 #people .ns-talent-photo {height:clamp(240px,70vw,300px)!important;}
  .ns-about-v21 .ns-talent-modal-panel {grid-template-rows:minmax(120px,29dvh) minmax(0,1fr)!important;}
  .ns-single-fund .ns-fund-keyfacts,.ns-single-fund .ns-fund-grid {grid-template-columns:minmax(0,1fr);}
  .ns-insights-v2 .ns-featured-body {padding:22px 17px!important;}
}
@media (prefers-reduced-motion: reduce) {
  .ns-about-v21 .ns-talent-photo img {transition:none!important;}
}
