:root{
  --ink:#192617;
  --ink-deep:#101a0f;
  --neon:#87ff71;
  --lemon:#ffce5c;
  --text:#e6f4df;
  --muted:#bfd6b6;
  --line:rgba(135,255,113,.26);
  --r:10px;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --display:'Orbitron',var(--mono),system-ui,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --body:system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--ink);
  color:var(--text);
  font-family:var(--body);
  font-size:17px;
  line-height:1.78;
  overflow-x:hidden;
  background-image:radial-gradient(rgba(135,255,113,.12) 1px,transparent 1.1px);
  background-size:26px 26px;
}
img{max-width:100%}
a{color:var(--neon)}
a:focus-visible{outline:3px solid var(--lemon);outline-offset:2px}

/* ---------- 顶栏（移动端在上，宽屏转左侧竖排） ---------- */
.top{
  position:sticky;top:0;z-index:60;
  display:flex;align-items:center;gap:.5rem;
  padding:.55rem .8rem;
  background:var(--ink-deep);
  border-bottom:2px dashed var(--line);
  background-image:repeating-linear-gradient(90deg,rgba(135,255,113,.06) 0 6px,transparent 6px 12px);
}
.brand{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;min-height:44px;padding:0 .45rem;
  border:2px solid var(--neon);border-radius:var(--r);
  background:rgba(135,255,113,.08);
  color:var(--lemon);text-decoration:none;
  font-family:var(--display);font-size:.85rem;letter-spacing:.05em;
  transform:rotate(-2deg);
  max-width:9.5rem;overflow:hidden;white-space:nowrap;
}
.brand img,.brand .mark{width:26px;height:26px;display:block;object-fit:contain;border:0;border-radius:0}
.nav{flex:1 1 auto;min-width:0;overflow:hidden}
.nav p{
  display:flex;gap:.4rem;margin:0;padding:.15rem .1rem;
  overflow-x:auto;scrollbar-width:none;
}
.nav p::-webkit-scrollbar{display:none}
.nav a{
  flex:0 0 auto;display:inline-flex;align-items:center;
  min-height:40px;padding:.25rem .8rem;
  border:1.5px solid var(--line);border-radius:999px;
  color:#dff2d7;text-decoration:none;font-size:.95rem;white-space:nowrap;
}
.nav a:hover,.nav a:focus-visible{background:var(--neon);border-color:var(--neon);color:var(--ink)}
.cta{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  min-height:42px;padding:.3rem .85rem;
  border-radius:999px;background:var(--lemon);color:var(--ink);
  font-weight:700;font-size:.95rem;text-decoration:none;white-space:nowrap;
  box-shadow:3px 3px 0 rgba(135,255,113,.7);
}
.cta:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 rgba(135,255,113,.8)}

