/* =============================================================
   山之志 yangshan.link —— 站点样式表
   grammar : paper & ink editorial · clay accent · mono kicker
   theme   : 明暗双套，data-theme 由 <head> 内联脚本在首屏前写入
   ============================================================= */

/* ---------- 1. 令牌 ---------- */
:root {
  --paper:  #F0EEE6;
  --ivory:  #FAF9F5;
  --white:  #FFFFFF;
  --ink:    #171615;
  --ink-2:  #3D3B36;
  --stone:  #6F6D64;
  --stone-d:#8A867C;
  --clay:   #D97757;
  --rust:   #BA5B38;
  --blush:  #F3E2D9;
  --tan:    #D6C7B4;
  --sage:   #7C8E69;
  --line:   #DCD9CD;
  --line-2: #C9C5B6;
  --shadow:    rgba(23,22,21,.06);
  --shadow-lg: rgba(23,22,21,.13);
  --grid:   rgba(23,22,21,.05);
  --glow:   rgba(217,119,87,.16);
  --grain:  .035;

  --serif: "Newsreader", "Tiempos Text", Georgia, "Songti SC", "Noto Serif SC", serif;
  --sans:  "Poppins", "Avenir Next", "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, "PingFang SC", monospace;

  --topbar-h: 60px;
  --r-card: 16px;
  --r-sm: 9px;
  --bw: 1.5px;
  --measure: 70ch;
  --wrap: 1180px;
}

[data-theme="dark"] {
  --paper:  #14130F;
  --ivory:  #1B1A15;
  --white:  #222019;
  --ink:    #F6F3EA;
  --ink-2:  #D9D4C7;
  --stone:  #9B968A;
  --stone-d:#7E796E;
  --clay:   #E3906C;
  --rust:   #F0A886;
  --blush:  #2C231D;
  --tan:    #4A4238;
  --sage:   #9BAE86;
  --line:   #33312B;
  --line-2: #45423A;
  --shadow:    rgba(0,0,0,.4);
  --shadow-lg: rgba(0,0,0,.55);
  --grid:   rgba(246,243,234,.055);
  --glow:   rgba(227,144,108,.2);
  --grain:  .05;
}

/* ---------- 2. 基座 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}
/* 纸张噪点 —— 铺满视口，不参与滚动 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

::selection { background: var(--clay); color: #fff; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 3. 排版原子 ---------- */
.kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--rust);
  margin-bottom: 14px;
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.16; letter-spacing: -.012em; font-weight: 700; margin-bottom: 14px; }
h2 { font-size: 26px; line-height: 1.3; margin: 48px 0 14px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--topbar-h) + 20px); }
h2:first-of-type { border-top: none; padding-top: 0; }
h3 { font-size: 19.5px; line-height: 1.4; margin: 32px 0 10px; scroll-margin-top: calc(var(--topbar-h) + 20px); }
h4 { font-size: 17px; margin: 24px 0 8px; }

p { margin: 0 0 16px; max-width: var(--measure); }
ul, ol { margin: 0 0 16px; padding-left: 1.35em; max-width: var(--measure); }
li { margin: 6px 0; }
strong { color: var(--ink); font-weight: 600; }
.prose p strong, .prose li strong, .prose td strong {
  background: linear-gradient(transparent 58%, color-mix(in srgb, var(--clay) 20%, transparent) 58%);
  border-radius: 2px; padding: 0 1px;
}
.accent { font-style: italic; font-weight: inherit; }
.accent--clay { font-style: italic; color: var(--clay); }
.hl { font-style: italic; color: var(--clay); }
.standfirst { font-style: italic; font-size: 19px; color: var(--stone); line-height: 1.62; max-width: 46ch; }
.note-mono { font-family: var(--mono); font-size: 13px; color: var(--stone); }
.caption { font-style: italic; color: var(--stone); text-align: center; font-size: 15px; margin-top: 14px; }

code {
  font-family: var(--mono); font-size: .82em;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 6px;
  padding: .1em .4em; color: var(--rust); white-space: pre-wrap; word-break: break-word;
}
pre.code {
  background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 20px; margin: 22px 0 28px; overflow-x: auto;
  font-family: var(--mono); font-size: 12.8px; line-height: 1.8; color: var(--ink-2);
  max-width: none; tab-size: 4;
}
pre.code code { background: none; border: none; padding: 0; color: inherit; font-size: 1em; }
pre.code .cm { color: var(--stone); }
pre.code .kw { color: var(--rust); }
pre.code b   { color: var(--ink); font-weight: 600; background: none; }
pre.code .mark { background: color-mix(in srgb, var(--clay) 16%, transparent); border-radius: 3px; }
.code-label {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .2em;
  text-transform: uppercase; color: var(--rust); margin: 26px 0 -12px;
}

