@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');

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

:root {
  --mint: #b4fde1;
  --mint-d: #86e3c2;
  --sky: #add8e6;
  --sky-d: #89bccd;
  --ink: #172620;
  --ink-2: #3d564b;
  --r: 18px;
  --r-lg: 24px;
  --bd: 3px solid var(--ink);
  --sh: inset -3px -4px 10px rgba(23, 38, 32, .12), inset 3px 4px 10px rgba(255, 255, 255, .92), 6px 8px 0 rgba(23, 38, 32, .10), 0 16px 34px rgba(23, 38, 32, .13);
  --sh-sm: inset -2px -2px 6px rgba(23, 38, 32, .10), inset 2px 2px 6px rgba(255, 255, 255, .9), 3px 4px 0 rgba(23, 38, 32, .10);
  --ff: 'Space Grotesk', 'Archivo', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 10% -10%, #dcfff2 0%, rgba(220, 255, 242, 0) 62%),
    radial-gradient(760px 500px at 94% 2%, #dceff8 0%, rgba(220, 239, 248, 0) 60%),
    linear-gradient(180deg, #f3fffa 0%, #eef7fb 48%, #f8fffc 100%);
  background-attachment: fixed;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* 顶部条 */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 255, 251, .9);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
  padding-bottom: 8px;
}

.ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 18px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  border-bottom: 2px dashed rgba(23, 38, 32, .25);
  overflow: hidden;
}

.beads { display: flex; gap: 5px; flex: none; }
.beads i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff;
}
.beads i:nth-child(2) { background: var(--mint); }
.beads i:nth-child(3) { background: var(--sky); }

.ticker-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 导航 */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px 0;
}

.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.menu-l { justify-content: flex-start; }
.menu-r { justify-content: flex-end; }

.menu a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .2s ease-out, box-shadow .2s ease-out;
}
.menu a:hover,
.menu a:focus-visible {
  background: #fff;
  box-shadow: var(--sh-sm);
  transform: translateY(-2px);
}

.dot {
  display: block;
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: linear-gradient(160deg, var(--mint), var(--mint-d));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 17px;
  border: var(--bd);
  border-radius: 999px;
  background: linear-gradient(160deg, #ffffff, #e7fff5);
  box-shadow: var(--sh-sm);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover { transform: translateY(-2px) rotate(-1deg); }

.mark {
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: linear-gradient(150deg, var(--sky), var(--mint));
  transform: rotate(-8deg);
}

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 66px) 22px clamp(36px, 7vw, 72px);
}

.hero-title {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.5rem, 8.6vw, 5.3rem);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -.03em;
  text-wrap: balance;
  will-change: transform, opacity;
}

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  border: 3px solid rgba(23, 38, 32, .8);
  box-shadow: var(--sh-sm);
}
.b1 {
  width: 180px;
  height: 180px;
  right: 3%;
  top: 8%;
  background: radial-gradient(circle at 32% 30%, #f0fff9, var(--mint));
  animation: bob 9s ease-in-out infinite;
}
.b2 {
  width: 96px;
  height: 96px;
  right: 27%;
  bottom: 4%;
  background: radial-gradient(circle at 32% 30%, #f2fcff, var(--sky));
  animation: bob 7s ease-in-out infinite reverse;
}
.b3 {
  width: 60px;
  height: 60px;
  right: -6px;
  bottom: -14px;
  background: radial-gradient(circle at 32% 30%, #f0fff9, var(--mint));
  opacity: .85;
}

.badge {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  font-size: 24px;
  border: var(--bd);
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--sh-sm);
  animation: bob 6s ease-in-out infinite;
}
.bd1 { right: 11%; top: 58%; transform: rotate(-8deg); }
.bd2 { right: 33%; top: 12%; animation-duration: 8s; transform: rotate(6deg); }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -13px; }
}

/* 版式骨架 */
.wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 22px 90px;
}

.rail {
  position: sticky;
  top: 108px;
  min-width: 0;
}

.rail-card {
  position: relative;
  border: var(--bd);
  border-radius: var(--r-lg);
  padding: 18px 16px;
  background: linear-gradient(165deg, #ffffff, #ecfff7);
  box-shadow: var(--sh);
}

.eyebrow {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--ink-2);
}

.rail-title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: .03em;
}

.rail-nav ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 2px solid rgba(23, 38, 32, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease-out, border-color .18s ease-out, transform .18s ease-out;
}
.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--mint);
  border-color: var(--ink);
  transform: translateX(3px);
}

.body { min-width: 0; }

.prose {
  border: var(--bd);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh);
  padding: clamp(20px, 3vw, 40px);
  overflow-wrap: break-word;
}

.prose div { scroll-margin-top: 124px; }
.prose div + div {
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 3px dashed rgba(23, 38, 32, .16);
}

.prose small {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2em;
  color: #4a6b5c;
}

.prose h2 {
  margin: 0 0 .6rem;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}

.prose h3 {
  margin: 1.6rem 0 .5rem;
  font-size: 1.16rem;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  line-height: 1.85;
}

.prose ul,
.prose ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.prose li { margin: .35rem 0; line-height: 1.8; }

.prose a {
  color: #0d573f;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose blockquote {
  margin: 1.2rem 0;
  padding: 14px 18px;
  border-left: 5px solid var(--mint-d);
  border-radius: 0 var(--r) var(--r) 0;
  background: #f2fffa;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose img {
  max-width: 100%;
  height: auto;
  border: var(--bd);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}
.prose th,
.prose td {
  border: 2px solid rgba(23, 38, 32, .16);
  padding: 8px 10px;
  text-align: left;
  font-size: 1rem;
}

.prose pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: var(--r);
  background: #0f1f19;
  color: #e6fff5;
}
.prose code { font-family: ui-monospace, monospace; }

/* 页脚 */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 22px;
  max-width: 1180px;
  margin: 0 auto 30px;
  padding: 14px 20px;
  border: var(--bd);
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, #ecfff7, #ddf1f9);
  box-shadow: var(--sh-sm);
}

.brand-sm { font-size: 17px; padding: 6px 14px; }

.foot-nav { min-width: 0; }
.foot-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
  padding: 0;
}
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 9px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.foot-nav a:hover { background: #fff; }

.foot-copy {
  font-size: 15px;
  color: var(--ink-2);
  letter-spacing: .04em;
}

/* 入场 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease-out, transform .6s cubic-bezier(.34, 1.4, .64, 1);
}
.js [data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .topnav {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-bottom: 4px;
  }
  .brand { order: -1; }
  .menu { justify-content: center; width: 100%; }
  .menu-l { order: 0; }
  .menu-r { order: 1; }

  .hero {
    min-height: auto;
    padding: 30px 18px 44px;
  }
  .b1 { width: 118px; height: 118px; right: -8px; top: 4%; }
  .b2 { width: 68px; height: 68px; right: 32%; bottom: -4%; }
  .bd1 { right: 8%; top: auto; bottom: 6%; }
  .bd2 { right: auto; left: 62%; top: 4%; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 6px 16px 70px;
  }
  .rail { position: static; }
  .rail-card { padding: 14px; }
  .rail-nav ol { flex-direction: row; flex-wrap: wrap; }
  .rail-nav a { padding: 8px 10px; }
  .b3 { display: none; }

  .foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 430px) {
  .menu a { padding: 9px 8px; font-size: 15px; }
  .brand { font-size: 17px; }
  .prose { padding: 18px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

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