/* Language controls and desktop typography; existing mobile breakpoints are unchanged. */
@layer localization {
  .header-inner {
    gap: 22px;
    direction: ltr;
  }
  .desktop-nav {
    margin-right: 16px;
    gap: 26px;
  }
  .brand {
    direction: ltr;
  }
  .language-menu {
    position: relative;
    flex-shrink: 0;
  }
  .language-menu > summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    list-style: none;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ink);
  }
  .language-menu > summary::-webkit-details-marker {
    display: none;
  }
  .language-menu > summary > .icon {
    width: 18px;
    height: 18px;
    color: var(--teal);
  }
  .language-menu > summary:hover,
  .language-menu[open] > summary {
    background: #edf3ef;
    border-color: var(--line);
  }
  .language-chevron {
    width: 6px;
    height: 6px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    margin: -3px 2px 0 4px;
  }
  .language-menu[open] .language-chevron {
    transform: rotate(225deg);
    margin-top: 3px;
  }
  .language-menu > nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    padding: 7px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 40px #153f351a;
    z-index: 25;
  }
  .language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 13px;
    border-radius: 4px;
    font-size: 14px;
  }
  .language-option:hover,
  .language-option[aria-current] {
    background: #eaf3ed;
    color: var(--teal);
  }
  .language-check {
    visibility: hidden;
    font-size: 12px;
  }
  .language-option[aria-current] .language-check {
    visibility: visible;
  }
  bdi[translate='no'] {
    unicode-bidi: isolate;
  }
  :lang(zh-Hant) {
    --font: 'PingFang TC', 'Microsoft JhengHei', Arial, sans-serif;
  }
  html[lang='zh-Hant'] em {
    font-family: inherit;
    font-style: normal;
    letter-spacing: -0.03em;
  }
  html[lang='zh-Hant'] :is(h1, h2, h3) {
    line-height: 1.4;
  }
  html[lang='zh-Hant'] .hero h1 em {
    white-space: normal;
  }
  html[lang='zh-Hant'] .eyebrow {
    letter-spacing: 0.13em;
  }
  html[lang='zh-Hant'] :is(.hero-copy > p, .service-card p, .about-text > p, .contact-card > p) {
    font-size: 14px;
    line-height: 1.9;
  }
  html[lang='ar'] {
    --font: Tahoma, Arial, sans-serif;
  }
  html[lang='ar']
    :is(h1, h2, h3, em, .eyebrow, .brand-subtitle, .diagram-label, .art-label, .art-caption) {
    letter-spacing: normal;
  }
  html[lang='ar'] :is(h1, h2, h3) {
    line-height: 1.5;
  }
  html[lang='ar'] em {
    font-family: inherit;
    font-style: normal;
  }
  html[lang='ar'] .hero h1 {
    font-size: clamp(40px, 4vw, 59px);
  }
  html[lang='ar'] .hero h1 em {
    white-space: normal;
  }
  html[lang='ar'] .page-hero h1 {
    line-height: 1.5;
  }
  html[lang='ar']
    :is(
      .hero-copy > p,
      .service-card p,
      .service-detail-body p,
      .about-text > p,
      .contact-card > p,
      .legal-content p,
      .workflow-story > p
    ) {
    font-size: 15px;
    line-height: 1.95;
  }
  html[lang='ar'] :is(.desktop-nav, .mobile-menu nav) {
    direction: rtl;
  }
  html[lang='ar'] .brand-subtitle {
    font-size: 8px;
  }
  html[lang='ar'] :is(.workflow-tabs button, .cta-action > span) {
    text-align: start;
  }
  html[lang='ar']
    :is(
      .workflow-tabs button > .icon,
      .workflow-steps li > .icon,
      .service-jump a > .icon,
      .flow-row > b,
      .file-type,
      .result-header > span
    ) {
    margin-left: 0;
    margin-inline-start: auto;
  }
  html[lang='ar']
    :is(
      .button > .icon,
      .text-link > .icon,
      .card-link > .icon,
      .service-jump a > .icon,
      .workflow-tabs button > .icon,
      .workflow-steps li > .icon
    ) {
    transform: scaleX(-1);
  }
  html[lang='ar'] .result-row > strong {
    text-align: end;
  }
  html[lang='ar'] .faq-list p {
    padding-right: 0;
    padding-inline-end: 30px;
  }
  html[lang='ar'] .hero-art {
    direction: ltr;
  }
  html[lang='ar']
    :is(.art-document, .art-source, .art-core, .art-output, .art-human, .art-label, .art-caption) {
    direction: rtl;
  }
  html[lang='ar'] .art-core strong {
    font-size: 13px;
    line-height: 1.5;
  }
  html[lang='ar'] .art-core > span {
    font-size: 7px;
  }
  html[lang='ar'] .art-human span {
    font-size: 10px;
  }
  html[lang='ar'] .art-label {
    font-size: 9px;
  }
  html[lang='ar'] .art-caption {
    font-size: 8px;
  }
  html[lang='ar'] .sample-top b {
    font-size: 8px;
    margin-left: 0;
    margin-inline-start: 5px;
  }
  html[lang='ar'] .sample-input strong {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: start;
  }
  html[lang='ar'] .orbit-label {
    font-size: 12px;
  }
  html[lang='ar'] .about-art-center > span {
    line-height: 1.5;
  }
}
