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

:root {
  --ink: #172623;
  --ink-2: #2c423b;
  --mint: #5cc6b0;
  --mint-dim: rgba(92, 198, 176, .34);
  --sand: #d4c4a8;
  --paper: #f4ede2;
  --paper-2: #ece1cf;
  --line: #c9b9a1;
  --sand-dim: rgba(212, 196, 168, .45);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: .55;
  background-image: radial-gradient(rgba(23, 38, 35, .07) 1px, transparent 1px);
  background-size: 3px 3px;
}

img { max-width: 100%; height: auto; }

.shell { display: block; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px clamp(14px, 3vw, 36px);
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--mint-dim);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1.5px solid var(--mint);
  border-radius: 4px;
  color: var(--mint);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .06em;
  line-height: 1;
}

.mark img { display: block; width: 26px; height: 26px; object-fit: contain; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--sand-dim);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}

.pill:hover,
.pill:focus-visible {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink);
  outline: none;
}

.drawer { position: relative; margin-left: auto; }

.drawer > summary { list-style: none; }
.drawer > summary::-webkit-details-marker { display: none; }

.drawer[open] > summary {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink);
}

.drawer-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  margin: 0;
  padding: 10px;
  width: min(264px, calc(100vw - 32px));
  list-style: none;
  display: grid;
  gap: 6px;
  background: var(--ink);
  border: 1.5px solid var(--sand);
  border-radius: 6px;
  box-shadow: 0 18px 34px rgba(23, 38, 35, .3);
  z-index: 45;
}

.drawer-menu li { display: block; }

.drawer-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.drawer-menu a:hover,
.drawer-menu a:focus-visible {
  background: var(--mint);
  color: var(--ink);
  outline: none;
}

.pill.cta {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink);
}

.pill.cta:hover { background: var(--paper); border-color: var(--paper); }

/* ---------- 锚点条 ---------- */
.railbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px clamp(14px, 3vw, 36px);
  background: rgba(244, 237, 226, .95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.railbar::-webkit-scrollbar { display: none; }

.railbar a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  transition: background .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease);
}

.railbar a:hover,
.railbar a.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(56px, 12vw, 130px) clamp(18px, 5vw, 64px);
  overflow: hidden;
  text-align: center;
  color: var(--paper);
  background:
    radial-gradient(120% 80% at 50% 0%, #24453e 0%, var(--ink) 62%),
    var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12%;
  width: 132%;
  height: 46%;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  background: radial-gradient(60% 100% at 50% 100%, rgba(92, 198, 176, .16), transparent 70%);
  pointer-events: none;
}

.ghost {
  position: absolute;
  left: 50%;
  bottom: -.16em;
  transform: translateX(-50%);
  font-size: clamp(96px, 27vw, 290px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(92, 198, 176, .24);
  user-select: none;
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.1rem, 7.2vw, 4.5rem);
  line-height: 1.14;
  letter-spacing: -.025em;
  font-weight: 700;
}

.hero-figure {
  position: relative;
  margin: 6px 0 0;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.hero-figure .hero-img {
  display: block;
  width: min(320px, 68vw);
  border: 1.5px solid var(--sand-dim);
}

.hero-figure figcaption {
  font-size: 16px;
  letter-spacing: .3em;
  color: var(--sand);
}

/* ---------- 侧栏 + 引导 ---------- */
.deck {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 60px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 66px) clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.rail {
  position: sticky;
  top: 68px;
  align-self: start;
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 2px solid var(--mint);
}

.rail-label {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--ink-2);
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px dashed transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease), padding-left .2s var(--ease);
}

.rail a:hover,
.rail a.on {
  color: var(--ink);
  border-bottom-color: var(--mint);
  padding-left: 6px;
}

.deck-main h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}

.deck-main .subtitle {
  position: relative;
  margin: 14px 0 0;
  padding-top: 14px;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 17px;
}

.deck-main .subtitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 3px;
  background: var(--mint);
}

/* ---------- 正文区 ---------- */
main { display: block; }

main > div[id] {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 66px) clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 86px;
}

main > div[id]:nth-of-type(odd) { background: var(--paper-2); }

main > div[id] h2 {
  position: relative;
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: clamp(1.45rem, 3.6vw, 2.05rem);
  line-height: 1.28;
  letter-spacing: -.01em;
}

main > div[id] h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  bottom: .3em;
  width: 6px;
  background: var(--mint);
}

main > div[id] h3 {
  margin: 26px 0 10px;
  font-size: 19px;
  line-height: 1.4;
}

main > div[id] p {
  margin: 0 0 16px;
  max-width: 70ch;
}

main > div[id] ul,
main > div[id] ol {
  margin: 0 0 18px;
  padding-left: 22px;
  max-width: 70ch;
}

main > div[id] li { margin-bottom: 8px; }

main > div[id] a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--mint);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

main > div[id] a:hover { background: var(--mint-dim); }

main > div[id] blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--sand);
  background: rgba(212, 196, 168, .2);
  color: var(--ink-2);
}

main > div[id] blockquote p:last-child { margin-bottom: 0; }

main > div[id] table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 16px;
}

main > div[id] th,
main > div[id] td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

main > div[id] th { background: rgba(92, 198, 176, .16); }

main > div[id] img { border: 1.5px solid var(--line); }

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(38px, 6vw, 76px) clamp(16px, 4vw, 48px) 22px;
  background: var(--ink);
  color: var(--paper);
}

.foot-cta { display: grid; justify-items: start; align-content: start; gap: 18px; }

.foot-cta h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--mint);
}

.foot .pill.big {
  min-height: 48px;
  border-color: var(--mint);
  color: var(--mint);
}

.foot .pill.big:hover { background: var(--mint); color: var(--ink); }

.foot-col { display: grid; align-content: start; gap: 4px; }

.flink {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  color: var(--sand);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid rgba(212, 196, 168, .16);
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}

.flink:hover,
.flink:focus-visible { color: var(--mint); padding-left: 6px; outline: none; }

.foot-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 196, 168, .22);
}

.copy { margin: 0; font-size: 16px; color: var(--sand); }

.foot-links { margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--sand);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid transparent;
}

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

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .railbar a {
    animation: rail-in .45s var(--ease) backwards;
  }
  .railbar a:nth-child(2) { animation-delay: .05s; }
  .railbar a:nth-child(3) { animation-delay: .1s; }
  .railbar a:nth-child(4) { animation-delay: .15s; }
  .railbar a:nth-child(5) { animation-delay: .2s; }
  .railbar a:nth-child(6) { animation-delay: .25s; }
  .railbar a:nth-child(7) { animation-delay: .3s; }

  main > div[id].rise {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }
  main > div[id].rise.in { opacity: 1; transform: none; }
}

@keyframes rail-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-cta { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .deck { grid-template-columns: 1fr; }
  .rail {
    position: static;
    padding: 14px 0 0;
    border-left: none;
    border-top: 2px solid var(--mint);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 14px;
  }
  .rail-label { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .topbar { gap: 8px; }
  .pill { padding: 0 14px; font-size: 16px; }
  .foot { grid-template-columns: 1fr; }
  .ghost { font-size: clamp(80px, 30vw, 150px); }
  .rail { grid-template-columns: 1fr; }
}

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