@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root{
  --ink:#1f1f1f;
  --paper:#ffffff;
  --mist:#f5f5f5;
  --line:#e5e5e5;
  --mute:#6d6d6d;
  --e1:0 1px 2px rgba(31,31,31,.06);
  --e2:0 4px 14px rgba(31,31,31,.08);
  --e3:0 12px 30px rgba(31,31,31,.11);
  --e4:0 22px 52px rgba(31,31,31,.16);
  --head:"Calistoga","Songti SC","Noto Serif SC",Georgia,serif;
  --ui:Inter,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
}

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

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

body{
  margin:0;
  background:var(--mist);
  color:var(--ink);
  font-family:var(--ui);
  font-size:17px;
  line-height:1.78;
  -webkit-font-smoothing:antialiased;
}

img{max-width:100%}
a{color:var(--ink)}
::selection{background:var(--ink);color:#fff}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

@media (min-width:1121px){
  body{padding-left:176px}
}

/* ---------- 左侧竖排导航 ---------- */
.rail{
  position:fixed;
  inset:0 auto 0 0;
  width:176px;
  z-index:30;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:20px;
  padding:24px 16px;
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-right:1px solid var(--line);
  box-shadow:var(--e2);
  overflow-y:auto;
}

.mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  border-radius:13px;
  background:var(--ink);
  color:#fff;
  text-decoration:none;
  font-family:var(--head);
  font-size:22px;
  line-height:1;
  box-shadow:var(--e3);
  z-index:4;
  transition:transform .24s ease,box-shadow .24s ease;
}
.mark:hover{transform:translateY(-2px);box-shadow:var(--e4)}
.mark img{width:38px;height:38px;border-radius:10px;display:block;object-fit:cover;background:var(--ink)}

.rail nav{width:100%;min-width:0;z-index:3}
.rail nav p{margin:0;display:flex;flex-direction:column;gap:8px}
.rail nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:10px 15px;
  border-radius:999px;
  background:var(--paper);
  color:var(--ink);
  text-decoration:none;
  font-size:15px;
  font-weight:500;
  box-shadow:var(--e1);
  transition:background .22s ease,color .22s ease,transform .22s ease,box-shadow .22s ease;
}
.rail nav a:hover,.rail nav a:focus-visible{
  background:var(--ink);
  color:#fff;
  transform:translateX(3px);
  box-shadow:var(--e3);
}
.rail nav a:first-child{background:var(--ink);color:#fff;box-shadow:var(--e2)}
.rail nav a:first-child:hover{background:#000}

/* ---------- 主体骨架 ---------- */
main{display:block}

.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:26px 22px 58px;
  display:grid;
  grid-template-columns:148px minmax(0,1fr);
  gap:32px;
  align-items:start;
}

.stage{position:relative;min-width:0;max-width:800px}

/* ---------- 左侧栏 ---------- */
.side{
  position:sticky;
  top:26px;
  z-index:6;
  padding:14px 12px;
  border-radius:10px;
  background:var(--paper);
  box-shadow:var(--e2);
}
.side h2{
  margin:0 0 9px;
  font-family:var(--ui);
  font-size:14px;
  font-weight:600;
  letter-spacing:.12em;
}
.side hr{border:0;border-top:1px solid var(--line);width:100%;margin:0 0 10px}
.side p{margin:0;display:flex;flex-direction:column;gap:3px}
.side a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:8px 9px;
  border-radius:8px;
  color:var(--mute);
  text-decoration:none;
  font-size:14px;
  transition:background .2s ease,color .2s ease,transform .2s ease;
}
.side a:hover{background:var(--mist);color:var(--ink);transform:translateX(2px)}

