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

:root{
  --sky:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#f4f1e8;
  --line:3px solid #000;
  --hard:5px 5px 0 #000;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --sans:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI','Microsoft YaHei',sans-serif;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.7;
  padding-bottom:120px;
  overflow-x:hidden;
}

h1,h2,h3,h4{
  font-family:var(--mono);
  font-weight:700;
  line-height:1.2;
  letter-spacing:-.01em;
  margin:0;
}

a{color:var(--ink)}

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

.mark{width:28px;height:28px;flex:0 0 auto;display:block;border:3px solid #000;border-radius:4px;background:#fff;object-fit:contain}
.mark-blank{background:var(--red)}

/* ---------- 底部固定控制条 ---------- */
.dock{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:60;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  background:var(--sky);
  border-top:var(--line);
  flex-wrap:nowrap;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  min-height:46px;
  background:#fff;
  border:var(--line);
  border-radius:4px;
  box-shadow:4px 4px 0 #000;
  font-family:var(--mono);
  font-weight:700;
  font-size:16px;
  text-decoration:none;
  flex:0 1 auto;
  min-width:0;
}
.brand:hover{background:var(--red)}
.brand-txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.find{
  display:flex;
  align-items:stretch;
  border:var(--line);
  border-radius:4px;
  overflow:hidden;
  background:#fff;
  flex:0 0 auto;
}
.find input{
  border:0;
  background:#fff;
  color:#000;
  font-family:var(--sans);
  font-size:16px;
  padding:0 10px;
  width:158px;
  min-height:44px;
  outline:none;
}
.find button{
  border:0;
  border-left:var(--line);
  background:var(--red);
  color:#000;
  font-family:var(--mono);
  font-weight:700;
  font-size:15px;
  padding:0 12px;
  min-height:44px;
  cursor:pointer;
}
.find button:hover{background:#000;color:#fff}

.docknav{flex:1 1 auto;min-width:0}
.docknav ul{
  list-style:none;
  display:flex;
  gap:8px;
  margin:0;
  padding:0 2px 4px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.docknav ul::-webkit-scrollbar{display:none}
.docknav a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:10px 12px;
  min-height:44px;
  border:var(--line);
  border-radius:4px;
  background:#fff;
  text-decoration:none;
  font-family:var(--mono);
  font-size:16px;
  font-weight:600;
  white-space:nowrap;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease,color .15s ease;
}
.docknav a:hover,.docknav a.on{
  background:#000;
  color:#fff;
  transform:translate(-2px,-2px);
  box-shadow:3px 3px 0 #000;
}
.docknav .ico{display:flex;flex:0 0 auto}
.docknav .ico svg{width:14px;height:14px;display:block}

/* ---------- 头图 ---------- */
.hero{
  background:var(--sky);
  border-bottom:var(--line);
  min-height:45vh;
  display:flex;
  align-items:center;
  padding:34px 20px;
}
.hero-in{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
}
.art{
  flex:0 0 200px;
  width:200px;
  background:#fff;
  border:var(--line);
  border-radius:4px;
  box-shadow:7px 7px 0 #000;
  padding:8px;
}
.art svg{display:block;width:100%;height:auto}
.say{flex:1 1 auto;min-width:0;text-align:right}
h1{
  font-size:clamp(27px,5.2vw,58px);
  letter-spacing:-.02em;
  word-break:break-word;
}
.lede{
  font-family:var(--mono);
  font-size:15px;
  line-height:1.65;
  margin:15px 0 0 auto;
  max-width:50ch;
  border-right:7px solid #000;
  padding-right:12px;
}

/* ---------- 主体 ---------- */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:32px 20px 56px;
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:24px;
  align-items:start;
}

.rail{
  position:sticky;
  top:20px;
  background:#fff;
  border:var(--line);
  border-radius:4px;
  box-shadow:var(--hard);
  padding:14px;
}
.rail h2{font-size:15px;letter-spacing:.12em;margin-bottom:12px}
.rail h2 span{
  display:inline-block;
  background:var(--red);
  border:var(--line);
  border-radius:4px;
  padding:3px 9px;
}
.rail-list{
  list-style:none;
  counter-reset:n;
  margin:0 0 14px;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.rail-list li{counter-increment:n}
.rail-list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:42px;
  padding:8px 10px;
  border:var(--line);
  border-radius:4px;
  background:#fff;
  text-decoration:none;
  font-family:var(--mono);
  font-size:16px;
  font-weight:600;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}
.rail-list a::before{
  content:counter(n,decimal-leading-zero);
  color:var(--red);
  font-weight:700;
  font-size:13px;
}
.rail-list a:hover,.rail-list a.on{
  background:var(--sky);
  transform:translate(-2px,-2px);
  box-shadow:3px 3px 0 #000;
}
.totop{
  display:block;
  text-align:center;
  min-height:44px;
  padding:11px 10px;
  border:var(--line);
  border-radius:4px;
  background:#000;
  color:#fff;
  text-decoration:none;
  font-family:var(--mono);
  font-size:15px;
  font-weight:700;
}
.totop:hover{background:var(--red);color:#000}

.stage{
  min-width:0;
  background:#fff;
  border:var(--line);
  border-radius:4px;
  box-shadow:8px 8px 0 #000;
  padding:26px 28px;
}

.prose{max-width:76ch}
.prose>*+*{margin-top:18px}
.prose p{margin:0}
.prose h2{
  font-size:25px;
  margin-top:38px;
  padding-bottom:10px;
  border-bottom:var(--line);
}
.prose h3{font-size:20px;margin-top:28px}
.prose ul,.prose ol{padding-left:22px;margin:0}
.prose li{margin:6px 0}
.prose a{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:2px}
.prose a:hover{background:var(--sky)}
.prose img{
  display:block;
  max-width:100%;
  height:auto;
  border:var(--line);
  border-radius:4px;
}
.prose figure{margin:0}
.prose figcaption{font-family:var(--mono);font-size:15px;margin-top:8px}
.prose blockquote{
  margin:0;
  border:var(--line);
  border-left:9px solid var(--sky);
  background:#f2faff;
  border-radius:4px;
  padding:14px 16px;
}
.prose table{width:100%;border-collapse:collapse;font-size:16px}
.prose th,.prose td{border:2px solid #000;padding:8px 10px;text-align:left}
.prose th{background:var(--sky);font-family:var(--mono);font-size:15px}
.prose code{
  font-family:var(--mono);
  font-size:.94em;
  background:#ececec;
  padding:1px 5px;
  border-radius:3px;
}
.prose pre{
  font-family:var(--mono);
  font-size:15px;
  background:#111;
  color:#fff;
  border:var(--line);
  border-radius:4px;
  padding:14px;
  overflow:auto;
}
.prose pre code{background:none;padding:0}
.prose hr{border:0;border-top:3px dashed #9a9a9a;margin:26px 0}
.prose article[id]{scroll-margin-top:20px}
.prose article+article{
  margin-top:34px;
  padding-top:28px;
  border-top:3px solid var(--sky);
}

.reveal{opacity:0;transform:translateY(14px);transition:opacity .45s ease,transform .45s ease}
.reveal.in{opacity:1;transform:none}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:52px;
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr;
  background:#000;
  color:#fff;
  border-top:var(--line);
}
.foot article{padding:26px 22px;border-right:3px solid #fff;min-width:0}
.foot article:nth-of-type(3){border-right:0}
.foot h2{font-size:15px;letter-spacing:.1em;margin-bottom:12px}
.foot h2 span{
  display:inline-block;
  background:var(--sky);
  color:#000;
  border:3px solid #fff;
  border-radius:4px;
  padding:3px 9px;
}
.foot ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.foot li a{
  display:inline-block;
  min-height:42px;
  padding:9px 0;
  color:#fff;
  text-decoration:none;
  font-family:var(--mono);
  font-size:16px;
}
.foot li a:hover{color:var(--red);text-decoration:underline}
.foot .mark{border-color:#fff;width:34px;height:34px}
.f-name{font-family:var(--mono);font-weight:700;font-size:18px;margin:12px 0 0;line-height:1.35}
.f-kw-txt{font-family:var(--mono);font-size:16px;line-height:1.65;margin:0;color:#dcdcdc}
.f-base{grid-column:1/-1;text-align:center;padding:16px 20px;border-top:3px solid #fff}
.f-base p{margin:0;font-family:var(--mono);font-size:15px;color:#e6e6e6}
.f-base .sep{margin:0 8px;color:var(--red)}

/* ---------- 响应式 ---------- */
@media (max-width:900px){
  .wrap{grid-template-columns:1fr;padding:26px 16px 48px}
  .rail{position:static;box-shadow:4px 4px 0 #000}
  .rail-list{flex-direction:row;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .rail-list::-webkit-scrollbar{display:none}
  .rail-list a{white-space:nowrap}
  .totop{max-width:200px}
  .foot{grid-template-columns:1fr}
  .foot article{border-right:0;border-bottom:3px solid #fff}
  .foot article:nth-of-type(3){border-bottom:0}
}

@media (max-width:640px){
  .dock{flex-wrap:wrap;padding:8px 10px;gap:8px}
  .brand{flex:1 1 auto;font-size:15px}
  .find input{width:92px}
  .docknav{order:3;flex:1 0 100%}
  body{padding-bottom:158px}
  .hero{padding:22px 14px;min-height:42vh}
  .hero-in{gap:14px}
  .art{flex:0 0 104px;width:104px;box-shadow:5px 5px 0 #000;padding:6px}
  .lede{font-size:14px;border-right-width:5px}
  .stage{padding:18px 15px;box-shadow:5px 5px 0 #000}
  .prose h2{font-size:22px}
  .prose h3{font-size:19px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .docknav a,.rail-list a{transition:none}
  .docknav a:hover,.rail-list a:hover{transform:none}
}

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