:root{
  --violet:#6514ff;
  --electric:#bf00ff;
  --ink:#1c1726;
  --paper:#f5f1ff;
  --acid:#d9ff2f;
  --coral:#ff5c3a;
  --line:rgba(28,23,38,.14);
  --shell:min(1180px, 100% - 40px);
}

*{box-sizing:border-box}

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

body{
  margin:0;
  font-family:"Source Sans 3","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  font-size:17px;
  line-height:1.7;
  color:var(--ink);
  background:var(--paper);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:-25% -25% auto -25%;
  height:170vh;
  z-index:-1;
  pointer-events:none;
  background-image:
    radial-gradient(circle at 12% 16%, rgba(101,20,255,.22), transparent 42%),
    radial-gradient(circle at 86% 6%, rgba(191,0,255,.20), transparent 40%),
    repeating-linear-gradient(90deg, rgba(28,23,38,.07) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(28,23,38,.07) 0 1px, transparent 1px 64px);
  animation:drift 26s linear infinite;
}

@keyframes drift{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(-64px,-64px,0)}
}

a{color:var(--violet)}

:focus-visible{outline:3px solid var(--electric);outline-offset:3px}

/* 顶部：图标 + 胶囊导航 + 主按钮 */
.top{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px max(20px, calc((100% - 1180px) / 2));
  background:rgba(245,241,255,.9);
  backdrop-filter:blur(10px);
  border-bottom:3px solid var(--ink);
}

.mark{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:14px;
  border:3px solid var(--ink);
  background:var(--ink);
  color:var(--acid);
  font-weight:700;
  font-size:22px;
  text-decoration:none;
  overflow:hidden;
  transition:transform .2s ease, background .2s ease;
}

.mark img{width:100%;height:100%;object-fit:cover;display:block}
.mark:hover{transform:rotate(-6deg);background:var(--violet)}

.pill-nav{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.pill-nav::-webkit-scrollbar{display:none}

.pill-nav p{
  display:flex;
  gap:8px;
  margin:0;
  padding:2px;
}

.pill-nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 16px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:#fff;
  color:var(--ink);
  font-weight:600;
  font-size:16px;
  white-space:nowrap;
  text-decoration:none;
  transition:transform .2s ease, background .2s ease, color .2s ease;
}

.pill-nav a:hover{
  background:var(--violet);
  color:#fff;
  transform:translateY(-2px);
}

.cta{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 20px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:var(--electric);
  color:#fff;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
  box-shadow:3px 3px 0 var(--ink);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.cta:hover{
  background:var(--violet);
  transform:translate(-2px,-2px);
  box-shadow:6px 6px 0 var(--ink);
}

/* 首屏 */
.hero{
  position:relative;
  width:var(--shell);
  margin:0 auto;
  min-height:70vh;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,.8fr);
  gap:clamp(28px,5vw,72px);
  align-items:center;
  padding:clamp(36px,6vw,84px) 0;
}

.hero-copy{text-align:left}

.hero h1{
  margin:0 0 20px;
  font-family:"Bebas Neue","Source Sans 3","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:clamp(2.6rem, 7vw, 4.9rem);
  line-height:1;
  letter-spacing:-.015em;
  font-weight:700;
}

.lede{
  margin:0 0 26px;
  max-width:52ch;
  font-size:19px;
  line-height:1.6;
  color:#3a3352;
}

