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

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

:root{
  --paper:#fafaf8;
  --gray:#4a4a4a;
  --ink:#1a1a1a;
  --line:rgba(26,26,26,.2);
  --soft:rgba(26,26,26,.08);
  --head:124px;
  --mono:"JetBrains Mono",Menlo,Consolas,monospace;
}

html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--ink);
  background-color:var(--paper);
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
  font-family:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI","Noto Sans SC",sans-serif;
  font-size:16px;
  line-height:1.72;
  -webkit-text-size-adjust:100%;
}

img{max-width:100%;height:auto}
a{color:var(--ink);text-decoration:none}
h1,h2,h3{line-height:1.3;letter-spacing:-.015em}
ul{list-style:none;margin:0;padding:0}

.hand-under{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='7'%3E%3Cpath d='M0 5 Q 22 1 46 4 T 92 3 T 140 4' fill='none' stroke='%231a1a1a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:0 100%;
  background-size:140px 7px;
  padding-bottom:.3rem;
}

/* 页头：品牌行在上，菜单行在下 */
.masthead{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(250,250,248,.95);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  border-bottom:1.5px solid var(--ink);
  box-shadow:0 3px 0 var(--soft);
}
.brandrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.45rem clamp(1rem,4vw,2.5rem) .1rem;
}
.logo{
  font-family:var(--mono);
  font-size:1.12rem;
  font-weight:700;
  letter-spacing:.06em;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  transform:rotate(-.6deg);
}
.reach{
  font-family:var(--mono);
  min-height:44px;
  display:inline-flex;
  align-items:center;
  padding:.3rem .9rem;
  border:1.5px solid var(--ink);
  border-radius:14px 8px 12px 9px / 9px 12px 8px 14px;
  background:rgba(255,255,255,.6);
  box-shadow:2px 2px 0 var(--ink);
}
.reach:hover{transform:rotate(-2deg)}

.menubar{padding:0 clamp(1rem,4vw,2.5rem) .4rem}
.menubar > ul{display:flex;flex-wrap:wrap;gap:.3rem}
.menubar li{position:relative;animation:rise .3s steps(3,end) both}
.menubar li:nth-child(2){animation-delay:.05s}
.menubar li:nth-child(3){animation-delay:.1s}
.menubar li:nth-child(4){animation-delay:.15s}
.menubar li:nth-child(5){animation-delay:.2s}
.menubar > ul > li > a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:.35rem .8rem;
  font-family:var(--mono);
  font-size:.97rem;
  border:1.5px solid transparent;
  border-radius:12px 7px 11px 8px / 8px 11px 7px 12px;
  transition:background-color .12s steps(2,end),color .12s steps(2,end);
}
.menubar > ul > li > a:hover,
.menubar > ul > li > a.on{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.fold > a::after{content:"▾";margin-left:.35rem;font-size:.85em}
.sub{
  display:none;
  position:absolute;
  left:0;
  top:100%;
  min-width:11rem;
  padding:.35rem;
  background:var(--paper);
  border:1.5px solid var(--ink);
  border-radius:10px;
  box-shadow:4px 4px 0 rgba(26,26,26,.16);
}
.fold:hover .sub,
.fold:focus-within .sub{display:block}
.sub a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:.3rem .7rem;
  font-family:var(--mono);
  font-size:.97rem;
  border-radius:8px;
}
.sub a:hover{background:var(--ink);color:var(--paper)}

