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

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --line: rgba(23, 38, 32, 0.86);
  --soft: #f4fffb;
  --bw: 3px;
  --sh: inset -2px -2px 8px rgba(23, 38, 32, 0.10), 4px 4px 8px rgba(23, 38, 32, 0.16);
  --sh-lift: inset -3px -3px 10px rgba(23, 38, 32, 0.12), 6px 6px 16px rgba(23, 38, 32, 0.22);
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-bottom: 150px;
  overflow-x: hidden;
  font-family: Lato, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 8% -8%, #dbfff3 0%, rgba(219, 255, 243, 0) 62%),
    radial-gradient(880px 520px at 102% 2%, #e3f4ff 0%, rgba(227, 244, 255, 0) 58%),
    #f6fffc;
  background-attachment: fixed;
}

a { color: #0f5c47; }

h1, h2, h3, dt, .dock-brand, .foot-mark {
  font-family: "EB Garamond", "Songti SC", "Noto Serif SC", Georgia, serif;
}

small {
  display: block;
  font-family: Lato, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #2e6b57;
}

small + h2 { margin-top: 0.2em; }

:focus-visible {
  outline: 3px dashed #2e6b57;
  outline-offset: 3px;
}

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

.dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 60;
  width: min(1010px, calc(100% - 20px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #edfffa 0%, var(--mint) 100%);
  border: var(--bw) solid var(--line);
  border-radius: 24px;
  box-shadow: inset -2px -2px 8px rgba(23, 38, 32, 0.12), 0 12px 26px rgba(23, 38, 32, 0.28);
}

.dock-left,
.dock-right {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease-out, transform 0.2s ease-out;
}

.dock-link:hover { background: #ffffff; }
.dock-link:active { transform: translateY(2px) scale(0.985); }

.dock-link.is-active {
  background: var(--sky);
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, 0.18);
}

.dock-brand {
  padding: 0 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.dock-cta {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-left: 4px;
  padding: 0 14px;
  border: var(--bw) solid var(--line);
  border-radius: 16px;
  background: var(--sky);
  box-shadow: var(--sh);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease-out;
}

.dock-cta:active { transform: translateY(2px) scale(0.985); }

.has-sub {
  position: relative;
  display: flex;
  align-items: center;
}

.sub-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.sub {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  min-width: 156px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: linear-gradient(180deg, #f5fffb 0%, #d6f7ea 100%);
  border: var(--bw) solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease-out, transform 0.24s var(--ease), visibility 0.2s;
}

.has-sub:hover .sub,
.has-sub:focus-within .sub,
.has-sub.open .sub {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sub a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.sub a:hover { background: #ffffff; }

/* ---------- 主体 ---------- */

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 18px 0;
}

.hero {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 132px;
  align-items: center;
  gap: 20px;
  min-height: 45vh;
  padding: 10px 0 18px;
}

.hero-copy { text-align: center; }

h1 {
  margin: 0;
  font-size: clamp(30px, 5.6vw, 46px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero-art {
  margin: 0;
  display: grid;
  place-items: center;
}

.hero-art svg {
  width: 100%;
  max-width: 132px;
  height: auto;
  filter: drop-shadow(4px 6px 10px rgba(23, 38, 32, 0.22));
  animation: bob 7s ease-in-out infinite;
}

.jump {
  padding: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #eafaf4 100%);
  border: var(--bw) solid var(--line);
  border-radius: 22px;
  box-shadow: var(--sh);
}

.jump h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

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

.jump-list li {
  animation: rise 0.5s var(--ease) backwards;
}

.jump-list li:nth-child(1) { animation-delay: 0.02s; }
.jump-list li:nth-child(2) { animation-delay: 0.05s; }
.jump-list li:nth-child(3) { animation-delay: 0.08s; }
.jump-list li:nth-child(4) { animation-delay: 0.11s; }
.jump-list li:nth-child(5) { animation-delay: 0.14s; }
.jump-list li:nth-child(6) { animation-delay: 0.17s; }
.jump-list li:nth-child(7) { animation-delay: 0.2s; }

.jump-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease-out, padding-left 0.2s ease-out;
}

.jump-list a:hover {
  background: var(--mint);
  padding-left: 14px;
}

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

main > article:not(.hero) {
  margin-top: 22px;
  padding: 24px 20px;
  background: linear-gradient(160deg, #ffffff 0%, #f0fcf7 100%);
  border: var(--bw) solid var(--line);
  border-radius: 24px;
  box-shadow: var(--sh);
}

article[id] { scroll-margin-top: 18px; }

main > article > :first-child { margin-top: 0; }
main > article > :last-child { margin-bottom: 0; }

main > article h2 {
  margin: 0.4em 0 0.55em;
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
}

main > article h3 {
  margin: 1.2em 0 0.4em;
  font-size: 20px;
  line-height: 1.4;
}

main > article p,
main > article li { max-width: 66ch; }

main > article p { margin: 0.7em 0; }

main > article ul,
main > article ol {
  margin: 0.7em 0;
  padding-left: 1.25em;
}

main > article li { margin: 0.35em 0; }

main > article a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

main > article img {
  max-width: 100%;
  height: auto;
  border: var(--bw) solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh);
}

main > article blockquote {
  margin: 1em 0;
  padding: 12px 16px;
  background: #ecfaff;
  border: var(--bw) solid rgba(23, 38, 32, 0.5);
  border-radius: 18px;
}

main > article blockquote p { margin: 0.35em 0; }

main > article code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 15px;
  background: #eafff6;
  border-radius: 8px;
  padding: 1px 6px;
}

main > article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

main > article th,
main > article td {
  padding: 8px 10px;
  border-bottom: 2px solid rgba(23, 38, 32, 0.18);
  text-align: left;
}

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

.foot {
  max-width: 1040px;
  margin: 34px auto 0;
  padding: 0 18px;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.foot-card {
  margin: 0;
  padding: 16px;
  background: linear-gradient(170deg, #ffffff 0%, #eefbf6 100%);
  border: var(--bw) solid var(--line);
  border-radius: 20px;
  box-shadow: var(--sh);
}

.foot-card dt {
  font-size: 18px;
  font-weight: 700;
  color: #2e6b57;
}

.foot-card dd {
  margin: 6px 0 0;
}

.foot-card dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.2s ease-out;
}

.foot-card dd a:hover { background: var(--sky); }

.foot-mark {
  font-family: "EB Garamond", "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  padding: 0 8px;
}

.copyright {
  margin: 0;
  padding: 18px 0 10px;
  text-align: center;
  font-size: 15px;
  color: #3c6157;
}

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

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 860px) {
  body { padding-bottom: 196px; }

  .dock {
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 8px;
    border-radius: 22px;
  }

  .dock-brand { order: -1; font-size: 19px; }
  .dock-cta { order: -1; margin-left: 0; }

  .dock-left,
  .dock-right {
    flex: 1 1 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .dock-left::-webkit-scrollbar,
  .dock-right::-webkit-scrollbar { display: none; }

  .sub {
    left: auto;
    right: 0;
    transform: translateY(8px);
  }

  .has-sub:hover .sub,
  .has-sub:focus-within .sub,
  .has-sub.open .sub { transform: translateY(0); }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 16px;
    padding-top: 16px;
  }

  .hero-copy { order: 1; }
  .hero-art { order: 2; }
  .hero-art svg { max-width: 104px; }
  .jump { order: 3; }

  main { padding-top: 18px; }

  main > article:not(.hero) { padding: 20px 16px; border-radius: 20px; }

  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .dock-link { font-size: 15.5px; padding: 0 8px; }
  .foot { padding: 0 14px; }
  main { padding-inline: 14px; }
}

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