/* Final CJK readability and contrast safeguards. */
.ying-template-home,
.ying-template-service,
.ying-template-services-overview,
.ying-template-story,
.ying-template-blog,
.ying-template-article {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.ying-template-home :is(h1, h2, h3, p, li, blockquote),
.ying-template-service :is(h1, h2, h3, p, li, blockquote),
.ying-template-services-overview :is(h1, h2, h3, p, li, blockquote),
.ying-template-story :is(h1, h2, h3, p, li, blockquote),
.ying-template-blog :is(h1, h2, h3, p, li, blockquote),
.ying-template-article :is(h1, h2, h3, p, li, blockquote) {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Type floor: these UI roles previously contained 9–11px rules. */
.ying-template-home :is(.hero-scroll, .post-cat, .post-date, .svc-type, .nl-fine),
.ying-template-service :is(.hero-note, .case-tag, .case-stat-label, .step-num, .step-output, .about-role, .pkg-label, .pkg-duration, .pkg-includes-label, .pkg-guarantee, .pkg-note, .testi-role, .bottom-cta-note),
.ying-template-services-overview :is(.services-overview-page-eyebrow, .services-overview-section-eyebrow, .services-overview-product-card__number, .services-overview-product-badge, .services-overview-soon-number, .services-overview-soon-badge),
.ying-template-story :is(.story-hero__eyebrow, .story-numbers__eyebrow, .story-numbers__text, .story-chapter__number),
.ying-template-blog :is(.blog-eyebrow, .featured-label, .featured-cat, .featured-date, .post-cat, .post-date),
.ying-template-article :is(.article-back, .article-cat, .article-date, .article-read-time, .article-tag, .cta-service-eyebrow, .cta-service-note, .related-cat, .related-date) {
  font-size: 12px;
}

/* Dark surfaces need at least the secondary-text contrast tier. */
.ying-template-service .section--dark :is(.about-bio, .about-tag),
.ying-template-service .pkg-card--main :is(.pkg-label, .pkg-duration, .pkg-desc, .pkg-includes-label, .pkg-list li, .pkg-guarantee),
.ying-template-service .bottom-cta-sub,
.ying-template-blog .nl-banner-desc,
.ying-template-article .cta-service-desc {
  color: rgba(250, 249, 246, 0.72);
}

.ying-template-blog .nl-banner-eyebrow,
.ying-template-article .cta-service-eyebrow {
  color: rgba(250, 249, 246, 0.65);
}

/* Demo D3: every standard section heading uses the 42px role. */
.ying-template-home :is(.about-title, .nl-title, .worlds-title, .posts-title, .svc-title),
.ying-template-service :is(.section-title, .bottom-cta-title),
.ying-template-story .story-closing__title,
.ying-template-blog .nl-banner-title,
.ying-template-services-overview :is(.services-overview-page-title, .services-overview-section-title, .services-overview-newsletter-title, .services-overview-section__title, .services-overview-newsletter__title) {
  font-size: 42px;
}

/* Demo D4: “看全部” remains a secondary text link. */
.ying-template-home .posts-header .btn-text {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(158, 74, 30, 0.35);
  border-radius: 0;
  box-shadow: none;
  color: #9e4a1e;
  min-height: 0;
  padding: 0 0 2px;
}

/* Demo D5: scoped legacy rules must not restore solid pills or dashed cards. */
.ying-template-home .svc-card--soon {
  border-color: rgba(250, 249, 246, 0.12);
  border-style: solid;
  opacity: 0.45;
}

.ying-template-home .svc-type--soon {
  background: rgba(250, 249, 246, 0.06);
  border: 0;
  color: rgba(250, 249, 246, 0.6);
}

.ying-template-service .hero-badge {
  background: transparent;
  border: 1px solid rgba(158, 74, 30, 0.35);
  color: #9e4a1e;
}

.ying-template-services-overview .services-overview-soon-badge {
  background: transparent;
  border: 1px solid rgba(28, 26, 20, 0.2);
  color: #68645d;
}

.ying-template-services-overview .services-overview-soon-card {
  border-color: rgba(28, 26, 20, 0.08);
  border-style: solid;
  opacity: 0.45;
}

/* Marketing-service closing CTA: prevent CJK lines from being clipped. */
.ying-template-service .bottom-cta,
.ying-template-service .bottom-cta > *,
.ying-template-service .bottom-cta-right {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.ying-template-service .bottom-cta > * {
  position: relative;
  z-index: 1;
}

.ying-template-service .bottom-cta-title {
  color: rgba(250, 249, 246, 0.9);
  overflow-wrap: anywhere;
  word-break: normal;
}

.ying-template-service .bottom-cta-sub {
  color: rgba(250, 249, 246, 0.72);
}

.ying-template-service .bottom-cta-note {
  color: rgba(250, 249, 246, 0.6);
  font-size: 12px;
}

.ying-template-article .cta-service-note {
  color: rgba(250, 249, 246, 0.6);
}

@media (max-width: 768px) {
  .ying-template-home :is(h1, h2, h3, p, li, blockquote),
  .ying-template-service :is(h1, h2, h3, p, li, blockquote),
  .ying-template-services-overview :is(h1, h2, h3, p, li, blockquote),
  .ying-template-story :is(h1, h2, h3, p, li, blockquote),
  .ying-template-blog :is(h1, h2, h3, p, li, blockquote),
  .ying-template-article :is(h1, h2, h3, p, li, blockquote) {
    white-space: normal;
  }

  .ying-template-service .bottom-cta-section {
    overflow: hidden;
    padding-bottom: 56px;
  }

  .ying-template-service .bottom-cta {
    gap: 26px;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    padding: 32px 22px;
    width: 100%;
  }

  .ying-template-service .bottom-cta::before {
    height: 280px;
    right: -120px;
    top: -80px;
    width: 280px;
  }

  .ying-template-service .bottom-cta-title {
    font-size: 30px;
    line-height: 1.45;
    margin-bottom: 14px;
    text-wrap: pretty;
  }

  .ying-template-service .bottom-cta-sub,
  .ying-template-service .bottom-cta-sub p {
    font-size: 16px;
    line-height: 1.8;
    max-width: none;
  }

  .ying-template-service .bottom-cta-right {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    width: 100%;
  }

  .ying-template-service .bottom-cta-right .btn {
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    text-align: center;
    white-space: normal;
    width: 100%;
  }

  .ying-template-service .bottom-cta-note,
  .ying-template-service .bottom-cta-note p {
    font-size: 13px;
    line-height: 1.65;
    margin: 0;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .ying-template-service .bottom-cta {
    padding-inline: 18px;
  }

  .ying-template-service .bottom-cta-title {
    font-size: 28px;
  }
}
