@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root{
  --ink:#0d0d0d;
  --ink-2:#141018;
  --panel:rgba(30,20,44,.68);
  --neon:#8000ff;
  --mag:#ff00ff;
  --txt:#e8e2f4;
  --dim:#a99ec4;
  --line:rgba(128,0,255,.36);
  --line-2:rgba(255,0,255,.32);
  --bar:78px;
  --mono:ui-monospace,"SFMono-Regular",Menlo,Consolas,"Courier New",monospace;
  --sans:"Lexend","Source Sans 3",system-ui,-apple-system,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}

*{box-sizing:border-box}

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

body{
  margin:0;
  padding-bottom:calc(var(--bar) + 34px);
  background:
    radial-gradient(900px 520px at 88% -12%,rgba(255,0,255,.17),transparent 70%),
    radial-gradient(720px 520px at -8% 0%,rgba(128,0,255,.2),transparent 66%),
    var(--ink);
  color:var(--txt);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.7;
  font-weight:400;
  overflow-x:hidden;
  letter-spacing:.01em;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:6;
  pointer-events:none;
  opacity:.5;
  mix-blend-mode:screen;
  background:repeating-linear-gradient(180deg,rgba(255,255,255,.04) 0 1px,transparent 1px 3px);
}

img{max-width:100%;height:auto;display:block}

a{color:var(--mag)}

a:focus-visible,
button:focus-visible{
  outline:2px solid var(--mag);
  outline-offset:2px;
}

.corner{
  position:fixed;
  top:12px;
  left:12px;
  z-index:45;
}

.corner .mark{
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border:1px solid var(--line-2);
  border-radius:12px;
  background:rgba(13,13,13,.78);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  color:var(--mag);
  text-decoration:none;
  box-shadow:0 0 16px rgba(255,0,255,.3);
}

.corner .mark-img{width:26px;height:26px;object-fit:contain}
.corner .mark svg{width:22px;height:22px}

.hero{
  position:relative;
  overflow:hidden;
  min-height:45vh;
  display:grid;
  align-content:center;
  padding:86px 22px 34px;
  border-bottom:1px solid var(--line);
  text-align:right;
}

.hero .ghost{
  position:absolute;
  right:-2vw;
  top:50%;
  transform:translateY(-50%);
  z-index:0;
  font-size:clamp(56px,17vw,168px);
  font-weight:700;
  line-height:1;
  letter-spacing:.06em;
  white-space:nowrap;
  color:transparent;
  -webkit-text-stroke:1px rgba(255,0,255,.22);
  pointer-events:none;
  user-select:none;
}

.hero-in{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:row-reverse;
  align-items:center;
  justify-content:flex-start;
  gap:16px;
  max-width:1120px;
  margin:0 auto;
  width:100%;
}

.hero-mark{
  flex:0 0 auto;
  width:64px;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:center;
  filter:drop-shadow(0 0 12px rgba(255,0,255,.6));
}

.hero-mark .hero-logo{
  width:64px;
  height:64px;
  object-fit:contain;
}

.hero-title{
  margin:0;
  font-size:clamp(28px,6.2vw,52px);
  font-weight:600;
  line-height:1.15;
  letter-spacing:.02em;
  color:#fff;
  text-shadow:0 0 18px rgba(255,0,255,.55);
  animation:glitch 8s infinite;
}

.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:30px 20px 0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 296px;
  gap:28px;
  align-items:start;
}

.doc{min-width:0}

.prose{
  display:grid;
  gap:20px;
}

.prose > article{
  position:relative;
  margin:0;
  padding:24px 20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(158deg,rgba(40,25,58,.72),rgba(15,11,21,.88));
  box-shadow:0 14px 34px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,0,255,.06);
  scroll-margin-top:24px;
  animation:fade .6s ease both;
  transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease;
}

