/*
 * Site typography: 新宋体 (NSimSun) site-wide.
 * Load after home.css to override Inter, ApexSerif Book, and din-2014.
 */

:root {
  --ipa-font-family: "NSimSun", "新宋体", SimSun, serif;

  /* Display scale: each step is two sizes smaller than home.css defaults */
  --ipa-display-xs: 1rem;
  --ipa-display-sm: 1.25rem;
  --ipa-display-md: 1.5625rem;
  --ipa-display-lg: 1.9375rem;
  --ipa-display-xl: 2.4375rem;
  --ipa-display-2xl: 3.0625rem;
  --ipa-display-3xl: 3.8125rem;
  --ipa-display-4xl: 4.75rem;
  --ipa-section-title-size: var(--ipa-display-lg);
  --ipa-section-title-size-lg: var(--ipa-display-xl);
  --ipa-page-title-size: var(--ipa-display-xl);
  --ipa-page-title-size-lg: var(--ipa-display-2xl);

  /* 内页正文：18px @ 16px root */
  --ipa-body-text-size: 1.125rem;
  --ipa-body-text-line-height: 1.75;

  /* 内页富文本 h3 标题色 */
  --ipa-rich-h3-color: oklch(0.3152 0.1176 262.41);

  /* 会员要求页 h4（子标题，梅紫色） */
  --ipa-rich-h4-color: #992785;
  --ipa-rich-h4-size: var(--ipa-display-sm);
  --ipa-rich-h4-line-height: 1.35;

  /* 正文内文字链接（海军蓝 + 下划线） */
  --ipa-link-color: #0d2c6c;
  --ipa-link-hover-color: oklch(0.2305 0.0781 262.98);
  --ipa-link-underline-thickness: 2px;
  --ipa-link-underline-offset: 4px;
}

html,
:host,
body {
  font-family: var(--ipa-font-family) !important;
}

.font-inter,
.font-din,
.font-apex-book {
  font-family: var(--ipa-font-family) !important;
}

#root :where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  span,
  a,
  button,
  label,
  input,
  textarea,
  select,
  option,
  li,
  td,
  th,
  div,
  figcaption,
  blockquote,
  strong,
  em,
  small
) {
  font-family: var(--ipa-font-family) !important;
}

.umb-rte,
.umb-rte :is(h1, h2, h3, h4, h5, h6, p, span, a, li, div),
[data-rte="true"],
[data-rte="true"] :is(h1, h2, h3, h4, h5, h6, p, span, a, li, div) {
  font-family: var(--ipa-font-family) !important;
}

[data-type="desktop-navigation"],
[data-type="desktop-navigation"] *,
[data-type="mobile-navigation"],
[data-type="mobile-navigation"] *,
.footer-main,
.footer-main * {
  font-family: var(--ipa-font-family) !important;
}

/* Footer copyright: inline badge icon must not break the sentence onto extra lines */
.footer-main .footer-copyright-text [data-rte="true"] img {
  display: inline-block;
  vertical-align: middle;
  max-width: none;
  height: auto;
}

.footer-main .footer-copyright-text [data-rte="true"] a {
  display: inline;
  white-space: normal;
}

.footer-main .footer-copyright-text [data-rte="true"] p {
  display: block;
  margin-bottom: 0;
}

.footer-main .footer-copyright-text [data-rte="true"] > div {
  display: inline;
  margin-bottom: 0;
  min-height: 0;
}

/* Footer 免责声明 / 版权：富文本强制全站字体（新宋体） */
#footer-disclaimer [data-rte="true"],
#footer-disclaimer [data-rte="true"] :is(p, span, a, div, li, strong, em),
.footer-copyright-text [data-rte="true"],
.footer-copyright-text [data-rte="true"] :is(p, span, a, div, li, strong, em) {
  font-family: var(--ipa-font-family) !important;
}

/*
 * Display typography: site-wide scale down two steps (xs through 4xl).
 * Loaded after home.css so these overrides apply everywhere.
 */
.text-display-xs {
  font-size: var(--ipa-display-xs) !important;
  line-height: 1.4;
}

.text-display-sm {
  font-size: var(--ipa-display-sm) !important;
  line-height: 1.4;
}

.text-display-md {
  font-size: var(--ipa-display-md) !important;
  line-height: 1.4;
}

