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

:root{
  --ink:#192617;
  --ink-2:#21331f;
  --lime:#87ff71;
  --gold:#ffce5c;
  --line:rgba(135,255,113,.34);
  --txt:#e6f6df;
  --txt-soft:#c6ddbe;
  --round:'Varela Round','Nunito Sans',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  --body:'Nunito Sans',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
}

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

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

body{
  margin:0;
  font-family:var(--body);
  font-size:17px;
  line-height:1.78;
  color:var(--txt);
  background-color:var(--ink);
  background-image:
    radial-gradient(rgba(135,255,113,.15) 1px, transparent 1.7px),
    repeating-linear-gradient(48deg, rgba(255,206,92,.045) 0 14px, transparent 14px 28px);
  background-size:28px 28px, 100% 100%;
  overflow-x:hidden;
}

img{max-width:100%;height:auto}
a{color:var(--gold)}

/* ---------- 顶栏 ---------- */
.topbar{
  position:fixed;
  inset:0 0 auto 0;
  z-index:60;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px clamp(14px,4vw,40px);
  background:rgba(20,31,18,.86);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-bottom:2px dashed var(--line);
}

.brandmark{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  flex:none;
  background:var(--lime);
  transform:rotate(-8deg);
  box-shadow:4px 4px 0 var(--gold);
}
.brandmark svg{width:26px;height:26px;display:block}

.nav{position:relative;display:flex;align-items:center}

.nav summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 22px;
  border-radius:999px;
  background:var(--gold);
  color:var(--ink);
  font-family:var(--round);
  font-weight:700;
  font-size:16px;
  letter-spacing:.06em;
  user-select:none;
}
.nav summary::-webkit-details-marker{display:none}
.nav summary::after{
  content:"";
  width:9px;height:9px;
  margin-left:10px;
  border-right:2.5px solid var(--ink);
  border-bottom:2.5px solid var(--ink);
  transform:rotate(45deg) translateY(-2px);
}
.nav[open] summary::after{transform:rotate(-135deg) translateY(-2px)}
.nav summary:focus-visible{outline:3px solid var(--lime);outline-offset:3px}

.nav > menu{
  display:none;
  margin:0;
  padding:0;
  list-style:none;
  gap:8px;
}
.nav[open] > menu{display:flex}

.nav menu a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 16px;
  border-radius:999px;
  background:rgba(135,255,113,.13);
  color:#d9ffd0;
  text-decoration:none;
  font-size:16px;
  line-height:1.2;
  font-weight:600;
  white-space:nowrap;
}
.nav menu li:nth-child(even) a{background:rgba(255,206,92,.16);color:#ffe9b0}
.nav menu a:hover,.nav menu a:focus-visible{background:var(--lime);color:var(--ink)}

/* ---------- 主体骨架 ---------- */
main{
  max-width:1180px;
  margin:0 auto;
  padding:88px clamp(15px,4vw,40px) 64px;
  display:grid;
  grid-template-columns:228px minmax(0,1fr);
  gap:clamp(22px,4vw,50px);
  align-items:start;
}

/* ---------- 侧边索引 ---------- */
.rail{
  position:sticky;
  top:92px;
  order:-1;
  padding-left:15px;
  border-left:3px dashed var(--line);
}

.rail-h{
  margin:0 0 12px;
  font-family:var(--round);
  font-size:15px;
  font-weight:700;
  letter-spacing:.2em;
  color:var(--gold);
  line-height:1.4;
}
.rail-h > span{display:inline-block}
.rail .dot{
  display:inline-block;
  width:8px;height:8px;
  margin-left:8px;
  background:var(--lime);
  transform:rotate(45deg) translateY(-2px);
}

.rail ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.rail a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:40px;
  padding:4px 8px;
  color:var(--txt-soft);
  text-decoration:none;
  font-size:16px;
  line-height:1.35;
  border-radius:2px;
}
.rail a:hover,.rail a:focus-visible{background:rgba(135,255,113,.15);color:var(--lime)}
.rail .tri{
  flex:none;
  width:0;height:0;
  border-left:8px solid var(--lime);
  border-top:5px solid transparent;
  border-bottom:5px solid transparent;
  opacity:.8;
}

/* ---------- 正文 ---------- */
.doc{min-width:0}

.doc > section{
  max-width:76ch;
  padding:clamp(30px,5vw,54px) 0;
  scroll-margin-top:96px;
}
.doc > section + section{border-top:2px dashed rgba(135,255,113,.26)}

.doc h2{
  position:relative;
  display:inline-block;
  margin:0 0 16px;
  font-family:var(--round);
  font-size:clamp(1.5rem,3vw,2.05rem);
  line-height:1.3;
  color:#fff;
  font-weight:400;
}
.doc h2 > span{position:relative;z-index:1;display:inline-block}
.doc h2::after{
  content:"";
  position:absolute;
  left:-6px;
  bottom:3px;
  width:calc(100% + 12px);
  height:13px;
  background:var(--lime);
  opacity:.45;
  z-index:0;
  transform:skewX(-12deg);
}

.doc h3{
  margin:1.5em 0 .5em;
  font-family:var(--round);
  font-size:1.16rem;
  font-weight:400;
  color:var(--gold);
  letter-spacing:.01em;
}

