/* =========================================================
   雅虎中心 — 全站共享样式表 /assets/site.css
   结构：1 重置 · 2 变量 · 3 中文排版 · 4 通用组件
        5 头部轨道导航 · 6 页脚通道区 · 7 响应式 · 8 动效可访问
   ========================================================= */

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

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

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
}

[hidden] {
  display: none !important;
}

#main-content {
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 品牌色 */
  --violet: #5f2eea;
  --violet-hi: #6f45f2;
  --violet-soft: rgba(95, 46, 234, 0.12);
  --ink: #0b1026;
  --ink-soft: #131a38;
  --paper: #f4f1ea;
  --paper-2: #e2dccf;
  --cyan: #00c2ff;
  --cyan-deep: #0084ad;
  --orange: #ff7a1a;
  --orange-deep: #b24a00;
  --mint: #42e6b8;
  --mint-deep: #0b6b4f;
  --graphite: #1f2937;
  --white: #ffffff;

  /* 线 / 边 */
  --rule: rgba(31, 41, 55, 0.16);
  --rule-strong: rgba(31, 41, 55, 0.32);
  --rule-dark: rgba(244, 241, 234, 0.18);
  --rule-dark-soft: rgba(244, 241, 234, 0.09);

  /* 尺寸 */
  --rail-w: 268px;
  --topbar-h: 60px;
  --pad-x: clamp(18px, 3.6vw, 52px);
  --gap: clamp(18px, 2.4vw, 32px);

  /* 字体 */
  --font-display: "Helvetica Neue", Helvetica, Arial, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* 字号阶梯 */
  --fs--1: 0.75rem;
  --fs-0: 0.875rem;
  --fs-1: 1rem;
  --fs-2: 1.25rem;
  --fs-3: 2rem;
  --fs-hero: clamp(2.8rem, 7vw, 6rem);

  /* 纸张叠层 */
  --shadow-paper: 6px 6px 0 -1px var(--paper-2), 6px 6px 0 0 var(--rule);
  --shadow-lift: 0 14px 32px -24px rgba(11, 16, 38, 0.85);

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 中文排版与页面基座 ---------- */
body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: var(--fs-1);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.012em;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-hero);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.serif {
  font-family: var(--font-serif);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs--1);
  letter-spacing: 0.06em;
}

.muted {
  color: rgba(31, 41, 55, 0.62);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: var(--fs--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet);
}

.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.kicker--onDark {
  color: var(--cyan);
}

.hr-print {
  border: 0;
  border-top: 1px dashed var(--rule);
  margin: clamp(24px, 4vw, 48px) 0;
}

.page-night {
  background: var(--ink);
  color: var(--paper);
}

.page-night .display,
.page-night h1,
.page-night h2,
.page-night h3 {
  color: var(--white);
}

/* ---------- 4. 通用组件 ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.container--narrow {
  max-width: 780px;
}

.container--wide {
  max-width: 1440px;
}

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--editorial {
  grid-template-columns: minmax(160px, 3fr) minmax(0, 9fr);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.78rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: none;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn--primary {
  background: var(--violet);
  color: var(--white);
  box-shadow: 3px 3px 0 0 rgba(0, 194, 255, 0.55);
}

.btn--primary:hover {
  background: var(--violet-hi);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 rgba(0, 194, 255, 0.75);
}

.btn--primary:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 rgba(0, 194, 255, 0.55);
}

.btn--ink {
  background: var(--ink);
  color: var(--paper);
}

.btn--ink:hover {
  background: var(--violet);
  color: var(--white);
}

.btn--orange {
  background: var(--orange);
  color: var(--ink);
}

.btn--orange:hover {
  background: #ff8c3a;
}

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

.btn--line:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: var(--violet-soft);
}

.btn--onDark {
  background: transparent;
  color: var(--paper);
  border-color: rgba(244, 241, 234, 0.4);
}

.btn--onDark:hover {
  border-color: var(--cyan);
  color: var(--white);
}

.btn--sm {
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem;
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.25rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.35;
  white-space: nowrap;
}

.tag--violet {
  color: var(--violet);
  background: var(--violet-soft);
  border-color: rgba(95, 46, 234, 0.35);
}

.tag--cyan {
  color: var(--cyan-deep);
  background: rgba(0, 194, 255, 0.12);
  border-color: rgba(0, 132, 173, 0.45);
}

.tag--orange {
  color: var(--orange-deep);
  background: rgba(255, 122, 26, 0.14);
  border-color: rgba(178, 74, 0, 0.4);
}

.tag--mint {
  color: var(--mint-deep);
  background: rgba(66, 230, 184, 0.16);
  border-color: rgba(11, 107, 79, 0.4);
}

.tag--onDark {
  color: var(--cyan);
  background: rgba(0, 194, 255, 0.1);
  border-color: rgba(0, 194, 255, 0.4);
}

/* 章节头 */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  padding-bottom: 14px;
  margin-bottom: clamp(18px, 2.5vw, 30px);
  border-bottom: 2px solid var(--ink);
}

