/* ==========================================================================
   imToken 钱包 · 非托管多链入口
   共享外壳样式表 /assets/site.css
   色彩：深空底 / 星云层 / 岩灰容器 / 极光青 / 电光紫 / 安全橙 / 链路绿
   ========================================================================== */

:root {
  --ink: #060A16;
  --nebula: #0D1424;
  --stone: #1A2233;
  --line: #2A3550;
  --aurora: #35E0D0;
  --violet: #7B5CFF;
  --alert: #FF8A3D;
  --pass: #4ED88A;
  --text: #EEF2F7;
  --muted: #9AA7BC;
  --alert-wash: rgba(255, 138, 61, 0.12);
  --aurora-wash: rgba(53, 224, 208, 0.10);
  --violet-wash: rgba(123, 92, 255, 0.12);
  --pass-wash: rgba(78, 216, 138, 0.08);
  --cut: 12px;
  --shell: 1240px;
  --gap: 24px;
  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(820px 540px at 8% -10%, rgba(53, 224, 208, 0.10), transparent 62%),
    radial-gradient(760px 540px at 98% 6%, rgba(123, 92, 255, 0.13), transparent 64%),
    linear-gradient(180deg, #060A16 0%, #0D1424 46%, #060A16 100%);
}

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

/* ---------- 排版 ---------- */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(20px, 2.1vw, 22px); letter-spacing: -0.015em; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
h4 { font-size: 16px; font-weight: 700; letter-spacing: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--aurora);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

a:hover { text-decoration: underline; text-underline-offset: 3px; }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.35em; }

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
  letter-spacing: 0;
}

code {
  padding: 0.12em 0.42em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(26, 34, 51, 0.7);
  color: #CBE7E4;
}

strong, b { font-weight: 700; color: #FFFFFF; }

hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }

::selection { background: rgba(53, 224, 208, 0.28); color: #FFFFFF; }

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

#main-content:focus { outline: none; }

/* ---------- 布局工具 ---------- */

.container {
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
}

@media (max-width: 600px) {
  .container { width: min(100% - 28px, var(--shell)); }
}

.section { padding: 72px 0; }
.section--tight { padding: 44px 0; }
.section--loose { padding: 96px 0; }
.section--alt { background: var(--nebula); }
.section--stone { background: var(--stone); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }
.col-offset-1 { margin-left: calc(100% / 12 + var(--gap) / 2); }
.col-offset-2 { margin-left: calc(200% / 12 + var(--gap)); }

@media (max-width: 980px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { grid-column: span 6; }
  .col-offset-1, .col-offset-2 { margin-left: 0; }
}

@media (max-width: 640px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: 1 / -1; }
}

/* ---------- 章节信号线 ---------- */

.rule { height: 1px; border: 0; margin: 0; background: var(--line); }

.rule-aurora {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--aurora) 0%, rgba(53, 224, 208, 0.16) 44%, rgba(123, 92, 255, 0.42) 100%);
}

/* ---------- 展览标签 / 说明牌 ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aurora);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--aurora);
}

.plate {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.plate-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--aurora);
}

.plate-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.annot {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.step-index {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--line);
  user-select: none;
}

@supports (-webkit-text-stroke: 1px black) {
  .step-index {
    color: transparent;
    -webkit-text-stroke: 1px var(--line);
  }
}

/* ---------- 切角面板 ---------- */

.cut-panel {
  position: relative;
  padding: 22px;
  background: var(--stone);
  border: 1px solid var(--line);
  border-radius: 0;
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.cut-panel--raise { margin-top: -24px; margin-left: 24px; }
.cut-panel--raise-sm { margin-top: -12px; margin-left: 12px; }
.cut-panel--nebula { background: var(--nebula); }
.cut-panel--soft { background: rgba(26, 34, 51, 0.62); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease), filter 0.18s var(--ease);
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--aurora); color: #04101A; }
.btn--primary:hover { filter: brightness(1.08); }

.btn--violet { background: var(--violet); color: #F5F2FF; }
.btn--violet:hover { filter: brightness(1.1); }

.btn--ghost {
  background: rgba(26, 34, 51, 0.55);
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--aurora); color: var(--aurora); }

.btn--sm { padding: 8px 16px; font-size: 13px; }

/* ---------- 标签与徽标 ---------- */

.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--aurora-wash);
  color: var(--aurora);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--violet { background: var(--violet-wash); color: #B4A2FF; }
.badge--alert { background: var(--alert-wash); color: var(--alert); }
.badge--pass { background: rgba(78, 216, 138, 0.12); color: var(--pass); }

/* ---------- 校验色块 ---------- */

.alert-panel {
  padding: 16px 18px;
  border: 1px solid rgba(255, 138, 61, 0.42);
  border-left-width: 3px;
  border-left-color: var(--alert);
  border-radius: 8px;
  background: var(--alert-wash);
  font-size: 14px;
  line-height: 1.7;
}

.alert-panel__title {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--alert);
}

.alert-panel.is-pulsing { animation: alertPulse 1.2s var(--ease) 1; }

@keyframes alertPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.34); }
  100% { box-shadow: 0 0 0 16px rgba(255, 138, 61, 0); }
}

/* ---------- 核对清单 ---------- */

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 20, 36, 0.6);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.check-item + .check-item { margin-top: 10px; }

.check-item.is-checked {
  border-color: rgba(78, 216, 138, 0.5);
  background: var(--pass-wash);
}

