@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --p1: #6514ff;
  --p2: #bf00ff;
  --ink: #1c1726;
  --paper: #f7f3ff;
  --card: #ffffff;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  --bd: 3px solid var(--ink);
}

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

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

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -25% -25%;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(101, 20, 255, .10) 0 2px, transparent 2px 28px);
  animation: drift 20s linear infinite;
}

@keyframes drift {
  to { transform: translate3d(-56px, -56px, 0); }
}

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

img { max-width: 100%; }

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

.skip {
  position: absolute;
  left: 10px;
  top: -70px;
  z-index: 80;
  padding: 12px 18px;
  min-height: 44px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 700;
}

.skip:focus { top: 10px; }

/* 顶部 */
.top {
  position: relative;
  z-index: 30;
  background: var(--paper);
  border-bottom: var(--bd);
}

.top__strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  font-size: .9375rem;
  letter-spacing: .16em;
  text-align: center;
}

.top__strip span[aria-hidden] { color: var(--p2); font-size: .75rem; letter-spacing: .1em; }

.top__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(12px, 3vw, 32px);
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--p1);
  border: 3px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
}

.burger:hover { background: var(--p2); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
  padding: 9px 15px;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  border: var(--bd);
  border-radius: 4px;
  background: linear-gradient(115deg, #fff 0 58%, #ece2ff 58% 100%);
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}

.brand:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--p2);
}

.brand__mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--p2);
}

.brand__mark[src] { object-fit: contain; width: 26px; height: 26px; }

.brand__txt { font-weight: 700; font-size: 1.0625rem; letter-spacing: .02em; }

.split ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.split--l ol { justify-content: flex-start; }
.split--r ol { justify-content: flex-end; }

.split a {
  display: flex;
  align-items: center;
  padding: 11px 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.split a:hover,
.split a:focus-visible {
  background: var(--p1);
  color: #fff;
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* 粘性锚点条 */
.rail {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--card);
  border-bottom: var(--bd);
}

.rail__nav {
  overflow-x: auto;
  scrollbar-width: none;
}

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

.rail__nav ol {
  list-style: none;
  display: flex;
  margin: 0 auto;
  padding: 0;
  max-width: 1180px;
  min-height: 54px;
  align-items: stretch;
}

.rail__nav a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  white-space: nowrap;
  border-left: 2px solid rgba(28, 23, 38, .16);
  transition: background .2s ease, color .2s ease;
}

.rail__nav li:first-child a { border-left: 0; }

.rail__nav a:hover { background: var(--p2); color: #fff; }

.rail__nav a.on {
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 -5px 0 var(--p2);
}

/* 版面 */
main {
  position: relative;
  z-index: 1;
  padding: clamp(18px, 3vw, 36px) clamp(14px, 4vw, 40px) 72px;
}

main section { scroll-margin-top: 100px; }

.sheet {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  grid-template-areas:
    "hero hero"
    "body side";
  gap: 44px 34px;
  align-items: start;
}

/* 头图 */
.hero {
  grid-area: hero;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 45vh;
  display: grid;
  place-items: center;
  padding: 42px 20px 58px;
  background: var(--ink);
  border: var(--bd);
  border-radius: 4px;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

.hero__img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(.62);
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(150deg, rgba(101, 20, 255, .70), rgba(191, 0, 255, .34) 55%, rgba(28, 23, 38, .90));
}

.hero__shard {
  position: absolute;
  right: -46px;
  top: -46px;
  width: 172px;
  height: 172px;
  border: 6px solid rgba(255, 255, 255, .48);
  transform: rotate(24deg);
  z-index: 1;
}

.hero__text {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
  color: #fff;
}

.hero__h1 {
  margin: 0;
  font-size: clamp(2rem, 6.2vw, 4.25rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
  text-shadow: 0 3px 0 rgba(28, 23, 38, .4);
}

.hero__desc {
  margin: 18px auto 0;
  max-width: 56ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #f3ebff;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  padding: 14px 26px;
  min-height: 48px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border: var(--bd);
  border-radius: 4px;
  transition: transform .22s ease, background .22s ease, color .22s ease;
}

.hero__cta:hover { background: var(--p2); color: #fff; transform: translate(-3px, -3px); }

/* 正文 */
.body { grid-area: body; min-width: 0; }

.body > section {
  padding: clamp(22px, 2.6vw, 32px) 0 34px;
  border-bottom: var(--bd);
}

.body > section:first-child { border-top: var(--bd); }
.body > section:last-child { border-bottom: 0; }

.body h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  line-height: 1.28;
  letter-spacing: -.01em;
}

.body h3 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--p1);
}

