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

:root{
--paper:#f5e6c8;
--paper-2:#efdcba;
--cream:#faf1de;
--ink:#262117;
--ink-soft:#544736;
--line:#d4a574;
--rust:#8a5a26;
--r:28px;
--f-cond:"Barlow Condensed","Arial Narrow",system-ui,sans-serif;
--f-body:Barlow,system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background-color:var(--paper);color:var(--ink);font-family:var(--f-body);font-size:17px;line-height:1.72;
background-image:radial-gradient(circle at 12% -8%,rgba(212,165,116,.5),transparent 46%),radial-gradient(circle at 96% 3%,rgba(250,241,222,.85),transparent 42%);
background-attachment:fixed}
body::before{content:"";position:fixed;inset:0;z-index:8;pointer-events:none;opacity:.22;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='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='0.55'/%3E%3C/svg%3E")}
body::after{content:"";position:fixed;inset:0;z-index:7;pointer-events:none;opacity:.35;
background-image:repeating-linear-gradient(180deg,rgba(38,33,23,.09) 0 1px,transparent 1px 4px)}
img{max-width:100%;height:auto}
a{color:var(--rust)}
a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
small{font-family:var(--f-cond)}
h1,h2,h3,h4{font-family:var(--f-cond);font-weight:600;line-height:1.12;letter-spacing:.01em}

/* 顶栏 */
.mast{position:sticky;top:0;z-index:30;background:linear-gradient(180deg,#f8ebd0,#efdcba);border-bottom:1px solid var(--ink)}
.mast::after{content:"";display:block;height:4px;background:repeating-linear-gradient(90deg,rgba(38,33,23,.5) 0 9px,transparent 9px 18px);opacity:.28}
.mast-top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.4rem;
max-width:1180px;margin:0 auto;padding:.5rem clamp(.7rem,3vw,2rem)}
.mast-brand{font-family:var(--f-cond);font-size:clamp(1.4rem,3.2vw,1.9rem);letter-spacing:.16em;line-height:1;
text-decoration:none;color:var(--ink);background:var(--cream);border:1px solid var(--ink);border-radius:3px;
padding:.42rem .6rem .34rem;transform:rotate(-.7deg);white-space:nowrap}
.mast-nav p{display:flex;flex-wrap:wrap;gap:.1rem;margin:0;padding:0}
.mast-nav-b p{justify-content:flex-end}
.mast-nav a{display:inline-flex;align-items:center;gap:.4rem;min-height:40px;padding:.35rem .5rem;border-radius:3px;
color:var(--ink);text-decoration:none;font-family:var(--f-cond);font-size:16px;letter-spacing:.05em}
.mast-nav a::before{content:"";flex:0 0 auto;width:6px;height:6px;border:1px solid currentColor;transform:rotate(45deg)}
.mast-nav a:hover{background:var(--ink);color:var(--paper)}
.mast-search{max-width:1180px;margin:0 auto;display:flex;justify-content:flex-end;padding:0 clamp(.7rem,3vw,2rem) .6rem}
.find{display:flex;align-items:center;gap:.45rem;padding:.2rem .25rem .2rem .85rem;
border:1px solid var(--line);border-radius:999px;background:rgba(250,241,222,.7)}
.find-label{font-family:var(--f-cond);font-size:16px;letter-spacing:.12em;color:var(--ink-soft)}
.find input{font:inherit;font-size:16px;color:var(--ink);background:transparent;border:0;
width:8.5rem;max-width:40vw;min-height:34px;padding:.25rem 0}
.find button{font-family:var(--f-cond);font-size:16px;letter-spacing:.12em;cursor:pointer;
min-height:36px;padding:.25rem .9rem;border-radius:999px;border:1px solid var(--ink);background:var(--ink);color:var(--paper)}

/* 首屏 */
.hero{position:relative;overflow:hidden;display:flex;align-items:center;min-height:45vh;
border-bottom:1px solid var(--ink);
background-image:radial-gradient(circle,rgba(38,33,23,.17) 1px,transparent 1.4px),linear-gradient(155deg,#f7e9cc,#e8d0a6);
background-size:16px 16px,auto}
.hero::after{content:"";position:absolute;top:-45%;right:-12%;width:62%;height:190%;pointer-events:none;
background:radial-gradient(closest-side,rgba(255,214,140,.6),transparent 72%);
transform:rotate(-8deg);animation:leak 10s ease-in-out infinite alternate}
.hero-in{position:relative;z-index:1;width:100%;max-width:1180px;margin:0 auto;
display:flex;align-items:center;gap:clamp(.9rem,3vw,1.8rem);padding:clamp(1.5rem,5vw,2.8rem) clamp(.85rem,4vw,2rem)}
.hero-mark{flex:0 0 auto;width:clamp(62px,11vw,100px);aspect-ratio:1;display:grid;place-items:center;
padding:6px 6px 16px;border:1px solid var(--ink);border-radius:4px;background-color:var(--cream);
background-image:radial-gradient(circle,rgba(38,33,23,.22) 1px,transparent 1.3px);background-size:9px 9px;
transform:rotate(-4deg)}
.hero-mark img{width:100%;height:100%;object-fit:contain;display:block;border-radius:2px}
.hero-copy h1{margin:0 0 .45rem;font-size:clamp(1.9rem,6vw,3.4rem);line-height:1.05;
animation:vhs 750ms ease-out 1 both}
.lede{margin:0;max-width:46ch;color:var(--ink-soft);font-size:17px}

/* 版面 */
main{display:block}
.wrap{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 300px;
gap:clamp(1.1rem,3vw,2.4rem);align-items:start;padding:clamp(1.3rem,4vw,2.6rem) clamp(.85rem,4vw,2rem)}
section[id]{scroll-margin-top:132px}

/* 正文 */
.prose{max-width:70ch}
.prose section{animation:rise .55s ease both}
.prose section:nth-of-type(2){animation-delay:.05s}
.prose section:nth-of-type(3){animation-delay:.1s}
.prose section:nth-of-type(4){animation-delay:.15s}
.prose section:nth-of-type(5){animation-delay:.2s}
.prose section:nth-of-type(6){animation-delay:.25s}
.prose section:nth-of-type(7){animation-delay:.3s}
.prose section+section{margin-top:2.4rem;padding-top:2rem;border-top:1px dashed var(--line)}
.prose small{display:block;font-size:15px;letter-spacing:.26em;color:var(--rust);margin-bottom:.3rem}
.prose h2{margin:0 0 .8rem;font-size:clamp(1.5rem,3.6vw,2.15rem)}
.prose h3{margin:1.5rem 0 .4rem;font-size:1.32rem}
.prose h4{margin:1.2rem 0 .3rem;font-size:1.15rem}
.prose p{margin:0 0 1rem}
.prose ul,.prose ol{margin:0 0 1rem;padding-left:1.25rem}
.prose li{margin-bottom:.35rem}
.prose li::marker{color:var(--rust)}
.prose strong{color:#1b1711}
.prose blockquote{margin:1.2rem 0;padding:.5rem 1rem;border-left:3px solid var(--line);
background:rgba(250,241,222,.6);border-radius:0 6px 6px 0;color:var(--ink-soft)}
.prose blockquote p:last-child{margin:0}
.prose figure{margin:1.4rem 0;padding:9px 9px 26px;border:1px solid var(--ink);border-radius:5px;
background:var(--cream);transform:rotate(-.6deg);max-width:420px}
.prose figure img{display:block;width:100%;border-radius:3px;filter:sepia(.18) contrast(1.02) saturate(.85)}
.prose figcaption{font-family:var(--f-cond);font-size:16px;letter-spacing:.06em;color:var(--ink-soft);padding-top:.4rem}
.prose table{width:100%;border-collapse:collapse;margin:1.2rem 0;font-size:16px}
.prose th,.prose td{border:1px solid var(--line);padding:.45rem .6rem;text-align:left;vertical-align:top}
.prose th{background:rgba(212,165,116,.35);font-family:var(--f-cond);letter-spacing:.05em}
.prose hr{border:0;border-top:1px dashed var(--line);margin:1.6rem 0}
.prose a{text-decoration-thickness:1px;text-underline-offset:2px}
.prose code{font-size:.95em;background:rgba(38,33,23,.08);padding:.1em .35em;border-radius:3px}

/* 侧栏 */
.side{position:sticky;top:126px;border:1px solid var(--ink);border-radius:var(--r);
background:rgba(250,241,222,.72);padding:1rem 1rem 1.15rem}
.side small{display:block;font-size:15px;letter-spacing:.26em;color:var(--rust)}
.side h2{margin:.15rem 0 .7rem;font-size:1.42rem}
.toc p{display:flex;flex-direction:column;margin:0}
.toc a{display:flex;align-items:center;min-height:40px;padding:.28rem .45rem;font-size:16px;
color:var(--ink);text-decoration:none;border-bottom:1px dashed rgba(38,33,23,.22)}
.toc a:last-child{border-bottom:0}
.toc a:hover{background:var(--ink);color:var(--paper)}
.up{display:inline-flex;align-items:center;min-height:40px;margin-top:.7rem;padding:.3rem .7rem;
border:1px solid var(--ink);border-radius:999px;font-family:var(--f-cond);font-size:16px;
letter-spacing:.1em;text-decoration:none;color:var(--ink)}
.up:hover{background:var(--ink);color:var(--paper)}

/* 页脚 */
.foot{position:relative;z-index:2;border-top:1px solid var(--ink);background:var(--paper-2)}
.foot-in{max-width:1180px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;
justify-content:space-between;gap:.4rem 1.2rem;padding:.85rem clamp(.85rem,4vw,2rem)}
.foot-logo{font-family:var(--f-cond);font-size:clamp(1.8rem,7vw,3.2rem);line-height:1;letter-spacing:.05em;
text-decoration:none;color:var(--ink)}
.foot-nav p{display:flex;flex-wrap:wrap;gap:.05rem .5rem;margin:0}
.foot-nav a{display:inline-flex;align-items:center;min-height:40px;padding:.2rem .3rem;font-size:16px;
color:var(--ink-soft);text-decoration:none;border-bottom:1px solid transparent}
.foot-nav a:hover{color:var(--ink);border-bottom-color:var(--ink)}
.copy{font-family:var(--f-cond);font-size:16px;letter-spacing:.08em;color:var(--ink-soft)}

@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes leak{from{opacity:.55;transform:rotate(-8deg) translateY(-6px)}to{opacity:.9;transform:rotate(-4deg) translateY(8px)}}
@keyframes vhs{0%{opacity:.4;transform:translateX(-4px) skewX(-1.6deg)}45%{opacity:.85;transform:translateX(2px) skewX(.8deg)}100%{opacity:1;transform:none}}

@media (max-width:900px){
.wrap{grid-template-columns:minmax(0,1fr)}
.side{position:static;order:2}
.prose{max-width:none}
}

@media (max-width:720px){
.mast-top{grid-template-columns:minmax(0,1fr);gap:.3rem;text-align:center}
.mast-brand{order:-1;justify-self:center;margin-bottom:.15rem}
.mast-nav p{justify-content:center}
.mast-nav-b p{justify-content:center}
.mast-search{justify-content:center}
.find input{width:7.5rem;max-width:42vw}
.hero{min-height:44vh}
.hero-in{flex-direction:row;align-items:flex-start;gap:.7rem;padding-top:1.2rem}
.foot-in{flex-direction:column;align-items:flex-start;gap:.3rem}
.foot-nav p{justify-content:flex-start}
}

@media (prefers-reduced-motion:reduce){
html{scroll-behavior:auto}
.prose section,.hero-copy h1{animation:none}
.hero::after{animation:none}
}

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