header {
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  display: grid;
  background-color: white;
  align-items: center
}

.sitelogo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  justify-content: center;
}

.sitelogo>a {
  width: auto;
  height: auto;

}

.sitelogo>a>img {
  height: 80px;
  aspect-ratio: 1/1;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

h1 {}

.sitelogo h1>a {
  color: rgb(37, 37, 37);
}

nav {
  width: 100%;
  height: 60%;
  grid-column: 1 / 2;
}

nav>ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: fit-content;
  height: 100%;
  gap: 3rem;
}

nav>ul>li {
  display: flex;
  align-items: center;
  height: 100%;
}

nav>ul>li:last-child {
  display: none;
}

nav>ul>li>a {
  font-size: 1.5rem;
  color: black;

}




.nav-trigger {
  border: none;
  cursor: pointer;
  color: transparent;
  font-size: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  background-image: url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/icons/list.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 80% 80%;
  border-radius: 50%;
  background-color: white;
}

.pagetools {
  width: 100%;
  height: 60%;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 1rem;
  grid-column: 2 / 4;
}

.pagetools>* {
  height: 100%;
  border-radius: 99px;
}

.accessibility {
  font-size: 0;
  aspect-ratio: 1/1;

  background-image: url("../resources/ui/icon-accessibility.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}

.accessibility:active {
  box-shadow: -1px 1px 1px 1px lightgray;
}

.themeswitcher {
  flex: 0 0 auto;
  position: relative;
  aspect-ratio: 2 / 1;
  cursor: pointer;
  overflow: hidden;
  background-color: whitesmoke;
  box-shadow: inset 1px 2px 5px 1px rgba(0, 0, 0, 0.329);
}

.themeswitcher input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.track {
  display: flex;
  align-items: center;
  gap: 0;
  width: 150%;
  height: 100%;
  padding: 0;
  transition: transform 0.3s ease;
}

.themeicon,
.knob {
  flex: 0 0 auto;
  width: 33.3333%;
  height: 100%;
  aspect-ratio: 1 / 1;
}

.knob {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
}

.knob-inner {
  height: 70%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: white;
  box-shadow: -2px 2px 3px 3px lightgray;
}

.themeicon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 55% 55%;
}

.icon-sun {
  background-image: url('../resources/ui/icon-sun.svg');
}

.icon-moon {
  background-image: url('../resources/ui/icon-moon.svg');
}

.themeswitcher input:checked+.track {
  transform: translateX(calc(-1 * 100% / 3));
}

.themeswitcher:has(input:checked) {
  background-color: gray;
  box-shadow: inset 1px 2px 5px 1px black;
}

.themeswitcher input:checked+.track .knob-inner {
  background-color: #FFF6C9;
  box-shadow: -2px 2px 3px 3px black;
}

.search-outter {
  display: flex;
  justify-content: flex-start;
}

.search-wrapper {
  display: flex;
  width: auto;
  max-width: 100%;
  background-color: whitesmoke;
  padding: 4px;
  border-radius: 99px;
  box-shadow: inset 1px 2px 5px 1px rgba(0, 0, 0, 0.329);
  transition: box-shadow 0.25s ease, border-color 0.2s ease;
}

.search-input {
  width: 70px;
  max-width: 100%;
  border: none;
  outline: none;
  background: transparent;
  border-radius: 60px 0 0 60px;
  padding-left: 1rem;
  font-size: 1rem;
  transition: width 0.2s ease;
}

.search-input::placeholder {
  width: 100%;
  color: gray;
}

.search-btn {
  background-color: white;
  border: none;
  outline: none;
  height: 100%;
  aspect-ratio: 1/1;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: -2px 2px 3px 3px lightgray;
  background-image: url('../resources/ui/icon-search.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50% 50%;
}

.nav-dropdown {
  display: none;
  width: 100%;
  height: auto;
  position: absolute;
  top: 160px;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: white;
  z-index: 100;
  padding: 4%;
  grid-template-columns: repeat(1, 1fr);
}

.nav-listcontainer {
  padding: 1rem;
}

.nav-listcontainer>p {
  font-size: 1.5rem;
}

.nav-listcontainer>p::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.5em;
  border-radius: 50%;
  background-color: red;
  vertical-align: middle;
  transform: translateY(-0.1em);
}

.nav-mainlist>li {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-top: 1rem;
}

.nav-mainlist>li>a {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 4em;
}

.nav-sublist {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-sublist a {
  color: dimgray;
  font-size: 1rem;
}

main {
  width: 100%;
  height: auto;
  padding: 4% 0;
  background-color: whitesmoke;
}

.banner {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

.banner-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: lightgray;
}

.banner-media>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-desc {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3rem 1rem 30px 1rem;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.95) 0%,
      rgba(0, 0, 0, 0.6) 50%,
      rgba(0, 0, 0, 0) 100%);
  color: white;
  z-index: 1;
}

