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

:root{
  --lime:#80ff00;
  --acid:#00ff00;
  --ink:#1f2617;
  --cream:#f4f7ec;
  --paper:#eaffd6;
  --olive:#2b3423;
}

*{box-sizing:border-box}

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

body{
  margin:0;
  background:var(--ink);
  color:var(--cream);
  font-family:'DM Sans',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.68;
  padding-bottom:140px;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
img{display:block;max-width:100%;height:auto}
p{margin:0}

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

/* ---------- 底部固定条 ---------- */
.top{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:60;
  background:var(--ink);
  border-top:3px solid var(--lime);
  box-shadow:0 -12px 30px rgba(0,0,0,.55);
}

.topnav{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:.2rem .4rem;
  padding:.4rem .35rem calc(.4rem + env(safe-area-inset-bottom));
}

.side{
  display:flex;
  flex:1 1 auto;
  flex-wrap:wrap;
  justify-content:center;
  gap:0 .1rem;
  order:2;
}

.mark{
  order:1;
  flex:0 0 100%;
  text-align:center;
  font-weight:700;
  font-size:.92rem;
  letter-spacing:.18em;
  color:var(--lime);
  padding:.1rem .2rem .2rem;
}

.topnav a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.1rem .38rem;
  font-size:.82rem;
  font-weight:500;
  color:#dde9cd;
  border-radius:4px;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}

.topnav a:hover,
.topnav a:focus-visible{
  background:var(--lime);
  color:var(--ink);
  transform:translateY(-2px);
}

@media (min-width:820px){
  body{padding-bottom:84px}
  .topnav{flex-wrap:nowrap;padding:.35rem 1.1rem}
  .side{order:0;flex:1 1 0;gap:.15rem}
  .side:last-of-type{justify-content:flex-end}
  .mark{order:0;flex:0 0 auto;padding:0 1.4rem;font-size:1.05rem}
  .topnav a{min-height:44px;font-size:.95rem;padding:.1rem .6rem}
}

/* ---------- 头图 ---------- */
.hero{
  position:relative;
  min-height:70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:3.4rem 1rem 3rem;
  overflow:hidden;
  background:var(--ink);
}

.heroart{position:absolute;inset:0;z-index:0}
.heroart img{width:100%;height:100%;object-fit:cover;filter:saturate(150%) contrast(108%)}

.heromask{
  position:absolute;
  inset:0;
  z-index:1;
  background:
    radial-gradient(circle at 24% 18%,rgba(128,255,0,.32),transparent 58%),
    linear-gradient(165deg,rgba(31,38,23,.6),rgba(31,38,23,.9));
  mix-blend-mode:multiply;
}

.heroin{
  position:relative;
  z-index:2;
  max-width:920px;
  text-align:center;
}

.herotitle{
  margin:0;
  font-size:clamp(2.4rem,10vw,5rem);
  line-height:1.02;
  letter-spacing:-.03em;
  font-weight:700;
  color:#f8ffe9;
  text-shadow:0 7px 0 rgba(0,0,0,.32);
}

.badge{
  position:absolute;
  top:-2.2rem;
  right:-.2rem;
  background:var(--acid);
  color:var(--ink);
  font-weight:700;
  font-size:.8rem;
  letter-spacing:.1em;
  padding:.5rem .8rem;
  border-radius:4px;
  transform:rotate(-7deg);
  box-shadow:0 6px 0 rgba(0,0,0,.4);
  animation:jitter 5.5s ease-in-out infinite;
}

@keyframes jitter{
  0%,100%{transform:rotate(-7deg) translateY(0)}
  50%{transform:rotate(-3.5deg) translateY(-5px)}
}

/* ---------- 跑马灯 ---------- */
.tape{
  background:var(--lime);
  color:var(--ink);
  overflow:hidden;
  padding:.4rem 0;
  font-size:.84rem;
  font-weight:700;
  letter-spacing:.16em;
}

.tape p{
  display:flex;
  width:max-content;
  animation:slide 28s linear infinite;
}

.tape span{white-space:nowrap;padding-right:.5rem}

@keyframes slide{to{transform:translateX(-50%)}}

/* ---------- 主栅格 ---------- */
main{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:1.6rem;
  max-width:1140px;
  margin:0 auto;
  padding:1.5rem 1rem 2.4rem;
}

@media (min-width:900px){
  main{
    grid-template-columns:minmax(0,1fr) 288px;
    gap:2.4rem;
    padding:2.4rem 1.4rem 3rem;
    align-items:start;
  }
}

div{min-width:0}

