/* ============================================
   万物藏 · 固态电池技术
   视觉方向：技术出版物 / 学术智库
   特点：纸感底、衬线标题、数据友好、长文阅读优化
   ============================================ */

:root {
  /* 纸面与墨色 */
  --paper:        #FBFAF7;
  --paper-raised: #FFFFFF;
  --paper-sunken: #F4F2EC;
  --ink:          #1A1A1A;
  --ink-soft:     #3D3D3D;
  --ink-muted:    #6B6B6B;
  --ink-faint:    #9A9A94;

  /* 品牌色：深青（能源/科技），点缀琥珀（数据/警示） */
  --brand:        #0E4F5C;
  --brand-deep:   #093A44;
  --brand-light:  #E6F0F2;
  --accent:       #C77D1E;
  --accent-light: #FBF2E3;

  /* 语义色 */
  --rule:         #E2DFD7;
  --rule-strong:  #CFCAC0;
  --ok:           #2F7A4F;
  --warn:         #B5731A;
  --bad:          #A63A2E;

  /* 字体：标题走衬线（学术权威），正文走无衬线（屏幕可读） */
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC',
                'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

  /* 尺度 */
  --wrap: 1140px;
  --measure: 700px;   /* 正文最佳阅读行宽 ≈ 38 个汉字 */
  --radius: 3px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* ================= 顶部导航 ================= */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  display: inline-block;
  width: 26px; height: 26px;
  border: 1.5px solid var(--brand);
  border-radius: 2px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
  line-height: 23px;
  text-align: center;
  flex-shrink: 0;
}
.brand-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-left: 10px;
  border-left: 1px solid var(--rule);
  align-self: center;
}

.nav-main { display: flex; gap: 28px; margin-left: auto; }
.nav-main a {
  font-size: 14.5px;
  color: var(--ink-muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-main a:hover { color: var(--ink); text-decoration: none; }
.nav-main a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }

.nav-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-size: 13px;
  color: var(--ink-faint);
  transition: border-color .15s;
}
.nav-search:hover { border-color: var(--rule-strong); }
.nav-search input {
  border: none; outline: none; background: none;
  width: 130px; font-size: 13px; color: var(--ink);
}
.nav-search input::placeholder { color: var(--ink-faint); }

/* ================= 首页首屏 ================= */
.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--rule);
}
.hero-kicker {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1.28;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  max-width: 840px;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
  border-bottom: 3px solid var(--brand-light);
}
.hero-lede {
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--ink-muted);
  max-width: 660px;
}
.hero-stats {
  display: flex;
  gap: 56px;
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}
.hero-stat-n {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.hero-stat-n small { font-size: 15px; font-weight: 500; color: var(--ink-faint); margin-left: 2px; }
.hero-stat-l {
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ================= 区块标题 ================= */
.section { padding: 68px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 20px;
  background: var(--brand);
  margin-right: 12px;
  vertical-align: -3px;
}
.section-more { font-size: 13.5px; color: var(--ink-muted); white-space: nowrap; }

/* ================= 文章列表 ================= */
.article-list { display: flex; flex-direction: column; }
.article-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  transition: background .15s;
}
.article-row:first-child { border-top: 1px solid var(--rule); }
.article-row:hover { background: rgba(14,79,92,0.025); }

.article-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  padding-top: 5px;
}
.article-date strong { display: block; font-size: 20px; font-weight: 500; color: var(--ink-muted); }

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.article-body h3 a { color: inherit; }
.article-body h3 a:hover { color: var(--brand); text-decoration: none; }
.article-desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--ink-faint);
  flex-wrap: wrap;
}
.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 2px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  background: var(--brand-light);
  color: var(--brand);
}
.chip-accent { background: var(--accent-light); color: var(--accent); }
.chip-plain { background: var(--paper-sunken); color: var(--ink-muted); }

/* ================= 分类卡片 ================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.cat-card {
  background: var(--paper-raised);
  padding: 24px 22px;
  transition: background .15s;
  display: block;
}
.cat-card:hover { background: var(--brand-light); text-decoration: none; }
.cat-card-k {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.cat-card-t {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.cat-card-d { font-size: 12.5px; color: var(--ink-faint); line-height: 1.6; }

/* ================= 文章页 ================= */
.article-head { padding: 56px 0 36px; border-bottom: 1px solid var(--rule); }
.article-head .chip { margin-bottom: 18px; }
.article-head h1 {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.36;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  max-width: 860px;
  margin-bottom: 20px;
}
.article-head-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--ink-faint);
  flex-wrap: wrap;
}
.article-head-meta .dot { color: var(--rule-strong); }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  padding: 48px 0 80px;
  align-items: start;
}

/* 正文排版 */
.prose { max-width: var(--measure); font-size: 16.5px; line-height: 1.9; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2.2em;
  padding-top: 0.2em;
  letter-spacing: 0.02em;
  scroll-margin-top: 88px;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 19.5px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1.9em;
  scroll-margin-top: 88px;
}
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose p { margin-top: 1.1em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin-top: 0.5em; }
.prose li::marker { color: var(--brand); }

.prose blockquote {
  border-left: 3px solid var(--brand);
  background: var(--brand-light);
  padding: 16px 22px;
  color: var(--ink-soft);
  font-size: 15.5px;
  margin-top: 1.4em;
}
.prose blockquote p:first-child { margin-top: 0; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-sunken);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--brand-deep);
}
.prose pre {
  background: #0F1E22;
  color: #D6E4E7;
  padding: 20px 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  margin-top: 1.4em;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin-top: 1.5em;
  background: var(--paper-raised);
}
.prose th {
  text-align: left;
  padding: 11px 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.prose td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}
