/* =================================================================
   STYLE · 二元悖论的张力
   ─────────────────────────────────────────────────────────────────
   美学方向：editorial / philosophical manuscript × precise data viz
   深墨色 + 暖白 + 黄铜调强调 + 钢蓝（左极）与红铜（右极）的对峙
   ================================================================= */

:root {
  /* — Foundation — */
  --ink-deepest:    #0B1014;       /* 最深墨 */
  --ink-deep:       #131820;       /* 深墨 */
  --ink-mid:        #1B2129;       /* 中墨 */
  --ink-light:      #252A33;       /* 浅墨 */
  --rule-line:      #2D343E;       /* 分割线 */
  --rule-strong:    #3F4754;       /* 强分割 */

  /* — Text — */
  --paper:          #E8E1D3;       /* 主文字（暖白，仿羊皮） */
  --paper-bright:   #F5EFE3;       /* 强调文字 */
  --paper-mute:     #8E8775;       /* 弱化文字 */
  --paper-dim:      #5A5648;       /* 极弱化 */

  /* — Accents — */
  --accent-gold:    #C9A961;       /* 黄铜·古金 */
  --accent-gold-dim:#7A6638;
  --accent-warm:    #D4994A;       /* 暖琥珀 */

  /* — Tension Poles — */
  --pole-left:      #7BA4C9;       /* 钢蓝（理性/分析/秩序极） */
  --pole-left-dim:  #4A6A85;
  --pole-right:     #C77858;       /* 红铜（具体/感性/流变极） */
  --pole-right-dim: #8A4F38;

  /* — Branch tints — */
  --branch-ont:     #C9A961;       /* 本体论 = 古金 */
  --branch-epi:     #9FB5C4;       /* 认识论 = 月白 */
  --branch-met:     #B88563;       /* 方法论 = 赭石 */

  /* — Typography — */
  --font-cn:        "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "FangSong", serif;
  --font-en:        "Cormorant Garamond", "EB Garamond", "Garamond", Georgia, serif;
  --font-en-body:   "EB Garamond", "Garamond", Georgia, serif;
  --font-mono:      "JetBrains Mono", "IBM Plex Mono", "SF Mono", Consolas, monospace;

  /* — Spacing — */
  --max-width: 1320px;
  --gutter: clamp(1.5rem, 4vw, 3.5rem);

  /* — Motion — */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* =================================================================
   Reset & Foundation
   ================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-cn);
  color: var(--paper);
  background: var(--ink-deepest);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* 罗马字体 fallback 时让英文有 Cormorant 韵味 */
em, i {
  font-family: var(--font-en);
  font-style: italic;
  font-weight: 500;
  color: var(--accent-gold);
}

/* 噪点纹理 */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* 全局背景径向渐变（很微妙） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201, 169, 97, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(123, 164, 201, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

main, header, section, nav, footer, aside { position: relative; z-index: 2; }

/* =================================================================
   Masthead · 报头
   ================================================================= */
.masthead {
  padding: clamp(3rem, 8vh, 7rem) var(--gutter) clamp(2.5rem, 6vh, 5rem);
  border-bottom: 1px solid var(--rule-line);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.masthead::before, .masthead::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold-dim) 50%, transparent 100%);
  opacity: 0.5;
}
.masthead::before { top: 1rem; }
.masthead::after { bottom: 0; opacity: 0.3; }

.masthead-inner { max-width: 980px; margin: 0 auto; }

.masthead-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 2.5rem;
}
.meta-separator { color: var(--accent-gold); }

.masthead-title {
  text-align: center;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 2rem;
}
.title-cn {
  display: block;
  font-family: var(--font-cn);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--paper-bright);
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(201, 169, 97, 0.1);
}
.title-en {
  display: block;
  font-family: var(--font-en);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.masthead-subtitle {
  text-align: center;
  margin-bottom: 3rem;
}
.sub-cn {
  display: block;
  font-size: 1.05rem;
  color: var(--paper);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.sub-en {
  display: block;
  font-family: var(--font-en);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--paper-mute);
}

.masthead-thesis {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.8rem 2rem;
  border-left: 2px solid var(--accent-gold);
  border-right: 1px solid var(--rule-line);
  background: linear-gradient(90deg, rgba(201, 169, 97, 0.04) 0%, transparent 100%);
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--paper);
}

