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

:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --paper: #ffffff;
  --soft: rgba(23, 38, 32, 0.14);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 4px;
  --clay: 6px 6px 0 rgba(23, 38, 32, 0.16), inset -2px -2px 8px rgba(23, 38, 32, 0.12), inset 3px 3px 10px rgba(255, 255, 255, 0.9);
  --clay-sm: 3px 3px 0 rgba(23, 38, 32, 0.15), inset -2px -2px 6px rgba(23, 38, 32, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0 0 124px;
  background:
    radial-gradient(circle at 92% 6%, rgba(173, 216, 230, 0.72), transparent 40%),
    radial-gradient(circle at 4% 26%, rgba(180, 253, 225, 0.9), transparent 44%),
    #f6fdfa;
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

h1, h2, h3, .dock-brand, .foot-btn {
  font-family: 'Outfit', 'Work Sans', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

a { color: var(--ink); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

/* 底部固定导航 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #edfff9, #d3f6ec);
  border-top: 3px solid var(--ink);
  box-shadow: 0 -5px 0 rgba(23, 38, 32, 0.08), inset 0 6px 12px rgba(255, 255, 255, 0.92);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.dock-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dock a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 3px solid transparent;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease-out, border-color 0.2s ease-out, transform 0.2s ease-out;
}

.dock a:hover { background: #ffffff; border-color: var(--ink); }
.dock a:active { transform: translateY(2px); }

.dock a[aria-current='true'] {
  background: var(--mint);
  border-color: var(--ink);
  box-shadow: var(--clay-sm);
}

.dock-brand {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 3px solid var(--ink);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--mint), var(--sky));
  box-shadow: var(--clay-sm);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.dock-brand:active { transform: translateY(2px); box-shadow: none; }

/* 顶部堆叠区 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 45vh;
  padding: 30px 18px 0;
  overflow: hidden;
}

.hero-copy {
  margin: 0 0 10px auto;
  max-width: 860px;
  text-align: right;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 7.4vw, 58px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  text-align: right;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.8);
}

.hero-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  min-height: 116px;
  height: 22vh;
  padding-bottom: 18px;
}

.hero-art {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: cover;
  border: 4px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--clay);
}

.blob {
  display: block;
  width: 92px;
  height: 92px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--clay);
  animation: bob 4.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.blob-a { background: var(--mint); }
.blob-b { background: #ffffff; width: 68px; height: 68px; animation-delay: 0.45s; }
.blob-c { background: var(--sky); width: 50px; height: 50px; animation-delay: 0.9s; }

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

.hero-band {
  height: 34px;
  margin: 0 -18px;
  background: linear-gradient(90deg, var(--sky), var(--mint));
  border-top: 3px solid var(--ink);
  clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 100%);
}

/* 主体骨架：main > section.wrap > div > article */
main { display: block; }

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 16px 0;
}

.body-col { min-width: 0; }

.prose {
  padding: 20px 18px 26px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-sm);
}

.prose div { scroll-margin-top: 18px; }

.prose div + div {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 3px dashed rgba(23, 38, 32, 0.2);
}

.prose h2 {
  margin: 26px 0 12px;
  font-size: clamp(21px, 3.4vw, 27px);
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.prose div > h2:first-child { margin-top: 4px; }

.prose h2 > span,
.prose h3 > span {
  display: inline-block;
  padding: 3px 11px 5px;
  background: linear-gradient(120deg, var(--mint), var(--sky));
  border: 3px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--clay-sm);
}

.prose h3 {
  margin: 22px 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

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

.prose ul,
.prose ol {
  margin: 0 0 15px;
  padding-left: 22px;
}

.prose li { margin-bottom: 7px; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background-color 0.18s ease-out;
}

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

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

.prose blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  background: rgba(173, 216, 230, 0.3);
  border: 3px solid var(--ink);
  border-radius: var(--r-sm);
}

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

.prose code {
  padding: 1px 5px;
  background: rgba(180, 253, 225, 0.55);
  border-radius: 4px;
  font-size: 15px;
}

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

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

.prose th { background: rgba(180, 253, 225, 0.5); }

/* 侧栏 */
.side {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.side-block {
  padding: 14px;
  background: #fcfffd;
  border: 3px solid var(--ink);
  border-radius: var(--r-sm);
}

.side-h {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.4;
}

.side-h > span {
  display: inline-block;
  padding: 2px 10px;
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--r-sm);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  counter-reset: idx;
}

.side-list li { counter-increment: idx; }

.side-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border: 2px solid rgba(23, 38, 32, 0.22);
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color 0.18s ease-out, border-color 0.18s ease-out;
}

.side-list a::before {
  content: counter(idx, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(23, 38, 32, 0.6);
}

.side-list a:hover {
  background: var(--mint);
  border-color: var(--ink);
}

/* 页脚 */
.foot {
  max-width: 1080px;
  margin: 34px auto 0;
  padding: 0 16px;
}

.foot-cta {
  padding: 22px 18px 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  border: 4px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--clay);
}

.foot-h {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.3;
}

.foot-h > span { display: inline-block; }

.foot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 28px;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--clay-sm);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.foot-btn:active { transform: translate(3px, 3px); box-shadow: none; }

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 18px;
  padding: 10px 4px;
}

.foot-bar address {
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
}

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

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 2px solid rgba(23, 38, 32, 0.3);
  border-radius: 10px;
  font-size: 16px;
  text-decoration: none;
}

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

.foot-copy {
  margin: 6px 0 0;
  padding: 12px 0 4px;
  border-top: 3px solid rgba(23, 38, 32, 0.14);
  text-align: center;
  font-size: 16px;
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.52s ease-out, transform 0.52s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@media (min-width: 900px) {
  body { padding-bottom: 132px; }

  .dock {
    left: 50%;
    right: auto;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(1040px, calc(100% - 40px));
    padding: 10px 14px;
    border: 4px solid var(--ink);
    border-radius: var(--r-lg);
    box-shadow: var(--clay);
    overflow: visible;
  }

  .dock-a { flex: 1 1 0; justify-content: flex-end; }
  .dock-b { flex: 1 1 0; justify-content: flex-start; }
  .dock-brand { padding: 6px 16px; }

  .hero { padding: 44px 40px 0; }
  .hero-band { margin: 0 -40px; }

  .wrap {
    grid-template-columns: minmax(0, 1fr) 296px;
    align-items: start;
    padding: 34px 24px 0;
  }

  .side { position: sticky; top: 20px; }

  .prose { padding: 30px 30px 34px; }
}

@media (min-width: 1180px) {
  .hero-copy { padding-right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dock a, .dock-brand, .foot-btn, .side-list a { transition: none; }
}

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