@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --void: #000000;
  --panel: #121212;
  --panel-hi: #191919;
  --panel-lo: #0b0b0b;
  --line: #232323;
  --line-soft: #1a1a1a;
  --text: #ececec;
  --dim: #a2a2a2;
  --faint: #6c6c6c;
  --accent: #7ce7ff;
  --accent-dim: rgba(124, 231, 255, 0.16);
  --radius: 10px;
  --rail-w: 236px;
  --side-w: 264px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--void);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

a {
  color: var(--text);
}

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

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

/* 左侧固定竖排导航 */
.masthead {
  position: fixed;
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  z-index: 30;
  width: var(--side-w);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 20px 30px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0c0c0c 0%, #000000 58%);
  border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: max-content;
  text-decoration: none;
}

.mark-dot {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(150deg, #313131 0%, #0d0d0d 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 16px var(--accent-dim);
}

.mark-img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.wordmark {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.dock {
  margin: 0;
  min-width: 0;
}

.dock > p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.dock a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 15px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.dock a:hover,
.dock a[aria-current='true'] {
  background: var(--panel-hi);
  color: #ffffff;
  transform: translateX(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 0 18px var(--accent-dim);
}

.reach {
  margin: 4px 0 0;
}

.reach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 22px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--accent);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid #2c3437;
  transition: background 0.22s ease, border-color 0.22s ease;
}

.reach-btn:hover {
  background: rgba(124, 231, 255, 0.08);
  border-color: #3c4a4f;
}

main {
  margin-left: var(--side-w);
  min-width: 0;
}

/* 首屏 */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 70vh;
  padding: 96px clamp(20px, 5vw, 64px) 58px;
  overflow: hidden;
  background: radial-gradient(95% 130% at 82% 0%, #171717 0%, #050505 62%, #000000 100%);
  scroll-margin-top: 24px;
}

.hero.compact {
  min-height: 48vh;
}

.hero-media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) saturate(0.85);
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 90% at 88% 18%, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.9) 72%),
    linear-gradient(0deg, #000000 3%, rgba(0, 0, 0, 0.18) 62%);
}

.badge {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: clamp(18px, 4vw, 54px);
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 36px);
  padding: 7px 15px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--accent);
  border-radius: 999px;
  background: rgba(10, 14, 16, 0.78);
  border: 1px solid #2b3438;
  text-shadow: 0 0 10px rgba(124, 231, 255, 0.35);
  transition: opacity 0.26s ease;
}

.badge.is-swap {
  opacity: 0.25;
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 800px;
  text-align: right;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #ffffff;
  overflow-wrap: break-word;
}

.lede {
  margin: 0;
  max-width: 62ch;
  margin-left: auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--dim);
}

/* 正文区 + 左栏 */
.stage {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 54px);
  padding: clamp(34px, 5vw, 72px) clamp(20px, 5vw, 64px) 72px;
  scroll-margin-top: 24px;
}

.rail {
  position: sticky;
  top: 24px;
  align-self: start;
  min-width: 0;
  padding: 20px 18px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.rail small {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}

.rail-title {
  margin: 6px 0 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
  overflow-wrap: break-word;
}

.rail-list {
  list-style: none;
  counter-reset: rail;
  margin: 0;
  padding: 0;
}

.rail-list li {
  counter-increment: rail;
  min-width: 0;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #4d4d4d;
  flex: 0 0 auto;
}

.rail-list a:hover,
.rail-list a[aria-current='true'] {
  color: #ffffff;
  padding-left: 4px;
}

/* 正文排版 */
.flow {
  min-width: 0;
  max-width: 74ch;
  overflow-wrap: break-word;
  word-break: break-word;
}

.flow > * {
  max-width: 100%;
}

.flow section {
  scroll-margin-top: 24px;
}

.flow > section + section {
  margin-top: clamp(28px, 4vw, 52px);
  padding-top: clamp(28px, 4vw, 52px);
  border-top: 1px solid var(--line);
}

.flow h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.45;
  color: #ffffff;
  overflow-wrap: break-word;
}

