/* ============================================================
   STELE · 碑林  —  以太坊主网铭刻看板
   设计系统：石 / 金 / 暖白。无第三方字体，无构建步骤。
   ============================================================ */

:root {
  --ink:        #08080a;
  --ink-1:      #0c0c0f;
  --ink-2:      #111114;
  --ink-3:      #17171c;
  --ink-4:      #1e1e24;

  --line:       rgba(233, 228, 217, 0.07);
  --line-mid:   rgba(233, 228, 217, 0.13);
  --line-hi:    rgba(233, 228, 217, 0.24);

  --paper:      #e9e4d9;
  --paper-2:    rgba(233, 228, 217, 0.72);
  --paper-3:    rgba(233, 228, 217, 0.46);
  --paper-4:    rgba(233, 228, 217, 0.26);

  --gold:       #b08d57;
  --gold-lt:    #d8b981;
  --gold-dk:    rgba(176, 141, 87, 0.34);
  --jade:       #6f8f7c;

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

  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1240px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- 背景：石层纹理 ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 3px,
      rgba(255, 255, 255, 0.012) 3px,
      rgba(255, 255, 255, 0.012) 4px
    ),
    radial-gradient(120% 80% at 50% -10%, rgba(176, 141, 87, 0.07), transparent 60%),
    radial-gradient(80% 60% at 90% 110%, rgba(111, 143, 124, 0.05), transparent 65%);
}

.grain::after {
  content: "";
  position: absolute;
  inset: -50%;
  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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain-shift 8s steps(6) infinite;
}

@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, -1%); }
}

/* ---------- 骨架 ---------- */

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: rgba(8, 8, 10, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  gap: 22px;
}

.mark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  flex-shrink: 0;
}

.mark-cn {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.22em;
  font-weight: 600;
}

.mark-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--gold);
  border: 1px solid var(--gold-dk);
  padding: 2px 6px;
  border-radius: 2px;
}

.topnav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}

.topnav a {
  color: var(--paper-3);
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  transition: color 0.24s var(--ease);
  position: relative;
  white-space: nowrap;
}

.topnav a:hover { color: var(--paper); }

.topnav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}

.topnav a:hover::after { width: 100%; }

.lang-btn {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--paper-3);
  background: transparent;
  border: 1px solid var(--line-mid);
  padding: 5px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.24s var(--ease);
}

.lang-btn:hover { color: var(--gold-lt); border-color: var(--gold-dk); }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(44px, 7.5vh, 92px) 0 clamp(38px, 5.6vh, 68px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  position: relative;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.05s forwards;
}

.hero-eyebrow .dot {
  width: 5px; height: 5px;
  background: var(--jade);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(111, 143, 124, 0.6);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111, 143, 124, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(111, 143, 124, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 143, 124, 0); }
}

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(52px, 11vw, 132px);
  line-height: 0.96;
  letter-spacing: 0.04em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.14em;
}

.hero-title .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.28em);
  animation: rise-ch 1.15s var(--ease-out) forwards;
}

.hero-title .ch:nth-child(1) { animation-delay: 0.10s; }
.hero-title .ch:nth-child(2) { animation-delay: 0.20s; }
.hero-title .ch:nth-child(3) { animation-delay: 0.30s; }

.hero-title .en {
  font-family: var(--mono);
  font-size: clamp(11px, 1.5vw, 14px);
  letter-spacing: 0.52em;
  color: var(--gold);
  align-self: flex-end;
  padding-bottom: clamp(10px, 1.6vw, 22px);
  margin-left: 0.4em;
  opacity: 0;
  animation: rise 1s var(--ease-out) 0.55s forwards;
}

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

@keyframes rise-ch {
  from { opacity: 0; transform: translateY(0.28em); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  max-width: 620px;
  font-family: var(--serif);
  font-size: clamp(15px, 1.55vw, 18.5px);
  line-height: 1.95;
  color: var(--paper-2);
  opacity: 0;
  animation: rise 1s var(--ease-out) 0.7s forwards;
}

.hero-sub em {
  font-style: normal;
  color: var(--gold-lt);
}

/* 实时读数条 */
.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 10px;
  opacity: 0;
  animation: rise 1s var(--ease-out) 0.85s forwards;
}

.readout-cell {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 560px) {
  .readout-cell { flex: 1 1 calc(50% - 1px); }
}

/* 采样说明：读数条下方一行小字，讲清这不是全网总数 */
.readout-note {
  max-width: 820px;
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.95;
  color: var(--paper-3);
  opacity: 0.85;
}

.readout-cell {
  background: var(--ink);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* 采样区间：读数格下方的极小注脚 */
.readout-s {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  color: var(--paper-3);
  opacity: 0.85;
}

.readout-k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--paper-4);
  text-transform: uppercase;
  white-space: nowrap;
}

