:root {
  --ink: #061633;
  --panel: #0E2450;
  --neon: #35FF8B;
  --orange: #FF7A33;
  --violet: #9B6BFF;
  --white: #F2F6FF;
  --mist: #93A6CC;
  --steel: #1D3260;
  --gold: #FFD24A;
  --rail-w: 88px;
  --shell-max: 1240px;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html {
  background-color: var(--ink);
  background-image:
    radial-gradient(760px 520px at 84% -8%, rgba(53, 255, 139, .13), transparent 68%),
    radial-gradient(680px 520px at 6% 14%, rgba(155, 107, 255, .13), transparent 70%),
    linear-gradient(to right, rgba(29, 50, 96, .5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(29, 50, 96, .32) 1px, transparent 1px);
  background-size: auto, auto, 88px 88px, 88px 88px;
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .6em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--white);
}

h1 { font-size: clamp(32px, 5vw, 60px); font-weight: 900; }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: clamp(18px, 2vw, 24px); }
h4 { font-size: 17px; }

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

a { color: var(--neon); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #7BFFB5; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

strong, b { font-weight: 700; }
small { font-size: 13px; color: var(--mist); }

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

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--neon);
  color: #04122A;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transform: translateY(-220%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); color: #04122A; }

/* ---------- 侧边轨道导航 ---------- */

.site-header { position: relative; z-index: 60; }

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  background: linear-gradient(180deg, #0A2050 0%, #05122B 62%, #040E22 100%);
  border-right: 1px solid var(--steel);
  transition: width .3s cubic-bezier(.2, .7, .3, 1);
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  height: 92px;
  padding: 0 21px;
  overflow: hidden;
  text-decoration: none;
  border-bottom: 1px solid var(--steel);
}
.rail__brand:hover { text-decoration: none; }

.rail__mark {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  font-style: italic;
  color: var(--neon);
  border: 1px solid rgba(53, 255, 139, .55);
  background: rgba(53, 255, 139, .08);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.rail__brandname {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--white);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s ease .06s;
}

.rail__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) transparent;
}
.rail__nav::-webkit-scrollbar { width: 4px; }
.rail__nav::-webkit-scrollbar-track { background: transparent; }
.rail__nav::-webkit-scrollbar-thumb { background: var(--steel); }

.rail__list { list-style: none; margin: 18px 0; padding: 0; }
.rail__item { margin: 0 0 4px; }

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 21px;
  overflow: hidden;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease;
}
.rail__link:hover { color: var(--white); background: rgba(53, 255, 139, .08); text-decoration: none; }
.rail__link:hover .rail__num { color: var(--neon); }

.rail__num {
  flex: 0 0 46px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  color: var(--mist);
  transition: color .2s ease;
}

.rail__label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .18s ease .05s;
}

.rail__link[aria-current="page"] {
  color: var(--neon);
  background: linear-gradient(90deg, rgba(53, 255, 139, .18), rgba(53, 255, 139, 0));
}
.rail__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  background: var(--neon);
  box-shadow: 0 0 14px rgba(53, 255, 139, .8);
}
.rail__link[aria-current="page"] .rail__num { color: var(--neon); }

.rail__pulse {
  flex: 0 0 auto;
  padding: 18px 21px 26px;
  overflow: hidden;
  border-top: 1px solid var(--steel);
  background: linear-gradient(180deg, rgba(53, 255, 139, .07), transparent);
}
.rail__pulse-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--mist);
  white-space: nowrap;
}
.rail__pulse-num {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--neon);
  white-space: nowrap;
}

.rail__progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--neon), var(--violet));
  pointer-events: none;
  transition: height .12s linear;
}

/* ---------- 移动抽屉按钮 ---------- */

.nav-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 90;
  display: none;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  background: rgba(6, 22, 51, .92);
  border: 1px solid rgba(53, 255, 139, .55);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  cursor: pointer;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: background-color .2s ease;
}
.nav-toggle:hover { background: rgba(53, 255, 139, .16); }

