:root {
  --c-space: #0A1128;
  --c-purple: #9D4EDD;
  --c-cyan: #00E5FF;
  --c-ruby: #C9184A;
  --c-indigo: #3700B3;
  --c-light: #E0E1DD;
  --c-muted: #9DA3AE;
  --c-glass: rgba(10, 17, 40, 0.75);
  --c-success: #06FFA5;
  --c-amber: #FFD166;

  --f-head: "Archivo Black", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --rail-w: 268px;
  --header-h: 64px;
  --dock-h: 64px;
  --max: 1180px;
  --cut: 12px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --z-header: 1000;
  --z-dock: 950;
  --z-search: 1200;
  --z-skip: 3000;
}

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

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

body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-light);
  background-color: var(--c-space);
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  min-height: 100vh;
}

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

a {
  color: var(--c-cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--f-head);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.05rem;
}

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

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

[hidden] {
  display: none !important;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--c-space);
}

::-webkit-scrollbar-thumb {
  background: rgba(157, 78, 221, 0.45);
  border-radius: 6px;
}

#main-content {
  margin-left: var(--rail-w);
  min-height: 70vh;
}

.container {
  width: min(var(--max), 100%);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

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

/* ---------- 页首与章节 ---------- */

.page-hero {
  padding: clamp(40px, 8vw, 88px) 0 clamp(28px, 5vw, 56px);
  position: relative;
}

.page-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--c-cyan);
  text-transform: uppercase;
}

.page-hero__title {
  font-family: var(--f-head);
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.05;
  color: #fff;
  margin-top: 12px;
}

.page-hero__desc {
  color: var(--c-muted);
  max-width: 62ch;
  margin-top: 14px;
  font-size: 1.05em;
}

.section {
  padding-block: clamp(36px, 6vw, 72px);
}

.section--narrow {
  max-width: 720px;
  margin-inline: auto;
}

.section--tint {
  background: linear-gradient(180deg, rgba(157, 78, 221, 0.1), rgba(0, 229, 255, 0.04));
  border-block: 1px solid rgba(157, 78, 221, 0.18);
}

.section-head {
  margin-bottom: 28px;
}

.section-head__kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--c-cyan);
  text-transform: uppercase;
}

.section-head__title {
  font-family: var(--f-head);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: #fff;
  margin-top: 6px;
}

.section-head__desc {
  color: var(--c-muted);
  margin-top: 8px;
  max-width: 60ch;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-muted);
  padding-block: 18px 0;
}

.breadcrumb__link {
  color: var(--c-muted);
  text-decoration: none;
}

.breadcrumb__link:hover {
  color: var(--c-cyan);
}

.breadcrumb__sep {
  color: var(--c-purple);
}

.breadcrumb__current {
  color: var(--c-light);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--c-purple), var(--c-indigo));
  border: 1px solid rgba(157, 78, 221, 0.6);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(157, 78, 221, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s;
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(157, 78, 221, 0.5);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(0, 229, 255, 0.5);
  color: var(--c-cyan);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(0, 229, 255, 0.08);
  color: #fff;
}

.btn--small {
  padding: 8px 14px;
  font-size: 13px;
}

/* ---------- 面板与色区 ---------- */

.hero-frame {
  position: relative;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 14px;
  padding: clamp(24px, 4vw, 48px);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(157, 78, 221, 0.18), transparent 55%),
    rgba(10, 17, 40, 0.6);
  overflow: hidden;
}

.hero-frame::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-top: 2px solid var(--c-cyan);
  border-right: 2px solid var(--c-cyan);
  opacity: 0.85;
  pointer-events: none;
}

.hero-frame::after {
  content: "";
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 26px;
  height: 26px;
  border-bottom: 2px solid var(--c-purple);
  border-left: 2px solid var(--c-purple);
  opacity: 0.85;
  pointer-events: none;
}

.cut-panel {
  position: relative;
  padding: 24px;
  background: var(--c-glass);
  border: 1px solid rgba(0, 229, 255, 0.18);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.tone {
  border-radius: 10px;
  padding: 24px;
}

.tone--purple {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), rgba(55, 0, 179, 0.12));
  border: 1px solid rgba(157, 78, 221, 0.4);
}

