/* The switch uses the same positions and language names in both editions. */
.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 38px);
  min-width: 0;
}

.header-tools nav {
  min-width: 0;
  flex-wrap: wrap;
  gap: 2px clamp(12px, 1.9vw, 28px);
}

.language-switch {
  display: inline-flex;
  flex: none;
  align-items: stretch;
  padding: 2px;
  border: 1px solid #a4b9ad;
  border-radius: 6px;
  background: #f5f7f2;
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 2px 9px;
  color: var(--green);
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
}

.language-switch a[lang="zh-CN"] {
  font: 550 .91rem/1.5 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.language-switch a[lang="bo"] {
  font: 500 1.03rem/1.9 WQTibetan, Kailasa, serif;
}

.language-switch a:hover { text-decoration: underline; }
.language-switch a[aria-current="true"] { color: #fff; background: var(--green); }

/* Allow room above and below the baseline for stacked Tibetan glyphs. */
html[lang="bo"] body {
  font-family: WQTibetan, Kailasa, "PingFang SC", sans-serif;
  font-size: 1.06rem;
  line-height: 2.05;
  overflow-wrap: anywhere;
}

html[lang="bo"] :is(h1, h2, h3) {
  font-family: WQTibetan, Kailasa, serif;
  line-height: 1.72;
  letter-spacing: normal;
}

html[lang="bo"] :is(.cover-company, .kicker, .brand b) { letter-spacing: normal; }
html[lang="bo"] .brand b:lang(bo) { line-height: 1.75; }
html[lang="bo"] [lang="zh-CN"] { font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html[lang="bo"] .bar .brand { flex: none; }
html[lang="bo"] .header-tools nav a { font-size: 1rem; line-height: 1.95; }
html[lang="bo"] .cover-copy h1 { font-size: clamp(2.15rem, 3.7vw, 3.5rem); }
html[lang="bo"] .cover-copy > p:last-of-type,
html[lang="bo"] :is(.domain-list p, .work-copy p, .service-intro p, .project-detail dd, .lead, .profile-lead) {
  line-height: 2.05;
}

html[lang="bo"] :is(.project-intro, .institutional, .service-intro, .game-intro) h1 {
  font-size: clamp(2.05rem, 3.75vw, 3.45rem);
}

html[lang="bo"] .service-directory a { line-height: 1.95; padding-block: .4rem; }
html[lang="bo"] .service-items li { font-size: 1rem; }
html[lang="bo"] .registered-scope p[lang="zh-CN"] { font-size: 1rem; line-height: 1.85; }
html[lang="bo"] .brief-link { max-width: 100%; }
html[lang="bo"] .registry dd:lang(zh-CN) { line-height: 1.8; }

@media (max-width: 60rem) {
  header .bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand languages" "primary primary";
    align-items: center;
    gap: 4px 12px;
    padding-block: 9px 7px;
  }

  header .brand { grid-area: brand; justify-self: start; }
  .header-tools { display: contents; }
  .header-tools nav {
    grid-area: primary;
    margin-top: 0;
    justify-content: flex-start;
    gap: 0 clamp(12px, 2.75vw, 26px);
  }

  .header-tools nav a { padding-block: .32rem; }
  .header-tools .contact-nav { padding: .32rem 0; border: 0; }
  .language-switch { grid-area: languages; justify-self: end; }
  .language-switch a { min-height: 44px; }
}

@media (max-width: 42.5rem) {
  html[lang="bo"] .cover-copy h1 { font-size: clamp(1.95rem, 6.5vw, 2.75rem); }
  html[lang="bo"] .cover-links { gap: .6rem 1.2rem; }
  html[lang="bo"] .ocr-parts dt { padding-inline: 2px; line-height: 1.9; }
}

@media (max-width: 30rem) {
  html[lang="bo"] .domain-list { grid-template-columns: minmax(0, 1fr); }
  html[lang="bo"] .header-tools nav { gap: 0 13px; }
  html[lang="bo"] .foot-links { row-gap: 6px; }
}

@media print {
  .language-switch { display: none; }
}
