:root{
  --ink:#171f26;
  --ink2:#3f505d;
  --blue:#c8e0f4;
  --pink:#f5e0e8;
  --bg1:#eef5fb;
  --bg2:#e0ebf5;
  --out:-5px -5px 15px rgba(255,255,255,.92), 6px 6px 16px rgba(23,31,38,.14);
  --out-sm:-3px -3px 8px rgba(255,255,255,.9), 4px 4px 10px rgba(23,31,38,.12);
  --in:inset -3px -3px 8px rgba(255,255,255,.9), inset 3px 3px 9px rgba(23,31,38,.12);
  --r:16px;
}

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

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

body{
  margin:0;
  font-family:'Didact Gothic','Poiret One',system-ui,-apple-system,'Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:linear-gradient(170deg,var(--bg1) 0%,#dde9f4 58%,#e8f0f8 100%);
  overflow-x:hidden;
}

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

a{color:var(--ink)}

a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline:3px solid #6f9fc4;
  outline-offset:2px;
}

.shell{
  max-width:1140px;
  margin:0 auto;
  padding:0 16px;
}

/* 顶部 */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  padding:12px 0 11px;
  border-radius:0 0 22px 22px;
  background:rgba(238,245,251,.94);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  box-shadow:0 10px 24px rgba(23,31,38,.1);
}

.brandline{
  display:flex;
  justify-content:center;
  align-items:center;
  padding:0 0 9px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:0 10px;
  text-decoration:none;
  color:var(--ink);
  font-family:'Poiret One','Didact Gothic',system-ui,sans-serif;
  font-size:clamp(1.3rem,4vw,1.85rem);
  letter-spacing:.16em;
}

.brand img{
  width:34px;
  height:34px;
  border-radius:9px;
  object-fit:cover;
  box-shadow:var(--out-sm);
}

.toolbar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}

.pillnav{
  flex:1 1 320px;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
  padding-bottom:2px;
}

.pillnav::-webkit-scrollbar{display:none}

.pillnav ol{
  display:flex;
  gap:9px;
  margin:0;
  padding:3px;
  list-style:none;
}

.pillnav a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:0 15px;
  border-radius:999px;
  font-size:16px;
  line-height:1.4;
  white-space:nowrap;
  text-decoration:none;
  color:var(--ink);
  background:linear-gradient(145deg,#f3f9fe,#dbe8f3);
  box-shadow:var(--out);
  transition:box-shadow .15s ease,transform .15s ease;
}

.pillnav a:active{
  transform:scale(.97);
  box-shadow:var(--in);
}