.tone--cyan {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(0, 229, 255, 0.03));
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.tone--ruby {
  background: linear-gradient(135deg, rgba(201, 24, 74, 0.18), rgba(201, 24, 74, 0.05));
  border: 1px solid rgba(201, 24, 74, 0.4);
}

.tone--amber {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(255, 209, 102, 0.04));
  border: 1px solid rgba(255, 209, 102, 0.32);
}

.tone--surface {
  background: var(--c-glass);
  border: 1px solid rgba(0, 229, 255, 0.16);
}

/* ---------- 媒体容器 ---------- */

.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.15), rgba(0, 229, 255, 0.08));
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 10px;
  aspect-ratio: 16 / 9;
}

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

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

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

.media-frame__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: var(--c-ruby);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 11px;
  border-radius: 4px;
  z-index: 1;
}

.media-frame__caption {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-muted);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ---------- 图例与筛选 ---------- */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 24px 0;
}

.legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--c-light);
}

.legend__mark {
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  transform: rotate(45deg);
  flex: none;
}

.legend__mark--purple {
  background: var(--c-purple);
}

.legend__mark--cyan {
  background: var(--c-cyan);
}

.legend__mark--ruby {
  background: var(--c-ruby);
}

.legend__mark--amber {
  background: var(--c-amber);
}

.legend__mark--success {
  background: var(--c-success);
}

.legend__mark--line {
  background: none;
  border-top: 2px dashed var(--c-cyan);
  width: 20px;
  height: 0;
  transform: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--c-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.filter-btn:hover {
  border-color: var(--c-cyan);
  color: #fff;
}

.filter-btn[data-active="true"] {
  background: var(--c-cyan);
  border-color: var(--c-cyan);
  color: #001018;
}

/* ---------- 卡片与杂项 ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: var(--c-glass);
  border: 1px solid rgba(157, 78, 221, 0.22);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(0, 229, 255, 0.45);
  transform: translateY(-2px);
}

.coord-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(0, 229, 255, 0.24);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-cyan);
  background: rgba(0, 229, 255, 0.06);
}

.notice-box {
  padding: 14px 16px;
  border-left: 3px solid var(--c-amber);
  background: rgba(255, 209, 102, 0.08);
  color: var(--c-light);
  font-size: 14px;
  border-radius: 0 8px 8px 0;
}

.notice-box--ruby {
  border-left-color: var(--c-ruby);
  background: rgba(201, 24, 74, 0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.14);
  text-align: left;
}

.data-table th {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--c-cyan);
  text-transform: uppercase;
}

/* ---------- 头部框架 ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: var(--z-header);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 90% at 10% 0%, rgba(157, 78, 221, 0.16), transparent 60%),
    linear-gradient(180deg, #0D1232 0%, #0A1128 55%, #0B0520 100%);
  border-right: 1px solid rgba(0, 229, 255, 0.16);
  box-shadow: 2px 0 30px rgba(0, 0, 0, 0.4);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-purple) 0%, var(--c-cyan) 70%, transparent 100%);
  z-index: 1;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  background: var(--c-cyan);
  color: #001018;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-70px);
  transition: transform 0.2s var(--ease);
}

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

.header-topbar {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 14px;
  border-bottom: 1px solid rgba(157, 78, 221, 0.22);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  width: fit-content;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--c-purple), var(--c-indigo) 70%, var(--c-ruby));
  color: #fff;
  font-family: var(--f-head);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  filter: drop-shadow(0 4px 20px rgba(157, 78, 221, 0.45));
}

.brand-name {
  font-family: var(--f-head);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.brand-slogan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-cyan);
}

.brand-slogan__mark {
  width: 8px;
  height: 8px;
  background: var(--c-cyan);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.7);
  flex: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.search-trigger {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 8px;
  color: var(--c-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.search-trigger:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--c-cyan);
  color: #fff;
}

.search-trigger__glyph {
  position: relative;
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 2px solid var(--c-cyan);
  border-radius: 50%;
  flex: none;
}

.search-trigger__glyph::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  background: var(--c-cyan);
  transform: rotate(45deg);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
}

.header-rail {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 14px 8px 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 78, 221, 0.5) transparent;
}

.rail-ornament {
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 6px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, rgba(0, 229, 255, 0.35) 0 2px, transparent 2px 8px);
  pointer-events: none;
}

.rail-ornament::before {
  content: "";
  position: absolute;
  bottom: 12%;
  left: -2.5px;
  width: 6px;
  height: 6px;
  background: var(--c-cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--c-cyan);
}

.rail-ornament::after {
  content: "";
  position: absolute;
  top: 30%;
  left: -3px;
  width: 7px;
  height: 7px;
  background: var(--c-purple);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(157, 78, 221, 0.8);
}

.nav-caption {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 16px 16px 8px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--c-light);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(157, 78, 221, 0.14), transparent 80%) no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.3s var(--ease), border-color 0.2s, color 0.2s;
}

.nav-link:hover {
  color: #fff;
  background-size: 100% 100%;
  border-left-color: var(--c-purple);
}

.nav-link[aria-current="page"] {
  color: #fff;
  border-left-color: var(--c-cyan);
  background-image: linear-gradient(90deg, rgba(0, 229, 255, 0.16), rgba(0, 229, 255, 0.04));
  background-size: 100% 100%;
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--c-cyan);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 10px var(--c-cyan);
}

.nav-link__idx {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-cyan);
  opacity: 0.8;
  min-width: 20px;
}

.nav-link[aria-current="page"] .nav-link__idx {
  opacity: 1;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.8);
}

.rail-coord {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 14px 10px 18px;
  border-top: 1px solid rgba(0, 229, 255, 0.14);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--c-muted);
}

.coord-block--status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-success);
}

.coord-block:last-child {
  color: var(--c-purple);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 8px rgba(6, 255, 165, 0.8);
  animation: pulse 2s ease-in-out infinite;
  flex: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ---------- 站内索引 ---------- */

.search-index {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-search);
  background: rgba(8, 13, 32, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(-110%);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
}

.search-index[data-open] {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.3s var(--ease);
}

.search-index__inner {
  max-width: 760px;
  margin-inline: auto;
  padding: 18px 16px 14px;
}

.search-index__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.search-index__caption {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--c-cyan);
  text-transform: uppercase;
}

