/* Site-wide top bar above the announcement strip.
   Layout follows the feichuang topbar: note on the left, contact items on the right, hidden on narrow screens.
   Colors follow this site's light header. Markup: ym_site_topbar() in functions.php. */
.ym-topbar {
  background: #fff;
  color: #173c56;
  border-bottom: 1px solid #d9e2ea;
  font: 400 12.5px/1 Arial, sans-serif;
  letter-spacing: .02em;
}
.ym-topbar-in {
  width: calc(100% - 64px);  /* 761-1099px: same side gutters as .header-row */
  height: 36px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}
@media (min-width: 1100px) {
  .ym-topbar-in { width: min(1180px, calc(100% - 48px)); }  /* same formula as .header-row */
}
.ym-topbar-note {
  margin-right: auto;  /* note on the left, contact items grouped on the right */
  font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(23, 60, 86, .72);
}
.ym-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #173c56;
  text-decoration: none;
  transition: color .3s;
}
.ym-topbar-item:hover { color: #0b5fa5; }
.ym-topbar-item:focus-visible { outline: 2px solid #14598a; outline-offset: 3px; border-radius: 2px; }
.ym-topbar-item svg { width: 15px; height: 15px; flex: none; }
/* GTranslate 语言切换芯片（float 组件）：缩到顶栏尺寸，语言列表改为
   绝对定位下拉（组件默认在文档流里展开，会把 37px 的顶栏撑高）。
   内层选择器带 .gt_float_switcher 抬优先级，压过 float.js 运行时注入的样式 */
.ym-topbar-lang { display: inline-flex; align-items: center; flex: none; }
.ym-topbar-lang .gtranslate_wrapper { display: inline-flex; align-items: center; }
.ym-topbar-lang .gt_float_switcher {
  position: relative;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  color: #173c56;
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid #d9e2ea;
}
.ym-topbar-lang .gt_float_switcher .gt-selected { padding: 0; background-color: transparent; }
.ym-topbar-lang .gt_float_switcher .gt-selected .gt-current-lang { padding: 4px 9px; color: #173c56; }
.ym-topbar-lang .gt_float_switcher .gt-current-lang img { width: 16px; height: auto; margin: 0 6px 0 0; border-radius: 2px; }
.ym-topbar-lang .gt_float_switcher .gt-selected .gt-current-lang span.gt-lang-code { font-size: 12px; font-weight: 600; letter-spacing: .05em; color: #173c56; position: static; top: auto; }
.ym-topbar-lang .gt_float_switcher .gt_options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 150px;
  max-height: 260px;
  background: #fff;
  border: 1px solid #d9e2ea;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16, 44, 70, .14);
}
.ym-topbar-lang .gt_float_switcher .gt_options a { padding: 7px 12px; color: #173c56; font-size: 12px; }
.ym-topbar-lang .gt_float_switcher .gt_options a:hover,
.ym-topbar-lang .gt_float_switcher .gt_options a.gt-current { color: #0878d1; background: #eef5fb; }
