:root{
  --ink:#0d0d0d;
  --ink-2:#12101a;
  --violet:#8000ff;
  --magenta:#ff00ff;
  --paper:#ece9f7;
  --dim:#a89dc4;
  --line:rgba(128,0,255,.32);
  --hud:64px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  background-color:var(--ink);
  color:var(--paper);
  font-family:'Inter',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  font-weight:300;
  overflow-x:hidden;
  background-image:
    radial-gradient(900px 480px at 84% -10%, rgba(255,0,255,.16), transparent 70%),
    radial-gradient(760px 520px at 2% 24%, rgba(128,0,255,.18), transparent 72%);
  background-attachment:fixed;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:9;
  pointer-events:none;
  opacity:.5;
  mix-blend-mode:screen;
  background:repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px);
}
h1,h2,h3,h4{line-height:1.3}
img{max-width:100%}
[id]{scroll-margin-top:calc(var(--hud) + 22px)}
hr{
  border:0;
  height:1px;
  margin:10px 0;
  background:linear-gradient(90deg,var(--magenta),rgba(128,0,255,.55),transparent);
}

/* ===== HUD 顶栏 ===== */
.hud{
  position:sticky;
  top:0;
  z-index:30;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,rgba(13,13,13,.96),rgba(13,13,13,.7));
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
}
.hud__bar{
  max-width:1180px;
  margin:0 auto;
  min-height:var(--hud);
  padding:9px 16px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
}
.pillgroup{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.pillgroup--l{justify-self:start}
.pillgroup--r{justify-self:end}
.pillmenu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:8px;
}
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 15px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--paper);
  font-size:16px;
  font-weight:400;
  letter-spacing:.02em;
  text-decoration:none;
  white-space:nowrap;
  transition:color .2s,border-color .2s,box-shadow .25s,background .25s;
}
.pill:hover,.pill:focus-visible{
  color:#fff;
  border-color:var(--magenta);
  background:rgba(255,0,255,.09);
  box-shadow:0 0 0 1px rgba(255,0,255,.35),0 0 22px rgba(255,0,255,.32);
  outline:none;
}
.pill--toggle{
  cursor:pointer;
  list-style:none;
  color:#fff;
  border-color:rgba(255,0,255,.5);
  box-shadow:0 0 16px rgba(255,0,255,.22) inset;
}
.pill--toggle::-webkit-details-marker{display:none}
.pill--cta{
  border-color:transparent;
  color:#fff;
  background:linear-gradient(100deg,var(--violet),var(--magenta));
  box-shadow:0 0 20px rgba(255,0,255,.35);
}
.pill--cta:hover{background:linear-gradient(100deg,var(--magenta),var(--violet))}
.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  justify-self:center;
  min-height:44px;
  padding:0 6px;
  color:#fff;
  text-decoration:none;
}
.brand__bar{
  width:26px;
  height:9px;
  background:linear-gradient(90deg,var(--violet),var(--magenta));
  transform:skewX(-26deg);
  box-shadow:0 0 18px rgba(255,0,255,.6);
}
.brand__name{
  font-size:19px;
  font-weight:600;
  letter-spacing:.18em;
  text-shadow:0 0 12px rgba(128,0,255,.9),0 0 28px rgba(255,0,255,.45);
  animation:glitch 7s steps(1) infinite;
}
@keyframes glitch{
  0%,86%,100%{transform:none}
  88%{transform:skewX(-7deg) translateX(-1px)}
  90%{transform:skewX(5deg) translateX(1px)}
  92%{transform:none}
}

/* ===== 外壳 ===== */
.shell{
  max-width:1180px;
  margin:0 auto;
  padding:0 16px 48px;
}

