:root {
  --ink: #172617;
  --ink-deep: #0a150b;
  --ink-soft: #1c3220;
  --lime: #69ff69;
  --cyan: #00ffff;
  --text: #c8e3cd;
  --head: #ecffee;
  --dim: #93b49c;
  --line: rgba(105, 255, 105, 0.16);
  --chrome: linear-gradient(165deg, #ffffff, #b6e8c2 34%, #f2fff6 52%, #7fdc9d 74%, #ffffff);
  --bubble: linear-gradient(140deg, #69ff69, #00ffff);
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 84% -8%, rgba(0, 255, 255, 0.12), transparent 62%),
    radial-gradient(860px 540px at -4% 6%, rgba(105, 255, 105, 0.1), transparent 64%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: var(--head);
  letter-spacing: -0.02em;
}

a {
  color: var(--lime);
}

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 底部胶囊导航 ---------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 20px);
  padding: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  background: rgba(11, 23, 12, 0.88);
  border: 1px solid rgba(0, 255, 255, 0.3);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    0 18px 44px -20px rgba(0, 255, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dock::-webkit-scrollbar {
  display: none;
}

.dock ol {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock li {
  order: 1;
  flex: 0 0 auto;
  list-style: none;
}

.dock li:nth-child(4) {
  order: 2;
}

.dock li:nth-child(n + 5) {
  order: 3;
}

.dock .cta {
  order: 4;
}

.dock li > a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  color: #d3ecd8;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.dock li > a:hover,
.dock li > a:focus-visible {
  background: rgba(105, 255, 105, 0.18);
  color: #f2fff4;
}

.dock .brand > a {
  min-height: 42px;
  padding: 0 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0b160c;
  background: var(--chrome);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 8px 22px -12px rgba(0, 255, 255, 0.9);
}

.dock .brand > a:hover {
  color: #0b160c;
  background: var(--chrome);
}

.dock .cta {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: #0b160c;
  text-decoration: none;
  white-space: nowrap;
  background: var(--bubble);
  box-shadow: 0 0 22px rgba(0, 255, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: filter 0.2s ease;
}

.dock .cta:hover {
  filter: brightness(1.08);
}

/* ---------- 主体骨架 ---------- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
}

.doc {
  min-width: 0;
}

article[id] {
  scroll-margin-top: 30px;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 64vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 86px 28px 46px;
  border-radius: 0 0 34px 34px;
  background:
    radial-gradient(112% 82% at 12% 2%, rgba(0, 255, 255, 0.26), transparent 62%),
    radial-gradient(92% 92% at 96% 20%, rgba(105, 255, 105, 0.3), transparent 60%),
    linear-gradient(168deg, #0a150b 0%, #172617 54%, #0a140b 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background-image: radial-gradient(rgba(105, 255, 105, 0.38) 1px, transparent 1.5px);
  background-size: 20px 20px;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, #000 32%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 32%, transparent 92%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -70px;
  width: 250px;
  height: 250px;
  z-index: -1;
  border-radius: 50%;
  opacity: 0.72;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), rgba(0, 255, 255, 0.55) 40%, rgba(105, 255, 105, 0.2) 68%, transparent 72%);
  filter: drop-shadow(0 0 26px rgba(0, 255, 255, 0.55));
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.18) contrast(1.04);
}

.hero-copy {
  position: relative;
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(34px, 6.6vw, 74px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #f2fff3;
  text-shadow:
    0 0 22px rgba(0, 255, 255, 0.55),
    0 0 66px rgba(105, 255, 105, 0.38);
}

/* ---------- 正文 ---------- */

.doc > article {
  padding: 46px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: break-word;
}

.doc > article:first-of-type {
  border-top: 0;
}

.doc h2 {
  margin: 0 0 14px;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.3;
  color: #e3ffe7;
}

.doc h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 12px;
  border-radius: 50%;
  vertical-align: 0.12em;
  background: var(--bubble);
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.9);
}

.doc h3 {
  margin: 30px 0 10px;
  font-size: 20px;
  line-height: 1.4;
  color: #d8f2dd;
}

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

.doc .subtitle {
  margin: 0 0 6px;
  max-width: 62ch;
  font-size: 18px;
  line-height: 1.68;
  color: #a9cbaf;
}

.doc ul,
.doc ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

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

.doc li::marker {
  color: var(--cyan);
}

.doc a {
  color: #9dff9d;
  text-decoration: underline;
  text-decoration-color: rgba(105, 255, 105, 0.45);
  text-underline-offset: 3px;
}

.doc a:hover {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}

.doc strong {
  color: #effff1;
}

.doc blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 16px 16px 0;
  background: rgba(0, 255, 255, 0.07);
  color: #d5eede;
}

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

.doc pre {
  margin: 0 0 18px;
  padding: 16px;
  overflow-x: auto;
  border-radius: 16px;
  background: #0d1b0e;
  font-size: 16px;
  line-height: 1.6;
}

.doc code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

.doc img {
  margin: 22px 0;
  border-radius: 18px;
}

.doc hr {
  height: 0;
  margin: 34px 0;
  border: 0;
  border-top: 1px dashed rgba(0, 255, 255, 0.3);
}

/* ---------- 侧栏 ---------- */

.rail {
  position: sticky;
  top: 26px;
  align-self: start;
}

.rail-box {
  padding: 18px 14px 20px;
  border-radius: 18px;
  background: var(--ink-soft);
  box-shadow: 0 26px 50px -34px rgba(0, 255, 255, 0.9);
}

.rail-h {
  margin: 0 0 10px;
  padding: 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #9be0ab;
}

.rail-nav ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sec;
}

.rail-nav li {
  counter-increment: sec;
  list-style: none;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.4;
  color: #cbe6d1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.rail-nav a::before {
  content: counter(sec, decimal-leading-zero);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cyan);
  opacity: 0.8;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: rgba(105, 255, 105, 0.16);
  color: #f3fff5;
}

/* ---------- 页脚 ---------- */

.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 150px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 26px;
  border-top: 1px solid rgba(0, 255, 255, 0.18);
}

.foot-mark {
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f0fff2;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 26px rgba(0, 255, 255, 0.55);
}

.foot-mark:hover {
  color: var(--lime);
}

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

.foot-nav li {
  list-style: none;
}

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 16px;
  color: #b3d3ba;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  background: rgba(105, 255, 105, 0.16);
  color: #f0fff2;
}

.foot-copy {
  margin: 0;
  font-size: 16px;
  color: #8aab92;
}

/* ---------- 入场 ---------- */

.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s ease, transform 0.62s cubic-bezier(0.2, 0.75, 0.3, 1);
}

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

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-bottom: 30px;
  }

  .rail {
    position: static;
    margin-top: 8px;
  }

  .foot {
    padding-bottom: 160px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .shell {
    padding: 0 16px 26px;
  }

  .hero {
    min-height: 56vh;
    padding: 92px 20px 38px;
    border-radius: 0 0 26px 26px;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .doc > article {
    padding: 34px 0;
  }

  .doc .subtitle {
    font-size: 17px;
  }

  .foot {
    padding: 24px 16px 164px;
    gap: 10px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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