:root{
  --ink:#000;
  --paper:#fff;
  --line:#000;
  --max:1200px;
  --r:4px;
}

*,
*::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:Poppins,-apple-system,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.75;
  letter-spacing:.005em;
}

img{max-width:100%;height:auto;display:block}
a{color:inherit}
p{margin:0 0 1em}
p:last-child{margin-bottom:0}

h1,
h2,
h3,
h4{
  font-family:Righteous,Poppins,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  font-weight:700;
  line-height:1.15;
  letter-spacing:-.015em;
  margin:0;
}

::selection{background:#000;color:#fff}

:focus-visible{
  outline:3px solid #000;
  outline-offset:3px;
}

/* ---- 页头 ---- */
.site-head{
  position:sticky;
  top:0;
  z-index:30;
  background:var(--paper);
  border-bottom:2px solid var(--line);
}

.head-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  max-width:var(--max);
  margin:0 auto;
  padding:.8rem 1.15rem .45rem;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  min-height:44px;
  text-decoration:none;
  font-family:Righteous,Poppins,"PingFang SC",sans-serif;
  font-size:1.2rem;
  letter-spacing:.03em;
}

.brand img{
  width:26px;
  height:26px;
  border-radius:var(--r);
  border:1.5px solid var(--line);
}

.pill{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.5rem 1.05rem;
  border:1.5px solid var(--line);
  border-radius:999px;
  background:var(--paper);
  color:var(--ink);
  font-size:16px;
  line-height:1.25;
  text-decoration:none;
  transition:background .22s ease,color .22s ease,transform .22s ease;
}

.pill:hover,
.pill:focus-visible{
  background:var(--ink);
  color:var(--paper);
  transform:translateY(-1px);
}

.contact{
  border-width:2px;
  font-weight:600;
  letter-spacing:.02em;
}

.head-nav{
  max-width:var(--max);
  margin:0 auto;
  padding:0 1.15rem .8rem;
}

.head-nav p{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  margin:0;
}

.head-nav a{
  font-size:16px;
  animation:rise .42s ease both;
}

.head-nav a:nth-child(1){animation-delay:.02s}
.head-nav a:nth-child(2){animation-delay:.05s}
.head-nav a:nth-child(3){animation-delay:.08s}
.head-nav a:nth-child(4){animation-delay:.11s}
.head-nav a:nth-child(5){animation-delay:.14s}
.head-nav a:nth-child(6){animation-delay:.17s}
.head-nav a:nth-child(7){animation-delay:.2s}

@keyframes rise{
  from{opacity:0;transform:translateY(9px)}
  to{opacity:1;transform:none}
}

/* ---- 首屏 ---- */
.hero{
  position:relative;
  min-height:45vh;
  display:grid;
  place-items:center;
  overflow:hidden;
  padding:2.6rem 1.15rem 3rem;
  border-bottom:2px solid var(--line);
}

.hero-mark{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  margin:0;
  font-family:Righteous,Poppins,"PingFang SC",sans-serif;
  font-size:clamp(3rem,17vw,11rem);
  line-height:.9;
  letter-spacing:-.03em;
  opacity:.075;
  white-space:nowrap;
  pointer-events:none;
  user-select:none;
}

.hero-in{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.9rem;
  max-width:860px;
  text-align:center;
}

.hero-glyph{
  flex:none;
  color:var(--ink);
}

.hero h1{
  font-size:clamp(1.85rem,5.2vw,3.4rem);
  line-height:1.08;
  letter-spacing:-.03em;
  margin:0;
}

/* ---- 主体网格 ---- */
.wrap{
  display:grid;
  gap:2rem;
  max-width:var(--max);
  margin:0 auto;
  padding:2.4rem 1.15rem 4rem;
}

main article{
  scroll-margin-top:190px;
}

@media (min-width:900px){
  .wrap{
    grid-template-columns:220px minmax(0,1fr);
    gap:3rem;
    padding-top:3.4rem;
  }
}

/* ---- 侧栏 ---- */
.rail{
  border-top:3px solid var(--line);
  padding-top:.9rem;
}

@media (min-width:900px){
  .rail{
    position:sticky;
    top:190px;
    align-self:start;
  }
}

.rail-label{
  margin:0 0 .6rem;
  font-size:16px;
  font-weight:600;
  letter-spacing:.02em;
  word-break:break-word;
}

.rail-list{
  list-style:none;
  margin:0;
  padding:0;
}

.rail-list li{
  border-bottom:1px solid var(--line);
}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:.5rem 0;
  font-size:16px;
  line-height:1.4;
  text-decoration:none;
  transition:background .22s ease,padding-left .22s ease;
}

