@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Righteous&display=swap');

:root{
  --blue:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#fff8ec;
  --w:#fff;
  --line:3px solid #000;
  --sh:6px 6px 0 #000;
  --sh-s:4px 4px 0 #000;
  --maxw:1180px;
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:#0b0b0b;
  font-family:Poppins,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.72;
  overflow-x:hidden;
}

img{display:block;max-width:100%;height:auto}
a{color:inherit}
p{margin:0 0 1em}
ul,ol{margin:0;padding:0}

h1,h2,h3,h4{
  font-family:Righteous,Poppins,"PingFang SC","Microsoft YaHei",sans-serif;
  font-weight:700;
  line-height:1.22;
  letter-spacing:.3px;
  margin:0 0 .55em;
}

:focus-visible{outline:3px solid var(--red);outline-offset:3px}

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

/* ---------- 顶部：品牌居中、菜单两侧 ---------- */
.site-top{
  position:sticky;
  top:0;
  z-index:60;
  background:var(--paper);
  border-bottom:var(--line);
  max-width:100%;
}

.nav{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
  max-width:var(--maxw);
  margin:0 auto;
  padding:10px 14px 8px;
}

.menu{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:2px;
  list-style:none;
  min-width:0;
}
.menu--l{justify-content:flex-end}
.menu--r{justify-content:flex-start}

.menu a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:8px 9px;
  font-size:16px;
  font-weight:600;
  text-decoration:none;
  border:3px solid transparent;
  border-radius:4px;
}
.menu a:hover,
.menu a:focus-visible{
  border-color:#000;
  background:var(--blue);
  box-shadow:3px 3px 0 #000;
}

.ico{
  width:9px;height:9px;
  flex:0 0 auto;
  border:2px solid #000;
  background:var(--blue);
  transform:rotate(45deg);
}
.ico-1{background:var(--red)}
.ico-2{background:#000;border-radius:50%;transform:none}

.brand{
  font-family:Righteous,"PingFang SC",sans-serif;
  font-weight:700;
  font-size:21px;
  line-height:1.1;
  white-space:nowrap;
  text-decoration:none;
  padding:9px 16px;
  border:var(--line);
  border-radius:4px;
  background:var(--red);
  box-shadow:var(--sh-s);
  transform:rotate(-1deg);
}

/* ---------- 二级锚点条 + 搜索 ---------- */
.stripbar{
  display:flex;
  align-items:center;
  gap:10px;
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 14px 9px;
  min-width:0;
}

.strip{
  display:flex;
  flex:1 1 auto;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding-bottom:2px;
}
.strip::-webkit-scrollbar{display:none}

.strip-list{
  display:flex;
  gap:7px;
  list-style:none;
  flex:0 0 auto;
}
.strip-list a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:40px;
  padding:5px 11px;
  font-size:15px;
  font-weight:600;
  white-space:nowrap;
  text-decoration:none;
  border:2px solid #000;
  border-radius:4px;
  background:var(--w);
}
.strip-list a:hover{background:var(--blue);box-shadow:2px 2px 0 #000}
.num{
  font-family:Righteous,sans-serif;
  font-size:12px;
  color:#000;
  background:var(--blue);
  border:2px solid #000;
  border-radius:2px;
  padding:0 4px;
  line-height:1.4;
}

.search{
  display:flex;
  flex:0 0 auto;
  min-width:0;
  gap:0;
}
.search input{
  width:130px;
  min-width:0;
  min-height:40px;
  padding:6px 10px;
  font:inherit;
  font-size:15px;
  border:2px solid #000;
  border-right:0;
  border-radius:4px 0 0 4px;
  background:var(--w);
  color:#000;
}
.search button{
  flex:0 0 auto;
  min-height:40px;
  padding:6px 12px;
  font:inherit;
  font-size:15px;
  font-weight:700;
  border:2px solid #000;
  border-radius:0 4px 4px 0;
  background:var(--ink);
  color:#fff;
  cursor:pointer;
}
.search button:hover{background:var(--red);color:#000}

/* ---------- 布局 ---------- */
.wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:30px;
  align-items:start;
  max-width:var(--maxw);
  margin:0 auto;
  padding:30px 14px 64px;
}

.doc{min-width:0;max-width:100%;counter-reset:sec}

.doc > div{scroll-margin-top:150px}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  display:grid;
  place-items:center;
  min-height:45vh;
  padding:44px 18px 62px;
  text-align:center;
  background:var(--blue);
  border:var(--line);
  border-radius:4px;
  box-shadow:var(--sh);
  overflow:hidden;
  clip-path:polygon(0 0,100% 0,100% calc(100% - 38px),0 100%);
  margin-bottom:30px;
}

