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

:root {
  --mint: #b4fde1;
  --blue: #add8e6;
  --ink: #172620;
  --paper: #f7fffc;
  --bar: 64px;
  --r: 28px;
  --bd: 3px solid var(--ink);
  --font: "Space Grotesk", "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, #eafff7 0, rgba(255, 255, 255, 0) 52%),
    radial-gradient(circle at 92% 18%, #e3f4fb 0, rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #f8fffc 0%, #eef8ff 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; }

a { color: inherit; }

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

/* ---------- 顶栏 ---------- */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--bar);
  padding: 8px 14px;
  background: linear-gradient(115deg, var(--mint) 0%, #d6f2f7 52%, var(--blue) 100%);
  border-bottom: 4px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 14px 4px 6px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .02em;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 3px solid var(--ink);
  background: linear-gradient(140deg, #ffffff, var(--mint));
  box-shadow: inset -2px -2px 6px rgba(23, 38, 32, .16), 2px 3px 0 rgba(23, 38, 32, .22);
}

.mark-img {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: block;
}

.menu-btn,
.close-btn {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  min-height: 44px;
  padding: 9px 18px;
  border: var(--bd);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(23, 38, 32, .22), inset -2px -2px 6px rgba(23, 38, 32, .10), inset 2px 2px 6px #ffffff;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease-out, background .2s ease-out;
}

.menu-btn:hover,
.close-btn:hover { background: #ffffff; }

.menu-btn:active,
.close-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(23, 38, 32, .22), inset 2px 2px 8px rgba(23, 38, 32, .14);
}

/* ---------- 抽屉 ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(23, 38, 32, .44);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease-out;
}

body.menu-open .scrim {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  width: min(86vw, 360px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 26px;
  background: linear-gradient(165deg, #f6fffb 0%, var(--mint) 46%, var(--blue) 100%);
  border-right: 4px solid var(--ink);
  border-radius: 0 var(--r) var(--r) 0;
  box-shadow: 12px 0 0 rgba(23, 38, 32, .12), 24px 0 44px rgba(23, 38, 32, .20);
  transform: translateX(-105%);
  transition: transform .38s cubic-bezier(.34, 1.4, .64, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.menu-open .drawer { transform: translateX(0); }

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-h {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .10em;
}

.drawer-h span {
  position: relative;
  display: inline-block;
  padding: 0 2px 5px;
}

.drawer-h span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-radius: 4px;
  background: var(--ink);
  opacity: .8;
}

.menu-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-list li[hidden] { display: none; }

.menu-list a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 16px;
  border: var(--bd);
  border-radius: 20px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 5px 0 rgba(23, 38, 32, .18), inset -2px -2px 6px rgba(23, 38, 32, .08), inset 2px 2px 6px #ffffff;
  transition: transform .18s ease-out, background .18s ease-out, box-shadow .18s ease-out;
}

.menu-list a:hover { background: var(--mint); }

.menu-list a:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(23, 38, 32, .18);
}

.drawer-search {
  margin-top: auto;
  padding-top: 10px;
}

.q {
  width: 100%;
  font: inherit;
  font-size: 16px;
  min-height: 46px;
  padding: 10px 16px;
  border: var(--bd);
  border-radius: 20px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 2px 2px 8px rgba(23, 38, 32, .12);
}

.q::placeholder { color: #5c7069; }

.q-tip {
  margin: 8px 2px 0;
  min-height: 1.6em;
  font-size: 16px;
  font-weight: 600;
}

/* ---------- 头图 ---------- */
main { display: block; }

.hero {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 44vh;
  padding: calc(var(--bar) + 24px) 18px 34px;
  text-align: center;
  border-bottom: 4px solid var(--ink);
  background:
    radial-gradient(circle at 24% 30%, #ffffff 0, rgba(255, 255, 255, 0) 44%),
    linear-gradient(150deg, var(--mint) 8%, #d9f4f6 48%, var(--blue) 94%);
}

.hero-media {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(180, 253, 225, .62), rgba(255, 255, 255, .34) 70%, rgba(255, 255, 255, .62));
}

.hero-media img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  opacity: .62;
  will-change: transform;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 22em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  padding: 7px 18px;
  border: var(--bd);
  border-radius: 999px;
  background: #ffffff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 0 rgba(23, 38, 32, .20), inset -2px -2px 6px rgba(23, 38, 32, .08), inset 2px 2px 6px #ffffff;
  animation: float 3.2s cubic-bezier(.34, 1.56, .64, 1) infinite;
}

.badge::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--blue);
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 58px);
  line-height: 1.16;
  letter-spacing: -.01em;
  font-weight: 700;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .9);
}

/* ---------- 正文 ---------- */
.wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 14px 46px;
}

.prose > article,
.prose > div {
  position: relative;
  margin: 0 0 22px;
  padding: 20px 16px 24px;
  border: var(--bd);
  border-radius: var(--r);
  background: linear-gradient(172deg, #ffffff 0%, #f7fffc 100%);
  box-shadow:
    inset 0 -9px 0 rgba(173, 216, 230, .85),
    6px 8px 0 rgba(23, 38, 32, .13),
    inset -2px -2px 8px rgba(23, 38, 32, .06),
    inset 3px 3px 10px #ffffff;
  scroll-margin-top: calc(var(--bar) + 18px);
}

.prose p {
  margin: 0 0 1em;
  font-size: 17px;
  line-height: 1.85;
}

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

.prose h2 {
  margin: .1em 0 .55em;
  font-size: clamp(21px, 5vw, 28px);
  line-height: 1.32;
  font-weight: 700;
}

.prose h2 span,
.prose h3 span {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.prose h2 span::after,
.prose h3 span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  border-radius: 5px;
  background: var(--mint);
}

.prose h3 {
  margin: .9em 0 .45em;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 700;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.prose li { margin: .35em 0; }

.prose a {
  color: #0d5c46;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose strong {
  background: linear-gradient(transparent 62%, var(--mint) 62%);
  padding: 0 2px;
}

.prose blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  border-left: 7px solid var(--blue);
  border-radius: 0 18px 18px 0;
  background: #f2fcff;
}

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

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1em;
  border: var(--bd);
  border-radius: 22px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  border: 2px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
}

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-top: 4px solid var(--ink);
  background: linear-gradient(115deg, var(--blue) 0%, var(--mint) 100%);
}

.foot article { margin: 0; }

.foot p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border: var(--bd);
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 5px 0 rgba(23, 38, 32, .20);
  transition: transform .18s ease-out, box-shadow .18s ease-out;
}

.foot a:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(23, 38, 32, .20);
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px) scale(.995);
  transition: opacity .5s ease-out, transform .55s cubic-bezier(.34, 1.4, .64, 1);
}

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

@media (max-width: 560px) {
  .hero { padding: calc(var(--bar) + 18px) 14px 28px; }
  .badge { padding: 6px 14px; font-size: 16px; }
  .wrap { padding: 20px 12px 38px; }
  .prose > article,
  .prose > div { padding: 16px 13px 20px; border-radius: 24px; }
  .prose p { font-size: 17px; }
  .foot { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .drawer,
  .menu-btn,
  .close-btn,
  .menu-list a,
  .foot a,
  .scrim { transition-duration: .01ms; }
  .hero-media img { transform: none !important; }
}

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