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

:root{
  --neon:#87ff71;
  --sun:#ffce5c;
  --ink:#192617;
  --paper:#f6f5ec;
  --glass:rgba(255,255,255,.6);
  --line:rgba(25,38,23,.24);
  --rail:230px;
  --bar:36px;
  --serif:"Libre Bodoni",Georgia,"Songti SC","Noto Serif SC",serif;
  --sans:"Public Sans",-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","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(--sans);
  font-size:17px;
  line-height:1.7;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    radial-gradient(circle at 88% 10%,rgba(255,206,92,.62) 0 9%,transparent 9.4%),
    radial-gradient(circle at 8% 82%,rgba(135,255,113,.5) 0 8%,transparent 8.4%),
    radial-gradient(circle at 74% 62%,rgba(25,38,23,.12) 0 5%,transparent 5.4%),
    radial-gradient(var(--ink) 1px,transparent 1.7px);
  background-size:auto,auto,auto,22px 22px;
  background-repeat:no-repeat,no-repeat,no-repeat,repeat;
  opacity:.85;
}

img{max-width:100%;display:block;height:auto}
a{color:inherit}
p{margin:0 0 16px}
ul,ol{margin:0}
:focus-visible{outline:3px solid var(--sun);outline-offset:3px}

/* 顶部细条 */
.bar{
  position:fixed;
  inset:0 0 auto 0;
  height:var(--bar);
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 18px;
  background:var(--ink);
  color:var(--neon);
  font-size:15px;
  letter-spacing:.2em;
  z-index:40;
}
.bar .tick{
  width:10px;height:10px;flex:none;
  background:var(--sun);
  transform:rotate(45deg);
}
.bar-txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 左侧竖排导航 */
.rail{
  position:fixed;
  top:var(--bar);
  left:0;
  bottom:0;
  width:var(--rail);
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:18px 14px 26px;
  background:rgba(255,255,255,.55);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  border-right:2px dashed var(--line);
  overflow-y:auto;
  z-index:30;
}

.mark{
  display:grid;
  place-items:center;
  width:46px;height:46px;
  flex:none;
  border:2px solid var(--ink);
  border-radius:10px;
  background:var(--neon);
  overflow:hidden;
  text-decoration:none;
  transform:rotate(-4deg);
  transition:transform .2s ease,background .2s ease;
}
.mark:hover{transform:rotate(3deg) scale(1.05);background:var(--sun)}
.mark img{width:100%;height:100%;object-fit:cover}
.mark-txt{
  font-family:var(--serif);
  font-size:22px;
  font-weight:700;
  line-height:1;
}

