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

:root{
  --mint:#b4fde1;
  --sky:#add8e6;
  --ink:#172620;
  --paper:#f1fffa;
  --card:#ffffff;
  --r-sm:4px;
  --r-md:16px;
  --r-lg:24px;
  --sh:inset -3px -3px 9px rgba(23,38,32,.10), 5px 6px 0 rgba(23,38,32,.16);
  --sh-press:inset 4px 4px 9px rgba(23,38,32,.18), 2px 2px 0 rgba(23,38,32,.13);
}

*{box-sizing:border-box}

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

body{
  margin:0;
  overflow-x:hidden;
  font-family:'Noto Sans Thai',system-ui,-apple-system,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.8;
  color:var(--ink);
  background:
    radial-gradient(1100px 560px at 92% -8%, #e7fff7 0%, rgba(231,255,247,0) 62%),
    radial-gradient(860px 520px at -12% 24%, #e4f4fb 0%, rgba(228,244,251,0) 58%),
    var(--paper);
  min-height:100vh;
}

a{color:inherit}

.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

.is-hide{display:none}

/* 左上竖排控制柱 */
.top{
  position:fixed;
  inset:0 auto 0 0;
  width:246px;
  z-index:20;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:22px 18px 26px;
  background:linear-gradient(165deg,#dcfff3 0%,var(--mint) 48%,var(--sky) 100%);
  border:4px solid var(--ink);
  border-left:0;
  border-radius:0 30px 30px 0;
  box-shadow:inset -5px -4px 12px rgba(255,255,255,.75), 9px 0 0 rgba(23,38,32,.12);
  overflow-y:auto;
}

.mark{
  flex:0 0 auto;
  width:56px;height:56px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:3px solid var(--ink);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--sh);
  text-decoration:none;
  font-size:22px;
  font-weight:700;
  transition:transform .2s ease-out;
}

.mark img{display:block;width:100%;height:100%;object-fit:cover}
.mark:hover{transform:translateY(-2px) rotate(-3deg)}

.nav{flex:1 1 auto;min-height:0}

.nav p{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:0;
}

.nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 12px;
  border:3px solid var(--ink);
  border-radius:var(--r-md);
  background:#fff;
  box-shadow:var(--sh);
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  line-height:1.4;
  transition:transform .2s ease-out, box-shadow .2s ease-out, background .2s ease-out;
}

.nav a:hover{transform:translateY(-2px);background:var(--mint)}
.nav a:active{transform:translateY(2px);box-shadow:var(--sh-press)}

.search input{
  width:100%;
  min-height:44px;
  padding:10px 12px;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  border:3px solid var(--ink);
  border-radius:var(--r-md);
  background:#f6fffb;
  box-shadow:var(--sh-press);
}

.search input:focus{
  outline:3px solid #6fe3bd;
  outline-offset:2px;
}

/* 主区 */
main{
  margin-left:246px;
  max-width:1500px;
  padding:26px clamp(16px,3vw,40px) 40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 262px;
  gap:clamp(18px,2.4vw,32px);
  align-items:start;
}

article{min-width:0}

/* 顶部大图 */
.hero{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  min-height:45vh;
  border:4px solid var(--ink);
  border-radius:var(--r-lg);
  background:linear-gradient(120deg,var(--sky),var(--mint));
  box-shadow:var(--sh);
}

.hero-cover{
  position:absolute;
  inset:0;
  z-index:-2;
  width:100%;
  height:100%;
  object-fit:cover;
  transform:translate3d(0,var(--py,0px),0) scale(1.08);
  will-change:transform;
}

.hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(258deg,rgba(23,38,32,.84) 0%,rgba(23,38,32,.5) 46%,rgba(23,38,32,.16) 100%);
}

.hero-num{
  position:absolute;
  left:clamp(12px,2.6vw,30px);
  bottom:clamp(0px,1vw,8px);
  z-index:0;
  font-size:clamp(78px,16vw,200px);
  line-height:.78;
  font-weight:700;
  letter-spacing:-.05em;
  color:rgba(255,255,255,.22);
  pointer-events:none;
}

.hero-txt{
  position:relative;
  z-index:1;
  max-width:min(620px,94%);
  padding:clamp(16px,3vw,32px);
  text-align:right;
}

.hero h1{
  margin:0 0 8px;
  font-size:clamp(27px,3.8vw,44px);
  line-height:1.26;
  letter-spacing:.01em;
  color:#eefff8;
  text-shadow:0 2px 0 rgba(23,38,32,.4);
}

.hero p{
  margin:0;
  color:#d6fff0;
  font-size:16px;
}

/* 正文块 */
article>section:not(.hero),
article section section{
  background:var(--card);
  border:3px solid var(--ink);
  border-radius:var(--r-sm);
  padding:clamp(16px,2.2vw,26px);
  margin:24px 0;
  scroll-margin-top:24px;
}

article h2{
  margin:0 0 8px;
  font-size:clamp(21px,2.3vw,27px);
  line-height:1.35;
  letter-spacing:.01em;
}

