:root{
  --blue:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#eaf6ff;
  --r:10px;
  --edge:3px solid #000;
  --drop:5px 5px 0 #000;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  padding-bottom:112px;
  background:var(--paper);
  color:var(--ink);
  font-family:'DM Sans',system-ui,-apple-system,'PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.65;
  overflow-x:hidden;
}
a{color:inherit}
:focus-visible{outline:3px solid var(--red);outline-offset:2px}

/* 顶部区块 */
.hero{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:20px;
  min-height:45vh;
  padding:32px max(20px,calc((100vw - 1080px)/2)) 46px;
  background:var(--blue);
  text-align:right;
}
.hero::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:20px;
  background:var(--red);
  clip-path:polygon(0 100%,100% 0,100% 100%);
}
.hero-copy{max-width:660px;min-width:0}
.hero h1{
  margin:0;
  font-size:clamp(30px,6vw,54px);
  line-height:1.12;
  font-weight:700;
  letter-spacing:-.5px;
  text-shadow:4px 4px 0 #fff;
}
.lede{
  margin:16px 0 0 auto;
  max-width:48ch;
  font-size:17px;
  font-weight:500;
}
.hero-art{
  flex:0 0 auto;
  width:clamp(88px,16vw,150px);
  padding:10px;
  display:grid;
  place-items:center;
  background:#fff;
  border:var(--edge);
  border-radius:var(--r);
  box-shadow:var(--drop);
  transform:rotate(-6deg);
}
.hero-art img{display:block;width:100%;height:auto;border-radius:4px}
.hero-art svg{width:76%;height:auto}

/* 内容区 */
.wrap{
  max-width:1080px;
  margin:0 auto;
  padding:34px 18px;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:26px;
  align-items:start;
}

/* 侧栏 */
.rail{
  position:sticky;
  top:20px;
  padding:14px;
  background:#fff;
  border:var(--edge);
  border-radius:var(--r);
  box-shadow:var(--drop);
}
.rail-title{margin:0 0 12px;font-size:16px;letter-spacing:2px}
.rail-title span{
  display:inline-block;
  padding:2px 9px;
  background:var(--blue);
  border:2px solid #000;
  border-radius:6px;
}
.rail-list{
  counter-reset:r;
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}
.rail-list li{counter-increment:r}
.rail-list a{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:7px 10px;
  background:#fff;
  border:2px solid #000;
  border-radius:8px;
  box-shadow:2px 2px 0 #000;
  color:#000;
  text-decoration:none;
  font-weight:500;
  font-size:16px;
  line-height:1.3;
}
.rail-list a::before{
  content:counter(r,decimal-leading-zero);
  flex:0 0 auto;
  padding:1px 5px;
  background:var(--red);
  border:2px solid #000;
  border-radius:4px;
  font-size:16px;
  font-weight:700;
  line-height:1.2;
}
.rail-list a:hover{background:var(--blue);transform:translate(2px,2px);box-shadow:none}
.rail-top{margin:16px 0 0;font-size:16px}
.rail-top span{
  display:inline-block;
  background:var(--red);
  border:2px solid #000;
  border-radius:8px;
  box-shadow:2px 2px 0 #000;
}
.rail-top a{
  display:block;
  padding:8px 14px;
  min-height:42px;
  color:#000;
  font-size:16px;
  font-weight:700;
  text-decoration:none;
  line-height:1.6;
}
.rail-top a:hover{background:var(--blue)}

