@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Russo+One&display=swap');

:root {
  --ink: #08081a;
  --ink2: #1a1a2e;
  --red: #ff0000;
  --mag: #ff006e;
  --cyan: #37f0ff;
  --fg: #e9e9f6;
  --dim: #adadc9;
  --hdr: 62px;
  --r: 18px;
  --glow-r: 0 0 14px rgba(255, 0, 0, .55);
  --glow-m: 0 0 14px rgba(255, 0, 110, .6);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  background:
    radial-gradient(1100px 620px at 84% -8%, rgba(255, 0, 110, .22), transparent 62%),
    radial-gradient(900px 520px at -6% 12%, rgba(255, 0, 0, .17), transparent 60%),
    radial-gradient(700px 420px at 50% 110%, rgba(55, 240, 255, .1), transparent 65%),
    var(--ink);
  color: var(--fg);
  font-family: "Chakra Petch", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: .01em;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .035) 0,
    rgba(255, 255, 255, .035) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: screen;
  opacity: .8;
}

main [id] {
  scroll-margin-top: calc(var(--hdr) + 18px);
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px clamp(12px, 3vw, 30px);
  background: rgba(8, 8, 26, .84);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-bottom: 1px solid rgba(255, 0, 110, .38);
  box-shadow: 0 0 26px rgba(255, 0, 110, .16);
  transition: box-shadow .25s ease, background .25s ease;
}

.top.is-stuck {
  background: rgba(8, 8, 26, .95);
  box-shadow: 0 6px 34px rgba(255, 0, 110, .3);
}

.mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex: 0 0 auto;
  text-decoration: none;
}

.mark-box {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: "Russo One", "Chakra Petch", sans-serif;
  font-size: 20px;
  color: #fff;
  border: 2px solid var(--red);
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(255, 0, 110, .35), rgba(26, 26, 46, .9));
  box-shadow: var(--glow-r), inset 0 0 12px rgba(255, 0, 110, .5);
  text-shadow: 0 0 9px var(--mag);
  transition: transform .18s ease, box-shadow .18s ease;
}

.mark:hover .mark-box,
.mark:focus-visible .mark-box {
  transform: translateY(-1px) skewX(-4deg);
  box-shadow: 0 0 22px rgba(255, 0, 0, .85), inset 0 0 16px rgba(255, 0, 110, .8);
}

.tabs {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar { display: none; }

.tabs p {
  display: flex;
  gap: 2px;
  margin: 0;
  white-space: nowrap;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease, text-shadow .18s ease;
}

.tabs a:hover,
.tabs a:focus-visible {
  color: #fff;
  border-bottom-color: var(--mag);
  text-shadow: 0 0 11px var(--mag);
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-family: "Russo One", "Chakra Petch", sans-serif;
  font-size: 15px;
  letter-spacing: .09em;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 0, 110, .4), rgba(255, 0, 0, .2));
  box-shadow: var(--glow-r);
  transition: box-shadow .2s ease, transform .2s ease;
}

.cta:hover,
.cta:focus-visible {
  box-shadow: 0 0 24px rgba(255, 0, 110, .9);
  animation: glitch .36s steps(2, end) infinite;
}

.meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--mag));
  box-shadow: 0 0 10px var(--mag);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  max-width: 1180px;
  min-height: calc(100svh - var(--hdr) - 26px);
  margin: 0 auto;
  padding: clamp(30px, 6vw, 70px) clamp(16px, 4vw, 48px);
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid rgba(255, 0, 110, .6);
  box-shadow: 0 0 34px rgba(255, 0, 110, .35), 0 0 80px rgba(255, 0, 0, .2);
}

.grid-plate {
  aspect-ratio: 1 / 1;
  border-radius: var(--r);
  border: 1px solid rgba(255, 0, 110, .5);
  background-image:
    linear-gradient(rgba(255, 0, 110, .28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, .28) 1px, transparent 1px);
  background-size: 34px 34px;
  box-shadow: inset 0 0 70px rgba(255, 0, 0, .3);
}

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