/* ---------- 正文 ---------- */
.body section{
  --r:0deg;
  background:var(--cream);
  color:var(--ink);
  border-radius:4px;
  padding:1.7rem 1.1rem 1.8rem;
  margin:0 0 1.1rem;
  transform:rotate(var(--r));
  scroll-margin-block-start:1.2rem;
}

.body section:nth-child(even){--r:-.35deg;background:var(--paper)}
.body section:nth-child(3n){--r:.3deg;background:var(--lime)}
.body section:first-child{margin-top:0}

.body h2{
  font-size:clamp(1.45rem,5.6vw,2.05rem);
  line-height:1.22;
  letter-spacing:-.02em;
  margin:.15rem 0 .7rem;
}

.body h3{
  font-size:1.14rem;
  line-height:1.35;
  margin:1.5rem 0 .5rem;
}

.body p{margin:0 0 1rem}
.body ul,.body ol{margin:0 0 1rem;padding-left:1.15rem}
.body li{margin:.3rem 0}

.body a{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.body a:hover{background:var(--ink);color:var(--lime);text-decoration:none}

.body hr{
  border:0;
  height:4px;
  width:64px;
  background:var(--ink);
  border-radius:2px;
  margin:1rem 0 1.1rem;
}

.body time{
  display:inline-block;
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.06em;
  background:var(--ink);
  color:var(--lime);
  padding:.15rem .5rem;
  border-radius:4px;
  margin:0 0 .8rem;
}

.body blockquote{
  margin:0 0 1rem;
  padding:.85rem 1rem;
  background:rgba(31,38,23,.09);
  border-radius:4px;
  font-weight:500;
}

.body figure{margin:0 0 1rem}
.body img{border-radius:4px;margin:0 0 1rem}
.body strong{font-weight:700}
.body code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.92em;
  background:rgba(31,38,23,.12);
  padding:.1em .35em;
  border-radius:4px;
}

/* ---------- 侧栏 ---------- */
.rail{
  --r:-1.1deg;
  background:var(--acid);
  color:var(--ink);
  border-radius:4px;
  padding:1rem .9rem 1.1rem;
  transform:rotate(var(--r));
  box-shadow:0 8px 0 rgba(0,0,0,.38);
}

@media (min-width:900px){
  .rail{position:sticky;top:1.4rem}
}

.rail h2{
  font-size:1.02rem;
  letter-spacing:.16em;
  margin:0 0 .45rem;
}

.rail hr{
  border:0;
  height:3px;
  background:var(--ink);
  border-radius:2px;
  margin:0 0 .55rem;
}

.rail a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.05rem .2rem;
  font-size:.95rem;
  font-weight:500;
  border-bottom:1px dashed rgba(31,38,23,.4);
}

.rail a:hover{background:var(--ink);color:var(--acid)}

/* ---------- 页脚 ---------- */
.foot{
  display:grid;
  grid-template-columns:1fr;
  gap:.9rem;
  max-width:1140px;
  margin:0 auto;
  padding:2rem 1rem 2.6rem;
  border-top:3px dashed #3d4830;
}

.fcta{
  font-size:clamp(1.7rem,7.5vw,2.6rem);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.05;
}

.fcta a{color:var(--lime)}
.fcta a:hover{color:var(--acid)}

.fcol{display:flex;flex-direction:column}

.fcol a{
  display:flex;
  align-items:center;
  min-height:40px;
  font-size:.95rem;
  color:#cddbbb;
}

.fcol a:hover{color:var(--lime)}

.fnote{font-size:.8rem;color:#93a382;letter-spacing:.04em}

.ftop a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:.9rem;
  font-weight:700;
  color:var(--lime);
}

@media (min-width:820px){
  .foot{
    grid-template-columns:1.9fr 1fr 1fr auto;
    align-items:start;
    gap:1.3rem 1.6rem;
    padding-top:2.6rem;
  }
  .fcta{grid-column:1;grid-row:1}
  .fcol.a{grid-column:2;grid-row:1}
  .fcol.b{grid-column:3;grid-row:1}
  .fnote{grid-column:1 / 4;grid-row:2;align-self:center}
  .ftop{grid-column:4;grid-row:2;justify-self:end}
}

/* ---------- 滚动显现 ---------- */
.js .rv{
  opacity:0;
  transform:translateY(18px) rotate(var(--r,0deg));
  transition:opacity .5s ease,transform .55s cubic-bezier(.2,.7,.3,1);
  transition-delay:var(--d,0ms);
}

.js .rv.in{
  opacity:1;
  transform:translateY(0) rotate(var(--r,0deg));
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .rv{opacity:1;transform:none;transition:none}
  .tape p{animation:none}
  .badge{animation:none}
  .topnav a{transition:none}
}

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