:root {
  --bg: #0B1026;
  --bg-deep: #0A0E1F;
  --bg-card: #141E3A;
  --ink: #FFFFFF;
  --slate: #8FA7CC;
  --muted: #A8B8C8;
  --accent: #FF6A00;
  --accent-dark: #CC4C00;
  --alt: #39FF14;
  --alt-dark: #1FA62A;
  --border: rgba(143, 167, 204, 0.28);
  --font-title: 'Oswald', 'Noto Sans SC', 'Arial Narrow', sans-serif;
  --font-mono: 'Roboto Mono', 'Consolas', monospace;
  --header-w: 280px;
  --gap: 24px;
  --radius: 8px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  padding-left: var(--header-w);
  min-height: 100vh;
}

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

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

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

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

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

#main-content {
  display: block;
  min-height: 70vh;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--header-w);
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  z-index: 1000;
  display: flex;
}

.header-rail {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--gap);
  gap: var(--gap);
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateY(-120%);
  background: var(--accent);
  color: var(--bg-deep);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 10px 16px;
  z-index: 2000;
  border-radius: 0 0 8px 0;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-text em {
  font-style: normal;
  color: var(--accent);
  font-size: 0.6em;
  vertical-align: super;
  margin-left: 2px;
}

.brand-round {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--alt);
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.3);
  padding: 4px 8px;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--slate);
  background: transparent;
  border-left: 2px solid transparent;
  transition: color 0.2s, background 0.3s, border-color 0.3s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 106, 0, 0.12);
  border-left-color: var(--accent);
}

.nav-link[aria-current="page"] {
  color: var(--bg-deep);
  background: var(--accent);
  border-left-color: var(--alt);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alt);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.8);
  animation: pulse 2s infinite;
}

.status-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

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

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

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

.nav-toggle-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  border-top: 2px solid var(--accent);
  margin-top: 80px;
  padding: 48px 0 24px;
  position: relative;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.footer-logo {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 38ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--slate);
  text-decoration: underline transparent;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-contact address {
  font-style: normal;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Scroll progress & back-to-top */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(143, 167, 204, 0.2);
  z-index: 1500;
  pointer-events: none;
}

.scroll-progress::before {
  content: '';
  display: block;
  height: 100%;
  width: var(--scroll, 0%);
  background: linear-gradient(90deg, var(--accent), var(--alt));
  transition: width 0.1s linear;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(255, 106, 0, 0.5);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 1200;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Layout & Common Components ---------- */
.container,
.container-wide,
.container-narrow {
  width: 100%;
  margin-inline: auto;
  padding-inline: 20px;
}

.container {
  max-width: 1200px;
}

.container-wide {
  max-width: 1440px;
}

.container-narrow {
  max-width: 800px;
}

.page-content {
  padding-block: 40px;
}

.section {
  padding-block: 72px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  margin-top: 8px;
}

.section-subtitle {
  color: var(--muted);
  margin-top: 12px;
  max-width: 60ch;
}

.grid {
  display: grid;
  gap: var(--gap);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--alt) 100%);
}

.button {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.button:hover {
  background: var(--slate);
  color: var(--bg-deep);
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: var(--bg-deep);
  border-color: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.button-ghost:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background: rgba(57, 255, 20, 0.1);
  color: var(--alt);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 99px;
}

.tag-orange {
  background: rgba(255, 106, 0, 0.12);
  color: var(--accent);
  border-color: rgba(255, 106, 0, 0.3);
}

.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 106, 0, 0.08) 50%, transparent 100%), var(--bg-card);
  border: 1px solid var(--border);
  min-height: 180px;
}

.media::after {
  content: '影像区';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(143, 167, 204, 0.05) 10px 11px);
}

.media-16-9 {
  aspect-ratio: 16 / 9;
}

.media-4-3 {
  aspect-ratio: 4 / 3;
}

.media-1-1 {
  aspect-ratio: 1 / 1;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table-scroll th {
  background: rgba(143, 167, 204, 0.1);
  color: var(--accent);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  padding-block: 24px;
}

.breadcrumbs a {
  color: var(--slate);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .current {
  color: var(--ink);
}

.speed-lines {
  height: 40px;
  background: repeating-linear-gradient(90deg, transparent 0 15px, rgba(255, 106, 0, 0.25) 15px 17px, transparent 17px 30px);
  background-size: 30px 100%;
  animation: shift 1s linear infinite;
}

@keyframes shift {
  to {
    background-position-x: 30px;
  }
}

.slant {
  position: relative;
  background: var(--bg-card);
  clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
  padding: 48px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .header-rail {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 16px;
    gap: 8px 12px;
  }

  .brand-block {
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .brand-round {
    margin-left: auto;
    font-size: 0.65rem;
  }

  .brand-text {
    font-size: 1.2rem;
  }

  .main-nav {
    order: 3;
    flex: 0 0 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border-top: 0;
    transition: max-height 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s;
  }

  .main-nav[data-open] {
    max-height: 600px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-status {
    display: none;
  }
}

@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .section {
    padding-block: 48px;
  }

  .brand-round {
    display: none;
  }
}

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

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

  .speed-lines,
  .status-dot {
    animation: none !important;
  }
}
