.topic-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.topic-sidebar-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding-top: 48px;
}

.topic-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.topic-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topic-sidebar a {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 12px;
  border-left: 3px solid transparent;
  font-weight: 700;
  text-decoration: none;
}

.topic-sidebar a:hover {
  color: var(--accent);
  border-left-color: var(--primary);
}

.topic-content h1 {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 24px;
  text-shadow: 3px 3px 0 var(--primary);
  font-family: "Courier New", monospace;
}

.topic-content h2 {
  font-size: 22px;
  color: var(--secondary);
  margin: 32px 0 14px;
}

.topic-content h3 {
  font-size: 18px;
  color: var(--muted);
  margin: 24px 0 10px;
}

.topic-content p {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 16px;
  font-weight: 600;
  font-style: normal;
  color: var(--text);
}

.topic-content ul {
  margin: 12px 0 20px 24px;
  font-weight: 600;
  font-style: normal;
}

.topic-content li {
  margin-bottom: 8px;
  font-size: 15px;
}

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

.topic-stat {
  padding: 24px;
  background: var(--surface);
  border: 2px solid var(--neon-pink);
  text-align: center;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--neon-cyan);
}

.topic-stat strong {
  display: block;
  font-size: 28px;
  color: var(--accent);
  font-family: "Courier New", monospace;
}

.topic-stat span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.topic-img-inline {
  max-width: 500px;
  max-height: 320px;
  margin: 24px 0;
  border: 2px solid var(--neon-cyan);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--neon-pink);
}

.topic-callout {
  padding: 20px 24px;
  background: rgba(220, 38, 38, 0.12);
  border-left: 4px solid var(--primary);
  margin: 24px 0;
}

.topic-callout p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .topic-sidebar-layout {
    grid-template-columns: 1fr;
  }

  .topic-sidebar {
    position: static;
  }

  .topic-stat-band {
    grid-template-columns: 1fr;
  }
}

.topic-split-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  padding-top: 48px;
}

.topic-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topic-rail img {
  max-width: 100%;
  max-height: 320px;
  border: 2px solid var(--secondary);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--primary);
}

.topic-rail-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.topic-rail-card h3 {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
}

.topic-rail-card p {
  font-size: 13px;
  margin: 0;
}

@media (max-width: 900px) {
  .topic-split-layout {
    grid-template-columns: 1fr;
  }
}

.topic-hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}

.topic-hero-mosaic img {
  max-width: 100%;
  max-height: 320px;
  object-fit: cover;
  border: 2px solid var(--neon-pink);
}

.topic-pullquote {
  font-size: 20px;
  color: var(--accent);
  font-style: italic;
  padding: 24px;
  margin: 32px 0;
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  text-align: center;
}

.topic-license-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 28px 0;
}

.topic-license-card {
  padding: 24px;
  background: var(--surface);
  border: 2px solid var(--border);
}

.topic-license-card h3 {
  color: var(--secondary);
  margin-bottom: 10px;
}

.topic-license-card p {
  font-size: 14px;
  margin: 0;
}

.topic-license-hero {
  background:
    linear-gradient(rgba(9, 1, 2, 0.85), rgba(9, 1, 2, 0.92)),
    url("/images/decorative/decor_5.webp") center/cover no-repeat;
  padding: 64px 24px;
  text-align: center;
  margin-bottom: 0;
}

.topic-license-hero h1 {
  font-size: clamp(28px, 5vw, 40px);
  color: var(--text);
  text-shadow: 3px 3px 0 var(--primary);
}

@media (max-width: 768px) {
  .topic-hero-mosaic {
    grid-template-columns: 1fr;
  }

  .topic-license-grid {
    grid-template-columns: 1fr;
  }

  .topic-img-inline,
  .topic-rail img {
    max-width: 100%;
    width: 100%;
    height: auto;
  }

  .topic-page,
  .topic-split-layout,
  .topic-sidebar-layout {
    overflow-x: hidden;
    max-width: 100%;
  }
}
