@font-face {
  font-family: "DingTalk JinBuTi";
  src:
    url("/fonts/DingTalk-JinBuTi.woff2") format("woff2"),
    url("/fonts/DingTalk-JinBuTi.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  src: url("/fonts/SofiaSansExtraCondensed-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  src: url("/fonts/SofiaSansExtraCondensed-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  src: url("/fonts/SofiaSansExtraCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  src: url("/fonts/SofiaSansExtraCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sofia Sans Extra Condensed";
  src: url("/fonts/SofiaSansExtraCondensed-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: "Source Han Sans CN";
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "DingTalk JinBuTi";
  font-weight: 400;
}

/* English display titles: Fugaz One, and that face is always uppercase */
html:lang(en) :is(h1, h2) {
  font-family: "Fugaz One", "DingTalk JinBuTi", sans-serif !important;
  text-transform: uppercase;
}

/*
 * English: Fugaz One for nav + UI that uses text-transform: uppercase
 * (menu, footer labels, buttons, eyebrows/tags, form chrome)
 * h1/h2 already covered above
 */
html:lang(en) :is(
  .site-header__nav-link,
  .site-header__dropdown-link,
  .site-header__mobile-trigger,
  .site-header__mobile-nav > a,
  .site-header__mobile-submenu > a,
  .site-header__product-menu-title,
  .site-header__product-card-name,
  .site-header__product-card-hp,
  .site-header__mobile-product-copy,
  .site-footer__contact-title,
  .site-footer__column-title,
  .page-home__btn,
  .page-home__eyebrow,
  .page-home__power-tag,
  .page-home__cases-badge,
  .page-home__news-tags span,
  .page-home__faq-title,
  .page-collection__btn,
  .page-cases__btn,
  .page-news__btn,
  .page-industry__more,
  .page-error__btn,
  .page-dealer__cta-btn,
  .page-dealer__why-tag,
  .page-dealer__support-label,
  .page-dealer__cta-hotline-num,
  .page-product__consult,
  .search-page__btn,
  .cta-form__copy h3,
  .cta-form__submit,
  .cta-form__upload,
  .page-contact__submit,
  .page-contact__chip,
  .cases-cta__submit,
  .page-post__submit,
  .contact-form-modal__submit,
  .contact-form-modal__upload-btn,
  .page-about__culture-en,
  .page-about__strategy-tag,
  .page-about__mission-label,
  .page-sustain__row-copy h3
) {
  font-family: "Fugaz One", "DingTalk JinBuTi", sans-serif !important;
}

/* Russian display titles: Sofia Sans Extra Condensed Bold italic */
html:lang(ru) :is(h1, h2) {
  font-family: "Sofia Sans Extra Condensed", "DingTalk JinBuTi", sans-serif !important;
  font-weight: 700 !important;
  font-style: italic !important;
}

/* Russian buttons: Sofia Bold Italic（排除语言切换） */
html:lang(ru) :is(
  button,
  input[type="submit"],
  input[type="button"],
  [class*="__btn"],
  [class*="__submit"],
  [class*="__upload"],
  .site-header__nav-link,
  .site-header__dropdown-link,
  .site-header__mobile-trigger,
  .site-header__mobile-nav > a,
  .site-header__mobile-submenu > a,
  .page-home__btn,
  .page-collection__btn,
  .page-cases__btn,
  .page-news__btn,
  .page-industry__more,
  .page-error__btn,
  .page-dealer__cta-btn,
  .page-product__consult,
  .search-page__btn,
  .cta-form__submit,
  .cta-form__upload,
  .page-contact__submit,
  .page-contact__chip,
  .cases-cta__submit,
  .page-post__submit,
  .contact-form-modal__submit,
  .contact-form-modal__upload-btn,
  .site-sidebar__btn,
  .post-share__btn
):not(.site-header__language):not(.site-header__language-option) {
  font-family: "Sofia Sans Extra Condensed", sans-serif !important;
  font-weight: 700 !important;
  font-style: italic !important;
}

html:lang(ru) :is(
  .site-footer__contact-title,
  .site-footer__column-title
) {
  font-family: "Sofia Sans Extra Condensed", "Segoe UI", sans-serif !important;
  font-weight: 600 !important;
  font-style: normal !important;
}

/* 语言切换：不跟 html lang 变；拉丁/西里尔优先同一套正文字体 */
html :is(
  .site-header__language,
  .site-header__language-option
) {
  font-family: "Segoe UI", "Noto Sans", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-weight: 500 !important;
  font-style: normal !important;
  font-synthesis: none !important;
  text-transform: none !important;
}

/* Russian homepage / footer / sustain / 产品子菜单 / dealer / contact: Sofia Bold Italic */
html:lang(ru) :is(
  .page-home__eyebrow,
  .page-home__series-hp,
  .page-home__power-tag,
  .page-home__hotspot-card-title,
  .cta-form__copy h3,
  .site-footer__slogan,
  .site-footer__slogan p,
  .page-sustain__row-copy h3,
  .site-header__product-menu-title,
  .site-header__product-card-name,
  .site-header__product-card-hp,
  .site-header__mobile-product-title,
  .site-header__mobile-product-copy,
  .site-header__mobile-product-copy span,
  .page-dealer__why-tag,
  .page-dealer__why-card-title,
  .page-dealer__support-label,
  .page-dealer__support-item h3,
  .page-contact__hq-title,
  .page-contact__location-title,
  .page-contact__meta-title
) {
  font-family: "Sofia Sans Extra Condensed", sans-serif !important;
  font-weight: 700 !important;
  font-style: italic !important;
}

/*
 * 俄语卡片/相关标题：Sofia 同时覆盖拉丁与西里尔，
 * 避免 DingTalk 只渲染英文、西里尔回退成细衬线导致“英文更粗更大”
 */
html:lang(ru) :is(
  .page-blog__card-title,
  .page-news__item-title,
  .page-industry__card-title,
  .page-cases__featured-title,
  .page-cases__row-head h3,
  .page-cases__row-copy h3,
  .page-post__related-card h3,
  .page-post__product-card h3,
  .page-home__news-card h3
),
html:lang(ru) :is(
  .page-post__article-body,
  .page-case__article-body,
  .page-product__detail-body
) :is(h1, h2, h3, h4, h5) {
  font-family: "Sofia Sans Extra Condensed", "Segoe UI", "Noto Sans", sans-serif !important;
  font-weight: 600 !important;
  font-style: normal !important;
  text-transform: none;
}

html:lang(ru) .page-post__related-card h3 {
  font-size: clamp(15px, 1.042vw, 20px) !important;
  line-height: 1.2 !important;
  height: calc(1.2em * 3) !important;
  max-height: calc(1.2em * 3) !important;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere;
}

html:lang(en) :is(
  .page-blog__card-title,
  .page-news__item-title,
  .page-industry__card-title,
  .page-cases__featured-title
),
html:lang(en) :is(
  .page-post__article-body,
  .page-case__article-body,
  .page-product__detail-body
) :is(h1, h2, h3, h4, h5) {
  font-family: "DingTalk JinBuTi", "Source Han Sans CN", sans-serif !important;
  text-transform: none;
}

html:is(:lang(en), :lang(ru)) :is(
  .page-collection__details-head,
  .page-case__section-title,
  .page-home__news-head
) h2 {
  white-space: normal;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input,
textarea,
select {
  border: none;
  background: none;
  font-family: inherit;
}

/* Rich text tables (CMS HTML) */
.page-post__article-body table,
.page-case__article-body table,
.page-product__detail-body table,
.page-post__faq-a table,
.page-case__faq-a table,
.page-collection__faq-a table,
.page-home__faq-a table,
.page-faq__a table {
  width: 100%;
  margin: clamp(16px, 1.25vw, 24px) 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: clamp(8px, 0.625vw, 12px);
  background: #fff;
  color: #333;
}

.page-post__article-body th,
.page-post__article-body td,
.page-case__article-body th,
.page-case__article-body td,
.page-product__detail-body th,
.page-product__detail-body td,
.page-post__faq-a th,
.page-post__faq-a td,
.page-case__faq-a th,
.page-case__faq-a td,
.page-collection__faq-a th,
.page-collection__faq-a td,
.page-home__faq-a th,
.page-home__faq-a td,
.page-faq__a th,
.page-faq__a td {
  box-sizing: border-box;
  padding: clamp(12px, 1.042vw, 18px) clamp(14px, 1.25vw, 24px);
  border: 0;
  border-bottom: 1px solid #e8e8e8;
  font-size: clamp(13px, 0.833vw, 16px);
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  vertical-align: middle;
}

.page-post__article-body tr:last-child th,
.page-post__article-body tr:last-child td,
.page-case__article-body tr:last-child th,
.page-case__article-body tr:last-child td,
.page-product__detail-body tr:last-child th,
.page-product__detail-body tr:last-child td,
.page-post__faq-a tr:last-child th,
.page-post__faq-a tr:last-child td,
.page-case__faq-a tr:last-child th,
.page-case__faq-a tr:last-child td,
.page-collection__faq-a tr:last-child th,
.page-collection__faq-a tr:last-child td,
.page-home__faq-a tr:last-child th,
.page-home__faq-a tr:last-child td,
.page-faq__a tr:last-child th,
.page-faq__a tr:last-child td {
  border-bottom: 0;
}

.page-post__article-body th,
.page-case__article-body th,
.page-product__detail-body th,
.page-post__faq-a th,
.page-case__faq-a th,
.page-collection__faq-a th,
.page-home__faq-a th,
.page-faq__a th {
  background: #f7f8f8;
  color: #006438;
  font-weight: 600;
}

.page-post__article-body tbody tr:nth-child(even) td,
.page-case__article-body tbody tr:nth-child(even) td,
.page-product__detail-body tbody tr:nth-child(even) td,
.page-post__faq-a tbody tr:nth-child(even) td,
.page-case__faq-a tbody tr:nth-child(even) td,
.page-collection__faq-a tbody tr:nth-child(even) td,
.page-home__faq-a tbody tr:nth-child(even) td,
.page-faq__a tbody tr:nth-child(even) td {
  background: #f7f8f8;
}

.page-post__article-body tbody tr:nth-child(odd) td,
.page-case__article-body tbody tr:nth-child(odd) td,
.page-product__detail-body tbody tr:nth-child(odd) td,
.page-post__faq-a tbody tr:nth-child(odd) td,
.page-case__faq-a tbody tr:nth-child(odd) td,
.page-collection__faq-a tbody tr:nth-child(odd) td,
.page-home__faq-a tbody tr:nth-child(odd) td,
.page-faq__a tbody tr:nth-child(odd) td {
  background: #fff;
}

.page-post__article-body table strong,
.page-case__article-body table strong,
.page-product__detail-body table strong,
.page-post__faq-a table strong,
.page-case__faq-a table strong,
.page-collection__faq-a table strong,
.page-home__faq-a table strong,
.page-faq__a table strong {
  color: #333;
  font-weight: 600;
}

/* Rich text links (CMS HTML) */
.page-post__article-body a,
.page-case__article-body a,
.page-product__detail-body a,
.page-product__specs a,
.page-post__faq-a a,
.page-case__faq-a a,
.page-collection__faq-a a,
.page-home__faq-a a,
.page-faq__a a {
  color: #006438;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-post__article-body a:hover,
.page-case__article-body a:hover,
.page-product__detail-body a:hover,
.page-product__specs a:hover,
.page-post__faq-a a:hover,
.page-case__faq-a a:hover,
.page-collection__faq-a a:hover,
.page-home__faq-a a:hover,
.page-faq__a a:hover,
.page-post__article-body a:focus-visible,
.page-case__article-body a:focus-visible,
.page-product__detail-body a:focus-visible,
.page-product__specs a:focus-visible,
.page-post__faq-a a:focus-visible,
.page-case__faq-a a:focus-visible,
.page-collection__faq-a a:focus-visible,
.page-home__faq-a a:focus-visible,
.page-faq__a a:focus-visible {
  color: #004d2b;
}

@media (max-width: 1024px) {
  .page-post__article-body,
  .page-case__article-body,
  .page-product__detail-body,
  .page-post__faq-a,
  .page-case__faq-a,
  .page-collection__faq-a,
  .page-home__faq-a,
  .page-faq__a {
    overflow-x: auto;
  }

  .page-post__article-body table,
  .page-case__article-body table,
  .page-product__detail-body table,
  .page-post__faq-a table,
  .page-case__faq-a table,
  .page-collection__faq-a table,
  .page-home__faq-a table,
  .page-faq__a table {
    min-width: 560px;
  }
}