/* 半開 · 纸上留白。设计 token 与规则见 DESIGN.md */

:root {
  --paper: #f4efe6;
  --paper-deep: #ebe4d7;
  --ink: #1d1b18;
  --ink-2: #5e5a53;
  --ink-3: #716b63;      /* 辅助文字，对比度 ≥ 4.5 */
  --ink-faint: #948e84;  /* 仅用于序号、图例标题等装饰 */
  --line: rgb(29 27 24 / 0.13);
  --line-strong: rgb(29 27 24 / 0.26);
  --cinnabar: #b5442c;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 0 0.07 0 0 0 0.24 -0.095'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --book: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --wrap: 1120px;
  --gutter: clamp(24px, 6vw, 64px);
  --measure: 36em;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161513;
    --paper-deep: #1f1d1a;
    --ink: #ede7dc;
    --ink-2: #aba398;
    --ink-3: #8f887e;
    --ink-faint: #7c766c;
    --line: rgb(237 231 220 / 0.13);
    --line-strong: rgb(237 231 220 / 0.26);
    --cinnabar: #d8674b;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.93 0 0 0 0 0.9 0 0 0 0 0.86 0 0 0 0.12 -0.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

/* ---------- 基础 ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s5);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font: 17px/1.85 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

.phrase { display: inline-block; }

/* 短句只在标点和空格处换行，避免“测试出/身”这类断词 */
.hero__lead, .hero__intro, .page-title, .page-lead, .section__desc, .index__name, .index__summary {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: inherit; text-decoration: none; }
p { margin: 0; }
svg { flex: none; }
main { flex: 1; }

::selection { background: color-mix(in srgb, var(--cinnabar) 24%, transparent); }

:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--s4);
  top: calc(-1 * var(--s8));
  z-index: 60;
  padding: var(--s2) var(--s4);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
}
.skip:focus { top: var(--s4); }

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

/* ---------- 印章与月相 ---------- */

.seal { display: block; }
.seal__bg { fill: var(--cinnabar); }
.seal__ring { fill: none; stroke: var(--paper); stroke-width: 2.4; }
.seal__lit { fill: var(--paper); }
.seal--sm { width: 28px; height: 28px; }
.seal--xs { width: 20px; height: 20px; }

.moon {
  display: inline-block;
  width: 14px;
  height: 14px;
  color: var(--ink);
}
.moon--building { color: var(--ink-2); }
.moon--live { color: var(--cinnabar); }

/* ---------- 页眉与页脚 ---------- */

.site-header { position: relative; z-index: 2; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--s5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.14em;
}

.nav { display: flex; gap: var(--s6); font-size: 15px; letter-spacing: 0.14em; }

.nav a {
  position: relative;
  padding-block: var(--s1);
  color: var(--ink-2);
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.14em;
  bottom: 0;
  height: 1px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.site-footer {
  margin-top: var(--s9);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4) var(--s6);
  padding-block: var(--s6);
}

.site-footer__brand { display: flex; align-items: center; gap: var(--s3); }
.site-footer__brand > span:first-of-type { font-family: var(--serif); color: var(--ink); letter-spacing: 0.14em; }
.site-footer__tagline { font-family: var(--serif); letter-spacing: 0.12em; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--s5); letter-spacing: 0.06em; }
.site-footer__links a { transition: color 0.2s var(--ease); }
.site-footer__links a:hover { color: var(--cinnabar); }

/* ---------- 按钮与文字链接 ---------- */

.button {
  display: inline-flex;
  align-items: center;
  padding: var(--s3) calc(var(--s6) - 0.24em) var(--s3) var(--s6);
  border: 1px solid var(--ink);
  font-size: 15px;
  letter-spacing: 0.24em;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.button:hover { background: var(--ink); color: var(--paper); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding-bottom: 2px;
  color: var(--ink-2);
  font-size: 15px;
  letter-spacing: 0.1em;
  background: linear-gradient(currentColor 0 0) left bottom / 0 1px no-repeat;
  transition: color 0.2s var(--ease), background-size 0.35s var(--ease);
}
.text-link::after { content: "→"; transition: transform 0.3s var(--ease); }
.text-link:hover { color: var(--cinnabar); background-size: 100% 1px; }
.text-link:hover::after { transform: translateX(3px); }

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

.hero { position: relative; padding-block: var(--s7) var(--s8); }

/* 背后一轮极淡的月，不抢主体 */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--s9));
  right: max(-12vw, -160px);
  width: min(62vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 34% 34%, color-mix(in srgb, var(--paper-deep) 90%, transparent) 0 42%, transparent 72%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--s8);
  min-height: min(74vh, 700px);
}