.section-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-head__meta {
  font-family: var(--font-mono);
  font-size: var(--fs--1);
  letter-spacing: 0.08em;
  color: rgba(31, 41, 55, 0.55);
}

.section-head--onDark {
  border-bottom-color: rgba(244, 241, 234, 0.35);
}

.section-head--onDark .section-head__title {
  color: var(--white);
}

.section-head--onDark .section-head__meta {
  color: rgba(244, 241, 234, 0.6);
}

/* 卡片 */
.card {
  position: relative;
  padding: clamp(16px, 2.2vw, 26px);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--violet);
  box-shadow: var(--shadow-lift);
}

.card--paper {
  background: var(--paper);
  box-shadow: var(--shadow-paper);
}

.card--night {
  background: rgba(244, 241, 234, 0.05);
  border-color: var(--rule-dark);
  color: var(--paper);
}

/* 面包屑 */
.breadcrumb {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(31, 41, 55, 0.55);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.45em;
  color: rgba(31, 41, 55, 0.3);
}

.breadcrumb a {
  color: var(--violet);
  text-decoration: none;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--graphite);
}

.breadcrumb--onDark {
  color: rgba(244, 241, 234, 0.6);
}

.breadcrumb--onDark li:not(:last-child)::after {
  color: rgba(244, 241, 234, 0.28);
}

.breadcrumb--onDark a {
  color: var(--cyan);
}

.breadcrumb--onDark [aria-current="page"] {
  color: var(--paper);
}

/* 正文容器 */
.prose {
  max-width: 68ch;
}

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

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.prose h2 {
  margin: 2em 0 0.6em;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.prose h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.15rem;
}

.prose a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

/* 图片占位容器（页面阶段放置 <img>） */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 6px 6px 0 -1px var(--paper-2), 6px 6px 0 0 var(--rule);
}

.img-frame img,
.img-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--wide {
  aspect-ratio: 21 / 9;
}

.img-frame--tall {
  aspect-ratio: 4 / 5;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame--night {
  background: var(--ink-soft);
  border-color: var(--rule-dark);
  box-shadow: 6px 6px 0 -1px rgba(244, 241, 234, 0.08),
    6px 6px 0 0 rgba(0, 194, 255, 0.25);
}

/* ---------- 5. 头部：侧边轨道导航 ---------- */
.site-header {
  display: block;
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--violet);
  color: var(--white);
  border-radius: 2px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

/* 轨道主体 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 65;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  padding: 26px 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: radial-gradient(
      120% 58% at 0% 0%,
      rgba(95, 46, 234, 0.34),
      transparent 62%
    ),
    var(--ink);
  color: var(--paper);
  border-right: 1px solid rgba(95, 46, 234, 0.5);
}

/* 装订刻度虚线 */
.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 9px;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(244, 241, 234, 0.32) 0 6px,
    transparent 6px 14px
  );
}

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

.rail__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--violet);
  color: var(--white);
  border-radius: 2px;
  box-shadow: 4px 4px 0 0 rgba(0, 194, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rail__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.rail__brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.rail__brand-line {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 234, 0.6);
}

.rail__badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 0.3rem 0.5rem;
  background: var(--orange);
  color: var(--ink);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.rail__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  animation: badgePulse 2.8s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.78);
  }
}

.rail__nav {
  margin-top: 24px;
}

.rail__nav:focus {
  outline: none;
}

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

.rail__link {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  padding: 0.52rem 0.6rem 0.52rem 0.55rem;
  border-left: 2px solid transparent;
  border-radius: 2px;
  color: rgba(244, 241, 234, 0.74);
  text-decoration: none;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(0, 194, 255, 0.8);
}

.rail__label {
  font-size: 0.94rem;
  font-weight: 600;
}

.rail__link:hover {
  background: rgba(244, 241, 234, 0.07);
  border-left-color: var(--cyan);
  color: var(--white);
}

.rail__link[aria-current="page"] {
  background: var(--violet);
  border-left-color: var(--cyan);
  color: var(--white);
}

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

.rail__cta {
  width: 100%;
  margin-top: 20px;
}

.rail__quick {
  margin-top: auto;
  padding-top: 26px;
}

.rail__quick-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.45);
}

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

.rail__quick-list a {
  display: inline-block;
  padding: 0.26rem 0.5rem;
  border: 1px solid rgba(244, 241, 234, 0.2);
  border-radius: 2px;
  font-size: 0.76rem;
  color: rgba(244, 241, 234, 0.8);
  text-decoration: none;
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.rail__quick-list a:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
}

/* 移动端票根条 */
.topbar {
  display: none;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--paper);
  text-decoration: none;
}

.topbar__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--violet);
  color: var(--white);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.topbar__name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(244, 241, 234, 0.32);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  background: rgba(0, 194, 255, 0.1);
}

.nav-toggle__bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before {
  top: -5px;
}

.nav-toggle__bars::after {
  top: 5px;
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--cyan);
  color: var(--cyan);
}

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

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(11, 16, 38, 0.58);
}