.prose tr:nth-child(even) td { background: var(--paper-sunken); }
.prose td strong { color: var(--ink); }

.prose hr { border: none; border-top: 1px solid var(--rule); margin: 2.4em 0; }

/* 公式块 */
.formula {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  text-align: center;
  overflow-x: auto;
  margin-top: 1.5em;
}

/* 数据标注 / 编者注 */
.callout {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  font-size: 14.5px;
  color: #6B4A12;
  margin-top: 1.5em;
}
.callout-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* 侧边目录 */
.article-aside { position: sticky; top: 92px; }
.toc-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 14px;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 2px; }
.toc-list a {
  display: block;
  padding: 6px 0 6px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  border-left: 2px solid transparent;
  transition: all .15s;
}
.toc-list a:hover { color: var(--brand); border-left-color: var(--rule-strong); text-decoration: none; }
.toc-list a.on { color: var(--brand); border-left-color: var(--brand); font-weight: 500; }
.toc-list .lv3 a { padding-left: 24px; font-size: 12.5px; color: var(--ink-faint); }

/* 文章尾部 */
.article-foot {
  margin-top: 3em;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--ink-faint);
  line-height: 1.8;
}

/* 相关文章 */
.related { margin-top: 56px; }
.related-t {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}
.related-item {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  color: var(--ink-soft);
}
.related-item:hover { color: var(--brand); text-decoration: none; }

/* ================= 术语库 ================= */
.glossary-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.gl-filter {
  padding: 7px 16px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--paper-raised);
  transition: all .15s;
}
.gl-filter:hover { border-color: var(--rule-strong); color: var(--ink); }
.gl-filter.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.gl-list { display: flex; flex-direction: column; }
.gl-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.gl-term {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.gl-term-en {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 5px;
  letter-spacing: 0.02em;
}
.gl-def { font-size: 14.5px; line-height: 1.75; color: var(--ink-muted); }
.gl-def strong { color: var(--ink-soft); }
.gl-unit {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 7px;
  background: var(--paper-sunken);
  color: var(--ink-muted);
  border-radius: 2px;
  margin-left: 6px;
}

/* ================= 关于页 ================= */
.about-grid { display: grid; grid-template-columns: 1fr 300px; gap: 64px; padding: 56px 0 80px; }
.about-side {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  padding: 26px;
  height: fit-content;
}
.about-side h4 {
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 16px; font-weight: 600;
}
.about-side dl { font-size: 13.5px; }
.about-side dt { color: var(--ink-faint); font-size: 12px; margin-top: 14px; }
.about-side dd { color: var(--ink); font-weight: 500; margin-top: 2px; }

/* ================= 页脚 ================= */
.foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-sunken);
  padding: 44px 0 36px;
  margin-top: 20px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.foot-desc { font-size: 13px; color: var(--ink-faint); line-height: 1.8; margin-top: 12px; max-width: 340px; }
.foot-col h5 {
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 14px; font-weight: 600;
}
.foot-col a { display: block; font-size: 13px; color: var(--ink-faint); padding: 5px 0; }
.foot-col a:hover { color: var(--brand); }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 24px;
  padding-top: 22px; font-size: 12px; color: var(--ink-faint);
  flex-wrap: wrap;
}

/* ================= 空状态 / 分页 ================= */
.empty { padding: 64px 0; text-align: center; color: var(--ink-faint); font-size: 14px; }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pager a, .pager span {
  min-width: 34px; padding: 7px 11px; text-align: center;
  border: 1px solid var(--rule); border-radius: 2px;
  font-size: 13px; color: var(--ink-muted); background: var(--paper-raised);
}
.pager .cur { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ================= 响应式 ================= */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-aside { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 31px; }
  .hero-lede { font-size: 16px; }
  .hero-stats { gap: 28px; flex-wrap: wrap; margin-top: 32px; }
  .hero-stat-n { font-size: 24px; }
  .masthead-inner { height: 60px; gap: 16px; }
  .brand-sub, .nav-search { display: none; }
  .nav-main { gap: 18px; }
  .nav-main a { font-size: 13.5px; }
  .section { padding: 44px 0; }
  .section-title { font-size: 21px; }
  .article-row { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .article-date { display: none; }
  .article-body h3 { font-size: 17.5px; }
  .article-head { padding: 36px 0 26px; }
  .article-head h1 { font-size: 26px; }
  .article-layout { padding: 28px 0 52px; }
  .prose { font-size: 16px; line-height: 1.85; }
  .prose h2 { font-size: 21px; }
  .prose h3 { font-size: 17.5px; }
  .prose table { font-size: 13px; }
  .prose th, .prose td { padding: 8px 9px; }
  .cat-grid { grid-template-columns: 1fr; }
  .gl-item { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .foot-bottom { flex-direction: column; gap: 8px; }
}

/* 打印优化（技术文档常被打印） */
@media print {
  .masthead, .article-aside, .foot, .related, .pager { display: none; }
  .article-layout { grid-template-columns: 1fr; padding: 0; }
  body { background: #fff; font-size: 11pt; }
  .prose { max-width: none; }
}
