/* ============================================================
   幻影体育 · 共享站点样式 — /assets/site.css
   暗场竞技场 + 赛事档案册
   ============================================================ */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-900: #0E0E14;
  --ink-800: #16161F;
  --ink-700: #1F1B33;
  --violet: #6C3EF5;
  --violet-soft: #9A82FF;
  --cyan: #2DE2E6;
  --orange: #FF6B35;
  --paper: #F5F1E8;
  --muted: #A8A3B8;
  --green: #30D158;

  --line: rgba(154, 130, 255, 0.22);
  --line-strong: rgba(154, 130, 255, 0.44);
  --tint: rgba(108, 62, 245, 0.14);

  --rail-w: 272px;
  --topbar-h: 62px;
  --gutter: clamp(18px, 4vw, 56px);
  --maxw: 1180px;

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.72, 0.2, 1);
  --shadow-card: 0 22px 48px -28px rgba(0, 0, 0, 0.92);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  background: var(--ink-900);
}

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

main { display: block; }

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

button { font: inherit; color: inherit; }

a { color: var(--violet-soft); }

::selection { background: var(--violet); color: #fff; }

@supports (scrollbar-color: red blue) {
  html {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-700) var(--ink-900);
  }
}

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--paper);
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.6rem); letter-spacing: -0.005em; }
h4 { font-size: 1.05rem; letter-spacing: 0.01em; }

p { margin: 0; }

ul, ol { padding-left: 1.15em; }

strong { font-weight: 800; color: #fff; }

small { font-size: 0.82em; color: var(--muted); }

/* ---------- 4. 无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-900);
  background: var(--cyan);
  border: 1px solid var(--cyan);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible,
.skip-link:focus-within {
  transform: translateY(0);
  color: var(--ink-900);
}

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

/* ---------- 5. 基础布局件 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(40px, 6.5vw, 82px);
}

.section--dark { background: var(--ink-800); }

.section--tint {
  background:
    linear-gradient(180deg, rgba(108, 62, 245, 0.12), rgba(108, 62, 245, 0) 78%);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--2 { grid-template-columns: 1fr; }

.grid--3 { grid-template-columns: 1fr; }

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 6. 通用文字件 ---------- */
.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
  flex: 0 0 auto;
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.85;
  color: rgba(245, 241, 232, 0.82);
}

.prose {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.9;
  color: rgba(245, 241, 232, 0.88);
}

.prose p { margin: 0 0 1.1em; }

.prose p:last-child { margin-bottom: 0; }

/* ---------- 7. 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--paper);
  background: rgba(31, 27, 51, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  color: #fff;
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 14px 34px -18px rgba(108, 62, 245, 0.95);
}

.btn--primary:hover {
  background: #7B52FF;
  border-color: var(--violet-soft);
  box-shadow: 0 18px 40px -18px rgba(108, 62, 245, 1);
}

.btn--ghost {
  color: var(--paper);
  background: transparent;
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(45, 226, 230, 0.08);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

/* ---------- 8. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.6;
  color: var(--violet-soft);
  background: rgba(108, 62, 245, 0.12);
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  white-space: nowrap;
}

.tag--alert {
  color: var(--orange);
  background: rgba(255, 107, 53, 0.1);
  border-color: rgba(255, 107, 53, 0.5);
}

.tag--live {
  color: var(--green);
  background: rgba(48, 209, 88, 0.1);
  border-color: rgba(48, 209, 88, 0.5);
}

/* ---------- 9. 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.crumbs__link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.crumbs__link:hover,
.crumbs__link:focus-visible { color: var(--cyan); }

.crumbs__sep { color: var(--line-strong); }

.crumbs__current { color: var(--paper); }

/* ---------- 10. 纸层卡片 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.8vw, 28px);
  background: linear-gradient(158deg, #1F1B33 0%, #16161F 74%);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 2px;
  background: var(--cyan);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.card__kicker {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--violet-soft);
}

.card__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1.4;
  color: var(--paper);
}

.card__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 11. 图片容器基础规则 ---------- */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(108, 62, 245, 0.35), transparent 62%),
    linear-gradient(148deg, #1F1B33, #0E0E14 82%);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(245, 241, 232, 0.05) 0 1px,
    transparent 1px 14px
  );
  pointer-events: none;
}