.nav-toggle__bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color .2s ease;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform .22s ease, top .22s ease;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

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

.site-footer {
  position: relative;
  z-index: 10;
  margin-top: 104px;
  background: linear-gradient(180deg, #08204A 0%, #051530 55%, #040E22 100%);
  clip-path: polygon(0 34px, 52% 0, 100% 26px, 100% 100%, 0 100%);
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px 48px;
  width: min(100% - 48px, var(--shell-max));
  margin: 0 auto;
  padding: 82px 0 48px;
}

.footer__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  color: var(--neon);
  border: 1px solid rgba(53, 255, 139, .55);
  background: rgba(53, 255, 139, .08);
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
}
.footer__name {
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .02em;
}
.footer__tagline { margin: 0; color: var(--mist); font-size: 15px; }
.footer__brand::after {
  content: "";
  display: block;
  width: 62px;
  height: 2px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--neon), rgba(53, 255, 139, 0));
}

.footer__title {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--mist);
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 15px;
  line-height: 1.6;
}
.footer__list li { margin: 0; }

.footer__list a {
  position: relative;
  display: inline-block;
  padding-left: 16px;
  color: var(--white);
  text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.footer__list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--mist);
  transform: translateY(-50%);
  transition: width .2s ease, background-color .2s ease;
}
.footer__list a:hover { color: var(--neon); padding-left: 22px; }
.footer__list a:hover::before { width: 12px; background: var(--neon); }

.footer__key {
  display: inline-block;
  min-width: 42px;
  margin-right: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mist);
  vertical-align: 1px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  width: min(100% - 48px, var(--shell-max));
  margin: 0 auto;
  padding: 22px 0 36px;
  border-top: 1px solid var(--steel);
  font-size: 13.5px;
  color: var(--mist);
}
.footer__copy, .footer__icp { margin: 0; }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__legal li { margin: 0; }
.footer__legal a {
  color: var(--mist);
  text-decoration: none;
  transition: color .2s ease;
}
.footer__legal a:hover { color: var(--neon); }

/* ---------- 通用容器与排版 ---------- */

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

.mono, code, kbd, samp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .26em;
  color: var(--neon);
  text-transform: uppercase;
}

.rule {
  height: 1px;
  border: 0;
  margin: 46px 0;
  background: linear-gradient(90deg, var(--steel), rgba(29, 50, 96, .08));
  transform: skewY(-1.2deg);
}

.stack > * + * { margin-top: 18px; }

.grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.crumbs { display: block; }
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mist);
}
.crumbs__list li { display: flex; align-items: center; margin: 0; }
.crumbs__list li + li::before {
  content: "/";
  margin: 0 9px;
  color: var(--steel);
}
.crumbs__list a { color: var(--mist); text-decoration: none; transition: color .2s ease; }
.crumbs__list a:hover { color: var(--neon); }
.crumbs__list [aria-current="page"] { color: var(--neon); }

/* ---------- 章节体系 ---------- */

.chapter { margin-top: 78px; }
.chapter:first-child { margin-top: 0; }

.chapter__head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.chapter__num {
  font-family: var(--font-mono);
  font-size: clamp(40px, 6vw, 82px);
  font-weight: 700;
  line-height: .86;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(53, 255, 139, .75);
  opacity: .55;
  transition: opacity .6s ease;
}
.chapter__num.is-lit { opacity: 1; }

.chapter__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -.005em;
}

/* ---------- 面板 / 标签 / 表格 ---------- */

.panel {
  position: relative;
  padding: 28px 26px;
  background: linear-gradient(152deg, #10264E 0%, #0A1B3A 58%, #0C2247 100%);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  transition: transform .26s cubic-bezier(.2, .7, .3, 1);
}
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), rgba(53, 255, 139, 0));
  opacity: .5;
  transition: opacity .24s ease;
}
.panel:hover { transform: translateY(-4px); }
.panel:hover::before { opacity: 1; }

