:root{
  --mint:#5cc6b0;
  --sand:#d4c4a8;
  --ink:#172623;
  --clay:#c67b5c;
  --olive:#6b7b3c;
  --paper:#f7f2e9;
  --glass:rgba(255,253,248,.62);
  --line:rgba(23,38,35,.13);
  --soft:0 18px 40px -30px rgba(23,38,35,.6);
  --r:10px;
  --round:"Fredoka","Nunito",ui-rounded,system-ui,sans-serif;
  --body:"Nunito",ui-sans-serif,system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}

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

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

body{
  margin:0;
  font-family:var(--body);
  font-size:17px;
  line-height:1.68;
  color:var(--ink);
  background:
    radial-gradient(1200px 640px at 92% -12%,rgba(92,198,176,.30),transparent 62%),
    radial-gradient(900px 520px at -6% 102%,rgba(198,123,92,.18),transparent 66%),
    linear-gradient(162deg,var(--paper) 0%,#f2ece0 55%,#e9efe6 100%);
  background-attachment:fixed;
  min-height:100vh;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible{
  outline:2px solid #1e7563;
  outline-offset:2px;
}

.grain{
  position:fixed;
  inset:0;
  z-index:2;
  pointer-events:none;
  opacity:.22;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}

.app{
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* 顶栏 / 侧栏共用 */
.masthead{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 13px;
  background:rgba(247,242,233,.88);
  backdrop-filter:blur(14px) saturate(1.1);
  border-bottom:1px solid var(--line);
}

.mark{
  flex:0 0 42px;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:14px 10px 14px 10px;
  background:linear-gradient(140deg,var(--mint),#a6e0d1);
  box-shadow:var(--soft);
  color:#0f201c;
  font-family:var(--round);
  font-size:19px;
  font-weight:600;
  text-decoration:none;
  transition:transform .35s ease-out;
}

.mark img{width:100%;height:100%;object-fit:cover}
.mark:hover{transform:rotate(-5deg)}

.nav-drawer{margin:0;flex:0 0 auto}

.nav-drawer > summary{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 13px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.56);
  font-family:var(--round);
  font-size:16px;
  cursor:pointer;
  list-style:none;
}

.nav-drawer > summary::-webkit-details-marker{display:none}
.nav-drawer[open] > summary{background:rgba(92,198,176,.34)}

.nav-drawer > menu{
  position:absolute;
  left:10px;
  right:10px;
  top:calc(100% - 1px);
  margin:0;
  padding:8px;
  list-style:none;
  background:rgba(255,253,248,.97);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 26px 44px -30px rgba(23,38,35,.7);
  backdrop-filter:blur(12px);
}

.nav-list li[hidden]{display:none}
.nav-list li + li{margin-top:2px}

.nav-list a,
.foot-list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:8px 10px;
  border-radius:9px;
  color:var(--ink);
  font-size:16px;
  text-decoration:none;
  transition:background .25s ease-out,color .25s ease-out;
}

.nav-list a:hover,
.nav-list a:focus-visible{background:rgba(92,198,176,.24)}

.dot{
  flex:0 0 6px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--clay);
}

/* 搜索 */
.finder{
  flex:1 1 auto;
  min-width:0;
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 6px 4px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.62);
}

.finder input{
  flex:1 1 auto;
  min-width:0;
  width:100%;
  padding:6px 0;
  border:0;
  background:transparent;
  color:var(--ink);
  font:inherit;
  font-size:16px;
}

.finder input:focus{outline:none}
.finder input::-webkit-search-cancel-button{display:none}

.finder button{
  flex:0 0 auto;
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  background:var(--mint);
  color:#0d1d19;
  font:inherit;
  font-size:15px;
  cursor:pointer;
  transition:transform .25s ease-out;
}

.finder button:hover{transform:translateY(-1px)}

/* 主体 */
.main{
  flex:1 1 auto;
  width:100%;
  max-width:1180px;
  padding:0 clamp(14px,4vw,42px);
}