/* =================================================================
   Branch Nav · 分支选择器
   ================================================================= */
.branch-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--gutter) 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.branch-btn {
  appearance: none;
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  color: var(--paper);
  padding: 1.8rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-cn);
  text-align: left;
  position: relative;
  transition: all 0.5s var(--ease-out);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.3rem 1.2rem;
  overflow: hidden;
}

.branch-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}

.branch-btn:hover { border-color: var(--accent-gold-dim); }
.branch-btn:hover::before { opacity: 1; }

.branch-btn.is-active {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, var(--ink-mid) 0%, var(--ink-deep) 100%);
}
.branch-btn.is-active::before { opacity: 1; }
.branch-btn.is-active .branch-num { color: var(--accent-gold); }

.branch-num {
  grid-row: 1 / 3;
  font-family: var(--font-cn);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--paper-dim);
  line-height: 1;
  transition: color 0.5s var(--ease-out);
  align-self: center;
}

.branch-cn {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--paper-bright);
}

.branch-en {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-en);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.branch-desc {
  grid-column: 1 / 3;
  grid-row: 3;
  font-size: 0.85rem;
  color: var(--paper-mute);
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule-line);
}

/* =================================================================
   Mother Paradox · 母悖论
   ================================================================= */
.mother-paradox {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding: 3rem var(--gutter);
  position: relative;
}

.mother-paradox::before {
  content: "";
  position: absolute;
  inset: 1rem var(--gutter);
  border: 1px solid var(--rule-line);
  border-top-color: var(--accent-gold-dim);
  pointer-events: none;
}

.mp-inner { position: relative; padding: 2rem 0; }

.mp-label {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  font-family: var(--font-cn);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.6em;
  color: var(--accent-gold);
}
.mp-label-decoration {
  color: var(--accent-gold);
  font-size: 0.7em;
}
.mp-label-text { padding: 0 1em; }

.mp-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.mp-pole {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem 1.8rem;
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  border-radius: 1px;
  position: relative;
  transition: all 0.6s var(--ease-out);
}

.mp-pole-left {
  border-left: 3px solid var(--pole-left);
  padding-left: 1.8rem;
}
.mp-pole-right {
  flex-direction: row-reverse;
  border-right: 3px solid var(--pole-right);
  padding-right: 1.8rem;
}

.mp-pole-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.mp-pole-left .mp-pole-marker {
  background: var(--pole-left);
  box-shadow: 0 0 20px var(--pole-left), 0 0 8px var(--pole-left);
}
.mp-pole-right .mp-pole-marker {
  background: var(--pole-right);
  box-shadow: 0 0 20px var(--pole-right), 0 0 8px var(--pole-right);
}

.mp-pole-text {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--paper-bright);
  line-height: 1.45;
}
.mp-pole-left .mp-pole-text { text-align: left; }
.mp-pole-right .mp-pole-text { text-align: right; }

.mp-tension-line {
  width: 200px;
  height: 40px;
}
.mp-tension-line svg {
  width: 100%;
  height: 100%;
}

.mp-gloss {
  max-width: 900px;
  margin: 3rem auto 1rem;
  text-align: center;
  font-family: var(--font-cn);
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--paper-mute);
  padding: 0 2rem;
  font-style: normal;
}

/* =================================================================
   View Controls · 视图切换
   ================================================================= */
.view-controls {
  max-width: var(--max-width);
  margin: 2rem auto 1rem;
  padding: 1.5rem var(--gutter) 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px dashed var(--rule-line);
  padding-top: 2rem;
}

.view-controls-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-right: 0.5rem;
}

