:root {
  --neon: #87ff71;
  --cyan: #01cdfe;
  --ink: #192617;
  --pink: #ff71ce;
  --purple: #b967ff;
  --deep: #0b140d;
  --deep2: #101d12;
  --panel: #16241a;
  --line: rgba(135, 255, 113, 0.26);
  --cyanline: rgba(1, 205, 254, 0.3);
  --txt: #ddf2df;
  --dim: #a2c0a8;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(255, 113, 206, 0.16), transparent 70%),
    radial-gradient(760px 380px at 6% 2%, rgba(1, 205, 254, 0.14), transparent 70%),
    var(--deep);
  color: var(--txt);
  font-family: "Atkinson Hyperlegible", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.34;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.24) 0 1px, transparent 1px 3px);
}

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px clamp(12px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(11, 20, 13, 0.97), rgba(11, 20, 13, 0.88));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(1, 205, 254, 0.22);
  backdrop-filter: blur(6px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--neon);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 14px rgba(135, 255, 113, 0.5);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--ink);
}

.brand-name {
  font-size: 17px;
  white-space: nowrap;
}

.finder {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  border: 1px solid var(--cyanline);
  background: rgba(1, 205, 254, 0.07);
}

.finder input {
  width: clamp(104px, 16vw, 186px);
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--txt);
  font: inherit;
  font-size: 16px;
}

.finder input::placeholder {
  color: var(--dim);
}

.finder button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--cyanline);
  background: rgba(1, 205, 254, 0.16);
  color: #eafeff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.finder button:hover {
  background: var(--cyan);
  color: var(--ink);
}

.site-menu {
  order: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(135, 255, 113, 0.08);
  color: var(--neon);
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.site-menu > summary::marker {
  content: "";
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(22, 36, 26, 0.72);
  color: var(--txt);
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.pill:hover,
.pill:focus-visible {
  color: var(--ink);
  background: var(--neon);
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(135, 255, 113, 0.55);
  transform: translateY(-2px);
}

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 70vh;
  padding: clamp(26px, 5vw, 58px) clamp(16px, 4vw, 48px) clamp(46px, 7vw, 76px);
  overflow: hidden;
  background: linear-gradient(
    158deg,
    rgba(185, 103, 255, 0.24),
    rgba(255, 113, 206, 0.17) 36%,
    rgba(1, 205, 254, 0.19) 68%,
    rgba(11, 20, 13, 0) 100%
  );
  animation: hueDrift 20s linear infinite;
}

@keyframes hueDrift {
  to {
    filter: hue-rotate(40deg);
  }
}

.hero::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 46%;
  opacity: 0.55;
  transform: perspective(320px) rotateX(62deg);
  transform-origin: bottom;
  background:
    repeating-linear-gradient(90deg, rgba(1, 205, 254, 0.4) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(0deg, rgba(1, 205, 254, 0.34) 0 1px, transparent 1px 40px);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 66px;
  background: var(--deep);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 3vw, 34px);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-art {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 18px rgba(135, 255, 113, 0.45));
}

.hero-art-img {
  width: clamp(112px, 17vw, 210px);
  border: 1px solid var(--line);
}

.hero-art-svg {
  width: clamp(104px, 15vw, 168px);
  height: auto;
}

.hero-text {
  max-width: 800px;
  text-align: right;
}

.hero-h1 {
  margin: 0;
  font-size: clamp(27px, 5.1vw, 53px);
  line-height: 1.16;
  letter-spacing: 0.01em;
  color: #f3fff1;
  text-shadow:
    0 0 18px rgba(135, 255, 113, 0.55),
    0 0 44px rgba(1, 205, 254, 0.35),
    3px 0 0 rgba(255, 113, 206, 0.55),
    -3px 0 0 rgba(1, 205, 254, 0.55);
  animation: glitchShift 7s steps(1, end) infinite;
}

@keyframes glitchShift {
  0%, 91%, 100% {
    transform: none;
  }
  93% {
    transform: translate(-2px, 1px);
  }
  95% {
    transform: translate(2px, -1px);
  }
  97% {
    transform: translate(-1px, -1px);
  }
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--neon), var(--cyan) 38%, var(--pink) 72%, var(--purple));
}

