:root {
  --c-bg: #0B3D2E;
  --c-bg-deep: #072A1F;
  --c-accent: #FF4D00;
  --c-accent-deep: #CC3D00;
  --c-metal: #C0C0C0;
  --c-paper: #E8F0EC;
  --c-white: #FFFFFF;
  --c-ink: #1A1A1A;
  --c-secondary: #1F6E4E;
  --c-alert: #FFC107;
  --c-body: #DCE9E2;
  --c-muted: #A3B8AD;
  --font-heading: "Noto Sans SC", "Alibaba PuHuiTi", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans", sans-serif;
  --font-mono: "Roboto Mono", "JetBrains Mono", monospace;
  --header-h: 72px;
  --radius: 6px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-body);
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

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

a {
  color: var(--c-accent);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a:hover {
  color: var(--c-white);
}

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

::selection {
  background: var(--c-accent);
  color: var(--c-white);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--c-white);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1,
.h1 {
  font-size: 3.2rem;
  margin: 0 0 0.4em;
}

h2,
.h2 {
  font-size: 2.4rem;
  margin: 0 0 0.5em;
}

h3,
.h3 {
  font-size: 1.8rem;
  margin: 0 0 0.4em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(100% - 40px, 1440px);
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 40px, 1080px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(56px, 8vw, 96px);
}

.text-small {
  font-size: 0.9rem;
}

.muted {
  color: var(--c-muted);
}

.data-text {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--c-white);
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 2500;
  padding: 10px 18px;
  background: var(--c-accent);
  color: var(--c-white);
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  color: var(--c-white);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(7, 42, 31, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(192, 192, 192, 0.25);
  box-shadow: 0 1px 0 rgba(255, 77, 0, 0.12), 0 10px 28px rgba(0, 0, 0, 0.18);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-accent) 0 120px, rgba(255, 77, 0, 0.22) 120px 220px, transparent 220px);
  pointer-events: none;
}

.header-inner {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--c-white);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--c-white);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--c-bg-deep);
  border: 1px solid rgba(192, 192, 192, 0.5);
  padding: 5px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--c-white);
}

.brand-text small {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--c-metal);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
  counter-reset: nav-index;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-left: 1px solid rgba(192, 192, 192, 0.22);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.site-nav a::before {
  content: "0" counter(nav-index);
  counter-increment: nav-index;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--c-accent);
  line-height: 1;
}

.site-nav a:hover {
  color: var(--c-white);
  background: rgba(255, 77, 0, 0.1);
}

.site-nav a[aria-current="page"] {
  color: var(--c-white);
  background: linear-gradient(180deg, rgba(255, 77, 0, 0.16), transparent);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--c-accent);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(7, 42, 31, 0.62);
  color: var(--c-metal);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border: 1px solid rgba(192, 192, 192, 0.3);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.version-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-alert);
  box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.6);
  animation: version-pulse 2s ease-in-out infinite;
}

@keyframes version-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.6);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(255, 193, 7, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
  }
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(192, 192, 192, 0.4);
  background: rgba(7, 42, 31, 0.62);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-metal);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  background: var(--c-metal);
  color: var(--c-ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--c-white);
  color: var(--c-ink);
}

.btn-primary {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-white);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.btn-primary:hover {
  background: var(--c-accent-deep);
  border-color: var(--c-accent-deep);
  color: var(--c-white);
}

.btn-ghost {
  background: transparent;
  color: var(--c-white);
  border-color: rgba(192, 192, 192, 0.4);
}

.btn-ghost:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: rgba(255, 77, 0, 0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--c-metal);
  background: rgba(7, 42, 31, 0.6);
  border: 1px solid rgba(192, 192, 192, 0.3);
  border-radius: 2px;
}

.badge-accent {
  color: var(--c-white);
  background: var(--c-accent);
  border-color: var(--c-accent);
}

.badge-warning {
  color: var(--c-ink);
  background: var(--c-alert);
  border-color: var(--c-alert);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.8rem;
  color: var(--c-bg-deep);
  background: var(--c-paper);
  border-left: 3px solid var(--c-accent);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-secondary);
}

.status-dot.is-live {
  background: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(255, 77, 0, 0.2);
}

.panel {
  padding: 24px;
  background: rgba(7, 42, 31, 0.55);
  border: 1px solid rgba(192, 192, 192, 0.24);
}

.panel-light {
  padding: 24px;
  background: var(--c-paper);
  color: var(--c-ink);
  border: 1px solid rgba(192, 192, 192, 0.5);
}

.card {
  padding: 24px;
  background: var(--c-paper);
  color: var(--c-ink);
  border: 1px solid rgba(192, 192, 192, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card h1,
.card h2,
.card h3 {
  color: var(--c-ink);
}

.card:hover {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px rgba(255, 77, 0, 0.4), 0 16px 32px rgba(0, 0, 0, 0.2);
}

.card-dark {
  padding: 24px;
  background: rgba(7, 42, 31, 0.65);
  color: var(--c-body);
  border: 1px solid rgba(192, 192, 192, 0.24);
}

.card-dark h1,
.card-dark h2,
.card-dark h3 {
  color: var(--c-white);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-card {
  position: relative;
  min-width: 0;
  padding: 20px;
  background: rgba(7, 42, 31, 0.62);
  border: 1px solid rgba(192, 192, 192, 0.24);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
  border-color: rgba(255, 77, 0, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 77, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.2);
}

.bento-accent {
  border-top: 3px solid var(--c-accent);
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  border-bottom: 1px solid rgba(192, 192, 192, 0.35);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(192, 192, 192, 0.15);
}

.data-table tbody tr {
  transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 77, 0, 0.08);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--c-bg-deep);
  border: 1px solid rgba(192, 192, 192, 0.3);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(255, 77, 0, 0.2), transparent 45%),
    repeating-linear-gradient(-45deg, rgba(192, 192, 192, 0.14) 0 2px, transparent 2px 10px);
}