.hero__text { max-width: 31em; }

.hero__lead {
  margin-bottom: var(--s5);
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.55;
  letter-spacing: 0.05em;
  text-wrap: balance;
}

.hero__intro { max-width: 25em; margin-bottom: var(--s7); color: var(--ink-2); }

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5) var(--s6); }

/* 竖排挂轴：从右往左依次是题名、上联、下联 */
.scroll {
  position: relative;
  writing-mode: vertical-rl;
  justify-self: end;
  padding-block: var(--s2);
}

.scroll__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(88px, 11vw, 148px);
  line-height: 1;
  letter-spacing: 0.16em;
}

.scroll__seal {
  display: inline-block;
  width: 48px;
  height: 48px;
  margin-inline-start: var(--s4);
  vertical-align: middle;
}

.scroll__line {
  margin-block-start: var(--s6);
  padding-block-start: var(--s5);
  padding-inline-start: var(--s9);
  border-block-start: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1;
  letter-spacing: 0.5em;
  color: var(--ink-2);
}
.scroll__line + .scroll__line { padding-inline-start: calc(var(--s9) + var(--s8)); }

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

.section { padding-block: var(--s8); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s3) var(--s5);
  margin-bottom: var(--s6);
}

.section__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.3;
  letter-spacing: 0.24em;
}

.section__desc { color: var(--ink-2); font-size: 15px; letter-spacing: 0.04em; }
.section__more { margin-top: var(--s5); }

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  margin-left: auto;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.legend__title { font-family: var(--serif); color: var(--ink-faint); }
.legend__list { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0; padding: 0; list-style: none; }
.legend__list li { display: inline-flex; align-items: center; gap: var(--s2); }

/* ---------- 证据条：反色区块 ---------- */

.section--evidence { padding-block: var(--s7); background: var(--ink); color: var(--paper); }

.evidence { display: flex; flex-wrap: wrap; gap: var(--s6) var(--s8); margin: 0; padding: 0; list-style: none; }
.evidence__item { display: flex; flex-direction: column; gap: var(--s1); }

.evidence__value {
  font-family: var(--book);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.02em;
}

.evidence__label {
  color: color-mix(in srgb, var(--paper) 68%, transparent);
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ---------- 项目目录 ---------- */

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

.index__row {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 232px;
  align-items: baseline;
  column-gap: var(--s5);
  padding: var(--s5) var(--s4);
  transition: background-color 0.35s var(--ease);
}

.index__row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--cinnabar);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

a.index__row:hover, a.index__row:focus-visible { background: var(--paper-deep); }
a.index__row:hover::before, a.index__row:focus-visible::before { transform: scaleY(1); }
a.index__row:focus-visible { outline-offset: -2px; }

.index__no {
  font-family: var(--book);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-faint);
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.04em;
}

.index__main { display: block; min-width: 0; }

.index__name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.index__summary { display: block; margin-top: var(--s1); color: var(--ink-2); font-size: 15px; line-height: 1.75; }

.index__tags { display: block; margin-top: var(--s2); color: var(--ink-3); font-size: 13px; letter-spacing: 0.06em; }

.index__aside { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2); }

.index__result { color: var(--ink-3); font-size: 13px; letter-spacing: 0.06em; white-space: nowrap; }

.index__meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); width: 100%; }

