.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.language-picker { display: block; }
.language-picker select { appearance: none; min-width: 88px; padding: 7px 27px 7px 9px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper) linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 12px) 50% / 5px 5px no-repeat; color: var(--ink); font: 700 11px var(--sans); cursor: pointer; }
.language-picker select:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

html[lang^="zh"] body,
html[lang="ja"] body { letter-spacing: 0; }

html[lang="zh-Hans"] h1,
html[lang="zh-Hans"] h2,
html[lang="zh-Hans"] .card-heading h3,
html[lang="zh-Hans"] .steps h3 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", ui-serif, serif;
}

html[lang="zh-Hant"] h1,
html[lang="zh-Hant"] h2,
html[lang="zh-Hant"] .card-heading h3,
html[lang="zh-Hant"] .steps h3 {
  font-family: "Songti TC", "STSong", "Noto Serif CJK TC", ui-serif, serif;
}

html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] .card-heading h3,
html[lang="ja"] .steps h3 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", ui-serif, serif;
}

html[lang^="zh"] h1,
html[lang="ja"] h1 {
  text-wrap: balance;
}

html[lang^="zh"] h1 em,
html[lang^="zh"] h2 em,
html[lang="ja"] h1 em,
html[lang="ja"] h2 em {
  font-style: normal;
  font-weight: 500;
}