/* ===== 首屏 ===== */
.hero{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:clamp(18px,4vw,48px);
  min-height:45vh;
  padding:clamp(26px,5vh,52px) 0 clamp(16px,3vh,30px);
}
.hero__copy{text-align:right;min-width:0}
.hero__kicker{
  margin:0 0 10px;
  color:var(--magenta);
  font-size:16px;
  letter-spacing:.22em;
  text-shadow:0 0 14px rgba(255,0,255,.6);
}
.hero h1{
  margin:0;
  font-size:clamp(30px,5.2vw,56px);
  line-height:1.18;
  font-weight:600;
  color:#fff;
  text-shadow:0 0 18px rgba(255,0,255,.32),0 0 46px rgba(128,0,255,.3);
}
.hero__lead{
  margin:16px 0 0 auto;
  max-width:56ch;
  color:var(--dim);
  font-size:17px;
}
.sigil{
  position:relative;
  margin:0;
  width:clamp(110px,14vw,172px);
  aspect-ratio:1;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:10px;
  background:linear-gradient(150deg,rgba(128,0,255,.4),rgba(255,0,255,.16));
  box-shadow:0 0 0 1px rgba(255,0,255,.35),0 0 44px rgba(128,0,255,.35);
}
.sigil__img{width:100%;height:100%;object-fit:cover;display:block}
.sigil__ring{
  position:absolute;
  inset:14%;
  border:1px dashed rgba(255,255,255,.5);
  border-radius:50%;
  animation:spin 16s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.slash{
  grid-column:1/-1;
  height:14px;
  margin-top:clamp(14px,3vh,26px);
  transform:skewX(-18deg);
  opacity:.85;
  filter:drop-shadow(0 0 12px rgba(128,0,255,.6));
  background:repeating-linear-gradient(115deg,var(--violet) 0 18px,transparent 18px 30px,var(--magenta) 30px 40px,transparent 40px 64px);
}

/* ===== 正文区 ===== */
.stage{
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
  gap:clamp(22px,4vw,46px);
  align-items:start;
  padding-top:clamp(18px,3vh,32px);
}
.rail{
  position:sticky;
  top:calc(var(--hud) + 16px);
  padding-left:16px;
  border-left:1px solid var(--line);
}
.rail__ttl{
  margin:0 0 6px;
  font-size:16px;
  font-weight:500;
  letter-spacing:.28em;
  color:#fff;
  text-shadow:0 0 14px rgba(128,0,255,.8);
}
.rail hr{margin:8px 0 12px}
.rail__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
}
.rail__list a{
  display:flex;
  align-items:baseline;
  gap:9px;
  min-height:40px;
  padding:8px 4px;
  color:var(--dim);
  font-size:16px;
  text-decoration:none;
  border-bottom:1px dashed rgba(128,0,255,.18);
  transition:color .2s,padding-left .2s;
}
.rail__list a:hover,.rail__list a:focus-visible{color:#fff;padding-left:9px;outline:none}
.rail__num{
  font-size:14px;
  letter-spacing:.1em;
  font-variant-numeric:tabular-nums;
  color:var(--magenta);
}
.prose{min-width:0;max-width:80ch}
.prose article{
  padding:clamp(20px,3.2vh,36px) 0;
  border-top:1px solid rgba(128,0,255,.16);
}
.prose article:first-child{border-top:0;padding-top:0}
.prose h2{
  margin:0;
  font-size:clamp(21px,2.6vw,29px);
  font-weight:600;
  color:#fff;
  letter-spacing:.01em;
}
.prose h2 + hr{margin:12px 0 20px}
.prose h3{
  margin:26px 0 6px;
  font-size:19px;
  font-weight:500;
  color:#f4ecff;
}
.prose h3 + hr{margin:8px 0 14px}
.prose p{margin:0 0 16px}
.prose ul,.prose ol{margin:0 0 18px;padding-left:1.3em}
.prose li{margin:0 0 8px}
.prose li::marker{color:var(--magenta)}
.prose a{
  color:#dcc6ff;
  text-decoration:underline;
  text-decoration-color:rgba(255,0,255,.55);
  text-underline-offset:3px;
}
.prose a:hover{color:#fff}
.prose strong{color:#fff;font-weight:600}
.prose blockquote{
  margin:20px 0;
  padding:12px 18px;
  color:#e8ddff;
  border-left:2px solid var(--magenta);
  border-radius:0 10px 10px 0;
  background:rgba(128,0,255,.12);
}
.prose figure{margin:22px 0}
.prose img{display:block;height:auto;border-radius:10px}
.prose figcaption{margin-top:8px;font-size:16px;color:var(--dim)}
.prose table{width:100%;border-collapse:collapse;margin:0 0 18px;font-size:16px}
.prose th,.prose td{padding:9px 10px;text-align:left;border-bottom:1px solid rgba(128,0,255,.24)}
.prose th{color:#fff;font-weight:500}
.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.94em;
  padding:1px 5px;
  border-radius:5px;
  background:rgba(255,0,255,.14);
}

/* ===== 页脚 ===== */
.end{
  max-width:1180px;
  margin:0 auto;
  padding:26px 16px 40px;
  border-top:1px solid var(--line);
}
.end__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.end dl{margin:0;min-width:0}
.end dt{
  margin:0 0 6px;
  font-size:16px;
  letter-spacing:.2em;
  color:var(--magenta);
}
.end dd{margin:0;color:var(--dim);overflow-wrap:anywhere}
.end dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--dim);
  text-decoration:none;
  transition:color .2s;
}
.end dd a:hover,.end dd a:focus-visible{color:#fff;outline:none}
.end__note{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:10px;
  margin:16px 0 0;
  font-size:16px;
  color:#7f7596;
}
.end__note a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--dim);
  text-decoration:none;
}
.end__note a:hover{color:#fff}

/* ===== 滚动揭示 ===== */
.reveal-init{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s ease,transform .6s cubic-bezier(.2,.7,.2,1);
}
.reveal-init.is-in{opacity:1;transform:none}

/* ===== 平板 ===== */
@media (max-width:900px){
  .hud__bar{grid-template-columns:auto 1fr auto;gap:6px}
  .pillgroup{position:relative}
  .pillgroup > .pillmenu{
    position:absolute;
    top:calc(100% + 8px);
    z-index:40;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    min-width:190px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:14px;
    background:rgba(13,13,13,.98);
    box-shadow:0 18px 44px rgba(0,0,0,.72);
  }
  .pillgroup--l > .pillmenu{left:0}
  .pillgroup--r > .pillmenu{right:0}
  .pillgroup > .pillmenu .pill{width:100%;justify-content:flex-start}
  .stage{grid-template-columns:minmax(0,1fr)}
  .rail{
    position:static;
    padding:0 0 14px;
    border-left:0;
    border-bottom:1px solid var(--line);
  }
  .rail__list{flex-direction:row;flex-wrap:wrap;gap:4px 14px}
  .rail__list a{border-bottom:0;padding:6px 0}
  .end__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}

/* ===== 手机 ===== */
@media (max-width:760px){
  .hero{
    grid-template-columns:minmax(0,1fr);
    min-height:0;
    padding-top:24px;
  }
  .sigil{width:104px}
  .hero__lead{max-width:none}
  .shell{padding:0 14px 36px}
  .hud__bar{padding:8px 12px}
  .end__grid{grid-template-columns:minmax(0,1fr);gap:8px}
  .end{padding:22px 14px 34px}
  .slash{height:12px}
}

@media (min-width:901px){
  .pillgroup > .pill--toggle{display:none}
  .pillgroup > .pillmenu{display:flex}
  .pillgroup::details-content{content-visibility:visible}
}

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

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