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

:root {
  --ink: #0B0E14;
  --mint: #38F2B0;
  --paper: #F5F7FA;
  --dim: #97A2B4;
  --line: #222B38;
  --card: #11161F;
  --deep: #070A0F;
  --r: 4px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(#1C2534 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .85;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--mint); text-decoration: none; }

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

h1, h2, h3 {
  font-family: "Space Grotesk", Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0;
}

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

.shell { position: relative; z-index: 1; }

/* 顶部栏 */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 16px;
  background: rgba(11, 14, 20, .94);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--mint);
  flex: 0 0 auto;
  transition: border-color .18s ease, background .18s ease;
}

.mark:hover { border-color: var(--mint); background: #10161F; }

.pop { position: relative; margin-left: auto; }

.pop > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.pop > summary::-webkit-details-marker { display: none; }

.pop > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

.pop[open] > summary {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink);
}

.pop[open] > summary::after { transform: translateY(2px) rotate(-135deg); }

.pop-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 232px;
  max-width: calc(100vw - 24px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.pop-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--paper);
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: border-color .15s ease, background .15s ease;
}

.pop-list a:hover { border-left-color: var(--mint); background: #161D28; }

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--r);
  flex: 0 0 auto;
  transition: opacity .18s ease;
}

.cta:hover { opacity: .82; }

/* 首屏 */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px 20px 96px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: .55;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 14, 20, .68);
}

.hero-in {
  position: relative;
  z-index: 2;
  max-width: 880px;
  animation: rise .5s ease both;
}

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

.hero h1 {
  font-size: clamp(2.1rem, 6.6vw, 4.4rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.lede {
  margin: 20px auto 0;
  max-width: 44ch;
  color: var(--dim);
  font-size: 17px;
}

/* 主区域 */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 274px;
  gap: 56px;
  align-items: start;
}

.col { min-width: 0; }

.body { max-width: 74ch; }

.body > div {
  scroll-margin-top: 92px;
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.body > div:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 8px; }

.body h2 {
  font-size: clamp(1.42rem, 3vw, 1.95rem);
  margin: 0 0 18px;
  font-weight: 700;
}

.body h2 > span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 12px;
  background: var(--mint);
  transform: translateY(-2px);
}

.body h3 {
  font-size: 1.16rem;
  margin: 30px 0 10px;
  color: var(--mint);
}

.body h3 > span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border: 1px solid var(--mint);
  transform: translateY(-2px);
}

.body p { margin: 0 0 18px; }

.body ul, .body ol { margin: 0 0 20px; padding-left: 22px; }

.body li { margin-bottom: 8px; }

.body strong { color: var(--mint); font-weight: 600; }

.body blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--mint);
  background: var(--card);
  color: var(--dim);
}

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

.body img { border-radius: var(--r); margin: 22px 0; border: 1px solid var(--line); }

.body a { text-decoration: underline; text-underline-offset: 3px; }

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

.body th, .body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }

.body th { background: var(--card); color: var(--mint); }

.body code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .92em;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 2px;
}

/* 目录侧栏 */
.side {
  position: sticky;
  top: 92px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 16px 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .34);
}

.side-t {
  font-size: .82rem;
  letter-spacing: .18em;
  color: var(--dim);
  font-weight: 600;
  margin: 0 0 10px;
  padding-left: 8px;
}

.side-t > span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--mint);
  margin-right: 8px;
  transform: translateY(-2px);
}

.side-list { margin: 0; padding: 0; list-style: none; }

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px;
  color: var(--paper);
  font-size: 16px;
  border-left: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}

.side-list a:hover { border-left-color: var(--mint); color: var(--mint); }

/* 页脚 */
footer {
  margin-top: 40px;
  padding: 56px 20px 26px;
  background: var(--deep);
  border-top: 1px solid var(--line);
}

.foot-mark { max-width: 1180px; margin: 0 auto; }

.foot-mark h2 {
  font-size: clamp(2.4rem, 14vw, 8.2rem);
  line-height: .92;
  letter-spacing: -.045em;
  color: var(--mint);
  overflow-wrap: anywhere;
}

.foot-base {
  max-width: 1180px;
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copy { margin: 0; color: var(--dim); font-size: 16px; }

.foot-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 9px;
  color: var(--dim);
  font-size: 16px;
  transition: color .15s ease;
}

.foot-links a:hover { color: var(--mint); }

/* 入场 */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 56px;
  }
  .side { position: static; order: 2; }
  .body { max-width: none; }
  .foot-mark h2 { font-size: clamp(2.2rem, 17vw, 6rem); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .bar { padding: 0 12px; gap: 8px; }
  .hero { padding: 104px 16px 72px; min-height: 100svh; }
  .lede { font-size: 16px; }
  .wrap { padding: 48px 16px 24px; }
  footer { padding: 44px 16px 20px; }
  .foot-base { flex-direction: column; align-items: flex-start; }
  .body table { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-in { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

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