/* 首屏：左图右文，斜切色带 */
.hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  align-items:center;
  gap:clamp(1.2rem,3.5vw,3rem);
  min-height:calc(100vh - var(--head));
  padding:clamp(1.6rem,5vw,3.2rem) clamp(1rem,4vw,2.5rem);
  border-bottom:1.5px dashed var(--line);
}
.hero::before{
  content:"";
  position:absolute;
  left:50%;
  top:6%;
  bottom:6%;
  width:9px;
  background:var(--ink);
  border-radius:5px;
  transform:translateX(-50%) rotate(3.5deg);
}
.hero-art{
  margin:0;
  position:relative;
  transform:rotate(-1.4deg);
  animation:settle .42s steps(4,end) both;
}
.hero-art .stack{
  position:relative;
  border:1.5px solid var(--ink);
  border-radius:14px 20px 11px 17px / 17px 11px 20px 14px;
  overflow:hidden;
  background:#fff;
  box-shadow:7px 7px 0 rgba(26,26,26,.14);
}
.hero-art .stack img{display:block;width:100%;filter:grayscale(.22) contrast(1.06)}
.hero-art .more{display:flex;gap:.6rem;margin-top:.85rem}
.hero-art .more img{
  width:33%;
  border:1.5px solid var(--ink);
  border-radius:9px;
  background:#fff;
  filter:grayscale(.3) contrast(1.05);
}
.hero-art .more img:nth-child(odd){transform:rotate(1.8deg)}
.hero-art .more img:nth-child(even){transform:rotate(-1.6deg)}
.hero-art::after{
  content:"";
  position:absolute;
  top:-12px;
  left:22%;
  width:88px;
  height:24px;
  background:rgba(26,26,26,.11);
  border-left:1px dashed rgba(26,26,26,.32);
  border-right:1px dashed rgba(26,26,26,.32);
  transform:rotate(-5deg);
}
.ph{
  aspect-ratio:4/5;
  border:1.5px dashed var(--ink);
  border-radius:14px 20px 11px 17px / 17px 11px 20px 14px;
  background:
    repeating-linear-gradient(-38deg,transparent 0 13px,rgba(26,26,26,.09) 13px 14px),
    rgba(255,255,255,.55);
  box-shadow:7px 7px 0 rgba(26,26,26,.1);
}
.hero-copy{
  text-align:center;
  padding:clamp(1.2rem,4vw,2.2rem);
  background:rgba(255,255,255,.58);
  -webkit-backdrop-filter:blur(9px) saturate(120%);
  backdrop-filter:blur(9px) saturate(120%);
  border:1.5px solid var(--ink);
  border-radius:10px;
  box-shadow:5px 5px 0 rgba(26,26,26,.15);
  transform:rotate(.7deg);
}
.hero-copy h1{
  margin:0 0 .9rem;
  font-size:clamp(1.85rem,5vw,3rem);
  font-weight:700;
  display:inline-block;
}
.lede{margin:0;color:var(--gray);font-size:1.02rem;line-height:1.88}

/* 正文区：左栏目录 + 右栏正文 */
.stage{
  display:grid;
  grid-template-columns:216px minmax(0,1fr);
  gap:clamp(1.2rem,3vw,2.4rem);
  align-items:start;
  max-width:1180px;
  margin:0 auto;
  padding:clamp(1.6rem,4vw,3rem) clamp(1rem,4vw,2.5rem) 2.5rem;
}
.rail{
  position:sticky;
  top:calc(var(--head) + 14px);
  padding:1rem .95rem 1.1rem;
  background:rgba(255,255,255,.62);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  border:1.5px solid var(--ink);
  border-radius:10px;
  box-shadow:4px 4px 0 rgba(26,26,26,.12);
  transform:rotate(-.5deg);
}
.rail small{
  display:block;
  font-family:var(--mono);
  color:var(--gray);
  letter-spacing:.18em;
}
.rail h2{
  margin:.1rem 0 .8rem;
  font-size:1.12rem;
  font-weight:600;
}
.rail li + li{border-top:1px dashed var(--line)}
.rail a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:.3rem .1rem;
  font-family:var(--mono);
  font-size:.96rem;
  line-height:1.4;
}
.rail a:hover,.rail a.on{color:var(--gray);text-decoration:underline;text-decoration-style:dashed;text-underline-offset:4px}

