@import url('https://fonts.googleapis.com/css2?family=Calistoga:ital@0;1&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --pink: #FF3B6B;
  --yellow: #FFD447;
  --ink: #12121F;
  --paper: #FFFDF6;
  --tint: #FFE7EC;
  --soft: #D9D9E4;
  --radius: 28px;
  --head: "Calistoga", "Inter", Georgia, "PingFang SC", "Microsoft YaHei", serif;
  --body: "Inter", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--body);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 16px; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; line-height: 1.14; }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

[id] { scroll-margin-top: 130px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: var(--ink);
  color: #fff;
  border-bottom: 4px solid var(--pink);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--head);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
.brand:hover { background: var(--pink); color: #fff; }

.pills { min-width: 0; }
.pills ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.pills ul::-webkit-scrollbar { display: none; }
.pills a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.pills a:hover,
.pills a:focus-visible {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.find { display: flex; align-items: center; gap: 6px; }
.find input {
  width: 148px;
  min-height: 40px;
  padding: 8px 14px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 16px;
}
.find input::placeholder { color: rgba(255, 255, 255, .72); }
.find button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.find button:hover { background: var(--yellow); color: var(--ink); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 64px 24px 88px;
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  background: var(--yellow);
  clip-path: polygon(0 72%, 100% 18%, 100% 100%, 0 100%);
  z-index: 0;
  will-change: transform;
}

.hero-copy { position: relative; z-index: 1; text-align: right; }

.hero-h1 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 5.2vw, 3.7rem);
  letter-spacing: -.012em;
}

.lede {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: #2E2E3E;
}

.hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.art {
  margin: 0;
  overflow: hidden;
  border: 6px solid var(--ink);
  border-radius: 6px;
  background: var(--tint);
}
.art .art-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.art-b { margin-top: 52px; }

/* ---------- 正文区 ---------- */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 48px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.doc { min-width: 0; }
.content { max-width: 70ch; }

.content > article {
  margin-top: 46px;
  padding-top: 46px;
  border-top: 3px solid var(--ink);
}
.content > article:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.content h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
}
.content h3 {
  margin: 28px 0 10px;
  font-size: 1.22rem;
  font-family: var(--body);
  font-weight: 700;
}
.content p { margin: 0 0 16px; }
.content ul, .content ol { margin: 0 0 18px; padding-left: 1.35em; }
.content li { margin: .4em 0; }
.content a { color: #C8103F; text-decoration: underline; text-underline-offset: 3px; }
.content a:hover { color: var(--ink); background: var(--yellow); }
.content strong { font-weight: 700; }
.content blockquote {
  margin: 0 0 18px;
  padding: 16px 20px;
  border-left: 8px solid var(--pink);
  background: var(--tint);
  border-radius: 0 16px 16px 0;
}
.content blockquote p:last-child { margin-bottom: 0; }
.content figure { margin: 0 0 18px; }
.content figcaption { font-size: 16px; color: #4A4A5C; padding-top: 6px; }
.content table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 16px; }
.content th, .content td { border-bottom: 2px solid var(--ink); padding: 10px 8px; text-align: left; }
.content code {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--tint);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 104px;
  padding: 22px 20px 26px;
  border: 3px solid var(--ink);
  border-bottom: 10px solid var(--pink);
  border-radius: var(--radius);
  background: var(--tint);
}
.rail-h { margin: 0 0 6px; font-size: 1.18rem; }
.subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.5;
  color: #4A4A5C;
}
.rail-list { margin: 0; padding: 0; list-style: none; }
.rail-list li + li { margin-top: 6px; }
.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.rail-list a:hover { background: var(--ink); color: var(--yellow); }

/* ---------- 页脚 ---------- */
.foot {
  background: var(--ink);
  color: #fff;
  padding: 52px max(20px, calc((100% - 1180px) / 2)) 24px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 34px 30px;
  border-bottom: 10px solid var(--pink);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
}
.cta-h { margin: 0; max-width: 24ch; font-size: clamp(1.55rem, 3.4vw, 2.3rem); }
.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.cta-btn:hover { background: var(--ink); color: var(--yellow); }

.cols {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.4fr;
  gap: 26px;
  padding: 40px 0 28px;
}
.fmark {
  margin: 0;
  font-family: var(--head);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--yellow);
}
.fnav-list { margin: 0; padding: 0; list-style: none; }
.fnav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  transition: color .16s ease;
}
.fnav-list a:hover { color: var(--yellow); }
.fnote { margin: 0; font-size: 16px; line-height: 1.6; color: var(--soft); }

.base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 2px solid rgba(255, 255, 255, .28);
}
.copy { margin: 0; font-size: 16px; color: var(--soft); }
.bnav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bnav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
}
.bnav-list a:hover { color: var(--yellow); }

/* ---------- 动效 ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .45s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-band { transform: none !important; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand find" "nav nav";
    padding: 10px 14px;
    gap: 8px 10px;
  }
  .brand { grid-area: brand; justify-self: start; }
  .find { grid-area: find; }
  .find input { width: clamp(104px, 32vw, 148px); }
  .pills { grid-area: nav; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 28px;
    padding: 40px 18px 64px;
  }
  .hero-copy { text-align: left; }
  .hero-band { height: 36%; clip-path: polygon(0 82%, 100% 40%, 100% 100%, 0 100%); }
  .art-b { margin-top: 32px; }

  .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 0 18px 60px; }
  .rail { position: static; }
  [id] { scroll-margin-top: 140px; }
}

@media (max-width: 560px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 30px 0 22px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 26px 20px; }
  .cta-h { max-width: none; }
  .foot { padding-left: 18px; padding-right: 18px; }
}

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