.check-input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--nebula);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.check-input:checked {
  border-color: var(--pass);
  background: rgba(78, 216, 138, 0.16);
}

.check-input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 1.5px solid var(--pass);
  border-bottom: 1.5px solid var(--pass);
  transform: rotate(42deg);
}

.check-label {
  font-size: 14.5px;
  line-height: 1.65;
  cursor: pointer;
}

.check-item.is-checked .check-label { color: var(--muted); }

/* ---------- 复制按钮 ---------- */

.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(26, 34, 51, 0.7);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.copy-chip:hover { color: var(--text); border-color: var(--aurora); }
.copy-chip.is-copied { color: var(--pass); border-color: var(--pass); }

/* ---------- 图像容器 ---------- */

.media-frame {
  --cut: 12px;
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--stone), var(--nebula) 72%);
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- 章节目录 ---------- */

.toc {
  position: sticky;
  top: 108px;
  font-size: 13px;
}

.toc-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-link {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.toc-link:hover { color: var(--text); text-decoration: none; }

.toc-link[aria-current="true"] {
  color: var(--aurora);
  border-left-color: var(--aurora);
}

@media (max-width: 980px) {
  .toc { position: static; top: auto; }
}

/* ---------- 筛选与标签页 ---------- */

.filter-input {
  width: 100%;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 20, 36, 0.85);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.18s var(--ease);
}

.filter-input::placeholder { color: #6C7A93; }
.filter-input:focus { border-color: var(--aurora); outline: none; }

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 20, 36, 0.8);
}

.tab {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease);
}

.tab[aria-selected="true"] {
  background: var(--aurora-wash);
  color: var(--aurora);
}

.tab-panel { animation: panelIn 0.24s ease-out both; }
.tab-panel[hidden] { display: none; }

@keyframes panelIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 显现动效 ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 面包屑 ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--aurora); }

/* ==========================================================================
   页头
   ========================================================================== */

.skip-link {
  position: fixed;
  left: 50%;
  top: -120px;
  z-index: 130;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--aurora);
  color: #04101A;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}

.skip-link:focus { top: 12px; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  padding: 14px 0 0;
  transition: padding 0.24s var(--ease);
}

.site-header.is-condensed { padding-top: 8px; }

.nav-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
  padding: 9px 12px 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 20, 36, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background-color 0.24s var(--ease), border-color 0.24s var(--ease), padding 0.24s var(--ease);
}

.site-header.is-condensed .nav-shell {
  padding: 6px 10px 6px 12px;
  background: rgba(6, 10, 22, 0.94);
  border-color: rgba(42, 53, 80, 0.95);
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-glyph {
  flex: none;
  width: 24px;
  height: 24px;
  background: linear-gradient(140deg, var(--aurora), var(--violet));
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-mark {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list li { margin: 0; }

.nav-link {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(42, 53, 80, 0.55);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--aurora);
  background: var(--aurora-wash);
}

.nav-link[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--aurora);
  vertical-align: middle;
}

.nav-side {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
}

.nav-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.version-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aurora);
  box-shadow: 0 0 0 3px var(--aurora-wash);
}

.version-dot--beta {
  background: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-wash);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(120deg, #35E0D0, #6BF0C4);
  color: #04101A;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease);
}

.nav-cta:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(26, 34, 51, 0.75);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (min-width: 961px) and (max-width: 1180px) {
  .nav-link { padding: 8px 9px; font-size: 13px; }
  .nav-side { gap: 10px; }
  .nav-state { display: none; }
}

@media (max-width: 960px) {
  .site-header { padding-top: 10px; }
  .nav-shell { gap: 12px; padding: 8px 10px 8px 14px; }
  .nav-toggle { display: inline-flex; }
  .brand { flex: 1; }

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(8, 13, 26, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s linear;
  }

  .nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }

  .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
  }

  .nav-link[aria-current="page"] { background: var(--aurora-wash); }

  .nav-side {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .nav-state { justify-content: flex-start; }
  .nav-cta { justify-content: center; padding: 12px 18px; }
}

@media (max-width: 420px) {
  .brand-sub { display: none; }
}

/* ==========================================================================
   页脚
   ========================================================================== */

.site-footer {
  position: relative;
  margin-top: 96px;
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink) 0%, #04070F 72%);
  font-size: 14px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--aurora), var(--violet), transparent);
  opacity: 0.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}

.footer-brand .footer-mark {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer-sub {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aurora);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list li { margin: 0; }

.footer-link {
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-link:hover { color: var(--aurora); text-decoration: none; }

.footer-link[aria-current="page"] { color: var(--text); }

.footer-line {
  margin: 0 0 8px;
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-contact .footer-line { max-width: 32ch; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.footer-note {
  flex: 1 1 420px;
  margin: 0;
  max-width: 74ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-icp,
.footer-year {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .site-footer { margin-top: 64px; padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   返回顶部
   ========================================================================== */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 17px 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 20, 36, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s linear,
              border-color 0.18s var(--ease);
}

.to-top::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid var(--aurora);
}

.to-top.is-active { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--aurora); }

/* ==========================================================================
   降级动效
   ========================================================================== */

@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;
  }

  [data-reveal] { opacity: 1; transform: none; }
  .tab-panel { animation: none; }
  .alert-panel.is-pulsing { animation: none; }
  .to-top { transform: none; }
  .btn:hover,
  .nav-cta:hover { transform: none; }
}
