@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root{
  --ink:#000000;
  --paper:#ffffff;
  --wash:#f3f3f3;
  --rule:#000000;
  --hair:#dedede;
  --shadow:0 22px 44px -28px rgba(0,0,0,.5), 0 2px 6px -3px rgba(0,0,0,.14);
  --r:28px;
}

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

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

body{
  margin:0;
  padding-bottom:112px;
  background:var(--paper);
  color:var(--ink);
  font-family:'Roboto',Helvetica,'Helvetica Neue',Arial,sans-serif;
  font-size:17px;
  line-height:1.65;
  font-weight:400;
  letter-spacing:.004em;
}

img{display:block;max-width:100%;height:auto}
a{color:inherit}
p{margin:0 0 1rem}
h1,h2,h3,h4{font-weight:700;line-height:1.12;letter-spacing:-.022em;margin:0}
hr{border:0;border-top:1px solid var(--rule);margin:1rem 0 1.5rem}
div[id]{scroll-margin-top:1.5rem}
.wrap{max-width:1160px;margin:0 auto;padding:0 1.25rem}

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

/* 胶囊 */
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:.45rem 1.05rem;
  border:1px solid var(--ink);
  border-radius:999px;
  background:var(--paper);
  color:var(--ink);
  font-size:16px;
  line-height:1.4;
  text-decoration:none;
  white-space:nowrap;
  transition:background .2s ease,color .2s ease,transform .2s ease;
}
.pill:hover,
.pill:focus-visible{background:var(--ink);color:var(--paper);transform:translateY(-2px)}

/* 页头 */
.masthead{border-bottom:1px solid var(--rule);background:var(--paper)}
.bar{
  max-width:1160px;
  margin:0 auto;
  padding:.7rem 1.25rem;
  display:flex;
  align-items:center;
  gap:.9rem;
}
.mark{
  flex:0 0 auto;
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--ink);
  color:var(--paper);
  border-radius:14px;
  font-size:20px;
  font-weight:700;
  text-decoration:none;
  transition:transform .22s ease;
}
.mark:hover{transform:rotate(-7deg)}
.topnav{flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}
.topnav::-webkit-scrollbar{display:none}
.topnav p{display:flex;gap:.15rem;margin:0}
.topnav a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.4rem .6rem;
  font-size:16px;
  line-height:1.4;
  white-space:nowrap;
  text-decoration:none;
  border-bottom:2px solid transparent;
  transition:border-color .2s ease;
}
.topnav a:hover,
.topnav a:focus-visible{border-color:var(--ink)}

/* 头部区块：左文右图，紧凑 */
.hero{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:1rem;
  align-items:center;
  min-height:45vh;
  padding:2.5rem 0 2.25rem;
  border-bottom:1px solid var(--rule);
}
.hero-txt{grid-column:1 / span 7}
.hero-media{grid-column:9 / span 4}
.hero-img{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:var(--r);box-shadow:var(--shadow)}
h1{font-size:clamp(2rem,5.2vw,3.5rem);letter-spacing:-.032em}
.lede{margin:1.1rem 0 0;font-size:1.05rem;max-width:34ch;color:#1a1a1a}
.hero-cta{margin:1.6rem 0 0}

/* 主体两栏：左栏在左 */
.cols{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:1rem;
  align-items:start;
  padding:2.25rem 0 3rem;
}
.side{
  grid-column:1 / span 3;
  position:sticky;
  top:1.5rem;
  background:var(--paper);
  border:1px solid var(--ink);
  border-radius:var(--r);
  padding:1.1rem 1.1rem 1.35rem;
  box-shadow:var(--shadow);
}
.side h2{font-size:16px;font-weight:500;letter-spacing:.1em}
.side h2 + hr{margin:.55rem 0 .85rem}
.side ul{list-style:none;margin:0;padding:0;display:grid;gap:.1rem}
.side li{animation:rise .45s ease both}
.side a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.35rem .1rem;
  font-size:16px;
  text-decoration:none;
  border-bottom:1px solid var(--hair);
  transition:padding-left .2s ease;
}
.side a:hover{padding-left:.45rem}
.side li:last-child a{border-bottom:0}
.side li:nth-child(1){animation-delay:.03s}
.side li:nth-child(2){animation-delay:.07s}
.side li:nth-child(3){animation-delay:.11s}
.side li:nth-child(4){animation-delay:.15s}
.side li:nth-child(5){animation-delay:.19s}
.side li:nth-child(6){animation-delay:.23s}
.side li:nth-child(7){animation-delay:.27s}

