@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --mint: #b4fde1;
  --blue: #add8e6;
  --ink: #172620;
  --paper: #f2fdf9;
  --card: #ffffff;
  --soft: rgba(23, 38, 32, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(rgba(180, 253, 225, 1) 1.3px, transparent 1.3px),
    radial-gradient(rgba(173, 216, 230, .8) 1.3px, transparent 1.3px);
  background-size: 24px 24px, 24px 24px;
  background-position: 0 0, 12px 12px;
}

a { color: inherit; }
img { max-width: 100%; }

.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 60;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--mint);
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { left: 14px; }

/* 左侧竖排导航 */
.rail {
  position: fixed;
  z-index: 50;
  left: 18px;
  top: 18px;
  bottom: 18px;
  width: 136px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: inset -4px -4px 12px rgba(23, 38, 32, .08), 6px 6px 0 var(--soft);
  overflow-y: auto;
  overflow-x: hidden;
}

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  margin: 0 auto 10px;
  background: linear-gradient(160deg, var(--mint), var(--blue));
  border: 3px solid var(--ink);
  border-radius: 16px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset -3px -3px 8px rgba(23, 38, 32, .14), 3px 3px 0 rgba(23, 38, 32, .18);
}
.mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.mark-txt { line-height: 1; }

.rail-list { display: flex; flex-direction: column; gap: 4px; }

.rail-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background .2s ease-out, transform .2s ease-out;
}
.rail-link:hover { background: var(--mint); }
.rail-link:active { transform: translateY(2px); }

.rail-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--blue);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(23, 38, 32, .16);
  transition: transform .2s ease-out;
}
.rail-cta:active { transform: translateY(2px); }

/* 主体舞台 */
.stage {
  position: relative;
  z-index: 1;
  margin-left: 178px;
  max-width: 1160px;
  padding: 22px 22px 0 0;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  min-height: 70vh;
  padding: 10px 4px 24px;
  background-image:
    radial-gradient(var(--mint) 1.8px, transparent 1.8px),
    radial-gradient(rgba(173, 216, 230, .9) 1.8px, transparent 1.8px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  border-radius: 28px;
}

.hero-copy { max-width: 62ch; padding: 0 16px; }

h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.14;
  letter-spacing: -.02em;
  font-weight: 700;
}

.lead {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.65;
  color: #31544a;
}

.hero-figure { margin: 0; padding: 0 16px; }

.hero-art {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--ink);
  border-radius: 26px;
  background: var(--blue);
  box-shadow: inset -5px -5px 16px rgba(23, 38, 32, .1), 8px 8px 0 var(--soft);
  will-change: transform;
}

/* 正文 + 右栏 */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 26px;
  align-items: start;
}

.prose { min-width: 0; }

article > div {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 24px 22px 26px;
  margin: 0 0 24px;
  scroll-margin-top: 24px;
}

article h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  line-height: 1.32;
  letter-spacing: -.01em;
}
article h3 {
  margin: 20px 0 8px;
  font-size: 1.06rem;
  line-height: 1.4;
}
article p { margin: 0 0 14px; }
article ul, article ol { margin: 0 0 14px; padding-left: 1.3em; }
article li { margin: 0 0 7px; }
article a {
  color: #0c5d47;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
article a:hover { background: var(--mint); border-radius: 6px; }
article blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  background: #f6fffb;
  border-left: 5px solid var(--blue);
  border-radius: 0 16px 16px 0;
}
article blockquote p:last-child { margin: 0; }
article table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: .96em; }
article th, article td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; }
article th { background: var(--mint); }
article code { font-size: .92em; background: #eefcf6; border-radius: 6px; padding: 1px 5px; }

.notes {
  position: sticky;
  top: 22px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 22px;
  padding: 18px 16px 20px;
  box-shadow: inset -4px -4px 10px rgba(23, 38, 32, .07), 5px 5px 0 var(--soft);
}
.notes h2 { margin: 0 0 4px; font-size: 1.05rem; }
.notes .subtitle { margin: 0 0 14px; font-size: 16px; color: #4c7264; }
.notes ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.notes li a {
  counter-increment: toc;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background .2s ease-out;
}
.notes li a::before {
  content: counter(toc, decimal-leading-zero);
  min-width: 1.5em;
  font-size: 13px;
  font-weight: 700;
  color: #5c8175;
}
.notes li a:hover { background: var(--mint); }

/* 页脚 */
footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px 26px;
  margin-top: 44px;
  padding: 26px 0 34px;
  border-top: 4px solid var(--ink);
}

.foot-brand p.huge {
  margin: 0;
  font-size: clamp(26px, 5.4vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.03em;
}

.foot-nav nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  margin: 0;
}
.foot-nav dt {
  margin: 0;
  padding: 6px 10px;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}
.foot-nav dd { margin: 0; }
.foot-nav dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  text-decoration: none;
}
.foot-nav dd a:hover { border-color: var(--ink); background: #fff; }

.copy { grid-column: 1 / -1; margin: 0; font-size: 16px; color: #3d5f54; }

@media (max-width: 940px) {
  .rail {
    position: sticky;
    left: auto;
    top: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 0 0 20px 20px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 5px 0 var(--soft);
  }
  .mark { margin: 0; width: 42px; height: 42px; }
  .rail-list { flex-direction: row; gap: 6px; }
  .rail-link {
    white-space: nowrap;
    padding: 8px 12px;
    background: #f6fffb;
    border: 2px solid var(--ink);
  }
  .rail-cta { margin-top: 0; padding: 8px 14px; white-space: nowrap; }

  .stage { margin-left: 0; max-width: none; padding: 14px 14px 0; }
  .hero { min-height: 0; gap: 20px; padding-top: 18px; }
  .hero-copy { padding: 0 10px; }
  .hero-figure { padding: 0 10px; }
  .wrap { grid-template-columns: 1fr; }
  .notes { position: static; order: 2; }
  article > div {
    scroll-margin-top: 88px;
    border-radius: 20px;
    padding: 18px 15px 20px;
  }
  footer { grid-template-columns: 1fr; align-items: start; padding-bottom: 26px; }
  .foot-nav nav dl { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

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