.text-display-lg {
  font-size: var(--ipa-display-lg) !important;
  line-height: 1.4;
}

.text-display-xl {
  font-size: var(--ipa-display-xl) !important;
  line-height: 1.2;
}

.text-display-2xl {
  font-size: var(--ipa-display-2xl) !important;
  line-height: 1.2;
}

.text-display-3xl {
  font-size: var(--ipa-display-3xl) !important;
  line-height: 1.2;
}

.text-display-4xl {
  font-size: var(--ipa-display-4xl) !important;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .md\:text-display-xs {
    font-size: var(--ipa-display-xs) !important;
    line-height: 1.4;
  }

  .md\:text-display-sm {
    font-size: var(--ipa-display-sm) !important;
    line-height: 1.4;
  }

  .md\:text-display-md {
    font-size: var(--ipa-display-md) !important;
    line-height: 1.4;
  }

  .md\:text-display-lg {
    font-size: var(--ipa-display-lg) !important;
    line-height: 1.4;
  }

  .md\:text-display-xl {
    font-size: var(--ipa-display-xl) !important;
    line-height: 1.2;
  }

  .md\:text-display-2xl {
    font-size: var(--ipa-display-2xl) !important;
    line-height: 1.2;
  }

  .md\:text-display-3xl {
    font-size: var(--ipa-display-3xl) !important;
    line-height: 1.2;
  }

  .md\:text-display-4xl {
    font-size: var(--ipa-display-4xl) !important;
    line-height: 1.15;
  }
}

@media (min-width: 1024px) {
  .lg\:text-display-xs {
    font-size: var(--ipa-display-xs) !important;
    line-height: 1.4;
  }

  .lg\:text-display-sm {
    font-size: var(--ipa-display-sm) !important;
    line-height: 1.4;
  }

  .lg\:text-display-md {
    font-size: var(--ipa-display-md) !important;
    line-height: 1.4;
  }

  .lg\:text-display-lg {
    font-size: var(--ipa-display-lg) !important;
    line-height: 1.4;
  }

  .lg\:text-display-xl {
    font-size: var(--ipa-display-xl) !important;
    line-height: 1.2;
  }

  .lg\:text-display-2xl {
    font-size: var(--ipa-display-2xl) !important;
    line-height: 1.2;
  }

  .lg\:text-display-3xl {
    font-size: var(--ipa-display-3xl) !important;
    line-height: 1.2;
  }

  .lg\:text-display-4xl {
    font-size: var(--ipa-display-4xl) !important;
    line-height: 1.15;
  }
}

@media not all and (min-width: 768px) {
  .max-md\:text-display-xs {
    font-size: var(--ipa-display-xs) !important;
    line-height: 1.4;
  }

  .max-md\:text-display-sm {
    font-size: var(--ipa-display-sm) !important;
    line-height: 1.4;
  }

  .max-md\:text-display-md {
    font-size: var(--ipa-display-md) !important;
    line-height: 1.4;
  }

  .max-md\:text-display-lg {
    font-size: var(--ipa-display-lg) !important;
    line-height: 1.4;
  }

  .max-md\:text-display-xl {
    font-size: var(--ipa-display-xl) !important;
    line-height: 1.2;
  }

  .max-md\:text-display-2xl {
    font-size: var(--ipa-display-2xl) !important;
    line-height: 1.2;
  }

  .max-md\:text-display-3xl {
    font-size: var(--ipa-display-3xl) !important;
    line-height: 1.2;
  }

  .max-md\:text-display-4xl {
    font-size: var(--ipa-display-4xl) !important;
    line-height: 1.15;
  }
}

@media not all and (min-width: 1024px) {
  .max-lg\:text-display-xs {
    font-size: var(--ipa-display-xs) !important;
    line-height: 1.4;
  }

  .max-lg\:text-display-sm {
    font-size: var(--ipa-display-sm) !important;
    line-height: 1.4;
  }

  .max-lg\:text-display-md {
    font-size: var(--ipa-display-md) !important;
    line-height: 1.4;
  }

  .max-lg\:text-display-lg {
    font-size: var(--ipa-display-lg) !important;
    line-height: 1.4;
  }

  .max-lg\:text-display-xl {
    font-size: var(--ipa-display-xl) !important;
    line-height: 1.2;
  }

  .max-lg\:text-display-2xl {
    font-size: var(--ipa-display-2xl) !important;
    line-height: 1.2;
  }

  .max-lg\:text-display-3xl {
    font-size: var(--ipa-display-3xl) !important;
    line-height: 1.2;
  }

  .max-lg\:text-display-4xl {
    font-size: var(--ipa-display-4xl) !important;
    line-height: 1.15;
  }
}