.prose > article:nth-child(1){animation-delay:.04s}
.prose > article:nth-child(2){animation-delay:.1s}
.prose > article:nth-child(3){animation-delay:.16s}
.prose > article:nth-child(4){animation-delay:.22s}
.prose > article:nth-child(5){animation-delay:.28s}
.prose > article:nth-child(6){animation-delay:.34s}
.prose > article:nth-child(7){animation-delay:.4s}

.prose > article:hover{
  transform:translateY(-2px);
  border-color:var(--line-2);
  box-shadow:0 20px 46px rgba(128,0,255,.3),inset 0 0 0 1px rgba(255,0,255,.14);
}

.prose > article > *:last-child{margin-bottom:0}

.prose h2{
  position:relative;
  margin:0 0 .55em;
  padding-left:14px;
  font-size:clamp(1.24rem,2.6vw,1.6rem);
  font-weight:600;
  line-height:1.35;
  letter-spacing:.02em;
  color:#fff;
  text-shadow:0 0 12px rgba(255,0,255,.45);
}

.prose h2::before{
  content:"";
  position:absolute;
  left:0;
  top:.22em;
  bottom:.22em;
  width:3px;
  background:linear-gradient(180deg,var(--mag),var(--neon));
  box-shadow:0 0 10px var(--mag);
}

.prose h3{
  margin:1.1em 0 .4em;
  font-size:1.1rem;
  font-weight:600;
  color:#fff;
}

.prose p{margin:0 0 1em;color:var(--txt)}

.prose ul,
.prose ol{margin:0 0 1em;padding-left:1.35em}

.prose li{margin:.32em 0}
.prose li::marker{color:var(--mag)}

.prose strong{color:#fff;font-weight:600}

.prose a{
  text-decoration:none;
  border-bottom:1px solid rgba(255,0,255,.45);
  text-shadow:0 0 8px rgba(255,0,255,.4);
}

.prose a:hover{border-bottom-color:var(--mag);color:#fff}

.prose blockquote{
  margin:0 0 1em;
  padding:10px 16px;
  border-left:3px solid var(--neon);
  background:rgba(128,0,255,.1);
  color:var(--dim);
}

.prose img{
  border-radius:12px;
  border:1px solid var(--line);
  margin:0 0 1em;
}

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

.prose th,
.prose td{
  border:1px solid var(--line);
  padding:8px 10px;
  text-align:left;
}

.prose th{color:#fff;background:rgba(128,0,255,.14)}

.prose code{
  font-family:var(--mono);
  font-size:.94em;
  background:rgba(128,0,255,.16);
  padding:1px 5px;
  border-radius:5px;
}

.rail{
  position:sticky;
  top:24px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px 16px;
  background:rgba(18,13,26,.74);
  box-shadow:0 12px 30px rgba(0,0,0,.45);
}

.rail h2{
  margin:0;
  font-family:var(--mono);
  font-size:1rem;
  font-weight:500;
  letter-spacing:.22em;
  color:var(--mag);
  text-shadow:0 0 10px rgba(255,0,255,.55);
}

.rail .subtitle{
  margin:.15em 0 .9em;
  font-size:1rem;
  color:var(--dim);
  letter-spacing:.06em;
}

.rail .raillist{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:r;
}

.rail li{counter-increment:r}

.rail a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:6px 8px;
  border:1px solid transparent;
  border-radius:10px;
  color:var(--dim);
  font-size:1rem;
  text-decoration:none;
  transition:color .2s ease,border-color .2s ease,background .2s ease;
}

.rail a::before{
  content:counter(r,decimal-leading-zero);
  font-family:var(--mono);
  font-size:.82rem;
  color:var(--neon);
}

.rail a:hover,
.rail a[aria-current]{
  color:#fff;
  border-color:var(--line-2);
  background:rgba(128,0,255,.16);
}

.site-foot{
  margin-top:56px;
  border-top:1px solid var(--line-2);
  padding:34px max(20px,calc((100% - 1080px) / 2)) 0;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px 20px;
}

.site-foot .fcta{
  grid-column:1 / -1;
  margin:0 0 4px;
  font-size:clamp(1.7rem,5vw,2.6rem);
  font-weight:700;
  line-height:1.2;
  letter-spacing:.04em;
  color:#fff;
  text-shadow:0 0 22px rgba(255,0,255,.6);
}

.site-foot .fcol{
  margin:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.site-foot .fcol a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:1rem;
  color:var(--dim);
  text-decoration:none;
  transition:color .2s ease,text-shadow .2s ease;
}

.site-foot .fcol a:hover{color:var(--mag);text-shadow:0 0 8px rgba(255,0,255,.6)}

.site-foot .fcopy{
  grid-column:1 / 3;
  padding:14px 0 10px;
  border-top:1px solid var(--line);
  font-family:var(--mono);
  font-size:1rem;
  color:var(--dim);
}

.site-foot .fend{
  grid-column:3 / 5;
  margin:0;
  padding:8px 0;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:18px;
}

.site-foot .fend a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:1rem;
  color:var(--dim);
  text-decoration:none;
}

.site-foot .fend a:hover{color:var(--mag);text-shadow:0 0 8px rgba(255,0,255,.6)}

.tabbar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:44;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  background:rgba(11,10,14,.94);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  border-top:1px solid var(--line-2);
  box-shadow:0 -10px 30px rgba(0,0,0,.6);
}