.banner-desc>a {
  font-size: 2rem;
  font-weight: bolder;
  color: white;
}

.banner-media>div>p:first-child {
  font-size: 0.85em;
  color: lightgray;
  margin: 1rem 0;
}

.banner-media>div>p:last-child {
  font-size: 0.85em;
  color: lightgray;
}

.banner-news {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 20px;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.1);
}

.banner-news>li {
  width: 20%;
  height: unset;
  display: flex;
}

.banner-news li.is-active {
box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 4px 6px 16px -4px rgba(0,0,0,.2);
}

.banner-news a {
  visibility: hidden;
}

.banner-news span {
  padding-right: 1rem;
}



.banner-news>li>a {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  font-size: 1rem;
  color: black;
}

.overview {
  WIDTH: 100%;
  HEIGHT: AUTO;
  display: flex;
  flex-direction: column;
  padding: 4%;
}

.overview h2 {
  width: 100%;
  padding: 1rem;
  font-size: 2rem;
}

.overview>div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
  width: 100%;
  height: auto;
  gap: 1rem;
  padding: 1rem 0;
}

.overview a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: black;
  background-color: white;
  border: solid 1px whitesmoke;
  white-space: nowrap;
  border-radius: 99px;
  padding: 1rem;
}

.section2 {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 4%;
  gap: 4rem;
}