/* ---------- 4. 顶栏 / 进度条 ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 2.5px; width: 0; z-index: 60;
  background: linear-gradient(90deg, var(--clay), var(--rust));
  box-shadow: 0 0 12px var(--glow);
}
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--clay); flex: none;
  box-shadow: 0 0 0 0 var(--glow); animation: beacon 2.8s ease-out infinite;
}
@keyframes beacon { 0% { box-shadow: 0 0 0 0 var(--glow); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.brand-name {
  font-family: var(--mono); font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.brand-sub { font-family: var(--mono); font-size: 11px; color: var(--stone); white-space: nowrap; }

.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--stone); padding: 7px 12px; border-radius: var(--r-sm); position: relative;
}
.topnav a:hover { color: var(--ink); background: var(--ivory); text-decoration: none; }
.topnav a.active { color: var(--ink); }
.topnav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; background: var(--clay); border-radius: 2px;
}
.icon-btn {
  flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--ivory); color: var(--ink); cursor: pointer; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--clay); color: var(--clay); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .i-sun { display: none; }
[data-theme="dark"] .icon-btn .i-sun  { display: block; }
[data-theme="dark"] .icon-btn .i-moon { display: none; }
.hamburger { display: none; }
@media (max-width: 720px) {
  .topnav { display: none; }
  .topnav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: var(--topbar-h); right: 12px; left: 12px;
    background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r-card);
    padding: 8px; box-shadow: 0 14px 34px var(--shadow-lg);
  }
  .topnav.open a { padding: 11px 14px; font-size: 12.5px; }
  .topnav.open a.active::after { display: none; }
  .hamburger { display: inline-flex; }
  .brand-sub { display: none; }
}

/* ---------- 5. 布局 ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.wrap--narrow { max-width: 840px; }
section { padding: 0; }
.sec { margin: 74px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.sec-head h2 { border: none; padding: 0; margin: 0; font-size: 24px; }
.sec-head .more { font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }

/* ---------- 6. 首屏 ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 66px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 130%;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 78% 62% at 62% 38%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 62% 38%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { margin-top: 6px; } }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); margin-bottom: 18px; }
.hero .standfirst { font-size: clamp(17px, 1.9vw, 20px); max-width: 40ch; margin-bottom: 26px; }
.type-line { font-family: var(--mono); font-size: 13px; color: var(--stone); letter-spacing: .04em; min-height: 1.6em; margin-bottom: 28px; }
.type-line .caret { display: inline-block; width: 8px; background: var(--clay); color: transparent; animation: blink 1.05s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; display: block; filter: drop-shadow(0 18px 40px var(--shadow)); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 999px; border: var(--bw) solid var(--ink); color: var(--ink);
  background: transparent; cursor: pointer; transition: transform .18s ease, background .2s, color .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--solid { background: var(--clay); border-color: var(--clay); color: #fff; box-shadow: 0 8px 22px var(--glow); }
.btn--solid:hover { background: var(--rust); border-color: var(--rust); color: #fff; }
.btn--ghost:hover { border-color: var(--clay); color: var(--clay); }
.btn svg { width: 14px; height: 14px; }

/* ---------- 7. 数据条 ---------- */
.specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 0;
}
.spec { padding: 20px 22px 18px; }
.spec + .spec { border-left: 1px solid var(--line); }
.spec-label { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin-bottom: 8px; }
.spec-value { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.1; margin-bottom: 5px; }
.spec-note { font-family: var(--sans); font-size: 12.5px; color: var(--stone); line-height: 1.5; }
@media (max-width: 780px) {
  .specs { grid-template-columns: 1fr 1fr; }
  .spec:nth-child(odd) { border-left: none; }
  .spec:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- 8. 文章卡片 ---------- */
.post-list { display: grid; gap: 18px; }
.post-card {
  display: block; position: relative; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px 26px; color: inherit;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.post-card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--clay); transform: scaleY(0); transform-origin: top; transition: transform .26s ease;
}
.post-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 16px 36px var(--shadow); }
.post-card:hover::after { transform: scaleY(1); }
.post-card:hover h3 { color: var(--rust); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin-bottom: 10px; }
.post-meta .sep { opacity: .5; }
.post-card h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.32; transition: color .2s; }
.post-card p { font-size: 15.5px; color: var(--stone); margin: 0; line-height: 1.68; max-width: 62ch; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stone); background: var(--ivory); border: 1px solid var(--line);
  border-radius: 999px; padding: 3.5px 10px;
}
.post-card:hover .tag { border-color: var(--line-2); }

