@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Russo+One&display=swap');

:root{
  --ink:#192617;
  --ink-2:#162214;
  --ink-3:#101a0f;
  --neon:#87ff71;
  --butter:#ffce5c;
  --paper:#eaffdf;
  --dim:#c2dcbb;
}

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

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

body{
  margin:0;
  background-color:var(--ink);
  background-image:radial-gradient(rgba(135,255,113,.12) 1px, transparent 1px);
  background-size:23px 23px;
  color:var(--paper);
  font-family:"Chakra Petch",-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.75;
  letter-spacing:.01em;
  overflow-x:hidden;
}

.sr{
  position:absolute;
  width:1px;height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

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

/* ---------- 顶部两行 · 品牌行 / 菜单行 ---------- */
.masthead{
  position:sticky;
  top:0;
  z-index:60;
  display:grid;
  grid-template-columns:1fr auto;
  gap:.5rem;
  padding:.65rem clamp(.8rem,3vw,2rem) .75rem;
  background:#131f12;
  border-bottom:4px solid var(--neon);
  box-shadow:0 5px 0 rgba(255,206,92,.28);
}

.brandrow{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.8rem;
  min-width:0;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  min-height:44px;
  min-width:0;
  text-decoration:none;
  color:var(--neon);
  font-family:"Russo One",system-ui,"PingFang SC",sans-serif;
  font-size:1.02rem;
  line-height:1.2;
  letter-spacing:.05em;
}

.brandmark{
  flex:0 0 auto;
  width:38px;
  height:38px;
  display:block;
  background:var(--butter);
  border:3px solid var(--neon);
  clip-path:polygon(50% 0,100% 38%,82% 100%,18% 100%,0 38%);
  transform:rotate(-7deg);
  object-fit:cover;
}

.brandname{
  min-width:0;
  overflow-wrap:anywhere;
}

.burger{
  display:none;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 1rem;
  border:2px solid var(--neon);
  background:transparent;
  color:var(--neon);
  font:inherit;
  font-weight:700;
  letter-spacing:.14em;
  cursor:pointer;
}

.menubar{grid-column:1;min-width:0}

.menubar ul{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:.1rem;
  margin:0;
  padding:0;
  list-style:none;
}

.menubar li{display:flex}

.menubar li:not(:first-child){border-left:2px dotted rgba(255,206,92,.45)}

.menubar li:nth-child(2),
.menubar li:nth-child(4),
.menubar li:nth-child(6){margin-left:.55rem}

.menubar a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 .7rem;
  border:2px solid transparent;
  color:var(--paper);
  text-decoration:none;
  font-weight:600;
  font-size:.94rem;
  transition:background .18s ease,color .18s ease,transform .18s ease,border-color .18s ease;
}

.menubar a:hover{
  background:var(--butter);
  color:var(--ink);
  border-color:var(--ink);
  transform:rotate(-2deg) translateY(-2px);
}

.searchbar{
  grid-column:2;
  display:flex;
  gap:.3rem;
}

.searchbar input{
  width:10.5rem;
  min-height:44px;
  padding:0 .7rem;
  border:2px solid var(--neon);
  background:#0d1710;
  color:var(--paper);
  font:inherit;
  font-size:.92rem;
}

.searchbar input::placeholder{color:#a9c6a3}

.searchbar button{
  min-height:44px;
  padding:0 .95rem;
  border:2px solid var(--butter);
  background:var(--butter);
  color:var(--ink);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:transform .16s ease;
}

.searchbar button:hover{transform:rotate(3deg)}

/* ---------- 内容壳：正文 + 右侧 aside ---------- */
.shell{
  display:grid;
  grid-template-columns:minmax(0,1fr) 262px;
  gap:clamp(1rem,3vw,2.3rem);
  max-width:1180px;
  margin:0 auto;
  padding:0 clamp(.8rem,3vw,1.6rem) 3rem;
}

main{min-width:0}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:1rem;
  min-height:70vh;
  padding:2.2rem 0 1.4rem;
  overflow:hidden;
  scroll-margin-top:160px;
}

.hero::before{
  content:"";
  position:absolute;
  left:-12%;right:-12%;
  top:18%;
  height:62%;
  background:var(--butter);
  opacity:.16;
  clip-path:polygon(0 42%,100% 0,100% 60%,0 100%);
  transform:rotate(-3deg);
  pointer-events:none;
}

.hero h1{
  position:relative;
  z-index:1;
  margin:0;
  max-width:20ch;
  font-family:"Russo One","Chakra Petch",system-ui,"PingFang SC",sans-serif;
  font-size:clamp(1.85rem,7vw,3.4rem);
  line-height:1.12;
  color:var(--neon);
  letter-spacing:.01em;
  text-shadow:3px 3px 0 rgba(25,38,23,.9);
}

