@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root{
  --bg:#000000;
  --fg:#ededed;
  --muted:#a3a3a3;
  --line:#232323;
  --accent:#528b49;
  --panel:#070707;
  --u:8px;
}

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

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

body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:Inter,Helvetica,"Helvetica Neue",Arial,"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.6;
  font-weight:400;
  overflow-x:hidden;
}

img{display:block;max-width:100%;height:auto}
h1,h2,h3{font-weight:800;line-height:1.12;letter-spacing:-.015em;margin:0}
p{margin:0 0 16px}
a{color:inherit}
hr{border:0;border-top:2px solid var(--accent);width:48px;margin:12px 0 20px}
[id]{scroll-margin-top:24px}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- 左侧竖排导航 ---------- */
.rail{
  position:static;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px;
  background:var(--bg);
  border-bottom:1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  text-decoration:none;
  color:#fff;
  font-size:19px;
  font-weight:800;
  letter-spacing:.02em;
}

.brand-dot{
  width:11px;
  height:11px;
  flex:none;
  background:var(--accent);
  transform:rotate(45deg);
}

.rail-nav{display:flex;flex-wrap:wrap;gap:6px}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 12px;
  border:1px solid #2b2b2b;
  border-radius:4px;
  color:#cfcfcf;
  font-size:16px;
  line-height:1.3;
  text-decoration:none;
  transition:border-color .18s ease,color .18s ease,background .18s ease;
}

.pill:hover,.pill:focus-visible{
  border-color:var(--accent);
  background:#0b120a;
  color:#fff;
}

.pill--cta{
  align-self:flex-start;
  background:var(--accent);
  border-color:var(--accent);
  color:#041006;
  font-weight:700;
}

.pill--cta:hover,.pill--cta:focus-visible{
  background:#5f9c54;
  border-color:#5f9c54;
  color:#041006;
}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  isolation:isolate;
  display:grid;
  place-items:center;
  min-height:45vh;
  padding:40px 20px 56px;
  text-align:center;
  overflow:hidden;
}

.band{
  position:absolute;
  left:-6%;
  right:-6%;
  bottom:0;
  height:58%;
  z-index:-1;
  background:var(--accent);
  clip-path:polygon(0 100%,100% 22%,100% 100%);
}

.hero-title{
  max-width:16ch;
  font-size:clamp(2.35rem,10vw,6.4rem);
  font-weight:800;
  line-height:.96;
  letter-spacing:-.03em;
  color:#fff;
  text-wrap:balance;
}

/* ---------- 正文栅格 ---------- */
.wrap{
  display:grid;
  grid-template-columns:1fr;
  gap:32px;
  max-width:1180px;
  margin:0 auto;
  padding:0 20px 72px;
}

.content{min-width:0}
.prose{max-width:70ch}

.prose > article{
  padding:36px 0;
  border-top:1px solid var(--line);
}

.prose > article:first-child{
  border-top:0;
  padding-top:8px;
}

.prose h2{
  font-size:clamp(1.45rem,4.2vw,2.05rem);
  margin-bottom:2px;
  color:#fff;
}

.prose h3{
  font-size:1.15rem;
  margin:24px 0 10px;
  color:#fff;
}