.readout-v {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.readout-v.gold { color: var(--gold-lt); }

/* ---------- 分区标题 ---------- */

.sechead {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 48px 0 26px;
  border-top: 1px solid var(--line);
  margin-top: 34px;
}

.sechead .idx {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--gold);
  padding-top: 4px;
}

.sechead h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.sechead .hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--paper-4);
  text-align: right;
  line-height: 1.7;
}

/* ---------- 置顶碑文 ---------- */

.steles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stele {
  background: var(--ink-1);
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: background 0.5s var(--ease);
}

.stele::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(176, 141, 87, 0.09), transparent 46%);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}

.stele:hover { background: var(--ink-2); }
.stele:hover::before { opacity: 1; }

/* 巨大的罗马编号水印，让留白变成碑面 */
.stele::after {
  content: attr(data-no);
  position: absolute;
  right: 10px;
  bottom: 42px;
  font-family: var(--serif);
  font-size: 118px;
  line-height: 1;
  color: var(--paper);
  opacity: 0.022;
  pointer-events: none;
  transition: color 0.6s var(--ease), opacity 0.6s var(--ease);
}

.stele:hover::after { color: var(--gold); opacity: 0.07; }

.stele-top,
.stele-quote,
.stele-note,
.stele-foot { z-index: 1; }

.stele-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

.stele-no {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
  border: 1px solid var(--gold-dk);
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.stele-epoch {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--paper-4);
  white-space: nowrap;
}

.stele-quote {
  font-family: var(--serif);
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.75;
  letter-spacing: 0.015em;
  color: var(--paper);
  position: relative;
  white-space: pre-line;
}

/* 巨碑：跨两列，双栏排字，像一铺摊开的拓片 */
.stele--tall { grid-column: span 2; }

.stele--tall .stele-quote {
  column-count: 2;
  column-gap: 2.8em;
  column-rule: 1px solid var(--line);
  font-size: clamp(14.5px, 1.35vw, 17px);
  line-height: 2.1;
  letter-spacing: 0.02em;
}

/* 短句巨碑：一句话撑满一格，垂直居中 */
.stele--huge .stele-quote {
  font-size: clamp(19px, 2.1vw, 26px);
  line-height: 1.55;
  letter-spacing: 0.01em;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* 收尾宽碑：跨满整行，一句话居中撑住版心 */
.stele--wide { grid-column: 1 / -1; }

.stele--wide .stele-quote {
  font-size: clamp(21px, 2.6vw, 33px);
  line-height: 1.6;
  letter-spacing: 0.015em;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.9em 0 0.8em;
}

.stele--wide .stele-note { max-width: 62ch; }

@media (max-width: 860px) {
  .stele--tall { grid-column: span 1; }
  .stele--tall .stele-quote { column-count: 1; column-rule: none; }
  .stele--huge .stele-quote { font-size: clamp(21px, 5.4vw, 28px); }
}

.stele-quote.latin {
  font-family: var(--serif);
  letter-spacing: 0.005em;
  line-height: 1.62;
}

.stele-note {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--paper-3);
  border-left: 1px solid var(--gold-dk);
  padding-left: 12px;
  position: relative;
  margin-top: auto;
}

.stele-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  position: relative;
}

.stele-from {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--paper-3);
  letter-spacing: 0.04em;
}

.stele-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}

.stele-link:hover { color: var(--gold-lt); border-bottom-color: var(--gold-dk); }

/* ---------- 留言流 ---------- */

.stream {
  position: relative;
  border-top: 1px solid var(--line);
}

.stream::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--line-mid), transparent 70%);
}

.msg {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 0 26px;
  padding: 26px 0 26px 22px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.4s var(--ease);
}

.msg:hover { background: rgba(233, 228, 217, 0.018); }

.msg::before {
  content: "";
  position: absolute;
  left: -2.5px;
  top: 34px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
  border: 1px solid var(--line-hi);
  transition: all 0.4s var(--ease);
}

.msg:hover::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 12px 1px rgba(176, 141, 87, 0.5);
}

.msg-block {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--paper-4);
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}

.msg-block b {
  display: block;
  color: var(--paper-3);
  font-weight: 500;
  font-size: 12.5px;
}

.msg-body { min-width: 0; }

.msg-text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.85;
  color: var(--paper-2);
  word-break: break-word;
  white-space: pre-wrap;
  transition: color 0.35s var(--ease);
}

.msg:hover .msg-text { color: var(--paper); }

.msg-text.rtl { direction: rtl; text-align: left; }

/* 长文折叠：只留四行，点开看全文 */
.msg-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.msg-text.clamped.open {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  cursor: default;
}

.msg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--paper-3);
}

