:root {
  --mint: #99ffcc;
  --neon: #00ff41;
  --ink: #001e3c;
  --text: #e6fff6;
  --dim: #a8d8c8;
  --glass: rgba(153, 255, 204, 0.07);
  --line: rgba(153, 255, 204, 0.2);
  --r: 18px;
  --dock: 78px;
}

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

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

body {
  margin: 0;
  font-family: "Nunito", "DM Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  padding-bottom: calc(var(--dock) + 36px);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(46vw 46vw at 84% 6%, rgba(0, 255, 65, 0.16), transparent 66%),
    radial-gradient(58vw 58vw at 4% 82%, rgba(153, 255, 204, 0.14), transparent 68%),
    radial-gradient(32vw 32vw at 52% 46%, rgba(0, 255, 65, 0.07), transparent 72%),
    linear-gradient(160deg, #001e3c, #00132a 74%);
}

a { color: var(--neon); }
a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

/* ---------- hero ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 58px 22px 30px;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(16px, 4vw, 48px);
  align-items: center;
}

.hero-art {
  width: 100%;
  max-width: 260px;
  height: auto;
  filter: drop-shadow(0 14px 44px rgba(0, 255, 65, 0.34));
}

.hero-copy { text-align: right; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--neon);
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.32);
  border-radius: 999px;
  padding: 0.4em 0.95em;
  line-height: 1.6;
}

.hero h1 {
  margin: 0.36em 0 0.4em;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.012em;
  color: #fff;
}

.hero-sub {
  margin: 0 0 0 auto;
  max-width: 54ch;
  color: var(--dim);
  font-size: 1rem;
}

/* ---------- content shell ---------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px 36px;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 206px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 38px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.rail-k {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--neon);
  margin-bottom: 0.15em;
}

.rail-h {
  margin: 0 0 0.8em;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--mint);
}

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

.rail-list li { list-style: none; }

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 9px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.rail a:hover,
.rail a:focus-visible {
  background: rgba(0, 255, 65, 0.13);
  border-color: rgba(0, 255, 65, 0.36);
  color: #fff;
  transform: translateX(3px);
}

.to-top {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.86rem;
  color: var(--dim) !important;
}

.to-top:hover { color: #fff !important; }

.body { min-width: 0; }

.body > section {
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scroll-margin-block: 96px;
  overflow-wrap: break-word;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.35s ease;
}

.body > section:hover {
  border-color: rgba(0, 255, 65, 0.34);
  transform: translateY(-2px);
}

.body > section.hit {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.22);
}

.body > section:first-child { margin-top: 0; }

.body small {
  display: block;
  margin-bottom: 0.2em;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  color: var(--neon);
}

.body h2 {
  margin: 0 0 0.65em;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.3;
  font-weight: 900;
  color: #fff;
}

.body h3 {
  margin: 1.3em 0 0.5em;
  font-size: 1.14rem;
  color: var(--mint);
}

.body p { margin: 0 0 1em; color: #d6f4e7; }
.body p:last-child { margin-bottom: 0; }

.body ul,
.body ol { padding-inline-start: 1.25em; margin: 0 0 1em; }
.body li { margin-block: 0.35em; }

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

.body strong { color: #fff; }

.body img,
.body svg {
  max-width: 100%;
  height: auto;
}

.body img { border-radius: 14px; display: block; }

.body blockquote {
  margin: 1em 0;
  padding: 12px 16px;
  border-inline-start: 3px solid var(--neon);
  border-radius: 0 14px 14px 0;
  background: rgba(0, 255, 65, 0.07);
  color: #eafff5;
}

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

.body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
  font-size: 0.96rem;
}

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

.body th { background: rgba(0, 255, 65, 0.1); color: #fff; }

/* ---------- footer ---------- */
.foot {
  max-width: 1120px;
  margin: 10px auto 0;
  padding: 34px 22px calc(var(--dock) + 34px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 30px;
  align-items: start;
}

.foot address { font-style: normal; }

.foot-mark {
  display: block;
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: transparent;
  background: linear-gradient(100deg, var(--mint), var(--neon));
  -webkit-background-clip: text;
  background-clip: text;
}

.foot-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 0 18px;
}

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

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: #fff;
  transform: translateX(2px);
}

.foot-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: rgba(168, 216, 200, 0.72);
}

/* ---------- dock ---------- */
.dock {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));
  background: rgba(0, 20, 42, 0.78);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.dock details { position: relative; }

.dock summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.dock summary:hover {
  background: rgba(0, 255, 65, 0.16);
  border-color: rgba(0, 255, 65, 0.46);
  transform: translateY(-2px);
}

.dock details[open] > summary {
  background: rgba(0, 255, 65, 0.2);
  border-color: var(--neon);
  color: #fff;
}

.dock menu,
.search-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  margin: 0;
  padding: 8px;
  min-width: 168px;
  list-style: none;
  background: rgba(0, 26, 50, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}

.dock menu li { list-style: none; }

.dock menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.dock menu a:hover,
.dock menu a:focus-visible {
  background: rgba(0, 255, 65, 0.16);
  color: #fff;
}

.dock-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  color: #fff;
  font-weight: 900;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.dock-brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: block;
}

.dock-brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 0 4px rgba(0, 255, 65, 0.18);
  animation: breathe 4.5s ease-in-out infinite;
}

.search-panel {
  left: auto;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  min-width: 0;
}

.search-panel input {
  width: 152px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
}

.search-panel input.miss {
  border-color: #ff9db1;
  animation: shake 0.32s ease;
}

.search-panel button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 65, 0.5);
  background: rgba(0, 255, 65, 0.18);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-panel button:hover { background: rgba(0, 255, 65, 0.32); }

/* ---------- motion ---------- */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.12); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.cell {
  transform-origin: 110px 110px;
  animation: breathe 6.5s ease-in-out infinite;
}

.spore {
  transform-origin: 198px 50px;
  animation: drift 5.2s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.62s ease, transform 0.62s ease;
}

/* ---------- breakpoints ---------- */
@media (max-width: 780px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding-top: 34px;
    padding-bottom: 18px;
    gap: 14px;
  }

  .hero-art {
    max-width: 132px;
    margin-inline-start: auto;
  }

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

  .rail { position: static; }

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

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

  .dock { gap: 4px; padding-inline: 6px; }

  .dock summary { padding: 0 11px; font-size: 0.86rem; }

  .dock-brand { font-size: 0.88rem; padding: 0 6px; }
}

@media (max-width: 380px) {
  .search-panel input { width: 118px; }
  .dock-brand .txt { font-size: 0.82rem; }
}

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

  .cell,
  .spore,
  .dock-brand .dot {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }

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

  .body > section:hover { transform: none; }
}

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