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

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

:root {
  --mint: #87ff71;
  --sun: #ffce5c;
  --ink: #192617;
  --paper: #f6fdf3;
  --line: #a9dfa0;
  --deep: #1d5c14;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --disp: "Space Grotesk", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

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

body {
  margin: 0;
  padding-bottom: 96px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------- 顶部大标题 ---------- */

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 14vh 6vw 12vh;
  overflow: hidden;
  border-bottom: 5px solid var(--ink);
  background:
    repeating-linear-gradient(135deg, rgba(135, 255, 113, .18) 0 10px, transparent 10px 20px),
    var(--paper);
}

.hero::before {
  content: "";
  position: absolute;
  right: -50px;
  top: 10%;
  width: 240px;
  height: 240px;
  background: var(--sun);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(14deg);
  opacity: .95;
}

.hero::after {
  content: "";
  position: absolute;
  right: 6vw;
  bottom: 22%;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--mint) 0 14deg, transparent 14deg 28deg);
  opacity: .85;
}

.hero-in {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-h1 {
  margin: 0 0 1.2rem;
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(2.1rem, 9vw, 5.4rem);
  line-height: 1.06;
  letter-spacing: -.02em;
}

.hero-h1 span {
  display: inline-block;
  padding: .07em .22em .13em;
  background: var(--mint);
  color: var(--ink);
  clip-path: polygon(0 7%, 100% 0, 100% 93%, 0 100%);
  transform: rotate(-1.4deg);
}

.hero-lead {
  margin: 0;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2c4030;
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 24px;
  background: repeating-linear-gradient(90deg, var(--sun) 0 16px, var(--ink) 16px 32px);
  clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 100%);
}

/* ---------- 主体两栏 ---------- */

.shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 2.4rem;
  max-width: 1160px;
  margin: 0 auto;
  padding: 3rem 5vw 4rem;
}

/* ---------- 左侧目录 ---------- */

.toc {
  position: sticky;
  top: 1.25rem;
  align-self: start;
  padding: 1rem .85rem 1.1rem;
  background: var(--ink);
  color: #eafff0;
  border-radius: 18px;
  box-shadow: 7px 7px 0 var(--mint);
}

.toc-h {
  display: flex;
  align-items: center;
  margin: 0 0 .85rem;
  padding-bottom: .6rem;
  border-bottom: 2px dotted #4a6b40;
  font-family: var(--disp);
  font-size: 1.02rem;
  line-height: 1.3;
}

.toc-dot {
  display: inline-block;
  width: .55em;
  height: .55em;
  margin-left: .45em;
  border-radius: 50%;
  background: var(--sun);
  flex: 0 0 auto;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list li + li { margin-top: 2px; }

.toc-list a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 42px;
  padding: .4rem .45rem;
  border-radius: 10px;
  color: #dfffd7;
  font-size: 1rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.toc-list a:hover {
  background: var(--mint);
  color: var(--ink);
  transform: translateX(3px);
}

.toc-num {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--sun);
  flex: 0 0 auto;
}

.toc-list a:hover .toc-num { color: var(--deep); }

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

.doc { min-width: 0; }

.doc > article {
  position: relative;
  scroll-margin-top: 1rem;
  scroll-margin-bottom: 6rem;
}

.doc > article + article {
  margin-top: 3.2rem;
  padding-top: 2.6rem;
  border-top: 3px dashed var(--line);
}

.doc > article + article::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 0;
  width: 24px;
  height: 24px;
  background: var(--sun);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.doc > article + article:nth-of-type(even)::before {
  left: auto;
  right: 0;
  border-radius: 50%;
  clip-path: none;
  background: var(--mint);
}

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

.doc :is(ul, ol) {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
}

.doc li { margin-bottom: .45rem; }
.doc li::marker { color: var(--deep); }

.doc :is(h2, h3) {
  position: relative;
  margin: 2.2rem 0 1rem;
  padding-left: 1.15rem;
  font-family: var(--disp);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.doc :is(h2, h3)::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 10px;
  height: 1.05em;
  background: var(--mint);
  transform: skewY(-10deg);
}

.doc > article > :is(h2, h3):first-child { margin-top: 0; }