.search-index__close {
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  color: var(--c-light);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.search-index__close:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--c-cyan);
  color: #fff;
}

.search-index__input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 10px;
  color: var(--c-light);
  font-family: var(--f-body);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-index__input::placeholder {
  color: var(--c-muted);
}

.search-index__input:focus {
  outline: none;
  border-color: var(--c-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.search-index__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding: 14px 0 4px;
}

.search-index__result-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.04);
  color: var(--c-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}

.search-index__result-link:hover {
  border-color: var(--c-cyan);
  background: rgba(0, 229, 255, 0.1);
  color: #fff;
}

.search-index__result-route {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--c-muted);
}

.search-index__empty {
  grid-column: 1 / -1;
  padding: 14px 4px;
  font-size: 13px;
  color: var(--c-muted);
}

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

.site-footer {
  margin-left: var(--rail-w);
  position: relative;
  z-index: 20;
  background:
    linear-gradient(180deg, rgba(157, 78, 221, 0.1), transparent 160px),
    #0A1128;
  border-top: 1px solid rgba(0, 229, 255, 0.14);
  color: var(--c-light);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.6), rgba(157, 78, 221, 0.6), transparent);
  opacity: 0.6;
}

.footer__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: 48px clamp(18px, 4vw, 40px) 26px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.4fr;
  gap: 36px;
}

.footer__brand-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--c-purple), var(--c-indigo));
  color: #fff;
  font-family: var(--f-head);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  filter: drop-shadow(0 4px 20px rgba(157, 78, 221, 0.4));
}

.footer__brand-name {
  font-family: var(--f-head);
  font-size: 18px;
  color: #fff;
  margin-top: 12px;
}

.footer__slogan {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--c-purple);
  text-transform: uppercase;
  margin-top: 6px;
}

.footer__trust {
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-muted);
  margin-top: 14px;
  max-width: 380px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.footer__caption {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 6px;
}

