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

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

:root {
  --ink: #001e3c;
  --ink-2: #012a52;
  --ink-3: #001428;
  --mint: #99ffcc;
  --green: #00ff41;
  --paper: #e8fff5;
  --body: #d3eee4;
  --muted: #8fb9c8;
  --r: 28px;
  --chrome: 8.3rem;
  --font-a: 'Outfit', 'Rubik', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-b: 'Rubik', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.78;
  color: var(--body);
  overflow-x: clip;
  background:
    radial-gradient(62vw 58vw at 10% -10%, rgba(153, 255, 204, .22), transparent 62%),
    radial-gradient(48vw 42vw at 94% 4%, rgba(0, 255, 65, .15), transparent 66%),
    radial-gradient(72vw 64vw at 50% 112%, rgba(153, 255, 204, .13), transparent 72%),
    var(--ink);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(153, 255, 204, .22) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .45;
  -webkit-mask-image: radial-gradient(82% 62% at 50% 22%, #000 18%, transparent 86%);
  mask-image: radial-gradient(82% 62% at 50% 22%, #000 18%, transparent 86%);
}

a { color: inherit; }

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

/* ---------- 顶部骨架 ---------- */
.chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}

.topline {
  margin: 0;
  display: flex;
  justify-content: center;
  padding: .4rem 1rem;
  background: rgba(0, 20, 42, .92);
  border-bottom: 1px solid rgba(153, 255, 204, .14);
}

.topline-t {
  font-size: .72rem;
  letter-spacing: .32em;
  color: var(--mint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .42rem clamp(.8rem, 3vw, 1.6rem);
  background: rgba(0, 30, 60, .84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(153, 255, 204, .1);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  background: linear-gradient(150deg, var(--mint), var(--green));
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 30, 60, .25);
}

.mark svg { width: 26px; height: 26px; }
.mark-img { width: 44px; height: 44px; object-fit: cover; }

.mark-dot {
  width: 15px;
  height: 15px;
  border-radius: 58% 42% 52% 48% / 48% 56% 44% 52%;
  background: var(--ink);
  animation: breath 6s ease-in-out infinite;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 .95rem;
  border: 0;
  border-radius: 999px;
  background: rgba(153, 255, 204, .14);
  color: var(--paper);
  font-family: inherit;
  font-size: .95rem;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .2s ease;
}

.burger:hover { background: rgba(153, 255, 204, .28); }

.burger-i {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--mint);
  box-shadow: 0 5px 0 var(--mint), 0 -5px 0 var(--mint);
  transition: background .2s ease;
}

.burger[aria-expanded="true"] .burger-i {
  background: var(--green);
  box-shadow: 0 5px 0 var(--green), 0 -5px 0 var(--green);
}

.anchors {
  display: flex;
  gap: .28rem;
  padding: .34rem clamp(.6rem, 3vw, 1.4rem);
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(0, 30, 60, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(153, 255, 204, .08);
}

.anchors::-webkit-scrollbar { display: none; }

.anchors a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .72rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: .85rem;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}

.anchors a:hover {
  color: var(--ink);
  background: var(--mint);
}

/* ---------- 全屏遮罩菜单 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--chrome) + 1rem) 1.2rem 2rem;
  background:
    radial-gradient(72vw 72vw at 50% 28%, rgba(0, 255, 65, .18), transparent 70%),
    rgba(0, 16, 34, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.drawer.open { opacity: 1; visibility: visible; }

.drawer-nav {
  display: grid;
  gap: .25rem;
  width: min(520px, 100%);
}

.drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 1rem;
  border-radius: 20px;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-a);
  font-size: 1.12rem;
  letter-spacing: .02em;
  transition: background .2s ease, color .2s ease, padding-left .2s ease;
}

.drawer-nav a:hover {
  background: rgba(153, 255, 204, .14);
  color: var(--mint);
  padding-left: 1.4rem;
}

html.lock { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 2.4rem);
  min-height: 45vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--chrome) + 1.7rem) clamp(1rem, 4vw, 2.4rem) 1.6rem;
  text-align: right;
}

.hero-art {
  flex: 0 0 auto;
  width: clamp(84px, 15vw, 148px);
  aspect-ratio: 1;
  position: relative;
  border-radius: 62% 38% 55% 45% / 48% 56% 44% 52%;
  background: linear-gradient(140deg, var(--mint), var(--green) 78%);
  box-shadow: 0 0 70px -10px rgba(0, 255, 65, .55);
  animation: morph 16s ease-in-out infinite alternate;
  will-change: transform, border-radius;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(rgba(0, 30, 60, .55) 1.2px, transparent 1.2px);
  background-size: 11px 11px;
  opacity: .6;
}

.hero-cell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  aspect-ratio: 1;
  margin: -17% 0 0 -17%;
  border-radius: 52% 48% 60% 40% / 44% 52% 48% 56%;
  background: rgba(0, 30, 60, .82);
  animation: breath 7s ease-in-out infinite;
}

.hero-txt { min-width: 0; }

.hero-k {
  display: block;
  font-size: .74rem;
  letter-spacing: .3em;
  color: var(--green);
  margin-bottom: .6rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-a);
  font-weight: 700;
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -.01em;
  color: #fff;
  text-shadow: 0 0 44px rgba(153, 255, 204, .28);
}

.hero-lede {
  margin: .85rem 0 0 auto;
  max-width: 44ch;
  font-size: .98rem;
  line-height: 1.85;
  color: #a9cfc4;
}

/* ---------- 主体 ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.4rem) 1rem;
}

.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: start;
  margin-top: 1.6rem;
}

.prose { min-width: 0; }

.prose > article {
  position: relative;
  margin: 0 0 1.1rem;
  padding: clamp(1.15rem, 2.4vw, 2rem);
  border-radius: var(--r);
  background: linear-gradient(158deg, rgba(2, 44, 84, .94), rgba(0, 24, 46, .94));
  box-shadow: 0 26px 50px -38px #000;
  scroll-margin-top: calc(var(--chrome) + 1.2rem);
  overflow: hidden;
}

.prose > article::after {
  content: "";
  position: absolute;
  right: 1.3rem;
  bottom: 1.1rem;
  width: 58px;
  height: 58px;
  border-radius: 60% 40% 50% 50% / 46% 54% 46% 54%;
  background: radial-gradient(circle, rgba(0, 255, 65, .34), transparent 70%);
  pointer-events: none;
}

.prose small {
  display: block;
  font-size: .73rem;
  letter-spacing: .26em;
  color: var(--green);
  margin-bottom: .5rem;
}

.prose h2 {
  font-family: var(--font-a);
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: .005em;
  color: var(--mint);
  margin: 0 0 .75rem;
}

.prose h3 {
  font-family: var(--font-a);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--green);
  margin: 1.5rem 0 .4rem;
}

.prose p { margin: 0 0 1rem; }

.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.prose li { margin: .3rem 0; }
.prose li::marker { color: var(--green); }
.prose strong { color: #f2fffa; font-weight: 600; }

.prose blockquote {
  margin: 1rem 0;
  padding: .8rem 1.1rem;
  border-radius: 0 18px 18px 0;
  background: rgba(153, 255, 204, .1);
  color: #d9f6ec;
}

.prose a {
  color: var(--mint);
  text-decoration-color: rgba(153, 255, 204, .45);
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--green); }

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
  margin: 1rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  margin: 1rem 0;
}

.prose th, .prose td {
  padding: .55rem .7rem;
  text-align: left;
  border-bottom: 1px solid rgba(153, 255, 204, .18);
}

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

.prose code {
  font-size: .9em;
  background: rgba(0, 255, 65, .13);
  border-radius: 6px;
  padding: .1em .38em;
}

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: calc(var(--chrome) + .9rem);
  padding: 1.1rem 1rem 1.2rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(1, 36, 66, .94), rgba(0, 22, 42, .94));
  box-shadow: inset 0 0 0 1px rgba(153, 255, 204, .1);
}

.rail small {
  display: block;
  font-size: .71rem;
  letter-spacing: .24em;
  color: var(--green);
  margin-bottom: .4rem;
}

.rail h2 {
  margin: 0 0 .85rem;
  font-family: var(--font-a);
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.4;
  color: var(--mint);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .12rem;
  counter-reset: railc;
}

.rail-list li { counter-increment: railc; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .6rem;
  border-radius: 13px;
  font-size: .93rem;
  color: #c9e6dc;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.rail-list a::before {
  content: counter(railc, decimal-leading-zero);
  margin-right: .6rem;
  font-size: .7rem;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: rgba(153, 255, 204, .6);
}

.rail-list a:hover {
  background: rgba(153, 255, 204, .13);
  color: var(--mint);
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  margin-top: 2.6rem;
  padding: 0 clamp(1rem, 4vw, 2.4rem) 1.6rem;
}

.cta {
  max-width: 1180px;
  margin: 0 auto 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border-radius: var(--r);
  background:
    radial-gradient(90% 130% at 0% 0%, rgba(153, 255, 204, .3), transparent 62%),
    linear-gradient(118deg, #00294c, var(--ink-3));
  box-shadow: inset 0 0 0 1px rgba(153, 255, 204, .12);
}

.cta-k {
  margin: 0;
  font-family: var(--font-a);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.25;
  letter-spacing: .02em;
  color: #fff;
}

.cta-a {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: 999px;
  background: var(--green);
  color: #00240c;
  font-family: var(--font-a);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cta-a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(0, 255, 65, .8);
}

.foot-row {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(153, 255, 204, .14);
}

.foot-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  overflow: hidden;
  text-decoration: none;
  background: rgba(153, 255, 204, .18);
  color: var(--mint);
}

.foot-mark svg { width: 22px; height: 22px; }
.foot-mark .mark-img { width: 40px; height: 40px; object-fit: cover; }
.foot-mark .mark-dot { background: var(--mint); }

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem .15rem;
  margin: 0;
}

.foot-nav dd { width: 0; margin: 0; }

.foot-nav dt a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .55rem;
  border-radius: 999px;
  font-size: .86rem;
  color: #a6c9be;
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}

.foot-nav dt a:hover {
  color: var(--ink);
  background: var(--mint);
}

.copy {
  margin: 0;
  font-size: .82rem;
  letter-spacing: .04em;
  color: #7ea8b5;
}

/* ---------- 动效 ---------- */
@keyframes morph {
  0%   { border-radius: 62% 38% 55% 45% / 48% 56% 44% 52%; }
  34%  { border-radius: 44% 56% 38% 62% / 58% 42% 60% 40%; }
  67%  { border-radius: 56% 44% 62% 38% / 40% 60% 42% 58%; }
  100% { border-radius: 38% 62% 46% 54% / 56% 44% 58% 42%; }
}

@keyframes breath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.14); }
}

.js .prose > article,
.js .rail {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .62s ease, transform .62s cubic-bezier(.2, .7, .3, 1);
}

.js .prose > article.is-in,
.js .rail.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  :root { --chrome: 7.7rem; }

  .body { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; margin-top: .4rem; }
  .rail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose > article::after { width: 44px; height: 44px; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }

  .hero {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: .9rem;
    min-height: 45vh;
    text-align: right;
  }

  .hero-art { width: 74px; animation-duration: 22s; }
  .hero-lede { font-size: .95rem; }
  .anchors a { padding: 0 .62rem; font-size: .8rem; }
  .cta { flex-direction: column; align-items: flex-start; }
  .cta-a { width: 100%; justify-content: center; }
  .rail-list { grid-template-columns: minmax(0, 1fr); }
  .foot-row { justify-content: flex-start; }
}

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

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .js .prose > article,
  .js .rail { opacity: 1; transform: none; }
}

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