:root{
--paper:#fafaf8;
--gray:#4a4a4a;
--ink:#1a1a1a;
--line:rgba(26,26,26,.18);
--glass:rgba(255,255,255,.55);
--maxw:76rem;
}
*,*::before,*::after{box-sizing:border-box}
html{overflow-x:hidden;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
margin:0;
background:var(--paper);
color:var(--ink);
font-family:"Fira Sans","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
font-size:17px;
line-height:1.72;
}
body::before{
content:"";
position:fixed;
inset:0;
z-index:1;
pointer-events:none;
opacity:.38;
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.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
h1,h2,h3{font-weight:700;letter-spacing:-.014em}

/* 顶部：品牌居中，胶囊菜单分两侧 */
.top{
position:sticky;
top:0;
z-index:20;
background:rgba(250,250,248,.84);
backdrop-filter:blur(9px) saturate(1.05);
border-bottom:2px dashed var(--line);
}
.bar{
max-width:var(--maxw);
margin:0 auto;
padding:.5rem clamp(.7rem,2vw,1.6rem);
display:grid;
grid-template-columns:1fr auto 1fr;
align-items:center;
gap:.45rem;
}
.menuL,.menuR{display:flex;gap:.3rem;min-width:0;flex-wrap:wrap}
.menuR{justify-content:flex-end}
.pill{
display:inline-flex;
align-items:center;
min-height:44px;
padding:.5rem .82rem;
border-radius:999px;
border:1.5px solid transparent;
text-decoration:none;
font-size:.83rem;
line-height:1.15;
color:var(--gray);
transition:color .09s linear,border-color .09s linear,background .09s linear,transform .12s linear;
}
.pill:hover{color:var(--ink);border-color:var(--ink);background:#fff;transform:rotate(-1.4deg)}
.pillCta{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.pillCta:hover{background:#000;color:#fff;transform:rotate(1.2deg)}
.brand{
display:inline-flex;
align-items:center;
gap:.4rem;
min-height:46px;
padding:.35rem .5rem;
text-decoration:none;
font-family:"Fira Code",monospace;
font-weight:600;
font-size:1.02rem;
letter-spacing:.16em;
border-bottom:2px solid var(--ink);
}
.brandLogo{width:26px;height:26px;border-radius:6px;flex:0 0 auto}

/* 首屏 */
.hero{
position:relative;
isolation:isolate;
min-height:100svh;
display:flex;
align-items:flex-end;
justify-content:flex-end;
overflow:hidden;
padding:clamp(1.1rem,4vw,2.8rem);
border-bottom:2px solid var(--ink);
background-image:repeating-linear-gradient(135deg,rgba(26,26,26,.05) 0 1px,transparent 1px 11px);
}
.heroMedia{position:absolute;inset:0;z-index:-3}
.heroMedia img,.heroShot{width:100%;height:100%;object-fit:cover;filter:grayscale(.55) contrast(1.1)}
.heroVeil{
position:absolute;
inset:0;
z-index:-2;
background:linear-gradient(180deg,rgba(250,250,248,.06) 0%,rgba(250,250,248,.52) 54%,rgba(250,250,248,.96) 92%);
}
.heroGhost{
position:absolute;
right:-.05em;
top:.02em;
z-index:-1;
margin:0;
font-family:"Fira Code",monospace;
font-weight:700;
font-size:clamp(4.6rem,23vw,18rem);
line-height:.8;
letter-spacing:-.05em;
color:rgba(26,26,26,.075);
pointer-events:none;
user-select:none;
}
.heroCopy{position:relative;z-index:2;max-width:39rem;margin-left:auto;text-align:right}
.heroCopy h1{
margin:0 0 .7rem;
font-size:clamp(2rem,6.4vw,4.5rem);
line-height:1.06;
letter-spacing:-.025em;
}
.heroCopy h1::after{
content:"";
display:block;
width:5.5rem;
height:7px;
margin:.7rem 0 0 auto;
background:var(--ink);
border-radius:99px;
transform:rotate(-.8deg) skewX(-6deg);
}
.heroDesc{
margin:0 0 1.15rem;
font-size:clamp(.98rem,2.2vw,1.16rem);
line-height:1.65;
color:var(--gray);
max-width:32rem;
margin-left:auto;
}
.heroBtn{
display:inline-flex;
align-items:center;
min-height:50px;
padding:.7rem 1.5rem;
border-radius:999px;
background:var(--ink);
color:var(--paper);
text-decoration:none;
font-size:.94rem;
letter-spacing:.1em;
border:2px solid var(--ink);
transform:rotate(-1.6deg);
box-shadow:5px 6px 0 rgba(26,26,26,.16);
transition:transform .1s linear,box-shadow .1s linear;
}
.heroBtn:hover{transform:rotate(1deg) translate(-1px,-1px);box-shadow:7px 8px 0 rgba(26,26,26,.2)}

/* 正文布局 */
.wrap{
max-width:var(--maxw);
margin:0 auto;
padding:clamp(1.3rem,4vw,3rem) clamp(.85rem,3vw,1.9rem);
display:grid;
grid-template-columns:minmax(0,1fr) 19rem;
gap:clamp(1rem,3vw,2.4rem);
align-items:start;
}
.body{min-width:0}
.prose{counter-reset:sec;font-size:1rem}
.prose > section{
position:relative;
counter-increment:sec;
padding:.6rem 0 clamp(1.5rem,3.2vw,2.3rem);
border-bottom:2px dashed var(--line);
scroll-margin-top:5.6rem;
}
.prose > section:last-child{border-bottom:0;padding-bottom:.4rem}
.prose > section::before{
content:counter(sec,decimal-leading-zero);
display:block;
margin-bottom:.35rem;
font-family:"Fira Code",monospace;
font-size:.76rem;
letter-spacing:.24em;
color:var(--gray);
opacity:.65;
}
.prose h2{
margin:.1rem 0 .5rem;
font-size:clamp(1.32rem,3.3vw,1.95rem);
line-height:1.26;
}
.prose h2::after{
content:"";
display:block;
width:4.2rem;
height:5px;
margin-top:.5rem;
background:var(--ink);
border-radius:99px;
transform:rotate(-.7deg) skewX(-8deg);
}
.prose h3{
margin:1.4rem 0 .45rem;
font-size:clamp(1.06rem,2.3vw,1.2rem);
line-height:1.35;
}
.prose p{margin:0 0 1em}
.prose .subtitle,.prose .lead,.prose .desc{
margin:.15rem 0 1em;
font-size:.94rem;
color:var(--gray);
letter-spacing:.04em;
}
.prose ul,.prose ol{margin:0 0 1em;padding-left:1.25em}
.prose li{margin:0 0 .4em}
.prose ul li::marker{color:var(--gray)}
.prose blockquote{
margin:1.2em 0;
padding:.35em 0 .35em 1em;
border-left:5px solid var(--ink);
color:var(--gray);
}
.prose blockquote p:last-child{margin-bottom:0}
.prose a{
color:var(--ink);
text-decoration:underline;
text-decoration-thickness:2px;
text-underline-offset:3px;
text-decoration-color:rgba(26,26,26,.32);
}
.prose a:hover{text-decoration-color:var(--ink);background:rgba(26,26,26,.06)}
.prose strong,.prose b{
font-weight:600;
background:linear-gradient(transparent 60%,rgba(26,26,26,.17) 60%);
}
.prose code,.prose pre{font-family:"Fira Code",monospace;font-size:.9em}
.prose pre{overflow-x:auto;padding:.9rem 1rem;border:1.5px solid var(--line);border-radius:14px;background:#fff}
.prose table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.95rem}
.prose th,.prose td{border:1.5px solid var(--line);padding:.5em .65em;text-align:left;vertical-align:top}
.prose th{background:rgba(26,26,26,.05)}
.prose img{margin:1em 0;border:2px solid var(--ink);border-radius:18px;transform:rotate(-.35deg)}
.prose hr{border:0;border-top:2px dashed var(--line);margin:1.6em 0}

/* 右侧目录卡 */
.side{
position:sticky;
top:5.4rem;
padding:1.05rem .95rem 1.15rem;
background:var(--glass);
border:2px solid var(--ink);
border-radius:28px;
backdrop-filter:blur(10px) saturate(1.1);
box-shadow:7px 8px 0 rgba(26,26,26,.09);
transform:rotate(.55deg);
}
.side h2{
margin:0;
font-size:1rem;
font-family:"Fira Code",monospace;
letter-spacing:.14em;
}
.side .subtitle{
margin:.25rem 0 .7rem;
font-size:.8rem;
letter-spacing:.08em;
color:var(--gray);
}
.toc{display:flex;flex-direction:column;gap:.12rem}
.tocLink{
display:flex;
align-items:center;
gap:.55rem;
min-height:42px;
padding:.4rem .45rem;
border-radius:14px;
border-bottom:1.5px dashed transparent;
text-decoration:none;
font-size:.88rem;
line-height:1.3;
color:var(--gray);
}
.tocLink:hover{color:var(--ink);background:rgba(255,255,255,.75);border-bottom-color:var(--ink)}
.tocNo{font-family:"Fira Code",monospace;font-size:.72rem;opacity:.55;flex:0 0 auto}
.tocTxt{min-width:0}

/* 页脚 */
.bot{
margin-top:clamp(1.4rem,5vw,3.6rem);
padding:clamp(1.3rem,4vw,2.5rem) clamp(.85rem,3vw,1.9rem) 1.2rem;
background:var(--ink);
color:#f2f2ee;
border-top:2px solid var(--ink);
}
.bot section{max-width:var(--maxw);margin:0 auto}
.botBrand{
margin:0 0 .9rem;
font-family:"Fira Code",monospace;
font-weight:700;
font-size:clamp(2.7rem,14vw,8.5rem);
line-height:.84;
letter-spacing:-.04em;
color:#fafaf8;
opacity:.95;
}
.defs{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(8.6rem,1fr));
gap:.4rem .9rem;
margin:0 0 1.1rem;
padding-top:.95rem;
border-top:1.5px dashed rgba(250,250,248,.28);
}
.defs dt{
font-family:"Fira Code",monospace;
font-size:.68rem;
letter-spacing:.24em;
color:rgba(250,250,248,.5);
}
.defs dd{margin:.05rem 0 0}
.defs a{
display:inline-flex;
align-items:center;
min-height:42px;
padding:.1rem 0;
text-decoration:none;
font-size:.92rem;
border-bottom:1.5px solid rgba(250,250,248,.25);
}
.defs a:hover{border-bottom-color:#fafaf8;color:#fff}
.copy{
margin:0;
padding-top:.95rem;
text-align:center;
font-size:.78rem;
letter-spacing:.2em;
color:rgba(250,250,248,.62);
border-top:1.5px dashed rgba(250,250,248,.2);
}

/* 动效：台阶式生涩入场 */
@media (prefers-reduced-motion:no-preference){
.tocLink{animation:tick .34s steps(2,end) backwards}
.tocLink:nth-child(2){animation-delay:.03s}
.tocLink:nth-child(3){animation-delay:.06s}
.tocLink:nth-child(4){animation-delay:.09s}
.tocLink:nth-child(5){animation-delay:.12s}
.tocLink:nth-child(6){animation-delay:.15s}
.tocLink:nth-child(7){animation-delay:.18s}
@keyframes tick{from{opacity:0;transform:translateX(7px)}to{opacity:1;transform:none}}
}
@media (prefers-reduced-motion:reduce){
html{scroll-behavior:auto}
*{transition:none!important;animation:none!important}
}

@media (max-width:900px){
.bar{
grid-template-columns:1fr;
grid-template-areas:"brand" "l" "r";
justify-items:center;
gap:.35rem;
padding-bottom:.6rem;
}
.brand{grid-area:brand}
.menuL{grid-area:l;justify-content:center}
.menuR{grid-area:r;justify-content:center}
.wrap{grid-template-columns:minmax(0,1fr)}
.side{position:static;transform:rotate(-.4deg)}
.heroGhost{font-size:clamp(4rem,26vw,9rem)}
}
@media (max-width:560px){
.pill{padding:.5rem .68rem;font-size:.79rem}
.hero{padding-bottom:1.4rem}
.heroCopy{max-width:100%}
.heroCopy h1{font-size:clamp(1.8rem,8vw,2.4rem)}
}

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