:root{
  --ink:#000000;
  --paper:#ffffff;
  --line:#e3e3e3;
  --mute:#6d6d6d;
  --soft:#f4f4f4;
  --radius:28px;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Plus Jakarta Sans',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.65;
  letter-spacing:-0.005em;
  -webkit-font-smoothing:antialiased;
}

a{color:var(--ink)}
p{margin:0 0 1.05em}
img,svg{display:block;max-width:100%}

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

/* ---------- 顶部 ---------- */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px clamp(14px,4vw,52px);
  background:var(--ink);
  color:var(--paper);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:6px 0;
  color:var(--paper);
  text-decoration:none;
  font-weight:700;
  font-size:18px;
  letter-spacing:-0.035em;
}

.brand-mark{width:26px;height:26px;flex:none}

.cta{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:11px 18px;
  border-radius:999px;
  background:var(--paper);
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  font-size:16px;
  white-space:nowrap;
  transition:background .18s ease,color .18s ease;
}

.cta:hover{background:var(--line)}

/* ---------- 二级粘性锚点条 ---------- */
.subbar{
  position:sticky;
  top:0;
  z-index:40;
  background:var(--paper);
  border-bottom:3px solid var(--ink);
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.subbar::-webkit-scrollbar{height:0}

.jump ol{
  display:flex;
  gap:8px;
  margin:0;
  padding:10px clamp(12px,3vw,44px);
  list-style:none;
}

.jump a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:9px 15px;
  border:2px solid var(--ink);
  border-radius:999px;
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  font-size:16px;
  white-space:nowrap;
  transition:background .18s ease,color .18s ease;
}

.dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
  flex:none;
}

.jump a:hover,
.jump a.on{
  background:var(--ink);
  color:var(--paper);
}

/* ---------- 巨型标题区 ---------- */
.hero{
  position:relative;
  overflow:hidden;
  background:var(--ink);
  color:var(--paper);
  min-height:45vh;
  display:flex;
  align-items:flex-end;
  padding:clamp(38px,7vw,74px) clamp(16px,5vw,60px) clamp(40px,7vw,76px);
}

.hero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:clamp(16px,3.5vw,42px);
  background:var(--paper);
  clip-path:polygon(0 100%,100% 0,100% 100%);
}

.hero-in{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:clamp(14px,3vw,36px);
  width:100%;
  max-width:1240px;
  margin:0 auto;
}

.hero h1{
  margin:0;
  min-width:0;
  font-size:clamp(2.5rem,11vw,8.5rem);
  font-weight:900;
  line-height:0.9;
  letter-spacing:-0.055em;
  overflow-wrap:break-word;
}

.spin{
  width:clamp(46px,9vw,124px);
  height:auto;
  color:var(--paper);
  flex:none;
  animation:spin 26s linear infinite;
}

@keyframes spin{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}

/* ---------- 版心与侧栏 ---------- */
.wrap{
  display:grid;
  grid-template-columns:minmax(0,208px) minmax(0,1fr);
  gap:clamp(22px,4vw,54px);
  align-items:start;
  max-width:1240px;
  margin:0 auto;
  padding:clamp(30px,6vw,72px) clamp(16px,5vw,60px);
}

.rail{
  position:sticky;
  top:96px;
  display:grid;
  gap:14px;
}

.rail-box{
  border:2px solid var(--ink);
  border-bottom-width:8px;
  border-radius:var(--radius);
  padding:18px 18px 16px;
  background:var(--paper);
}

.rail-h{
  margin:0 0 10px;
  font-size:16px;
  font-weight:700;
  letter-spacing:0.14em;
}

.rail-h span{
  display:inline-block;
  border-bottom:3px solid var(--ink);
  padding-bottom:3px;
}

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

.rail-list li{
  animation:rise .45s both ease-out;
}

.rail-list li:nth-child(1){animation-delay:.02s}
.rail-list li:nth-child(2){animation-delay:.06s}
.rail-list li:nth-child(3){animation-delay:.1s}
.rail-list li:nth-child(4){animation-delay:.14s}
.rail-list li:nth-child(5){animation-delay:.18s}
.rail-list li:nth-child(6){animation-delay:.22s}
.rail-list li:nth-child(7){animation-delay:.26s}
.rail-list li:nth-child(8){animation-delay:.3s}

@keyframes rise{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:none}
}

