@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;600;700&display=swap');

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

html {
  background: #0d0d0d;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 292px;
  grid-template-areas:
    "rail deck side"
    "foot foot foot";
  column-gap: 36px;
  align-content: start;
  max-width: 1460px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 28px;
  background:
    radial-gradient(1200px 640px at 88% -12%, rgba(255, 0, 255, .16), transparent 62%),
    radial-gradient(980px 560px at 4% 108%, rgba(128, 0, 255, .2), transparent 64%),
    #0d0d0d;
  color: #e7e0f5;
  font-family: 'Be Vietnam Pro', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* 扫描线覆盖层 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .5;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, .035) 0 1px,
    rgba(0, 0, 0, 0) 1px 3px
  );
}

::selection {
  background: #ff00ff;
  color: #0d0d0d;
}

a { color: #e79bff; }
a:focus-visible {
  outline: 2px solid #ff00ff;
  outline-offset: 2px;
}

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

/* ---------- 左侧竖排导航 ---------- */
.rail {
  grid-area: rail;
  position: sticky;
  top: 0;
  align-self: start;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  padding: 26px 0 22px;
  border-right: 1px solid rgba(128, 0, 255, .3);
  overflow-y: auto;
  scrollbar-width: thin;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #ff00ff;
  color: #ff00ff;
  text-decoration: none;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  animation: pulse 3.6s ease-in-out infinite;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mark-glyph {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 255, .28); }
  50% { box-shadow: 0 0 26px rgba(255, 0, 255, .72); }
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav li[hidden] { display: none; }

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid transparent;
  color: #b6a6d4;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.rail-nav a:hover,
.rail-nav a.on {
  color: #ffffff;
  background: rgba(128, 0, 255, .16);
  border-color: rgba(255, 0, 255, .55);
}

.dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: currentColor;
  opacity: .85;
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.dot1 { border-radius: 50%; transform: none; }
.dot2 { transform: none; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.dot3 { transform: none; clip-path: polygon(0 0, 100% 0, 0 100%); }

.rail-nav a:hover .dot { transform: rotate(135deg); }
.rail-nav a:hover .dot1 { transform: scale(1.35); }
.rail-nav a:hover .dot2 { transform: none; }

.scan { margin-top: auto; }

.scan input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(128, 0, 255, .5);
  border-radius: 0;
  background: rgba(13, 13, 13, .92);
  color: #e7e0f5;
  font: inherit;
  font-size: 16px;
}

.scan input::placeholder { color: #7a6d96; }

.scan input:focus {
  outline: none;
  border-color: #ff00ff;
  box-shadow: 0 0 0 1px rgba(255, 0, 255, .55), 0 0 20px rgba(255, 0, 255, .25);
}

/* ---------- 主内容 ---------- */
.deck {
  grid-area: deck;
  min-width: 0;
  padding-bottom: 52px;
}

main > article {
  position: relative;
  padding-block: clamp(34px, 5vw, 56px);
  scroll-margin-top: 20px;
}

main > article + article {
  border-top: 1px solid rgba(128, 0, 255, .26);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 34px;
  min-height: 70vh;
  padding-block: clamp(38px, 7vh, 82px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  background-image: radial-gradient(rgba(128, 0, 255, .55) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(circle at 72% 44%, #000 0%, transparent 74%);
  mask-image: radial-gradient(circle at 72% 44%, #000 0%, transparent 74%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: left;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.012em;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(255, 0, 255, .5), 0 0 64px rgba(128, 0, 255, .34);
}

.hero-fig {
  position: relative;
  z-index: 1;
  margin: 0;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 0, 255, .42);
  background:
    linear-gradient(140deg, rgba(255, 0, 255, .1), rgba(128, 0, 255, .12)),
    rgba(13, 13, 13, .6);
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.hero-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.1) contrast(1.05);
}

.hero-void {
  width: 64%;
  height: 64%;
  background-image:
    linear-gradient(rgba(255, 0, 255, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 255, .5) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: .7;
}

/* 正文排版 */
main h2 {
  margin: 0 0 14px;
  font-size: clamp(1.28rem, 2.3vw, 1.7rem);
  font-weight: 600;
  line-height: 1.34;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(128, 0, 255, .5);
}

main h3 {
  margin: 26px 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #f2ecff;
}

main p {
  margin: 0 0 1em;
  max-width: 68ch;
  color: #cec3e2;
}

main strong { color: #ffffff; font-weight: 600; }

main ul,
main ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
  max-width: 68ch;
}

main li { margin-bottom: .5em; }

main li::marker { color: #ff00ff; }

main blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  border-left: 3px solid #ff00ff;
  background: rgba(128, 0, 255, .09);
  color: #ded4ee;
}

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

main a {
  text-decoration-color: rgba(255, 0, 255, .55);
  text-underline-offset: 3px;
}

main a:hover { color: #ffa6f6; }

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 16px;
}

main th,
main td {
  border: 1px solid rgba(128, 0, 255, .35);
  padding: 9px 11px;
  text-align: left;
}

main th { background: rgba(128, 0, 255, .16); color: #fff; }

main code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95em;
  color: #ff8bf5;
}

/* ---------- 右侧栏 ---------- */
.side {
  grid-area: side;
  align-self: start;
  position: sticky;
  top: 28px;
  margin-top: 30px;
  padding: 20px 18px 22px;
  border: 1px solid rgba(128, 0, 255, .45);
  background: rgba(128, 0, 255, .08);
}

.side::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #8000ff, #ff00ff);
}

.side h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.45;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 0, 255, .45);
}

.side .subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.72;
  color: #a99ac6;
}

/* ---------- 页脚 ---------- */
.foot {
  grid-area: foot;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 26px;
  margin-top: 26px;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(128, 0, 255, .36);
}

.foot address {
  font-style: normal;
  font-size: 16px;
  letter-spacing: .06em;
  color: #ffffff;
  text-shadow: 0 0 16px rgba(128, 0, 255, .55);
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-self: center;
  gap: 2px 20px;
}

.foot ul a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #b6a6d4;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.foot ul a:hover {
  color: #ff00ff;
  border-bottom-color: #ff00ff;
}

