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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --pad: clamp(18px, 4vw, 52px);
  --font: "Space Grotesk", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { margin: 0 0 .6em; font-weight: 700; line-height: 1.02; letter-spacing: -.04em; }
hr { height: 0; margin: 0 0 1.1rem; border: 0; border-top: 2px solid var(--ink); }

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

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px; top: 0;
  z-index: 99;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}
.skip:focus { left: 0; }

/* 左侧竖排导航 */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 280px;
  padding: 22px 20px;
  overflow-y: auto;
  background: var(--paper);
  border-right: 3px solid var(--ink);
  transform: translateX(-100%);
  transition: transform .32s ease;
}
body.nav-open .side { transform: none; }

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.06em;
}
.brand img { width: 100%; height: 100%; object-fit: cover; }

.vnav {
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--ink);
}
.vnav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--ink);
  font-weight: 700;
  letter-spacing: -.02em;
}
.vnav a .ic {
  flex: 0 0 auto;
  width: 11px; height: 11px;
  background: var(--ink);
  transition: transform .2s ease;
}
.vnav a:hover,
.vnav a:focus-visible { background: var(--ink); color: var(--paper); }
.vnav a:hover .ic,
.vnav a:focus-visible .ic { background: var(--paper); transform: rotate(45deg); }

.search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.search input {
  flex: 1 1 110px;
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.search button {
  min-height: 44px;
  padding: 0 15px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toggle {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 70;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
body.nav-open .toggle { background: var(--ink); color: var(--paper); }

/* 首屏 */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: 78px var(--pad) clamp(34px, 6vw, 64px);
  overflow: hidden;
  text-align: center;
  border-bottom: 3px solid var(--ink);
}
.hero-media {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  will-change: transform;
}
.hero-img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
}
.hero-mask {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .84);
}
.hero-in { position: relative; z-index: 2; max-width: 18ch; }
.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 5.4rem);
  line-height: .93;
  letter-spacing: -.05em;
  font-weight: 700;
}
.band {
  position: absolute;
  left: -6%; right: -6%;
  bottom: -12px;
  z-index: 3;
  height: 20px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(45deg, #000 0 13px, #fff 13px 26px);
  transform: skewY(-2.4deg);
}

/* 正文骨架 */
main { display: block; }

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 74px) var(--pad) 72px;
}

.content article {
  counter-reset: sec;
  max-width: 70ch;
}
.content article > section {
  padding: clamp(26px, 4vw, 50px) 0;
  border-top: 3px solid var(--ink);
  scroll-margin-top: 20px;
}
.content article > section:first-child {
  padding-top: 0;
  border-top: 0;
}
.content article > section::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .26em;
}

.content h2 {
  font-size: clamp(1.6rem, 4.2vw, 2.85rem);
  margin: 0 0 .45em;
}
.content h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  margin: 1.5em 0 .4em;
}
.content p,
.content li { line-height: 1.78; }
.content ul,
.content ol { margin: 0 0 1.2em; padding-left: 1.25em; }
.content li { margin: .35em 0; }
.content a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.content a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border: 3px solid var(--ink);
  font-weight: 700;
}
.content img { margin: 1.4em 0; border: 2px solid var(--ink); }
.content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .97rem; }
.content th,
.content td { padding: 9px 11px; border: 2px solid var(--ink); text-align: left; }
.content code { font-size: .95em; }

/* 右侧索引 */
.rail {
  align-self: start;
  padding: 18px;
  border: 3px solid var(--ink);
}
.rail h2 {
  margin: 0 0 .7rem;
  font-size: 1.02rem;
  letter-spacing: .12em;
}
.rail hr { margin: 0 0 .9rem; }
.rail ol {
  counter-reset: rail;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail li { border-top: 1px solid var(--ink); }
.rail li:first-child { border-top: 0; }
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 0;
  font-size: .96rem;
  font-weight: 700;
}
.rail a::before {
  counter-increment: rail;
  content: counter(rail, decimal-leading-zero);
  font-size: .76rem;
  letter-spacing: .14em;
  opacity: .6;
}
.rail a:hover { background: var(--ink); color: var(--paper); }

/* 页脚 */
.foot { border-top: 3px solid var(--ink); }
.foot-top {
  display: grid;
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 62px) var(--pad);
}
.f-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.06em;
}
.f-logo img { width: 100%; height: 100%; object-fit: cover; }
.f-desc {
  max-width: 34ch;
  margin: 16px 0 0;
  line-height: 1.72;
}
.f-nav dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 14px;
  margin: 0;
}
.f-nav dt {
  padding: 12px 0;
  border-top: 1px solid var(--ink);
  font-size: .82rem;
  letter-spacing: .2em;
  opacity: .62;
}
.f-nav dd {
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid var(--ink);
}
.f-nav dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.f-nav dd a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

.foot-mid {
  margin-top: 6px;
  padding: clamp(14px, 3vw, 26px) 0 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.giant {
  margin: 0;
  text-align: center;
  font-size: clamp(2.9rem, 14.5vw, 12.5rem);
  line-height: .82;
  letter-spacing: -.06em;
  white-space: nowrap;
  transform: translateY(.07em);
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 18px var(--pad) 30px;
  font-size: .92rem;
}
.foot-bar p { margin: 0; }
.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  font-weight: 700;
}
.to-top:hover { background: var(--ink); color: var(--paper); }

/* 动效 */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise .7s ease both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
  }
}
.js .content article > section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.js .content article > section.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .content article > section { opacity: 1; transform: none; transition: none; }
  .side { transition: none; }
}

/* 断点 */
@media (max-width: 900px) {
  body.nav-open { overflow: hidden; }
  .hero { padding-top: 76px; }
}

@media (min-width: 820px) {
  .foot-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
}

@media (min-width: 1000px) {
  .wrap { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
  .rail { position: sticky; top: 26px; }
}

@media (min-width: 901px) {
  body { padding-left: 280px; }
  .side { transform: none; }
  .toggle { display: none; }
  .hero { padding-top: clamp(40px, 6vw, 72px); }
}
</｜DSML｜ parameter>
</｜DSML｜ invoke>
</｜DSML｜ calls>

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