/* 阅读进度 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(
    90deg,
    var(--violet) 0%,
    var(--cyan) 70%,
    var(--orange) 100%
  );
  transition: transform 0.1s linear;
}

/* 回到顶部（由 JS 注入） */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 80;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(244, 241, 234, 0.3);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 0 rgba(95, 46, 234, 0.6);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  background: var(--violet);
  border-color: var(--cyan);
}

/* ---------- 6. 页脚：加宽通道区 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: radial-gradient(
      100% 70% at 100% 0%,
      rgba(95, 46, 234, 0.22),
      transparent 60%
    ),
    var(--ink);
  color: var(--paper);
  border-top: 4px solid var(--violet);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(244, 241, 234, 0.045) 0 1px,
    transparent 1px 32px
  );
}

.footer__channel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: start;
  padding: clamp(34px, 5vw, 62px) var(--pad-x);
  border-bottom: 1px dashed var(--rule-dark);
}

.footer__channel-kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 0.24rem 0.5rem;
  border: 1px solid rgba(0, 194, 255, 0.45);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer__channel-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--white);
}

.footer__channel-desc {
  max-width: 44ch;
  margin: 0 0 22px;
  font-size: 0.98rem;
  color: rgba(244, 241, 234, 0.76);
}

.footer__channel-btn {
  box-shadow: 4px 4px 0 0 rgba(255, 122, 26, 0.85);
}

.footer__channel-btn:hover {
  box-shadow: 6px 6px 0 0 rgba(255, 122, 26, 1);
}

.footer__ticket {
  position: relative;
  display: grid;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 28px);
  background: rgba(244, 241, 234, 0.045);
  border: 1px solid var(--rule-dark);
  border-radius: 3px;
}

.footer__ticket::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(244, 241, 234, 0.15);
  border-radius: 2px;
  pointer-events: none;
}

.footer__ticket-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

.footer__ticket-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: rgba(244, 241, 234, 0.7);
}

.footer__ticket-stamp {
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--rule-dark-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--mint);
}

.footer__body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 3.6vw, 50px);
  padding: clamp(30px, 4.5vw, 56px) var(--pad-x);
}

.footer__brand-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
}

.footer__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--violet);
  color: var(--white);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer__desc {
  max-width: 34ch;
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(244, 241, 234, 0.72);
}

.footer__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(0, 194, 255, 0.75);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 3vw, 48px);
}

.footer__group {
  min-width: 130px;
}

.footer__group-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer__links {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  font-size: 0.9rem;
  color: rgba(244, 241, 234, 0.74);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.footer__links a:hover {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 4px;
}

.footer__contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__contact-list li {
  display: grid;
  gap: 2px;
}

.footer__contact-key {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.45);
}

.footer__contact-val {
  font-size: 0.9rem;
  color: var(--paper);
}

.footer__note {
  max-width: 38ch;
  margin: 16px 0 0;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(244, 241, 234, 0.5);
}

.footer__legal {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 16px var(--pad-x) 22px;
  border-top: 1px solid var(--rule-dark);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(244, 241, 234, 0.55);
}

.footer__legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer__legal-links a {
  color: rgba(244, 241, 234, 0.7);
  text-decoration: none;
}

.footer__legal-links a:hover {
  color: var(--cyan);
}

.footer__icp {
  margin-left: auto;
  color: rgba(244, 241, 234, 0.45);
}

/* ---------- 7. 焦点与可访问 ---------- */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 1px;
}

.rail :focus-visible,
.topbar :focus-visible,
.site-footer :focus-visible,
.to-top:focus-visible {
  outline-color: var(--cyan);
}

/* ---------- 8. 响应式 ---------- */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
  }

  .skip-link {
    left: calc(var(--rail-w) + 12px);
  }

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

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

@media (max-width: 1023px) {
  body {
    padding-top: var(--topbar-h);
  }

  .rail {
    top: var(--topbar-h);
    bottom: 0;
    right: auto;
    width: min(84vw, 320px);
    padding-top: 20px;
    transform: translateX(-102%);
    transition: transform 0.22s var(--ease);
    box-shadow: 24px 0 60px -30px rgba(11, 16, 38, 0.9);
    z-index: 65;
  }

  .rail[data-open="true"] {
    transform: translateX(0);
  }

  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--topbar-h);
    padding: 0 14px 0 16px;
    background: var(--ink);
    color: var(--paper);
    border-bottom: 1px solid rgba(95, 46, 234, 0.5);
  }

  .scroll-progress {
    top: var(--topbar-h);
  }

  html.nav-open,
  html.nav-open body {
    overflow: hidden;
  }
}

@media (max-width: 960px) {
  .footer__body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid--editorial {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__channel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .footer__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__nav {
    gap: 28px;
  }

  .footer__icp {
    margin-left: 0;
    width: 100%;
  }

  .footer__legal {
    font-size: 0.68rem;
  }
}

/* ---------- 9. 动效可访问 ---------- */
@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;
  }

  .rail__badge::before {
    animation: none;
  }

  .btn:hover,
  .card:hover,
  .to-top {
    transform: none;
  }

  .scroll-progress__bar {
    transition: none;
  }
}
