/* ============================================================
   永信贵宾会 · 共享站点样式表
   路径：/assets/site.css
   负责：reset / 设计令牌 / 中文排版 / 头部轨道 / 页脚 / 通用组件
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, svg, video { display: block; max-width: 100%; height: auto; }

button { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }

a { color: inherit; }

/* ---------- 2. Design tokens ---------- */
:root {
  /* 色彩 */
  --ink: #0A1F1A;          /* 墨绿基座 */
  --ink-2: #102E26;        /* 深档案绿 */
  --ink-3: #1B463C;        /* 玻璃苔绿 */
  --gold: #D9A85C;         /* 暖金回响 */
  --gold-soft: #F1D9A8;    /* 浅金纸 */
  --pulse: #3FE0CC;        /* 电光青脉冲 */
  --mist: #A9B6B0;         /* 雾灰索引 */
  --paper: #F5F1E6;        /* 纸白 */
  --violet: #8B7CF6;       /* 紫电注释 */
  --haze: #DDE7E2;         /* 暖白雾层 */
  --ink-text: #0A1F1A;     /* 浅底上的文字 */

  /* 线条与阴影 */
  --line: rgba(169, 182, 176, 0.16);
  --line-soft: rgba(169, 182, 176, 0.10);
  --line-gold: rgba(217, 168, 92, 0.42);
  --line-pulse: rgba(63, 224, 204, 0.30);

  /* 字体 */
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 尺寸 */
  --rail-w: 276px;
  --container-w: 1180px;
  --gutter: clamp(18px, 4vw, 56px);
  --radius-s: 4px;
  --radius-m: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 3. Base & 中文排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse 62% 42% at 12% -4%, rgba(63, 224, 204, 0.075), transparent 70%),
    radial-gradient(ellipse 52% 46% at 96% 104%, rgba(217, 168, 92, 0.065), transparent 72%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding-top: 72px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 5.6vw, 6.2rem);
  line-height: 1.02;
}
h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.9rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
}
h3 {
  font-size: clamp(1.12rem, 1.7vw, 1.45rem);
  line-height: 1.34;
  letter-spacing: -0.005em;
}
h4 {
  font-size: 1.05rem;
  line-height: 1.4;
}

p { line-height: 1.85; }

strong { color: var(--gold-soft); font-weight: 600; }

::selection {
  background: rgba(63, 224, 204, 0.28);
  color: #03110E;
}

/* 无障碍焦点 */
:focus-visible {
  outline: 2px solid var(--pulse);
  outline-offset: 3px;
  border-radius: var(--radius-s);
  box-shadow: 0 0 0 6px rgba(63, 224, 204, 0.14);
}

#main-content { scroll-margin-top: 88px; }
#main-content:focus { outline: none; }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  transform: translateY(-130%);
  padding: 0.7em 1.2em;
  background: var(--pulse);
  color: #062621;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: -2px;
}

/* ---------- 5. 阅读进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 150;
  background: rgba(169, 182, 176, 0.10);
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--pulse));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 6. 头部外壳 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 72px;
  z-index: 120;
  background: linear-gradient(180deg, rgba(10, 31, 26, 0.98), rgba(10, 31, 26, 0.88));
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  position: absolute;
  top: 50%;
  left: 84px;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: rgba(169, 182, 176, 0.72);
  white-space: nowrap;
}

/* 抽屉轨道 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 90;
  width: min(84vw, 330px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 92px 22px 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, rgba(16, 46, 38, 0.98), rgba(10, 31, 26, 0.99)),
    radial-gradient(circle at 0% 0%, rgba(63, 224, 204, 0.12), transparent 62%);
  border-right: 1px solid var(--line-gold);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.62);
  transform: translateX(-104%);
  transition: transform 0.34s var(--ease);
}
.site-header[data-open] .rail { transform: translateX(0); }

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 14, 12, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}
.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* 品牌 */
.rail__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
}
.brand__ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  transition: transform 0.32s var(--ease), border-color 0.32s var(--ease);
}
.brand__ring--2 {
  inset: 7px;
  border-color: var(--line-pulse);
}
.brand__core {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(217, 168, 92, 0.85);
}
.brand:hover .brand__ring--2,
.brand:focus-visible .brand__ring--2 {
  transform: scale(1.16);
  border-color: var(--pulse);
}
.brand:hover .brand__ring {
  border-color: rgba(217, 168, 92, 0.7);
}
.brand__text { display: block; }
.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--paper);
}
.brand__tagline {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  line-height: 1.6;
  color: var(--mist);
}

