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

:root {
  --ink: #0D0D0D;
  --acid: #D6FF3F;
  --paper: #F2EFE6;
  --line: rgba(242, 239, 230, .16);
  --soft: rgba(242, 239, 230, .58);
  --glass: rgba(242, 239, 230, .055);
  --rail: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-left: var(--rail);
  background: var(--ink);
  color: var(--paper);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: var(--rail);
  top: 0;
  z-index: 99;
  transform: translateY(-130%);
  padding: 12px 16px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { transform: none; }

/* 左侧竖排导轨 */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0d0d0d 0%, #121212 100%);
}

.mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--acid);
  border-radius: 4px;
  color: var(--acid);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.mark:hover { background: var(--acid); color: var(--ink); }
.mark-i { display: block; width: 24px; height: 24px; object-fit: contain; }

.burger {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 46px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: none;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.burger-i {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--acid);
  box-shadow: 0 -6px 0 var(--acid), 0 6px 0 var(--acid);
  transition: box-shadow .2s, background .2s;
}
.burger:hover { border-color: var(--acid); }
.burger[aria-expanded="true"] { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.burger[aria-expanded="true"] .burger-i { background: var(--ink); box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink); }

/* 全屏遮罩菜单 */
.menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  padding: calc(var(--rail) + 18px) 20px 30px calc(var(--rail) + 24px);
  background: rgba(13, 13, 13, .97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
  overflow-y: auto;
}
.menu.open { opacity: 1; visibility: visible; transform: none; }

.menu-in {
  display: grid;
  gap: 28px;
  max-width: 840px;
}

.menu-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-height: 44px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.15rem, 3.6vw, 2rem);
  text-decoration: none;
  transition: padding-left .2s, color .2s;
}
.menu-nav a:hover { padding-left: 18px; color: var(--acid); }
.menu-nav .no {
  flex: 0 0 auto;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--acid);
}

.search { display: flex; gap: 8px; }
.search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(242, 239, 230, .07);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}
.search input:focus { border-color: var(--acid); outline: none; }
.search button {
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: 4px;
  background: var(--acid);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.search button:hover { background: var(--paper); }

/* 首屏 */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 24px 120px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 12% 18%, rgba(214, 255, 63, .16), transparent 62%);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
}
.hero-media { position: absolute; inset: 0; margin: 0; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .3;
  filter: grayscale(1) contrast(1.08);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, rgba(13, 13, 13, .95) 0%, rgba(13, 13, 13, .6) 58%, rgba(13, 13, 13, .28) 100%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  max-width: 980px;
}

.kicker {
  margin: 0;
  font-size: 16px;
  letter-spacing: .34em;
  color: var(--acid);
}

.hero-h1 {
  margin: 0;
  font-size: clamp(2.3rem, 8.4vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .95;
  background: linear-gradient(100deg, var(--paper) 0 36%, var(--acid) 52%, var(--paper) 68%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 9s linear infinite;
}
@keyframes sweep {
  from { background-position: 100% 0; }
  to { background-position: -160% 0; }
}

.lede {
  margin: 0;
  max-width: 54ch;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: #d8d5cb;
}

.band {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: 28px;
  z-index: 3;
  overflow: hidden;
  transform: rotate(-2.4deg);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--acid);
  color: var(--ink);
}
.band-track {
  display: inline-flex;
  gap: 30px;
  padding: 7px 0;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2em;
  animation: marq 18s linear infinite;
}
@keyframes marq {
  to { transform: translateX(-50%); }
}

/* 正文 + 右侧栏 */
.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  gap: 26px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 46px 24px 60px;
}

.prose { min-width: 0; display: grid; gap: 16px; }

.prose > div {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  scroll-margin-top: 18px;
}
.prose > div + div { margin-top: 2px; }

.prose h2 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  color: var(--acid);
}
.prose h3 { margin: 20px 0 8px; font-size: 1.12rem; }
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 1.25em; }
.prose li { margin: 4px 0; }
.prose figure { margin: 0 0 14px; }
.prose img { border: 1px solid var(--line); border-radius: 4px; }
.prose a { color: var(--acid); text-underline-offset: 3px; }
.prose blockquote {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 3px solid var(--acid);
  background: rgba(214, 255, 63, .06);
}
.prose code, .prose pre { font-size: 15px; }
.prose pre {
  overflow-x: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #151515;
}

.side {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 12px;
  padding: 18px 14px;
  border: 1px solid rgba(214, 255, 63, .38);
  border-radius: 4px;
  background: rgba(214, 255, 63, .055);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.side-h {
  margin: 0;
  font-size: 15px;
  letter-spacing: .22em;
  color: var(--acid);
}
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 16px;
  text-decoration: none;
  transition: background .18s, color .18s, padding-left .18s;
}
.side-list a:hover { padding-left: 14px; background: var(--acid); color: var(--ink); }

.top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.top:hover { background: var(--paper); color: var(--ink); }

/* 页脚单行 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 26px 24px 34px;
  border-top: 1px solid var(--line);
  background: #111;
}
.f-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}
.f-brand .mark { width: 38px; height: 38px; font-size: 15px; }

.f-nav { flex: 1 1 300px; }
.f-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 16px;
  text-decoration: none;
  transition: border-color .18s, color .18s;
}
.f-nav a:hover { border-color: var(--acid); color: var(--acid); }

.f-sub { display: grid; gap: 6px; flex: 0 1 240px; }
.f-h { margin: 0; font-size: 15px; letter-spacing: .2em; color: var(--acid); }

.sub { display: flex; gap: 6px; }
.sub input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(242, 239, 230, .07);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}
.sub input:focus { border-color: var(--acid); outline: none; }
.sub button {
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 4px;
  background: var(--acid);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.sub button:hover { background: var(--paper); }

.f-copy {
  flex: 0 0 auto;
  margin: 0 auto;
  font-size: 15px;
  color: var(--soft);
  text-align: center;
}

/* 滚动淡入 */
html.js .prose > div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
html.js .prose > div.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  :root { --rail: 56px; }
  body { font-size: 16px; }
  .mark { width: 40px; height: 40px; font-size: 16px; }
  .burger { width: 40px; padding: 9px 0; }
  .menu { padding-right: 14px; padding-left: calc(var(--rail) + 16px); }
  .hero { padding: 84px 16px 96px; }
  .hero-h1 { font-size: clamp(2.1rem, 9.6vw, 3.4rem); }
  .body-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 30px 14px 40px;
  }
  .side { position: static; }
  .prose > div { padding: 20px 15px; }
  .foot { padding: 22px 14px 30px; }
  .f-nav { flex: 1 1 100%; }
  .f-sub { flex: 1 1 100%; }
  .f-copy { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-h1, .band-track { animation: none; }
  html.js .prose > div { opacity: 1; transform: none; transition: none; }
  .menu { transition: none; }
}

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