:root {
  --ink: #0d0d0d;
  --ink2: #121016;
  --purple: #8000ff;
  --pink: #ff00ff;
  --txt: #efe9ff;
  --dim: #a495c4;
  --line: rgba(255, 0, 255, 0.28);
  --dock-h: 92px;
  --display: "Lexend Mega", "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Public Sans", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-bottom: calc(var(--dock-h) + 22px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: var(--dock-h);
  background:
    radial-gradient(1100px 560px at 84% -8%, rgba(128, 0, 255, 0.24), transparent 68%),
    radial-gradient(820px 520px at -6% 104%, rgba(255, 0, 255, 0.14), transparent 70%),
    var(--ink);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
}

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

a { color: var(--pink); }
a:hover { color: #fff; }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.25; margin: 0 0 0.5em; color: #fff; }

.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 90;
  padding: 12px 18px;
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 14px 14px;
  font-family: var(--mono);
  transition: top 0.2s;
}
.skip:focus { top: 0; }

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 68px calc(12px + env(safe-area-inset-bottom)) 16px;
  background: rgba(13, 13, 13, 0.93);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.dock__nav { display: contents; }

.dock__grp { display: flex; gap: 8px; margin: 0; min-width: 0; }
.dock__grp--left { grid-column: 1; justify-self: end; }
.dock__grp--right { grid-column: 3; justify-self: start; }

.dock__grp a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.dock__grp a:hover,
.dock__grp a:focus-visible {
  background: rgba(255, 0, 255, 0.16);
  border-color: var(--pink);
  color: #fff;
  transform: translateY(-2px);
}

.dock__brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--pink);
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(128, 0, 255, 0.35), rgba(255, 0, 255, 0.25));
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.75);
  white-space: nowrap;
}
.dock__logo { width: 22px; height: 22px; }

/* 搜索 */
.finder {
  position: absolute;
  right: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom));
}

.finder__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #15111d;
  color: var(--txt);
  font-family: var(--mono);
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.finder__toggle:hover { border-color: var(--pink); color: #fff; }

.finder__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(266px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--pink);
  border-radius: 18px;
  background: #100d17;
  display: none;
}
.finder__panel.is-open { display: block; }

.finder__input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0910;
  color: var(--txt);
  font-family: var(--mono);
  font-size: 16px;
}
.finder__input:focus { outline: 2px solid var(--purple); outline-offset: 1px; }

.finder__out { list-style: none; margin: 8px 0 0; padding: 0; }
.finder__out:empty { margin: 0; }
.finder__out a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--txt);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 16px;
}
.finder__out a:hover { background: rgba(128, 0, 255, 0.28); color: #fff; }

/* 首屏 */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(128, 0, 255, 0.2) 1px, transparent 1px);
  background-size: 72px 100%;
  opacity: 0.55;
}

.hero__slash {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(30vh, 190px);
  background: linear-gradient(90deg, var(--purple), var(--pink));
  clip-path: polygon(0 66%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.28;
  animation: sweep 9s ease-in-out infinite alternate;
}

@keyframes sweep {
  from { clip-path: polygon(0 72%, 100% 4%, 100% 100%, 0 100%); }
  to { clip-path: polygon(0 58%, 100% 14%, 100% 100%, 0 100%); }
}

.hero__box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 20px calc(var(--dock-h) + 34px);
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 8vw, 5.4rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  color: #fff;
  word-break: break-word;
  text-shadow: 0 0 18px rgba(255, 0, 255, 0.6), 0 0 46px rgba(128, 0, 255, 0.45);
}

.glitch { position: relative; isolation: isolate; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0.7;
}
.glitch::before {
  color: var(--pink);
  clip-path: inset(0 0 56% 0);
  animation: g1 5.5s steps(2, end) infinite;
}
.glitch::after {
  color: var(--purple);
  clip-path: inset(50% 0 0 0);
  animation: g2 6.5s steps(2, end) infinite;
}

@keyframes g1 {
  0%, 90%, 100% { transform: translate(-2px, 1px); }
  93% { transform: translate(-8px, -2px); }
  96% { transform: translate(5px, 2px); }
}
@keyframes g2 {
  0%, 88%, 100% { transform: translate(2px, -1px); }
  92% { transform: translate(8px, 2px); }
  95% { transform: translate(-4px, -2px); }
}