.prose{min-width:0;max-width:70ch;font-size:1.06rem;line-height:1.85}
.prose section{
  padding:1.4rem 0 1.9rem;
  border-top:1.5px dashed var(--line);
  scroll-margin-top:calc(var(--head) + 18px);
}
.prose section:first-child{border-top:0;padding-top:.2rem}
.prose h2{
  font-size:clamp(1.35rem,3.4vw,1.78rem);
  margin:.2rem 0 1rem;
  display:inline-block;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8'%3E%3Cpath d='M0 6 Q 30 1 62 5 T 120 4 T 160 5' fill='none' stroke='%234a4a4a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat:repeat-x;
  background-position:0 100%;
  background-size:160px 8px;
  padding-bottom:.35rem;
}
.prose h3{font-size:1.18rem;margin:1.4rem 0 .6rem}
.prose p{margin:0 0 1.05rem}
.prose ul,.prose ol{margin:0 0 1.1rem;padding-left:1.15rem}
.prose ul{list-style:none}
.prose ul li{position:relative;padding-left:.9rem;margin-bottom:.5rem}
.prose ul li::before{content:"";position:absolute;left:0;top:.72em;width:9px;height:1.5px;background:var(--gray)}
.prose ol{list-style:decimal}
.prose ol li{margin-bottom:.5rem}
.prose blockquote{
  margin:1.2rem 0;
  padding:.9rem 1.1rem;
  border-left:3px solid var(--ink);
  background:rgba(255,255,255,.6);
  border-radius:0 10px 10px 0;
  color:var(--gray);
}
.prose figure{margin:1.3rem 0}
.prose img{
  display:block;
  border:1.5px solid var(--ink);
  border-radius:11px;
  filter:grayscale(.2) contrast(1.05);
  box-shadow:5px 5px 0 rgba(26,26,26,.12);
}
.prose figcaption{font-family:var(--mono);color:var(--gray);padding-top:.5rem}
.prose table{width:100%;border-collapse:collapse;margin:1.2rem 0}
.prose th,.prose td{border:1px dashed var(--line);padding:.5rem .6rem;text-align:left}
.prose code{font-family:var(--mono);background:rgba(26,26,26,.07);padding:.1rem .3rem;border-radius:4px}
.prose a{text-decoration:underline;text-decoration-style:dashed;text-underline-offset:4px}

/* 页脚：单行极简 */
.foot{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:.6rem 1.4rem;
  padding:1rem clamp(1rem,4vw,2.5rem) 2rem;
  border-top:1.5px solid var(--ink);
  font-family:var(--mono);
}
.foot address{font-style:normal;color:var(--gray)}
.footlinks{display:flex;flex-wrap:wrap;gap:.4rem}
.footlinks a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:.2rem .55rem;
  border:1.5px dashed var(--line);
  border-radius:9px;
}
.footlinks a:hover{border-style:solid;border-color:var(--ink)}
.copy{margin:0;color:var(--gray)}

@keyframes rise{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes settle{0%{opacity:.35;transform:rotate(-3.2deg) translateY(9px)}100%{opacity:1;transform:rotate(-1.4deg)}}

/* 窄屏：标题升到首屏，图后退 */
@media (max-width:860px){
  :root{--head:250px}
  .hero{
    grid-template-columns:minmax(0,1fr);
    min-height:0;
    padding:.9rem clamp(1rem,4vw,2.5rem) 2rem;
    row-gap:.9rem;
  }
  .hero::before{
    left:8%;
    right:8%;
    top:auto;
    bottom:-6px;
    width:auto;
    height:8px;
    transform:rotate(-1.6deg);
  }
  .hero-copy{order:-1;transform:none;text-align:left;padding:1rem 1.05rem 1.15rem}
  .hero-copy h1{display:block;margin:0 0 .5rem;font-size:clamp(1.6rem,8vw,2.1rem)}
  .lede{font-size:.98rem;line-height:1.7}
  .hero-art{transform:rotate(-.8deg)}
  .hero-art .more{display:none}
  .hero-art .stack{max-height:44vh;overflow:hidden}
  .stage{grid-template-columns:minmax(0,1fr)}
  .rail{position:static;transform:none}
  .rail ul{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.4rem}
  .rail li + li{border-top:0}
  .rail a{
    min-height:42px;
    padding:.25rem .6rem;
    border:1.5px dashed var(--line);
    border-radius:9px;
  }
  .prose{max-width:none}
  .menubar > ul > li > a,.sub a{font-size:.94rem;padding:.35rem .6rem}
  .sub{position:static;display:flex;flex-wrap:wrap;gap:.3rem;border:0;box-shadow:none;padding:.1rem .2rem;min-width:0}
  .fold > a::after{content:"";margin:0}
  .foot{justify-content:flex-start}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{animation:none!important;transition:none!important}
}

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