/* ============================================================
   林骥 · linji.tech
   浅色 · 理性克制 —— 纸张、墨色、赭红
   ============================================================ */

:root {
  --paper: #f7f5ef;
  --paper-2: #fffdf8;
  --ink: #1b1e21;
  --ink-2: #3d4248;
  --muted: #797e84;
  --line: #e2ddd0;
  --line-strong: #cfc8b8;
  --accent: #a4412b;
  --accent-ink: #8a3423;
  --accent-soft: rgba(164, 65, 43, 0.08);
  --teal: #2d5d57;
  --gold: #b0894a;

  --serif:
    "Songti SC", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "STSong", "SimSun",
    Georgia, "Times New Roman", serif;
  --sans:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1120px;
  --radius: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* 极淡的坐标纸纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(27, 30, 33, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 30, 33, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.55;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

::selection {
  background: rgba(164, 65, 43, 0.16);
}

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

img,
svg {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 99;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ------------------------------ 页头 ------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 239, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -18px rgba(27, 30, 33, 0.5);
  background: rgba(247, 245, 239, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  position: relative;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 13px;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--ink);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: rgba(247, 245, 239, 0.98);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }

  .nav a::after {
    left: 0;
    right: auto;
    width: 22px;
    bottom: 8px;
  }
}

/* ------------------------------ 排版基元 ------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(26px, 3.6vw, 38px);
}

h3 {
  font-size: clamp(18px, 2vw, 21px);
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 36em;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13.5px;
  line-height: 1.85;
}

.mono {
  font-family: var(--mono);
}

.accent {
  color: var(--accent);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  font-size: 14px;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn .arrow {
  transition: transform 0.25s ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--accent);
  border-bottom: 1px solid rgba(164, 65, 43, 0.28);
  padding-bottom: 2px;
  transition:
    border-color 0.2s ease,
    gap 0.2s ease;
}

.text-link:hover {
  border-bottom-color: var(--accent);
  gap: 11px;
}

/* ------------------------------ 首屏 ------------------------------ */

.hero {
  padding: clamp(56px, 8vw, 108px) 0 clamp(48px, 7vw, 88px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(58px, 11vw, 116px);
  line-height: 0.98;
  letter-spacing: 0.04em;
  margin: 0 0 26px;
}

.hero h1 .dot {
  color: var(--accent);
}

.hero-mark {
  display: flex;
  justify-content: flex-end;
}

.hero-mark svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  overflow: visible;
}

.mark-dot {
  fill: var(--accent);
  opacity: 0.85;
}

.mark-line {
  stroke: var(--line-strong);
  stroke-width: 1;
  fill: none;
}

.mark-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  fill: var(--muted);
}

/* 数据条 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* 三格版：按实际条目数等分，避免末尾留出空格 */
.stats.stats-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  padding: 26px 22px 24px 0;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat-num {
  font-family: var(--mono);
  font-size: clamp(22px, 2.8vw, 30px);
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.2;
  display: block;
}

.stat-num .unit {
  font-size: 0.62em;
  color: var(--accent);
  margin-left: 2px;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-mark {
    justify-content: flex-start;
    order: -1;
    opacity: 0.9;
  }

  .hero-mark svg {
    max-width: 220px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    border-bottom: 1px solid var(--line);
    padding-right: 16px;
  }

  .stat:nth-child(2n) {
    border-right: 0;
    padding-left: 18px;
  }

  .stat:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  /* 三格版在窄屏仍是两列，第三格独占末行 */
  .stats.stats-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-3 .stat:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .stats-3 .stat:nth-child(3) {
    border-right: 0;
  }
}

/* ------------------------------ 区块 ------------------------------ */

.section {
  padding: clamp(60px, 8vw, 108px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: clamp(32px, 4.5vw, 56px);
  max-width: 40em;
}

.section-head h2 {
  margin-bottom: 14px;
}

.section-head p {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.sticky-col {
  position: sticky;
  top: 100px;
}

@media (max-width: 860px) {
  .sticky-col {
    position: static;
  }
}

/* 引文 */
.quote {
  margin: 0;
  padding: 30px 34px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
}

.quote p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.75vw, 20px);
  line-height: 1.95;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* 卡片 */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 32px);
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

a.card:hover,
.card.is-hover:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -32px rgba(27, 30, 33, 0.55);
}

.card-title {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}

.card p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* 编号小标 */
.num-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* 公式带 */
.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 26px);
  padding: clamp(28px, 4vw, 46px) 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: clamp(17px, 3vw, 30px);
  letter-spacing: 0.06em;
  text-align: center;
}

.formula .op {
  color: var(--muted);
  font-size: 0.8em;
}

.formula .g-term {
  color: var(--ink);
}

.formula .g-term em {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 6px;
}

/* ------------------------------ 时间线 ------------------------------ */

