@import url('https://fonts.googleapis.com/css2?family=Anton&family=Epilogue:wght@400;500;600;700&display=swap');

:root{
  --paper:#f5e6c8;
  --paper-hi:#fdf4de;
  --tan:#d4a574;
  --tan-d:#b1804a;
  --ink:#262117;
  --ink-soft:#463c2b;
  --line:rgba(38,33,23,.22);
  --card:rgba(255,251,238,.55);
  --rail:224px;
  --strip:46px;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  padding-top:var(--strip);
  font-family:'Epilogue',"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:
    radial-gradient(120% 78% at 50% -10%, #fdf4de 0%, var(--paper) 46%, #e9d3ab 100%);
  background-attachment:fixed;
  overflow-x:hidden;
}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
h1,h2,h3{font-family:'Anton',"PingFang SC",system-ui,sans-serif;font-weight:400;line-height:1.1;letter-spacing:.015em;margin:0}
::selection{background:var(--tan);color:var(--ink)}
:focus-visible{outline:3px solid var(--tan-d);outline-offset:2px}

.grain,.leak{position:fixed;inset:0;pointer-events:none}
.grain{
  z-index:95;
  opacity:.2;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
.leak{
  z-index:94;
  mix-blend-mode:screen;
  opacity:.7;
  background:
    radial-gradient(26vmax 22vmax at 90% 6%,rgba(255,196,120,.55),transparent 70%),
    radial-gradient(22vmax 24vmax at 4% 86%,rgba(212,165,116,.45),transparent 72%);
  animation:leak 24s ease-in-out infinite alternate;
}
@keyframes leak{
  from{opacity:.42;transform:translate3d(0,0,0)}
  to{opacity:.82;transform:translate3d(0,-2%,0)}
}

/* 顶部细条 */
.strip{
  position:fixed;top:0;left:0;right:0;height:var(--strip);z-index:100;
  display:flex;align-items:center;gap:12px;padding:0 12px;
  background:var(--ink);color:var(--paper);
  border-bottom:2px solid var(--tan);
}
.mark{
  flex:0 0 auto;display:grid;place-items:center;width:32px;height:32px;
  border:1.5px solid var(--tan);border-radius:8px;overflow:hidden;
  color:var(--tan);text-decoration:none;background:rgba(245,230,200,.06);
}
.mark-img{width:100%;height:100%;object-fit:cover}
.mark-txt{font-family:'Anton',sans-serif;font-size:18px;line-height:1}
.ticker{
  margin:0;font-size:14px;letter-spacing:.2em;white-space:nowrap;
  color:#e6d2ab;overflow:hidden;text-overflow:ellipsis;
}

/* 左侧竖排导航 */
.rail{
  position:fixed;top:var(--strip);left:0;bottom:0;width:var(--rail);z-index:80;
  display:flex;align-items:center;padding:26px 16px;
  background:linear-gradient(180deg,#f0e1bd 0%,#e6d1a7 100%);
  border-right:2px solid var(--ink);
}
.rail ol{list-style:none;margin:0;padding:0;width:100%;counter-reset:n;display:grid;gap:4px}
.rail li{counter-increment:n;animation:rise .45s ease both}
.rail li:nth-child(1){animation-delay:.03s}
.rail li:nth-child(2){animation-delay:.06s}
.rail li:nth-child(3){animation-delay:.09s}
.rail li:nth-child(4){animation-delay:.12s}
.rail li:nth-child(5){animation-delay:.15s}
.rail li:nth-child(6){animation-delay:.18s}
.rail li:nth-child(7){animation-delay:.21s}
.rail a{
  display:flex;align-items:center;gap:9px;min-height:44px;padding:10px 10px;
  font-size:16px;line-height:1.4;text-decoration:none;color:var(--ink-soft);
  border-bottom:2px solid transparent;border-radius:4px;
  transition:background .2s ease,border-color .2s ease,transform .2s ease,color .2s ease;
}
.rail a::before{
  content:counter(n,decimal-leading-zero);
  font-family:'Anton',sans-serif;font-size:12px;letter-spacing:.1em;color:var(--tan-d);
}
.rail a:hover,.rail a.on{background:rgba(38,33,23,.07);border-bottom-color:var(--tan);color:var(--ink);transform:translateX(3px)}

main{margin-left:var(--rail)}

/* Hero */
.hero{
  position:relative;overflow:hidden;
  min-height:68vh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:26px;padding:54px 22px 92px;text-align:center;
}
.hero::after{
  content:"";position:absolute;left:-8%;right:-8%;bottom:-38px;height:96px;
  background:linear-gradient(90deg,var(--tan) 0%,#e3bd8f 55%,var(--tan-d) 100%);
  transform:skewY(-3deg);
  border-top:2px solid var(--ink);border-bottom:2px solid var(--ink);
  box-shadow:0 10px 24px rgba(38,33,23,.16);
}
.hero-copy{position:relative;z-index:2;display:grid;gap:16px;justify-items:center;max-width:900px}
.hero h1{
  font-size:clamp(2.4rem,7.2vw,5.2rem);
  text-shadow:3px 3px 0 rgba(212,165,116,.6);
  animation:vhs 6s ease-in-out infinite;
}
@keyframes vhs{
  0%,100%{transform:none;text-shadow:3px 3px 0 rgba(212,165,116,.6)}
  47%{transform:translateX(1px) skewX(-.5deg);text-shadow:-3px 2px 0 rgba(212,165,116,.55)}
  53%{transform:translateX(-1px) skewX(.5deg);text-shadow:3px -2px 0 rgba(212,165,116,.5)}
}
.hero .sub{
  margin:0;max-width:46ch;font-size:17px;line-height:1.7;color:var(--ink-soft);
}
.hero-photo{
  position:relative;z-index:2;margin:0;
  background:#fcf6e7;padding:12px 12px 40px;border-radius:6px;
  box-shadow:0 14px 30px rgba(38,33,23,.3);
  transform:rotate(-1.5deg);max-width:min(560px,90%);
  animation:sway 8s ease-in-out infinite;
}
.hero-photo .hero-img{
  width:100%;border-radius:3px;
  filter:sepia(.28) contrast(1.06) saturate(.85);
}
@keyframes sway{
  0%,100%{transform:rotate(-1.5deg)}
  50%{transform:rotate(.9deg) translateY(-3px)}
}

/* 正文 + 侧栏 */
.board{
  display:grid;grid-template-columns:minmax(0,1fr) 272px;gap:34px;
  align-items:start;max-width:1180px;margin:0 auto;padding:74px 32px 40px;
}
article [id]{scroll-margin-top:96px}

.prose{min-width:0}
.prose section[id]{
  background:var(--card);
  border:1px solid var(--line);
  border-bottom:5px solid var(--tan);
  border-radius:18px;
  padding:26px 24px;
  margin:0 0 26px;
  transition:border-color .25s ease,box-shadow .25s ease,background .25s ease;
  animation:rise .5s ease both;
}
.prose section[id]:hover{
  border-bottom-color:var(--ink);
  box-shadow:0 12px 24px rgba(38,33,23,.14);
  background:rgba(255,252,242,.78);
}
.prose section[id]:nth-child(1){animation-delay:.02s}
.prose section[id]:nth-child(2){animation-delay:.05s}
.prose section[id]:nth-child(3){animation-delay:.08s}
.prose section[id]:nth-child(4){animation-delay:.11s}
.prose section[id]:nth-child(5){animation-delay:.14s}
.prose section[id]:nth-child(6){animation-delay:.17s}
.prose section[id]:nth-child(7){animation-delay:.2s}
@keyframes rise{
  from{opacity:0;transform:translateY(14px)}
  to{opacity:1;transform:none}
}
.prose h2{
  font-size:clamp(1.5rem,3vw,2.05rem);
  margin:0 0 14px;letter-spacing:.01em;
}
.prose h2>span{position:relative;display:inline-block}
.prose h2>span::after{
  content:"";position:absolute;left:0;right:0;bottom:-6px;height:5px;
  background:repeating-linear-gradient(90deg,var(--tan-d) 0 12px,transparent 12px 20px);
}
.prose h3{
  font-size:1.22rem;margin:24px 0 8px;color:var(--ink-soft);
}
.prose p{margin:0 0 14px}
.prose p:last-child{margin-bottom:0}
.prose ul,.prose ol{padding-left:1.3em;margin:0 0 14px}
.prose li{margin:6px 0}
.prose a{color:#82501d;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:2px}
.prose a:hover{color:var(--ink);background:rgba(212,165,116,.35)}
.prose strong{color:var(--ink);background:rgba(212,165,116,.3);padding:0 2px}
.prose blockquote{
  margin:18px 0;padding:12px 18px;border-left:5px solid var(--tan);
  background:rgba(212,165,116,.18);border-radius:0 12px 12px 0;color:var(--ink-soft);
}
.prose figure{margin:18px 0}
.prose img{border-radius:6px;filter:sepia(.22) contrast(1.05) saturate(.88)}
.prose table{width:100%;border-collapse:collapse;margin:16px 0;font-size:16px}
.prose th,.prose td{border:1px solid var(--line);padding:9px 11px;text-align:left}
.prose th{background:rgba(212,165,116,.3);font-weight:600}
.prose hr{border:0;border-top:2px dashed var(--line);margin:22px 0}

/* 侧栏 */
.side{
  position:sticky;top:72px;
  background:rgba(38,33,23,.055);
  border:2px dashed var(--tan-d);
  border-radius:18px;
  padding:18px 16px 22px;
}
.side h2{
  font-size:1.05rem;letter-spacing:.14em;margin:0 0 12px;color:var(--ink);
}
.side h2>span{border-bottom:3px solid var(--tan);padding-bottom:3px}
.side-list{list-style:none;margin:0;padding:0}
.side-list li{border-bottom:1px dashed rgba(38,33,23,.2)}
.side-list li:last-child{border-bottom:0}
.side-list a{
  display:flex;align-items:center;min-height:42px;padding:6px 2px;
  font-size:16px;line-height:1.4;text-decoration:none;color:var(--ink-soft);
  transition:color .2s ease,padding-left .2s ease;
}
.side-list a:hover,.side-list a.on{color:var(--ink);padding-left:6px;font-weight:600}

/* 页脚 */
.foot{
  margin-left:var(--rail);
  background:var(--ink);color:#eddcba;
  border-top:5px solid var(--tan);
  padding:44px 32px 0;
}
.cta{
  display:grid;justify-items:center;gap:18px;text-align:center;
  border:2px solid var(--tan);border-radius:18px;
  padding:38px 22px;
  background:radial-gradient(120% 140% at 50% 0%,rgba(212,165,116,.28),rgba(38,33,23,0) 65%);
}
.cta h2{font-size:clamp(1.9rem,5.6vw,3.4rem);color:var(--paper);letter-spacing:.02em}
.cta-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:50px;padding:12px 30px;border-radius:999px;
  background:var(--tan);color:var(--ink);text-decoration:none;
  font-size:16px;font-weight:700;letter-spacing:.1em;
  transition:transform .22s ease,background .22s ease,color .22s ease;
}
.cta-btn:hover{transform:translateY(-3px) rotate(-1.2deg);background:var(--paper)}

.foot-grid{
  display:grid;grid-template-columns:1fr 1.25fr;gap:34px;
  padding:38px 0 28px;
}
.foot-brand h3{font-size:1.45rem;color:var(--paper);margin:0 0 10px}
.foot-brand h3>span{border-bottom:3px solid var(--tan);padding-bottom:4px}
.foot-brand p{margin:0;font-size:16px;line-height:1.7;color:#c9b593}
.foot-links{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.foot-links dl{margin:0}
.foot-links dt{
  font-family:'Anton',sans-serif;font-size:15px;letter-spacing:.14em;
  color:var(--tan);margin-bottom:6px;
}
.foot-links dd{margin:0}
.foot-links dd a{
  display:flex;align-items:center;min-height:40px;padding:6px 0;
  font-size:16px;line-height:1.4;text-decoration:none;color:#e4d3b1;
  border-bottom:1px solid rgba(245,230,200,.14);
  transition:color .2s ease,padding-left .2s ease;
}
.foot-links dd a:hover{color:var(--tan);padding-left:5px}
.foot-bar{
  border-top:1px solid rgba(245,230,200,.2);
  padding:16px 0;font-size:15px;color:#bda98a;
}
.foot-bar p{margin:0}

@media (max-width:900px){
  :root{--rail:0px}
  body{font-size:16px}
  .rail{
    position:sticky;top:var(--strip);left:auto;right:auto;bottom:auto;
    width:auto;display:block;padding:0;z-index:78;
    background:#e9d6ae;border-right:0;border-bottom:2px solid var(--ink);
  }
  .rail ol{display:flex;gap:2px;overflow-x:auto;padding:0 6px;counter-reset:none}
  .rail li{flex:0 0 auto;animation:none}
  .rail a{min-height:46px;padding:11px 12px;border-bottom:3px solid transparent;white-space:nowrap;font-size:16px}
  .rail a::before{display:none}
  .rail a:hover,.rail a.on{transform:none;border-bottom-color:var(--tan-d)}
  main,.foot{margin-left:0}
  article [id]{scroll-margin-top:120px}
  .hero{min-height:0;padding:34px 16px 74px;gap:20px}
  .hero::after{bottom:-30px;height:66px}
  .hero-photo{padding:10px 10px 32px}
  .board{grid-template-columns:1fr;gap:24px;padding:48px 15px 30px}
  .side{position:static;order:2}
  .prose section[id]{padding:20px 17px;border-radius:16px}
  .foot{padding:32px 15px 0}
  .foot-grid{grid-template-columns:1fr;gap:26px;padding:28px 0 22px}
  .foot-links{grid-template-columns:repeat(3,1fr);gap:12px}
  .cta{padding:28px 16px;border-radius:16px}
}

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

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