:root{
  --ink:#192617;
  --ink2:#101a10;
  --pgr:#87ff71;
  --blu:#01cdfe;
  --pnk:#ff71ce;
  --vio:#b967ff;
  --txt:#d8ebdb;
  --dim:#8cab95;
  --line:rgba(135,255,113,.22);
  --rail:236px;
  --mono:"Roboto Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --sans:"Exo",system-ui,-apple-system,"Segoe UI","Noto Sans SC","Microsoft YaHei",sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  padding:30px 0 0 var(--rail);
  min-height:100vh;
  background:
    linear-gradient(180deg,rgba(25,38,23,.96),rgba(16,26,16,1) 70vh),
    var(--ink);
  color:var(--txt);
  font-family:var(--sans);
  font-size:17px;
  font-weight:300;
  line-height:1.78;
  letter-spacing:.01em;
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:60;
  pointer-events:none;
  background:repeating-linear-gradient(180deg,rgba(255,255,255,.045) 0 1px,rgba(0,0,0,0) 1px 3px);
  opacity:.7;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(135,255,113,.05) 1px,transparent 1px),
    linear-gradient(90deg,rgba(1,205,254,.045) 1px,transparent 1px);
  background-size:100% 88px,88px 100%;
}
::selection{background:var(--pgr);color:var(--ink)}
a{color:var(--blu);text-decoration:none}
a:focus-visible,button:focus-visible{outline:2px solid var(--pgr);outline-offset:3px}
img{max-width:100%;height:auto}

/* ---------- 顶部细条 ---------- */
.strip{
  position:fixed;
  top:0;left:0;right:0;
  height:30px;
  z-index:70;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 16px;
  background:linear-gradient(90deg,var(--pnk) 0%,var(--vio) 38%,var(--blu) 78%,var(--pgr) 100%);
  color:var(--ink2);
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:.34em;
  text-transform:uppercase;
  overflow:hidden;
}
.strip-t{white-space:nowrap;font-weight:700}
.strip-l{
  flex:1;
  height:1px;
  background:repeating-linear-gradient(90deg,rgba(16,26,16,.75) 0 12px,transparent 12px 20px);
}

