:root{
  --ink:#0E1116;
  --cyan:#22D3EE;
  --mag:#FF4D6D;
  --panel:#151C24;
  --line:#25313F;
  --txt:#E8EEF6;
  --mut:#9AABBE;
  --rail:250px;
  --r:18px;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;overflow-x:hidden}
body{
  margin:0;
  max-width:100%;
  background:var(--ink);
  color:var(--txt);
  font-family:"Fira Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:16px;
  line-height:1.7;
  overflow-x:hidden;
}
h1,h2,h3,h4{
  font-family:"Share Tech Mono","Fira Code",ui-monospace,monospace;
  font-weight:700;
  line-height:1.2;
  letter-spacing:.01em;
  margin:0 0 14px;
  color:#fff;
  overflow-wrap:break-word;
}
p{margin:0 0 14px}
a{color:var(--cyan)}
ul,ol{margin:0 0 16px;padding-left:1.15em}
li{margin:0 0 6px}
:focus-visible{outline:2px solid var(--mag);outline-offset:3px}
img{max-width:100%;height:auto}

/* 骨架 */
.stage{margin-left:var(--rail);min-width:0}
.main{
  display:grid;
  grid-template-columns:minmax(0,1fr) 232px;
  gap:38px;
  max-width:1140px;
  margin:0 auto;
  padding:56px 32px 76px;
  align-items:start;
}
.main > *{min-width:0}

