:root {
  --rail-width: 264px;
  --header-height: 64px;
  --bg-primary: #0A1128;
  --bg-deep: #0D1530;
  --bg-surface: #10203F;
  --accent: #00FFA3;
  --accent-rgb: 0, 255, 163;
  --amber: #FFB300;
  --silver: #C0C5CE;
  --text-main: #E6F1FF;
  --text-muted: #8A94B3;
  --line: #2A3B5C;
  --font-head: "PingFang SC", "HarmonyOS Sans", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-data: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --radius: 2px;
  --shadow-card: 0 24px 48px -24px rgba(0, 0, 0, .5);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 78% 10%, rgba(0, 255, 163, .05), transparent 50%),
    radial-gradient(ellipse at 10% 90%, rgba(255, 179, 0, .03), transparent 40%),
    repeating-linear-gradient(110deg, transparent 0 60px, rgba(42, 59, 92, .1) 60px 61px),
    repeating-linear-gradient(20deg, transparent 0 76px, rgba(42, 59, 92, .07) 76px 77px);
  overflow-x: hidden;
}

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

@media (max-width: 1023.98px) {
  body {
    padding-top: var(--header-height);
  }
  body.is-nav-open {
    overflow: hidden;
  }
}

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

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

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 900;
  font-style: oblique;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-main);
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

::selection {
  background: rgba(var(--accent-rgb), .3);
  color: var(--text-main);
}

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

#main-content {
  display: block;
  position: relative;
  min-height: 70vh;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 3vw, 40px) clamp(64px, 8vw, 120px);
}

.skip-link {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1200;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 800;
  font-size: .85rem;
  padding: 10px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform .2s ease;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 28px;
  padding: 12px 0;
  list-style: none;
  font-size: .85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.breadcrumb li + li::before {
  content: '/';
  font-family: var(--font-data);
  color: var(--line);
}

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

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

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .875rem;
  line-height: 1;
  letter-spacing: .06em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  appearance: none;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease, filter .2s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 24px rgba(var(--accent-rgb), .35)) brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--silver);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .1em;
  line-height: 1;
  background: rgba(var(--accent-rgb), .12);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), .35);
  border-radius: 3px;
}

.badge-amber {
  background: rgba(255, 179, 0, .12);
  color: var(--amber);
  border-color: rgba(255, 179, 0, .35);
}

.card {
  position: relative;
  padding: clamp(20px, 3vw, 36px);
  background: linear-gradient(145deg, rgba(16, 32, 63, .82), rgba(13, 21, 48, .68));
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), .35);
  box-shadow: 0 32px 60px -24px rgba(var(--accent-rgb), .16);
}

.card::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  border-right: 2px solid rgba(255, 179, 0, .55);
  border-bottom: 2px solid rgba(255, 179, 0, .55);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  margin: 0 0 24px;
}

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

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

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

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

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  transform: skewX(-20deg);
}

.section-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  margin: 0 0 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 62ch;
}

.figure-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(16, 32, 63, .35), rgba(13, 21, 48, .9)),
    repeating-linear-gradient(100deg, transparent 0 42px, rgba(42, 59, 92, .28) 42px 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-data);
  font-size: .8rem;
  letter-spacing: .25em;
}

.figure-media::before {
  content: 'FIG';
  padding: 6px 12px;
  border: 1px solid rgba(192, 197, 206, .3);
  background: rgba(10, 17, 40, .45);
  border-radius: 2px;
}

.figure-media[data-caption]:not([data-caption=""])::after {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 14px;
  background: linear-gradient(transparent, rgba(10, 17, 40, .78));
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .04em;
  text-align: left;
}

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

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

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: var(--rail-width);
  height: 100vh;
  background:
    linear-gradient(175deg, rgba(16, 32, 63, .92), rgba(13, 21, 48, .98) 60%),
    repeating-linear-gradient(112deg, transparent 0 34px, rgba(42, 59, 92, .07) 34px 35px);
  border-right: 1px solid var(--line);
  box-shadow: 6px 0 24px rgba(0, 0, 0, .3);
}

.header-brand {
  position: relative;
  padding: 28px 20px 24px;
  border-bottom: 1px solid var(--line);
}

.header-brand::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 65%);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-glyph {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), .35));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-style: oblique;
  font-size: 1.2rem;
  letter-spacing: .05em;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-data);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

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

.nav-toggle-lines {
  display: inline-flex;
  flex-direction: column;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 2.5px 0;
  transition: transform .25s var(--ease-out), opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) 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(-7px) rotate(-45deg);
}

.nav-toggle-text {
  white-space: nowrap;
}

.site-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  padding: 20px 0 0;
  overflow-y: auto;
}

