/* Public-page localization must wrap within the viewport, not widen grid tracks. */
.language-switcher::before { content: none; }
.language-switcher select {
  padding-inline: 10px 24px;
  text-overflow: ellipsis;
}
[dir="rtl"] .language-switcher select { padding-inline: 10px 24px; }

/* Chinese headings fit on one line; translated headings often do not. */
.browser-agent-site .agent-hero-layout h1 > span { white-space: normal; }
.browser-agent-site .agent-hero { grid-template-columns: minmax(0, 1fr); }
.browser-agent-site .agent-hero-layout > * { min-width: 0; max-width: 100%; }
.browser-agent-site .agent-hero-copy { width: 100%; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  [dir="rtl"] .site-header { direction: ltr; }
  [dir="rtl"] .site-header :is(.site-nav, .header-actions) { direction: rtl; }
  .kw-phone-page,
  .kw-phone-page .container,
  .kw-phone-hero-layout > *,
  .kw-phone-visual { min-width: 0; max-width: 100%; }
  .kw-phone-page :is(h1, h2, h3, p, li, a, button, span, strong) {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .browser-agent-site .agent-hero-layout { grid-template-columns: minmax(0, 1fr); }
  .browser-agent-site .agent-hero-layout .agent-hero-copy { max-width: 100%; }
  .browser-agent-site .agent-hero-layout :is(h1, .agent-hero-desc) { max-width: 100%; }
  :is(.qqk-public-copy, .professional-solution, .companion-page, .about-page, .inner-page) .button {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    padding-block: 12px;
    height: auto;
  }
  /* Other public pages share the same intrinsic-width risk in translated cards. */
  :is(.qqk-public-copy, .professional-solution, .companion-page, .about-page, .inner-page) {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  :is(.companion-hero-layout, .companion-capabilities, .companion-outcomes-grid,
      .about-hero-layout, .about-story-layout, .about-service-grid,
      .solution-hero-layout, .solution-cap-grid, .professional-matrix-grid,
      .contact-grid, .public-help-layout, .download-grid) > * { min-width: 0; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .sales-channel-list a { flex-wrap: wrap; }
  .sales-channel-list b { white-space: normal; }
  .android-agent-site .aa-proof-band span { min-width: 0; }
}

@media (max-width: 600px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; }
  [dir="rtl"] .site-header { grid-template-columns: minmax(0, 1fr) auto auto; }
  .kw-phone-hero-layout { grid-template-columns: minmax(0, 1fr); }
  .kw-phone-hero-copy { width: 100%; }
  .language-switcher select { width: 108px; }
  .contact-card { padding: 24px; }
}
