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

:root{
  --ink:#1f1f1f;
  --paper:#ffffff;
  --mist:#f5f5f5;
  --line:#e2e2e2;
  --mute:#565656;
  --r:10px;
  --shadow:0 4px 6px rgba(0,0,0,.05);
}

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

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

body{
  margin:0;
  padding-bottom:172px;
  background:var(--mist);
  color:var(--ink);
  font-family:'Outfit',system-ui,-apple-system,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.7;
  letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
}

img,svg{max-width:100%}
a{color:inherit}
:focus-visible{outline:3px solid var(--ink);outline-offset:3px;border-radius:4px}

/* 底部固定条 */
.bar{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:60;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.95);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-top:1px solid var(--line);
  box-shadow:0 -8px 24px rgba(0,0,0,.06);
}

.brand{
  align-self:flex-start;
  font-size:16px;
  font-weight:900;
  letter-spacing:.18em;
  line-height:1.4;
  padding-bottom:3px;
  text-decoration:none;
  border-bottom:3px solid var(--ink);
}

.nav{min-width:0}

.nav p{
  display:flex;
  gap:6px;
  margin:0;
  padding:0 0 2px;
  overflow-x:auto;
  scrollbar-width:none;
}

.nav p::-webkit-scrollbar{display:none}

.navlink{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:40px;
  padding:8px 13px;
  border-radius:var(--r);
  background:var(--mist);
  font-size:16px;
  font-weight:500;
  white-space:nowrap;
  text-decoration:none;
  border-bottom:2px solid transparent;
  transition:background .2s,color .2s,border-color .2s;
}

.navlink .ic{
  width:7px;height:7px;
  border-radius:2px;
  background:var(--ink);
  flex:none;
}

