@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');

:root {
  --ink: #001e3c;
  --deep: #00122a;
  --mint: #99ffcc;
  --lime: #00ff41;
  --line: rgba(153, 255, 204, 0.2);
  --glass: rgba(153, 255, 204, 0.055);
  --text: #ddf6ea;
  --dim: #9fc7ba;
  --sans: 'Cabin', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --craft: 'Amatic SC', 'Cabin', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
  background:
    radial-gradient(140% 80% at 12% 0%, rgba(0, 255, 65, 0.11), transparent 62%),
    radial-gradient(120% 70% at 95% 12%, rgba(153, 255, 204, 0.12), transparent 60%),
    linear-gradient(180deg, #001e3c 0%, #001730 55%, #00122a 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: -18% -12% auto -12%;
  height: 66vh;
  z-index: 0;
  pointer-events: none;
  filter: blur(46px);
  opacity: 0.75;
  background:
    radial-gradient(42% 52% at 22% 34%, rgba(0, 255, 65, 0.22), transparent 70%),
    radial-gradient(38% 46% at 74% 26%, rgba(153, 255, 204, 0.2), transparent 72%);
  animation: drift 26s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3%, 4%, 0) scale(1.14); }
}

img { max-width: 100%; }

a { color: var(--lime); text-underline-offset: 3px; }

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

/* ---------- 顶栏 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem clamp(0.8rem, 3vw, 2.2rem);
  background: rgba(0, 18, 42, 0.74);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--mint);
  font-family: var(--craft);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow 0.3s, border-color 0.3s;
}

.mark:hover, .mark:focus-visible {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.45), 0 0 20px rgba(0, 255, 65, 0.28);
}

.mark-glyph { display: block; transform: translateY(-1px); }

.mark-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pills { min-width: 0; }

.pill-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.25rem 0.15rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.pill-list::-webkit-scrollbar { display: none; }

.pill-list li {
  flex: 0 0 auto;
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 60ms + 80ms);
}

.pill-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: #d5f4e6;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.28s, border-color 0.28s, color 0.28s, box-shadow 0.28s;
}

.pill-list a:hover, .pill-list a:focus-visible {
  background: rgba(0, 255, 65, 0.16);
  border-color: rgba(0, 255, 65, 0.8);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.24);
}

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

.seek {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.seek-in {
  width: clamp(84px, 15vw, 156px);
  height: 42px;
  padding: 0 0.7rem;
  font: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: rgba(153, 255, 204, 0.07);
  border: 1px solid var(--line);
  border-radius: 0;
}

.seek-in::placeholder { color: rgba(159, 199, 186, 0.9); }

.seek-go {
  height: 42px;
  min-width: 42px;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--deep);
  background: linear-gradient(120deg, var(--mint), var(--lime));
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

/* ---------- 骨架 ---------- */

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  align-items: start;
  gap: clamp(1.2rem, 4vw, 3.4rem);
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.2rem clamp(1rem, 3vw, 2.5rem) 3rem;
}

.prose { min-width: 0; }

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(118px, 22vw, 214px);
  align-items: center;
  gap: 1.4rem;
  min-height: 45vh;
  padding: 1.6rem 0 2.2rem;
  border-bottom: 1px dashed var(--line);
  scroll-margin-top: 110px;
}

.hero.solo { grid-template-columns: minmax(0, 1fr); }

.hero-copy { position: relative; z-index: 2; }

