:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top right, #e9ecff 0%, #f7f8fc 45%, #f8fafc 100%);
  color: #1f2937;
}

a {
  color: #4f46e5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topic-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.topic-crumb {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
}

.topic-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f2f4ff 100%);
  border: 1px solid #dce1ff;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.08);
}

.topic-hero__tag {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: #4338ca;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topic-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(1.9rem, 3.8vw, 2.4rem);
  line-height: 1.25;
}

.topic-hero p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
}

.topic-pill-nav {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topic-pill-nav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #d7dcff;
  border-radius: 999px;
  background: #fff;
  color: #4338ca;
  font-size: 14px;
  font-weight: 600;
}

.topic-pill-nav__item--active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border-color: transparent;
}

.topic-pill-nav__item--active:hover {
  text-decoration: none;
}

.topic-content-shell {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.topic-aside {
  position: sticky;
  top: 18px;
}

.topic-toc {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.topic-toc__title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
}

.topic-toc ol {
  margin: 0;
  padding-left: 20px;
}

.topic-toc li {
  margin: 8px 0;
  color: #4b5563;
  line-height: 1.5;
}

.topic-main {
  display: grid;
  gap: 14px;
}

.topic-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.topic-section h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.topic-section p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
}

.topic-section ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
  color: #374151;
}

.topic-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.topic-card {
  border: 1px solid #e7e9f6;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.topic-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #1f2937;
}

.topic-card p {
  margin: 0 0 12px;
  color: #4b5563;
  line-height: 1.6;
}

.topic-card a {
  font-weight: 600;
}

.topic-table-wrap {
  overflow-x: auto;
}

.topic-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.topic-table th,
.topic-table td {
  border: 1px solid #e5e7eb;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.topic-table th {
  background: #f3f4f6;
  color: #111827;
}

.topic-section--links li {
  margin: 8px 0;
}

.topic-faq-list {
  display: grid;
  gap: 10px;
}

.topic-faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fcfcff;
}

.topic-faq-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.topic-faq-item p {
  margin: 0;
}

@media (max-width: 980px) {
  .topic-content-shell {
    grid-template-columns: 1fr;
  }

  .topic-aside {
    position: static;
  }
}

@media (max-width: 640px) {
  .topic-layout {
    padding: 18px 14px 48px;
  }

  .topic-hero {
    padding: 18px;
  }

  .topic-section {
    padding: 14px;
  }

  .topic-table {
    min-width: 560px;
  }
}
