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

:root{
  --ink:#000;
  --paper:#fff;
  --line:#d8d8d8;
  --hair:#ebebeb;
  --soft:#f3f3f3;
  --muted:#585858;
  --rail:236px;
  --font:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,"Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}

*,*::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:var(--font);
  font-size:17px;
  font-weight:400;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%;height:auto;display:block}
a{color:var(--ink);transition:color .2s ease,background-color .2s ease,border-color .2s ease}
p{margin:0 0 1rem}
h1,h2,h3,h4{margin:0;font-weight:600;line-height:1.14;letter-spacing:-.025em}
ul,ol{margin:0;padding:0;list-style:none}

/* ---------- 左侧固定栏 ---------- */
header.site-rail{
  position:fixed;
  top:0;left:0;bottom:0;
  width:var(--rail);
  display:flex;
  flex-direction:column;
  gap:26px;
  padding:30px 26px 26px;
  background:var(--paper);
  border-right:1px solid var(--ink);
  z-index:30;
}

.brand{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  min-height:44px;
  text-decoration:none;
}
.mark-img{
  width:32px;height:32px;
  object-fit:contain;
  filter:grayscale(1);
}
.mark-box{
  width:30px;height:30px;
  display:block;
  background:var(--ink);
}

.rail-nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden}
.rail-nav p{
  display:flex;
  flex-direction:column;
  margin:0;
  border-top:1px solid var(--hair);
}
.rail-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:11px 2px;
  font-size:16px;
  letter-spacing:.01em;
  text-decoration:none;
  border-bottom:1px solid var(--hair);
}
.rail-nav a:hover,
.rail-nav a.is-current{
  background:var(--ink);
  color:var(--paper);
  padding-left:8px;
  padding-right:8px;
}

.cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 16px;
  background:var(--ink);
  color:var(--paper);
  font-size:16px;
  font-weight:500;
  letter-spacing:.06em;
  text-decoration:none;
  border:1px solid var(--ink);
}
.cta:hover{background:var(--paper);color:var(--ink)}

/* ---------- 主体网格 ---------- */
main{margin-left:var(--rail)}
.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:44px 40px 0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 244px;
  gap:52px;
  align-items:start;
}
.col{min-width:0}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2rem;
  align-items:center;
  min-height:45vh;
  padding-bottom:2rem;
  border-bottom:2px solid var(--ink);
}
.hero-figure{
  position:relative;
  aspect-ratio:1 / 1;
  max-height:45vh;
  overflow:hidden;
  background:var(--soft);
}
.hero-figure--blank{
  border:1px solid var(--ink);
  background:
    repeating-linear-gradient(0deg,transparent 0 39px,var(--hair) 39px 40px),
    repeating-linear-gradient(90deg,transparent 0 39px,var(--hair) 39px 40px);
}
.hero-img{
  width:100%;height:100%;
  object-fit:cover;
  filter:grayscale(1) contrast(1.04);
}
.hero-text{
  position:relative;
  text-align:center;
  padding:1rem .25rem;
}
.hero-badge{
  display:inline-block;
  margin-bottom:1.25rem;
  padding:6px 14px;
  background:var(--ink);
  color:var(--paper);
  font-size:13px;
  font-weight:500;
  letter-spacing:.18em;
  text-transform:none;
}
.hero h1{
  font-size:clamp(2rem,4.4vw,3.4rem);
  font-weight:600;
  margin:0 0 1rem;
}
.hero-lede{
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
  max-width:34ch;
  margin-inline:auto;
}

/* ---------- 正文 ---------- */
article > section{
  padding:2.6rem 0;
  border-top:1px solid var(--line);
  scroll-margin-top:96px;
}
article > section:first-of-type{border-top:0}

article h2{
  font-size:clamp(1.55rem,2.9vw,2.2rem);
  margin:0 0 .55rem;
}
article h3{
  font-size:1.22rem;
  margin:1.8rem 0 .5rem;
}
article p.subtitle,
article p.subhead,
article p.desc,
article p.lead{
  margin:0 0 1.4rem;
  color:var(--muted);
  font-size:16px;
  letter-spacing:.02em;
}
article p,
article li{
  max-width:70ch;
  line-height:1.78;
}
article ul,
article ol{
  margin:0 0 1.2rem;
  padding-left:1.1rem;
  list-style:disc;
}
article ol{list-style:decimal}
article li{margin:0 0 .5rem}
article a{
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
article a:hover{background:var(--ink);color:var(--paper);text-decoration-color:transparent}
article blockquote{
  margin:1.6rem 0;
  padding:.4rem 0 .4rem 1.2rem;
  border-left:3px solid var(--ink);
  max-width:66ch;
  font-size:1.05rem;
}
article blockquote p:last-child{margin-bottom:0}
article strong{font-weight:600}
article hr{border:0;border-top:1px solid var(--line);margin:2rem 0}

/* ---------- 侧栏 ---------- */
.rail-aside{
  position:sticky;
  top:32px;
  align-self:start;
  padding-left:24px;
  border-left:1px solid var(--ink);
}
.rail-aside h2{
  font-size:1.1rem;
  letter-spacing:.04em;
}
.rail-aside p.subtitle{
  margin:.3rem 0 1rem;
  font-size:14px;
  color:var(--muted);
  letter-spacing:.08em;
}
.toc li{border-top:1px solid var(--hair)}
.toc a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:8px 0;
  font-size:15px;
  text-decoration:none;
}
.toc a:hover{background:var(--ink);color:var(--paper);padding-left:6px;padding-right:6px}
.toc .num{font-size:12px;color:var(--muted);letter-spacing:.1em}
.toc a:hover .num{color:var(--paper)}

