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

:root{
  --ice:#c8e0f4;
  --pink:#f5e0e8;
  --ink:#171f26;
  --bg1:#eef5fb;
  --bg2:#f9eff3;
  --hi:rgba(255,255,255,.92);
  --lo:rgba(23,31,38,.13);
  --raise:-6px -6px 16px var(--hi), 7px 7px 18px var(--lo);
  --raise-sm:-3px -3px 8px var(--hi), 4px 4px 10px var(--lo);
  --press:inset -3px -3px 8px var(--hi), inset 3px 3px 8px var(--lo);
  --edge:rgba(23,31,38,.1);
}

*{ box-sizing:border-box; }

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

body{
  margin:0;
  font-family:'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:linear-gradient(155deg, var(--bg1) 0%, var(--bg2) 52%, #f6eef2 100%);
  background-attachment:fixed;
  overflow-x:hidden;
}

a{ color:var(--ink); }
a:focus-visible, button:focus-visible{ outline:2px solid #7fa9c9; outline-offset:3px; }

/* ---------- 顶部细条 ---------- */
.announce{
  background:linear-gradient(90deg, var(--ice), var(--pink));
  text-align:center;
  padding:9px 16px;
  font-size:16px;
  letter-spacing:.1em;
  color:#26333d;
  box-shadow:inset 0 -1px 0 var(--edge);
}

/* ---------- 页头 ---------- */
.topbar{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 18px;
  background:rgba(240,246,251,.86);
  backdrop-filter:blur(11px);
  -webkit-backdrop-filter:blur(11px);
  box-shadow:0 10px 20px rgba(23,31,38,.07);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:40px;
  padding:4px 15px;
  border-radius:14px;
  text-decoration:none;
  font-weight:600;
  letter-spacing:-.01em;
  background:linear-gradient(145deg, #eaf3fb, #f8eff4);
  box-shadow:var(--raise-sm);
  transition:box-shadow .15s ease, transform .15s ease;
}
.brand:active{ box-shadow:var(--press); transform:scale(.985); }
.brand .mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:9px;
  font-size:16px;
  background:linear-gradient(145deg, #d7e8f6, #f6e3ec);
  box-shadow:var(--raise-sm);
}

.menu ol{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:2px;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
}
.menu ol::-webkit-scrollbar{ display:none; }

.menu a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 15px;
  border-radius:12px;
  text-decoration:none;
  font-size:16px;
  white-space:nowrap;
  background:linear-gradient(145deg, #edf4fa, #f8eff3);
  box-shadow:var(--raise-sm);
  transition:box-shadow .15s ease, transform .15s ease;
}
.menu a:active{ box-shadow:var(--press); transform:scale(.97); }

/* ---------- 首屏 ---------- */
.hero{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:22px;
  min-height:100vh;
  max-width:1120px;
  margin:0 auto;
  padding:54px 20px 60px;
}

.badge{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 18px;
  border-radius:999px;
  text-decoration:none;
  font-size:16px;
  font-weight:500;
  letter-spacing:.04em;
  background:linear-gradient(145deg, #fdeef4, #daecf9);
  box-shadow:var(--raise);
  transition:box-shadow .15s ease, transform .15s ease;
}
.badge:active{ box-shadow:var(--press); transform:scale(.97); }

.hero h1{
  margin:0;
  max-width:19ch;
  font-size:clamp(2.1rem, 7vw, 3.5rem);
  line-height:1.14;
  font-weight:600;
  letter-spacing:-.025em;
}

.hero-figure{ width:100%; margin:0; }

.hero-img{
  display:block;
  width:100%;
  max-height:44vh;
  object-fit:cover;
  border-radius:16px;
  box-shadow:var(--raise);
  background:linear-gradient(145deg, #e6f1fa, #f8eef3);
}

/* ---------- 主体 ---------- */
.shell{
  display:grid;
  grid-template-columns:minmax(0,1fr) 264px;
  align-items:start;
  gap:30px;
  max-width:1120px;
  margin:0 auto;
  padding:44px 20px 64px;
}

.doc{ min-width:0; }

.prose div{
  padding:26px 24px;
  margin:0 0 24px;
  border-radius:16px;
  scroll-margin-top:96px;
  background:linear-gradient(145deg, #eff6fc, #faf1f5);
  box-shadow:var(--raise);
}
.prose div:last-child{ margin-bottom:0; }

.prose h2{
  margin:0 0 10px;
  font-size:clamp(1.32rem, 3.4vw, 1.65rem);
  line-height:1.3;
  letter-spacing:-.015em;
}

hr{
  display:block;
  border:0;
  height:2px;
  margin:12px 0 20px;
  border-radius:2px;
  background:linear-gradient(90deg, var(--ice), var(--pink));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}

.prose h3{ margin:22px 0 8px; font-size:1.14rem; line-height:1.35; }
.prose p{ margin:0 0 16px; }
.prose p:last-child{ margin-bottom:0; }
.prose ul, .prose ol{ margin:0 0 16px; padding-left:1.35em; }
.prose li{ margin:0 0 8px; }
.prose strong{ font-weight:600; }
.prose img{ display:block; max-width:100%; height:auto; margin:18px 0; border-radius:12px; box-shadow:var(--raise-sm); }
.prose blockquote{
  margin:18px 0;
  padding:14px 18px;
  border-radius:12px;
  box-shadow:var(--press);
  background:linear-gradient(145deg, #e9f2fa, #f8eef3);
}

/* ---------- 侧栏 ---------- */
.rail{
  position:sticky;
  top:92px;
  padding:20px 18px;
  border-radius:16px;
  background:linear-gradient(145deg, #eef5fb, #f9f0f5);
  box-shadow:var(--raise);
}
.rail h2{
  margin:0 0 8px;
  font-size:1.02rem;
  letter-spacing:.12em;
  font-weight:600;
}
.rail hr{ margin:0 0 16px; }

.toc{
  list-style:none;
  margin:0 0 16px;
  padding:0;
}
.toc li{ margin:0 0 8px; }
.toc a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:0 13px;
  border-radius:11px;
  text-decoration:none;
  font-size:16px;
  background:linear-gradient(145deg, #f3f8fc, #fbf2f6);
  box-shadow:var(--raise-sm);
  transition:box-shadow .15s ease, transform .15s ease;
}
.toc a:active{ box-shadow:var(--press); transform:scale(.98); }

.totop{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 16px;
  border-radius:999px;
  text-decoration:none;
  font-size:16px;
  box-shadow:var(--raise-sm);
  background:linear-gradient(145deg, #dcecf8, #f7e5ee);
}
.totop:active{ box-shadow:var(--press); transform:scale(.97); }

/* ---------- 页脚 ---------- */
.foot{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px 20px;
  padding:42px 22px 30px;
  background:linear-gradient(160deg, #e6f0f9, #f8edf2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), inset 0 12px 22px rgba(23,31,38,.05);
}
.foot p{ margin:0; font-size:16px; line-height:1.6; }
.foot .f-brand{ font-weight:600; letter-spacing:-.01em; }
.foot .f-note{ color:#3a4750; }
.foot a{
  display:inline-block;
  padding:8px 10px 8px 0;
  min-height:40px;
  text-decoration:none;
}
.foot a:hover{ text-decoration:underline; }
.foot small{
  grid-column:1 / -1;
  display:block;
  margin-top:6px;
  padding-top:16px;
  text-align:center;
  font-size:16px;
  border-top:1px solid var(--edge);
}

/* ---------- 入场动效 ---------- */
html.reveal-on .prose div{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .55s ease, transform .55s ease;
}
html.reveal-on .prose div.in{
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  html.reveal-on .prose div{ opacity:1; transform:none; transition:none; }
  *{ transition-duration:.001s !important; }
}

/* ---------- 断点 ---------- */
@media (max-width:880px){
  .shell{ grid-template-columns:minmax(0,1fr); gap:24px; }
  .rail{ position:static; }
}

@media (max-width:760px){
  body{ font-size:17px; }
  .topbar{ flex-wrap:wrap; padding:10px 14px; }
  .menu{ width:100%; }
  .menu ol{ gap:7px; }
  .hero{ min-height:auto; padding:36px 16px 44px; gap:18px; }
  .hero-img{ max-height:32vh; }
  .shell{ padding:32px 16px 48px; }
  .prose div{ padding:22px 18px; }
  .foot{ grid-template-columns:repeat(2, minmax(0,1fr)); padding:34px 18px 26px; }
}

@media (max-width:420px){
  .hero h1{ font-size:clamp(1.9rem, 9vw, 2.4rem); }
}

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