.history-year-nav {
  position: sticky;
  top: 84px;
  z-index: 16;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  background: rgb(7 12 15 / 94%);
  color: #fff;
  border-bottom: 1px solid rgb(255 255 255 / 14%);
  backdrop-filter: blur(14px);
}

.history-year-nav > span {
  display: flex;
  align-items: center;
  padding: 0 34px;
  border-right: 1px solid rgb(255 255 255 / 14%);
  color: var(--coral);
  font: 800 10px "Barlow Condensed";
  letter-spacing: .2em;
}

.history-year-nav > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.history-year-nav a {
  position: relative;
  min-height: 66px;
  padding: 13px 24px 11px;
  border-right: 1px solid rgb(255 255 255 / 12%);
  color: rgb(255 255 255 / 45%);
  font: 900 21px/1 "Barlow Condensed";
  transition: color 180ms ease, background-color 180ms ease;
}

.history-year-nav a::after {
  content: "";
  position: absolute;
  inset: auto 100% 0 0;
  height: 3px;
  background: var(--coral);
  transition: right 260ms cubic-bezier(.2,.75,.2,1);
}

.history-year-nav a small {
  display: block;
  margin-top: 7px;
  color: rgb(255 255 255 / 38%);
  font: 700 9px "Noto Sans TC";
  letter-spacing: .06em;
}

.history-year-nav a:hover,
.history-year-nav a:focus-visible,
.history-year-nav a.active {
  background: rgb(255 255 255 / 5%);
  color: #fff;
}

.history-year-nav a.active::after {
  right: 0;
}

.history-year-nav a.active small {
  color: rgb(255 255 255 / 72%);
}

#year-1997,
#year-2022,
#year-2023,
#year-2025 {
  scroll-margin-top: 150px;
}

@media (max-width: 900px) {
  .history-year-nav {
    top: 72px;
    display: block;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .history-year-nav::-webkit-scrollbar {
    display: none;
  }

  .history-year-nav > span {
    display: none;
  }

  .history-year-nav > div {
    display: flex;
    width: max-content;
    min-width: 100%;
  }

  .history-year-nav a {
    flex: 0 0 132px;
    min-height: 58px;
    padding: 11px 16px 9px;
    font-size: 18px;
  }

  .history-year-nav a small {
    margin-top: 5px;
    font-size: 8px;
  }

  #year-1997,
  #year-2022,
  #year-2023,
  #year-2025 {
    scroll-margin-top: 130px;
  }
}
