:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: rgba(0, 0, 0, .62);
  --soft: rgba(0, 0, 0, .08);
  --r: 10px;
  --max: 1200px;
  --edge: clamp(.9rem, 3vw, 2rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, .075) 1px, transparent 1.1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: Epilogue, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
}

h1, h2, h3, h4, .brand, summary {
  font-family: Anton, Epilogue, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
hr { border: 0; border-top: 2px solid var(--ink); margin: 1rem 0; }
strong, b { font-weight: 700; }

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

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

.h { display: none !important; }

/* ---------- 头部 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}

.head-top {
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: .55rem var(--edge);
}

.brand {
  font-size: 1.3rem;
  letter-spacing: .01em;
  white-space: nowrap;
  padding: .3rem 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.brand::after {
  content: "";
  display: inline-block;
  width: .48em;
  height: .48em;
  margin-left: .38rem;
  background: var(--ink);
}

.rot {
  display: flex;
  gap: .6rem;
  margin: 0 0 0 .4rem;
  font-size: .78rem;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  max-width: 36ch;
}

.rot a { opacity: .28; transition: opacity .3s ease; }
.rot a.on { opacity: 1; }
.rot a:hover { opacity: 1; }

.find { display: flex; margin-left: auto; }

.find input {
  width: 9rem;
  min-height: 40px;
  padding: .45rem .7rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .75);
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
}

.find input::placeholder { color: rgba(0, 0, 0, .45); }

.drop { position: relative; }

.drop summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: .45rem .8rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  font-size: .85rem;
  background: rgba(255, 255, 255, .75);
  user-select: none;
}

.drop summary::-webkit-details-marker { display: none; }
.drop[open] summary { background: var(--ink); color: var(--paper); }

.drop-body {
  position: absolute;
  right: 0;
  top: calc(100% + .55rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  width: min(80vw, 340px);
  padding: .9rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  counter-reset: g;
}

.grp { counter-increment: g; }

.grp::before {
  content: counter(g, decimal-leading-zero);
  display: block;
  font-family: Anton, Epilogue, sans-serif;
  font-size: .72rem;
  letter-spacing: .16em;
  padding-bottom: .3rem;
  margin-bottom: .35rem;
  border-bottom: 1px solid var(--ink);
}

.grp ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .12rem; }

.grp a {
  display: block;
  padding: .5rem .3rem;
  font-size: .84rem;
  line-height: 1.3;
  border-radius: 6px;
}

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

.jump {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--edge) .6rem;
}

.jump p {
  display: flex;
  gap: .45rem;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: .1rem;
}

.jump p::-webkit-scrollbar { display: none; }

.jump a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .85rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  font-size: .88rem;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}

.jump a:hover, .jump a:focus-visible { background: var(--ink); color: var(--paper); }

/* ---------- 主视觉 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.3rem, 5vw, 3.4rem) var(--edge);
  min-height: min(86vh, 760px);
}

.hero h1 {
  font-size: clamp(2.25rem, 7vw, 5.2rem);
  line-height: .95;
  letter-spacing: -.03em;
}

.lead {
  margin: 1.1rem 0 1.6rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  color: var(--mute);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 1rem;
  transition: transform .22s ease, background .22s ease, color .22s ease;
}

.btn:hover { background: transparent; color: var(--ink); transform: translateY(-2px); }

.hero-art {
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero-art img,
.dot-art {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.dot-art {
  background-color: #000;
  background-image: radial-gradient(#fff 1.6px, transparent 1.7px);
  background-size: 16px 16px;
}

/* ---------- 正文与侧栏 ---------- */
.stream {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--edge) clamp(2rem, 6vw, 4rem);
}

.doc { counter-reset: sec; min-width: 0; }

.doc > div {
  position: relative;
  margin: 0 0 1.4rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  scroll-margin-top: 140px;
}

.doc > div::before {
  content: counter(sec, decimal-leading-zero);
  counter-increment: sec;
  display: block;
  font-family: Anton, Epilogue, sans-serif;
  font-size: .84rem;
  letter-spacing: .18em;
  margin-bottom: .55rem;
}

.doc h2 { font-size: clamp(1.4rem, 3.4vw, 2.05rem); }

h2 + hr {
  width: 64px;
  border-top-width: 4px;
  margin: .55rem 0 1rem;
}

h3 + hr { width: 44px; margin: .5rem 0 .9rem; }

.doc h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 .5rem;
}

.doc p { margin: 0 0 .9rem; }

.doc ul, .doc ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.doc li { margin: .28rem 0; }
.doc li::marker { font-weight: 700; }

.doc a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.doc blockquote {
  margin: 1.1rem 0;
  padding: .8rem 1rem;
  border-left: 4px solid var(--ink);
  background: rgba(0, 0, 0, .045);
}

.doc figure { margin: 1.1rem 0; }
.doc figure img { border: 2px solid var(--ink); border-radius: var(--r); }
.doc figcaption { font-size: .84rem; color: var(--mute); margin-top: .4rem; }

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

.doc th, .doc td { border: 2px solid var(--ink); padding: .5rem .6rem; text-align: left; }
.doc th { background: var(--ink); color: var(--paper); font-weight: 600; }

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: rgba(0, 0, 0, .07);
  padding: .1em .35em;
}

.side {
  position: sticky;
  top: 132px;
  padding: 1rem;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.side h2 { font-size: 1.05rem; }
.side hr { width: 40px; border-top-width: 3px; margin: .45rem 0 .8rem; }

.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }

.side-list a {
  display: block;
  padding: .6rem .25rem;
  font-size: .9rem;
  line-height: 1.35;
  border-bottom: 1px solid rgba(0, 0, 0, .14);
}

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

.to-top { margin: .85rem 0 0; }
.to-top a { font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 页脚 ---------- */
.site-foot {
  margin-top: 2rem;
  padding: clamp(1.6rem, 5vw, 3.2rem) var(--edge) 1.2rem;
  background: #000;
  color: #fff;
}

.foot-cta {
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid #fff;
}

.foot-cta h2 { font-size: clamp(1.7rem, 5vw, 3.1rem); }
.foot-cta hr { border-top: 3px solid #fff; width: 70px; margin: .6rem 0 1.1rem; }

.btn.big {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-size: 1.05rem;
}

.btn.big:hover { background: #000; color: #fff; }

.foot-base {
  max-width: var(--max);
  margin: 1.2rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.foot-base address {
  font-style: normal;
  font-family: Anton, Epilogue, "PingFang SC", sans-serif;
  font-size: 1.1rem;
  letter-spacing: .02em;
}

.foot-base ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .4rem .75rem;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: var(--r);
  font-size: .85rem;
}

.foot-base a:hover { background: #fff; color: #000; }

.copy {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .3);
  font-size: .8rem;
  letter-spacing: .06em;
}

/* ---------- 滚动揭示 ---------- */
.js .doc > div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}

.js .doc > div.in { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */
@media (max-width: 980px) {
  .rot { display: none; }
  .find { margin-left: auto; }
  .stream { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: -1; }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 1.3rem; }
  .hero-art img, .dot-art { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand { font-size: 1.12rem; }
  .find input { width: 6.4rem; font-size: .8rem; }
  .drop summary { padding: .45rem .6rem; font-size: .8rem; }
  .drop-body { grid-template-columns: 1fr 1fr; width: min(92vw, 320px); }
  .hero h1 { font-size: clamp(2rem, 10.5vw, 2.9rem); }
  .lead { margin: .9rem 0 1.2rem; }
  .doc > div { padding: 1.05rem; }
  .foot-base { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .js .doc > div { opacity: 1; transform: none; }
}

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