:root{
  --mint:#b4fde1;
  --sky:#add8e6;
  --ink:#172620;
  --paper:#f4fcf8;
  --white:#ffffff;
  --soft:rgba(23,38,32,.16);
  --sh-float:0 8px 0 rgba(23,38,32,.13), 0 16px 30px rgba(23,38,32,.10);
  --sh-press:inset -3px -3px 9px rgba(23,38,32,.13), inset 3px 3px 9px #ffffff;
  --ease:cubic-bezier(.34,1.56,.64,1);
}

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

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

body{
  margin:0;
  font-family:"Space Grotesk","Archivo",-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.7;
  color:var(--ink);
  background-color:var(--paper);
  background-image:
    radial-gradient(circle at 10% 4%, #ddf8ec 0, rgba(221,248,236,0) 44%),
    radial-gradient(circle at 92% 0%, #ddeff7 0, rgba(221,239,247,0) 40%);
  background-repeat:no-repeat;
}

a{color:inherit}

:focus-visible{
  outline:3px solid #0d7d5d;
  outline-offset:2px;
}

/* ---------- 左侧固定栏 ---------- */
.rail{
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  width:264px;
  z-index:20;
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:20px 16px;
  overflow-y:auto;
  background:linear-gradient(180deg,#e9fdf5 0%,#daf1f8 100%);
  border-right:4px solid var(--ink);
}

.mark{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:52px;
  padding:11px 14px;
  border:3px solid var(--ink);
  border-radius:18px;
  background:linear-gradient(150deg,var(--mint) 0%,#d9f6ff 100%);
  box-shadow:var(--sh-float),var(--sh-press);
  color:var(--ink);
  font-size:19px;
  font-weight:700;
  letter-spacing:-.01em;
  text-decoration:none;
  transition:transform .2s var(--ease),box-shadow .2s var(--ease);
}

.mark:hover,.mark:focus-visible{transform:translateY(-2px)}

.mark-glyph{font-size:19px;line-height:1}

.rail-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:9px;
}

.rail-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:9px 14px;
  border:3px solid var(--ink);
  border-radius:14px;
  background:var(--white);
  box-shadow:0 4px 0 rgba(23,38,32,.14);
  color:var(--ink);
  font-size:15px;
  font-weight:500;
  line-height:1.3;
  text-decoration:none;
  transition:transform .2s var(--ease),background .2s ease,box-shadow .2s var(--ease);
}

.rail-nav a:hover,.rail-nav a:focus-visible{
  background:var(--sky);
  transform:translate(-2px,-2px);
  box-shadow:0 6px 0 rgba(23,38,32,.16);
}

.rail-nav a:active{
  transform:translate(0,2px);
  box-shadow:0 1px 0 rgba(23,38,32,.16);
}

.rail-foot{
  margin-top:auto;
  display:grid;
  gap:8px;
  padding:12px;
  border:3px solid var(--ink);
  border-radius:16px;
  background:var(--mint);
  box-shadow:var(--sh-press);
}

.rail-host{
  font-size:13px;
  letter-spacing:.04em;
  line-height:1.4;
  opacity:.75;
  word-break:break-all;
}

.rail-contact{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:6px 12px;
  border:3px solid var(--ink);
  border-radius:12px;
  background:var(--white);
  box-shadow:0 3px 0 rgba(23,38,32,.16);
  font-size:15px;
  font-weight:600;
  text-decoration:none;
  transition:transform .2s var(--ease),background .2s ease;
}

.rail-contact:hover{background:var(--sky);transform:translateY(-2px)}

/* ---------- 主区 ---------- */
.stage{margin-left:264px}

.hero{
  position:relative;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:26px;
  min-height:45vh;
  padding:42px 40px 34px;
  text-align:right;
  border-bottom:4px solid var(--ink);
  background-color:#f8fdfa;
  background-image:radial-gradient(var(--soft) 1.5px,rgba(0,0,0,0) 1.5px);
  background-size:22px 22px;
}

.hero-copy{margin-left:auto;max-width:62ch}

h1{
  margin:0 0 14px;
  font-size:clamp(2rem,5.2vw,3.5rem);
  line-height:1.08;
  letter-spacing:-.03em;
  font-weight:700;
}

.hero-desc{
  margin:0 0 0 auto;
  max-width:50ch;
  font-size:17px;
  line-height:1.6;
  opacity:.86;
}

.hero-art{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(2,auto);
  gap:10px;
  margin:0;
}

.hero-art i{
  display:block;
  width:38px;
  height:38px;
  border:3px solid var(--ink);
  border-radius:14px;
  background:var(--mint);
  box-shadow:4px 4px 0 rgba(23,38,32,.16),inset -3px -3px 7px rgba(23,38,32,.12);
}

.hero-art i:nth-child(2){
  background:var(--sky);
  border-radius:50%;
  animation:pop 3.6s var(--ease) infinite;
}

.hero-art i:nth-child(3){
  background:var(--sky);
  animation:pop 3.6s .45s var(--ease) infinite;
}

.hero-art i:nth-child(4){
  background:var(--ink);
  animation:pop 3.6s .9s var(--ease) infinite;
}

@keyframes pop{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-9px)}
}

