@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --serif: "Cormorant Garamond", "Libre Baskerville", Georgia, "Times New Roman", "Songti SC", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --pad: clamp(1rem, 3.2vw, 3.25rem);
  --gap: 1rem;
  --radius: 10px;
}

*,
*::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(--sans);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1rem; }

a { color: var(--ink); }

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

menu, ol, ul { margin: 0; padding: 0; }

/* ---------- 顶栏 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.ticker {
  margin: 0;
  padding: 0.45rem var(--pad);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.94rem;
  line-height: 1.4;
  letter-spacing: 0.32em;
}

.brandrow {
  padding: 0.5rem var(--pad);
  border-bottom: 1px solid var(--ink);
}

.brand {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-block;
  padding: 0.15rem 0;
}

.navrow { padding: 0.3rem var(--pad) 0.4rem; }

.navwrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.15rem;
}

.navwrap > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 0.94rem;
  letter-spacing: 0.2em;
}

.navwrap > summary::-webkit-details-marker { display: none; }
.navwrap > summary::after { content: "+"; letter-spacing: 0; }
.navwrap[open] > summary::after { content: "\2212"; }

.navmenu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 1.05rem;
  list-style: none;
}

.navmenu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
}

.navmenu a:hover,
.navmenu a:focus-visible { border-bottom-color: var(--ink); }

/* ---------- 首屏 ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: start;
  padding: clamp(2rem, 9vw, 6.5rem) var(--pad) clamp(2rem, 6vw, 4rem);
  border-bottom: 1px solid var(--ink);
  background-image: radial-gradient(rgba(0, 0, 0, 0.22) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
}

.hero-title {
  font-size: clamp(2.4rem, 10vw, 7rem);
  line-height: 0.98;
  font-weight: 700;
  max-width: 20ch;
  will-change: transform;
  text-wrap: balance;
}

/* ---------- 正文区 ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  padding: 0 var(--pad) clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--ink);
  align-items: start;
}

.split > * { min-width: 0; }

.doc {
  grid-column: 1 / span 8;
  counter-reset: sec;
  padding-top: 1rem;
}

.doc > article {
  counter-increment: sec;
  padding: clamp(1.8rem, 4vw, 3.2rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 210px;
}

.doc > article::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  font-family: var(--sans);
  font-size: 0.94rem;
  letter-spacing: 0.28em;
  padding-bottom: 0.7rem;
  color: rgba(0, 0, 0, 0.62);
}

.doc > article:last-child { border-bottom: 0; }

.doc h2 {
  font-size: clamp(1.65rem, 3.6vw, 2.6rem);
  line-height: 1.16;
  margin: 0 0 0.85rem;
}

.doc h3 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 1.9rem 0 0.5rem;
}

.doc p { max-width: 64ch; }

.doc article > p:first-of-type { font-size: 1.08rem; }

.doc ol, .doc ul {
  margin: 0 0 1.15rem 1.15rem;
  padding: 0;
}

.doc li { margin-bottom: 0.35rem; max-width: 62ch; }

.doc ul { list-style: square; }

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

.doc figure { margin: 1.6rem 0; }

.doc img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}

.doc blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}

.doc blockquote p { margin: 0; }

.doc blockquote a { color: var(--paper); }

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

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

.doc code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.95rem;
}

/* ---------- 右栏 ---------- */

.rail {
  grid-column: 10 / span 3;
  border-left: 1px solid var(--ink);
  padding: 1.4rem 0 1rem 1rem;
  position: sticky;
  top: 190px;
}

.rail-h {
  font-size: 1.4rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.subtitle {
  margin: 0;
  font-size: 0.94rem;
  letter-spacing: 0.22em;
  color: rgba(0, 0, 0, 0.65);
}

.rail-list {
  list-style: none;
  margin-top: 1.1rem;
}

.rail-list a {
  display: block;
  padding: 0.62rem 0;
  min-height: 44px;
  text-decoration: none;
  font-size: 1rem;
  border-top: 1px solid var(--ink);
}

.rail-list a:hover,
.rail-list a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

.rail-fig { margin: 1.2rem 0 0; }

.rail-img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
}

/* ---------- 页脚 ---------- */

.foot {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 1.5rem 2rem;
  padding: clamp(1.8rem, 4vw, 3rem) var(--pad) 1.6rem;
  background: var(--ink);
  color: var(--paper);
  align-items: start;
}

.foot a { color: var(--paper); }

.foot-intro { display: block; min-width: 0; }

.foot-brand {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  display: inline-block;
  padding: 0.1rem 0;
}

.foot-desc {
  margin: 0.3rem 0 0;
  font-size: 0.94rem;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.72);
}

.foot-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.95rem;
  flex-wrap: wrap;
  max-width: 22rem;
}

.foot-form input {
  flex: 1 1 8rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.45rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
}

.foot-form input::placeholder { color: rgba(255, 255, 255, 0.6); }

.foot-form button {
  min-height: 44px;
  padding: 0.45rem 1.15rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1rem;
  align-content: start;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-nav a:hover,
.foot-nav a:focus-visible { border-bottom-color: var(--paper); }

.foot-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 100%;
}

.copy {
  margin: 0;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.78);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--paper);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---------- 动效 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .doc > article {
    animation: rise 0.7s cubic-bezier(0.16, 0.68, 0.24, 1) both;
  }
  .doc > article:nth-child(1) { animation-delay: 0.02s; }
  .doc > article:nth-child(2) { animation-delay: 0.07s; }
  .doc > article:nth-child(3) { animation-delay: 0.12s; }
  .doc > article:nth-child(4) { animation-delay: 0.17s; }
  .doc > article:nth-child(5) { animation-delay: 0.22s; }
  .doc > article:nth-child(6) { animation-delay: 0.27s; }
  .doc > article:nth-child(7) { animation-delay: 0.32s; }
  .doc > article:nth-child(n + 8) { animation-delay: 0.36s; }
}

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title { transform: none !important; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- 断点 ---------- */

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; padding-bottom: 1rem; }
  .doc { grid-column: 1 / -1; }
  .doc > article { scroll-margin-top: 240px; }
  .rail {
    grid-column: 1 / -1;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--ink);
    padding: 1.5rem 0 2rem;
  }
  .rail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-end { grid-column: 1 / -1; align-items: flex-start; flex-direction: row; justify-content: space-between; }
}

@media (max-width: 620px) {
  .ticker { letter-spacing: 0.22em; }
  .rail-list { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; gap: 1.4rem; }
  .foot-end { flex-direction: row; align-items: center; }
  .hero-title { max-width: 14ch; }
}
</｜DSML｜ parameter>
</｜DSML｜ invoke>
</｜DSML｜ calls>

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