.view-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule-line);
  color: var(--paper-mute);
  padding: 0.6rem 1.3rem;
  font-family: var(--font-cn);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.view-btn:hover {
  border-color: var(--paper-mute);
  color: var(--paper);
}

.view-btn.is-active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(201, 169, 97, 0.06);
}

.view-icon {
  font-family: var(--font-mono);
  color: var(--accent-gold-dim);
}
.view-btn.is-active .view-icon { color: var(--accent-gold); }

/* =================================================================
   Stage / Views · 主舞台
   ================================================================= */
.stage {
  max-width: var(--max-width);
  margin: 2rem auto 4rem;
  padding: 0 var(--gutter);
  position: relative;
  min-height: 600px;
}

.view {
  display: none;
  animation: viewFadeIn 0.6s var(--ease-out) both;
}
.view.is-active { display: block; }

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =================================================================
   Timeline View · 时间轴
   ================================================================= */
.view-timeline { padding-left: 4rem; position: relative; }

.timeline-spine {
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
}

.spine-line {
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--accent-gold-dim) 8%,
    var(--accent-gold-dim) 92%,
    transparent 100%
  );
}

.stage-block {
  position: relative;
  margin-bottom: 4rem;
  animation: stageBlockIn 0.7s var(--ease-out) both;
}
.stage-block:nth-child(1) { animation-delay: 0.05s; }
.stage-block:nth-child(2) { animation-delay: 0.12s; }
.stage-block:nth-child(3) { animation-delay: 0.19s; }
.stage-block:nth-child(4) { animation-delay: 0.26s; }
.stage-block:nth-child(5) { animation-delay: 0.33s; }
.stage-block:nth-child(6) { animation-delay: 0.40s; }
.stage-block:nth-child(7) { animation-delay: 0.47s; }

@keyframes stageBlockIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.stage-marker {
  position: absolute;
  left: -3rem;
  top: 0.4rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-deepest);
  border: 2px solid var(--accent-gold);
  z-index: 2;
}
.stage-marker::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent-gold);
  opacity: 0.4;
}

.stage-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-line);
}

.stage-name {
  font-family: var(--font-cn);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--paper-bright);
}

.stage-era {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

/* —— 张力节点 (Tension Node) —— */
.tension-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tension-node {
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  padding: 1.5rem 1.8rem;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.tension-node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--pole-left) 0%, var(--accent-gold) 50%, var(--pole-right) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.tension-node:hover {
  border-color: var(--accent-gold-dim);
  background: var(--ink-mid);
  transform: translateX(4px);
}
.tension-node:hover::before { opacity: 1; }
.tension-node:hover .tn-tension-bar { opacity: 1; }

.tn-id {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--paper-dim);
  letter-spacing: 0.15em;
}

.tn-title {
  font-family: var(--font-cn);
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--paper-bright);
  margin-bottom: 1.2rem;
  padding-right: 4rem;
}

.tn-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 0.8rem;
}

.tn-pole {
  padding: 0.9rem 1rem;
  background: var(--ink-deepest);
  border: 1px solid var(--rule-line);
  font-size: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: all 0.4s var(--ease-out);
}
.tn-pole-left  {
  border-left: 2px solid var(--pole-left);
  text-align: left;
}
.tn-pole-right {
  border-right: 2px solid var(--pole-right);
  text-align: right;
}

.tn-pole-who {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--paper);
  font-weight: 500;
}
.tn-pole-left .tn-pole-who { color: var(--pole-left); }
.tn-pole-right .tn-pole-who { color: var(--pole-right); }

.tn-pole-pole {
  font-family: var(--font-cn);
  font-size: 0.95rem;
  color: var(--paper);
  line-height: 1.5;
}

.tn-tension-bar {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0.7;
  transition: opacity 0.4s var(--ease-out);
}
.tn-tension-bar svg { width: 100%; height: 30px; }

.tn-body-preview {
  font-family: var(--font-cn);
  font-size: 0.88rem;
  color: var(--paper-mute);
  line-height: 1.65;
  margin-top: 0.8rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--rule-line);
}

