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

:root{
  --neon:#87ff71;
  --sun:#ffce5c;
  --ink:#192617;
  --paper:#f7f4e8;
  --r:4px;
}

*{box-sizing:border-box}

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

body{
  margin:0;
  background:var(--paper);
  background-image:radial-gradient(rgba(25,38,23,.10) 1px,transparent 1.2px);
  background-size:16px 16px;
  color:var(--ink);
  font-family:'Space Grotesk',system-ui,-apple-system,'Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.7;
  letter-spacing:.01em;
}

img{max-width:100%}

a{color:inherit}

/* ---------- 顶部品牌条 ---------- */
.masthead{
  position:sticky;
  top:0;
  z-index:60;
  display:flex;
  align-items:center;
  gap:12px;
  padding:9px 16px;
  background:var(--ink);
  color:var(--paper);
  border-bottom:4px solid var(--neon);
}

.brand{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  text-decoration:none;
  color:var(--neon);
  font-weight:700;
  letter-spacing:.06em;
}

.brand-mark{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  flex:0 0 38px;
  background:var(--sun);
  color:var(--ink);
  font-weight:700;
  font-size:1.05rem;
  line-height:1;
  clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);
}

img.brand-mark{object-fit:cover}

.brand-word{font-size:1.02rem;white-space:nowrap}

.spot{
  margin-left:auto;
  display:flex;
  align-items:center;
  border:2px solid var(--neon);
  border-radius:var(--r);
  overflow:hidden;
  background:rgba(247,244,232,.07);
}

.spot-in{
  width:96px;
  min-height:40px;
  padding:0 10px;
  border:0;
  background:transparent;
  color:var(--paper);
  font:inherit;
  font-size:16px;
}

.spot-in::placeholder{color:rgba(247,244,232,.55)}

.spot-in:focus{outline:none;background:rgba(247,244,232,.12)}

.spot-go{
  min-height:40px;
  padding:0 13px;
  border:0;
  background:var(--neon);
  color:var(--ink);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:transform .18s ease,background .18s ease;
}

.spot-go:hover{background:var(--sun);transform:rotate(-4deg) scale(1.06)}

/* ---------- 二级锚点条 ---------- */
.anchor-bar{
  position:sticky;
  top:64px;
  z-index:50;
  background:var(--sun);
  border-bottom:3px dashed var(--ink);
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}

.anchor-bar ol{
  display:flex;
  gap:2px;
  margin:0;
  padding:0 10px;
  list-style:none;
  width:max-content;
}

.anchor-bar li{display:flex}

.anchor-bar a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:0 12px;
  text-decoration:none;
  color:var(--ink);
  font-size:16px;
  font-weight:600;
  white-space:nowrap;
  border-bottom:3px solid transparent;
  transition:border-color .16s ease,background .16s ease;
}

.anchor-bar a:hover,
.anchor-bar a[aria-current]{
  border-bottom-color:var(--ink);
  background:rgba(25,38,23,.09);
}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  min-height:45vh;
  display:grid;
  place-items:center;
  padding:52px 20px 62px;
  overflow:hidden;
  background:var(--neon);
  background-image:radial-gradient(rgba(25,38,23,.28) 1.6px,transparent 1.7px);
  background-size:19px 19px;
  clip-path:polygon(0 0,100% 0,100% 88%,0 100%);
  border-bottom:3px solid var(--ink);
}

.hero-art{
  position:absolute;
  inset:0;
  margin:0;
  z-index:0;
}

.hero-img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.4;
  mix-blend-mode:multiply;
}

.hero-copy{
  position:relative;
  z-index:1;
  max-width:760px;
  text-align:center;
}

.hero-tag{
  display:inline-block;
  margin:0 0 12px;
  padding:4px 14px;
  background:var(--ink);
  color:var(--neon);
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.22em;
  border-radius:var(--r);
  transform:rotate(-2.5deg);
}

h1{
  margin:0;
  font-size:clamp(1.85rem,6vw,3.15rem);
  line-height:1.16;
  font-weight:700;
  letter-spacing:.01em;
  text-shadow:3px 3px 0 var(--sun);
}