/* 正文 */
.prose{
  grid-column:4 / span 9;
  background:var(--paper);
  border:1px solid #e2e2e2;
  border-radius:var(--r);
  padding:1.7rem 1.7rem 2.2rem;
  box-shadow:var(--shadow);
}
.prose > *:first-child{margin-top:0}
.prose h2{font-size:clamp(1.35rem,2.6vw,1.85rem);margin:2.4rem 0 .5rem}
.prose h3{font-size:1.18rem;margin:1.8rem 0 .45rem}
.prose h2 + hr,
.prose h3 + hr{margin:.2rem 0 1.25rem}
.prose p{margin:0 0 1rem}
.prose ul,
.prose ol{margin:0 0 1.2rem;padding-left:1.35rem}
.prose li{margin:.35rem 0}
.prose a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.prose a:hover{background:var(--ink);color:var(--paper);text-decoration:none}
.prose blockquote{
  margin:1.5rem 0;
  padding:.35rem 0 .35rem 1.1rem;
  border-left:4px solid var(--ink);
  font-style:italic;
}
.prose figure{margin:1.4rem 0}
.prose img{border-radius:20px;margin:1.2rem 0}
.prose table{width:100%;border-collapse:collapse;margin:1.2rem 0;font-size:16px;display:block;overflow-x:auto}
.prose th,
.prose td{border-bottom:1px solid var(--hair);padding:.55rem .6rem;text-align:left}
.prose pre{overflow-x:auto;background:var(--wash);padding:1rem;border-radius:16px;font-size:15px}
.prose code{font-size:15px}

/* 页脚 */
.foot{
  border-top:1px solid var(--rule);
  margin-top:1rem;
  padding:2.5rem 0 2rem;
  background:var(--wash);
}
.foot > *{
  max-width:1160px;
  margin-left:auto;
  margin-right:auto;
  padding-left:1.25rem;
  padding-right:1.25rem;
}
.foot-cta h2{font-size:clamp(1.6rem,4vw,2.4rem)}
.foot-cta p{margin:1.2rem 0 0}
.foot-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem;margin-top:2.5rem}
.foot dl{margin:0}
.foot dt{
  font-size:16px;
  font-weight:500;
  letter-spacing:.12em;
  margin-bottom:.45rem;
}
.foot dd{margin:0;font-size:16px;word-break:break-word}
.foot dd a{
  display:flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  text-decoration:none;
  border-bottom:1px solid var(--hair);
}
.foot dd a:hover{text-decoration:underline}
.foot-end{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:1rem;
  margin-top:2.5rem;
  padding-top:1.25rem;
  border-top:1px solid var(--ink);
}
.foot-end p{margin:0;font-size:16px}

/* 底部固定条 */
.dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:30;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(8px);
  border-top:1px solid var(--rule);
  padding:.5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
}
.docknav{max-width:1160px;margin:0 auto;overflow-x:auto;scrollbar-width:none}
.docknav::-webkit-scrollbar{display:none}
.docknav p{display:flex;gap:.4rem;margin:0}
.docknav a{animation:rise .4s ease both}
.docknav a:nth-child(1){animation-delay:.02s}
.docknav a:nth-child(2){animation-delay:.05s}
.docknav a:nth-child(3){animation-delay:.08s}
.docknav a:nth-child(4){animation-delay:.11s}
.docknav a:nth-child(5){animation-delay:.14s}
.docknav a:nth-child(6){animation-delay:.17s}
.docknav a:nth-child(7){animation-delay:.2s}

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

/* 窄屏 */
@media (max-width:900px){
  .hero{grid-template-columns:1fr;min-height:0;padding:1.8rem 0 1.6rem}
  .hero-txt,
  .hero-media{grid-column:1 / -1}
  .hero-media{margin-top:1.5rem}
  .hero-img{aspect-ratio:16/10}
  .lede{font-size:1rem;max-width:none}
  .cols{grid-template-columns:1fr;padding:1.5rem 0 2rem}
  .side,
  .prose{grid-column:1 / -1}
  .side{position:static}
  .prose{padding:1.3rem 1.15rem 1.8rem;border-radius:22px}
  .foot-cols{grid-template-columns:1fr;gap:1.25rem}
  .foot-end{justify-content:space-between}
}

@media (max-width:520px){
  body{font-size:16px;padding-bottom:104px}
  h1{font-size:clamp(1.85rem,9vw,2.4rem)}
  .bar{padding:.6rem .9rem;gap:.6rem}
  .wrap{padding:0 .9rem}
  .foot > *{padding-left:.9rem;padding-right:.9rem}
}

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

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