@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root{
  --bg:#c8e0f4;
  --bg-l:#e0eefa;
  --bg-d:#b3d0ea;
  --panel:#f5e0e8;
  --panel-d:#ecd1dc;
  --ink:#171f26;
  --mute:#3d4c58;
  --out:-6px -6px 14px rgba(255,255,255,.82), 8px 10px 22px rgba(23,31,38,.20);
  --out-sm:-3px -3px 8px rgba(255,255,255,.88), 4px 5px 12px rgba(23,31,38,.16);
  --in:inset -4px -4px 10px rgba(255,255,255,.9), inset 5px 5px 12px rgba(23,31,38,.14);
  --r:16px;
}

*{box-sizing:border-box}

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

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:'Source Serif 4',Georgia,'Songti SC',serif;
  font-size:17px;
  line-height:1.68;
  overflow-x:hidden;
}

img{max-width:100%;height:auto;display:block}
a{color:var(--ink)}

h1,h2,h3,.cta p,.brand__glyph,.badge{
  font-family:'Playfair Display','Source Serif 4',Georgia,serif;
}

hr{
  border:0;
  height:3px;
  border-radius:3px;
  background:linear-gradient(90deg,rgba(23,31,38,.34),rgba(23,31,38,.06));
  margin:0 0 16px;
}

a:active,.badge:active{transform:scale(.985)}

/* 顶部细条 */
.ticker{
  background:linear-gradient(145deg,var(--bg-l),var(--bg-d));
  text-align:center;
  padding:9px 16px;
  font-size:16px;
  letter-spacing:.2em;
  box-shadow:inset 0 -2px 4px rgba(255,255,255,.75), inset 0 2px 5px rgba(23,31,38,.08);
}
.ticker span{opacity:.85}

/* 顶栏 */
.top{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 16px;
  background:var(--bg);
  box-shadow:0 14px 20px -16px rgba(23,31,38,.6), inset 0 -2px 4px rgba(255,255,255,.55);
}

.brand{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:52px;
  height:52px;
  border-radius:var(--r);
  background:linear-gradient(145deg,var(--bg-l),var(--bg-d));
  box-shadow:var(--out-sm);
  text-decoration:none;
  overflow:hidden;
}
.brand img{width:44px;height:44px;object-fit:cover;border-radius:12px}
.brand__glyph{
  font-size:16px;
  font-weight:900;
  letter-spacing:-.02em;
  line-height:1;
}
.brand--flat{width:48px;height:48px;background:transparent;box-shadow:none}

.topnav{
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
.topnav::-webkit-scrollbar{display:none}

.topnav__list,
.sidenav__list,
.footnav__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
}

.topnav__list{gap:8px;justify-content:flex-end}

.topnav__list a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 14px;
  border-radius:14px;
  font-size:16px;
  text-decoration:none;
  white-space:nowrap;
  background:linear-gradient(145deg,var(--bg-l),var(--bg-d));
  box-shadow:var(--out-sm);
  transition:transform .15s ease, box-shadow .15s ease;
}
.topnav__list a:hover{
  box-shadow:var(--in);
  transform:translateY(1px);
}

/* 主区 */
main{display:block}

.hero{
  min-height:100svh;
  padding:44px 18px 40px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:26px;
  max-width:1220px;
  margin:0 auto;
}

.hero__text{max-width:900px;min-width:0}

.badge{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:0 16px;
  border-radius:999px;
  font-size:16px;
  letter-spacing:.04em;
  background:linear-gradient(145deg,#f9ecf1,var(--panel-d));
  box-shadow:var(--out-sm);
  animation:float 5.5s ease-in-out infinite;
}

@keyframes float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-5px)}
}

.hero h1{
  font-size:clamp(2.15rem,8vw,4.9rem);
  line-height:1.03;
  letter-spacing:-.025em;
  font-weight:900;
  margin:16px 0 0;
  overflow-wrap:break-word;
}

.lede{
  margin:18px 0 0;
  max-width:44ch;
  font-size:clamp(17px,2.4vw,21px);
  line-height:1.6;
  color:var(--mute);
}

.hero__fig{
  margin:0;
  border-radius:var(--r);
  overflow:hidden;
  box-shadow:var(--out);
  background:var(--bg-d);
}
.hero__img{
  width:100%;
  height:clamp(200px,34vh,360px);
  object-fit:cover;
}

/* 正文 + 侧栏 */
.board{
  max-width:1220px;
  margin:0 auto;
  padding:10px 18px 88px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 292px;
  gap:52px;
  align-items:start;
}

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

.prose section{
  scroll-margin-top:118px;
  margin:0 0 46px;
}

.prose section + section{
  padding-top:46px;
  background:linear-gradient(90deg,rgba(23,31,38,.18),rgba(23,31,38,0)) no-repeat left top / 100% 2px;
}

.prose h2{
  font-size:clamp(1.5rem,4.4vw,2.15rem);
  line-height:1.16;
  letter-spacing:-.015em;
  margin:0 0 12px;
}

.prose h3{
  font-size:clamp(1.2rem,3.2vw,1.45rem);
  line-height:1.25;
  margin:26px 0 10px;
}