.tabbar::-webkit-scrollbar{display:none}

.tabbar ol{
  display:flex;
  align-items:center;
  gap:2px;
  width:max-content;
  min-width:100%;
  margin:0;
  padding:9px 12px calc(9px + env(safe-area-inset-bottom));
  list-style:none;
}

.tabbar li{
  animation:fade .5s ease both;
  animation-delay:calc(var(--i) * .04s);
}

.tabbar a{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:12px;
  font-size:1rem;
  color:var(--dim);
  text-decoration:none;
  white-space:nowrap;
  transition:color .2s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease;
}

.tabbar .ic{
  flex:0 0 auto;
  color:var(--neon);
  transition:color .2s ease,transform .2s ease;
}

.tabbar a:hover,
.tabbar a[aria-current]{
  color:#fff;
  border-color:var(--line-2);
  background:rgba(128,0,255,.16);
  box-shadow:0 0 14px rgba(255,0,255,.35);
  text-shadow:0 0 8px rgba(255,0,255,.6);
}

.tabbar a:hover .ic,
.tabbar a[aria-current] .ic{color:var(--mag);transform:rotate(45deg)}

@keyframes fade{
  from{opacity:0;filter:blur(4px)}
  to{opacity:1;filter:none}
}

@keyframes glitch{
  0%,86%,100%{transform:none;text-shadow:0 0 18px rgba(255,0,255,.55)}
  88%{transform:translate(-2px,1px) skewX(-3deg);text-shadow:2px 0 0 rgba(255,0,255,.9),-2px 0 0 rgba(128,0,255,.9)}
  92%{transform:translate(2px,-1px) skewX(2deg);text-shadow:-2px 0 0 rgba(255,0,255,.9),2px 0 0 rgba(128,0,255,.9)}
  96%{transform:none;text-shadow:0 0 18px rgba(255,0,255,.55)}
}

@media (max-width:960px){
  .wrap{
    grid-template-columns:minmax(0,1fr);
    gap:22px;
    padding:24px 16px 0;
  }
  .rail{position:static}
  .site-foot{grid-template-columns:repeat(2,minmax(0,1fr))}
  .site-foot .fcopy{grid-column:1 / -1;padding-top:12px}
  .site-foot .fend{grid-column:1 / -1;justify-content:flex-start}
}

@media (max-width:560px){
  .hero{padding:82px 16px 26px;min-height:42vh}
  .hero-mark,
  .hero-mark .hero-logo{width:48px;height:48px}
  .prose > article{padding:20px 16px;border-radius:16px}
  .rail{border-radius:16px}
  .tabbar a{font-size:1rem;padding:0 11px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,
  *::before,
  *::after{
    animation:none !important;
    transition:none !important;
  }
}

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