:root{
  --paper:#f5e6c8;
  --paper-2:#efdcbb;
  --card:#fbf3e2;
  --tan:#d4a574;
  --ink:#262117;
  --deep:#1c1811;
  --body:#3a3327;
  --line:rgba(38,33,23,.16);
  --line-soft:rgba(38,33,23,.09);
}

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

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

body{
  margin:0;
  background:var(--paper);
  color:var(--body);
  font-family:"DM Sans",-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.68;
  padding-bottom:96px;
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:30;
  pointer-events:none;
  opacity:.42;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:29;
  pointer-events:none;
  opacity:.25;
  background-image:repeating-linear-gradient(180deg,rgba(38,33,23,.16) 0 1px,transparent 1px 3px);
}

h1,h2,h3,h4{
  color:var(--ink);
  font-family:"Space Grotesk","DM Sans",-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  font-weight:700;
  letter-spacing:-.025em;
}

a{color:#8a5a2c}

img{max-width:100%}

/* 头图区 */
.hero{
  position:relative;
  overflow:hidden;
  min-height:70vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:26px;
  padding:44px 20px 62px;
  background:linear-gradient(158deg,#f9f0df 0%,#f5e6c8 52%,#ecd6ad 100%);
  border-bottom:1px solid var(--line);
}

.hero::before{
  content:"";
  position:absolute;
  top:-14%;
  right:-18%;
  width:74%;
  height:78%;
  pointer-events:none;
  background:radial-gradient(circle at 66% 34%,rgba(255,212,158,.78),rgba(255,212,158,0) 64%);
  animation:leak 12s ease-in-out infinite;
}

.hero-copy{
  position:relative;
  z-index:2;
  max-width:760px;
  margin-left:auto;
  text-align:right;
}

h1{
  font-size:clamp(2.05rem,7vw,4.3rem);
  line-height:1.03;
  margin:0 0 14px;
  animation:vhs 8s linear infinite;
}

.lede{
  max-width:46ch;
  margin:0 0 0 auto;
  font-size:1rem;
  color:#584c39;
}

.polaroid{
  position:relative;
  z-index:2;
  margin:0 auto;
  width:min(100%,400px);
  padding:12px 12px 42px;
  background:var(--card);
  border-radius:4px;
  box-shadow:0 14px 30px rgba(38,33,23,.2),0 2px 0 rgba(38,33,23,.1);
  transform:rotate(-1.6deg);
}

.polaroid img{
  display:block;
  width:100%;
  height:auto;
  border-radius:2px;
  filter:sepia(.3) contrast(1.06) saturate(.82);
  will-change:transform;
}

.slash{
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:18px;
  background:var(--tan);
  clip-path:polygon(0 62%,100% 0,100% 100%,0 100%);
}

/* 主体两栏 */
.stage{
  display:grid;
  gap:28px;
  max-width:1140px;
  margin:0 auto;
  padding:34px 20px 64px;
}

.rail{
  border-top:2px solid var(--ink);
  padding-top:12px;
}

.rail h2{
  margin:0 0 8px;
  font-size:.92rem;
  font-weight:600;
  letter-spacing:.24em;
}

.rail hr{
  border:0;
  border-top:1px solid rgba(38,33,23,.32);
  margin:0 0 12px;
}

.rail ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:0 14px;
}

.rail a{
  display:flex;
  align-items:center;
  min-height:42px;
  color:var(--ink);
  font-size:.95rem;
  text-decoration:none;
  border-bottom:1px dashed transparent;
}

.rail a:hover{
  color:#8a5a2c;
  border-bottom-color:var(--tan);
}

/* 正文 */
.prose{min-width:0}

.prose section{
  padding:30px 0;
  border-bottom:1px solid var(--line-soft);
  scroll-margin-bottom:104px;
}

.prose section:first-child{padding-top:8px}
.prose section:last-child{border-bottom:0;padding-bottom:8px}

.prose h2{
  font-size:clamp(1.45rem,4.2vw,2.05rem);
  line-height:1.2;
  margin:0 0 12px;
}

.prose h2 + hr{
  border:0;
  width:58px;
  height:6px;
  background:var(--tan);
  margin:0 0 20px;
}

.prose h3{
  font-size:1.18rem;
  line-height:1.35;
  margin:1.6em 0 .5em;
}

.prose h3 + hr{
  border:0;
  width:34px;
  height:3px;
  background:var(--tan);
  margin:0 0 16px;
}

.prose p{margin:0 0 1.05em}
.prose p:last-child{margin-bottom:0}

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

.prose li{margin:0 0 .4em}

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

.prose img{
  display:block;
  width:100%;
  height:auto;
  border-radius:4px;
  filter:sepia(.22) contrast(1.04) saturate(.88);
}

.prose figure{
  margin:1.5em 0;
  padding:10px 10px 16px;
  background:var(--card);
  border-radius:4px;
}

.prose figure img{border-radius:2px}

.prose figcaption{
  margin-top:8px;
  font-size:.9rem;
  color:#6a5c46;
}

.prose blockquote{
  margin:1.4em 0;
  padding:12px 18px;
  background:var(--paper-2);
  border-left:4px solid var(--tan);
  border-radius:0 4px 4px 0;
}

.prose blockquote p:last-child{margin-bottom:0}

.prose table{
  width:100%;
  border-collapse:collapse;
  margin:1.3em 0;
  font-size:.95rem;
}

.prose th,.prose td{
  padding:9px 10px;
  text-align:left;
  border-bottom:1px solid var(--line);
}

.prose th{background:var(--paper-2);font-weight:600}

/* 页脚 */
footer{
  background:var(--deep);
  color:var(--paper);
  padding:46px 20px 22px;
  overflow:hidden;
}

.f-brand{margin:0}

.f-brand a{
  display:inline-block;
  font-family:"Space Grotesk","DM Sans",-apple-system,"PingFang SC",sans-serif;
  font-weight:700;
  font-size:clamp(2.5rem,12.5vw,6.2rem);
  line-height:.92;
  letter-spacing:-.05em;
  color:var(--paper);
  text-decoration:none;
  text-shadow:0 0 1px rgba(245,230,200,.4);
}

.f-brand a:hover{color:var(--tan)}

.f-meta{
  max-width:1100px;
  margin:26px auto 0;
  border-top:1px solid rgba(245,230,200,.22);
  padding-top:6px;
}

.f-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  font-size:.88rem;
  color:rgba(245,230,200,.7);
}

