:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --brand: #024ad8;
  --brand-hover: #2563eb;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

a:hover {
  color: var(--brand-hover);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

/* 顶部导航条 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.topbar a:hover {
  color: var(--brand);
  border-color: var(--brand-border);
  background: var(--brand-soft);
  text-decoration: none;
  transform: translateY(-1px);
}

/* 主题卡片 */
.hero,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 6px 16px rgba(15, 23, 42, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* 顶部 Hero 卡片 */
.hero {
  position: relative;
  padding: 30px 32px;
  margin-bottom: 20px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #60a5fa);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* 网格与内容卡片 */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.card {
  padding: 22px 24px;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 8px 24px -4px rgba(2, 74, 216, 0.06);
  transform: translateY(-1px);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand);
}

.card p {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.75;
}

.card p:last-child {
  margin-bottom: 0;
}

.card ul,
.card ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.75;
}

.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.card li {
  margin-bottom: 6px;
}

.card li:last-child {
  margin-bottom: 0;
}

/* 提示框 Callout */
.notice {
  position: relative;
  padding: 14px 16px 14px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  color: #1e3a8a;
  border: 1px solid var(--brand-border);
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.65;
}

.notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--brand);
}

/* 相关链接胶囊 */
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.link-list a::after {
  content: "↗";
  font-size: 12px;
  color: var(--brand);
  transition: transform 0.18s ease;
}

.link-list a:hover {
  background: #ffffff;
  color: var(--brand);
  border-color: var(--brand-border);
  box-shadow: 0 4px 12px rgba(2, 74, 216, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.link-list a:hover::after {
  transform: translate(1px, -1px);
}

/* 页脚 */
footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line-subtle);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

code {
  font-family: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
  background: #eff6ff;
  color: var(--brand);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid #dbeafe;
}

/* 响应式断点 */
@media (max-width: 820px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px 20px;
  }

  .hero h1 {
    font-size: 20px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}
