:root {
  --ink: #001e3c;
  --ink-deep: #001227;
  --ink-soft: #032a4e;
  --mint: #99ffcc;
  --green: #00ff41;
  --text: #d8efe3;
  --text-dim: #9dc2b3;
  --line: rgba(153, 255, 204, 0.22);
  --line-soft: rgba(153, 255, 204, 0.12);
  --rail: 240px;
  --serif: 'Bodoni Moda', 'Songti SC', Georgia, serif;
  --sans: 'Jost', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: 0.01em;
}

body::before {
  content: '';
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  filter: blur(34px);
  background:
    radial-gradient(38vmax 32vmax at 22% 18%, rgba(0, 255, 65, 0.26), transparent 62%),
    radial-gradient(30vmax 28vmax at 82% 42%, rgba(153, 255, 204, 0.22), transparent 65%),
    radial-gradient(44vmax 34vmax at 60% 96%, rgba(0, 255, 65, 0.14), transparent 70%);
  animation: breathe 16s ease-in-out infinite alternate;
}

@keyframes breathe {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
    opacity: 0.45;
  }
  100% {
    transform: scale(1.14) translate3d(-2%, -1.5%, 0);
    opacity: 0.75;
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 240px 0;
  }
}

::selection {
  background: var(--green);
  color: var(--ink-deep);
}

a {
  color: var(--mint);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--green);
}

menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.01em;
}

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

.topline {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 34px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(0, 18, 39, 0.92);
}

.topline-text {
  margin: 0;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1;
  color: var(--mint);
  letter-spacing: 0.24em;
  white-space: nowrap;
  opacity: 0.72;
}

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

.masthead {
  position: fixed;
  top: 34px;
  left: 0;
  bottom: 0;
  z-index: 50;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 26px 22px 22px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 30, 60, 0.94), rgba(0, 18, 39, 0.96));
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
  color: var(--mint);
  letter-spacing: 0.04em;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50% 42% 55% 45%;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 17px;
  background: rgba(0, 255, 65, 0.08);
}

.brand-name {
  display: block;
}

.side-nav {
  flex: 1;
}

.nav-details > summary {
  list-style: none;
  cursor: pointer;
}

.nav-details > summary::-webkit-details-marker {
  display: none;
}

.nav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--mint);
  font-size: 16px;
  letter-spacing: 0.18em;
  background: rgba(153, 255, 204, 0.04);
}

.nav-summary:hover {
  border-color: var(--green);
  background: rgba(0, 255, 65, 0.09);
}

.bars {
  width: 20px;
  height: 12px;
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 100% 1px;
  background-repeat: repeat-y;
  background-position: 0 0;
  background-origin: content-box;
  padding: 5px 0;
  opacity: 0.9;
}

.nav-details[open] .bars {
  opacity: 0.45;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-menu a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 2px 9px 18px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line-soft);
}

.nav-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 55% 45% 60% 40%;
  background: var(--mint);
  transform: scale(0.7);
  opacity: 0.45;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--green);
}

.nav-menu a:hover::before,
.nav-menu a:focus-visible::before {
  transform: scale(1.15);
  opacity: 1;
  background: var(--green);
}

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

.page-main {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  padding-top: 34px;
}

.page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  grid-column: 1 / -1;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  padding: 90px 48px 72px;
  background:
    radial-gradient(60% 70% at 20% 30%, rgba(0, 255, 65, 0.18), transparent 70%),
    radial-gradient(70% 80% at 85% 85%, rgba(153, 255, 204, 0.16), transparent 72%),
    var(--ink-deep);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.85) contrast(1.05);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(255deg, rgba(0, 18, 39, 0.9) 8%, rgba(0, 18, 39, 0.42) 52%, rgba(0, 18, 39, 0.86) 100%),
    linear-gradient(180deg, rgba(0, 30, 60, 0.15), rgba(0, 30, 60, 0.95));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin-left: auto;
  text-align: right;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 6.2vw, 4.6rem);
  line-height: 1.04;
  color: #f2fff8;
  text-shadow: 0 0 42px rgba(0, 255, 65, 0.28);
}

.hero-sub {
  margin: 22px 0 0;
  max-width: 46ch;
  margin-left: auto;
  font-size: 17px;
  line-height: 1.78;
  color: rgba(216, 239, 227, 0.86);
}

.hero-badge {
  position: absolute;
  z-index: 3;
  top: 96px;
  right: 48px;
  padding: 8px 18px;
  border: 1px solid var(--green);
  border-radius: 999px;
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--green);
  background: rgba(0, 30, 60, 0.55);
  box-shadow: 0 0 26px rgba(0, 255, 65, 0.28);
  animation: floaty 7s ease-in-out infinite;
}

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

.prose {
  grid-column: 1;
  min-width: 0;
  max-width: 840px;
  padding: 8px 40px 40px 48px;
}