.f-row .copy{white-space:nowrap}

.f-row a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 4px;
  color:rgba(245,230,200,.88);
  text-decoration:none;
}

.f-row a:hover{color:var(--tan)}

/* 底部固定导航条 */
.sitebar{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:40;
  background:var(--deep);
  border-top:1px solid rgba(245,230,200,.24);
  padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));
  box-shadow:0 -8px 22px rgba(28,24,17,.28);
}

.sitebar dl{
  display:flex;
  align-items:stretch;
  gap:2px;
  margin:0;
  overflow-x:auto;
  scrollbar-width:none;
}

.sitebar dl::-webkit-scrollbar{display:none}
.sitebar dt{display:none}
.sitebar dd{margin:0;flex:0 0 auto}

.sitebar a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  border-radius:4px;
  color:rgba(245,230,200,.9);
  font-size:.9rem;
  text-decoration:none;
  white-space:nowrap;
}

.sitebar a:hover{
  background:rgba(245,230,200,.14);
  color:var(--paper);
}

/* 动效 */
@keyframes leak{
  0%,100%{opacity:.4;transform:translate3d(0,0,0)}
  50%{opacity:.72;transform:translate3d(-2%,2%,0)}
}

@keyframes vhs{
  0%,91%,100%{transform:none}
  93%{transform:translateX(-2px) skewX(-.4deg)}
  95%{transform:translateX(2px) skewX(.4deg)}
}

@keyframes fadeUp{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:none}
}

.reveal{opacity:0}
.reveal.in{animation:fadeUp .78s cubic-bezier(.22,.68,.32,1) both}

/* 宽屏 */
@media (min-width:640px){
  .hero{padding:56px 34px 84px}
  .polaroid{margin-left:auto;margin-right:0}
  .slash{height:26px}
}

@media (min-width:900px){
  body{font-size:18px}
  .hero{padding:70px 6vw 96px;gap:34px}
  .stage{
    grid-template-columns:210px minmax(0,1fr);
    gap:56px;
    padding:56px 32px 88px;
  }
  .rail{
    position:sticky;
    top:34px;
    align-self:start;
  }
  .rail ul{display:block}
  .rail a{
    min-height:0;
    padding:9px 0;
    border-bottom:1px dashed var(--line);
  }
  .prose article{padding:40px 0}
  footer{padding:64px 32px 26px}
}

@media (min-width:1180px){
  .stage{grid-template-columns:232px minmax(0,1fr);gap:72px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none !important;transition:none !important}
  .reveal{opacity:1 !important}
  h1{transform:none !important}
}

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