/* Nunky type scale v4 — single hierarchy for products and services */
:root{
  --nk-detail-h1:var(--type-h1-size,clamp(2.25rem,3.45vw,3.55rem));
  --nk-detail-h2:var(--type-h2-size,clamp(2rem,3.45vw,3.45rem));
  --nk-detail-h3:var(--type-h3-size,clamp(1.28rem,1.7vw,1.65rem));
  --nk-detail-lead:var(--type-lead-size,1rem);
  --nk-detail-body:var(--type-body-size,1rem);
  --nk-detail-kicker:var(--type-kicker-size,.825rem);
}

/* Same page title on every product, individual service and service family */:where(body:has(main:not(.product-page))) :is(
  .product-editorial-unified,
  .service-editorial-unified,
  .family-editorial-unified,
  .nunky-editorial-product,
  .editorial-refresh,
  .product-detail-page,
  .closing-service-family
) :is(
  .nunky-editorial-hero,
  .ppx-hero,
  .ep-hero,
  .detail-hero,
  .family-human-hero,
  .nunky-evolution-hero
) h1{
  font-family:var(--font-display)!important;
  font-size:var(--nk-detail-h1)!important;
  line-height:var(--type-h1-line,1.04)!important;
  letter-spacing:var(--type-h1-track,-.035em)!important;
  font-weight:var(--type-h1-weight,800)!important;
  max-width:28ch!important;
  margin:0!important;
  text-wrap:balance;
}

/* Same section-title hierarchy, regardless of old template */:where(body:has(main:not(.product-page))) :is(
  .product-editorial-unified,
  .service-editorial-unified,
  .family-editorial-unified,
  .nunky-editorial-product,
  .editorial-refresh,
  .product-detail-page,
  .closing-service-family
) main :is(h2,.section-title:is(h2),.ppx-gradient-title:is(h2)){
  font-family:var(--font-display)!important;
  font-size:var(--nk-detail-h2)!important;
  line-height:var(--type-h2-line,1.08)!important;
  letter-spacing:var(--type-h2-track,-.035em)!important;
  font-weight:var(--type-h2-weight,620)!important;
  max-width:32ch!important;
  text-wrap:balance;
}

/* Centered headings may be wider but never larger */:where(body:has(main:not(.product-page))) :is(
  .product-editorial-unified,
  .service-editorial-unified,
  .family-editorial-unified,
  .nunky-editorial-product,
  .editorial-refresh,
  .product-detail-page,
  .closing-service-family
) :is(.centered-heading,.section-heading.centered-heading,.nunky-editorial-heading,.ppx-section-heading) h2{
  max-width:32ch!important;
  margin-inline:auto!important;
}:where(body:has(main:not(.product-page))) :is(
  .product-editorial-unified,
  .service-editorial-unified,
  .family-editorial-unified,
  .nunky-editorial-product,
  .editorial-refresh,
  .product-detail-page,
  .closing-service-family
) main h3{
  font-family:var(--font-display)!important;
  font-size:var(--nk-detail-h3)!important;
  line-height:var(--type-h3-line,1.2)!important;
  letter-spacing:var(--type-h3-track,-.02em)!important;
  font-weight:var(--type-h3-weight,700)!important;
}

/* Leads and section descriptions share one readable measure */:where(body:has(main:not(.product-page))) :is(
  .product-editorial-unified,
  .service-editorial-unified,
  .family-editorial-unified,
  .nunky-editorial-product,
  .editorial-refresh,
  .product-detail-page,
  .closing-service-family
) :is(
  .section-subtitle,
  .ppx-lead,
  .ep-lead,
  .detail-hero-copy>p,
  .family-human-copy>.section-subtitle,
  .nunky-editorial-hero p
){
  font-size:var(--nk-detail-lead)!important;
  line-height:var(--type-lead-line,1.65)!important;
  max-width:58ch!important;
}:where(body:has(main:not(.product-page))) :is(
  .product-editorial-unified,
  .service-editorial-unified,
  .family-editorial-unified,
  .nunky-editorial-product,
  .editorial-refresh,
  .product-detail-page,
  .closing-service-family
) :is(.section-kicker,.ep-kicker,.family-hero-label,.ppx-kicker){
  font-size:var(--nk-detail-kicker)!important;
  line-height:var(--type-kicker-line,1.2)!important;
  letter-spacing:var(--type-kicker-track,.15em)!important;
  font-weight:var(--type-kicker-weight,900)!important;
  text-transform:uppercase!important;
}

/* Prevent local legacy rules from enlarging headings in special templates */
.evolution-refresh .nunky-evolution-copy h1,
.closing-service-family .family-human-copy h1,
.editorial-refresh .ep-hero h1,:where(body:has(main:not(.product-page))) .nunky-editorial-product .nunky-editorial-hero h1,
.service-editorial-unified .ppx-hero h1,
.product-detail-page .detail-hero h1{
  font-size:var(--nk-detail-h1)!important;
}

@media(max-width:820px){
  /* Escala heredada del sistema global HOME. */
}
@media(max-width:560px){
  /* Escala heredada del sistema global HOME. */:where(body:has(main:not(.product-page))) :is(
    .product-editorial-unified,
    .service-editorial-unified,
    .family-editorial-unified,
    .nunky-editorial-product,
    .editorial-refresh,
    .product-detail-page,
    .closing-service-family
  ) :is(.nunky-editorial-hero,.ppx-hero,.ep-hero,.detail-hero,.family-human-hero,.nunky-evolution-hero) h1{
    max-width:28ch!important;
  }
}
