/* 41Q CN/TW: additive typography only, using locally installed system fonts.
 * No logo, SVG, icon, animation, grid, spacing or color rules are changed.
 * The HTML language gate is deliberate; no rule applies to other locales.
 */
html[lang="zh-Hans"] {
  --q41-cjk-font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html[lang="zh-Hant"] {
  --q41-cjk-font: "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Named text containers only: no body *, wildcard class match, or SVG selector. */
html:is([lang="zh-Hans"], [lang="zh-Hant"]) :is(.q41-v2026-home, .q41-v2026-static, .q41-v2026-questionnaire, .q41-v2026-result, .q41-v2026-rating, .q41-v2026-feedback, .q41-v2026-share, .q41-v57-article, .q41c) {
  font-family: var(--q41-cjk-font) !important;
  letter-spacing: normal;
  word-spacing: normal;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Existing header typography has !important guards. Leave its geometry alone. */
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body.q41-v2026-home-redesign #header .q41-v2026-brand-lockup > .q41-v2026-brand-slogan,
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body.q41-v2026-home-redesign #header .q41-v2026-brand-lockup > .q41-v2026-brand-slogan > span,
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body.q41-v2026-home-redesign #nav :is(a, button),
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body.q41-v2026-home-redesign .q41-v2026-language-switcher :is(summary, a, .q41-v58-language-name, .q41-v58-language-keyword),
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body:is(.q41-v2026-home-redesign, .q41-v2026-site, .q41-v57-content-page) #footer p {
  font-family: var(--q41-cjk-font) !important;
  letter-spacing: normal !important;
}

/* Headlines in the source use Latin tracking and line heights down to 1.02. */
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body #content :is(.q41-v2026-home, .q41-v2026-static, .q41-v2026-questionnaire, .q41-v2026-result, .q41-v2026-rating, .q41-v2026-feedback, .q41-v2026-share, .q41-v57-article, .q41c) :is(h1, h2, h3, h4, legend, .q41-v2026-question-prompt) {
  font-family: var(--q41-cjk-font) !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
  line-height: 1.45 !important;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Reset only textual Latin tracking; numbered marks and decorative icons keep theirs. */
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body #content :is(.q41-v2026-home, .q41-v2026-static, .q41-v2026-result, .q41-v2026-feedback, .q41-v57-article) :is(.q41-v2026-home-hero, .q41-v2026-home-kicker, .q41-v65-home-eyebrow, .q41-v2026-static-kicker, .q41-v2026-static-eyebrow, .q41-v2026-result-kicker, .q41-v2026-result-subtitle, .q41-v2026-feedback-eyebrow, .q41-v57-kicker) {
  font-family: var(--q41-cjk-font) !important;
  letter-spacing: normal !important;
}

/* Paragraphs and form labels need comfortable rhythm; preserve font sizes here. */
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body #content :is(.q41-v2026-home, .q41-v2026-static, .q41-v2026-result, .q41-v2026-rating, .q41-v2026-feedback, .q41-v2026-share, .q41-v57-article, .q41c) :is(p, li, label, summary),
html:is([lang="zh-Hans"], [lang="zh-Hant"]) body #content .q41-v2026-form :is(.answer-list label, .q41-v2026-help, .subtitle) {
  line-height: 1.75 !important;
  letter-spacing: normal !important;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Browser controls do not consistently inherit their container's font. */
html:is([lang="zh-Hans"], [lang="zh-Hant"]) :is(.q41-v2026-form, .q41-v2026-rating, .q41-v2026-feedback, .q41-v2026-share, .q41c) :is(button, input, select, textarea) {
  font-family: var(--q41-cjk-font) !important;
  letter-spacing: normal !important;
}

/* Long addresses/tokens may break only when required to avoid horizontal overflow. */
html:is([lang="zh-Hans"], [lang="zh-Hant"]) :is(.q41-v2026-static, .q41-v2026-result, .q41-v2026-share, .q41-v57-article, .q41c) :is(a[href], .q41-v2026-contact-address) {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 760px) {
  /* Source body copy at 13–15.5px becomes >=16px; larger leads/headings stay larger. */
  html:is([lang="zh-Hans"], [lang="zh-Hant"]) body #content :is(.q41-v2026-home-tip, .q41-v2026-home-metric > p:last-child, .q41-v65-home-example p, .q41-v65-home-trust-card > p:not(.q41-v65-home-eyebrow), .q41-v65-home-trust-media p:not(.q41-v65-home-eyebrow), .q41-v2026-home-faq-item > p, .q41-v2026-static-prose p, .q41-v2026-static-card p, .q41-v2026-static-dimension-grid p, .q41-v2026-static-cta p, .q41-v2026-static-media-heading > div > p:last-child, .q41-v2026-contact-note, .q41-v2026-contact-notes p, .q41-v2026-contact-check li, .q41-v2026-example p, .q41-v2026-feedback-separation, .q41-v2026-feedback-option label, .q41-v57-card p, .q41-v2026-help, .q41-v2026-form .answer-list label) {
    font-size: max(16px, 1rem) !important;
  }
}
