@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

:root{
  --violet:#6514ff;
  --magenta:#bf00ff;
  --ink:#1c1726;
  --paper:#f8f5ff;
  --lime:#c9ff35;
  --line:#e6dbff;
  --radius:10px;
}

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

html{scroll-behavior:smooth;max-width:100%}

body{
  margin:0;
  max-width:100%;
  background:var(--paper);
  color:var(--ink);
  font-family:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:18px;
  line-height:1.75;
  -webkit-text-size-adjust:100%;
  overflow-x:hidden;
  overflow-wrap:break-word;
}

body::before{
  content:"";
  position:fixed;
  inset:-40px;
  z-index:0;
  pointer-events:none;
  background-image:radial-gradient(var(--violet) 1.4px, transparent 1.4px);
  background-size:24px 24px;
  opacity:.13;
  animation:drift 22s linear infinite;
}

@keyframes drift{
  from{background-position:0 0}
  to{background-position:24px 24px}
}

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

a{color:var(--violet);text-decoration-thickness:2px;text-underline-offset:3px}

:focus-visible{outline:3px solid var(--magenta);outline-offset:3px;border-radius:6px}

/* 左侧固定竖排导航 */
.rail{
  position:fixed;
  inset:0 auto 0 0;
  width:238px;
  z-index:30;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:24px 16px 28px;
  background:var(--ink);
  color:#fff;
  border-right:6px solid var(--violet);
  overflow-y:auto;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:6px 8px;
  color:#fff;
  font-size:20px;
  font-weight:700;
  line-height:1.3;
  text-decoration:none;
  letter-spacing:.01em;
  overflow-wrap:break-word;
}

.brand-dot{
  flex:0 0 auto;
  width:16px;
  height:16px;
  border-radius:4px;
  background:var(--lime);
  transform:rotate(45deg);
}

.brand:hover .brand-dot{background:var(--magenta)}

.burger{
  display:none;
  min-height:44px;
  padding:10px 16px;
  border:0;
  border-radius:999px;
  background:var(--violet);
  color:#fff;
  font:inherit;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
}

.rail-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.rail-list li{min-width:0}

.rail-list li > a,
.rail-list details ol a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 12px;
  border-left:3px solid transparent;
  border-radius:8px;
  color:#e9e2ff;
  font-size:16px;
  text-decoration:none;
  transition:background .22s ease, color .22s ease, transform .22s ease, border-color .22s ease;
}

.rail-list li > a:hover,
.rail-list details ol a:hover,
.rail-list a.is-on{
  background:var(--violet);
  border-left-color:var(--lime);
  color:#fff;
  transform:translateX(3px);
}

.rail-grp > details > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:40px;
  padding:8px 12px;
  color:#a99dd0;
  font-size:15px;
  font-weight:700;
  letter-spacing:.14em;
  cursor:pointer;
  list-style:none;
  border-radius:8px;
}

.rail-grp > details > summary::-webkit-details-marker{display:none}

.rail-grp > details > summary::after{
  content:"";
  width:9px;
  height:9px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  transition:transform .22s ease;
}

.rail-grp > details:not([open]) > summary::after{transform:rotate(-45deg)}

.rail-grp > details > ol{
  list-style:none;
  margin:2px 0 8px;
  padding:0 0 0 10px;
  border-left:2px dashed rgba(255,255,255,.22);
}

