.view-subject_index {
  --listing-card-min-height: 214px;
}

.subject-masthead::after {
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 221, 145, 0.16), transparent 45%),
    radial-gradient(circle at 82% 22%, rgba(100, 210, 233, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(12, 20, 32, 0.28), rgba(12, 20, 32, 0.58));
}

.subject-hero-heading {
  max-width: 920px;
  margin: 0 auto;
}

.view-subject_index .subject-hero-heading {
  text-align: center;
}

.view-subject_index header.masthead .subject-hero-heading .subheading {
  width: 100%;
  margin: 0.625rem 0 0;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.1;
  text-align: center;
}

.subject-hero-stats {
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
}

.subject-hero-stats span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.2);
  color: rgba(255, 255, 255, 0.92);
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.subject-shell {
  margin-top: -0.75rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.view-subject_index .subject-shell {
  margin-top: -4.8rem;
}

.subject-panel {
  --blog-panel-radius: 1.2rem;
  --blog-panel-radial-stop: 45%;
  --blog-panel-padding: 1.2rem;
}

.view-subject_index .subject-panel {
  animation: subject-panel-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
}

.subject-panel-head {
  --blog-panel-head-margin-bottom: 1rem;
  --blog-panel-head-padding-bottom: 0.95rem;
}

.subject-panel-title {
  --blog-panel-title-color: #0f172a;
  --blog-panel-title-size: 1.45rem;
}

.subject-panel-meta {
  white-space: nowrap;
  color: #5d6b7a;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

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

.subject-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 61, 78, 0.08);
  background: #fff;
  min-height: var(--listing-card-min-height);
  padding: 1rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.view-subject_index .subject-card {
  opacity: 0;
  transform: translateY(16px);
  animation: subject-panel-rise 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.view-subject_index .subject-list-grid > .subject-card:nth-child(1) { animation-delay: 0.08s; }
.view-subject_index .subject-list-grid > .subject-card:nth-child(2) { animation-delay: 0.13s; }
.view-subject_index .subject-list-grid > .subject-card:nth-child(3) { animation-delay: 0.18s; }
.view-subject_index .subject-list-grid > .subject-card:nth-child(4) { animation-delay: 0.23s; }
.view-subject_index .subject-list-grid > .subject-card:nth-child(5) { animation-delay: 0.28s; }
.view-subject_index .subject-list-grid > .subject-card:nth-child(6) { animation-delay: 0.33s; }

@keyframes subject-panel-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.subject-card:hover,
.subject-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(0, 133, 161, 0.22);
  box-shadow: 0 12px 22px rgba(12, 32, 49, 0.08);
}

.subject-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.subject-status,
.subject-count {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
}

.subject-status {
  background: rgba(0, 133, 161, 0.1);
  color: #006f87;
}

.subject-count {
  background: rgba(17, 24, 39, 0.05);
  color: #4b5563;
}

.subject-card-title {
  margin: 0;
  color: #0f172a;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.subject-card-link {
  color: inherit;
}

.subject-card-link:hover .subject-card-title,
.subject-card-link:focus .subject-card-title,
.subject-card-link:hover .subject-article-title,
.subject-card-link:focus .subject-article-title {
  color: #0085A1;
}

.subject-card-desc {
  margin: 0;
  color: #5f6d7c;
  line-height: 1.65;
}

.subject-card-actions {
  margin-top: auto;
}

.subject-card-link-inline {
  color: #0f3d4e;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.subject-card-link-inline:hover,
.subject-card-link-inline:focus {
  color: #0085A1;
}

.subject-empty-state {
  --blog-empty-state-padding: 1.15rem;
}

.subject-empty-state h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 800;
}

.subject-empty-state p {
  margin: 0;
  color: #667482;
}

.subject-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.subject-articles-panel {
  min-width: 0;
}

.subject-article-list {
  display: grid;
  gap: 0.9rem;
}

.subject-article-card {
  display: grid;
  gap: 0.55rem;
}

.subject-article-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.subject-topic-chip,
.subject-article-date {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.76rem;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
}

.subject-topic-chip {
  background: rgba(0, 133, 161, 0.1);
  color: #006f87;
}

.subject-article-date {
  background: rgba(17, 24, 39, 0.05);
  color: #596879;
}

.subject-article-title {
  margin: 0;
  color: #0f172a;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
}

.subject-article-desc {
  margin: 0;
  color: #657483;
  line-height: 1.65;
}

.subject-article-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  color: #6b7280;
  font-size: 0.84rem;
}

.subject-sidebar {
  display: grid;
  gap: 1rem;
}

.subject-side-panel {
  padding: 1rem;
}

.subject-side-title {
  margin: 0 0 0.75rem;
  color: #0f172a;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
}

.subject-overview-list {
  display: grid;
  gap: 0.55rem;
}

.subject-overview-list > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.025);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.subject-overview-list span {
  color: #5f6d7c;
  font-size: 0.87rem;
}

.subject-overview-list strong {
  color: #111827;
  font-size: 0.9rem;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.subject-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.subject-topic-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 133, 161, 0.08);
  color: #0f3d4e;
  border: 1px solid rgba(0, 133, 161, 0.14);
  font-size: 0.82rem;
  font-family: "Open Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.subject-side-links {
  display: grid;
  gap: 0.45rem;
}

.subject-side-links a {
  --blog-side-link-padding: 0.55rem 0.75rem;
}

.subject-pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.subject-page-btn {
  border-radius: 999px;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .view-subject_index .subject-shell {
    margin-top: -3.2rem;
  }

  .subject-shell {
    margin-top: -0.55rem;
  }

  .subject-list-grid {
    grid-template-columns: 1fr;
  }

  .subject-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .view-subject_index .subject-shell {
    margin-top: -2.2rem;
  }

  .subject-shell {
    margin-top: -0.45rem;
  }

  .subject-panel-meta {
    white-space: normal;
  }

  .subject-hero-stats {
    justify-content: flex-start;
  }

  .subject-article-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .subject-pagination {
    flex-direction: column;
  }

  .subject-pagination .btn,
  .subject-page-btn {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  .view-subject_index .subject-panel,
  .view-subject_index .subject-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
