@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root{
  --blue:#c8e0f4;
  --pink:#f5e0e8;
  --ink:#171f26;
  --bg1:#e6f0fa;
  --bg2:#f7ebf1;
  --sur:#eef3f8;
  --hi:rgba(255,255,255,.95);
  --lo:rgba(23,31,38,.16);
  --soft:-6px -6px 16px rgba(255,255,255,.95), 6px 6px 18px rgba(23,31,38,.14);
  --press:inset -3px -3px 8px rgba(255,255,255,.9), inset 3px 3px 9px rgba(23,31,38,.18);
  --r:18px;
}

*{box-sizing:border-box}

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

body{
  margin:0;
  overflow-x:hidden;
  font-family:'Share Tech Mono','Fira Code',ui-monospace,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",monospace;
  font-size:17px;
  line-height:1.78;
  color:var(--ink);
  background:
    radial-gradient(1100px 520px at 6% -8%, rgba(255,255,255,.85), transparent 62%),
    radial-gradient(900px 520px at 100% 4%, var(--pink), transparent 58%),
    linear-gradient(168deg, var(--bg1) 0%, var(--bg2) 58%, #eef3f8 100%);
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased;
}

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

h1,h2,h3,h4{margin:0 0 .5em;line-height:1.35;font-weight:500;letter-spacing:.02em}
h2{font-size:1.28rem;letter-spacing:.06em}
h3{font-size:1.1rem}
p{margin:0 0 1.05em}
a{color:#1b3a52}

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

/* 顶部细条 */
.tape{
  height:28px;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  background:linear-gradient(90deg,var(--blue),#eaeef5,var(--pink));
  border-bottom:1px solid rgba(255,255,255,.85);
}
.tape .roll{
  display:flex;flex-direction:column;
  animation:roll 21s steps(7,end) infinite;
}
.tape .roll span{
  height:28px;line-height:28px;
  font-size:14px;letter-spacing:.22em;color:#2b3b48;
  padding:0 12px;
}
@keyframes roll{
  0%{transform:translateY(0)}
  100%{transform:translateY(-196px)}
}

/* 顶栏 */
.bar{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 16px;
  background:linear-gradient(180deg,rgba(238,243,248,.94),rgba(238,243,248,.72));
  backdrop-filter:blur(8px);
}

.mark{
  width:46px;height:46px;
  display:grid;place-items:center;
  border-radius:14px;
  text-decoration:none;color:var(--ink);
  font-size:19px;line-height:1;
  background:linear-gradient(145deg,#f4f9fd,#dbe7f1);
  box-shadow:var(--soft);
  transition:transform .15s ease;
}
.mark:active{transform:scale(.95);box-shadow:var(--press)}
.mark img{width:26px;height:26px}

/* 汉堡全屏菜单 */
.menu{position:relative;z-index:60}
.menu > summary{
  list-style:none;
  display:block;position:relative;z-index:62;
  width:46px;height:46px;
  border-radius:14px;cursor:pointer;
  background:linear-gradient(145deg,#f4f9fd,#dbe7f1);
  box-shadow:var(--soft);
  transition:transform .15s ease;
}
.menu > summary::-webkit-details-marker{display:none}
.menu > summary::before,
.menu > summary::after{
  content:"";position:absolute;left:13px;right:13px;height:2px;border-radius:2px;
  background:var(--ink);
  transition:transform .22s ease, top .22s ease;
}
.menu > summary::before{top:19px}
.menu > summary::after{top:26px}
.menu[open] > summary{transform:scale(.96);box-shadow:var(--press)}
.menu[open] > summary::before{top:22px;transform:rotate(45deg)}
.menu[open] > summary::after{top:22px;transform:rotate(-45deg)}

.menu > menu{
  position:fixed;inset:0;z-index:61;
  margin:0;padding:104px 20px 44px;
  list-style:none;
  display:flex;flex-direction:column;gap:10px;
  overflow-y:auto;
  background:
    radial-gradient(720px 420px at 92% 0%, var(--pink), transparent 60%),
    radial-gradient(700px 460px at 0% 100%, var(--blue), transparent 62%),
    linear-gradient(170deg,#e9f2fa,#f8eef3);
}
.menu > menu li a{
  display:flex;align-items:center;
  min-height:50px;
  padding:12px 18px;
  border-radius:16px;
  text-decoration:none;color:var(--ink);
  font-size:18px;letter-spacing:.05em;
  background:linear-gradient(145deg,#f4f9fd,#dfeaf3);
  box-shadow:var(--soft);
  animation:fadeUp .32s ease both;
}
.menu > menu li:nth-child(1) a{animation-delay:.02s}
.menu > menu li:nth-child(2) a{animation-delay:.05s}
.menu > menu li:nth-child(3) a{animation-delay:.08s}
.menu > menu li:nth-child(4) a{animation-delay:.11s}
.menu > menu li:nth-child(5) a{animation-delay:.14s}
.menu > menu li:nth-child(6) a{animation-delay:.17s}
.menu > menu li:nth-child(7) a{animation-delay:.2s}
.menu > menu li a:active{transform:scale(.99);box-shadow:var(--press)}
@keyframes fadeUp{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}

/* 主视觉 */
.hero{
  position:relative;
  min-height:300px;height:45vh;max-height:430px;
  display:grid;place-items:center;
  overflow:hidden;
  margin-bottom:-8px;
  border-radius:0 0 34px 34px;
  clip-path:polygon(0 0,100% 0,100% 90%,0 100%);
  background:linear-gradient(150deg,var(--blue),var(--pink));
}
.hero-img{
  position:absolute;inset:0;
  width:100%;height:100%;object-fit:cover;
  filter:saturate(.92);
}
.hero-veil{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(233,242,250,.30),rgba(255,255,255,.80));
}
.hero-band{
  position:absolute;left:-12%;right:-12%;bottom:8px;height:34px;
  background:linear-gradient(90deg,var(--blue),var(--pink));
  transform:skewY(-4deg);
  opacity:.72;
}
.hero-txt{position:relative;z-index:2;text-align:center;padding:0 18px}
.hero h1{
  margin:0;
  font-size:clamp(28px,7.2vw,52px);
  line-height:1.24;
  letter-spacing:.08em;
  text-shadow:0 1px 0 #fff, 0 -1px 0 rgba(255,255,255,.7);
}

/* 版面 */
main{display:block}
.wrap{
  max-width:1080px;
  margin:0 auto;
  padding:34px 16px 8px;
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
  gap:26px;
  align-items:start;
}

.rail{
  position:sticky;top:76px;
  padding:16px;
  border-radius:var(--r);
  background:linear-gradient(145deg,#f2f8fc,#e2ecf4);
  box-shadow:var(--soft);
}
.rail h2{
  margin:0;
  font-size:16px;
  letter-spacing:.3em;
  text-indent:.3em;
}
.rail hr{
  margin:12px 0 14px;
  height:3px;border:0;border-radius:3px;
  background:linear-gradient(90deg,var(--blue),var(--pink));
}
.rail ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.rail ul a{
  display:flex;align-items:center;
  min-height:40px;
  padding:8px 12px;
  border-radius:12px;
  text-decoration:none;
  color:#26343f;
  font-size:16px;
  box-shadow:inset -2px -2px 6px rgba(255,255,255,.95), inset 2px 2px 7px rgba(23,31,38,.13);
  transition:transform .15s ease;
}
.rail ul a:active{transform:scale(.985)}

.doc{
  padding:22px 20px 26px;
  border-radius:20px;
  background:linear-gradient(160deg,#f5fafd,#eaf1f7);
  box-shadow:var(--soft);
}
.doc > section{min-width:0}

section > div{scroll-margin-top:96px}
section > div + div{
  margin-top:38px;
  padding-top:30px;
  position:relative;
}
section > div + div::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;border-radius:3px;
  background:linear-gradient(90deg,var(--blue),var(--pink),transparent);
  opacity:.75;
}

section h2{
  font-size:1.3rem;
  letter-spacing:.05em;
  margin:0 0 .35em;
}
section h3{margin:1.4em 0 .4em;font-size:1.08rem}
section hr{
  height:4px;border:0;border-radius:4px;
  margin:.2em 0 1.1em;
  background:linear-gradient(90deg,var(--blue),var(--pink));
  opacity:.9;
}
section p{margin:0 0 1.1em}
section ul,section ol{margin:0 0 1.1em;padding-left:1.35em}
section li{margin:.35em 0}
section li::marker{color:#5a7690}
section strong{font-weight:600}
section a{
  color:#123048;
  text-decoration:none;
  box-shadow:inset 0 -2px 0 rgba(200,224,244,1);
  padding-bottom:1px;
}
section a:active{box-shadow:inset 0 -2px 0 rgba(245,224,232,1)}
section blockquote{
  margin:1.2em 0;
  padding:14px 16px;
  border-radius:14px;
  background:linear-gradient(145deg,#eef5fa,#e5eef6);
  box-shadow:inset -3px -3px 9px rgba(255,255,255,.9), inset 3px 3px 10px rgba(23,31,38,.12);
}
section blockquote p:last-child{margin-bottom:0}
section img{border-radius:14px;margin:1em 0;box-shadow:var(--soft)}
section code{
  font-family:inherit;
  background:rgba(200,224,244,.55);
  padding:1px 6px;border-radius:6px;
}

/* 页脚 */
.foot{
  margin-top:46px;
  padding:34px 16px 22px;
  background:linear-gradient(180deg,rgba(255,255,255,.5),rgba(200,224,244,.42));
  border-top:1px solid rgba(255,255,255,.9);
}
.fgrid{
  max-width:1080px;margin:0 auto;
  display:grid;grid-template-columns:1.5fr 1fr;gap:24px;
  align-items:start;
}
.foot address{
  font-style:normal;
  display:flex;flex-direction:column;gap:8px;
}
.fbrand{font-size:1.05rem;letter-spacing:.16em}
.fdesc{font-size:16px;line-height:1.7;color:#33434f}
.flinks{
  list-style:none;margin:0;padding:0;
  columns:2;column-gap:10px;
}
.flinks li{break-inside:avoid}
.flinks li a{
  display:flex;align-items:center;
  min-height:40px;
  padding:6px 10px;
  border-radius:12px;
  text-decoration:none;color:#22323d;font-size:16px;
}
.flinks li a:active{box-shadow:var(--press)}
.copy{
  max-width:1080px;margin:24px auto 0;
  display:flex;flex-wrap:wrap;gap:12px;
  align-items:center;justify-content:space-between;
  font-size:15px;color:#3a4a56;
}
.totop{
  display:flex;align-items:center;
  min-height:40px;padding:6px 16px;
  border-radius:14px;
  text-decoration:none;color:var(--ink);font-size:16px;
  background:linear-gradient(145deg,#f4f9fd,#dde9f2);
  box-shadow:var(--soft);
}
.totop:active{box-shadow:var(--press);transform:scale(.97)}

/* 窄屏 */
@media (max-width:860px){
  .wrap{
    grid-template-columns:minmax(0,1fr);
    gap:18px;
    padding:24px 14px 8px;
  }
  .rail{position:static;order:0;padding:14px}
  .rail ul{
    flex-direction:row;flex-wrap:wrap;gap:8px;
  }
  .rail ul a{font-size:16px;padding:8px 12px}
  .doc{padding:18px 14px 22px;border-radius:16px}
  .hero{min-height:270px;height:42vh;border-radius:0 0 26px 26px}
  .fgrid{grid-template-columns:minmax(0,1fr);gap:14px}
  .flinks{columns:2}
  .copy{flex-direction:column;align-items:flex-start;gap:10px}
}

@media (max-width:420px){
  body{font-size:16px}
  .doc{padding:16px 12px 20px}
  .menu > menu{padding:96px 14px 40px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .tape .roll{animation:none}
  .menu > menu li a{animation:none}
  .mark,.totop,.rail ul a,.menu > summary{transition:none}
}

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