/* ==========================================================================
   locale.css — typography corrections for non-Latin locales.
   Loaded on every page; only rules scoped to [data-locale] do anything.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Simplified Chinese
   --------------------------------------------------------------------------
   The Latin stack leads with Source Serif 4, which has no CJK glyphs, so the
   browser falls back mid-heading. Chinese also needs looser leading, no
   negative tracking, and slightly larger display sizes to stay legible.
   -------------------------------------------------------------------------- */
[data-locale="zh-cn"] {
  --font-sans: "Figtree", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-display: "Noto Serif SC", "Source Serif 4", "Songti SC", "SimSun",
    Georgia, serif;
}

[data-locale="zh-cn"] body {
  line-height: 1.75;
}

[data-locale="zh-cn"] .t-display,
[data-locale="zh-cn"] .t-h1,
[data-locale="zh-cn"] .t-h2,
[data-locale="zh-cn"] .t-h3,
[data-locale="zh-cn"] .hero-title,
[data-locale="zh-cn"] .card-title,
[data-locale="zh-cn"] .result-title {
  letter-spacing: 0;
  line-height: 1.32;
}

[data-locale="zh-cn"] .hero-title,
[data-locale="zh-cn"] .t-display {
  font-size: 2.625rem;
  line-height: 1.24;
}

[data-locale="zh-cn"] .t-h1 {
  font-size: 2.25rem;
  line-height: 1.28;
}

[data-locale="zh-cn"] .t-h2 {
  font-size: 1.875rem;
  line-height: 1.3;
}

[data-locale="zh-cn"] .t-h3 {
  font-size: 1.3125rem;
}

[data-locale="zh-cn"] .t-lead {
  font-size: 1.0625rem;
  line-height: 1.8;
}

[data-locale="zh-cn"] .t-small,
[data-locale="zh-cn"] .acc-body,
[data-locale="zh-cn"] .step-text,
[data-locale="zh-cn"] .timeline-text {
  line-height: 1.8;
}

/* Long-form Chinese reads better with a slightly larger size and looser leading */
[data-locale="zh-cn"] .prose-medical {
  font-size: 1.125rem;
  line-height: 1.95;
  max-width: 42em;
}
[data-locale="zh-cn"] .prose-medical h2 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin-top: 2.5rem;
}
[data-locale="zh-cn"] .prose-medical h3 {
  font-size: 1.25rem;
  line-height: 1.45;
}
[data-locale="zh-cn"] .prose-medical p {
  text-align: justify;
  text-justify: inter-ideograph;
}
[data-locale="zh-cn"] .prose-medical ul li::before {
  top: 0.82rem;
}

/* Latin fragments inside Chinese copy (prices, acronyms, drug names) */
[data-locale="zh-cn"] .t-num,
[data-locale="zh-cn"] .stat-value,
[data-locale="zh-cn"] .price-amount,
[data-locale="zh-cn"] .fee-price,
[data-locale="zh-cn"] .treatment-price {
  font-family: "Figtree", "Noto Sans SC", system-ui, sans-serif;
}

/* Stat labels are uppercase-tracked in English; Chinese has no case, so the
   tracking only makes it look loose. */
[data-locale="zh-cn"] .stat-label,
[data-locale="zh-cn"] .fact-label,
[data-locale="zh-cn"] .t-micro,
[data-locale="zh-cn"] .eyebrow,
[data-locale="zh-cn"] .verdict-block-title,
[data-locale="zh-cn"] .drawer-label,
[data-locale="zh-cn"] .lang-group,
[data-locale="zh-cn"] .table thead th {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.8125rem;
}

[data-locale="zh-cn"] .eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Buttons and pills hold more horizontal space per character */
[data-locale="zh-cn"] .btn {
  padding-inline: 1.625rem;
}

[data-locale="zh-cn"] .badge,
[data-locale="zh-cn"] .chip {
  font-size: 0.8125rem;
}

/* Tables: Chinese cells are shorter, so allow a little less padding */
[data-locale="zh-cn"] .table th,
[data-locale="zh-cn"] .table td {
  padding: 0.8125rem 1rem;
}

/* The hero copy column can be narrower with Chinese — fewer, denser lines */
[data-locale="zh-cn"] .hero-content {
  max-width: 34rem;
}

@media (max-width: 960px) {
  [data-locale="zh-cn"] .hero-title {
    font-size: 2rem;
  }
  [data-locale="zh-cn"] .t-h1 {
    font-size: 1.75rem;
  }
  [data-locale="zh-cn"] .t-h2 {
    font-size: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   Language switcher: pending locales
   -------------------------------------------------------------------------- */
.lang-item.is-current {
  color: var(--brand);
  font-weight: 600;
  cursor: default;
}
.lang-item.is-pending {
  color: var(--faint);
  cursor: default;
  width: 100%;
}
.lang-item.is-pending:hover {
  background: transparent;
  color: var(--faint);
}
.lang-tag {
  font-size: 0.625rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: 0.0625rem 0.375rem;
  white-space: nowrap;
}
.lang-note {
  padding: 0.625rem 0.625rem 0.25rem;
  margin-top: 0.375rem;
  border-top: 1px solid var(--rule);
  line-height: 1.5;
}