/* ---------- 左侧竖排栏 ---------- */
.rail{
  position:fixed;
  top:30px;left:0;bottom:0;
  width:var(--rail);
  z-index:50;
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:24px 16px 28px;
  border-right:1px solid var(--line);
  background:linear-gradient(180deg,rgba(25,38,23,.97),rgba(16,26,16,.94));
  backdrop-filter:blur(8px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:4px 2px 14px;
  border-bottom:1px solid var(--line);
  color:#f2fff2;
  text-decoration:none;
  font-weight:600;
  font-size:19px;
  letter-spacing:.16em;
}
.brand:hover .bt{color:var(--pgr);text-shadow:0 0 14px rgba(135,255,113,.75)}
.bm{
  width:15px;height:15px;
  flex:0 0 auto;
  border-radius:50%;
  background:radial-gradient(circle at 34% 30%,#fff6a8,var(--pnk) 46%,var(--vio) 100%);
  box-shadow:0 0 12px rgba(255,113,206,.75);
}
.bt{transition:color .2s,text-shadow .2s}
.railnav{display:flex;flex-direction:column;gap:2px}
.rl{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:10px 8px;
  color:var(--txt);
  text-decoration:none;
  font-size:16px;
  line-height:1.4;
  border-bottom:1px solid rgba(135,255,113,.09);
  transition:color .18s,transform .18s,border-color .18s,background .18s;
  animation:slidein .45s both;
  animation-delay:calc(var(--i) * 55ms + 80ms);
}
.rl .dot{
  width:6px;height:6px;
  flex:0 0 auto;
  background:var(--blu);
  box-shadow:0 0 8px var(--blu);
  transition:transform .22s,background .22s,box-shadow .22s;
}
.rl:hover,.rl:focus-visible{
  color:var(--pgr);
  transform:translateX(4px);
  border-bottom-color:var(--pgr);
  background:linear-gradient(90deg,rgba(135,255,113,.09),transparent);
}
.rl:hover .dot,.rl:focus-visible .dot{
  background:var(--pgr);
  box-shadow:0 0 12px var(--pgr);
  transform:rotate(45deg) scale(1.25);
}
@keyframes slidein{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}

/* ---------- 版面 ---------- */
.wrap{
  display:grid;
  grid-template-columns:186px minmax(0,1fr);
  gap:46px;
  align-items:start;
  max-width:1180px;
  margin:0 auto;
  padding:0 34px 74px;
}
main{grid-column:2;grid-row:1;min-width:0}
section{min-width:0}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:26px;
  min-height:calc(100vh - 30px);
  min-height:calc(100svh - 30px);
  padding:clamp(30px,5vw,58px) 0 0;
  margin-bottom:6px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,#ff71ce 0%,#ffa8e2 20%,#65d8f4 58%,#b967ff 100%);
  overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:44%;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(16,26,16,.5) 1px,transparent 1px),
    linear-gradient(90deg,rgba(16,26,16,.5) 1px,transparent 1px);
  background-size:100% 30px,44px 100%;
  transform:perspective(300px) rotateX(63deg);
  transform-origin:bottom center;
  opacity:.5;
}
.hero-txt{
  text-align:right;
  padding:0 clamp(18px,3vw,34px);
  animation:fadein .8s ease both;
}
@keyframes fadein{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.hero h1{
  margin:0 0 12px;
  color:#0e1910;
  font-size:clamp(31px,5.2vw,62px);
  font-weight:700;
  line-height:1.14;
  letter-spacing:-.015em;
  text-shadow:0 1px 0 rgba(255,255,255,.5);
  animation:glitch 7s steps(1) infinite;
}
@keyframes glitch{
  0%,90%,100%{text-shadow:0 1px 0 rgba(255,255,255,.5)}
  91%{text-shadow:-3px 0 var(--blu),3px 0 var(--pnk)}
  93%{text-shadow:3px 0 var(--blu),-3px 0 var(--vio)}
  95%{text-shadow:-2px 0 var(--pgr),2px 0 var(--pnk)}
  97%{text-shadow:0 1px 0 rgba(255,255,255,.5)}
}
.hero-d{
  margin:0 0 0 auto;
  max-width:44ch;
  color:#12200f;
  font-family:var(--mono);
  font-size:14px;
  font-weight:400;
  line-height:1.72;
  letter-spacing:.02em;
}
.hero-fig{
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  min-height:34vh;
  padding:0 clamp(18px,3vw,34px);
  overflow:hidden;
}
.hero-img{width:100%;display:block;object-fit:cover}
.sun{
  width:min(48vw,290px);
  aspect-ratio:1;
  margin-bottom:-8%;
  border-radius:50%;
  background:radial-gradient(circle at 50% 38%,#fff7b0,#ff9ad6 44%,#c56bff 74%,rgba(197,107,255,0) 79%);
  box-shadow:0 0 90px rgba(255,113,206,.6);
}

/* ---------- 正文区块 ---------- */
.body{padding:38px 0 10px;max-width:72ch}
.sh,
.s-h{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0;
  font-family:var(--mono);
  font-size:12px;
  font-weight:500;
  letter-spacing:.3em;
  color:var(--blu);
}
.sh .bar,
.s-h .bar{
  flex:1;
  height:1px;
  background:linear-gradient(90deg,var(--blu),rgba(1,205,254,0));
}
.body > article{
  padding:34px 0 30px;
  border-bottom:1px solid rgba(135,255,113,.13);
}
.body > article:last-child{border-bottom:0;padding-bottom:0}
article[id]{scroll-margin-top:66px}
.body h2{
  margin:0 0 16px;
  color:#eeffef;
  font-size:clamp(21px,2.6vw,30px);
  font-weight:600;
  line-height:1.3;
  letter-spacing:.01em;
}
.body h2::before{
  content:"";
  display:inline-block;
  width:9px;height:9px;
  margin-right:11px;
  vertical-align:.14em;
  background:var(--pgr);
  box-shadow:0 0 12px rgba(135,255,113,.8);
}
.body h3{
  margin:26px 0 10px;
  color:var(--pgr);
  font-size:19px;
  font-weight:600;
  line-height:1.4;
  letter-spacing:.02em;
}
.body p{margin:0 0 1.05em}
.body ul,.body ol{margin:0 0 1.1em;padding-left:1.35em}
.body li{margin:0 0 .5em}
.body li::marker{color:var(--blu)}
.body blockquote{
  margin:22px 0;
  padding:14px 18px;
  border-left:2px solid var(--pnk);
  background:linear-gradient(90deg,rgba(255,113,206,.09),transparent);
  color:#eaf7ec;
}
.body a{border-bottom:1px solid rgba(1,205,254,.45);transition:color .18s,border-color .18s}
.body a:hover{color:var(--pgr);border-bottom-color:var(--pgr)}
.body strong{color:#f4fff4;font-weight:600}
.body hr{border:0;border-top:1px dashed var(--line);margin:26px 0}

/* ---------- 侧栏 ---------- */
.side{grid-column:1;grid-row:1;position:sticky;top:52px}
.toc{
  list-style:none;
  margin:14px 0 0;
  padding:0;
  border-left:1px solid var(--line);
}
.toc a{
  display:block;
  padding:11px 12px;
  min-height:44px;
  color:var(--dim);
  text-decoration:none;
  font-size:15px;
  line-height:1.45;
  border-bottom:1px solid rgba(135,255,113,.1);
  transition:color .18s,background .18s,border-color .18s;
}
.toc a:hover,.toc a:focus-visible{
  color:var(--pgr);
  border-bottom-color:var(--pgr);
  background:linear-gradient(90deg,rgba(135,255,113,.1),transparent);
}

/* ---------- 页脚 ---------- */
.foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px 26px;
  max-width:1180px;
  margin:0 auto;
  padding:18px 34px 26px;
  border-top:1px solid var(--line);
  font-family:var(--mono);
  font-size:13px;
  letter-spacing:.12em;
  color:var(--dim);
}
.fbrand{color:var(--pgr);font-weight:700;letter-spacing:.26em;text-shadow:0 0 12px rgba(135,255,113,.5)}
.fnav dl{display:flex;flex-wrap:wrap;gap:2px 14px;margin:0}
.foot dt,.foot dd{margin:0}
.foot a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 2px;
  color:var(--dim);
  text-decoration:none;
  transition:color .18s,text-shadow .18s;
}
.foot a:hover,.foot a:focus-visible{color:var(--pgr);text-shadow:0 0 10px rgba(135,255,113,.7)}
.fcopy{color:rgba(140,171,149,.8)}

/* ---------- 窄屏 ---------- */
@media (max-width:940px){
  body{padding-left:0}
  .rail{
    position:static;
    width:auto;
    padding:16px 16px 12px;
    border-right:0;
    border-bottom:1px solid var(--line);
    overflow:visible;
  }
  .brand{padding-bottom:10px;font-size:18px}
  .railnav{flex-direction:row;flex-wrap:wrap;gap:6px;margin-top:4px}
  .rl{
    padding:10px 12px;
    border:1px solid rgba(135,255,113,.2);
    background:rgba(135,255,113,.04);
  }
  .rl:hover{transform:none;background:rgba(135,255,113,.12)}
  .wrap{grid-template-columns:minmax(0,1fr);gap:0;padding:0 16px 56px}
  main{grid-column:1;grid-row:auto}
  .side{grid-column:1;grid-row:auto;position:static;margin-top:34px}
  .toc{display:flex;flex-wrap:wrap;border-left:0;gap:6px}
  .toc a{border:1px solid rgba(1,205,254,.25);padding:10px 12px}
  .hero{min-height:0;padding-top:22px}
  .hero-fig{min-height:26vh}
  .hero-d{font-size:13.5px}
  .body{padding-top:28px}
  .foot{justify-content:flex-start;padding:16px 16px 24px}
  .fnav{order:3;width:100%}
  .fcopy{order:2}
}
@media (max-width:420px){
  body{font-size:16px}
  .hero h1{font-size:30px}
  .strip{letter-spacing:.22em;font-size:11px}
  .wrap{padding:0 14px 48px}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{animation:none!important;transition:none!important}
}

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