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

:root{
  --paper:#fdfbf7;
  --ash:#f5f5f5;
  --ink:#1a1a1a;
  --rule:#e0e0e0;
  --muted:#6f6b66;
  --ui:'DM Sans',system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  --read:'DM Sans',Georgia,"Songti SC","Noto Serif CJK SC",serif;
  --rail:184px;
}

*,*::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(--read);
  font-size:17px;
  line-height:1.78;
  letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:9;
  pointer-events:none;
  opacity:.26;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

::selection{background:var(--ink);color:var(--paper)}

a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;height:auto}
p{margin:0 0 1em}
h1,h2,h3{letter-spacing:-.005em}

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

.skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:60;
  padding:10px 16px;
  background:var(--ink);
  color:var(--paper);
  font-family:var(--ui);
  font-size:15px;
}
.skip:focus{left:12px;top:12px}

/* 角落图标 */
.mark{
  position:fixed;
  top:6px;
  left:14px;
  z-index:40;
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--ink);
  border-radius:50%;
  background:var(--paper);
}
.mark-dot{width:10px;height:10px;border-radius:50%;background:var(--ink)}
.mark-img{width:22px;height:22px;object-fit:contain}
.mark:hover{background:var(--ink)}
.mark:hover .mark-dot{background:var(--paper)}

/* 顶部细条 */
.topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:30;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid var(--rule);
  background:var(--paper);
}
.topbar-txt{
  font-family:var(--ui);
  font-size:14px;
  letter-spacing:.32em;
  text-indent:.32em;
}

/* 左侧竖排导航 */
.rail{
  position:fixed;
  left:10px;
  top:100px;
  z-index:35;
  font-family:var(--ui);
  font-size:15px;
}
.rail ol{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.rail li{animation:rise .26s steps(3,end) both}
.rail li:nth-child(1){animation-delay:.02s}
.rail li:nth-child(2){animation-delay:.05s}
.rail li:nth-child(3){animation-delay:.08s}
.rail li:nth-child(4){animation-delay:.11s}
.rail li:nth-child(5){animation-delay:.14s}
.rail li:nth-child(6){animation-delay:.17s}
.rail li:nth-child(7){animation-delay:.2s}
.rail li:nth-child(n+8){animation-delay:.23s}
.rail a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  border-left:2px solid transparent;
}
.rail a:hover,
.rail a:focus-visible{
  background:var(--ink);
  color:var(--paper);
  border-left-color:var(--ink);
}

/* 主区 */
main{padding:44px 0 0}

.wrap{
  max-width:1080px;
  margin:0 auto;
  padding:0 20px;
}

main [id]{scroll-margin-top:28px}

/* 首屏 */
.hero{
  min-height:100vh;
  display:flex;
  align-items:center;
  padding:56px 0 44px;
}
.hero-in{
  width:100%;
  display:grid;
  grid-template-columns:1fr;
  gap:30px;
  align-items:center;
}
.hero-copy{text-align:center;padding:0 4px}
.hero-copy::before{
  content:"";
  display:block;
  width:56px;
  height:3px;
  margin:0 auto 26px;
  background:var(--ink);
}
.hero-copy h1{
  margin:0;
  font-family:var(--ui);
  font-weight:700;
  font-size:clamp(1.9rem,5vw,3.5rem);
  line-height:1.22;
}
.hero-fig{
  margin:0;
  background:var(--ash);
  border:1px solid var(--rule);
  overflow:hidden;
  box-shadow:0 22px 48px -34px rgba(26,26,26,.6);
  animation:rise .26s steps(3,end) both;
}
.hero-fig img{
  width:100%;
  height:38vh;
  max-height:320px;
  object-fit:cover;
}

/* 正文 + 侧栏 */
.col{
  display:grid;
  grid-template-columns:1fr;
  gap:34px;
  padding:10px 0 60px;
  border-top:1px solid var(--rule);
}
.body{min-width:0}

