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

:root {
  --mag: #ff0080;
  --pink: #ff00ff;
  --ink: #26171f;
  --bg: #120b10;
  --panel: #1d1219;
  --line: rgba(255, 0, 128, .3);
  --tx: #eddae4;
  --tx-dim: #b49aab;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --disp: 'Orbitron', 'JetBrains Mono', ui-sans-serif, system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  padding-left: 236px;
  min-height: 100vh;
  font-family: var(--mono);
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--tx);
  background-color: var(--bg);
  background-image:
    radial-gradient(58vw 58vw at 88% -12%, rgba(255, 0, 128, .34), transparent 62%),
    radial-gradient(46vw 46vw at 4% 14%, rgba(255, 0, 255, .22), transparent 62%),
    radial-gradient(66vw 46vw at 76% 108%, rgba(255, 0, 255, .2), transparent 66%),
    radial-gradient(42vw 42vw at 16% 78%, rgba(255, 0, 128, .16), transparent 70%);
  background-size: 180% 180%;
  background-repeat: no-repeat;
  animation: flow 34s ease-in-out infinite alternate;
}

@keyframes flow {
  from { background-position: 0% 0%; }
  to { background-position: 100% 100%; }
}

a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}

a:hover { color: #fff; }

h1, h2, h3 {
  font-family: var(--disp);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: .01em;
  margin: 0 0 .55em;
  color: #fff;
}

h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h3 { font-size: 1.06rem; }

p { margin: 0 0 1em; }

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

.skip {
  position: fixed;
  left: 8px;
  top: -70px;
  z-index: 60;
  padding: 12px 16px;
  font-size: 14px;
  background: var(--mag);
  color: #140b11;
  text-decoration: none;
  transition: top .2s ease;
}

.skip:focus { top: 8px; color: #140b11; }

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

/* ---------- 左侧竖排栏 ---------- */

.rail-wrap {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px 24px 20px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(38, 23, 31, .93), rgba(18, 11, 16, .97));
  backdrop-filter: blur(8px);
}

.mark {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--mag);
  text-decoration: none;
  box-shadow: 0 0 20px rgba(255, 0, 128, .45), inset 0 0 18px rgba(255, 0, 255, .18);
}

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

.mark-ch {
  font-family: var(--disp);
  font-weight: 900;
  font-size: 20px;
  color: var(--pink);
  text-shadow: 0 0 14px var(--mag);
}

.rail { flex: 1 1 auto; }

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: navn;
}

.rail-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 0, 255, .14);
}

.rail-glab {
  font-size: 11px;
  letter-spacing: .36em;
  color: var(--tx-dim);
}

.rail-a,
.rail-sub a {
  display: block;
  min-height: 42px;
  padding: 11px 8px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--tx);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.rail-a::before {
  counter-increment: navn;
  content: counter(navn, decimal-leading-zero) " ";
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mag);
}

.rail-a:hover,
.rail-sub a:hover {
  color: #fff;
  border-left-color: var(--pink);
  background: rgba(255, 0, 128, .14);
}

.rail-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px dashed rgba(255, 0, 255, .32);
  overflow: hidden;
}

.rail-sub a { font-size: 15px; }
.rail-sub a::before {
  content: "· ";
  color: var(--pink);
}

@media (min-width: 921px) {
  .rail-sub {
    max-height: 0;
    opacity: 0;
    transition: max-height .32s ease, opacity .24s ease;
  }

  .rail-cell:hover .rail-sub,
  .rail-cell:focus-within .rail-sub {
    max-height: 260px;
    opacity: 1;
  }
}

/* ---------- 主体 ---------- */

main {
  max-width: 1120px;
  padding: 0 26px 0 30px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 26px;
  align-items: center;
  min-height: 45vh;
  padding: 46px 0 36px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 0, 255, .62) 1px, transparent 1px);
  background-size: 15px 15px;
  opacity: .16;
}

.hero-txt { position: relative; }

.eyebrow {
  font-family: var(--disp);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .42em;
  color: var(--pink);
  margin: 0 0 10px;
  text-shadow: 0 0 16px rgba(255, 0, 255, .8);
}

.hero h1 {
  margin-bottom: .4em;
  text-shadow: 0 0 30px rgba(255, 0, 128, .45);
}

.lede {
  margin: 0 0 1em auto;
  max-width: 50ch;
  color: var(--tx-dim);
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 13px 24px;
  margin-top: 8px;
  font-family: var(--disp);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .18em;
  color: #140b11;
  text-decoration: none;
  background: linear-gradient(90deg, var(--mag), var(--pink));
  box-shadow: 0 12px 32px rgba(255, 0, 128, .38);
}

.btn:hover {
  color: #140b11;
  filter: brightness(1.15);
}

.hero-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 0, 255, .24);
  background: rgba(38, 23, 31, .5);
}

.orb {
  width: 100%;
  height: auto;
  max-width: 232px;
  filter: drop-shadow(0 0 26px rgba(255, 0, 128, .5));
  animation: spin 40s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
  mix-blend-mode: screen;
}

/* ---------- 正文区 ---------- */

.doc {
  display: grid;
  grid-template-columns: 202px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 38px 0 12px;
}