/* 版本徽标 */
.rail__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: rgba(217, 168, 92, 0.08);
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  line-height: 1.6;
}
.rail__badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 10px var(--pulse);
  animation: railDot 3.6s var(--ease) infinite;
}
@keyframes railDot {
  0%, 72%, 100% { opacity: 1; transform: scale(1); }
  82% { opacity: 0.45; transform: scale(0.7); }
}

/* 导航 */
.rail__nav { display: block; }
.rail__label {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: rgba(169, 182, 176, 0.62);
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px 9px 15px;
  border-radius: var(--radius-s);
  color: var(--mist);
  font-size: 0.97rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--pulse);
  transform: translateY(-50%);
  transition: height 0.26s var(--ease);
}
.nav-link__idx {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: rgba(169, 182, 176, 0.52);
  transition: color 0.22s var(--ease);
}
.nav-link__text { display: inline-block; }
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--paper);
  background: rgba(63, 224, 204, 0.07);
}
.nav-link:hover::before { height: 52%; }
.nav-link:hover .nav-link__idx { color: var(--pulse); }
.nav-link[aria-current="page"] {
  color: var(--paper);
  background: linear-gradient(90deg, rgba(63, 224, 204, 0.15), rgba(63, 224, 204, 0));
}
.nav-link[aria-current="page"]::before {
  height: 72%;
  box-shadow: 0 0 12px rgba(63, 224, 204, 0.7);
}
.nav-link[aria-current="page"] .nav-link__idx { color: var(--pulse); }

/* 轨道底部 */
.rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.rail__meta {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: rgba(169, 182, 176, 0.62);
  word-break: break-all;
}

/* 移动导航按钮 */
.nav-toggle {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(169, 182, 176, 0.3);
  border-radius: 8px;
  background: rgba(27, 70, 60, 0.7);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  transition: border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); }
.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: var(--pulse);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.site-header[data-open] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(2.75px) rotate(45deg);
}
.site-header[data-open] .nav-toggle__bars span:nth-child(2) {
  transform: translateY(-2.75px) rotate(-45deg);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 9vw, 118px);
  padding-top: clamp(40px, 6vw, 76px);
  background:
    linear-gradient(180deg, var(--ink) 0%, #071915 62%, #05120F 100%);
  border-top: 1px solid var(--line);
  color: var(--paper);
}
.footer__inner {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  gap: clamp(28px, 4vw, 46px);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.footer__block { min-width: 0; }
.footer__block--brand { grid-column: 1 / -1; }

.footer__brand {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--paper);
  margin-bottom: 10px;
}
.footer__version {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  line-height: 1.9;
  color: var(--mist);
  margin-bottom: 20px;
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1.8;
  color: var(--gold);
  margin-bottom: 14px;
}
.footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__list a {
  position: relative;
  display: inline-block;
  font-size: 0.94rem;
  color: var(--haze);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--pulse);
  transition: width 0.26s var(--ease);
}
.footer__list a:hover,
.footer__list a:focus-visible { color: var(--paper); }
.footer__list a:hover::after { width: 100%; }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__contact > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.footer__contact dt {
  flex: none;
  min-width: 36px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  line-height: 1.9;
  color: rgba(169, 182, 176, 0.7);
}
.footer__contact dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--haze);
  word-break: break-word;
}
.footer__note {
  margin-top: 16px;
  max-width: 46ch;
  font-size: 0.78rem;
  line-height: 1.8;
  color: rgba(169, 182, 176, 0.78);
}

.footer__legal {
  margin-top: clamp(32px, 5vw, 58px);
  border-top: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.2);
}
.footer__legal-inner {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  line-height: 1.9;
  color: rgba(169, 182, 176, 0.74);
}
.footer__copy [data-year] { font-variant-numeric: tabular-nums; }
.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer__legal-links a {
  font-size: 0.78rem;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer__legal-links a:hover,
.footer__legal-links a:focus-visible {
  color: var(--pulse);
  border-bottom-color: rgba(63, 224, 204, 0.5);
}

/* ---------- 8. 通用布局组件 ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(40px, 6vw, 88px); }
.section--tight { padding-block: clamp(24px, 4vw, 48px); }
.section--paper {
  background: var(--paper);
  color: var(--ink-text);
}
.section--paper h2,
.section--paper h3 { color: #0A1F1A; }
.section--paper .eyebrow { color: #7A5A24; }
.section--paper .mono { color: #3C4C47; }

.divider {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 4vw, 48px);
  background: linear-gradient(90deg, rgba(169, 182, 176, 0.34), rgba(169, 182, 176, 0));
}

/* 索引小标签 */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1.8;
  color: var(--gold);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  flex: none;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  line-height: 1.9;
  color: var(--mist);
}

