/* ========== 可行逻辑 · 设计变量 ========== */
:root {
  --primary: #2456e6;
  --primary-dark: #1c46c0;
  --primary-tint: #eef1fc;
  --ink: #17181a;
  --body: #373a3f;
  --muted: #85898f;
  --bg: #fafaf8;
  --card: #ffffff;
  --line: #e6e4de;
  --line-strong: #d8d5cc;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(23, 24, 26, .04), 0 2px 10px rgba(23, 24, 26, .04);
  --shadow-hover: 0 4px 6px rgba(23, 24, 26, .05), 0 10px 28px rgba(23, 24, 26, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--body);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ========== Header ========== */
.header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; align-items: center; height: 60px; gap: 34px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; font-family: var(--font);
  letter-spacing: .5px;
}
.logo-text { color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 6px 4px; margin: 0 10px; color: var(--body); font-size: 14.5px; font-weight: 500;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--body); transition: all .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ========== 按钮 ========== */
.btn {
  border: 1px solid transparent; border-radius: 8px; padding: 8px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s; font-family: var(--font); line-height: 1.5; display: inline-block;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--body); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 5px 13px; font-size: 13px; }

/* ========== Hero ========== */
.hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f5f5f2 0%, var(--bg) 100%); padding: 46px 0 52px; }
.hero-inner { display: flex; align-items: center; gap: 56px; }
.hero-copy { flex: 1; min-width: 0; }
.hero-badge {
  display: inline-block; font-size: 12.5px; color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  background: color-mix(in srgb, var(--primary) 6%, #fff);
  padding: 4px 12px; border-radius: 999px; font-weight: 500; margin-bottom: 20px; letter-spacing: .5px;
}
.hero-title { font-size: 38px; font-weight: 800; line-height: 1.3; color: var(--ink); margin-bottom: 18px; letter-spacing: -1px; }
.hero-title em { font-style: normal; color: var(--primary); }
.hero-desc { color: var(--muted); font-size: 15.5px; margin-bottom: 28px; max-width: 500px; }
.hero-actions { display: flex; gap: 12px; }

/* ========== 通用 Section / 卡片 ========== */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-title { font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -.3px; }
.section-more { color: var(--muted); font-size: 13.5px; transition: color .2s; }
.section-more:hover { color: var(--primary); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow-hover); }

