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

:root{
  --paper:#ffffff;
  --tint:#f5f5f5;
  --tint-2:#ededed;
  --ink:#1f1f1f;
  --ink-2:#4c4c4c;
  --ink-3:#7a7a7a;
  --line:#e6e6e6;
  --line-2:#d2d2d2;
  --r:4px;
  --e1:0 1px 2px rgba(31,31,31,.06),0 2px 6px rgba(31,31,31,.04);
  --e2:0 6px 16px rgba(31,31,31,.08);
  --e3:0 14px 36px rgba(31,31,31,.12);
  --e4:0 28px 64px rgba(31,31,31,.16);
}

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Be Vietnam Pro','Noto Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:16.5px;
  line-height:1.75;
  letter-spacing:.012em;
  font-weight:400;
}

a{color:inherit}

/* ---------- 顶栏 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(255,255,255,.82);
  -webkit-backdrop-filter:blur(14px) saturate(150%);
  backdrop-filter:blur(14px) saturate(150%);
  border-bottom:1px solid var(--line);
  transition:box-shadow .25s ease;
}
.topbar.is-stuck{box-shadow:var(--e2)}

.topbar__in{
  max-width:1180px;
  margin:0 auto;
  padding:9px 20px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
}

.menu ul{
  display:flex;
  align-items:center;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}
.menu--r ul{justify-content:flex-end}

.menu a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 11px;
  font-size:16px;
  font-weight:500;
  color:var(--ink-2);
  text-decoration:none;
  border-radius:var(--r);
  white-space:nowrap;
  transition:background .18s ease,color .18s ease;
}
.menu a:hover,.menu a:focus-visible{background:var(--tint);color:var(--ink)}

.menu__group{position:relative}
.menu__group > a::after{
  content:"";
  width:6px;
  height:6px;
  margin-left:8px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
}
.menu__sub{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  display:none;
  flex-direction:column;
  gap:2px;
  min-width:190px;
  padding:8px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--e4);
  z-index:70;
}
.menu__group:hover .menu__sub,
.menu__group:focus-within .menu__sub{display:flex}

.brand{
  justify-self:center;
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:0 4px;
  font-size:18px;
  font-weight:700;
  letter-spacing:-.01em;
  color:var(--ink);
  text-decoration:none;
}
.brand__mark{
  width:15px;
  height:15px;
  background:var(--ink);
  border-radius:2px;
  box-shadow:var(--e1);
  transform:rotate(45deg);
}

.topbar__r{
  justify-self:end;
  display:flex;
  align-items:center;
  gap:10px;
}

.cta{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 18px;
  font-size:16px;
  font-weight:600;
  color:#fff;
  background:var(--ink);
  border-radius:var(--r);
  box-shadow:var(--e2);
  text-decoration:none;
  white-space:nowrap;
  transition:box-shadow .2s ease,transform .2s ease;
}
.cta:hover{box-shadow:var(--e3);transform:translateY(-1px)}

/* ---------- 粘性锚点条 ---------- */
.railbar{
  position:sticky;
  top:61px;
  z-index:50;
  background:rgba(245,245,245,.92);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.railbar__in{
  max-width:1180px;
  margin:0 auto;
  padding:8px 20px;
  display:flex;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
}
.railbar__in::-webkit-scrollbar{display:none}
.railbar a{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 13px;
  font-size:16px;
  color:var(--ink-2);
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  box-shadow:var(--e1);
  text-decoration:none;
  white-space:nowrap;
  transition:box-shadow .18s ease,color .18s ease,border-color .18s ease;
}
.railbar a:hover{color:var(--ink);border-color:var(--line-2);box-shadow:var(--e2)}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  overflow:hidden;
  min-height:45vh;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:40px 24px 48px;
  background:linear-gradient(180deg,#fff 0%,var(--tint) 100%);
  border-bottom:1px solid var(--line);
}
.hero__layer{
  position:absolute;
  right:-4%;
  bottom:-26%;
  width:min(520px,68%);
  aspect-ratio:1/1;
  z-index:0;
  border-radius:var(--r);
  background:repeating-linear-gradient(135deg,#fff 0,#fff 16px,#f0f0f0 16px,#f0f0f0 32px);
  box-shadow:var(--e3);
  will-change:transform;
}
.hero__in{
  position:relative;
  z-index:2;
  width:100%;
  max-width:860px;
  margin-left:auto;
  text-align:right;
}
.hero__badge{
  display:inline-block;
  margin-bottom:14px;
  padding:6px 13px;
  font-size:14px;
  font-weight:500;
  letter-spacing:.06em;
  color:var(--ink-2);
  background:rgba(255,255,255,.94);
  border:1px solid var(--line);
  border-radius:999px;
  box-shadow:var(--e2);
}
.hero__h1{
  margin:0;
  font-size:clamp(2.1rem,6.6vw,4.2rem);
  line-height:1.06;
  font-weight:700;
  letter-spacing:-.025em;
}
.hero__lede{
  margin:16px 0 0 auto;
  max-width:44ch;
  font-size:16.5px;
  color:var(--ink-2);
}

/* ---------- 布局骨架 ---------- */
.shell{
  max-width:1180px;
  margin:0 auto;
  padding:40px 20px 72px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 262px;
  gap:34px;
  align-items:start;
}
.wrap{min-width:0}

/* ---------- 正文 ---------- */
.prose > article{
  position:relative;
  z-index:1;
  margin:0 0 24px;
  padding:26px 24px;
  background:#fff;
  border:1px solid var(--line);
  border-bottom:3px solid var(--ink);
  border-radius:var(--r);
  box-shadow:var(--e2);
  scroll-margin-top:132px;
  transition:box-shadow .22s ease,border-color .22s ease;
}
.prose > article:nth-of-type(even){background:#fcfcfc}
.prose > article:hover{box-shadow:var(--e3);border-color:var(--line-2);border-bottom-color:var(--ink)}
.prose > article:nth-of-type(even)::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  border-radius:var(--r);
  background:var(--tint);
  transform:translate3d(8px,8px,0);
  box-shadow:var(--e1);
}

.prose h2{
  margin:0 0 14px;
  font-size:clamp(1.28rem,2.5vw,1.66rem);
  line-height:1.34;
  letter-spacing:-.012em;
  font-weight:700;
}
.prose h2 > span{display:inline-block;padding-bottom:4px;border-bottom:2px solid var(--ink)}
.prose h3{
  margin:26px 0 10px;
  font-size:1.14rem;
  line-height:1.45;
  font-weight:600;
}
.prose p{margin:0 0 15px;color:var(--ink-2)}
.prose strong{color:var(--ink);font-weight:600}
.prose ul,.prose ol{margin:0 0 16px;padding-left:1.35em;color:var(--ink-2)}
.prose li{margin:6px 0}
.prose a{color:var(--ink);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.prose a:hover{background:var(--tint)}
.prose blockquote{
  margin:0 0 16px;
  padding:13px 18px;
  background:var(--tint);
  border-left:3px solid var(--ink);
  border-radius:var(--r);
  color:var(--ink-2);
}
.prose blockquote p:last-child{margin-bottom:0}
.prose hr{border:0;border-top:1px solid var(--line);margin:24px 0}
.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.92em;
  padding:1px 5px;
  background:var(--tint);
  border-radius:2px;
}

/* ---------- 右侧栏 ---------- */
.rail{
  position:sticky;
  top:128px;
  z-index:2;
  display:grid;
  gap:14px;
}
.rail__card{
  padding:16px 14px 18px;
  background:#fff;
  border:1px solid var(--line);
  border-bottom:3px solid var(--ink);
  border-radius:var(--r);
  box-shadow:var(--e3);
}
.rail__h{
  margin:0 0 10px;
  font-size:16px;
  font-weight:600;
  letter-spacing:.12em;
  color:var(--ink-3);
}
.rail__nav ul{margin:0;padding:0;list-style:none;display:grid;gap:1px}
.rail__nav a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:4px 8px;
  font-size:16px;
  color:var(--ink-2);
  text-decoration:none;
  border-radius:var(--r);
  border-bottom:1px solid var(--line-2);
  transition:background .18s ease,color .18s ease;
}
.rail__nav li:last-child a{border-bottom-color:transparent}
.rail__nav a:hover{background:var(--tint);color:var(--ink)}
.rail__n{
  min-width:1.9em;
  font-size:12px;
  letter-spacing:.1em;
  color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.rail__top{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 14px;
  font-size:16px;
  color:var(--ink);
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--e2);
  text-decoration:none;
}
.rail__top:hover{box-shadow:var(--e3);color:#000}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:8px;
  padding-bottom:26px;
  background:var(--tint);
  border-top:1px solid var(--line);
}
.foot > article{
  max-width:1180px;
  margin:0 auto;
  padding-left:20px;
  padding-right:20px;
}
.foot .foot__cta{
  position:relative;
  z-index:4;
  max-width:1140px;
  margin-top:52px;
  padding:30px 28px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  background:var(--ink);
  color:#fff;
  border-radius:var(--r);
  box-shadow:var(--e4);
}
.foot__h{
  margin:0;
  font-size:clamp(1.5rem,3.6vw,2.1rem);
  line-height:1.2;
  letter-spacing:-.02em;
  font-weight:700;
}
.foot__btn{
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:0 22px;
  font-size:16px;
  font-weight:600;
  color:var(--ink);
  background:#fff;
  border-radius:var(--r);
  box-shadow:var(--e2);
  text-decoration:none;
  transition:transform .2s ease,box-shadow .2s ease;
}
.foot__btn:hover{transform:translateY(-1px);box-shadow:var(--e3)}

.foot__cols{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:32px;
  padding-top:40px;
  padding-bottom:32px;
}
.foot__brand{
  margin:0 0 8px;
  font-size:17px;
  font-weight:600;
  color:var(--ink);
}
.foot__desc{margin:0;max-width:46ch;font-size:16px;color:var(--ink-2)}
.foot__nh{
  margin:0 0 10px;
  font-size:15px;
  font-weight:600;
  letter-spacing:.12em;
  color:var(--ink-3);
}
.foot__nav ul,.foot__bl{margin:0;padding:0;list-style:none}
.foot__nav ul{display:grid;gap:2px}
.foot__nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 2px;
  font-size:16px;
  color:var(--ink-2);
  text-decoration:none;
}
.foot__nav a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:3px}