.navlink:hover{background:#e8e8e8}
.navlink[aria-current="true"]{background:var(--ink);color:#fff}
.navlink[aria-current="true"] .ic{background:#fff}

/* 首屏 */
.hero{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  grid-template-areas:"copy art";
  align-items:center;
  gap:20px;
  min-height:70vh;
  max-width:1180px;
  margin:0 auto;
  padding:26px 16px 22px;
}

.hero-copy{grid-area:copy;text-align:right}

.hero-copy h1{
  margin:0 0 14px;
  font-size:clamp(29px,5vw,52px);
  line-height:1.12;
  font-weight:900;
  letter-spacing:-.02em;
}

.lede{
  margin:0 0 0 auto;
  max-width:32ch;
  font-size:17px;
  color:var(--mute);
}

.hero-art{
  grid-area:art;
  position:relative;
  padding:10px;
}

.hero-art .art{
  display:block;
  width:100%;
  height:auto;
  border-radius:14px;
  box-shadow:0 14px 30px rgba(0,0,0,.07);
  transition:transform .35s ease;
}

.hero-art:hover .art{transform:scale(1.02)}

.badge{
  position:absolute;
  top:-4px;left:0;
  z-index:2;
  padding:6px 12px;
  border-radius:var(--r);
  background:var(--ink);
  color:#fff;
  font-size:16px;
  font-weight:700;
  letter-spacing:.08em;
  line-height:1.5;
  transform:rotate(-4deg);
  box-shadow:0 6px 14px rgba(0,0,0,.18);
}

/* 主体栅格：左侧栏 + 正文 */
.wrap{
  display:grid;
  grid-template-columns:224px minmax(0,1fr);
  gap:16px;
  align-items:start;
  max-width:1180px;
  margin:0 auto;
  padding:6px 16px 26px;
}

.side{
  position:sticky;
  top:16px;
  padding:16px;
  background:var(--paper);
  border-radius:var(--r);
  border-bottom:3px solid var(--ink);
  box-shadow:var(--shadow);
}

.side-h{
  margin:0;
  font-size:16px;
  font-weight:900;
  letter-spacing:.22em;
  line-height:1.5;
}

.side hr{
  border:0;
  border-top:1px solid var(--line);
  margin:10px 0 12px;
}

.side-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:2px;
}

.side-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:8px;
  border-radius:8px;
  font-size:16px;
  line-height:1.5;
  text-decoration:none;
  transition:background .2s,padding-left .2s;
}

.side-list a:hover{background:var(--mist);padding-left:12px}

.content{min-width:0}

/* 正文卡片 */
.prose{
  display:grid;
  gap:14px;
  min-width:0;
}

.prose > div{
  padding:22px 18px;
  background:var(--paper);
  border-radius:var(--r);
  border-bottom:3px solid var(--ink);
  box-shadow:var(--shadow);
  scroll-margin-top:20px;
  scroll-margin-bottom:118px;
  transition:box-shadow .25s,opacity .5s ease,transform .55s cubic-bezier(.22,.61,.36,1);
}

.prose > div:hover{box-shadow:0 10px 22px rgba(0,0,0,.09)}

.prose h2{
  margin:0 0 10px;
  font-size:clamp(21px,2.6vw,27px);
  line-height:1.25;
  font-weight:900;
  letter-spacing:-.01em;
}

.prose h3{
  margin:18px 0 8px;
  font-size:19px;
  line-height:1.4;
  font-weight:700;
}

.prose p{margin:0 0 12px}
.prose p:last-child{margin-bottom:0}
.prose ul,.prose ol{margin:0 0 12px;padding-left:20px}
.prose li{margin:4px 0}
.prose strong{font-weight:700}

.prose a{
  font-weight:500;
  text-decoration:underline;
  text-underline-offset:3px;
}

.prose a:hover{background:#efefef}

.prose hr{
  border:0;
  height:3px;
  width:46px;
  background:var(--ink);
  margin:12px 0 16px;
}

.prose blockquote{
  margin:14px 0;
  padding:10px 14px;
  background:var(--mist);
  border-left:4px solid var(--ink);
  border-radius:0 var(--r) var(--r) 0;
}

.prose blockquote p:last-child{margin:0}
.prose img{display:block;height:auto;border-radius:var(--r)}

/* 页脚 */
.foot{
  margin-top:22px;
  padding:24px 16px 20px;
  background:var(--paper);
  border-top:1px solid var(--line);
}

.foot-grid{
  display:grid;
  grid-template-columns:1fr 1.2fr 1fr;
  gap:22px;
  align-items:start;
  max-width:1180px;
  margin:0 auto;
}

.foot-lab{
  margin:0 0 8px;
  font-size:16px;
  font-weight:900;
  letter-spacing:.2em;
  line-height:1.5;
}

address{
  font-style:normal;
  font-size:16px;
  font-weight:700;
  line-height:1.6;
}

.sub{display:flex;gap:8px}

.sub-in{
  flex:1;
  min-width:0;
  min-height:44px;
  padding:8px 12px;
  font:inherit;
  font-size:16px;
  color:var(--ink);
  background:var(--mist);
  border:1px solid #cfcfcf;
  border-radius:var(--r);
}

.sub-btn{
  min-height:44px;
  padding:8px 16px;
  font:inherit;
  font-size:16px;
  font-weight:700;
  color:#fff;
  background:var(--ink);
  border:0;
  border-radius:var(--r);
  cursor:pointer;
  transition:opacity .2s;
}

.sub-btn:hover{opacity:.85}
.sub-btn:disabled{opacity:.6;cursor:default}

.foot-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 10px;
}

.foot-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:6px 2px;
  font-size:16px;
  text-decoration:none;
  border-bottom:1px solid transparent;
}

.foot-list a:hover{border-bottom-color:var(--ink)}

.copy{
  max-width:1180px;
  margin:20px auto 0;
  padding-top:14px;
  border-top:1px solid var(--line);
  text-align:center;
  font-size:16px;
  color:var(--mute);
}

/* 滚动显现 */
.rv{opacity:0;transform:translateY(14px)}
.rv.in{opacity:1;transform:none}

@media (max-width:859px){
  .hero{
    grid-template-columns:1fr;
    grid-template-areas:"art" "copy";
    min-height:0;
    gap:16px;
    padding-top:24px;
  }
  .hero-art{max-width:340px;margin-left:auto;width:100%}
  .hero-copy h1{font-size:clamp(28px,8vw,40px)}
  .wrap{grid-template-columns:1fr}
  .side{position:static}
  .foot-grid{grid-template-columns:1fr;gap:18px}
  .prose > div{padding:20px 16px}
}

@media (min-width:900px){
  .prose{grid-template-columns:repeat(2,minmax(0,1fr))}
  .prose > div:nth-child(4n+1){grid-column:1 / -1}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rv{opacity:1;transform:none;transition:none}
  .hero-art .art{transition:none}
}

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