/* 右侧主按钮 */
.cta{
  position:fixed;
  top:22px;
  right:26px;
  z-index:40;
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:12px 26px;
  border-radius:999px;
  background:var(--lime);
  color:var(--ink);
  font-weight:700;
  text-decoration:none;
  box-shadow:6px 6px 0 var(--violet);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.cta:hover{
  background:#fff;
  transform:translate(2px,2px);
  box-shadow:4px 4px 0 var(--magenta);
}

main{
  position:relative;
  z-index:1;
  margin-left:238px;
  min-width:0;
  max-width:100%;
}

/* 首屏 */
.hero{
  position:relative;
  overflow:hidden;
  min-height:100vh;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  align-items:center;
  gap:48px;
  padding:110px 48px 72px;
  background:
    radial-gradient(circle at 88% 12%, rgba(191,0,255,.22), transparent 42%),
    linear-gradient(115deg, var(--paper) 0 58%, #efe5ff 58% 100%);
}

.hero::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:180px;
  height:180px;
  background-image:radial-gradient(var(--magenta) 2px, transparent 2px);
  background-size:16px 16px;
  opacity:.5;
  pointer-events:none;
}

.hero-copy{
  position:relative;
  z-index:2;
  max-width:640px;
  min-width:0;
  text-align:center;
  margin:0 auto;
}

.hero-copy h1{
  margin:0;
  font-size:clamp(42px, 6vw, 82px);
  line-height:1.04;
  letter-spacing:-.02em;
  color:var(--ink);
  overflow-wrap:break-word;
}

.hero-rule{
  width:132px;
  max-width:100%;
  height:10px;
  margin:24px auto 22px;
  border:0;
  border-radius:6px;
  background:linear-gradient(90deg, var(--violet) 0 60%, var(--magenta) 60% 100%);
}

.hero-lead{
  max-width:46ch;
  margin:0 auto 26px;
  font-size:18px;
  color:#463c5c;
  overflow-wrap:break-word;
}

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

.btn:hover{background:var(--magenta);transform:translate(2px,2px);box-shadow:4px 4px 0 var(--ink)}

.btn-lime{background:var(--lime);color:var(--ink);box-shadow:6px 6px 0 var(--magenta)}
.btn-lime:hover{background:#fff;box-shadow:4px 4px 0 var(--violet)}

.hero-art{
  position:relative;
  z-index:1;
  min-width:0;
  aspect-ratio:5 / 4;
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--violet);
  box-shadow:20px 20px 0 var(--magenta);
}

.hero-img{width:100%;height:100%;object-fit:cover;display:block}

.art-blocks{position:absolute;inset:0}

.art-blocks span{position:absolute;border-radius:var(--radius);animation:float 6s ease-in-out infinite}

.art-blocks span:nth-child(1){width:58%;height:58%;left:8%;top:8%;background:var(--magenta)}
.art-blocks span:nth-child(2){width:44%;height:44%;right:6%;top:26%;background:var(--lime);animation-delay:.6s}
.art-blocks span:nth-child(3){width:66%;height:32%;left:14%;bottom:8%;background:var(--ink);animation-delay:1.2s}

@keyframes float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-14px)}
}

/* 内容区：aside 在左 */
.wrap{
  display:grid;
  grid-template-columns:210px minmax(0,1fr);
  gap:52px;
  max-width:1340px;
  padding:72px 48px 88px;
}

.wrap > *{min-width:0}

.side{
  position:sticky;
  top:26px;
  align-self:start;
  min-width:0;
  padding-left:16px;
  border-left:8px solid var(--magenta);
}

.side-title{
  margin:0 0 10px;
  font-size:20px;
  letter-spacing:.16em;
  color:var(--violet);
}

.side hr{
  width:56px;
  height:5px;
  margin:0 0 14px;
  border:0;
  background:var(--ink);
}

.side-list{
  list-style:none;
  margin:0;
  padding:0;
}

.side-list a{
  display:block;
  min-height:40px;
  padding:8px 0;
  color:#413556;
  font-size:16px;
  text-decoration:none;
  border-bottom:1px dashed var(--line);
  overflow-wrap:break-word;
}

.side-list a:hover{color:var(--magenta)}

.body-sec{min-width:0}

.prose{
  max-width:74ch;
  min-width:0;
  font-size:18px;
  overflow-wrap:break-word;
  word-break:break-word;
}

.prose > section{
  margin:0 0 44px;
  padding:30px 26px;
  border-radius:var(--radius);
  background:#fff;
  box-shadow:inset 0 0 0 2px var(--line);
  scroll-margin-top:100px;
  min-width:0;
  max-width:100%;
}

.prose > section:nth-child(odd){
  background:#f1e8ff;
  box-shadow:inset 0 0 0 2px #e0cdff;
}

.prose h2{
  margin:0 0 12px;
  font-size:clamp(26px, 3vw, 36px);
  line-height:1.24;
  letter-spacing:-.01em;
  color:var(--ink);
  overflow-wrap:break-word;
}

.prose h2::before{
  content:"";
  display:block;
  width:64px;
  height:8px;
  margin-bottom:14px;
  border-radius:4px;
  background:var(--violet);
}

.prose hr{
  width:80px;
  max-width:100%;
  height:4px;
  margin:0 0 20px;
  border:0;
  background:var(--magenta);
}

.prose h3{
  margin:26px 0 10px;
  font-size:22px;
  line-height:1.35;
  overflow-wrap:break-word;
}

.prose p{margin:0 0 18px}
.prose p:last-child{margin-bottom:0}

.prose ul,.prose ol{margin:0 0 18px;padding-left:1.4em}
.prose li{margin:0 0 8px}

.prose a{color:var(--violet);text-decoration-color:var(--magenta);text-decoration-thickness:2px}

.prose blockquote{
  margin:24px 0;
  padding:18px 22px;
  border-left:8px solid var(--magenta);
  border-radius:0 var(--radius) var(--radius) 0;
  background:#fff;
  font-size:18px;
  max-width:100%;
}

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

.prose figure{margin:0 0 18px;max-width:100%}
.prose figure img{margin:0}

.prose table{
  width:100%;
  max-width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  margin:0 0 18px;
  font-size:17px;
}

