@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

:root{
  --ink:#000000;
  --blue:#3bb1ff;
  --red:#ff5252;
  --paper:#eaf6ff;
  --card:#ffffff;
  --tint:#fff2f2;
  --rail:250px;
}

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

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:'Atkinson Hyperlegible',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.65;
  color:var(--ink);
  background-color:var(--paper);
  background-image:radial-gradient(rgba(0,0,0,.14) 1.3px,transparent 1.3px);
  background-size:17px 17px;
  -webkit-text-size-adjust:100%;
}

img{max-width:100%}
a{color:var(--ink)}
p{margin:0}
ul,ol{margin:0}
:focus-visible{outline:3px solid var(--red);outline-offset:3px}

/* ---------- 顶栏 / 竖排导航 ---------- */
.top{
  position:sticky;
  top:0;
  z-index:60;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  background:var(--card);
  border-bottom:3px solid var(--ink);
}

.brand{
  flex:0 0 auto;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  background:var(--blue);
  border:3px solid var(--ink);
  border-radius:12px;
  box-shadow:3px 3px 0 var(--ink);
  text-decoration:none;
  overflow:hidden;
}
.brand:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 var(--ink)}
.brand:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.brand-txt{font-size:.74rem;font-weight:700;line-height:1;text-align:center;letter-spacing:.02em}
.brand img{width:100%;height:100%;object-fit:cover;display:block;border:0}

.nav{
  flex:1 1 auto;
  min-width:0;
}
.nav p{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:2px 2px 4px;
  scrollbar-width:thin;
}
.nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:8px 12px;
  white-space:nowrap;
  font-weight:700;
  font-size:.9rem;
  text-decoration:none;
  background:var(--card);
  border:3px solid var(--ink);
  border-radius:12px;
  box-shadow:3px 3px 0 var(--ink);
}
.nav a::before{
  content:"";
  width:9px;
  height:9px;
  margin-right:7px;
  background:var(--red);
  border:2px solid var(--ink);
  border-radius:50%;
  flex:0 0 auto;
}
.nav a:hover{background:var(--blue);transform:translate(-2px,-2px);box-shadow:5px 5px 0 var(--ink)}
.nav a:active{transform:translate(1px,1px);box-shadow:2px 2px 0 var(--ink)}

.call{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:8px 12px;
  font-weight:700;
  font-size:.9rem;
  text-decoration:none;
  background:var(--red);
  border:3px solid var(--ink);
  border-radius:12px;
  box-shadow:3px 3px 0 var(--ink);
}
.call:hover{transform:translate(-2px,-2px);box-shadow:5px 5px 0 var(--ink)}
.call-dot{width:10px;height:10px;border-radius:50%;background:var(--ink)}

/* ---------- 主体 ---------- */
.wrap{
  display:flex;
  flex-direction:column;
  gap:20px;
  padding:18px 14px 0;
}

.doc{
  background:var(--card);
  border:3px solid var(--ink);
  border-radius:18px;
  box-shadow:6px 6px 0 var(--ink);
  padding:0 16px 22px;
  overflow:hidden;
}

/* ---------- 首屏 ---------- */
.hero{
  display:grid;
  gap:16px;
  padding:22px 0 20px;
  min-height:42vh;
  align-content:center;
}
.hero-copy{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  text-align:center;
}
.hero h1{
  margin:0;
  font-size:clamp(1.65rem,6.4vw,2.7rem);
  line-height:1.14;
  letter-spacing:-.02em;
  text-shadow:3px 3px 0 rgba(59,177,255,.95);
}
.hero-lead{
  max-width:48ch;
  font-size:1rem;
  color:#111;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:11px 22px;
  font:inherit;
  font-weight:700;
  text-decoration:none;
  background:var(--blue);
  border:3px solid var(--ink);
  border-radius:14px;
  box-shadow:4px 4px 0 var(--ink);
}
.btn:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 var(--ink)}
.btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}

.hero-art-box{
  display:grid;
  place-items:center;
  min-height:170px;
  padding:0;
  background:var(--blue);
  border:3px solid var(--ink);
  border-radius:18px;
  box-shadow:5px 5px 0 var(--ink);
  overflow:hidden;
}
.hero-art{width:100%;height:100%;max-height:330px;object-fit:cover;display:block;border:0;border-radius:0;margin:0}
.hero-blob{
  width:92px;
  height:92px;
  border-radius:50%;
  background:var(--red);
  border:3px solid var(--ink);
  box-shadow:4px 4px 0 var(--ink);
}

