@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root{
  --green:#00ff80;
  --blue:#0000ff;
  --ink:#000000;
  --paper:#ffffff;
  --mint:#e6fff2;
  --ash:#efefef;
}

*,*::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:Roboto,system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.62;
  overflow-wrap:anywhere;
}

a{color:var(--blue)}
img{display:block;max-width:100%}
[hidden]{display:none !important}

/* 顶栏 */
.site-top{
  position:sticky;
  top:0;
  z-index:50;
  background:#000;
  color:#fff;
  border-bottom:4px solid var(--green);
}

.masthead{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:6px;
  max-width:1180px;
  margin:0 auto;
  padding:6px 14px;
}

.nav{min-width:0}
.nav ol{
  display:flex;
  flex-wrap:wrap;
  gap:2px;
  margin:0;
  padding:0;
  list-style:none;
}
.nav-l ol{justify-content:flex-start}
.nav-r ol{justify-content:flex-end}

.nav a{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:44px;
  padding:6px 9px;
  color:#fff;
  font-size:16px;
  font-weight:700;
  text-decoration:none;
  border:2px solid transparent;
}
.nav a::before{
  content:"";
  flex:none;
  width:8px;
  height:8px;
  background:var(--green);
}
.nav a:hover,
.nav a:focus-visible{
  background:var(--green);
  color:#000;
  border-color:#000;
}
.nav a:hover::before,
.nav a:focus-visible::before{background:#000}

.brand{
  padding:6px 8px;
  color:var(--green);
  font-size:clamp(18px,2.4vw,26px);
  font-weight:900;
  letter-spacing:.14em;
  text-decoration:none;
  white-space:nowrap;
}
.brand:hover{color:#fff}

.anchor-strip{
  background:#000;
  border-top:2px solid #262626;
  padding:7px 14px;
}

.findbar{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:1180px;
  margin:0 auto;
}
.findbar input{
  flex:1 1 auto;
  max-width:340px;
  min-height:40px;
  padding:6px 12px;
  border:2px solid var(--green);
  border-radius:0;
  background:#000;
  color:#fff;
  font:inherit;
  font-size:16px;
}
.findbar input::placeholder{color:#9a9a9a}
.findbar button{
  min-height:40px;
  padding:6px 16px;
  border:2px solid var(--green);
  border-radius:0;
  background:var(--green);
  color:#000;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.findbar button:hover{background:#fff}

/* 头图 */
.hero{
  display:grid;
  grid-template-columns:1.06fr .94fr;
  min-height:45vh;
  border-bottom:5px solid #000;
}
.hero-copy{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:40px 22px;
  background:var(--green);
  color:#000;
  text-align:center;
}
.hero-copy h1{
  margin:0;
  max-width:16ch;
  font-size:clamp(30px,5.4vw,54px);
  font-weight:900;
  line-height:1.08;
  letter-spacing:-.01em;
}
.hero-copy h2{
  margin:0;
  font-size:16px;
  font-weight:700;
  letter-spacing:.42em;
  text-indent:.42em;
}
.hero-copy .subtitle{
  margin:0;
  max-width:34ch;
  font-size:18px;
  font-weight:400;
  line-height:1.55;
}
.hero-media{
  position:relative;
  min-height:220px;
  overflow:hidden;
  background:var(--blue);
}
.hero-img{
  width:100%;
  height:100%;
  min-height:220px;
  object-fit:cover;
  filter:grayscale(1) contrast(1.15);
}
.hero-block{
  width:100%;
  height:100%;
  min-height:220px;
  background-color:var(--blue);
  background-image:linear-gradient(#000 3px,transparent 3px),linear-gradient(90deg,#000 3px,transparent 3px);
  background-size:100% 28px,28px 100%;
}

/* 主体 */
.wrap{
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:30px;
  max-width:1180px;
  margin:0 auto;
  padding:34px 18px 64px;
}

.rail{
  display:flex;
  flex-direction:column;
  gap:14px;
  align-self:start;
  position:sticky;
  top:138px;
}
.rail-card{
  padding:14px 16px;
  border-radius:18px;
  background:var(--mint);
}
.rail-list{
  margin:0;
  padding:0;
  list-style:none;
}
.rail-list a{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:8px 0;
  border-bottom:2px solid #000;
  color:#000;
  font-size:16px;
  font-weight:700;
  text-decoration:none;
}
.rail-list li:last-child a{border-bottom:0}
.rail-list a::before{
  content:"";
  flex:none;
  width:10px;
  height:10px;
  background:var(--blue);
}
.rail-list a:hover{color:var(--blue);text-decoration:underline}
.rail-top a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  border:3px solid #000;
  border-radius:18px;
  color:#000;
  font-weight:700;
  text-decoration:none;
}
.rail-top a:hover{background:var(--green)}

.content{min-width:0}

/* 正文 */
.prose>article{
  padding:26px 0 10px;
  border-top:4px solid #000;
  scroll-margin-top:138px;
}
.prose>article:first-child{
  border-top:0;
  padding-top:0;
}
.prose h2{
  margin:0 0 14px;
  padding-left:14px;
  border-left:14px solid var(--green);
  font-size:clamp(23px,3.4vw,32px);
  font-weight:900;
  line-height:1.2;
}
.prose h3{
  margin:24px 0 8px;
  font-size:20px;
  font-weight:700;
  line-height:1.35;
}
.prose p{margin:0 0 14px}
.prose .subtitle,
.prose p.subtitle{
  margin:0 0 18px;
  padding-bottom:10px;
  border-bottom:3px solid var(--blue);
  font-size:18px;
  font-weight:400;
}
.prose ul,
.prose ol{margin:0 0 16px;padding-left:24px}
.prose li{margin-bottom:8px}
.prose a{
  color:var(--blue);
  text-decoration:underline;
  text-underline-offset:3px;
}
.prose strong{background:linear-gradient(transparent 62%,var(--green) 62%)}
.prose time{
  display:inline-block;
  padding:2px 10px;
  background:#000;
  color:var(--green);
  font-size:16px;
  font-weight:700;
}
.prose blockquote{
  margin:0 0 16px;
  padding:12px 16px;
  border-left:8px solid var(--blue);
  background:var(--mint);
}
.prose blockquote p:last-child{margin:0}
.prose table{
  width:100%;
  border-collapse:collapse;
  font-size:16px;
}
.prose th,
.prose td{
  padding:8px 10px;
  border:2px solid #000;
  text-align:left;
  vertical-align:top;
}
.prose th{background:var(--green)}
.prose img,
.prose figure{margin:16px 0}
.prose figcaption{font-size:16px;margin-top:6px}
.prose code{
  padding:1px 5px;
  background:var(--ash);
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:.94em;
}
.prose hr{
  height:4px;
  margin:24px 0;
  border:0;
  background:#000;
}

/* 页脚 */
.site-foot{
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1.3fr;
  gap:26px;
  padding:38px max(16px,calc((100% - 1180px) / 2)) 0;
  border-top:6px solid var(--green);
  background:#000;
  color:#fff;
}
.site-foot h2{
  margin:0 0 10px;
  color:var(--green);
  font-size:16px;
  font-weight:700;
  letter-spacing:.3em;
}
.site-foot ol{
  margin:0;
  padding:0;
  list-style:none;
}
.site-foot a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:4px 0;
  color:#fff;
  font-size:16px;
  text-decoration:none;
}
.site-foot a:hover{
  color:var(--green);
  text-decoration:underline;
}
.f-brand{
  margin:0 0 8px;
  color:var(--green);
  font-size:24px;
  font-weight:900;
  letter-spacing:.1em;
}
.f-desc{
  margin:0;
  color:#dcdcdc;
  font-size:16px;
  line-height:1.6;
}
.site-foot .findbar{max-width:none}
.colophon{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:14px;
  padding:12px 0 20px;
  border-top:2px solid #333;
  font-size:16px;
}
.colophon p{margin:0}
.colophon a{
  padding:0 14px;
  border:2px solid var(--green);
  font-weight:700;
}

/* 动效 */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity .36s linear,transform .36s linear;
}
.reveal.in{
  opacity:1;
  transform:none;
}

@media (prefers-reduced-motion: no-preference){
  .hero-copy > *{animation:rise .34s steps(5,end) both}
  .hero-copy > *:nth-child(2){animation-delay:.06s}
  .hero-copy > *:nth-child(3){animation-delay:.12s}
}

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

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
}

/* 窄屏 */
@media (max-width:900px){
  .masthead{
    grid-template-columns:1fr;
    gap:0;
    padding:6px 10px;
  }
  .brand{
    order:-1;
    text-align:center;
    padding:8px 6px;
  }
  .nav{overflow:hidden}
  .nav ol{
    flex-wrap:nowrap;
    justify-content:flex-start;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .nav a{white-space:nowrap;padding:6px 8px}
  .anchor-strip{padding:7px 10px}

  .hero{
    grid-template-columns:1fr;
    min-height:0;
  }
  .hero-copy{padding:30px 18px}
  .hero-media,
  .hero-img,
  .hero-block{min-height:150px;height:150px}

  .wrap{
    grid-template-columns:1fr;
    gap:22px;
    padding:24px 14px 48px;
  }
  .rail{position:static}
  .rail-list{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0 14px;
  }
  .prose>article{scroll-margin-top:186px}

  .site-foot{
    grid-template-columns:1fr 1fr;
    gap:18px;
    padding:28px 14px 0;
  }
}

@media (max-width:560px){
  .site-foot{grid-template-columns:1fr}
  .rail-list{grid-template-columns:1fr}
  .colophon{justify-content:flex-start}
}

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