.rail-list a::before{
  content:"";
  display:inline-block;
  width:8px;
  height:8px;
  margin-right:.6rem;
  border:1.5px solid var(--line);
  border-radius:var(--r);
  flex:none;
  transition:background .22s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible{
  background:var(--ink);
  color:var(--paper);
  padding-left:.5rem;
}

.rail-list a:hover::before,
.rail-list a:focus-visible::before{
  background:var(--paper);
}

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

.doc > h2{
  font-size:clamp(1.55rem,3.6vw,2.35rem);
  margin:0 0 .7rem;
}

.subtitle{
  margin:0 0 2.2rem;
  padding-left:.9rem;
  border-left:4px solid var(--line);
  font-size:1.02rem;
  line-height:1.65;
}

.doc article{
  padding-top:2.4rem;
  margin-top:2.4rem;
  border-top:1px solid var(--line);
}

.doc article:first-of-type{
  padding-top:0;
  margin-top:0;
  border-top:0;
}

.doc h2{
  font-size:clamp(1.35rem,3.1vw,1.95rem);
  margin:0 0 .7rem;
}

.doc h3{
  font-size:1.15rem;
  margin:1.6rem 0 .5rem;
}

.doc p{
  max-width:66ch;
}

.doc ul,
.doc ol{
  max-width:66ch;
  margin:0 0 1.1em;
  padding-left:1.35em;
}

.doc li{
  margin-bottom:.45em;
}

.doc li::marker{
  font-weight:700;
}

.doc a{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  transition:background .22s ease,color .22s ease;
}

.doc a:hover,
.doc a:focus-visible{
  background:var(--ink);
  color:var(--paper);
  text-decoration-color:var(--paper);
}

.doc strong{
  font-weight:700;
}

.doc blockquote{
  margin:1.4rem 0;
  padding:.9rem 1.1rem;
  border:1.5px solid var(--line);
  border-radius:var(--r);
}

.doc blockquote p:last-child{margin-bottom:0}

.doc table{
  width:100%;
  border-collapse:collapse;
  margin:1.2rem 0;
  font-size:16px;
}

.doc th,
.doc td{
  border:1px solid var(--line);
  padding:.55rem .7rem;
  text-align:left;
}

.doc th{
  background:var(--ink);
  color:var(--paper);
  font-weight:600;
}

.doc img{
  border:1.5px solid var(--line);
  border-radius:var(--r);
  margin:1.2rem 0;
}

.doc hr{
  border:0;
  border-top:1px solid var(--line);
  margin:2rem 0;
}

.doc code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:15px;
  border:1px solid var(--line);
  border-radius:var(--r);
  padding:.05em .35em;
}

/* ---- 页脚 ---- */
.site-foot{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:1rem 1.4rem;
  max-width:var(--max);
  margin:0 auto;
  padding:1.6rem 1.15rem 2.4rem;
  border-top:2px solid var(--line);
}

.foot-brand a{
  font-family:Righteous,Poppins,"PingFang SC",sans-serif;
  font-size:clamp(1.5rem,4.4vw,2.2rem);
  line-height:1;
  letter-spacing:.02em;
  text-decoration:none;
}

.foot-nav p{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  margin:0;
}

.foot-pill{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.35rem .7rem;
  border:1px solid var(--line);
  border-radius:var(--r);
  font-size:16px;
  line-height:1.3;
  text-decoration:none;
  transition:background .22s ease,color .22s ease;
}

.foot-pill:hover,
.foot-pill:focus-visible{
  background:var(--ink);
  color:var(--paper);
}

.foot-copy{
  font-size:16px;
  letter-spacing:.01em;
}

/* ---- 滚动进入 ---- */
.js .doc article{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .5s ease,transform .5s ease;
}

.js .doc article.in{
  opacity:1;
  transform:none;
}

/* ---- 窄屏 ---- */
@media (max-width:600px){
  body{font-size:16.5px}
  .head-top{padding:.7rem .9rem .4rem}
  .head-nav{padding:0 .9rem .7rem}
  .wrap{padding:1.8rem .9rem 3rem}
  .hero{padding:2rem .9rem 2.4rem;min-height:42vh}
  .hero-in{flex-direction:column;gap:.7rem}
  .hero-glyph{width:28px;height:28px}
  .rail{border-top-width:2px}
  .rail-list{display:grid;grid-template-columns:1fr 1fr;gap:0 .9rem}
  .rail-list li{border-bottom:1px solid var(--line)}
  .doc article{padding-top:1.9rem;margin-top:1.9rem}
  .site-foot{padding:1.4rem .9rem 2rem}
  .foot-copy{width:100%}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,
  *::before,
  *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  .js .doc article{
    opacity:1;
    transform:none;
  }
}

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