* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  background: #ffffff;
  line-height: 1.7;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  border-bottom: 1px solid #dbeafe;
  padding: 24px 0;
}

.topbar .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #2563eb;
  color: white;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -1px;
}

.brand-title {
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  color: #1e3a8a;
}

.brand-subtitle {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 7px;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.nav-links a {
  color: #475569;
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: #2563eb;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 28px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 20px;
}

.sidebar h2 {
  font-size: 24px;
  margin-bottom: 14px;
  color: #111827;
}

.sidebar .toc-list {
  list-style: none;
}

.sidebar .toc-list li {
  margin-bottom: 12px;
}

.sidebar .toc-list a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #334155;
  text-decoration: none;
  font-size: 14px;
}

.sidebar .toc-list a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.sidebar .toc-list a:hover {
  color: #2563eb;
}

.content {
  min-width: 0;
}

.hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 36px;
  margin-bottom: 26px;
  box-shadow: 0 10px 30px rgba(30, 41, 59, 0.05);
}

.hero h1 {
  font-size: clamp(34px, 4vw, 46px);
  color: #111827;
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero p {
  font-size: 16px;
  color: #475569;
}

.hero .hero-meta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero .meta-pill {
  padding: 8px 12px;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.group-section {
  margin-top: 24px;
}

.group-section h2 {
  font-size: 26px;
  color: #1f2937;
  margin-bottom: 12px;
}

.group-section .section-description {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 16px;
}

.link-grid {
  display: grid;
  gap: 14px;
}

.link-card {
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 14px;
  padding: 16px 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

.link-card a {
  color: #1d4ed8;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

.link-card a:hover {
  text-decoration: underline;
}

.link-card p {
  margin-top: 8px;
  color: #64748b;
  font-size: 14px;
}

.footer {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 12px;
}

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

  .sidebar {
    position: static;
  }
}
