/* 智能小车 · 多页站点共享设计系统
   规范：html-anything — CJK字体栈 / 8px栅格 / 柔和阴影 / 无纯黑纯白 / 对比度>=4.5 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1d1d1f;
  --slate: #3d3d40;
  --muted: #8a857a;
  --warm-bg: #faf8f5;
  --card: #ffffff;
  --border: #e6e2da;
  --accent: #2563eb;
  --accent-soft: #eef2ff;
  --tag-bg: #f0ede7;
  --tag-text: #5c554a;
  --son: #8b5cf6;
  --dad: #0f766e;
  --warn-bg: #fff7ed;
  --warn-border: #fed7aa;
  --warn-text: #92400e;
  --success: #059669;
  --star: #d97706;
  color-scheme: light;
}
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--warm-bg);
  color: var(--ink);
  line-height: 1.65;
  padding-bottom: 64px;
}

/* ── 导航（所有页面统一） ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 48px;
  flex-wrap: wrap;
}
.nav-brand { font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none; color: var(--ink); }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: var(--slate);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--accent-soft); color: var(--accent); }
.nav-links a.active { background: var(--accent); color: #fff; }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.hero { text-align: center; padding: 48px 0 32px; }
.hero .badge {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 13px;
  font-weight: 500;
  padding: 3px 14px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}
.hero .sub { font-size: 16px; color: var(--slate); margin-bottom: 16px; }
.hero .team { font-size: 13px; color: var(--muted); }
.hero .crumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.hero .crumb a { color: var(--accent); text-decoration: none; }
.hero .crumb a:hover { text-decoration: underline; }

/* ── 区块 ── */
.section { margin-bottom: 48px; padding-top: 8px; }
.section h2 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section .emoji { font-size: 20px; }
.section p { margin-bottom: 12px; color: var(--slate); font-size: 15px; }

/* ── 卡片网格 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.grid-col2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card .icon { font-size: 24px; margin-bottom: 8px; }
.card h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card p { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 0; }
.card .why {
  font-size: 12px; color: var(--muted); margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--border); line-height: 1.6;
}
.card .why span { font-weight: 600; color: var(--slate); }

/* ── 表格 ── */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
table.data th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  background: #faf8f5;
}
table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0ede7;
  vertical-align: top;
  line-height: 1.55;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:nth-child(even) { background: #fcfbf9; }
table.data .num {
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
table.data .tag { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.tag-new { background: var(--accent-soft); color: var(--accent); }
.tag-reuse { background: var(--tag-bg); color: var(--tag-text); }
.tag-opt { background: var(--tag-bg); color: var(--tag-text); font-style: italic; }
table.data .total td { font-weight: 700; background: #faf8f5; }

/* ── 代码块 ── */
.code-block {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--slate);
}

/* ── 坑 / 提示 ── */
.pitfall {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 4px solid #d97706;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  margin: 16px 0;
}
.pitfall strong { color: var(--warn-text); }
.tip {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid var(--success);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  margin: 16px 0;
}
.tip strong { color: #065f46; }

/* ── 分工 ── */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.role {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.role.son { border-top: 4px solid var(--son); }
.role.dad { border-top: 4px solid var(--dad); }
.role .role-tag { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.role.son .role-tag { color: var(--son); }
.role.dad .role-tag { color: var(--dad); }
.role h4 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.role ul { list-style: none; }
.role li {
  font-size: 14px;
  color: var(--slate);
  padding: 3px 0 3px 18px;
  position: relative;
  line-height: 1.6;
}
.role li::before { content: "·"; position: absolute; left: 6px; font-weight: 700; color: var(--accent); }
.redline {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #991b1b;
  line-height: 1.6;
  grid-column: 1 / -1;
}
.redline strong { font-weight: 700; }

/* ── 链接 ── */
.link-btn { display: inline-block; color: var(--accent); text-decoration: none; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }

/* ── 首页入口卡 ── */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.entry-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.entry-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.entry-card .icon { font-size: 32px; margin-bottom: 12px; }
.entry-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.entry-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.entry-card .go { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* ── 页脚 ── */
.footer {
  text-align: center;
  padding: 32px 24px 0;
  font-size: 13px;
  color: #bfb9ae;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* ── 响应式 ── */
@media (max-width: 680px) {
  .roles { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .nav-inner { height: auto; padding: 8px 0; gap: 8px; }
  .nav-links { gap: 8px; }
  .container { padding: 0 16px; }
}
