/* 专题页卡片墙：沿用站点 CSS 变量，亮/暗主题自适应 */

.topic-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ak-sp-10);
  margin: var(--ak-sp-10) 0 var(--ak-sp-15);
  color: var(--muted);
  font-size: 13px;
}
.topic-summary b { color: var(--text); }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: var(--ak-sp-15);
}

.topic-card {
  display: block;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.topic-card:hover {
  transform: translateY(-3px);
  border-color: var(--topic-color, var(--brand));
  box-shadow: 0 12px 28px rgba(16, 18, 23, .12);
  color: var(--text);
}
.topic-cover {
  position: relative;
  height: 168px;
  background: linear-gradient(135deg, var(--topic-color, var(--brand)), color-mix(in srgb, var(--topic-color, var(--brand)) 55%, #111827));
  overflow: hidden;
}
.topic-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.72);
  transition: transform .3s ease;
}
.topic-card:hover .topic-cover img { transform: scale(1.04); }
.topic-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--ak-overlay-rgb), .82) 0%, rgba(var(--ak-overlay-rgb), .26) 48%, transparent 100%);
}
.topic-card-body {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.topic-card-title {
  margin: 0 0 var(--ak-sp-8);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}
.topic-card-meta {
  display: flex;
  align-items: center;
  gap: var(--ak-sp-8);
  font-size: 12px;
  opacity: .92;
}
.topic-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--topic-color, var(--brand));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
.topic-card-desc {
  margin: var(--ak-sp-8) 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: .85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-list-card .post-list { display: grid; gap: var(--ak-sp-4); }

@media (max-width: 640px) {
  .topic-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--ak-sp-10); }
  .topic-cover { height: 148px; }
  .topic-summary { flex-wrap: wrap; }
}
