:root{
  --ink:#000000;
  --paper:#ffffff;
  --max:1200px;
  --sans:'Outfit','Rubik',-apple-system,BlinkMacSystemFont,'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;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.65;
  padding-bottom:150px;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--ink)}
:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
img{max-width:100%;height:auto;display:block}

/* ---------- 底部固定条 ---------- */
.topbar{
  position:fixed;
  left:0;right:0;bottom:0;
  z-index:80;
  background:var(--paper);
  border-top:2px solid var(--ink);
}
.topbar nav{
  max-width:var(--max);
  margin:0 auto;
  padding:.65rem 1.25rem;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:1rem;
}
.nav-left{margin:0;display:flex;flex-wrap:wrap;gap:.15rem;justify-content:flex-start}
.nav-end{margin:0;display:flex;align-items:center;gap:1rem;justify-self:end}
.nav-end p{margin:0;display:flex;flex-wrap:wrap;gap:.15rem}
.topbar a,
.more summary{
  font-size:1rem;
  font-weight:500;
  line-height:1.2;
  color:var(--ink);
  text-decoration:none;
  padding:.6rem .6rem;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  border-radius:10px;
  transition:background .2s ease,color .2s ease;
}
.topbar a:hover,
.more summary:hover,
.topbar a.on{background:var(--ink);color:var(--paper)}
.brand{
  font-size:1.1rem;
  font-weight:700;
  letter-spacing:-.02em;
  padding:.55rem 1rem;
  border:2px solid var(--ink);
  white-space:nowrap;
}
.brand:hover{background:var(--ink);color:var(--paper)}
.more{position:relative}
.more summary{list-style:none;cursor:pointer}
.more summary::-webkit-details-marker{display:none}
.more .drop{
  position:absolute;
  right:0;
  bottom:calc(100% + .55rem);
  min-width:9.5rem;
  display:flex;
  flex-direction:column;
  gap:.15rem;
  padding:.4rem;
  background:var(--paper);
  border:2px solid var(--ink);
  border-radius:10px;
  margin:0;
}
.more .drop a{width:100%}
.find{
  display:flex;
  align-items:center;
  border:2px solid var(--ink);
  border-radius:10px;
  background:var(--paper);
  overflow:hidden;
}
.find input{
  border:0;
  background:transparent;
  font:inherit;
  font-size:1rem;
  color:var(--ink);
  padding:.5rem .7rem;
  width:8.5rem;
  min-height:40px;
  outline:none;
}
.find input::-webkit-search-cancel-button{-webkit-appearance:none}
.find button{
  border:0;
  background:var(--ink);
  color:var(--paper);
  font:inherit;
  font-size:.95rem;
  font-weight:600;
  padding:.5rem .8rem;
  min-height:40px;
  cursor:pointer;
}

/* ---------- 主区 ---------- */
.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:1.5rem 1.5rem 0;
}
section{
  display:grid;
  grid-template-columns:minmax(0,1fr) 18rem;
  gap:3.5rem 3rem;
  align-items:start;
}

/* ---------- 首屏 ---------- */
.hero{
  grid-column:1/-1;
  position:relative;
  min-height:45vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  padding:2.5rem 0 2.5rem;
  border-bottom:3px solid var(--ink);
  overflow:hidden;
}
.hero-mark{
  width:48px;height:48px;
  border:2px solid var(--ink);
  border-radius:10px;
  display:grid;place-items:center;
  margin-bottom:1.6rem;
  position:relative;z-index:2;
  background:var(--paper);
}
.hero h1{
  margin:0;
  font-size:clamp(2.1rem,6.4vw,4.4rem);
  line-height:1.03;
  letter-spacing:-.035em;
  font-weight:700;
  max-width:20ch;
  position:relative;z-index:2;
}
.hero-desc{
  margin:1.3rem 0 0;
  max-width:36ch;
  font-size:1.05rem;
  position:relative;z-index:2;
}
.hero-shot{
  margin-top:1.8rem;
  width:100%;
  max-width:520px;
  max-height:230px;
  object-fit:cover;
  border:2px solid var(--ink);
  border-radius:10px;
  position:relative;z-index:2;
}
.hero-ghost{
  position:absolute;
  right:-.05em;
  bottom:-.22em;
  z-index:1;
  font-size:clamp(3.6rem,16vw,11rem);
  font-weight:700;
  line-height:.8;
  letter-spacing:-.05em;
  white-space:nowrap;
  color:transparent;
  -webkit-text-stroke:2px var(--ink);
  opacity:.25;
  pointer-events:none;
  transition:opacity .25s ease,transform .2s linear;
}

