/* ==========================================================================
   「砚席 · YANXI」馆藏级数字出版排印与样式系统 (v1.0.0)
   ========================================================================== */

:root {
  /* 默认色系：【松烟墨韵 · 象牙暖纸】 */
  --bg-canvas: #faf8f5;           /* 象牙宣纸原色 */
  --bg-surface: #f3efe8;          /* 微暖副表面 */
  --bg-surface-elevated: #ffffff; /* 浮起卡片表面 */
  --bg-hover: #ede7dc;            /* 悬停微底色 */
  --bg-code: #13171f;             /* 沉静暗色代码底 */
  
  --text-primary: #1a1c1e;        /* 沉着松烟黑墨 */
  --text-secondary: #4a4d52;      /* 中冷灰 */
  --text-muted: #82868e;          /* 经年浅灰 */
  --text-code: #f1f5f9;
  
  --border-color: #e5dfd5;        /* 发丝级宣纸压线 */
  --border-subtle: #ede7dc;
  
  --accent: #2d4a3e;              /* 古雅苍松绿 */
  --accent-hover: #1f362c;
  --accent-light: #eaf1ed;
  --accent-border: #c2d6cc;
  --seal-red: #991b1b;            /* 金石朱砂印 */
  
  /* 字体族规范 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", Georgia, "Songti SC", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  
  --font-title: var(--font-serif);
  --font-body: var(--font-sans);
  
  /* 黄金布局尺度 */
  --container-max: 1180px;
  --content-w: 760px;             /* 黄金扫读主行宽 */
  --sidebar-w: 380px;             /* 藏斋侧录宽度 */
  --gutter: 2.25rem;              /* 36px 精密黄金留白 */
}

/* --------------------------------------------------------------------------
   四大文人馆藏出版色系 (Editorial Palettes)
   -------------------------------------------------------------------------- */

/* 色系 1：松烟墨韵 (默认) */
html[data-palette="pine"], :root {
  --bg-canvas: #faf8f5;
  --bg-surface: #f3efe8;
  --bg-surface-elevated: #ffffff;
  --bg-hover: #ede7dc;
  --text-primary: #1a1c1e;
  --text-secondary: #4a4d52;
  --text-muted: #82868e;
  --border-color: #e5dfd5;
  --border-subtle: #ede7dc;
  --accent: #2d4a3e;
  --accent-hover: #1f362c;
  --accent-light: #eaf1ed;
  --accent-border: #c2d6cc;
  --seal-red: #991b1b;
}

/* 色系 2：冷砚月白 (高端暗夜研读流) */
html[data-palette="moon"] {
  --bg-canvas: #0b0e14;
  --bg-surface: #121722;
  --bg-surface-elevated: #171d2b;
  --bg-hover: #1e2638;
  --bg-code: #06080c;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-code: #e2e8f0;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-light: rgba(56, 189, 248, 0.12);
  --accent-border: rgba(56, 189, 248, 0.28);
  --seal-red: #ef4444;
}

/* 色系 3：朱砂简牍 (古简丝绢暖陶) */
html[data-palette="cinnabar"] {
  --bg-canvas: #f5f1e8;
  --bg-surface: #ece5d8;
  --bg-surface-elevated: #ffffff;
  --bg-hover: #e2d9c8;
  --text-primary: #211c18;
  --text-secondary: #5c5249;
  --text-muted: #8c7f73;
  --border-color: #ded3c1;
  --border-subtle: #e6ddce;
  --accent: #991b1b;
  --accent-hover: #7f1d1d;
  --accent-light: #fee2e2;
  --accent-border: #fecaca;
  --seal-red: #b91c1c;
}

/* 色系 4：素履纯粹 (现代大都会出版黑白) */
html[data-palette="pure"] {
  --bg-canvas: #ffffff;
  --bg-surface: #f9fafb;
  --bg-surface-elevated: #ffffff;
  --bg-hover: #f3f4f6;
  --text-primary: #09090b;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-subtle: #f3f4f6;
  --accent: #09090b;
  --accent-hover: #27272a;
  --accent-light: #f4f4f5;
  --accent-border: #d4d4d8;
  --seal-red: #18181b;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.8;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   1. 刊头顶栏 (Masthead Header) - 54px 紧凑单行极简出版风
   ========================================================================== */
.site-masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s ease;
}

.masthead-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.masthead-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.brand-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--text-primary);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--text-primary);
}

