/* 猪猪发卡 v5 文章/帮助中心页(qq1 模板重写版),与首页同一套设计变量与顶栏/页脚 */
:root {
  --bg: #FAF8F5;
  --bg-2: #F4F1EC;
  --surface: #FFFFFF;
  --line: #ECE7E0;
  --line-2: #E2DCD3;
  --ink: #1D1B2C;
  --ink-2: #4A4759;
  --muted: #8B8698;
  --brand: #3E63DD;
  --brand-d: #3352C2;
  --brand-50: #EEF2FD;
  --brand-100: #DCE4FB;
  --pink-50: #FCEFF2;
  --yellow-50: #FDF6E2;
  --mint: #2E9E78;
  --mint-50: #E6F5EF;
  --r: 16px;
  --r-lg: 24px;
  --sh-1: 0 1px 2px rgba(29, 27, 44, .04), 0 2px 8px rgba(29, 27, 44, .04);
  --sh-2: 0 2px 4px rgba(29, 27, 44, .03), 0 14px 32px -10px rgba(29, 27, 44, .12);
  --sh-3: 0 4px 10px rgba(29, 27, 44, .04), 0 28px 60px -16px rgba(29, 27, 44, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 68px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body { margin: 0; font: 400 16px/1.7 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--brand-100); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.wrap-doc { width: min(840px, 100% - 48px); }

/* 按钮 */
.btn { --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 calc(var(--h) * .5); border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm { --h: 38px; font-size: 14px; }
.btn-primary { background-color: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 18px -8px rgba(62, 99, 221, .6); }
.btn-primary:hover { background-color: var(--brand-d); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset, var(--sh-1); }
.btn-ghost:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #CFC8BD inset, var(--sh-2); }

/* 顶栏(与首页一致) */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background-color .35s, box-shadow .35s; }
.nav.is-stuck { background: rgba(250, 248, 245, .82); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav-in { height: 100%; width: min(1200px, 100% - 48px); margin-inline: auto; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: .02em; flex: none; }
.brand img { width: 36px; height: 36px; transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nav-links { display: flex; gap: 6px; margin-right: auto; }
.nav-links a { position: relative; padding: 8px 12px; font-size: 15px; color: var(--ink-2); border-radius: 10px; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover, .nav-links a.is-on { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-on::after { transform: scaleX(1); }
.nav-act { display: flex; align-items: center; gap: 10px; }
.nav-order { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 15px; color: var(--ink-2); border-radius: 999px; transition: background-color .2s, color .2s; }
.nav-order:hover { background: rgba(29, 27, 44, .05); color: var(--ink); }
.nav-order svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-burger { display: none; width: 40px; height: 40px; border-radius: 12px; position: relative; }
.nav-burger i { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .35s var(--ease), top .35s var(--ease); }
.nav-burger i:first-child { top: 15px; }
.nav-burger i:last-child { top: 23px; }
.nav-burger[aria-expanded="true"] i:first-child { top: 19px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] i:last-child { top: 19px; transform: rotate(-45deg); }
.sheet { position: fixed; inset: var(--nav-h) 0 0; z-index: 49; background: rgba(29, 27, 44, .18); opacity: 0; transition: opacity .3s; }
.sheet.is-open { opacity: 1; }
.sheet-panel { background: var(--bg); padding: 8px 24px 24px; border-radius: 0 0 24px 24px; box-shadow: var(--sh-3); transform: translateY(-12px); transition: transform .35s var(--ease); }
.sheet.is-open .sheet-panel { transform: none; }
.sheet-panel > a { display: block; padding: 14px 4px; font-size: 18px; font-weight: 600; border-bottom: 1px solid var(--line); }
.sheet-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.sheet-btns .btn { --h: 48px; }

/* 页面标题区 */
.page-hero { position: relative; padding: calc(var(--nav-h) + 56px) 0 44px; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(620px 300px at 85% 0%, rgba(220, 228, 251, .75), transparent 70%),
  radial-gradient(520px 260px at 6% 20%, rgba(252, 239, 242, .9), transparent 70%),
  radial-gradient(420px 220px at 55% 0%, rgba(253, 246, 226, .8), transparent 70%); }
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumb a:hover { color: var(--brand); }
.crumb i { width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.25; font-weight: 800; letter-spacing: -.015em; }
.page-hero h1 + p { margin-top: 12px; font-size: 16px; color: var(--ink-2); }
.doc-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.doc-meta svg, .card-date svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.js .load { opacity: 0; transform: translateY(14px); animation: rise .8s var(--ease) forwards; }
.js .load + .load { animation-delay: .08s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* 列表页 */
.page-body { padding: 8px 0 104px; }
.layout { display: grid; grid-template-columns: 248px 1fr; gap: 32px; align-items: start; }
.side { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 16px; }
.side-title { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--muted); padding-left: 4px; }
.side-nav { display: grid; gap: 4px; padding: 8px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset, var(--sh-1); }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; font-size: 15px; color: var(--ink-2); transition: background-color .2s, color .2s; }
.side-nav a:hover { background: var(--bg); color: var(--ink); }
.side-nav a.is-active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.side-nav svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-card { display: grid; gap: 6px; padding: 18px; border-radius: 20px; background: linear-gradient(150deg, var(--brand-50), var(--pink-50)); box-shadow: 0 0 0 1px var(--line) inset; }
.side-card b { font-size: 15px; }
.side-card p { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 8px; }
.side-card .btn { justify-self: start; }

.list { display: grid; gap: 14px; }
.card { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: 20px; background: radial-gradient(320px circle at var(--mx, -400px) var(--my, -400px), rgba(62, 99, 221, .06), transparent 65%), var(--surface); box-shadow: 0 0 0 1px var(--line) inset, var(--sh-1); transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .8s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--brand-100) inset, var(--sh-2); }
.card-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.card h2 { font-size: 18px; font-weight: 700; line-height: 1.45; transition: color .2s; }
.card:hover h2 { color: var(--brand); }
.card p { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.card-go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); color: var(--ink-2); transition: background-color .3s, color .3s, transform .4s var(--ease); }
.card-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-go { background: var(--brand); color: #fff; transform: translateX(3px); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 24px; text-align: center; border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset, var(--sh-1); }
.empty img { width: 72px; height: 72px; margin-bottom: 6px; }
.empty b { font-size: 18px; }
.empty p { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.empty-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* 详情页 */
.page-hero-doc { padding-bottom: 32px; }
.doc { padding: 44px 52px; border-radius: 24px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset, var(--sh-2); }
.prose { font-size: 16px; line-height: 1.9; color: var(--ink-2); overflow-wrap: anywhere; }
.prose * { font-family: inherit !important; max-width: 100%; }
.prose > :first-child { margin-top: 0 !important; }
.prose p, .prose li { line-height: 1.9 !important; }
.prose p { margin: .8em 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); font-weight: 800; line-height: 1.4; margin: 1.6em 0 .6em; }
.prose h1 { font-size: 24px; }
.prose h2 { font-size: 21px; }
.prose h3 { font-size: 18px; }
.prose h4 { font-size: 16px; }
.prose strong, .prose b { color: var(--ink); }
.prose a { color: var(--brand); border-bottom: 1px solid var(--brand-100); }
.prose ul, .prose ol { padding-left: 1.4em; margin: .8em 0; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--brand); }
.prose img { height: auto; border-radius: 12px; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 3px solid var(--brand-100); background: var(--bg); border-radius: 0 12px 12px 0; }
.prose table { width: 100% !important; border-collapse: collapse; margin: 1.2em 0; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg); color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.doc-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* 页脚(与首页一致) */
.foot { border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: 14px; color: var(--ink-2); }
.foot-in { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-brand p { margin-top: 10px; color: var(--muted); }
.foot-cols { display: flex; gap: 72px; flex-wrap: wrap; }
.foot-cols div { display: grid; gap: 10px; align-content: start; }
.foot-cols b { color: var(--ink); margin-bottom: 4px; }
.foot-cols a { transition: color .2s; }
.foot-cols a:hover { color: var(--brand); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot-bottom a:hover { color: var(--ink); }

/* 响应式 */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-act { margin-left: auto; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 18px; }
  .side { position: static; }
  .side-title, .side-card { display: none; }
  .side-nav { display: flex; gap: 6px; padding: 6px; overflow-x: auto; scrollbar-width: none; border-radius: 18px; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { flex: none; padding: 9px 14px; font-size: 14px; }
}
@media (max-width: 860px) {
  :root { --nav-h: 60px; }
  .nav-login, .nav-join { display: none; }
  .nav-burger { display: block; }
  .nav-order { background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
  .page-hero { padding: calc(var(--nav-h) + 32px) 0 28px; }
  .doc { padding: 28px 22px; border-radius: 20px; }
  .card { padding: 18px; gap: 14px; }
  .card h2 { font-size: 16px; }
  .card-go { width: 34px; height: 34px; }
  .page-body { padding-bottom: 72px; }
  .foot-cols { gap: 40px; }
}
@media (max-width: 560px) {
  .wrap, .nav-in, .wrap-doc { width: calc(100% - 32px); }
  .brand { font-size: 17px; }
  .prose { font-size: 15px; }
  .foot-in { flex-direction: column; }
}
@media (max-width: 360px) { .nav-order span { display: none; } }
@media (prefers-reduced-motion: reduce) {
  @keyframes rise { from { opacity: 0; } to { opacity: 1; transform: none; } }
  .js .reveal, .js .load { transform: none; }
  .card:hover, .btn-primary:hover, .btn-ghost:hover { transform: none; }
}
