@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --bg: #0b0b16;
  --fg: #edeaf7;
  --dim: #a8a4c3;
  --line: rgba(255, 0, 110, 0.3);
  --hair: rgba(255, 255, 255, 0.09);
  --radius: 18px;
  --rail-w: 236px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 560px at 12% -8%, rgba(255, 0, 110, 0.2), transparent 62%),
    radial-gradient(880px 480px at 96% 2%, rgba(255, 0, 0, 0.16), transparent 58%),
    linear-gradient(180deg, #0b0b16 0%, #1a1a2e 52%, #0b0b16 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 100%);
}

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

[id] {
  scroll-margin-top: 100px;
}

a {
  color: #ff96bd;
}

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

:focus-visible {
  outline: 2px solid #00e5ff;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 120;
  padding: 12px 18px;
  background: var(--pink);
  color: #fff;
  border-radius: 0 0 12px 0;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-w);
  height: 92px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  z-index: 45;
  border-right: 1px solid var(--hair);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.94), rgba(11, 11, 22, 0.68));
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--fg);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}

.brand:hover {
  background: rgba(255, 0, 110, 0.12);
  box-shadow: 0 0 22px rgba(255, 0, 110, 0.35);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 0, 110, 0.12);
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.5);
}

.brand-mark svg,
.brand-mark img,
.f-mark svg,
.f-mark img,
.hero-mark svg,
.hero-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.7);
}

.rail {
  position: fixed;
  top: 92px;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  padding: 16px 12px 30px;
  overflow-y: auto;
  z-index: 44;
  border-right: 1px solid var(--hair);
  background: rgba(11, 11, 22, 0.58);
  backdrop-filter: blur(10px);
}

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

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #cecae4;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease,
    background 0.2s ease, box-shadow 0.2s ease;
}

.rail-list a::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 10px;
  flex: 0 0 6px;
  border-radius: 1px;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rail-list a:hover,
.rail-list a.is-on {
  color: #fff;
  border-color: var(--line);
  background: linear-gradient(90deg, rgba(255, 0, 110, 0.2), rgba(255, 0, 0, 0.06));
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.35);
  transform: translateX(3px);
}

.rail-list a:hover::before,
.rail-list a.is-on::before {
  opacity: 1;
  transform: scale(1.4);
}

main {
  position: relative;
  z-index: 1;
  margin-left: var(--rail-w);
  padding: 0 clamp(16px, 3vw, 44px) 64px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.hero {
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: 60px 0 40px;
}

.hero-in {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  width: 100%;
  text-align: center;
}

.hero-mark {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255, 0, 110, 0.22), rgba(26, 26, 46, 0.7));
  box-shadow: 0 0 28px rgba(255, 0, 110, 0.42), inset 0 0 18px rgba(255, 0, 0, 0.25);
  padding: 10px;
}

.hero-body {
  max-width: 720px;
  min-width: 0;
}

h1.glitch {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.26;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 0, 110, 0.55), 0 0 46px rgba(255, 0, 0, 0.3);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0.8;
}

.glitch::before {
  color: var(--pink);
  transform: translate(2px, 0);
}

.glitch::after {
  color: #00e5ff;
  transform: translate(-2px, 0);
}

@media (prefers-reduced-motion: no-preference) {
  .glitch::before {
    animation: gl-a 5s infinite steps(1);
  }
  .glitch::after {
    animation: gl-b 4.2s infinite steps(1);
  }
}

@keyframes gl-a {
  0%, 86%, 100% { transform: translate(2px, 0); clip-path: inset(0 0 0 0); }
  89% { transform: translate(-4px, -2px); clip-path: inset(12% 0 54% 0); }
  93% { transform: translate(5px, 1px); clip-path: inset(46% 0 26% 0); }
}

@keyframes gl-b {
  0%, 82%, 100% { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
  86% { transform: translate(4px, 2px); clip-path: inset(58% 0 14% 0); }
  91% { transform: translate(-5px, -1px); clip-path: inset(18% 0 62% 0); }
}

.hero-line {
  margin: 0;
  color: var(--dim);
  font-size: 17px;
  max-width: 58ch;
  margin-inline: auto;
}

.body-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 28px;
  align-items: start;
}

.prose {
  min-width: 0;
  padding: clamp(20px, 2.6vw, 36px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 36px 0 10px;
  padding-left: 13px;
  border-left: 4px solid var(--red);
  font-size: 23px;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 0, 0.55);
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 19px;
  color: #fff;
  letter-spacing: 0.01em;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 6px;
}

.prose a {
  color: #ff9cc1;
  text-underline-offset: 3px;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.prose a:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.9);
}

.prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--pink);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 0, 110, 0.1);
  color: #f3e6ee;
}

.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.12);
  color: #b8f4ff;
}

.prose pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--hair);
  background: rgba(0, 0, 0, 0.45);
}

.prose img {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin: 18px 0;
}

.prose article + article {
  margin-top: 26px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.13);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border: 1px solid var(--hair);
  text-align: left;
}

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

.side {
  position: sticky;
  top: 22px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 26px rgba(255, 0, 110, 0.16);
}

.side-h {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.75);
}

.subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  color: var(--dim);
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-list a {
  display: block;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: #cfcbe4;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.side-list a:hover {
  color: #fff;
  background: rgba(255, 0, 110, 0.16);
  border-color: var(--line);
}

footer {
  position: relative;
  z-index: 1;
  margin-left: var(--rail-w);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 18px clamp(16px, 3vw, 44px);
  border-top: 1px solid var(--hair);
  background: rgba(11, 11, 22, 0.72);
}

.f-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  font-size: 16px;
  font-weight: 700;
}

.f-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 0, 110, 0.14);
  padding: 3px;
}

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

.f-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.f-list a:hover {
  color: #fff;
  background: rgba(255, 0, 110, 0.16);
}

.f-copy {
  font-size: 16px;
  color: var(--dim);
}

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.js-reveal [data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .glitch::before,
  .glitch::after {
    animation: none;
  }
}

@media (max-width: 1080px) {
  .body-row {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  [id] {
    scroll-margin-top: 124px;
  }
  .topbar {
    position: sticky;
    top: 0;
    width: auto;
    height: 56px;
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--hair);
    z-index: 60;
  }
  .rail {
    position: sticky;
    top: 56px;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    padding: 8px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--hair);
    z-index: 59;
  }
  .rail-list {
    flex-direction: row;
    gap: 8px;
  }
  .rail-list a {
    white-space: nowrap;
    padding: 8px 12px;
    min-height: 40px;
    font-size: 16px;
  }
  .rail-list a:hover,
  .rail-list a.is-on {
    transform: none;
  }
  main,
  footer {
    margin-left: 0;
  }
  .hero {
    min-height: 0;
    padding: 30px 0 26px;
  }
  .hero-in {
    gap: 16px;
  }
  .hero-mark {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 16px;
  }
  .body-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .side {
    position: static;
  }
  footer {
    justify-content: center;
    text-align: center;
  }
  .f-list {
    justify-content: center;
    order: 3;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 17px;
  }
  .prose {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .prose h2 {
    font-size: 21px;
  }
  .hero-in {
    flex-direction: column;
    text-align: center;
  }
}

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