.index__status {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.index__go {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.index__arrow { display: inline-block; transition: transform 0.35s var(--ease); }

a.index__row:hover .index__go { color: var(--cinnabar); }
a.index__row:hover .index__arrow { transform: translateX(4px); }
a.index__row[target="_blank"]:hover .index__arrow { transform: translate(3px, -3px); }

.index__row.is-static .index__name { color: var(--ink-2); }
.index__row.is-static .index__go { color: var(--ink-3); }

/* 半遮半掩：技术标签平时是浅一档的墨色，悬停或聚焦时加深 */
.index__tags { transition: color 0.35s var(--ease); }
a.index__row:hover .index__tags, a.index__row:focus-visible .index__tags { color: var(--ink-2); }

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

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

.post-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: var(--s5);
  padding: var(--s5) var(--s4);
  transition: background-color 0.35s var(--ease);
}
.post-row:hover { background: var(--paper-deep); }
.post-row time { grid-row: span 2; font-family: var(--book); font-size: 15px; color: var(--ink-3); font-variant-numeric: oldstyle-nums; }
.post-row__title { font-family: var(--serif); font-size: 20px; line-height: 1.5; letter-spacing: 0.04em; transition: color 0.2s var(--ease); }
.post-row:hover .post-row__title { color: var(--cinnabar); }
.post-row__summary { margin-top: var(--s1); color: var(--ink-2); font-size: 15px; line-height: 1.75; }

/* ---------- 首页“关于” ---------- */

.about-brief { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: var(--s5); }
.about-brief__body { max-width: var(--measure); display: grid; gap: var(--s4); }

.job { display: flex; align-items: baseline; gap: var(--s3); color: var(--ink); }
.job__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cinnabar);
  transform: translateY(-2px);
}

/* ---------- 内页通用 ---------- */

.page { padding-block: var(--s6) 0; }

.crumbs { display: flex; gap: var(--s2); color: var(--ink-2); font-size: 14px; letter-spacing: 0.08em; }
.crumbs a { transition: color 0.2s var(--ease); }
.crumbs a:hover { color: var(--cinnabar); }

.page-head { padding-block: var(--s6) var(--s5); }

.page-title {
  margin: 0 0 var(--s4);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-wrap: balance;
}

.page-lead { max-width: var(--measure); color: var(--ink-2); font-size: 18px; line-height: 1.8; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s7);
  margin: var(--s6) 0 0;
  padding-block: var(--s4);
  border-block: 1px solid var(--line);
  font-size: 14px;
}
.meta div { display: flex; align-items: center; gap: var(--s3); }
.meta dt { color: var(--ink-3); letter-spacing: 0.14em; }
.meta dd { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; }

.page-back { margin-top: var(--s8); }

/* 方案流程条 */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: var(--s3);
  margin: var(--s5) 0 var(--s7);
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.flow li { display: flex; align-items: center; counter-increment: step; }
.flow li + li::before { content: ""; width: var(--s5); height: 1px; background: var(--line-strong); }
.flow span {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
}
.flow span::before {
  content: counter(step, cjk-decimal);
  font-family: var(--serif);
  font-size: 13px;
  color: var(--cinnabar);
}

/* ---------- 正文排版 ---------- */

.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }

