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

:root {
  --ink: #000000;
  --lime: #00ff80;
  --blue: #0000ff;
  --paper: #ffffff;
  --dim: #9dffcd;
  --line: #242424;
  --maxw: 1240px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, 'Noto Sans Mono CJK SC', 'Courier New', monospace;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--lime); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 3px;
}

h1, h2, h3 {
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.01em;
}

.sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(12px, 3vw, 26px);
  background: var(--ink);
  border-bottom: 4px solid var(--lime);
}

.bar-l,
.bar-r {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bar-l { justify-content: flex-start; }
.bar-r { justify-content: flex-end; flex-wrap: wrap; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pills a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border: 2px solid var(--lime);
  border-radius: 999px;
  color: var(--lime);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.pills a:hover,
.pills a:focus-visible {
  background: var(--lime);
  color: var(--ink);
  transform: translate(-2px, -2px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 20px;
  background: var(--lime);
  border: 2px solid var(--lime);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .18em;
  text-decoration: none;
}
.brand:hover {
  background: var(--ink);
  color: var(--lime);
}

.find {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--ink);
  border: 2px solid var(--lime);
  border-radius: 999px;
}
.find input {
  width: 116px;
  min-height: 40px;
  padding: 4px 14px;
  background: var(--ink);
  border: 0;
  color: var(--paper);
  font: inherit;
  font-size: 15px;
}
.find input::placeholder { color: #63e5a5; }
.find button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  background: var(--blue);
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.find button:hover { background: var(--lime); color: var(--ink); }

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-content: center;
  gap: clamp(20px, 4vw, 56px);
  max-width: var(--maxw);
  min-height: calc(100svh - 96px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 58px) clamp(14px, 3vw, 26px) 48px;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(56vh, 430px);
  margin: 0;
  overflow: hidden;
  background: var(--blue);
  border: 4px solid var(--lime);
  border-radius: 28px;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-blk {
  display: block;
  width: 58%;
  aspect-ratio: 1;
  background: var(--blue);
  border: 8px solid var(--lime);
}
.badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 12px;
  background: var(--ink);
  border: 3px solid var(--lime);
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}

.hero-txt { text-align: right; }
.hero-txt h1 {
  color: var(--lime);
  font-size: clamp(2.1rem, 6.2vw, 4.4rem);
  line-height: 1.03;
  word-break: break-word;
}
.lede {
  max-width: 40ch;
  margin: 0 0 0 auto;
  font-size: 1rem;
  line-height: 1.85;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin: 24px 0 0;
}
.hero-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 24px;
  border: 3px solid var(--lime);
  border-radius: 999px;
  color: var(--lime);
  font-weight: 700;
  text-decoration: none;
}
.hero-cta a:first-child { background: var(--lime); color: var(--ink); }
.hero-cta a:hover,
.hero-cta a:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

/* ---------- 主体 ---------- */
.wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 40px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px clamp(14px, 3vw, 26px) 60px;
}

.rail {
  position: sticky;
  top: 108px;
  padding: 4px 0 4px 16px;
  border-left: 6px solid var(--blue);
}
.rail-t {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 13px;
  letter-spacing: .34em;
}
.rail nav ul {
  display: grid;
  gap: 5px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.rail nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 2px solid var(--line);
  color: var(--paper);
  font-size: 15px;
  text-decoration: none;
}
.rail nav a:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}
.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border: 2px dashed var(--lime);
  border-radius: 999px;
  color: var(--lime);
  font-size: 14px;
  text-decoration: none;
}
.totop:hover { background: var(--lime); color: var(--ink); }

.doc { min-width: 0; }

.doc > section {
  margin: 0 0 34px;
  padding: clamp(18px, 3vw, 36px);
  background: #070707;
  border: 3px solid var(--line);
  border-bottom: 8px solid var(--lime);
  border-radius: 28px;
  scroll-margin-top: 108px;
}
.doc > section:nth-child(3n) { border-left: 8px solid var(--blue); }
.doc > section:hover { border-color: var(--lime); }

.doc section h2 {
  color: var(--lime);
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  margin-bottom: .6em;
}
.doc section h2 span,
.doc section h3 span { letter-spacing: -.02em; }
.doc section h3 {
  color: var(--paper);
  font-size: 1.2rem;
  margin-top: 1.6em;
}
.doc section p { margin: 0 0 1em; line-height: 1.85; }
.doc section ul,
.doc section ol { padding-left: 1.5em; margin: 0 0 1em; }
.doc section li { margin: .45em 0; }
.doc section a { color: var(--lime); text-underline-offset: 3px; }
.doc section strong { color: var(--lime); }
.doc section blockquote {
  margin: 0 0 1em;
  padding: 4px 0 4px 18px;
  border-left: 6px solid var(--blue);
  color: var(--dim);
}
.doc section figure { margin: 0 0 1em; }
.doc section img {
  border: 3px solid var(--line);
  border-radius: 20px;
}
.doc section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 0 0 1em;
}
.doc section th,
.doc section td {
  padding: 8px 10px;
  border: 2px solid var(--line);
  text-align: left;
}
.doc section hr {
  height: 0;
  margin: 1.6em 0;
  border: 0;
  border-top: 4px solid var(--blue);
}

.hit { outline: 5px solid var(--blue); outline-offset: 6px; }

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(14px, 3vw, 26px);
  background: var(--blue);
  border-top: 6px solid var(--lime);
  color: #ffffff;
}
.f-t { margin: 0; font-size: 16px; letter-spacing: .2em; }
.f-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.f-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 13px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
}
.f-nav a:hover { background: #ffffff; color: var(--blue); }
.f-copy p { margin: 0; font-size: 14px; letter-spacing: .06em; }

/* ---------- 动效 ---------- */
.stg {
  animation: rise .3s linear both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stg { animation: none; }
  .pills a:hover { transform: none; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  html { scroll-padding-top: 24px; }
  .bar {
    position: static;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 12px;
  }
  .brand { order: -1; justify-self: center; }
  .bar-l,
  .bar-r {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pills {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .pills a { font-size: 14px; padding: 6px 12px; }
  .find { display: flex; }
  .find input { flex: 1 1 auto; width: auto; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 18px;
  }
  .hero-art { min-height: 150px; }
  .hero-txt { text-align: left; }
  .lede { margin-left: 0; max-width: none; }
  .hero-cta { justify-content: flex-start; }

  .wrap { grid-template-columns: 1fr; padding-bottom: 44px; }
  .rail {
    position: static;
    border-left: 0;
    border-top: 4px solid var(--blue);
    padding: 12px 0 0;
  }
  .rail nav ul {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    margin-bottom: 12px;
  }
  .doc > section { border-radius: 22px; scroll-margin-top: 20px; }
  .foot { justify-content: flex-start; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-art { min-height: 128px; }
  .badge { font-size: 12px; padding: 5px 10px; }
}

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