h1 {
  margin: 0 0 16px;
  font-family: "Russo One", "Chakra Petch", sans-serif;
  font-size: clamp(2rem, 5.2vw, 3.9rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .02em;
  color: #fff;
  text-shadow:
    0 0 18px rgba(255, 0, 110, .9),
    0 0 46px rgba(255, 0, 0, .55),
    3px 3px 0 rgba(255, 0, 110, .45);
}

.lede {
  max-width: 46ch;
  margin: 0 0 0 auto;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
  color: var(--dim);
}

/* ---------- 侧栏 + 正文 ---------- */

.doc {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 68px;
}

.side {
  align-self: start;
  position: sticky;
  top: calc(var(--hdr) + 16px);
  padding: 16px 14px;
  border: 1px solid rgba(55, 240, 255, .3);
  border-radius: 14px;
  background: rgba(26, 26, 46, .58);
  box-shadow: 0 0 20px rgba(55, 240, 255, .12);
}

.side h2 {
  margin: 0;
  font-family: "Russo One", "Chakra Petch", sans-serif;
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(55, 240, 255, .65);
}

hr {
  height: 2px;
  margin: 10px 0 12px;
  border: 0;
  background: linear-gradient(90deg, var(--mag), rgba(255, 0, 110, 0));
  box-shadow: 0 0 9px rgba(255, 0, 110, .55);
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 9px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-left: 2px solid rgba(255, 0, 110, .25);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.side-list a:hover,
.side-list a:focus-visible,
.side-list a.is-on {
  color: #fff;
  border-left-color: var(--mag);
  background: rgba(255, 0, 110, .14);
  text-shadow: 0 0 10px var(--mag);
}

.body { min-width: 0; }

.body > article {
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(255, 0, 110, .24);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(26, 26, 46, .72), rgba(14, 14, 34, .72));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .02);
  animation: rise .55s ease both;
}

.body > article:nth-child(2) { animation-delay: .05s; }
.body > article:nth-child(3) { animation-delay: .1s; }
.body > article:nth-child(4) { animation-delay: .15s; }
.body > article:nth-child(5) { animation-delay: .2s; }
.body > article:nth-child(6) { animation-delay: .25s; }
.body > article:nth-child(7) { animation-delay: .3s; }
.body > article:nth-child(8) { animation-delay: .35s; }

.body > article:hover {
  border-color: rgba(255, 0, 110, .5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 24px rgba(255, 0, 110, .18);
}

h2 {
  margin: 0 0 4px;
  font-family: "Russo One", "Chakra Petch", sans-serif;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .03em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, .7);
}

h3 {
  margin: 22px 0 6px;
  font-family: "Chakra Petch", "PingFang SC", sans-serif;
  font-size: clamp(1.06rem, 1.8vw, 1.22rem);
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 0, 0, .55);
}

.body p,
.body li {
  color: #dbdbee;
  line-height: 1.8;
}

.body p { margin: 0 0 14px; }

.body ul,
.body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.body li { margin: 0 0 8px; }

.body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(55, 240, 255, .5);
}

.body a:hover { text-shadow: 0 0 10px rgba(55, 240, 255, .9); }

.body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 0, 110, .35);
}

.body blockquote {
  margin: 0 0 16px;
  padding: 10px 16px;
  border-left: 3px solid var(--mag);
  background: rgba(255, 0, 110, .08);
  color: #e6e6f5;
}

.body strong { color: #fff; }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-top: 1px solid rgba(255, 0, 110, .38);
  background: rgba(8, 8, 26, .92);
  box-shadow: 0 -8px 26px rgba(255, 0, 110, .14);
}

.foot nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  transition: color .18s ease, text-shadow .18s ease;
}

.foot a:hover,
.foot a:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px var(--mag);
}

.cr {
  font-family: "Russo One", "Chakra Petch", sans-serif;
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--dim);
}

/* ---------- 动效 ---------- */

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

@keyframes glitch {
  0% { transform: skewX(0deg) translateX(0); }
  40% { transform: skewX(-6deg) translateX(-1px); }
  70% { transform: skewX(5deg) translateX(1px); }
  100% { transform: skewX(0deg) translateX(0); }
}

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

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 22px;
  }

  .hero-copy {
    order: -1;
    text-align: left;
  }

  .lede { margin: 0; }

  .hero-media img,
  .grid-plate {
    max-height: 34svh;
    object-fit: cover;
  }

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

  .side {
    position: static;
    padding: 12px;
  }

  .side-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 4px;
  }

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

  .side-list a {
    border-left: 0;
    border-bottom: 2px solid rgba(255, 0, 110, .25);
    padding: 4px 10px;
    min-height: 42px;
    white-space: nowrap;
  }

  .side-list a:hover,
  .side-list a.is-on { border-bottom-color: var(--mag); }
}

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

  .cta {
    padding: 0 12px;
    font-size: 14px;
  }

  .tabs a { padding: 0 10px; }

  .foot {
    justify-content: flex-start;
    gap: 4px;
  }

  .cr { padding: 0 9px 6px; }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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