:root{
  --bg:#fafaf7;
  --ink:#1a1a1a;
  --muted:#666;
  --line:#e8e8e3;
  --accent:#6366f1;
  --accent2:#ec4899;
  --code-bg:#1e1e2e;
  --code-ink:#e6e6e6;
  --card:#fff;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif;
  background:var(--bg);color:var(--ink);
  line-height:1.75;font-size:16px;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.site-header{
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:100;
}
.site-header .wrap-wide{
  max-width:1100px;margin:0 auto;padding:14px 24px;
  display:flex;align-items:center;justify-content:space-between;
}
.site-logo{
  font-weight:700;font-size:18px;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.site-nav a{margin-left:24px;color:var(--ink);font-size:14px}

.wrap{max-width:780px;margin:0 auto;padding:0 24px}
.wrap-wide{max-width:1100px;margin:0 auto;padding:0 24px}

.hero{padding:80px 24px 60px;text-align:center;max-width:900px;margin:0 auto}
.hero h1{
  font-size:42px;line-height:1.2;font-weight:800;margin-bottom:20px;
  background:linear-gradient(90deg,#1a1a1a 30%,#6366f1 70%,#ec4899);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero p{font-size:18px;color:var(--muted);max-width:600px;margin:0 auto 32px}

.cat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:20px;margin:40px 0 80px;
}
.cat-card{
  background:var(--card);border:1px solid var(--line);
  border-radius:14px;padding:24px;
  transition:transform .2s,box-shadow .2s,border-color .2s;
}
.cat-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  border-color:var(--accent);
}
.cat-card .icon{font-size:28px;margin-bottom:12px}
.cat-card h3{font-size:18px;margin-bottom:8px;color:var(--ink)}
.cat-card p{font-size:14px;color:var(--muted)}
.cat-card a{color:inherit;display:block}

article{padding:60px 0 80px}
article h1{font-size:36px;font-weight:800;line-height:1.3;margin-bottom:16px}
article .meta{color:var(--muted);font-size:14px;margin-bottom:48px;padding-bottom:24px;border-bottom:1px solid var(--line)}
article h2{font-size:24px;font-weight:700;margin:48px 0 16px;padding-top:12px}
article h3{font-size:20px;font-weight:600;margin:32px 0 12px}
article p{margin:16px 0;color:#2a2a2a}
article ul,article ol{margin:16px 0 16px 24px;color:#2a2a2a}
article li{margin:8px 0}
article strong{color:#000;font-weight:600}
article blockquote{
  border-left:3px solid var(--accent);
  background:#f5f4ff;padding:16px 20px;margin:24px 0;border-radius:0 8px 8px 0;
  color:#444;
}
article table{
  width:100%;border-collapse:collapse;margin:24px 0;
  font-size:14px;background:#fff;border-radius:8px;overflow:hidden;
  border:1px solid var(--line);
}
article th,article td{padding:12px 16px;text-align:left;border-bottom:1px solid var(--line)}
article th{background:#f5f5f0;font-weight:600}
article tr:last-child td{border-bottom:none}
article code{
  background:#f0eee8;padding:2px 6px;border-radius:4px;
  font-family:"SF Mono",Menlo,Consolas,monospace;font-size:14px;
}
article pre{
  background:var(--code-bg);color:var(--code-ink);
  padding:18px 20px;border-radius:10px;overflow-x:auto;
  margin:20px 0;position:relative;
}
article pre code{background:none;padding:0;color:inherit;font-size:13px}

.tip,.warn,.note{
  border-radius:10px;padding:16px 20px;margin:24px 0;font-size:15px;
}
.tip{background:#ecfdf5;border-left:4px solid #10b981}
.warn{background:#fef2f2;border-left:4px solid #ef4444}
.note{background:#fffbeb;border-left:4px solid #f59e0b}

.related{
  background:#f5f4ff;padding:24px;border-radius:12px;margin:48px 0;
}
.related h4{margin-bottom:12px;color:var(--accent)}
.related ul{list-style:none;margin:0}
.related li{margin:6px 0}

.site-footer{
  border-top:1px solid var(--line);
  padding:40px 24px;text-align:center;color:var(--muted);font-size:14px;
  margin-top:80px;
}
.site-footer a{color:var(--muted);margin:0 12px}

.copy-btn{
  position:absolute;top:10px;right:10px;
  background:rgba(255,255,255,.1);color:#fff;
  border:none;border-radius:5px;padding:4px 10px;
  font-size:12px;cursor:pointer;opacity:0;transition:opacity .2s;
}
pre:hover .copy-btn{opacity:1}
.copy-btn.copied{background:#10b981}

@media(max-width:640px){
  .hero h1{font-size:30px}
  .hero p{font-size:16px}
  article h1{font-size:26px}
  article h2{font-size:20px}
  .site-nav a{margin-left:14px;font-size:13px}
  .wrap{padding:0 18px}
}

/* ===== v3 设计语言 ===== */

/* hero */
.hero{padding:80px 24px 50px;text-align:center}
.hero h1{font-size:42px;font-weight:800;margin-bottom:14px}
.hero p{font-size:17px;color:#666;max-width:560px;margin:0 auto}

/* 分类卡片(整张可点) */
.cat-card{
  display:block;background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:26px 24px;text-decoration:none;color:inherit;
  transition:all .2s;
}
.cat-card:hover{
  text-decoration:none;border-color:var(--accent);
  transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.06);
}
.cat-card .cat-icon{font-size:30px;margin-bottom:12px;line-height:1}
.cat-card h3{font-size:17px;font-weight:600;color:var(--ink);margin-bottom:8px;display:flex;align-items:center;gap:8px}
.cat-card .badge{
  background:var(--accent);color:#fff;
  padding:1px 8px;border-radius:10px;
  font-size:11px;font-weight:500;letter-spacing:.5px;
}
.cat-card p{font-size:13.5px;color:var(--muted);line-height:1.65;margin:0}

/* 分类页 hero */
.cat-hero{
  text-align:center;padding:80px 24px 50px;
  border-bottom:1px solid var(--line);margin-bottom:40px;
}
.cat-hero-icon{font-size:48px;margin-bottom:16px;line-height:1}
.cat-hero h1{font-size:34px;font-weight:800;margin-bottom:12px}
.cat-hero p{font-size:16px;color:var(--muted);max-width:520px;margin:0 auto}

/* 文章列表卡片 */
.article-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:18px;margin-bottom:80px;
}
.article-card{
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:24px;text-decoration:none;color:inherit;
  transition:all .2s;display:block;
}
.article-card:hover{
  border-color:var(--accent);transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,.06);text-decoration:none;
}
.article-card h3{font-size:17px;margin-bottom:10px;color:var(--ink);line-height:1.45}
.article-card p{
  font-size:13.5px;color:var(--muted);line-height:1.65;margin-bottom:14px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.article-card .article-meta{font-size:12px;color:#aaa}

/* 最新更新区 */
.section-latest{margin-top:30px;margin-bottom:80px}
.section-title{
  font-size:15px;font-weight:600;color:#666;
  text-transform:uppercase;letter-spacing:1.5px;
  margin-bottom:18px;padding-bottom:0;
  display:block;text-align:left;
  border-bottom:none;
}

/* 最新列表 - 强制每行一条 */
.latest-list{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  display:block;
}
.latest-item{
  display:flex !important;
  align-items:center;
  padding:16px 24px;
  border-bottom:1px solid var(--line);
  text-decoration:none;
  color:inherit;
  transition:background .15s;
  gap:16px;
}
.latest-item:hover{background:#fafaff;text-decoration:none}
.latest-item:last-child{border-bottom:none}
.latest-cat{
  display:inline-block;
  background:#ede9fe;color:var(--accent);
  padding:3px 10px;border-radius:4px;
  font-size:12px;font-weight:500;
  flex-shrink:0;min-width:100px;text-align:center;
}
.latest-title{
  flex:1;font-size:15px;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.latest-date{
  color:#999;font-size:12px;
  flex-shrink:0;font-variant-numeric:tabular-nums;
}

/* 文章页：面包屑 */
.bread{font-size:13px;color:#999;margin-bottom:14px}
.bread a{color:#999;text-decoration:none}
.bread a:hover{color:var(--accent)}

/* 文章页：上下篇 */
.article-nav{
  display:grid;grid-template-columns:1fr 1fr;gap:14px;
  margin:60px 0 0;padding-top:30px;
  border-top:1px solid var(--line);
}
.article-nav a, .article-nav .nav-empty{
  background:#fff;border:1px solid var(--line);border-radius:10px;
  padding:16px 20px;text-decoration:none;
  display:flex;flex-direction:column;gap:6px;
  transition:all .2s;min-height:72px;
}
.article-nav a:hover{
  border-color:var(--accent);background:#fafaff;text-decoration:none;
}
.article-nav .nav-empty{background:transparent;border-color:transparent}
.article-nav .nav-label{font-size:12px;color:var(--muted)}
.article-nav .nav-title{
  font-size:14px;color:var(--ink);font-weight:500;line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.article-nav .nav-next{text-align:right}
.article-nav .nav-next .nav-label::after{content:" →"}
.article-nav .nav-prev .nav-label::before{content:"← "}

/* footer 简洁版 */
.site-footer{
  border-top:1px solid var(--line);padding:36px 24px;
  margin-top:80px;background:#fafaf7;
}
.foot-links{
  display:flex;justify-content:center;gap:32px;margin-bottom:14px;
}
.foot-links a{color:#666;font-size:14px;text-decoration:none}
.foot-links a:hover{color:var(--accent)}
.foot-copy{text-align:center;font-size:12px;color:#aaa}

/* 空状态 */
.empty{
  text-align:center;padding:60px;color:#999;
  background:#fff;border-radius:10px;border:1px dashed #ddd;
}

@media(max-width:640px){
  .hero{padding:50px 20px 30px}
  .hero h1{font-size:30px}
  .hero p{font-size:15px}
  .article-nav{grid-template-columns:1fr}
  .article-nav .nav-empty{display:none}
  .latest-item{flex-wrap:wrap;gap:8px}
  .latest-cat{min-width:auto}
  .latest-title{width:100%;white-space:normal}
  .foot-links{gap:20px;flex-wrap:wrap}
}

/* ===== v4 优化:摘要框 / 关于本站 / 阅读引导 / 编辑推荐 ===== */

/* 文章顶部摘要框(D1) */
.article-summary{
  background:linear-gradient(135deg,#f5f4ff 0%,#fefaf5 100%);
  border-left:4px solid var(--accent);
  border-radius:0 10px 10px 0;
  padding:18px 22px;
  margin:24px 0 36px;
  font-size:15px;
  line-height:1.75;
  color:#444;
}
.article-summary .summary-label{
  font-size:12px;color:var(--accent);font-weight:600;
  text-transform:uppercase;letter-spacing:1px;margin-bottom:6px;
}
.article-summary p{margin:0;color:#3a3a3a}

/* 分类页阅读引导(C1) */
.cat-guide{
  background:#fff;border:1px solid var(--line);
  border-radius:10px;padding:18px 22px;
  margin-bottom:30px;
  font-size:14.5px;line-height:1.8;
}
.cat-guide p{margin:6px 0;color:#444}
.cat-guide strong{color:var(--ink);margin-right:6px}

/* 分类页下一步(C2) */
.cat-next-step{
  margin:50px 0 80px;
  padding:24px 0;
  border-top:1px solid var(--line);
}
.cat-next-step h3{
  font-size:15px;color:#666;font-weight:600;
  margin-bottom:16px;text-transform:uppercase;letter-spacing:1px;
}
.next-step-list{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;
}
.next-step-item{
  background:#fff;border:1px solid var(--line);border-radius:10px;
  padding:16px 18px;text-decoration:none;display:flex;flex-direction:column;gap:4px;
  transition:all .2s;
}
.next-step-item:hover{border-color:var(--accent);background:#fafaff;text-decoration:none}
.next-step-name{font-size:15px;font-weight:600;color:var(--ink)}
.next-step-hint{font-size:13px;color:var(--muted)}

/* 首页编辑推荐(B3) */
.section-recommended{margin-top:60px;margin-bottom:30px}
.rec-list{
  max-width:780px;margin:0 auto;
  display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:10px;
}
.rec-item{
  display:flex;align-items:center;gap:14px;
  background:#fff;border:1px solid var(--line);border-radius:10px;
  padding:14px 18px;text-decoration:none;color:inherit;
  transition:all .15s;
}
.rec-item:hover{
  border-color:var(--accent);background:#fafaff;
  transform:translateY(-1px);text-decoration:none;
}
.rec-cat{
  background:#ede9fe;color:var(--accent);
  padding:3px 10px;border-radius:4px;font-size:11px;font-weight:500;
  flex-shrink:0;min-width:80px;text-align:center;
}
.rec-title{font-size:14.5px;color:var(--ink);line-height:1.4}

/* 关于本站(B5) */
.about-section{margin:80px auto 40px}
.about-card{
  max-width:680px;margin:0 auto;
  background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:28px 32px;
}
.about-card h3{
  font-size:14px;color:#666;font-weight:600;
  text-transform:uppercase;letter-spacing:1.5px;margin-bottom:14px;
}
.about-card p{
  font-size:14.5px;color:#444;line-height:1.8;margin:6px 0;
}

/* 响应式 */
@media(max-width:640px){
  .article-summary{padding:14px 16px;font-size:14px}
  .next-step-list{grid-template-columns:1fr}
  .rec-item{flex-direction:column;align-items:flex-start;gap:6px}
  .rec-cat{min-width:auto}
}


/* ============ Package 1 新增样式 ============ */

/* 阅读进度条 */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

/* 深色模式按钮 */
.theme-toggle {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 12px;
  opacity: .75;
  transition: opacity .15s;
}
.theme-toggle:hover { opacity: 1; }

/* AI Answer 块 */
.ai-answer-block {
  background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 100%);
  border: 1px solid #c7d2fe;
  border-left: 4px solid #4f46e5;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 24px 0;
}
.ai-answer-label {
  display: inline-block;
  background: #4f46e5;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 600;
  letter-spacing: .5px;
}
.ai-answer-tldr p {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: #1e293b;
}
.ai-answer-key-facts {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #c7d2fe;
}
.ai-answer-key-facts ul {
  margin: 8px 0 0;
  padding-left: 22px;
}
.ai-answer-key-facts li {
  margin: 4px 0;
  line-height: 1.7;
  color: #334155;
}

/* 作者署名 */
.byline {
  color: #64748b;
  font-size: 14px;
  margin: 8px 0 18px;
}
.byline-sep { margin: 0 8px; opacity: .5; }

/* 修订日志 */
.revision-log {
  margin: 30px 0 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
  background: #f8fafc;
  font-size: 14px;
  color: #475569;
}
.revision-log summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}
.revision-log ul { margin: 10px 0 2px; padding-left: 22px; }
.revision-log li { margin: 3px 0; }

/* FAQ 区 */
.faq-section { margin: 40px 0; }
.faq-section h2 { margin-bottom: 16px; }
.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 10px 0;
  padding: 12px 16px;
  background: #fff;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: #1e293b;
  padding: 2px 0;
}
.faq-item[open] summary { margin-bottom: 10px; }
.faq-answer p { margin: 8px 0; }

/* 文章双栏布局 + TOC 侧边 */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.article-main { min-width: 0; }
.article-toc {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow: auto;
  font-size: 14px;
  border-left: 2px solid #e2e8f0;
  padding-left: 16px;
}
.article-toc .toc-title {
  font-weight: 700;
  color: #475569;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}
.article-toc a {
  display: block;
  padding: 4px 0;
  color: #64748b;
  text-decoration: none;
  line-height: 1.5;
  border-left: 2px solid transparent;
  margin-left: -18px;
  padding-left: 16px;
  transition: all .15s;
}
.article-toc a:hover { color: #1e293b; }
.article-toc a.active { color: #4f46e5; border-left-color: #4f46e5; font-weight: 600; }
.article-toc a.level-3 { padding-left: 30px; font-size: 13px; }

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
}

/* 深色模式 */
html[data-theme="dark"] {
  --bg: #0f172a;
  --fg: #e2e8f0;
  --card: #1e293b;
  --border: #334155;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--fg); }
html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .article-item,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .summary-box { background: var(--card); color: var(--fg); border-color: var(--border); }
html[data-theme="dark"] .ai-answer-block {
  background: linear-gradient(135deg, #1e1b4b 0%, #0c4a6e 100%);
  border-color: #4338ca;
}
html[data-theme="dark"] .ai-answer-tldr p,
html[data-theme="dark"] .ai-answer-key-facts li { color: #cbd5e1; }
html[data-theme="dark"] .revision-log { background: #1e293b; color: #94a3b8; border-color: #475569; }
html[data-theme="dark"] a { color: #818cf8; }
html[data-theme="dark"] a:hover { color: #a5b4fc; }


/* ============ Package 1 布局兼容补丁(P1-Hotfix) ============ */

/* —— 最核心的修复:补齐 .container —— */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* —— 站点头部导航 —— */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
.site-nav a:hover { color: #6366f1; }

/* —— 站点页脚 —— */
.site-footer .container {
  text-align: center;
  padding: 0 24px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  transition: color .15s;
}
.footer-links a:hover { color: #6366f1; }
.footer-copy {
  color: #94a3b8;
  font-size: 13px;
  margin: 0;
}

/* —— Hero 副标题 —— */
.hero-sub {
  font-size: 18px;
  color: #64748b;
  max-width: 640px;
  margin: 16px auto 0;
  line-height: 1.7;
}

/* —— 分类网格(首页) —— */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 40px 0 60px;
}
.category-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 26px 22px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
}
.category-card:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 6px 20px rgba(99, 102, 241, .12);
}
.category-icon { font-size: 32px; margin-bottom: 10px; }
.category-card h3 { font-size: 18px; margin: 0 0 8px; color: #1e293b; }
.category-card p { color: #64748b; font-size: 14px; margin: 0 0 12px; line-height: 1.6; }
.category-count {
  display: inline-block;
  font-size: 12px;
  color: #6366f1;
  background: #eef2ff;
  padding: 3px 10px;
  border-radius: 12px;
}

/* —— 首页三个通栏卡片 —— */
.first-read, .recent-list, .about-card {
  margin: 50px 0;
  padding: 30px 28px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
}
.first-read h2, .recent-list h2, .about-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  color: #1e293b;
}
.first-read ul, .recent-list ul {
  padding-left: 0;
  margin: 0;
  list-style: none;
}
.first-read li, .recent-list li {
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.first-read li:last-child, .recent-list li:last-child { border-bottom: 0; }
.first-read a, .recent-list a {
  color: #1e293b;
  text-decoration: none;
  font-weight: 500;
  flex: 1;
}
.first-read a:hover, .recent-list a:hover { color: #6366f1; }
.recent-date { color: #94a3b8; font-size: 13px; flex-shrink: 0; }
.about-card p { color: #475569; line-height: 1.8; margin: 8px 0; }

/* —— 分类页头部 —— */
.category-header {
  padding: 40px 0 20px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 40px;
}
.category-header h1 { font-size: 32px; margin: 0 0 10px; }
.category-header p { color: #64748b; font-size: 16px; margin: 0; }
.category-count-line {
  color: #94a3b8 !important;
  font-size: 14px !important;
  margin-top: 8px !important;
}

/* —— 文章列表(分类页用) —— */
.article-list { display: grid; gap: 16px; margin: 0 0 60px; }
.article-item {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all .2s;
}
.article-item:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .08);
}
.article-item h3 { margin: 0 0 8px; font-size: 18px; }
.article-item h3 a { color: #1e293b; text-decoration: none; }
.article-item h3 a:hover { color: #6366f1; }
.article-item p { color: #64748b; font-size: 14px; margin: 0 0 10px; line-height: 1.6; }
.article-meta { color: #94a3b8; font-size: 12px; }

/* —— 文章主区(双栏布局内的主列) —— */
.article-main {
  min-width: 0;
  padding: 0;
}
.article-content { padding: 0; }
.article-header { margin: 24px 0 16px; }
.article-header h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  margin: 16px 0 12px;
  color: #0f172a;
}

/* —— 面包屑 —— */
.breadcrumb {
  font-size: 14px;
  color: #94a3b8;
  margin: 24px 0 0;
}
.breadcrumb a { color: #64748b; text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: #6366f1; }
.breadcrumb span { color: #334155; font-weight: 500; }

/* —— 文章正文美化 —— */
.article-body { font-size: 16px; line-height: 1.85; color: #1e293b; }
.article-body h2 {
  font-size: 24px;
  margin: 40px 0 16px;
  padding-top: 10px;
  color: #0f172a;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-size: 19px;
  margin: 28px 0 12px;
  color: #1e293b;
  scroll-margin-top: 80px;
}
.article-body p { margin: 14px 0; }
.article-body ul, .article-body ol { margin: 14px 0; padding-left: 28px; }
.article-body li { margin: 4px 0; }
.article-body a { color: #6366f1; }
.article-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: #e11d48;
}
.article-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}
.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 14px;
}
.article-body blockquote {
  border-left: 4px solid #c7d2fe;
  background: #eef2ff;
  padding: 14px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
  color: #475569;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.article-body th, .article-body td {
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  text-align: left;
}
.article-body th { background: #f8fafc; font-weight: 600; }

/* —— 上下篇导航 —— */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 30px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
}
.article-nav a {
  flex: 1;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
  font-weight: 500;
  max-width: 48%;
  transition: all .2s;
  font-size: 14px;
  line-height: 1.5;
}
.article-nav a:hover { background: #eef2ff; border-color: #c7d2fe; }
.nav-next { margin-left: auto; text-align: right; }
.nav-prev { text-align: left; }

/* —— 响应式 —— */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .site-header .container { padding: 12px 16px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 13px; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 50px 16px 30px; }
  .category-grid { grid-template-columns: 1fr; gap: 14px; }
  .first-read, .recent-list, .about-card { padding: 24px 20px; margin: 30px 0; }
  .article-nav { flex-direction: column; gap: 10px; }
  .article-nav a { max-width: 100%; text-align: left !important; margin: 0 !important; }
  .article-header h1 { font-size: 26px; }
}

/* —— 深色模式补齐 —— */
html[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
html[data-theme="dark"] .site-header { background: rgba(30, 41, 59, .85) !important; border-color: #334155; }
html[data-theme="dark"] .site-nav a { color: #cbd5e1; }
html[data-theme="dark"] .site-nav a:hover { color: #a5b4fc; }
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .first-read,
html[data-theme="dark"] .recent-list,
html[data-theme="dark"] .about-card,
html[data-theme="dark"] .article-item {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .category-card h3,
html[data-theme="dark"] .first-read h2,
html[data-theme="dark"] .recent-list h2,
html[data-theme="dark"] .about-card h2,
html[data-theme="dark"] .article-item h3 a,
html[data-theme="dark"] .first-read a,
html[data-theme="dark"] .recent-list a,
html[data-theme="dark"] .article-header h1 {
  color: #f1f5f9;
}
html[data-theme="dark"] .category-card p,
html[data-theme="dark"] .article-item p,
html[data-theme="dark"] .about-card p { color: #94a3b8; }
html[data-theme="dark"] .category-count { background: #312e81; color: #c7d2fe; }
html[data-theme="dark"] .article-body { color: #cbd5e1; }
html[data-theme="dark"] .article-body h2,
html[data-theme="dark"] .article-body h3 { color: #f1f5f9; }
html[data-theme="dark"] .article-body code { background: #334155; color: #fbbf24; }
html[data-theme="dark"] .article-body pre { background: #0f172a; border: 1px solid #334155; }
html[data-theme="dark"] .article-body blockquote { background: #1e1b4b; border-color: #4f46e5; color: #cbd5e1; }
html[data-theme="dark"] .article-body th { background: #1e293b; }
html[data-theme="dark"] .article-body th,
html[data-theme="dark"] .article-body td { border-color: #334155; }
html[data-theme="dark"] .article-nav a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .article-nav a:hover { background: #312e81; border-color: #4f46e5; }
html[data-theme="dark"] .site-footer { background: #1e293b !important; border-color: #334155; }
html[data-theme="dark"] .footer-links a { color: #94a3b8; }
html[data-theme="dark"] .footer-copy { color: #64748b; }


/* ============ Package 1 Hotfix 2:markdown 嵌入块样式 ============ */

.article-body .tip,
.article-body .note,
.article-body .warn,
.article-body .danger,
.article-body .success,
.article-body .info {
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 8px;
  border-left: 4px solid;
  line-height: 1.75;
  font-size: 15px;
}
.article-body .tip b, .article-body .tip strong,
.article-body .note b, .article-body .note strong,
.article-body .warn b, .article-body .warn strong,
.article-body .danger b, .article-body .danger strong,
.article-body .success b, .article-body .success strong,
.article-body .info b, .article-body .info strong {
  font-weight: 700;
}

/* 💡 提示 —— 浅绿 */
.article-body .tip,
.article-body .success {
  background: #ecfdf5;
  border-left-color: #10b981;
  color: #064e3b;
}

/* 📝 说明 —— 浅蓝 */
.article-body .note,
.article-body .info {
  background: #eff6ff;
  border-left-color: #3b82f6;
  color: #1e3a8a;
}

/* ⚠️ 警告 —— 浅黄 */
.article-body .warn {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #78350f;
}

/* 🚨 危险 —— 浅红 */
.article-body .danger {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #7f1d1d;
}

/* p 段落在块内紧凑 */
.article-body .tip p,
.article-body .note p,
.article-body .warn p,
.article-body .danger p,
.article-body .success p,
.article-body .info p {
  margin: 6px 0;
}
.article-body .tip p:first-child,
.article-body .note p:first-child,
.article-body .warn p:first-child,
.article-body .danger p:first-child,
.article-body .success p:first-child,
.article-body .info p:first-child { margin-top: 0; }
.article-body .tip p:last-child,
.article-body .note p:last-child,
.article-body .warn p:last-child,
.article-body .danger p:last-child,
.article-body .success p:last-child,
.article-body .info p:last-child { margin-bottom: 0; }

/* <details>/<summary> 折叠块 */
.article-body details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 20px 0;
}
.article-body details summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
  list-style: none;
  padding: 2px 0;
}
.article-body details summary::-webkit-details-marker { display: none; }
.article-body details summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform .2s;
  margin-right: 4px;
}
.article-body details[open] summary::before {
  transform: rotate(90deg);
}
.article-body details[open] summary {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #cbd5e1;
}

/* <kbd> 键盘按键 */
.article-body kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #334155;
}

/* <mark> 高亮 */
.article-body mark {
  background: linear-gradient(to bottom, transparent 55%, #fef08a 55%);
  padding: 0 2px;
  color: inherit;
}

/* —— 深色模式适配 —— */
html[data-theme="dark"] .article-body .tip,
html[data-theme="dark"] .article-body .success {
  background: rgba(16, 185, 129, .1);
  color: #6ee7b7;
}
html[data-theme="dark"] .article-body .note,
html[data-theme="dark"] .article-body .info {
  background: rgba(59, 130, 246, .1);
  color: #93c5fd;
}
html[data-theme="dark"] .article-body .warn {
  background: rgba(245, 158, 11, .1);
  color: #fcd34d;
}
html[data-theme="dark"] .article-body .danger {
  background: rgba(239, 68, 68, .1);
  color: #fca5a5;
}
html[data-theme="dark"] .article-body details {
  background: #1e293b;
  border-color: #334155;
}
html[data-theme="dark"] .article-body details summary { color: #e2e8f0; }
html[data-theme="dark"] .article-body kbd {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}


/* ===== Package 4:系统页样式 ===== */

/* 术语词典 */
.glossary-list { margin: 20px 0; }
.glossary-list dt {
  font-weight: 700;
  color: #1e293b;
  margin-top: 18px;
  padding-bottom: 4px;
  border-bottom: 2px solid #6366f1;
  display: inline-block;
}
.glossary-list dd {
  margin: 6px 0 0 0;
  padding: 8px 0 0;
  color: #475569;
  line-height: 1.85;
}

/* 故障诊断表 */
.diagnostic-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14.5px;
}
.diagnostic-table thead th {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border: none;
}
.diagnostic-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
.diagnostic-table tbody tr:hover {
  background: #f8fafc;
}
.diag-tag {
  display: inline-block;
  background: #eef2ff;
  color: #4f46e5;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.diag-link {
  color: #6366f1 !important;
  font-weight: 600;
  white-space: nowrap;
}
.diag-link:hover { color: #312e81 !important; }

/* —— 深色模式 —— */
html[data-theme="dark"] .glossary-list dt {
  color: #f1f5f9;
  border-color: #818cf8;
}
html[data-theme="dark"] .glossary-list dd { color: #cbd5e1; }
html[data-theme="dark"] .diagnostic-table tbody tr:hover { background: #1e293b; }
html[data-theme="dark"] .diagnostic-table tbody td { border-color: #334155; color: #cbd5e1; }
html[data-theme="dark"] .diag-tag { background: #312e81; color: #c7d2fe; }
html[data-theme="dark"] .diag-link { color: #a5b4fc !important; }

@media (max-width: 640px) {
  .diagnostic-table { font-size: 13px; }
  .diagnostic-table thead th, .diagnostic-table tbody td { padding: 10px 8px; }
}

/* ============ V11.0 Package 5.6:第三方项目署名卡 ============ */
.extension-credits {
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border-left: 4px solid #8b5cf6;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0 28px;
  font-size: 14.5px;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(139, 92, 246, .08);
}
.extension-credits .ec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #6d28d9;
  margin-bottom: 12px;
  font-size: 15px;
}
.extension-credits .ec-icon { font-size: 18px; }
.extension-credits .ec-body {
  display: grid;
  gap: 6px;
}
.extension-credits .ec-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.7;
}
.extension-credits .ec-label {
  color: #64748b;
  font-weight: 600;
  min-width: 56px;
  font-size: 13px;
}
.extension-credits .ec-link {
  color: #6d28d9;
  text-decoration: none;
  word-break: break-all;
}
.extension-credits .ec-link:hover { text-decoration: underline; }
.extension-credits .ec-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.extension-credits .ec-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #ddd6fe;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.6;
}
/* 深色模式适配,对齐 ai-answer-block 配色思路 */
html[data-theme="dark"] .extension-credits {
  background: linear-gradient(135deg, rgba(139, 92, 246, .08) 0%, rgba(167, 139, 250, .05) 100%);
  border-left-color: #a78bfa;
  color: #cbd5e1;
}
html[data-theme="dark"] .extension-credits .ec-header { color: #c4b5fd; }
html[data-theme="dark"] .extension-credits .ec-label { color: #94a3b8; }
html[data-theme="dark"] .extension-credits .ec-link { color: #c4b5fd; }
html[data-theme="dark"] .extension-credits .ec-footer {
  color: #94a3b8;
  border-top-color: rgba(139, 92, 246, .25);
}

/* ============ V11.x:版本时效声明(琥珀色) ============ */
.version-warning-block {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 18px 22px;
  margin: 20px 0 28px;
  font-size: 14.5px;
  color: #78350f;
  box-shadow: 0 1px 3px rgba(245, 158, 11, .12);
}
.version-warning-block .vw-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 10px;
  font-size: 15px;
}
.version-warning-block .vw-icon { font-size: 18px; }
.version-warning-block .vw-body p {
  margin: 8px 0;
  line-height: 1.7;
}
.version-warning-block .vw-body strong {
  color: #92400e;
}
.version-warning-block .vw-body ul {
  margin: 8px 0 10px 18px;
  padding: 0;
  line-height: 1.8;
}
.version-warning-block .vw-body code {
  background: rgba(180, 83, 9, .12);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: #92400e;
}
.version-warning-block .vw-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #fcd34d;
  font-size: 13px;
  color: #92400e;
}
.version-warning-block .vw-footer a {
  color: #b45309;
  text-decoration: none;
  font-weight: 600;
}
.version-warning-block .vw-footer a:hover {
  text-decoration: underline;
}
/* 深色模式 */
html[data-theme="dark"] .version-warning-block {
  background: linear-gradient(135deg, rgba(245, 158, 11, .08) 0%, rgba(252, 211, 77, .05) 100%);
  border-left-color: #fbbf24;
  color: #fde68a;
}
html[data-theme="dark"] .version-warning-block .vw-header { color: #fcd34d; }
html[data-theme="dark"] .version-warning-block .vw-body strong { color: #fde68a; }
html[data-theme="dark"] .version-warning-block .vw-body code {
  background: rgba(252, 211, 77, .15);
  color: #fde68a;
}
html[data-theme="dark"] .version-warning-block .vw-footer {
  color: #fcd34d;
  border-top-color: rgba(252, 211, 77, .25);
}
html[data-theme="dark"] .version-warning-block .vw-footer a { color: #fde68a; }
