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

:root {
  --bg: #000000;
  --panel: #121212;
  --panel-2: #171717;
  --line: #1f1f1f;
  --line-2: #2c2c2c;
  --ink: #ededed;
  --ink-2: #c4c4c4;
  --dim: #8a8a8a;
  --acc: #3ef58c;
  --acc-soft: rgba(62, 245, 140, .12);
  --rad: 18px;
  --head: 72px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.28; letter-spacing: -.005em; margin: 0; }

a:focus-visible,
button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 90;
  padding: 12px 16px;
  background: var(--acc);
  color: #000;
  border-radius: 0 0 12px 12px;
  font-size: .82rem;
  transition: top .18s ease;
}
.skip:focus { top: 0; }

/* 顶部 */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: var(--head);
  padding: 10px 20px;
  background: rgba(0, 0, 0, .93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav { min-width: 0; }
.nav-l { justify-self: start; }
.nav-r { justify-self: end; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-r ul { justify-content: flex-end; }

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 11px;
  font-size: .82rem;
  color: var(--dim);
  border-radius: 10px;
  transition: color .18s ease, background .18s ease;
}
.nav a:hover { color: var(--ink); background: #141414; }

.nav a.pill {
  margin-left: 6px;
  padding: 8px 16px;
  color: var(--acc);
  border: 1px solid rgba(62, 245, 140, .45);
  border-radius: 999px;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav a.pill:hover {
  background: var(--acc-soft);
  color: var(--acc);
  box-shadow: 0 0 16px rgba(62, 245, 140, .22);
}

.has-sub { position: relative; display: inline-flex; align-items: center; }
.has-sub .trig::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.sub {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 168px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-bottom: 2px solid var(--acc);
  border-radius: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.has-sub:hover .sub,
.has-sub:focus-within .sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: .88rem;
  letter-spacing: .1em;
  border-radius: 12px;
}
.brand-name { text-shadow: 0 0 14px rgba(62, 245, 140, .3); }
.brand-mark { display: inline-flex; }
.brand-img { width: 28px; height: 28px; }

/* 锚点条 */

.anchors {
  position: sticky;
  top: var(--head);
  z-index: 30;
  display: flex;
  gap: 6px;
  padding: 8px 20px;
  overflow-x: auto;
  background: #070707;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.anchors::-webkit-scrollbar { display: none; }

.anchors a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 13px;
  font-size: .78rem;
  color: var(--dim);
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.anchors a:hover { color: var(--ink); border-color: var(--line-2); }
.anchors a.is-cur {
  color: var(--acc);
  border-color: rgba(62, 245, 140, .4);
  background: var(--acc-soft);
}
.anchors .n { font-size: .68rem; color: #4d4d4d; letter-spacing: .08em; }
.anchors a.is-cur .n { color: rgba(62, 245, 140, .75); }

/* 首屏 */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: 48px 20px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 74%);
  pointer-events: none;
}

.hero-in { position: relative; max-width: 740px; text-align: center; }
.hero-mark { display: inline-flex; margin-bottom: 16px; }
.hero-img { width: 56px; height: 56px; }

.hero h1 {
  font-size: clamp(1.7rem, 6vw, 3rem);
  margin: 0 0 14px;
  text-shadow: 0 0 20px rgba(62, 245, 140, .26);
}

.hero-desc {
  margin: 0 auto;
  max-width: 54ch;
  font-size: .9rem;
  color: var(--dim);
}

/* 主体 */

main {
  counter-reset: sec;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 44px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 24px 72px;
  align-items: start;
}

main > .rail {
  grid-column: 1;
  grid-row: 1 / span 40;
  align-self: start;
  position: sticky;
  top: calc(var(--head) + 76px);
}

main > section:not(.rail) {
  grid-column: 2;
  min-width: 0;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  counter-increment: sec;
  animation: rise .45s ease both;
}

main > section:not(.rail)::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-size: .7rem;
  letter-spacing: .3em;
  color: var(--acc);
  opacity: .75;
}

section[id] { scroll-margin-top: calc(var(--head) + 76px); }

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

.rail-box {
  padding: 18px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--acc);
  border-radius: var(--rad);
}
.rail-box h2 { font-size: .92rem; letter-spacing: .08em; margin: 0 0 5px; }

.subtitle {
  margin: 0 0 14px;
  font-size: .7rem;
  letter-spacing: .24em;
  color: var(--dim);
}

.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { animation: rise .38s ease both; }
.rail-list li:nth-child(2) { animation-delay: .04s; }
.rail-list li:nth-child(3) { animation-delay: .08s; }
.rail-list li:nth-child(4) { animation-delay: .12s; }
.rail-list li:nth-child(5) { animation-delay: .16s; }
.rail-list li:nth-child(6) { animation-delay: .2s; }
.rail-list li:nth-child(7) { animation-delay: .24s; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  font-size: .82rem;
  color: var(--ink-2);
  border-left: 1px solid var(--line-2);
  transition: color .16s ease, border-color .16s ease, padding-left .16s ease;
}
.rail-list a:hover {
  color: var(--acc);
  border-color: var(--acc);
  padding-left: 14px;
}

/* 正文排版 */

main > section:not(.rail) > :first-child { margin-top: 0; }
main > section h2 { font-size: clamp(1.18rem, 3.4vw, 1.55rem); margin: 0 0 12px; color: #f7f7f7; }
main > section h3 { font-size: 1.02rem; margin: 26px 0 8px; color: #f2f2f2; }
main > section p { margin: 0 0 15px; color: var(--ink-2); }
main > section ul,
main > section ol { margin: 0 0 16px; padding-left: 1.25em; color: var(--ink-2); }
main > section li { margin: 7px 0; }

main > section a {
  color: var(--acc);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(62, 245, 140, .4);
}
main > section a:hover { text-decoration-color: var(--acc); }

main > section figure {
  margin: 22px 0;
  padding: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--acc);
  border-radius: var(--rad);
}
main > section figure img { border-radius: 12px; width: 100%; }
main > section figcaption { margin-top: 8px; font-size: .76rem; color: var(--dim); }

main > section aside {
  margin: 22px 0;
  padding: 14px 16px;
  background: var(--panel-2);
  border-left: 2px solid var(--acc);
  border-radius: 0 12px 12px 0;
  color: var(--ink-2);
  font-size: .92rem;
}

main > section blockquote {
  margin: 20px 0;
  padding: 12px 16px;
  background: var(--panel);
  border-left: 2px solid rgba(62, 245, 140, .55);
  border-radius: 0 12px 12px 0;
  color: var(--ink-2);
}

main > section table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: .88rem;
}
main > section th,
main > section td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); }
main > section th { color: #f2f2f2; font-weight: 500; }

/* 页脚 */

footer {
  margin-top: 20px;
  padding: 10px 20px 30px;
  background: #060606;
  border-top: 1px solid var(--line);
}
footer > section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
footer > section:last-child { border-bottom: 0; }

.foot-cta {
  padding: 26px 20px !important;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--acc) !important;
  border-radius: var(--rad);
  text-align: center;
  max-width: 1180px;
  margin: 20px auto 0 !important;
}
.foot-cta h2 { font-size: 1.15rem; margin: 0 0 6px; text-shadow: 0 0 18px rgba(62, 245, 140, .22); }
.foot-cta .subtitle { margin-bottom: 18px; }