.flow h3 {
  margin: 26px 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
  overflow-wrap: break-word;
}

.flow p {
  margin: 0 0 15px;
  color: #d4d4d4;
}

.flow a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 231, 255, 0.35);
  overflow-wrap: anywhere;
}

.flow a:hover {
  border-bottom-color: var(--accent);
}

.flow ul,
.flow ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.flow li {
  margin-bottom: 8px;
  color: #d4d4d4;
  overflow-wrap: break-word;
}

.flow strong {
  color: #ffffff;
}

.flow blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  color: #e2e2e2;
}

.flow blockquote p:last-child {
  margin-bottom: 0;
}

.flow figure {
  margin: 20px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--panel);
}

.flow figcaption {
  margin-top: 10px;
  font-size: 15px;
  color: var(--faint);
}

.flow img {
  border-radius: 8px;
  display: block;
  max-width: 100%;
  height: auto;
}

.flow pre {
  margin: 0 0 18px;
  padding: 14px 16px;
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--panel);
  color: #e2e2e2;
  font-size: 15px;
  line-height: 1.6;
}

.flow code {
  overflow-wrap: anywhere;
}

.flow hr {
  margin: 26px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.flow table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 16px;
}

.flow th,
.flow td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  overflow-wrap: break-word;
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 26px;
  margin-left: var(--side-w);
  padding: 26px clamp(20px, 5vw, 64px);
  background: #060606;
  border-top: 1px solid var(--line);
}

.foot-brand {
  min-width: 0;
}

.foot-mark {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-decoration: none;
}

.copy {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--faint);
}

.foot-nav {
  min-width: 0;
}

.foot-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-nav a:hover {
  color: #ffffff;
}

.foot-end {
  margin-left: auto;
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 16px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.to-top:hover {
  background: var(--panel-hi);
  border-color: #333333;
}

@media (max-width: 1080px) {
  :root {
    --rail-w: 200px;
    --side-w: 232px;
  }
}

@media (max-width: 980px) {
  html,
  body {
    overflow-x: clip;
  }

  body {
    font-size: 17px;
  }

  .masthead {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    min-width: 0;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 16px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  }

  .wordmark {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
  }

  .reach {
    margin: 0;
  }

  .reach-btn {
    min-height: 40px;
    padding: 6px 16px;
  }

  .dock {
    flex: 1 0 100%;
    min-width: 0;
    max-width: 100%;
  }

  .dock > p {
    flex-direction: row;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .dock > p::-webkit-scrollbar {
    display: none;
  }

  .dock a {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 16px;
  }

  .dock a:hover {
    transform: none;
  }

  main,
  .foot {
    margin-left: 0;
  }

  .hero,
  .hero.compact {
    min-height: 56vh;
    padding: 60px 18px 34px;
    scroll-margin-top: 118px;
    max-width: 100%;
  }

  .badge {
    top: 14px;
    right: 16px;
  }

  .hero-copy,
  .lede {
    max-width: 100%;
  }

  .hero-copy h1 {
    font-size: clamp(1.8rem, 7.6vw, 2.5rem);
  }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 30px 18px 56px;
    scroll-margin-top: 118px;
    max-width: 100%;
    min-width: 0;
  }

  .rail {
    position: static;
    max-width: 100%;
  }

  .rail-list a {
    min-height: 42px;
    font-size: 16px;
  }

  .flow {
    max-width: 100%;
    overflow-x: auto;
  }

  .flow table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .flow section,
  .hero,
  .stage {
    scroll-margin-top: 118px;
  }

  .foot {
    padding: 22px 18px 30px;
    gap: 14px 18px;
    max-width: 100%;
  }

  .foot-brand,
  .foot-nav,
  .foot-end {
    min-width: 0;
  }

  .foot-nav {
    order: 3;
    flex: 1 0 100%;
    border-top: 1px solid var(--line-soft);
    padding-top: 10px;
  }

  .foot-nav a {
    min-height: 42px;
  }

  .foot-end {
    margin-left: 0;
  }

  .to-top {
    min-height: 42px;
    padding: 6px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
