@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

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

:root {
  --ink: #001e3c;
  --mint: #99ffcc;
  --glow: #00ff41;
  --paper: #e9fff6;
  --dim: rgba(233, 255, 246, .7);
  --line: rgba(153, 255, 204, .22);
  --max: 1080px;
  --font: 'Figtree', 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.72;
  color: var(--paper);
  background:
    radial-gradient(1200px 700px at 78% -14%, rgba(0, 255, 65, .15), transparent 62%),
    radial-gradient(900px 640px at 4% 16%, rgba(153, 255, 204, .12), transparent 60%),
    var(--ink);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  right: -14%;
  bottom: -22%;
  width: 58vmax;
  height: 58vmax;
  border-radius: 56% 44% 62% 38% / 48% 58% 42% 52%;
  background: radial-gradient(circle at 42% 42%, rgba(0, 255, 65, .26), rgba(0, 255, 65, 0) 68%);
  filter: blur(34px);
  opacity: .6;
  pointer-events: none;
  z-index: 0;
  animation: breath 17s ease-in-out infinite;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
}

/* ---------- 顶部两行：品牌行 + 胶囊菜单 ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 30, 60, .84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

header.top,
main,
footer { position: relative; z-index: 1; }

.brand-row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px 4px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--mint);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.brand-mark {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 65, .5);
}

.dock {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 12px;
}

.dock summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mint);
  font-size: .82rem;
  letter-spacing: .18em;
  line-height: 1;
}

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

.dock summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 0 4px rgba(0, 255, 65, .16);
  animation: breath 3.6s ease-in-out infinite;
}

.dock[open] summary { background: rgba(153, 255, 204, .12); }

.dock menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px 0 0;
  list-style: none;
}

.dock menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid rgba(153, 255, 204, .3);
  color: var(--paper);
  text-decoration: none;
  font-size: .93rem;
  line-height: 1;
  transition: background .24s ease, color .24s ease, border-color .24s ease;
}

.dock menu a:hover,
.dock menu a:focus-visible {
  background: var(--glow);
  border-color: var(--glow);
  color: var(--ink);
}

/* ---------- 主视觉 ---------- */
.crown {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(26px, 6vw, 54px) 20px clamp(30px, 6vw, 58px);
  overflow: hidden;
  scroll-margin-top: 160px;
}

.ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  font-size: clamp(4.2rem, 21vw, 11.5rem);
  font-weight: 700;
  letter-spacing: -.05em;
  white-space: nowrap;
  color: rgba(153, 255, 204, .09);
  pointer-events: none;
  filter: blur(.5px);
}

.cell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(76vw, 430px);
  height: min(76vw, 430px);
  margin: 0;
  z-index: 1;
  opacity: .5;
  pointer-events: none;
  animation: cellbreath 12s ease-in-out infinite;
}

.cell svg { width: 100%; height: 100%; overflow: visible; }

.cell .vein {
  fill: none;
  stroke: var(--glow);
  stroke-width: 1.4;
  stroke-dasharray: 7 15;
  filter: drop-shadow(0 0 6px rgba(0, 255, 65, .65));
  animation: flow 15s linear infinite;
}

.cell .v2 {
  stroke: var(--mint);
  stroke-width: 1;
  animation-duration: 21s;
  animation-direction: reverse;
}

.cell .nucleus {
  fill: rgba(0, 255, 65, .12);
  stroke: rgba(153, 255, 204, .5);
  stroke-width: 1;
  transform-origin: 180px 180px;
  animation: pulse 8s ease-in-out infinite;
}

.crown h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 17ch;
  font-size: clamp(2.05rem, 7.4vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 48px rgba(0, 255, 65, .34);
}

.lede {
  position: relative;
  z-index: 2;
  margin: 16px 0 0;
  max-width: 46ch;
  color: var(--dim);
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- 左索引 + 右正文 ---------- */
.stream {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 48px) 20px clamp(48px, 8vw, 88px);
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(20px, 3.6vw, 46px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 138px;
  border-top: 2px solid var(--glow);
  padding-top: 14px;
}

.rail small {
  display: block;
  margin-bottom: 6px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--glow);
}