.side {
  position: sticky;
  top: 22px;
  padding: 18px 15px 14px;
  border: 1px solid var(--line);
  background: rgba(29, 18, 25, .78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .5);
}

.side h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: .16em;
}

.subtitle {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--mag);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 0, 255, .22);
}

.side-list a {
  display: block;
  padding: 11px 4px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--tx);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 255, .1);
}

.side-list a:hover {
  color: #fff;
  background: rgba(255, 0, 128, .14);
}

.doc-body {
  min-width: 0;
}

.doc-body > article {
  margin: 0 0 26px;
  padding: 26px 26px 30px;
  border: 1px solid rgba(255, 0, 255, .18);
  border-left: 3px solid var(--mag);
  background: linear-gradient(180deg, rgba(38, 23, 31, .88), rgba(22, 14, 20, .92));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .44);
}

.doc-body > article[id] { scroll-margin-top: 26px; }

.doc-body > article > *:first-child { margin-top: 0; }

.doc-body h2 {
  font-size: clamp(1.24rem, 2.4vw, 1.5rem);
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 0, 255, .4);
}

.doc-body h2::after {
  content: "";
  display: block;
  width: 62px;
  height: 2px;
  margin-top: .55em;
  background: linear-gradient(90deg, var(--pink), var(--mag), transparent);
}

.doc-body .subtitle {
  font-size: 13px;
  margin: -.1em 0 1.1em;
}

.doc-body p,
.doc-body li {
  max-width: 68ch;
}

.doc-body p { margin: 0 0 1.05em; }

.doc-body ul,
.doc-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.doc-body li { margin: .4em 0; }

.doc-body strong { color: #fff; }

.doc-body a { font-weight: 500; }

.doc-body img {
  display: block;
  margin: 1.1em 0;
  border: 1px solid var(--line);
}

.doc-body blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  border-left: 2px solid var(--pink);
  background: rgba(255, 0, 255, .08);
  color: var(--tx);
}

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

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1em 0;
  font-size: 15.5px;
}

.doc-body th,
.doc-body td {
  padding: 9px 10px;
  border: 1px solid rgba(255, 0, 255, .22);
  text-align: left;
}

.doc-body th { background: rgba(255, 0, 128, .16); }

.doc-body hr {
  border: 0;
  height: 1px;
  margin: 1.6em 0;
  background: linear-gradient(90deg, var(--mag), transparent);
}

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

.foot {
  margin-top: 44px;
  padding: 46px 30px 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(255, 0, 128, .09));
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.foot-brand {
  margin: 0;
  font-family: var(--disp);
  font-weight: 900;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -.01em;
  color: transparent;
  background: linear-gradient(90deg, var(--mag), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
}

.foot-addr {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15.5px;
  color: var(--tx-dim);
  word-break: break-word;
}

.addr-k {
  font-family: var(--disp);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--pink);
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.foot-links a {
  display: block;
  padding: 9px 0;
  font-size: 16px;
  color: var(--tx);
  text-decoration: none;
}

.foot-links a:hover { color: #fff; }

.foot-copy {
  margin: 28px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 0, 255, .16);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--tx-dim);
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: inline-block;
  padding: 12px 15px;
  font-family: var(--disp);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--pink);
  text-decoration: none;
  border: 1px solid var(--mag);
  background: rgba(38, 23, 31, .92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55);
}

.to-top:hover {
  color: #140b11;
  background: var(--mag);
}

/* ---------- 滚动显现 ---------- */

.js [data-rev] {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity .55s ease, transform .55s ease;
}

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

/* ---------- 移动端 ---------- */

@media (max-width: 920px) {
  body { padding-left: 0; }

  .rail-wrap {
    position: sticky;
    inset: auto;
    top: 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }

  .mark img { width: 40px; height: 40px; }

  .rail {
    flex: 1 1 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rail-list {
    flex-direction: row;
    align-items: stretch;
    gap: 6px;
  }

  .rail-cell {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .rail-glab { display: none; }

  .rail-sub {
    flex-direction: row;
    gap: 4px;
    padding: 0;
    border-left: 0;
    max-height: none;
    opacity: 1;
    overflow: visible;
  }

  .rail-a,
  .rail-sub a {
    padding: 12px 12px;
    min-height: 42px;
    font-size: 15px;
    white-space: nowrap;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .rail-a::before { display: none; }

  .rail-a:hover,
  .rail-sub a:hover { border-bottom-color: var(--pink); }

  main { padding: 0 16px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 24px 0 22px;
  }

  .hero-fig {
    max-width: 158px;
    margin-left: auto;
    order: 2;
  }

  .lede { font-size: 15.5px; }

  .doc {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0 8px;
  }

  .side { position: static; }

  .side-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-top: 0;
    padding-top: 4px;
  }

  .side-list a {
    padding: 10px 11px;
    font-size: 15px;
    border: 1px solid var(--line);
  }

  .doc-body > article {
    padding: 18px 15px 22px;
    margin-bottom: 18px;
  }

  .doc-body > article[id] { scroll-margin-top: 76px; }

  .foot { padding: 32px 16px 20px; }

  .foot-cols { grid-template-columns: 1fr; gap: 20px; }

  .to-top { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; }
  .orb { animation: none; }

  .js [data-rev] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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