:root{
  --ink:#1f1f1f;
  --mid:#585858;
  --soft:#8b8b8f;
  --bg:#f5f5f7;
  --card:#ffffff;
  --line:#e4e4e7;
  --r:4px;
  --sh:0 4px 6px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.04);
  --sh-lg:0 12px 26px rgba(0,0,0,.09);
  --font:"Archivo",system-ui,-apple-system,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --display:"Space Grotesk","Archivo",system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
}
*,*::before,*::after{box-sizing:border-box;}
html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}
body{
  margin:0;
  overflow-x:hidden;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font);
  font-size:17px;
  line-height:1.78;
  padding-bottom:104px;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
h1,h2,h3,h4{
  font-family:var(--display);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.18;
  margin:0;
}
p{margin:0;}
a{color:inherit;text-decoration:none;}
img{display:block;max-width:100%;height:auto;}
hr{
  height:1px;
  border:0;
  background:var(--line);
  margin:12px 0 6px;
}
:focus-visible{
  outline:2px solid var(--ink);
  outline-offset:3px;
  border-radius:var(--r);
}

/* ---------- 底部固定条 ---------- */
.dock{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:80;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  padding:7px 18px calc(7px + env(safe-area-inset-bottom,0px));
  background:rgba(255,255,255,.9);
  -webkit-backdrop-filter:blur(14px) saturate(150%);
  backdrop-filter:blur(14px) saturate(150%);
  border-top:1px solid var(--line);
}
.dock nav{display:contents;}
.dock p{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:2px;
  margin:0;
  min-width:0;
}
.dock p.l{grid-area:1/1;justify-content:flex-start;}
.dock p.r{grid-area:1/3;justify-content:flex-end;}
.dock a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 8px;
  font-size:15px;
  color:var(--mid);
  border-radius:var(--r);
  white-space:nowrap;
  transition:color .2s ease,background-color .2s ease,transform .2s ease;
}
.dock a:hover{
  color:var(--ink);
  background:var(--bg);
  transform:translateY(-1px);
}
.dock .mark{
  grid-area:1/2;
  justify-self:center;
  font-family:var(--display);
  font-weight:700;
  font-size:17px;
  letter-spacing:-.03em;
  color:var(--ink);
  padding:0 12px;
}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:flex-end;
  min-height:min(45vh,400px);
  padding:88px 24px 34px;
  margin:0 0 24px;
  overflow:hidden;
  border-radius:0 0 44px 44px;
  background:var(--card);
  background-image:radial-gradient(#d8d8de 1px,transparent 1px);
  background-size:18px 18px;
}
.hero-img,
.hero img{
  position:absolute;
  inset:0;
  z-index:-2;
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.12);
  transform-origin:center top;
  will-change:transform;
}
.hero.has-img{
  color:#fff;
  background-image:none;
  background:#111;
}
.hero.has-img::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(180deg,rgba(0,0,0,.12) 0%,rgba(0,0,0,.42) 52%,rgba(0,0,0,.78) 100%);
}
.hero-in{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  padding:0 4px;
}
.hero h1{
  font-size:clamp(29px,5.2vw,54px);
  max-width:17ch;
  letter-spacing:-.035em;
}
.hero .lede{
  margin:14px 0 0;
  max-width:54ch;
  font-size:17px;
  line-height:1.7;
  color:#3d3d3d;
}
.hero.has-img .lede{color:#e9e9ec;}

/* ---------- 主体 ---------- */
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:0 24px 44px;
}
.stage{
  display:grid;
  grid-template-columns:minmax(0,1fr) 244px;
  gap:22px;
  align-items:start;
}