/* Unified section block titles (homepage + secondary page templates) */
.cms-section-title,
:is(h1, h2, h3, h4, h5, h6).cms-section-title,
#root [data-type="section-title"] {
  font-size: var(--ipa-section-title-size);
  line-height: 1.2;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .cms-section-title,
  #root [data-type="section-title"] {
    font-size: var(--ipa-section-title-size-lg);
  }
}

/* 通用二级页左右结构：左侧大标题减小两档（相对 text-display-xl/2xl；压过 section-title inherit） */
.cms-general-secondary-page #root .cms-left-right-layout [data-type="section-title"] h2.cms-section-title {
  font-size: var(--ipa-display-lg) !important;
  line-height: 1.2 !important;
}

@media (min-width: 1024px) {
  .cms-general-secondary-page #root .cms-left-right-layout [data-type="section-title"] h2.cms-section-title,
  .cms-general-secondary-page #root .cms-left-right-layout [data-type="section-title"] h2.cms-section-title.lg\:text-display-2xl {
    font-size: var(--ipa-display-xl) !important;
  }
}

.cms-general-secondary-page #root .cms-left-right-layout [data-type="section-title"] h2.cms-section-title :is(span, strong, em) {
  font-size: inherit !important;
  line-height: inherit !important;
}

.cms-section-title :is(h1, h2, h3, h4, h5, h6, p, span),
#root [data-type="section-title"] :is(h1, h2, h3, h4, h5, h6, p, span) {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit;
}

.cms-section-title {
  margin: 0;
}

/* 内页 h1 主标题：比 h3 区块标题大一档（display-xl / display-2xl；首页 Hero 不受此规则影响） */
h1.cms-section-title {
  font-size: var(--ipa-page-title-size);
  line-height: 1.2;
}

@media (min-width: 1024px) {
  h1.cms-section-title {
    font-size: var(--ipa-page-title-size-lg);
    line-height: 1.15;
  }
}

/* 首页 Hero 主标题：不受区块 h3 统一规则影响，按 h1 上的 display 档位渲染 */
#root [data-type="heroBanner"] [data-type="hero-title"] h1 {
  font-size: var(--ipa-display-xl) !important;
  line-height: 1.2 !important;
}

@media (min-width: 768px) {
  #root [data-type="heroBanner"] [data-type="hero-title"] h1 {
    font-size: var(--ipa-display-2xl) !important;
    line-height: 1.2 !important;
  }
}

@media (min-width: 1024px) {
  #root [data-type="heroBanner"] [data-type="hero-title"] h1 {
    font-size: var(--ipa-display-3xl) !important;
    line-height: 1.15 !important;
  }
}

/* clipPath 定义用 SVG：不能 display:none，但需移出文档流（默认约 150px 高） */
.decorator-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 会员推荐：光晕在 section 层全宽；顶部白→色渐变 */
section[data-type="testimonialCarousel"].testimonial-carousel-section {
  position: relative;
}

/* 首页会员推荐：CMS「标题」字段（署名/职位行） */
section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) .testimonial-card__title {
  font-size: 24px;
  line-height: 36px;
}

.testimonial-carousel .testimonial-card__wrapper {
  overflow: hidden;
  align-items: center;
  background: rgba(255, 255, 255, 0.35);
}

.testimonial-carousel__stage {
  position: relative;
}

.testimonial-carousel__halo {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  overflow: hidden;
}

.testimonial-carousel__halo-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.78;
}

.testimonial-carousel__halo-blob--orange {
  width: 46%;
  height: 88%;
  left: -14%;
  top: 22%;
  background: radial-gradient(circle, rgba(251, 142, 9, 0.82) 0%, rgba(251, 142, 9, 0) 70%);
}