/* 头条卡 */
.post-card--feature {
  background: var(--blush); border-color: var(--clay); padding: clamp(26px, 4vw, 40px);
}
.post-card--feature h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.24; }
.post-card--feature p { font-size: 16.5px; color: var(--ink-2); }
.post-card--feature .post-meta { color: var(--rust); }
.post-card--feature .tag { background: color-mix(in srgb, var(--white) 55%, transparent); border-color: color-mix(in srgb, var(--clay) 35%, transparent); color: var(--rust); }
.post-card--feature::after { background: var(--rust); }

.post-card--soon { opacity: .62; cursor: default; border-style: dashed; }
.post-card--soon:hover { transform: none; box-shadow: none; }
.post-card--soon:hover::after { transform: scaleY(0); }
.post-card--soon:hover h3 { color: var(--ink); }

/* ---------- 9. 通用卡片 / 论点带 / 提示 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }
.card { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r-card); padding: 22px 24px; }
.card h3 { margin: 0 0 4px; font-size: 18px; }
.card .sub { font-style: italic; color: var(--stone); font-size: 15px; margin-bottom: 10px; }
.card p { font-size: 15.5px; margin-bottom: 0; }
.card--ivory { background: var(--ivory); }
.card--accent { background: var(--blush); border-color: var(--clay); }
.card--accent h3 { color: var(--rust); }

.band {
  position: relative; overflow: hidden; border-radius: 14px;
  padding: clamp(28px, 3.6vw, 42px) clamp(24px, 3.4vw, 42px);
  background: var(--blush); border-left: 5px solid var(--clay);
}
.band .kicker { color: var(--rust); }
.band .statement {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(21px, 2.6vw, 29px); line-height: 1.48; color: var(--ink); max-width: 24em;
}
.band .statement strong { color: var(--rust); font-weight: 600; background: none; }
.band .foot { font-family: var(--mono); font-size: 13px; color: var(--stone); margin: 20px 0 0; }

.callout {
  background: var(--blush); border-left: 4px solid var(--clay); border-radius: var(--r-sm);
  padding: 16px 20px; margin: 22px 0 26px; max-width: var(--measure);
}
.callout p { margin-bottom: 0; font-size: 16px; }
.callout p + p { margin-top: 10px; }
.callout .kicker { margin-bottom: 6px; }
.quiet {
  margin: 24px 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--line-2);
  color: var(--stone); font-size: 14.5px; line-height: 1.78; max-width: var(--measure);
}
.quiet strong { color: var(--ink-2); background: none !important; }

/* ---------- 10. 表格 / 时间线 ---------- */
.table-wrap { overflow-x: auto; margin: 22px 0 28px; border: 1px solid var(--line); border-radius: var(--r-card); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
thead th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--stone); background: var(--ivory); white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
td code, th code { font-size: .88em; word-break: normal; }
.nw { white-space: nowrap; }
.ok { color: var(--sage); font-weight: 600; }
.no { color: var(--clay); font-weight: 600; }

.timeline { position: relative; margin: 26px 0 30px; padding-left: 32px; max-width: 700px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -32px; top: 7px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--clay); border: 3px solid var(--paper);
}
.tl-item h3 { margin: 0 0 6px; font-size: 18px; }
.tl-item p { font-size: 15.5px; margin-bottom: 6px; }

details.aside {
  margin: 22px 0 26px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--ivory); overflow: hidden; max-width: var(--measure);
}
details.aside > summary {
  cursor: pointer; list-style: none; padding: 13px 18px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); display: flex; align-items: center; gap: 10px;
}
details.aside > summary::-webkit-details-marker { display: none; }
details.aside > summary::before {
  content: ""; width: 7px; height: 7px; flex: none;
  border-right: 1.6px solid var(--stone); border-bottom: 1.6px solid var(--stone);
  transform: rotate(-45deg); transition: transform .2s;
}
details.aside[open] > summary::before { transform: rotate(45deg); }
details.aside > *:not(summary) { padding: 0 18px; }
details.aside > :last-child:not(summary) { padding-bottom: 16px; }

/* ---------- 11. 文章页 ---------- */
.post-hero { padding: clamp(38px, 6vw, 66px) 0 26px; }
.crumb { font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); margin-bottom: 16px; }
.crumb a { color: var(--stone); }
.crumb a:hover { color: var(--clay); }
.crumb .sep { margin: 0 8px; opacity: .55; }
.post-hero h1 { font-size: clamp(30px, 4.4vw, 48px); }
.post-hero .standfirst { margin-top: 6px; }
.post-hero .post-meta { margin-top: 20px; margin-bottom: 0; }