.prose h2 {
  margin: var(--s8) 0 var(--s4);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.45;
  letter-spacing: 0.08em;
}
.prose h3 {
  margin: var(--s6) 0 var(--s3);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.prose p, .prose ul, .prose ol, .prose pre, .prose .table-wrap { margin: 0 0 var(--s5); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 600; }

.prose a {
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.prose a:hover { color: var(--cinnabar); border-color: var(--cinnabar); }

.prose blockquote {
  margin: var(--s6) 0;
  padding: var(--s1) 0 var(--s1) var(--s5);
  border-left: 2px solid var(--cinnabar);
  color: var(--ink-2);
  font-family: var(--serif);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: var(--paper-deep);
  font-family: var(--mono);
  font-size: 0.86em;
}
.prose pre {
  padding: var(--s4) var(--s5);
  overflow-x: auto;
  border-radius: 4px;
  background: var(--paper-deep);
  font-size: 14px;
  line-height: 1.7;
}
.prose pre code { padding: 0; background: none; font-size: inherit; }

.prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.prose th, .prose td {
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
}
.prose th { border-bottom-color: var(--line-strong); font-weight: 600; white-space: nowrap; }

/* 分隔线：一个小半月 */
.prose hr {
  height: 14px;
  margin: var(--s7) 0;
  border: 0;
  background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3Cpath d='M7 1a6 6 0 0 0 0 12z'/%3E%3C/svg%3E") center / 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='6' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3Cpath d='M7 1a6 6 0 0 0 0 12z'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.post__date { font-family: var(--book); color: var(--ink-3); font-size: 15px; font-variant-numeric: oldstyle-nums; }

/* ---------- 关于页 ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: var(--s9);
  padding-top: var(--s6);
}

.about__heading {
  margin: var(--s7) 0 var(--s4);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.14em;
}

.contact {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--s3) var(--s6);
  margin: 0;
  font-size: 15px;
}
.contact div { display: contents; }
.contact dt { color: var(--ink-2); letter-spacing: 0.12em; }
.contact dd { margin: 0; }
.contact a { border-bottom: 1px solid var(--line-strong); transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.contact a:hover { color: var(--cinnabar); border-color: var(--cinnabar); }

/* 诗：竖排，从右往左读，末尾落一方印 */
.poem {
  writing-mode: vertical-rl;
  margin-top: var(--s8);
  font-family: var(--serif);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1;
  letter-spacing: 0.34em;
}
.poem__line { display: block; }
.poem__line + .poem__line {
  margin-block-start: var(--s4);
  padding-block-start: var(--s4);
  border-block-start: 1px solid var(--line);
}
.poem__seal {
  display: block;
  width: 40px;
  height: 40px;
  margin-block-start: var(--s6);
  margin-inline-start: auto;
}

/* ---------- 404 ---------- */

.notfound { padding-block: var(--s10) var(--s9); }
.notfound__moon { width: 56px; height: 56px; margin-bottom: var(--s6); }
.notfound .page-lead { margin-bottom: var(--s7); }

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

@keyframes ink {
  from { opacity: 0; filter: blur(12px); transform: translateY(10px); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes stamp {
  from { opacity: 0; transform: scale(1.4) rotate(-8deg); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .scroll__name { animation: ink 1.2s var(--ease) 0.1s both; }
  .scroll__line { animation: ink 1.1s var(--ease) 0.55s both; }
  .scroll__line + .scroll__line { animation-delay: 0.75s; }
  .scroll__seal { animation: stamp 0.5s var(--ease) 1.3s both; }
  .hero__text > * { animation: rise 0.8s var(--ease) both; }
  .hero__text > :nth-child(1) { animation-delay: 0.3s; }
  .hero__text > :nth-child(2) { animation-delay: 0.42s; }
  .hero__text > :nth-child(3) { animation-delay: 0.54s; }
  .page-head { animation: rise 0.8s var(--ease) both; }
  .page-head ~ * { animation: rise 0.8s var(--ease) 0.12s both; }
  .poem { animation: rise 0.9s var(--ease) 0.25s both; }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

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

/* ---------- 平板 ---------- */

@media (max-width: 900px) {
  .hero__grid { column-gap: var(--s6); }
  .index__row { grid-template-columns: 48px minmax(0, 1fr) 200px; }
  .about { column-gap: var(--s7); }
}

/* ---------- 手机 ---------- */

@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav { gap: var(--s5); }

  .hero { padding-block: var(--s4) var(--s7); }
  .hero::before { top: calc(-1 * var(--s7)); right: -40vw; width: 110vw; }
  .hero__grid { grid-template-columns: 1fr; row-gap: var(--s7); min-height: 0; }
  .scroll { order: -1; }
  .scroll__name { font-size: 76px; }
  .scroll__seal { width: 36px; height: 36px; margin-inline-start: var(--s3); }
  .scroll__line { margin-block-start: var(--s5); padding-block-start: var(--s4); padding-inline-start: var(--s8); font-size: 15px; }
  .scroll__line + .scroll__line { padding-inline-start: calc(var(--s8) + var(--s7)); }
  .hero__lead { font-size: 26px; }
  .hero__intro { margin-bottom: var(--s6); }

  .section { padding-block: var(--s7); }
  .legend { margin-left: 0; width: 100%; }
  .section--evidence { padding-block: var(--s6); }
  .evidence { gap: var(--s5) var(--s7); }

  .index__row { grid-template-columns: 36px minmax(0, 1fr); padding: var(--s5) var(--s2); }
  .index__aside { grid-column: 2; align-items: flex-start; margin-top: var(--s3); }
  .index__meta { justify-content: flex-start; gap: var(--s5); width: auto; }

  .post-row { grid-template-columns: 1fr; padding-inline: var(--s2); }
  .post-row time { grid-row: auto; }

  .about-brief { grid-template-columns: 1fr; row-gap: var(--s4); }

  .flow { flex-direction: column; align-items: flex-start; }
  .flow li { flex-direction: column; align-items: flex-start; }
  .flow li + li::before { width: 1px; height: var(--s3); margin-left: var(--s5); }

  .about { grid-template-columns: 1fr; row-gap: var(--s6); }
  .poem { order: -1; justify-self: end; margin-top: var(--s4); font-size: 17px; }
  .poem__seal { width: 32px; height: 32px; }
}