.tl {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tl li {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  column-gap: 34px;
  padding-bottom: 40px;
}

.tl li:last-child {
  padding-bottom: 0;
}

.tl li::before {
  content: "";
  position: absolute;
  left: 101px;
  top: 12px;
  bottom: 2px;
  width: 1px;
  background: var(--line-strong);
}

.tl li:last-child::before {
  display: none;
}

.tl li::after {
  content: "";
  position: absolute;
  left: 97px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
}

.tl-year {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding-top: 2px;
}

.tl-body h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.tl-body p {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0;
}

@media (max-width: 560px) {
  .tl li {
    grid-template-columns: 1fr;
    row-gap: 6px;
    padding-left: 22px;
  }

  .tl li::before {
    left: 4px;
  }

  .tl li::after {
    left: 0;
  }

  .tl-year {
    padding-top: 0;
  }
}

/* ------------------------------ 著作 ------------------------------ */

.book-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 820px) {
  .book-wrap {
    grid-template-columns: 1fr;
  }
}

.book-figure {
  margin: 0;
  width: min(330px, 100%);
  justify-self: center;
  /* 供 multiply 混合的底色，等于页面纸色 */
  background: var(--paper);
}

.book-figure img {
  display: block;
  width: 100%;
  height: auto;
  /* 封面图自带纯白背景，用正片叠底融进纸色页面 */
  mix-blend-mode: multiply;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.book-figure:hover img {
  transform: translateY(-5px);
}

/* 信息表 */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec th,
.spec td {
  text-align: left;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.spec th {
  width: 96px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 12.5px;
  white-space: nowrap;
}

.spec td {
  color: var(--ink);
}

/* ------------------------------ 文章列表 ------------------------------ */

.posts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.posts li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition:
    padding-left 0.25s ease,
    background 0.25s ease;
}

.posts li:hover {
  padding-left: 8px;
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
}

/* 整行可点：外层用 display:contents 让 a 的子孙直接参与 li 的网格，
   不改变行距与对齐，只在 hover 时改变标题颜色 */
.posts .post-row {
  display: contents;
  color: inherit;
}

.posts a.post-row {
  cursor: pointer;
}

.posts a.post-row .ttl {
  transition: color 0.25s ease;
}

.posts a.post-row:hover .ttl {
  color: var(--accent);
}

.posts a.post-row:focus-visible .ttl {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.posts .idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.posts .ttl {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.posts .ttl span {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.posts .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid rgba(164, 65, 43, 0.3);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .posts li {
    grid-template-columns: 34px minmax(0, 1fr);
    row-gap: 6px;
  }

  .posts .tag {
    grid-column: 2;
    justify-self: start;
  }
}

/* ------------------------------ 思维体系 ------------------------------ */

.group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: clamp(22px, 2.6vw, 30px);
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.group:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -32px rgba(27, 30, 33, 0.5);
}

.group-code {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.24em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 14px;
}

.group-cn {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}

.group-desc {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.group-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.group-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
}

.group-list .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 4px;
}

.group-list b {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.04em;
}

.group-list .en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.group-list p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 3px 0 0;
}

/* 价值阶梯 */
.ladder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin-top: 8px;
}

.ladder-step {
  text-align: center;
}

.ladder-bar {
  background: linear-gradient(180deg, rgba(164, 65, 43, 0.16), rgba(164, 65, 43, 0.06));
  border: 1px solid rgba(164, 65, 43, 0.22);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  margin-bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.ladder-step:nth-child(1) .ladder-bar {
  height: 84px;
  opacity: 0.55;
}

.ladder-step:nth-child(2) .ladder-bar {
  height: 118px;
  opacity: 0.7;
}

.ladder-step:nth-child(3) .ladder-bar {
  height: 152px;
  opacity: 0.85;
}

.ladder-step:nth-child(4) .ladder-bar {
  height: 186px;
}

.ladder-step small {
  display: block;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

@media (max-width: 700px) {
  .ladder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }
}

/* ------------------------------ 联系 ------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* 只剩一格时收窄，避免拉成一条空荡荡的横带 */
.contact-grid-single {
  width: min(300px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

.contact-cell {
  background: var(--paper-2);
  padding: 22px 24px;
}

.contact-cell dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.contact-cell dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.04em;
}

/* ------------------------------ 页脚 ------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 48px;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}

.footer-note {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 2;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--accent);
}

/* ------------------------------ 动效 ------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .book {
    transform: none;
  }

  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------ 补充：思维条目 ------------------------------ */

section[id] {
  scroll-margin-top: 88px;
}

.stack {
  display: grid;
  gap: 18px;
}

.think-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.think-head .num-tag {
  margin-bottom: 0;
}

.think-head .card-title {
  margin: 0;
}

.think-en {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------ 补充：书目列表 ------------------------------ */

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: part;
}

.toc li {
  counter-increment: part;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.toc li::before {
  content: counter(part, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 5px;
}

.toc b {
  display: block;
  font-family: var(--serif);
  font-size: 16.5px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.toc span {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ------------------------------ 补充：页面小标题 ------------------------------ */

.page-head {
  padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 48px);
}

.page-head h1 {
  font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.16;
  margin-bottom: 22px;
}

.note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
  border-left: 1px solid var(--line-strong);
  padding-left: 16px;
  margin: 0;
}

/* ------------------------------ 补充：主题格（固定 4 列，避免末行留空） ------------------------------ */

.topics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0;
}

.topics .contact-cell {
  padding: 20px 22px;
}

@media (max-width: 820px) {
  .topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
