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

:root{
  --sky:#3bb1ff;
  --coral:#ff5252;
  --ink:#000000;
  --paper:#fdfaf3;
  --sky-pale:#e7f5ff;
  --coral-pale:#ffe6e6;
  --white:#ffffff;
  --bw:3px;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:Montserrat,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.75;
  overflow-x:hidden;
}

h1,h2,h3,.brand,.cta{
  font-family:"Cormorant","Songti SC","Source Han Serif SC",Georgia,serif;
  font-weight:700;
  line-height:1.05;
  letter-spacing:.01em;
}

p{margin:0}

a{color:inherit}

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

:focus-visible{outline:3px solid var(--coral);outline-offset:3px}

/* ===== 顶部：品牌居中，菜单分列两侧 ===== */
.top{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--white);
  border-bottom:var(--bw) solid var(--ink);
}

.nav{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:.6rem;
  max-width:1240px;
  margin:0 auto;
  padding:.55rem .9rem;
}

.side{
  display:flex;
  gap:.45rem;
  align-items:center;
  margin:0;
}
.side[data-side="r"]{justify-content:flex-end}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.3rem .85rem;
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  background:var(--white);
  box-shadow:4px 4px 0 var(--ink);
  font-size:16px;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
  transition:transform .12s ease,box-shadow .12s ease,background .12s ease;
}
.pill:hover{background:var(--sky);transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink)}
.pill:active{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--ink)}

.brand{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:.15rem .95rem;
  background:var(--sky);
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  box-shadow:4px 4px 0 var(--ink);
  font-size:clamp(1.1rem,2.3vw,1.6rem);
  text-decoration:none;
  text-align:center;
  white-space:nowrap;
}
.brand img{height:34px;width:auto;object-fit:contain}

/* 二级粘性锚点条 */
.rail{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.7rem;
  padding:.4rem .9rem;
  background:var(--sky);
  border-top:var(--bw) solid var(--ink);
  overflow-x:auto;
}
.rail p{display:flex;gap:.4rem;margin:0}
.rail a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.15rem .7rem;
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  background:var(--white);
  box-shadow:3px 3px 0 var(--ink);
  font-size:16px;
  text-decoration:none;
  white-space:nowrap;
}
.rail a:hover{background:var(--coral);color:var(--white)}

.find{display:flex;gap:.4rem;align-items:center;flex:0 0 auto}
.find input{
  min-height:40px;
  width:132px;
  padding:.15rem .8rem;
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  background:var(--white);
  font:inherit;
  font-size:16px;
}
.find button{
  min-height:40px;
  padding:.15rem .9rem;
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  background:var(--coral);
  color:var(--white);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  box-shadow:3px 3px 0 var(--ink);
}
.find button:hover{background:var(--ink);color:var(--white)}

/* ===== 首屏 ===== */
.main{display:block}

.hero{
  position:relative;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:1.4rem;
  min-height:100vh;
  min-height:100svh;
  padding:120px 1.1rem 130px;
  text-align:center;
  background:var(--sky);
  border-bottom:5px solid var(--ink);
  overflow:hidden;
}

.hero h1{
  margin:0;
  max-width:18ch;
  font-size:clamp(2.6rem,10vw,7.4rem);
  text-shadow:7px 7px 0 var(--coral);
  word-break:break-word;
}

.lede{
  max-width:46ch;
  padding:1rem 1.2rem;
  background:var(--white);
  border:var(--bw) solid var(--ink);
  border-radius:18px;
  box-shadow:7px 7px 0 var(--ink);
  font-size:1.02rem;
  text-align:center;
}

.band{position:absolute;left:0;right:0;bottom:0;height:66px;margin:0;display:flex}
.band span{flex:1}
.band span:nth-child(1){background:var(--coral);clip-path:polygon(0 0,100% 100%,0 100%)}
.band span:nth-child(2){background:var(--ink);clip-path:polygon(0 100%,100% 0,100% 100%)}
.band span:nth-child(3){background:var(--white);clip-path:polygon(20% 100%,100% 40%,100% 100%)}

/* ===== 分栏：正文 + 右侧索引 ===== */
.split{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:1.8rem;
  align-items:start;
  max-width:1240px;
  margin:0 auto;
  padding:2.6rem 1.1rem 3.6rem;
}

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

.prose > article{
  background:var(--white);
  border-radius:18px;
  box-shadow:6px 6px 0 var(--ink);
  padding:1.6rem 1.3rem;
  scroll-margin-top:190px;
}
.prose > article:nth-child(even){background:var(--sky-pale)}
.prose > article + article{margin-top:1.6rem}

