@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --mint: #99ffcc;
  --neon: #00ff41;
  --ink: #001e3c;
  --ink-2: #012a52;
  --txt: #ddf5ec;
  --dim: #7ea9c2;
  --line: rgba(153, 255, 204, 0.18);
  --line-soft: rgba(153, 255, 204, 0.1);
  --glass: rgba(153, 255, 204, 0.055);
  --glass-2: rgba(153, 255, 204, 0.09);
  --rail: 272px;
  --bar: 46px;
  --r: 28px;
}

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

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

body {
  margin: 0;
  padding: var(--bar) 0 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--txt);
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(0, 255, 65, 0.16), transparent 62%),
    radial-gradient(900px 620px at 6% 104%, rgba(153, 255, 204, 0.14), transparent 60%),
    linear-gradient(175deg, #001e3c 0%, #00152b 58%, #000e1e 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (min-width: 980px) {
  body {
    padding-left: calc(var(--rail) + 34px);
  }
}

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

a:hover {
  color: var(--neon);
}

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

/* ---------- 顶部细条 ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--bar);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: rgba(0, 22, 44, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-txt {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.9);
  animation: breathe 2.8s ease-in-out infinite;
}

/* ---------- 有机光斑 ---------- */

.orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.5;
  will-change: transform;
}

.orb-1 {
  top: -60px;
  right: -40px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(0, 255, 65, 0.55), transparent 68%);
  animation: drift 22s ease-in-out infinite;
}

.orb-2 {
  top: 46%;
  left: 44%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(153, 255, 204, 0.42), transparent 70%);
  animation: drift 30s ease-in-out infinite reverse;
}

.orb-3 {
  bottom: -70px;
  left: 12%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 255, 65, 0.32), transparent 72%);
  animation: drift 26s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { translate: 0 0; scale: 1; }
  50% { translate: 42px -34px; scale: 1.14; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ---------- 骨架 ---------- */

.shell {
  position: relative;
  z-index: 1;
  display: block;
}

/* ---------- 左侧竖排导航 ---------- */

.rail {
  position: fixed;
  top: var(--bar);
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 26px 20px 24px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(0, 34, 62, 0.9), rgba(0, 18, 36, 0.82));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
  background: var(--glass-2);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px rgba(153, 255, 204, 0.04);
}

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

.mark-letter {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--neon);
}

.rail-title {
  margin: 14px 0 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--txt);
}

.rail hr {
  width: 56px;
  margin: 10px 0 16px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--txt);
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.2s ease, padding-left 0.25s ease;
}

.rail-link:hover,
.rail-link:focus-visible {
  background: var(--glass);
  border-color: var(--line);
  color: var(--mint);
  padding-left: 16px;
}

.rail-link.on {
  background: var(--glass-2);
  border-color: rgba(0, 255, 65, 0.4);
  color: var(--neon);
}

.rail-n {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.rail-link.on .rail-n {
  color: var(--neon);
}

.rail-t {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pulse {
  margin-top: auto;
  width: 100%;
  height: 78px;
  border-radius: var(--r);
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 65, 0.28), rgba(153, 255, 204, 0.05) 62%, transparent 74%);
  border: 1px solid var(--line-soft);
  animation: breathe 6.5s ease-in-out infinite;
}

/* ---------- 主区 ---------- */

.stage {
  position: relative;
  max-width: 768px;
  margin: 0 auto;
  padding: 0 22px 60px;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 52px 8px 56px;
  gap: 4px;
}

.hero-art {
  position: absolute;
  top: 12%;
  right: 2%;
  opacity: 0.8;
  animation: breathe 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-art svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--mint);
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.bubble-1 {
  top: 15%;
  left: 2%;
  animation: breathe 9s ease-in-out infinite;
}

.bubble-2 {
  top: 70%;
  left: 0;
  animation: breathe 11s ease-in-out infinite 1.2s;
}

.bubble-3 {
  top: 78%;
  right: 4%;
  animation: breathe 10s ease-in-out infinite 0.6s;
}

