/* Force-hide stuck preloader */
:root {
  --halo-search-widget-primary-color: #A276EC;
}
#preloader.is-hidden,
body.loaded #preloader {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Halo inner pages */
.sidebar__widget {
  background: var(--rr-common-white);
}

.page-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3.125rem;
}

.page-pagination span {
  color: var(--rr-heading-secondary);
  font-weight: 500;
}

.page-infinite {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.page-infinite__status {
  color: var(--rr-heading-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
}

.page-infinite__status.is-end {
  opacity: 0.7;
}

.page-infinite__status.is-error {
  color: var(--rr-theme-primary);
  cursor: pointer;
}

.page-empty {
  padding: 5rem 0;
  text-align: center;
}

.category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-toolbar__count {
  font-weight: 600;
  color: var(--rr-heading-primary);
}

.category-toolbar__views {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.category-toolbar__btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgb(1 9 21 / 14%);
  border-radius: 0.5rem;
  background: var(--rr-common-white);
  color: var(--rr-heading-secondary);
  cursor: pointer;
}

.category-toolbar__btn:hover,
.category-toolbar__btn.is-active {
  border-color: var(--rr-theme-primary);
  background: var(--rr-theme-primary);
  color: var(--rr-common-white);
}

.js-infinite-list[data-view="list"] .post-view--grid,
.js-infinite-list[data-view="grid"] .post-view--list {
  display: none;
}

.js-infinite-list[data-view="grid"] .js-infinite-item {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 576px) {
  .js-infinite-list[data-view="grid"] .js-infinite-item {
    width: 50%;
  }
}

@media (min-width: 1200px) {
  .js-infinite-list[data-view="grid"] .js-infinite-item {
    width: 33.3333%;
  }
}

.page-search-form {
  margin-bottom: 2.5rem;
}

.page-search-form-group {
  display: flex;
  gap: 0.75rem;
}

.page-search-form-group input {
  flex: 1;
  height: 3.5rem;
  border: 1px solid rgb(1 9 21 / 16%);
  border-radius: 0.625rem;
  padding: 0 1.25rem;
}

.page-search-hit {
  padding: 1.5rem 1.875rem;
  margin-bottom: 1.25rem;
  background: var(--rr-common-white);
  border-radius: 0.75rem;
  box-shadow: 0 2px 2px rgba(8, 23, 46, 0.2);
}

.page-search-hit h2 {
  margin-bottom: 0.625rem;
}

.page-search-hit time {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--rr-heading-secondary);
}

.page-category-list {
  margin-bottom: 2.5rem;  
}

.page-category-list-title {
  margin-bottom: 1.25rem;
}

.page-category-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-category-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.625rem 1.25rem;
  background: #e5edf2;
  border-radius: 3.125rem;
}

.page-category-list li.is-active,
.page-category-list li:hover {
  background: var(--rr-common-white);
}

.page-category-list li span {
  color: var(--rr-heading-secondary);
}

.blog-list-page .blog__item {
  width: 100%;
  height: 100%;
  margin-bottom: 1.875rem;
}

.blog-list-page .blog__item--simple {
  margin-bottom: 0;
}

.blog-details__content img,
.blog-details__content video {
  max-width: 100%;
  height: auto;
}

.blog-details__content h1,
.blog-details__content h2,
.blog-details__content h3,
.blog-details__content h4 {
  scroll-margin-top: 7.5rem;
}

.blog-details__content pre {
  overflow: auto;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: #e5edf2;
  border-radius: 0.625rem;
}

.blog-details__content code {
  font-size: 0.9em;
}

.blog-details__content ul,
.blog-details__content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-details__content a {
  color: var(--rr-theme-primary);
}

.blog-details__read-reminder {
  margin-bottom: 1.25rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  background: #d8eafd;
  color: #1077d1;
  font-size: 0.875rem;
  line-height: 1.6;
}
.blog-details__read-reminder-text {
  color: #4f4e4e;
  font-size: 0.8rem;
}

.blog-details__excerpt {
  font-weight: bold;
  line-height: 1.7;
  color: #000;
}

.blog-details__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.875rem;
}

.blog-details__tags a {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background: #e5edf2;
  border-radius: 3.125rem;
  color: var(--rr-heading-primary);
}

.blog-details__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(1 9 21 / 10%);
}

.blog-details__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9375rem;
  color: var(--rr-heading-secondary);
}

.blog-details__stats a,
.blog-details__stats button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.blog-details__stats a:hover,
.blog-details__stats button:hover,
.blog-details__stats button.is-active {
  color: var(--rr-theme-primary);
}

.blog-details__feedback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--rr-heading-primary);
  float: right;
}

.blog-details__feedback button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e5edf2;
  color: var(--rr-heading-secondary);
  cursor: pointer;
}

.blog-details__feedback button:hover,
.blog-details__feedback button.is-active {
  background: var(--rr-common-white);
  color: #b23a48;
}

.blog-details__share ul {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-details__share li {
  position: relative;
}

.blog-details__share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #e5edf2;
  color: var(--rr-heading-secondary);
}

.blog-details__share a:hover {
  background: var(--rr-theme-primary);
  color: var(--rr-common-white);
}

.blog-details__share a i {
  font-size: 1rem;
}

.post-share-weixin-modal[hidden] {
  display: none !important;
}

.post-share-weixin-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgb(1 9 21 / 55%);
}

.post-share-weixin-dialog {
  position: relative;
  width: 15rem;
  padding: 1.75rem 1.25rem 1.25rem;
  background: var(--rr-common-white);
  border-radius: 1.25rem;
  box-shadow: 0 1rem 2.5rem rgb(1 9 21 / 20%);
  text-align: center;
}