.panel--violet::before { background: linear-gradient(90deg, var(--violet), rgba(155, 107, 255, 0)); }
.panel--amber::before { background: linear-gradient(90deg, var(--orange), rgba(255, 122, 51, 0)); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.6;
  border: 1px solid currentColor;
  white-space: nowrap;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.tag--alert { color: var(--orange); background: rgba(255, 122, 51, .12); }
.tag--live { color: var(--neon); background: rgba(53, 255, 139, .12); }
.tag--plan { color: var(--violet); background: rgba(155, 107, 255, .12); }
.tag--hold { color: var(--gold); background: rgba(255, 210, 74, .12); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--mist);
  border-bottom: 1px solid var(--steel);
  white-space: nowrap;
}
.data-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(29, 50, 96, .7);
  vertical-align: middle;
}
.data-table tbody tr { transition: background-color .18s ease; }
.data-table tbody tr:hover { background: rgba(53, 255, 139, .07); }
.data-table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--steel);
  background: rgba(14, 36, 80, .75);
  color: var(--white);
  cursor: pointer;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
}
.btn:hover {
  transform: translateY(-2px);
  background: rgba(29, 50, 96, .95);
  color: var(--white);
  text-decoration: none;
}
.btn--primary {
  background: var(--neon);
  border-color: var(--neon);
  color: #03142E;
}
.btn--primary:hover { background: #5CFFAA; color: #03142E; }
.btn--violet {
  background: transparent;
  border-color: var(--violet);
  color: #C7ACFF;
}
.btn--violet:hover { background: rgba(155, 107, 255, .18); color: #DCCBFF; }

/* ---------- 图片容器基础规则 ---------- */

.frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #0E2450 0%, #071733 55%, #12294F 100%);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}
.frame > img,
.frame > picture > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--frame-ratio, 3 / 2);
  object-fit: cover;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: linear-gradient(to right, rgba(53, 255, 139, .08) 1px, transparent 1px);
  background-size: 28px 28px;
}
.frame--wide { --frame-ratio: 21 / 9; }
.frame--square { --frame-ratio: 1 / 1; }
.frame--tall { --frame-ratio: 3 / 4; }

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

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(16px);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 断点 ---------- */

@media (min-width: 961px) {
  body { padding-left: var(--rail-w); }

  .rail:hover,
  .rail:focus-within { width: 252px; }

  .rail:hover .rail__label,
  .rail:focus-within .rail__label,
  .rail:hover .rail__brandname,
  .rail:focus-within .rail__brandname { opacity: 1; }
}

@media (max-width: 960px) {
  body { padding-top: 74px; }

  .nav-toggle { display: inline-flex; }

  .rail {
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: min(82vw, 320px);
    border-right: 0;
    border-left: 1px solid var(--steel);
    box-shadow: -28px 0 70px rgba(0, 0, 0, .6);
    transform: translateX(102%);
    transition: transform .32s cubic-bezier(.2, .7, .3, 1);
  }
  .rail[data-open] { transform: translateX(0); }

  .rail__brand { height: 80px; }
  .rail__brandname { opacity: 1; }
  .rail__label { opacity: 1; }
  .rail__link { height: 58px; }
  .rail__link[aria-current="page"]::before { top: 15px; bottom: 15px; }

  .footer__inner { grid-template-columns: 1fr; gap: 34px; padding: 64px 0 40px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

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

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .shell { width: min(100% - 32px, var(--shell-max)); }
  .footer__inner, .footer__bottom { width: min(100% - 32px, var(--shell-max)); }
  .site-footer { clip-path: polygon(0 18px, 100% 0, 100% 100%, 0 100%); }
  .chapter { margin-top: 58px; }
  .panel { padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal].is-pending { opacity: 1; transform: none; }
  .panel:hover, .btn:hover { transform: none; }
}