.foot__base{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:16px;
  padding-bottom:6px;
  border-top:1px solid var(--line-2);
}
.foot__copy{margin:0;font-size:15px;color:var(--ink-3)}
.foot__bl{display:flex;flex-wrap:wrap;gap:6px}
.foot__bl a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 8px;
  font-size:15px;
  color:var(--ink-3);
  text-decoration:none;
}
.foot__bl a:hover{color:var(--ink)}

/* ---------- 动效 ---------- */
.js-reveal .reveal{opacity:0;transform:translateY(16px)}
.js-reveal .reveal.is-in{
  opacity:1;
  transform:none;
  transition:opacity .6s ease,transform .6s cubic-bezier(.2,.7,.3,1);
}

/* ---------- 断点 ---------- */
@media (max-width:1000px){
  .menu a{padding:0 8px}
  .shell{grid-template-columns:minmax(0,1fr) 232px;gap:26px}
}

@media (max-width:900px){
  .topbar__in{grid-template-columns:1fr auto;gap:10px}
  .menu{display:none}
  .brand{justify-self:start}
  .railbar{top:63px}
  .hero{min-height:40vh;padding:34px 18px 40px}
  .hero__lede{margin-left:auto;max-width:38ch}
  .shell{grid-template-columns:minmax(0,1fr);gap:26px;padding:28px 16px 56px}
  .rail{position:static;top:auto}
  .rail__card{box-shadow:var(--e2)}
  .foot__cols{grid-template-columns:minmax(0,1fr);gap:24px}
  .foot .foot__cta{margin-top:40px;padding:24px 20px}
}

@media (max-width:620px){
  body{font-size:16px}
  .topbar__in{padding:8px 14px}
  .railbar__in{padding:8px 14px}
  .prose > article{padding:22px 18px;scroll-margin-top:126px}
  .prose > article:nth-of-type(even)::before{transform:translate3d(0,6px,0)}
  .hero__h1{letter-spacing:-.02em}
  .hero__badge{font-size:13px}
  .foot > article{padding-left:14px;padding-right:14px}
  .foot__base{flex-direction:column;align-items:flex-start}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js-reveal .reveal{opacity:1;transform:none;transition:none}
  .cta:hover,.foot__btn:hover{transform:none}
}

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