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

:root{
--ink:#000000;
--paper:#ffffff;
--line:#e3e3e3;
--soft:#fafafa;
--mute:#6d6d6d;
--r:18px;
--maxw:1200px;
--pad:1.25rem;
--head-h:7.6rem;
}

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

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

body{
margin:0;
background:var(--paper);
color:var(--ink);
font-family:"Space Grotesk",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
font-size:17px;
line-height:1.65;
letter-spacing:.005em;
}

a{color:inherit}
img{display:block;max-width:100%;height:auto}
p,dl,dd,figure{margin:0}
a:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:4px}

/* 页头：品牌独占一行，菜单行在下 */
.site-head{
position:sticky;
top:0;
z-index:30;
background:rgba(255,255,255,.95);
border-bottom:1px solid var(--ink);
backdrop-filter:saturate(120%) blur(6px);
}
.brand-row{padding:.3rem var(--pad)}
.brand{
display:inline-flex;
align-items:center;
gap:.55rem;
min-height:44px;
padding:.35rem 0;
font-size:1.05rem;
font-weight:700;
text-decoration:none;
}
.brand::before{
content:"";
width:15px;
height:15px;
border-radius:5px;
background:var(--ink);
flex:none;
}
.menu-row{border-top:1px solid var(--line)}
.top-nav{
display:flex;
flex-wrap:wrap;
gap:0 .85rem;
padding:0 var(--pad);
font-size:.95rem;
}
.top-nav a{
display:inline-flex;
align-items:center;
gap:.4rem;
min-height:44px;
padding:.55rem 0;
color:var(--mute);
text-decoration:none;
white-space:nowrap;
transition:color .22s ease;
}
.top-nav a::before{
content:"";
width:6px;
height:6px;
border-radius:50%;
background:currentColor;
flex:none;
}
.top-nav a:hover,
.top-nav a.current{color:var(--ink)}
.top-nav a.current{font-weight:700}

/* 首屏：左文右图，点阵底纹，紧凑高度 */
.hero{
max-width:var(--maxw);
margin:0 auto;
min-height:45vh;
display:grid;
grid-template-columns:1.05fr .95fr;
gap:2rem;
align-items:center;
padding:2rem var(--pad);
background-image:radial-gradient(var(--line) 1px,transparent 1px);
background-size:15px 15px;
background-position:center;
}
.hero-copy{text-align:center}
.hero h1{
margin:0 0 .9rem;
font-size:clamp(1.9rem,5.6vw,3.9rem);
line-height:1.03;
letter-spacing:-.03em;
}
.hero-sub{
margin:0 auto;
max-width:36ch;
color:var(--mute);
font-size:1rem;
line-height:1.6;
}
.hero-figure{
aspect-ratio:4 / 3;
border:1px solid var(--ink);
border-radius:var(--r);
overflow:hidden;
background:var(--paper);
}
.hero-figure img{width:100%;height:100%;object-fit:cover}
.hero-dots{
width:100%;
height:100%;
background-image:radial-gradient(var(--ink) 1.4px,transparent 1.4px);
background-size:11px 11px;
opacity:.85;
}

/* 主体：左侧目录 + 右侧正文 */
.shell{
max-width:var(--maxw);
margin:0 auto;
padding:2.5rem var(--pad) 4rem;
display:grid;
grid-template-columns:220px minmax(0,1fr);
gap:2rem;
align-items:start;
}
.side{
position:sticky;
top:var(--head-h);
padding:1rem .9rem;
border:1px solid var(--ink);
border-radius:var(--r);
background:var(--paper);
}
.side h2{
margin:0 0 .6rem;
font-size:1rem;
letter-spacing:.05em;
line-height:1.4;
}
.side h2 > span{display:inline-flex;align-items:center;gap:.45rem}
.side h2 > span::before{content:"";width:8px;height:8px;background:var(--ink);flex:none}
.side-nav{display:grid}
.side-nav a{
display:flex;
align-items:center;
min-height:42px;
padding:.4rem 0;
border-top:1px solid var(--line);
font-size:.98rem;
color:var(--mute);
text-decoration:none;
transition:color .22s ease,padding-left .22s ease;
}
.side-nav a:first-child{border-top:0}
.side-nav a:hover{color:var(--ink)}
.side-nav a.active{color:var(--ink);font-weight:700;padding-left:.2rem}

