@charset "utf-8";

:root {
  --bg: #000000;
  --panel: #0a0c14;
  --panel-2: #121212;
  --line: #1c2232;
  --line-soft: #131826;
  --ink: #f3f6ff;
  --body: #c6cde0;
  --dim: #8b93ab;
  --midnight: #1b2a5e;
  --neon: #43e3ff;
  --gold: #f4c95d;
  --violet: #a97bff;
  --r: 28px;
  --bar: 62px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Poppins", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 90;
  background: var(--neon);
  color: #04121a;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  transition: top 0.2s ease;
}

.skip:focus {
  top: 10px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--bar);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--neon);
  font-family: "Righteous", system-ui, sans-serif;
  font-size: 19px;
  line-height: 1;
  overflow: hidden;
}

.mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.find {
  flex: 1 1 auto;
  min-width: 0;
}

.find input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  appearance: none;
}

.find input::placeholder {
  color: var(--dim);
}

.menu-btn {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 64px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.menu-btn:hover,
.menu-btn[aria-expanded="true"] {
  border-color: var(--neon);
  color: var(--neon);
}

.drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 18px 16px 22px;
  background: #05070e;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dcol h2 {
  margin: 0 0 8px;
  font-family: "Righteous", "Poppins", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--gold);
}

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

.dcol a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  font-size: 16px;
  color: var(--body);
  border-radius: 12px;
  border: 1px solid transparent;
}

.dcol a:hover {
  color: var(--neon);
  border-color: var(--line);
  background: var(--panel);
}

/* ---------- shell ---------- */

.shell {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: 36px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 24px 64px;
}

.rail {
  position: sticky;
  top: calc(var(--bar) + 18px);
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, #080a12 0%, #04050a 100%);
  padding: 14px 10px;
}

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

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  font-size: 16px;
  color: var(--dim);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.rail a:hover {
  color: var(--ink);
  border-color: var(--midnight);
  background: #0b1226;
}

.rail a:active {
  color: var(--neon);
}

main {
  min-width: 0;
}

.wrap {
  min-width: 0;
}

.stage {
  min-width: 0;
}

.prose {
  max-width: 72ch;
  counter-reset: sec;
}

/* ---------- hero ---------- */

.hero {
  text-align: right;
  padding: 18px 0 10px;
}

.hero h1 {
  margin: 0;
  font-family: "Righteous", "Poppins", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 5.2vw, 46px);
  line-height: 1.24;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-shadow: 0 0 22px rgba(67, 227, 255, 0.28);
  overflow-wrap: anywhere;
}

.lede {
  margin: 14px 0 0 auto;
  max-width: 54ch;
  font-size: 16px;
  line-height: 1.85;
  color: var(--dim);
}

.hero-media {
  margin-top: 22px;
}

.hero-img {
  display: block;
  width: 100%;
  height: clamp(170px, 32vh, 330px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel-2);
}

/* ---------- content ---------- */

.prose > div {
  counter-increment: sec;
  padding: 26px 0 8px;
  border-top: 1px solid var(--line-soft);
}

.prose > div::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-family: "Righteous", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--gold);
}

.prose h2,
.prose h3 {
  font-family: "Righteous", "Poppins", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(169, 123, 255, 0.24);
  overflow-wrap: anywhere;
}

.prose h2 {
  margin: 30px 0 14px;
  font-size: clamp(21px, 3.2vw, 28px);
}

.prose h3 {
  margin: 24px 0 10px;
  font-size: clamp(18px, 2.4vw, 21px);
  color: #e6ebff;
}

.prose h2 > span,
.prose h3 > span {
  display: inline;
}

.prose p {
  margin: 0 0 16px;
  color: var(--body);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

.prose li::marker {
  color: var(--violet);
}

.prose blockquote {
  margin: 22px 0;
  padding: 12px 18px;
  border-left: 2px solid var(--gold);
  background: #070910;
  border-radius: 0 18px 18px 0;
  color: var(--dim);
}

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

.prose img {
  display: block;
  margin: 20px 0;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

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

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

.prose th {
  background: var(--panel);
  color: var(--ink);
}

.prose hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ---------- footer ---------- */

.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  border-top: 1px solid var(--line);
}

.f-brand .giant {
  margin: 0;
  font-family: "Righteous", "Poppins", system-ui, sans-serif;
  font-size: clamp(30px, 5.6vw, 56px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #26304d;
  overflow-wrap: anywhere;
}

.f-col h2 {
  margin: 0 0 12px;
  font-family: "Righteous", "Poppins", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.f-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.f-col a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--dim);
}

.f-col a:hover {
  color: var(--neon);
}

.f-mono {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
  overflow-wrap: anywhere;
}

.f-end {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.copy {
  margin: 0;
  font-size: 15px;
  color: #6c748c;
}

.f-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--body);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.f-links a:hover {
  color: var(--neon);
  border-color: var(--neon);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 16px 16px 48px;
  }

  .rail {
    top: var(--bar);
    z-index: 40;
    padding: 8px;
    border-radius: 20px;
    background: rgba(5, 7, 14, 0.96);
    backdrop-filter: blur(8px);
  }

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

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

  .rail a {
    white-space: nowrap;
    border-color: var(--line-soft);
    border-radius: 999px;
    padding: 6px 14px;
  }

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 36px 16px 26px;
  }

  .f-brand {
    grid-column: 1 / -1;
  }
}

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

  .drawer {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .prose {
    max-width: 100%;
  }

  .lede {
    max-width: 100%;
  }

  .hero-img {
    height: clamp(150px, 26vh, 220px);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

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