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

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

body {
  margin: 0;
  background: #1c1726;
  color: #efe9ff;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", "Hiragino Sans GB", "Noto Sans Mono CJK SC", monospace;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 26%, rgba(101, 20, 255, .38), transparent 46%),
    radial-gradient(circle at 82% 72%, rgba(191, 0, 255, .26), transparent 42%),
    repeating-linear-gradient(45deg, rgba(191, 0, 255, .07) 0 2px, transparent 2px 24px);
  animation: drift 28s ease-in-out infinite alternate;
}

@keyframes drift {
  to { transform: translate3d(-4%, -3%, 0) scale(1.1) rotate(1.2deg); }
}

img { max-width: 100%; }

a { color: #dcc7ff; }

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.02em;
}

.skip {
  position: absolute;
  top: -70px;
  left: 12px;
  z-index: 60;
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  background: #bf00ff;
  color: #fff;
  text-decoration: none;
}
.skip:focus { top: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px clamp(14px, 3vw, 34px);
  background: rgba(20, 15, 28, .86);
  border-bottom: 1px solid rgba(191, 0, 255, .28);
  backdrop-filter: blur(16px) saturate(150%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-right: 6px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}

.logo { width: 30px; height: 30px; border-radius: 8px; display: block; }

.mark {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 7px;
  background: linear-gradient(135deg, #6514ff, #bf00ff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset;
}

.tabs {
  flex: 1 1 240px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 12px;
  color: #cabbe8;
  text-decoration: none;
  white-space: nowrap;
  transition: color .22s ease, background-color .22s ease, transform .22s ease;
}

.tab-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border: 1px solid #bf00ff;
  transform: rotate(45deg);
  transition: background-color .22s ease, border-color .22s ease;
}

.tab:hover,
.tab.on {
  color: #fff;
  background: rgba(101, 20, 255, .45);
  transform: translateY(-2px);
}
.tab:hover .tab-dot,
.tab.on .tab-dot { background: #bf00ff; border-color: #fff; }

.seek {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.seek input {
  width: 132px;
  min-height: 44px;
  padding: 8px 14px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(191, 0, 255, .4);
  border-radius: 12px;
  outline-offset: 2px;
}
.seek input::placeholder { color: #a596c2; }

.seek-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(135deg, #6514ff, #bf00ff);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: filter .22s ease, transform .22s ease;
}
.seek-btn:hover { filter: brightness(1.2); transform: translateY(-2px); }

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(15px, 4vw, 40px) 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  gap: 48px;
  align-items: start;
}

.hero {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  min-height: 66vh;
  padding: clamp(26px, 6vw, 60px) 0 clamp(10px, 3vw, 22px);
}

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }

h1 {
  margin: 0;
  font-size: clamp(2rem, 6.6vw, 4.3rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  background: linear-gradient(102deg, #ffffff 18%, #d3b6ff 58%, #bf00ff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #f4ecff;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 15px 30px;
  border-radius: 18px;
  background: linear-gradient(120deg, #6514ff, #bf00ff);
  color: #fff;
  text-decoration: none;
  letter-spacing: .06em;
  box-shadow: 0 20px 40px -22px #bf00ff;
  transition: transform .24s ease, box-shadow .24s ease, filter .24s ease;
}
.cta:hover { transform: translateY(-3px); filter: brightness(1.16); box-shadow: 0 22px 46px -18px #bf00ff; }

.hero-img {
  width: 100%;
  height: 36vh;
  min-height: 200px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(191, 0, 255, .38);
  box-shadow: 0 30px 60px -34px #000;
}

.doc { counter-reset: blk; min-width: 0; }

div > section {
  position: relative;
  margin: 0 0 48px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: 18px;
  border: 1px solid rgba(191, 0, 255, .26);
  background: linear-gradient(158deg, rgba(101, 20, 255, .17), rgba(28, 23, 38, .74));
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 24px 52px -30px #000;
  scroll-margin-top: 108px;
  transition: border-color .28s ease, transform .28s ease;
}

div > section:hover { border-color: rgba(191, 0, 255, .55); }

div > section::before {
  counter-increment: blk;
  content: counter(blk, decimal-leading-zero);
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -.06em;
  color: rgba(191, 0, 255, .24);
  pointer-events: none;
}

div > section.lede {
  background: linear-gradient(118deg, rgba(101, 20, 255, .42), rgba(191, 0, 255, .16));
  border-color: rgba(191, 0, 255, .5);
}

div > section.lede h2 { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.35rem); letter-spacing: .1em; }

.subtitle { margin: 10px 0 0; color: #d7c9f2; font-size: 16px; }

div > section h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 3.4vw, 32px);
}

div > section h3 { margin: 30px 0 10px; font-size: 19px; color: #e6d7ff; }

div > section p { margin: 0 0 16px; }

div > section p:last-child { margin-bottom: 0; }

div > section ul,
div > section ol { margin: 0 0 18px; padding-left: 22px; }

div > section li { margin: 0 0 8px; }
div > section li::marker { color: #bf00ff; }

div > section a {
  color: #e2cdff;
  text-underline-offset: 4px;
  text-decoration-color: rgba(191, 0, 255, .7);
}
div > section a:hover { color: #fff; text-decoration-color: #bf00ff; }

div > section strong { color: #fff; font-weight: 500; }

div > section blockquote {
  margin: 20px 0;
  padding: 14px 22px;
  border-left: 3px solid #bf00ff;
  background: rgba(191, 0, 255, .1);
  border-radius: 0 14px 14px 0;
  color: #e4d6ff;
}

div > section code {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(191, 0, 255, .18);
  font-size: 15px;
}

.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid rgba(191, 0, 255, .3);
  background: rgba(23, 18, 34, .72);
  backdrop-filter: blur(16px);
}

.rail-h { margin: 0 0 12px; font-size: 16px; letter-spacing: .16em; color: #fff; }

.rail-nav { display: flex; flex-direction: column; }

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 0;
  color: #c6b7e6;
  text-decoration: none;
  border-bottom: 1px dashed rgba(191, 0, 255, .2);
  transition: color .2s ease, padding-left .2s ease;
}

.rail-nav a:last-child { border-bottom: 0; }
.rail-nav a i { font-style: normal; font-size: 13px; color: #8f7cb5; }

.rail-nav a:hover { color: #fff; padding-left: 6px; }
.rail-nav a:hover i { color: #bf00ff; }

.foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px 40px;
  align-items: start;
  padding: 44px clamp(15px, 4vw, 40px) 56px;
  border-top: 1px solid rgba(191, 0, 255, .3);
  background: rgba(16, 12, 22, .7);
}

.foot-mark { min-width: 0; }

.foot-dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 14px;
  margin: 0;
  max-width: 460px;
}

.foot-dl dt { font-size: 13px; color: #8b7aab; line-height: 44px; }

.foot-dl dd { margin: 0; }

.foot-dl a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #cabdе8;
  color: #cabde8;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.foot-dl a:hover { color: #fff; transform: translateX(3px); }

.foot-legal {
  text-align: right;
  color: #a294c0;
  font-size: 15px;
  padding-top: 12px;
}

.foot .brand { font-size: 16px; }

.totop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  width: 56px;
  min-height: 56px;
  padding: 6px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  color: #e9dcff;
  background: rgba(28, 23, 38, .88);
  border: 1px solid rgba(191, 0, 255, .5);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.totop:hover { color: #fff; border-color: #bf00ff; transform: translateY(-3px); }

@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero { min-height: 0; padding: 30px 0 0; }
  .rail { position: static; }
  div > section { scroll-margin-top: 132px; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-legal { text-align: left; padding-top: 0; }
  .foot-dl { max-width: none; }
}

@media (max-width: 640px) {
  .topbar { gap: 8px; }
  .brand-t { font-size: 15px; }
  .seek { flex: 1 1 120px; justify-content: flex-end; }
  .seek input { width: 100%; min-width: 0; }
  .tabs { order: 3; flex-basis: 100%; }
  .hero-img { height: 30vh; min-height: 160px; }
  div > section { margin-bottom: 36px; }
  div > section::before { font-size: 30px; top: 12px; right: 14px; }
}

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

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