.hero-lede{
  max-width:60ch;
  margin:16px auto 0;
  font-size:1.02rem;
  line-height:1.65;
}

/* ---------- 主体栅格 ---------- */
.wrap{
  max-width:1120px;
  margin:0 auto;
  padding:0 18px;
}

.grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 274px;
  gap:38px;
  align-items:start;
  padding-top:34px;
  padding-bottom:56px;
}

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

.prose article{
  padding:24px 0 26px;
  border-top:2px dashed rgba(25,38,23,.3);
  scroll-margin-top:126px;
}

.prose article:first-child{border-top:0;padding-top:0}

.prose h2{
  position:relative;
  margin:0 0 14px;
  padding-left:14px;
  font-size:clamp(1.28rem,3.2vw,1.62rem);
  line-height:1.32;
  font-weight:700;
  border-left:8px solid var(--neon);
}

.prose h2 span{
  background:linear-gradient(transparent 62%,var(--sun) 62%);
}

.prose h3{
  position:relative;
  margin:22px 0 10px;
  padding-left:12px;
  font-size:1.1rem;
  line-height:1.4;
  border-left:5px solid var(--sun);
}

.prose h3 span{background:linear-gradient(transparent 66%,rgba(135,255,113,.65) 66%)}

.prose p{margin:0 0 14px}

.prose ul,
.prose ol{margin:0 0 16px;padding-left:1.25em}

.prose li{margin:0 0 8px}

.prose strong{background:rgba(255,206,92,.55);padding:1px 3px}

.prose a{
  color:var(--ink);
  text-decoration:none;
  border-bottom:2px solid var(--neon);
  transition:background .16s ease;
}

.prose a:hover{background:var(--neon)}

.prose figure{
  margin:20px 0;
  padding:10px;
  background:#fff;
  border:2px dashed var(--ink);
  border-radius:var(--r);
  transform:rotate(-.7deg);
}

.prose figcaption{
  margin-top:8px;
  font-size:.9rem;
  line-height:1.5;
  color:rgba(25,38,23,.72);
}

.prose img{border-radius:var(--r);height:auto;display:block}

.prose blockquote{
  margin:18px 0;
  padding:14px 16px;
  background:rgba(135,255,113,.28);
  border-left:8px solid var(--ink);
  border-radius:var(--r);
}

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

.prose table{
  width:100%;
  border-collapse:collapse;
  margin:18px 0;
  font-size:.96rem;
}

.prose th,
.prose td{
  padding:9px 10px;
  border:2px solid var(--ink);
  text-align:left;
  vertical-align:top;
}

.prose th{background:var(--sun)}

.prose hr{
  height:0;
  margin:24px 0;
  border:0;
  border-top:3px dotted var(--ink);
}

/* ---------- 右侧栏 ---------- */
.rail{
  position:sticky;
  top:126px;
  display:block;
  padding:16px 16px 20px;
  background:#fff;
  border:3px solid var(--ink);
  border-radius:var(--r);
  box-shadow:6px 6px 0 var(--neon);
}

.rail-h{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 10px;
  font-size:.86rem;
  letter-spacing:.2em;
  font-weight:700;
}

.rail-h + .rail-h{margin-top:20px}

.rail-h span{
  position:relative;
  padding-left:15px;
}

.rail-h span::before{
  content:"";
  position:absolute;
  left:0;
  top:.34em;
  width:9px;
  height:9px;
  background:var(--sun);
  transform:rotate(45deg);
}

.toc{
  margin:0;
  padding:0;
  list-style:none;
  counter-reset:toc;
}

.toc li{counter-increment:toc}

.toc a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:6px 0;
  font-size:.95rem;
  line-height:1.4;
  text-decoration:none;
  border-bottom:2px dotted rgba(25,38,23,.25);
}

.toc a::before{
  content:counter(toc,decimal-leading-zero);
  margin-right:8px;
  font-size:.78rem;
  font-weight:700;
  color:rgba(25,38,23,.55);
}

.toc a:hover{color:var(--ink);background:var(--neon)}

.rail-top{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  margin-top:6px;
  background:var(--ink);
  color:var(--neon);
  text-decoration:none;
  font-weight:700;
  font-size:.95rem;
  border-radius:var(--r);
  transition:transform .18s ease,background .18s ease;
}

