/* Language overrides for the generated English and Japanese pages.
   Linked last by scripts/i18n/build.py on every en/ja page (never on Chinese pages).
   Holds CSS-generated text (content: "...") that the shared stylesheets write in Chinese.
   When a shared stylesheet gains a new Chinese `content:` string, add its en/ja line here
   and bump ?v= via build.py's ASSET_VERSION. */

/* home-demo.css */
html[lang="en"] .hd2-zh::before { content: 'Translated '; }
html[lang="ja"] .hd2-zh::before { content: '訳 '; }
html[lang="en"] .home-demo.is-ch-email .hd2-trace-head span::before,
html[lang="en"] .home-demo.is-ch-amazon .hd2-trace-head span::before { content: 'Before sending · '; }
html[lang="ja"] .home-demo.is-ch-email .hd2-trace-head span::before,
html[lang="ja"] .home-demo.is-ch-amazon .hd2-trace-head span::before { content: '送信前 · '; }
html[lang="en"] .hd2-tabs::before { content: 'Tap to switch scenarios'; }
html[lang="ja"] .hd2-tabs::before { content: 'タップでシナリオを切り替え'; }

/* feature-pages.css (workflow panels) */
html[lang="en"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(1):before { content: "Received"; }
html[lang="en"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(2):before { content: "Assess and act"; }
html[lang="en"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(3):before { content: "Resolved"; }
html[lang="en"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(4):before { content: "Needs human review"; }
html[lang="ja"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(1):before { content: "受信"; }
html[lang="ja"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(2):before { content: "判断と対応"; }
html[lang="ja"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(3):before { content: "完了"; }
html[lang="ja"] .feature-page .fp-workspace[data-workflow-flow] .fp-panel:nth-child(4):before { content: "担当者の確認が必要"; }

/* solvea-skin.css */
html[lang="en"] .fx-spot-head b::before { content: 'From '; }
html[lang="ja"] .fx-spot-head b::before { content: '出典：'; }

/* subpage.css */
html[lang="en"] .cs-hero-media::after { content: "Industry experts throughout the rollout"; }
html[lang="ja"] .cs-hero-media::after { content: "業界の専門家が導入まで伴走"; }

/* Latin text breaks between words, not inside them. Chinese-first rules such as
   word-break: keep-all / line-break: anywhere are relaxed for English. */
html[lang="en"] body { word-break: normal; overflow-wrap: break-word; }

/* Japanese glyphs must come from a Japanese face: the homepage's inline body stack lists
   "PingFang SC" (Chinese forms) before any Hiragino, so use the site's ja stack instead. */
html[lang="ja"] body.home-product-hub { font-family: var(--site-font-sans); }

/* Localized industry names need their own width; the six equal Chinese columns
   make long English and Japanese labels paint on top of the next button. */
html:is([lang="en"],[lang="ja"]) .home-industry-solutions__controls {
  display:flex;
  gap:0;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
}
html:is([lang="en"],[lang="ja"]) .home-industry-solutions__tab {
  flex:0 0 auto;
  width:max-content;
  padding-inline:18px;
  font-size:15px;
}

/* Global visitors use the localized demo page and email contact in the footer. */
html:is([lang="en"], [lang="ja"]) .site-footer-current .wechat-follow.qr-pair { display: none !important; }

/* Solvea is the public brand on the overseas site. */
html:is([lang="en"],[lang="ja"]) .site-footer-current .solvea-footer-wordmark {
  display:inline-block;
  width:auto;
  max-width:none;
  height:auto;
  margin:0 0 28px;
  filter:none;
  color:#fff;
  font-size:34px;
  font-weight:780;
  letter-spacing:-.055em;
  line-height:1;
}
html:is([lang="en"],[lang="ja"]) .site-footer-current .solvea-footer-wordmark span { color:#4566fa; }
html:is([lang="en"],[lang="ja"]) .legal-redirect {
  min-height:45vh;
  padding:140px max(24px, 10vw) 90px;
}
html:is([lang="en"],[lang="ja"]) .legal-redirect a { color:#3157ff; text-decoration:underline; }

/* 中文站为控制断行给标题分行和按钮文字设了 nowrap / 省略号；英日文案更长，放开换行（2026-09-18 回归） */
html:is([lang="en"], [lang="ja"]) :is(h1, h2) :is(span, em) { white-space: normal; text-wrap: balance; }
html:is([lang="en"], [lang="ja"]) .suite-hero .actions .btn-label { overflow: visible; text-overflow: clip; white-space: normal; line-height: 1.3; }
html:is([lang="en"], [lang="ja"]) .suite-hero .actions .btn { height: auto; min-height: 52px; }
/* 首页演示的场景标签：英日标题较长，允许两行而不是省略号 */
html:is([lang="en"], [lang="ja"]) .hd2-tab :is(b, span) { white-space: normal; overflow: visible; text-overflow: clip; display: block; }
html:is([lang="en"], [lang="ja"]) .hd2-tab { align-items: flex-start; }

/* 英日文案更长，轮播切换时标题行数差异更大：分别预留内容块高度（2026-09-20） */
@media (max-width: 900px) {
  html[lang="en"] body.home-product-hub .suite-hero-content { min-height: 490px; }
  html[lang="ja"] body.home-product-hub .suite-hero-content { min-height: 500px; }
}
@media (max-width: 380px) {
  html[lang="en"] body.home-product-hub .suite-hero-content { min-height: 525px; }
  html[lang="ja"] body.home-product-hub .suite-hero-content { min-height: 510px; }
}

/* 日文首屏标题较长，窄屏下缩小字号，减少折行与轮播切换时的跳动（2026-09-20） */
@media (max-width: 420px) {
  html[lang="ja"] body.home-product-hub .suite-hero-claim { font-size: clamp(24px, 7vw, 30px); line-height: 1.26; }
}

/* 英日标题行数差异更大：按各语言最高一屏预留标题高度，消除轮播切换的跳动（2026-09-20） */
@media (max-width: 900px) {
  html[lang="en"] body.home-product-hub .suite-hero-claim { min-height: 195px; }
  html[lang="ja"] body.home-product-hub .suite-hero-claim { min-height: 195px; }
}
@media (max-width: 380px) {
  html[lang="en"] body.home-product-hub .suite-hero-claim { min-height: 235px; }
}

/* 首屏标题上方的产品标签在英日会折多行，导致标题位置随轮播变化：窄屏缩小字号并预留高度（2026-09-20） */
@media (max-width: 420px) {
  html:is([lang="en"], [lang="ja"]) body.home-product-hub .suite-hero .product-name {
    display: block !important;
    font-size: 22px !important;
    line-height: 1.3 !important;
    min-height: 58px;
  }
}