.body h2 + hr,
.side h2 + hr {
  height: 8px;
  border: 0;
  margin: 16px 0 24px;
  background: repeating-linear-gradient(90deg, var(--p1) 0 18px, var(--p2) 18px 36px);
}

.body p { margin: 0 0 18px; max-width: 70ch; }

.body a {
  color: var(--p1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.body a:hover { background: var(--p1); color: #fff; text-decoration: none; }

.body ul,
.body ol { margin: 0 0 18px; padding-left: 1.3em; }

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

.body img {
  display: block;
  height: auto;
  margin: 22px 0;
  border: var(--bd);
  border-radius: 4px;
}

.body blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-left: 9px solid var(--p2);
  border-radius: 4px;
}

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

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

.body th,
.body td { border: 2px solid var(--ink); padding: 10px 12px; text-align: left; }

.body th { background: #ece2ff; }

/* 侧栏 */
.side {
  grid-area: side;
  position: sticky;
  top: 82px;
  padding: 20px 18px;
  background: var(--card);
  border: var(--bd);
  border-radius: 4px;
}

.side h2 { margin: 0; font-size: 1.125rem; letter-spacing: .02em; }

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

.side__nav a {
  display: flex;
  align-items: center;
  padding: 11px 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 2px dashed rgba(28, 23, 38, .28);
  transition: background .2s ease, color .2s ease;
}

.side__nav li:last-child a { border-bottom: 0; }

.side__nav a:hover { background: var(--p1); color: #fff; }

/* 页脚 */
.foot {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: #fff;
  border-top: 5px solid var(--p2);
}

.foot__cta {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 62px) clamp(16px, 4vw, 40px) clamp(26px, 4vw, 42px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 3px solid var(--p2);
}

.foot__big {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.foot__btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  min-height: 48px;
  background: var(--p2);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 3px solid #fff;
  border-radius: 4px;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}

.foot__btn:hover { background: #fff; color: var(--ink); border-color: var(--p2); }

.foot__row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px) 30px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 24px;
}

.foot__logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--p1);
  border: 3px solid #fff;
  border-radius: 4px;
  text-decoration: none;
}

.foot__logo img { width: 100%; height: 100%; object-fit: contain; }
.foot__logo .brand__mark { color: #fff; }

.foot__nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
}

.foot__nav a {
  display: flex;
  align-items: center;
  padding: 11px 9px;
  min-height: 44px;
  color: #eee4ff;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 4px;
  transition: background .2s ease, color .2s ease;
}

.foot__nav a:hover { background: var(--p2); color: #fff; }

.foot__copy { margin: 0; font-size: 1rem; color: #d9cbff; text-align: center; }

/* 滚动显现 */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .28s ease, transform .28s ease;
}

.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* 平板与手机 */
@media (max-width: 1000px) {
  .sheet {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "hero"
      "body"
      "side";
    gap: 32px;
  }

  .side { position: static; }
}

@media (max-width: 960px) {
  .top__bar {
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .burger { display: inline-flex; grid-column: 1; grid-row: 1; }

  .brand { grid-column: 2; grid-row: 1; justify-self: center; }

  .split { display: none; }

  .top.is-open .split {
    display: block;
    grid-column: 1 / -1;
    padding-top: 12px;
    border-top: 2px dashed rgba(28, 23, 38, .3);
  }

  .top.is-open .split ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .top.is-open .split a {
    justify-content: center;
    border: 2px solid var(--ink);
    background: #fff;
  }

  .top.is-open .split a:hover { background: var(--p1); }
}

@media (max-width: 720px) {
  .hero {
    min-height: 0;
    padding: 30px 16px 44px;
    clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  }

  .hero__h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero__desc { font-size: 1rem; }

  main { padding: 16px 12px 56px; }

  .body > section { padding: 22px 0 26px; }

  .foot__row { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .foot__copy { text-align: center; }
  .foot__cta { justify-content: center; text-align: center; }
}

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