:root{
  --mint:#b4fde1;
  --blue:#add8e6;
  --ink:#172620;
  --paper:#f4fdf9;
  --line:rgba(23,38,32,.18);
  --soft:inset -3px -4px 10px rgba(23,38,32,.07), inset 3px 4px 10px rgba(255,255,255,.85);
  --pop:6px 7px 0 rgba(23,38,32,.14), 10px 14px 26px rgba(23,38,32,.12);
  --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;
  overflow-x:hidden;
  font-family:"Nunito Sans","Varela Round",system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.8;
  color:var(--ink);
  background:
    radial-gradient(120% 70% at 100% 0%, #d8f4ff 0%, rgba(216,244,255,0) 58%),
    radial-gradient(90% 60% at 0% 100%, #b4fde1 0%, rgba(180,253,225,0) 62%),
    linear-gradient(172deg,#f0fdf8 0%,#eaf7ff 54%,#f3fdf7 100%);
  background-attachment:fixed;
  min-height:100vh;
}

a:focus-visible,button:focus-visible{
  outline:3px solid #0d3b2e;
  outline-offset:3px;
  border-radius:14px;
}

.shell{
  display:grid;
  grid-template-columns:264px minmax(0,1fr);
  gap:34px;
  align-items:start;
  max-width:1160px;
  margin:0 auto;
  padding:26px 24px 40px;
}

/* ---------- 左侧竖排胶囊导航 ---------- */
.rail{
  position:sticky;
  top:24px;
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px 14px;
  border:3px solid var(--ink);
  border-radius:30px;
  background:linear-gradient(165deg,rgba(255,255,255,.92),rgba(180,253,225,.55));
  box-shadow:var(--soft),5px 7px 0 rgba(23,38,32,.18);
  backdrop-filter:blur(6px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:7px 12px;
  border:3px solid var(--ink);
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff,#eefdf7);
  box-shadow:var(--soft),3px 4px 0 rgba(23,38,32,.18);
  color:var(--ink);
  text-decoration:none;
  font-family:"Varela Round",inherit;
  font-size:17px;
  line-height:1.3;
}

.mark{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:3px solid var(--ink);
  border-radius:11px;
  background:var(--blue);
  font-size:14px;
  line-height:1;
}

.rail-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
}

.rail-nav ul{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
}

.rail-nav li{min-width:0}

.rail-nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 16px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:linear-gradient(180deg,#ffffff,#e8fdf5);
  box-shadow:var(--soft),3px 4px 0 rgba(23,38,32,.16);
  color:var(--ink);
  text-decoration:none;
  font-size:16px;
  font-weight:600;
  transition:transform .2s ease-out,box-shadow .2s ease-out,background .2s ease-out;
}

.rail-nav a:hover{background:linear-gradient(180deg,#ffffff,var(--mint))}

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

.rail-nav .cta{
  justify-content:center;
  background:linear-gradient(180deg,var(--mint),#94e4ff);
  font-family:"Varela Round",inherit;
  letter-spacing:.04em;
}

/* ---------- 正文 ---------- */
main{min-width:0}

section{display:grid;gap:22px}

section > div{
  scroll-margin-top:26px;
  padding:26px 26px 28px;
  border:3px solid var(--line);
  border-radius:28px;
  background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(255,255,255,.56));
  box-shadow:var(--soft),var(--pop);
  backdrop-filter:blur(8px);
}

section > div.hero{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-end;
  gap:20px;
  min-height:45vh;
  padding:34px 28px;
  border-color:var(--ink);
  background:linear-gradient(150deg,#eafff8 0%,#d8f1ff 100%);
  text-align:right;
}

.hero h1{
  margin:0;
  font-family:"Varela Round",inherit;
  font-size:clamp(1.85rem,4.6vw,3rem);
  line-height:1.3;
  letter-spacing:.02em;
  text-wrap:balance;
  transform:translateY(calc(var(--py,0px) * -1));
}

.hero-media{
  width:100%;
  max-width:420px;
}

.hero-media img{
  display:block;
  width:100%;
  height:auto;
  border:3px solid var(--ink);
  border-radius:24px;
  box-shadow:var(--soft),5px 7px 0 rgba(23,38,32,.16);
}

.brief h2{margin:0 0 6px}

.subtitle{
  margin:0;
  font-size:1.03rem;
  color:#2b4a3e;
}

section h2{
  margin:0 0 10px;
  font-family:"Varela Round",inherit;
  font-size:clamp(1.3rem,2.4vw,1.6rem);
  line-height:1.42;
}

section h3{
  margin:22px 0 8px;
  font-size:1.15rem;
  line-height:1.5;
}

section p{margin:0 0 14px}
section p:last-child{margin-bottom:0}

section ul,section ol{
  margin:0 0 14px;
  padding-left:1.4em;
}

section li{margin-bottom:8px}

section a{
  color:#0d3b2e;
  text-decoration:underline;
  text-decoration-color:var(--blue);
  text-decoration-thickness:3px;
  text-underline-offset:3px;
}

section a:hover{
  background:var(--mint);
  border-radius:6px;
}

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

section blockquote{
  margin:0 0 16px;
  padding:14px 18px;
  border:3px dashed var(--line);
  border-radius:20px;
  background:rgba(173,216,230,.26);
}

section table{
  width:100%;
  border-collapse:collapse;
  font-size:16px;
}

section th,section td{
  border:2px solid var(--line);
  padding:10px 12px;
  text-align:left;
  vertical-align:top;
}

section th{background:rgba(180,253,225,.5)}

section code{
  padding:1px 5px;
  border-radius:6px;
  background:#eefdf7;
  font-size:.95em;
}

section hr{
  height:0;
  margin:22px 0;
  border:0;
  border-top:3px dashed var(--line);
}

/* ---------- 滚动进场 ---------- */
.js section > div{
  opacity:0;
  transform:translateY(20px);
  transition:opacity .5s var(--ease),transform .5s var(--ease);
}

.js section > div.in{
  opacity:1;
  transform:none;
}

/* ---------- 页脚 ---------- */
.foot{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px 22px;
  max-width:1160px;
  margin:0 auto;
  padding:26px 24px 44px;
  border-top:3px solid var(--line);
}

.foot-intro{
  margin:0;
  font-family:"Varela Round",inherit;
  font-size:1.02rem;
}

.foot-links{
  display:flex;
  flex-wrap:wrap;
  gap:6px 14px;
  margin:0;
}

.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 14px;
  border:3px solid var(--ink);
  border-radius:999px;
  background:#ffffff;
  box-shadow:var(--soft),2px 3px 0 rgba(23,38,32,.14);
  color:var(--ink);
  text-decoration:none;
  font-size:16px;
}

.foot-links a:hover{background:var(--mint)}

.foot-copy{
  grid-column:1/-1;
  text-align:center;
  font-size:16px;
  color:#345447;
}

/* ---------- 窄屏 ---------- */
@media (max-width:900px){
  .shell{
    grid-template-columns:minmax(0,1fr);
    gap:16px;
    padding:12px 12px 8px;
  }

  .rail{
    top:8px;
    z-index:20;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:10px;
    border-radius:22px;
    overflow:hidden;
  }

  .brand{
    flex:0 0 auto;
    min-height:44px;
    padding:6px 10px;
    font-size:16px;
  }

  .rail-nav{
    flex:1 1 auto;
    flex-direction:row;
    align-items:center;
    gap:10px;
    min-width:0;
  }

  .rail-nav ul{
    flex-direction:row;
    gap:8px;
    overflow-x:auto;
    padding:2px;
    scrollbar-width:none;
  }

  .rail-nav ul::-webkit-scrollbar{display:none}

  .rail-nav a{
    padding:8px 14px;
    white-space:nowrap;
  }

  .rail-nav .cta{flex:0 0 auto;white-space:nowrap}

  section > div{
    scroll-margin-top:124px;
    padding:20px 18px;
    border-radius:24px;
  }

  section > div.hero{
    min-height:auto;
    padding:26px 18px;
    gap:16px;
  }

  .foot{
    grid-template-columns:1fr;
    justify-items:center;
    gap:8px;
    padding:22px 16px 36px;
  }

  .foot-links{justify-content:center}
}

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

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