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

:root{
  --paper:#fafaf8;
  --ink:#1a1a1a;
  --grey:#4a4a4a;
  --soft:#efeee9;
  --line:rgba(26,26,26,.3);
  --line-soft:rgba(26,26,26,.14);
  --noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23f)' opacity='0.34'/%3E%3C/svg%3E");
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Space Grotesk','DM Sans',system-ui,-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.72;
  letter-spacing:.01em;
  overflow-x:clip;
}

body::after{
  content:'';
  position:fixed;
  inset:0;
  background:var(--noise);
  opacity:.24;
  mix-blend-mode:multiply;
  pointer-events:none;
  z-index:60;
}

a{color:inherit}
img{max-width:100%}
:focus-visible{outline:3px solid var(--grey);outline-offset:2px}

/* 顶部细条 */
.tape{
  background:var(--ink);
  color:var(--paper);
  min-height:28px;
  display:flex;
  align-items:center;
  padding:4px 18px;
  font-size:.76rem;
  letter-spacing:.3em;
}
.tape p{margin:0;display:flex;align-items:center;gap:12px;width:100%}
.tape-brand{font-weight:700;white-space:nowrap}
.tape-dash{
  flex:1;
  height:2px;
  background:repeating-linear-gradient(90deg,currentColor 0 9px,transparent 9px 18px);
  opacity:.55;
}

/* 报头 */
.masthead{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:9px 18px;
  background:var(--paper);
  border-bottom:3px solid var(--ink);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  text-decoration:none;
  font-weight:700;
  font-size:1.02rem;
  letter-spacing:.02em;
  transform:rotate(-.7deg);
}
.brand .mark{
  width:30px;
  height:30px;
  object-fit:contain;
  background:var(--soft);
  border:2px solid var(--ink);
  border-radius:8px 11px 7px 10px;
}
.brand-t{
  border-bottom:3px solid var(--ink);
  padding-bottom:1px;
  white-space:nowrap;
}

/* 胶囊菜单 */
.dock{position:relative}
.dock > summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:6px 18px;
  border:2px solid var(--ink);
  border-radius:999px;
  background:var(--paper);
  font-size:.88rem;
  font-weight:600;
  letter-spacing:.16em;
  cursor:pointer;
  user-select:none;
}
.dock > summary::-webkit-details-marker{display:none}
.dock > summary::before{
  content:'';
  width:14px;
  height:2px;
  background:currentColor;
  box-shadow:0 -4px 0 currentColor,0 4px 0 currentColor;
}

.dock > menu{
  list-style:none;
  margin:0;
  padding:10px;
  display:none;
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  width:min(80vw,300px);
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:20px 14px 22px 16px;
  box-shadow:6px 8px 0 rgba(26,26,26,.16);
  z-index:40;
}
.dock[open] > menu{display:block}
.dock > menu li + li{margin-top:2px}
.dock > menu a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 14px;
  font-size:.95rem;
  text-decoration:none;
  border:2px solid transparent;
  border-radius:999px;
}
.dock > menu a:hover,
.dock > menu a:focus-visible{background:var(--soft);border-color:var(--ink)}

/* 主视觉 */
.hero{
  position:relative;
  overflow:hidden;
  max-width:1180px;
  margin:0 auto;
  min-height:70vh;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:16px;
  padding:78px 20px 66px;
  border-bottom:3px solid var(--ink);
}
.hero::before{
  content:'';
  position:absolute;
  left:-8%;
  right:-8%;
  bottom:23%;
  height:clamp(16px,4vw,34px);
  background:var(--soft);
  border-top:2px dashed var(--line);
  border-bottom:2px dashed var(--line);
  transform:rotate(-1.6deg);
}
.hero > *{position:relative}
.hero h1{
  margin:0;
  font-size:clamp(2.5rem,8.6vw,5.9rem);
  line-height:1.03;
  letter-spacing:-.02em;
  font-weight:700;
  text-wrap:balance;
}
.lede{
  margin:0;
  max-width:44ch;
  color:var(--grey);
  font-size:1.02rem;
  line-height:1.66;
}
.lede::before{
  content:'';
  display:block;
  width:58px;
  height:3px;
  margin-bottom:14px;
  background:var(--ink);
  transform:rotate(-2.4deg);
}

/* 主体 */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:34px 20px 72px;
  display:grid;
  gap:30px;
}

/* 侧栏 */
.side{
  position:relative;
  border:2px solid var(--ink);
  border-radius:18px 22px 16px 20px;
  background:var(--paper);
  padding:18px 16px 18px;
  transform:rotate(-.6deg);
  box-shadow:5px 7px 0 rgba(26,26,26,.1);
}
.side::before{
  content:'';
  position:absolute;
  top:-11px;
  left:22px;
  width:76px;
  height:20px;
  background:rgba(214,208,190,.85);
  border:1px dashed var(--line);
  transform:rotate(-3deg);
}
.side small{
  display:block;
  font-size:.74rem;
  letter-spacing:.26em;
  color:var(--grey);
  margin:6px 0 2px;
}
.side h2{
  margin:0 0 10px;
  font-size:1.06rem;
  letter-spacing:.08em;
}
.side-list{
  list-style:none;
  counter-reset:s;
  margin:0 0 12px;
  padding:0;
  display:grid;
  gap:1px;
  grid-template-columns:1fr 1fr;
}
.side-list li a{
  display:flex;
  align-items:baseline;
  gap:9px;
  min-height:40px;
  padding:8px 2px;
  font-size:.92rem;
  text-decoration:none;
  border-bottom:1px dashed var(--line-soft);
}
.side-list li a::before{
  counter-increment:s;
  content:counter(s,decimal-leading-zero);
  font-size:.7rem;
  letter-spacing:.08em;
  color:var(--grey);
}
.side-list li a:hover{background:var(--soft)}