/* 正文卡片 */
.prose{display:grid;gap:1.4rem;min-width:0}
.prose section{
padding:1.5rem 1.15rem;
border:1px solid var(--line);
border-radius:var(--r);
background:var(--paper);
box-shadow:0 18px 40px -32px rgba(0,0,0,.65);
scroll-margin-top:var(--head-h);
overflow-wrap:break-word;
animation:rise .5s ease both;
}
.prose section:nth-child(even){background:var(--soft)}
.prose section:nth-child(2){animation-delay:.04s}
.prose section:nth-child(3){animation-delay:.08s}
.prose section:nth-child(4){animation-delay:.12s}
.prose section:nth-child(5){animation-delay:.16s}
.prose section:nth-child(6){animation-delay:.2s}
.prose section:nth-child(7){animation-delay:.24s}
.prose section > :first-child{margin-top:0}
.prose section > :last-child{margin-bottom:0}
.prose h2{
margin:0 0 .9rem;
font-size:clamp(1.25rem,2.4vw,1.6rem);
line-height:1.25;
letter-spacing:-.01em;
}
.prose h2 > span{display:inline-flex;align-items:center;gap:.55rem}
.prose h2 > span::before{
content:"";
flex:none;
width:11px;
height:11px;
border-radius:3px;
background:var(--ink);
}
.prose h3{
margin:1.2rem 0 .6rem;
font-size:1.12rem;
line-height:1.35;
}
.prose h3 > span{display:inline-flex;align-items:center;gap:.5rem}
.prose h3 > span::before{
content:"";
flex:none;
width:8px;
height:2px;
background:var(--ink);
}
.prose p{margin:0 0 .9rem;max-width:68ch}
.prose ul,.prose ol{margin:0 0 .9rem;padding-left:1.25rem;max-width:68ch}
.prose li{margin:.3rem 0}
.prose a{text-underline-offset:3px}
.prose img{border-radius:12px;margin:1rem 0}
.prose blockquote{
margin:1rem 0;
padding:.7rem 1rem;
border-left:3px solid var(--ink);
color:var(--mute);
}
.prose table{width:100%;border-collapse:collapse;margin:1rem 0;font-size:.95rem}
.prose th,.prose td{border-bottom:1px solid var(--line);padding:.5rem .4rem;text-align:left}

/* 页脚 */
.site-foot{border-top:1px solid var(--ink);margin-top:1rem}
.foot-cta{
max-width:var(--maxw);
margin:0 auto;
padding:2.8rem var(--pad);
display:flex;
flex-wrap:wrap;
gap:1.2rem;
align-items:center;
justify-content:space-between;
border-bottom:1px solid var(--line);
}
.foot-cta h2{
margin:0;
font-size:clamp(1.7rem,5vw,3rem);
line-height:1;
letter-spacing:-.03em;
}
.to-top{
display:inline-flex;
align-items:center;
min-height:46px;
padding:.6rem 1.3rem;
border:1px solid var(--ink);
border-radius:999px;
font-size:.95rem;
font-weight:600;
text-decoration:none;
transition:background .22s ease,color .22s ease;
}
.to-top:hover{background:var(--ink);color:var(--paper)}
.foot-cols{
max-width:var(--maxw);
margin:0 auto;
padding:2rem var(--pad);
display:grid;
grid-template-columns:1.2fr 1fr 1fr .5fr;
gap:1.5rem;
border-bottom:1px solid var(--line);
}
.foot-brand{font-weight:700;font-size:1.05rem;line-height:1.4}
.foot-cols dl{display:grid;gap:.35rem}
.foot-cols dt{font-size:.95rem;color:var(--mute)}
.foot-cols dd{display:grid}
.foot-cols dd a{
display:inline-flex;
align-items:center;
min-height:40px;
font-size:.95rem;
text-decoration:none;
}
.foot-cols dd a:hover{text-decoration:underline;text-underline-offset:3px}
.foot-mark{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:4px;
width:54px;
height:54px;
}
.foot-mark i{background:var(--ink);border-radius:3px}
.foot-bar{
max-width:var(--maxw);
margin:0 auto;
padding:1rem var(--pad) 2rem;
display:flex;
flex-wrap:wrap;
gap:.8rem;
align-items:center;
justify-content:space-between;
font-size:.95rem;
color:var(--mute);
}
.foot-bar a{
display:inline-flex;
align-items:center;
min-height:40px;
color:var(--ink);
text-decoration:none;
}
.foot-bar a:hover{text-decoration:underline;text-underline-offset:3px}

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

@media (max-width:900px){
.hero{
grid-template-columns:1fr;
min-height:0;
padding:1.6rem var(--pad) 2rem;
gap:1.2rem;
}
.hero-figure{aspect-ratio:16 / 10}
.shell{
grid-template-columns:1fr;
padding-top:1.6rem;
gap:1.4rem;
}
.side{position:static;top:auto}
.side-nav{grid-template-columns:1fr 1fr;column-gap:.9rem}
.side-nav a{font-size:.95rem}
.foot-cols{grid-template-columns:1fr 1fr}
}

@media (max-width:520px){
.foot-cols{grid-template-columns:1fr}
.foot-mark{display:none}
.hero h1{letter-spacing:-.02em}
}

@media (prefers-reduced-motion:reduce){
html{scroll-behavior:auto}
.prose section{animation:none}
*{transition-duration:.01ms !important;animation-duration:.01ms !important}
}

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