.pillnav a[aria-current]{
  background:linear-gradient(145deg,var(--pink),#edd3e0);
  box-shadow:var(--in);
}

.sfield{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 1 214px;
  padding:4px 5px 4px 14px;
  border-radius:999px;
  background:linear-gradient(145deg,#e4eef7,#f4fafe);
  box-shadow:var(--in);
}

.sinput{
  flex:1 1 60px;
  min-width:62px;
  height:36px;
  border:0;
  background:transparent;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  outline:none;
  -webkit-appearance:none;
  appearance:none;
}

.sbtn{
  min-height:38px;
  padding:0 15px;
  border:0;
  border-radius:999px;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  cursor:pointer;
  background:linear-gradient(145deg,var(--pink),#ecd0de);
  box-shadow:var(--out-sm);
  transition:transform .15s ease,box-shadow .15s ease;
}

.sbtn:active{
  transform:scale(.96);
  box-shadow:var(--in);
}

/* 首屏 */
.hero{
  position:relative;
  min-height:70vh;
  display:grid;
  place-items:center;
  padding:38px 0 54px;
  overflow:hidden;
  text-align:center;
}

.hero-mark{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-family:'Poiret One','Didact Gothic',system-ui,sans-serif;
  font-size:clamp(2.6rem,15vw,9rem);
  line-height:1;
  letter-spacing:.16em;
  color:#fff;
  opacity:.72;
  text-shadow:2px 2px 14px rgba(23,31,38,.1),-2px -2px 12px #fff;
  white-space:nowrap;
  pointer-events:none;
  user-select:none;
}

.hero-in{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:26px;
  flex-wrap:wrap;
  padding:0 4px;
}

.art{
  position:relative;
  flex:0 0 auto;
  width:148px;
  height:148px;
  border-radius:26px;
  overflow:hidden;
  background:linear-gradient(145deg,#f2f8fd,#d9e6f2);
  box-shadow:var(--out);
}

.art img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.art.rot img{
  position:absolute;
  inset:0;
  opacity:0;
  animation:artrot 12s linear infinite;
}

.art.rot img:nth-of-type(2){animation-delay:4s}
.art.rot img:nth-of-type(3){animation-delay:8s}

@keyframes artrot{
  0%{opacity:0}
  6%{opacity:1}
  30%{opacity:1}
  38%{opacity:0}
  100%{opacity:0}
}

.hero-txt{max-width:620px}

.hero h1{
  margin:0 0 14px;
  font-family:'Poiret One','Didact Gothic',system-ui,sans-serif;
  font-size:clamp(1.85rem,5.4vw,3.1rem);
  line-height:1.32;
  letter-spacing:.06em;
}

.lede{
  margin:0 auto;
  max-width:46ch;
  color:var(--ink2);
  font-size:17px;
}

.hero-cta{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  margin-top:22px;
  padding:0 22px;
  border-radius:999px;
  font-size:16px;
  text-decoration:none;
  color:var(--ink);
  background:linear-gradient(145deg,#f4faff,#dae7f3);
  box-shadow:var(--out);
  transition:transform .15s ease,box-shadow .15s ease;
}

.hero-cta:active{
  transform:scale(.97);
  box-shadow:var(--in);
}

/* 两栏 */
.wrap{
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:26px;
  align-items:start;
  padding:8px 0 0;
}

.wrap > div{min-width:0}

.rail{
  display:flex;
  flex-direction:column;
  gap:18px;
  position:sticky;
  top:132px;
}

.rail-card{
  border-radius:18px;
  padding:16px 18px 18px;
  background:linear-gradient(145deg,#f2f8fd,#dde9f4);
  box-shadow:var(--out);
}

.rail-card h2{
  margin:0;
  font-family:'Poiret One','Didact Gothic',system-ui,sans-serif;
  font-size:1.05rem;
  letter-spacing:.14em;
}

.rail-card hr,
.prose hr{
  border:0;
  height:2px;
  margin:9px 0 14px;
  border-radius:2px;
  background:linear-gradient(90deg,rgba(23,31,38,.2),rgba(23,31,38,.02));
}

.rail-list{
  margin:0;
  padding:0;
  list-style:none;
  counter-reset:railno;
}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:4px 0;
  font-size:16px;
  line-height:1.5;
  color:var(--ink2);
  text-decoration:none;
  border-radius:8px;
}

.rail-list a:hover{color:var(--ink)}

.rail-top{margin:0}

.rail-top a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  color:var(--ink2);
  text-decoration:none;
}

/* 正文 */
.prose{
  padding:clamp(20px,4vw,40px);
  border-radius:20px;
  background:linear-gradient(150deg,#f4faff,#e2edf7);
  box-shadow:var(--out);
  overflow-wrap:break-word;
}

.prose > :first-child{margin-top:0}

.prose p{margin:0 0 1.15em}

.prose h2,
.prose h3{
  font-family:'Poiret One','Didact Gothic',system-ui,sans-serif;
  line-height:1.35;
  letter-spacing:.05em;
  margin:1.7em 0 .55em;
}

.prose h2{font-size:clamp(1.35rem,3.4vw,1.85rem)}
.prose h3{font-size:clamp(1.12rem,2.6vw,1.35rem)}

.prose ul,
.prose ol{padding-left:1.4em;margin:0 0 1.15em}

.prose li{margin:.35em 0}

.prose a{color:#1c5578;text-underline-offset:3px}

.prose img{
  margin:1.3em 0;
  border-radius:16px;
  box-shadow:var(--out-sm);
}

.prose figure{margin:1.3em 0}
.prose figcaption{font-size:16px;color:var(--ink2)}

.prose blockquote{
  margin:1.3em 0;
  padding:14px 18px;
  border-radius:14px;
  color:var(--ink2);
  background:linear-gradient(145deg,#e2ecf6,#f2f8fd);
  box-shadow:var(--in);
}

.prose blockquote p:last-child{margin-bottom:0}

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

.prose th,
.prose td{
  padding:9px 10px;
  text-align:left;
  border-bottom:2px solid rgba(23,31,38,.08);
}

.prose code{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:16px;
  padding:1px 5px;
  border-radius:6px;
  background:rgba(200,224,244,.55);
}

.prose div{scroll-margin-top:150px}

.prose div.hit{
  outline:3px solid rgba(245,224,232,.95);
  outline-offset:6px;
  border-radius:10px;
}

/* 页脚 */
.foot{
  margin:54px 0 0;
  padding:34px 0 26px;
}

.foot-brand{
  font-family:'Poiret One','Didact Gothic',system-ui,sans-serif;
  font-size:clamp(2.2rem,12vw,6.2rem);
  line-height:1;
  letter-spacing:.04em;
  text-align:center;
  color:rgba(23,31,38,.13);
  white-space:nowrap;
  overflow:hidden;
}

.dlrow{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:20px;
}

.dlrow dl{
  margin:0;
  padding:14px 16px 16px;
  border-radius:16px;
  background:linear-gradient(145deg,#f2f8fd,#dfeaf5);
  box-shadow:var(--out-sm);
}

.dlrow dt{
  font-size:16px;
  letter-spacing:.12em;
  color:var(--ink2);
}

.dlrow dd{margin:4px 0 0}

.dlrow dd a{
  display:flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  line-height:1.45;
  color:var(--ink);
  text-decoration:none;
}

.dlrow dd a:hover{text-decoration:underline;text-underline-offset:3px}

.foot-base{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
  padding-top:14px;
  font-size:16px;
  color:var(--ink2);
}

.foot-base p{margin:0}

.to-top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 16px;
  border-radius:999px;
  font-size:16px;
  text-decoration:none;
  color:var(--ink);
  background:linear-gradient(145deg,#f4faff,#dbe8f3);
  box-shadow:var(--out-sm);
}

.to-top:active{box-shadow:var(--in)}

/* 动效 */
.js .reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .6s ease,transform .6s ease;
}

.js .reveal.in{
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .reveal{opacity:1;transform:none;transition:none}
  .art.rot img{animation:none;opacity:0}
  .art.rot img:first-of-type{opacity:1}
}

/* 平板 */
@media (max-width:900px){
  .wrap{grid-template-columns:1fr;gap:20px}
  .rail{position:static;flex-direction:row;flex-wrap:wrap;gap:16px;order:0}
  .rail-card{flex:1 1 240px}
  .prose div{scroll-margin-top:24px}
}

/* 手机 */
@media (max-width:720px){
  body{font-size:17px}
  .topbar{position:static;border-radius:0 0 18px 18px;padding:10px 0 12px}
  .brandline{justify-content:flex-start;padding-bottom:8px}
  .toolbar{flex-direction:column;align-items:stretch;gap:9px}
  .pillnav{flex:1 1 auto}
  .sfield{flex:1 1 auto}
  .hero{min-height:60vh;padding:26px 0 40px}
  .hero-in{gap:18px}
  .art{width:112px;height:112px;border-radius:22px}
  .dlrow{grid-template-columns:1fr}
  .foot-brand{text-align:left}
  .foot-base{padding-top:12px}
}

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