.tn-recurs-hint {
  position: absolute;
  bottom: 0.8rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-gold-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* =================================================================
   Spiral View · 螺旋复现
   ================================================================= */
.view-spiral { padding: 2rem 0; }

.spiral-intro {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.spiral-title {
  font-family: var(--font-cn);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--paper-bright);
  margin-bottom: 1.5rem;
}

.spiral-blurb {
  font-size: 0.95rem;
  line-height: 1.95;
  color: var(--paper-mute);
}

.spiral-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.spiral-group {
  border: 1px solid var(--rule-line);
  background: var(--ink-deep);
  padding: 2rem;
  position: relative;
}

.spiral-group-title {
  font-family: var(--font-cn);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule-line);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.spiral-group-title::before {
  content: "◯";
  color: var(--accent-gold);
  font-size: 0.8em;
}

.spiral-chain {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  align-items: stretch;
}

.spiral-item {
  flex: 1;
  min-width: 200px;
  padding: 1rem;
  background: var(--ink-mid);
  border: 1px solid var(--rule-line);
  margin-right: -1px;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  position: relative;
}
.spiral-item:hover {
  background: var(--ink-light);
  border-color: var(--accent-gold-dim);
  z-index: 1;
}

.spiral-item-era {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent-gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.spiral-item-title {
  font-family: var(--font-cn);
  font-size: 0.95rem;
  color: var(--paper);
  line-height: 1.5;
}

.spiral-arrow {
  display: flex;
  align-items: center;
  padding: 0 0.8rem;
  color: var(--accent-gold-dim);
  font-family: var(--font-mono);
  font-size: 1.4rem;
}

/* =================================================================
   Compare View · 三轴对照
   ================================================================= */
.view-compare { padding: 2rem 0; }

.compare-intro {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.compare-title {
  font-family: var(--font-cn);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--paper-bright);
  margin-bottom: 1.5rem;
}

.compare-blurb {
  font-size: 0.95rem;
  line-height: 1.95;
  color: var(--paper-mute);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.compare-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compare-col-header {
  padding: 1rem 1.2rem;
  border-bottom: 2px solid;
  margin-bottom: 0.5rem;
  text-align: center;
}
.compare-col-header.ont { border-color: var(--branch-ont); }
.compare-col-header.epi { border-color: var(--branch-epi); }
.compare-col-header.met { border-color: var(--branch-met); }

.compare-col-cn {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--paper-bright);
}
.compare-col-en {
  display: block;
  font-family: var(--font-en);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--paper-mute);
  margin-top: 0.3rem;
}

.compare-mp {
  padding: 1rem 1.2rem;
  background: var(--ink-mid);
  border: 1px solid var(--rule-line);
  border-left-width: 3px;
  font-size: 0.88rem;
  line-height: 1.65;
}
.compare-col:nth-child(1) .compare-mp { border-left-color: var(--branch-ont); }
.compare-col:nth-child(2) .compare-mp { border-left-color: var(--branch-epi); }
.compare-col:nth-child(3) .compare-mp { border-left-color: var(--branch-met); }

.compare-mp-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.compare-mp-pursuit {
  color: var(--pole-left);
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.compare-mp-arrow {
  text-align: center;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  margin: 0.3rem 0;
}
.compare-mp-limit {
  color: var(--pole-right);
  font-weight: 500;
}

.compare-stage {
  padding: 0.9rem 1.2rem;
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
}
.compare-stage:hover {
  border-color: var(--accent-gold-dim);
  background: var(--ink-mid);
}

.compare-stage-era {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent-gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.compare-stage-name {
  font-family: var(--font-cn);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--paper-bright);
  margin-bottom: 0.7rem;
  letter-spacing: 0.08em;
}
.compare-stage-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--paper-mute);
  letter-spacing: 0.1em;
}

/* =================================================================
   Meta Insights · 五个元洞见
   ================================================================= */
