/* orangebook.css — learn-agent-design
   左侧边栏导航 + 右侧本页目录，Claude Code 文档式调性：暖白底、陶土橙强调、克制排版。
   禁 emoji，图标用纯 CSS / line-SVG。支持暖夜版暗色主题（手动切换优先，否则跟随系统）。 */

:root {
  --brand: #C15F3C;          /* 陶土橙（Anthropic coral 系） */
  --brand-ink: #9E4A2C;
  --brand-soft: #F7ECE6;
  --bg: #ffffff;
  --sidebar-bg: #FAF9F7;
  --ink: #1a1a19;
  --ink-soft: #3d3d3a;
  --muted: #6b6b64;
  --faint: #9a9a92;
  --line: #eae8e3;
  --line-soft: #f2f0ec;
  --code-bg: #f5f4f1;
  /* 语义表面色（暗色主题下整组替换） */
  --surface: #fbfaf8;
  --surface-2: #faf9f7;
  --card-hover: #fffdfb;
  --th-bg: #f7f6f3;
  --row-even: #fcfbf9;
  --callout-bg: #f6f7f8;
  --callout-line: #e6e9ec;
  --callout-mark: #6b7280;
  --warn-bg: #fdf4ee;
  --warn-line: #f0d9c8;
  --quote-bg: #fbf7f4;
  --hover-tint: rgba(0,0,0,.04);
  --card-shadow: rgba(193,95,60,.5);
  --sidebar-w: 300px;
  --radius: 10px;
}

/* 暗色主题（橙皮书暖夜版）。手动 data-theme="dark" 强制；未手动选时跟随系统。 */
:root[data-theme="dark"] {
  --brand: #E08A63; --brand-ink: #E9A988; --brand-soft: #3A2A22;
  --bg: #1b1714; --sidebar-bg: #161310;
  --ink: #ece8e2; --ink-soft: #cdc7bd; --muted: #9c9489; --faint: #6f685e;
  --line: #332d26; --line-soft: #272220; --code-bg: #2a241e;
  --surface: #211c18; --surface-2: #1f1a16; --card-hover: #221d18;
  --th-bg: #262019; --row-even: #1f1b17;
  --callout-bg: #1e2226; --callout-line: #2f353b; --callout-mark: #7e8794;
  --warn-bg: #2a2018; --warn-line: #4a3a2a; --quote-bg: #241c17;
  --hover-tint: rgba(255,255,255,.06); --card-shadow: rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #E08A63; --brand-ink: #E9A988; --brand-soft: #3A2A22;
    --bg: #1b1714; --sidebar-bg: #161310;
    --ink: #ece8e2; --ink-soft: #cdc7bd; --muted: #9c9489; --faint: #6f685e;
    --line: #332d26; --line-soft: #272220; --code-bg: #2a241e;
    --surface: #211c18; --surface-2: #1f1a16; --card-hover: #221d18;
    --th-bg: #262019; --row-even: #1f1b17;
    --callout-bg: #1e2226; --callout-line: #2f353b; --callout-mark: #7e8794;
    --warn-bg: #2a2018; --warn-line: #4a3a2a; --quote-bg: #241c17;
    --hover-tint: rgba(255,255,255,.06); --card-shadow: rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ 布局 ============ */
.layout { display: flex; align-items: flex-start; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  background: var(--sidebar-bg); border-right: 1px solid var(--line);
}
.sidebar-scroll { height: 100%; overflow-y: auto; padding: 22px 16px 40px; position: relative; }
.main { flex: 1; min-width: 0; }
.main-inner { max-width: 1220px; margin: 0 auto; padding: 52px 64px 96px; }
.main-inner .content { max-width: 780px; margin: 0 auto; }
.main-inner.with-toc {
  display: grid; grid-template-columns: minmax(0, 760px) 212px;
  gap: 60px; justify-content: center; align-items: start;
}
.main-inner.with-toc .content { max-width: none; margin: 0; }

/* ============ 主题切换按钮 ============ */
.theme-toggle {
  position: absolute; top: 18px; right: 14px; z-index: 5;
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.theme-toggle:hover { color: var(--brand-ink); border-color: var(--brand); }
.theme-toggle svg { width: 16px; height: 16px; }

/* 语言切换（挨着主题按钮左侧） */
.sidebar-tools { display: contents; }
.lang-switch {
  position: absolute; top: 18px; right: 52px; z-index: 5;
  height: 30px; min-width: 30px; padding: 0 7px;
  border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; line-height: 1; text-decoration: none;
}
.lang-switch:hover { color: var(--brand-ink); border-color: var(--brand); }

/* ============ 侧边栏 ============ */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; color: var(--ink);
  padding: 6px 40px 18px 10px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.sidebar-brand:hover { text-decoration: none; }
.brand-dot { width: 20px; height: 20px; border-radius: 6px; background: var(--brand); flex-shrink: 0; }
.sidebar-nav { font-size: 14px; }
.nav-section { margin-bottom: 20px; }
.nav-section-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 13px; color: var(--ink); letter-spacing: .01em;
  padding: 6px 10px; border-radius: 7px;
}
.nav-section-title:hover { background: var(--hover-tint); text-decoration: none; }
.nav-section-title.active { color: var(--brand-ink); }
.mod-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
}
.nav-section ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 8px; }
.nav-section li { margin: 0; }
.nav-section li a {
  display: block; padding: 6px 12px; margin: 1px 0;
  color: var(--muted); border-radius: 7px; border-left: 2px solid transparent;
  line-height: 1.5; font-size: 13.5px;
}
.nav-section li a:hover { color: var(--ink); background: var(--hover-tint); text-decoration: none; }
.nav-section li a.active {
  color: var(--brand-ink); font-weight: 600;
  background: var(--brand-soft); border-left-color: var(--brand);
}
.nav-section .soon { color: var(--faint); font-size: 13px; padding: 6px 12px; display: block; }