.body{
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:30px;
  padding:38px 40px 48px;
}

.side{
  position:sticky;
  top:20px;
  align-self:start;
  padding:16px;
  border:3px solid var(--ink);
  border-radius:20px;
  background:linear-gradient(160deg,#eafdf5 0%,#dff3fa 100%);
  box-shadow:var(--sh-float),var(--sh-press);
}

.side h2{
  margin:0;
  font-size:15px;
  font-weight:600;
  letter-spacing:.16em;
}

.side hr{margin:10px 0 12px}

.side-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:2px;
}

.side-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:6px 2px;
  border-bottom:2px dashed rgba(23,38,32,.18);
  color:var(--ink);
  font-size:15px;
  line-height:1.35;
  text-decoration:none;
  transition:color .2s ease,transform .2s var(--ease);
}

.side-list a:hover{color:#0a6b4f;transform:translateX(3px)}

.side-list li:last-child a{border-bottom:0}

/* ---------- 正文 ---------- */
.prose{min-width:0;max-width:74ch}

.prose div[id]{
  margin:0 0 26px;
  padding:24px 26px;
  border:3px solid var(--ink);
  border-radius:22px;
  background:var(--white);
  box-shadow:var(--sh-float),var(--sh-press);
  scroll-margin-top:20px;
}

.prose div[id]:last-child{margin-bottom:0}

.prose h2{
  margin:0 0 4px;
  font-size:clamp(1.3rem,2.3vw,1.68rem);
  line-height:1.25;
  letter-spacing:-.02em;
}

.prose h3{
  margin:22px 0 4px;
  font-size:1.08rem;
  line-height:1.35;
}

hr{
  height:4px;
  margin:10px 0 16px;
  border:0;
  border-radius:4px;
  background:linear-gradient(90deg,var(--mint) 0%,var(--sky) 100%);
}

.prose p{margin:0 0 13px}

.prose p:last-child{margin-bottom:0}

.prose a{
  color:#0a6b4f;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.prose a:hover{color:#0d8b63}

.prose ul,.prose ol{margin:0 0 14px;padding-left:1.25em}

.prose li{margin:0 0 7px}

.prose strong{font-weight:700}

.prose blockquote{
  margin:0 0 14px;
  padding:14px 18px;
  border:3px solid var(--ink);
  border-radius:16px;
  background:linear-gradient(150deg,#effdf7,#e3f4fb);
  box-shadow:var(--sh-press);
}

.prose blockquote p:last-child{margin-bottom:0}

.prose img{
  max-width:100%;
  height:auto;
  border:3px solid var(--ink);
  border-radius:16px;
}

.prose figure{margin:0 0 14px}

.prose figcaption{font-size:14px;opacity:.75}

.prose code{
  padding:2px 6px;
  border:2px solid var(--ink);
  border-radius:8px;
  background:var(--mint);
  font-size:.94em;
}

.prose pre{
  overflow-x:auto;
  padding:14px 16px;
  border:3px solid var(--ink);
  border-radius:16px;
  background:#eafaf3;
}

.prose pre code{padding:0;border:0;background:none}

.prose table{
  width:100%;
  margin:0 0 14px;
  border-collapse:collapse;
  font-size:15px;
}

.prose th,.prose td{
  padding:8px 10px;
  border:2px solid rgba(23,38,32,.35);
  text-align:left;
}

.prose th{background:var(--mint)}

/* ---------- 页脚 ---------- */
.foot{
  padding:42px 40px 30px;
  border-top:4px solid var(--ink);
  background:var(--ink);
  color:var(--mint);
}

.foot-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
  max-width:760px;
  margin:0 auto 28px;
}

.foot-cols dl{margin:0}

.foot-cols dt{
  margin-bottom:6px;
  font-size:13px;
  letter-spacing:.16em;
  opacity:.6;
}

.foot-cols dd{margin:0}

.foot-cols a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  border-bottom:2px solid transparent;
  color:var(--mint);
  font-size:15px;
  text-decoration:none;
  transition:border-color .2s ease,color .2s ease;
}

.foot-cols a:hover,.foot-cols a:focus-visible{
  border-bottom-color:var(--sky);
  color:var(--sky);
}

.foot-host{font-size:14px;opacity:.7;word-break:break-all}

.foot-brand{
  margin:0;
  text-align:center;
  font-size:clamp(2.4rem,10vw,6rem);
  font-weight:700;
  line-height:.92;
  letter-spacing:-.04em;
  color:#ddfcee;
  word-break:break-word;
}

.foot-copy{
  margin:16px 0 0;
  text-align:center;
  font-size:14px;
  opacity:.6;
}

.foot-host-row{
  margin:6px 0 0;
  text-align:center;
  font-size:13px;
  opacity:.45;
  word-break:break-all;
}

/* ---------- 滚动显现 ---------- */
.reveal{
  opacity:0;
  transform:translateY(16px);
}

.reveal.in{
  opacity:1;
  transform:none;
  transition:opacity .5s ease-out,transform .55s var(--ease);
}

/* ---------- 移动端 ---------- */
@media (max-width:900px){
  .rail{
    position:static;
    width:auto;
    bottom:auto;
    border-right:0;
    border-bottom:4px solid var(--ink);
    padding:14px 16px;
    gap:12px;
    overflow:visible;
  }

  .rail-nav ul{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding-bottom:6px;
    scrollbar-width:thin;
  }

  .rail-nav li{flex:0 0 auto}

  .rail-nav a{white-space:nowrap}

  .rail-nav a:hover{transform:none}

  .rail-foot{
    margin-top:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }

  .stage{margin-left:0}

  .hero{
    min-height:0;
    flex-direction:column;
    align-items:stretch;
    padding:26px 18px 24px;
    gap:18px;
  }

  .hero-copy{margin:0;max-width:none}

  .hero-desc{margin-left:auto}

  .hero-art{
    order:2;
    align-self:flex-end;
    grid-template-columns:repeat(4,auto);
  }

  .body{
    grid-template-columns:1fr;
    gap:18px;
    padding:20px 16px 34px;
  }

  .side{position:static}

  .prose div[id]{padding:20px 18px;scroll-margin-top:16px}

  .foot{padding:32px 16px 26px}

  .foot-cols{gap:12px;margin-bottom:24px}

  .foot-cols a{font-size:14px}
}

@media (max-width:420px){
  .foot-cols{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .foot-cols dt{letter-spacing:.08em}
}

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

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