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

:root{
  --ink:#171f26;
  --ink-soft:#4d5b67;
  --sky:#c8e0f4;
  --rose:#f5e0e8;
  --bg1:#e9f2fb;
  --bg2:#f8eef3;
  --glass:rgba(255,255,255,.55);
  --out:-6px -6px 16px rgba(255,255,255,.92), 6px 6px 18px rgba(23,31,38,.13);
  --in:inset -4px -4px 10px rgba(255,255,255,.9), inset 4px 4px 10px rgba(23,31,38,.12);
}

*,*::before,*::after{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','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--ink);
  background:linear-gradient(145deg,var(--bg1),var(--bg2));
  background-attachment:fixed;
  overflow-wrap:break-word;
}

a{color:inherit;text-decoration:none}
img{max-width:100%}

/* 顶部细条 */
.ann{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:6px 16px;
  font-size:16px;
  font-weight:600;
  letter-spacing:.34em;
  text-indent:.34em;
  color:#3d4c59;
  background:rgba(255,255,255,.42);
}

/* 顶部导航 */
.top{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(236,244,251,.86);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  box-shadow:0 12px 24px -20px rgba(23,31,38,.65);
}

.top-in{
  max-width:1180px;
  margin:0 auto;
  padding:10px 16px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
}

.rail{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:2px;
}
.rail-l{justify-content:flex-start}
.rail-r{justify-content:flex-end}

.rail a{
  padding:12px 9px;
  border-radius:14px;
  font-size:16px;
  font-weight:600;
  line-height:1.25;
  transition:box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}
.rail a:hover{background:rgba(255,255,255,.62);box-shadow:var(--out)}
.rail a:active{box-shadow:var(--in);transform:scale(.97)}

.mark{
  display:inline-flex;
  align-items:center;
  gap:9px;
  justify-self:center;
  padding:11px 18px;
  border-radius:16px;
  background:linear-gradient(145deg,#eef5fc,#f8eff4);
  box-shadow:var(--out);
  font-size:17px;
  font-weight:800;
  letter-spacing:.02em;
  white-space:nowrap;
  transition:box-shadow .18s ease, transform .18s ease;
}
.mark:active{box-shadow:var(--in);transform:scale(.98)}
.mark .dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:linear-gradient(145deg,var(--sky),var(--rose));
  box-shadow:var(--in);
}

/* 主体骨架 */
main{
  max-width:1180px;
  margin:0 auto;
  padding:30px 16px 76px;
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  gap:30px;
  align-items:start;
}

/* 侧栏 */
.toc{
  position:sticky;
  top:96px;
  padding:18px 16px 22px;
  border-radius:16px;
  background:var(--glass);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  box-shadow:var(--in);
}
.toc h2{
  margin:0;
  font-size:17px;
  font-weight:800;
  letter-spacing:.16em;
}
.toc hr{margin:12px 0 16px;height:3px}
.toc dl{
  margin:0;
  display:grid;
  grid-template-columns:2ch minmax(0,1fr);
  gap:8px;
  align-items:center;
}
.toc dt{
  font-size:13px;
  font-weight:700;
  letter-spacing:.06em;
  color:#6b7986;
}
.toc dd{margin:0}
.toc dd a{
  display:block;
  padding:10px 11px;
  border-radius:12px;
  font-size:16px;
  font-weight:600;
  line-height:1.35;
  background:rgba(255,255,255,.52);
  box-shadow:var(--out);
  transition:box-shadow .16s ease, transform .16s ease;
}
.toc dd a:active{box-shadow:var(--in);transform:scale(.98)}

/* 正文 */
.sheet{min-width:0}

.hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  min-height:70svh;
  padding:26px 0 14px;
  text-align:center;
}
.badge{
  margin:0;
  padding:8px 20px;
  border-radius:16px;
  font-size:15px;
  font-weight:700;
  letter-spacing:.2em;
  text-indent:.2em;
  color:var(--ink-soft);
  background:rgba(255,255,255,.6);
  box-shadow:var(--in);
}
.hero h1{
  margin:0;
  max-width:20ch;
  font-size:clamp(28px,5.4vw,50px);
  line-height:1.24;
  font-weight:800;
  letter-spacing:-.015em;
  text-shadow:0 1px 0 rgba(255,255,255,.85);
}
.hero-frame{
  width:100%;
  margin-top:10px;
  padding:10px;
  overflow:hidden;
  border-radius:0;
  background:rgba(255,255,255,.5);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  box-shadow:var(--out);
}
.hero-frame img{
  display:block;
  width:100%;
  height:auto;
  max-height:46svh;
  object-fit:cover;
  will-change:transform;
  transform-origin:center;
}

