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

:root{
  --mint:#b4fde1;
  --blue:#add8e6;
  --ink:#172620;
  --ink-soft:rgba(23,38,32,.62);
  --edge:rgba(23,38,32,.78);
  --paper:#f5fcf9;
  --card:#ffffff;
  --sh: inset -3px -3px 9px rgba(23,38,32,.10), inset 3px 3px 9px rgba(255,255,255,.9), 6px 8px 18px rgba(23,38,32,.16);
  --sh-sm: inset -2px -2px 6px rgba(23,38,32,.09), 3px 4px 10px rgba(23,38,32,.14);
  --bounce: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:'Nunito',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.78;
  color:var(--ink);
  overflow-x:hidden;
  background:
    radial-gradient(1100px 560px at 10% -12%, #dbfdf1 0%, rgba(219,253,241,0) 62%),
    radial-gradient(880px 520px at 94% 6%, #def1fb 0%, rgba(222,241,251,0) 58%),
    linear-gradient(180deg,#f7fdfa 0%, #edf8f4 46%, #f8fdfb 100%);
  background-attachment:fixed;
  min-height:100vh;
}

h1,h2,h3,h4,.brand,.foot-brand,.hero-cta,.totop{
  font-family:'Fredoka','Nunito',system-ui,'PingFang SC','Microsoft YaHei',sans-serif;
  font-weight:600;
  letter-spacing:.01em;
}

img{max-width:100%;height:auto;display:block}

a{color:#0b6b4f}

:focus-visible{outline:3px solid #4fd8ab;outline-offset:3px}

[class]{min-width:0}

/* ---------- 顶部悬浮泥条 ---------- */
.topbar{
  position:sticky;
  top:8px;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:calc(100% - 24px);
  max-width:1160px;
  margin:12px auto 0;
  padding:8px 12px;
  border:3px solid var(--edge);
  border-radius:26px;
  background:linear-gradient(150deg,#dbfff1 0%,#c9ecfb 68%,#eafff6 100%);
  box-shadow: inset -3px -3px 10px rgba(23,38,32,.13), inset 3px 3px 10px rgba(255,255,255,.9), 0 10px 24px rgba(23,38,32,.16);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:6px 14px;
  border-radius:16px;
  border:2px solid transparent;
  text-decoration:none;
  color:var(--ink);
  font-size:20px;
  white-space:nowrap;
  transition:transform .2s var(--bounce), background .2s ease-out, box-shadow .2s ease-out;
}
.brand:hover{background:#fff;border-color:var(--edge);box-shadow:var(--sh-sm);transform:translateY(-2px)}
.brand-logo{width:36px;height:36px;border-radius:12px;object-fit:cover;border:2px solid var(--edge)}
.brand-name{line-height:1}

/* ---------- 菜单 ---------- */
.menu{min-width:0}
.menu ul{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin:0;
  padding:0;
}
.menu a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 12px;
  border-radius:14px;
  border:2px solid transparent;
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  font-size:16px;
  white-space:nowrap;
  transition:transform .2s var(--bounce), background .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out;
}
.menu a:hover{
  background:#fff;
  border-color:var(--edge);
  box-shadow:var(--sh-sm);
  transform:translateY(-2px);
}
.menu a:active{transform:translateY(1px)}

.menu-b ul{justify-content:flex-end}

.drop{position:relative}
.menu .sub{
  display:block;
  position:absolute;
  top:calc(100% + 10px);
  left:50%;
  min-width:158px;
  padding:8px;
  border:3px solid var(--edge);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--sh);
  opacity:0;
  visibility:hidden;
  transform:translateX(-50%) translateY(-8px);
  transition:opacity .2s ease-out, transform .25s var(--bounce), visibility .2s;
}
.menu .sub li{display:block}
.menu .sub a{width:100%;justify-content:flex-start}
.drop:hover .sub,
.drop:focus-within .sub{
  opacity:1;
  visibility:visible;
  transform:translateX(-50%) translateY(0);
}

/* ---------- 版式 ---------- */
.layout{
  display:grid;
  grid-template-columns:224px minmax(0,1fr);
  gap:26px;
  align-items:start;
  max-width:1160px;
  margin:24px auto 0;
  padding:0 12px;
}

.rail{
  position:sticky;
  top:96px;
  padding:14px;
  border:3px solid var(--edge);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--sh-sm);
}
.rail-title{
  margin:0 0 10px;
  font-size:17px;
  padding-bottom:8px;
  border-bottom:3px dashed rgba(23,38,32,.2);
}
.toc ul{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.toc a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:7px 10px;
  border-radius:12px;
  text-decoration:none;
  color:var(--ink);
  font-weight:600;
  font-size:16px;
  line-height:1.35;
  transition:background .18s ease-out, transform .2s var(--bounce), box-shadow .18s ease-out;
}
.toc a:hover{background:var(--mint);transform:translateX(3px);box-shadow:var(--sh-sm)}

/* ---------- 首屏 ---------- */
.hero{
  display:flex;
  align-items:center;
  gap:38px;
  min-height:100vh;
  padding:52px 0 44px;
  position:relative;
}
.hero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:14px;
  height:14px;
  border-radius:14px;
  background:linear-gradient(90deg,var(--mint),var(--blue));
  transform:skewX(-14deg);
  opacity:.85;
}
.hero-copy{flex:1 1 54%;order:2;text-align:right}
.hero-copy h1{
  margin:0;
  font-size:clamp(2rem,4.6vw,3.3rem);
  line-height:1.16;
  text-shadow:3px 3px 0 rgba(180,253,225,.85);
  overflow-wrap:anywhere;
}
.lead{
  margin:18px 0 0;
  font-size:18px;
  line-height:1.75;
  color:rgba(23,38,32,.78);
  max-width:46ch;
  margin-left:auto;
}
.hero-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:50px;
  margin-top:22px;
  padding:10px 26px;
  border:3px solid var(--edge);
  border-radius:20px;
  background:linear-gradient(160deg,#c4ffe9,#8ff0d3);
  color:var(--ink);
  font-size:17px;
  text-decoration:none;
  box-shadow:var(--sh-sm);
  transition:transform .18s var(--bounce), box-shadow .18s ease-out, background .18s ease-out;
}
.hero-cta:hover{transform:translateY(-3px);box-shadow:var(--sh);background:linear-gradient(160deg,#d6fff2,#a3f6dc)}
.hero-cta:active{transform:translateY(2px);box-shadow:inset -2px -2px 6px rgba(23,38,32,.18), inset 3px 3px 8px rgba(255,255,255,.9)}

.hero-art{
  flex:1 1 46%;
  order:1;
  margin:0;
  aspect-ratio:4 / 3;
  border:4px solid var(--edge);
  border-radius:30px;
  overflow:hidden;
  background:linear-gradient(160deg,#c8fdec,#a9dcee);
  box-shadow: inset -5px -5px 16px rgba(23,38,32,.14), inset 5px 5px 16px rgba(255,255,255,.85), 8px 12px 26px rgba(23,38,32,.2);
  display:grid;
  place-items:center;
}
.hero-img{width:100%;height:100%;object-fit:cover}

/* ---------- 引言条 ---------- */
.intro{
  padding:4px 0 20px;
  margin-bottom:24px;
  border-bottom:3px dashed rgba(23,38,32,.22);
}
.intro h2{
  margin:0 0 6px;
  font-size:clamp(1.55rem,3vw,2.1rem);
  line-height:1.25;
}
.subtitle{
  margin:0;
  font-size:17px;
  color:var(--ink-soft);
  letter-spacing:.02em;
}

/* ---------- 正文区块 ---------- */
article > div:not(.hero):not(.intro){
  margin:0 0 22px;
  padding:24px 24px 10px;
  background:var(--card);
  border:3px solid var(--edge);
  border-radius:24px;
  box-shadow:var(--sh-sm);
  transition:box-shadow .25s ease-out, transform .25s var(--bounce);
}
article > div:not(.hero):not(.intro):hover{
  box-shadow:var(--sh);
  transform:translateY(-2px);
}

article div[id]{scroll-margin-top:104px}

article h2{
  position:relative;
  margin:4px 0 14px;
  padding-bottom:12px;
  font-size:clamp(1.35rem,2.6vw,1.7rem);
  line-height:1.3;
}
article h2::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:72px;
  height:9px;
  border-radius:9px;
  background:linear-gradient(90deg,var(--mint),var(--blue));
  box-shadow:0 2px 4px rgba(23,38,32,.12);
}

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

article p{margin:0 0 14px}
article ul,article ol{margin:0 0 16px;padding-left:1.3em}
article li{margin:0 0 8px;line-height:1.75}
article a{color:#0b6b4f;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
article a:hover{background:var(--mint);border-radius:6px}

article blockquote{
  margin:0 0 16px;
  padding:14px 18px;
  border:3px solid rgba(23,38,32,.35);
  border-left:10px solid var(--blue);
  border-radius:16px;
  background:linear-gradient(160deg,#f4fffb,#eaf8ff);
  color:rgba(23,38,32,.86);
}
article blockquote p:last-child{margin:0}

article img{
  border:3px solid var(--edge);
  border-radius:20px;
  box-shadow:var(--sh-sm);
  margin:6px 0 16px;
}

article figure{margin:0 0 16px}
article figcaption{font-size:16px;color:var(--ink-soft);margin-top:6px}

article table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:0 0 18px;
  font-size:16px;
  border:3px solid var(--edge);
  border-radius:16px;
  overflow:hidden;
}
article th,article td{padding:10px 12px;text-align:left;border-bottom:2px solid rgba(23,38,32,.14)}
article thead th{background:linear-gradient(160deg,#ddfff2,#d9eefb)}
article tr:last-child td{border-bottom:0}

article code{
  font-size:15px;
  padding:2px 6px;
  border-radius:8px;
  background:#eef7f3;
}

/* ---------- 页脚 ---------- */
.foot{
  max-width:1160px;
  margin:44px auto 0;
  padding:30px 16px 26px;
  border-top:4px solid var(--edge);
}
.foot-brand{
  margin:0 0 22px;
  font-size:clamp(2.2rem,8.5vw,4.8rem);
  line-height:1;
  color:#183a2b;
  letter-spacing:.02em;
  text-shadow:4px 4px 0 rgba(180,253,225,.95), 8px 8px 0 rgba(173,216,230,.7);
  overflow-wrap:anywhere;
}
.foot-cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.foot-cols dl{
  margin:0;
  padding:14px 16px;
  border:3px solid var(--edge);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--sh-sm);
}
.foot-cols dt{
  font-weight:700;
  font-size:16px;
  margin:0 0 8px;
  padding-bottom:8px;
  border-bottom:2px dashed rgba(23,38,32,.2);
}
.foot-cols dd{margin:0;font-size:16px}
.foot-cols dd a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--ink);
  text-decoration:none;
  font-weight:600;
  transition:color .18s ease-out, transform .2s var(--bounce);
}
.foot-cols dd a:hover{color:#0b6b4f;transform:translateX(3px)}
.copy{
  margin:24px 0 0;
  font-size:16px;
  color:var(--ink-soft);
}

/* ---------- 回顶 ---------- */
.totop{
  position:fixed;
  right:14px;
  bottom:14px;
  z-index:50;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:8px 16px;
  border:3px solid var(--edge);
  border-radius:18px;
  background:#fff;
  color:var(--ink);
  font-size:16px;
  text-decoration:none;
  box-shadow:var(--sh-sm);
  transition:transform .18s var(--bounce), background .18s ease-out;
}
.totop:hover{background:var(--mint);transform:translateY(-3px)}
.totop:active{transform:translateY(1px)}

/* ---------- 出现动效 ---------- */
.js .reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .55s ease-out, transform .6s var(--bounce);
}
.js .reveal.in{opacity:1;transform:none}

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

/* ---------- 自适应 ---------- */
@media (max-width:900px){
  .layout{grid-template-columns:1fr;gap:0;margin-top:18px}
  .rail{position:static;order:2;margin-top:22px}
  .rail-title{font-size:17px}
  .toc ul{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}
  .hero{
    flex-direction:column;
    align-items:stretch;
    gap:24px;
    min-height:0;
    padding:26px 0 34px;
  }
  .hero-copy{order:1;text-align:left}
  .hero-copy h1{font-size:clamp(1.85rem,8vw,2.6rem)}
  .lead{margin-left:0;font-size:17px}
  .hero-art{order:2;aspect-ratio:16 / 11}
  .hero::after{bottom:6px;height:10px}
  article div[id]{scroll-margin-top:20px}
}

@media (max-width:760px){
  .topbar{position:static;flex-wrap:wrap;justify-content:center;padding:10px}
  .brand{order:-1;flex:0 0 100%;justify-content:center}
  .menu{flex:1 1 100%}
  .menu ul{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;justify-content:flex-start}
  .menu-b ul{justify-content:flex-start}
  .menu ul::-webkit-scrollbar{display:none}
  .menu .sub{display:none}
  .foot-cols{grid-template-columns:1fr}
  .foot-brand{text-shadow:3px 3px 0 rgba(180,253,225,.95), 6px 6px 0 rgba(173,216,230,.7)}
  article > div:not(.hero):not(.intro){padding:20px 16px 8px;border-radius:20px}
  .totop{right:10px;bottom:10px}
}

@media (max-width:420px){
  .toc ul{grid-template-columns:1fr}
  .hero-cta{width:100%}
}

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