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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mh: 60px;
  --pad: clamp(16px, 4vw, 44px);
  --hand: "Kalam", "Patrick Hand", "Songti SC", "STSong", "SimSun", serif;
  --body: "Patrick Hand", "Kalam", "Songti SC", "STSong", "SimSun", serif;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 30px);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.04);
}

a { color: inherit; }
p { margin: 0 0 1.05em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- 顶栏 ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--mh);
  padding: 0 var(--pad);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 6px;
  border: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
}
.mark span { transform: rotate(-6deg); }

.mh-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.burger {
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

html.menu-open .masthead {
  background: var(--ink);
  color: var(--paper);
  border-bottom-color: var(--paper);
}
html.menu-open .mark,
html.menu-open .burger {
  color: var(--paper);
  border-color: var(--paper);
}
html.menu-open .cta {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
html.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
html.menu-open .burger span:nth-child(2) { opacity: 0; }
html.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
html.menu-open,
html.menu-open body { overflow: hidden; }

/* ---------- 全屏遮罩菜单 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--mh) + 28px) var(--pad) 44px;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
html.menu-open .drawer {
  opacity: 1;
  visibility: visible;
}

.drawer-list {
  counter-reset: d;
  width: min(560px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}
.drawer-list li {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
html.menu-open .drawer-list li { opacity: 1; transform: none; }
html.menu-open .drawer-list li:nth-child(1) { transition-delay: 0.05s; }
html.menu-open .drawer-list li:nth-child(2) { transition-delay: 0.09s; }
html.menu-open .drawer-list li:nth-child(3) { transition-delay: 0.13s; }
html.menu-open .drawer-list li:nth-child(4) { transition-delay: 0.17s; }
html.menu-open .drawer-list li:nth-child(5) { transition-delay: 0.21s; }
html.menu-open .drawer-list li:nth-child(6) { transition-delay: 0.25s; }
html.menu-open .drawer-list li:nth-child(7) { transition-delay: 0.29s; }

.drawer-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--paper);
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(20px, 4.6vw, 30px);
  line-height: 1.2;
  text-decoration: none;
}
.drawer-list a::before {
  counter-increment: d;
  content: counter(d, decimal-leading-zero);
  flex: 0 0 auto;
  font-size: 14px;
  letter-spacing: 0.2em;
  opacity: 0.75;
}
.drawer-list a:hover { background: var(--paper); color: var(--ink); }
html.menu-open .drawer a:focus-visible { outline-color: var(--paper); }

/* ---------- 二级锚点条 ---------- */
.anchors {
  position: sticky;
  top: var(--mh);
  z-index: 90;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: thin;
}
.anchors-list {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0 var(--pad);
  list-style: none;
  min-height: 46px;
}
.anchors-list li { display: flex; }
.anchors-list a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  font-size: 16px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-decoration: none;
  border-right: 1px solid rgba(0, 0, 0, 0.18);
}
.anchors-list li:first-child a { border-left: 1px solid rgba(0, 0, 0, 0.18); }
.anchors-list a:hover { background: var(--ink); color: var(--paper); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 108px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--mh) + 34px) var(--pad) clamp(60px, 11vw, 130px);
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 93%, 0 100%);
}
.hero-fig {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.42) 44%, rgba(255, 255, 255, 0.96));
}
.hero-in {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.kicker {
  margin: 0 0 16px;
  font-size: 16px;
  letter-spacing: 0.3em;
}
.hero-title {
  margin: 0 0 20px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(30px, 7.2vw, 66px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.hero-lede {
  max-width: 48ch;
  margin: 0;
  padding-left: 14px;
  border-left: 4px solid var(--ink);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
}
.badge {
  position: absolute;
  z-index: 3;
  top: calc(var(--mh) + 22px);
  right: var(--pad);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-family: var(--hand);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  transform: rotate(8deg);
}

/* ---------- 版面骨架 ---------- */
.spread {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 62px) var(--pad) clamp(44px, 6vw, 84px);
}

.rail { order: -1; }
.rail-block { margin-bottom: 30px; }

.rail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--hand);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.rail-bar { flex: 1 1 auto; height: 1px; background: var(--ink); }

.rail-list {
  counter-reset: n;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 4px;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
}
.rail-list a::before {
  counter-increment: n;
  content: counter(n, decimal-leading-zero);
  font-size: 13px;
  letter-spacing: 0.1em;
  opacity: 0.6;
}
.rail-list a:hover { background: var(--ink); color: var(--paper); }
.rail-note {
  margin: 0;
  font-family: var(--hand);
  font-size: 17px;
  letter-spacing: 0.06em;
}

main { min-width: 0; }
.wrap { max-width: 760px; }
.sheet {
  border-top: 3px solid var(--ink);
  padding-top: clamp(20px, 3vw, 32px);
}

/* ---------- 正文 ---------- */
.post {
  font-size: 17.5px;
  line-height: 1.85;
}
.post > article[id] { scroll-margin-top: calc(var(--mh) + 64px); }
.post > article {
  counter-increment: sec;
  margin-top: clamp(28px, 4vw, 50px);
  padding-top: clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--ink);
}
.post > article:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.post p:first-of-type::first-letter {
  float: left;
  margin: 0.04em 0.12em 0 0;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 4.1em;
  line-height: 0.82;
}

