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

:root{
  --bg:#000000;
  --panel:#121212;
  --card:#08080a;
  --ink:#ededf0;
  --dim:#9b9ba2;
  --line:#26262a;
  --neon:#8ef0c0;
  --gold:#e8c56a;
  --blue:#7aa8ff;
  --purple:#b58cff;
  --r:18px;
}

*{box-sizing:border-box}

html{
  background:var(--bg);
  color-scheme:dark;
  scroll-behavior:smooth;
}

body{
  margin:0;
  width:100%;
  background:var(--bg);
  color:var(--ink);
  font-family:"Kalam","Patrick Hand",system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.7;
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
}

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

a{color:inherit}

:focus-visible{
  outline:2px solid var(--neon);
  outline-offset:3px;
  border-radius:10px;
}

article[id]{scroll-margin-top:172px}

/* 顶栏 */
.top{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 14px;
  background:rgba(0,0,0,.88);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}

.logo{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border:1px solid var(--line);
  border-radius:14px;
  color:var(--neon);
  text-decoration:none;
  text-shadow:0 0 10px rgba(142,240,192,.45);
}
.logo:hover{border-color:rgba(142,240,192,.7)}

.menu{position:relative;flex:0 0 auto;min-width:0}

.menu summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 16px;
  border:1px solid var(--line);
  border-radius:14px;
  color:var(--ink);
  font-size:16px;
  letter-spacing:.08em;
  white-space:nowrap;
}
.menu summary::-webkit-details-marker{display:none}
.menu summary::after{
  content:"";
  width:7px;
  height:7px;
  margin-left:9px;
  border-right:2px solid var(--dim);
  border-bottom:2px solid var(--dim);
  transform:rotate(45deg) translateY(-2px);
}
.menu[open] summary{border-color:var(--neon);color:var(--neon)}
.menu[open] summary::after{border-color:var(--neon)}

.menu-list{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  z-index:50;
  display:grid;
  gap:2px;
  min-width:220px;
  max-width:calc(100vw - 28px);
  padding:8px;
  background:#0a0a0c;
  border:1px solid var(--line);
  border-radius:var(--r);
}
.menu-list a{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:0 12px;
  border-radius:12px;
  text-decoration:none;
  color:var(--ink);
  font-size:16px;
}
.menu-list a:hover,
.menu-list a:focus-visible{background:#161618;color:var(--neon)}

/* 二级锚点条：窄屏折行，宽屏一行 */
.bar{
  position:sticky;
  top:63px;
  z-index:30;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:8px 14px;
  background:#000;
  border-bottom:1px solid var(--line);
}
.bar a{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  min-height:40px;
  padding:0 12px;
  border:1px dashed var(--line);
  border-radius:999px;
  color:var(--dim);
  text-decoration:none;
  font-size:16px;
  white-space:nowrap;
}
.bar a:hover,
.bar a:focus-visible{color:var(--neon);border-color:rgba(142,240,192,.6)}

/* 首屏 */
.hero{
  display:grid;
  gap:18px;
  padding:22px 14px 30px;
  border-bottom:1px solid var(--line);
}

.hero-text{
  order:-1;
  display:grid;
  gap:14px;
  justify-items:end;
  text-align:right;
  min-width:0;
}

.badge{
  margin:0;
  max-width:100%;
  padding:6px 14px;
  border:1px dashed rgba(181,140,255,.55);
  border-radius:12px;
  color:#dccdff;
  font-size:16px;
  transform:rotate(-2deg);
  text-shadow:0 0 10px rgba(181,140,255,.35);
}

.hero h1{
  margin:0;
  max-width:100%;
  font-size:clamp(29px,8vw,46px);
  line-height:1.22;
  letter-spacing:.01em;
  overflow-wrap:break-word;
  text-shadow:0 0 18px rgba(142,240,192,.22);
}

.hero-cta{
  margin:2px 0 0;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
}

.btn{
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:0 18px;
  border:1px solid var(--line);
  border-radius:999px;
  text-decoration:none;
  color:var(--ink);
  font-size:16px;
}
.btn:hover{border-color:var(--ink)}
.btn-main{
  border-color:rgba(232,197,106,.65);
  color:var(--gold);
  text-shadow:0 0 10px rgba(232,197,106,.35);
}
.btn-main:hover{border-color:var(--gold)}

.hero-media{
  position:relative;
  min-width:0;
  display:grid;
  place-items:center;
  min-height:220px;
  overflow:hidden;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--r);
}
.hero-img{
  display:block;
  width:100%;
  height:100%;
  max-height:430px;
  object-fit:cover;
}
.hero-blank{
  width:100%;
  height:100%;
  min-height:220px;
  background:repeating-linear-gradient(135deg,#101013 0 10px,#08080a 10px 20px);
}

/* 主体 */
main{
  display:grid;
  gap:22px;
  max-width:1120px;
  margin:0 auto;
  padding:24px 14px 44px;
}
main > *{min-width:0}

/* 侧栏 */
.side{
  order:2;
  display:grid;
  gap:10px;
  align-content:start;
  padding:14px;
  background:#070708;
  border:1px dashed var(--line);
  border-radius:var(--r);
}

.side-h{
  margin:0;
  font-size:16px;
  font-weight:400;
  letter-spacing:.16em;
  color:var(--dim);
}
.side-h span{border-bottom:1px dashed rgba(232,197,106,.5)}

.side-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:2px;
  counter-reset:s;
}
.side-list li{counter-increment:s}
.side-list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:2px 8px;
  border-radius:10px;
  color:#d5d5da;
  text-decoration:none;
  font-size:16px;
  overflow-wrap:anywhere;
}
.side-list a::before{
  content:counter(s,decimal-leading-zero);
  color:var(--gold);
  font-size:16px;
  opacity:.75;
}
.side-list a:hover,
.side-list a:focus-visible{background:#131316;color:var(--neon)}

.top-link{
  display:flex;
  align-items:center;
  min-height:44px;
  margin-top:4px;
  padding:0 8px;
  border-top:1px dashed var(--line);
  color:var(--dim);
  text-decoration:none;
  font-size:16px;
}
.top-link:hover{color:var(--neon)}

/* 正文 */
.doc{
  min-width:0;
  display:grid;
  gap:16px;
  word-break:break-word;
  overflow-wrap:break-word;
}

.doc article{
  min-width:0;
  padding:18px 16px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
}

.doc h2{
  margin:0 0 12px;
  font-size:clamp(21px,5vw,26px);
  line-height:1.45;
  text-shadow:0 0 12px rgba(122,168,255,.18);
}
.doc h2 > span{
  display:inline-block;
  padding-bottom:3px;
  border-bottom:2px dashed rgba(232,197,106,.55);
}

.doc h3{margin:20px 0 8px;font-size:19px;line-height:1.5}
.doc h3 > span{border-bottom:1px dashed rgba(232,197,106,.4)}

.doc p{margin:0 0 14px;color:#dadae0}
.doc ul,
.doc ol{margin:0 0 16px;padding-left:1.25em}
.doc li{margin:0 0 8px;overflow-wrap:break-word}
.doc ul li::marker{color:var(--gold)}
.doc ol li::marker{color:var(--neon)}

.doc a{
  color:var(--blue);
  text-decoration:underline;
  text-decoration-style:dotted;
  text-underline-offset:4px;
  overflow-wrap:anywhere;
}
.doc a:hover{color:var(--neon)}

.doc strong{color:var(--neon);font-weight:700}

.doc blockquote{
  margin:18px 0;
  padding:12px 16px;
  border-left:3px solid var(--gold);
  border-radius:0 var(--r) var(--r) 0;
  background:#0e0e10;
  color:#cfcfd6;
}
.doc blockquote p:last-child{margin:0}

.doc code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:16px;
  background:#141417;
  padding:1px 6px;
  border-radius:6px;
  overflow-wrap:anywhere;
}

.doc pre{
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:12px 14px;
  background:#141417;
  border:1px solid var(--line);
  border-radius:14px;
  font-size:16px;
  line-height:1.6;
}
.doc pre code{background:none;padding:0}

.doc img{
  display:block;
  max-width:100%;
  height:auto;
  border-radius:14px;
  border:1px solid var(--line);
}

.doc hr{
  border:0;
  border-top:1px dashed var(--line);
  margin:20px 0;
}

.doc table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  font-size:16px;
}
.doc th,
.doc td{border:1px solid var(--line);padding:8px;text-align:left}

