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

:root {
  --ink: #101A24;
  --ink-2: #1b2a37;
  --amber: #F0A03C;
  --cream: #F5F1E8;
  --line: rgba(16, 26, 36, .14);
  --r: 18px;
  --sans: "Quicksand", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Quicksand", cursive;
}

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

html {
  scroll-behavior: smooth;
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: rgba(16, 26, 36, .95);
  color: var(--cream);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(245, 241, 232, .1);
}

.mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--amber);
  color: var(--ink);
  text-decoration: none;
}

.mark.wide {
  width: auto;
  padding: 0 14px;
  border-radius: 999px;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-t {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.pills {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px 2px;
  min-width: 0;
}

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

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(245, 241, 232, .1);
  color: var(--cream);
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}

.pill:hover,
.pill:focus-visible {
  background: var(--amber);
  color: var(--ink);
  transform: translateY(-1px);
}

.search {
  position: relative;
  flex: 0 0 auto;
  width: 176px;
}

.search-in {
  width: 100%;
  height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 241, 232, .13);
  color: var(--cream);
  font-family: inherit;
  font-size: 16px;
}

.search-in::placeholder { color: rgba(245, 241, 232, .62); }
.search-in:focus { outline: 2px solid var(--amber); outline-offset: 1px; }

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 288px;
  max-height: 56vh;
  overflow: auto;
  padding: 8px;
  border-radius: var(--r);
  background: var(--cream);
  box-shadow: 0 22px 46px rgba(16, 26, 36, .38);
  display: none;
}

.search-panel.on { display: block; }

.search-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
}

.search-panel a:hover { background: rgba(240, 160, 60, .3); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  padding: clamp(46px, 9vw, 84px) clamp(18px, 6vw, 64px);
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.hero-layers {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.ly {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.ly1 {
  width: 48vw;
  height: 48vw;
  right: -10vw;
  top: -14vw;
  background: radial-gradient(circle at 32% 32%, rgba(240, 160, 60, .55), rgba(240, 160, 60, 0) 68%);
  transform: translateY(calc(var(--sy, 0) * 0.12px));
}

.ly2 {
  width: 36vw;
  height: 36vw;
  right: 16vw;
  bottom: -18vw;
  background: radial-gradient(circle at 50% 50%, rgba(245, 241, 232, .2), rgba(245, 241, 232, 0) 70%);
  transform: translateY(calc(var(--sy, 0) * -0.07px));
}

.ly3 {
  width: 22vw;
  height: 22vw;
  left: -6vw;
  bottom: -9vw;
  background: rgba(240, 160, 60, .18);
  transform: translateY(calc(var(--sy, 0) * 0.2px));
}

.hero-copy {
  position: relative;
  max-width: 900px;
}

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 7.4vw, 4.6rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.015em;
}

.lede {
  margin: 16px 0 0;
  max-width: 46ch;
  font-size: clamp(16px, 2.1vw, 19px);
  line-height: 1.7;
  color: rgba(245, 241, 232, .84);
}

/* ---------- 主区栅格 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 60px) clamp(16px, 4vw, 32px) clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 74px;
  align-self: start;
  padding: 16px 14px 18px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--cream);
}

.rail-h {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1em;
}

.rail-h span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--amber);
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  color: rgba(245, 241, 232, .84);
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: rgba(240, 160, 60, .24);
  color: var(--cream);
}

.stage { min-width: 0; }

.prose {
  counter-reset: ch;
  min-width: 0;
}

.prose > div {
  position: relative;
  counter-increment: ch;
  padding: clamp(26px, 4vw, 44px) clamp(18px, 3vw, 36px);
  margin-bottom: clamp(16px, 2.4vw, 26px);
  border-radius: var(--r);
  background: #FFFCF5;
  scroll-margin-top: 96px;
}

.prose > div:nth-child(even) { background: #EFEADF; }

.prose > div::before {
  content: counter(ch, decimal-leading-zero);
  position: absolute;
  top: 8px;
  right: 18px;
  font-family: var(--hand);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1;
  color: rgba(240, 160, 60, .55);
  pointer-events: none;
}

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

/* ---------- 正文排版 ---------- */
.prose h2 {
  margin: 0 0 .7em;
  padding-right: 62px;
  font-size: clamp(1.4rem, 3vw, 1.98rem);
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.01em;
}

.prose h2 > span {
  position: relative;
  display: inline-block;
}

.prose h2 > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 6px;
  border-radius: 6px;
  background: rgba(240, 160, 60, .62);
}

.prose h3 {
  margin: 1.5em 0 .5em;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 700;
}

.prose h3 > span { display: inline-block; }

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

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

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

.prose a {
  color: #A96410;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose strong { font-weight: 700; }

.prose blockquote {
  margin: 1.4em 0;
  padding: 16px 20px;
  border-radius: var(--r);
  background: rgba(16, 26, 36, .07);
  font-size: 1.02em;
}

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

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

.prose figure { margin: 1.2em 0; }
.prose figcaption { font-size: 16px; color: rgba(16, 26, 36, .7); }

.prose > div table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.prose th { font-weight: 700; }

/* ---------- 页脚 ---------- */
.foot {
  padding: clamp(38px, 6vw, 62px) clamp(18px, 5vw, 48px) 26px;
  background: var(--ink);
  color: rgba(245, 241, 232, .8);
}

.foot-cols {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.foot dl { margin: 0; }

.foot dt {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
}

.foot dd { margin: 0; }

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  color: rgba(245, 241, 232, .78);
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}

.foot a:hover,
.foot a:focus-visible { color: var(--amber); }

.foot-copy {
  max-width: 1180px;
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 241, 232, .16);
  text-align: center;
  font-size: 16px;
  color: rgba(245, 241, 232, .56);
}

/* ---------- 显现动画 ---------- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .75s cubic-bezier(.2, .7, .2, 1);
}

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

/* ---------- 断点 ---------- */
@media (max-width: 1024px) {
  .search { width: 148px; }
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .rail {
    position: static;
    padding: 12px 12px 14px;
  }

  .rail-h { margin-bottom: 8px; }

  .rail-list {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .rail-list::-webkit-scrollbar { display: none; }

  .rail-list a {
    flex: 0 0 auto;
    white-space: nowrap;
    background: rgba(245, 241, 232, .1);
  }

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

@media (max-width: 760px) {
  body { font-size: 16px; }

  .topbar {
    flex-wrap: wrap;
    padding: 9px 12px;
    gap: 9px;
  }

  .pills { order: 2; width: 100%; flex: 1 0 100%; }

  .search {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
  }

  .search-panel {
    width: 100%;
    right: 0;
  }

  .hero {
    min-height: 45vh;
    padding: 40px 18px 46px;
  }

  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-copy { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ly { transform: none !important; }
  .pill:hover { transform: none; }
}

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