:root{
  --paper:#fafaf8;
  --graphite:#4a4a4a;
  --ink:#1a1a1a;
  --wash:rgba(26,26,26,.12);
}

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

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

body{
  margin:0;
  font-family:'Rubik','Nunito Sans',-apple-system,BlinkMacSystemFont,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background-color:var(--paper);
  background-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23p)' opacity='0.065'/%3E%3C/svg%3E");
  overflow-x:hidden;
  overflow-wrap:break-word;
}

img{max-width:100%;height:auto;display:block}
a{color:var(--ink)}
p{margin:0 0 1em}

.shell{
  max-width:1180px;
  min-width:0;
  margin:0 auto;
  padding:0 18px 0;
}

/* ---------- 顶部细条 ---------- */
.strip{
  border-bottom:2px solid var(--ink);
  padding:5px 0;
  overflow:hidden;
}
.strip__txt{
  margin:0;
  font-size:16px;
  letter-spacing:.16em;
  text-align:center;
  color:var(--graphite);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---------- 报头 ---------- */
.masthead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-width:0;
  padding:12px 0 12px;
  border-bottom:2px solid var(--ink);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-width:0;
  min-height:44px;
  padding:4px 8px 4px 2px;
  text-decoration:none;
  color:var(--ink);
}
.brand__ink,.brand__img{flex:none;transform:rotate(-3deg)}
.brand__txt{
  font-size:19px;
  font-weight:700;
  letter-spacing:.02em;
  line-height:1.3;
  overflow-wrap:anywhere;
}