.prose p{color:#d5d5d5}

.prose a{
  color:#8fc481;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.prose a:hover{color:#b6dcab}

.prose strong{color:#fff}

.prose ul,.prose ol{
  margin:0 0 18px;
  padding-left:20px;
  color:#d5d5d5;
}

.prose li{margin:6px 0}

.prose blockquote{
  margin:0 0 18px;
  padding:4px 0 4px 16px;
  border-left:3px solid var(--accent);
  color:#c9c9c9;
}

.prose table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 18px;
  font-size:16px;
}

.prose th,.prose td{
  border-bottom:1px solid var(--line);
  padding:10px 8px;
  text-align:left;
}

/* ---------- 右侧索引 ---------- */
.side{
  align-self:start;
  padding:18px 16px 8px;
  background:var(--panel);
  border:1px solid var(--line);
  border-bottom:3px solid var(--accent);
  border-radius:4px;
}

.side h2{
  font-size:16px;
  letter-spacing:.14em;
  font-weight:700;
  color:#fff;
}

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

.side li a{
  display:flex;
  align-items:center;
  min-height:40px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:16px;
  text-decoration:none;
}

.side li:first-child a{border-top:0}
.side li a:hover,.side li a:focus-visible{color:#fff}

/* ---------- 页脚 ---------- */
.foot{
  display:grid;
  grid-template-columns:1fr;
  gap:28px;
  padding:44px 20px 28px;
  background:#050505;
  border-top:1px solid var(--line);
}

.foot article{min-width:0}

.foot h2{
  font-size:16px;
  letter-spacing:.12em;
  font-weight:700;
  color:#fff;
}

.foot-logo{
  margin:0;
  font-size:22px;
  font-weight:800;
  letter-spacing:.02em;
  color:#fff;
}

.foot-cta{margin:0}

.foot dl{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:0 12px;
  margin:0;
}

.foot dt{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  color:var(--accent);
  font-size:16px;
  line-height:1;
  font-variant-numeric:tabular-nums;
}

.foot dd{margin:0}

.foot dd a{
  display:flex;
  align-items:center;
  min-height:40px;
  color:#d6d6d6;
  font-size:16px;
  text-decoration:none;
}

.foot dd a:hover,.foot dd a:focus-visible{color:#fff}

.foot-bottom{
  grid-column:1/-1;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:12px;
  margin-top:8px;
  padding-top:18px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:16px;
}

.foot-bottom p{margin:0}

.foot-top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:#d6d6d6;
  text-decoration:none;
}

.foot-top:hover{color:#fff}

/* ---------- 订阅 ---------- */
.sub{display:flex;flex-wrap:wrap;gap:8px}

.sub input{
  flex:1 1 160px;
  min-height:44px;
  padding:0 12px;
  background:#0d0d0d;
  border:1px solid #2b2b2b;
  border-radius:4px;
  color:#fff;
  font:inherit;
  font-size:16px;
}

.sub button{
  min-height:44px;
  padding:0 18px;
  border:0;
  border-radius:4px;
  background:var(--accent);
  color:#041006;
  font:inherit;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
}

.sub button:hover{background:#5f9c54}

.sub-note{
  flex:1 1 100%;
  margin:4px 0 0;
  color:var(--accent);
  font-size:16px;
}

.sub-note:empty{display:none}

/* ---------- 滚动入场 ---------- */
.js .prose > article{
  opacity:0;
  transform:translateY(12px);
  transition:opacity .5s ease,transform .5s ease;
}

.js .prose > article.in{
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .prose > article{opacity:1;transform:none;transition:none}
}

/* ---------- 桌面 ---------- */
@media (min-width:900px){
  body{padding-left:224px}

  .rail{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    z-index:20;
    width:224px;
    padding:28px 18px;
    gap:18px;
    overflow-y:auto;
    border-bottom:0;
    border-right:1px solid var(--line);
  }

  .rail-nav{flex-direction:column;flex-wrap:nowrap}
  .pill{min-height:42px}
  .pill--cta{margin-top:auto}

  .hero{min-height:46vh;padding:64px 40px 72px}

  .wrap{
    grid-template-columns:repeat(12,1fr);
    gap:16px;
    padding:0 32px 96px;
  }

  .content{grid-column:1/span 8}
  .side{grid-column:10/span 3;position:sticky;top:24px}

  .foot{
    grid-template-columns:1.3fr 1fr 1fr 1.2fr;
    gap:24px;
    padding:64px 32px 28px;
  }
}

@media (min-width:1280px){
  .wrap{padding:0 48px 112px}
  .foot{padding:72px 48px 28px}
}

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