.foot-copy {
  margin: 0;
  font-size: 16px;
  color: #8c7fa8;
  white-space: nowrap;
}

/* 列表错峰入场 */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.rail-nav li { animation: rise .5s both; }
.rail-nav li:nth-child(1) { animation-delay: .04s; }
.rail-nav li:nth-child(2) { animation-delay: .09s; }
.rail-nav li:nth-child(3) { animation-delay: .14s; }
.rail-nav li:nth-child(4) { animation-delay: .19s; }
.rail-nav li:nth-child(5) { animation-delay: .24s; }
.rail-nav li:nth-child(6) { animation-delay: .29s; }
.rail-nav li:nth-child(7) { animation-delay: .34s; }

/* ---------- 断点 ---------- */
@media (max-width: 1180px) {
  body {
    grid-template-columns: 198px minmax(0, 1fr) 232px;
    column-gap: 24px;
    padding: 0 18px;
  }
  .hero { gap: 24px; }
}

@media (max-width: 980px) {
  body {
    display: block;
    max-width: 760px;
    padding: 0 16px;
  }

  .rail {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "mark nav"
      "scan scan";
    align-items: center;
    gap: 8px 12px;
    height: auto;
    padding: 10px 0 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(128, 0, 255, .35);
    background: rgba(13, 13, 13, .95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    overflow: visible;
  }

  .mark {
    grid-area: mark;
    width: 42px;
    height: 42px;
  }

  .rail-nav {
    grid-area: nav;
    min-width: 0;
  }

  .rail-nav ul {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .rail-nav ul::-webkit-scrollbar { display: none; }

  .rail-nav a {
    white-space: nowrap;
    min-height: 42px;
    padding: 9px 12px;
  }

  .scan {
    grid-area: scan;
    margin-top: 0;
  }

  .scan input { min-height: 40px; padding: 7px 11px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    gap: 22px;
    padding-block: 32px 34px;
  }

  .hero-fig { aspect-ratio: 16 / 10; }

  .side {
    position: static;
    margin: 26px 0 0;
  }

  .side::after { position: absolute; }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 8px;
  }

  .foot ul { justify-self: start; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 1.9rem; }
}

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

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