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

:root{
  --ink:#000000;
  --paper:#ffffff;
  --mute:rgba(0,0,0,.62);
  --soft:rgba(0,0,0,.42);
  --line:rgba(0,0,0,.16);
  --rule:#000000;
  --radius:4px;
  --serif:'Lora',Georgia,'Songti SC','SimSun',serif;
  --sans:'Raleway','PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
}

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

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

body{
  margin:0;
  overflow-x:hidden;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--serif);
  font-size:17px;
  line-height:1.7;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
}

img{display:block;max-width:100%;height:auto;border-radius:var(--radius)}
a{color:inherit}
h1,h2,h3,h4{font-weight:700}

/* ---------- 报头 ---------- */
.masthead{
  border-bottom:2px solid var(--rule);
  padding:.6rem clamp(1rem,3vw,2.5rem);
}
.masthead-row{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:1rem;
}
.masthead-brand{
  justify-self:center;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  min-height:44px;
  text-decoration:none;
  font-family:var(--sans);
  font-size:.95rem;
  font-weight:600;
  letter-spacing:.16em;
}
.brand-mark{width:28px;height:28px;border-radius:50%;object-fit:cover}

.drawer{position:relative;justify-self:start}
.drawer summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.4rem 1rem;
  border:1px solid var(--rule);
  border-radius:var(--radius);
  font-family:var(--sans);
  font-size:.82rem;
  letter-spacing:.2em;
}
.drawer summary::-webkit-details-marker{display:none}
.drawer summary:hover{background:var(--ink);color:var(--paper)}
.drawer[open] summary{background:var(--ink);color:var(--paper)}
.drawer menu{
  position:absolute;
  z-index:40;
  top:calc(100% + .45rem);
  left:0;
  min-width:15rem;
  margin:0;
  padding:.5rem;
  list-style:none;
  background:var(--paper);
  border:1px solid var(--rule);
  border-radius:var(--radius);
  box-shadow:7px 7px 0 rgba(0,0,0,.08);
}
.drawer menu li + li{border-top:1px solid var(--line)}
.drawer menu a{
  display:flex;
  align-items:baseline;
  gap:.65rem;
  padding:.6rem .7rem;
  min-height:40px;
  text-decoration:none;
  font-family:var(--sans);
  font-size:.86rem;
}
.drawer menu a:hover{background:var(--ink);color:var(--paper);border-radius:2px}

.num{
  font-family:var(--sans);
  font-size:.68rem;
  letter-spacing:.14em;
  opacity:.55;
  font-variant-numeric:tabular-nums;
}

.masthead-search{
  justify-self:end;
  display:flex;
  align-items:center;
  border-bottom:1px solid var(--rule);
}
.masthead-search input{
  width:8rem;
  min-height:40px;
  border:0;
  background:transparent;
  color:inherit;
  padding:.4rem .2rem;
  font-family:var(--sans);
  font-size:.86rem;
}
.masthead-search input:focus{outline:1px solid var(--rule);outline-offset:2px}
.masthead-search button{
  border:0;
  background:transparent;
  color:inherit;
  min-height:40px;
  padding:.4rem .5rem;
  font-family:var(--sans);
  font-size:.78rem;
  letter-spacing:.16em;
  cursor:pointer;
}
.masthead-search button:hover{background:var(--ink);color:var(--paper)}
.masthead-search.no-hit{animation:shake .3s ease}
.masthead-search.no-hit input{background:rgba(0,0,0,.07)}

@keyframes shake{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-4px)}
  75%{transform:translateX(4px)}
}

/* ---------- 粘性锚点条 ---------- */
.strip{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--ink);
  color:var(--paper);
}
.strip ul{
  display:flex;
  justify-content:center;
  margin:0;
  padding:0;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
}
.strip ul::-webkit-scrollbar{display:none}
.strip a{
  display:flex;
  align-items:baseline;
  gap:.45rem;
  min-height:44px;
  padding:.85rem clamp(.7rem,1.5vw,1.3rem);
  white-space:nowrap;
  text-decoration:none;
  font-family:var(--sans);
  font-size:.8rem;
  letter-spacing:.12em;
  border-right:1px solid rgba(255,255,255,.2);
}
.strip a:hover,.strip a:focus-visible{background:var(--paper);color:var(--ink)}
.strip a:hover .num,.strip a:focus-visible .num{opacity:.7}

/* ---------- 版面 ---------- */
.wrap{
  max-width:1240px;
  margin:0 auto;
  padding:0 clamp(1rem,3vw,2.5rem);
}