.hero-act{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin:0;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:50px;
  padding:0 26px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:var(--violet);
  color:#fff;
  font-weight:700;
  text-decoration:none;
  box-shadow:5px 5px 0 var(--ink);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover{
  background:var(--electric);
  transform:translate(-3px,-3px);
  box-shadow:9px 9px 0 var(--ink);
}

.btn.line{background:#fff;color:var(--ink)}
.btn.line:hover{background:var(--acid);color:var(--ink)}

.hero-art{
  margin:0;
  aspect-ratio:1 / 1;
  border:4px solid var(--ink);
  border-radius:28px;
  background:#fff;
  padding:14px;
  box-shadow:10px 10px 0 var(--violet);
}

.hero-art svg{width:100%;height:100%;display:block}

.hero-tag{
  position:absolute;
  top:9%;
  right:2%;
  transform:rotate(-8deg);
  padding:8px 18px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:var(--acid);
  font-weight:700;
  font-size:16px;
  box-shadow:4px 4px 0 var(--ink);
}

.hero-tag span{display:block}

/* 内容：左栏目录 + 正文 */
.body-grid{
  width:var(--shell);
  margin:0 auto;
  padding:0 0 72px;
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  gap:clamp(24px,4vw,56px);
  align-items:start;
}

.rail{
  position:sticky;
  top:92px;
  padding:16px;
  border:3px solid var(--ink);
  border-radius:18px;
  background:#fff;
  box-shadow:6px 6px 0 rgba(101,20,255,.3);
}

.rail h2{
  margin:0 0 8px;
  font-size:1rem;
  letter-spacing:.1em;
  font-weight:700;
}

.rail hr{
  border:0;
  border-top:2px solid var(--ink);
  margin:0 0 12px;
}

.rail-list{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0;
}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 12px;
  border-left:4px solid var(--violet);
  border-radius:10px;
  background:#f5f1ff;
  color:var(--ink);
  font-weight:600;
  text-decoration:none;
  transition:background .2s ease, color .2s ease, transform .2s ease;
}

.rail-list a:hover{
  background:var(--violet);
  color:#fff;
  transform:translateX(4px);
}

.prose{min-width:0}

.prose article{
  scroll-margin-top:104px;
  margin:0 0 32px;
  padding:clamp(22px,3.4vw,40px);
  border:3px solid var(--ink);
  border-bottom:9px solid var(--violet);
  border-radius:18px;
  background:#fff;
  box-shadow:8px 8px 0 rgba(28,23,38,.1);
}

.prose > article:nth-child(4n+2){border-bottom-color:var(--electric)}
.prose > article:nth-child(4n+3){border-bottom-color:var(--acid)}
.prose > article:nth-child(4n+4){border-bottom-color:var(--coral)}

.prose h2{
  margin:0 0 10px;
  font-family:"Bebas Neue","Source Sans 3","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:clamp(1.6rem, 4vw, 2.3rem);
  line-height:1.2;
  letter-spacing:-.005em;
}

.prose h3{
  margin:26px 0 8px;
  font-size:1.25rem;
  line-height:1.35;
}

.prose hr{
  border:0;
  height:5px;
  margin:0 0 22px;
  border-radius:3px;
  background:linear-gradient(90deg, var(--violet), var(--electric) 45%, var(--acid));
}

.prose p,
.prose li{font-size:17px;line-height:1.75}

.prose p{margin:0 0 16px}
.prose ul,.prose ol{margin:0 0 18px;padding-left:1.3em}
.prose li{margin:0 0 6px}

.prose a{
  color:var(--violet);
  font-weight:600;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.prose a:hover{background:var(--acid);color:var(--ink)}

.prose strong{background:linear-gradient(transparent 62%, var(--acid) 62%)}

.prose img{
  display:block;
  max-width:100%;
  height:auto;
  margin:0 0 18px;
  border:3px solid var(--ink);
  border-radius:18px;
}

.prose figure{margin:0 0 18px}

.prose blockquote{
  margin:0 0 18px;
  padding:14px 20px;
  border-left:6px solid var(--electric);
  border-radius:12px;
  background:#f5f1ff;
}

.prose blockquote p:last-child{margin:0}

/* 页脚 */
.foot{
  width:var(--shell);
  margin:0 auto 44px;
  padding:clamp(22px,4vw,44px) clamp(20px,4vw,40px);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:22px;
  border:4px solid var(--ink);
  border-radius:26px;
  background:var(--ink);
  color:#fff;
}

.foot-cta{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0;
  padding:20px;
  border-radius:18px;
  background:var(--electric);
}

.foot-cta span{
  font-family:"Bebas Neue","Source Sans 3","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:clamp(1.6rem,4vw,2.2rem);
  font-weight:700;
  color:#fff;
}

.foot-cta .btn{background:var(--acid);color:var(--ink)}
.foot-cta .btn:hover{background:#fff}

.foot-col{margin:0;display:flex;flex-direction:column}

.foot-col a{
  display:flex;
  align-items:center;
  min-height:42px;
  color:#efe9ff;
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.16);
  transition:color .2s ease, padding-left .2s ease;
}

.foot-col a:hover{color:var(--acid);padding-left:6px}

.foot-bar{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:6px 0 0;
  padding-top:16px;
  border-top:2px solid rgba(255,255,255,.22);
}

.foot-bar small{font-size:16px;color:#cfc6e6}
.foot-bar a{color:var(--acid);text-decoration:none;min-height:40px;display:inline-flex;align-items:center}
.foot-bar a:hover{text-decoration:underline}

/* 回到顶部 */
.to-top{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:60;
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:0 20px;
  border:2px solid var(--acid);
  border-radius:999px;
  background:var(--ink);
  color:#fff;
  font-weight:700;
  text-decoration:none;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
}

.to-top.on{opacity:1;pointer-events:auto}
.to-top:hover{transform:translateY(-3px);background:var(--violet)}

/* 入场 */
.js .prose > article{opacity:0;transform:translateY(22px)}
.js .prose > article.in{
  opacity:1;
  transform:none;
  transition:opacity .3s ease, transform .3s ease;
}

@media (max-width:900px){
  .hero{
    grid-template-columns:minmax(0,1fr);
    min-height:0;
    padding:34px 0 28px;
  }

  .hero-tag{
    position:static;
    justify-self:start;
    transform:rotate(-4deg);
    order:3;
  }

  .hero-art{order:2}

  .body-grid{grid-template-columns:minmax(0,1fr);gap:26px;padding-bottom:56px}

  .rail{position:static}

  .rail-list{flex-direction:row;flex-wrap:wrap}
  .rail-list a{border-left:0;border-bottom:4px solid var(--violet);border-radius:10px}
  .rail-list a:hover{transform:translateY(-3px)}

  .foot{grid-template-columns:minmax(0,1fr);gap:12px;margin-bottom:32px}
  .foot-col a{border-bottom:0;padding-left:0}
  .lede{font-size:18px}
}

@media (max-width:520px){
  .pill-nav a{padding:0 13px;font-size:16px}
  .cta{padding:0 15px}
  .prose article{box-shadow:5px 5px 0 rgba(28,23,38,.1)}
  .hero-art{box-shadow:6px 6px 0 var(--violet)}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body::before{animation:none}
  .js .prose > article{opacity:1;transform:none}
  .mark,.cta,.pill-nav a,.btn,.rail-list a,.to-top,.foot-col a{transition:none}
}

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