/* ---------- 浮卡首屏：文在上、图在下 ---------- */
.hero{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  min-height:min(45vh,340px);
  border-radius:14px;
  background:linear-gradient(155deg,#ffffff 0%,#ececec 52%,#dcdcdc 100%);
  box-shadow:var(--e3);
}
.hero::before,.hero::after{
  content:"";
  position:absolute;
  z-index:0;
  border-radius:12px;
  background:rgba(255,255,255,.5);
  box-shadow:var(--e2);
  pointer-events:none;
}
.hero::before{width:56%;height:48%;left:7%;top:8%;transform:rotate(-5deg)}
.hero::after{width:44%;height:40%;right:8%;bottom:10%;transform:rotate(4deg);background:rgba(255,255,255,.34)}

.hero-text{
  position:relative;
  z-index:3;
  padding:30px 24px 22px;
  text-align:center;
}
.hero-text h1{
  margin:0;
  font-family:var(--head);
  font-size:clamp(26px,4.4vw,42px);
  line-height:1.16;
  letter-spacing:-.02em;
}

.hero-media{position:relative;z-index:1;min-height:150px;overflow:hidden}
.hero-media img{width:100%;height:100%;object-fit:cover;display:block}

.chip{
  position:absolute;
  z-index:4;
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:10px 18px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  color:var(--ink);
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  box-shadow:var(--e4);
  transition:background .22s ease,color .22s ease;
}
.chip:hover{background:var(--ink);color:#fff}
.chip-a{left:7%;top:16%;animation:drift 8s ease-in-out infinite}
.chip-b{right:6%;bottom:16%;animation:drift 10s ease-in-out infinite reverse}

@keyframes drift{
  0%,100%{transform:translate3d(0,0,0)}
  50%{transform:translate3d(0,-14px,0)}
}

/* ---------- 正文浮卡流 ---------- */
section{
  position:relative;
  z-index:5;
  margin:-30px 0 0;
  display:flex;
  flex-direction:column;
  gap:18px;
}

section > div{
  background:var(--paper);
  border-radius:10px;
  padding:24px 22px;
  box-shadow:var(--e2);
  scroll-margin-top:96px;
}

section > div:first-child{
  text-align:center;
  padding:32px 22px 34px;
  box-shadow:var(--e3);
}

section h1{
  font-family:var(--head);
  font-size:clamp(27px,4.6vw,42px);
  line-height:1.22;
  letter-spacing:-.02em;
  margin:0 0 14px;
}
section h2{
  font-family:var(--head);
  font-size:clamp(21px,3.2vw,29px);
  line-height:1.32;
  letter-spacing:-.01em;
  margin:0 0 12px;
}
section h3{
  font-size:19px;
  line-height:1.5;
  font-weight:600;
  margin:22px 0 10px;
}
section p{margin:0 0 14px}
section ul,section ol{margin:0 0 16px;padding-left:1.35em}
section li{margin:0 0 8px}
section hr{border:0;border-top:2px solid var(--ink);width:48px;margin:0 0 16px}
section a{color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
section a:hover{background:rgba(31,31,31,.07)}
section img{border-radius:10px;box-shadow:var(--e2);height:auto}
section blockquote{
  margin:0 0 16px;
  padding:14px 18px;
  border-radius:10px;
  background:var(--mist);
  box-shadow:var(--e1);
}
section blockquote p:last-child{margin-bottom:0}
section > div > *:last-child{margin-bottom:0}
section > div:first-child p{max-width:34em;margin-left:auto;margin-right:auto}
section > div:first-child hr{margin-left:auto;margin-right:auto}

/* ---------- 页脚单行 ---------- */
.foot{
  position:relative;
  z-index:10;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px 26px;
  padding:22px 24px;
  background:var(--paper);
  border-top:1px solid var(--line);
  box-shadow:var(--e1);
}
.foot-brand{display:inline-flex;align-items:center;gap:10px;order:1}
.foot-brand a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:10px;
  background:var(--ink);
  color:#fff;
  text-decoration:none;
  font-family:var(--head);
  font-size:18px;
  box-shadow:var(--e2);
}
.foot-brand img{width:36px;height:36px;border-radius:10px;display:block;object-fit:cover}
.foot-brand span{font-weight:600;font-size:15px}

.foot nav{order:2}
.foot nav p{margin:0;display:flex;flex-wrap:wrap;gap:0 14px}
.foot nav a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  color:var(--mute);
  text-decoration:none;
  font-size:14px;
}
.foot nav a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:3px}

.foot-meta{order:3;display:flex;align-items:center;gap:10px;color:var(--mute);font-size:13px}
.foot-meta a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 15px;
  border-radius:999px;
  background:var(--mist);
  color:var(--ink);
  text-decoration:none;
  font-size:13px;
  box-shadow:var(--e1);
  transition:background .2s ease,color .2s ease;
}
.foot-meta a:hover{background:var(--ink);color:#fff}

/* ---------- 窄屏 ---------- */
@media (max-width:1120px){
  .rail{
    position:sticky;
    inset:0 0 auto 0;
    width:auto;
    height:auto;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:9px 14px;
    overflow:visible;
    border-right:0;
    border-bottom:1px solid var(--line);
    background:rgba(255,255,255,.94);
  }
  .rail nav{flex:1;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
  .rail nav::-webkit-scrollbar{display:none}
  .rail nav p{flex-direction:row;gap:8px}
  .rail nav a{white-space:nowrap;padding:10px 14px}
  .mark{width:42px;height:42px;flex:none}

  .wrap{grid-template-columns:minmax(0,1fr);gap:16px;padding:14px 16px 44px}
  .stage{max-width:none}
  .side{position:static;padding:12px 12px 12px}
  .side p{flex-direction:row;gap:6px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .side p::-webkit-scrollbar{display:none}
  .side a{white-space:nowrap;background:var(--mist);border-radius:999px;padding:8px 12px;min-height:40px}

  section{margin-top:-22px}
  section > div{scroll-margin-top:84px;padding:22px 18px}
  section > div:first-child{padding:26px 18px 28px}
  .foot{justify-content:flex-start}
  .foot nav p{gap:0 12px}
  .foot-meta{margin-left:auto}
}

@media (max-width:520px){
  body{font-size:16px}
  .hero{min-height:0;border-radius:12px}
  .hero-text{padding:22px 16px 18px}
  .hero-media{min-height:120px}
  .chip{padding:8px 14px;font-size:13px;min-height:40px}
  .chip-a{left:5%;top:10%}
  .chip-b{right:5%;bottom:12%}
  .foot{padding:18px 16px;gap:10px 18px}
  .foot-meta{width:100%;margin-left:0;justify-content:space-between}
  section > div:first-child{padding:22px 16px 24px}
}

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

/* 层叠纵深：hover 抬升 */
.rail nav a:hover,.mark:hover,.side a:hover,.foot-meta a:hover,.chip:hover{transform:translateY(-2px)}
@media (min-width:1121px){
  .rail nav a:hover{transform:translateX(3px)}
  .side a:hover{transform:translateX(2px)}
}
</style>

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