/* Shared application menu. Keep these rules scoped to avoid changing each site's theme. */
[data-product-header] .brand { flex-shrink: 0; }
[data-product-header] > .nav,
[data-product-header] > nav.wrap { gap: 18px; }
.product-switcher {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  color: #263247;
  font: 500 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.product-switcher > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #dce2eb;
  border-radius: 10px;
  background: #fff;
  color: #263247;
  font: inherit;
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
}
.product-switcher > summary::-webkit-details-marker { display: none; }
.product-switcher > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.product-switcher[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.product-switcher > summary:hover,
.product-switcher[open] > summary { border-color: #b6c5e2; background: #f5f8fe; }
.product-switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  box-sizing: border-box;
  width: min(248px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px #17294626;
}
.product-switcher__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #263247;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.product-switcher__menu a:hover,
.product-switcher__menu a[aria-current="page"] { background: #edf3ff; color: #2552b8; }
.product-switcher__menu a[aria-current="page"]::after { content: "当前"; font-size: 11px; }
.product-switcher a:focus-visible,
.product-switcher > summary:focus-visible { outline: 2px solid #4674d6; outline-offset: 2px; }
@media (max-width: 1080px) {
  [data-product-header="jjlp"] .nav-links { display: none; }
}
@media (max-width: 860px) {
  [data-product-header="liandianqi"] > .nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  [data-product-header="liandianqi"] .nav-links { order: 3; flex-basis: 100%; }
}
@media (max-width: 760px) {
  [data-product-header="jjlp-windows"] > nav.wrap { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; gap: 12px; }
  [data-product-header="jjlp-windows"] .nav-links { order: 3; flex-basis: 100%; }
}
@media (max-width: 600px) {
  [data-product-header="jjgszh"] .header-inner > .button { display: none; }
  .product-switcher > summary { padding-inline: 12px; min-height: 42px; }
}

/* A directly visible return to the shared homepage, on desktop and mobile. */
.site-brand-group { display: flex; flex-direction: row; align-items: center; gap: 14px; flex: 0 0 auto; }
.site-home-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  box-sizing: border-box; min-height: 36px; padding: 6px 10px;
  border: 1px solid #cdd9ed; border-radius: 6px; background: #f4f7fd; color: #345a99;
  font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  text-decoration: none; white-space: nowrap;
}
.site-home-link svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.site-home-link:hover { color: #224f9f; background: #e8effc; border-color: #98b1dc; }
.site-home-link:focus-visible { outline: 2px solid #4674d6; outline-offset: 3px; }
@media (max-width: 600px) {
  .site-brand-group { gap: 8px; }
  .site-home-link { padding-inline: 8px; }
}
@media (max-width: 420px) {
  [data-product-nav="toggle"] > a { display: none; }
}
@media (max-width: 380px) {
  .site-home-link svg { display: none; }
  [data-product-header] .site-brand-group .brand { font-size: 14px; gap: 7px; }
  [data-product-header] .site-brand-group .brand img { width: 26px; height: 26px; }
  [data-product-header] .product-switcher > summary { font-size: 12px; gap: 7px; padding-inline: 9px; }
  .site-brand-group > a:not(.brand):not(.site-home-link) .text-xs { display: none; }
  .site-brand-group > a:not(.brand):not(.site-home-link) .text-xl { font-size: 16px; }
  .site-brand-group > a:not(.brand):not(.site-home-link) img { width: 32px; height: 32px; }
}