.doc p{margin:0 0 1.05em}
.doc ul,.doc ol{margin:0 0 1.1em;padding-left:1.35em}
.doc li{margin:.42em 0}
.doc li::marker{color:var(--lime)}
.doc strong{color:var(--gold)}
.doc img{display:block;margin:18px 0;max-width:100%;height:auto}
.doc a{color:var(--gold);text-underline-offset:3px}
.doc a:hover{color:var(--lime)}
.doc blockquote{
  margin:20px 0;
  padding:14px 18px;
  border-left:6px solid var(--gold);
  background:rgba(255,206,92,.1);
}
.doc table{width:100%;border-collapse:collapse;margin:18px 0;font-size:16px}
.doc th,.doc td{padding:9px 11px;border-bottom:2px dotted rgba(135,255,113,.3);text-align:left}
.doc code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.92em;
  background:rgba(135,255,113,.14);
  padding:1px 5px;
}

/* ---------- 头图区 ---------- */
.doc > section.hero{
  max-width:none;
  padding:clamp(18px,4vh,48px) 0 clamp(24px,4vh,40px);
  min-height:calc(100svh - 96px);
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  border-top:0;
}

.hero-copy{
  position:relative;
  text-align:right;
  padding-right:clamp(0px,1.5vw,14px);
}

.badge{
  display:inline-block;
  transform:rotate(-6deg);
  background:var(--gold);
  color:var(--ink);
  font-family:var(--round);
  font-weight:700;
  font-size:15px;
  letter-spacing:.1em;
  padding:6px 15px;
  box-shadow:4px 4px 0 rgba(0,0,0,.35);
}

.hero h1{
  margin:16px 0 0;
  font-family:var(--round);
  font-weight:400;
  font-size:clamp(2rem,6.2vw,4.4rem);
  line-height:1.14;
  color:var(--lime);
  text-shadow:5px 5px 0 rgba(255,206,92,.24);
  letter-spacing:.01em;
}

.lede{
  margin:16px 0 0 auto;
  max-width:50ch;
  font-size:clamp(1rem,1.5vw,1.12rem);
  color:var(--txt-soft);
}

.hero-art{
  position:relative;
  margin-top:clamp(24px,5vh,54px);
  min-height:clamp(150px,30vh,300px);
  overflow:hidden;
  background:linear-gradient(155deg, rgba(135,255,113,.2), rgba(255,206,92,.13));
  clip-path:polygon(0 10%, 100% 0, 100% 100%, 0 90%);
  will-change:transform;
}
.hero-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.92;
  mix-blend-mode:luminosity;
}
.shape{position:absolute;display:block;pointer-events:none}
.shape-a{
  width:clamp(58px,9vw,96px);
  height:clamp(58px,9vw,96px);
  left:6%;
  bottom:16%;
  background:var(--lime);
  clip-path:polygon(50% 0, 100% 100%, 0 100%);
  transform:rotate(13deg);
}
.shape-b{
  width:clamp(76px,12vw,132px);
  height:clamp(76px,12vw,132px);
  right:7%;
  top:9%;
  border-radius:50%;
  border:7px dotted var(--gold);
}
.shape-c{
  width:clamp(46px,7vw,76px);
  height:clamp(46px,7vw,76px);
  right:34%;
  bottom:9%;
  background:var(--gold);
  transform:rotate(-15deg);
  mix-blend-mode:multiply;
}

/* ---------- 页脚 ---------- */
footer{
  max-width:1180px;
  margin:0 auto;
  padding:22px clamp(15px,4vw,40px) 46px;
  border-top:2px dashed var(--line);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 18px;
  color:var(--txt-soft);
}
footer p{margin:0;font-family:var(--round);font-size:16px;letter-spacing:.03em;color:var(--lime)}
footer small{font-size:15px;letter-spacing:.06em}

/* ---------- 动效 ---------- */
.js .reveal{opacity:0;transform:translateY(24px);transition:opacity .62s ease, transform .62s ease}
.js .reveal.in{opacity:1;transform:none}

/* ---------- 移动端 ---------- */
@media (max-width:899px){
  main{
    grid-template-columns:minmax(0,1fr);
    padding-top:82px;
  }
  .rail{
    position:static;
    order:2;
    margin-top:38px;
    padding:18px 0 0;
    border-left:0;
    border-top:3px dashed var(--line);
  }
  .rail ul{flex-direction:row;flex-wrap:wrap}
  .rail li{flex:1 1 44%}
  .rail a{min-height:44px}

  .nav > menu{
    position:absolute;
    right:0;
    top:calc(100% + 12px);
    flex-direction:column;
    gap:6px;
    min-width:min(78vw,308px);
    padding:12px;
    background:#1d2f1b;
    border:2px dashed rgba(135,255,113,.55);
    box-shadow:7px 7px 0 rgba(0,0,0,.4);
  }
  .nav menu a{width:100%;min-height:46px;justify-content:flex-start}

  .doc > section.hero{
    min-height:calc(100svh - 82px);
    padding-top:clamp(12px,2vh,26px);
  }
  .hero-copy{text-align:left}
  .lede{margin-left:0}
  .hero-art{clip-path:polygon(0 6%, 100% 0, 100% 100%, 0 94%)}
}

@media (min-width:900px){
  .doc > section.hero{max-width:none}
}

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

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