/* 页脚 */
.foot{
  padding:22px 14px 30px;
  border-top:1px solid var(--line);
  background:#07070a;
}

.foot-h{
  margin:0 0 12px;
  font-size:16px;
  font-weight:400;
  letter-spacing:.16em;
  color:var(--dim);
}
.foot-h span{border-bottom:1px dashed rgba(142,240,192,.4)}

.foot-nav{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.foot-nav dl{margin:0;min-width:0}
.foot-nav dt{
  margin:0 0 4px;
  color:#6f6f77;
  font-size:16px;
  letter-spacing:.1em;
}
.foot-nav dd{margin:0}
.foot-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  color:#c9c9d0;
  text-decoration:none;
  font-size:16px;
  overflow-wrap:anywhere;
}
.foot-nav a:hover,
.foot-nav a:focus-visible{color:var(--neon)}

.copy{
  margin:20px 0 0;
  text-align:center;
  color:#63636b;
  font-size:16px;
  overflow-wrap:anywhere;
}

/* 入场动效 */
.rv{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .6s ease, transform .6s ease;
}
.rv.in{opacity:1;transform:none}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .rv{opacity:1;transform:none;transition:none}
}

/* 桌面 */
@media (min-width:860px){
  .top{padding:10px 32px}
  .bar{
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    top:67px;
    padding:8px 32px;
  }
  .bar::-webkit-scrollbar{display:none}
  article[id]{scroll-margin-top:118px}

  .hero{
    grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);
    align-items:center;
    gap:34px;
    min-height:70vh;
    padding:44px 32px 52px;
  }
  .hero-media{order:1}
  .hero-text{order:2}

  main{
    grid-template-columns:250px minmax(0,1fr);
    gap:34px;
    padding:36px 32px 64px;
    align-items:start;
  }

  .side{order:1;position:sticky;top:118px}
  .doc article{padding:24px 24px}

  .foot{padding:26px 32px 34px}
  .foot-nav{max-width:920px}
}

@media (min-width:1100px){
  .hero{padding:52px 40px 60px}
  main{padding:40px 40px 72px}
  .foot{padding:28px 40px 36px}
}

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