.rail-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--mint);
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  color: var(--dim);
  text-decoration: none;
  font-size: .92rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(153, 255, 204, .12);
  transition: color .2s ease, border-color .2s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: var(--glow);
  border-color: var(--glow);
}

/* ---------- 正文排版 ---------- */
.prose { min-width: 0; }

.prose > div {
  padding: 0 0 clamp(24px, 4vw, 36px);
  margin: 0 0 clamp(24px, 4vw, 36px);
  border-bottom: 2px solid rgba(0, 255, 65, .18);
  scroll-margin-top: 160px;
}

.prose > div:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.prose small {
  display: block;
  margin-bottom: 8px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--glow);
}

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(1.48rem, 3.6vw, 2rem);
  line-height: 1.28;
  letter-spacing: -.01em;
  font-weight: 600;
  color: #fff;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: 1.2rem;
  line-height: 1.38;
  font-weight: 600;
  color: var(--mint);
}

.prose p {
  margin: 0 0 1em;
  max-width: 68ch;
}

.prose a {
  color: var(--glow);
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 255, 65, .5);
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
  max-width: 68ch;
}

.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--glow); }
.prose strong { color: #fff; }

.prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
}

.prose figure { margin: 18px 0; }

.prose blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--glow);
  background: rgba(153, 255, 204, .07);
  color: var(--dim);
}

.prose time {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--mint);
}

.prose table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: .95rem;
}

.prose th,
.prose td {
  padding: 9px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: clamp(34px, 7vw, 62px) 20px 28px;
  text-align: center;
  overflow: hidden;
}

footer .wordmark {
  margin: 0;
  font-size: clamp(2.35rem, 11.4vw, 5.4rem);
  line-height: .92;
  font-weight: 700;
  letter-spacing: -.045em;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(153, 255, 204, .6);
}

footer small {
  display: block;
  margin-top: 14px;
  font-size: .85rem;
  color: var(--dim);
}

footer small a {
  display: inline-block;
  padding: 12px 10px;
  color: var(--mint);
  text-decoration: none;
}

footer small a:hover,
footer small a:focus-visible { color: var(--glow); }

/* ---------- 滚动显现 ---------- */
html.js .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}

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

html.js .rv .rail-list li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}

html.js .rv.in .rail-list li { opacity: 1; transform: none; }
html.js .rv.in .rail-list li:nth-child(1) { transition-delay: .04s; }
html.js .rv.in .rail-list li:nth-child(2) { transition-delay: .08s; }
html.js .rv.in .rail-list li:nth-child(3) { transition-delay: .12s; }
html.js .rv.in .rail-list li:nth-child(4) { transition-delay: .16s; }
html.js .rv.in .rail-list li:nth-child(5) { transition-delay: .2s; }
html.js .rv.in .rail-list li:nth-child(6) { transition-delay: .24s; }
html.js .rv.in .rail-list li:nth-child(7) { transition-delay: .28s; }

/* ---------- 动效关键帧 ---------- */
@keyframes breath {
  0%, 100% { transform: scale(1); opacity: .45; }
  50% { transform: scale(1.07); opacity: .8; }
}

@keyframes cellbreath {
  0%, 100% { transform: translate(-50%, -50%) scale(.95); opacity: .4; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: .72; }
}

@keyframes pulse {
  0%, 100% { transform: scale(.86); opacity: .5; }
  50% { transform: scale(1.12); opacity: .95; }
}

@keyframes flow {
  to { stroke-dashoffset: -230; }
}

/* ---------- 断点 ---------- */
@media (max-width: 760px) {
  .stream {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .rail {
    position: static;
    top: auto;
  }

  .rail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  .crown {
    min-height: 0;
    padding-top: 32px;
  }

  .brand-row { padding-top: 12px; }
}

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .dock menu a { padding: 0 14px; font-size: .9rem; }
}

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

  body::before,
  .cell,
  .cell .vein,
  .cell .nucleus,
  .dock summary::before { animation: none; }

  html.js .rv,
  html.js .rv .rail-list li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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