.prose > section {
  padding: 34px 0 44px;
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: 96px;
}

.prose > section:last-child {
  border-bottom: none;
}

.prose h2 {
  position: relative;
  margin: 0 0 18px;
  padding-left: 28px;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.24;
  color: var(--mint);
}

.prose h2 span {
  display: inline;
}

.prose h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 12px;
  border-radius: 55% 45% 60% 40%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.75);
}

.prose h3 {
  position: relative;
  margin: 32px 0 12px;
  padding-left: 24px;
  font-size: 1.25rem;
  line-height: 1.35;
  color: #e6fff3;
}

.prose h3 span {
  display: inline;
}

.prose h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--mint);
}

.prose p {
  margin: 15px 0;
  line-height: 1.86;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 15px 0;
  padding-left: 1.3em;
}

.prose li {
  margin: 9px 0;
  line-height: 1.75;
}

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

.prose a {
  color: var(--green);
  border-bottom: 1px solid rgba(0, 255, 65, 0.4);
}

.prose strong {
  color: #eafff4;
  font-weight: 600;
}

.prose blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--green);
  color: #bfe6d4;
}

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

.prose time {
  display: inline-block;
  font-size: 16px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

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

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

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

.prose code {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(153, 255, 204, 0.12);
  color: var(--mint);
  font-size: 16px;
}

/* ---------- 右侧栏 ---------- */

.rail {
  grid-column: 2;
  position: sticky;
  top: 96px;
  align-self: start;
  margin: 60px 36px 0 0;
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 30, 60, 0.6);
}

.rail-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  color: var(--mint);
}

.rail-title span {
  display: inline;
}

.rail-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line-soft);
}

.rail-menu a:hover,
.rail-menu a:focus-visible {
  color: var(--green);
}

.rail-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
  color: var(--mint);
  background: rgba(153, 255, 204, 0.05);
}

.rail-top:hover {
  border-color: var(--green);
  color: var(--green);
}

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

.site-foot {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 72px 48px 26px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 18, 39, 0.5), var(--ink-deep));
}

.foot-cta {
  grid-column: 1 / -1;
  padding-bottom: 34px;
  border-bottom: 1px dashed var(--line-soft);
}

.foot-cta h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  background: linear-gradient(90deg, var(--mint), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-cta h2 span {
  display: inline;
}

.foot-cta p {
  margin: 0 0 22px;
  max-width: 62ch;
  color: var(--text-dim);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 30px;
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  font-size: 16px;
  letter-spacing: 0.1em;
  background: rgba(0, 255, 65, 0.08);
  transition: background 0.25s ease, color 0.25s ease;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  background: var(--green);
  color: var(--ink-deep);
}

.foot-col h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  color: var(--mint);
}

.foot-col h3 span {
  display: inline;
}

.foot-key {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dim);
}

.foot-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 0;
  font-size: 16px;
  color: var(--text-dim);
}

.foot-menu a:hover,
.foot-menu a:focus-visible {
  color: var(--green);
}

.foot-copy {
  grid-column: 1 / -1;
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ---------- 滚动显影 ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

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

@media (max-width: 1180px) {
  .page-body {
    grid-template-columns: minmax(0, 1fr) 264px;
  }

  .prose {
    padding-right: 30px;
    padding-left: 40px;
  }
}

@media (max-width: 900px) {
  .masthead {
    right: 0;
    bottom: auto;
    width: auto;
    height: auto;
    gap: 10px;
    padding: 10px 16px 12px;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    min-height: 44px;
    font-size: 19px;
  }

  .side-nav {
    flex: none;
  }

  .nav-summary {
    margin-bottom: 10px;
  }

  .nav-details {
    position: relative;
  }

  .nav-details[open] .nav-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 55;
    max-height: 68vh;
    overflow-y: auto;
    padding: 8px 14px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(0, 18, 39, 0.98);
    backdrop-filter: blur(12px);
  }

  .page-main {
    margin-left: 0;
    padding-top: 132px;
  }

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

  .hero {
    min-height: 72vh;
    align-items: center;
    padding: 64px 20px 48px;
  }

  .hero-badge {
    top: 22px;
    right: 20px;
    padding: 6px 14px;
    animation: none;
  }

  .hero-inner {
    max-width: 100%;
    text-align: right;
  }

  .hero-sub {
    margin-left: auto;
  }

  .prose {
    max-width: 100%;
    padding: 4px 20px 30px;
  }

  .prose > section {
    padding: 28px 0 34px;
    scroll-margin-top: 150px;
  }

  .rail {
    position: static;
    grid-column: 1;
    margin: 22px 20px 34px;
  }

  .site-foot {
    margin-left: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 52px 20px 22px;
  }

  .foot-cta,
  .foot-copy {
    grid-column: 1;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2rem;
  }

  .topline-text {
    padding-left: 14px;
    letter-spacing: 0.16em;
  }
}

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

  body::before,
  .hero-badge {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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