@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --line-w: rgba(255, 255, 255, 0.22);
  --mute: rgba(0, 0, 0, 0.58);
  --rail: 252px;
  --unit: 8px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.004em;
}

h1,
h2,
h3,
.brand-t,
.rail-cta {
  font-family: "Space Grotesk", Inter, "Helvetica Neue", Arial, sans-serif;
}

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

.skip {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
}

.skip:focus {
  top: 12px;
}

/* ---------- 左侧固定竖排导航 ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand .logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
  background: var(--paper);
}

.brand .brand-t {
  display: inline-block;
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
}

.navlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  counter-reset: n;
}

.navlist::-webkit-scrollbar {
  display: none;
}

.navlist > li {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  counter-increment: n;
}

.navlist a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 11px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--paper);
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.navlist > li > a::before {
  content: counter(n, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  opacity: 0.5;
  letter-spacing: 0.04em;
}

.navlist a:hover,
.navlist a:focus-visible,
.navlist a.active {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.navlist ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}

.navlist ul a {
  font-size: 16px;
}

.navlist ul a::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
}

.rail-foot {
  flex: 0 0 auto;
  padding-left: 6px;
  border-left: 1px solid var(--line-w);
}

.rail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.rail-cta:hover,
.rail-cta:focus-visible {
  transform: translateY(-2px);
}

/* ---------- 主体网格 ---------- */

.wrap {
  padding: 0 20px;
}

.doc {
  max-width: 72ch;
}

.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.32) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(90deg, #000 0, transparent 88%);
  mask-image: linear-gradient(90deg, #000 0, transparent 88%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--unit);
  align-items: end;
}

.hero-art {
  grid-column: 1 / 4;
  align-self: start;
  line-height: 0;
}

.hero-art svg {
  width: 104px;
  height: auto;
}

.hero-desc {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  text-align: right;
  color: var(--mute);
  font-size: 16px;
  line-height: 1.65;
}

.hero-title {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  text-align: right;
  font-size: clamp(30px, 8vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}

/* ---------- 正文 ---------- */

div > article {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 110px;
}

div > article:first-of-type {
  border-top: 0;
}

div h2 {
  margin: 0 0 0.7em;
  font-size: clamp(23px, 5.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 700;
}

div h2 > span,
.side-h > span,
.fcol-h > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 2px solid currentColor;
}

div h3 {
  margin: 1.5em 0 0.5em;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

div p {
  margin: 0 0 1em;
  max-width: 66ch;
}

div ul,
div ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

div li {
  margin: 0.3em 0;
}

div a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

div blockquote {
  margin: 1.2em 0;
  padding: 0 0 0 1em;
  border-left: 3px solid var(--ink);
  color: var(--mute);
}

div img {
  height: auto;
  border-radius: 4px;
}

div code {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- 右侧边栏 ---------- */

.side {
  margin: 28px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.62));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.7);
}

.side-h {
  display: block;
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0.14em;
  font-weight: 600;
}

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

.side-list li {
  counter-increment: s;
  border-bottom: 1px solid var(--line);
}

.side-list li:last-child {
  border-bottom: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 4px 0;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}

.side-list a::before {
  content: counter(s, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  opacity: 0.45;
}

.side-list a:hover,
.side-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 页脚 ---------- */

.foot {
  margin-top: 44px;
  background: var(--ink);
  color: var(--paper);
}

.foot-in {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 32px 20px;
}

.addr {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  line-height: 1.65;
}

.addr-b {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.addr-d {
  color: rgba(255, 255, 255, 0.72);
  max-width: 34ch;
}

.fcol-h {
  display: block;
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.fcol ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.fcol ul a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 16px;
}

.fcol ul a:hover,
.fcol ul a:focus-visible {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--line-w);
}

.copy {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
}

.foot-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 16px;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 动效 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---------- 断点 ---------- */

@media (max-width: 899px) {
  .navlist li.grp:hover > ul,
  .navlist li.grp:focus-within > ul {
    display: flex;
  }
}

@media (min-width: 620px) {
  .hero-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
  }

  .hero-art {
    grid-column: 1 / 3;
  }

  .hero-desc {
    grid-column: 5 / -1;
  }

  .hero-title {
    grid-column: 4 / -1;
    margin-top: 8px;
  }

  .hero-art svg {
    width: 120px;
  }

  .foot-in {
    grid-template-columns: 1.5fr 1fr 1fr;
    padding: 40px;
  }

  .foot-bar {
    padding: 14px 40px 24px;
  }
}

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

  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 22px 16px 16px;
    overflow-y: auto;
  }

  .nav {
    flex: 1 1 auto;
    min-height: 0;
  }

  .navlist {
    flex-direction: column;
    gap: 2px;
    overflow-x: visible;
    overflow-y: auto;
  }

  .navlist > li {
    flex: 0 0 auto;
    display: block;
  }

  .navlist > li > a {
    width: 100%;
  }

  .navlist ul {
    list-style: none;
    display: none;
    position: absolute;
    left: calc(100% + 10px);
    top: -4px;
    min-width: 180px;
    padding: 6px;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.65);
    z-index: 120;
  }

  .navlist li.grp:hover > ul,
  .navlist li.grp:focus-within > ul {
    display: flex;
  }

  .navlist ul a {
    width: 100%;
    color: var(--ink);
  }

  .navlist ul a:hover,
  .navlist ul a:focus-visible {
    background: var(--ink);
    color: var(--paper);
  }

  .rail-foot {
    margin-top: auto;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line-w);
  }

  .rail-cta {
    width: 100%;
  }

  .brand {
    min-height: 48px;
  }

  .brand .logo {
    width: 28px;
    height: 28px;
  }

  .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 272px;
    gap: 2.5rem;
    padding: 0 40px;
    align-items: start;
  }

  .side {
    position: sticky;
    top: 28px;
    margin-top: 34px;
  }

  div > article {
    padding: 40px 0;
    scroll-margin-top: 28px;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .foot {
    margin-top: 64px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rail-cta:hover {
    transform: none;
  }
}

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