:root{
  --green:#0F3D2E;
  --green-d:#0a2b20;
  --orange:#FF6B35;
  --cream:#F5F1E8;
  --paper:#fffdf7;
  --ink:#14261e;
  --muted:#3d5750;
  --line:#cbc4b4;
}

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

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

body{
  margin:0;
  overflow-x:hidden;
  background:var(--cream);
  color:var(--ink);
  font-family:Inter,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:1rem;
  line-height:1.65;
  font-weight:400;
}

h1,h2,h3{
  font-family:Calistoga,Georgia,"Songti SC","Noto Serif SC",serif;
  font-weight:400;
  line-height:1.16;
  color:var(--green);
  margin:0;
}

a{color:var(--green)}
img{max-width:100%}

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

/* ---------- 顶栏 ---------- */

.topbar{position:sticky;top:0;z-index:70;background:var(--green)}

.top{
  position:relative;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  min-height:56px;
  padding:.3rem clamp(.75rem,3vw,2rem);
  background:var(--green);
  color:var(--cream);
  border-bottom:3px solid var(--orange);
}

.brand{
  grid-column:2;
  grid-row:1;
  justify-self:center;
  z-index:90;
  background:var(--green);
  padding:.45rem .9rem;
  font-family:Calistoga,Georgia,"Songti SC",serif;
  font-size:1.25rem;
  line-height:1.2;
  color:var(--cream);
  text-decoration:none;
  white-space:nowrap;
  transition:color .16s ease;
}
.brand:hover{color:var(--orange)}

.site-nav{grid-column:1 / -1;grid-row:1;position:relative;z-index:1}

.site-nav ol{
  display:flex;
  align-items:center;
  gap:.1rem;
  margin:0;
  padding:0 3.4rem 0 0;
  list-style:none;
}

.site-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 .6rem;
  color:var(--cream);
  text-decoration:none;
  font-size:1rem;
  white-space:nowrap;
  transition:color .16s ease;
}
.site-nav a:hover{color:var(--orange)}

.gap{flex:1 1 auto}

.burger{
  position:absolute;
  right:clamp(.75rem,3vw,2rem);
  top:50%;
  transform:translateY(-50%);
  width:44px;
  height:44px;
  padding:0;
  display:grid;
  place-items:center;
  z-index:95;
  background:transparent;
  border:2px solid var(--cream);
  cursor:pointer;
  transition:border-color .16s ease;
}
.burger:hover{border-color:var(--orange)}

.bars,.bars::before,.bars::after{
  display:block;
  width:20px;
  height:2px;
  background:var(--cream);
  transition:transform .16s ease,background .16s ease;
}
.bars{position:relative;background:transparent}
.bars::before,.bars::after{content:"";position:absolute;left:0}
.bars::before{top:-6px}
.bars::after{top:6px}
body.menu-open .bars::before{transform:translateY(6px) rotate(45deg)}
body.menu-open .bars::after{transform:translateY(-6px) rotate(-45deg)}

/* ---------- 二级锚点条 ---------- */

.rail{
  background:var(--cream);
  border-bottom:2px solid var(--green);
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}

.rail ol{
  display:flex;
  align-items:stretch;
  margin:0 auto;
  padding:0 clamp(.5rem,2vw,1rem);
  max-width:1120px;
  list-style:none;
}

.rail a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 .75rem;
  font-size:1rem;
  text-decoration:none;
  color:var(--green);
  white-space:nowrap;
  border-bottom:3px solid transparent;
  transition:color .16s ease,border-color .16s ease;
}
.rail a:hover{color:var(--orange);border-bottom-color:var(--orange)}

/* ---------- 全屏菜单 ---------- */

body.menu-open{overflow:hidden}

body.menu-open .site-nav{
  position:fixed;
  inset:0;
  z-index:80;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:4.5rem 1rem 2rem;
  overflow-y:auto;
  background:var(--green);
}

body.menu-open .site-nav ol{
  display:flex;
  flex-direction:column;
  gap:0;
  width:min(24rem,86vw);
  max-width:none;
  margin:0;
  padding:0;
}

body.menu-open .site-nav a{
  display:flex;
  align-items:center;
  width:100%;
  min-height:48px;
  padding:.7rem .25rem;
  font-size:1.2rem;
  border-bottom:1px solid rgba(245,241,232,.22);
}

body.menu-open .gap{display:none}

/* ---------- 首屏大图 ---------- */

.band{background:var(--green);line-height:0}
.band-fig{margin:0}
.band-img{
  display:block;
  width:100%;
  height:45vh;
  min-height:200px;
  max-height:430px;
  object-fit:cover;
  clip-path:polygon(0 0,100% 0,100% 86%,0 100%);
}

/* ---------- 主体 ---------- */