/* ============ 本页目录 TOC ============ */
.toc { position: sticky; top: 52px; font-size: 13px; }
.toc-title { color: var(--faint); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; color: var(--muted); border-left: 2px solid transparent; line-height: 1.45; }
.toc li a:hover { color: var(--brand-ink); border-left-color: var(--brand); text-decoration: none; }
/* 右栏 TOC 下方的统计（紧凑、可换行） */
.toc .learn-stats { display: block; margin: 26px 0 0; font-size: 12px; line-height: 1.7; padding: 9px 13px; }
/* 模块页/列表页内容底部的统计 */
.content > .learn-stats { margin-top: 36px; }

/* ============ 首页 ============ */
.hero { padding: 18px 0 36px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.hero .eyebrow { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: 38px; line-height: 1.22; margin: 0 0 16px; letter-spacing: -.015em; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { font-size: 18px; color: var(--muted); margin: 0; max-width: 620px; }
.learn-stats { margin-top: 20px; display: inline-block; font-size: 14px; color: var(--muted); background: var(--brand-soft); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; }
.learn-stats .dot { width: 8px; height: 8px; border-radius: 50%; background: #3f7a5a; box-shadow: 0 0 0 3px rgba(63,122,90,.18); display: inline-block; margin-right: 13px; vertical-align: middle; position: relative; top: -1px; }
.learn-stats strong { color: var(--brand-ink); font-weight: 700; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-actions .learn-stats { margin-top: 0; }
.hero-actions .support-btn { margin: 0; font-size: 14px; padding: 7px 16px; }
.home-sec { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 40px 0 8px; }
.home-sec .sec-count { margin-left: auto; font-size: 13px; color: var(--faint); font-weight: 500; }
.home-desc { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
.soon-note { color: var(--faint); font-size: 14px; }

/* 模块页头 */
.page-head { padding-bottom: 28px; border-bottom: 1px solid var(--line-soft); margin-bottom: 28px; }
.page-head .mod-badge.big { width: 34px; height: 34px; border-radius: 8px; font-size: 15px; margin-bottom: 14px; }
.page-head h1 { font-size: 32px; margin: 0 0 10px; letter-spacing: -.01em; }
.page-head .lead { color: var(--muted); margin: 0; font-size: 16px; }

/* 模块导语 */
.module-intro { font-size: 16px; color: var(--ink-soft); line-height: 1.85; margin: 0 0 8px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.module-intro p { margin: 0 0 12px; }
.module-intro p:last-child { margin-bottom: 0; }
.module-intro strong { color: var(--ink); }
.list-head { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 32px 0 14px; }
.mod-badge.ex { background: #3f7a5a; }
.mod-badge.lab { background: #8a6a2c; }

/* 实验室 · 项目链接行（详情页 meta 下） */
.lab-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 6px 0 24px; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.lab-links-t { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-right: 2px; }
.lab-link {
  display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 600;
  color: var(--brand-ink); padding: 5px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
}
.lab-link:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }

/* 讲次卡片（doc 风弱卡片 + 封面缩略块） */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 16px 20px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.card:hover { border-color: var(--brand); background: var(--card-hover); box-shadow: 0 5px 20px -12px var(--card-shadow); text-decoration: none; }
.card-body { flex: 1; min-width: 0; }
.card-no { font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .04em; }
.card h3 { margin: 5px 0 5px; font-size: 17px; color: var(--ink); line-height: 1.45; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* 难度 / 时长徽章 */
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-pill { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.5; }
.tag-level { background: var(--brand-soft); color: var(--brand-ink); }
.tag-time { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.lecture .meta .tag-pill { margin-left: 8px; vertical-align: middle; }

/* 封面缩略块（生成式：模块色 + 大号讲次号 + 淡网格纹理，零素材依赖） */
.card-thumb {
  flex-shrink: 0; width: 76px; height: 76px; border-radius: 9px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
  background-image: radial-gradient(rgba(255,255,255,.4) 1px, transparent 1.5px);
  background-size: 11px 11px;
}
.card-thumb .thumb-no { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.14); }
.card-thumb .thumb-badge {
  position: absolute; top: 6px; left: 7px; font-size: 10px; font-weight: 700;
  background: rgba(255,255,255,.22); padding: 1px 6px; border-radius: 4px;
}
.thumb-a  { background-color: #C77E5C; }
.thumb-b  { background-color: #97AB7E; }
.thumb-c  { background-color: #9A93C2; }
.thumb-d  { background-color: #CFA292; }
.thumb-e  { background-color: #82A2C0; }
.thumb-ex { background-color: #8EB29C; }
.thumb-lab { background-color: #C7A15B; }

/* 作者 / 引流条（首页 hero 下） */
.author-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; margin: 0 0 8px;
  background: var(--sidebar-bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.author-avatar {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-ink));
  color: #fff; font-size: 25px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.author-meta { flex: 1; min-width: 0; }
.author-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.author-name .by { color: var(--faint); font-weight: 500; font-size: 13px; margin-right: 6px; }
.author-bio { font-size: 13.5px; color: var(--muted); margin: 3px 0 0; line-height: 1.55; }
.author-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.author-links a, .author-links .lk {
  font-size: 12.5px; font-weight: 600; color: var(--brand-ink);
  background: var(--brand-soft); border: 1px solid var(--line);
  padding: 4px 11px; border-radius: 999px;
}
.author-links a:hover { background: var(--brand-soft); border-color: var(--brand); text-decoration: none; }
.author-links .lk { color: var(--muted); }

/* 赞赏按钮 + 弹窗二维码 */
.support-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--brand-ink);
  background: var(--brand-soft); border: 1px solid var(--line);
  padding: 7px 18px; border-radius: 999px; cursor: pointer;
  margin: 0 0 8px; transition: border-color .15s;
}
.support-btn:hover { border-color: var(--brand); }
.support-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 999;
  align-items: center; justify-content: center;
}
.support-modal-box {
  position: relative; background: #fff; border-radius: 16px;
  padding: 28px 24px 20px; max-width: 320px; width: 90%;
  text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
.support-modal-box img {
  width: 100%; max-width: 280px; height: auto;
  display: block; margin: 12px auto 0; border-radius: 8px;
}
.support-modal-note { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.support-modal-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 20px; line-height: 1; background: none; border: none;
  color: var(--muted); cursor: pointer; padding: 4px;
}
.support-modal-close:hover { color: var(--ink); }

/* 侧边栏底部引流（每页可见） */
.sidebar-foot {
  margin-top: 10px; padding: 14px 10px 4px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); line-height: 1.8;
}
.sidebar-foot a { color: var(--muted); }
.sidebar-foot a:hover { color: var(--brand-ink); }
.sidebar-foot .sf-name { color: var(--ink); font-weight: 600; }

/* ============ 讲义正文 ============ */
.lecture .breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.lecture .breadcrumb a { color: var(--muted); }
.lecture .breadcrumb span { color: var(--faint); }
.lecture h1 { font-size: 32px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.015em; }
.lecture .summary {
  font-size: 16.5px; color: var(--ink-soft); margin: 0 0 8px;
  padding: 14px 18px; background: var(--brand-soft); border-radius: var(--radius);
  border-left: 3px solid var(--brand);
}
.lecture .meta { font-size: 13px; color: var(--faint); margin: 0 0 34px; }
.lecture h2 {
  font-size: 23px; margin: 46px 0 14px; padding-top: 22px; line-height: 1.35;
  border-top: 1px solid var(--line-soft); scroll-margin-top: 24px; letter-spacing: -.01em;
}
.lecture h3 { font-size: 18px; margin: 28px 0 10px; }
.lecture p { margin: 14px 0; color: var(--ink-soft); }
.lecture ul, .lecture ol { padding-left: 1.4em; }
.lecture li { margin: 7px 0; color: var(--ink-soft); }
.lecture strong { color: var(--ink); font-weight: 700; }

.lecture blockquote {
  margin: 24px 0; padding: 16px 20px; border-radius: var(--radius);
  background: var(--quote-bg); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  font-size: 16.5px; line-height: 1.7; color: var(--brand-ink);
}
.lecture blockquote p { margin: 0; }
.lecture blockquote.callout {
  background: var(--callout-bg); border: 1px solid var(--callout-line); border-left: 3px solid var(--callout-mark);
  color: var(--ink-soft); font-size: 15px;
}
.lecture blockquote.callout::before {
  content: "注"; display: inline-block; margin-right: 10px;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 6px; background: var(--callout-mark); color: #fff; font-size: 12px; font-weight: 700; vertical-align: 1px;
}
.lecture blockquote.callout-warning { background: var(--warn-bg); border-color: var(--warn-line); border-left-color: var(--brand); }
.lecture blockquote.callout-warning::before { content: "警"; background: var(--brand); }
.lecture blockquote.callout-tip::before { content: "提示"; width: auto; padding: 0 8px; background: #3f7a5a; }
.lecture code { background: var(--code-bg); padding: 2px 6px; border-radius: 5px; font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; font-size: .88em; color: var(--brand-ink); }
.lecture pre { background: var(--surface-2); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--line); }
.lecture pre code { background: none; padding: 0; color: var(--ink-soft); }

/* 表格（doc 风：浅灰表头，不喧宾夺主） */
.lecture table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14.5px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lecture thead th { background: var(--th-bg); color: var(--ink); text-align: left; padding: 11px 14px; font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.lecture tbody td { padding: 10px 14px; border-top: 1px solid var(--line-soft); vertical-align: top; color: var(--ink-soft); }
.lecture tbody tr:nth-child(even) { background: var(--row-even); }
.lecture img { max-width: 100%; height: auto; display: block; margin: 24px auto; border-radius: var(--radius); }
.lecture figure.diagram { margin: 28px 0; text-align: center; }
.lecture figure.diagram img { margin: 0 auto; border: 1px solid var(--line); background: var(--surface); }
.lecture figure.diagram figcaption { margin-top: 10px; font-size: 13px; color: var(--faint); }

/* 上一讲 / 下一讲 */
.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 52px; border-top: 1px solid var(--line); padding-top: 22px; }
.pager a { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: border-color .15s; }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager a.next { text-align: right; }
.pager .dir { font-size: 12px; color: var(--muted); }
.pager .ttl { font-weight: 600; font-size: 14.5px; }
.pager .spacer { flex: 1; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .main-inner.with-toc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .main-inner { padding: 44px 40px 80px; }
}
@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .sidebar-scroll { max-height: 50vh; padding: 16px; }
  .main-inner { padding: 32px 22px 64px; }
  .hero h1 { font-size: 30px; }
  .lecture h1 { font-size: 26px; }
  .card-thumb { width: 60px; height: 60px; }
  .card-thumb .thumb-no { font-size: 23px; }
  .author-card { flex-wrap: wrap; }
}

/* ============================================================
   阶段一改版：博客流骨架（顶部横向 nav + 全宽 + 卡片网格）
   覆盖上方的左侧栏布局；正文/表格等沿用。
   ============================================================ */
/* 顶部导航 */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 40px;
  height: 60px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { letter-spacing: -.01em; }
.topnav-links { display: flex; align-items: center; gap: 2px; }
.tn-link { font-size: 14px; color: var(--muted); padding: 6px 11px; border-radius: 7px; white-space: nowrap; }
.tn-link:hover { color: var(--ink); background: var(--hover-tint); text-decoration: none; }
.tn-link.active { color: var(--brand-ink); font-weight: 600; }
.topnav-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topnav-tools .theme-toggle, .topnav-tools .lang-switch { position: static; }

/* 全宽内容容器（无侧栏） */
.main-inner { max-width: 1100px; padding: 40px 40px 80px; }
.main-inner .content { max-width: 1100px; margin: 0; }
.main-inner.with-toc {
  display: grid; grid-template-columns: minmax(0, 760px) 212px;
  gap: 56px; justify-content: center; align-items: start; max-width: 1040px;
}
.main-inner.with-toc .content { max-width: none; }

/* 博客 hero：左定位 + 右主线入口 */
.bloghero {
  display: grid; grid-template-columns: 1.08fr 1fr; gap: 48px;
  padding: 26px 0 38px; border-bottom: 1px solid var(--line-soft); margin-bottom: 36px;
}
.bloghero-l .eyebrow { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); font-weight: 700; margin-bottom: 14px; }
.bloghero-l h1 { font-size: 40px; line-height: 1.16; margin: 0 0 18px; letter-spacing: -.02em; font-weight: 800; }
.bloghero-l h1 em { font-style: normal; color: var(--brand); white-space: nowrap; }
.bloghero-l .lead { font-size: 17px; color: var(--muted); margin: 0; max-width: 520px; }
.bloghero-r { display: flex; flex-direction: column; justify-content: center; gap: 2px; border-left: 1px solid var(--line-soft); padding-left: 44px; }
.thread-link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 22px; font-weight: 700; color: var(--ink); padding: 9px 0;
  letter-spacing: -.01em; border-bottom: 1px solid var(--line-soft); transition: color .15s;
}
.thread-link:last-child { border-bottom: none; }
.thread-link:hover { color: var(--brand); text-decoration: none; }
.thread-link .arr { color: var(--faint); font-weight: 400; transition: transform .15s, color .15s; }
.thread-link:hover .arr { color: var(--brand); transform: translateX(4px); }

/* 卡片网格（3 列竖卡） */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 8px; }
.card-grid .card.card-v {
  flex-direction: column; gap: 0; padding: 0; align-items: stretch; overflow: hidden;
}
.card-cover {
  height: 116px; position: relative; display: flex; align-items: center; justify-content: center;
}
.card-cover .cover-icon { width: 50px; height: 50px; opacity: .9; }
.card-cover .cover-badge { position: absolute; top: 10px; left: 11px; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: #2b2b28; background: rgba(255,255,255,.6); padding: 2px 9px; border-radius: 5px; }
.card-cover .cover-no { display: none; }
.card-v .card-body { padding: 13px 16px 16px; }
.card-v .card-no { font-size: 11.5px; color: var(--brand); font-weight: 700; }
.card-v h3 { font-size: 15.5px; margin: 6px 0 6px; line-height: 1.4; }
.card-v p { font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 「查看全部 N 篇」入口（首页每主线精选 3 篇后） */
.see-all { display: inline-block; margin: 2px 0 4px; font-size: 13.5px; font-weight: 600; color: var(--brand-ink); }
.see-all:hover { color: var(--brand); }

/* serif 标题（出版物感）：零加载系统衬线栈。中文 hero 大标题上宋体；英文站标题全衬线，中文正文标题保持黑体最稳 */
:root { --serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", STSong, serif; }
.bloghero-l h1 { font-family: var(--serif); }
html[lang^="en"] .bloghero-l h1,
html[lang^="en"] .card-v h3,
html[lang^="en"] .page-head h1,
html[lang^="en"] .lecture h1,
html[lang^="en"] .lecture h2,
html[lang^="en"] .thread-link { font-family: var(--serif); }

/* 暗色模式：封面色块硬编码，统一降饱和压亮度，避免暗底上刺眼 */
:root[data-theme="dark"] .card-cover { filter: saturate(.82) brightness(.84); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card-cover { filter: saturate(.82) brightness(.84); } }

/* 站脚 */
.site-foot { border-top: 1px solid var(--line); margin-top: 32px; }
.site-foot-inner { max-width: 1100px; margin: 0 auto; padding: 26px 40px; font-size: 13px; color: var(--muted); }
.site-foot .sf-name { color: var(--ink); font-weight: 600; }
.site-foot .sf-links { margin-left: 8px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--brand-ink); }

/* 响应式（博客流） */
@media (max-width: 920px) {
  .bloghero { grid-template-columns: 1fr; gap: 22px; }
  .bloghero-r { border-left: none; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 14px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .topnav-links { display: none; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .topnav-inner { padding: 0 20px; }
  .main-inner { padding: 28px 20px 64px; }
  .bloghero-l h1 { font-size: 30px; }
}