.badge {
  margin: 0 0 14px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(100deg, var(--neon), var(--mint));
  border-radius: 999px;
}

.hero-title {
  margin: 0;
  max-width: 15em;
  font-size: clamp(30px, 6.4vw, 54px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.035em;
  color: #f2fffa;
  text-shadow: 0 0 42px rgba(0, 255, 65, 0.22);
}

.lede {
  margin: 18px 0 0;
  max-width: 30em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--dim);
}

/* ---------- 正文 ---------- */

.prose {
  display: block;
}

.prose > div,
.prose > section {
  position: relative;
  margin: 0 0 26px;
  padding: 30px 26px;
  border-radius: var(--r);
  background: var(--glass);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 22px 50px -34px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  scroll-margin-top: calc(var(--bar) + 26px);
}

.prose > div:nth-child(2n),
.prose > section:nth-child(2n) {
  background: var(--glass-2);
}

.prose > div::before,
.prose > section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 26px;
  width: 64px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--neon), transparent);
  opacity: 0.7;
}

.prose [id] {
  scroll-margin-top: calc(var(--bar) + 26px);
}

.prose h2 {
  margin: 0 0 4px;
  font-size: clamp(21px, 3.2vw, 27px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #eefff8;
}

.prose h3 {
  margin: 26px 0 4px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--mint);
}

.prose p {
  margin: 14px 0;
}

.prose ul,
.prose ol {
  margin: 14px 0;
  padding-left: 22px;
}

.prose li {
  margin: 8px 0;
}

.prose li::marker {
  color: var(--neon);
}

.prose strong {
  color: #ffffff;
  font-weight: 700;
}

.prose blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--neon);
  border-radius: 0 18px 18px 0;
  background: rgba(0, 255, 65, 0.07);
  color: #e6fff5;
}

.prose blockquote p:first-child {
  margin-top: 0;
}

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.prose th {
  color: var(--mint);
  font-weight: 700;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 255, 65, 0.12);
  color: var(--mint);
}

hr {
  width: 100%;
  height: 1px;
  border: 0;
  margin: 12px 0 20px;
  background: linear-gradient(90deg, rgba(0, 255, 65, 0.6), rgba(153, 255, 204, 0.05));
}

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

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 22px 26px;
  border-top: 1px solid var(--line);
  background: rgba(0, 20, 40, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: clamp(24px, 4.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--mint);
  text-decoration: none;
}

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0;
}

.foot-nav dt,
.foot-nav dd {
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: var(--neon);
  background: var(--glass);
}

.copy {
  margin: 0 0 0 auto;
  font-size: 14px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- 移动端 ---------- */

@media (max-width: 979px) {
  body {
    padding-top: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
  }

  .rail {
    position: sticky;
    top: var(--bar);
    width: auto;
    bottom: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    z-index: 55;
  }

  .mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .rail-title {
    display: none;
  }

  .rail hr {
    display: none;
  }

  .rail-nav {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .rail-link {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 999px;
    border-color: var(--line-soft);
    white-space: nowrap;
  }

  .rail-link:hover,
  .rail-link:focus-visible {
    padding-left: 14px;
  }

  .rail-t {
    font-size: 15px;
  }

  .rail-n {
    display: none;
  }

  .pulse {
    display: none;
  }

  .stage {
    padding: 0 16px 48px;
  }

  .hero {
    min-height: 62vh;
    padding: 40px 4px 44px;
  }

  .hero-art {
    top: 6%;
    right: -6px;
    opacity: 0.45;
  }

  .hero-art svg {
    width: 92px;
    height: 92px;
  }

  .bubble {
    font-size: 13px;
    padding: 6px 11px;
  }

  .bubble-1 {
    top: 11%;
    left: 0;
  }

  .bubble-2 {
    top: 84%;
    left: 0;
  }

  .bubble-3 {
    top: 88%;
    right: 2%;
  }

  .prose > div,
  .prose > section {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 20px 16px 28px;
  }

  .copy {
    margin: 8px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb,
  .dot,
  .pulse,
  .hero-art,
  .bubble {
    animation: none !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
