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

:root{
  --ink:#000;
  --paper:#fff;
  --line:rgba(0,0,0,.16);
  --mono:"Share Tech Mono","Fira Code",ui-monospace,SFMono-Regular,Menlo,Consolas,"Noto Sans Mono CJK SC","Microsoft YaHei",monospace;
  --gut:clamp(1rem,4vw,3.25rem);
  --r:10px;
}

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

html{
  scroll-behavior:smooth;
  scroll-padding-top:6rem;
  -webkit-text-size-adjust:100%;
}
html.locked,html.locked body{overflow:hidden}

body{
  margin:0;
  background-color:var(--paper);
  color:var(--ink);
  font-family:var(--mono);
  font-size:17px;
  line-height:1.7;
  background-image:radial-gradient(circle,rgba(0,0,0,.15) 1px,transparent 1.5px);
  background-size:18px 18px;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}
img{max-width:100%}
p{margin:0 0 .9em}
h1,h2,h3{font-weight:900;letter-spacing:-.05em;line-height:.95;margin:0}
::selection{background:#000;color:#fff}
:focus-visible{outline:3px solid #000;outline-offset:3px}

/* 顶栏 */
.site-head{
  position:sticky;
  top:0;
  z-index:80;
  display:grid;
  grid-template-columns:1fr auto auto;
  align-items:center;
  gap:clamp(.4rem,2vw,1.25rem);
  padding:.55rem var(--gut);
  background:rgba(255,255,255,.92);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border-bottom:1px solid #000;
}

.head-nav{display:none}
.head-nav p{display:flex;margin:0;gap:.1rem}
.head-nav a{
  position:relative;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.7rem .5rem;
  font-size:1rem;
  letter-spacing:-.02em;
}
.head-nav a::after{
  content:"";
  position:absolute;
  left:.5rem;right:.5rem;bottom:.45rem;
  height:2px;background:#000;
  transform:scaleX(0);
  transform-origin:left;
  transition:transform .25s ease;
}
.head-nav a:hover::after,.head-nav a:focus-visible::after{transform:scaleX(1)}
.nav-r p{justify-content:flex-end}
.nav-r{justify-self:end}

.brand{
  font-weight:900;
  font-size:clamp(1rem,2.4vw,1.35rem);
  letter-spacing:-.05em;
  padding:.65rem .35rem;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
}

.head-q{
  display:none;
  width:8.5rem;
  min-height:42px;
  padding:.5rem .7rem;
  font-family:inherit;
  font-size:.95rem;
  color:#000;
  background:rgba(255,255,255,.6);
  border:1px solid #000;
  border-radius:var(--r);
}

.burger,.closer{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:.7rem 1rem;
  font-family:inherit;
  font-size:1rem;
  letter-spacing:.06em;
  color:#fff;
  background:#000;
  border:1px solid #000;
  border-radius:var(--r);
  cursor:pointer;
  justify-self:end;
  transition:background .2s ease,color .2s ease;
}
.burger:hover{background:#fff;color:#000}

.sw{
  position:absolute;
  width:1px;height:1px;
  opacity:0;
  pointer-events:none;
}

/* 全屏遮罩 */
.sheet{
  position:fixed;
  inset:0;
  z-index:90;
  display:grid;
  grid-template-rows:auto auto 1fr;
  gap:clamp(1rem,4vw,2rem);
  padding:clamp(1rem,4vw,2.5rem);
  background:#000;
  color:#fff;
  overflow-y:auto;
  visibility:hidden;
  opacity:0;
  transform:translateY(-1.5%);
  transition:opacity .28s ease,transform .28s ease,visibility .28s ease;
}
.sw:checked~.sheet{visibility:visible;opacity:1;transform:none}

.sheet-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding-bottom:1rem;
  border-bottom:1px solid #fff;
}
.sheet-brand{font-weight:900;font-size:1.15rem;letter-spacing:-.04em}
.closer{background:#fff;color:#000;border-color:#fff}
.sheet-search{margin:0}
.q{
  width:100%;
  min-height:50px;
  padding:.6rem 1rem;
  font-family:inherit;
  font-size:1.05rem;
  color:#fff;
  background:transparent;
  border:1px solid rgba(255,255,255,.6);
  border-radius:var(--r);
}
.q::placeholder{color:rgba(255,255,255,.55)}
.sheet-nav p{display:flex;flex-wrap:wrap;gap:.5rem;margin:0}
.sheet-nav a{
  display:inline-flex;
  align-items:center;
  min-height:50px;
  padding:.6rem 1.1rem;
  font-size:1.15rem;
  font-weight:700;
  border:1px solid #fff;
  border-radius:var(--r);
  transition:background .2s ease,color .2s ease;
}
.sheet-nav a:hover,.sheet-nav a:focus-visible{background:#fff;color:#000}
.sheet-nav a[hidden]{display:none}

/* Hero */
.hero{
  position:relative;
  background:#000;
  color:#fff;
  overflow:hidden;
  border-bottom:1px solid #000;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:radial-gradient(circle,rgba(255,255,255,.22) 1px,transparent 1.5px);
  background-size:16px 16px;
  pointer-events:none;
}
.hero-wrap{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:center;
  gap:clamp(1rem,3vw,2rem);
  min-height:45vh;
  max-width:1320px;
  margin:0 auto;
  padding:clamp(1.4rem,4vw,2.75rem) var(--gut);
}
.hero-copy{text-align:center}
.hero h1{
  font-size:clamp(2.4rem,9vw,6rem);
  letter-spacing:-.06em;
  line-height:.9;
  overflow-wrap:break-word;
}
.hero-sub{
  max-width:46ch;
  margin:1rem auto 0;
  font-size:clamp(.95rem,1.5vw,1.1rem);
  line-height:1.6;
  color:rgba(255,255,255,.78);
  text-align:center;
}
.hero-shot{
  margin:0;
  aspect-ratio:16/10;
  background:#111;
  border:1px solid rgba(255,255,255,.8);
  border-radius:var(--r);
  overflow:hidden;
}
.hero-shot img{display:block;width:100%;height:100%;object-fit:cover}

/* 正文骨架 */
.stage{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:clamp(1.5rem,4vw,3rem);
  max-width:1440px;
  margin:0 auto;
  padding:clamp(1.6rem,5vw,4.5rem) var(--gut) clamp(2.5rem,7vw,6rem);
}
.doc{min-width:0}
.doc>article{
  scroll-margin-top:6.5rem;
  margin-bottom:clamp(1.4rem,4vw,2.75rem);
  padding:clamp(1.3rem,3.5vw,3rem);
  background:rgba(255,255,255,.72);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  border:1px solid #000;
  border-radius:var(--r);
}
.doc>article:last-child{margin-bottom:0}
.doc h2{
  font-size:clamp(1.7rem,4.4vw,2.9rem);
  margin-bottom:1.1rem;
}
.doc h3{
  font-size:clamp(1.25rem,2.8vw,1.75rem);
  margin:1.6rem 0 .6rem;
}
.doc h2>span,.doc h3>span,.rail-t span,.rail-b span{
  display:inline-block;
  padding-bottom:.14em;
  border-bottom:5px solid #000;
}
.rail-t span,.rail-b span{border-bottom-width:3px}
.doc p{font-size:1.02rem;line-height:1.8}
.doc ul,.doc ol{padding-left:1.35rem;margin:0 0 1rem}
.doc li{margin-bottom:.5rem;line-height:1.75}
.doc a{border-bottom:2px solid #000}
.doc a:hover{background:#000;color:#fff}
.doc strong,.doc b{font-weight:900}
.doc blockquote{
  margin:1.2rem 0;
  padding:.6rem 0 .6rem 1rem;
  border-left:6px solid #000;
  font-size:1.05rem;
}
.doc code,.doc pre{
  font-family:var(--mono);
  font-size:.95rem;
  background:#000;
  color:#fff;
}
.doc code{padding:.05em .35em;border-radius:4px}
.doc pre{padding:1rem;border-radius:var(--r);overflow-x:auto}
.doc table{display:block;overflow-x:auto;width:100%;border-collapse:collapse;font-size:.95rem}
.doc th,.doc td{border:1px solid #000;padding:.5rem .7rem;text-align:left}
.doc hr{border:0;border-top:1px dashed rgba(0,0,0,.4);margin:1.6rem 0}
.doc figure{margin:1.2rem 0}
.doc figure img{border:1px solid #000;border-radius:var(--r)}
.doc figcaption{font-size:.85rem;opacity:.7;margin-top:.4rem}

/* 侧栏 */
.rail{
  padding:1rem 1.1rem 1.3rem;
  background:rgba(255,255,255,.8);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  border:1px solid #000;
  border-radius:var(--r);
}
.rail-t{font-size:1.05rem;letter-spacing:-.01em;margin-bottom:.7rem}
.rail-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.rail-list a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:.5rem .1rem;
  border-bottom:1px dashed rgba(0,0,0,.35);
  transition:background .2s ease,color .2s ease,padding .2s ease;
}
.rail-list a:hover{background:#000;color:#fff;padding-left:.6rem}
.rail-b{font-size:.95rem;margin:1.1rem 0 0}

/* 页脚 */
.site-foot{
  background:#000;
  color:#fff;
  padding:clamp(2rem,5vw,3.5rem) var(--gut) 1.4rem;
  border-top:1px solid #000;
}
.foot-cols{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:clamp(1.2rem,3vw,2.5rem);
  max-width:1440px;
  margin:0 auto;
}
.foot-brand{font-weight:900;font-size:1.15rem;letter-spacing:-.04em;margin:0}
.foot-desc{font-size:.9rem;line-height:1.6;color:rgba(255,255,255,.68);margin:.6rem 0 0;max-width:32ch}
.site-foot dl{margin:0}
.site-foot dt{
  font-size:.82rem;
  letter-spacing:.12em;
  color:rgba(255,255,255,.6);
  padding-bottom:.5rem;
  margin-bottom:.4rem;
  border-bottom:1px solid rgba(255,255,255,.35);
}
.site-foot dd{margin:0}
.site-foot dd a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:.45rem 0;
  border-bottom:1px dashed rgba(255,255,255,.18);
  transition:background .2s ease,color .2s ease,padding .2s ease;
}
.site-foot dd a:hover{background:#fff;color:#000;padding-left:.5rem}
.foot-base{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  max-width:1440px;
  margin:clamp(1.4rem,4vw,2.5rem) auto 0;
  padding-top:1rem;
  border-top:1px solid rgba(255,255,255,.35);
  font-size:.85rem;
}
.foot-base p{margin:0}
.foot-top a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.35rem 0;
  border-bottom:2px solid #fff;
}

/* 滚动显现 */
.rv{opacity:0;transform:translateY(16px);transition:opacity .6s ease,transform .6s ease}
.rv.in{opacity:1;transform:none}

@media (min-width:820px){
  .hero-wrap{grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr)}
  .hero.no-fig .hero-wrap{grid-template-columns:minmax(0,1fr)}
  .foot-cols{grid-template-columns:1.5fr 1fr 1fr 1fr}
}

@media (min-width:1000px){
  .site-head{grid-template-columns:1fr auto 1fr auto auto}
  .head-nav{display:block}
  .head-q{display:block;justify-self:end}
  .brand{justify-self:center;text-align:center}
}

@media (min-width:1080px){
  .stage{grid-template-columns:minmax(0,1fr) 17rem;align-items:start}
  .rail{position:sticky;top:6.5rem}
}

@media (max-width:1079px){
  .rail{order:2}
}

@media (min-width:1000px) and (max-width:1079px){
  .stage{grid-template-columns:minmax(0,1fr)}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .rv{opacity:1;transform:none;transition:none}
  .sheet{transition:none}
  *{transition-duration:.01ms !important}
}

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