.testimonial-carousel__halo-blob--blue {
  width: 58%;
  height: 96%;
  left: 18%;
  top: 8%;
  background: radial-gradient(circle, rgba(43, 165, 212, 0.72) 0%, rgba(43, 165, 212, 0) 70%);
}

.testimonial-carousel__halo-blob--purple {
  width: 48%;
  height: 92%;
  right: -14%;
  top: 14%;
  background: radial-gradient(circle, rgba(163, 58, 148, 0.68) 0%, rgba(163, 58, 148, 0) 70%);
}

.testimonial-carousel__halo-fade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: min(240px, 42%);
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    rgba(255, 255, 255, 0.94) 22%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.testimonial-carousel__stage .swiper {
  position: relative;
  z-index: 1;
}

.testimonial-carousel .testimonial-card__figure--split {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: none;
  padding: 1.5rem 0.75rem;
}

@media (min-width: 768px) {
  .testimonial-carousel .testimonial-card__figure--split {
    padding: 2rem 1rem;
  }
}

@media (min-width: 1280px) {
  .testimonial-carousel .testimonial-card__figure--split {
    padding: 2.5rem 1.5rem;
  }
}

.testimonial-carousel .testimonial-card__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 1024px) {
  .testimonial-carousel .testimonial-card__layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

.testimonial-carousel .testimonial-card__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  min-width: 0;
}

@media (min-width: 1024px) {
  .testimonial-carousel .testimonial-card__copy {
    gap: 1rem;
    padding-right: 0.5rem;
  }
}

.testimonial-carousel .testimonial-card__quote {
  margin: 0;
  white-space: pre-line;
}

/* 首页会员推荐：正文字号比板块标题小三号 */
section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) .testimonial-card__quote {
  font-size: var(--ipa-display-xs) !important;
  line-height: 1.6 !important;
}

@media (min-width: 1024px) {
  section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) .testimonial-card__quote {
    font-size: var(--ipa-display-sm) !important;
    line-height: 1.55 !important;
  }
}

.testimonial-carousel .testimonial-card__details {
  width: 100%;
}

.testimonial-carousel .testimonial-card__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 220px;
}

@media (min-width: 1024px) {
  .testimonial-carousel .testimonial-card__media {
    min-height: 280px;
    justify-content: flex-end;
  }
}

.testimonial-carousel .testimonial-card__portrait {
  width: auto;
  max-width: min(100%, 320px);
  max-height: 280px;
  height: auto;
  object-position: top center;
  border-radius: 0;
}

@media (min-width: 768px) {
  .testimonial-carousel .testimonial-card__portrait {
    max-height: 320px;
  }
}

@media (min-width: 1024px) {
  .testimonial-carousel .testimonial-card__portrait {
    max-width: 100%;
    max-height: 360px;
    min-height: 280px;
  }
}

.testimonial-carousel .testimonial-card__navigation {
  z-index: 2;
}

/* 首页会员推荐：板块标题加粗；署名/职位行加粗并与大图底对齐 */
section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) > .inner.container {
  gap: 0;
}

section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) > .inner > .w-full.text-center .cms-section-title {
  font-weight: 700;
}

section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) .testimonial-card__title {
  font-weight: 700;
}

@media (min-width: 1024px) {
  section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) .testimonial-card__layout {
    align-items: stretch;
  }

  section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) .testimonial-card__copy {
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    min-height: 280px;
  }

  section[data-type="testimonialCarousel"].testimonial-carousel-section:not(.cms-body-block) .testimonial-card__media {
    align-self: end;
  }
}

/* 首页塑造未来：去掉 inner 与内容区之间的多余上间距（section 已有 py-12） */
:not(.cms-body-block) > section[data-type="ctaSection"] > .inner.container {
  gap: 0;
}

:not(.cms-body-block) > section[data-type="ctaSection"] > .inner > .container.mx-auto.px-4 {
  padding-top: 0;
  padding-bottom: 0;
}

/* 多元与包容：上图下标题，纯白底（盖住装饰层） */
section.diversity-section {
  position: relative;
  z-index: 2;
  background: #ffffff;
  color: oklch(0.3152 0.1176 262.41);
  padding: 4rem 0;
}

@media (min-width: 1024px) {
  section.diversity-section {
    padding: 5rem 0;
  }
}

.diversity-section__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.diversity-section__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 1.5rem;
}

