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

:root{
  --sky:#c8e0f4;
  --rose:#f5e0e8;
  --ink:#171f26;
  --muted:#52616f;
  --link:#1d4f77;
  --bg-a:#e9f2fa;
  --bg-b:#f9eef3;
  --card-a:#f6fafd;
  --card-b:#e9f1f8;
  --sh-dark:rgba(120,140,160,.22);
  --sh-soft:rgba(120,140,160,.16);
  --sh-light:rgba(255,255,255,.92);
  --r:18px;
}

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

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

body{
  margin:0;
  min-height:100vh;
  font-family:"Figtree","Noto Sans",system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:linear-gradient(150deg,var(--bg-a) 0%,#f3f1f6 48%,var(--bg-b) 100%);
  background-attachment:fixed;
}

img{max-width:100%;display:block}
a{color:inherit}
p{margin:0}
:focus-visible{outline:2px solid #2b4a63;outline-offset:3px}

/* ---------- hero ---------- */
.hero{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:45vh;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  padding:56px 20px 30px;
  border-bottom-left-radius:28px;
  border-bottom-right-radius:28px;
  background-image:radial-gradient(rgba(23,31,38,.13) 1px,transparent 1px);
  background-size:18px 18px;
  background-position:center;
  box-shadow:0 16px 34px -12px rgba(120,140,160,.34);
}

.hero-media{position:absolute;inset:0;z-index:-2}
.hero-media img{width:100%;height:100%;object-fit:cover}

.hero-veil{
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(275deg,rgba(249,238,243,.96) 0%,rgba(249,238,243,.74) 42%,rgba(233,242,250,.34) 100%);
}

.hero-inner{
  width:100%;
  max-width:680px;
  margin-left:auto;
  text-align:right;
}

.hero-title{
  margin:0 0 10px;
  font-size:clamp(28px,6.4vw,46px);
  line-height:1.22;
  font-weight:600;
  letter-spacing:.01em;
  text-shadow:0 2px 12px rgba(255,255,255,.75);
}

.lead{
  margin-left:auto;
  max-width:44ch;
  font-size:16px;
  line-height:1.65;
  color:var(--muted);
}

/* ---------- main column ---------- */
.main{padding:36px 16px 48px}
.wrap{max-width:840px;margin:0 auto}
.content{min-width:0}

/* ---------- fixed dock (aside) ---------- */
.side{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:50;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));
  border-radius:22px 22px 0 0;
  background:linear-gradient(145deg,#eef5fb 0%,#f9eef3 100%);
  box-shadow:0 -8px 24px rgba(120,140,160,.22),inset 0 1px 0 rgba(255,255,255,.95);
}

.brand{
  flex:0 0 auto;
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  overflow:hidden;
  text-decoration:none;
  font-size:17px;
  font-weight:600;
  color:var(--ink);
  background:linear-gradient(145deg,#ffffff,#dce9f4);
  box-shadow:-3px -3px 8px var(--sh-light),3px 3px 8px var(--sh-dark);
  transition:transform .15s ease;
}
.brand img{width:100%;height:100%;object-fit:contain;padding:8px}
.brand:active{transform:scale(.95)}

.side-head{
  display:flex;
  flex-direction:column;
  line-height:1.25;
  padding-right:4px;
  flex:0 0 auto;
}
.side-head h2{margin:0;font-size:16px;font-weight:600;white-space:nowrap}
.side-head .subtitle{margin:0;font-size:13px;color:var(--muted)}

.pills{flex:1 1 auto;min-width:0;display:flex;justify-content:center}

.pill-list{
  display:flex;
  gap:8px;
  margin:0;
  padding:3px;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.pill-list::-webkit-scrollbar{display:none}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 16px;
  border-radius:999px;
  font-size:16px;
  line-height:1.2;
  white-space:nowrap;
  text-decoration:none;
  background:linear-gradient(145deg,#f4fafd,#dbe8f3);
  box-shadow:-3px -3px 8px var(--sh-light),3px 3px 8px var(--sh-dark);
  transition:transform .15s ease,box-shadow .15s ease;
}
.pill:hover{box-shadow:-3px -3px 9px #fff,4px 4px 12px rgba(120,140,160,.3)}
.pill:active{
  transform:scale(.96);
  box-shadow:inset 3px 3px 7px rgba(120,140,160,.3),inset -3px -3px 7px rgba(255,255,255,.95);
}

.side-contact{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  padding-right:4px;
  line-height:1.25;
}
.side-contact-label{font-size:14px;font-weight:600}
.side-contact-host{font-size:13px;color:var(--muted);max-width:22ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- article ---------- */
.prose{font-size:17px;line-height:1.85;overflow-wrap:break-word}

.prose > section{
  padding:26px 22px;
  border-radius:var(--r);
  background:linear-gradient(145deg,var(--card-a),var(--card-b));
  box-shadow:-6px -6px 16px var(--sh-light),7px 7px 20px var(--sh-dark);
}
.prose > section + section{margin-top:24px}
.prose section[id]{scroll-margin-top:24px}

.prose h2{
  position:relative;
  margin:0 0 8px;
  padding-left:15px;
  font-size:1.32rem;
  line-height:1.45;
  font-weight:600;
}
.prose h2::before{
  content:"";
  position:absolute;
  left:0;
  top:.42em;
  width:6px;
  height:1em;
  border-radius:3px;
  background:linear-gradient(180deg,var(--sky),var(--rose));
  box-shadow:0 1px 3px rgba(120,140,160,.35);
}

.prose h3{font-size:1.1rem;line-height:1.5;margin:1.5em 0 .45em;font-weight:600}
.prose p{margin:0 0 1em}
.prose p:last-child{margin-bottom:0}

.prose .subtitle{font-size:15px;color:var(--muted);margin:-3px 0 15px}

.prose ul,.prose ol{padding-left:1.35em;margin:0 0 1em}
.prose li{margin:.35em 0}

.prose a{color:var(--link);text-decoration:underline;text-underline-offset:3px}

.prose img{margin:1em 0;border-radius:14px;box-shadow:0 10px 24px rgba(120,140,160,.24)}

.prose blockquote{
  margin:1em 0;
  padding:14px 16px;
  border-radius:14px;
  background:linear-gradient(145deg,#eef5fb,#f7ebf0);
  box-shadow:inset 3px 3px 7px rgba(120,140,160,.2),inset -3px -3px 7px rgba(255,255,255,.9);
}
.prose blockquote p:last-child{margin-bottom:0}

.prose table{width:100%;border-collapse:collapse;font-size:15px;margin:1em 0}
.prose th,.prose td{padding:9px 10px;border-bottom:1px solid rgba(120,140,160,.22);text-align:left;vertical-align:top}
.prose code{font-size:.92em;padding:1px 5px;border-radius:6px;background:rgba(200,224,244,.55)}

/* ---------- footer ---------- */
.foot{
  max-width:1000px;
  margin:0 auto;
  padding:10px 16px 180px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  font-size:15px;
}

.foot-col{
  padding:18px;
  border-radius:var(--r);
  background:linear-gradient(145deg,#f8fbfe,#e9f1f8);
  box-shadow:-5px -5px 14px var(--sh-light),6px 6px 16px var(--sh-soft);
}
.foot-col h3{margin:0 0 10px;font-size:16px;font-weight:600}
.foot-col p{color:var(--muted);overflow-wrap:break-word;word-break:break-word}

.sub{display:flex;flex-direction:column;gap:8px}
.sub label{font-size:14px;color:var(--muted)}
.sub input{
  min-height:44px;
  padding:0 14px;
  font-family:inherit;
  font-size:16px;
  color:var(--ink);
  border:0;
  border-radius:13px;
  background:#e8f0f8;
  box-shadow:inset 3px 3px 7px rgba(120,140,160,.3),inset -3px -3px 7px rgba(255,255,255,.95);
}
.sub button{
  min-height:44px;
  border:0;
  border-radius:999px;
  font-family:inherit;
  font-size:16px;
  font-weight:600;
  color:var(--ink);
  cursor:pointer;
  background:linear-gradient(145deg,#f8dee9,#cfa4d9 140%);
  background:linear-gradient(145deg,#f8dee9,#cfe3f5);
  box-shadow:-3px -3px 8px var(--sh-light),3px 3px 8px var(--sh-dark);
  transition:transform .15s ease;
}
.sub button:active{transform:scale(.97)}

.foot-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  text-align:center;
}
.foot-copy p:first-child{color:var(--ink);font-weight:500}

/* ---------- back to top ---------- */
.totop{
  position:fixed;
  right:14px;
  bottom:calc(80px + env(safe-area-inset-bottom,0px));
  z-index:45;
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  font-size:14px;
  text-decoration:none;
  background:linear-gradient(145deg,#ffffff,#e3edf6);
  box-shadow:-3px -3px 8px var(--sh-light),3px 3px 9px var(--sh-dark);
}

/* ---------- reveal ---------- */
.rv{opacity:0;transform:translateY(14px);transition:opacity .55s ease,transform .55s ease}
.rv.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rv{opacity:1;transform:none;transition:none}
  .pill,.brand,.sub button{transition:none}
}

/* ---------- breakpoints ---------- */
@media (max-width:900px){
  .side-head{display:none}
}

@media (max-width:1000px){
  .side-contact{display:none}
  .pills{justify-content:flex-start}
}

@media (max-width:860px){
  .foot{grid-template-columns:1fr;padding-bottom:190px}
  .hero{min-height:52vh;padding:64px 16px 26px}
  .lead{font-size:16px}
}

@media (max-width:520px){
  body{font-size:16px}
  .prose{font-size:16px;line-height:1.8}
  .prose > section{padding:22px 16px;border-radius:16px}
  .main{padding:28px 14px 40px}
  .hero-title{font-size:clamp(26px,7.6vw,34px)}
}

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