:root {
  --ink: #07130F;
  --panel: #10241C;
  --line: #2A3A34;
  --cyan: #2FE3D0;
  --amber: #F0B03C;
  --magenta: #FF4E9B;
  --bone: #F2F1E8;
  --clay: #B4927A;
  --steel: #7E9A92;

  --font-display: "Helvetica Neue", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --shell: 1480px;
  --gutter: clamp(16px, 3.4vw, 52px);
  --header-top-h: 34px;
  --header-main-h: 70px;
  --rule: 1px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--bone);
  background-color: var(--ink);
  background-image: linear-gradient(to right, rgba(42, 58, 52, 0.42) 1px, transparent 1px);
  background-size: 88px 100%;
  background-position: center top;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 78% at 50% -12%, rgba(47, 227, 208, 0.07), transparent 62%),
    radial-gradient(70% 55% at 102% 104%, rgba(240, 176, 60, 0.06), transparent 70%);
}

body > * { position: relative; z-index: 1; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
table { border-collapse: collapse; width: 100%; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--bone);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  text-shadow: 0 0 26px rgba(47, 227, 208, 0.22);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  text-shadow: 0 0 18px rgba(47, 227, 208, 0.16);
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  letter-spacing: 0;
  text-shadow: none;
}

/* ---------- 容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 14px;
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: top 0.18s ease;
}

.skip-link:focus-visible {
  top: 8px;
  outline-offset: 2px;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(7, 19, 15, 0.95);
  border-bottom: var(--rule) solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-top {
  background: #0A1A15;
  border-bottom: var(--rule) solid var(--line);
}

.header-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-top-h);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--clay);
}

.header-brandline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--steel);
  letter-spacing: 0.12em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-brandline__mark {
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(47, 227, 208, 0.75);
}

.header-tagline {
  margin-inline: auto 0;
  color: var(--clay);
  white-space: nowrap;
}

.header-utility {
  flex: none;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(240, 176, 60, 0.35);
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.header-utility:hover {
  color: var(--magenta);
  border-bottom-color: var(--magenta);
}

.header-main__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  min-height: var(--header-main-h);
}

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

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: var(--rule) solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 18px rgba(47, 227, 208, 0.2);
}

.brand__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  color: var(--bone);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 13px;
  border: var(--rule) solid var(--line);
  color: var(--bone);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

.nav-toggle__bar {
  position: relative;
  display: block;
  width: 16px;
  height: 1px;
  background: var(--bone);
  transition: background 0.2s ease;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  background: var(--bone);
  transition: transform 0.2s ease;
}

.nav-toggle__bar::before { top: -5px; }
.nav-toggle__bar::after { top: 5px; }

.site-header[data-open] .nav-toggle__bar { background: transparent; }
.site-header[data-open] .nav-toggle__bar::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bar::after { transform: translateY(-5px) rotate(-45deg); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  margin-left: auto;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 30px);
}

.primary-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 0;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bone);
  transition: color 0.18s ease;
}

.primary-nav__index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--steel);
  transform: translateY(-0.42em);
  transition: color 0.18s ease;
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(47, 227, 208, 0.8);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.primary-nav__link:hover { color: var(--cyan); }
.primary-nav__link:hover::after { transform: scaleX(1); }

.primary-nav__link[aria-current="page"] { color: var(--cyan); }
.primary-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav__link[aria-current="page"] .primary-nav__index { color: var(--amber); }

.primary-nav__note {
  display: none;
  margin-top: 16px;
  font-size: 0.76rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan), var(--amber) 62%, var(--magenta));
  box-shadow: 0 0 12px rgba(47, 227, 208, 0.45);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  background: var(--panel);
  border-top: var(--rule) solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: clamp(80px, 18vw, 220px);
  height: 2px;
  background: var(--amber);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  grid-template-areas: "ident cols contact";
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(42px, 6vw, 80px) clamp(30px, 4vw, 52px);
}

.footer-ident { grid-area: ident; }
.footer-cols { grid-area: cols; }
.footer-contact { grid-area: contact; }

.footer-ident__kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--steel);
  text-transform: uppercase;
}

.footer-ident__brand {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--bone);
  text-shadow: 0 0 20px rgba(47, 227, 208, 0.18);
}

.footer-ident__line {
  margin-top: 12px;
  max-width: 26em;
  font-size: 0.84rem;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--clay);
}

.footer-ident__cta { margin-top: 26px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col__title {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: var(--rule) solid var(--line);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--amber);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link {
  display: inline-block;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: var(--steel);
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.footer-link:hover {
  color: var(--cyan);
  padding-left: 6px;
}

.footer-contact {
  padding-left: clamp(16px, 2vw, 28px);
  border-left: var(--rule) solid var(--line);
}

.footer-contact__title {
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: var(--rule) solid var(--line);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--amber);
}

.footer-contact__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 13px;
}

.footer-contact__label {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--steel);
}

.footer-contact__value {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--bone);
  word-break: break-word;
}

.footer-contact__value--text {
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  line-height: 1.7;
}

.footer-contact__note {
  margin-top: 14px;
  max-width: 34em;
  font-size: 0.74rem;
  line-height: 1.75;
  color: var(--clay);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  padding-block: 16px;
  border-top: var(--rule) solid var(--line);
}

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-legal__links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--steel);
  transition: color 0.18s ease;
}

.footer-legal__links a:hover { color: var(--cyan); }

.footer-legal__icp {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--steel);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
  padding-block: 18px 28px;
  border-top: var(--rule) solid var(--line);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--steel);
}

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.82em 1.5em;
  border: var(--rule) solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: 0 0 22px rgba(47, 227, 208, 0.28);
}

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

.btn--amber:hover {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 0 22px rgba(240, 176, 60, 0.28);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--bone);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: var(--rule) solid var(--line);
  background: rgba(16, 36, 28, 0.62);
  color: var(--bone);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.tag.is-active,
.tag[aria-pressed="true"] {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  font-weight: 700;
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px 18px;
  padding-bottom: 18px;
  margin-bottom: clamp(20px, 3vw, 34px);
  border-bottom: var(--rule) solid var(--line);
}

.section-head__no {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  padding-top: 0.45em;
}

.section-head__label {
  align-self: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--steel);
}

.section-head__title { grid-column: 1 / -1; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--steel);
}

.breadcrumb__link {
  color: var(--steel);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.breadcrumb__link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.breadcrumb__sep { color: rgba(126, 154, 146, 0.5); }

.prose { max-width: 66ch; }

.prose p {
  max-width: 38em;
  line-height: 1.8;
  color: rgba(242, 241, 232, 0.86);
}

.prose p + p { margin-top: 1em; }
.prose strong { color: var(--bone); }

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(47, 227, 208, 0.42);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

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

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: var(--rule) solid var(--line);
  background: var(--panel);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 19, 15, 0) 42%, rgba(7, 19, 15, 0.72) 100%);
}

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.media__caption {
  margin-top: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--clay);
}

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

.heat-bar {
  position: relative;
  flex: 1 1 auto;
  min-width: 60px;
  height: 6px;
  background: rgba(42, 58, 52, 0.9);
  overflow: hidden;
}

.heat-bar__fill {
  display: block;
  height: 100%;
  width: var(--heat, 0%);
  background: linear-gradient(90deg, var(--cyan), var(--amber) 70%, var(--magenta));
  transition: width 0.4s ease;
}

.heat-bar__value {
  flex: none;
  min-width: 5ch;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--bone);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  border-left: var(--rule) solid var(--line);
}

.toc-link {
  position: relative;
  display: block;
  padding: 7px 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--steel);
  transition: color 0.16s ease;
}

.toc-link::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--cyan);
  transform: translateY(-50%);
  transition: height 0.16s ease;
}

.toc-link:hover { color: var(--bone); }

.toc-link[aria-current="true"] { color: var(--cyan); }
.toc-link[aria-current="true"]::before { height: 70%; }

.num {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.rule {
  height: var(--rule);
  border: 0;
  margin-block: clamp(24px, 4vw, 48px);
  background: var(--line);
}

.note-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.34em;
  color: var(--clay);
  text-transform: uppercase;
}

.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 30px);
  bottom: clamp(14px, 2.4vw, 30px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: var(--rule) solid var(--line);
  background: var(--panel);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, border-color 0.2s ease;
}

.to-top:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(47, 227, 208, 0.4);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

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

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

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "ident contact"
      "cols cols";
  }

  .footer-contact {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- 移动导航 ---------- */
