/* NzehTunes 4.2.1 homepage density and brand polish. */
.nt-home-v42 .nt-card-grid:empty{display:none}
.nt-home-v42 .nt-section-heading + .nt-card-grid{min-height:0}

/* Give the brand more presence without crowding navigation. */
.site-header .nt-bundled-logo,
.site-header .nt-custom-logo,
.site-header .custom-logo-link{max-width:430px}
.site-header .nt-bundled-logo img,
.site-header .custom-logo{max-height:96px}
.nt-footer-brand img,
.nt-footer-custom-logo .custom-logo{max-width:340px}

/* Keep supporting-story text usable at common laptop widths. */
@media (min-width:1041px) and (max-width:1260px){
  .nt-home-v42 .nt-v4-hero-grid{grid-template-columns:minmax(0,1.55fr) minmax(330px,.95fr)}
  .nt-home-v42 .nt-v4-supporting .nt-card-compact{grid-template-columns:116px minmax(0,1fr)}
  .nt-home-v42 .nt-v4-supporting .nt-card-title{font-size:1rem}
  .nt-home-v42 .nt-v4-supporting .nt-card-excerpt{display:none}
}

/* Avoid a visually empty four-column row when a section has fewer items. */
.nt-home-v42 .nt-card-grid-4:has(> :only-child){grid-template-columns:minmax(260px,420px)}
.nt-home-v42 .nt-card-grid-4:has(> :nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr));max-width:820px}
.nt-home-v42 .nt-card-grid-4:has(> :nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
.nt-home-v42 .nt-card-grid-3:has(> :only-child){grid-template-columns:minmax(260px,420px)}
.nt-home-v42 .nt-card-grid-3:has(> :nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr));max-width:820px}

@media(max-width:782px){
  .site-header .nt-bundled-logo,
  .site-header .nt-custom-logo,
  .site-header .custom-logo-link{max-width:250px}
  .nt-home-v42 .nt-card-grid-3,
  .nt-home-v42 .nt-card-grid-4,
  .nt-home-v42 .nt-card-grid-4:has(> :only-child),
  .nt-home-v42 .nt-card-grid-4:has(> :nth-child(2):last-child),
  .nt-home-v42 .nt-card-grid-4:has(> :nth-child(3):last-child),
  .nt-home-v42 .nt-card-grid-3:has(> :only-child),
  .nt-home-v42 .nt-card-grid-3:has(> :nth-child(2):last-child){grid-template-columns:1fr;max-width:none}
}