.prose{font-size:17px}
.prose section{
  padding:34px 0 10px;
  border-top:1px solid var(--rule);
}
.prose section:first-child{border-top:0;padding-top:10px}
.prose h2{
  margin:0 0 .35rem;
  font-family:var(--ui);
  font-size:clamp(1.32rem,3.4vw,1.72rem);
  line-height:1.36;
}
.prose h3{
  margin:1.6em 0 .4em;
  font-family:var(--ui);
  font-size:1.12rem;
  line-height:1.5;
}
.prose p{margin:.85em 0}
.prose ul,.prose ol{padding-left:1.25em;margin:.9em 0}
.prose li{margin:.35em 0}
.prose strong{font-weight:700}
.prose a{border-bottom:1px solid var(--ink)}
.prose a:hover{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.prose blockquote{
  margin:1.4em 0;
  padding:.2em 0 .2em 1em;
  border-left:3px solid var(--ink);
  color:#3b3b3b;
}
.prose img{border:1px solid var(--rule);border-radius:20px;margin:1.1em 0}
.prose table{width:100%;border-collapse:collapse;font-size:16px;margin:1.2em 0}
.prose th,.prose td{border:1px solid var(--rule);padding:.5em .6em;text-align:left;vertical-align:top}
.prose th{background:var(--ash)}
.prose hr{border:0;border-top:1px solid var(--rule);margin:1.8em 0}

.subtitle{
  color:var(--muted);
  font-size:16px;
  line-height:1.7;
  margin:.15rem 0 1rem;
}

/* 侧栏卡 */
.side{
  border:1px solid var(--rule);
  border-radius:28px;
  background:var(--ash);
  padding:22px 20px;
  box-shadow:0 16px 34px -28px rgba(26,26,26,.6);
}
.side h2{
  margin:0 0 .35rem;
  font-family:var(--ui);
  font-size:16px;
  letter-spacing:.08em;
}
.side p{margin:0;font-size:15.5px;line-height:1.72;color:var(--muted)}

/* 页脚 */
footer{
  margin-top:16px;
  border-top:1px solid var(--ink);
  background:var(--ash);
}
.cta{padding:66px 20px;text-align:center}
.cta-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:56px;
  padding:10px 28px;
  border:1px solid var(--ink);
  border-radius:28px;
  font-family:var(--ui);
  font-weight:700;
  font-size:clamp(1.5rem,5.6vw,2.4rem);
  letter-spacing:.02em;
  animation:rise .26s steps(3,end) both;
}
.cta-link:hover,
.cta-link:focus-visible{background:var(--ink);color:var(--paper)}

.colophon{
  border-top:1px solid var(--rule);
  padding:18px 20px 26px;
  text-align:center;
  font-family:var(--ui);
  font-size:15px;
  color:var(--muted);
}
.colophon p{margin:0}

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

@media (min-width:861px){
  main{padding-left:var(--rail)}
  .hero-in{grid-template-columns:1.02fr .98fr;gap:48px}
  .hero-fig{clip-path:polygon(9% 0,100% 0,100% 100%,0 100%)}
  .hero-fig img{height:min(62vh,520px);max-height:none}
}

@media (min-width:981px){
  .col{grid-template-columns:minmax(0,1fr) 262px;gap:54px;align-items:start}
  .side{position:sticky;top:104px}
  main [id]{scroll-margin-top:52px}
}

@media (max-width:860px){
  .mark{display:none}
  .rail{
    left:0;
    right:0;
    top:44px;
    padding:0 6px;
    background:var(--paper);
    border-bottom:1px solid var(--rule);
  }
  .rail ol{
    flex-direction:row;
    gap:0;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .rail ol::-webkit-scrollbar{display:none}
  .rail a{
    white-space:nowrap;
    border-left:0;
    border-bottom:2px solid transparent;
    padding:0 10px;
    min-height:46px;
  }
  .rail a:hover,
  .rail a:focus-visible{
    border-bottom-color:var(--ink);
    border-left-color:transparent;
  }
  main{padding-top:96px}
  main [id]{scroll-margin-top:112px}
  .hero{min-height:0;padding:26px 0 30px}
  .hero-fig img{height:auto;max-height:300px}
  .cta{padding:52px 18px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{animation:none!important;transition:none!important}
}

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