@media (max-width: 960px) {
  :root {
    --header-top-h: 30px;
    --header-main-h: 60px;
  }

  .header-top__inner {
    gap: 12px;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .header-tagline { display: none; }
  .header-utility { font-size: 0.62rem; }

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

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 6px var(--gutter) 22px;
    background: var(--panel);
    border-bottom: var(--rule) solid var(--line);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

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

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav__list > li + li { border-top: var(--rule) solid var(--line); }

  .primary-nav__link {
    justify-content: flex-start;
    padding: 15px 0;
    font-size: 1.06rem;
  }

  .primary-nav__index {
    width: 2.4em;
    transform: none;
    font-size: 0.66rem;
    color: var(--amber);
  }

  .primary-nav__note { display: block; }

  .brand__mark { width: 30px; height: 30px; font-size: 0.78rem; }
  .brand__text { font-size: 0.94rem; }
}

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

/* ---------- 手机 ---------- */
@media (max-width: 700px) {
  body { background-size: 56px 100%; }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "ident"
      "cols"
      "contact";
    gap: 34px;
  }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { flex-direction: column; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 420px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .btn { padding: 0.78em 1.15em; letter-spacing: 0.1em; }
}

/* ---------- 无障碍动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .heat-bar__fill { transition: none; }
}