.hero{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:16px;
  min-height:44vh;
  padding:24px 0 6px;
  text-align:right;
}

.hero-copy{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  width:100%;
}

.kicker{
  margin:0;
  font-family:var(--round);
  font-size:16px;
  letter-spacing:.2em;
  color:#2b7d6a;
}

.hero h1{
  margin:0;
  max-width:21ch;
  font-family:var(--round);
  font-size:clamp(27px,6.4vw,48px);
  font-weight:600;
  line-height:1.15;
  text-wrap:balance;
}

.lede{
  margin:0;
  max-width:46ch;
  font-size:16px;
  color:rgba(23,38,35,.74);
}

.hero-art{
  width:100%;
  min-height:136px;
  margin:6px 0 0;
  overflow:hidden;
  border-radius:26px 10px 26px 10px;
  background:linear-gradient(150deg,var(--sand),#cfe0cf 56%,var(--mint));
  box-shadow:var(--soft);
}

.hero-art img{
  width:100%;
  height:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  will-change:transform;
}

.stage{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  margin:22px 0 0;
}

/* 侧栏 */
.rail{
  padding:12px;
  border:1px solid rgba(255,255,255,.75);
  border-radius:var(--r);
  background:var(--glass);
  box-shadow:var(--soft);
  backdrop-filter:blur(12px) saturate(1.15);
}

.rail-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 8px;
  font-family:var(--round);
  font-size:16px;
  font-weight:500;
  letter-spacing:.14em;
  color:rgba(23,38,35,.6);
}

.rail-title span{
  padding-bottom:2px;
  border-bottom:2px solid var(--clay);
}

.rail-list{
  display:flex;
  flex-wrap:wrap;
  gap:4px 8px;
  margin:0;
  padding:0;
  list-style:none;
}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.65);
  border-radius:8px;
  background:rgba(255,255,255,.44);
  color:var(--ink);
  font-size:16px;
  text-decoration:none;
  transition:background .25s ease-out;
}

.rail-list a:hover{background:rgba(92,198,176,.3)}

/* 正文 */
.prose{min-width:0}

.prose > section{
  overflow-x:auto;
  padding:20px 17px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:var(--r);
  background:var(--glass);
  box-shadow:var(--soft);
  backdrop-filter:blur(14px) saturate(1.1);
  scroll-margin-top:88px;
}

.prose > section + section{margin-top:18px}

.prose h2{
  margin:0 0 12px;
  padding-left:12px;
  border-left:4px solid var(--mint);
  font-family:var(--round);
  font-size:clamp(21px,3.4vw,27px);
  font-weight:600;
  line-height:1.32;
}

.prose h2 span{
  padding-bottom:2px;
  background:linear-gradient(transparent 62%,rgba(92,198,176,.42) 62%);
}

.prose h3{
  margin:20px 0 8px;
  font-family:var(--round);
  font-size:19px;
  font-weight:600;
  color:#22574a;
}

.prose h3 span{
  text-decoration:underline;
  text-decoration-color:rgba(198,123,92,.62);
  text-decoration-thickness:2px;
  text-underline-offset:4px;
}

.prose p{margin:0 0 12px}
.prose p:last-child{margin-bottom:0}
.prose ul,.prose ol{margin:0 0 14px;padding-left:1.25em}
.prose li{margin:5px 0}

.prose a{
  color:#1e7563;
  text-decoration:underline;
  text-decoration-color:rgba(92,198,176,.7);
  text-underline-offset:3px;
}