.site-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.site-title-en {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* 单行主导航 */
.masthead-nav {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}

.masthead-nav ul.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.masthead-nav li a {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.masthead-nav li a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.masthead-nav li.current-menu-item > a,
.masthead-nav li.active > a {
  color: var(--text-primary);
  font-weight: 700;
  background: var(--bg-surface);
}

.masthead-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* 馆藏色系切换器 (Palette Swatches) */
.palette-picker-bar {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.18rem;
  border-radius: 5px;
}

.palette-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.2rem 0.45rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.12s ease;
}

.palette-btn:hover {
  color: var(--text-primary);
  background: var(--bg-canvas);
}

.palette-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-weight: 700;
}

.swatch-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.pip-pine { background: #2d4a3e; }
.pip-moon { background: #38bdf8; }
.pip-cinnabar { background: #991b1b; }
.pip-pure { background: #09090b; }

/* 快速检索框 */
.masthead-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field-input {
  width: 170px;
  padding: 0.35rem 1.8rem 0.35rem 0.65rem;
  font-size: 0.8rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  transition: all 0.15s ease;
}

.search-field-input:focus {
  width: 220px;
  border-color: var(--accent);
  background: var(--bg-canvas);
}

.search-field-btn {
  position: absolute;
  right: 0.45rem;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
}

/* ==========================================================================
   2. 主体网格分栏 (Asymmetrical Dual Track: 760px + 380px)
   ========================================================================== */
.yanxi-layout-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, var(--content-w)) var(--sidebar-w);
  gap: var(--gutter);
  align-items: start;
}

.opus-main-track {
  min-width: 0;
}

.margin-aside-track {
  width: var(--sidebar-w);
  flex-shrink: 0;
}

/* ==========================================================================
   3. 首页首屏：「专论发微」（Featured Opus / Editorial Essay）
   ========================================================================== */
.featured-opus-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem 2.25rem;
  margin-bottom: 2.25rem;
  position: relative;
  transition: border-color 0.18s ease;
}

.featured-opus-card:hover {
  border-color: var(--accent);
}

.opus-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opus-kicker-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
}

.opus-kicker-tag::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.opus-date-stamp {
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.opus-title {
  font-family: var(--font-title);
  font-size: 1.72rem;
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: -0.015em;
  margin: 0 0 0.85rem 0;
  color: var(--text-primary);
}

.opus-title a {
  color: inherit;
  transition: color 0.15s ease;
}

.opus-title a:hover {
  color: var(--accent);
}

.opus-epigraph {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0 0 1.25rem 0;
  border-left: 2px solid var(--border-color);
  padding-left: 0.85rem;
}

.opus-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.opus-author-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.seal-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--seal-red);
  color: var(--seal-red);
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0 0.25rem;
  border-radius: 2px;
  line-height: 1.3;
}

.opus-read-dispatch {
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.15s ease;
}

.featured-opus-card:hover .opus-read-dispatch {
  transform: translateX(3px);
}

/* ==========================================================================
   4. 首页行级：「文流编目」（Chronological Dispatch Stream）- 紧凑高密度
   ========================================================================== */
.stream-index-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.65rem;
  border-bottom: 1.5px solid var(--text-primary);
  margin-bottom: 1rem;
}

.stream-index-caption {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin: 0;
}

.stream-index-total {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.stream-item-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: baseline;
  gap: 1.15rem;
  padding: 0.88rem 0.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.12s ease;
}

.stream-item-row:hover {
  background-color: var(--bg-surface);
}

.stream-item-row:hover .row-heading a {
  color: var(--accent);
}