.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:clamp(1.4rem,3.5vw,2.6rem) clamp(1rem,4vw,2rem) 3.5rem;
  display:grid;
  grid-template-columns:minmax(0,1fr) 15rem;
  gap:clamp(1.5rem,3.5vw,2.8rem);
  align-items:start;
}

.page-title{
  font-size:clamp(2rem,5vw,3.1rem);
  letter-spacing:-.015em;
  margin:0 0 1.6rem;
  padding-bottom:1rem;
  border-bottom:3px solid var(--orange);
}

article{overflow-wrap:break-word}

article > div{
  margin:0 0 2.6rem;
  scroll-margin-top:7.5rem;
}

article > div + div{
  border-top:1px solid var(--line);
  padding-top:2.2rem;
}

article h2{font-size:clamp(1.4rem,3.2vw,1.95rem);margin:.1rem 0 .7rem}

article h2 + hr{
  width:3.5rem;
  border:0;
  border-top:3px solid var(--orange);
  margin:.1rem 0 1.1rem;
}

article h3{font-size:1.2rem;margin:1.4rem 0 .5rem}

article p{margin:0 0 1.05rem;max-width:66ch}

article ul,article ol{margin:0 0 1.1rem;padding-left:1.2rem;max-width:66ch}
article li{margin-bottom:.4rem}

article a{
  color:var(--green);
  text-decoration:underline;
  text-decoration-color:var(--orange);
  text-underline-offset:3px;
}
article a:hover{background:var(--orange);color:#fff;text-decoration:none}

article strong{color:var(--green)}

article blockquote{
  margin:0 0 1.2rem;
  padding:.4rem 0 .4rem 1.1rem;
  border-left:4px solid var(--orange);
  color:var(--muted);
}

article img{display:block;max-width:100%;height:auto;border:2px solid var(--green)}

hr{border:0;border-top:2px solid var(--line);margin:1.5rem 0}

/* ---------- 侧栏 ---------- */

.side{
  position:sticky;
  top:7.5rem;
  border:2px solid var(--green);
  background:var(--paper);
  padding:1rem .9rem;
}

.side h2{font-size:1.05rem;margin:0 0 .5rem;letter-spacing:.05em}

.side hr{
  width:2.5rem;
  border:0;
  border-top:3px solid var(--orange);
  margin:0 0 .7rem;
}

.side ol{list-style:none;counter-reset:toc;margin:0;padding:0}
.side li{counter-increment:toc}

.side a{
  display:flex;
  align-items:center;
  gap:.5rem;
  min-height:40px;
  padding:.35rem 0;
  font-size:1rem;
  color:var(--green);
  text-decoration:none;
  border-bottom:1px solid var(--line);
  transition:color .16s ease;
}
.side a::before{
  content:counter(toc,decimal-leading-zero);
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.82rem;
  color:var(--orange);
}
.side li:last-child a{border-bottom:0}
.side a:hover{color:var(--orange)}

/* ---------- 页脚 ---------- */

.foot{
  background:var(--green);
  color:var(--cream);
  border-top:4px solid var(--orange);
  padding:2rem clamp(1rem,4vw,2rem);
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.6rem 1rem;
  align-items:center;
}

.foot p{margin:0}

.foot a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  color:var(--cream);
  text-decoration:none;
  transition:color .16s ease;
}
.foot a:hover{color:var(--orange)}

.foot-brand{font-family:Calistoga,Georgia,"Songti SC",serif;font-size:1.1rem}

.foot small{font-size:1rem;color:var(--cream);justify-self:end;text-align:right}

/* ---------- 动效 ---------- */

.js-reveal{opacity:0;transform:translateY(16px);transition:opacity .45s ease,transform .45s ease}
.js-reveal.is-in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js-reveal{opacity:1;transform:none;transition:none}
  .bars,.bars::before,.bars::after,.brand,.site-nav a,.rail a,.side a,.foot a,.burger{border-color:currentColor;transition:none}
}

/* ---------- 窄屏 ---------- */

@media (max-width:860px){
  .top{padding-right:3.6rem}
  .site-nav{display:none}
  body.menu-open .site-nav{display:flex}

  .wrap{grid-template-columns:minmax(0,1fr);padding-top:1.2rem}

  .side{position:static;margin-top:.4rem}
  .side ol{display:flex;flex-wrap:wrap;gap:0 1rem}
  .side li{flex:0 1 auto}
  .side a{border-bottom:0}

  .band-img{height:34vh;min-height:170px}

  .foot{grid-template-columns:repeat(2,minmax(0,1fr));padding:1.6rem 1rem 1.2rem}
  .foot small{grid-column:1 / -1;justify-self:start;text-align:left}
}

@media (max-width:420px){
  .page-title{font-size:1.85rem}
}
</｜DSML｜ parameter>
</｜DSML｜ invoke>
</｜DSML｜ calls>

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