.rail-a{
  display:block;
  min-height:40px;
  padding:9px 0;
  font-size:16px;
  line-height:1.4;
  text-decoration:none;
  border-bottom:1px solid var(--line);
}

.rail-list li:last-child .rail-a{border-bottom:0}

.rail-a:hover,
.rail-a.on{text-decoration:underline;text-underline-offset:4px}

.rail-top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:8px 16px;
  border-radius:999px;
  background:var(--ink);
  color:var(--paper);
  text-decoration:none;
  font-size:16px;
  font-weight:700;
}

/* ---------- 正文 ---------- */
.stage{min-width:0}

.prose{max-width:74ch}

.prose > section{
  padding:clamp(20px,4vw,36px);
  border:2px solid var(--ink);
  border-bottom-width:8px;
  border-radius:var(--radius);
  background:var(--paper);
  scroll-margin-top:104px;
}

.prose > section + section{margin-top:clamp(22px,4vw,38px)}

.prose h2{
  margin:0 0 18px;
  font-size:clamp(1.8rem,4.4vw,2.9rem);
  line-height:1.04;
  font-weight:900;
  letter-spacing:-0.045em;
}

.prose h3{
  margin:1.5em 0 12px;
  font-size:clamp(1.25rem,2.6vw,1.6rem);
  line-height:1.2;
  font-weight:700;
  letter-spacing:-0.03em;
}

.prose h2 > span,
.prose h3 > span{
  display:inline-block;
  border-bottom:4px solid var(--ink);
  padding-bottom:4px;
}

.prose p{font-size:17px}

.prose ul,
.prose ol{
  margin:0 0 1.1em;
  padding-left:1.3em;
}

.prose li{margin-bottom:0.45em}

.prose strong{font-weight:700}

.prose a{
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.prose blockquote{
  margin:0 0 1.1em;
  padding:16px 20px;
  border-left:8px solid var(--ink);
  border-radius:0 var(--radius) var(--radius) 0;
  background:var(--soft);
}

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

.prose figure{margin:0 0 1.2em}
.prose figcaption{font-size:16px;color:var(--mute);margin-top:8px}

.prose table{width:100%;border-collapse:collapse;font-size:16px}
.prose th,
.prose td{
  border-bottom:1px solid var(--line);
  padding:10px 8px;
  text-align:left;
}

.prose img{border-radius:var(--radius)}

/* ---------- 页脚 ---------- */
.foot{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px 36px;
  margin-top:clamp(40px,8vw,88px);
  padding:clamp(30px,6vw,58px) clamp(16px,5vw,60px);
  background:var(--ink);
  color:var(--paper);
}

.f-brand{max-width:36ch}

.f-logo{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 0;
  color:var(--paper);
  text-decoration:none;
  font-size:22px;
  font-weight:900;
  letter-spacing:-0.04em;
}

.f-brand p{
  margin:8px 0 0;
  font-size:16px;
  line-height:1.6;
  color:#c6c6c6;
}

.f-nav ol{
  display:flex;
  flex-wrap:wrap;
  gap:2px 20px;
  margin:0;
  padding:0;
  list-style:none;
}

.f-nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 0;
  color:var(--paper);
  text-decoration:none;
  font-size:16px;
  border-bottom:2px solid transparent;
}

.f-nav a:hover{border-bottom-color:var(--paper)}

.f-copy{
  align-self:center;
  margin-left:auto;
  font-size:16px;
  color:#c6c6c6;
  text-align:center;
}

/* ---------- 断点 ---------- */
@media (max-width:880px){
  .wrap{
    grid-template-columns:minmax(0,1fr);
    gap:clamp(20px,5vw,32px);
  }

  .rail{
    position:static;
    top:auto;
    grid-template-columns:minmax(0,1fr) minmax(0,0.72fr);
    gap:12px;
    order:-1;
  }

  .rail-box{padding:14px 16px 12px}

  .prose{max-width:none}
}

@media (max-width:560px){
  body{font-size:17px}

  .hero{min-height:40vh;padding-top:34px}

  .hero h1{font-size:clamp(2.2rem,13vw,3.4rem)}

  .jump a{font-size:16px;padding:9px 13px}

  .f-copy{margin-left:0;text-align:left;flex:1 1 100%}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}

  .spin{animation:none}

  .rail-list li{animation:none}
}

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