.hero-media{position:absolute;inset:0;z-index:0}
.hero-media img{width:100%;height:100%;object-fit:cover}
.hero-media::after{
  content:"";
  position:absolute;inset:0;
  background:rgba(59,177,255,.45);
}

.ghost{
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%) rotate(-7deg);
  z-index:1;
  font-family:Righteous,"PingFang SC",sans-serif;
  font-weight:700;
  font-size:clamp(64px,15vw,180px);
  line-height:1;
  white-space:nowrap;
  color:rgba(0,0,0,.14);
  -webkit-text-stroke:3px rgba(0,0,0,.5);
  pointer-events:none;
  user-select:none;
}

.hero-copy{position:relative;z-index:2;min-width:0;max-width:100%}
.hero h1{
  display:inline-block;
  max-width:100%;
  margin:0;
  padding:14px 22px;
  font-size:clamp(26px,5.4vw,52px);
  background:var(--w);
  border:4px solid #000;
  border-radius:4px;
  box-shadow:8px 8px 0 #000;
  transform:rotate(-1.5deg);
  overflow-wrap:break-word;
}

/* ---------- 正文区块 ---------- */
.doc > div:not(.hero){
  position:relative;
  counter-increment:sec;
  padding:26px 24px 30px 68px;
  margin:0 0 26px;
  background:var(--w);
  border:var(--line);
  border-bottom:8px solid var(--red);
  border-radius:4px;
  box-shadow:var(--sh-s);
  overflow-x:auto;
  overflow-wrap:break-word;
  word-break:break-word;
  min-width:0;
}
.doc > div:not(.hero)::before{
  content:counter(sec,decimal-leading-zero);
  position:absolute;
  left:16px;
  top:26px;
  font-family:Righteous,sans-serif;
  font-size:19px;
  line-height:1;
  padding:4px 7px;
  background:var(--blue);
  border:3px solid #000;
  border-radius:3px;
}

.doc :is(h2,h3){
  margin:1.15em 0 .5em;
  padding-left:12px;
  border-left:8px solid var(--red);
  font-size:clamp(21px,2.6vw,27px);
}
.doc :is(h2,h3):first-child{margin-top:0}
.doc :is(h2,h3) span{background:linear-gradient(transparent 62%,var(--blue) 62%)}

.doc p{max-width:64ch}
.doc ul,.doc ol{padding-left:1.35em;margin:0 0 1em}
.doc li{margin:.3em 0}
.doc a{
  text-decoration:underline;
  text-decoration-thickness:3px;
  text-decoration-color:var(--blue);
  text-underline-offset:2px;
  overflow-wrap:break-word;
}
.doc a:hover{text-decoration-color:var(--red);background:rgba(255,82,82,.16)}
.doc strong{background:var(--blue);padding:0 3px}
.doc blockquote{
  margin:1.2em 0;
  padding:14px 18px;
  border:3px solid #000;
  border-radius:4px;
  background:var(--paper);
  box-shadow:var(--sh-s);
}
.doc blockquote p:last-child{margin-bottom:0}
.doc img{border:3px solid #000;border-radius:4px;margin:1em 0;max-width:100%}

.doc table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:1em 0;
  background:var(--w);
}
.doc :is(th,td){
  border:2px solid #000;
  padding:7px 10px;
  text-align:left;
  font-size:15px;
  line-height:1.5;
}
.doc th{background:var(--blue)}
.doc pre{
  max-width:100%;
  overflow-x:auto;
  margin:1em 0;
  padding:12px 14px;
  border:3px solid #000;
  border-radius:4px;
  background:var(--w);
  font-size:15px;
  line-height:1.6;
}
.doc pre code{white-space:pre}
.doc :is(iframe,video){max-width:100%}

/* ---------- 侧栏 ---------- */
.side{
  position:sticky;
  top:140px;
  display:grid;
  gap:18px;
  align-content:start;
  min-width:0;
}

