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

:root{
  --ink:#000000;
  --sur:#121212;
  --sur2:#1a1a1a;
  --line:#242424;
  --fg:#e8ede9;
  --dim:#8c948e;
  --neon:#4de8a8;
  --neon-dim:rgba(77,232,168,.28);
  --r:28px;
  --pad:clamp(1rem,4vw,2.5rem);
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--ink);
  color:var(--fg);
  font-family:'IBM Plex Sans',ui-sans-serif,system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.72;
  font-weight:400;
  letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
::selection{background:var(--neon);color:#04120a}
a{color:inherit}
img{max-width:100%;height:auto}
:focus-visible{outline:2px solid var(--neon);outline-offset:3px;border-radius:8px}

/* ---------- 顶部：细条 + 品牌行 + 菜单行 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(0,0,0,.9);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.ticker{
  margin:0;
  padding:.42rem var(--pad);
  font-size:.86rem;
  font-weight:500;
  letter-spacing:.3em;
  color:var(--neon);
  border-bottom:1px solid var(--line);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-shadow:0 0 10px var(--neon-dim);
}
.brandrow{
  display:flex;
  align-items:center;
  gap:.7rem;
  padding:.75rem var(--pad) .35rem;
}
.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  background:var(--sur);
  text-decoration:none;
  flex:0 0 auto;
}
.logoimg{display:block;width:26px;height:26px;border-radius:8px}
.wordmark{
  font-size:1.2rem;
  font-weight:700;
  letter-spacing:.02em;
  text-decoration:none;
  color:#fff;
  text-shadow:0 0 18px var(--neon-dim);
}
.menu ul{
  list-style:none;
  margin:0;
  padding:.2rem var(--pad) .5rem;
  display:flex;
  flex-wrap:wrap;
  gap:.15rem .3rem;
}
.menu a{
  display:block;
  padding:.7rem .65rem;
  min-height:42px;
  font-size:1rem;
  line-height:1.4;
  color:var(--dim);
  text-decoration:none;
  border-radius:999px;
  transition:color .18s ease,background-color .18s ease;
}
.menu a:hover,
.menu a:focus-visible{color:#04120a;background:var(--neon)}

/* ---------- 头图：纯文字 + 点阵 ---------- */
.hero{
  position:relative;
  min-height:64vh;
  display:grid;
  place-content:center;
  text-align:center;
  padding:clamp(3rem,11vw,7rem) var(--pad) clamp(2.5rem,8vw,5rem);
  overflow:hidden;
  isolation:isolate;
}
.dots{
  position:absolute;
  inset:0;
  margin:0;
  z-index:-1;
  background-image:radial-gradient(var(--neon-dim) 1px,transparent 1px);
  background-size:26px 26px;
  -webkit-mask-image:radial-gradient(ellipse 80% 70% at 50% 44%,#000 10%,transparent 78%);
  mask-image:radial-gradient(ellipse 80% 70% at 50% 44%,#000 10%,transparent 78%);
}
.hero h1{
  margin:0;
  font-size:clamp(2.2rem,8.4vw,5rem);
  line-height:1.14;
  font-weight:700;
  letter-spacing:-.015em;
  color:#fff;
  text-wrap:balance;
  text-shadow:0 0 34px var(--neon-dim);
}
.lede{
  margin:1.4rem auto 0;
  max-width:30em;
  color:var(--dim);
  font-size:1.06rem;
  font-weight:300;
}
.jump{margin:2.2rem 0 0}
.jump a{
  display:inline-block;
  padding:.9rem 1.7rem;
  min-height:46px;
  border-radius:999px;
  background:var(--neon);
  color:#04120a;
  font-weight:600;
  text-decoration:none;
  box-shadow:0 0 26px rgba(77,232,168,.22);
  transition:transform .18s ease,box-shadow .18s ease;
}
.jump a:hover{transform:translateY(-2px);box-shadow:0 0 34px rgba(77,232,168,.34)}

/* ---------- 主体：左栏 + 正文 ---------- */
.body{
  max-width:1180px;
  margin:0 auto;
  padding:clamp(1.5rem,5vw,3.4rem) var(--pad) clamp(2rem,6vw,4rem);
  display:grid;
  gap:clamp(1.2rem,3vw,2.4rem);
  align-items:start;
  grid-template-columns:minmax(0,1fr);
}
@media (min-width:900px){
  .body{grid-template-columns:252px minmax(0,1fr)}
}
.side{
  background:var(--sur);
  border-radius:var(--r);
  padding:1.4rem 1.25rem 1.2rem;
}
@media (min-width:900px){
  .side{position:sticky;top:9rem}
}
.side small{
  display:block;
  font-size:.86rem;
  font-weight:600;
  letter-spacing:.28em;
  color:var(--neon);
}
.side h2{
  margin:.35rem 0 1rem;
  font-size:1.22rem;
  font-weight:600;
  letter-spacing:.01em;
  line-height:1.35;
}
.toc{list-style:none;margin:0;padding:0;display:grid;gap:.1rem}
.toc a{
  display:block;
  padding:.62rem .55rem;
  min-height:42px;
  border-radius:14px;
  color:var(--dim);
  font-size:1rem;
  line-height:1.4;
  text-decoration:none;
  transition:background-color .18s ease,color .18s ease;
}
.toc a:hover,
.toc a:focus-visible{background:var(--sur2);color:var(--fg)}

.prose{min-width:0}
.prose > article,
.prose > * > article{
  background:var(--sur);
  border-radius:var(--r);
  padding:clamp(1.3rem,3.6vw,2.6rem);
  margin:0 0 clamp(.9rem,2.4vw,1.5rem);
  scroll-margin-top:9.5rem;
}
.prose small{
  display:block;
  font-size:.86rem;
  font-weight:600;
  letter-spacing:.26em;
  color:var(--neon);
  margin:0 0 .55rem;
}
.prose h2{
  margin:0 0 1rem;
  font-size:clamp(1.4rem,3.6vw,1.95rem);
  line-height:1.28;
  letter-spacing:-.01em;
  color:#fff;
}
.prose h3{
  margin:1.7rem 0 .6rem;
  font-size:1.16rem;
  line-height:1.4;
  font-weight:600;
  color:#fff;
}
.prose p{margin:0 0 1rem}
.prose p:last-child,
.prose li:last-child{margin-bottom:0}
.prose ul,
.prose ol{margin:0 0 1rem;padding-left:1.3rem}
.prose li{margin:.35rem 0}
.prose li::marker{color:var(--neon)}
.prose a{color:var(--neon);text-underline-offset:3px}
.prose strong{color:#fff;font-weight:600}
.prose figure{margin:1.2rem 0}
.prose figure img{border-radius:16px}
.prose figcaption{font-size:.94rem;color:var(--dim);margin-top:.5rem}
.prose blockquote{
  margin:1.3rem 0;
  padding:.5rem 0 .5rem 1.1rem;
  border-left:3px solid var(--neon);
  color:var(--dim);
  font-weight:300;
}
.prose aside{
  background:var(--sur2);
  border-radius:18px;
  padding:1rem 1.15rem;
  margin:1.2rem 0;
  color:var(--dim);
}
.prose table{width:100%;border-collapse:collapse;margin:1.2rem 0;font-size:.98rem}
.prose th,
.prose td{text-align:left;padding:.6rem .5rem;border-bottom:1px solid var(--line)}
.prose th{color:#fff;font-weight:600}
.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.94em;
  background:var(--sur2);
  border-radius:6px;
  padding:.1em .4em;
}
.prose hr{border:0;border-top:1px solid var(--line);margin:1.6rem 0}

/* ---------- 页脚 ---------- */
.foot{
  border-top:1px solid var(--line);
  max-width:1180px;
  margin:clamp(1rem,4vw,2.5rem) auto 0;
  padding:clamp(2rem,5vw,3.4rem) var(--pad) clamp(1.6rem,4vw,2.4rem);
  display:grid;
  gap:1.3rem;
  grid-template-columns:minmax(0,1fr);
  grid-template-areas:"a" "b" "c" "d" "e";
}
.foot p{margin:0}
.f1{grid-area:a}
.f1 strong{
  font-size:1.14rem;
  font-weight:700;
  letter-spacing:.03em;
  color:#fff;
  text-shadow:0 0 16px var(--neon-dim);
}
.f2{grid-area:b;display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.f2 input{
  flex:1 1 170px;
  min-width:0;
  min-height:46px;
  background:var(--sur);
  color:var(--fg);
  border:0;
  border-radius:999px;
  padding:.75rem 1.05rem;
  font:inherit;
  font-size:1rem;
}
.f2 input::placeholder{color:var(--dim)}
.f2 button{
  flex:0 0 auto;
  min-height:46px;
  border:0;
  border-radius:999px;
  padding:.75rem 1.4rem;
  background:var(--neon);
  color:#04120a;
  font:inherit;
  font-weight:600;
  cursor:pointer;
  transition:box-shadow .18s ease;
}
.f2 button:hover{box-shadow:0 0 22px rgba(77,232,168,.4)}
.f3{grid-area:c;color:var(--dim);font-size:1rem}
.copy{
  grid-area:d;
  color:var(--dim);
  font-size:.94rem;
  padding-top:.6rem;
}
.tos{
  grid-area:e;
  display:flex;
  flex-wrap:wrap;
  gap:.2rem 1.1rem;
  color:var(--dim);
  font-size:.94rem;
}
.tos a{
  display:inline-block;
  min-height:40px;
  padding:.5rem 0;
  text-decoration:none;
}
.tos a:hover{color:var(--neon)}
@media (min-width:760px){
  .foot{
    grid-template-columns:1fr 1.5fr 1fr;
    grid-template-areas:"a b c" "d e e";
    align-items:start;
  }
  .tos{justify-self:end;justify-content:flex-end}
}

/* ---------- 入场动效 ---------- */
.js .prose > article,
.js .prose > * > article{opacity:0;transform:translateY(16px)}
.js .prose > article.in,
.js .prose > * > article.in{
  opacity:1;
  transform:none;
  transition:opacity .55s ease,transform .55s ease;
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .prose > article,
  .js .prose > * > article{opacity:1;transform:none;transition:none}
  .jump a:hover{transform:none}
}

/* ---------- 滚动条 ---------- */
@supports (scrollbar-color:auto){
  html{scrollbar-color:#2c2c2c #000;scrollbar-width:thin}
}

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