:root {
  --night: #0A1B2A;
  --night-2: #122B3E;
  --paper: #F2E8D5;
  --amber: #FFB300;
  --orange: #FF7A00;
  --moon: #E9F2F7;
  --ink: #1A1A2E;
  --muted: #7A8B9A;
  --line: #3A5A7C;
  --shadow: #0D2030;
  --font-head: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-data: 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sidebar-w: 280px;
  --header-h: 68px;
  --radius: 12px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--moon);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 4vw + 0.8rem, 3.5rem); }
h2 { font-size: clamp(1.55rem, 2.2vw + 0.6rem, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.2vw + 0.6rem, 1.5rem); }

::selection {
  background: var(--amber);
  color: var(--night);
}

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

.main-content {
  min-height: 60vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding: clamp(48px, 7vw, 96px) 0;
}

.section--tight {
  padding: clamp(28px, 4vw, 48px) 0;
}

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

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

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

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

.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
}

.prose p {
  margin-bottom: 1em;
}

.prose h2,
.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.prose ul,
.prose ol {
  margin-bottom: 1em;
  padding-left: 1.4em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: 0.4em;
}

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

.prose a:hover {
  color: var(--amber);
  text-decoration-thickness: 2px;
}

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

.prose--dark a {
  color: var(--amber);
}

.prose--dark a:hover {
  color: var(--orange);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.btn-primary {
  background: var(--amber);
  color: var(--night);
}

.btn-primary:hover {
  background: var(--orange);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 122, 0, 0.28);
}

.btn-outline {
  border-color: var(--line);
  color: var(--moon);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-paper {
  background: var(--paper);
  color: var(--ink);
}

.btn-paper:hover {
  background: #FFF8EC;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(242, 232, 213, 0.18);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 14px 0;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: var(--line);
  margin-right: 8px;
  font-family: var(--font-data);
}

.breadcrumb-link {
  color: var(--muted);
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: var(--amber);
}

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

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

.card {
  background: var(--night-2);
  border: 1px solid rgba(58, 90, 124, 0.35);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--moon);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(13, 32, 48, 0.45);
  border-color: rgba(255, 179, 0, 0.35);
}

.card--paper {
  background: var(--paper);
  color: var(--ink);
  border-color: transparent;
}

.card--paper:hover {
  border-color: rgba(255, 122, 0, 0.4);
}

.card__title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
}

.card__meta {
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.card__text {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.88;
}

.panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  color: var(--ink);
  box-shadow: 0 8px 30px rgba(13, 32, 48, 0.14);
}

.panel--dark {
  background: var(--night-2);
  color: var(--moon);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--night-2) 0%, var(--shadow) 100%);
  border-radius: var(--radius);
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.media-frame:hover > img {
  transform: scale(1.04);
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--standard { aspect-ratio: 4 / 3; }
.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame--cut {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.media-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--moon);
  background: rgba(10, 27, 42, 0.74);
  border-left: 2px solid var(--amber);
  border-radius: 0 4px 4px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.section-index {
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--orange);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3vw + 0.5rem, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--orange) 100%);
  margin-top: 10px;
}

.section-head--dark .section-title {
  color: var(--moon);
}

.section-head--dark .section-title::after {
  background: linear-gradient(90deg, var(--orange) 0%, var(--amber) 100%);
}

.section-head--dark .section-index {
  color: var(--amber);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 3000;
  padding: 12px 22px;
  background: var(--amber);
  color: var(--night);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.2;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--orange) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  z-index: 3000;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 32px 24px 24px;
  background: var(--night);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--orange) 60%, transparent 100%);
  opacity: 0.85;
  pointer-events: none;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 179, 0, 0.1);
}

.brand-svg {
  width: 38px;
  height: 38px;
  display: block;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--moon);
  white-space: nowrap;
}

.brand-meta {
  font-family: var(--font-data);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

.site-nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.nav-caption {
  font-family: var(--font-data);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(58, 90, 124, 0.35);
  margin-bottom: 12px;
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.nav-link:hover {
  color: var(--moon);
  background-color: rgba(255, 179, 0, 0.07);
}

.nav-link[aria-current="page"] {
  color: var(--amber);
  background: linear-gradient(90deg, rgba(255, 179, 0, 0.15) 0%, rgba(255, 179, 0, 0) 100%);
  border-left-color: var(--amber);
  font-weight: 700;
}

.nav-index {
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  width: 20px;
  flex-shrink: 0;
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--amber);
}

.nav-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-foot {
  margin-top: auto;
  padding-top: 28px;
}

.nav-rule {
  display: block;
  width: 40px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--amber) 100%);
  margin-bottom: 14px;
}

.nav-note {
  font-size: 0.75rem;
  line-height: 1.75;
  color: var(--muted);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(58, 90, 124, 0.35);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.16);
  animation: status-blink 2.4s ease-in-out infinite;
}

.status-label {
  font-family: var(--font-data);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-scrim {
  display: none;
}

.site-footer {
  position: relative;
  background: var(--night);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--orange) 30%, rgba(58, 90, 124, 0.4) 80%);
  pointer-events: none;
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.2fr;
  gap: clamp(28px, 4vw, 48px);
}

.footer-brand .brand {
  margin-bottom: 20px;
}

.brand--footer .brand-name {
  color: var(--paper);
}

.brand--footer .brand-mark {
  background: rgba(255, 179, 0, 0.14);
}

.footer-trust {
  max-width: 32em;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
}

.footer-column,
.footer-column--index,
.footer-column--contact {
  display: flex;
  flex-direction: column;
}

.footer-heading {
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(58, 90, 124, 0.35);
  margin-bottom: 18px;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-list--contact {
  gap: 14px;
}

.footer-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1.5;
  font-size: 0.9rem;
}

.footer-link {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--amber);
}

.footer-label {
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line);
  width: 2.5em;
  flex-shrink: 0;
}

.footer-text {
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: break-word;
}

.footer-bottom {
  border-top: 1px solid rgba(58, 90, 124, 0.35);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-copy,
.footer-icp {
  font-family: var(--font-data);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

@media (max-width: 1023.98px) {
  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: var(--header-h);
    padding: 0 20px;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    background: rgba(10, 27, 42, 0.97);
  }

  .site-header::before {
    height: 3px;
  }

  .header-top {
    flex: 1;
    margin-bottom: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-svg {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 179, 0, 0.1);
    color: var(--moon);
    transition: background-color 0.2s;
  }

  .nav-toggle:hover {
    background: rgba(255, 179, 0, 0.2);
  }

  .nav-toggle-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
  }

  .nav-toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--amber);
  }

  .nav-toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    height: auto;
    min-height: 0;
    padding: 32px 20px 24px;
    background: var(--night-2);
    border-right: 1px solid var(--line);
    border-top: 1px solid rgba(58, 90, 124, 0.4);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(-105%);
    transition: transform 0.3s var(--ease);
    z-index: 1002;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .header-status {
    display: none;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 15, 25, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1001;
  }

  .nav-scrim[data-open] {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    padding-top: var(--header-h);
  }

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

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

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

@media (min-width: 1024px) {
  .main-content {
    margin-left: var(--sidebar-w);
  }

  .site-footer {
    margin-left: var(--sidebar-w);
  }
}

@media (max-width: 640px) {
  .brand-meta {
    display: none;
  }

  .nav-toggle-label {
    display: none;
  }

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

  .footer-brand {
    grid-column: auto;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@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;
  }

  .status-dot {
    animation: none;
  }

  .site-nav,
  .nav-scrim,
  .media-frame > img,
  .card {
    transition: none !important;
  }
}
