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

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --r: 28px;
  --rail: 15rem;
  --pad: 1.25rem;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid #000; outline-offset: 3px; }

/* 顶部细条 */
.strip {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  min-height: 34px;
  padding: 0 var(--pad);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
}
.tick { line-height: 1; }

/* 左侧竖排导航 */
.rail {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #fff;
  border-bottom: 2px solid #000;
  padding: 0.7rem var(--pad);
}
.mark {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
.pills {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
  overflow-x: auto;
  padding: 0.15rem 0;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 2px solid #000;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.pill:hover, .pill:focus-visible { background: #000; color: #fff; }

/* 首屏 */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 45vh;
  padding: 2.5rem var(--pad) 3rem;
  text-align: center;
}
.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.hero-mark {
  width: 88px;
  height: 88px;
  object-fit: contain;
  background: #fff;
  border: 2px solid #000;
  border-radius: 50%;
  padding: 0.75rem;
  will-change: transform;
}

/* 主体：左栏 + 正文 */
.stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem var(--pad) 4rem;
}

.side { border-top: 2px solid #000; padding-top: 1rem; }
.side small {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}
.side h2 {
  margin: 0.4rem 0 1rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.side-nav { list-style: none; margin: 0; padding: 0; counter-reset: idx; }
.side-nav li { counter-increment: idx; border-bottom: 1px solid rgba(0, 0, 0, 0.18); }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 500;
  text-decoration: none;
}
.side-nav a::before {
  content: counter(idx, decimal-leading-zero);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  opacity: 0.55;
}
.side-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* 正文 */
.body { min-width: 0; counter-reset: step; }
.body section {
  counter-increment: step;
  padding: 2.75rem 0;
  border-top: 2px solid #000;
  scroll-margin-top: 6rem;
}
.body section:first-child { border-top: 0; padding-top: 0; }
.body section::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}
.body h2 {
  margin: 0 0 1.1rem;
  max-width: 22ch;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.9rem, 6.5vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.body h3 {
  margin: 2rem 0 0.8rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.3rem, 3.4vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.body small {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}
.body p { margin: 0 0 1.1rem; max-width: 64ch; }
.body ul, .body ol { margin: 0 0 1.2rem; padding-left: 1.3rem; max-width: 62ch; }
.body li { margin: 0.45rem 0; }
.body a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.body blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border: 2px solid #000;
  border-radius: var(--r);
  font-size: 1.1rem;
  font-weight: 500;
}
.body img { margin: 1.5rem 0; border: 2px solid #000; border-radius: var(--r); }
.body figure { margin: 1.5rem 0; padding: 1rem; border: 2px solid #000; border-radius: var(--r); }
.body table { width: 100%; border-collapse: collapse; border: 2px solid #000; font-size: 0.98rem; }
.body th, .body td { padding: 0.7rem 0.8rem; border-bottom: 1px solid rgba(0, 0, 0, 0.2); text-align: left; }
.body pre { padding: 1rem; overflow: auto; border: 2px solid #000; border-radius: var(--r); }

/* 滚动浮现 */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.js .reveal.in { opacity: 1; transform: none; }

/* 页脚 */
.foot { border-top: 2px solid #000; padding: 3rem var(--pad) 1.5rem; }
.foot-cta { margin: 0 0 2.5rem; line-height: 0.85; }
.foot-cta a {
  display: inline-block;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 13vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.foot-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 0 0 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.25);
}
.foot dl { margin: 0; }
.foot dt {
  margin-bottom: 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.foot dd { margin: 0; }
.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.foot dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
}
.foot-base .copy { margin: 0; }
.foot-base .top { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }

@media (min-width: 700px) {
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  body { padding-left: var(--rail); padding-top: 2.6rem; }
  .strip {
    position: fixed;
    top: 0;
    left: var(--rail);
    right: 0;
    z-index: 30;
    height: 2.6rem;
    justify-content: flex-start;
  }
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    z-index: 50;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 1.25rem;
    border-bottom: 0;
    border-right: 2px solid #000;
    overflow-y: auto;
  }
  .pills { flex-direction: column; gap: 0.45rem; width: 100%; overflow: visible; }
  .pill { width: 100%; }
  .hero { padding-top: 3rem; }
  .stage {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 3.5rem;
    padding: 2rem 2.5rem 5rem;
  }
  .side { position: sticky; top: 4.2rem; align-self: start; border-top: 0; padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-mark { transform: none !important; }
}

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