/* ---------- 正文 ---------- */
.prose{min-width:0}
.prose div{
  padding:2.6rem 0;
  border-bottom:1px solid rgba(0,0,0,.2);
  scroll-margin-top:1.5rem;
}
.prose div:first-child{padding-top:.4rem}
.prose div:last-child{border-bottom:0}
.prose h2{
  margin:0 0 .2rem;
  font-size:clamp(1.45rem,3.3vw,2.05rem);
  line-height:1.16;
  letter-spacing:-.025em;
  font-weight:700;
}
.prose h3{
  margin:2rem 0 .4rem;
  font-size:1.2rem;
  line-height:1.3;
  letter-spacing:-.01em;
}
.prose h2+hr,
.prose hr{
  border:0;
  border-top:3px solid var(--ink);
  margin:.9rem 0 1.5rem;
}
.prose p{margin:0 0 1.05rem}
.prose ul,
.prose ol{margin:0 0 1.2rem;padding-left:1.35rem}
.prose li{margin:.35rem 0}
.prose ul li::marker{content:"— "}
.prose a{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
}
.prose a:hover{background:var(--ink);color:var(--paper);text-decoration:none}
.prose strong{font-weight:700}
.prose blockquote{
  margin:1.6rem 0;
  padding:.2rem 0 .2rem 1.2rem;
  border-left:3px solid var(--ink);
  font-size:1.05rem;
}
.prose blockquote p:last-child{margin-bottom:0}
.prose table{
  display:block;
  width:100%;
  overflow-x:auto;
  border-collapse:collapse;
  margin:1.4rem 0;
  font-size:.98rem;
}
.prose th,
.prose td{
  border-bottom:1px solid rgba(0,0,0,.3);
  padding:.6rem .8rem;
  text-align:left;
}
.prose th{border-bottom:2px solid var(--ink)}
.prose img{border-radius:10px;border:2px solid var(--ink);margin:1.2rem 0}

/* ---------- 侧栏 ---------- */
.rail{
  position:sticky;
  top:1.5rem;
  border:2px solid var(--ink);
  border-radius:10px;
  padding:1.3rem 1.2rem 1.1rem;
  background:var(--paper);
}
.rail h2{
  margin:0;
  font-size:.95rem;
  font-weight:600;
  letter-spacing:.14em;
}
.rail hr{
  border:0;
  border-top:2px solid var(--ink);
  margin:.7rem 0 1rem;
}
.toc{
  list-style:none;
  margin:0;
  padding:0;
}
.toc li+li{margin-top:.1rem}
.toc a{
  display:flex;
  align-items:center;
  gap:.65rem;
  min-height:42px;
  padding:.5rem .1rem;
  font-size:1rem;
  text-decoration:none;
  border-bottom:2px solid transparent;
  transition:border-color .2s ease,padding-left .2s ease;
}
.toc a span{
  font-size:.72rem;
  font-weight:600;
  letter-spacing:.12em;
  opacity:.55;
  min-width:1.4rem;
}
.toc a:hover{border-bottom-color:var(--ink);padding-left:.35rem}
.totop{margin:1.2rem 0 0}
.totop a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-size:.95rem;
  text-decoration:none;
  border:2px solid var(--ink);
  border-radius:10px;
  padding:.45rem .9rem;
  transition:background .2s ease,color .2s ease;
}
.totop a:hover{background:var(--ink);color:var(--paper)}

/* ---------- 页脚 ---------- */
footer{
  border-top:3px solid var(--ink);
  margin-top:4rem;
}
.foot{
  max-width:var(--max);
  margin:0 auto;
  padding:1.5rem 1.5rem 1.6rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.2rem;
  flex-wrap:wrap;
}
.foot-brand{
  font-size:clamp(1.5rem,4vw,2.3rem);
  font-weight:700;
  letter-spacing:-.035em;
  text-decoration:none;
  line-height:1.1;
}
.foot nav p{
  display:flex;
  flex-wrap:wrap;
  gap:.1rem 1.1rem;
  margin:0;
}
.foot nav a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  font-size:.95rem;
  text-decoration:none;
  padding:.4rem 0;
}
.foot nav a:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.copy{
  margin:0;
  font-size:.95rem;
  opacity:.7;
}

/* ---------- 移动端 ---------- */
@media (max-width:900px){
  body{padding-bottom:230px}
  .topbar nav{
    display:flex;
    flex-direction:column;
    gap:.25rem;
    padding:.5rem .7rem .6rem;
  }
  .brand{order:-1;align-self:center;font-size:1rem;padding:.45rem .85rem}
  .nav-left,
  .nav-end{justify-self:stretch;width:100%;justify-content:center;gap:.05rem}
  .nav-end{flex-direction:column;gap:.3rem;align-items:stretch}
  .nav-end p{justify-content:center}
  .topbar a,
  .more summary{padding:.5rem .5rem;font-size:1rem}
  .more .drop{position:static;margin-top:.15rem;border-radius:10px;align-items:stretch}
  .find{width:100%}
  .find input{flex:1;width:auto}
  .wrap{padding:1rem 1.1rem 0}
  section{grid-template-columns:1fr;gap:2rem}
  .rail{position:static}
  .hero{min-height:0;padding:1.6rem 0 2rem}
  .hero-ghost{font-size:clamp(3rem,19vw,6rem);bottom:-.16em;opacity:.18}
  .foot{flex-direction:column;align-items:flex-start;gap:.8rem}
  .foot nav p{gap:.2rem 1rem}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none!important;animation:none!important}
}

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