.prose p{margin:0 0 18px}
.prose ul,.prose ol{margin:0 0 18px;padding-left:1.4em}
.prose li{margin:0 0 8px}
.prose a{color:#123c58;text-decoration:underline;text-underline-offset:3px}
.prose img{border-radius:12px;box-shadow:var(--out-sm);margin:8px 0 18px}
.prose blockquote{
  margin:0 0 18px;
  padding:16px 18px;
  border-radius:var(--r);
  background:var(--panel);
  box-shadow:var(--in);
}
.prose blockquote p:last-child{margin:0}
.prose code,.prose pre{
  font-family:'JetBrains Mono',ui-monospace,monospace;
  font-size:15px;
}
.prose pre{
  overflow-x:auto;
  padding:16px;
  border-radius:12px;
  background:rgba(255,255,255,.55);
  box-shadow:var(--in);
}

/* 侧栏 */
.side{
  position:sticky;
  top:104px;
  min-width:0;
  padding:20px 18px 22px;
  border-radius:var(--r);
  background:linear-gradient(160deg,#fbeef3,var(--panel));
  box-shadow:var(--out);
}

.side h2{
  font-size:1.2rem;
  line-height:1.25;
  margin:0 0 10px;
  letter-spacing:-.01em;
}

.sidenav__list{
  flex-direction:column;
  gap:9px;
}

.sidenav__list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 13px;
  border-radius:4px;
  font-size:16px;
  text-decoration:none;
  background:rgba(255,255,255,.5);
  border:1px solid rgba(255,255,255,.72);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 1px 2px rgba(23,31,38,.06);
  transition:transform .15s ease, box-shadow .15s ease;
}
.sidenav__list a:hover{
  transform:translateY(-2px);
  box-shadow:var(--out-sm);
}

/* 页脚 */
footer{
  padding:0 18px 26px;
  border-radius:32px 32px 0 0;
  background:linear-gradient(160deg,var(--bg-l),var(--bg-d));
  box-shadow:inset 0 7px 18px rgba(255,255,255,.7), inset 0 -6px 14px rgba(23,31,38,.09);
}

.cta{
  max-width:1220px;
  margin:0 auto;
  padding:52px 0 30px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:16px 26px;
}

.cta p{
  margin:0;
  font-size:clamp(1.6rem,5vw,2.7rem);
  line-height:1.08;
  font-weight:900;
  letter-spacing:-.02em;
  overflow-wrap:break-word;
}

.cta__go{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:0 24px;
  border-radius:var(--r);
  font-size:16px;
  text-decoration:none;
  background:linear-gradient(145deg,var(--panel),var(--panel-d));
  box-shadow:var(--out-sm);
  transition:transform .15s ease, box-shadow .15s ease;
}
.cta__go:hover{box-shadow:var(--in);transform:translateY(1px)}

.foot-row{
  max-width:1220px;
  margin:0 auto;
  padding-top:22px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px 24px;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.72);
}

.footnav{min-width:0}
.footnav__list{flex-wrap:wrap;gap:4px 10px}

.footnav__list a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 10px;
  border-radius:4px;
  font-size:16px;
  text-decoration:none;
  color:var(--ink);
  opacity:.82;
}
.footnav__list a:hover{opacity:1;background:rgba(255,255,255,.5)}

.copy{
  margin:0;
  font-size:16px;
  opacity:.72;
}

/* 回到顶部 */
.totop{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:40;
  min-height:48px;
  padding:0 18px;
  border:0;
  border-radius:14px;
  font-family:inherit;
  font-size:16px;
  color:var(--ink);
  cursor:pointer;
  background:linear-gradient(145deg,#fbeef3,var(--panel-d));
  box-shadow:var(--out);
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .22s ease, transform .22s ease;
}
.totop.is-on{opacity:1;pointer-events:auto;transform:translateY(0)}
.totop:active{transform:scale(.96)}

/* 进入动效 */
@media (prefers-reduced-motion:no-preference){
  .prose section{
    animation:rise .52s ease both;
  }
  .prose section:nth-child(2){animation-delay:.06s}
  .prose section:nth-child(3){animation-delay:.12s}
  .prose section:nth-child(4){animation-delay:.18s}
  .prose section:nth-child(5){animation-delay:.24s}
  .prose section:nth-child(6){animation-delay:.3s}
  .prose section:nth-child(7){animation-delay:.36s}
}

@keyframes rise{
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .badge{animation:none}
  *{transition-duration:.01ms !important}
}

/* 窄屏 */
@media (max-width:900px){
  .board{grid-template-columns:minmax(0,1fr);gap:40px;padding-bottom:64px}
  .side{position:static;order:2}
  .sidenav__list{flex-direction:row;flex-wrap:wrap}
  .sidenav__list li{flex:1 1 44%}
}

@media (max-width:620px){
  body{font-size:16px}
  .ticker{letter-spacing:.12em;font-size:16px;padding:8px 12px}
  .top{padding:10px 12px;gap:10px}
  .topnav__list{justify-content:flex-start;gap:6px}
  .topnav__list a{padding:0 12px}
  .hero{padding:32px 14px 34px;min-height:auto}
  .hero h1{margin-top:14px}
  .lede{max-width:none}
  .board{padding:8px 14px 56px}
  footer{padding:0 14px 24px;border-radius:24px 24px 0 0}
  .cta{padding:38px 0 24px}
  .foot-row{justify-content:flex-start}
  .copy{width:100%}
  .sidenav__list li{flex:1 1 100%}
}

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