.nav-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px 16px;
  font-family: var(--font-data);
  font-size: .65rem;
  letter-spacing: .12em;
  color: var(--text-muted);
  border-bottom: 1px dashed rgba(42, 59, 92, .6);
  margin-bottom: 12px;
}

.nav-meta-label {
  display: inline-block;
  letter-spacing: .14em;
}

.nav-meta-code {
  color: var(--silver);
  opacity: .65;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.nav-item {
  margin: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .07), transparent);
  border-left-color: var(--accent);
}

.nav-link[aria-current="page"] {
  color: var(--accent);
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .12), transparent 85%);
}

.nav-num {
  font-family: var(--font-data);
  font-size: .75rem;
  font-weight: 700;
  opacity: .5;
  min-width: 26px;
  transition: opacity .2s ease, color .2s ease;
}

.nav-link:hover .nav-num,
.nav-link[aria-current="page"] .nav-num {
  opacity: 1;
  color: var(--accent);
}

.nav-text {
  flex: 1;
  font-size: .95rem;
  letter-spacing: .05em;
}

.nav-arrow {
  font-size: .8rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}

.nav-link:hover .nav-arrow,
.nav-link[aria-current="page"] .nav-arrow {
  opacity: 1;
  transform: translateX(0);
}

.nav-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: rgba(10, 17, 40, .35);
}

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: .85rem;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-bottom-color .2s ease;
}

.nav-search:hover {
  color: var(--text-main);
  border-bottom-color: var(--line);
}

.btn-feedback {
  width: 100%;
}

.nav-trust {
  margin: 4px 0 0;
  font-size: .72rem;
  line-height: 1.7;
  color: rgba(138, 148, 179, .85);
  letter-spacing: .06em;
}

.nav-overlay {
  display: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-width);
  right: 0;
  height: 3px;
  z-index: 1100;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), .5);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.site-footer {
  position: relative;
  background:
    linear-gradient(180deg, var(--bg-deep), var(--bg-primary) 70%),
    repeating-linear-gradient(115deg, transparent 0 48px, rgba(42, 59, 92, .06) 48px 49px);
  border-top: 1px solid var(--line);
  padding: 52px 0 0;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber) 45%, transparent 80%);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.5fr;
  gap: clamp(24px, 4vw, 56px);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 48px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.footer-brand-link .brand-name {
  font-size: 1.35rem;
}

.footer-brand-link .brand-sub {
  font-size: .7rem;
}

.footer-trust {
  margin: 0;
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.8;
  letter-spacing: .02em;
}

.footer-col,
.footer-nav-col,
.footer-contact-col {
  min-width: 0;
}

.footer-heading {
  margin: 0 0 16px;
  padding-bottom: 10px;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: .8rem;
  font-style: normal;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--silver);
  border-bottom: 1px dashed var(--line);
}

.footer-list,
.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .92rem;
  transition: color .2s ease, padding-left .2s ease;
}

.footer-list a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact-list li {
  display: flex;
  gap: 12px;
  font-size: .9rem;
  line-height: 1.75;
  color: var(--text-muted);
}

.contact-label {
  flex-shrink: 0;
  min-width: 40px;
  color: var(--silver);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.contact-value {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  background: rgba(10, 17, 40, .65);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 48px);
}

.footer-bottom p {
  margin: 0;
  font-family: var(--font-data);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.footer-icp {
  border: 1px solid rgba(192, 197, 206, .2);
  border-radius: 2px;
  padding: 3px 10px;
  color: rgba(138, 148, 179, .75);
}

@media (max-width: 1023.98px) {
  .site-header {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--header-height);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    background: rgba(13, 21, 48, .97);
    border-right: none;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 16px rgba(0, 0, 0, .3);
  }

  .header-brand {
    flex: 1;
    padding: 0 16px;
    border-bottom: none;
    height: var(--header-height);
    display: flex;
    align-items: center;
  }

  .header-brand::after {
    display: none;
  }

  .brand-glyph svg {
    width: 30px;
    height: 30px;
  }

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

  .brand-sub {
    font-size: .6rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-right: 12px;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    max-width: 320px;
    flex: none;
    padding: 18px 0 0;
    background: var(--bg-deep);
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 40px rgba(0, 0, 0, .4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .3s var(--ease-out), visibility 0s linear .3s;
    z-index: 200;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
    transition: transform .3s var(--ease-out), visibility 0s linear 0s;
  }

  .nav-foot {
    padding-bottom: 28px;
  }

  .site-nav[data-open] + .nav-overlay {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    background: rgba(10, 17, 40, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .scroll-progress {
    left: 0;
    height: 2px;
  }

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

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

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

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

  #main-content {
    padding-top: 24px;
    padding-bottom: 48px;
  }
}

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

  .site-nav,
  .site-nav[data-open] {
    transition: none !important;
  }
}