/* ---------- 页脚 ---------- */
footer{
  margin-left:var(--rail);
  margin-top:3.5rem;
  border-top:2px solid var(--ink);
}
.foot-cta{
  max-width:1200px;
  margin:0 auto;
  padding:3rem 40px;
  border-bottom:1px solid var(--line);
}
.foot-cta a{
  display:inline-block;
  padding:6px 0;
  font-size:clamp(1.9rem,5.4vw,3.4rem);
  font-weight:600;
  letter-spacing:-.03em;
  text-decoration:none;
  min-height:44px;
}
.foot-cta a::after{
  content:"你好";
  display:inline-block;
  margin-left:.5rem;
  transition:transform .22s ease;
}
.foot-cta a:hover{text-decoration:underline;text-underline-offset:6px}
.foot-cta a:hover::after{transform:translateX(6px)}

.foot-bar{
  max-width:1200px;
  margin:0 auto;
  padding:22px 40px 30px;
  display:flex;
  flex-wrap:wrap;
  gap:12px 24px;
  align-items:center;
  justify-content:space-between;
  font-size:15px;
  color:var(--muted);
}
.foot-bar p{margin:0;letter-spacing:.06em}
.foot-brand{color:var(--ink);font-weight:500}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference){
  .hero,
  .rail-aside,
  article > section{
    animation:rise .5s cubic-bezier(.2,.7,.3,1) both;
  }
  article > section:nth-of-type(1){animation-delay:.04s}
  article > section:nth-of-type(2){animation-delay:.08s}
  article > section:nth-of-type(3){animation-delay:.12s}
  article > section:nth-of-type(4){animation-delay:.16s}
  article > section:nth-of-type(5){animation-delay:.2s}
  article > section:nth-of-type(6){animation-delay:.24s}
  article > section:nth-of-type(7){animation-delay:.28s}
  .rail-aside{animation-delay:.1s}
  @keyframes rise{
    from{opacity:0;transform:translateY(10px)}
    to{opacity:1;transform:none}
  }
}

/* ---------- 断点 ---------- */
@media (max-width:1080px){
  .wrap{grid-template-columns:minmax(0,1fr) 210px;gap:34px;padding:36px 28px 0}
  .rail-aside{padding-left:18px}
}

@media (max-width:900px){
  header.site-rail{
    position:sticky;
    top:0;left:auto;right:auto;bottom:auto;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:12px;
    padding:10px 16px;
    border-right:0;
    border-bottom:1px solid var(--ink);
    overflow:hidden;
  }
  .brand{flex:0 0 auto;min-height:44px}
  .rail-nav{
    flex:1 1 auto;
    min-width:0;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
  }
  .rail-nav p{
    flex-direction:row;
    gap:2px;
    border-top:0;
    white-space:nowrap;
  }
  .rail-nav a{
    min-height:44px;
    padding:11px 10px;
    border-bottom:0;
    font-size:15px;
  }
  .rail-nav a:hover,
  .rail-nav a.is-current{padding-left:10px;padding-right:10px}
  .cta{flex:0 0 auto;min-height:44px;padding:10px 14px;font-size:15px;letter-spacing:.02em}

  main{margin-left:0}
  .wrap{
    grid-template-columns:minmax(0,1fr);
    gap:34px;
    padding:26px 20px 0;
  }
  .hero{
    grid-template-columns:1fr;
    min-height:0;
    gap:1.25rem;
    padding-bottom:1.6rem;
  }
  .hero-figure{max-height:none;aspect-ratio:16 / 10}
  .hero-text{padding:0}
  .hero-lede{max-width:38ch}

  article > section{padding:2rem 0;scroll-margin-top:88px}

  .rail-aside{
    position:static;
    padding:1.4rem 0 0;
    border-left:0;
    border-top:2px solid var(--ink);
  }
  .toc a{min-height:44px}

  footer{margin-left:0;margin-top:2.4rem}
  .foot-cta{padding:2rem 20px}
  .foot-bar{padding:18px 20px 26px;flex-direction:column;align-items:flex-start}
}

@media (max-width:420px){
  body{font-size:16px}
  .wrap{padding:20px 16px 0}
  .foot-cta{padding:1.6rem 16px}
  .foot-bar{padding:16px 16px 24px}
  .brand .mark-box,.brand .mark-img{width:26px;height:26px}
  .cta{padding:10px 12px}
}

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