.prose th,.prose td{
  padding:10px 12px;
  border-bottom:2px solid var(--line);
  text-align:left;
  overflow-wrap:break-word;
  word-break:break-word;
}

.prose pre{
  display:block;
  max-width:100%;
  margin:0 0 18px;
  padding:14px 16px;
  overflow-x:auto;
  border-radius:var(--radius);
  background:#efe6ff;
  -webkit-overflow-scrolling:touch;
}

.prose code{
  padding:2px 6px;
  border-radius:6px;
  background:#efe6ff;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:16px;
  overflow-wrap:break-word;
}

.prose pre code{padding:0;background:none;white-space:pre}

/* 页脚 */
.foot{
  position:relative;
  z-index:1;
  margin-left:238px;
  padding:58px 48px 26px;
  background:var(--ink);
  color:#efe8ff;
  border-top:10px solid var(--magenta);
  min-width:0;
  max-width:100%;
}

.foot-cta h2{
  margin:0 0 14px;
  font-size:clamp(30px, 4vw, 48px);
  line-height:1.15;
  color:#fff;
  overflow-wrap:break-word;
}

.foot-cta hr{
  width:96px;
  max-width:100%;
  height:8px;
  margin:0 0 24px;
  border:0;
  background:var(--lime);
}

.foot-cols{
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1fr;
  gap:32px;
  margin:52px 0 38px;
}

.foot-cols > *{min-width:0}

.foot-cols ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.foot-cols a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 0;
  color:#d6cbef;
  font-size:16px;
  text-decoration:none;
  transition:color .2s ease, transform .2s ease;
}

.foot-cols a:hover{color:var(--lime);transform:translateX(3px)}

.foot address{
  font-style:normal;
  font-weight:700;
  color:#fff;
  line-height:1.6;
  overflow-wrap:break-word;
}

.foot address span{
  display:block;
  margin-top:6px;
  font-weight:400;
  color:#a99dd0;
  font-size:16px;
  word-break:break-all;
}

.foot-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top:18px;
  border-top:2px solid rgba(255,255,255,.16);
}

.foot-bar .copy{margin:0;font-size:16px;color:#a99dd0}

.foot-bar ul{
  display:flex;
  flex-wrap:wrap;
  gap:22px;
  list-style:none;
  margin:0;
  padding:0;
}

.foot-bar a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:#d6cbef;
  font-size:16px;
  text-decoration:none;
}

.foot-bar a:hover{color:var(--lime)}

/* 移动端 */
@media (max-width:920px){
  .rail{
    inset:0 0 auto 0;
    width:auto;
    height:auto;
    flex-direction:row;
    align-items:center;
    gap:12px;
    padding:8px 16px;
    border-right:0;
    border-bottom:6px solid var(--violet);
    overflow:visible;
  }

  .brand{flex:1 1 auto;min-width:0;font-size:17px;min-height:48px}

  .burger{display:inline-flex;align-items:center;flex:0 0 auto}

  .rail-list{
    position:fixed;
    top:70px;
    left:0;
    right:0;
    width:auto;
    display:none;
    max-height:calc(100vh - 70px);
    overflow-y:auto;
    padding:14px 16px 24px;
    background:var(--ink);
    border-bottom:6px solid var(--magenta);
    box-shadow:0 18px 30px rgba(28,23,38,.4);
  }

  .rail.open .rail-list{display:flex}

  .cta{top:auto;bottom:18px;right:16px;padding:12px 20px}

  main{margin-left:0;padding-top:70px;overflow-x:clip}

  .hero{
    grid-template-columns:1fr;
    min-height:0;
    gap:32px;
    padding:44px 20px 52px;
    background:
      radial-gradient(circle at 90% 8%, rgba(191,0,255,.2), transparent 46%),
      linear-gradient(160deg, var(--paper) 0 62%, #efe5ff 62% 100%);
  }

  .hero-art{aspect-ratio:4 / 3;box-shadow:12px 12px 0 var(--magenta)}

  .wrap{
    grid-template-columns:1fr;
    gap:34px;
    padding:44px 18px 60px;
  }

  .side{position:static}

  .prose{font-size:17px;max-width:none}

  .prose > section{padding:24px 18px;margin-bottom:32px}

  .foot{margin-left:0;padding:44px 18px 22px;overflow-x:clip}

  .foot-cols{grid-template-columns:1fr 1fr;gap:24px;margin:36px 0 28px}

  .foot-cols > .fcol:first-child{grid-column:1 / -1}
}

@media (max-width:520px){
  .prose table{font-size:16px}
  .prose th,.prose td{padding:8px 8px}
  .foot-cols{grid-template-columns:1fr}
  .foot-cols > .fcol:first-child{grid-column:auto}
}

@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}
