:root{
  --blue:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#f7f4ee;
  --mark:#d9efff;
  --line:3px solid #000;
  --shadow:5px 5px 0 #000;
}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion: reduce){html{scroll-behavior:auto}}
*,*::before,*::after{box-sizing:border-box}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:"Plus Jakarta Sans",system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.7;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{display:block;max-width:100%}
h1,h2,h3{line-height:1.2;letter-spacing:-.015em;margin:0}
main [id]{scroll-margin-top:100px}
small{
  display:inline-block;
  font-size:16px;
  font-weight:800;
  letter-spacing:.06em;
  line-height:1.5;
  background:var(--blue);
  border:var(--line);
  border-radius:10px;
  padding:1px 10px;
  margin-bottom:8px;
}

/* 顶栏 */
.topbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  background:var(--blue);
  border-bottom:var(--line);
}
.brand{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  background:#fff;
  border:var(--line);
  border-radius:10px;
  box-shadow:4px 4px 0 #000;
  font-weight:800;
  font-size:20px;
  text-decoration:none;
  color:#000;
  overflow:hidden;
  transition:transform .14s,background .14s,box-shadow .14s;
}
.brand:hover{background:var(--red);transform:translate(-2px,-2px);box-shadow:6px 6px 0 #000}
.brand img{width:100%;height:100%;object-fit:contain}
.search{
  display:flex;
  gap:8px;
  margin-left:auto;
  flex:1 1 auto;
  max-width:430px;
  min-width:0;
}
.search input{
  flex:1 1 auto;
  min-width:0;
  height:44px;
  padding:0 12px;
  font:inherit;
  font-size:16px;
  color:#000;
  background:#fff;
  border:var(--line);
  border-radius:10px;
  box-shadow:3px 3px 0 #000;
}
.search input::placeholder{color:#000;opacity:.55}
.search input:focus{outline:3px solid #000;outline-offset:2px}
.search button{
  height:44px;
  padding:0 15px;
  font:inherit;
  font-size:16px;
  font-weight:800;
  color:#000;
  background:var(--red);
  border:var(--line);
  border-radius:10px;
  box-shadow:3px 3px 0 #000;
  cursor:pointer;
  transition:background .14s,transform .14s;
}
.search button:hover{background:#fff;transform:translate(-1px,-1px)}

/* 粘性锚点条 */
.anchorbar{
  position:sticky;
  top:0;
  z-index:30;
  background:#fff;
  border-bottom:var(--line);
  padding:8px 12px;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}
.anchorbar nav{max-width:1180px;margin:0 auto}
.anchorbar ul{
  display:flex;
  gap:8px;
  list-style:none;
  margin:0;
  padding:0;
}
.anchorbar li{flex:0 0 auto}
.anchorbar a{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:0 13px;
  font-size:16px;
  font-weight:700;
  color:#000;
  text-decoration:none;
  white-space:nowrap;
  background:#fff;
  border:var(--line);
  border-radius:10px;
  box-shadow:3px 3px 0 #000;
  transition:transform .14s,box-shadow .14s,background .14s;
}
.anchorbar a:hover{background:var(--red);transform:translate(-2px,-2px);box-shadow:5px 5px 0 #000}
.ic{width:11px;height:11px;flex:0 0 auto;border:2px solid #000;background:var(--blue)}
.anchorbar li:nth-child(2n) .ic{background:var(--red)}
.anchorbar li:nth-child(3n) .ic{background:#000}

/* 首屏 */
.hero{
  max-width:1180px;
  margin:0 auto;
  padding:26px 16px 40px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  background-image:radial-gradient(rgba(0,0,0,.16) 1.2px,transparent 1.2px);
  background-size:16px 16px;
  background-position:0 0;
}
.hero-copy{grid-column:1 / -1;min-width:0}
h1{
  font-size:clamp(2rem,8.4vw,3.1rem);
  font-weight:800;
  line-height:1.08;
  text-wrap:balance;
}
.lede{
  margin:14px 0 18px;
  font-size:17px;
  font-weight:500;
  max-width:44ch;
  border-left:6px solid var(--red);
  padding-left:12px;
}
.btn{
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:0 18px;
  font-size:17px;
  font-weight:800;
  color:#000;
  text-decoration:none;
  background:var(--red);
  border:var(--line);
  border-radius:10px;
  box-shadow:var(--shadow);
  transition:transform .14s,box-shadow .14s;
}
.btn:hover{transform:translate(-2px,-2px);box-shadow:7px 7px 0 #000}
.ph{
  position:relative;
  margin:0;
  width:100%;
  height:132px;
  overflow:hidden;
  border:var(--line);
  border-radius:10px;
  box-shadow:var(--shadow);
  background:var(--blue);
}
.ph-b{background:var(--red)}
.ph-img{width:100%;height:100%;object-fit:cover}
.ph-a{grid-column:1;grid-row:2}
.ph-b{grid-column:2;grid-row:2}
@media (min-width:840px){
  .hero{
    grid-template-columns:1.05fr .95fr;
    align-items:center;
    min-height:45vh;
    padding:44px 20px 70px;
    gap:20px;
  }
  .hero-copy{grid-column:1;grid-row:1;padding-right:8px}
  .ph-a{grid-column:2;grid-row:1;justify-self:start;width:76%;height:210px;transform:rotate(-4deg);z-index:2}
  .ph-b{grid-column:2;grid-row:1;justify-self:end;align-self:end;width:58%;height:158px;transform:rotate(5deg) translate(6px,54px);z-index:1}
}

/* 正文与右侧栏 */
.stage{
  max-width:1180px;
  margin:0 auto;
  padding:0 16px 56px;
  display:grid;
  gap:26px;
}
@media (min-width:940px){
  .stage{grid-template-columns:minmax(0,1fr) 300px;gap:34px;align-items:start;padding:0 20px 72px}
}
.reading{min-width:0}
.reading div{
  background:#fff;
  border:var(--line);
  border-radius:10px;
  box-shadow:var(--shadow);
  padding:20px 16px;
  margin:0 0 22px;
}
@media (min-width:700px){
  .reading div{padding:28px 26px;margin-bottom:28px}
}
.reading h2{font-size:clamp(1.35rem,3.2vw,1.7rem);margin:0 0 .55em}
.reading h3{font-size:1.17rem;margin:1.3em 0 .5em}
.reading p{margin:0 0 1em}
.reading ul,.reading ol{margin:0 0 1em;padding-left:1.35em}
.reading li{margin:.35em 0}
.reading a{color:#000;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.reading a:hover{background:var(--mark)}
.reading img{
  max-width:100%;
  height:auto;
  margin:12px 0;
  border:var(--line);
  border-radius:10px;
  box-shadow:4px 4px 0 #000;
}
.reading figure{margin:14px 0}
.reading blockquote{
  margin:14px 0;
  padding:12px 16px;
  background:var(--mark);
  border-left:6px solid var(--red);
  border-radius:0 10px 10px 0;
}
.reading table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:14px 0;
  font-size:16px;
}
.reading th,.reading td{border:2px solid #000;padding:8px 10px;text-align:left}
.reading code{padding:1px 5px;border:2px solid #000;border-radius:6px;background:var(--mark);font-size:15px}

.side{min-width:0}
@media (min-width:940px){.side{position:sticky;top:96px}}
.side-card{
  background:#fff;
  border:var(--line);
  border-radius:10px;
  box-shadow:var(--shadow);
  padding:16px;
}
.side-card h2{font-size:1.24rem;margin:0 0 .6em}
.side-list{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:7px}
.side-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  font-size:16px;
  font-weight:700;
  color:#000;
  text-decoration:none;
  background:var(--paper);
  border:var(--line);
  border-radius:10px;
  transition:background .14s,transform .14s;
}
.side-list a:hover{background:var(--blue);transform:translate(-2px,-2px)}
.to-top{
  width:100%;
  min-height:46px;
  font:inherit;
  font-size:16px;
  font-weight:800;
  color:#000;
  background:var(--red);
  border:var(--line);
  border-radius:10px;
  box-shadow:4px 4px 0 #000;
  cursor:pointer;
  transition:transform .14s,box-shadow .14s,background .14s;
}
.to-top:hover{background:#fff;transform:translate(-2px,-2px);box-shadow:6px 6px 0 #000}

/* 页脚 */
footer{background:var(--blue);border-top:var(--line);margin-top:8px}
.foot-grid{
  max-width:1180px;
  margin:0 auto;
  padding:26px 16px 10px;
  display:grid;
  gap:18px;
  grid-template-columns:1fr;
}
@media (min-width:680px){
  .foot-grid{grid-template-columns:repeat(3,minmax(0,1fr));padding:34px 20px 14px;gap:24px}
}
footer dl{margin:0}
footer dt{font-size:17px;font-weight:800;margin-bottom:4px}
footer dd{margin:0}
footer dd a{
  display:flex;
  align-items:center;
  min-height:44px;
  font-size:16px;
  font-weight:600;
  color:#000;
  text-decoration:none;
  border-bottom:3px solid transparent;
}
footer dd a:hover{border-bottom-color:#000}
.copy{
  max-width:1180px;
  margin:6px auto 0;
  padding:12px 16px 26px;
  font-size:16px;
  font-weight:600;
  border-top:3px solid #000;
}
.copy a{color:#000;text-decoration:none;border-bottom:3px solid #000}
.copy a:hover{background:var(--red)}

/* 入场动效 */
@media (prefers-reduced-motion: no-preference){
  .rv{opacity:0;transform:translateY(16px);transition:opacity .45s ease,transform .45s ease}
  .rv.in{opacity:1;transform:none}
}
@media (prefers-reduced-motion: reduce){
  .brand,.btn,.anchorbar a,.side-list a,.to-top,.search button{transition:none}
}

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