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

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

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --edge: 3px solid var(--ink);
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 10px;
  --shadow: inset -2px -2px 8px rgba(23, 38, 32, 0.15), 4px 4px 10px rgba(23, 38, 32, 0.16);
  --press: inset 3px 3px 9px rgba(23, 38, 32, 0.24);
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink);
  background: linear-gradient(168deg, #f1fffa 0%, #eaf7ff 46%, #f7fffc 100%);
  background-attachment: fixed;
  padding-bottom: 118px;
}

a {
  color: #0f5c43;
}

:focus-visible {
  outline: 3px solid #0f5c43;
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

/* ---------- 底部固定胶囊条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #effff9, #c6f4e3);
  border-top: var(--edge);
  border-radius: 22px 22px 0 0;
  box-shadow: inset 0 -4px 10px rgba(23, 38, 32, 0.08), 0 -8px 20px rgba(23, 38, 32, 0.14);
}

.dock-brand,
.dock-cta,
.dock-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(180deg, #d9fdef, #a6f0d4);
  border: var(--edge);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: box-shadow 200ms ease-out, transform 200ms ease-out, filter 200ms ease-out;
  cursor: pointer;
}

.dock-cta {
  background: linear-gradient(180deg, #ddf1ff, #b7dcf0);
  font-weight: 600;
}

.dock-brand:active,
.dock-cta:active,
.dock-menu > summary:active {
  transform: translateY(2px);
  box-shadow: var(--press);
}

@media (hover: hover) {
  .dock-brand:hover,
  .dock-cta:hover,
  .dock-menu > summary:hover {
    filter: brightness(1.04);
  }
}

.dock-act {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-menu {
  position: relative;
}

.dock-menu > summary {
  list-style: none;
  font-weight: 600;
  gap: 6px;
}

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

.dock-menu > summary::after {
  content: '▾';
  font-size: 13px;
  transition: transform 200ms ease-out;
}

.dock-menu[open] > summary::after {
  transform: rotate(180deg);
}

.dock-menu > menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(72vw, 292px);
  max-height: 60vh;
  overflow: auto;
  margin: 0;
  padding: 10px;
  list-style: none;
  display: grid;
  gap: 8px;
  background: #f4fffb;
  border: var(--edge);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}

.dock-menu > menu li {
  list-style: none;
  margin: 0;
}

.dock-menu > menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #e6fff6;
  border: var(--edge);
  border-radius: 999px;
  transition: background 200ms ease-out;
}

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

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .dock-menu[open] > menu > li {
    animation: pop 340ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(var(--i, 0) * 38ms);
  }
}

/* ---------- 布局骨架 ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6px 16px 34px;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 45vh;
  padding: 26px 0 8px;
  text-align: left;
  scroll-margin-top: 16px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(27px, 5.4vw, 42px);
  line-height: 1.22;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.lede {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.6;
  color: #2c5747;
}

.hero-fig {
  margin: 0;
}

.hero-img {
  display: block;
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
  border: 4px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}

/* ---------- 正文卡片 ---------- */
.body > section {
  scroll-margin-top: 18px;
  margin: 0 0 16px;
  padding: 22px 20px;
  background: #fbfffe;
  border: var(--edge);
  border-radius: var(--r-sm);
}

.body > section:last-child {
  margin-bottom: 0;
}

.body h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 3.6vw, 26px);
  line-height: 1.32;
  letter-spacing: -0.015em;
}

.body h3 {
  margin: 20px 0 8px;
  font-size: 19px;
  line-height: 1.4;
}

.body p,
.body ul,
.body ol {
  margin: 0 0 13px;
}

.body ul,
.body ol {
  padding-left: 1.2em;
}

.body li {
  margin: 0 0 6px;
}

.body li::marker {
  color: #2f8a68;
}

.body p:last-child,
.body ul:last-child,
.body ol:last-child {
  margin-bottom: 0;
}

.body blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: #f0fbff;
  border-left: 6px solid var(--sky);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.body blockquote p:last-child {
  margin-bottom: 0;
}

.body img {
  display: block;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: var(--r-sm);
}

.body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
  font-size: 16px;
}

.body th,
.body td {
  padding: 8px 10px;
  border: 2px solid rgba(23, 38, 32, 0.4);
  text-align: left;
}

.body th {
  background: #e9fff7;
}

.body code {
  padding: 1px 5px;
  background: #e9fff7;
  border-radius: 6px;
  font-size: 15px;
}

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

.body small,
.rail small,
.foot small {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: #2f6a53;
}

/* ---------- 右侧边栏 ---------- */
.rail {
  position: sticky;
  top: 16px;
  align-self: start;
  padding: 16px;
  background: linear-gradient(180deg, #f0fbff, #e3f7ff);
  border: var(--edge);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}

.rail h2 {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.3;
}

.rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.rail ol a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #fbfffe;
  border: 2px solid var(--ink);
  border-radius: 999px;
  transition: background 200ms ease-out;
}

@media (hover: hover) {
  .rail ol a:hover {
    background: var(--mint);
  }
}

.to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 13px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(180deg, #dcf8ff, #b6def0);
  border: var(--edge);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 40px;
  padding: 30px max(16px, calc((100vw - 1080px) / 2)) 22px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px 24px;
  background: linear-gradient(180deg, #ddf8ff, var(--mint));
  border-top: var(--edge);
  border-radius: 26px 26px 0 0;
}

.mega {
  margin: 6px 0 0;
  font-size: clamp(32px, 9vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.foot-desc {
  margin: 10px 0 0;
  max-width: 40ch;
  font-size: 16px;
  color: #24503f;
}

.foot-h {
  margin: 0 0 10px;
  font-size: 18px;
}

.foot-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foot-menu li {
  margin: 0;
}

.foot-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: #f7fffc;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

@media (hover: hover) {
  .foot-menu a:hover {
    background: #fff;
  }
}

.foot-base {
  grid-column: 1 / -1;
  padding-top: 14px;
  margin-top: 4px;
  text-align: center;
  border-top: 2px dashed rgba(23, 38, 32, 0.4);
}

.foot-base p {
  margin: 0;
  font-size: 16px;
  color: #1f4536;
}

/* ---------- 滚动入场 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rv {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms cubic-bezier(0.34, 1.56, 0.64, 1),
      transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .rv.in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 断点 ---------- */
@media (max-width: 880px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
  }
  .rail {
    position: static;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
    padding-bottom: 108px;
  }
  .foot {
    grid-template-columns: 1fr;
  }
  .dock {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .dock-brand,
  .dock-cta,
  .dock-menu > summary {
    padding: 8px 13px;
    font-size: 16px;
  }
  .body > section {
    padding: 18px 15px;
  }
}

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