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

:root{
  --paper:#fafaf8;
  --ink:#1a1a1a;
  --grease:#4a4a4a;
  --rule:#d9d5cb;
  --edge:#c6c1b4;
  --mono:'Fira Code',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --sans:'Fira Sans',system-ui,-apple-system,'Segoe UI','Noto Sans SC',sans-serif;
}

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

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

body{
  margin:0;
  background-color:var(--paper);
  background-image:
    repeating-linear-gradient(0deg,rgba(26,26,26,.026) 0 1px,transparent 1px 4px),
    repeating-linear-gradient(90deg,rgba(26,26,26,.018) 0 1px,transparent 1px 7px),
    radial-gradient(circle at 18% 8%,rgba(26,26,26,.045),transparent 62%),
    radial-gradient(circle at 88% 74%,rgba(26,26,26,.035),transparent 58%);
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.75;
  font-weight:400;
}

img{max-width:100%;height:auto;display:block;filter:grayscale(.14) contrast(1.06)}

a{color:var(--ink)}
a:focus-visible{outline:3px dashed var(--ink);outline-offset:3px}

.sheet{
  padding:clamp(14px,3.4vw,34px) clamp(12px,3vw,28px) 0;
}

.wrap{
  max-width:1080px;
  margin:0 auto;
  padding:0 clamp(6px,2vw,18px);
}

/* ---------- 页头 ---------- */
.top{
  border-bottom:2px solid var(--ink);
  padding-bottom:.85rem;
  margin-bottom:1rem;
}

.brandline{
  display:flex;
  align-items:center;
  gap:.65rem;
  margin-bottom:.6rem;
}

.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  flex:0 0 auto;
  border:2px solid var(--ink);
  border-radius:4px;
  background:#fff;
  text-decoration:none;
  transform:rotate(-2.2deg);
  box-shadow:3px 3px 0 rgba(26,26,26,.14);
}
.mark-glyph{font-family:var(--mono);font-weight:600;font-size:20px;line-height:1}
.mark-img{width:34px;height:34px;object-fit:cover;border-radius:2px}

.brandname{
  font-family:var(--mono);
  font-weight:600;
  font-size:clamp(1.05rem,2.6vw,1.3rem);
  letter-spacing:.05em;
  transform:rotate(-.4deg);
}

.jump{margin:0}
.jump p{
  display:flex;
  flex-wrap:wrap;
  gap:.1rem .05rem;
  margin:0;
  padding:0;
}
.jump a{
  display:inline-block;
  padding:.55rem .62rem;
  min-height:44px;
  font-family:var(--mono);
  font-size:16px;
  line-height:1.6;
  text-decoration:none;
  color:var(--grease);
  border-bottom:2px dashed transparent;
}
.jump a:hover,
.jump a:focus-visible{
  color:var(--ink);
  border-bottom-color:var(--ink);
  transform:rotate(-.8deg);
}
.jump a:first-child{color:var(--ink);font-weight:600}

/* ---------- Hero ---------- */
.hero{
  min-height:70vh;
  display:flex;
  flex-direction:column;
  gap:clamp(1rem,3vw,2rem);
  padding:1.4rem 0 2.2rem;
  border-bottom:2px solid var(--ink);
}

.hero-in{max-width:46rem}

.eyebrow{
  display:inline-block;
  font-family:var(--mono);
  font-size:16px;
  letter-spacing:.12em;
  color:var(--grease);
  background:#fff;
  border:1px solid var(--edge);
  border-radius:2px;
  padding:.15rem .55rem;
  transform:rotate(-1.2deg);
}

.hero-h1{
  margin:.85rem 0 0;
  font-size:clamp(1.95rem,5.4vw,3.15rem);
  line-height:1.18;
  letter-spacing:-.02em;
  font-weight:600;
  text-wrap:balance;
}

.lede{
  margin:.8rem 0 0;
  max-width:40rem;
  font-size:clamp(1rem,2.1vw,1.16rem);
  font-weight:400;
  line-height:1.65;
  color:var(--grease);
}

.hero-fig{
  position:relative;
  margin:0;
  padding:6px;
  background:#fff;
  border:2px solid var(--ink);
  border-radius:4px;
  transform:rotate(-.6deg);
  box-shadow:8px 8px 0 rgba(26,26,26,.08);
}
.hero-fig.is-bare{min-height:132px;border-style:dashed;background:transparent}
.hero-pic{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  border-radius:2px;
}

.tagbadge{
  position:absolute;
  top:-15px;
  right:14px;
  background:var(--ink);
  color:var(--paper);
  font-family:var(--mono);
  font-size:16px;
  line-height:1.5;
  padding:.15rem .6rem;
  border-radius:2px;
  transform:rotate(2.4deg);
}

/* ---------- 正文区 ---------- */
.stage{
  display:flex;
  align-items:flex-start;
  gap:clamp(1.2rem,3.5vw,2.4rem);
  padding:clamp(1.6rem,4vw,2.6rem) 0;
}

.paper{
  flex:1 1 auto;
  min-width:0;
  background:#fff;
  border:2px solid var(--ink);
  border-radius:4px;
  padding:0 clamp(12px,3vw,30px);
  box-shadow:6px 6px 0 rgba(26,26,26,.06);
}

.prose{padding-bottom:1.6rem}

.prose article{
  padding:1.3rem 0 1.5rem;
  border-bottom:1px dashed var(--rule);
}
.prose article:last-child{border-bottom:0;padding-bottom:.4rem}