/* 首页特色入口 */
.feature-card { display: block; padding: 22px 26px; overflow: hidden; }
.feature-card:hover { transform: translateY(-2px); }
.feature-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.feature-icon {
  width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0;
  background: var(--ic, var(--primary)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.feature-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.feature-sub { font-size: 12.5px; color: var(--muted); }
.feature-arrow { margin-left: auto; color: var(--line-strong); font-size: 18px; transition: transform .2s, color .2s; }
.feature-card:hover .feature-arrow { transform: translateX(3px); color: var(--primary); }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-chip { font-size: 12.5px; color: var(--body); background: #f3f3f0; border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; }

/* ========== 文章卡片 ========== */
.article-card { display: flex; flex-direction: column; overflow: hidden; }
.article-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.article-thumb {
  position: relative; display: block; height: 150px; overflow: hidden;
  background-color: #eef0f3; flex-shrink: 0;
  --tc: #5b6470;
}
.article-thumb::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 11%, #fff), color-mix(in srgb, var(--tc) 3%, #fff));
}
.article-thumb::after {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(color-mix(in srgb, var(--tc) 30%, transparent) 1px, transparent 1px);
  background-size: 14px 14px;
}
.thumb-cat { position: absolute; top: 12px; left: 14px; z-index: 1; font-size: 12px; font-weight: 500; color: #fff; background: color-mix(in srgb, var(--tc) 78%, #000); padding: 2px 10px; border-radius: 999px; }
.thumb-word { position: absolute; right: 14px; bottom: -22px; z-index: 1; font-size: 96px; line-height: 1; font-weight: 800; color: color-mix(in srgb, var(--tc) 14%, transparent); letter-spacing: -4px; user-select: none; }
.cat-frontend { --tc: #d9480f; }
.cat-backend { --tc: #2b8a3e; }
.cat-ai { --tc: #0b7285; }
.cat-fullstack { --tc: #6741d9; }
.cat-tools { --tc: #b08900; }
.cat-life { --tc: #c2255c; }
.cat-embedded { --tc: #1864ab; }
.cat-default { --tc: #5b6470; }
.article-info { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-title { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.article-title a:hover { color: var(--primary); }
.article-summary { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 12.5px; margin-top: auto; }
.article-meta .cat { color: var(--primary); background: var(--primary-tint); padding: 1px 10px; border-radius: 6px; font-weight: 500; }

/* ========== Tags / Chips ========== */
.tags-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  font-size: 12.5px; color: var(--muted); background: #f3f3f0; border: 1px solid transparent;
  padding: 2px 11px; border-radius: 6px; transition: all .2s; display: inline-block; white-space: nowrap;
}
a.tag-chip:hover { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 25%, transparent); background: var(--primary-tint); }
.tag-chip.active { color: var(--primary); background: var(--primary-tint); font-weight: 500; }
.tag-chip.chip-primary { color: var(--primary); background: var(--primary-tint); font-weight: 500; }
.tag-chip.chip-link { color: var(--primary); background: transparent; border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.doc-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-level { font-size: 12.5px; color: var(--primary-dark); background: var(--primary-tint); border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); padding: 2px 11px; border-radius: 6px; font-weight: 600; }

/* ========== Grid ========== */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ========== 页头 / 面包屑 ========== */
.page-head { padding: 34px 0 6px; }
.page-head h1 { font-size: 27px; font-weight: 800; color: var(--ink); letter-spacing: -.4px; }
.page-head p { color: var(--muted); margin-top: 6px; font-size: 14.5px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 18px 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--body); }

/* ========== Roadmap ========== */
.route-tabs { display: flex; align-items: center; gap: 10px; margin: 26px 0 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.route-tab { font-size: 14px; font-weight: 500; padding: 10px 6px; margin-right: 20px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; transition: all .2s; }
.route-tab:hover { color: var(--ink); }
.route-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.route-block { margin: 34px 0 46px; }
.route-block + .route-block { border-top: 1px dashed var(--line-strong); padding-top: 40px; }
.route-block-head { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; }
.route-badge {
  width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; letter-spacing: 1px; color: #fff; flex-shrink: 0;
}
.route-name { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.route-desc { color: var(--muted); font-size: 13px; margin-top: 3px; }
.route-count { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--muted); background: #f3f3f0; border: 1px solid var(--line); padding: 4px 14px; border-radius: 999px; flex-shrink: 0; }

.roadmap-wrap { position: relative; padding-left: 4px; }
.roadmap-line { position: absolute; left: 29px; top: 12px; bottom: 12px; width: 2px; background: var(--line-strong); }
.roadmap-item { display: flex; gap: 22px; margin-bottom: 22px; position: relative; align-items: flex-start; }
.roadmap-dot {
  width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff; flex-shrink: 0; z-index: 1; box-shadow: var(--shadow);
}
.roadmap-body { flex: 1; padding: 22px 24px; }
.roadmap-body:hover { transform: translateY(-1px); }
.roadmap-stage { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 8px; letter-spacing: .3px; }
.roadmap-title { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.roadmap-desc { color: var(--muted); font-size: 14px; max-width: 660px; }
.roadmap-foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; }
.roadmap-foot .tag-chip strong { color: var(--primary); }
.roadmap-enter { color: var(--muted); font-size: 13.5px; }
.roadmap-enter:hover { color: var(--primary); }

/* ========== Topics ========== */
.topic-card { padding: 20px 22px; display: flex; flex-direction: column; position: relative; --tc: #4f6ef2; }
.topic-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tc) 45%, transparent); }
.topic-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.topic-index { font-family: var(--mono); font-size: 12.5px; color: var(--line-strong); letter-spacing: 1px; font-weight: 600; }
.topic-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); }
.topic-name { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 8px; line-height: 1.4; }
.topic-name a:hover { color: var(--primary); }
.topic-desc { color: var(--muted); font-size: 13.5px; flex: 1; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.topic-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; padding-top: 12px; border-top: 1px dashed var(--line); }
.topic-meta-item { display: flex; align-items: center; gap: 4px; }
.topic-level { margin-left: auto; font-size: 11.5px; color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); background: color-mix(in srgb, var(--tc) 6%, #fff); padding: 1px 9px; border-radius: 999px; }
.topic-enter { margin-top: 14px; font-size: 13px; color: var(--primary); opacity: 0; transform: translateY(2px); transition: all .2s; }
.topic-card:hover .topic-enter { opacity: 1; transform: none; }

/* ========== 文档布局（专题/文章阅读） ========== */
.doc-layout { display: flex; gap: 26px; align-items: flex-start; padding: 26px 0 40px; }
.doc-sidebar { width: 248px; flex-shrink: 0; position: sticky; top: 80px; }
.doc-sidebar-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; max-height: calc(100vh - 110px); overflow-y: auto; box-shadow: var(--shadow); }
.doc-sidebar-head { display: block; margin-bottom: 10px; }
.doc-sidebar-title { font-size: 15px; font-weight: 700; color: var(--ink); display: block; line-height: 1.45; }
.doc-sidebar-head:hover .doc-sidebar-title { color: var(--primary); }
.doc-sidebar-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.doc-menu { border-top: 1px solid var(--line); padding-top: 8px; }
.doc-menu-item { margin-bottom: 2px; }
.doc-menu-link { display: block; padding: 7px 10px; border-radius: 7px; font-size: 13.5px; color: var(--body); border-left: 2px solid transparent; transition: all .15s; }
.doc-menu-link:hover { background: #f5f5f2; color: var(--ink); }
.doc-menu-link.active { background: var(--primary-tint); color: var(--primary); font-weight: 600; border-left-color: var(--primary); }
.doc-main { flex: 1; min-width: 0; }
.doc-content-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px 46px; box-shadow: var(--shadow); }
.doc-header { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.doc-title { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.4; letter-spacing: -.4px; margin-bottom: 12px; }
.doc-lead { font-size: 15px; color: var(--muted); margin-bottom: 12px; max-width: 640px; }
.doc-actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.doc-nav { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc-nav a { font-size: 13px; color: var(--muted); min-width: 0; }
.doc-nav a strong { display: block; color: var(--ink); font-size: 14px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 330px; }
.doc-nav a:hover { color: var(--primary); }
.doc-nav a:hover strong { color: var(--primary); }
.doc-nav-next { text-align: right; }
.doc-nav-back { align-self: flex-end; }
.doc-empty { color: var(--muted); padding: 24px 0; }
.doc-nav a.doc-nav-next strong { margin-left: auto; }

/* 专题介绍补充信息 */
.intro-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.intro-info-item { background: #f8f8f5; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.intro-info-label { display: block; font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: 1px; margin-bottom: 8px; }
.intro-info-item p { font-size: 13.5px; color: var(--body); line-height: 1.7; }

/* ========== 正文排版 ========== */
.prose { font-size: 15.5px; line-height: 1.85; color: var(--body); }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.5; }
.prose h1 { font-size: 22px; margin: 26px 0 14px; }
.prose h2 { font-size: 19px; margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 16.5px; margin: 20px 0 10px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 4px; }
.prose ul li, .prose ol li { margin-bottom: 6px; padding-left: 22px; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .75em; width: 6px; height: 6px; border-radius: 1.5px; background: var(--primary); opacity: .75; }
.prose ol { counter-reset: sec; }
.prose ol li { counter-increment: sec; }
.prose ol li::before { content: counter(sec); position: absolute; left: 0; top: .15em; font-size: 12.5px; font-weight: 700; color: var(--primary); font-family: var(--mono); }
.prose blockquote { border-left: 3px solid var(--primary); background: #f8f8f5; padding: 10px 18px; margin: 16px 0; border-radius: 0 8px 8px 0; color: #575a5f; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { background: #f1f2f4; color: #b3261e; padding: 2px 6px; border-radius: 4px; font-size: 13.5px; font-family: var(--mono); }
.prose pre { background: #1c1f24; color: #d8dde4; padding: 18px 20px; border-radius: var(--radius); overflow-x: auto; margin: 16px 0; font-size: 13.5px; line-height: 1.7; }
.prose pre code { background: transparent; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line-strong); padding: 9px 14px; text-align: left; }
.prose th { background: #f6f6f3; font-weight: 600; color: var(--ink); }
.prose img { border-radius: var(--radius); margin: 12px 0; }
.prose a { color: var(--primary); }
.prose a:hover { text-decoration: underline; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

/* ========== 阅读页右侧工具 ========== */
.doc-tools { width: 236px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); }
.tool-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; letter-spacing: .3px; }
.tool-list a { display: block; padding: 6px 10px; border-radius: 6px; font-size: 13px; color: var(--muted); transition: all .15s; }
.tool-list a:hover { background: #f5f5f2; color: var(--primary); }
.toc-list a { display: block; padding: 5px 8px; font-size: 12.5px; color: var(--muted); border-radius: 5px; border-left: 2px solid transparent; transition: all .15s; }
.toc-list a:hover { color: var(--primary); background: #f5f5f2; }
.toc-list a.active { color: var(--primary); background: var(--primary-tint); border-left-color: var(--primary); font-weight: 500; }

/* ========== 搜索 ========== */
.search-bar { display: flex; gap: 12px; margin-bottom: 26px; }
.search-input-wrap { flex: 1; position: relative; }
.search-input {
  width: 100%; height: 50px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 0 18px 0 44px; font-size: 14.5px; background: var(--card); outline: none; transition: all .2s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-chip { font-size: 13px; padding: 5px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--body); cursor: pointer; transition: all .2s; }
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sort-row { display: flex; align-items: center; gap: 4px; margin-bottom: 18px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.sort-btn { padding: 4px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all .2s; }
.sort-btn:hover { color: var(--primary); }
.sort-btn.active { background: var(--primary-tint); color: var(--primary); font-weight: 600; }
.result-count { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* ========== 分页 ========== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.page-link { min-width: 36px; height: 36px; padding: 0 12px; border-radius: 7px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all .2s; }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ========== Products ========== */
.product-card { padding: 22px; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-2px); }
.product-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.product-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.product-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.product-name a:hover { color: var(--primary); }
.product-views { font-size: 12px; color: var(--muted); }
.product-desc { color: var(--muted); font-size: 13.5px; flex: 1; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-stars { color: #e8a312; font-size: 13px; letter-spacing: 2px; margin-bottom: 12px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ========== 首页侧栏 ========== */
.layout-2col { display: flex; gap: 28px; align-items: flex-start; }
.layout-main { flex: 1; min-width: 0; }
.layout-side { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 80px; }
.profile-card { padding: 26px 24px 22px; text-align: center; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; box-shadow: 0 4px 16px rgba(23, 24, 26, .18);
}
.profile-name { font-size: 17px; font-weight: 700; color: var(--ink); }
.profile-job { color: var(--muted); font-size: 12.5px; margin: 4px 0 8px; }
.profile-addr { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.profile-bio { font-size: 13px; color: var(--body); margin-bottom: 16px; text-align: left; line-height: 1.8; }
.qrcode-box { border-top: 1px dashed var(--line); padding-top: 14px; }
.qrcode-img { width: 104px; height: 104px; margin: 0 auto 8px; border-radius: 6px; border: 1px solid var(--line); }
.qrcode-tip { font-size: 12px; color: var(--muted); }
.side-card { padding: 18px 20px; }
.side-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.side-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--primary); }
.hot-list { list-style: none; }
.hot-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.hot-item:last-child { border-bottom: none; }
.hot-num { width: 20px; height: 20px; border-radius: 5px; background: #efefec; color: var(--muted); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--mono); }
.hot-num.top { background: var(--primary); color: #fff; }
.hot-link { font-size: 13.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--body); }
.hot-link:hover { color: var(--primary); }
.hot-views { font-size: 12px; color: var(--muted); flex-shrink: 0; font-family: var(--mono); }

/* ========== 评论 ========== */
.comment-box { margin-top: 30px; border-top: 1px dashed var(--line); padding-top: 24px; }
.comment-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.comment-form { display: flex; gap: 12px; margin-bottom: 22px; }
.comment-input { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.comment-input input, .comment-input textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; outline: none; font-family: var(--font); transition: border .2s; }
.comment-input input:focus, .comment-input textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent); }
.comment-input textarea { resize: vertical; }
.comment-list { list-style: none; }
.comment-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: 15px; }
.comment-body { flex: 1; min-width: 0; }
.comment-nick { font-weight: 600; font-size: 14px; color: var(--ink); }
.comment-time { color: var(--muted); font-size: 12px; margin-left: 10px; }
.comment-content { font-size: 14px; color: var(--body); margin-top: 6px; }

/* ========== 空状态 / 错误 ========== */
.empty-state { text-align: center; padding: 70px 0; color: var(--muted); }
.empty-state .empty-icon { font-size: 44px; margin-bottom: 14px; }
.error-page { text-align: center; padding: 90px 0; }
.error-code { font-size: 76px; font-weight: 800; color: var(--ink); letter-spacing: -3px; }
.error-msg { color: var(--muted); margin: 10px 0 22px; }

/* ========== Toast / Backtop ========== */
.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%) translateY(-12px);
  background: var(--ink); color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 999; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.backtop {
  position: fixed; right: 22px; bottom: 22px; width: 40px; height: 40px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px;
  opacity: 0; pointer-events: none; transition: all .25s; color: var(--body);
}
.backtop.show { opacity: 1; pointer-events: auto; }
.backtop:hover { color: var(--primary); border-color: var(--primary); }

/* ========== Footer ========== */
.footer { background: #17181a; color: #9aa0a6; margin-top: 56px; }
.footer-inner { display: flex; gap: 70px; padding: 44px 20px 36px; }
.footer-brand { flex: 1.5; }
.footer-brand .logo-mark { background: #fff; color: #17181a; }
.footer-brand .logo-text { color: #fff; }
.footer-desc { font-size: 13px; margin-top: 12px; max-width: 380px; line-height: 1.8; }
.footer-domain { margin-top: 12px; font-family: var(--mono); font-size: 14px; color: #e5e6e8; }
.footer-links { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 10px; font-weight: 600; letter-spacing: .5px; }
.footer-links a { font-size: 13.5px; transition: color .2s; width: fit-content; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 16px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; flex-wrap: wrap; gap: 10px; }
.footer-bottom-inner a { color: #9aa0a6; }
.footer-bottom-inner a:hover { color: #fff; }
.footer-beian { display: inline-flex; align-items: center; gap: 6px; }

/* ========== 推广矩阵 ========== */
.promo-section { padding-top: 2px; }
.promo-head { align-items: center; margin-bottom: 18px; }
.promo-count { font-size: 12.5px; color: var(--muted); letter-spacing: .3px; }
.promo-grid { gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.promo-card {
  padding: 8px 8px 0;
  text-align: center;
  border-radius: 14px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.promo-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.promo-cover {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f5f1;
  /* border: 1px solid var(--line); */
}
.promo-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-body { padding: 12px 6px 14px; }
.promo-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.promo-desc {
  font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.promo-miniapp .promo-cover, .promo-game .promo-cover { border-radius: 14px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { gap: 14px; }
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .layout-2col { flex-direction: column; }
  .layout-side { width: 100%; position: static; }
  .doc-layout { flex-direction: column; }
  .doc-sidebar { width: 100%; position: static; }
  .doc-sidebar-card { max-height: none; }
  .doc-tools { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; }
  .tool-card { flex: 1; min-width: 180px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero-inner { flex-direction: column; gap: 32px; }
  .hero-title { font-size: 29px; }
  .hero { padding: 40px 0 44px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav { display: none; }
  .doc-content-card { padding: 26px 22px; }
  .intro-info { grid-template-columns: 1fr; }
  .article-thumb { height: 128px; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .comment-form { flex-direction: column; }
}

/* ========== 首页 v2 视觉升级（page-home 专属，不影响其他页面） ========== */

/* Hero 氛围背景：柔和光晕 + 淡网格 */
.page-home .hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(720px 360px at 6% -18%, color-mix(in srgb, var(--primary) 11%, transparent), transparent 70%),
    radial-gradient(620px 340px at 96% 6%, color-mix(in srgb, #0f766e 10%, transparent), transparent 72%),
    linear-gradient(180deg, #f7f6f1 0%, #fcfcf9 58%, var(--bg) 100%);
}
.page-home .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23, 24, 26, .055) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(620px 360px at 50% 0%, #000 0%, transparent 80%);
  mask-image: radial-gradient(620px 360px at 50% 0%, #000 0%, transparent 80%);
}
.page-home .hero-inner { position: relative; z-index: 1; }

/* Hero 徽标（带呼吸圆点） */
.page-home .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  letter-spacing: .8px;
  padding: 5px 14px;
}
.page-home .hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 45%, transparent);
  animation: hpulse 2.4s ease-out infinite;
}
@keyframes hpulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 42%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Hero 标题：关键词渐变 */
.page-home .hero-title { font-size: 40px; line-height: 1.27; margin-bottom: 20px; }
.page-home .hero-title em {
  font-style: normal;
  color: var(--primary);
  background: linear-gradient(112deg, var(--primary) 8%, #6d5bff 60%, #0f766e 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-home .hero-desc { font-size: 15.5px; }

/* 首页区块标题 */
.page-home .home-posts { padding-top: 30px; }
.page-home .section-title { position: relative; padding-left: 15px; font-size: 22px; }
.page-home .section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2456e6, #7c5cff);
}
.page-home .section-more { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.page-home .section-more::after { content: " →"; transition: padding-left .2s; }
.page-home .section-more:hover::after { padding-left: 3px; }

/* 首页文章卡 */
.page-home .article-card { border-radius: 14px; }
.page-home .article-card:hover { transform: translateY(-3px); }
.page-home .article-title { font-size: 17px; }

/* 首页侧边栏 */
.page-home .profile-avatar {
  background: linear-gradient(135deg, #2456e6 0%, #7c5cff 100%);
  box-shadow: 0 6px 18px rgba(80, 80, 220, .28);
}
.page-home .side-card, .page-home .profile-card { border-radius: 14px; }
.page-home .hot-num.top {
  background: linear-gradient(135deg, #2456e6, #7c5cff);
  box-shadow: 0 3px 8px color-mix(in srgb, #2456e6 30%, transparent);
}
.page-home .qrcode-img { border-radius: 10px; border-color: var(--line-strong); }
.page-home .profile-bio { text-align: center; }

/* 首页响应式 */
@media (max-width: 720px) {
  .page-home .hero-title { font-size: 30px; }
}
