:root{
  --paper:#fafaf8;
  --ink:#1a1a1a;
  --grey:#4a4a4a;
  --line:rgba(26,26,26,.3);
  --soft:rgba(26,26,26,.07);
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Noto Sans SC',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  font-size:16px;
  line-height:1.75;
  letter-spacing:.012em;
  -webkit-font-smoothing:antialiased;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.5;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

.sheet{
  position:relative;
  z-index:1;
  max-width:1120px;
  margin:0 auto;
  padding:0 20px;
}

/* 品牌行 */
.masthead{
  padding:24px 0 14px;
  border-bottom:3px solid var(--ink);
}

.brand{
  display:inline-block;
  padding:6px 2px;
  font-size:clamp(1.45rem,5vw,2.05rem);
  font-weight:700;
  letter-spacing:.07em;
  line-height:1.25;
  color:var(--ink);
  text-decoration:none;
  transform:rotate(-.7deg);
}

.brand:hover{color:var(--grey)}

/* 菜单行 */
.dock{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  flex-wrap:wrap;
  gap:6px 14px;
  align-items:center;
  justify-content:space-between;
  background:var(--paper);
  border-bottom:1.5px dashed var(--line);
  padding:6px 0 8px;
}

.menu ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:2px 4px;
}

.menu>ul>li{position:relative}

.menu a{
  display:block;
  padding:11px 10px;
  font-size:.95rem;
  line-height:1.5;
  color:var(--ink);
  text-decoration:none;
  border:1.5px solid transparent;
  border-radius:10px;
}

.menu a:hover,
.menu a:focus-visible{
  border-color:var(--ink);
  background:var(--soft);
}

.menu .sub{
  display:none;
  position:absolute;
  left:0;
  top:100%;
  min-width:186px;
  flex-direction:column;
  gap:2px;
  padding:6px;
  background:var(--paper);
  border:1.5px solid var(--ink);
  border-radius:10px;
  transform:rotate(-.8deg);
}

.has-sub:hover>.sub,
.has-sub:focus-within>.sub{display:flex}

.find{
  display:flex;
  align-items:center;
  gap:6px;
}

.find input{
  font:inherit;
  font-size:.95rem;
  width:150px;
  min-height:42px;
  padding:8px 10px;
  color:var(--ink);
  background:var(--paper);
  border:1.5px solid var(--ink);
  border-radius:10px;
}

.find input::placeholder{color:var(--grey)}

.find button{
  font:inherit;
  font-size:.95rem;
  letter-spacing:.14em;
  min-height:42px;
  padding:8px 14px;
  color:var(--paper);
  background:var(--ink);
  border:1.5px solid var(--ink);
  border-radius:10px;
  cursor:pointer;
}

.find button:hover{background:var(--grey);border-color:var(--grey)}

/* 开篇 */
.hero{
  position:relative;
  overflow:hidden;
  min-height:45vh;
  display:grid;
  place-items:center;
  text-align:center;
  padding:44px 8px 52px;
}

.hero h1{
  position:relative;
  z-index:2;
  margin:0;
  font-size:clamp(2rem,9vw,4.1rem);
  font-weight:700;
  line-height:1.14;
  letter-spacing:-.02em;
  text-wrap:balance;
}

.band{
  position:absolute;
  left:-12%;
  right:-12%;
  bottom:24%;
  height:16px;
  background:var(--grey);
  opacity:.26;
  transform:rotate(-2.4deg);
  animation:jit 6s steps(3,end) infinite;
}

@keyframes jit{
  0%,100%{transform:rotate(-2.4deg) translateY(0)}
  50%{transform:rotate(-1.5deg) translateY(3px)}
}

/* 正文与侧栏 */
.deck{
  display:grid;
  grid-template-columns:minmax(0,1fr) 252px;
  gap:44px;
  align-items:start;
  border-top:3px solid var(--ink);
  padding:34px 0 64px;
}

.prose{
  min-width:0;
  font-size:1.02rem;
}

.prose section{
  margin-top:44px;
  padding-top:38px;
  border-top:2px dashed var(--line);
  scroll-margin-top:130px;
}

.prose>section:first-child{
  margin-top:0;
  padding-top:0;
  border-top:0;
}

.prose p{margin:0 0 1.1em}

