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

:root{
  --ink:#172617;
  --ink-deep:#0a140b;
  --lime:#69ff69;
  --cyan:#00ffff;
  --mint:#e6ffe9;
  --muted:#a9c9ae;
  --line:rgba(105,255,105,.28);
  --line-soft:rgba(105,255,105,.14);
  --chrome:linear-gradient(135deg,#eaffef 0%,#9db9a4 32%,#ffffff 48%,#7a9a83 66%,#dcffe4 100%);
  --shell:1180px;
}

*{box-sizing:border-box;}

html{
  scroll-behavior:smooth;
  background:var(--ink);
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  padding-left:236px;
  font-family:'Atkinson Hyperlegible',system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.7;
  color:var(--mint);
  background:
    radial-gradient(900px 520px at 78% -8%,rgba(0,255,255,.16),transparent 62%),
    radial-gradient(760px 480px at 8% 12%,rgba(105,255,105,.14),transparent 60%),
    linear-gradient(180deg,var(--ink) 0%,var(--ink-deep) 100%);
  background-attachment:fixed;
}

a{color:var(--cyan);text-decoration:none;}
a:hover,a:focus-visible{color:#fff;}
img{max-width:100%;height:auto;display:block;}
p{margin:0 0 16px;}

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

/* ---------- 左侧固定导航 ---------- */
.rail{
  position:fixed;
  inset:0 auto 0 0;
  width:236px;
  z-index:30;
  display:flex;
  flex-direction:column;
  gap:20px;
  padding:26px 18px 30px;
  overflow-y:auto;
  border-right:1px solid var(--line);
  background:
    linear-gradient(180deg,rgba(23,38,23,.97),rgba(10,20,11,.98));
  box-shadow:14px 0 40px -22px rgba(0,255,255,.55);
}

.brand{
  display:inline-block;
  align-self:flex-start;
  font-size:24px;
  font-weight:700;
  letter-spacing:.06em;
  padding:8px 16px 9px;
  border-radius:18px;
  border:1px solid rgba(0,255,255,.5);
  background:var(--chrome);
  -webkit-background-clip:padding-box;
  background-clip:padding-box;
  color:#0b1a0c;
  box-shadow:0 0 0 1px rgba(255,255,255,.4) inset,0 6px 18px -8px rgba(0,255,255,.9);
}
.brand:hover,.brand:focus-visible{color:#000;}

.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:10px 12px;
  border-radius:12px;
  border-left:2px solid transparent;
  color:#cdf5d2;
  letter-spacing:.04em;
  transition:background .18s ease,color .18s ease,border-color .18s ease;
}
.rail-list a:hover,
.rail-list a:focus-visible{
  background:linear-gradient(90deg,rgba(0,255,255,.2),rgba(105,255,105,.06));
  border-left-color:var(--cyan);
  color:#fff;
  text-shadow:0 0 12px rgba(0,255,255,.9);
}

/* ---------- 骨架 ---------- */
.shell{
  max-width:var(--shell);
  margin:0 auto;
  padding:34px 30px 64px;
  display:grid;
  grid-template-columns:196px minmax(0,1fr);
  gap:30px;
  align-items:start;
}

.content{min-width:0;}

/* ---------- 侧栏目录 ---------- */
.toc{
  position:sticky;
  top:28px;
  align-self:start;
  padding:14px 14px 8px;
  border:1px solid rgba(0,255,255,.34);
  border-radius:18px;
  background:linear-gradient(160deg,rgba(0,255,255,.12),rgba(105,255,105,.05));
  box-shadow:0 0 24px -14px rgba(0,255,255,.9) inset;
}

.toc-title{
  margin:0 0 8px;
  font-size:16px;
  font-weight:700;
  letter-spacing:.18em;
  color:var(--cyan);
  text-shadow:0 0 12px rgba(0,255,255,.7);
}

.toc-list{
  list-style:none;
  counter-reset:toc;
  margin:0;
  padding:0;
}

.toc-list li{counter-increment:toc;}

.toc-list a{
  display:flex;
  gap:8px;
  align-items:baseline;
  padding:9px 2px;
  min-height:40px;
  font-size:16px;
  color:#bfe8c5;
  border-bottom:1px dashed var(--line-soft);
}
.toc-list li:last-child a{border-bottom:0;}
.toc-list a::before{
  content:counter(toc,decimal-leading-zero);
  font-size:12px;
  letter-spacing:.1em;
  color:var(--lime);
  opacity:.85;
}
.toc-list a:hover,.toc-list a:focus-visible{color:#fff;}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  min-height:70vh;
  display:flex;
  align-items:center;
  gap:26px;
  justify-content:flex-end;
  padding:24px 0 34px;
  border-bottom:1px solid var(--line);
  overflow:visible;
}

.hero-media{
  position:relative;
  flex:0 0 150px;
  width:150px;
  height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.hero-art{
  width:150px;
  height:auto;
  border-radius:18px;
  border:1px solid rgba(0,255,255,.5);
  filter:drop-shadow(0 0 18px rgba(0,255,255,.5));
}

.orb{
  position:absolute;
  border-radius:50%;
  background:radial-gradient(circle at 32% 28%,#ffffff,#69ff69 38%,#00ffff 74%,#1a3a26 100%);
  box-shadow:0 0 22px rgba(0,255,255,.55),0 0 0 1px rgba(255,255,255,.35) inset;
  opacity:.92;
}
.orb-one{width:84px;height:84px;top:6px;left:4px;}
.orb-two{width:58px;height:58px;bottom:26px;right:0;}
.orb-three{width:34px;height:34px;bottom:4px;left:26px;opacity:.7;}

.hero-copy{
  flex:1 1 auto;
  min-width:0;
  text-align:right;
  position:relative;
}

.bubble{
  position:absolute;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:50%;
  font-size:16px;
  color:#0b1a0c;
  background:var(--chrome);
  box-shadow:0 0 18px rgba(105,255,105,.8);
  pointer-events:none;
  will-change:transform;
}
.bubble-a{top:-14px;right:2px;}
.bubble-b{top:52px;right:-24px;width:28px;height:28px;font-size:13px;color:#0b1a0c;background:radial-gradient(circle at 30% 25%,#fff,#00ffff 60%,#1b6f7a);}

.hero-title{
  margin:0 0 14px;
  font-size:clamp(32px,4.4vw,58px);
  line-height:1.1;
  letter-spacing:.01em;
  background:var(--chrome);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:#fff;
  filter:drop-shadow(0 0 14px rgba(0,255,255,.55)) drop-shadow(0 0 30px rgba(105,255,105,.28));
  word-break:break-word;
}

.hero-lede{
  margin:0 0 0 auto;
  max-width:52ch;
  color:#cfefd3;
  font-size:17px;
}

/* ---------- 正文 ---------- */
.doc{
  max-width:72ch;
}

.doc > article{
  padding:22px 0 26px;
  border-bottom:1px dashed var(--line-soft);
  scroll-margin-top:28px;
}
.doc > article:first-child{padding-top:6px;}
.doc > article:last-child{border-bottom:0;}

.doc h2{
  margin:0 0 10px;
  font-size:clamp(23px,2.8vw,33px);
  line-height:1.22;
  color:var(--lime);
  letter-spacing:.01em;
  text-shadow:0 0 16px rgba(105,255,105,.45);
  scroll-margin-top:28px;
}

.doc h3{
  margin:22px 0 8px;
  font-size:20px;
  color:var(--cyan);
  text-shadow:0 0 12px rgba(0,255,255,.35);
}

.doc hr{
  border:0;
  height:2px;
  margin:10px 0 18px;
  border-radius:3px;
  background:linear-gradient(90deg,var(--lime),var(--cyan) 45%,rgba(105,255,105,0) 100%);
  box-shadow:0 0 12px rgba(0,255,255,.55);
}

.doc h2 + hr{margin-top:6px;}

.doc p,
.doc li{color:#e2f8e5;}

.doc ul,.doc ol{padding-left:1.25em;margin:0 0 16px;}
.doc li{margin:0 0 8px;}

.doc a{color:var(--cyan);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;}
.doc a:hover{color:#fff;background:rgba(0,255,255,.14);}

.doc strong{color:#fff;}

.doc blockquote{
  margin:0 0 16px;
  padding:12px 18px;
  border-left:3px solid var(--cyan);
  border-radius:0 18px 18px 0;
  background:linear-gradient(90deg,rgba(0,255,255,.14),rgba(0,255,255,0));
  color:#dcf6e0;
}

.doc img{border-radius:18px;border:1px solid var(--line);margin:0 0 16px;}

.doc table{width:100%;border-collapse:collapse;margin:0 0 18px;font-size:16px;}
.doc th,.doc td{border-bottom:1px solid var(--line-soft);padding:9px 10px;text-align:left;}
.doc th{color:var(--lime);}

.doc time{
  display:inline-block;
  font-size:16px;
  color:var(--muted);
}

.doc code{
  font-size:15px;
  padding:1px 6px;
  border-radius:8px;
  background:rgba(0,255,255,.14);
  color:#d8fff0;
}

/* 滚动进场 */
.rev-on > article{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .5s ease,transform .5s ease;
}
.rev-on > article.rev-in{
  opacity:1;
  transform:none;
}

/* ---------- 页脚 ---------- */
.foot{
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,rgba(0,255,255,.05),rgba(10,20,11,.6));
  padding:30px 30px 34px;
}

.foot-grid{
  max-width:var(--shell);
  margin:0 auto 22px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
}

.foot dl{margin:0;}
.foot dt{
  margin:0 0 6px;
  font-size:16px;
  letter-spacing:.16em;
  color:var(--lime);
}
.foot dd{margin:0;color:#cfeecf;}

.foot a{
  display:block;
  min-height:40px;
  padding:8px 0;
  color:#cdf5d2;
}
.foot a:hover,.foot a:focus-visible{color:#fff;text-shadow:0 0 12px rgba(0,255,255,.9);}

.foot-brand{font-weight:700;}

.foot-bottom{
  max-width:var(--shell);
  margin:0 auto;
  padding-top:16px;
  border-top:1px dashed var(--line-soft);
  display:flex;
  flex-wrap:wrap;
  gap:10px 20px;
  align-items:center;
  justify-content:space-between;
}

.foot-copy{margin:0;color:var(--muted);font-size:16px;}

.foot-quick dl{margin:0;display:flex;flex-wrap:wrap;gap:0 6px;}
.foot-quick dd{margin:0;}
.foot-quick a{
  padding:9px 12px;
  border-radius:14px;
  border:1px solid rgba(0,255,255,.34);
  background:linear-gradient(160deg,rgba(0,255,255,.16),rgba(105,255,105,.05));
}
.foot-quick a:hover{background:rgba(0,255,255,.26);}

/* ---------- 窄屏 ---------- */
@media (max-width:960px){
  body{padding-left:0;padding-top:72px;}

  .rail{
    inset:0 0 auto 0;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:12px;
    padding:9px 14px;
    overflow-x:auto;
    overflow-y:hidden;
    border-right:0;
    border-bottom:1px solid var(--line);
    box-shadow:0 12px 30px -20px rgba(0,255,255,.9);
  }

  .brand{font-size:19px;padding:7px 13px 8px;white-space:nowrap;}

  .rail-list{flex-direction:row;gap:2px;flex:0 0 auto;}

  .rail-list a{
    min-height:44px;
    padding:10px 11px;
    white-space:nowrap;
    border-left:0;
    border-bottom:2px solid transparent;
  }
  .rail-list a:hover,.rail-list a:focus-visible{border-left:0;border-bottom-color:var(--cyan);}

  .shell{
    grid-template-columns:minmax(0,1fr);
    gap:20px;
    padding:20px 16px 48px;
  }

  .toc{position:static;}

  .hero{
    min-height:62vh;
    gap:16px;
    padding:14px 0 24px;
  }

  .hero-media{flex:0 0 92px;width:92px;height:130px;}
  .hero-art{width:92px;}
  .orb-one{width:56px;height:56px;}
  .orb-two{width:38px;height:38px;}
  .orb-three{width:22px;height:22px;left:14px;}
  .bubble{width:30px;height:30px;font-size:13px;}
  .bubble-b{right:-6px;top:44px;}

  .doc > article{scroll-margin-top:96px;}
  .doc h2{scroll-margin-top:96px;}

  .foot{padding:24px 16px 30px;}
  .foot-grid{grid-template-columns:minmax(0,1fr);gap:12px;}

  .foot-bottom{flex-direction:column;align-items: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;
  }
  .rev-on > article{opacity:1;transform:none;}
}

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