/* ---------- 主体 ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  align-items: start;
  gap: clamp(24px, 4vw, 44px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 46px) clamp(14px, 4vw, 32px) clamp(46px, 7vw, 82px);
}

.prose {
  min-width: 0;
}

.prose > article {
  position: relative;
  padding: 26px 0 30px;
  border-bottom: 2px solid rgba(1, 205, 254, 0.2);
  scroll-margin-top: 118px;
}

.prose > article:first-child {
  padding-top: 2px;
}

.prose > article::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 96px;
  height: 2px;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon);
}

.prose h2,
.prose h3 {
  margin: 0 0 0.55em;
  font-size: 1.34rem;
  line-height: 1.4;
  color: #f0fff1;
}

.prose h2 > span,
.prose h3 > span {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--cyan);
  text-shadow: 0 0 14px rgba(1, 205, 254, 0.42);
}

.prose p {
  margin: 0 0 1em;
}

.prose a {
  color: var(--neon);
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose li {
  margin: 0.35em 0;
}

.prose strong {
  color: #eaffea;
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 113, 206, 0.09);
}

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

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

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

.prose th {
  background: rgba(135, 255, 113, 0.1);
  color: var(--neon);
}

.prose code {
  padding: 1px 5px;
  background: rgba(1, 205, 254, 0.14);
  color: #d9fbff;
  font-size: 15px;
}

/* ---------- 侧栏 ---------- */
.aside {
  position: sticky;
  top: 112px;
  padding: 16px 16px 20px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--neon);
  background: rgba(22, 36, 26, 0.68);
}

.aside-title {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: 0.16em;
  color: var(--neon);
  text-shadow: 0 0 12px rgba(135, 255, 113, 0.45);
}

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

.aside-list li + li {
  border-top: 1px dashed rgba(135, 255, 113, 0.18);
}

.aside-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 8px;
  border-left: 2px solid transparent;
  color: var(--txt);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.aside-list a:hover,
.aside-list a:focus-visible {
  color: var(--neon);
  border-left-color: var(--neon);
  background: rgba(135, 255, 113, 0.09);
}

.aside-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 12px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
}

.aside-top:hover {
  color: var(--cyan);
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 2px solid var(--cyan);
  background: linear-gradient(180deg, rgba(1, 205, 254, 0.11), rgba(11, 20, 13, 0.98) 44%);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(20px, 4vw, 40px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 52px) clamp(14px, 4vw, 32px);
}

.foot-brand {
  margin: 0 0 6px;
  color: var(--neon);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 0 14px rgba(135, 255, 113, 0.45);
}

.foot-desc {
  margin: 0;
  max-width: 34em;
  color: var(--dim);
  font-size: 16px;
}

.foot-title {
  margin: 0 0 10px;
  font-size: 17px;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.foot-title > span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--neon);
}

.foot address {
  font-style: normal;
  color: var(--txt);
  font-size: 16px;
}

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

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 3px 0;
  color: var(--txt);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--neon);
  border-bottom-color: var(--neon);
}

.subscribe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 330px;
  margin-top: 16px;
}

.subscribe input {
  flex: 1 1 148px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(11, 20, 13, 0.72);
  color: var(--txt);
  font: inherit;
  font-size: 16px;
}

.subscribe input::placeholder {
  color: var(--dim);
}

.subscribe button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--neon);
  background: var(--neon);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.subscribe button:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(1, 205, 254, 0.6);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px clamp(14px, 4vw, 32px) 26px;
  border-top: 1px solid var(--line);
}

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

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--neon);
  font-size: 16px;
  text-decoration: none;
}

.foot-base a:hover {
  color: var(--cyan);
}

/* ---------- 断点 ---------- */
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .aside {
    position: static;
    order: 2;
  }

  .prose > article {
    scroll-margin-top: 150px;
  }
}

@media (max-width: 900px) {
  .site-menu:not([open]) > .site-nav {
    display: none;
  }

  .site-menu {
    flex: 1 1 100%;
    order: 3;
    flex-wrap: wrap;
  }

  .finder {
    order: 2;
  }

  .brand {
    order: 1;
    margin-right: auto;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }
}

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

  .hero {
    min-height: 0;
    padding-top: 22px;
    padding-bottom: 54px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
  }

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

  .hero::after {
    height: 40px;
  }

  .finder input {
    width: 100%;
    min-width: 0;
  }

  .finder {
    flex: 1 1 100%;
    order: 4;
  }

  .pill {
    padding: 0 12px;
    font-size: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

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