.prose h2{font-size:clamp(1.6rem,3.4vw,2.35rem);margin:0 0 .7rem}
.prose h3{font-size:clamp(1.25rem,2.4vw,1.6rem);margin:1.4rem 0 .5rem}
.prose p{margin:0 0 1rem}
.prose p:last-child{margin-bottom:0}
.prose ul,.prose ol{margin:0 0 1rem;padding-left:1.25rem}
.prose li{margin:.35rem 0}
.prose a{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-thickness:3px;
  text-decoration-color:var(--coral);
  text-underline-offset:3px;
}
.prose a:hover{background:var(--coral);color:var(--white);text-decoration-color:var(--ink)}
.prose blockquote{
  margin:1.2rem 0;
  padding:.85rem 1rem;
  background:var(--coral-pale);
  border-left:6px solid var(--coral);
  border-radius:0 14px 14px 0;
}
.prose strong{font-weight:700}
.prose img{
  margin:1rem 0;
  border:var(--bw) solid var(--ink);
  border-radius:14px;
}
.prose small{
  display:block;
  width:fit-content;
  margin:0 0 .4rem;
  padding:.1rem .6rem;
  background:var(--coral);
  color:var(--white);
  border-radius:999px;
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.14em;
}
.prose hr{border:0;border-top:var(--bw) solid var(--ink);margin:1.4rem 0}

/* 右侧索引 */
.side{
  position:sticky;
  top:190px;
  padding:1.1rem;
  background:var(--ink);
  color:var(--white);
  border-radius:18px;
  box-shadow:6px 6px 0 var(--coral);
}
.side .kick{
  display:block;
  margin:0 0 .35rem;
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.2em;
  color:var(--sky);
}
.side-t{margin:0 0 .9rem;font-size:1.6rem;color:var(--white)}
.toc{list-style:none;margin:0;padding:0;display:grid;gap:.45rem}
.toc a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:.25rem .8rem;
  border:2px solid var(--white);
  border-radius:999px;
  color:var(--white);
  text-decoration:none;
  font-size:16px;
}
.toc a:hover{background:var(--coral);border-color:var(--coral)}

/* ===== 页脚 ===== */
.foot{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1.2rem;
  padding:2.6rem 1.1rem 2rem;
  background:var(--ink);
  color:var(--white);
}
.foot .cta{
  grid-column:1/-1;
  margin:0;
  padding:1.5rem 1.2rem;
  background:var(--coral);
  border-radius:18px;
  box-shadow:8px 8px 0 var(--white);
}
.foot .cta a{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  color:var(--ink);
  font-family:"Cormorant","Songti SC",Georgia,serif;
  font-size:clamp(1.7rem,5.5vw,3.2rem);
  font-weight:700;
  text-decoration:none;
}
.foot .cta a:hover{text-decoration:underline;text-decoration-thickness:5px;text-underline-offset:6px}
.fcol{margin:0;display:grid;gap:.1rem;align-content:start}
.fcol a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  color:var(--white);
  font-size:16px;
  text-decoration:none;
  border-bottom:2px solid rgba(255,255,255,.22);
}
.fcol a:hover{color:var(--sky);border-color:var(--sky)}
.foot small{
  grid-column:1/-1;
  text-align:center;
  font-size:.9rem;
  color:rgba(255,255,255,.72);
}

/* ===== 回到顶部 ===== */
.totop{
  position:fixed;
  right:1rem;
  bottom:1rem;
  z-index:60;
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:.35rem 1rem;
  background:var(--sky);
  border:var(--bw) solid var(--ink);
  border-radius:999px;
  box-shadow:4px 4px 0 var(--ink);
  font-size:16px;
  font-weight:700;
  text-decoration:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease,visibility .2s ease;
}
.totop.is-on{opacity:1;visibility:visible}
.totop:hover{background:var(--coral);color:var(--white)}

/* ===== 滚动显现 ===== */
html.js [data-reveal]{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .5s ease,transform .5s ease;
}
html.js [data-reveal].is-in{opacity:1;transform:none}

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

/* ===== 窄屏 ===== */
@media (max-width:880px){
  body{font-size:16px}

  .nav{
    grid-template-columns:1fr;
    gap:.4rem;
    padding:.55rem .7rem;
  }
  .brand{order:-1;justify-self:center}
  .side{
    overflow-x:auto;
    padding-bottom:.2rem;
    justify-content:flex-start;
  }
  .side[data-side="r"]{justify-content:flex-start}

  .rail{padding:.4rem .7rem}
  .find input{width:104px}

  .hero{padding:64px 1rem 110px;gap:1.1rem}
  .hero h1{text-shadow:5px 5px 0 var(--coral)}
  .lede{font-size:1rem;box-shadow:5px 5px 0 var(--ink)}

  .split{
    grid-template-columns:1fr;
    gap:1.4rem;
    padding:1.8rem .9rem 2.6rem;
  }
  .prose > article{padding:1.3rem 1rem;scroll-margin-top:230px;box-shadow:5px 5px 0 var(--ink)}
  .side{position:static;box-shadow:5px 5px 0 var(--coral)}

  .foot{grid-template-columns:repeat(2,minmax(0,1fr));padding:2rem .9rem 1.6rem}
  .foot .cta{box-shadow:5px 5px 0 var(--white)}
}

@media (max-width:420px){
  .hero h1{font-size:clamp(2.2rem,12vw,3rem)}
}

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