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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --hair: rgba(0, 0, 0, 0.16);
  --faint: rgba(0, 0, 0, 0.055);
  --bar: 4.25rem;
  --pad: clamp(1.15rem, 4.5vw, 4.5rem);
  --stack: "Work Sans", "Outfit", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::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: var(--stack);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: -0.005em;
}

html.menu-open body { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

p { margin: 0 0 1.05rem; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ol, ul { margin: 0; padding: 0; }
figure { margin: 0; }
button { font: inherit; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: var(--bar);
  padding: 0 var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.topbar > * { position: relative; z-index: 2; }
.topbar .overlay { z-index: 1; }

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0;
  flex: none;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  padding: 0 1.1rem;
  border: 1px solid var(--ink);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  background: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  flex: none;
}

.burger i {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.32s ease, opacity 0.32s ease;
}

html.menu-open .mark { background: var(--paper); color: var(--ink); }
html.menu-open .burger { border-color: var(--paper); }
html.menu-open .burger i { background: var(--paper); }
html.menu-open .burger i:nth-child(2) { transform: translateY(7px) rotate(45deg); }
html.menu-open .burger i:nth-child(3) { opacity: 0; }
html.menu-open .burger i:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
html.menu-open .cta { border-color: var(--paper); color: var(--paper); }
html.menu-open .topbar { border-bottom-color: transparent; }

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--bar) + 1.5rem) var(--pad) 2rem;
  list-style: none;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-101%);
  visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.72, 0, 0.18, 1), visibility 0.55s;
}

html.menu-open .overlay { transform: none; visibility: visible; }

.overlay li { border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
.overlay li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.22); }

.overlay a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 0;
  font-size: clamp(1.5rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.overlay a:hover { padding-left: 0.4rem; transition: padding-left 0.25s ease; }

/* ---------- 粘性分节条 ---------- */
.rail {
  position: sticky;
  top: var(--bar);
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}

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

.rail ol {
  display: flex;
  min-width: max-content;
  padding: 0 var(--pad);
  list-style: none;
}

.rail li + li { border-left: 1px solid var(--hair); }

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.95rem;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}

.rail a:hover { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: var(--pad);
  min-height: 45vh;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--pad) 1.75rem;
  border-bottom: 1px solid var(--ink);
  overflow: clip;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
  overflow: clip;
}

.hero-bg span {
  padding-right: 0.06em;
  font-size: clamp(3rem, 15vw, 12rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.06em;
  color: var(--faint);
  white-space: nowrap;
  transition: opacity 0.22s linear;
}

.hero-fig {
  position: relative;
  z-index: 1;
  overflow: clip;
  min-height: 30vh;
  background: var(--ink);
}

.hero-fig .hero-img,
.hero-fig img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  will-change: transform;
}

.hero-fig-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30vh;
  padding: 1rem;
  color: var(--paper);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  writing-mode: vertical-rl;
  will-change: transform;
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: right;
}

.eyebrow {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.35rem, 7.6vw, 5.75rem);
  letter-spacing: -0.055em;
}

.lede {
  margin: 1rem 0 0;
  margin-left: auto;
  max-width: 26rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.72);
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1.15rem;
  padding: 0 1.25rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 600;
}

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

/* ---------- 正文区 ---------- */
.body {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: var(--pad);
  padding: clamp(2rem, 5vw, 5rem) var(--pad);
}

.index {
  position: sticky;
  top: calc(var(--bar) + 3.75rem);
  align-self: start;
  padding-top: 0.7rem;
  border-top: 2px solid var(--ink);
}

.index small {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.index h2 {
  margin: 0.15rem 0 0.6rem;
  font-size: 1.375rem;
}

.index ol { list-style: none; }

.index li { border-top: 1px solid var(--hair); }

.index a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0;
  font-size: 1rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.78);
}

.index a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

.prose {
  min-width: 0;
  max-width: 66rem;
  overflow-wrap: break-word;
}

.prose div {
  padding: clamp(2rem, 5vw, 4.5rem) 0;
  border-top: 1px solid var(--ink);
  scroll-margin-top: calc(var(--bar) + 3.75rem);
}

.prose div:first-child { border-top: 0; padding-top: 0; }
.prose div:last-child { padding-bottom: 0; }

.prose small {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.prose h2 {
  margin: 0.5rem 0 1.1rem;
  font-size: clamp(1.75rem, 4.2vw, 3.15rem);
}

.prose h3 {
  margin: 2.1rem 0 0.6rem;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
}

.prose p { max-width: 40em; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.25rem; max-width: 40em; }
.prose li { margin-bottom: 0.4rem; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.prose a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

.prose strong, .prose b { font-weight: 700; }

.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.35rem 0 0.35rem 1.15rem;
  border-left: 4px solid var(--ink);
  font-weight: 500;
  max-width: 40em;
}

.prose figure { margin: 1.6rem 0; }
.prose figcaption { margin-top: 0.5rem; font-size: 1rem; color: rgba(0, 0, 0, 0.6); }

.prose img { width: 100%; height: auto; }

.prose table {
  width: 100%;
  margin: 0 0 1.2rem;
  border-collapse: collapse;
  font-size: 1rem;
}

.prose th, .prose td {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}

.prose th { background: var(--ink); color: var(--paper); font-weight: 600; }

.prose hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--ink); }

.prose div > article:not([class]) { min-width: 0; }

/* 卡片：零圆角 + 底部强调线 */
.prose div section,
.prose div .card {
  padding: 1.1rem 0;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 1.4rem;
}

/* ---------- 页脚 ---------- */
.site-foot {
  margin-top: clamp(2rem, 6vw, 5rem);
  padding: clamp(2rem, 4.5vw, 3.5rem) var(--pad) 1.25rem;
  border-top: 1px solid var(--ink);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--pad);
  align-items: start;
}

.foot-brand address {
  font-style: normal;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.5;
}

.foot-links ul { list-style: none; }

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.78);
}

.foot-links a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.foot-bar p { margin: 0; font-size: 1rem; font-weight: 600; }

.foot-bar ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
}

.foot-bar a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 1rem;
}

.foot-bar a:hover { box-shadow: inset 0 -2px 0 var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .cta { display: none; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    gap: 1.25rem;
    padding-top: 1.5rem;
  }

  .hero-copy { text-align: left; order: 1; }
  .hero-fig { order: 2; min-height: 24vh; }
  .hero-fig-mark { min-height: 24vh; writing-mode: horizontal-tb; letter-spacing: 0.2em; }
  .lede { margin-left: 0; }
  .hero-bg { align-items: flex-start; justify-content: flex-start; }
  .hero-bg span { font-size: clamp(2.6rem, 18vw, 6rem); }

  .body {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    padding-top: 1.75rem;
  }

  .index { position: static; }
  .index ol {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .index ol::-webkit-scrollbar { display: none; }
  .index li { border-top: 0; border-left: 1px solid var(--hair); flex: none; }
  .index a { padding: 0 0.8rem; white-space: nowrap; }

  .prose div { scroll-margin-top: calc(var(--bar) + 3.5rem); }

  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bar { justify-content: flex-start; }
  .prose table { font-size: 1rem; }
  .prose th, .prose td { padding: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .overlay { transition: none; }
  .hero-bg span { transition: none; }
  .hero-img, .hero-fig-mark { transform: none !important; }
}

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