.to-top{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:6px 16px;
  font-size:.85rem;
  letter-spacing:.12em;
  text-decoration:none;
  border:2px solid var(--ink);
  border-radius:999px;
}
.to-top:hover{background:var(--ink);color:var(--paper)}

/* 正文 */
.body{min-width:0}
.prose{max-width:70ch}
.prose > section{
  padding:32px 0 8px;
  border-top:2px dashed var(--line);
  scroll-margin-top:96px;
}
.prose > section:first-child{border-top:0;padding-top:6px}
.prose small{
  display:block;
  font-size:.74rem;
  letter-spacing:.26em;
  color:var(--grey);
  margin-bottom:6px;
}
.prose h2{
  position:relative;
  margin:.1em 0 .7em;
  padding-bottom:11px;
  font-size:clamp(1.42rem,3.6vw,1.95rem);
  line-height:1.22;
  letter-spacing:-.01em;
}
.prose h2::after{
  content:'';
  position:absolute;
  left:0;
  bottom:0;
  width:min(150px,44%);
  height:4px;
  background:var(--ink);
  border-radius:2px 7px 3px 5px;
  transform:rotate(-1.1deg);
}
.prose h3{
  margin:1.5em 0 .5em;
  font-size:1.2rem;
  line-height:1.3;
}
.prose p{margin:0 0 1.05em}
.prose ul,.prose ol{margin:0 0 1.15em;padding-left:1.25em}
.prose li{margin-bottom:.45em}
.prose a{
  text-decoration:none;
  border-bottom:2px solid var(--grey);
}
.prose a:hover{border-bottom-color:var(--ink);background:var(--soft)}
.prose strong{font-weight:700}
.prose blockquote{
  margin:1.3em 0;
  padding:12px 18px;
  background:var(--soft);
  border-left:5px solid var(--ink);
  border-radius:0 14px 14px 0;
}
.prose img{
  height:auto;
  border:3px solid var(--ink);
  border-radius:14px 18px 12px 16px;
  background:var(--soft);
  transform:rotate(-.5deg);
}
.prose hr{
  border:0;
  border-top:2px dashed var(--line);
  margin:1.8em 0;
}

/* 页脚 */
.colophon{
  border-top:3px solid var(--ink);
  background:var(--soft);
  margin-top:20px;
  padding:34px clamp(20px,6vw,60px) 20px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px 26px;
  font-size:.9rem;
}
.colophon p{margin:0}
.f-brand{
  font-weight:700;
  font-size:1.02rem;
  letter-spacing:.02em;
  border-bottom:3px solid var(--ink);
  justify-self:start;
  padding-bottom:2px;
  transform:rotate(-.8deg);
}
.f-links{display:flex;flex-wrap:wrap;gap:2px 14px}
.f-links a,
.f-top a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  text-decoration:none;
  border-bottom:1.5px solid var(--line);
  padding:0 2px;
}
.f-links a:hover,
.f-top a:hover{background:var(--ink);color:var(--paper)}
.f-top a{
  border:2px solid var(--ink);
  border-radius:999px;
  padding:0 16px;
  letter-spacing:.12em;
}
.colophon small{
  grid-column:1 / -1;
  text-align:center;
  font-size:.78rem;
  letter-spacing:.16em;
  color:var(--grey);
  border-top:1px dashed var(--line);
  padding-top:14px;
}

/* 入场 */
.reveal{
  opacity:0;
  transform:translateY(10px) rotate(.5deg);
  transition:opacity .2s steps(4),transform .2s steps(4);
}
.reveal.in{opacity:1;transform:none}
.side.reveal.in{transform:rotate(-.6deg)}
.prose > section.reveal.in{transform:none}

/* 断点 */
@media (min-width:600px){
  .side-list{grid-template-columns:1fr}
}

@media (min-width:860px){
  body{font-size:18px}
  .masthead{padding:12px 26px}
  .dock > summary{display:none}
  .masthead .dock > menu{
    display:flex;
    position:static;
    width:auto;
    gap:8px;
    padding:0;
    border:0;
    box-shadow:none;
    background:none;
  }
  .dock > menu a{
    min-height:40px;
    padding:6px 14px;
    font-size:.9rem;
    border:2px solid var(--ink);
    transition:transform .15s steps(3),background-color .15s steps(2),color .15s steps(2);
  }
  .dock > menu li:nth-child(odd) a{transform:rotate(-1.2deg)}
  .dock > menu li:nth-child(3n) a{transform:rotate(1.3deg)}
  .dock > menu a:hover,
  .dock > menu a:focus-visible{
    background:var(--ink);
    color:var(--paper);
    transform:rotate(-2deg) translateY(-2px);
  }
  .hero{padding:100px 26px 78px}
  .wrap{
    grid-template-columns:246px minmax(0,1fr);
    gap:46px;
    padding:44px 26px 88px;
  }
  .side{position:sticky;top:88px}
  .colophon{
    grid-template-columns:1.5fr 1fr 1fr auto;
    align-items:start;
    padding-top:40px;
    padding-bottom:24px;
  }
}

@media (min-width:1100px){
  .hero h1{font-size:clamp(3.6rem,6.2vw,6.2rem)}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .brand,.side,.prose img,.lede::before{transform:none}
}

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