:root {
  --ink: #0a0a12;
  --ink-2: #1a1a2e;
  --red: #ff0000;
  --pink: #ff006e;
  --cyan: #5ff2ff;
  --fog: #c9c9dd;
  --dim: #8b8ba6;
  --line: rgba(255, 0, 110, 0.28);
  --hard: rgba(255, 255, 255, 0.13);
  --font-head: Anton, Impact, "Arial Black", sans-serif;
  --font-body: Epilogue, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--fog);
  background-color: var(--ink-2);
  background-image:
    radial-gradient(1200px 520px at 82% -8%, rgba(255, 0, 110, 0.22), transparent 62%),
    radial-gradient(900px 460px at 6% 4%, rgba(255, 0, 0, 0.16), transparent 58%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: screen;
  opacity: 0.72;
  animation: scan 9s linear infinite;
}

@keyframes scan {
  to { background-position: 0 60px; }
}

/* ===== 底部固定导航条 ===== */
.deck {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 7px clamp(10px, 3vw, 22px);
  background: rgba(10, 10, 18, 0.95);
  border-top: 1px solid rgba(255, 0, 110, 0.55);
  box-shadow: 0 -12px 34px rgba(255, 0, 110, 0.16);
  overflow: hidden;
}

.deck .mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--red);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: rgba(255, 0, 0, 0.09);
}

.deck .mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.deck .mark:hover,
.deck .mark:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(95, 242, 255, 0.45);
}

.deck nav {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
}

.deck nav p {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.deck nav p::-webkit-scrollbar {
  display: none;
}

.deck nav a {
  display: inline-block;
  flex: 0 0 auto;
  padding: 13px 10px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--dim);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.16s, border-color 0.16s, text-shadow 0.16s;
}

.deck nav a:hover,
.deck nav a:focus-visible,
.deck nav a.on {
  color: #fff;
  border-bottom-color: var(--pink);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.85);
}

.deck .call {
  flex: 0 0 auto;
  display: inline-block;
  padding: 11px 13px;
  font-size: 0.84rem;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--red);
  background: rgba(255, 0, 0, 0.12);
  transition: background 0.16s, transform 0.16s;
}

.deck .call:hover,
.deck .call:focus-visible {
  background: var(--red);
  transform: translateY(-1px);
}

/* ===== 布局 ===== */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: clamp(22px, 4vw, 54px);
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 44px);
}

.hero {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 4vw, 46px);
  min-height: 64vh;
  min-width: 0;
  padding: clamp(26px, 7vh, 70px) 0 2.1rem;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 34ch;
}

.hero-fig {
  margin: 0;
  flex: 0 1 auto;
  width: min(36vw, 248px);
  max-width: 100%;
  border: 1px solid var(--pink);
  box-shadow: 0 0 26px rgba(255, 0, 110, 0.28);
}

.hero-fig img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  filter: saturate(1.12) contrast(1.05);
}

h1.glitch {
  position: relative;
  margin: 0;
  max-width: 100%;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.9rem, 7.4vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: 0.005em;
  color: #fff;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.35),
    0 0 22px rgba(255, 0, 110, 0.7),
    3px 3px 0 rgba(255, 0, 0, 0.55);
}

h1.glitch::before,
h1.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  clip-path: polygon(0 12%, 100% 12%, 100% 46%, 0 46%);
}

h1.glitch::before {
  color: var(--pink);
  text-shadow: none;
  animation: glitchA 4.6s steps(2, end) infinite;
}

h1.glitch::after {
  color: var(--cyan);
  text-shadow: none;
  clip-path: polygon(0 54%, 100% 54%, 100% 88%, 0 88%);
  animation: glitchB 3.9s steps(2, end) infinite;
}

@keyframes glitchA {
  0%, 88%, 100% { transform: translate(0, 0); opacity: 0.85; }
  90% { transform: translate(-3px, -2px) skewX(-6deg); opacity: 1; }
  94% { transform: translate(2px, 1px) skewX(5deg); opacity: 0.9; }
}

@keyframes glitchB {
  0%, 84%, 100% { transform: translate(0, 0); opacity: 0.8; }
  86% { transform: translate(3px, 2px) skewX(7deg); opacity: 1; }
  92% { transform: translate(-2px, -1px); opacity: 0.85; }
}

.lead {
  margin: 1.05rem 0 0;
  max-width: 42ch;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--fog);
  overflow-wrap: break-word;
}

/* ===== 正文列 ===== */
.body-col {
  min-width: 0;
  max-width: 100%;
  padding: 2.2rem 0 3rem;
}

.sec-head {
  margin-bottom: 1.5rem;
  min-width: 0;
}

.sec-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  line-height: 1.14;
  color: #fff;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.55);
}

.subtitle {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  color: var(--pink);
  font-family: var(--font-mono);
  overflow-wrap: break-word;
}