.sheet article{
  padding:40px 0 8px;
  scroll-margin-top:100px;
}
.sheet article + article{
  border-top:1px solid rgba(23,31,38,.09);
}
.sheet h2{
  margin:0 0 6px;
  font-size:clamp(22px,3vw,28px);
  line-height:1.35;
  font-weight:800;
  letter-spacing:-.01em;
}
.sheet h3{
  margin:28px 0 6px;
  font-size:19px;
  line-height:1.5;
  font-weight:700;
}
.sheet p{margin:0 0 15px}
.sheet ul,
.sheet ol{margin:0 0 15px;padding-left:1.35em}
.sheet li{margin:0 0 8px}
.sheet img{
  display:block;
  width:auto;
  height:auto;
  margin:16px 0;
  border-radius:0;
  box-shadow:var(--out);
}
.sheet strong{font-weight:700}
.sheet blockquote{
  margin:18px 0;
  padding:16px 18px;
  border-radius:14px;
  background:rgba(255,255,255,.55);
  box-shadow:var(--in);
}
.sheet blockquote p:last-child{margin-bottom:0}

hr{
  border:0;
  height:3px;
  margin:12px 0 20px;
  border-radius:3px;
  background:linear-gradient(90deg,rgba(200,224,244,.95),rgba(245,224,232,.95));
  box-shadow:0 1px 0 rgba(255,255,255,.9);
}

/* 页脚 */
.base{
  max-width:1180px;
  margin:0 auto;
  padding:28px 16px 44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px 24px;
  border-top:1px solid rgba(23,31,38,.09);
}
.fmark a{
  font-size:clamp(20px,3.4vw,30px);
  font-weight:800;
  letter-spacing:-.015em;
}
.base nav dl{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:2px 12px;
  margin:0;
}
.base dt{
  font-size:13px;
  font-weight:700;
  color:#6b7986;
}
.base dd{margin:0}
.base dd a{
  display:inline-block;
  padding:10px 2px;
  font-size:16px;
  font-weight:600;
  line-height:1.4;
  border-bottom:2px solid transparent;
  transition:border-color .18s ease;
}
.base dd a:hover{border-bottom-color:var(--sky)}
.copy{
  font-size:15px;
  color:var(--ink-soft);
}

/* 回到顶部 */
.up{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:30;
  padding:14px 18px;
  border:0;
  border-radius:16px;
  font:inherit;
  font-size:16px;
  font-weight:700;
  line-height:1.25;
  color:var(--ink);
  background:linear-gradient(145deg,#eef5fc,#f8eff4);
  box-shadow:var(--out);
  cursor:pointer;
  transition:box-shadow .16s ease, transform .16s ease;
}
.up:active{box-shadow:var(--in);transform:scale(.96)}

/* 滚动揭示 */
.rv{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .55s ease, transform .55s ease;
}
.rv.in{opacity:1;transform:none}

@media (max-width:1000px){
  main{grid-template-columns:minmax(0,1fr);gap:24px}
  .toc{position:static;padding:16px}
  .toc dl{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
  .toc dt{display:none}
  .hero{min-height:auto;padding:20px 0 10px}
}

@media (max-width:740px){
  .top-in{
    grid-template-columns:minmax(0,1fr);
    justify-items:center;
    padding:10px 10px 12px;
    gap:6px;
  }
  .rail{justify-content:center}
  .rail a{padding:12px 10px}
  main{padding:22px 14px 60px}
  .sheet article{padding:32px 0 6px;scroll-margin-top:150px}
  .base{flex-direction:column;align-items:flex-start;gap:12px}
  .base nav dl{gap:2px 10px}
  .copy{font-size:15px}
}

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

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