/* 参考横向推广卡片；所有内容仍来自后台广告与文章索引。 */
.hx-sidebar-list {
  --sidebar-bg: var(--surface);
  --sidebar-border: var(--line);
  --sidebar-text: var(--text);
  --sidebar-muted: var(--muted);
  --sidebar-active-bg: #e9eefb;
  --sidebar-active-text: #435da5;
  --sidebar-scrollbar: #8b99ae;
}
:root.dark .hx-sidebar-list {
  --sidebar-bg: #151f32;
  --sidebar-border: #2b3951;
  --sidebar-text: #edf2ff;
  --sidebar-muted: #9eabc1;
  --sidebar-active-bg: #212e4a;
  --sidebar-active-text: #9cb6ff;
  --sidebar-scrollbar: #465570;
}
@media (min-width: 981px) {
  .hx-page.article-page .article-shell {
    grid-template-columns: 300px minmax(0,1fr);
  }
}
.hx-page.article-page .article-rail.hx-sidebar-list {
  position: static;
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 16px;
  height: auto;
  max-height: none;
  overflow: visible;
}
.hx-page.article-page .hx-sidebar-list > .ad-slot {
  flex: none;
  height: auto;
  max-height: none;
  overflow: visible;
  grid-template-columns: minmax(0,1fr);
  grid-auto-rows: max-content;
  align-content: start;
}
.hx-page.article-page .hx-sidebar-list .ad-card {
  display: block;
  padding: 16px;
  height: auto;
  border: 1px solid var(--sidebar-border);
  border-radius: 16px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}
.hx-page.article-page .hx-sidebar-list .ad-card-mixed {
  display: grid;
  grid-template-columns: 64px minmax(0,1fr);
  align-items: center;
  gap: 14px;
}
.hx-page.article-page .hx-sidebar-list .ad-image {
  width: 64px;
  height: 64px;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 12px;
}
.hx-page.article-page .hx-sidebar-list .ad-card:not(.ad-card-mixed) .ad-image {
  margin-bottom: 0;
}
.hx-page.article-page .hx-sidebar-list .ad-copy {
  min-width: 0;
  padding: 0;
  text-align: left;
  color: var(--sidebar-muted);
  font-size: 13px;
  line-height: 1.75;
}
.hx-page.article-page .hx-sidebar-list .ad-copy :is(h2,h3,h4) {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  color: var(--sidebar-text);
}
.hx-page.article-page .hx-sidebar-list .ad-copy p {
  margin: 6px 0;
}
.hx-page.article-page .hx-sidebar-list .ad-copy :is(h5,h6) {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.6;
  text-align: left;
}
.hx-page.article-page .hx-sidebar-list > .hx-article-index {
  flex: none;
  display: block;
  height: auto;
  max-height: none;
  overflow: visible;
  padding: 18px;
  border: 1px solid var(--sidebar-border);
  border-radius: 16px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
}
.hx-page.article-page .hx-sidebar-list .hx-index-heading {
  cursor: default;
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--sidebar-text);
}
.hx-page.article-page .hx-sidebar-list .hx-index-count {
  color: var(--sidebar-muted);
}
.hx-page.article-page .hx-sidebar-list .hx-index-list {
  position: relative;
  display: block;
  height: auto;
  max-height: 360px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-scrollbar) transparent;
  scroll-behavior: auto;
  padding-right: 8px;
  margin-top: 0;
}
.hx-page.article-page .hx-sidebar-list .hx-index-list a {
  display: block;
  margin: 0 0 6px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--sidebar-muted);
}
.hx-page.article-page .hx-sidebar-list .hx-index-list a:hover,
.hx-page.article-page .hx-sidebar-list .hx-index-list a[aria-current="page"] {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
}
.hx-page.article-page .hx-sidebar-list .hx-index-list::-webkit-scrollbar {
  display: block;
  width: 6px;
}
.hx-page.article-page .hx-sidebar-list .hx-index-list::-webkit-scrollbar-thumb {
  background: var(--sidebar-scrollbar);
  border-radius: 6px;
}