.diversity-section__title {
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  margin-top: 3.5rem;
  text-align: center;
  color: oklch(0.3152 0.1176 262.41);
}

@media (min-width: 768px) {
  .diversity-section__title {
    margin-top: 4.5rem;
  }
}

@media (min-width: 1024px) {
  .diversity-section__title {
    margin-top: 5.5rem;
    max-width: 58rem;
  }
}

.diversity-section__title h1,
.diversity-section__title h2,
.diversity-section__title h3,
.diversity-section__title .diversity-section__heading {
  margin: 0;
  text-align: center !important;
  font-size: var(--ipa-section-title-size) !important;
  line-height: 1.2 !important;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: oklch(0.3152 0.1176 262.41);
}

.diversity-section__title h1 span,
.diversity-section__title h2 span,
.diversity-section__title h3 span,
.diversity-section__title .diversity-section__heading span {
  font-size: inherit !important;
  line-height: inherit !important;
}

@media (min-width: 1024px) {
  .diversity-section__title h1,
  .diversity-section__title h2,
  .diversity-section__title h3,
  .diversity-section__title .diversity-section__heading {
    font-size: var(--ipa-section-title-size-lg) !important;
    line-height: 1.2 !important;
  }
}

.diversity-section__title p {
  margin: 0;
  text-align: center !important;
  font-size: var(--ipa-section-title-size) !important;
  line-height: 1.2 !important;
  font-weight: 400;
}

@media (min-width: 1024px) {
  .diversity-section__title p {
    font-size: var(--ipa-section-title-size-lg) !important;
  }
}

.diversity-section__title .text-display-xl,
.diversity-section__title .text-display-2xl,
.diversity-section__title .text-display-3xl,
.diversity-section__title .lg\:text-display-2xl {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* 桌面 megamenu：各二级列同时展示三级链接 */
@media (min-width: 1280px) {
  [data-type="desktop-navigation"] [data-level="0"].active [data-type="megamenu-level-2"] {
    display: block;
  }
}

/* 移动端：推广图显示在底部 footer，面板内隐藏 */
@media (max-width: 1279px) {
  [data-type="mobile-navigation"] [data-type="megamenu-panel"] [data-type="menu-decorator"] {
    display: none !important;
  }

  #mobile-navigation-footer [data-type="menu-decorator"] {
    display: none;
  }

  #mobile-navigation-footer [data-type="menu-decorator"].active {
    display: block;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  #mobile-navigation-footer [data-type="menu-decorator"].active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

/* 数据统计：卡片内渐变背景，正方形 */
[data-type="statsCards"] .stats-card {
  aspect-ratio: 1 / 1;
  width: 100%;
  border: 2px solid transparent;
  background-color: transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    url("/assets/img/stats-card-bg.jpg"),
    linear-gradient(to right, rgb(201, 60, 159), rgb(240, 95, 34));
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: auto, cover, auto;
  background-position: center, center, center;
  background-clip: padding-box, padding-box, border-box;
  background-origin: padding-box, padding-box, border-box;
}

[data-type="statsCards"] .stats-card__image {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

/* CMS 单页正文 */
body.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__summary,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ),
body.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__summary,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) {
  font-size: var(--ipa-body-text-size);
  line-height: var(--ipa-body-text-line-height);
}

/* 内页正文容器上的 Tailwind 字号类统一回落到 18px */
body.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__summary,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ):is(.text-base, .text-lg, .text-xl, .text-2xl),
body.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__summary,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ):is(.text-base, .text-lg, .text-xl, .text-2xl) {
  font-size: var(--ipa-body-text-size);
}

/* 基本正文页：富文本内段落/列表等与容器统一 18px（保留标题、label 等样式类） */
body.cms-basic-content-page .cms-basic-content__body :is(p, li, td, th, blockquote, figcaption):not([class*="text-display"]):not([class*="label-"]) {
  font-size: inherit;
  line-height: inherit;
}

body.cms-basic-content-page .cms-basic-content__body :is(p, li, span, div):is(.text-base, .text-lg, .text-xl, .text-2xl) {
  font-size: var(--ipa-body-text-size);
  line-height: var(--ipa-body-text-line-height);
}

