dialog::backdrop {
  background: transparent;
}

dialog.caspu-dialog {
  margin: auto;
  border-top: 4px solid var(--accent);
  color: var(--body);
}

dialog.profile-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

#mobile-nav[open],
#site-search[open] {
  display: block;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.page-link {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 4px 9px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .2s ease-out, color .2s ease-out;
}

.page-link:hover,
.page-link:focus-visible {
  background: var(--tint);
  color: var(--accent);
}

.page-item.active .page-link {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.page-item.disabled .page-link {
  pointer-events: none;
  opacity: .4;
}

.article-content > p {
  margin-top: 20px;
  color: var(--body);
  font-size: 15px;
  line-height: 2.05;
}

.article-content > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  color: var(--ink);
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}

.article-content > blockquote {
  margin: 32px 0;
  border-left: 3px solid var(--gold);
  background: var(--tint);
  padding: 20px 24px;
  color: var(--ink);
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  font-size: 17px;
  line-height: 1.9;
}

.article-content img {
  width: 100%;
  object-fit: cover;
}

.article-content figcaption {
  margin-top: 8px;
  color: var(--aux);
  font-size: 12px;
  text-align: center;
}

@media (min-width: 1024px) {
  .article-content > p {
    font-size: 16px;
  }

  .article-content > h3 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-link {
    transition: none;
  }
}

@media (max-width: 430px) {
  [data-site-header] > .container-site {
    gap: 8px;
  }

  [data-site-header] .site-logo {
    min-width: 0;
    flex: 1 1 auto;
    gap: 8px;
  }

  [data-site-header] .site-logo > img {
    width: 36px;
    height: 36px;
  }

  [data-site-header] .site-logo > span {
    min-width: 0;
  }

  [data-site-header] .site-logo > span > span {
    font-size: 13px;
    letter-spacing: .02em;
  }

  [data-site-header] .mobile-actions {
    flex: 0 0 auto;
    gap: 0;
  }

  [data-site-header] .mobile-actions > a,
  [data-site-header] .mobile-actions > button {
    width: 36px;
    padding-inline: 4px;
  }
}

@media (max-width: 360px) {
  [data-site-header] .site-logo > img {
    width: 32px;
    height: 32px;
  }

  [data-site-header] .site-logo > span > span {
    font-size: 11px;
  }

  [data-site-header] .mobile-actions > a,
  [data-site-header] .mobile-actions > button {
    width: 32px;
    padding-inline: 2px;
  }
}

.site-footer {
  background: var(--footer);
  color: #a99f8d;
}

.footer-grid {
  gap: 2.5rem;
  padding-block: 3rem;
}

.footer-grid > nav,
.footer-grid > div {
  min-width: 0;
}

.footer-grid a,
.footer-grid button {
  cursor: pointer;
}

dialog.caspu-dialog::backdrop {
  background: rgba(0, 0, 0, .5);
}

dialog.profile-dialog::backdrop,
#mobile-nav::backdrop,
#site-search::backdrop {
  background: transparent;
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-block: 4rem;
  }
}

@media (min-width: 1280px) {
  .footer-grid {
    grid-template-columns: 2.15fr .55fr 1fr .7fr .45fr 1.25fr .8fr;
    gap: 1.5rem;
  }
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
}

.faculty-more {
  transition: color .2s ease-out, border-color .2s ease-out;
}

.faculty-more:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* site-base.css 没有 .right-5。固定定位只写了 bottom 时，按钮会落在静态位置的左侧。 */
/* 绿色主题学术队伍底色。线上若没带上 html[data-theme=green]，var(--band) 不生效。 */
#faculty {
  background-color: #1c2620;
}

[data-back-to-top] {
  position: fixed;
  right: 1.25rem;
  left: auto;
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
}

#cms-preview h1:not([class*="leading-"]),
#cms-preview h2:not([class*="leading-"]),
#cms-preview h3:not([class*="leading-"]),
#cms-preview h4:not([class*="leading-"]),
#cms-preview h5:not([class*="leading-"]),
#cms-preview h6:not([class*="leading-"]) {
  line-height: inherit;
}
