@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --soft: #d8d8d8;
  --muted: #4a4a4a;
  --rail: 238px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Figtree, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.62;
  font-weight: 400;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 12px 0 24px;
}

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

/* 左侧固定竖栏 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 30;
  width: var(--rail);
  padding: 26px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--paper);
  border-right: 1px solid var(--ink);
  overflow-y: auto;
}

.brand-a {
  display: block;
  padding: 8px 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--soft);
}

.rail-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--soft);
  font-size: 1rem;
  line-height: 1.5;
  transition: padding-left 0.22s ease;
}

.rail-link:hover {
  padding-left: 8px;
}

.rail-link .num {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rail-link .txt {
  min-width: 0;
}

.rail-cta {
  display: block;
  margin-top: auto;
  padding: 14px 12px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.rail-cta:hover {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* 主区域 */
main {
  margin-left: var(--rail);
}

.wrap {
  max-width: 1200px;
  padding: 0 clamp(20px, 4vw, 52px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 2rem;
  min-height: 45vh;
  padding: clamp(28px, 7vh, 64px) 0 clamp(24px, 5vh, 48px);
  border-bottom: 1px solid var(--ink);
}

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

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.lede {
  margin-top: 18px;
  max-width: 44ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-fig {
  border: 1px solid var(--ink);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.hero-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 212px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: clamp(36px, 6vh, 60px) 0 clamp(48px, 8vh, 84px);
}

.content {
  min-width: 0;
  max-width: 68ch;
}

.content > section {
  padding: clamp(30px, 5vh, 52px) 0;
  border-top: 1px solid var(--soft);
  scroll-margin-top: 96px;
}

.content > section:first-child {
  padding-top: 0;
  border-top: 0;
}

.content h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.content h3 {
  margin-top: 2em;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.content h4 {
  margin-top: 1.6em;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
}

.content p {
  margin: 14px 0;
}

.content ul,
.content ol {
  margin: 14px 0;
  padding-left: 1.35em;
}

.content li {
  margin: 8px 0;
}

.content blockquote {
  margin: 20px 0;
  padding-left: 18px;
  border-left: 2px solid var(--ink);
  color: var(--muted);
}

.content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content strong {
  font-weight: 600;
}

.content table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.content th,
.content td {
  padding: 10px 12px;
  border: 1px solid var(--soft);
  text-align: left;
  vertical-align: top;
}

.content th {
  font-weight: 600;
  border-color: var(--ink);
}

.content code {
  padding: 1px 5px;
  background: #f2f2f2;
  font-size: 0.92em;
}

.content pre {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--soft);
  overflow-x: auto;
}

/* 右侧目录 */
.side {
  position: sticky;
  top: 32px;
  padding-left: 20px;
  border-left: 1px solid var(--ink);
}

.side h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.side hr {
  margin: 10px 0 4px;
  border-top-color: var(--soft);
}

.side-nav {
  display: flex;
  flex-direction: column;
}

.side-link {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--soft);
  font-size: 1rem;
  line-height: 1.4;
  transition: padding-left 0.2s ease;
}

.side-link:hover {
  padding-left: 6px;
}

/* 页脚 */
footer {
  margin-left: var(--rail);
  padding: 0 clamp(20px, 4vw, 52px) 40px;
  border-top: 3px solid var(--ink);
}

.foot-cta-wrap {
  padding: clamp(32px, 6vh, 60px) 0 6px;
}

.foot-cta {
  display: inline-block;
  padding: 6px 0;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
  transition: opacity 0.22s ease;
}

.foot-cta:hover {
  opacity: 0.55;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 780px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--soft);
}

.foot-cols dt {
  margin-bottom: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.foot-cols dt a {
  display: inline-block;
  padding: 10px 0;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--ink);
  font-weight: 600;
}

.foot-cols dd {
  padding: 2px 0;
  font-size: 1rem;
  line-height: 1.55;
}

.foot-cols dd a {
  display: inline-block;
  padding: 10px 0;
}

.foot-cols dd a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.copy {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--soft);
  font-size: 0.95rem;
  color: var(--muted);
}

/* 滚动揭示 */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

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

  .rail-link,
  .rail-cta,
  .side-link,
  .foot-cta {
    transition: none;
  }
}

@media (max-width: 920px) {
  .rail {
    position: sticky;
    inset: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    overflow-x: auto;
    overflow-y: visible;
  }

  .brand-a {
    padding: 12px 0;
    font-size: 1.06rem;
    white-space: nowrap;
  }

  .rail-nav {
    flex-direction: row;
    gap: 2px;
    border-top: 0;
    overflow-x: auto;
  }

  .rail-link {
    padding: 12px 8px;
    border-bottom: 0;
    white-space: nowrap;
  }

  .rail-link:hover {
    padding-left: 8px;
  }

  .rail-link .num {
    display: none;
  }

  .rail-cta {
    margin-top: 0;
    margin-left: auto;
    padding: 12px 16px;
    white-space: nowrap;
  }

  main,
  footer {
    margin-left: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 42vh;
    gap: 1.25rem;
  }

  .hero-fig {
    max-width: 168px;
  }

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

  .side {
    position: static;
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .foot-cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .foot-cols {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .content h2 {
    font-size: 1.45rem;
  }
}

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