.img-frame > img,
.img-frame > picture > img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--16x9 { aspect-ratio: 16 / 9; }
.img-frame--4x3 { aspect-ratio: 4 / 3; }
.img-frame--1x1 { aspect-ratio: 1 / 1; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--banner { aspect-ratio: 21 / 9; }

.img-frame__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- 12. 头部外壳 ---------- */
.site-header {
  position: relative;
  z-index: 50;
}

/* 移动端顶栏 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 14px 0 16px;
  background: rgba(14, 14, 20, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--paper);
  text-decoration: none;
  transform: skewX(-5deg);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: rgba(108, 62, 245, 0.18);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-toggle:hover {
  background: rgba(108, 62, 245, 0.34);
  border-color: var(--violet-soft);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 14px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cyan);
  transition: transform 0.26s var(--ease), opacity 0.2s var(--ease),
    width 0.2s var(--ease);
}

.nav-toggle__bars span:nth-child(2) { width: 68%; }

.site-header[data-open] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.site-header[data-open] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.site-header[data-open] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-toggle__text { line-height: 1; }

/* 侧边轨道 */
.rail {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: min(86vw, 330px);
  padding: 22px 22px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(154, 130, 255, 0.045) 0 1px,
      transparent 1px 24px
    ),
    linear-gradient(178deg, #12121B 0%, #0E0E14 48%, #0E0E14 100%);
  border-right: 1px solid var(--line);
  box-shadow: 26px 0 60px -30px rgba(0, 0, 0, 0.92);
  transform: translateX(-104%);
  transition: transform 0.32s var(--ease);
}

.rail::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--cyan) 16%,
    rgba(45, 226, 230, 0.28) 62%,
    transparent 100%
  );
  opacity: 0.75;
  pointer-events: none;
}

.site-header[data-open] .rail { transform: translateX(0); }

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.rail__mark {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  background: linear-gradient(
    135deg,
    rgba(108, 62, 245, 0.5),
    rgba(45, 226, 230, 0.16)
  );
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  transform: skewX(-8deg);
}

.rail__mark-line {
  position: absolute;
  left: 7px;
  right: 7px;
  height: 2px;
  background: var(--cyan);
  transform: skewX(8deg);
}

.rail__mark-line:nth-child(1) { top: 9px; opacity: 0.85; }
.rail__mark-line:nth-child(2) { top: 17px; right: 15px; background: var(--paper); }
.rail__mark-line:nth-child(3) { top: 25px; opacity: 0.45; }

.rail__brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rail__brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  transform: skewX(-4deg);
  transform-origin: left center;
}

.rail__brand-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
  white-space: nowrap;
}

.rail__nav { min-width: 0; }

.rail__label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.rail__label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

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

.rail__link {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px 9px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
  text-decoration: none;
  border-radius: 1px;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: transparent;
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.rail__link:hover,
.rail__link:focus-visible {
  color: var(--paper);
  background: rgba(108, 62, 245, 0.16);
}

.rail__link:hover::before,
.rail__link:focus-visible::before { background: var(--violet-soft); }

.rail__link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(108, 62, 245, 0.36),
    rgba(108, 62, 245, 0) 92%
  );
}

.rail__link[aria-current="page"]::before {
  top: 4px;
  bottom: 4px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(45, 226, 230, 0.85);
}

.rail__code {
  flex: 0 0 auto;
  min-width: 2ch;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  line-height: 1.9;
  color: var(--violet-soft);
}

.rail__link[aria-current="page"] .rail__code { color: var(--cyan); }

.rail__quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail__quick-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
  background: rgba(31, 27, 51, 0.66);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--violet);
  border-radius: 1px;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease), transform 0.18s var(--ease);
}

.rail__quick-link:hover,
.rail__quick-link:focus-visible {
  color: var(--paper);
  background: rgba(45, 226, 230, 0.12);
  border-color: var(--cyan);
  border-left-color: var(--cyan);
  transform: translateX(2px);
}