.groups{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.grp{position:relative;min-width:0}

.grp__btn{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:8px 14px;
  font:inherit;
  font-size:16px;
  line-height:1.4;
  color:var(--ink);
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:12px 7px 13px 8px / 8px 13px 7px 12px;
  cursor:pointer;
}
.grp__btn:hover{background:#f0efeb}
.grp__caret{
  width:9px;height:9px;
  border-right:2px solid var(--ink);
  border-bottom:2px solid var(--ink);
  transform:rotate(45deg) translate(-1px,-1px);
}
.grp__list{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  z-index:40;
  margin:0;
  padding:8px;
  min-width:184px;
  max-width:min(76vw,260px);
  list-style:none;
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:10px;
  display:none;
}
.grp__a{
  display:block;
  padding:10px 12px;
  min-height:44px;
  font-size:16px;
  line-height:1.5;
  text-decoration:none;
  border-radius:8px;
  white-space:normal;
}
.grp__a:hover{background:#eceae4;text-decoration:underline}

@media (hover:hover){
  .grp:hover .grp__list,
  .grp:focus-within .grp__list{display:block}
}
.grp.is-open .grp__list{display:block}

/* ---------- hero ---------- */
.hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  gap:26px;
  align-items:center;
  min-width:0;
  min-height:45vh;
  padding:26px 0 34px;
  overflow:hidden;
  border-bottom:2px solid var(--ink);
}
.hero__ghost{
  position:absolute;
  left:-6px;
  bottom:-16px;
  margin:0;
  max-width:100%;
  font-size:clamp(88px,20vw,190px);
  line-height:.66;
  font-weight:700;
  letter-spacing:-.05em;
  color:transparent;
  -webkit-text-stroke:2px rgba(26,26,26,.16);
  pointer-events:none;
  user-select:none;
}
.hero__txt{
  position:relative;
  z-index:2;
  min-width:0;
  text-align:center;
}
.hero__h1{
  margin:0 0 14px;
  font-size:clamp(29px,5.4vw,52px);
  line-height:1.22;
  font-weight:700;
  letter-spacing:-.01em;
  overflow-wrap:anywhere;
  text-shadow:3px 3px 0 rgba(255,255,255,.85);
}
.hero__desc{
  margin:0 auto 18px;
  max-width:34ch;
  font-size:17px;
  color:var(--graphite);
}
.hero__cta{
  display:inline-block;
  padding:11px 22px;
  min-height:44px;
  font-size:16px;
  font-weight:600;
  color:var(--paper);
  background:var(--ink);
  text-decoration:none;
  border-radius:14px 7px 15px 8px / 8px 15px 7px 14px;
  transform:rotate(-1deg);
}
.hero__cta:hover{background:var(--graphite)}

.hero__fig{
  position:relative;
  z-index:1;
  min-width:0;
  margin:0;
  aspect-ratio:4/3;
  border:2px solid var(--ink);
  border-radius:10px;
  background:#eeece6;
  transform:rotate(1.2deg);
  overflow:hidden;
}
.hero__fig::after{
  content:"";
  position:absolute;
  top:-9px;left:50%;
  width:78px;height:19px;
  margin-left:-39px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(26,26,26,.28);
  transform:rotate(-3deg);
  pointer-events:none;
}
.hero__img{
  width:100%;height:100%;
  max-width:100%;
  object-fit:cover;
  filter:grayscale(.22) contrast(1.07);
}
.hero__fig--multi .hero__img{
  position:absolute;inset:0;
  opacity:0;
}
.hero__fig--multi .hero__img.is-on{opacity:1}

/* ---------- 粘性锚点条 ---------- */
.anchorbar{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  padding:6px 0;
  background:var(--paper);
  background-image:none;
  border-bottom:2px dashed var(--ink);
}
.anchorbar__ttl{
  margin:0;
  flex:none;
  font-size:16px;
  font-weight:700;
  line-height:1.4;
  padding-right:12px;
  border-right:2px solid var(--ink);
}
.anchorbar__lbl{display:block}
.anchorbar__rail{
  min-width:0;
  display:flex;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:thin;
  padding:4px 0;
  -webkit-overflow-scrolling:touch;
}
.anchorbar__a{
  flex:none;
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 12px;
  font-size:16px;
  line-height:1.4;
  text-decoration:none;
  white-space:nowrap;
  color:var(--graphite);
  border:1px solid transparent;
  border-radius:10px;
}
.anchorbar__a:hover{
  color:var(--ink);
  border-color:var(--ink);
  background:#f0efeb;
}

/* ---------- 双栏布局 ---------- */
.layout{
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:34px;
  align-items:start;
  min-width:0;
  padding:30px 0 48px;
}
.layout>*{min-width:0}

.toc{
  position:sticky;
  top:76px;
  min-width:0;
  border:2px solid var(--ink);
  border-radius:10px;
  padding:14px 14px 18px;
  background:var(--paper);
  transform:rotate(-.5deg);
}
.toc__ttl{
  margin:0 0 12px;
  font-size:16px;
  font-weight:700;
  line-height:1.4;
}
.toc__lbl{display:inline-block}
.ink{
  display:block;
  height:6px;
  margin-top:3px;
  background:repeating-linear-gradient(90deg,var(--ink) 0 9px,transparent 9px 15px);
  opacity:.55;
}
.toc__list{
  margin:0;
  padding:0;
  min-width:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.toc__a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:5px 6px;
  font-size:16px;
  line-height:1.45;
  text-decoration:none;
  border-bottom:1px dashed var(--wash);
}
.toc__a:hover{background:#f0efeb}
.toc__n{
  flex:none;
  font-size:16px;
  font-weight:700;
  color:var(--graphite);
  font-variant-numeric:tabular-nums;
}

/* ---------- 正文纸面 ---------- */
.paper{
  min-width:0;
  max-width:100%;
  overflow-x:hidden;
  padding:2px 0 10px;
  overflow-wrap:break-word;
  word-break:break-word;
}
.paper > *{
  max-width:100%;
}
.paper section{
  scroll-margin-top:96px;
  padding-bottom:26px;
}
.paper section + section{
  padding-top:26px;
  border-top:2px dashed rgba(26,26,26,.24);
}
.paper h2{
  margin:0 0 14px;
  font-size:clamp(22px,3vw,30px);
  line-height:1.32;
  font-weight:700;
  letter-spacing:-.01em;
}
.paper h3{
  margin:22px 0 10px;
  font-size:20px;
  line-height:1.4;
  font-weight:700;
}
.paper h2 span,.paper h3 span{
  background:linear-gradient(transparent 74%,rgba(26,26,26,.16) 74%);
}
.paper p{margin:0 0 1.05em}
.paper ul,.paper ol{margin:0 0 1.05em;padding-left:1.35em}
.paper li{margin:0 0 .45em}
.paper a{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  overflow-wrap:anywhere;
}
.paper a:hover{background:#eceae4}
.paper img{
  width:auto;
  max-width:100%;
  height:auto;
  border:2px solid var(--ink);
  border-radius:10px;
  filter:grayscale(.18) contrast(1.06);
  margin:12px 0;
}
.paper figure{
  margin:12px 0;
  max-width:100%;
}
.paper video,
.paper iframe,
.paper embed{
  display:block;
  width:100%;
  max-width:100%;
  border:2px solid var(--ink);
  border-radius:10px;
}
.paper blockquote{
  margin:0 0 1.05em;
  padding:10px 16px;
  max-width:100%;
  border-left:5px solid var(--ink);
  background:#f1efe9;
  border-radius:0 10px 10px 0;
}
.paper pre{
  margin:0 0 1.05em;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:12px 14px;
  font-size:15px;
  line-height:1.6;
  background:#f1efe9;
  border:2px solid var(--ink);
  border-radius:10px;
  overflow-wrap:normal;
  word-break:normal;
}
.paper code{
  overflow-wrap:anywhere;
}
.paper pre code{overflow-wrap:normal}
.paper table{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  margin:0 0 1.05em;
  border-collapse:collapse;
  font-size:16px;
}
.paper th,.paper td{
  padding:8px 10px;
  border:1px solid var(--wash);
  text-align:left;
  white-space:nowrap;
}

/* ---------- 页脚 ---------- */
.colophon{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) minmax(0,1fr);
  gap:20px;
  align-items:center;
  min-width:0;
  padding:26px 0 40px;
  margin-top:8px;
  border-top:2px solid var(--ink);
}
.colophon>*{min-width:0}
.colophon p{margin:0}
.colophon__brand{
  font-size:18px;
  font-weight:700;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.colophon__sub{
  display:flex;
  gap:8px;
  min-width:0;
  flex-wrap:wrap;
  justify-content:center;
}
.subform__i{
  flex:1 1 130px;
  min-width:0;
  min-height:44px;
  padding:8px 12px;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:10px;
}
.subform__b{
  flex:none;
  min-height:44px;
  padding:8px 18px;
  font:inherit;
  font-size:16px;
  font-weight:600;
  color:var(--paper);
  background:var(--ink);
  border:2px solid var(--ink);
  border-radius:10px;
  cursor:pointer;
}
.subform__b:hover{background:var(--graphite)}
.colophon__jump{
  display:flex;
  gap:12px;
  min-width:0;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.colophon__jump a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:16px;
  color:var(--graphite);
  text-decoration:underline;
  text-underline-offset:3px;
}
.colophon__jump a:hover{color:var(--ink)}
.colophon__c{
  grid-column:1 / -1;
  display:block;
  text-align:center;
  font-size:16px;
  color:var(--graphite);
  padding-top:14px;
  border-top:1px dashed var(--wash);
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion:no-preference){
  .hero__fig--multi .hero__img{
    transition:opacity .22s steps(3,end);
  }
  .brand__ink{animation:jitter 5s steps(2,end) infinite}
  @keyframes jitter{
    0%,92%,100%{transform:rotate(-3deg)}
    94%{transform:rotate(2deg) translate(1px,-1px)}
    96%{transform:rotate(-5deg)}
  }
  .hero__cta,.grp__btn,.subform__b,.anchorbar__a{
    transition:background-color .12s linear,color .12s linear,border-color .12s linear;
  }
  .hero__cta:hover{transform:rotate(-1deg) translate(-1px,-2px)}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}

/* ---------- 断点 ---------- */
@media (max-width:900px){
  .layout{grid-template-columns:minmax(0,1fr);gap:24px}
  .toc{
    position:static;
    transform:none;
  }
  .toc__list{
    flex-direction:row;
    overflow-x:auto;
    gap:8px;
    padding-bottom:6px;
  }
  .toc__i{flex:none}
  .toc__a{
    border:1px solid var(--wash);
    border-radius:9px;
    padding:6px 12px;
    white-space:nowrap;
  }
}

@media (max-width:720px){
  body{font-size:16px}
  .hero{
    grid-template-columns:minmax(0,1fr);
    min-height:0;
    padding:20px 0 26px;
    gap:20px;
  }
  .hero__ghost{font-size:clamp(70px,26vw,120px);bottom:-8px}
  .hero__h1{font-size:clamp(25px,7.4vw,34px)}
  .hero__fig{transform:none}
  .masthead{flex-wrap:wrap;gap:10px}
  .groups{margin-left:auto}
  .colophon{
    grid-template-columns:minmax(0,1fr);
    justify-items:center;
    text-align:center;
    gap:16px;
  }
  .colophon__jump{justify-content:center}
  .anchorbar__ttl{display:none}
  .anchorbar__rail{width:100%}
}

@media (max-width:420px){
  .shell{padding:0 14px}
  .brand__txt{font-size:17px}
  .grp__btn{padding:8px 11px}
  .grp__list{right:-4px;min-width:0;width:66vw}
  .paper img{width:100%}
  .paper pre,.paper table{font-size:15px}
}

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