.stream-date-cell {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.stream-main-cell {
  min-width: 0;
}

.row-heading {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.42;
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
}

.row-heading a {
  color: inherit;
  transition: color 0.12s ease;
}

.row-sub-abstract {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stream-aside-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 馆藏级多维低饱和分类胶囊 (Harmonic Capsules) */
.category-capsule {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
  border: 1px solid transparent;
}

.cap-blue { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.cap-red { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.cap-green { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.cap-amber { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* 暗夜模式色阶自适应 */
html[data-palette="moon"] .cap-blue { background: rgba(30, 64, 175, 0.22); color: #93c5fd; border-color: rgba(147, 197, 253, 0.3); }
html[data-palette="moon"] .cap-red { background: rgba(153, 27, 27, 0.22); color: #fca5a5; border-color: rgba(252, 165, 165, 0.3); }
html[data-palette="moon"] .cap-green { background: rgba(6, 95, 70, 0.22); color: #6ee7b7; border-color: rgba(110, 231, 183, 0.3); }
html[data-palette="moon"] .cap-amber { background: rgba(146, 64, 14, 0.22); color: #fcd34d; border-color: rgba(252, 211, 77, 0.3); }

/* 分页条 */
.yanxi-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.yanxi-pagination-bar a,
.yanxi-pagination-bar span {
  padding: 0.38rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
}

.yanxi-pagination-bar .current {
  background: var(--text-primary);
  color: var(--bg-canvas);
  border-color: var(--text-primary);
}

/* ==========================================================================
   5. 侧栏「藏斋侧录」（Scholarly Aside & Widgets）
   ========================================================================== */
.scholarly-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.5rem;
}

.scholarly-box-caption {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-color);
}

.manifesto-prose {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0 0 1rem 0;
}

.tally-matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  background: var(--bg-surface);
  padding: 0.75rem;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

.tally-cell { text-align: center; }
.tally-num {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.tally-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* 专栏文脉列表 */
.chronicle-series-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chronicle-series-item {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.88rem;
}
.chronicle-series-item:last-child { border-bottom: none; }

.series-num-mark {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
}

.chronicle-series-item a {
  color: var(--text-primary);
  font-weight: 600;
  transition: color 0.12s ease;
}
.chronicle-series-item a:hover {
  color: var(--accent);
}

/* 分类星图 */
.taxonomy-grid-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.taxonomy-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.12s ease;
}

.taxonomy-pill-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: var(--bg-canvas);
}

.taxonomy-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   6. 文章详情页：「沉浸式深读」（Immersive Reading Mode）
   ========================================================================== */
.breadcrumbs-trail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}

.breadcrumbs-trail a { color: var(--text-secondary); }
.breadcrumbs-trail a:hover { color: var(--text-primary); }

.reading-article-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
}

.reading-article-title {
  font-family: var(--font-title);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.018em;
  color: var(--text-primary);
  margin: 0.75rem 0 1rem 0;
}

.reading-meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.reading-meta-strip .author-name {
  color: var(--text-primary);
  font-weight: 600;
}

/* 正文字阶与下沉首字 */
.reading-content-body {
  font-size: 16px;
  line-height: 1.84;
  color: var(--text-secondary);
}

.reading-content-body p {
  margin-top: 0;
  margin-bottom: 1.5em;
  color: var(--text-secondary);
}

.reading-content-body.has-drop-cap > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 3.5em;
  line-height: 0.85;
  font-weight: 900;
  margin-right: 0.15em;
  margin-bottom: -0.05em;
  color: var(--text-primary);
}

.reading-content-body h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-color);
}

.reading-content-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.85rem;
  margin-bottom: 0.65rem;
}

.reading-content-body blockquote {
  margin: 1.85rem 0;
  padding: 0.95rem 1.35rem;
  background: var(--bg-surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-primary);
}

.reading-content-body pre {
  margin: 1.85rem 0;
  padding: 1.25rem;
  background: var(--bg-code);
  color: var(--text-code);
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.62;
}

.reading-content-body code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.15em 0.35em;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
}

.reading-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.85rem 0;
  font-size: 0.88rem;
}

.reading-content-body th,
.reading-content-body td {
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.reading-content-body th {
  background: var(--bg-surface);
  font-weight: 700;
  color: var(--text-primary);
}

/* 粘性章节大纲与游标 (Sticky Hairline TOC Tracker) */
.yanxi-sticky-toc {
  position: sticky;
  top: 76px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.35rem;
}

.toc-header-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.toc-heading-caption {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.toc-progress-pct {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.toc-nav-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  max-height: 58vh;
  overflow-y: auto;
}

.toc-nav-tree li { position: relative; }
.toc-nav-tree li a {
  display: block;
  font-size: 0.825rem;
  color: var(--text-secondary);
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  line-height: 1.42;
  transition: all 0.12s ease;
}

.toc-nav-tree li a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.toc-nav-tree li.active a {
  color: var(--text-primary);
  font-weight: 700;
  background: var(--bg-surface);
}

.toc-nav-tree li.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
}

.toc-footer-tools {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.toc-utility-btn {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.12s ease;
}

.toc-utility-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

/* ==========================================================================
   7. 底栏 (Minimalist Colophon)
   ========================================================================== */
.site-colophon {
  border-top: 1px solid var(--border-color);
  background: var(--bg-canvas);
  padding: 2.75rem 1.5rem;
  margin-top: 4.5rem;
}

.colophon-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.colophon-creds {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   8. 响应式布局 (Responsive)
   ========================================================================== */
@media (max-width: 1024px) {
  .yanxi-layout-wrap {
    grid-template-columns: 1fr;
  }
  .margin-aside-track {
    width: 100%;
  }
  .yanxi-sticky-toc {
    position: static;
  }
}

@media (max-width: 768px) {
  .masthead-nav { display: none; }
  .palette-picker-bar { display: none; }
  .search-field-input { width: 130px; }
  .stream-item-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .stream-date-cell { font-size: 0.75rem; }
  .stream-aside-cell { display: none; }
  .opus-title { font-size: 1.4rem; }
  .reading-article-title { font-size: 1.65rem; }
}
