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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rule: rgba(0, 0, 0, 0.2);
  --rule-inv: rgba(255, 255, 255, 0.35);
  --u: 8px;
  --r: 18px;
  --rail: 88px;
}

*,
*::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: Roboto, Helvetica, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

.railbar {
  position: fixed;
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: var(--rail);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  background: var(--ink);
  color: var(--paper);
}

.mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r);
}

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r);
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.02em;
  user-select: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary::marker {
  content: "";
}

.menu summary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.menu[open] summary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.menu menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: 0;
  left: calc(100% + 12px);
  min-width: 216px;
  display: grid;
  gap: 2px;
  background: var(--ink);
  border-radius: var(--r);
}

.menu menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 16px;
  text-decoration: none;
}

.menu menu a:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- 右侧主按钮 ---------- */

.cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--paper);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.cta:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
}

main {
  margin-left: var(--rail);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding: 120px 5vw 72px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-media--blank {
  background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px);
  background-size: 20px 20px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.88) 100%);
}

.hero-title {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 20ch;
  text-align: right;
  font-size: clamp(2.1rem, 7vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
}

/* ---------- 正文骨架 ---------- */

.doc {
  display: grid;
  grid-template-columns: minmax(180px, 236px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  padding: 72px 5vw;
}

.doc-aside {
  position: sticky;
  top: 40px;
  align-self: start;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}

.doc-aside h2 {
  font-size: 20px;
  line-height: 1.25;
}

.doc-aside .subtitle {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.72;
}

.aside-nav {
  list-style: none;
  margin: 20px 0 0;
  padding: 12px 0 0;
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--rule);
}

.aside-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.aside-nav a:hover {
  border-bottom-color: var(--ink);
}

.doc-body {
  min-width: 0;
  max-width: 74ch;
}

.doc-body > div {
  padding: 34px 0;
}

.doc-body > div + div {
  border-top: 1px solid var(--rule);
}

.doc-body h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin-bottom: 8px;
}

.doc-body h3 {
  font-size: 1.15rem;
  margin: 26px 0 6px;
}

.doc-body p {
  margin: 12px 0;
}

.doc-body ul,
.doc-body ol {
  margin: 12px 0;
  padding-left: 1.25em;
}

.doc-body li {
  margin: 6px 0;
}

.doc-body a {
  text-underline-offset: 3px;
}

.doc-body strong {
  font-weight: 700;
}

.doc-body blockquote {
  margin: 22px 0;
  padding: 16px 22px;
  border-radius: var(--r);
  background: #f1f1f1;
  font-size: 17px;
}

.doc-body figure {
  margin: 22px 0;
}

.doc-body figure img {
  width: 100%;
  border-radius: var(--r);
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}

.doc-body th,
.doc-body td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}

/* ---------- 收尾区块 ---------- */

.end {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 64px 5vw 96px;
  background: var(--ink);
  color: var(--paper);
}

.end-figure {
  flex: 1 1 auto;
  height: 2px;
  margin: 0;
  background-image: repeating-linear-gradient(90deg, var(--paper) 0 3px, transparent 3px 11px);
}

.end-top {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--paper);
  border-radius: var(--r);
  font-size: 16px;
  text-decoration: none;
}

.end-top:hover {
  background: var(--paper);
  color: var(--ink);
}

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

.foot {
  padding: 56px 5vw 32px;
  background: var(--ink);
  color: var(--paper);
}

.foot-brand {
  margin: 0 0 44px;
  font-size: clamp(2.4rem, 10.5vw, 7.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
  word-break: break-word;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--rule-inv);
}

.foot-cols dl {
  margin: 0;
}

.foot-cols dt {
  margin-bottom: 8px;
  font-size: 15px;
  letter-spacing: 0.08em;
  opacity: 0.66;
}

.foot-cols dd {
  margin: 0;
  font-size: 16px;
}

.foot-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-cols a:hover {
  border-bottom-color: var(--paper);
}

.foot-copy {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-inv);
  text-align: center;
  font-size: 15px;
  opacity: 0.82;
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.doc-body > div.in,
.doc-aside.in,
.end-top.in {
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .doc-body > div.in,
  .doc-aside.in,
  .end-top.in {
    animation: none;
  }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 960px) {
  .railbar {
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
  }

  .menu menu {
    top: calc(100% + 12px);
    left: auto;
    right: 0;
  }

  main {
    margin-left: 0;
  }

  .hero {
    min-height: 88vh;
    min-height: 88svh;
    padding: 96px 20px 56px;
  }

  .hero-title {
    max-width: none;
  }

  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 48px 20px;
  }

  .doc-aside {
    position: static;
  }

  .aside-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  .doc-body > div {
    padding: 26px 0;
    scroll-margin-top: 86px;
  }

  .end {
    padding: 48px 20px 88px;
  }

  .foot {
    padding: 44px 20px 28px;
  }

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .cta {
    right: 16px;
    bottom: 16px;
  }
}

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