.prose h2{
  position:relative;
  margin:.2em 0 .75em;
  padding-top:12px;
  font-size:clamp(1.35rem,4vw,1.85rem);
  line-height:1.32;
  letter-spacing:-.01em;
}

.prose h2::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:48px;
  height:6px;
  background:var(--ink);
  transform:rotate(-2.2deg);
}

.prose h3{
  margin:1.5em 0 .6em;
  font-size:1.12rem;
  line-height:1.4;
}

.prose a{
  color:var(--ink);
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}

.prose a:hover{background:var(--soft)}

.prose ul,
.prose ol{margin:0 0 1.1em;padding-left:1.35em}

.prose li{margin:.35em 0}

.prose img{
  max-width:100%;
  height:auto;
  border:1.5px solid var(--ink);
  border-radius:10px;
  filter:grayscale(.2) contrast(1.06);
}

.prose blockquote{
  margin:1.3em 0;
  padding:10px 18px;
  color:var(--grey);
  border-left:5px solid var(--grey);
  transform:rotate(-.3deg);
}

.prose figure{margin:1.3em 0}

.prose code{
  font-size:.95em;
  padding:1px 5px;
  border:1px solid var(--line);
  border-radius:5px;
  background:rgba(26,26,26,.04);
}

.rail{
  position:sticky;
  top:104px;
  padding:16px 18px 20px;
  background:var(--paper);
  border:1.5px solid var(--ink);
  border-radius:10px;
  outline:4px solid var(--paper);
  transform:rotate(.5deg);
}

.rail small{
  display:block;
  font-size:.9rem;
  letter-spacing:.36em;
  color:var(--grey);
}

.rail h2{
  margin:.15em 0 .5em;
  font-size:1.08rem;
  line-height:1.4;
  letter-spacing:.02em;
}

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

.rail a{
  display:block;
  padding:10px 0;
  font-size:.94rem;
  line-height:1.5;
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px dotted var(--line);
}

.rail li:last-child a{border-bottom:0}

.rail a:hover{color:var(--grey);background:var(--soft)}

/* 页脚 */
.foot{
  border-top:3px solid var(--ink);
  background:rgba(26,26,26,.035);
  padding:34px 18px 22px;
  margin:0 -20px;
}

.bigmark{
  margin:0 0 24px;
  font-size:clamp(1.85rem,9vw,3.9rem);
  font-weight:700;
  line-height:1.02;
  letter-spacing:.02em;
  opacity:.9;
  transform:rotate(-1.1deg);
}

.cols{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:22px;
  padding-bottom:16px;
}

.cols dl{margin:0}

.cols dt{
  font-size:.9rem;
  letter-spacing:.24em;
  color:var(--grey);
  margin-bottom:4px;
}

.cols dd{margin:0}

.cols a{
  display:block;
  padding:9px 0;
  font-size:.94rem;
  line-height:1.5;
  color:var(--ink);
  text-decoration:none;
}

.cols a:hover{color:var(--grey);text-decoration:underline dashed;text-underline-offset:3px}

.base{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  border-top:1.5px dashed var(--line);
  padding-top:12px;
  font-size:.9rem;
  color:var(--grey);
}

.base a{
  display:inline-block;
  padding:10px 0;
  color:var(--ink);
  text-decoration:none;
  border-bottom:2px solid var(--ink);
}

.base a:hover{color:var(--grey)}

/* 窄屏 */
@media (max-width:820px){
  .deck{
    grid-template-columns:minmax(0,1fr);
    gap:28px;
    padding-bottom:48px;
  }
  .rail{position:static;order:2}
  .cols{grid-template-columns:repeat(2,minmax(0,1fr))}
  .menu .sub{
    position:static;
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    min-width:0;
    border:0;
    background:none;
    padding:0 0 0 10px;
    transform:none;
  }
  .find input{width:118px}
  .prose div{scroll-margin-top:160px}
  .foot{padding:28px 14px 18px}
}

@media (max-width:520px){
  .cols{grid-template-columns:minmax(0,1fr);gap:14px}
  .hero{padding:34px 4px 40px;min-height:42vh}
  .brand{font-size:1.35rem}
  .find input{width:96px}
  .base{font-size:.86rem}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,
  *::before,
  *::after{
    animation:none!important;
    transition:none!important;
  }
  .band{transform:rotate(-2.4deg)}
}

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