:root {
  --void: #0A1428;
  --abyss: #101A30;
  --panel: #16233F;
  --lime: #39FF88;
  --ember: #FF7A1A;
  --amber: #FFC24B;
  --fog: #A8B8D0;
  --moon: #E6EFF8;
  --datum: #FFD166;
  --teal: #2DE0C0;
  --title-font: "PingFang SC", "Microsoft YaHei", sans-serif;
  --body-font: "Noto Sans SC", "Source Han Sans CN", sans-serif;
  --mono-font: "DIN Alternate", "Roboto Mono", monospace;
  --rail-w: 72px;
  --container: 1240px;
  --clip: 14deg;
  --radius: 12px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  min-height: 100%;
  background: var(--void);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fog);
  background-color: var(--void);
  background-image:
    linear-gradient(rgba(46, 224, 192, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 224, 192, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul[class] {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

::selection {
  background: var(--lime);
  color: var(--void);
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--void);
}

::-webkit-scrollbar-thumb {
  background: var(--panel);
  border-radius: 8px;
  border: 2px solid var(--void);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--lime);
}

h1,
h2,
h3,
h4 {
  font-family: var(--title-font);
  font-weight: 900;
  color: var(--moon);
  line-height: 1.25;
}

.container {
  width: min(var(--container), calc(100vw - 48px));
  margin-inline: auto;
}

#main-content {
  margin-left: var(--rail-w);
  padding-top: 96px;
  min-height: calc(100vh - 72px);
  position: relative;
  z-index: 1;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 16px);
  z-index: 200;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--void);
  font-weight: 900;
  font-size: 14px;
  border-radius: 6px;
  transform: translateY(-300%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: relative;
  z-index: 90;
}

.brand-rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: var(--rail-w);
  height: 100vh;
  background: var(--abyss);
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 4px);
  border-right: 1px solid rgba(46, 224, 192, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 24px;
}

.rail-ep {
  writing-mode: vertical-rl;
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--lime);
  text-transform: uppercase;
}

.rail-mark {
  writing-mode: vertical-rl;
  font-family: var(--title-font);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.35em;
  color: var(--moon);
}

.rail-status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: rail-pulse 2.4s infinite;
}

@keyframes rail-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.rail-tag {
  width: 26px;
  height: 26px;
  background: var(--ember);
  color: var(--void);
  font-family: var(--mono-font);
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  border-radius: 4px;
  transform: skewY(-14deg);
}

.nav-mast {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 88;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 56px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  pointer-events: none;
}

.nav-mast a,
.nav-mast button {
  pointer-events: auto;
}

body[data-scrolled="true"] .nav-mast,
body[data-nav-open] .nav-mast {
  background: rgba(16, 26, 48, 0.96);
  border-bottom-color: rgba(57, 255, 136, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.brand-lock {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
  margin-right: auto;
}

.brand-name {
  font-family: var(--title-font);
  font-weight: 900;
  font-size: 28px;
  color: var(--moon);
  letter-spacing: 0.08em;
  position: relative;
}

.brand-name::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.brand-tag {
  font-family: var(--mono-font);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fog);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 95;
}

.toggle-line {
  width: 26px;
  height: 2px;
  background: var(--moon);
  transition: transform 0.3s var(--ease), opacity 0.2s, background 0.2s;
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--lime);
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--lime);
}

.site-nav {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 85;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 56px);
  pointer-events: none;
}

.site-nav a {
  pointer-events: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--fog);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.nav-list a:hover {
  color: var(--lime);
  background: rgba(57, 255, 136, 0.1);
  transform: translateY(-2px);
}

.nav-list a[aria-current="page"] {
  color: var(--moon);
  background: rgba(57, 255, 136, 0.14);
  box-shadow: inset 0 -2px 0 var(--lime);
}

.nav-label {
  font-family: var(--body-font);
  font-weight: 700;
}

.nav-index {
  font-family: var(--mono-font);
  font-size: 11px;
  color: var(--datum);
  opacity: 0.85;
}

.btn-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--lime);
  color: var(--void);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.06em;
  border-radius: 6px;
  transform: skewX(-10deg);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-cta span {
  display: inline-block;
  transform: skewX(10deg);
}

.btn-cta:hover {
  background: var(--ember);
  box-shadow: 0 0 24px rgba(255, 122, 26, 0.4);
  transform: skewX(-10deg) translateY(-2px);
}

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--abyss);
  border-top: 1px solid rgba(46, 224, 192, 0.2);
  padding-left: var(--rail-w);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lime) 0%, var(--teal) 40%, var(--ember) 100%);
  transform: skewY(-1deg);
  transform-origin: left top;
}

.footer-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px clamp(20px, 4vw, 48px) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1.2fr;
  gap: 56px;
  margin-bottom: 56px;
}

.footer-brand::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  background: linear-gradient(90deg, var(--lime), var(--ember));
  border-radius: 999px;
  margin-bottom: 18px;
}

.footer-logo {
  font-family: var(--title-font);
  font-weight: 900;
  font-size: 40px;
  color: var(--moon);
  letter-spacing: 0.06em;
}

.footer-logo::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.footer-tagline {
  margin-top: 8px;
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--fog);
}

.footer-contact {
  margin-top: 20px;
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--datum);
}

.footer-heading {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--moon);
  margin-bottom: 16px;
}

.heading-index {
  display: inline-block;
  font-family: var(--mono-font);
  font-size: 11px;
  color: var(--lime);
  border: 1px solid rgba(57, 255, 136, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: 2px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  column-gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--fog);
  transition: color 0.2s, transform 0.2s;
}

