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

:root{
  --mage:#ff0080;
  --magf:#ff00ff;
  --ink:#26171f;
  --deep:#0f070c;
  --txt:#f3e6ee;
  --dim:#c9aabb;
  --line:rgba(255,255,255,.14);
  --r:4px;
}

*,*::before,*::after{box-sizing:border-box}

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

body{
  margin:0;
  color:var(--txt);
  font-family:'Lato',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.7;
  font-weight:400;
  letter-spacing:.01em;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:-22%;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(34% 38% at 18% 22%, #ff0080 0%, rgba(255,0,128,0) 66%),
    radial-gradient(30% 34% at 80% 16%, #ff00ff 0%, rgba(255,0,255,0) 62%),
    radial-gradient(46% 44% at 56% 80%, #6d0a49 0%, rgba(109,10,73,0) 72%),
    radial-gradient(26% 28% at 10% 84%, #ff00a8 0%, rgba(255,0,168,0) 62%);
  filter:blur(70px) saturate(1.25);
  opacity:.6;
  animation:drift 26s ease-in-out infinite alternate;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size:68px 68px;
  -webkit-mask-image:radial-gradient(72% 68% at 50% 38%, #000 38%, transparent 100%);
  mask-image:radial-gradient(72% 68% at 50% 38%, #000 38%, transparent 100%);
}

@keyframes drift{
  from{transform:translate3d(0,0,0) scale(1) rotate(0deg)}
  to{transform:translate3d(-5%,4%,0) scale(1.14) rotate(7deg)}
}

a{color:#ff9ad4}

h1,h2,h3,h4{font-family:'EB Garamond',Georgia,'Songti SC',serif;font-weight:600}

.sronly{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:80;
  background:rgba(15,7,12,.82);
  -webkit-backdrop-filter:blur(16px) saturate(1.2);
  backdrop-filter:blur(16px) saturate(1.2);
  border-bottom:1px solid var(--line);
}

.bar{
  max-width:1180px;
  margin:0 auto;
  padding:11px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.brand{
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  min-height:42px;
}

.brand .mark{
  font-family:'EB Garamond',Georgia,serif;
  font-weight:600;
  font-size:1.32rem;
  letter-spacing:.2em;
  color:#fff;
  background:linear-gradient(100deg,#fff,rgba(255,255,255,.72));
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  position:relative;
  padding-bottom:3px;
}

.brand .mark::after{
  content:"";
  position:absolute;
  left:0;right:.2em;bottom:0;
  height:2px;
  background:linear-gradient(90deg,var(--mage),var(--magf),transparent);
  border-radius:2px;
}

.srch{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.srch input{
  font:inherit;
  font-size:.95rem;
  color:var(--txt);
  background:rgba(255,255,255,.06);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:0 11px;
  min-height:42px;
  width:150px;
  min-width:0;
  outline-offset:2px;
}

.srch input::placeholder{color:#a98f9e}

.btn{
  font:inherit;
  font-size:.9rem;
  letter-spacing:.06em;
  color:#fff;
  background:linear-gradient(120deg,var(--mage),var(--magf));
  border:1px solid rgba(255,255,255,.22);
  border-radius:var(--r);
  padding:0 14px;
  min-height:42px;
  cursor:pointer;
  transition:filter .2s ease,transform .2s ease;
}

.btn:hover{filter:brightness(1.14)}
.btn:active{transform:translateY(1px)}

input:focus-visible,button:focus-visible,a:focus-visible{
  outline:2px solid #fff;
  outline-offset:3px;
}

/* ---------- 锚点条 ---------- */
.anchors{
  max-width:1180px;
  margin:0 auto;
  padding:0 20px;
}

.anchors ol{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:2px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,0,128,.6) transparent;
}

.anchors ol::-webkit-scrollbar{height:4px}
.anchors ol::-webkit-scrollbar-thumb{background:rgba(255,0,128,.6);border-radius:2px}

.anchors li{position:relative;flex:0 0 auto}

.anchors > ol > li > a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  font-size:.94rem;
  color:var(--dim);
  text-decoration:none;
  white-space:nowrap;
  border-radius:var(--r) var(--r) 0 0;
  border-bottom:2px solid transparent;
  transition:color .2s ease,border-color .2s ease;
}

.anchors > ol > li > a:hover,
.anchors > ol > li > a.active{
  color:#fff;
  border-bottom-color:var(--mage);
}

.has-sub > a::after{
  content:"";
  width:5px;height:5px;
  margin-left:7px;
  border-right:1px solid currentColor;
  border-bottom:1px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
  opacity:.7;
}

.sub{
  position:absolute;
  top:100%;
  left:0;
  z-index:90;
  min-width:198px;
  list-style:none;
  margin:0;
  padding:6px;
  display:none;
  background:#1b0f16;
  border:1px solid var(--line);
  border-radius:0 0 var(--r) var(--r);
  box-shadow:0 18px 40px rgba(0,0,0,.45);
}

.has-sub:hover .sub,
.has-sub:focus-within .sub{display:block}

.sub a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 12px;
  font-size:.9rem;
  color:var(--txt);
  text-decoration:none;
  border-radius:var(--r);
}

.sub a:hover{background:rgba(255,0,128,.22);color:#fff}

/* ---------- 超大标题 ---------- */
.hero{
  position:relative;
  max-width:1180px;
  margin:0 auto;
  padding:64px 20px 78px;
  min-height:64vh;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  text-align:right;
  overflow:hidden;
  isolation:isolate;
}

.ghost{
  position:absolute;
  right:-.04em;
  top:50%;
  transform:translateY(-50%);
  z-index:-1;
  font-family:'EB Garamond',Georgia,serif;
  font-weight:700;
  font-size:clamp(5.5rem,23vw,16rem);
  line-height:.78;
  letter-spacing:.04em;
  color:transparent;
  -webkit-text-stroke:1px rgba(255,255,255,.17);
  white-space:nowrap;
  pointer-events:none;
  user-select:none;
}

.hero h1{
  position:relative;
  margin:0;
  max-width:15em;
  font-size:clamp(2.05rem,7vw,4.5rem);
  line-height:1.1;
  letter-spacing:.005em;
  color:#fff;
  background:linear-gradient(102deg,#fff 12%,#ffd3ea 46%,#ff3fae 88%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 34px rgba(255,0,128,.42));
}

/* ---------- 主体网格 ---------- */
main{display:block}

.stage{
  max-width:1180px;
  margin:0 auto;
  padding:0 20px 84px;
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  gap:52px;
  align-items:start;
}

.rail{
  position:sticky;
  top:126px;
  border-left:1px solid var(--line);
  padding-left:18px;
}

.rail h2{
  margin:0;
  font-size:1.02rem;
  letter-spacing:.22em;
  font-weight:600;
  color:#fff;
}

.rail hr{
  height:1px;
  border:0;
  margin:.6rem 0 1rem;
  background:linear-gradient(90deg,var(--mage),rgba(255,0,255,.35),transparent);
}

.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:rl;
  display:flex;
  flex-direction:column;
}

.rail-list li a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:4px 0;
  font-size:.92rem;
  color:var(--dim);
  text-decoration:none;
  border-bottom:1px dashed rgba(255,255,255,.08);
  transition:color .2s ease,padding-left .2s ease;
}

.rail-list li a::before{
  counter-increment:rl;
  content:counter(rl,decimal-leading-zero);
  font-family:'EB Garamond',Georgia,serif;
  font-size:.78rem;
  letter-spacing:.06em;
  color:var(--mage);
  opacity:.85;
}

.rail-list li a:hover,
.rail-list li a.active{
  color:#fff;
  padding-left:5px;
}

.rail-fig{margin:20px 0 0}
.rail-fig img{
  display:block;
  width:100%;
  height:auto;
  border:1px solid var(--line);
  border-radius:var(--r);
}

/* ---------- 正文 ---------- */
.body{min-width:0}

.body article{
  padding:0 0 44px;
  margin:0 0 44px;
  border-bottom:1px solid var(--line);
  scroll-margin-top:132px;
}

.body article:last-child{border-bottom:0;margin-bottom:0}

.body h1,
.body h2{
  font-size:clamp(1.5rem,3.4vw,2.15rem);
  line-height:1.26;
  margin:0 0 .55rem;
  color:#fff;
  letter-spacing:.005em;
}

.body h3{
  font-size:1.26rem;
  line-height:1.35;
  margin:1.5rem 0 .5rem;
  color:#fff;
}

.body h4{
  font-size:1.06rem;
  margin:1.2rem 0 .4rem;
  color:#ffd6ea;
}

.body hr{
  height:1px;
  border:0;
  margin:.25rem 0 1.35rem;
  background:linear-gradient(90deg,var(--mage),var(--magf) 38%,rgba(255,0,255,0) 92%);
}

.body p{
  margin:0 0 1.05rem;
  font-size:1.06rem;
  line-height:1.82;
  color:var(--txt);
}

.body ul,.body ol{
  margin:0 0 1.1rem;
  padding-left:1.3rem;
  line-height:1.8;
}

.body li{margin:.34rem 0}
.body li::marker{color:var(--magf)}

.body a{
  color:#ff9ad4;
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-color:rgba(255,154,212,.5);
}

.body a:hover{color:#fff;text-decoration-color:#fff}

.body strong{color:#fff;font-weight:700}

.body blockquote{
  margin:1.4rem 0;
  padding:.3rem 0 .3rem 1.1rem;
  border-left:3px solid var(--magf);
  color:var(--dim);
  font-style:italic;
}

.body figure{margin:1.4rem 0}
.body figure img{max-width:100%;height:auto;display:block;border:1px solid var(--line);border-radius:var(--r)}
.body figcaption{font-size:.86rem;color:var(--dim);margin-top:.5rem}

.body table{width:100%;border-collapse:collapse;margin:1.2rem 0;font-size:.96rem}
.body th,.body td{border:1px solid var(--line);padding:.6rem .7rem;text-align:left}
.body th{background:rgba(255,0,128,.13);color:#fff}

.body code{
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:.9em;
  background:rgba(255,255,255,.08);
  padding:.1em .38em;
  border-radius:3px;
}

.body img{max-width:100%;height:auto}

/* ---------- 页脚 ---------- */
footer{
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,rgba(255,0,128,.07),rgba(15,7,12,.4));
}

.fgrid{
  max-width:1180px;
  margin:0 auto;
  padding:44px 20px 26px;
  display:grid;
  grid-template-columns:1.1fr 1fr 1.5fr;
  gap:26px;
}

footer p{
  margin:0;
  font-size:.95rem;
  color:var(--dim);
  line-height:1.7;
  min-width:0;
}

.fbrand{
  font-family:'EB Garamond',Georgia,serif;
  font-size:1.1rem !important;
  letter-spacing:.18em;
  color:#fff !important;
}

.fhost{word-break:break-all}

.subline{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

.subline input{
  flex:1 1 130px;
  min-width:0;
  font:inherit;
  font-size:.95rem;
  color:var(--txt);
  background:rgba(255,255,255,.06);
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:0 11px;
  min-height:42px;
}

.subline input::placeholder{color:#a98f9e}

.fnote{
  max-width:1180px;
  margin:0 auto;
  padding:0 20px 32px;
}

footer small{
  display:block;
  font-size:.8rem;
  letter-spacing:.1em;
  color:#9c8493;
}

/* ---------- 滚动显现 ---------- */
.js .rv{
  opacity:0;
  transform:translateY(20px);
}

.js .rv.on{
  opacity:1;
  transform:none;
  transition:opacity .62s ease,transform .62s cubic-bezier(.2,.7,.3,1);
}

/* ---------- 窄屏 ---------- */
@media (max-width:900px){
  .stage{
    grid-template-columns:1fr;
    gap:26px;
    padding-bottom:60px;
  }
  .rail{
    position:static;
    border-left:0;
    border-top:1px solid var(--line);
    padding:16px 0 0;
  }
  .rail-list{
    flex-direction:row;
    flex-wrap:wrap;
    gap:0 16px;
  }
  .rail-list li a{
    border-bottom:0;
    min-height:40px;
    padding-right:4px;
  }
  .fgrid{grid-template-columns:1fr;gap:20px;padding-top:34px}
}

@media (max-width:760px){
  body{font-size:16px}
  .bar{padding:9px 16px;gap:10px}
  .srch input{width:120px}
  .anchors{padding:0 16px}
  .hero{padding:52px 16px 62px;min-height:58vh}
  .ghost{font-size:clamp(4.6rem,26vw,9rem)}
  .stage{padding:0 16px 56px}
  .fgrid{padding:32px 16px 22px}
  .fnote{padding:0 16px 28px}
  .body p{font-size:1.02rem}
}

@media (max-width:400px){
  .srch input{width:96px}
  .brand .mark{font-size:1.14rem;letter-spacing:.14em}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body::before{animation:none}
  .js .rv{opacity:1;transform:none}
  .js .rv.on{transition:none}
  *{transition-duration:.01ms !important}
}

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