.hero h1::after{
  content:"";
  display:block;
  width:min(220px,62%);
  height:10px;
  margin:.75rem auto 0;
  background:var(--butter);
  clip-path:polygon(0 0,100% 0,95% 100%,5% 100%);
  transform:skewX(-14deg);
}

.lede{
  position:relative;
  z-index:1;
  margin:0;
  max-width:34em;
  font-size:1rem;
  line-height:1.7;
  color:var(--dim);
}

.hero-art{
  position:relative;
  z-index:1;
  width:100%;
  max-width:760px;
  min-height:170px;
  margin:.4rem 0 0;
  display:grid;
  place-items:center;
}

.hero-img{
  display:block;
  width:100%;
  height:auto;
  border:3px solid var(--neon);
  clip-path:polygon(0 0,100% 3%,100% 100%,0 97%);
}

.shape{position:absolute;pointer-events:none}

.shape-a{
  left:-4px;
  top:10px;
  width:70px;
  height:70px;
  background:var(--butter);
  clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);
  transform:rotate(9deg);
  mix-blend-mode:screen;
}

.shape-b{
  right:3%;
  bottom:-4px;
  width:0;
  height:0;
  border-left:44px solid transparent;
  border-right:44px solid transparent;
  border-bottom:66px solid var(--neon);
  opacity:.82;
  transform:rotate(-7deg);
}

.shape-c{
  right:9%;
  top:8%;
  width:94px;
  height:32px;
  background:repeating-linear-gradient(90deg,var(--neon) 0 6px,transparent 6px 13px);
  opacity:.75;
  transform:rotate(-12deg);
}

/* ---------- 正文区块（page.content） ---------- */
main > section:not(.hero){
  position:relative;
  margin:0 0 1.6rem;
  padding:1.5rem clamp(1rem,3vw,1.8rem);
  background:var(--ink-2);
  border:2px solid rgba(135,255,113,.4);
  scroll-margin-top:160px;
}

main > section:not(.hero):nth-of-type(even){
  background:#1b2114;
  border-color:rgba(255,206,92,.5);
}

main > section:not(.hero)::after{
  content:"";
  position:absolute;
  right:-2px;
  top:-2px;
  width:22px;
  height:22px;
  background:var(--neon);
  clip-path:polygon(100% 0,100% 100%,0 0);
}

main > section:not(.hero):nth-of-type(even)::after{background:var(--butter)}

main h2{
  margin:0 0 .9rem;
  font-family:"Russo One","Chakra Petch",system-ui,"PingFang SC",sans-serif;
  font-size:clamp(1.28rem,4.4vw,1.8rem);
  line-height:1.28;
  color:var(--neon);
  font-weight:400;
  letter-spacing:.01em;
}

main h2 span{background:linear-gradient(transparent 64%,rgba(255,206,92,.5) 64%)}

main h3{
  margin:1.4rem 0 .55rem;
  font-family:"Russo One","Chakra Petch",system-ui,"PingFang SC",sans-serif;
  font-size:1.13rem;
  font-weight:400;
  line-height:1.35;
  color:var(--butter);
}

main h3 span{border-bottom:3px solid rgba(135,255,113,.6)}

main p{margin:0 0 1rem}

main ul,
main ol{margin:0 0 1rem;padding-left:1.15rem}

main li{margin:.3rem 0}
main li::marker{color:var(--neon)}

main a{color:var(--butter);text-decoration:underline dotted;text-underline-offset:3px}
main a:hover{color:var(--neon)}

main strong{color:var(--neon)}

main blockquote{
  margin:1.2rem 0;
  padding:.6rem 1rem;
  border-left:6px solid var(--butter);
  background:rgba(255,206,92,.1);
}

main blockquote p:last-child{margin-bottom:0}

main figure{margin:1rem 0}
main img{display:block;max-width:100%;height:auto}

main table{width:100%;border-collapse:collapse;font-size:.95rem}
main th,
main td{border:2px solid rgba(135,255,113,.35);padding:.45rem .6rem;text-align:left}
main th{background:rgba(135,255,113,.12);color:var(--neon)}

main code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  background:rgba(135,255,113,.16);
  padding:.08em .35em;
}

main hr{
  border:0;
  border-top:2px dashed rgba(255,206,92,.5);
  margin:1.4rem 0;
}

/* ---------- 右侧 aside ---------- */
.rail{
  order:2;
  align-self:start;
  position:sticky;
  top:150px;
  padding:1rem .85rem 1.1rem;
  border:3px dashed var(--butter);
  background-color:var(--ink-3);
  background-image:repeating-linear-gradient(45deg,rgba(135,255,113,.1) 0 7px,transparent 7px 14px);
}

