:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #0b0e14;
  --panel-2: #121212;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --txt: #f4f7fc;
  --mut: #a2afc2;
  --neon: #7cffb2;
  --blue: #5a8cff;
  --gold: #e9c46a;
  --purple: #b08bff;
  --r: 18px;
  --head: 142px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #000;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--txt);
  background-color: #000;
  background-image: radial-gradient(rgba(90, 140, 255, 0.13) 1px, transparent 1.4px);
  background-size: 26px 26px;
  background-attachment: fixed;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--neon);
  text-decoration: none;
}

a:hover {
  color: #fff;
}

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

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

/* 顶部：品牌独占一行，菜单行在下 */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.top-brand {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-right: auto;
  color: var(--txt);
}

.brand:hover {
  color: #fff;
}

.brand-mark,
.brand-img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: linear-gradient(150deg, rgba(90, 140, 255, 0.35), rgba(124, 255, 178, 0.16));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  box-shadow: 0 0 22px rgba(90, 140, 255, 0.24);
}

.brand-img {
  object-fit: cover;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search input {
  width: 190px;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--txt);
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid var(--line-2);
  border-radius: 999px;
}

.search input::placeholder {
  color: var(--mut);
}

.search button,
.menu-toggle {
  min-height: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 16px;
  color: var(--txt);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
}

.search button:hover,
.menu-toggle:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.menu-toggle {
  display: none;
}

.search-status {
  font-size: 16px;
  color: var(--gold);
  white-space: nowrap;
}

.top-menu {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 2px 20px 12px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #24304a transparent;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt);
  background: rgba(255, 255, 255, 0.04);
  font-size: 16px;
  white-space: nowrap;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.pill:hover {
  border-color: rgba(124, 255, 178, 0.55);
  background: rgba(124, 255, 178, 0.1);
  color: var(--neon);
}

.pill:first-child {
  background: linear-gradient(135deg, var(--neon), #4be0ff);
  border-color: transparent;
  color: #03120b;
  font-weight: 600;
}

/* 首屏 */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(90, 140, 255, 0.22), transparent 65%),
    radial-gradient(680px 440px at 88% 78%, rgba(176, 139, 255, 0.16), transparent 70%),
    #000;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  filter: brightness(0.62) saturate(1.05);
  will-change: transform;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #000 2%, rgba(0, 0, 0, 0.82) 38%, rgba(0, 0, 0, 0.38) 74%, rgba(0, 0, 0, 0.72) 100%),
    radial-gradient(rgba(124, 255, 178, 0.12) 1px, transparent 1.4px);
  background-size: auto, 24px 24px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(var(--head) + 40px) 20px 9vh;
}

.hero h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(2.15rem, 6.2vw, 4.3rem);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-shadow: 0 0 30px rgba(90, 140, 255, 0.35);
}

.hero-desc {
  max-width: 48ch;
  margin: 22px 0 0;
  color: #cfd9e6;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--neon);
}

.cue::before {
  content: "";
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--neon), transparent);
}

/* 正文骨架：main > section > article，侧栏在左 */
main {
  display: block;
}

.wrap {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(20px, 3.4vw, 44px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 68px) 20px 0;
}

.side {
  grid-column: 1;
  position: sticky;
  top: calc(var(--head) + 16px);
  animation: rise 0.5s ease both;
}

.side-card {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(165deg, rgba(22, 30, 45, 0.84), rgba(8, 10, 16, 0.92));
  box-shadow: 0 22px 46px -30px #000, inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

.side-card small {
  display: block;
  font-size: 16px;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.side-title {
  margin: 2px 0 14px;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.side-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border-top: 1px solid var(--line);
}

.side-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  color: #d7e0ec;
  font-size: 16px;
  line-height: 1.4;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.side-list li a:hover {
  color: var(--neon);
  padding-left: 6px;
}

.side-num {
  font-size: 16px;
  color: var(--mut);
  font-variant-numeric: tabular-nums;
}

.side-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--mut);
}

.side-top:hover {
  color: var(--neon);
}

section > article {
  grid-column: 2;
  min-width: 0;
  margin: 0 0 24px;
  padding: clamp(22px, 3.6vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(163deg, rgba(20, 27, 40, 0.86), rgba(7, 9, 14, 0.94));
  box-shadow: 0 30px 60px -38px #000, inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  scroll-margin-top: calc(var(--head) + 18px);
  animation: rise 0.55s ease both;
}

section > article:nth-of-type(1) { animation-delay: 0.04s; }
section > article:nth-of-type(2) { animation-delay: 0.09s; }
section > article:nth-of-type(3) { animation-delay: 0.14s; }
section > article:nth-of-type(4) { animation-delay: 0.19s; }
section > article:nth-of-type(5) { animation-delay: 0.24s; }
section > article:nth-of-type(6) { animation-delay: 0.29s; }
section > article:nth-of-type(7) { animation-delay: 0.34s; }

section > article:last-of-type {
  margin-bottom: 0;
}

section > article.hit {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

/* 正文排版 */
section h2 {
  margin: 4px 0 14px;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

section h3 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
  line-height: 1.45;
  color: #eaf1fa;
}

section small {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: none;
}

section p {
  margin: 0 0 16px;
  color: #dbe3ee;
}

section ul,
section ol {
  margin: 0 0 18px;
  padding-left: 1.35em;
}

section li {
  margin-bottom: 8px;
}

section li::marker {
  color: var(--neon);
}

section strong {
  color: #fff;
}

section blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--blue);
  border-radius: 0 12px 12px 0;
  background: rgba(90, 140, 255, 0.09);
  color: #dbe6f6;
}

section a {
  text-decoration: underline;
  text-decoration-color: rgba(124, 255, 178, 0.45);
  text-underline-offset: 3px;
}

section hr {
  margin: 26px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

section img {
  border-radius: 14px;
  border: 1px solid var(--line);
}

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

section th,
section td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

section th {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

section code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.94em;
}

section pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #06080d;
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 34px;
  max-width: 1240px;
  margin: clamp(40px, 6vw, 78px) auto 0;
  padding: 34px 20px 46px;
  border-top: 1px solid var(--line);
}

.foot-brand {
  font-size: clamp(1.9rem, 6vw, 3.9rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 0 24px rgba(90, 140, 255, 0.35);
}

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0;
}

.foot-nav dt {
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--mut);
}

.foot-nav dd {
  margin: 0;
}

.foot-nav dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  color: #d7e0ec;
  font-size: 16px;
  border-bottom: 1px solid transparent;
}

.foot-nav dd a:hover {
  color: var(--neon);
  border-color: rgba(124, 255, 178, 0.5);
}

.copy {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  color: var(--mut);
  font-size: 16px;
}

.copy .to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--txt);
  font-size: 16px;
}

.copy .to-top:hover {
  border-color: var(--neon);
  color: var(--neon);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  :root {
    --head: 150px;
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    grid-column: 1;
    position: static;
  }

  .side-card {
    padding: 16px;
  }

  .side-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  section > article {
    grid-column: 1;
  }

  .copy {
    margin-left: 0;
  }
}

@media (max-width: 820px) {
  html.js .top-menu {
    display: none;
  }

  html.js.menu-open .top-menu {
    display: flex;
  }

  html.js .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .top-brand {
    flex-wrap: wrap;
  }

  .search {
    order: 3;
    width: 100%;
  }

  .search input {
    width: 100%;
    flex: 1 1 auto;
  }

  .hero-inner {
    padding-top: calc(var(--head) + 26px);
    padding-bottom: 7vh;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .side-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot {
    gap: 14px;
  }

  .foot-brand {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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