.hero{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(0,.6fr);
  align-items:center;
  gap:clamp(1.5rem,4vw,3.5rem);
  min-height:70vh;
  padding:clamp(2rem,6vh,4.5rem) 0 clamp(2rem,5vh,3.5rem);
  border-bottom:1px solid var(--line);
  background-image:radial-gradient(rgba(0,0,0,.17) 1px,transparent 1px);
  background-size:22px 22px;
  background-position:-11px -11px;
}
.hero--bare{grid-template-columns:1fr}
.hero h1{
  margin:0;
  font-size:clamp(2.2rem,6.4vw,4.9rem);
  line-height:1.04;
  letter-spacing:-.015em;
  word-break:break-word;
}
.hero-standfirst{
  max-width:44ch;
  margin:1.2rem 0 0;
  font-size:clamp(1rem,1.6vw,1.14rem);
  font-style:italic;
  line-height:1.65;
  color:var(--mute);
}
.hero-art{
  margin:0;
  justify-self:end;
  width:min(100%,220px);
  will-change:transform;
}
.hero-art img{
  width:100%;
  padding:.55rem;
  background:var(--paper);
  border:1px solid var(--rule);
  border-bottom-width:5px;
}
.hero-art figcaption{
  padding-top:.55rem;
  text-align:right;
  font-family:var(--sans);
  font-size:.7rem;
  letter-spacing:.18em;
  color:var(--soft);
}

.spread{
  display:grid;
  grid-template-columns:minmax(0,17rem) minmax(0,1fr);
  align-items:start;
  gap:clamp(1.5rem,4vw,3.5rem);
  padding:clamp(2rem,5vh,3.4rem) 0 4.5rem;
}

/* ---------- 侧栏目录 ---------- */
.rail{
  position:sticky;
  top:4.4rem;
}
.rail-title{
  margin:0 0 .8rem;
  padding-bottom:.55rem;
  border-bottom:2px solid var(--rule);
  font-family:var(--sans);
  font-size:.76rem;
  font-weight:600;
  letter-spacing:.26em;
}
.rail-list{
  margin:0;
  padding:0;
  list-style:none;
  columns:1;
}
.rail-list li{border-bottom:1px solid var(--line)}
.rail-list a{
  display:flex;
  align-items:baseline;
  gap:.65rem;
  min-height:40px;
  padding:.6rem 0;
  text-decoration:none;
  font-family:var(--sans);
  font-size:.87rem;
}
.rail-list a:hover .lbl{text-decoration:underline;text-underline-offset:4px}

/* ---------- 正文 ---------- */
.prose{
  min-width:0;
  font-size:1.0625rem;
}
.prose section{
  margin:0 0 2.6rem;
  padding:0 0 2.6rem;
  border-bottom:1px solid var(--line);
}
.prose section:last-child{margin-bottom:0;padding-bottom:0;border-bottom:0}
.prose section[id]{scroll-margin-top:5.4rem}
.prose section.is-hit{background:rgba(0,0,0,.035)}

.prose h2{
  margin:0 0 1.1rem;
  font-size:clamp(1.5rem,2.6vw,2.25rem);
  line-height:1.22;
  letter-spacing:-.01em;
}
.prose h2 > span{
  display:inline-block;
  position:relative;
  padding-bottom:.18rem;
}
.prose h2 > span::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:3px;
  background:var(--rule);
}
.prose h3{
  margin:2rem 0 .8rem;
  font-size:clamp(1.15rem,1.9vw,1.4rem);
  line-height:1.35;
}
.prose h3 > span{
  display:inline-block;
  border-bottom:1px solid var(--rule);
  padding-bottom:.12rem;
}
.prose p{
  margin:0 0 1.15rem;
  max-width:68ch;
}
.prose section > p:first-of-type::first-letter{
  float:left;
  padding:.16rem .52rem .06rem 0;
  font-size:3.5rem;
  line-height:.82;
  font-weight:700;
}
.prose ul,.prose ol{pargin:0;padding-left:1.25rem;margin:0 0 1.2rem;max-width:66ch}
.prose li{margin:.35rem 0}
.prose a{
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1px;
}
.prose a:hover{background:var(--ink);color:var(--paper);text-decoration:none}
.prose strong{font-weight:700}
.prose hr{
  border:0;
  border-top:2px solid var(--rule);
  margin:2.2rem 0;
}
.prose blockquote{
  margin:2.2rem 0;
  padding:1.3rem 0 1.2rem;
  border-top:2px solid var(--rule);
  border-bottom:1px solid var(--line);
  font-size:clamp(1.22rem,2.2vw,1.65rem);
  line-height:1.45;
  font-style:italic;
  letter-spacing:-.01em;
}
.prose blockquote p{max-width:none;margin:0 0 .6rem}
.prose blockquote p:last-child{margin:0}
.prose figure{margin:1.9rem 0}
.prose figure img{
  width:100%;
  padding:.4rem;
  background:var(--paper);
  border:1px solid var(--line);
  border-bottom:4px solid var(--rule);
}
.prose figcaption{
  margin-top:.6rem;
  font-family:var(--sans);
  font-size:.74rem;
  letter-spacing:.1em;
  color:var(--soft);
}
.prose table{
  display:block;
  overflow-x:auto;
  width:100%;
  margin:0 0 1.3rem;
  border-collapse:collapse;
  font-size:.95rem;
}
.prose th,.prose td{
  padding:.55rem .6rem;
  border-bottom:1px solid var(--line);
  text-align:left;
}
.prose th{font-family:var(--sans);font-size:.8rem;letter-spacing:.1em}