html[lang^="zh"] .hero h1 {
  font-size: clamp(46px, 4.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

html[lang="ja"] .hero h1 {
  font-size: clamp(42px, 4.1vw, 56px);
  line-height: 1.15;
  letter-spacing: -.035em;
}

html[lang^="zh"] h2,
html[lang="ja"] h2 {
  font-size: clamp(40px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -.045em;
  line-break: strict;
  overflow-wrap: anywhere;
}

html[lang^="zh"] .intro-grid > *,
html[lang="ja"] .intro-grid > *,
html[lang^="zh"] .feature-catalogue > *,
html[lang="ja"] .feature-catalogue > *,
html[lang^="zh"] .advanced > *,
html[lang="ja"] .advanced > * {
  min-width: 0;
}

html[lang^="zh"] .workflow h2,
html[lang="ja"] .workflow h2 {
  max-width: 940px;
}

@media (min-width: 761px) {
  html[lang^="zh"] .download-content,
  html[lang="ja"] .download-content {
    width: min(70%, 720px);
  }
}

html[lang^="zh"] .lede,
html[lang="ja"] .lede {
  max-width: 520px;
  font-size: 17px;
  line-height: 1.72;
}

html[lang^="zh"] .hero-actions,
html[lang="ja"] .hero-actions {
  flex-wrap: wrap;
  gap: 14px 18px;
}

html[lang^="zh"] .feature-group h3,
html[lang="ja"] .feature-group h3 {
  line-height: 1.12;
  letter-spacing: -.035em;
}

@media (max-width: 1050px) {
  html[lang^="zh"] .site-header nav,
  html[lang="ja"] .site-header nav {
    display: none;
  }

  html[lang^="zh"] .hero,
  html[lang="ja"] .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding: 62px 0 58px;
  }

  html[lang^="zh"] .hero-copy,
  html[lang="ja"] .hero-copy {
    max-width: 720px;
  }

  html[lang^="zh"] .hero-visual,
  html[lang="ja"] .hero-visual {
    min-height: 430px;
  }

  html[lang^="zh"] h2,
  html[lang="ja"] h2 {
    font-size: clamp(38px, 5.4vw, 52px);
    line-height: 1.12;
  }

  html[lang^="zh"] .intro-grid,
  html[lang="ja"] .intro-grid,
  html[lang^="zh"] .advanced,
  html[lang="ja"] .advanced,
  html[lang^="zh"] .improvements-head,
  html[lang="ja"] .improvements-head,
  html[lang^="zh"] .feature-catalogue,
  html[lang="ja"] .feature-catalogue {
    grid-template-columns: 1fr;
  }

  html[lang^="zh"] .intro-grid,
  html[lang="ja"] .intro-grid { gap: 28px; }

  html[lang^="zh"] .intro-grid div,
  html[lang="ja"] .intro-grid div {
    max-width: 640px;
    padding-top: 0;
  }

  html[lang^="zh"] .intro-preset-note,
  html[lang="ja"] .intro-preset-note {
    grid-template-columns: 1fr;
    gap: 21px;
  }

  html[lang^="zh"] .preset-path + .preset-path,
  html[lang="ja"] .preset-path + .preset-path {
    padding: 21px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  html[lang^="zh"] .feature-catalogue,
  html[lang="ja"] .feature-catalogue { margin-bottom: 96px; }

  html[lang^="zh"] .macos-card,
  html[lang="ja"] .macos-card { min-height: 0; }

  html[lang^="zh"] .macos-card dl,
  html[lang="ja"] .macos-card dl { margin-top: 28px; }

  html[lang^="zh"] .improvements-head,
  html[lang="ja"] .improvements-head { gap: 22px; }

  html[lang^="zh"] .advanced,
  html[lang="ja"] .advanced { gap: 46px; }

  html[lang^="zh"] .advanced-copy,
  html[lang="ja"] .advanced-copy { max-width: 720px; }
}

@media (max-width: 760px) {
  .site-header { gap: 10px; }
  .site-header .button-small { display: none; }
  .language-picker { margin-left: auto; }

  html[lang^="zh"] .hero h1 { font-size: 36px; }
  html[lang="ja"] .hero h1 { font-size: 35px; }

  html[lang^="zh"] h2,
  html[lang="ja"] h2 {
    font-size: 32px;
    line-height: 1.15;
  }

  html[lang^="zh"] .changelog-intro h1,
  html[lang="ja"] .changelog-intro h1 {
    font-size: 34px;
    line-height: 1.12;
  }

  html[lang^="zh"] .macos-card h3,
  html[lang="ja"] .macos-card h3 {
    font-size: 31px;
    line-height: 1.12;
  }

  html[lang^="zh"] .feature-group h3,
  html[lang="ja"] .feature-group h3 {
    font-size: 26px;
    line-height: 1.18;
  }

  html[lang="ja"] .workflow h2 {
    font-size: 30px;
  }
}

/* Shared layout for all scripts, including longer translations and RTL text. */
.language-picker { flex-shrink: 0; }
.language-picker select { max-width: 190px; font-size: 13px; }
.hero-copy, .hero-copy > *, .advanced > *, .feature-catalogue > *, .download-content { min-width: 0; }
h1, h2, h3, p, li, dd, th, td, .button { overflow-wrap: break-word; }
.hero-actions, .platform-actions, .dialog-actions { flex-wrap: wrap; }
.button, .platform-download { white-space: normal; text-align: center; }
.feature-comparison th, .feature-comparison td { text-align: start; }
html[dir="rtl"] body { letter-spacing: normal; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: normal; line-height: 1.3; }
html[dir="rtl"] .language-picker select { padding-inline: 9px 27px; background-position: 12px 50%; }
html[dir="rtl"] .language-picker { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .dialog-close { right: auto; left: 18px; }
html[dir="rtl"] .dialog-panel { text-align: right; }
html[dir="rtl"] .install-steps { padding-left: 0; padding-right: 24px; }
html[dir="rtl"] .hero-visual, html[dir="rtl"] .advanced-image, .command-row code { direction: ltr; }
.command-row code { unicode-bidi: isolate; text-align: left; }
html[dir="rtl"] .command-row { direction: ltr; }
html[dir="rtl"] .command-row button { direction: rtl; }
html[dir="rtl"] .release-version { text-align: start; }
html[lang="th"] body, html[lang="lo"] body, html[lang="km"] body, html[lang="my"] body { line-height: 1.8; letter-spacing: normal; }
html[lang="th"] h1, html[lang="lo"] h1, html[lang="km"] h1, html[lang="my"] h1 { line-height: 1.35; letter-spacing: normal; }
@media (max-width: 1200px) {
  .site-header nav { display: none; }
}
@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 760px; }
}
@media (max-width: 760px) {
  .language-picker select { max-width: 145px; }
  .hero h1 { font-size: clamp(32px, 8vw, 46px); }
  .download-content { width: 100%; }
  html[dir="rtl"] .language-picker { margin-inline-start: auto; margin-inline-end: 0; }
}
.gallery-card::before { content: attr(data-before); }
.gallery-card::after { content: attr(data-after); }
.advanced-image::before { content: attr(data-label); }
html[dir="rtl"] .feature-group li { padding-left: 0; padding-right: 15px; }
html[dir="rtl"] .feature-group li::before { left: auto; right: 1px; }
html[dir="rtl"] .install-steps li { padding-left: 0; padding-right: 36px; }
html[dir="rtl"] .install-steps li::before { left: auto; right: 0; }

/* Long compound words must not enlarge grid tracks beyond the viewport. */
.improvements-head > *, .intro-grid > *, .comparison > *,
.comparison-gallery > *, .feature-group, .site-footer > * { min-width: 0; }
h1, h2, h3, p, li, dd, th, td, .button { overflow-wrap: anywhere; }
