.topic-hero {
  position: relative;
  padding: 48px 20px 40px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--bg) 60%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.topic-hero::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(134, 239, 172, 0.2) 0%, transparent 70%);
  animation: material-pulse 7s ease-in-out infinite;
}

.topic-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topic-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.topic-hero .lede {
  max-width: 640px;
  color: rgba(240, 253, 244, 0.88);
  font-size: 1.05rem;
}

.topic-layout-a {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.topic-rail {
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--secondary) 100%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.3);
  height: fit-content;
  position: sticky;
  top: 74px;
}

.topic-rail h2 {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.topic-rail ul {
  padding-left: 1.1rem;
  font-size: 0.875rem;
}

.topic-rail li {
  margin-bottom: 8px;
}

.topic-prose h2 {
  color: var(--accent);
  margin: 28px 0 12px;
  font-size: 1.3rem;
}

.topic-prose h3 {
  color: var(--muted);
  margin: 20px 0 8px;
  font-size: 1.05rem;
}

.topic-prose p {
  margin-bottom: 14px;
  color: rgba(240, 253, 244, 0.9);
}

.topic-prose ul {
  padding-left: 1.2rem;
  margin-bottom: 16px;
}

.topic-prose li {
  margin-bottom: 8px;
}

.topic-layout-b {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 64px;
}

.topic-split-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 32px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.topic-split-band .band-copy {
  padding: 32px 28px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg) 100%);
}

.topic-split-band .band-visual {
  min-height: 240px;
  background-size: cover;
  background-position: center;
}

.topic-stat-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.topic-stat {
  text-align: center;
  padding: 18px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.85) 0%, rgba(20, 83, 45, 0.7) 100%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.topic-stat strong {
  display: block;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.topic-stat span {
  font-size: 0.8rem;
  color: rgba(240, 253, 244, 0.8);
}

.topic-layout-c {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.topic-pull {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  border-left: 4px solid var(--primary);
  padding: 8px 0 8px 18px;
  margin: 24px 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.topic-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.topic-mosaic .decor-wrap {
  border-radius: 12px;
  overflow: hidden;
}

.topic-layout-d {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.topic-side-rail-img {
  width: 100%;
  max-width: 200px;
  min-height: 420px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.4);
}

.topic-mini-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: rgba(6, 78, 59, 0.4);
  border-radius: 12px;
  overflow: hidden;
}

.topic-mini-table th,
.topic-mini-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.topic-mini-table th {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
}

.callout-box {
  margin: 20px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 860px) {
  .topic-layout-a,
  .topic-layout-d,
  .topic-split-band,
  .topic-stat-band,
  .topic-mosaic {
    grid-template-columns: 1fr;
  }

  .topic-rail {
    position: static;
  }

  .topic-side-rail-img {
    min-height: 180px;
    max-width: 100%;
    overflow: hidden;
  }

  .topic-mosaic .decor-wrap,
  .band-visual {
    max-width: 100%;
    overflow: hidden;
  }

  .decor-img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 375px) {
  .topic-side-rail-img,
  .band-visual {
    min-height: 140px;
    max-width: 100%;
  }

  .decor-img {
    max-height: 180px;
  }
}