.meta-insights {
  background: linear-gradient(180deg, var(--ink-deepest) 0%, var(--ink-deep) 100%);
  padding: 5rem 0;
  border-top: 1px solid var(--rule-line);
  position: relative;
}

.meta-insights::before {
  content: "";
  position: absolute;
  inset: 1rem 0;
  border-top: 1px solid var(--accent-gold-dim);
  border-bottom: 1px solid var(--accent-gold-dim);
  opacity: 0.3;
  pointer-events: none;
}

.mi-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mi-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

.mi-decoration {
  font-family: var(--font-mono);
  color: var(--accent-gold-dim);
  letter-spacing: 0.3em;
}

.mi-title {
  font-family: var(--font-cn);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--paper-bright);
}

.mi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.mi-card {
  padding: 2rem 1.6rem;
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  position: relative;
  transition: all 0.5s var(--ease-out);
  animation: miCardIn 0.8s var(--ease-out) both;
}
.mi-card:nth-child(1) { animation-delay: 0.1s; }
.mi-card:nth-child(2) { animation-delay: 0.2s; }
.mi-card:nth-child(3) { animation-delay: 0.3s; }
.mi-card:nth-child(4) { animation-delay: 0.4s; }
.mi-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes miCardIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.mi-card:hover {
  border-color: var(--accent-gold-dim);
  transform: translateY(-3px);
}

.mi-card-num {
  position: absolute;
  top: -0.3rem;
  right: 1rem;
  font-family: var(--font-cn);
  font-size: 4rem;
  font-weight: 300;
  color: var(--ink-light);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.mi-card-title {
  font-family: var(--font-cn);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  position: relative;
}

.mi-card-body {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--paper-mute);
  position: relative;
}

.mi-coda {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px dashed var(--rule-line);
}

.coda-glyph {
  display: inline-block;
  font-family: var(--font-cn);
  font-size: 0.95rem;
  letter-spacing: 0.4em;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  padding: 0.8rem 2rem;
  border: 1px solid var(--accent-gold-dim);
  border-radius: 1px;
}

.coda-text {
  font-family: var(--font-cn);
  font-size: 1rem;
  line-height: 1.95;
  color: var(--paper);
  max-width: 700px;
  margin: 0 auto;
}

/* =================================================================
   Detail Panel · 详情面板（侧滑）
   ================================================================= */
.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 20, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s var(--ease-out);
  z-index: 90;
}
.detail-backdrop.is-open { opacity: 1; visibility: visible; }

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(640px, 95vw);
  background: var(--ink-deepest);
  border-left: 1px solid var(--accent-gold-dim);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.6s var(--ease-out);
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.detail-panel.is-open { transform: translateX(0); }

.detail-close {
  position: sticky;
  top: 1rem;
  margin-left: auto;
  margin-right: 1rem;
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  color: var(--paper);
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
  z-index: 10;
  float: right;
}
.detail-close:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.detail-content {
  padding: 2.5rem 3rem 4rem;
}

.dt-stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.8rem;
}
.dt-stage-tag::before { content: "◇"; }

.dt-title {
  font-family: var(--font-cn);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.4;
  color: var(--paper-bright);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule-line);
}

.dt-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
}