.content {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

.content > * {
  max-width: 100%;
}

.content div {
  min-width: 0;
  padding: 1.9rem 0 2.1rem 0.85rem;
  border-top: 1px solid var(--line);
  border-left: 2px solid transparent;
  scroll-margin-top: 96px;
}

.content div:first-of-type {
  border-top: 0;
  padding-top: 0.2rem;
}

.content div:target,
.content div:hover {
  border-left-color: rgba(255, 0, 110, 0.55);
}

.content > div {
  animation: rise 0.5s both;
}

.content > div:nth-child(2) { animation-delay: 0.06s; }
.content > div:nth-child(3) { animation-delay: 0.12s; }
.content > div:nth-child(4) { animation-delay: 0.18s; }
.content > div:nth-child(5) { animation-delay: 0.24s; }
.content > div:nth-child(6) { animation-delay: 0.3s; }
.content > div:nth-child(7) { animation-delay: 0.36s; }

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

.content h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(1.28rem, 2.9vw, 1.68rem);
  line-height: 1.22;
  color: #fff;
  overflow-wrap: anywhere;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.6);
}

.content h3 {
  margin: 1.35rem 0 0.45rem;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--pink);
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.content p {
  margin: 0 0 1.02em;
  line-height: 1.78;
}

.content a {
  color: #ff5c8a;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 110, 0.5);
  overflow-wrap: anywhere;
  transition: color 0.16s, border-color 0.16s;
}

.content a:hover,
.content a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

.content ul,
.content ol {
  margin: 0 0 1.1em;
  padding-left: 1.15em;
}

.content li {
  margin: 0.32em 0;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.content blockquote {
  margin: 0 0 1.1em;
  padding: 0.65em 1em;
  border-left: 2px solid var(--red);
  background: rgba(255, 0, 0, 0.07);
  color: #e4e4f2;
}

.content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 1.1em;
  font-size: 0.93rem;
}

.content th,
.content td {
  border: 1px solid var(--hard);
  padding: 0.5em 0.62em;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}

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

.content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.09);
  padding: 0.1em 0.36em;
  overflow-wrap: anywhere;
}

.content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 0.8em 0.9em;
  background: rgba(255, 255, 255, 0.06);
  border-left: 2px solid var(--pink);
}

.content pre code {
  background: none;
  padding: 0;
  white-space: pre;
  overflow-wrap: normal;
}

.content img,
.content iframe,
.content video,
.content svg {
  max-width: 100%;
  height: auto;
}

.content img {
  border: 1px solid var(--line);
}

/* ===== 右侧栏 ===== */
.rail {
  align-self: start;
  position: sticky;
  top: 24px;
  min-width: 0;
  max-width: 100%;
  margin: 2.2rem 0 3rem;
  padding: 14px 14px 16px;
  border: 1px solid var(--hard);
  background: rgba(10, 10, 18, 0.6);
}

.rail-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--pink);
}

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

.rail-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rail-list a {
  display: block;
  padding: 11px 2px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--fog);
  text-decoration: none;
  overflow-wrap: break-word;
  transition: color 0.16s, padding-left 0.16s;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #fff;
  padding-left: 6px;
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.8);
}

.rail-bar {
  display: block;
  margin-top: 14px;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--pink) 0 8px,
    transparent 8px 14px
  );
}

/* ===== 页脚 ===== */
footer {
  margin-top: 1.5rem;
  padding: 2rem 16px 6.6rem;
  text-align: center;
  color: var(--dim);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(10, 10, 18, 0.55);
}

footer p {
  margin: 0;
  color: #d2d2e4;
  overflow-wrap: break-word;
}

footer small {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #6f6f8b;
  overflow-wrap: break-word;
}

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

  .rail {
    position: static;
    order: 3;
    margin: 0 0 2.2rem;
  }

  .rail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .rail-list li + li {
    border-top: 0;
  }

  .rail-list a {
    padding: 10px 11px;
    border: 1px solid var(--hard);
  }

  .rail-list a:hover {
    padding-left: 11px;
    border-color: var(--pink);
  }

  .body-col {
    padding-bottom: 1.6rem;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .hero {
    flex-wrap: nowrap;
    align-items: flex-start;
    min-height: 56vh;
    gap: 14px;
    padding-top: 1.6rem;
    padding-bottom: 1.6rem;
  }

  .hero-copy {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .hero-fig {
    flex: 0 0 auto;
    width: 84px;
    margin-top: 0.35rem;
  }

  .deck {
    gap: 6px;
    padding: 6px 10px;
  }

  .deck nav a {
    padding: 13px 9px;
    font-size: 0.8rem;
  }

  .deck .call {
    padding: 11px 10px;
    font-size: 0.8rem;
  }

  .content div {
    padding-left: 0.7rem;
  }
}

@media (max-width: 420px) {
  h1.glitch {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .hero-fig {
    width: 68px;
  }

  .deck nav a {
    padding: 13px 8px;
    font-size: 0.78rem;
  }

  .deck .call {
    display: none;
  }

  .content table {
    font-size: 0.86rem;
  }
}

@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;
  }

  h1.glitch::before,
  h1.glitch::after {
    display: none;
  }
}

@media print {
  .deck,
  body::before {
    display: none;
  }

  .content {
    overflow: visible;
  }
}
</parameter>

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