/* 左侧竖排导航 */
.rail{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--rail);
  max-width:100vw;
  padding:22px 16px;
  background:#0A0D12;
  border-right:2px solid var(--line);
  display:flex;
  flex-direction:column;
  gap:18px;
  overflow-y:auto;
  z-index:30;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:46px;
  padding:4px 2px;
  text-decoration:none;
  color:#fff;
  font-family:"Share Tech Mono","Fira Code",monospace;
  font-size:18px;
  letter-spacing:.04em;
  border-radius:4px;
}
.brand-mark{position:relative;flex:0 0 20px;width:20px;height:20px;background:var(--cyan);border-radius:3px}
.brand-mark::after{content:"";position:absolute;right:-7px;bottom:-7px;width:10px;height:10px;background:var(--mag);border-radius:2px}
.brand:hover .brand-mark{background:var(--mag)}
.brand:hover .brand-mark::after{background:var(--cyan)}
.rail-links{display:flex;flex-direction:column;gap:4px;min-width:0}
.rl{
  display:flex;
  align-items:center;
  gap:11px;
  min-height:46px;
  padding:8px 10px;
  color:var(--mut);
  text-decoration:none;
  border-radius:10px;
  transition:background .18s ease,color .18s ease;
}
.rl .ri{
  flex:0 0 10px;
  width:10px;
  height:10px;
  border:2px solid currentColor;
  border-radius:2px;
  transform:rotate(45deg);
  transition:background .18s ease,border-color .18s ease;
}
.rl:hover,.rl:focus-visible{background:#18212C;color:#fff}
.rl:hover .ri,.rl:focus-visible .ri{background:var(--cyan);border-color:var(--cyan)}
@media (prefers-reduced-motion:no-preference){
  .rl{animation:railIn .42s ease both}
  .rl-1{animation-delay:.04s}
  .rl-2{animation-delay:.09s}
  .rl-3{animation-delay:.14s}
  .rl-4{animation-delay:.19s}
  .rl-5{animation-delay:.24s}
  .rl-6{animation-delay:.29s}
  .rl-7{animation-delay:.34s}
}
@keyframes railIn{from{opacity:0;transform:translateX(-12px)}to{opacity:1;transform:none}}

/* 顶部细条 */
.topline{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 32px;
  border-bottom:2px solid var(--line);
  font-size:16px;
  letter-spacing:.22em;
  color:var(--mut);
  background:#0A0D12;
  overflow:hidden;
}
.topline .dot{flex:0 0 9px;width:9px;height:9px;background:var(--mag);border-radius:50%}
.topline .tick{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topline .rule{flex:1 1 20px;min-width:0;height:2px;background:var(--line)}

/* Hero */
.hero{
  position:relative;
  min-height:100svh;
  display:flex;
  align-items:center;
  padding:120px 40px 150px;
  overflow:hidden;
  background:#0A0D12;
  clip-path:polygon(0 0,100% 0,100% 91%,0 100%);
}
.hero-media{position:absolute;inset:-10% 0 -10%;z-index:0;will-change:transform;overflow:hidden}
.hero-media img,.hero-media .hero-img{width:100%;height:100%;object-fit:cover;display:block;opacity:.55}
.hero::after{content:"";position:absolute;inset:0;background:rgba(14,17,22,.66);z-index:1}
.hero-in{position:relative;z-index:2;max-width:900px;min-width:0;border-left:6px solid var(--cyan);padding-left:22px}
.hero-title{
  font-size:clamp(34px,6vw,74px);
  line-height:1.08;
  letter-spacing:.01em;
  margin:0 0 18px;
}
.hero-desc{
  max-width:56ch;
  font-size:17px;
  color:#C9D6E4;
  margin:0;
  overflow-wrap:break-word;
}
.hero-desc::first-line{color:#fff}

/* 正文容器 */
.body{min-width:0;max-width:74ch;overflow-wrap:break-word}
.body > article{padding:44px 0;border-top:1px solid var(--line)}
.body > article:first-child{border-top:0;padding-top:0}
.body > article:last-child{padding-bottom:0}
article[id]{scroll-margin-top:24px}
.body small{
  display:block;
  color:var(--cyan);
  font-size:16px;
  letter-spacing:.26em;
  margin:0 0 8px;
  font-weight:400;
}
.body h2{font-size:clamp(23px,3vw,33px);margin:0 0 16px}
.body h3{font-size:clamp(18px,2vw,22px);margin:26px 0 10px;color:var(--cyan)}
.body a{text-decoration:underline;text-underline-offset:3px}
.body a:hover{color:var(--mag)}
.body ul li::marker{color:var(--mag)}
.body ol li::marker{color:var(--cyan)}
.body blockquote{
  margin:0 0 18px;
  padding:14px 18px;
  border-left:4px solid var(--mag);
  background:var(--panel);
  border-radius:4px;
}
.body blockquote p:last-child{margin:0}
.body table{width:100%;border-collapse:collapse;margin:0 0 18px;font-size:15px}
.body th,.body td{border:1px solid var(--line);padding:10px;text-align:left;overflow-wrap:break-word}
.body th{background:var(--panel);color:var(--cyan)}
.body code{background:#1B2530;padding:2px 6px;border-radius:3px;font-size:15px;overflow-wrap:break-word}
.body img{max-width:100%;height:auto}

/* 右侧栏 */
.side{
  position:sticky;
  top:24px;
  align-self:start;
  min-width:0;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:20px 18px;
  box-shadow:0 12px 26px rgba(0,0,0,.38);
}
.side small{display:block;color:var(--cyan);letter-spacing:.26em;margin:0 0 8px;font-size:16px}
.side h2{font-size:20px;margin:0 0 12px}
.toc{list-style:none;margin:0;padding:0}
.toc a{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:6px 2px;
  color:var(--mut);
  text-decoration:none;
  border-bottom:1px solid var(--line);
  transition:color .15s ease;
}
.toc a span{min-width:0;overflow-wrap:break-word}
.toc li:last-child a{border-bottom:0}
.toc a em{color:var(--mag);font-style:normal;flex:0 0 auto}
.toc a:hover{color:#fff}

/* 页脚 */
.foot{
  border-top:2px solid var(--line);
  background:#0A0D12;
  padding:52px 32px 26px;
}
.foot-cols{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:30px;
  max-width:1140px;
  margin:0 auto;
}
.foot-cols > *{min-width:0}
.fnav dl,.foot-cols > dl{margin:0}
.foot-cols dt{
  color:var(--cyan);
  letter-spacing:.22em;
  margin:0 0 8px;
  font-size:16px;
}
.foot-cols dd{margin:0}
.foot-cols dd a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:2px 0;
  color:var(--mut);
  text-decoration:none;
  transition:color .15s ease;
  overflow-wrap:break-word;
}
.foot-cols dd a:hover{color:#fff}
.fsub{min-width:0}
.fsub label{display:block;color:var(--cyan);letter-spacing:.22em;margin:0 0 8px}
.subform{display:flex;flex-wrap:wrap;gap:8px}
.subform input{
  flex:1 1 120px;
  min-width:0;
  width:100%;
  min-height:44px;
  padding:8px 12px;
  background:#111821;
  border:1px solid var(--line);
  border-radius:4px;
  color:var(--txt);
  font:inherit;
  font-size:16px;
}
.subform input::placeholder{color:#68798C}
.subform button{
  flex:0 0 auto;
  min-height:44px;
  padding:8px 18px;
  background:var(--cyan);
  color:#06222A;
  border:0;
  border-radius:4px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:background .15s ease;
}
.subform button:hover{background:var(--mag);color:#2A0710}
.copy{
  max-width:1140px;
  margin:34px auto 0;
  padding-top:18px;
  border-top:1px solid var(--line);
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:space-between;
  color:var(--mut);
  font-size:16px;
}
.totop{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  color:var(--cyan);
  text-decoration:none;
}
.totop:hover{color:var(--mag)}

/* 窄屏 */
@media (max-width:1000px){
  .main{grid-template-columns:minmax(0,1fr);gap:32px;padding:40px 20px 56px}
  .side{position:static;box-shadow:none}
}
@media (max-width:900px){
  .rail{
    position:sticky;
    top:0;
    inset:auto;
    width:auto;
    max-width:100%;
    flex-direction:column;
    gap:8px;
    padding:10px 14px;
    border-right:0;
    border-bottom:2px solid var(--line);
    overflow-x:hidden;
  }
  .rail-links{flex-direction:row;gap:8px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .rl{flex:0 0 auto;white-space:nowrap;border:1px solid var(--line);min-height:44px}
  .brand-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .stage{margin-left:0;min-width:0}
  .topline{padding:10px 16px}
  .hero{padding:34px 16px 96px;min-height:100svh;clip-path:polygon(0 0,100% 0,100% 95%,0 100%)}
  .hero-in{padding-left:16px;border-left-width:5px}
  .hero-desc{font-size:16px}
  article[id]{scroll-margin-top:132px}
  .body > article{padding:34px 0}
  .body table{display:block;overflow-x:auto}
  .foot{padding:36px 18px 20px}
  .foot-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
  .subform input{flex:1 1 100%}
  .subform button{flex:1 1 100%}
  .copy{font-size:16px}
}
@media (max-width:400px){
  .hero-title{font-size:clamp(28px,8vw,40px)}
  .foot-cols{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero-media{transform:none!important}
}

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