.post h2 {
  margin: 0 0 14px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(23px, 3.4vw, 34px);
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.post > article h2::before {
  display: block;
  content: counter(sec, decimal-leading-zero);
  margin-bottom: 6px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.32em;
}
.post h2 span { border-bottom: 3px solid var(--ink); padding-bottom: 2px; }

.post h3 {
  margin: 26px 0 10px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.35;
}

.post a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.post a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

.post ul,
.post ol { margin: 0 0 1.2em; padding-left: 1.35em; }
.post li { margin: 0.35em 0; }

.post blockquote {
  margin: clamp(20px, 3vw, 34px) 0;
  padding: 16px clamp(16px, 3vw, 26px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-left: 6px solid var(--ink);
  font-family: var(--hand);
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 1.5;
}
.post blockquote > :last-child { margin-bottom: 0; }
.post blockquote p { margin-bottom: 0.6em; }

.post figure { margin: clamp(18px, 3vw, 30px) 0; }
.post figure img { clip-path: polygon(0 0, 100% 2.5%, 100% 100%, 0 97.5%); }
.post figcaption {
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 16px;
  letter-spacing: 0.05em;
}

.post table {
  width: 100%;
  margin: 0 0 1.3em;
  border-collapse: collapse;
  font-size: 16px;
}
.post th,
.post td {
  padding: 8px 10px;
  border: 1px solid var(--ink);
  text-align: left;
  vertical-align: top;
}
.post th { font-family: var(--hand); font-weight: 700; }

.post hr {
  margin: clamp(24px, 4vw, 40px) 0;
  border: 0;
  border-top: 1px solid var(--ink);
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: clamp(30px, 5vw, 64px);
  padding: 16px var(--pad);
  border-top: 3px solid var(--ink);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 26px;
  max-width: 1240px;
  margin: 0 auto;
}
.mark-sm {
  min-width: 40px;
  height: 40px;
  font-size: 17px;
}
.foot-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.foot-list a:hover { border-bottom-color: var(--ink); }
.copy {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.06em;
}

/* ---------- 滚动显现 ---------- */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.rv.in { opacity: 1; transform: none; }
.rail-block:nth-child(2) { transition-delay: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv,
  .drawer-list li {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- 断点 ---------- */
@media (min-width: 960px) {
  .spread {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: clamp(24px, 4vw, 54px);
  }
  .rail {
    position: sticky;
    top: calc(var(--mh) + 62px);
    align-self: start;
  }
  .rail-list { grid-template-columns: 1fr; }
  .hero { min-height: 100svh; }
}

@media (max-width: 640px) {
  .hero { padding-top: calc(var(--mh) + 26px); }
  .badge { width: 46px; height: 46px; font-size: 19px; }
  .hero-lede { padding-left: 11px; border-left-width: 3px; }
  .copy { width: 100%; text-align: center; }
}
</｜DSML｜ parameter>
</｜DSML｜ invoke>
</｜DSML｜ calls>

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