.rail-top:hover{background:var(--sun);color:var(--ink);transform:rotate(-2deg)}

/* ---------- 页脚 ---------- */
.foot{
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr;
  gap:26px 30px;
  padding:40px 20px 20px;
  background:var(--ink);
  background-image:repeating-linear-gradient(135deg,rgba(135,255,113,.14) 0 2px,transparent 2px 14px);
  color:var(--paper);
  border-top:6px solid var(--neon);
}

.foot-block{
  min-width:0;
  padding-bottom:8px;
  scroll-margin-top:126px;
}

.foot-block h2{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  font-size:.95rem;
  font-weight:700;
  letter-spacing:.16em;
  color:var(--neon);
}

.foot-block h2 span{position:relative;padding-left:16px}

.foot-block h2 span::before{
  content:"";
  position:absolute;
  left:0;
  top:.32em;
  width:9px;
  height:9px;
  background:var(--sun);
  transform:rotate(45deg);
}

.foot-home{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  background:var(--neon);
  border-radius:var(--r);
  transition:transform .2s ease,background .2s ease;
}

.foot-home:hover{background:var(--sun);transform:rotate(12deg)}

.foot-tri{
  width:0;
  height:0;
  border-left:9px solid transparent;
  border-right:9px solid transparent;
  border-bottom:15px solid var(--ink);
}

.foot-links{
  margin:0;
  padding:0;
  list-style:none;
  columns:2;
  column-gap:14px;
}

.foot-links li{break-inside:avoid}

.foot-links a{
  display:flex;
  align-items:center;
  min-height:42px;
  padding:4px 0;
  font-size:.95rem;
  line-height:1.4;
  text-decoration:none;
  color:var(--paper);
  border-bottom:1px solid rgba(247,244,232,.22);
}

.foot-links a:hover{color:var(--neon);border-bottom-color:var(--neon)}

.sub{display:grid;gap:8px;max-width:260px}

.sub input{
  min-height:44px;
  padding:0 11px;
  border:2px solid var(--neon);
  border-radius:var(--r);
  background:rgba(247,244,232,.08);
  color:var(--paper);
  font:inherit;
  font-size:16px;
}

.sub input::placeholder{color:rgba(247,244,232,.55)}

.sub button{
  min-height:44px;
  border:0;
  border-radius:var(--r);
  background:var(--sun);
  color:var(--ink);
  font:inherit;
  font-weight:700;
  cursor:pointer;
  transition:transform .18s ease,background .18s ease;
}

.sub button:hover{background:var(--neon);transform:translateY(-2px)}

.foot-base{
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:6px;
  padding-top:14px;
  border-top:3px dotted rgba(247,244,232,.35);
}

.copy{
  margin:0;
  font-size:.88rem;
  color:rgba(247,244,232,.7);
}

.foot-top{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:0 14px;
  background:var(--neon);
  color:var(--ink);
  text-decoration:none;
  font-weight:700;
  font-size:.92rem;
  border-radius:var(--r);
  transition:transform .18s ease,background .18s ease;
}

.foot-top:hover{background:var(--sun);transform:rotate(-3deg)}

/* ---------- 断点 ---------- */
@media (max-width:900px){
  .grid{grid-template-columns:1fr;gap:26px}
  .rail{position:static;order:2}
  .foot{grid-template-columns:1fr 1fr}
  .foot-brand{grid-column:1 / -1}
}

@media (max-width:620px){
  body{font-size:16px}
  .brand-word{display:none}
  .spot-in{width:78px}
  .hero{min-height:45vh;padding:44px 16px 54px;clip-path:polygon(0 0,100% 0,100% 92%,0 100%)}
  h1{font-size:clamp(1.7rem,8vw,2.3rem)}
  .prose article{padding:20px 0 22px;scroll-margin-top:118px}
  .foot{grid-template-columns:1fr;padding:32px 16px 16px;gap:18px}
  .foot-links{columns:1}
  .sub{max-width:none}
  .foot-base{flex-direction:column;align-items:flex-start;justify-content:flex-start}
}

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

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