.footer-links a::before {
  content: "\2192";
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--lime);
  transform: translateX(-6px);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
}

.footer-links a:hover {
  color: var(--lime);
  transform: translateX(4px);
}

.footer-links a:hover::before {
  transform: none;
  opacity: 1;
}

.footer-note {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--fog);
  border-left: 2px solid var(--teal);
  padding-left: 12px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 28px;
  margin-top: 56px;
  border-top: 1px solid rgba(46, 224, 192, 0.16);
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--fog);
}

.footer-copy,
.footer-icp {
  margin: 0;
}

.back-top {
  position: fixed;
  right: 28px;
  bottom: 32px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--lime);
  color: var(--void);
  font-size: 20px;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 1px solid rgba(46, 224, 192, 0.4);
  box-shadow: 0 8px 24px rgba(57, 255, 136, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s, background 0.2s;
}

body[data-scrolled="true"] .back-top {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-top:hover {
  background: var(--ember);
  box-shadow: 0 8px 24px rgba(255, 122, 26, 0.4);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--align {
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(46, 224, 192, 0.18);
  border-radius: var(--radius);
  padding: 24px;
}

.panel--glow {
  box-shadow: 0 0 0 1px rgba(57, 255, 136, 0.1), 0 20px 60px rgba(0, 0, 0, 0.35);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(57, 255, 136, 0.1);
  color: var(--lime);
  border: 1px solid rgba(57, 255, 136, 0.3);
}

.chip--hot {
  background: rgba(255, 122, 26, 0.12);
  color: var(--ember);
  border-color: rgba(255, 122, 26, 0.35);
}

.chip--warn {
  background: rgba(255, 194, 75, 0.1);
  color: var(--amber);
  border-color: rgba(255, 194, 75, 0.3);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 900;
  font-size: 14px;
  border-radius: 6px;
  background: var(--lime);
  color: var(--void);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--ember);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 122, 26, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--moon);
  border: 1px solid var(--teal);
}

.btn--outline:hover {
  border-color: var(--lime);
  background: rgba(57, 255, 136, 0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--fog);
}

.btn--ghost:hover {
  color: var(--lime);
  background: rgba(57, 255, 136, 0.08);
}

.eyebrow {
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--lime);
  text-transform: uppercase;
}

.section-head {
  margin-bottom: 40px;
}

.section-index {
  font-family: var(--mono-font);
  color: var(--datum);
  font-size: 14px;
  margin-right: 12px;
}

.section-title {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 900;
  color: var(--moon);
}

.section-sub {
  max-width: 560px;
  font-size: 15px;
  color: var(--fog);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 0;
  font-family: var(--mono-font);
  font-size: 13px;
  list-style: none;
}

.breadcrumb li::before {
  content: "//";
  margin-right: 8px;
  color: var(--teal);
}

.breadcrumb li:first-child::before {
  content: "";
  margin-right: 0;
}

.breadcrumb a {
  color: var(--fog);
}

.breadcrumb a:hover {
  color: var(--lime);
}

.breadcrumb [aria-current="page"] {
  color: var(--moon);
}

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(46, 224, 192, 0.22);
  background: var(--panel);
  aspect-ratio: 16 / 9;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(57, 255, 136, 0.08));
  pointer-events: none;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--tilted {
  transform: skewY(-1.5deg);
}

.media-frame--tilted > * {
  transform: skewY(1.5deg);
}

.media-label {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--ember);
  color: var(--void);
  font-family: var(--mono-font);
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
}

.media-caption {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px 0;
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--fog);
}

.prose {
  font-size: 15px;
  line-height: 1.9;
  color: var(--fog);
}

.prose h2,
.prose h3 {
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--moon);
}

.prose p {
  margin-bottom: 16px;
}

.prose strong {
  color: var(--moon);
}

.prose code {
  font-family: var(--mono-font);
  color: var(--datum);
  background: rgba(255, 209, 102, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.text-monospace {
  font-family: var(--mono-font);
}

.text-datum {
  color: var(--datum);
}

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

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal="left"] {
  transform: translateX(-32px);
}

[data-reveal="right"] {
  transform: translateX(32px);
}

[data-reveal="none"] {
  transform: none;
}

[data-visible] {
  opacity: 1;
  transform: none;
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .nav-mast,
  .site-nav {
    padding: 0 16px;
  }

  .site-nav {
    gap: 8px;
  }

  .nav-list {
    gap: 2px;
  }

  .nav-list a {
    padding: 8px 10px;
    font-size: 14px;
  }

  .brand-tag {
    display: none;
  }
}

@media (max-width: 1023px) {
  #main-content,
  .site-footer {
    margin-left: 0;
  }

  .site-footer {
    padding-left: 0;
  }

  .brand-rail {
    display: none;
  }

  .nav-mast {
    left: 0;
    padding: 0 16px;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    inset: 72px 0 0 0;
    left: 0;
    right: 0;
    height: auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    background: var(--abyss);
    border-top: 1px solid var(--lime);
    overflow-y: auto;
    pointer-events: auto;
    z-index: 75;
  }

  .site-nav[data-open] {
    display: flex;
  }

  .site-nav a {
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
    margin-left: 0;
  }

  .nav-list a {
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 18px;
    border-bottom: 1px solid rgba(46, 224, 192, 0.12);
  }

  .btn-cta {
    margin-left: 0;
    margin-top: 16px;
    display: flex;
    justify-content: center;
    transform: skewX(-10deg);
  }

  .brand-tag {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

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

@media (max-width: 767px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  .section-title {
    font-size: 32px;
  }
}

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

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

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