/* ---------- 页脚 ---------- */
.colophon{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:.5rem 1.6rem;
  padding:.9rem clamp(1rem,3vw,2.5rem);
  border-top:2px solid var(--rule);
  font-family:var(--sans);
  font-size:.78rem;
  letter-spacing:.1em;
}
.colophon section{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.7rem;
}
.colophon h2{margin:0;font-size:.74rem;font-weight:600;letter-spacing:.22em}
.colophon p{margin:0;color:var(--soft)}
.colophon a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  text-decoration:none;
  border-bottom:1px solid var(--rule);
}
.colophon a:hover{background:var(--ink);color:var(--paper);border-bottom-color:var(--ink)}

/* ---------- 动效 ---------- */
.js .reveal{opacity:0;transform:translateY(18px)}
.js .reveal.in{
  opacity:1;
  transform:none;
  transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.3,1);
}
.js .rail-list li{animation:railIn .5s both}
.js .rail-list li:nth-child(2){animation-delay:.05s}
.js .rail-list li:nth-child(3){animation-delay:.1s}
.js .rail-list li:nth-child(4){animation-delay:.15s}
.js .rail-list li:nth-child(5){animation-delay:.2s}
.js .rail-list li:nth-child(6){animation-delay:.25s}
.js .rail-list li:nth-child(7){animation-delay:.3s}

@keyframes railIn{
  from{opacity:0;transform:translateX(-8px)}
  to{opacity:1;transform:none}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .reveal{opacity:1;transform:none;transition:none}
  .js .rail-list li{animation:none}
  .masthead-search.no-hit{animation:none}
  .hero-art{transform:none !important}
}

/* ---------- 窄屏 ---------- */
@media (max-width:820px){
  .masthead-row{
    grid-template-columns:auto 1fr;
    grid-template-areas:
      "menu brand"
      "search search";
    gap:.55rem;
  }
  .drawer{grid-area:menu}
  .masthead-brand{grid-area:brand;justify-self:start}
  .masthead-search{grid-area:search;justify-self:stretch;width:100%}
  .masthead-search input{flex:1;width:auto}
  .drawer menu{min-width:12rem}

  .strip ul{justify-content:flex-start}

  .hero{
    grid-template-columns:1fr;
    min-height:0;
    padding-top:1.7rem;
  }
  .hero-art{
    display:flex;
    align-items:center;
    gap:.8rem;
    justify-self:start;
    width:auto;
    max-width:150px;
  }
  .hero-art img{width:76px;padding:.35rem;border-bottom-width:3px}
  .hero-art figcaption{padding-top:0;text-align:left}

  .spread{
    grid-template-columns:1fr;
    gap:1.7rem;
    padding-top:1.6rem;
  }
  .rail{position:static}
  .rail-title{margin-bottom:.5rem}
  .rail-list{
    display:flex;
    overflow-x:auto;
    border-bottom:1px solid var(--line);
    scrollbar-width:none;
  }
  .rail-list::-webkit-scrollbar{display:none}
  .rail-list li{
    flex:0 0 auto;
    border-bottom:0;
    border-right:1px solid var(--line);
  }
  .rail-list li:last-child{border-right:0}
  .rail-list a{padding:.7rem .85rem;white-space:nowrap}

  .prose section > p:first-of-type::first-letter{font-size:3rem}
  .colophon{justify-content:flex-start}
}

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