.rail__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.rail__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.rail__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.16);
  animation: railPulse 2.8s ease-in-out infinite;
}

@keyframes railPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(48, 209, 88, 0.04); }
}

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(8, 8, 12, 0.74);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s var(--ease);
}

.site-header[data-open] .nav-scrim {
  opacity: 1;
  visibility: visible;
}

/* 阅读进度 */
.progress {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 90;
  height: 3px;
  background: rgba(108, 62, 245, 0.16);
  pointer-events: none;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet) 0%, var(--cyan) 100%);
  box-shadow: 0 0 12px rgba(45, 226, 230, 0.55);
}

body.nav-locked { overflow: hidden; }

@media (max-width: 1023px) {
  body { padding-top: var(--topbar-h); }
  html { scroll-padding-top: calc(var(--topbar-h) + 18px); }
}

/* 桌面端轨道常驻 */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  .topbar { display: none; }

  .nav-scrim { display: none; }

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

  .rail {
    top: 0;
    width: var(--rail-w);
    padding: 32px 24px 28px;
    gap: 26px;
    transform: none;
    box-shadow: none;
  }

  .rail::before { opacity: 1; }
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  padding: clamp(38px, 5.5vw, 72px) var(--gutter) 26px;
  background: linear-gradient(
    180deg,
    #0E0E14 0%,
    #16161F 32%,
    #12121A 100%
  );
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--violet) 0%,
    var(--cyan) 46%,
    rgba(45, 226, 230, 0) 82%
  );
}

.site-footer::after {
  content: "";
  position: absolute;
  top: 12%;
  right: 0;
  width: min(240px, 42vw);
  height: min(240px, 42vw);
  background: radial-gradient(circle, rgba(108, 62, 245, 0.24), transparent 68%);
  pointer-events: none;
}

.footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 44px);
  max-width: var(--maxw);
  margin: 0 auto;
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1.45fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
  }
}

.footer__brand-name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: var(--paper);
  transform: skewX(-4deg);
  transform-origin: left center;
}

.footer__brand-tag {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.footer__brand-note {
  max-width: 34ch;
  margin: 0 0 20px;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--muted);
}

.footer__col { min-width: 0; }

.footer__col-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--paper);
}

.footer__col-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

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

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.footer__link::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.22s var(--ease);
}

.footer__link:hover,
.footer__link:focus-visible { color: var(--paper); }

.footer__link:hover::before,
.footer__link:focus-visible::before { width: 14px; }

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

.footer__contact-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 12px;
  border-left: 2px solid var(--ink-700);
}

.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.footer__contact-value {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.footer__copy {
  align-self: flex-start;
  margin-top: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  background: transparent;
  border: 1px solid rgba(45, 226, 230, 0.45);
  border-radius: 1px;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.footer__copy:hover,
.footer__copy:focus-visible {
  background: rgba(45, 226, 230, 0.14);
  border-color: var(--cyan);
}

.footer__copy[data-copied] {
  color: var(--green);
  border-color: rgba(48, 209, 88, 0.6);
  background: rgba(48, 209, 88, 0.12);
}

.footer__note {
  margin: 16px 0 0;
  font-size: 0.76rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 30ch;
}

.footer__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--maxw);
  margin: clamp(30px, 4.5vw, 52px) auto 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__legal-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer__legal-link:hover,
.footer__legal-link:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer__icp,
.footer__year { margin: 0; }

/* ---------- 14. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--cyan);
  background: rgba(31, 27, 51, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
    visibility 0.24s var(--ease), border-color 0.24s var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover,
.to-top:focus-visible { border-color: var(--cyan); }

@media (min-width: 1024px) {
  .to-top {
    right: 26px;
    bottom: 26px;
  }
}

/* ---------- 15. 滚动显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease);
  will-change: opacity, transform;
}

.has-js [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---------- 16. 动效降级 ---------- */
@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;
  }

  .has-js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .card:hover,
  .btn:hover,
  .rail__quick-link:hover { transform: none; }
}