/* ---------- 头部大图 ---------- */
.hero{
  position:relative;isolation:isolate;overflow:hidden;
  display:flex;align-items:center;
  min-height:62vh;padding:2.2rem 1.1rem 3rem;
  background:
    radial-gradient(circle at 88% 14%,rgba(255,206,92,.2),transparent 44%),
    linear-gradient(158deg,#1e3019,#111d10 70%);
}
.hero-media{position:absolute;inset:0;z-index:-2}
.hero-media img{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;opacity:0;transition:opacity .9s ease;
  filter:grayscale(.18) contrast(1.06);
}
.hero-media img:first-child{opacity:1}
.hero-media.js img{opacity:0}
.hero-media.js img.on{opacity:1}
.hero::before{
  content:'';position:absolute;inset:0;z-index:-1;
  background:
    linear-gradient(100deg,rgba(25,38,23,.97) 0%,rgba(25,38,23,.84) 44%,rgba(25,38,23,.4) 100%),
    repeating-linear-gradient(135deg,rgba(135,255,113,.07) 0 12px,transparent 12px 24px);
}
.hero::after{
  content:'';position:absolute;left:0;right:0;bottom:0;height:14px;
  background:repeating-linear-gradient(90deg,transparent 0 9px,rgba(255,206,92,.55) 9px 18px);
  opacity:.7;
}
.num{
  position:absolute;right:-.3rem;bottom:-1.4rem;z-index:0;
  font-family:var(--display);font-weight:900;line-height:.78;
  font-size:clamp(6.5rem,26vw,16rem);letter-spacing:-.05em;
  color:transparent;-webkit-text-stroke:2px rgba(135,255,113,.32);
  pointer-events:none;
}
.tri{
  position:absolute;top:.9rem;right:1.2rem;z-index:0;
  width:58px;height:58px;background:var(--lemon);
  clip-path:polygon(50% 0,100% 100%,0 100%);transform:rotate(9deg);
}
.dots{
  position:absolute;right:1.3rem;bottom:1.4rem;z-index:0;
  width:84px;height:84px;opacity:.6;
  background-image:radial-gradient(var(--neon) 2px,transparent 2.2px);
  background-size:14px 14px;
}
.hero-copy{position:relative;z-index:1;max-width:36rem}
.kicker{
  display:inline-block;padding-bottom:.25rem;
  font-family:var(--mono);font-size:.78rem;letter-spacing:.3em;
  color:var(--lemon);border-bottom:2px solid var(--lemon);
}
h1{
  margin:.9rem 0 .8rem;
  font-family:var(--display);font-weight:900;
  font-size:clamp(1.85rem,6.2vw,3.3rem);line-height:1.2;
  color:#f5ffee;text-shadow:0 0 26px rgba(135,255,113,.28);
}
.lede{max-width:33rem;margin:0;color:#cfe6c7;font-size:1rem;line-height:1.7}

/* ---------- 主体栅格：侧栏在左 ---------- */
main{padding-bottom:.5rem}
.wrap{
  max-width:1180px;margin:0 auto;
  padding:1.8rem 1.1rem 3rem;
  display:grid;grid-template-columns:minmax(0,1fr);gap:1.6rem;
}
.body{min-width:0;order:1}

.rail{
  order:2;
  align-self:start;
  padding:1rem;
  border:2px dashed var(--line);border-radius:var(--r);
  background-color:rgba(135,255,113,.05);
  background-image:radial-gradient(rgba(255,206,92,.32) 1.4px,transparent 1.6px);
  background-size:16px 16px;
}
.rail small{
  display:block;font-family:var(--mono);font-size:.72rem;
  letter-spacing:.3em;color:var(--lemon);
}
.rail h2{
  margin:.25rem 0 .8rem;
  font-family:var(--display);font-size:1.02rem;line-height:1.4;color:var(--neon);
}
.rail-list{margin:0;display:flex;flex-direction:column;gap:.1rem}
.rail-list a{
  display:flex;align-items:center;min-height:40px;padding:.2rem .25rem;
  color:#dff2d7;text-decoration:none;font-size:.92rem;
  border-bottom:1px dotted var(--line);
}
.rail-list a:hover{background:var(--neon);color:var(--ink);border-radius:6px;border-bottom-color:transparent}
.to-top{
  margin-top:.9rem;display:inline-flex;align-items:center;
  min-height:40px;padding:0 .85rem;
  border:1px solid var(--line);border-radius:999px;
  font-family:var(--mono);font-size:.82rem;color:var(--lemon);text-decoration:none;
}
.to-top:hover{background:var(--lemon);color:var(--ink);border-color:var(--lemon)}

/* ---------- 正文 ---------- */
.prose{max-width:46rem;min-width:0}
.prose section{
  position:relative;
  margin:0 0 1.5rem;padding:1.5rem 1.05rem 1.6rem;
  border:1.5px solid rgba(135,255,113,.22);
  border-bottom:5px solid var(--neon);
  border-radius:var(--r);
  background:rgba(255,255,255,.028);
  scroll-margin-top:86px;
}
.prose section:nth-of-type(even){border-bottom-color:var(--lemon)}
.prose section::before{
  content:'';position:absolute;left:0;right:0;top:0;height:7px;
  border-radius:var(--r) var(--r) 0 0;
  background:repeating-linear-gradient(90deg,rgba(135,255,113,.5) 0 9px,transparent 9px 18px);
  opacity:.55;
}
.prose small{
  display:block;margin-top:.15rem;
  font-family:var(--mono);font-size:.74rem;letter-spacing:.24em;color:var(--lemon);
}
.prose h2{
  margin:.35rem 0 .9rem;
  font-family:var(--display);font-size:1.32rem;line-height:1.4;color:#f6ffee;
}
.prose h3{margin:1.3rem 0 .5rem;font-size:1.08rem;color:var(--lemon)}
.prose p{margin:.2rem 0 .9rem;color:#d9ecd1}
.prose a{color:var(--neon);text-underline-offset:3px}
.prose strong{color:#f2ffe9}
.prose ul,.prose ol{padding-left:1.25rem;color:#d9ecd1}
.prose li{margin:.3rem 0}
.prose img{
  display:block;width:auto;height:auto;max-width:100%;margin:1rem 0;
  border:2px solid var(--line);border-radius:var(--r);
}
.prose blockquote{
  margin:1rem 0;padding:.7rem 1rem;
  border-left:6px solid var(--lemon);border-radius:0 var(--r) var(--r) 0;
  background:rgba(255,206,92,.08);color:#e9f5e2;
}
.prose table{width:100%;border-collapse:collapse;display:block;overflow-x:auto;font-size:.95rem}
.prose th,.prose td{border:1px solid var(--line);padding:.45rem .6rem;text-align:left;color:#d9ecd1}
.prose th{background:rgba(135,255,113,.1);color:#f4ffee}
.prose hr{border:0;border-top:2px dashed var(--line);margin:1.2rem 0}
.prose code,.prose pre{font-family:var(--mono);font-size:.92em}
.prose pre{overflow-x:auto;padding:.8rem;border:1px dashed var(--line);border-radius:var(--r)}

/* ---------- 页脚：单行 ---------- */
footer{
  margin-top:.8rem;
  padding:1rem 1.1rem 1.3rem;
  border-top:3px solid var(--neon);
  background:var(--ink-deep);
  display:flex;flex-wrap:wrap;align-items:center;gap:.4rem 1.1rem;
  font-size:.92rem;
}
footer address{
  font-family:var(--display);font-style:normal;letter-spacing:.05em;color:var(--neon);
}
footer ul{display:flex;flex-wrap:wrap;gap:.1rem .9rem;list-style:none;margin:0;padding:0}
footer a{
  display:inline-flex;align-items:center;min-height:40px;
  color:#d9ecd1;text-decoration:none;border-bottom:1px dotted transparent;
}
footer a:hover{color:var(--lemon);border-bottom-color:var(--lemon)}
.copy{margin:0;font-family:var(--mono);font-size:.8rem;color:#9dba94}

/* ---------- 滚动出现 ---------- */
@media (prefers-reduced-motion:no-preference){
  .rv .prose section{opacity:0;transform:translateY(18px);transition:opacity .6s ease,transform .6s ease}
  .rv .prose section.in{opacity:1;transform:none}
}

/* ---------- 断点 ---------- */
@media (min-width:1000px){
  .top{
    position:fixed;inset:0 auto 0 0;
    width:236px;height:100vh;
    flex-direction:column;align-items:stretch;gap:.6rem;
    padding:1.1rem .9rem 1.4rem;
    border-bottom:0;border-right:2px dashed var(--line);
    overflow-y:auto;overflow-x:hidden;
  }
  .brand{align-self:flex-start;transform:rotate(-3deg)}
  .nav{margin-top:.8rem;overflow:visible}
  .nav p{flex-direction:column;overflow:visible;padding:0}
  .nav a{justify-content:flex-start}
  .cta{margin-top:auto;min-height:46px;font-size:.98rem}
  main,footer{margin-left:236px}
  .hero{min-height:70vh;padding:3rem 2.6rem}
  .hero-copy{max-width:40rem}
  .wrap{grid-template-columns:216px minmax(0,1fr);gap:2.2rem;padding:2.6rem 2rem 4rem}
  .rail{order:0;position:sticky;top:1.5rem}
  .body{order:0}
  .prose section{padding:1.8rem 1.6rem 2rem;scroll-margin-top:24px}
  .prose{max-width:48rem}
  footer{justify-content:flex-start}
  .copy{margin-left:auto}
}
@media (min-width:1280px){
  .hero{padding-left:3.6rem;padding-right:3.6rem}
}

/* ---------- 移动端微调 ---------- */
@media (max-width:999px){
  .copy{margin-left:0;width:100%}
  .tri{width:44px;height:44px;top:.6rem;right:.8rem}
  .dots{width:66px;height:66px;bottom:.9rem;right:.9rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero-media img{transition:none}
  .cta:hover{transform:none}
}

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