.msg-meta a {
  color: var(--paper-4);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

/* 原文语言标记：链上文字不翻译，用这个标签说明它为何不是当前语言 */
.msg-lang {
  align-self: center;
  padding: 0 3px;
  border: 1px solid var(--line-mid);
  border-radius: 2px;
  color: var(--paper-3);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.7;
  opacity: 0.65;
}

/* 轮询拉到的新留言：一次金色泛光，然后归于平静 */
.msg.fresh {
  animation: freshIn 3.2s var(--ease) both;
}

@keyframes freshIn {
  0% { background: rgba(176, 141, 87, 0.14); }
  60% { background: rgba(176, 141, 87, 0.05); }
  100% { background: transparent; }
}

/* 实时状态：区块提示前的呼吸点 */
#stream .hint[data-live]::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--jade);
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(111, 143, 124, 0.5);
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 0 0 rgba(111, 143, 124, 0.4); }
  50% { opacity: 1; box-shadow: 0 0 0 4px rgba(111, 143, 124, 0); }
}

.msg-meta a:hover { color: var(--gold); border-bottom-color: var(--gold-dk); }

.msg-amt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--jade);
  text-align: right;
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.msg-amt small {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--paper-4);
  margin-top: 3px;
}

/* 空 / 加载 */
.state {
  padding: 56px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--paper-4);
  text-transform: uppercase;
}

.state .bar {
  width: 140px;
  height: 1px;
  margin: 18px auto 0;
  background: var(--line-mid);
  overflow: hidden;
  position: relative;
}

.state .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--gold);
  animation: slide 1.4s var(--ease) infinite;
}

@keyframes slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(360%); }
}

/* ---------- 刻字 ---------- */

.carve-box {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.carve-copy {
  background: var(--ink-1);
  padding: 30px 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.carve-copy p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.95;
  color: var(--paper-2);
}

.carve-warn {
  font-family: var(--mono) !important;
  font-size: 10.5px !important;
  letter-spacing: 0.05em;
  color: var(--paper-4) !important;
  line-height: 1.85 !important;
  border-left: 1px solid var(--gold-dk);
  padding-left: 12px;
}

.carve-form {
  background: var(--ink-1);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#carveText {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-mid);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.8;
  padding: 14px 16px;
  resize: vertical;
  min-height: 108px;
  outline: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#carveText:focus {
  border-color: var(--gold-dk);
  background: var(--ink-2);
}

#carveText::placeholder { color: var(--paper-4); }

.carve-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.carve-count {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--paper-4);
}

.carve-count b {
  color: var(--gold);
  font-weight: 400;
}

.carve-btn {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 11px 22px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.28s var(--ease);
  white-space: nowrap;
}

.carve-btn:hover:not(:disabled) {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
  box-shadow: 0 0 0 1px rgba(216, 185, 129, 0.25), 0 6px 24px -8px rgba(176, 141, 87, 0.5);
}

.carve-btn:disabled {
  background: transparent;
  color: var(--paper-4);
  border-color: var(--line-mid);
  cursor: not-allowed;
}

.carve-msg {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: var(--paper-4);
  min-height: 1em;
  word-break: break-all;
}

.carve-msg.ok { color: var(--jade); }
.carve-msg.err { color: #c98b7a; }

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

.foot {
  margin-top: 40px;
  padding: 40px 0 60px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'copy links'
    'scope scope';
  gap: 28px;
  align-items: end;
}

.foot-copy {
  grid-area: copy;
  font-size: 12px;
  line-height: 2;
  color: var(--paper-4);
  max-width: 640px;
}

.foot-copy b {
  color: var(--paper-3);
  font-weight: 400;
}

/* 收录范围：单独一行，压在页脚说明下面 */
.foot-scope {
  grid-area: scope;
  margin-top: -8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  max-width: 720px;
  font-size: 11.5px;
  line-height: 1.95;
  color: var(--paper-4);
  opacity: 0.8;
}

.foot-links {
  grid-area: links;
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
}

.foot-links a {
  color: var(--paper-3);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.foot-links a:hover { color: var(--gold-lt); }

/* ---------- 进场观察 ---------- */

/* 只有 JS 可用时才隐藏，避免脚本失败导致整页不可见 */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  .carve-box { grid-template-columns: 1fr; }
  .msg {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 16px;
  }
  .msg-block { padding-top: 0; display: flex; align-items: baseline; gap: 8px; }
  .msg-block b { display: inline; }
  .msg-amt { text-align: left; padding-top: 0; }
  .msg-amt small { display: inline; margin-left: 8px; }
  .sechead { flex-wrap: wrap; }
  .sechead .hint { margin-left: 0; width: 100%; text-align: left; }
  .foot {
    grid-template-columns: 1fr;
    grid-template-areas: 'copy' 'links' 'scope';
    gap: 22px;
  }
}

@media (max-width: 560px) {
  .topnav { gap: 16px; }
  .topnav a.hide-s { display: none; }
  .stele { padding: 24px 20px 20px; }
}

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