/* 同一 URL 下中英文切换 */
.site-lang-en .i18n-zh,
.site-lang-zh .i18n-en {
  display: none !important;
}

.site-lang-en .i18n-zh-block,
.site-lang-zh .i18n-en-block {
  display: none !important;
}

/* 顶栏：导航 + Language 并排（Language 在 greedy-nav 外，避免 .greedy-nav button 误伤） */
.masthead__inner-wrap--with-lang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.masthead__inner-wrap--with-lang .masthead__menu {
  flex: 1 1 auto;
  min-width: 0;
}

.masthead__lang {
  flex: 0 0 auto;
  position: relative;
  z-index: 25;
}

.site-lang-dropdown {
  position: relative;
  display: inline-block;
}

.site-lang-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0;
  padding: 0.45em 0.85em;
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.2;
  color: #494e52;
  background: #fff;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.site-lang-dropdown__trigger:hover {
  border-color: #8a8a8a;
  background: #fafafa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.site-lang-dropdown.is-open .site-lang-dropdown__trigger {
  border-color: #6a6a6a;
  background: #f5f5f5;
}

.site-lang-dropdown__caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.1em;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #6f777d;
  transition: transform 0.15s ease;
}

.site-lang-dropdown.is-open .site-lang-dropdown__caret {
  transform: rotate(180deg);
}

.site-lang-dropdown__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem 0;
  margin: 0;
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.site-lang-dropdown__option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 1rem 0.55rem 1.15rem;
  font: inherit;
  font-size: 0.9em;
  text-align: left;
  color: #3c4043;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 0.12s ease;
}

.site-lang-dropdown__option:hover,
.site-lang-dropdown__option:focus {
  outline: none;
  background: #f1f3f4;
}

.site-lang-dropdown__option[aria-checked="true"] {
  font-weight: 700;
  color: #000;
  background: #f6f8fa;
}

/* 兜底：若 Language 仍在 .greedy-nav 内，抵消主题对全部 button 的样式 */
.greedy-nav .site-lang-dropdown__trigger,
.greedy-nav .site-lang-dropdown__option {
  position: static !important;
  height: auto !important;
  right: auto !important;
}

.greedy-nav .site-lang-dropdown__trigger {
  background: #fff !important;
  color: #494e52 !important;
  border: 1px solid #c8c8c8 !important;
}

.greedy-nav .site-lang-dropdown__option {
  background: transparent !important;
  color: #3c4043 !important;
}

@media (max-width: 600px) {
  .masthead__inner-wrap--with-lang {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .masthead__lang {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: -0.25rem;
  }
}

.home-news {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.home-news__heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.home-news__icon {
  color: #d97706;
  font-size: 0.95em;
  transform-origin: 70% 70%;
  animation: home-news-bullhorn-swing 2.8s ease-in-out infinite;
}

@keyframes home-news-bullhorn-swing {
  0%,
  45%,
  100% {
    transform: rotate(0deg);
  }

  8% {
    transform: rotate(-14deg);
  }

  16% {
    transform: rotate(12deg);
  }

  24% {
    transform: rotate(-8deg);
  }

  32% {
    transform: rotate(0deg);
  }
}

.home-news__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.home-news__item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

.home-news__date {
  flex: 0 0 auto;
  min-width: 4.5rem;
  color: #666;
  font-variant-numeric: tabular-nums;
}

.home-news__text {
  flex: 1 1 auto;
}

.home-news__link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.home-news__link:hover,
.home-news__link:focus {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

.pub-anchor {
  display: inline;
  width: 0;
  height: 0;
  overflow: hidden;
  vertical-align: baseline;
}

.archive ol li {
  scroll-margin-top: 5.5rem;
  border-radius: 4px;
}

.archive ol li.pub-anchor--highlight {
  animation: pub-highlight-fade 3s ease-out forwards;
}

@keyframes pub-highlight-fade {
  0% {
    background-color: rgba(224, 242, 254, 0.95);
    box-shadow: inset 0 0 0 1px rgba(186, 230, 253, 0.8);
  }

  65% {
    background-color: rgba(224, 242, 254, 0.45);
    box-shadow: inset 0 0 0 1px rgba(186, 230, 253, 0.35);
  }

  100% {
    background-color: transparent;
    box-shadow: none;
  }
}