/* 正文 */
.prose{min-width:0;}
.prose article{
  background:var(--card);
  border-radius:var(--r);
  box-shadow:var(--sh);
  padding:26px 28px;
  margin:0 0 16px;
  scroll-margin-top:20px;
  transition:transform .32s cubic-bezier(.22,.7,.3,1),box-shadow .32s ease;
}
.prose article:hover{
  transform:translateY(-2px);
  box-shadow:var(--sh-lg);
}
.prose article > h2{
  font-size:clamp(20px,2.5vw,26px);
  margin:0 0 10px;
}
.prose h3{
  font-size:19px;
  margin:18px 0 8px;
}
.prose p{margin:0 0 14px;color:#2b2b2b;}
.prose p:last-child{margin-bottom:0;}
.prose ul,.prose ol{margin:0 0 14px;padding-left:22px;}
.prose li{margin:0 0 8px;}
.prose li:last-child{margin-bottom:0;}
.prose strong{font-weight:600;}
.prose blockquote{
  margin:0 0 14px;
  padding:2px 0 2px 16px;
  border-left:2px solid var(--ink);
  color:var(--mid);
}
.prose h2 + hr{margin-top:2px;}
.prose > h2{font-size:19px;margin:22px 0 2px;color:var(--ink);}

/* 侧栏 */
.side{
  position:sticky;
  top:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  background:var(--card);
  border-radius:var(--r);
  box-shadow:var(--sh);
}
.jump p{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:0;
}
.jump a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:0 10px;
  font-size:15px;
  color:var(--mid);
  border-radius:var(--r);
  transition:background-color .2s ease,color .2s ease,transform .2s ease;
}
.jump a:hover{
  background:var(--bg);
  color:var(--ink);
  transform:translateX(3px);
}
.to-top{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  margin-top:2px;
  padding:0 10px;
  font-size:14px;
  color:var(--mid);
  background:var(--bg);
  border-radius:var(--r);
  transition:color .2s ease,background-color .2s ease;
}
.to-top:hover{color:var(--ink);background:#ececef;}

/* ---------- 页脚 ---------- */
.foot{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:2px 12px;
  padding:22px 20px 26px;
  background:var(--card);
  border-top:1px solid var(--line);
  font-size:14px;
  color:var(--mid);
}
.foot .mark{
  font-family:var(--display);
  font-weight:700;
  font-size:15px;
  letter-spacing:-.02em;
  color:var(--ink);
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 6px;
}
.foot nav{display:flex;min-width:0;}
.foot p{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:2px;
  margin:0;
}
.foot a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 6px;
  font-size:14px;
  color:var(--mid);
  border-radius:var(--r);
  transition:color .2s ease,background-color .2s ease;
}
.foot a:hover{color:var(--ink);background:var(--bg);}
.foot .copy{
  font-size:13px;
  color:var(--soft);
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 4px;
}

/* ---------- 桌面轻微错落 ---------- */
@media (min-width:901px){
  .prose article:nth-child(odd){margin-right:38px;}
  .prose article:nth-child(even){margin-left:38px;}
}

/* ---------- 平板/手机 ---------- */
@media (max-width:900px){
  .stage{grid-template-columns:minmax(0,1fr);gap:16px;}
  .prose article{padding:22px 18px;}
  .side{
    position:static;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    gap:6px;
    padding:10px;
  }
  .jump{flex:1 1 100%;}
  .jump p{flex-direction:row;flex-wrap:wrap;gap:2px;}
  .jump a{font-size:14px;padding:0 8px;}
  .to-top{flex:0 0 auto;margin-top:0;}
  .wrap{padding:0 16px 36px;}
  .hero{padding:72px 16px 28px;border-radius:0 0 32px 32px;}
}

@media (max-width:860px){
  body{padding-bottom:160px;}
  .dock{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:2px 4px;
    padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px));
  }
  .dock .mark{
    order:-1;
    flex:0 0 100%;
    justify-content:center;
    font-size:16px;
  }
  .dock p{flex:1 1 100%;justify-content:center;gap:2px;}
  .dock a{font-size:14px;padding:0 7px;}
  .foot{padding:18px 12px 22px;gap:0 8px;}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *{transition-duration:.01ms !important;animation-duration:.01ms !important;}
  .prose article:hover{transform:none;}
  .hero-img,.hero img{transform:none;}
}

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