/* ---------- 正文排版 ---------- */
.doc > section:not(.hero){
  border-top:3px solid var(--ink);
  padding:24px 0 4px;
  scroll-margin-top:88px;
}
.doc h2{
  margin:0 0 10px;
  font-size:clamp(1.22rem,4.6vw,1.65rem);
  line-height:1.22;
  letter-spacing:-.01em;
  text-decoration:underline;
  text-decoration-color:var(--red);
  text-decoration-thickness:5px;
  text-underline-offset:5px;
}
.doc h3{
  margin:22px 0 8px;
  font-size:1.08rem;
}
.doc p{margin:0 0 14px}
.doc ul,.doc ol{margin:0 0 14px;padding-left:1.25em}
.doc li{margin:0 0 8px}
.doc a{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.doc a:hover{background:var(--blue)}
.doc strong{background:var(--blue);padding:0 3px;border-radius:3px}
.doc blockquote{
  margin:18px 0;
  padding:12px 16px;
  background:var(--tint);
  border:3px solid var(--ink);
  border-left-width:9px;
  border-radius:14px;
  font-weight:700;
}
.doc img{
  display:block;
  max-width:100%;
  height:auto;
  margin:16px 0;
  border:3px solid var(--ink);
  border-radius:16px;
}
.doc table{
  display:block;
  overflow-x:auto;
  width:100%;
  border-collapse:collapse;
  margin:0 0 16px;
  font-size:.95rem;
}
.doc th,.doc td{border:3px solid var(--ink);padding:8px 10px;text-align:left}
.doc th{background:var(--blue)}
.doc code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.92em;
  background:#f1f1f1;
  border:2px solid var(--ink);
  border-radius:6px;
  padding:1px 5px;
}
.doc hr{border:0;border-top:3px solid var(--ink);margin:22px 0}

/* ---------- 侧栏目录 ---------- */
.rail{
  background:var(--card);
  border:3px solid var(--ink);
  border-radius:18px;
  box-shadow:5px 5px 0 var(--ink);
  padding:16px;
}
.rail h2{
  margin:0;
  font-size:1.1rem;
  letter-spacing:.02em;
}
.rail .subtitle{
  margin:2px 0 12px;
  font-size:.85rem;
  color:#333;
  border:0;
}
.toc{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.toc a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:8px 12px;
  font-size:.9rem;
  font-weight:700;
  text-decoration:none;
  background:var(--paper);
  border:3px solid var(--ink);
  border-radius:12px;
}
.toc a:hover{background:var(--blue);box-shadow:3px 3px 0 var(--ink)}

/* ---------- 页脚 ---------- */
.bottom{
  display:grid;
  gap:16px;
  padding:26px 14px 26px;
}
.bottom > section{
  background:var(--card);
  border:3px solid var(--ink);
  border-radius:18px;
  box-shadow:5px 5px 0 var(--ink);
  padding:18px;
}
.bottom > .foot-cta{
  background:var(--blue);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
}
.foot-cta h2{
  margin:0;
  font-size:clamp(1.45rem,6vw,2.1rem);
  line-height:1.15;
  letter-spacing:-.02em;
  text-shadow:3px 3px 0 rgba(255,255,255,.9);
}
.foot-name{
  margin:0 0 8px;
  font-weight:700;
  font-size:1.05rem;
}
.foot-line{font-size:.94rem;color:#222}
.foot-links ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:6px;
  grid-template-columns:repeat(auto-fit,minmax(136px,1fr));
}
.foot-links a{
  display:flex;
  align-items:center;
  min-height:44px;
  font-weight:700;
  font-size:.94rem;
  text-decoration:none;
}
.foot-links a::before{
  content:"";
  width:8px;
  height:8px;
  margin-right:8px;
  background:var(--red);
  border:2px solid var(--ink);
  border-radius:50%;
  flex:0 0 auto;
}
.foot-links a:hover{background:var(--blue)}
.foot-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-weight:700;
  font-size:.92rem;
  padding:0 4px;
}
.foot-bar a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 10px;
  text-decoration:none;
  border:3px solid var(--ink);
  border-radius:12px;
  background:var(--card);
  box-shadow:3px 3px 0 var(--ink);
}
.foot-bar a:hover{background:var(--red)}

/* ---------- 动效 ---------- */
.reveal{opacity:0;transform:translateY(16px);transition:opacity .55s ease,transform .55s ease}
.reveal.in{opacity:1;transform:none}

/* ---------- 宽屏：左侧固定竖排 ---------- */
@media (min-width:900px){
  .top{
    position:fixed;
    inset:0 auto 0 0;
    width:var(--rail);
    height:100vh;
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    padding:20px 16px 22px;
    border-bottom:0;
    border-right:3px solid var(--ink);
    overflow-y:auto;
  }
  .brand{align-self:flex-start}
  .nav{margin-top:16px;flex:1 1 auto}
  .nav p{flex-direction:column;overflow:visible;gap:10px;padding:0}
  .nav a{box-shadow:4px 4px 0 var(--ink)}
  .call{align-self:stretch;justify-content:center}

  .wrap{
    display:grid;
    grid-template-columns:258px minmax(0,1fr);
    align-items:start;
    gap:24px;
    margin-left:var(--rail);
    padding:30px 30px 0;
  }
  .doc{grid-column:2;grid-row:1}
  .rail{grid-column:1;grid-row:1;position:sticky;top:30px;margin:0}
  .toc{flex-direction:column;flex-wrap:nowrap}

  .hero{
    grid-template-columns:1.1fr .9fr;
    min-height:45vh;
    align-items:center;
    gap:22px;
  }
  .hero-art-box{height:100%;min-height:250px;align-self:stretch}

  .doc > section:not(.hero){padding:34px 0 6px;scroll-margin-top:26px}

  .bottom{
    margin-left:var(--rail);
    padding:32px 30px 26px;
    grid-template-columns:1.25fr 1fr;
  }
  .foot-cta{grid-column:1 / -1;flex-direction:row;align-items:center;justify-content:space-between}
  .foot-bar{grid-column:1 / -1}
}

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

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