.hero-chip {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.32rem 0.85rem;
  font-size: 0.88rem;
  letter-spacing: 0.07em;
  color: var(--deep);
  background: linear-gradient(100deg, var(--mint), var(--lime));
  border-radius: 0;
  box-shadow: 0 0 22px rgba(0, 255, 65, 0.32);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero h1 {
  margin: 0.1rem 0 0.9rem;
  font-family: var(--craft);
  font-size: clamp(2.5rem, 7.4vw, 4.3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0.005em;
  color: #eafff5;
  text-shadow: 0 0 36px rgba(0, 255, 65, 0.26);
}

.hero-lead {
  max-width: 44ch;
  margin: 0;
  font-size: 1.02rem;
  color: var(--dim);
}

.hero-art {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--glass);
  backdrop-filter: blur(14px);
  transform: rotate(-1.4deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  will-change: transform;
}

.cell {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(1px);
  opacity: 0.6;
}

.cell-a {
  width: 140px;
  height: 122px;
  right: 6%;
  top: -4%;
  background: radial-gradient(circle at 34% 32%, rgba(0, 255, 65, 0.5), rgba(153, 255, 204, 0.05));
  animation: morph 11s ease-in-out infinite;
}

.cell-b {
  width: 92px;
  height: 84px;
  left: -3%;
  bottom: 2%;
  background: radial-gradient(circle at 60% 40%, rgba(153, 255, 204, 0.42), rgba(0, 255, 65, 0.04));
  animation: morph 9s ease-in-out infinite reverse;
}

@keyframes morph {
  0%, 100% {
    border-radius: 62% 38% 46% 54% / 52% 58% 42% 48%;
    transform: scale(1) rotate(0deg);
  }
  50% {
    border-radius: 44% 56% 62% 38% / 46% 42% 58% 54%;
    transform: scale(1.1) rotate(6deg);
  }
}

/* ---------- 正文区块 ---------- */

.prose > div {
  position: relative;
  counter-increment: sec;
  padding: 2rem 2rem 2rem 0;
  border-top: 1px dashed var(--line);
  scroll-margin-top: 110px;
}

.prose > div.hero { counter-increment: none; border-top: 0; }

.prose { counter-reset: sec; }

.prose > div::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 2.2rem;
  right: 0.15rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  color: rgba(153, 255, 204, 0.42);
}

.prose > div.hero::before { content: none; }

.prose h2 {
  margin: 0 0 0.55rem;
  font-family: var(--craft);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--mint);
  text-shadow: 0 0 26px rgba(153, 255, 204, 0.18);
}

.prose h3 {
  margin: 1.7rem 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.45;
  color: #c8ffe6;
}

.subtitle {
  margin: 0.15rem 0 1.1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.prose p { margin: 0.95rem 0; color: #d9f3e7; }

.prose div > p:first-of-type { margin-top: 0.62rem; }

.prose strong { color: #eafff5; }

.prose ul, .prose ol { margin: 1rem 0; padding-left: 1.35rem; }

.prose li { margin: 0.5rem 0; }

.prose li::marker { color: var(--lime); }

.prose blockquote {
  margin: 1.3rem 0;
  padding: 0.9rem 1.15rem;
  border-left: 3px solid var(--lime);
  background: rgba(0, 255, 65, 0.07);
  color: #d9f3e7;
}

.prose blockquote p { margin: 0.4rem 0; }

.prose table {
  display: block;
  width: 100%;
  margin: 1.2rem 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th, .prose td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th { background: rgba(153, 255, 204, 0.08); color: var(--mint); }

.prose img {
  display: block;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0;
}

.prose hr { margin: 1.8rem 0; border: 0; border-top: 1px dashed var(--line); }

/* 渐进入场 */

.will-in { opacity: 0; transform: translateY(18px); }

.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.rail {
  position: sticky;
  top: 96px;
  padding: 1.15rem 1.05rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}

.rail-h {
  margin: 0;
  font-family: var(--craft);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--mint);
}

.rail .subtitle { margin: 0.1rem 0 0.9rem; }

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0.6rem;
  border-left: 2px solid rgba(153, 255, 204, 0.16);
  color: #cdeee0;
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.rail-list a:hover, .rail-list a:focus-visible, .rail-list a.on {
  border-left-color: var(--lime);
  background: rgba(0, 255, 65, 0.1);
  color: #ffffff;
}

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

.base {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.95rem;
}

.base p, .base small { margin: 0; }

.base-copy { grid-column: 1; }

.base-fine {
  grid-column: 3;
  justify-self: end;
  font-size: 0.92rem;
}

.base-fine a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0.15rem;
  color: var(--mint);
  text-decoration: none;
}

.base-fine a:hover, .base-fine a:focus-visible { color: var(--lime); }

/* ---------- 断点 ---------- */

@media (max-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; }
  .rail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 0.6rem; }
}

@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .masthead {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "mark seek" "pills pills";
    row-gap: 0.5rem;
  }
  .mark { grid-area: mark; }
  .seek { grid-area: seek; justify-self: end; }
  .pills { grid-area: pills; }
  .seek-in { width: 96px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 1.2rem;
  }
  .hero-art {
    order: 2;
    max-width: 210px;
    transform: rotate(-1deg);
  }
  .prose > div { padding: 1.7rem 1.5rem 1.7rem 0; }
  .cell-a { width: 96px; height: 86px; }
  .cell-b { display: none; }
  .base { grid-template-columns: 1fr; }
  .base-copy { grid-column: 1; }
  .base-fine { grid-column: 1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .will-in { opacity: 1; transform: none; }
}

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