.footer__link {
  color: var(--c-light);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px dotted transparent;
  width: fit-content;
  transition: color 0.2s, border-color 0.2s;
}

.footer__link:hover {
  color: var(--c-cyan);
  border-bottom-color: var(--c-cyan);
}

.footer__contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  background: transparent;
  border: none;
  border-bottom: 1px dotted rgba(0, 229, 255, 0.3);
  color: var(--c-light);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  width: fit-content;
  transition: color 0.2s, border-color 0.2s;
}

.footer__contact:hover {
  color: var(--c-cyan);
  border-bottom-color: var(--c-cyan);
}

.footer__contact--text {
  cursor: text;
  opacity: 0.85;
}

.footer__contact-copy {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--c-cyan);
  padding: 2px 6px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  flex: none;
}

.footer__contact:hover .footer__contact-copy,
.footer__contact:focus-visible .footer__contact-copy {
  opacity: 1;
}

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 229, 255, 0.12);
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-muted);
}

.footer__icp {
  color: var(--c-light);
}

.footer__copy {
  margin-left: auto;
}

.footer__mono {
  color: var(--c-purple);
  letter-spacing: 0.08em;
}

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

@media (min-width: 960px) and (max-width: 1200px) {
  :root {
    --rail-w: 236px;
  }
}

@media (min-width: 960px) {
  .search-index {
    left: var(--rail-w);
  }
}

@media (max-width: 959px) {
  #main-content {
    margin-left: 0;
    padding-top: var(--header-h);
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: var(--header-h);
    flex-direction: row;
    background: rgba(8, 13, 32, 0.9);
    border-right: none;
    border-bottom: 1px solid rgba(0, 229, 255, 0.18);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  }

  .header-topbar {
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: none;
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .brand-link {
    flex-shrink: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 13px;
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  }

  .brand-name {
    font-size: 15px;
    white-space: nowrap;
  }

  .brand-slogan {
    display: none;
  }

  .topbar-actions {
    margin-top: 0;
    flex: none;
  }

  .search-trigger {
    width: 42px;
    height: 40px;
    padding: 0;
    justify-content: center;
    flex: none;
  }

  .search-trigger__label {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 40px;
    padding: 11px 10px;
    background: transparent;
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
  }

  .nav-toggle__bar {
    width: 100%;
    height: 2px;
    background: var(--c-cyan);
    border-radius: 2px;
    transition: transform 0.2s var(--ease), opacity 0.2s;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .header-rail {
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: var(--z-dock);
    flex: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    align-content: start;
    max-height: calc(100vh - var(--header-h) - 40px);
    padding: 10px;
    background: rgba(10, 17, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(157, 78, 221, 0.45);
    border-top: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 16px 16px 14px 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 229, 255, 0.06);
    overflow-y: auto;
    visibility: hidden;
    transform: translateY(calc(100% + 30px));
    transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
  }

  .header-rail[data-open] {
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.3s var(--ease);
  }

  .rail-ornament,
  .rail-coord {
    display: none;
  }

  .nav-caption {
    grid-column: 1 / -1;
    padding: 4px 6px 8px;
    border-bottom: 1px dashed rgba(157, 78, 221, 0.3);
    margin-bottom: 2px;
    font-size: 10px;
  }

  .nav-link {
    flex-direction: row;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-left-width: 1px;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(0, 229, 255, 0.03);
  }

  .nav-link:hover {
    background: rgba(157, 78, 221, 0.14);
    border-color: rgba(157, 78, 221, 0.5);
  }

  .nav-link[aria-current="page"] {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.45);
    background-size: auto;
  }

  .nav-link[aria-current="page"]::after {
    right: 8px;
    width: 5px;
    height: 5px;
  }

  .nav-link__idx {
    min-width: 16px;
    font-size: 10px;
  }

  .nav-link__label {
    white-space: nowrap;
  }

  .site-footer {
    margin-left: 0;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__copy {
    margin-left: 0;
  }

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

@media (hover: none) {
  .footer__contact-copy {
    opacity: 0.7;
  }
}

/* ---------- 减弱动效 ---------- */

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