article h3{
  margin:20px 0 6px;
  font-size:19px;
}

article hr{
  border:0;
  width:72px;
  height:5px;
  margin:0 0 16px;
  border-radius:99px;
  background:var(--ink);
}

article p{margin:0 0 14px}

article ul,
article ol{
  margin:0 0 16px;
  padding-left:1.35em;
}

article li{margin:6px 0}

article a{
  color:#0e6b50;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

article blockquote{
  margin:0 0 16px;
  padding:12px 16px;
  border-left:5px solid var(--mint);
  background:#f4fffb;
  border-radius:0 14px 14px 0;
}

article img{
  max-width:100%;
  height:auto;
  border-radius:14px;
}

/* 右侧栏 */
.rail{
  position:sticky;
  top:26px;
  padding:18px 16px;
  border:4px solid var(--ink);
  border-radius:var(--r-lg);
  background:linear-gradient(170deg,#eafff8, #cdf6e6 70%, var(--sky));
  box-shadow:var(--sh);
}

.rail h2{
  margin:0 0 8px;
  font-size:18px;
}

.rail hr{
  border:0;
  width:48px;
  height:5px;
  margin:0 0 12px;
  border-radius:99px;
  background:var(--ink);
}

.rail ul{
  margin:0;
  padding:0;
  list-style:none;
}

.rail li{margin:0 0 6px}

.rail a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:8px 10px;
  border:2px solid transparent;
  border-radius:14px;
  font-size:16px;
  text-decoration:none;
  transition:background .2s ease-out, border-color .2s ease-out, transform .2s ease-out;
}

.rail a:hover{
  background:#fff;
  border-color:var(--ink);
  transform:translateX(-2px);
}

/* 页脚 */
footer{
  margin-left:246px;
  padding:8px clamp(16px,3vw,40px) 46px;
  text-align:center;
}

.foot-cta{
  margin:0 auto 16px;
  max-width:820px;
  padding:20px;
  border:4px solid var(--ink);
  border-radius:var(--r-lg);
  background:linear-gradient(140deg,var(--mint),var(--sky));
  box-shadow:var(--sh);
  font-size:clamp(18px,2.5vw,25px);
  font-weight:700;
}

.foot-cta a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 18px;
  border-radius:14px;
  text-decoration:none;
}

.foot-cta a:hover{background:rgba(255,255,255,.6)}

footer small{
  display:block;
  font-size:16px;
  line-height:1.7;
  color:#28503f;
}

/* 入场错峰 */
@media (prefers-reduced-motion:no-preference){
  .nav a,
  .rail li{
    animation:pop .52s cubic-bezier(.34,1.56,.64,1) backwards;
  }
  .nav a:nth-child(1),
  .rail li:nth-child(1){animation-delay:.03s}
  .nav a:nth-child(2),
  .rail li:nth-child(2){animation-delay:.07s}
  .nav a:nth-child(3),
  .rail li:nth-child(3){animation-delay:.11s}
  .nav a:nth-child(4),
  .rail li:nth-child(4){animation-delay:.15s}
  .nav a:nth-child(5),
  .rail li:nth-child(5){animation-delay:.19s}
  .nav a:nth-child(6),
  .rail li:nth-child(6){animation-delay:.23s}
  .nav a:nth-child(7),
  .rail li:nth-child(7){animation-delay:.27s}
  .hero-txt{animation:rise .6s cubic-bezier(.34,1.56,.64,1) backwards .1s}
  @keyframes pop{
    from{opacity:0;transform:translateY(10px) scale(.95)}
    to{opacity:1;transform:translateY(0) scale(1)}
  }
  @keyframes rise{
    from{opacity:0;transform:translateY(14px)}
    to{opacity:1;transform:translateY(0)}
  }
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .hero-cover{transform:none}
}

/* 窄屏：控制柱改为底部横条 */
@media (max-width:960px){
  .top{
    inset:auto 0 0 0;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:4px solid var(--ink);
    border-bottom:0;
    border-radius:24px 24px 0 0;
    box-shadow:inset 0 5px 12px rgba(255,255,255,.7), 0 -6px 0 rgba(23,38,32,.10);
    overflow:visible;
  }

  .mark{width:44px;height:44px;border-radius:14px;font-size:18px}

  .nav{
    flex:1 1 auto;
    min-width:0;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
  }

  .nav p{
    flex-direction:row;
    flex-wrap:nowrap;
    gap:8px;
  }

  .nav a{
    display:inline-flex;
    white-space:nowrap;
    min-height:44px;
    padding:10px 14px;
  }

  .search{flex:0 0 98px}

  main{
    margin-left:0;
    grid-template-columns:minmax(0,1fr);
    padding:16px 16px 132px;
  }

  .rail{position:static;order:2}

  footer{
    margin-left:0;
    padding:6px 16px 126px;
  }

  .hero{min-height:42vh}
  .hero-txt{max-width:100%}
  .hero-num{font-size:clamp(72px,26vw,150px)}
}

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