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

:root{
  --blue:#3bb1ff;
  --red:#ff5252;
  --ink:#000;
  --paper:#fff;
  --dim:#eef4f9;
  --r:28px;
  --bd:3px solid var(--ink);
  --sh:6px 6px 0 var(--ink);
  --sh-sm:4px 4px 0 var(--ink);
}

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

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

body{
  margin:0;
  padding-bottom:108px;
  overflow-x:hidden;
  color:var(--ink);
  background-color:var(--paper);
  background-image:radial-gradient(rgba(0,0,0,.1) 1.5px,transparent 1.6px);
  background-size:20px 20px;
  font-family:'Poppins','Open Sans',"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.7;
  letter-spacing:.01em;
}

img{max-width:100%;height:auto;}
p{margin:0 0 14px;}
a{color:var(--ink);}

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

.skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:300;
  padding:12px 18px;
  border:var(--bd);
  border-radius:0 0 16px 0;
  background:var(--ink);
  color:#fff;
  font-weight:700;
  text-decoration:none;
}
.skip:focus{left:0;}

/* ---------- 版心 ---------- */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:22px 16px 0;
  display:grid;
  grid-template-columns:1fr;
  gap:22px;
}

.stream{order:1;min-width:0;}
.rail{order:2;}

@media (min-width:900px){
  .wrap{
    grid-template-columns:266px minmax(0,1fr);
    gap:34px;
    padding:42px 28px 0;
  }
  .rail{order:1;}
  .stream{order:2;}
}

/* ---------- 左侧索引 ---------- */
.rail{
  padding:20px 18px;
  border:var(--bd);
  border-radius:var(--r);
  background:var(--dim);
  box-shadow:var(--sh-sm);
}

@media (min-width:900px){
  .rail{
    position:sticky;
    top:26px;
    align-self:start;
  }
}

.rail-title{
  margin:0;
  padding-bottom:8px;
  border-bottom:3px solid var(--ink);
  font-size:1rem;
  font-weight:700;
  letter-spacing:.2em;
}

.subtitle{
  margin:8px 0 14px;
  font-size:1rem;
  font-weight:600;
  line-height:1.5;
  color:#1d2b36;
}

.rail-list{
  margin:0;
  padding:0;
  list-style:none;
}

.rail-list li{margin:0;}

.rail-list a{
  display:flex;
  gap:10px;
  align-items:baseline;
  min-height:42px;
  padding:9px 8px;
  border-bottom:2px solid rgba(0,0,0,.16);
  border-radius:10px;
  font-size:.95rem;
  font-weight:600;
  line-height:1.5;
  text-decoration:none;
}
.rail-list li:last-child a{border-bottom:0;}

.rail-list a:hover{background:var(--blue);}

.rail-list a[aria-current="true"]{background:var(--blue);}

.rail-list .num{
  flex:0 0 auto;
  font-size:.8rem;
  font-weight:700;
  color:var(--red);
  letter-spacing:.06em;
}

/* ---------- 头图 ---------- */
.doc{min-width:0;}

.hero{
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:6px 0 30px;
  margin-bottom:26px;
  border-bottom:3px solid var(--ink);
}

@media (min-width:900px){
  .hero{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    min-height:58vh;
    padding:14px 0 34px;
  }
}

.hero-copy{min-width:0;}

.hero h1{
  margin:0;
  font-size:clamp(2rem,8.6vw,4.2rem);
  font-weight:700;
  line-height:1.06;
  letter-spacing:-.02em;
  overflow-wrap:break-word;
}

.hero h1::after{
  content:"";
  display:block;
  width:88px;
  height:12px;
  margin-top:16px;
  border:3px solid var(--ink);
  border-radius:99px;
  background:var(--red);
}

.lede{
  margin:18px 0 0;
  max-width:46ch;
  font-size:1.05rem;
  line-height:1.65;
  color:#1f2b34;
}

.hero-art{
  flex:0 0 auto;
  display:grid;
  place-items:center;
}

.hero-img,
.hero-mark{
  width:104px;
  height:104px;
  border:var(--bd);
  border-radius:24px;
  background:var(--blue);
  box-shadow:var(--sh);
  object-fit:cover;
  transform:rotate(-4deg);
}

.hero-mark{
  display:grid;
  place-items:center;
  font-size:2.6rem;
  font-weight:700;
  line-height:1;
}

@media (min-width:900px){
  .hero-img,
  .hero-mark{
    width:176px;
    height:176px;
    font-size:4.2rem;
  }
}

/* ---------- 正文分区 ---------- */
.doc > div{
  margin:0 0 26px;
  padding:24px 20px;
  border:var(--bd);
  border-bottom:10px solid var(--blue);
  border-radius:var(--r);
  background:var(--paper);
  box-shadow:var(--sh);
  scroll-margin-top:18px;
  transition:transform .18s ease,box-shadow .18s ease;
}

.doc > div:nth-of-type(even){border-bottom-color:var(--red);}

@media (min-width:900px){
  .doc > div{padding:32px 30px;}
  .doc > div:hover{
    transform:translate(-3px,-3px);
    box-shadow:9px 9px 0 var(--ink);
  }
}

.doc h2{
  margin:0 0 14px;
  font-size:clamp(1.4rem,5.2vw,2rem);
  font-weight:700;
  line-height:1.28;
  letter-spacing:-.01em;
}

.doc h3{
  margin:22px 0 10px;
  font-size:1.16rem;
  font-weight:700;
  line-height:1.4;
}