.big-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 30px;
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--acc);
  border: 1px solid rgba(62, 245, 140, .5);
  border-radius: 999px;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.big-cta:hover {
  background: var(--acc-soft);
  box-shadow: 0 0 22px rgba(62, 245, 140, .25);
  transform: translateY(-1px);
}

.foot-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 26px;
  align-items: start;
}

.foot-brand { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot-logo { display: inline-flex; padding: 6px 0; min-height: 44px; align-items: center; }
.foot-name {
  font-size: .95rem;
  letter-spacing: .1em;
  padding: 6px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.foot-name:hover { color: var(--acc); }

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 26px;
  margin: 0;
}
.foot-nav dt {
  flex: 0 0 100%;
  margin-top: 8px;
  font-size: .7rem;
  letter-spacing: .24em;
  color: var(--dim);
}
.foot-nav dd { margin: 0; flex: 0 0 auto; }
.foot-nav dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  font-size: .84rem;
  color: var(--ink-2);
  transition: color .16s ease;
}
.foot-nav dd a:hover { color: var(--acc); }

.foot-base { text-align: center; }
.foot-base p { margin: 0; font-size: .76rem; letter-spacing: .12em; color: var(--dim); }

/* 回到顶部 */

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  min-height: 46px;
  padding: 12px 18px;
  font: inherit;
  font-size: .8rem;
  color: var(--ink);
  background: #0d0d0d;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--acc); color: var(--acc); }

/* 移动端 */

@media (max-width: 900px) {
  .top {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
  }
  .brand { order: -1; flex: 1 1 100%; justify-content: center; }
  .nav { flex: 1 1 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { flex-wrap: nowrap; }
  .nav-l ul { justify-content: flex-start; }
  .nav a { padding: 8px; }
  .nav a.pill { margin-left: 0; padding: 8px 12px; }

  .has-sub { flex-wrap: nowrap; }
  .sub {
    position: static;
    flex-direction: row;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .anchors { top: 0; padding: 8px 12px; }

  .hero { min-height: 42vh; padding: 40px 16px; }

  main {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 16px 56px;
  }
  main > .rail,
  main > section:not(.rail) { grid-column: 1; grid-row: auto; }
  main > .rail { position: static; }
  .rail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .rail-list a { border-left: 0; border-bottom: 1px solid var(--line); }

  section[id] { scroll-margin-top: 64px; }

  .foot-main { grid-template-columns: 1fr; }
  footer { padding: 8px 16px 26px; }
  .foot-cta { margin-top: 16px !important; padding: 22px 16px !important; }
}

@media (min-width: 901px) {
  .sub a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 10px;
    font-size: .8rem;
    color: var(--ink-2);
    border-radius: 9px;
    white-space: nowrap;
  }
  .sub a:hover { color: var(--acc); background: #1b1b1b; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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