/* TINMALL V4.2.68 — public typography safety layer
   Loaded last so legacy responsive rules cannot enlarge long dynamic titles. */

:where(
  .page-hero h1,
  .pdp-info h1,
  .server-product>h1,
  .article-header h1,
  .article>h1,
  .blog-featured h2,
  .partner-landing-copy h1,
  .tm-server-partner-intro h1,
  .partner-welcome h1,
  .success-page h1,
  .tm-order-result h1,
  .auth-brand h1,
  .error-page h1
){
  overflow-wrap:break-word;
  word-break:normal;
  text-wrap:balance;
}

/* Dynamic product names: consistent before and after JavaScript hydration. */
.product-body h2,
.product-body h3{
  margin:7px 0 9px;
  color:var(--purple-900);
  font-family:var(--font-ui);
  font-size:var(--fs-card-title);
  font-weight:740;
  line-height:1.42;
  letter-spacing:-.012em;
  overflow-wrap:break-word;
  text-wrap:pretty;
}

.pdp-info h1,
.server-product>h1{
  max-width:30ch;
  margin:9px 0 14px;
  color:var(--purple-900);
  font-family:var(--font-ui);
  font-size:clamp(1.75rem,2.55vw,2.25rem);
  font-weight:760;
  line-height:1.24;
  letter-spacing:-.025em;
}

/* Page, category and editorial titles. */
.page-hero .shell>h1{
  max-width:27ch;
  font-size:clamp(1.9rem,3.25vw,2.75rem);
  line-height:1.16;
  letter-spacing:-.025em;
}
.article-header h1,
.article>h1{
  max-width:25ch;
  margin-inline:auto;
  font-size:clamp(2rem,4.2vw,3.25rem);
  line-height:1.12;
  letter-spacing:-.028em;
}
.blog-featured h2{
  max-width:24ch;
  font-size:clamp(1.55rem,2.55vw,2.2rem);
  line-height:1.2;
  letter-spacing:-.018em;
  overflow-wrap:break-word;
  text-wrap:balance;
}
.article-body h2,
.home-editorial-body h3{
  overflow-wrap:break-word;
  text-wrap:pretty;
}

/* Marketing and partner pages keep hierarchy without dominating the viewport. */
.partner-landing-copy h1,
.tm-server-partner-intro h1{
  max-width:18ch;
  font-size:clamp(2.35rem,4.2vw,3.45rem);
  line-height:1.1;
  letter-spacing:-.028em;
}
.section-heading h2,
.partner-highlight h2,
.distributor-story h2{
  max-width:28ch;
  font-size:clamp(1.65rem,2.7vw,2.35rem);
  line-height:1.18;
  letter-spacing:-.018em;
  overflow-wrap:break-word;
  text-wrap:balance;
}
.success-page h1,
.tm-order-result h1,
.error-page h1{
  font-size:clamp(1.85rem,3.5vw,2.75rem);
  line-height:1.18;
}
.trace-card .notice h2{
  margin:0 0 8px;
  color:var(--purple-900);
  font-size:1.2rem;
  line-height:1.35;
  overflow-wrap:break-word;
}

/* Partner Board is a separate shell, so it is covered here too. */
.partner-welcome h1{
  max-width:24ch;
  font-size:clamp(1.9rem,3.4vw,2.65rem);
  line-height:1.18;
  letter-spacing:-.022em;
}

@media(max-width:600px){
  .product-body h2,
  .product-body h3{
    font-size:.98rem;
    line-height:1.4;
    letter-spacing:-.008em;
  }
  .pdp-info h1,
  .server-product>h1{
    max-width:none;
    margin:8px 0 12px;
    font-size:clamp(1.35rem,5.9vw,1.55rem);
    font-weight:740;
    line-height:1.3;
    letter-spacing:-.018em;
    text-wrap:pretty;
  }
  .page-hero .shell>h1{
    max-width:none;
    font-size:clamp(1.55rem,6.7vw,1.75rem);
    line-height:1.23;
    letter-spacing:-.018em;
    text-wrap:pretty;
  }
  .article-header h1,
  .article>h1{
    max-width:none;
    margin-inline:0;
    font-size:clamp(1.55rem,6.8vw,1.8rem);
    line-height:1.22;
    letter-spacing:-.02em;
    text-wrap:pretty;
  }
  .blog-featured h2{
    max-width:none;
    font-size:1.4rem;
    line-height:1.25;
    text-wrap:pretty;
  }
  .partner-landing-copy h1,
  .tm-server-partner-intro h1{
    max-width:19ch;
    font-size:clamp(1.75rem,7.8vw,2rem);
    line-height:1.16;
    letter-spacing:-.02em;
    text-wrap:pretty;
  }
  .section-heading h2,
  .partner-highlight h2,
  .distributor-story h2{
    max-width:none;
    font-size:clamp(1.35rem,6.1vw,1.55rem);
    line-height:1.24;
    letter-spacing:-.012em;
    text-wrap:pretty;
  }
  .success-page h1,
  .tm-order-result h1,
  .auth-brand h1,
  .error-page h1{
    font-size:clamp(1.5rem,6.6vw,1.75rem);
    line-height:1.23;
    text-wrap:pretty;
  }
  .partner-welcome h1{
    max-width:none;
    font-size:clamp(1.55rem,6.8vw,1.8rem);
    line-height:1.23;
    text-wrap:pretty;
  }
}

@media(max-width:380px){
  .pdp-info h1,
  .server-product>h1{font-size:1.32rem}
  .page-hero .shell>h1,
  .article-header h1,
  .article>h1{font-size:1.5rem}
}
