html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
}

header .el-menu-item,
header nav > div {
  cursor: pointer;
}

.static-menu-parent {
  position: relative;
}

.static-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 100;
  display: none;
  width: auto;
  min-width: 60px;
  max-width: 80px;
  padding: 0;
  transform: translateX(-50%);
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.static-menu-parent:hover > .static-submenu,
.static-menu-parent:focus-within > .static-submenu,
.static-menu-parent.is-submenu-open > .static-submenu {
  display: block;
}

/* 覆盖导航项和弹层之间的 10px Popper 间距，避免鼠标下移时丢失悬停。 */
.static-submenu::before {
  content: "";
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 12px;
  background: transparent;
}

/* Recreate Element Plus' Popper arrow positioning without the Popper runtime. */
.static-submenu > .el-popper__arrow {
  position: absolute;
  top: -5px;
  left: 50% !important;
  z-index: 1;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
}

.static-submenu > .el-popper__arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 1px solid #e4e7ed;
  border-right-color: transparent;
  border-bottom-color: transparent;
  background: #fff;
  transform: rotate(45deg);
}

.static-submenu a {
  display: block;
  color: #4b5563;
  white-space: nowrap;
  text-decoration: none;
}

.static-submenu a:hover,
.static-submenu a:focus {
  color: #4b5563;
  background: #dedfe0;
  outline: none;
}

/* Match the legacy article layout: every text paragraph starts two characters in. */
#ArticleDetails > .whitespace-pre-wrap > p {
  text-indent: 2em;
}

/* Use the same two-character first-line indent in news-list summaries. */
#ArticleDetailsList .touch-manipulation > p.line-clamp-3,
#ArticleDetailsList .touch-manipulation > p.line-clamp-3 p {
  text-indent: 2em;
}

.static-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.static-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.static-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.static-slide-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.static-slide-dot.is-active {
  background: #fff;
}

.static-toast {
  position: fixed;
  top: 82px;
  left: 50%;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  transform: translateX(-50%);
  border-radius: 6px;
  color: #fff;
  background: rgba(31, 41, 55, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 14px;
}

@media (max-width: 767px) {
  .static-submenu {
    display: none !important;
  }

  .static-slide-dot {
    width: 8px;
    height: 8px;
  }
}