.side-box{
  padding:14px;
  background:var(--w);
  border:var(--line);
  border-radius:4px;
  box-shadow:var(--sh-s);
  min-width:0;
}
.side-box--red{background:#fff0f0}

.side-h{
  font-size:17px;
  margin:0 0 10px;
  padding-bottom:8px;
  border-bottom:3px solid #000;
}
.side-h span{
  background:var(--blue);
  padding:1px 8px;
  border:2px solid #000;
  border-radius:3px;
}
.side-box--red .side-h span{background:var(--red)}

.side-list{list-style:none;display:grid;gap:6px;min-width:0}
.side-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:6px 9px;
  font-size:15px;
  line-height:1.35;
  text-decoration:none;
  border:2px solid #000;
  border-radius:3px;
  background:var(--paper);
  overflow-wrap:break-word;
}
.side-list a:hover{background:var(--blue);box-shadow:2px 2px 0 #000}
.side-list a.dim{opacity:.32}
.side-list a.on{background:var(--blue);box-shadow:2px 2px 0 #000}

/* ---------- 页脚 ---------- */
.foot{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
  gap:10px 24px;
  padding:38px clamp(16px,6vw,60px) 22px;
  border-top:6px solid #000;
  background:#000;
  color:#fff;
  overflow:hidden;
}
.foot p{margin:0;min-width:0}
.foot-brand{
  font-family:Righteous,"PingFang SC",sans-serif;
  font-weight:700;
  font-size:clamp(26px,5.2vw,52px);
  line-height:1;
  letter-spacing:1px;
  color:var(--blue);
  overflow-wrap:break-word;
}
.foot-col a{
  display:block;
  min-height:40px;
  line-height:40px;
  color:#fff;
  text-decoration:none;
  font-size:16px;
}
.foot-col a:hover{color:var(--red);text-decoration:underline;text-decoration-thickness:3px}
.copy{
  grid-column:1/-1;
  display:block;
  margin-top:16px;
  padding-top:14px;
  border-top:2px solid #333;
  font-size:15px;
  color:#b9b9b9;
}

/* ---------- 入场动效 ---------- */
@media (prefers-reduced-motion:no-preference){
  .menu li{animation:drop .42s cubic-bezier(.2,.8,.3,1) backwards}
  .menu li:nth-child(2){animation-delay:.05s}
  .menu li:nth-child(3){animation-delay:.1s}
  .menu li:nth-child(4){animation-delay:.15s}
  .menu li:nth-child(5){animation-delay:.2s}
  .menu li:nth-child(6){animation-delay:.25s}
  .menu li:nth-child(7){animation-delay:.3s}
}
@keyframes drop{
  from{opacity:0;transform:translateY(-10px)}
  to{opacity:1;transform:none}
}

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

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

/* ---------- 断点 ---------- */
@media (max-width:1000px){
  .nav{grid-template-columns:minmax(0,1fr);padding-top:12px}
  .brand{order:-1;justify-self:center;font-size:20px}
  .menu{justify-content:center}
  .menu a{font-size:15px;padding:8px 8px}
  .wrap{grid-template-columns:minmax(0,1fr);gap:24px}
  .side{position:static;grid-template-columns:1fr 1fr}
  .foot{grid-template-columns:1fr 1fr}
  .foot-brand{grid-column:1/-1}
}

@media (max-width:640px){
  body{font-size:16px}
  .site-top{position:static}
  .nav{padding:10px 12px 6px;gap:6px}
  .menu a{font-size:15px;padding:7px 7px;gap:5px}
  .stripbar{flex-wrap:wrap;gap:8px;padding:0 12px 10px}
  .strip{flex:1 1 100%;order:1}
  .search{order:2;width:100%}
  .search input{flex:1 1 auto;width:auto}
  .search button{padding:6px 14px}
  .wrap{padding:22px 12px 52px}
  .hero{min-height:38vh;padding:34px 12px 50px}
  .hero h1{font-size:clamp(24px,7vw,34px);padding:12px 14px;box-shadow:5px 5px 0 #000}
  .doc > div:not(.hero){padding:20px 14px 24px 46px}
  .doc > div:not(.hero)::before{left:10px;top:20px;font-size:15px;padding:3px 6px}
  .doc > div{scroll-margin-top:20px}
  .doc p{max-width:none}
  .side{grid-template-columns:1fr}
  .foot{grid-template-columns:1fr;gap:4px}
  .ghost{font-size:clamp(46px,18vw,100px)}
}

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