.sample {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sample>h2 {
  font-size: 2rem;
  color: black;
  padding: 1rem;
}

.sample>ul {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
  align-items: flex-start;
  background-color: white;
  border-radius: 16px;
}

.sample>ul>li {
  display: flex;
  flex-direction: column;
  width: auto;
}

.sample>ul>li>a {
  width: auto;
  font-size: 1rem;
  color: black;
}

.sample>ul>li>a:hover {
  text-decoration: underline;
}

.mixpanel {
  height: auto;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 16px;
}

.mixpanel-cell {
  display: block;
  border-radius: 8px;
  width: 100%;
}

.mixpanel-cell>a {
  font-size: 1.5rem;
  color: black;
}


.mixpanel-cell-small>p {
  font-size: 1rem;
  color: gray;
}

.mixpanel>div:first-child {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.mixpanel>div:nth-child(2) {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.mixpanel>div:nth-child(3) {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
}

.mixpanel-cell-small {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-left: 3rem;
}

.mixpanel-cell-small::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: whitesmoke;
  border: solid 1px white;
  box-shadow: inset 0px 0px 3px 1px rgba(0, 0, 0, 0.329);
}

.mediaLib {
  grid-column: 2 / 3;
  grid-row: 1 / 4;
  aspect-ratio: 1 / 1;
  align-self: start;
  position: relative;
  overflow: hidden;
  border-radius: 16px;

}

.mediaLib img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: hidden;
}

.mediaLib a {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30%;
  padding: 1rem;
  color: black;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(30px);
}

.mediaLib a>p {
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mediaLib a>p:last-child {
  color: gray;
}

.topicSection {
  width: 100%;
  height: auto;
  padding: 4%;
  gap: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.category>div {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
}

.category>div h2 {
  font-size: 2rem;
  padding: 1rem;
  width: auto;
  font-weight: bolder;
}

.category>div p {
  display: flex;
  align-items: center;
  font-weight: bolder;
  color: dimgray;

}

.category>div p>span {
  margin-left: 4px;
  padding: 0 1rem;
  color: white;
  font-weight: bolder;
  background-color: #24466e;
}

.category>div a {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: white;
  font-size: 1rem;
  padding: 1rem;
  backdrop-filter: brightness(1.1);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.topic-index {
  width: 100%;
  height: auto;
  display: flex;
  gap: 1rem;
  flex-direction: column;
  height: auto;
}

.topic-index>li {
  padding: 1rem;
  background-color: white;
  border-radius: 16px;
}

.topic-index a {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.topic-title {
  width: 70%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.topic-title>p:first-child {
  color: black;
}

.topic-title>p:last-child {
  color: gray;
}

.topic-index img {
  width: 30%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  background: gray;
}

.topic-preview>li a {
  color: black;
  border-radius: 8px;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.7);
}

.topic-preview>li p {
  height: 100px;
  padding: 0 1rem;
}

.contributors {
  position: relative;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 2% 4%;
  isolation: isolate;
  overflow: hidden;
}

.contributors::before {
  content: "";
  position: absolute;
  inset: -110%;
  background-image: url(../resources/img/ui/icon-heart.svg);
  background-color: #24466e;
  background-repeat: repeat;
  background-size: 200px 200px;
  transform: rotate(20deg);
  transform-origin: center;
  filter: blur(2px);
  z-index: -1;
  pointer-events: none;
}

.contributors-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.contributors-head h2 {
  letter-spacing: 0.5rem;
  font-weight: bolder;
  font-size: 2rem;
  color: white;
  font-weight: bolder;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
}

.contributors-head p {
  letter-spacing: 0.5rem;
  color: white;
  font-size: 1rem;
  border-top: solid 1px white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
}

.contributors-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10%;
  width: 100%;
  height: auto;
  padding: 10% 0 0 0;
}

.contributor-card {
  display: flex;
  flex-direction: row;
  width: 20%;
}

.contributor-avatar {
  width: 40%;
  height: auto;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background-color: lightgray;
}

.contributor-name {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: lightgray;
  width: 100%;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
}

footer {
  background-color: white;
}

.footer-navContainer {
  width: 100%;
  height: auto;
  padding: 4%;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4rem;
}

.footer-nav>li {
  flex: 1;
}

.footer-nav>li>p {
  font-size: 2rem;
  font-weight: bolder;
  color: black;
  padding-bottom: 1rem;
}

.footer-subnav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-subnav li,
.footer-subnav a {
  color: black;
}

.footer-nav a:hover {
  border-bottom: solid 1px;
}

.qrcode {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.qrcode>div {
  display: flex;
  flex-direction: row;
  width: 240px;
  height: 120px;
  padding: 8px;
  gap: 1rem;
  background-color: #24466e;
  color: white;
  border-radius: 16px;
}

.qrcode>div img {
  height: 100%;
  aspect-ratio: 1 / 1;
  border: solid 1px lightgray;
  border-radius: 8px;
}

.qrcode>div span {
  padding: 4px;
}

.footer-regeister {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: solid 1px dimgray;
  background-color: white;
  padding: 4%;
}

.footer-regeister a {
  font-size: 1rem;
  color: black;
}

.icp {
  text-align: center;
}

.psnf {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.psnf-icon {
  display: inline-block;
  height: 20px;
  aspect-ratio: 1/1;
  background-image: url('../resources/img/psnf.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}

footer>p:last-child {
  width: 100%;
  height: auto;
  padding: 0;
  color: black;
  text-align: center;
  padding-bottom: 2%;
}

.backtop {
  z-index: 99;
  position: fixed;
  aspect-ratio: 1/1;
  border: none;
  border-radius: 50%;
  background: white;
  color: black;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  box-shadow: 0 4px 12px rgba(128, 128, 128, 0.5), 0 4px 12px rgba(255, 255, 255, 0.5);
}

.backtop>svg {
  width: 60%;
  height: 60%;
}

.backtop.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.pageBlurOverlay {
  position: fixed;
  inset: 0;
  z-index: 98;
  backdrop-filter: blur(0px);
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  visibility: hidden;
  transition: backdrop-filter 0.1s ease, opacity 0.1s ease, visibility 0s linear 0.1s;
  pointer-events: none;
}

.pageBlurOverlay.is-active {
  backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
  transition: backdrop-filter 0.1s ease, opacity 0.1s ease, visibility 0s linear 0s;
}


/* ---- banner 单图无限循环轨道 ---- */
.banner-media-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.banner-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
  /* 高度由 JS 按单张高度设置，保证 translateY(-100%) 恰为一格 */
}

.banner-track.is-animating {
  transition: transform .45s ease;
}

.banner-track img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 未加载出图时的占位底色（按需调整） */
.banner-track img:not([src]),
.banner-track img[src=""] {
  background: #e9e9e9;
}



/* ============================================================
   1. 断点：大屏手机
   ============================================================ */
@media (min-width: 480px) {
  header {
    height: 160px;
    padding: 0 4%;
  }

  .banner-media {
    width: 100%;
  }

  .sample {
    width: 100%;
  }

  .backtop {
    right: 6%;
    bottom: 10%;
    width: 10%;
  }
}

/* ============================================================
   2. 断点：平板
   ============================================================ */
@media (min-width: 768px) {}

/* ============================================================
   3. 断点：桌面
   ============================================================ */
@media (min-width: 1270px) {
  header {
    height: 80px;
    padding: 0 20%;
    grid-template-rows: 1fr;
  }

  .sitelogo {
    grid-column: auto;
    justify-content: flex-start;
  }

  nav {
    grid-column: auto;
  }

  nav>ul {
    margin: 0 auto;
  }

  .nav-trigger {
    font-size: 1.5rem;
    color: black;
    background-image: none;
    background-color: transparent;
    box-shadow: none;
  }

  .nav-listcontainer {
    background-color: white;
    border-radius: 8px;
    box-shadow: -2px 4px 8px 1px lightgray;
  }

  .accessibility {
    font-size: 1rem;
    aspect-ratio: 16/9;

    background: none;
  }

  .pagetools {
    grid-column: auto;

  }

  nav>ul>li:hover {
    box-shadow: inset 0 -1px 0 0 currentColor;
  }

  nav>ul>li:last-child {
    display: flex;
  }

  .nav-dropdown {
    padding: 1% 2%;
    gap: 4rem;
    top: 80px;
    grid-template-columns: repeat(4, 1fr);

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);

  }

  .banner {
    padding: 0 20%;
    flex-direction: row;
  }

  .banner-media {
    width: 50%;
    border-radius: 8px 0 0 8px;
    border-radius: 8px 0 0 8px;
  }

  .banner-news {
    position: static;
    flex-direction: column;
    width: 50%;
    height: unset;
    border-radius: 0 8px 8px 0;
    background-color:white;
    border:solid 1px solid lightgray
  }

  .banner-news>li {
    flex: 1 1 0; 
    border-radius: 0;
    width: 100%;
    
  }

  .banner-news>li:hover {
    /* background-color: #24466e; */
  }

  .banner-news a {
    visibility: visible;
  }

  .overview {
    flex-direction: row;
    padding: 5% 20%;
  }

  .overview h2 {
    width: 20%;
    display: flex;
    align-items: center;
    background: none;
  }

  .overview>div {
    width: 80%;
    gap: 4%;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .overview a {
    background-color: white;
    border-radius: 99px;
    box-shadow: -4px 4px 4px 2px lightgray;
    padding: none;
  }

  .section2 {
    flex-direction: row;
    padding: 0 20%;
    gap: 0;
    justify-content: space-between;
  }

  .sample {
    width: 40%;
  }

  .mixpanel {
    width: 56%;
  }

  .topicSection {
    padding: 5% 20%;
    gap: 16px;
  }

  .category {
    flex-direction: row;
    background-color: white;
  }

  .category>div {
    width: 20%;
    flex-direction: column;
    padding: 1rem;
  }

  .topic-index {
    width: 80%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
  }

  .topic-index>li {
    width: 50%;
  }

  .topic-index img {
    border-radius: 0;
  }

  .contributors {
    padding: 2% 20%;
  }

  .contributor-card {
    flex-direction: column;
    align-items: center;
    width: 10%;
    gap: 1rem;
  }

  .contributor-avatar {
    width: 100%;
    border-radius: 0;
  }

  .footer-navContainer {
    padding: 4% 20%;
  }

  .footer-nav {
    flex-direction: row;
    gap: 0;
  }

  .qrcode>div {
    border-radius: 0;
  }

  .qrcode>div img {
    border-radius: 0;
  }

  .footer-regeister {
    flex-direction: row;
    justify-content: center;
    padding: 1rem 0;
  }

  .backtop {
    right: 4%;
    bottom: 8%;
    width: 4%;
  }
}