.doc ul,
.doc ol{
  margin:0 0 16px;
  padding-left:24px;
}

.doc li{margin:0 0 8px;}

.doc a{
  color:#0a5c93;
  font-weight:600;
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.doc a:hover{background:var(--blue);color:var(--ink);}

.doc strong{
  font-weight:700;
  background:var(--blue);
  padding:0 4px;
  border-radius:6px;
}

.doc blockquote{
  margin:0 0 16px;
  padding:14px 18px;
  border:var(--bd);
  border-radius:18px;
  background:var(--dim);
}

.doc blockquote p:last-child{margin-bottom:0;}

.doc img{
  border:var(--bd);
  border-radius:18px;
  box-shadow:var(--sh-sm);
}

.doc hr{
  margin:24px 0;
  border:0;
  border-top:3px solid var(--ink);
}

.doc code{
  padding:1px 6px;
  border-radius:6px;
  background:var(--dim);
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:.92em;
}

.doc pre{
  overflow-x:auto;
  padding:16px;
  border:var(--bd);
  border-radius:18px;
  background:var(--dim);
}

.doc pre code{padding:0;background:none;}

.doc table{
  width:100%;
  border-collapse:collapse;
  font-size:.96rem;
}

.doc th,
.doc td{
  padding:9px 10px;
  border:2px solid var(--ink);
  text-align:left;
}

.doc th{background:var(--dim);}

/* ---------- 页脚 ---------- */
.foot{
  max-width:1180px;
  margin:36px auto 0;
  padding:16px 16px 10px;
  border-top:3px solid var(--ink);
  display:flex;
  flex-wrap:wrap;
  gap:8px 24px;
  align-items:center;
  justify-content:space-between;
  font-size:.95rem;
  font-weight:600;
}

@media (min-width:900px){
  .foot{padding:18px 28px 12px;}
}

.foot div{margin:0;}

.foot a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 12px;
  border:var(--bd);
  border-radius:14px;
  background:var(--paper);
  box-shadow:3px 3px 0 var(--ink);
  font-weight:700;
  text-decoration:none;
}

.foot a:hover{
  background:var(--blue);
  transform:translate(-2px,-2px);
  box-shadow:5px 5px 0 var(--ink);
}

/* ---------- 底部固定条 ---------- */
.dock{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:80;
  height:72px;
  padding:0 14px;
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--paper);
  border-top:3px solid var(--ink);
}

.dock-brand{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  overflow:hidden;
  border:var(--bd);
  border-radius:16px;
  background:var(--blue);
  box-shadow:var(--sh-sm);
  text-decoration:none;
}

.dock-brand img{width:100%;height:100%;object-fit:cover;}

.dock-mark{
  font-size:1.15rem;
  font-weight:700;
  line-height:1;
}

.dock-menu{
  flex:1 1 auto;
  display:flex;
  justify-content:center;
  min-width:0;
}

.dock-menu > summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 20px;
  border:var(--bd);
  border-radius:16px;
  background:var(--ink);
  color:#fff;
  font-size:1rem;
  font-weight:700;
  cursor:pointer;
  box-shadow:var(--sh-sm);
  user-select:none;
}

.dock-menu > summary::-webkit-details-marker{display:none;}

.dock-menu > summary:hover{background:#1b1b1b;}

.dock-menu > menu{
  position:fixed;
  left:0;
  right:0;
  bottom:72px;
  z-index:1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:0;
  padding:16px 16px 20px;
  max-height:64vh;
  overflow-y:auto;
  list-style:none;
  background:var(--paper);
  border-top:3px solid var(--ink);
  box-shadow:0 -6px 0 rgba(0,0,0,.1);
}

.dock-menu > menu li{display:flex;}

.dock-menu > menu a{
  display:flex;
  align-items:center;
  width:100%;
  min-height:46px;
  padding:8px 12px;
  border:var(--bd);
  border-radius:14px;
  background:var(--paper);
  box-shadow:3px 3px 0 var(--ink);
  font-size:.95rem;
  font-weight:600;
  line-height:1.4;
  text-decoration:none;
}

.dock-menu > menu a:hover{background:var(--blue);}

.dock-cta{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 18px;
  border:var(--bd);
  border-radius:16px;
  background:var(--red);
  color:var(--ink);
  font-size:1rem;
  font-weight:700;
  text-decoration:none;
  box-shadow:var(--sh-sm);
}

.dock-cta:hover{
  transform:translate(-2px,-2px);
  box-shadow:6px 6px 0 var(--ink);
}

@media (min-width:900px){
  .dock{padding:0 26px;gap:20px;}

  .dock-menu{
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  .dock-menu > summary{display:none;}

  .dock-menu > menu{
    position:static;
    display:flex;
    flex-wrap:wrap;
    gap:4px;
    max-height:none;
    overflow:visible;
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
  }

  .dock-menu > menu a{
    min-height:42px;
    padding:8px 13px;
    border:0;
    border-radius:12px;
    background:transparent;
    box-shadow:none;
  }
}

/* ---------- 动效 ---------- */
.reveal{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .45s ease,transform .45s ease;
}

.reveal.is-in{
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  .reveal{
    opacity:1;
    transform:none;
    transition:none;
  }
  .doc > div,
  .dock-cta,
  .foot a{transition:none;}
  .doc > div:hover,
  .dock-cta:hover,
  .foot a:hover{transform:none;}
}

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