.post-share-weixin-dialog img {
  display: block;
  width: 11.25rem;
  height: 11.25rem;
  margin: 0 auto 0.75rem;
}

.post-share-weixin-dialog p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--rr-heading-primary);
}

.js-post-share-weixin-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 50%;
  background: #e5edf2;
  color: var(--rr-heading-primary);
  cursor: pointer;
}

#comment {
  scroll-margin-top: 7.5rem;
}

.sidebar__widget-category a {
  justify-content: space-between;
}

.sidebar-widget-more {
  font-size: 0.875rem;
  color: var(--rr-heading-secondary);
}

.sidebar-widget-more:hover {
  color: var(--rr-theme-primary);
}

.sidebar-cat-tree,
.sidebar-cat-children {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-cat-tree > li + li,
.sidebar-cat-children > li + li {
  margin-top: 0.375rem;
}

.sidebar-cat-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sidebar-cat-toggle {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rr-heading-secondary);
  cursor: pointer;
}

.sidebar-cat-toggle i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.sidebar-cat-toggle.is-open i {
  transform: rotate(90deg);
}

.sidebar-cat-spacer {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
}

.sidebar-cat-link {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #e5edf266;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--rr-heading-primary);
}

.sidebar-cat-link.is-active,
.sidebar-cat-link:hover {
  background: var(--rr-common-white);
  color: var(--rr-theme-primary);
}

.sidebar-cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-cat-count {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--rr-heading-secondary);
  font-variant-numeric: tabular-nums;
}

.sidebar-cat-children {
  margin-top: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgb(1 9 21 / 12%);
}

.sidebar__widget-hot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar__widget-hot:not(:last-child) {
  margin-bottom: 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgb(1 9 21 / 10%);
}

.sidebar__widget-hot-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.375rem;
}

.sidebar__widget-hot-title a:hover {
  color: var(--rr-theme-primary);
}

.sidebar__widget-hot-visit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--rr-heading-secondary);
}

.sidebar__widget-tags .tags a sup {
  margin-left: 0.25rem;
  font-size: 0.6875rem;
  color: var(--rr-heading-primary);
}

.sidebar-profile {
  text-align: center;
}

.sidebar-profile__logo {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1rem;
  overflow: hidden;
  border-radius: 50%;
}

.sidebar-profile__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-profile__title {
  margin-bottom: 0.5rem;
}

.sidebar-profile__subtitle {
  margin-bottom: 1.125rem;
  font-size: 0.875rem;
  color: var(--rr-heading-secondary);
}

.sidebar-profile__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-profile__stats strong {
  display: block;
  font-size: 1.125rem;
  line-height: 1.2;
}

.sidebar-profile__stats span {
  font-size: 0.75rem;
  color: var(--rr-heading-secondary);
}

.sidebar-profile__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}

.sidebar-profile__social a {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e5edf2;
  color: var(--rr-heading-primary);
}

.sidebar-profile__social a:hover {
  background: var(--rr-theme-primary);
  color: var(--rr-common-white);
}

.sidebar-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--rr-heading-primary);
}

.sidebar-home-link:hover {
  color: var(--rr-theme-primary);
}

.sidebar__widget--toc .toc {
  /* max-height: calc(100vh - 16rem); */
  overflow-y: auto;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list-item + .toc-list-item {
  margin-top: 0.375rem;
}

.toc-list-item > .toc-list {
  margin-top: 0.5rem;
  margin-bottom: 0.375rem;
  margin-left: 0.75rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgb(1 9 21 / 12%);
}

.toc-link {
  display: block;
  padding: 0.5rem 0.75rem;
  background: #e5edf266;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.375;
  color: var(--rr-heading-primary);
}

.toc-link:hover,
.toc-link.is-active-link {
  background: var(--rr-common-white);
  color: var(--rr-theme-primary);
}

.blog-details__nav {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-top: 1.875rem;
  border-top: 1px solid rgb(1 9 21 / 10%);
}

.halo-comment {
  margin-top: 3.125rem;
}

.rr-video-popup {
  position: relative;
  max-width: 56.25rem;
  margin: 0 auto;
}

.rr-video-popup video {
  display: block;
  width: 100%;
  background: #000;
}

.error-page {
  padding: 7.5rem 0;
  text-align: center;
}

.error-page img {
  max-width: 26.25rem;
  margin-bottom: 1.875rem;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.links-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--rr-common-white);
  border-radius: 0.75rem;
  box-shadow: 0 2px 2px rgba(8, 23, 46, 0.2);
}

.links-card img {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 50%;
}

@media (max-width: 767px) {
  .page-search-form-group {
    flex-direction: column;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }
}

.tag-groups-container{
  background: #fff;
  padding: 2rem 2rem;
  border-radius: 1rem;
}

a[href^="/tags/"]{
  border-radius: 20px !important;
  padding: 2px 12px !important;
  cursor: pointer !important;
  transition: transform 0.15s,opacity 0.15s !important;
  text-decoration-line: none;
  line-height: 1rem;
  color: #fff;
  margin: 0 2px 2px 0;
  display: inline-flex;
}

a[href^="/tags/"]:hover {
    transform: scale(1.15);
    opacity: 0.9;
    text-decoration-line: none;
}

a[href^="https://kjhz.sjtu.edu.cn/astpc-phet"] {
  border-radius: 20px !important;
  padding: 12px 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: transform 0.15s,opacity 0.15s !important;
  text-decoration-line: none;
  background: var(--rr-theme-primary);
  color: #fff;
}