/* 正文 */
.body{min-width:0}
.prose{
  padding:26px clamp(16px,3vw,34px);
  background:#fff;
  border:var(--edge);
  border-radius:var(--r);
  box-shadow:var(--drop);
  overflow-wrap:break-word;
}
.prose article{
  scroll-margin-top:16px;
  padding-bottom:26px;
  margin-bottom:26px;
  border-bottom:2px dashed rgba(0,0,0,.22);
}
.prose article:last-child{border-bottom:0;margin-bottom:0;padding-bottom:0}
.prose h2{
  margin:0 0 14px;
  font-size:clamp(22px,3.6vw,30px);
  line-height:1.24;
  font-weight:700;
}
.prose h2 span{box-shadow:inset 0 -.34em 0 var(--blue)}
.prose h3{margin:24px 0 10px;font-size:19px;line-height:1.35}
.prose h3 span{box-shadow:inset 0 -.3em 0 var(--red)}
.prose p{margin:0 0 14px;line-height:1.78}
.prose ul,.prose ol{margin:0 0 16px;padding-left:24px}
.prose li{margin:0 0 8px;line-height:1.72}
.prose a{color:#000;font-weight:700;text-decoration:none;box-shadow:inset 0 -.28em 0 var(--red)}
.prose a:hover{background:var(--blue)}
.prose img{max-width:100%;height:auto;border:var(--edge);border-radius:var(--r);box-shadow:var(--drop)}
.prose strong{font-weight:700;box-shadow:inset 0 -.3em 0 #ffe680}
.prose blockquote{
  margin:18px 0;
  padding:14px 18px;
  background:var(--paper);
  border:var(--edge);
  border-radius:var(--r);
}
.prose blockquote p:last-child{margin-bottom:0}
.prose table{width:100%;border-collapse:collapse;font-size:16px;margin:0 0 16px}
.prose th,.prose td{border:2px solid #000;padding:8px 10px;text-align:left}
.prose th{background:var(--blue)}
.prose code{padding:1px 5px;background:#f1f1f1;border-radius:4px}
.prose pre{overflow-x:auto;padding:14px;background:#f1f1f1;border:2px solid #000;border-radius:var(--r)}
.prose hr{border:0;border-top:3px solid #000;margin:22px 0}

/* 页脚 */
footer{
  margin-top:30px;
  padding:28px max(18px,calc((100vw - 1080px)/2)) 34px;
  display:grid;
  grid-template-columns:1fr 1.4fr 1fr;
  gap:16px;
  align-items:center;
  background:var(--ink);
  color:#fff;
  border-top:6px solid var(--blue);
  font-size:16px;
}
.foot-brand{margin:0}
.foot-brand span{
  display:inline-block;
  padding:4px 12px;
  background:var(--blue);
  border:3px solid #fff;
  border-radius:var(--r);
  color:#000;
  font-weight:700;
  font-size:17px;
}
.foot-sub{margin:0;display:flex;gap:8px;align-items:center}
.foot-sub input{
  flex:1 1 auto;
  min-width:0;
  min-height:44px;
  padding:0 10px;
  font-family:inherit;
  font-size:16px;
  color:#000;
  background:#fff;
  border:3px solid #fff;
  border-radius:8px;
}
.foot-sub button{
  flex:0 0 auto;
  min-height:44px;
  padding:0 18px;
  font-family:inherit;
  font-size:16px;
  font-weight:700;
  color:#000;
  background:var(--red);
  border:3px solid #fff;
  border-radius:8px;
  box-shadow:3px 3px 0 var(--blue);
  cursor:pointer;
}
.foot-sub button:disabled{opacity:.75;cursor:default}
footer small{font-size:16px;line-height:1.6}
footer small a{
  display:inline-block;
  padding:6px 2px;
  color:#fff;
  font-weight:700;
  text-decoration:none;
  box-shadow:inset 0 -.28em 0 var(--red);
}

/* 底部固定条 */
.dock{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 14px;
  background:#fff;
  border-top:4px solid #000;
}
.dock-mark{
  width:52px;height:52px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:var(--blue);
  border:var(--edge);
  border-radius:var(--r);
  box-shadow:3px 3px 0 #000;
  color:#000;
  font-size:20px;
  font-weight:700;
  text-decoration:none;
}
.dock-mark img{width:100%;height:100%;object-fit:cover}
.mark-glyph{line-height:1}
.dock-menu{position:relative}
.dock-menu summary{
  list-style:none;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:0 16px;
  background:var(--red);
  border:var(--edge);
  border-radius:var(--r);
  box-shadow:3px 3px 0 #000;
  font-size:17px;
  font-weight:700;
  cursor:pointer;
}
.dock-menu summary::-webkit-details-marker{display:none}
.dock-menu summary::before{
  content:"";
  width:20px;height:3px;
  background:#000;
  box-shadow:0 6px 0 #000,0 12px 0 #000;
}
.dock-menu[open] summary{background:var(--blue)}
.dock-menu menu{
  position:absolute;
  right:0;
  bottom:calc(100% + 12px);
  width:min(340px,calc(100vw - 28px));
  margin:0;
  padding:12px;
  list-style:none;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  background:#fff;
  border:var(--edge);
  border-radius:var(--r);
  box-shadow:var(--drop);
}
.dock-menu menu li{min-width:0}
.dock-menu menu a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 10px;
  background:var(--paper);
  border:2px solid #000;
  border-radius:8px;
  color:#000;
  font-size:16px;
  font-weight:500;
  line-height:1.3;
  text-decoration:none;
}
.dock-menu menu a:hover{background:var(--blue)}

/* 动效 */
.rv{opacity:0;transform:translateY(14px);transition:opacity .45s ease,transform .45s ease}
.rv.in{opacity:1;transform:none}
@keyframes shake{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-4px)}
  75%{transform:translateX(4px)}
}
.shake{animation:shake .3s linear}

@media (max-width:720px){
  body{padding-bottom:104px}
  .hero{
    min-height:40vh;
    gap:14px;
    padding:24px 16px 38px;
  }
  .hero-art{width:80px;padding:7px}
  .hero h1{text-shadow:3px 3px 0 #fff}
  .wrap{
    grid-template-columns:1fr;
    gap:20px;
    padding:22px 14px;
  }
  .rail{position:static}
  .rail-list{grid-template-columns:1fr 1fr}
  footer{
    grid-template-columns:1fr;
    gap:14px;
    padding:24px 16px 30px;
  }
  .foot-sub{flex-wrap:nowrap}
  .dock-menu menu{grid-template-columns:1fr 1fr}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rv{opacity:1;transform:none;transition:none}
  .shake{animation:none}
}

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