.media-frame::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 72px;
  height: 72px;
  background: var(--c-accent);
  opacity: 0.16;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.media-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-size: 0.88rem;
}

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

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

.breadcrumb a {
  color: var(--c-muted);
  text-decoration: none;
}

.breadcrumb a:hover,
.breadcrumb a[aria-current] {
  color: var(--c-white);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid rgba(192, 192, 192, 0.3);
}

.toc-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.toc-link::before {
  content: "·";
  font-family: var(--font-mono);
  color: var(--c-accent);
  font-size: 0.8rem;
}

.toc-link:hover {
  color: var(--c-white);
  background: rgba(255, 77, 0, 0.06);
}

.toc-link.is-current,
.toc-link[aria-current="true"] {
  color: var(--c-white);
  border-left-color: var(--c-accent);
  background: linear-gradient(90deg, rgba(255, 77, 0, 0.14), transparent);
  font-weight: 600;
}

.page-header {
  padding-block: clamp(40px, 8vw, 84px) 24px;
  border-bottom: 1px solid rgba(192, 192, 192, 0.2);
  margin-bottom: 32px;
}

.page-title {
  margin-bottom: 8px;
}

.lead {
  font-size: 1.25rem;
  color: var(--c-muted);
  max-width: 60ch;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
}

.section-kicker {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  text-transform: uppercase;
}

.site-footer {
  position: relative;
  background: var(--c-bg-deep);
  border-top: 1px solid rgba(192, 192, 192, 0.18);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 100%;
  background: linear-gradient(215deg, rgba(255, 77, 0, 0.08), transparent 60%);
  pointer-events: none;
}

.footer-path {
  height: 4px;
  background: linear-gradient(90deg, var(--c-accent) 0 180px, rgba(255, 77, 0, 0.25) 180px 260px, transparent 260px);
}

.footer-inner {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  padding: 56px 24px 40px;
}

.footer-block {
  min-width: 0;
}

.footer-brand,
.footer-navigator,
.footer-legal,
.footer-contact {
  align-self: start;
}

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

.footer-heading {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-white);
}

.footer-heading::before {
  content: "";
  width: 18px;
  height: 3px;
  background: var(--c-accent);
  flex-shrink: 0;
}

.footer-statement {
  max-width: 38em;
  margin: 0;
  color: var(--c-muted);
  font-size: 0.98rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  color: var(--c-muted);
  text-decoration: none;
  font-size: 0.98rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-links a::before {
  content: "→";
  color: var(--c-accent);
  font-family: var(--font-mono);
}

.footer-links a:hover {
  color: var(--c-white);
  border-bottom-color: var(--c-accent);
}

.footer-address {
  font-style: normal;
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--c-muted);
}

.footer-note {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--c-accent);
  color: var(--c-muted);
  font-size: 0.86rem;
}

.footer-meta {
  border-top: 1px solid rgba(192, 192, 192, 0.16);
  padding: 18px 24px;
}

.footer-meta-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 24px;
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.footer-meta p {
  margin: 0;
}

@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1020px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0 16px;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    gap: 0;
    padding: 8px;
    background: rgba(7, 42, 31, 0.98);
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-top: 3px solid var(--c-accent);
    box-shadow: var(--shadow);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  }

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

  .site-nav:not([data-open]) {
    display: none;
  }

  .site-nav a {
    padding: 13px 16px;
    border-left: 0;
    border-bottom: 1px solid rgba(192, 192, 192, 0.16);
  }

  .site-nav a[aria-current="page"]::after {
    left: 16px;
    right: auto;
    top: 16px;
    bottom: 16px;
    width: 3px;
    height: auto;
  }

  .header-meta {
    margin-left: auto;
  }

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

  .nav-toggle:hover {
    border-color: var(--c-accent);
  }

  .nav-toggle:hover span {
    background: var(--c-accent);
  }

  .version-badge {
    padding: 4px 10px;
  }
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .bento-grid {
    gap: 12px;
  }

  .span-3,
  .span-4,
  .span-6,
  .span-8 {
    grid-column: span 6;
  }
}

@media (max-width: 620px) {
  :root {
    --header-h: 64px;
  }

  body {
    font-size: 1rem;
  }

  h1,
  .h1 {
    font-size: 2.2rem;
  }

  h2,
  .h2 {
    font-size: 1.8rem;
  }

  h3,
  .h3 {
    font-size: 1.4rem;
  }

  .brand-text small {
    display: none;
  }

  .header-inner {
    min-height: 64px;
  }

  .span-3,
  .span-4,
  .span-6,
  .span-8 {
    grid-column: span 12;
  }

  .footer-meta-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .version-dot {
    animation: none;
  }

  .skip-link {
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
