/* Shared, quiet language control and record viewport; no business form styling. */
[data-record-viewport-active] { overflow-y: auto; overscroll-behavior: contain; }
[data-record-viewport-active]:focus-visible { outline: 2px solid var(--blue, #17374a); outline-offset: 3px; }
[data-verdict="bad"] .media-meta[data-locale-verdict]::before { content: attr(data-label); }
.site-language {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 92px;
  height: 44px;
  color: var(--ink-soft, #5f6c77);
  font: 13px/1.4 system-ui, sans-serif;
  cursor: pointer;
}
.site-language::before {
  content: "";
  position: absolute;
  inset: 6px 0;
  border: 1px solid var(--line, #cbd7df);
  border-radius: 4px;
}
.site-language::after {
  content: "";
  width: 5px;
  height: 5px;
  margin: -3px 0 0 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.site-language__label { white-space: nowrap; }
.site-language select {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}
.site-language:hover { color: var(--ink, #171d24); }
.site-language:hover::before { border-color: var(--ink-soft, #5f6c77); }
.site-language:has(select:focus-visible)::before { outline: 2px solid var(--blue, #17374a); outline-offset: 3px; }

html:not([lang^="zh"]) {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[lang="zh-TW"] { font-family: "PingFang TC", "Microsoft JhengHei", sans-serif; }

.header-shell:has(.site-language) { gap: 16px; }
.site-header__inner:has(.site-language) { gap: 12px; flex-wrap: wrap; }
.site-header__inner > .site-language { margin-left: auto; }
.brandrow:has(.site-language) { gap: 16px; flex-wrap: wrap; }
.brandrow > .site-language { margin-left: auto; }
.top-actions:has(.site-language) { gap: 12px; }
header.brand:has(.site-language) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
header.brand > .site-language { margin-left: auto; }
.header-shell:has(.site-language) > .site-nav { margin-left: auto; }
html:not([lang^="zh"]) .brand-copy strong { white-space: normal; max-width: 22em; }
html:not([lang^="zh"]) .hero-brand b span,
html:not([lang^="zh"]) .brand-cn,
html:not([lang^="zh"]) .brand-product { white-space: normal; overflow-wrap: anywhere; }
html:not([lang^="zh"]) h1,
html:not([lang^="zh"]) h2,
html:not([lang^="zh"]) h3,
html:not([lang^="zh"]) p { overflow-wrap: break-word; }
html:not([lang^="zh"]) .site-nav { gap: clamp(14px, 1.6vw, 24px); }
html:not([lang^="zh"]) [data-collection-navigation] .collection-navigation__services .collection-navigation__link { white-space: normal; }
html:not([lang^="zh"]) [data-collection-navigation] .collection-navigation__branch:not([data-collection-depth="0"]) > summary { white-space: normal; overflow-wrap: break-word; }
html:not([lang^="zh"]) .value-row { grid-template-columns: minmax(100px, 0.35fr) minmax(0, 1fr); }
html:not([lang^="zh"]) .hero-tabs button,
html:not([lang^="zh"]) .hero-controls button { white-space: normal; overflow-wrap: break-word; line-height: 1.35; }

@media (min-width: 781px) and (max-width: 1230px) {
  .header-shell:has(.site-language) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding-block: 10px; }
  .site-header:has(.site-language) { height: auto; }
  .header-shell:has(.site-language) > .brand { grid-column: 1 / -1; grid-row: 1; }
  .header-shell:has(.site-language) > .site-nav { grid-column: 1; grid-row: 2; height: 44px; gap: 14px; justify-content: flex-end; min-width: 0; }
  .header-shell:has(.site-language) > .site-language { grid-column: 2; grid-row: 2; }
  html:not([lang^="zh"]) .header-shell:has(.site-language) > .site-nav { font-size: 13px; gap: 12px; }
}

@media (max-width: 780px) {
  .topbar-inner:has(.site-language) { flex-wrap: wrap; gap: 4px 8px; }
  .topbar-inner:has(.site-language) > .brand { flex-basis: 100%; min-width: 0; }
  .topbar-inner:has(.site-language) > .top-actions { width: 100%; justify-content: flex-end; }
  .top-actions:has(.site-language) > a { white-space: nowrap; }
  .site-header:has(.site-language),
  html.navigation-ready .site-header:has(.site-language),
  html.navigation-ready .about-page .site-header:has(.site-language) { height: auto; }
  .header-shell:has(.site-language),
  html.navigation-ready .header-shell:has(.site-language) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px 44px;
    gap: 8px;
    padding-block: 8px;
  }
  .header-shell:has(.site-language) > .brand { flex: 1 1 auto; min-width: 0; }
  .header-shell:has(.site-language) .brand-copy strong { font-size: 12px; max-width: none; }
  .header-shell:has(.site-language) > .brand { grid-column: 1; grid-row: 1; }
  .header-shell:has(.site-language) > .nav-toggle { grid-column: 3; grid-row: 1; }
  .header-shell:has(.site-language) > .site-language {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .about-page .header-shell:has(.site-language) > .site-home-return { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .header-shell:has(.site-language) > .site-nav { grid-column: 1 / -1; }
  html.navigation-ready .site-header:has(.site-language) .site-nav { top: 100%; }
  html.navigation-ready .site-header:has(.site-language) .site-nav.is-open { max-height: calc(100dvh - 120px); }
  html:not([lang^="zh"]) .hero-carousel { min-height: 600px; }
  html:not([lang^="zh"]) .hero-content { bottom: 200px; }
  html:not([lang^="zh"]) .scene-tabs button { padding-inline: 7px; overflow-wrap: break-word; }
  html:not([lang^="zh"]) .solution-name { flex-wrap: wrap; gap: 8px 20px; }
  html:not([lang^="zh"]) .value-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-language select { transition: none; }
}