.post-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-bottom: 60px; }
@media (min-width: 1120px) { .post-body { grid-template-columns: minmax(0, 1fr) 210px; } }
.prose { min-width: 0; }
.rail { display: none; }
@media (min-width: 1120px) {
  .rail { display: block; position: sticky; top: calc(var(--topbar-h) + 28px); align-self: start; max-height: calc(100vh - var(--topbar-h) - 56px); overflow-y: auto; }
}
.toc-label { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--rust); padding: 0 10px 10px; }
.toc a {
  display: block; font-size: 13.5px; line-height: 1.45; color: var(--stone);
  padding: 6px 10px; border-left: 2px solid var(--line); transition: color .18s, border-color .18s;
}
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a.lvl3 { padding-left: 22px; font-size: 12.8px; }
.toc a.current { color: var(--clay); border-left-color: var(--clay); }
.toc { counter-reset: toc; }
.toc a.lvl2 { counter-increment: toc; }
.toc a.lvl2::before { content: counter(toc, decimal-leading-zero) "  "; font-family: var(--mono); font-size: 10px; color: var(--stone-d); }

.post-nav { display: flex; gap: 14px; margin-top: 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.post-nav a { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 18px; color: var(--ink); background: var(--ivory); }
.post-nav a:hover { border-color: var(--clay); text-decoration: none; }
.post-nav .dir { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--stone); display: block; }
.post-nav .ttl { font-family: var(--serif); font-weight: 600; font-size: 16px; display: block; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-nav .next { text-align: right; }
@media (max-width: 560px) { .post-nav { flex-direction: column; } .post-nav .next { text-align: left; } }

/* ---------- 12. 归档 / 筛选 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 26px; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--stone); background: var(--ivory); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: all .18s;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.on { color: #fff; background: var(--clay); border-color: var(--clay); }
.search {
  flex: 1; min-width: 180px; font-family: var(--mono); font-size: 12.5px;
  color: var(--ink); background: var(--ivory); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; outline: none;
}
.search::placeholder { color: var(--stone-d); }
.search:focus { border-color: var(--clay); }
.year-mark { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--stone); margin: 38px 0 14px; display: flex; align-items: center; gap: 14px; }
.year-mark::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.year-mark:first-child { margin-top: 0; }
.empty-hint { font-family: var(--mono); font-size: 13px; color: var(--stone); padding: 30px 0; display: none; }

/* ---------- 13. 页脚 ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 80px; padding: 34px 0 46px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 26px; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--stone); }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { color: var(--stone); letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.foot-links a:hover { color: var(--clay); }

/* ---------- 14. 滚动揭示 ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ---------- 15. SVG 插画令牌 ---------- */
svg .s-ink { stroke: var(--ink); } svg .s-clay { stroke: var(--clay); }
svg .s-stone { stroke: var(--stone); } svg .s-line { stroke: var(--line); }
svg .s-sage { stroke: var(--sage); } svg .s-tan { stroke: var(--tan); }
svg .f-paper { fill: var(--paper); } svg .f-ivory { fill: var(--ivory); }
svg .f-white { fill: var(--white); } svg .f-ink { fill: var(--ink); }
svg .f-clay { fill: var(--clay); } svg .f-blush { fill: var(--blush); }
svg .f-stone { fill: var(--stone); } svg .f-sage { fill: var(--sage); }
svg .f-tan { fill: var(--tan); } svg .f-line { fill: var(--line); } svg .f-none { fill: none; }
svg .dash { stroke-dasharray: 7 7; } svg .dash-s { stroke-dasharray: 3 6; stroke-linecap: round; }
svg text { font-family: var(--sans); fill: var(--ink); }
svg text.t-mono { font-family: var(--mono); }
svg text.t-muted { fill: var(--stone); }
svg text.t-clay { fill: var(--clay); }
.figure { margin: 28px 0 32px; }
.fig-label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--rust); margin-bottom: 12px; }
.figure svg { width: 100%; height: auto; display: block; }

@media (prefers-reduced-motion: no-preference) {
  svg .anim-march { animation: march 1.3s linear infinite; }
  svg .anim-pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite; }
  svg .anim-float { transform-box: fill-box; transform-origin: center; animation: floaty 5.5s ease-in-out infinite; }
}
@keyframes march  { to { stroke-dashoffset: -28; } }
@keyframes pulse  { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .7; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 回到顶部 */
.to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--ivory); color: var(--stone);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s, transform .25s, color .2s, border-color .2s;
  box-shadow: 0 6px 18px var(--shadow);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--clay); border-color: var(--clay); }
.to-top svg { width: 15px; height: 15px; }