.rail-title{
  margin:0 0 .7rem;
  font-family:"Russo One",system-ui,"PingFang SC",sans-serif;
  font-size:.98rem;
  font-weight:400;
  letter-spacing:.18em;
  color:var(--butter);
}

.rail-title span{display:inline-block;border-bottom:4px solid var(--neon);padding-bottom:2px}

.railnav ul{display:grid;gap:.15rem;margin:0;padding:0;list-style:none}

.railnav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 .55rem;
  border-bottom:2px dotted rgba(135,255,113,.32);
  color:var(--paper);
  text-decoration:none;
  font-size:.94rem;
  transition:background .18s ease,color .18s ease,padding-left .18s ease;
}

.railnav a:hover{
  background:var(--neon);
  color:var(--ink);
  padding-left:.95rem;
}

/* ---------- 页脚三栏 ---------- */
.foot{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1.3rem;
  padding:2.2rem clamp(.9rem,3vw,2rem) 1.2rem;
  background:#0d150c;
  border-top:5px solid var(--neon);
}

.foot-col{min-width:0}

.foot-col h2{
  margin:0 0 .7rem;
  font-family:"Russo One",system-ui,"PingFang SC",sans-serif;
  font-size:.98rem;
  font-weight:400;
  letter-spacing:.16em;
  color:var(--neon);
}

.foot-col h2 span{display:inline-block;border-bottom:4px solid var(--butter);padding-bottom:2px}

.foot-brand{margin:0 0 .35rem;color:var(--butter);font-weight:700;overflow-wrap:anywhere}

.foot-desc{margin:0;font-size:.92rem;line-height:1.7;color:var(--dim)}

.foot-links{display:grid;margin:0;padding:0;list-style:none}

.foot-links a{
  display:flex;
  align-items:center;
  min-height:40px;
  border-bottom:2px dotted rgba(255,206,92,.28);
  color:var(--paper);
  text-decoration:none;
  font-size:.92rem;
}

.foot-links a:hover{color:var(--neon)}

.subscribe{display:grid;gap:.5rem}

.subscribe input{
  min-height:44px;
  padding:0 .7rem;
  border:2px solid var(--neon);
  background:#0a120a;
  color:var(--paper);
  font:inherit;
  font-size:.92rem;
}

.subscribe input::placeholder{color:#a9c6a3}

.subscribe button{
  min-height:44px;
  border:2px solid var(--butter);
  background:var(--butter);
  color:var(--ink);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:transform .16s ease;
}

.subscribe button:hover{transform:rotate(-2deg)}

.foot-bar{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:.4rem 1rem;
  margin-top:.4rem;
  padding-top:.9rem;
  border-top:2px dashed rgba(135,255,113,.35);
}

.foot-bar p{margin:0;font-size:.88rem;color:#9dba97;overflow-wrap:anywhere}

.foot-mini{display:flex;flex-wrap:wrap;gap:0 1rem;margin:0;padding:0;list-style:none}

.foot-mini a{
  display:flex;
  align-items:center;
  min-height:40px;
  color:var(--butter);
  text-decoration:none;
  font-size:.88rem;
}

.foot-mini a:hover{color:var(--neon)}

/* ---------- 滚动显现 ---------- */
.reveal{opacity:0;transform:translateY(14px);transition:opacity .5s ease,transform .5s ease}
.reveal.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  *{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}
}

/* ---------- 断点 ---------- */
@media (max-width:920px){
  .shell{grid-template-columns:minmax(0,1fr)}
  .rail{position:static;margin-top:1.2rem;order:3}
  .hero{min-height:auto}
}

@media (max-width:700px){
  body{font-size:16px}

  .masthead{grid-template-columns:1fr;gap:.5rem}

  .burger{display:inline-flex}

  .searchbar{grid-column:1;width:100%}
  .searchbar input{flex:1 1 auto;width:auto;min-width:0}

  .js .menubar{display:none}
  .js .menubar.open{display:block}

  .menubar ul{flex-direction:column;gap:0}
  .menubar li:not(:first-child){border-left:0;border-top:2px dotted rgba(255,206,92,.4)}
  .menubar li:nth-child(2),
  .menubar li:nth-child(4),
  .menubar li:nth-child(6){margin-left:0}
  .menubar a{width:100%;padding:0 .6rem;font-size:1rem}
  .menubar a:hover{transform:none}

  .hero{padding-top:1.5rem}
  .hero h1{text-shadow:2px 2px 0 rgba(25,38,23,.9)}
  .shape-b{border-left-width:34px;border-right-width:34px;border-bottom-width:52px}
  .shape-c{width:70px}

  .foot{grid-template-columns:1fr}
  .foot-bar{justify-content:flex-start}
}

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