/* 内页富文本标题：h2/h3/h4（除首页外所有子页） */
body.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) :is(h2, h3),
body.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) :is(h2, h3) {
  font-family: var(--ipa-font-family) !important;
  color: var(--ipa-rich-h3-color);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

body.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h2,
body.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h2 {
  font-size: 1.5rem;
  line-height: 1.25;
}

body.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h3,
body.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h3 {
  font-size: var(--ipa-section-title-size);
  line-height: 1.2;
}

@media (min-width: 1024px) {
  body.cms-content-page :is(
      .cms-page-content,
      .about-rich-text,
      .cms-rich-text__body,
      .cms-basic-content__body,
      .cms-governance-content-block__body,
      .bio-profile__body,
      .news-rich-text,
      [data-rte="true"]
    ) h3,
  body.cms-about-page :is(
      .cms-page-content,
      .about-rich-text,
      .cms-rich-text__body,
      .cms-basic-content__body,
      .cms-governance-content-block__body,
      .bio-profile__body,
      .news-rich-text,
      [data-rte="true"]
    ) h3 {
    font-size: var(--ipa-section-title-size-lg);
  }
}

body.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4,
body.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4 {
  font-family: var(--ipa-font-family) !important;
  font-size: var(--ipa-rich-h4-size);
  line-height: var(--ipa-rich-h4-line-height);
  font-weight: 700;
  color: var(--ipa-rich-h3-color);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

body.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4 :is(strong, b, .text-warm-plum),
body.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4 :is(strong, b, .text-warm-plum) {
  color: var(--ipa-rich-h3-color);
  font-weight: inherit;
}

/* 会员要求页保留原 h4 梅紫色样式 */
body.cms-page--member-requirements.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4,
body.cms-page--member-requirements.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4 {
  font-weight: 400;
  color: var(--ipa-rich-h4-color);
}

body.cms-page--member-requirements.cms-content-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4 :is(strong, b, .text-warm-plum),
body.cms-page--member-requirements.cms-about-page :is(
    .cms-page-content,
    .about-rich-text,
    .cms-rich-text__body,
    .cms-basic-content__body,
    .cms-governance-content-block__body,
    .bio-profile__body,
    .news-rich-text
  ) h4 :is(strong, b, .text-warm-plum) {
  color: var(--ipa-rich-h4-color);
  font-weight: inherit;
}

.cms-page-content p {
  margin-bottom: 1rem;
}

.cms-page-content ul,
.cms-page-content ol {
  margin: 0 0 1rem 1.25rem;
}

/*
 * Unified in-content text links: navy + underline.
 * Excludes: nav, .cta buttons, card wrappers, list CTAs, editor custom colors.
 */
#root :is(
    [data-rte="true"],
    .cms-page-content,
    .about-rich-text,
    .cms-basic-content__body,
    .cms-rich-text__body,
    .news-rich-text,
    .bio-profile__body,
    .cms-governance-content-block__body,
    .cms-governance-columns,
    .cms-news-list-curated__intro,
    .cms-category-intro-section__intro,
    .cms-course-table__activity,
    #footer-disclaimer,
    .footer-copyright-text
  )
  a:not(
    .cta,
    .news-card,
    .news-hero-card,
    .leadership-member__link,
    .member-spotlight-member__link,
    .cms-course-table__register-link,
    .cms-news-list-curated__item,
    .cms-card-list-curated__item
  ):not(.color):not([class*="text-gradient"]):not(:has(> span.color)) {
  color: var(--ipa-link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

#root :is(
    [data-rte="true"],
    .cms-page-content,
    .about-rich-text,
    .cms-basic-content__body,
    .cms-rich-text__body,
    .news-rich-text,
    .bio-profile__body,
    .cms-governance-content-block__body,
    .cms-governance-columns,
    .cms-news-list-curated__intro,
    .cms-category-intro-section__intro,
    .cms-course-table__activity,
    #footer-disclaimer,
    .footer-copyright-text
  )
  a:not(
    .cta,
    .news-card,
    .news-hero-card,
    .leadership-member__link,
    .member-spotlight-member__link,
    .cms-course-table__register-link,
    .cms-news-list-curated__item,
    .cms-card-list-curated__item
  ):not(.color):not([class*="text-gradient"]):not(:has(> span.color)):hover {
  color: var(--ipa-link-hover-color);
}

/* Filament RichEditor 文字颜色（span.color 通过 --color / --dark-color 变量存储） */
[data-rte="true"] span.color,
.cms-page-content span.color,
.about-rich-text span.color,
.footer-main span.color {
  color: var(--color);
}

/* 富文本内图片：覆盖 Tailwind Preflight 的 display:block，使段落 text-align 对齐生效 */
.cms-page-content[data-rte="true"] img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
  vertical-align: middle;
}

/* 富文本图片浮动：全站富文本区块通用（文章页、默认正文页、通用二级页等） */
[data-rte="true"] img.cms-img-float-left,
.cms-news-article-body__content img.cms-img-float-left {
  float: left;
  margin: 0 1.25rem 1.25rem 0;
  max-width: min(50%, 100%);
}

[data-rte="true"] img.cms-img-float-right,
.cms-news-article-body__content img.cms-img-float-right {
  float: right;
  margin: 0 0 1.25rem 1.25rem;
  max-width: min(50%, 100%);
}

/* 富文本表格：默认水平居中（宽度由内容/编辑器列宽决定） */
[data-rte="true"] table {
  margin-left: auto;
  margin-right: auto;
}

/* 首页数据统计卡片标题，与合作伙伴页数字统计标题同字号 */
body.home-page [data-type="statsCards"] .stats-card > .text-warm-plum {
  font-size: 1.125rem;
}

@media (min-width: 1024px) {
  body.home-page [data-type="statsCards"] .stats-card > .text-warm-plum {
    font-size: 1.25rem;
  }
}

[data-type="statsCards"] .stats-card__number {
  font-size: var(--ipa-display-xl);
  line-height: 2;
}

@media (min-width: 1024px) {
  [data-type="statsCards"] .stats-card__number {
    font-size: var(--ipa-display-2xl);
  }
}

@media (min-width: 1280px) {
  [data-type="statsCards"] .stats-card__number {
    font-size: var(--ipa-display-3xl);
  }

  [data-type="statsCards"] .stats-card__number--spaced {
    margin-bottom: -0.5rem;
  }
}

/*
 * 文字渐变（Recognition 页 committees 列表等）
 * 整段共用一个渐变区域（避免 inline 每行单独渐变）
 * 后台：源代码模式包裹 <span class="text-gradient-blue">...</span>
 */
.text-gradient-blue {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, #0078b3, #299ecf, #48c6ec);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

.text-gradient-blue-reverse {
  display: inline-block;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(90deg, #48c6ec, #299ecf, #0078b3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

.cms-page-content strong:has(.text-gradient-blue),
.cms-page-content strong:has(.text-gradient-blue-reverse) {
  color: inherit;
}

.cms-page-content .text-gradient-blue,
.cms-page-content .text-gradient-blue-reverse,
[data-rte="true"] .text-gradient-blue,
[data-rte="true"] .text-gradient-blue-reverse {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 渐变强调句 / 句内关键词渐变（4 种） */
.text-gradient-purple-reverse {
  background: linear-gradient(270deg, #963291, #cb529c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gradient-pink {
  background: linear-gradient(90deg, #f05f22, #eb5c3f, #e65952 25%, #dc5270 50%, #c93c9f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gradient-orange {
  background: linear-gradient(90deg, #f05f22, #f88019, #ff9f00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gradient-pink-reverse {
  background: linear-gradient(270deg, #f05f22, #eb5c3f, #e65952 25%, #dc5270 50%, #c93c9f);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.cms-highlight-html :is(
    .text-gradient-purple-reverse,
    .text-gradient-pink,
    .text-gradient-orange,
    .text-gradient-pink-reverse
  ) {
  display: inline;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 全站链接：去掉下划线（含 hover / 标题内链） */
#root a,
#root a:hover,
#root a:focus,
#root a:focus-visible,
#root a :is(h1, h2, h3, h4, h5, h6, span, strong, em, p) {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

/* 文章页 H1：相对原 display-lg / xl 小一档 */
h1.cms-news-article-title {
  font-size: var(--ipa-display-md) !important;
  line-height: 1.4 !important;
}

@media (min-width: 1024px) {
  h1.cms-news-article-title {
    font-size: var(--ipa-display-lg) !important;
    line-height: 1.2 !important;
  }
}