.doc a {
  color: var(--deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}

.doc a:hover { background: var(--sun); }

.doc strong { background: linear-gradient(transparent 62%, var(--sun) 62%); }

.doc blockquote {
  margin: 1.2rem 0;
  padding: .9rem 1.1rem;
  border-left: 6px solid var(--mint);
  border-radius: 0 18px 18px 0;
  background: #eafff0;
}

.doc blockquote > :last-child { margin-bottom: 0; }

.doc img {
  max-width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: 18px;
}

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

.doc :is(th, td) {
  padding: .55rem .7rem;
  border: 2px solid var(--ink);
  text-align: left;
}

.doc :is(th) { background: var(--mint); }

.doc hr {
  margin: 2rem 0;
  border: 0;
  border-top: 3px dotted var(--line);
}

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

.foot {
  margin-top: 2rem;
  padding: 3rem 6vw 8rem;
  background: var(--ink);
  color: #eafff0;
  border-top: 6px solid var(--mint);
}

.foot-h {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.7rem;
  font-family: var(--disp);
  font-size: 1.6rem;
  color: var(--mint);
}

.foot-tick {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: var(--sun);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
  max-width: 900px;
}

.foot-col { margin: 0; }

.foot-col dt {
  margin-bottom: .45rem;
  padding-bottom: .35rem;
  border-bottom: 2px dotted #4a6b40;
  font-family: var(--mono);
  font-size: .85rem;
  letter-spacing: .12em;
  color: var(--sun);
}

.foot-col dd { margin: 0; }

.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .15rem 0;
  font-size: 1rem;
  color: #dfffd7;
  text-decoration: none;
}

.foot-col a:hover {
  color: var(--mint);
  text-decoration: underline 2px;
  text-underline-offset: .25em;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 2px dashed #47653f;
  font-size: .95rem;
}

.foot-copy { margin: 0; }

.foot-top { margin: 0; }

.foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .2rem .9rem;
  border: 2px solid var(--mint);
  border-radius: 999px;
  color: var(--mint);
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.foot-top a:hover { background: var(--mint); color: var(--ink); }

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 72px;
  padding: .6rem 4vw calc(.6rem + env(safe-area-inset-bottom));
  background: var(--ink);
  border-top: 5px solid var(--mint);
}

.dock-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem 1.15rem;
  background: var(--sun);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--mint);
  transition: transform .18s ease, box-shadow .18s ease;
}

.dock-brand:hover {
  transform: translate(-50%, -50%) rotate(-2deg);
  box-shadow: 6px 6px 0 var(--mint);
}

.dock-group { position: relative; }

.dock-group > summary {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .45rem .85rem;
  border: 2px dashed var(--mint);
  border-radius: 12px;
  color: var(--mint);
  font-size: 1rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.dock-group > summary::-webkit-details-marker { display: none; }

.dock-group > summary::after {
  content: "";
  width: .5em;
  height: .5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-.12em);
}

.dock-group[open] > summary {
  background: var(--mint);
  color: var(--ink);
  border-style: solid;
}

.dock-group[open] > summary::after { transform: rotate(-135deg) translateY(-.1em); }

.dock-group > menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  min-width: 168px;
  margin: 0;
  padding: .5rem;
  list-style: none;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--sun);
}

.dock-group--right > menu { left: auto; right: 0; }

.dock-group > menu li + li { margin-top: 2px; }

.dock-group > menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .7rem;
  border-radius: 10px;
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
}

.dock-group > menu a:hover { background: var(--mint); }

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

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 820px) {
  body { padding-bottom: 88px; }

  .hero { padding: 12vh 6vw 10vh; }
  .hero::before { width: 160px; height: 160px; right: -46px; top: 6%; }
  .hero::after { width: 104px; height: 104px; bottom: 18%; }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    padding: 2rem 5vw 3rem;
  }

  .toc {
    position: static;
    box-shadow: 5px 5px 0 var(--mint);
  }

  .toc-list {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    -webkit-overflow-scrolling: touch;
  }

  .toc-list li { flex: 0 0 auto; }
  .toc-list li + li { margin-top: 0; }

  .toc-list a {
    padding: .4rem .6rem;
    border: 1px solid #4a6b40;
    white-space: nowrap;
  }

  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { padding: 2.4rem 6vw 7rem; }
}

@media (max-width: 420px) {
  .dock-brand { font-size: .92rem; padding: .4rem .8rem; }
  .dock-group > summary { padding: .4rem .6rem; font-size: .95rem; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
</｜DSML｜ parameter>
</｜DSML｜ invoke>
</｜DSML｜ calls>

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