.dt-pole {
  padding: 1.3rem;
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dt-pole-left { border-left: 3px solid var(--pole-left); }
.dt-pole-right { border-right: 3px solid var(--pole-right); text-align: right; }

.dt-pole-marker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.dt-pole-left .dt-pole-marker { color: var(--pole-left); }
.dt-pole-right .dt-pole-marker { color: var(--pole-right); }

.dt-pole-who {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 500;
}
.dt-pole-left .dt-pole-who { color: var(--pole-left); }
.dt-pole-right .dt-pole-who { color: var(--pole-right); }

.dt-pole-pole {
  font-family: var(--font-cn);
  font-size: 1.02rem;
  color: var(--paper-bright);
  line-height: 1.55;
}

.dt-tension-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.dt-body {
  font-family: var(--font-cn);
  font-size: 1rem;
  line-height: 2;
  color: var(--paper);
  margin-bottom: 2.5rem;
  text-align: justify;
}

.dt-recurs-block {
  padding: 1.5rem;
  background: var(--ink-deep);
  border: 1px solid var(--rule-line);
  border-left: 3px solid var(--accent-gold);
}

.dt-recurs-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.dt-recurs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dt-recurs-list li {
  font-family: var(--font-cn);
  font-size: 0.92rem;
  color: var(--paper-mute);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}
.dt-recurs-list li::before {
  content: "↻";
  position: absolute;
  left: 0;
  color: var(--accent-gold-dim);
  font-family: var(--font-mono);
}

/* =================================================================
   Footer · 页脚
   ================================================================= */
.page-footer {
  border-top: 1px solid var(--rule-line);
  padding: 4rem var(--gutter) 3rem;
  text-align: center;
  background: var(--ink-deepest);
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
}

.footer-glyph {
  font-size: 2rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
  letter-spacing: 0;
}

.footer-text {
  font-family: var(--font-cn);
  font-size: 0.95rem;
  line-height: 1.95;
  color: var(--paper-mute);
  margin-bottom: 2rem;
}

.footer-attribution {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--paper-dim);
  text-transform: uppercase;
}

/* =================================================================
   Responsive
   ================================================================= */
@media (max-width: 900px) {
  :root { --gutter: 1.5rem; }

  .branch-nav {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .mp-axis {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .mp-pole-right {
    flex-direction: row;
    border-right: none;
    border-left: 3px solid var(--pole-right);
    text-align: left;
    padding-left: 1.8rem;
    padding-right: 1rem;
  }
  .mp-pole-right .mp-pole-text { text-align: left; }
  .mp-tension-line {
    width: 100%;
    height: 30px;
  }
  .mp-tension-line svg {
    transform: rotate(90deg);
  }

  .tn-axis {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .tn-pole-right {
    border-right: none;
    border-left: 2px solid var(--pole-right);
    text-align: left;
  }
  .tn-tension-bar {
    width: 100%;
    height: 20px;
  }

  .compare-grid { grid-template-columns: 1fr; }

  .view-timeline { padding-left: 2.5rem; }
  .timeline-spine { left: 1rem; }
  .stage-marker { left: -2rem; }

  .detail-content { padding: 2rem 1.5rem 3rem; }
  .dt-axis { grid-template-columns: 1fr; }
  .dt-pole-right {
    border-right: none;
    border-left: 3px solid var(--pole-right);
    text-align: left;
  }

  .view-controls { gap: 0.5rem; padding-top: 1.5rem; }
  .view-btn { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

  .masthead-thesis { padding: 1.2rem 1.4rem; }
}

@media (max-width: 560px) {
  .title-cn { font-size: 2.3rem; letter-spacing: 0.1em; }
  .stage-name { font-size: 1.35rem; }
  .tn-title { font-size: 1.05rem; padding-right: 3rem; }
  .dt-title { font-size: 1.4rem; }
  .mi-grid { grid-template-columns: 1fr; }
  .branch-btn { padding: 1.3rem 1.2rem; }
  .branch-num { font-size: 2.3rem; }
  .branch-cn { font-size: 1.2rem; }
  .mp-pole-text { font-size: 1rem; }
}

/* — Selection — */
::selection { background: var(--accent-gold); color: var(--ink-deepest); }

/* — Scrollbar (subtle) — */
.detail-panel::-webkit-scrollbar { width: 6px; }
.detail-panel::-webkit-scrollbar-track { background: var(--ink-deepest); }
.detail-panel::-webkit-scrollbar-thumb { background: var(--rule-line); }
.detail-panel::-webkit-scrollbar-thumb:hover { background: var(--accent-gold-dim); }

/* — Print — */
@media print {
  .grain-overlay, .view-controls, .detail-panel, .detail-backdrop { display: none; }
  body { background: white; color: black; }
}
