/* Inter 由 head.js 以 link 引入 */

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

html {
  scroll-behavior: smooth;
  background: #0E0E10;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', 'Helvetica Neue', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.66;
  color: #F2F2F0;
  background-color: #0E0E10;
  background-image: radial-gradient(rgba(242, 242, 240, .085) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: #D7FF3E; }
p { margin: 0 0 16px; }
:focus-visible { outline: 2px solid #D7FF3E; outline-offset: 3px; }

/* ---------- 顶部导航：品牌行 + 菜单行 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(14, 14, 16, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(242, 242, 240, .16);
  padding: 8px clamp(14px, 4vw, 48px) 0;
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #F2F2F0;
  text-decoration: none;
  white-space: nowrap;
}

.spark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #D7FF3E;
  box-shadow: 0 0 0 4px rgba(215, 255, 62, .18);
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #D7FF3E;
  color: #0E0E10;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease;
}

.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(215, 255, 62, .28); }

.topbar nav ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.topbar nav ul::-webkit-scrollbar { display: none; }

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: rgba(242, 242, 240, .68);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}

.topbar nav a:hover,
.topbar nav a:focus-visible {
  color: #0E0E10;
  background: #D7FF3E;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 30px clamp(16px, 4vw, 48px);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(.72);
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(215, 255, 62, .2) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .85;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(102deg, rgba(14, 14, 16, .97) 12%, rgba(14, 14, 16, .55) 64%, rgba(14, 14, 16, .93) 100%);
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16vh;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(14, 14, 16, 0), #0E0E10);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1020px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  text-align: right;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(44px, 8.6vw, 132px);
  line-height: .94;
  font-weight: 800;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  color: #F2F2F0;
  background-image: linear-gradient(96deg, #F2F2F0 10%, #D7FF3E 44%, #F2F2F0 84%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sweep 9s linear infinite;
}

@keyframes sweep {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

.hero-desc {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.55vw, 19px);
  color: rgba(242, 242, 240, .76);
}

/* ---------- 主体：内容 + 右侧栏 ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 76px) clamp(16px, 4vw, 48px) 0;
}

.body-col { min-width: 0; }

.body-col > div {
  padding: clamp(28px, 4vw, 52px) 0;
  border-top: 1px solid rgba(242, 242, 240, .16);
  scroll-margin-top: 132px;
}

.body-col > div:first-child { border-top: 0; padding-top: 0; }

.body-col h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.02em;
}

.body-col h2 + hr {
  border: 0;
  width: 54px;
  height: 3px;
  margin: 0 0 22px;
  background: #D7FF3E;
}

.body-col h3 {
  margin: 26px 0 10px;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  color: #D7FF3E;
}

.body-col h3 + hr {
  border: 0;
  height: 1px;
  margin: 0 0 16px;
  background: rgba(242, 242, 240, .18);
}

.body-col p { max-width: 68ch; color: rgba(242, 242, 240, .88); }
.body-col strong { color: #F2F2F0; font-weight: 700; }
.body-col a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.body-col ul,
.body-col ol { margin: 0 0 18px; padding-left: 1.25em; }
.body-col li { margin: 0 0 8px; }
.body-col li::marker { color: #D7FF3E; }

.body-col blockquote {
  margin: 0 0 20px;
  padding: 12px 0 12px 18px;
  border-left: 3px solid #D7FF3E;
  font-size: 18px;
  color: rgba(242, 242, 240, .84);
}

.body-col table {
  width: 100%;
  margin: 0 0 20px;
  border-collapse: collapse;
  font-size: 16px;
}

.body-col th,
.body-col td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(242, 242, 240, .16);
}

.body-col th { color: #D7FF3E; font-weight: 700; }
.body-col code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(215, 255, 62, .14);
  font-size: 15px;
}
.body-col figure { margin: 0 0 20px; }

/* 拆字 */
.split .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.42em);
  transition: opacity .5s ease, transform .55s cubic-bezier(.2, .7, .3, 1);
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in { opacity: 1; transform: none; }
.in .ch { opacity: 1; transform: none; }

/* ---------- 右侧栏 ---------- */
.sidenav {
  position: sticky;
  top: 132px;
  padding-top: 4px;
}

.sidenav h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .24em;
  color: #D7FF3E;
}

.sidenav hr {
  border: 0;
  border-top: 1px solid rgba(242, 242, 240, .18);
  margin: 0 0 12px;
}

.sidenav nav ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidenav nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-left: 2px solid transparent;
  font-size: 16px;
  color: rgba(242, 242, 240, .62);
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease;
}

.sidenav nav a:hover,
.sidenav nav a.on {
  color: #F2F2F0;
  border-left-color: #D7FF3E;
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid rgba(215, 255, 62, .42);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- 页脚 ---------- */
footer {
  max-width: 1180px;
  margin: clamp(48px, 7vw, 96px) auto 0;
  padding: clamp(26px, 4vw, 46px) clamp(16px, 4vw, 48px) 34px;
  border-top: 1px solid rgba(242, 242, 240, .18);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 28px;
  align-items: start;
}

footer p { margin: 0; }

.fbrand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.flinks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  justify-content: flex-end;
}

.flinks a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(242, 242, 240, .2);
  border-radius: 999px;
  font-size: 16px;
  color: #F2F2F0;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease;
}

.flinks a:hover { border-color: #D7FF3E; color: #D7FF3E; }

.fnote {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 242, 240, .12);
  text-align: center;
  font-size: 15px;
  color: rgba(242, 242, 240, .44);
}

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .sidenav { position: static; margin-top: 8px; }
  .sidenav nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .body-col > div { scroll-margin-top: 122px; }
}

@media (max-width: 680px) {
  body { font-size: 17px; }
  .hero { min-height: 86svh; }
  .hero-copy { align-items: flex-start; text-align: left; }
  .hero-copy h1 { font-size: clamp(38px, 11.5vw, 60px); }
  footer { grid-template-columns: minmax(0, 1fr); }
  .flinks { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .brand { font-size: 20px; }
  .cta { padding: 0 14px; }
  .sidenav nav ul { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy h1 { animation: none; background-position: 0 0; }
  .reveal,
  .split .ch { opacity: 1; transform: none; transition: none; }
  .cta:hover { transform: none; }
}

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