/* 网格 */
.grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 32px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grid--split,
.grid--split-rev { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 900px) {
  .grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .grid--split-rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* 卡片 */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: linear-gradient(158deg, rgba(27, 70, 60, 0.52), rgba(16, 46, 38, 0.88));
  color: var(--paper);
  min-width: 0;
}
.card--glass {
  background: rgba(27, 70, 60, 0.34);
  border-color: var(--line-pulse);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: rgba(217, 168, 92, 0.08);
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  line-height: 1.9;
}
.tag--pulse {
  border-color: rgba(63, 224, 204, 0.4);
  background: rgba(63, 224, 204, 0.08);
  color: var(--pulse);
}
.tag--violet {
  border-color: rgba(139, 124, 246, 0.45);
  background: rgba(139, 124, 246, 0.1);
  color: #B7ADFB;
}

/* 按钮 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72em 1.35em;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease),
              color 0.22s var(--ease), transform 0.22s var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--pulse);
  opacity: 0;
  pointer-events: none;
}
.btn:focus-visible::after { animation: btnRipple 0.62s var(--ease); }
@keyframes btnRipple {
  0% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.16); }
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold), #E8C183);
  border-color: var(--gold);
  color: #14231E;
  font-weight: 600;
}
.btn--gold:hover { transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-gold);
  color: var(--gold-soft);
}
.btn--ghost:hover {
  border-color: var(--pulse);
  color: var(--pulse);
  background: rgba(63, 224, 204, 0.07);
}

.btn--quiet {
  padding: 0.3em 0;
  border: 0;
  border-bottom: 1px solid var(--line-pulse);
  border-radius: 0;
  background: none;
  color: var(--pulse);
}
.btn--quiet:hover { border-bottom-color: var(--pulse); }

.btn--sm {
  padding: 0.58em 1.05em;
  font-size: 0.84rem;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  line-height: 1.9;
  color: var(--mist);
}
.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb li + li::before {
  content: "/";
  color: rgba(169, 182, 176, 0.42);
}
.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--pulse); }
.breadcrumb [aria-current="page"] { color: var(--gold-soft); }

/* 图片容器基础规则（供页面阶段放图） */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background:
    linear-gradient(150deg, rgba(27, 70, 60, 0.9), rgba(10, 31, 26, 0.95)),
    radial-gradient(circle at 30% 20%, rgba(63, 224, 204, 0.22), transparent 62%);
  aspect-ratio: 16 / 10;
  min-height: 120px;
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 56%, rgba(10, 31, 26, 0.58));
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--portrait { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* 长文阅读区 */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.2em; }
.prose p,
.prose li { max-width: 68ch; }
.prose ul,
.prose ol {
  padding-left: 1.1em;
  list-style: none;
}
.prose ul li,
.prose ol li { position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.85em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}
.prose a {
  color: var(--pulse);
  text-underline-offset: 3px;
}

/* 返回顶部（由 JS 注入） */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 115;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  background: rgba(16, 46, 38, 0.9);
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
              visibility 0.28s var(--ease), border-color 0.22s var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  border-color: var(--pulse);
  color: var(--pulse);
}

/* ---------- 9. 滚动显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 10. 媒体查询 ---------- */
@media (max-width: 1023px) {
  body.nav-locked { overflow: hidden; }
}

@media (min-width: 1024px) {
  :root { --rail-w: clamp(248px, 17vw, 296px); }

  body {
    padding-top: 0;
    padding-left: var(--rail-w);
  }

  .site-header {
    inset: 0 auto 0 0;
    width: var(--rail-w);
    height: auto;
    background: none;
    border-bottom: 0;
  }

  .scroll-progress { left: var(--rail-w); }

  .topbar__brand { display: none; }
  .nav-toggle { display: none; }
  .nav-scrim { display: none; }

  .rail {
    position: static;
    transform: none !important;
    width: 100%;
    height: 100%;
    padding: 34px 26px 30px;
    gap: 30px;
    border-right: 1px solid var(--line-gold);
    box-shadow: none;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .rail__nav { flex: 1 1 auto; }
  .rail__foot { margin-top: auto; }

  #main-content { scroll-margin-top: 24px; }

  .footer__block--brand { grid-column: auto; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__block--brand { grid-column: 1 / -1; }
}

@media (max-width: 639px) {
  body { line-height: 1.8; }
  h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  h2 { font-size: clamp(1.55rem, 6.4vw, 2rem); }
  .footer__legal-inner { flex-direction: column; align-items: flex-start; }
  .footer__contact > div { flex-direction: column; gap: 2px; }
  .footer__contact dt { min-width: 0; }
}

/* ---------- 11. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .to-top { transform: none; }
}

/* ---------- 12. 打印 ---------- */
@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
  }
  .site-header,
  .site-footer,
  .to-top,
  .scroll-progress { display: none !important; }
}
