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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
pre,
code,
ul,
ol,
li {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

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

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

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

:root {
  --bg-deep: #0A1428;
  --bg-card: #122142;
  --gold: #C9A227;
  --gold-bright: #E4C761;
  --action: #FF6B4A;
  --cyan: #3EB4D4;
  --text-primary: #F0F3FA;
  --text-secondary: #B0BBD1;
  --border-fine: rgba(255, 255, 255, 0.12);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --font-display: "Impact", "Haettenschweiler", "Arial Narrow Bold", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --rail-width: 260px;
  --header-height: 64px;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 70% 50% at 82% -6%, rgba(62, 180, 212, 0.07), transparent),
    radial-gradient(ellipse 50% 40% at 8% 104%, rgba(201, 162, 39, 0.05), transparent);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text-primary);
  text-wrap: balance;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--action);
}

.main-content {
  flex: 1;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--gold-bright);
  color: var(--bg-deep);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  transform: translateY(-300%);
  transition: transform 0.25s ease;
}

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

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

.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));
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-fine);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

@media (hover: hover) {
  .card:hover {
    border-color: rgba(228, 199, 97, 0.35);
    box-shadow: var(--shadow-soft);
    transform: translateY(-3px);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.btn--primary {
  background: var(--action);
  color: #FFFFFF;
}

.btn--primary:hover {
  background: #ff8a68;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(255, 107, 74, 0.35);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-fine);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.btn--gold {
  background: var(--gold);
  color: var(--bg-deep);
}

.btn--gold:hover {
  background: var(--gold-bright);
  color: var(--bg-deep);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(62, 180, 212, 0.1);
  border: 1px solid rgba(62, 180, 212, 0.28);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chip--gold {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.28);
  color: var(--gold-bright);
}

.chip--orange {
  background: rgba(255, 107, 74, 0.1);
  border-color: rgba(255, 107, 74, 0.28);
  color: var(--action);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  list-style: none;
  padding: 20px 0 28px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-inline: 8px;
  color: var(--text-secondary);
  opacity: 0.45;
  font-family: var(--font-mono);
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

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

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

.section--alt {
  background: var(--bg-card);
  border-block: 1px solid var(--border-fine);
}

.section-head {
  position: relative;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.section-kicker,
.section-title {
  position: relative;
  z-index: 1;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--gold-bright);
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.section-index {
  position: absolute;
  top: -16px;
  right: 0;
  z-index: 0;
  font-family: var(--font-mono);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  opacity: 0.12;
  pointer-events: none;
}

@supports (-webkit-text-stroke: 1px #C9A227) {
  .section-index {
    color: transparent;
    -webkit-text-stroke: 1px rgba(201, 162, 39, 0.5);
    opacity: 0.5;
  }
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-fine), transparent);
  border: 0;
  margin: clamp(28px, 4vw, 48px) 0;
}

.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(62, 180, 212, 0.08), transparent 60%), var(--bg-card);
  border: 1px solid var(--border-fine);
  aspect-ratio: 16 / 9;
}

.media--wide {
  aspect-ratio: 21 / 9;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: var(--rail-width);
  padding: 28px 20px 20px;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-fine);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 75%);
  opacity: 0.35;
  pointer-events: none;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.brand {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-left: 20px;
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  background: var(--gold-bright);
  transform: rotate(45deg);
  opacity: 0.9;
  box-shadow: 0 0 8px rgba(228, 199, 97, 0.35);
  pointer-events: none;
}

.brand-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.1;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  transition: color 0.2s;
}

.brand:hover .brand-mark {
  color: var(--gold-bright);
}

.brand-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.32em;
  line-height: 1.4;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px 9px;
  background: transparent;
  border: 1px solid var(--border-fine);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}

.site-nav {
  flex: 1;
  overflow-y: auto;
  margin-top: 28px;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.nav-list {
  list-style: none;
}

.nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item:last-child {
  border-bottom: none;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 10px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-link:hover .nav-index {
  opacity: 1;
}

.nav-link[aria-current="page"] {
  color: var(--action);
  background: rgba(255, 107, 74, 0.07);
  box-shadow: inset 3px 0 0 rgba(255, 107, 74, 0.9);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-bright);
  opacity: 0.65;
  min-width: 20px;
  transition: opacity 0.2s;
}

.nav-label {
  letter-spacing: 0.02em;
}

.rail-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-fine);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #31D0AA;
  box-shadow: 0 0 8px rgba(49, 208, 170, 0.5);
  flex-shrink: 0;
}

.rail-progress {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 5;
}

.rail-progress::before {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(180deg, var(--gold), var(--action));
  transform-origin: top center;
  transform: scaleY(var(--progress, 0));
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 940;
  background: rgba(4, 8, 18, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.nav-backdrop[data-visible] {
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  position: relative;
  width: 100%;
  margin-top: auto;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-fine);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--cyan), transparent 80%);
  opacity: 0.35;
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(48px, 6vw, 72px) clamp(20px, 4vw, 48px) 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.6fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: 40px;
}

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

.footer-brand-mark {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.footer-brand-tag {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.18em;
  margin-top: 6px;
}

.footer-trust {
  margin-top: 18px;
  max-width: 360px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--gold-bright);
}

.footer-meta {
  list-style: none;
}

.footer-meta li {
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.footer-meta-note {
  padding: 16px 0;
  border-top: 1px solid var(--border-fine);
  border-bottom: 1px solid var(--border-fine);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

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

html.js [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-width);
  }
}

@media (max-width: 1023px) {
  body {
    padding-top: var(--header-height);
  }

  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--header-height);
    flex-direction: row;
    align-items: center;
    padding: 0 16px 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--border-fine);
    background: rgba(10, 20, 40, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .site-header::before {
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent 60%);
    opacity: 0.5;
  }

  .header-inner {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  .brand {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding-left: 18px;
  }

  .brand::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 6px;
  }

  .brand-mark {
    font-size: 1.125rem;
  }

  .brand-tag {
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
  }

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

  .nav-toggle:hover {
    border-color: var(--gold-bright);
  }

  .nav-toggle.is-active .toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-active .toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-active .toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    flex: none;
    margin: 0;
    padding: calc(var(--header-height) + 20px) 20px 32px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-fine);
    box-shadow: none;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 950;
    overflow-y: auto;
  }

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

  .rail-status {
    display: none;
  }

  .rail-progress {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
  }

  .rail-progress::before {
    background: linear-gradient(90deg, var(--gold), var(--action));
    transform-origin: left center;
    transform: scaleX(var(--progress, 0));
  }

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

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

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

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

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

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

@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;
    transition-delay: 0s !important;
  }

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