.prose small{
  display:inline-block;
  font-family:var(--mono);
  font-size:16px;
  letter-spacing:.1em;
  color:var(--grease);
  margin-bottom:.15rem;
}

.prose h2{
  font-size:clamp(1.35rem,3.2vw,1.8rem);
  line-height:1.32;
  font-weight:600;
  margin:.15rem 0 .7rem;
  padding-bottom:.3rem;
  border-bottom:2px solid var(--ink);
}

.prose h3{
  font-size:clamp(1.12rem,2.4vw,1.3rem);
  line-height:1.4;
  font-weight:600;
  margin:1.3rem 0 .4rem;
}

.prose p{margin:.85rem 0;font-size:17px}
.prose ul,.prose ol{margin:.85rem 0;padding-left:1.35rem}
.prose li{margin:.4rem 0}
.prose strong{font-weight:600}

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

.prose blockquote{
  margin:1.2rem 0;
  padding:.55rem 1rem;
  background:var(--paper);
  border-left:4px solid var(--ink);
  transform:rotate(-.35deg);
  font-style:normal;
}

.prose table{
  width:100%;
  border-collapse:collapse;
  font-size:16px;
  margin:1rem 0;
  display:block;
  overflow-x:auto;
}
.prose th,.prose td{
  border:1px solid var(--rule);
  padding:.45rem .6rem;
  text-align:left;
}

article[id]{scroll-margin-top:1.2rem}

/* ---------- 侧栏 ---------- */
.side{
  flex:0 0 244px;
  min-width:0;
}

.side-box{
  background:#fff;
  border:2px solid var(--ink);
  border-radius:4px;
  padding:.85rem .9rem 1rem;
  transform:rotate(.7deg);
  box-shadow:5px 5px 0 rgba(26,26,26,.08);
}

.tiny{
  display:inline-block;
  font-family:var(--mono);
  font-size:16px;
  letter-spacing:.14em;
  color:var(--grease);
  border-bottom:1px solid var(--edge);
}

.side-h{
  font-family:var(--mono);
  font-size:1.02rem;
  font-weight:600;
  line-height:1.4;
  margin:.35rem 0 .6rem;
}

.side-list{list-style:none;margin:0;padding:0}
.side-list a{
  display:block;
  padding:.5rem .15rem;
  min-height:44px;
  font-size:16px;
  line-height:1.6;
  text-decoration:none;
  color:var(--grease);
  border-bottom:1px dashed var(--rule);
}
.side-list li:last-child a{border-bottom:0}
.side-list a:hover{color:var(--ink)}

/* ---------- 页脚 ---------- */
.foot{
  border-top:2px solid var(--ink);
  margin-top:1.4rem;
  padding-top:1.3rem;
}

.foot-grid{
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1fr;
  gap:clamp(1rem,3vw,1.8rem);
  align-items:start;
}

.fb-name{
  font-family:var(--mono);
  font-size:18px;
  font-weight:600;
  margin:0 0 .3rem;
  letter-spacing:.04em;
}
.fb-desc{margin:0;font-size:16px;color:var(--grease);line-height:1.6}

.foot dl{margin:0}
.foot dt{
  font-family:var(--mono);
  font-size:16px;
  letter-spacing:.12em;
  color:var(--grease);
  margin-bottom:.35rem;
}
.foot dd{margin:0}
.foot dd a{
  display:inline-block;
  padding:.5rem 0;
  min-height:40px;
  font-size:16px;
  line-height:1.6;
  text-decoration:none;
  color:var(--ink);
  border-bottom:1px dashed transparent;
}
.foot dd a:hover{border-bottom-color:var(--ink)}

.foot-bar{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:.5rem 1rem;
  border-top:1px dashed var(--rule);
  margin-top:1.3rem;
  padding:.7rem 0 1.8rem;
  font-family:var(--mono);
  font-size:16px;
  color:var(--grease);
}
.foot-bar p{margin:0}
.foot-bar a{
  display:inline-block;
  padding:.45rem 0;
  min-height:40px;
  color:var(--ink);
  text-decoration:none;
}
.foot-bar a:hover{text-decoration:underline;text-underline-offset:3px}

/* ---------- 动效 ---------- */
.anim .rv{
  opacity:0;
  transform:translateY(10px);
}
.anim .rv.on{
  opacity:1;
  transform:none;
  transition:opacity .28s steps(3),transform .28s steps(3);
  transition-delay:calc(var(--i,0) * 45ms);
}
.anim .side-list li{
  opacity:0;
  transform:rotate(-1deg);
}
.anim .side-list li.on{
  opacity:1;
  transform:none;
  transition:opacity .25s steps(2),transform .25s steps(2);
  transition-delay:calc(var(--i,0) * 40ms);
}

/* ---------- 响应式 ---------- */
@media (max-width:860px){
  .stage{flex-direction:column;gap:1.6rem}
  .side{flex:0 0 auto;width:100%;max-width:420px}
  .side-box{transform:rotate(-.5deg)}
  .foot-grid{grid-template-columns:1fr 1fr}
  .foot-brand{grid-column:1 / -1}
}

@media (max-width:560px){
  body{font-size:16px}
  .hero{min-height:auto;padding-top:.9rem}
  .hero-h1{font-size:clamp(1.7rem,7.4vw,2.1rem)}
  .paper{padding:0 12px}
  .foot-grid{grid-template-columns:1fr}
  .foot-bar{justify-content:flex-start}
  .tagbadge{right:8px;top:-13px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .anim .rv,
  .anim .side-list li{opacity:1;transform:none;transition:none}
}

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