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

:root{
  --ink:#26171a;
  --ink-2:#4c3439;
  --rose:#eb879c;
  --rose-2:#ffb6c1;
  --rose-deep:#b8495f;
  --blush:#fdf3f5;
  --paper:#fffbfc;
  --line:#f2d3da;
  --shade:rgba(38,23,26,.09);
  --r:8px;
  --mono:'Fira Code',ui-monospace,SFMono-Regular,Menlo,monospace;
  --sans:'Fira Sans',system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
}

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

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

body{
  margin:0;
  padding-left:140px;
  font-family:var(--sans);
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:
    radial-gradient(940px 520px at 82% -8%, #ffe3ea 0%, rgba(255,227,234,0) 72%),
    linear-gradient(180deg,#fff7f9 0%, var(--blush) 60%, #fbeaee 100%);
  background-attachment:fixed;
}

h1,h2,h3,h4{
  font-family:var(--mono);
  font-weight:600;
  letter-spacing:.01em;
  color:var(--ink);
  line-height:1.25;
}

p{margin:0 0 16px}
img{max-width:100%}

a{color:var(--rose-deep)}
a:hover{color:var(--ink)}

:focus-visible{
  outline:3px solid var(--rose-deep);
  outline-offset:3px;
}

.skip{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:99;
  background:var(--ink);
  color:#fff;
  padding:12px 18px;
  text-decoration:none;
}
.skip:focus{left:8px;top:8px}

/* ---------- 左侧竖排导航 ---------- */
.rail{
  position:fixed;
  inset:0 auto 0 0;
  width:140px;
  z-index:60;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:20px;
  padding:18px 8px;
  background:linear-gradient(180deg,#332125 0%,#26171a 70%,#1d1114 100%);
  box-shadow:4px 0 20px rgba(38,23,26,.18);
}

.rail-logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:48px;
  height:48px;
  border-radius:12px;
  background:linear-gradient(160deg,var(--rose-2),var(--rose));
  color:#2a171b;
  text-decoration:none;
  font-family:var(--mono);
  font-weight:700;
  font-size:22px;
  box-shadow:0 2px 4px rgba(0,0,0,.28),0 10px 20px rgba(0,0,0,.22);
  transition:transform .24s ease,box-shadow .24s ease;
}
.rail-logo img{width:34px;height:34px;display:block;border-radius:7px}
.rail-logo:hover{transform:translateY(-2px);box-shadow:0 3px 6px rgba(0,0,0,.3),0 14px 24px rgba(0,0,0,.26)}

.rail-nav{width:100%;min-width:0}
.rail-nav > ol{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:5px;
  width:100%;
}
.rail-nav > ol > li{min-width:0}
.rail-nav > ol > li > a{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:7px 8px;
  color:#f6dde2;
  text-decoration:none;
  font-size:16px;
  line-height:1.25;
  border-left:3px solid transparent;
  transition:background-color .24s ease,color .24s ease,border-color .24s ease;
}
.rail-nav > ol > li > a:hover,
.rail-nav > ol > li > a:focus-visible{
  background:rgba(235,135,156,.24);
  color:#fff;
  border-left-color:var(--rose-2);
}
.rail-dot{
  flex:0 0 6px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--rose);
  transition:transform .24s ease;
}
.rail-nav > ol > li > a:hover .rail-dot{transform:scale(1.7)}
.rail-t{flex:1 1 auto;min-width:0}

/* ---------- 首屏 ---------- */
.hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  align-items:center;
  min-height:70vh;
  border-bottom:3px solid var(--rose);
  background:linear-gradient(118deg,#fff9fb 0%,#fde6ec 56%,#ffd6e0 100%);
}
.hero-solo{grid-template-columns:1fr}
.hero-ghost{
  position:absolute;
  right:5%;
  top:50%;
  transform:translateY(-50%);
  font-family:var(--mono);
  font-weight:700;
  font-size:clamp(140px,19vw,250px);
  line-height:.8;
  letter-spacing:-.05em;
  color:rgba(235,135,156,.24);
  pointer-events:none;
  user-select:none;
  will-change:transform;
}
.hero-txt{
  position:relative;
  z-index:2;
  padding:64px 36px 64px 48px;
  text-align:center;
  max-width:640px;
  justify-self:center;
}
.hero-kicker{
  margin:0 0 14px;
  font-family:var(--mono);
  font-size:16px;
  letter-spacing:.3em;
  color:var(--ink-2);
}
.hero h1{
  margin:0 0 18px;
  font-size:clamp(30px,4.4vw,56px);
  line-height:1.15;
}
.hero-lead{
  margin:0 auto 26px;
  max-width:32ch;
  color:var(--ink-2);
  font-size:17px;
}
.hero-cta{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:0 26px;
  background:var(--ink);
  color:#fff;
  text-decoration:none;
  font-weight:600;
  border-bottom:3px solid var(--rose);
  border-radius:0;
  box-shadow:0 2px 4px rgba(38,23,26,.24),0 14px 26px -14px rgba(38,23,26,.6);
  transition:transform .24s ease,background-color .24s ease;
}
.hero-cta:hover{background:#3a2429;color:#fff;transform:translateY(-2px)}
.hero-media{
  position:relative;
  z-index:1;
  align-self:stretch;
  max-height:70vh;
  overflow:hidden;
  box-shadow:-18px 0 34px -26px rgba(38,23,26,.55) inset;
}
.hero-media:empty{display:none}
.hero-img{
  display:block;
  width:100%;
  height:100%;
  max-height:70vh;
  object-fit:cover;
}

/* ---------- 主区 ---------- */
.shell{
  max-width:1180px;
  margin:0 auto;
  padding:56px 40px 76px;
  display:grid;
  grid-template-columns:232px minmax(0,1fr);
  gap:44px;
  align-items:start;
}

.side{
  position:sticky;
  top:26px;
  background:var(--paper);
  padding:22px 20px 16px;
  border-bottom:3px solid var(--rose-2);
  box-shadow:0 1px 2px var(--shade),0 18px 32px -22px rgba(38,23,26,.55);
}
.side-h{
  margin:0 0 10px;
  font-size:16px;
  letter-spacing:.2em;
  color:var(--ink-2);
}
.side-h span{display:inline-block;padding-bottom:4px;border-bottom:2px solid var(--rose)}
.side-list{
  list-style:none;
  margin:0;
  padding:0;
}
.side-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:8px 0;
  font-size:16px;
  color:var(--ink-2);
  text-decoration:none;
  border-bottom:1px dashed var(--line);
  transition:color .24s ease,padding-left .24s ease;
}
.side-list li:last-child a{border-bottom:0}
.side-list a:hover{color:var(--rose-deep);padding-left:6px}

/* ---------- 正文 ---------- */
.doc{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:26px;
}
.doc > article{
  scroll-margin-top:28px;
  background:var(--paper);
  padding:34px 34px 28px;
  border-bottom:3px solid var(--rose);
  box-shadow:0 1px 2px var(--shade),0 22px 38px -28px rgba(38,23,26,.6);
}
.doc h2{
  margin:0 0 16px;
  font-size:clamp(21px,2.3vw,29px);
}
.doc h2 span{
  display:inline-block;
  padding-bottom:6px;
  border-bottom:2px solid var(--rose-2);
}
.doc h3{
  margin:26px 0 12px;
  font-size:19px;
  color:var(--ink-2);
}
.doc h3 span{display:inline-block;padding-bottom:4px;border-bottom:2px solid var(--line)}
.doc h4{margin:20px 0 10px;font-size:17px}
.doc p{color:var(--ink)}
.doc strong{color:var(--ink);font-weight:600}
.doc ul,.doc ol{margin:0 0 16px;padding-left:22px}
.doc li{margin:0 0 8px}
.doc li::marker{color:var(--rose-deep)}
.doc blockquote{
  margin:18px 0;
  padding:14px 18px;
  background:#fff3f6;
  border-left:3px solid var(--rose);
  color:var(--ink-2);
}
.doc blockquote p:last-child{margin:0}
.doc a{
  color:var(--rose-deep);
  text-decoration:underline;
  text-decoration-color:var(--rose-2);
  text-underline-offset:3px;
}
.doc a:hover{text-decoration-color:var(--rose-deep)}
.doc table{
  display:block;
  width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:0 0 18px;
  font-size:16px;
}
.doc th,.doc td{
  border:1px solid var(--line);
  padding:9px 12px;
  text-align:left;
  vertical-align:top;
}
.doc th{background:#fff2f5;font-family:var(--mono);font-weight:600}
.doc figure{margin:18px 0}
.doc figcaption{font-size:15px;color:var(--ink-2);margin-top:6px}
.doc hr{border:0;border-top:1px dashed var(--line);margin:24px 0}

/* ---------- 页脚 ---------- */
.foot{
  margin-top:44px;
  padding:60px 40px 26px;
  background:linear-gradient(180deg,#2d1b1f 0%,#1c1114 100%);
  color:#f4dbe0;
}
.foot-top{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.6fr repeat(3,minmax(0,1fr));
  gap:32px;
  align-items:start;
}
.foot-brand{
  margin:0;
  font-family:var(--mono);
  font-weight:700;
  font-size:clamp(26px,3.4vw,44px);
  line-height:1.1;
  letter-spacing:.02em;
  color:#fff;
}
.foot-dl{margin:0}
.foot-dl dt{
  font-family:var(--mono);
  font-size:16px;
  letter-spacing:.18em;
  color:var(--rose-2);
  margin-bottom:8px;
}
.foot-dl dd{margin:0}
.foot-dl a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-size:16px;
  color:#f4dbe0;
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color .24s ease,border-color .24s ease;
}
.foot-dl a:hover{color:#fff;border-bottom-color:var(--rose)}
.foot-bar{
  max-width:1180px;
  margin:34px auto 0;
  padding-top:18px;
  border-top:1px solid rgba(255,182,193,.26);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:14px;
  font-size:16px;
}
.foot-cr{color:#e8cbd2}
.foot-up{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 18px;
  background:var(--rose);
  color:#26171a;
  font-weight:600;
  text-decoration:none;
  border-bottom:3px solid var(--rose-2);
  transition:transform .24s ease,background-color .24s ease;
}
.foot-up:hover{background:var(--rose-2);color:#26171a;transform:translateY(-2px)}

/* ---------- 动效 ---------- */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .3s ease,transform .3s ease;
}
.reveal.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .rail-logo,.hero-cta,.foot-up,.side-list a,.rail-dot{transition:none}
}

/* ---------- 窄屏 ---------- */
@media (max-width:980px){
  body{padding-left:0;padding-top:70px;background-attachment:scroll}
  .rail{
    inset:0 0 auto 0;
    width:100%;
    height:70px;
    flex-direction:row;
    align-items:center;
    gap:10px;
    padding:0 10px;
    box-shadow:0 4px 16px rgba(38,23,26,.2);
  }
  .rail-logo{width:42px;height:42px;border-radius:10px;font-size:19px}
  .rail-logo img{width:30px;height:30px}
  .rail-nav{flex:1 1 auto;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .rail-nav > ol{flex-direction:row;gap:4px;padding-bottom:2px}
  .rail-nav > ol > li{flex:0 0 auto}
  .rail-nav > ol > li > a{
    min-height:44px;
    padding:6px 11px;
    white-space:nowrap;
    border-left:0;
    border-bottom:3px solid transparent;
  }
  .rail-nav > ol > li > a:hover,
  .rail-nav > ol > li > a:focus-visible{border-left:0;border-bottom-color:var(--rose-2)}

  .hero{grid-template-columns:1fr;min-height:0}
  .hero-txt{padding:42px 20px 34px;max-width:none}
  .hero-ghost{font-size:clamp(110px,33vw,180px);right:-8%;top:auto;bottom:0;transform:none}
  .hero-media{max-height:42vh}
  .hero-img{max-height:42vh}

  .shell{grid-template-columns:1fr;padding:32px 18px 52px;gap:26px}
  .side{position:static}
  .doc > article{padding:26px 20px 22px;scroll-margin-top:86px}

  .foot{padding:44px 18px 22px}
  .foot-top{grid-template-columns:1fr 1fr;gap:24px}
  .foot-brand{grid-column:1 / -1}
  .foot-bar{flex-direction:row}
}

@media (max-width:430px){
  .foot-top{grid-template-columns:1fr}
  .foot-bar{justify-content:space-between}
}

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