/* 主体 */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 20px 90px;
  align-items: start;
}

.stage__body { min-width: 0; }

.intro { margin: 0 0 26px; }

.intro__title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin: 0 0 8px;
  color: var(--pink);
  text-shadow: 0 0 14px rgba(255, 0, 255, 0.45);
}

.subtitle {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dim);
}

.stage__body > article {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px;
  margin: 0 0 20px;
  scroll-margin-bottom: calc(var(--dock-h) + 26px);
  position: relative;
}

.stage__body > article::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  width: 46px;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
}

.stage__body > article h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  letter-spacing: -0.01em;
}
.stage__body > article h3 { font-size: 1.16rem; color: var(--pink); margin-top: 1.4em; }

.stage__body > article h2 + p {
  font-family: var(--mono);
  color: var(--dim);
  font-size: 16px;
}

.stage__body > article a {
  color: var(--pink);
  text-underline-offset: 3px;
}
.stage__body > article a:hover { color: #fff; }

.stage__body > article ul,
.stage__body > article ol { margin: 0 0 1em; }
.stage__body > article li { margin: 0.35em 0; }

.stage__body > article li::marker { color: var(--pink); }

.stage__body blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 0, 255, 0.07);
  color: #f4ecff;
}

.stage__body > article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  display: block;
  overflow-x: auto;
}
.stage__body > article th,
.stage__body > article td {
  border: 1px solid rgba(255, 0, 255, 0.2);
  padding: 9px 12px;
  text-align: left;
}
.stage__body > article th { background: rgba(128, 0, 255, 0.18); color: #fff; }

.stage__body > article figure { margin: 1.2em 0; }
.stage__body > article figcaption { font-family: var(--mono); font-size: 15px; color: var(--dim); margin-top: 8px; }

.stage__body > article img { border-radius: 12px; border: 1px solid var(--line); }

/* 右栏 */
.rail {
  position: sticky;
  top: 26px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px;
  background: rgba(128, 0, 255, 0.08);
}

.rail__title {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
  color: var(--pink);
}

.rail__list { list-style: none; margin: 0; padding: 0; }
.rail__list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--txt);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 16px;
  transition: background 0.16s, color 0.16s;
}
.rail__list a:hover,
.rail__list a:focus-visible { background: rgba(255, 0, 255, 0.18); color: #fff; }

/* 页脚 */
.foot {
  border-top: 1px solid var(--line);
  background: #0a0a0c;
  padding: 48px 20px 0;
}

.foot__grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.foot__mark {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 5.4vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot__links ul { list-style: none; margin: 0; padding: 0; }
.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--txt);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 16px;
}
.foot__links a:hover { color: var(--pink); }

.foot__addr {
  font-style: normal;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--dim);
}

.foot__base {
  max-width: 1180px;
  margin: 34px auto 0;
  border-top: 1px solid rgba(255, 0, 255, 0.16);
  text-align: center;
}
.foot__base p {
  margin: 0;
  padding: 18px 0 20px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--dim);
}

/* 滚动入场 */
.js .stage__body > article {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js .stage__body > article.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: 2; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__mark { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --dock-h: 148px; }

  .dock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

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

  .finder { position: static; order: 2; }
  .finder__panel { right: 0; bottom: calc(100% + 8px); }

  .dock__nav {
    display: flex;
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .dock__nav::-webkit-scrollbar { display: none; }
  .dock__grp { flex: none; justify-content: flex-start; }

  .hero__box { padding-top: 96px; }
  .stage { padding: 40px 14px 70px; }
  .stage__body > article { padding: 22px 16px; border-radius: 16px; }
  .foot { padding: 40px 14px 0; }
}

@media (max-width: 520px) {
  .foot__grid { grid-template-columns: 1fr; gap: 18px; }
  .foot__addr { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glitch::before,
  .glitch::after,
  .hero__slash { animation: none; }
  .js .stage__body > article { transition: none; opacity: 1; transform: none; }
  .dock__grp a:hover { transform: none; }
}

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