.prose strong{color:#12493e}

.prose blockquote{
  margin:16px 0;
  padding:10px 16px;
  border-left:3px solid var(--clay);
  border-radius:0 8px 8px 0;
  background:rgba(212,196,168,.3);
}

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

.prose th,.prose td{
  padding:9px 8px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}

.prose th{background:rgba(212,196,168,.3)}

.prose img{border-radius:8px}

/* 页脚 */
.foot{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  margin-top:46px;
  padding:26px clamp(14px,4vw,42px) 18px;
  border-top:1px solid var(--line);
  background:linear-gradient(180deg,rgba(92,198,176,.16),rgba(212,196,168,.4));
}

.foot > section{
  padding:16px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:var(--r);
  background:rgba(255,253,248,.56);
  box-shadow:var(--soft);
}

.foot h2{
  margin:0 0 10px;
  font-family:var(--round);
  font-size:16px;
  font-weight:500;
  letter-spacing:.12em;
  color:rgba(23,38,35,.62);
}

.foot h2 span{
  padding-bottom:2px;
  border-bottom:2px solid var(--mint);
}

.foot-sign{
  margin:0 0 10px;
  font-family:var(--round);
  font-size:22px;
  font-weight:600;
}

.sign-form{display:flex;gap:8px}

.sign-form input{
  flex:1 1 auto;
  min-width:0;
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:9px;
  background:rgba(255,255,255,.82);
  font:inherit;
  font-size:16px;
}

.sign-form button{
  min-height:44px;
  padding:0 16px;
  border:0;
  border-radius:9px;
  background:var(--ink);
  color:#f3f8f5;
  font:inherit;
  font-size:16px;
  cursor:pointer;
  transition:transform .25s ease-out;
}

.sign-form button:hover{transform:translateY(-1px)}

.foot-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2px 10px;
  margin:0;
  padding:0;
  list-style:none;
}

.foot-list a{padding:6px 2px}
.foot-list a:hover{color:#1e7563}

.foot-bar{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
  font-size:16px;
  color:rgba(23,38,35,.72);
}

.foot-bar .copy{margin:0}

.top{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.72);
  color:var(--ink);
  text-decoration:none;
  transition:transform .25s ease-out,background .25s ease-out;
}

.top:hover{transform:translateY(-1px);background:rgba(92,198,176,.28)}

@media (min-width:760px){
  .foot{grid-template-columns:1.15fr .85fr}
}

@media (min-width:900px){
  .masthead{
    position:fixed;
    inset:0 auto 0 0;
    width:224px;
    height:100vh;
    flex-direction:column;
    align-items:stretch;
    gap:16px;
    padding:22px 18px;
    border-right:1px solid var(--line);
    border-bottom:0;
    background:linear-gradient(180deg,rgba(247,242,233,.97),rgba(233,241,235,.93));
  }

  .mark{flex:0 0 48px;width:48px;height:48px}

  .nav-drawer{flex:1 1 auto}

  .nav-drawer > summary{
    width:100%;
    justify-content:space-between;
    padding:6px 2px 7px;
    border:0;
    border-bottom:1px dashed var(--line);
    border-radius:0;
    background:transparent;
    font-size:16px;
    letter-spacing:.16em;
    color:rgba(23,38,35,.62);
  }

  .nav-drawer > menu{
    position:static;
    display:flex;
    flex-direction:column;
    padding:8px 0 0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    backdrop-filter:none;
  }

  .nav-list a{
    padding:8px 4px;
    border-radius:8px;
    border-bottom:1px dashed var(--line);
  }

  .nav-list li + li{margin-top:0}

  .finder{margin-left:0;width:100%}

  .main,
  .foot{margin-left:224px}

  .main{max-width:1080px;padding-right:clamp(20px,4vw,64px)}

  .hero{min-height:42vh;padding-top:38px}

  .stage{grid-template-columns:208px minmax(0,1fr);gap:30px;align-items:start;margin-top:26px}

  .rail{position:sticky;top:26px}

  .rail-list{flex-direction:column;flex-wrap:nowrap;gap:2px}

  .rail-list a{
    padding:6px 2px;
    border:0;
    border-bottom:1px dashed var(--line);
    border-radius:0;
    background:transparent;
  }

  .prose > section{padding:26px 24px;scroll-margin-top:26px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none!important}
  .hero-art img{transform:none!important}
}

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