.rail ol{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.rail li{
  animation:rise .5s cubic-bezier(.2,.7,.3,1) both;
  animation-delay:calc(var(--i) * 45ms);
}
.rail a{
  display:flex;
  align-items:center;
  gap:11px;
  min-height:44px;
  padding:10px 12px;
  font-size:16px;
  line-height:1.35;
  text-decoration:none;
  border-radius:10px;
  transition:background .18s ease,transform .18s ease;
}
.rail a:hover{background:var(--sun);transform:translateX(4px)}
.rail a[aria-current="true"]{background:var(--neon)}

.dot{
  width:9px;height:9px;
  flex:none;
  background:var(--ink);
  border-radius:1px;
}
.rail li:nth-child(2n) .dot{background:var(--sun);border-radius:50%}
.rail li:nth-child(3n) .dot{clip-path:polygon(50% 0,100% 100%,0 100%);border-radius:0}

/* 主体 */
.main{
  margin-left:var(--rail);
  padding-top:calc(var(--bar) + 22px);
}

.hero{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:18px;
  min-height:70vh;
  padding:24px 40px 8px;
}

.kicker{
  margin:0;
  font-size:16px;
  letter-spacing:.22em;
  color:#3f5a41;
}

h1{
  margin:0;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(2.05rem,4.6vw,4rem);
  line-height:1.07;
  letter-spacing:-.025em;
  max-width:22ch;
}

.hero-fig{margin:10px 0 0}
.hero-fig:empty{display:none}
.hero-img{
  width:100%;
  max-height:44vh;
  object-fit:cover;
  border:2px solid var(--ink);
  border-radius:10px;
  transform:rotate(-1deg);
  box-shadow:10px 10px 0 var(--sun);
}

/* 分栏：侧栏在左 */
.split{
  display:grid;
  grid-template-columns:266px minmax(0,1fr);
  align-items:start;
  gap:34px;
  margin-top:56px;
  padding:52px 40px 76px;
  border-top:2px dashed var(--line);
}

.side{
  position:sticky;
  top:calc(var(--bar) + 22px);
  background:var(--glass);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border:2px dashed var(--ink);
  border-radius:10px;
  padding:20px 18px 18px;
}
.side h2{
  margin:0;
  font-family:var(--serif);
  font-weight:600;
  font-size:1.5rem;
  line-height:1.18;
  letter-spacing:-.01em;
}
.subtitle{
  margin:8px 0 18px;
  font-size:16px;
  line-height:1.5;
  color:#42603f;
}
.blob{
  display:block;
  width:54px;height:54px;
  margin:0 0 16px;
  background:var(--neon);
  clip-path:polygon(50% 0,100% 38%,78% 100%,20% 88%,0 30%);
  transform:rotate(8deg);
}
.to-top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  text-decoration:none;
  border-bottom:2px solid currentColor;
  transition:color .18s ease,transform .18s ease;
}
.to-top::after{content:"↑";margin-left:6px}
.to-top:hover{color:#1f7a34;transform:translateY(-2px)}

/* 正文 */
.prose{
  max-width:70ch;
  padding:32px clamp(18px,3vw,38px);
  background:var(--glass);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  border:1px solid rgba(25,38,23,.16);
  border-radius:10px;
  overflow-wrap:break-word;
}
.prose > section{
  margin:0 0 46px;
  padding-bottom:36px;
  border-bottom:2px dotted var(--line);
  scroll-margin-top:calc(var(--bar) + 70px);
}
.prose > section:last-child{
  margin-bottom:0;
  padding-bottom:0;
  border-bottom:0;
}
.prose h2{
  margin:0 0 14px;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(1.4rem,2.4vw,1.95rem);
  line-height:1.2;
  letter-spacing:-.015em;
}
.prose h2::before{
  content:"";
  display:block;
  width:54px;height:6px;
  margin-bottom:10px;
  background:var(--neon);
  transform:skewX(-18deg);
}
.prose h3{
  margin:26px 0 10px;
  font-size:1.16rem;
  line-height:1.4;
}
.prose p{line-height:1.8}
.prose ul,.prose ol{padding-left:1.3em;margin:0 0 18px}
.prose li{margin:0 0 9px}
.prose li::marker{color:#2f7a3d}
.prose a{
  color:#1d4d26;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
.prose a:hover{background:var(--sun)}
.prose blockquote{
  margin:0 0 18px;
  padding:12px 18px;
  border-left:6px solid var(--sun);
  background:rgba(255,206,92,.18);
  border-radius:0 10px 10px 0;
}
.prose figure{margin:0 0 18px}
.prose img{
  border:2px solid var(--ink);
  border-radius:10px;
}
.prose table{
  width:100%;
  border-collapse:collapse;
  margin:0 0 18px;
  font-size:16px;
}
.prose th,.prose td{
  border:1px dashed var(--line);
  padding:9px 11px;
  text-align:left;
}
.prose code{
  font-size:15px;
  background:rgba(25,38,23,.07);
  padding:1px 5px;
  border-radius:4px;
}

/* 页脚 */
.foot{
  margin-left:var(--rail);
  margin-top:36px;
  display:grid;
  grid-template-columns:1.6fr 1fr 1fr 1fr;
  gap:30px;
  padding:52px 40px 28px;
  background:var(--ink);
  color:#e6f0e2;
  border-top:10px solid var(--neon);
}
.foot section{min-width:0}
.ft-huge{
  display:block;
  font-family:var(--serif);
  font-weight:600;
  font-size:clamp(2.3rem,5.2vw,4.3rem);
  line-height:.98;
  letter-spacing:-.03em;
  color:var(--neon);
  transform:rotate(-1.5deg);
}
.foot ol{
  list-style:none;
  margin:0;
  padding:0;
}
.foot a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  text-decoration:none;
  color:#dcecd6;
  transition:color .18s ease,transform .18s ease;
}
.foot a:hover{color:var(--sun);transform:translateX(3px)}
.ft-deco p{
  margin:0;
  font-size:16px;
  line-height:1.6;
  color:#c2d4bd;
}
.ft-legal p{
  margin:0 0 8px;
  font-size:15px;
  color:#aec2a9;
}
.ft-legal .to-top{border-bottom-color:currentColor;color:#dcecd6}
.ft-legal .to-top:hover{color:var(--sun)}

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

/* 移动端 */
@media (max-width:900px){
  .bar{
    position:static;
    height:auto;
    padding:9px 14px;
    font-size:15px;
  }
  .rail{
    position:sticky;
    top:0;
    bottom:auto;
    width:auto;
    height:auto;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:9px 12px;
    border-right:0;
    border-bottom:2px dashed var(--ink);
    overflow-x:auto;
    overflow-y:hidden;
    background:rgba(246,245,236,.93);
  }
  .rail .mark{width:42px;height:42px}
  .rail ol{
    flex-direction:row;
    gap:6px;
    flex:none;
  }
  .rail li{flex:none}
  .rail a{white-space:nowrap;padding:10px 12px}
  .rail a:hover{transform:none}
  .main{
    margin-left:0;
    padding-top:0;
  }
  .hero{
    min-height:0;
    padding:22px 18px 4px;
    gap:14px;
  }
  .hero-img{max-height:34vh;box-shadow:6px 6px 0 var(--sun)}
  .split{
    grid-template-columns:1fr;
    gap:22px;
    margin-top:32px;
    padding:32px 18px 56px;
  }
  .side{position:static}
  .prose > section{scroll-margin-top:120px}
  .foot{
    margin-left:0;
    grid-template-columns:1fr 1fr;
    gap:24px;
    padding:38px 18px 26px;
  }
  .ft-brand,.ft-deco{grid-column:1 / -1}
}

@media (max-width:700px){
  .prose table{display:block;overflow-x:auto;white-space:normal}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,
  *::before,
  *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}

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