/* ============================================================
   pages.css — 拼豆广场 / 拼豆资讯 / FAQ 内容页样式
   依赖 css/design-tokens.css 的变量系统，风格与全站一致。
   ============================================================ */

/* 顶栏样式已统一到 css/chrome.css（与首页完全相同的 .topbar 规则，含玻璃质感/定位/高度） */

body { background: var(--bg-1); color: var(--fg); }

.page {
  max-width: var(--page-max); margin: 0 auto;
  padding: 24px clamp(16px, 5vw, 40px) 48px;
}

/* ── 面包屑 ── */
.crumb {
  font-size: 13px; color: var(--fg-3); margin: 8px 0 18px;
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.crumb a { color: var(--fg-2); text-decoration: none; }
.crumb a:hover { color: var(--pink-deep); }
.crumb span { margin: 0 2px; }
.crumb .cur { color: var(--fg); font-weight: 600; }

.page h1 {
  font-size: clamp(24px, 4vw, 34px); color: var(--fg);
  margin: 4px 0 8px; letter-spacing: -.02em;
}
.lede {
  color: var(--fg-2); font-size: 15px; line-height: 1.7;
  max-width: 70ch; margin: 0 0 28px;
}

/* ── 拼豆广场：瀑布流卡片 ── */
.plaza-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
}
.pcard {
  background: var(--bg-0); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; text-decoration: none; color: var(--fg);
  transition: .2s; display: flex; flex-direction: column;
}
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--pink); }
.pcard-img {
  background: var(--bg-2); display: flex; align-items: center; justify-content: center; padding: 18px;
}
.pcard-img .pp-svg { width: auto; height: 160px; image-rendering: pixelated; border-radius: var(--r-sm); }
.pcard-body { padding: 14px 16px 16px; }
.pcard-body h3 { font-size: 16px; margin: 0 0 8px; }
.pcard-meta { display: flex; gap: 12px; font-size: 12px; color: var(--fg-3); margin-bottom: 10px; }
.pcard-tags, .ncard-tags, .article-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-tags i, .ncard-tags i, .article-tags i {
  font-style: normal; font-size: 11px; background: var(--pink-soft);
  color: var(--pink-deep); padding: 3px 8px; border-radius: var(--r-full);
}

/* ── 广场详情 ── */
.detail-head {
  display: grid; grid-template-columns: 320px 1fr; gap: 28px;
  align-items: start; margin-bottom: 24px;
}
.detail-hero {
  background: var(--bg-2); border-radius: var(--r-lg); padding: 20px;
  display: flex; justify-content: center;
}
.detail-hero .pp-svg { height: 280px; width: auto; image-rendering: pixelated; }
.detail-info h1 { margin-top: 0; }
.detail-desc { color: var(--fg-2); line-height: 1.7; margin: 0 0 16px; }
.spec { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.spec th, .spec td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec th { color: var(--fg-3); font-weight: 600; width: 80px; }
.detail-tip {
  font-size: 13px; color: var(--fg-2); background: var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; line-height: 1.6;
}

/* ── 资讯列表 ── */
.news-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.ncard {
  background: var(--bg-0); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; text-decoration: none; color: var(--fg);
  transition: .2s; display: flex; flex-direction: column;
}
.ncard:hover { box-shadow: var(--shadow-md); border-color: var(--pink); transform: translateY(-2px); }
.ncard-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--fg-3); margin-bottom: 8px; }
.ncat { background: var(--purple-soft); color: var(--purple-deep); padding: 2px 10px; border-radius: var(--r-full); font-weight: 600; }
.ncard h3 { font-size: 17px; margin: 0 0 8px; line-height: 1.4; }
.ncard p { font-size: 13px; color: var(--fg-2); line-height: 1.6; margin: 0 0 12px; flex: 1; }
.ncard-more { font-size: 13px; color: var(--pink-deep); font-weight: 600; }

/* ── 文章详情 ── */
.article { max-width: 760px; margin: 0 auto; }
.article-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--fg-3); margin-bottom: 10px; }
.article h2 { font-size: 20px; margin: 28px 0 12px; color: var(--fg); }
.article p { color: var(--fg-2); line-height: 1.85; margin: 0 0 16px; }
.article ul, .article ol { color: var(--fg-2); line-height: 1.85; padding-left: 22px; margin: 0 0 16px; }
.article li { margin: 6px 0; }
.article code { background: var(--bg-2); padding: 2px 6px; border-radius: var(--r-sm); font-size: 13px; }
.article .cmp { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.article .cmp th, .article .cmp td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.article .cmp th { background: var(--bg-1); }
.article-tags { margin: 24px 0; }
.article-back { margin-top: 24px; }
.article-back a { color: var(--pink-deep); text-decoration: none; font-weight: 600; }

/* ── FAQ ── */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--bg-0); border: 1px solid var(--line); border-radius: var(--r-md);
  margin-bottom: 12px; padding: 0 16px;
}
.faq-item summary {
  cursor: pointer; padding: 16px 4px; font-weight: 600; color: var(--fg);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--fg-3); }
.faq-item[open] summary::after { content: '−'; }
.faq-a { padding: 0 4px 16px; color: var(--fg-2); line-height: 1.8; }
.faq-a p { margin: 0 0 10px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a ul, .faq-a ol { margin: 6px 0 10px; padding-left: 22px; }
.faq-a li { margin: 4px 0; }
.faq-a a { color: var(--pink-deep); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--pink-soft); }
.faq-a a:hover { border-bottom-color: var(--pink-deep); }
.faq-a code { font-family: var(--font-mono); background: var(--bg-2); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; color: var(--fg); }
.faq-a b { color: var(--fg); font-weight: 700; }

/* ── 相关资源（板块互链） ── */
.related { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.related h2 { font-size: 15px; margin: 0 0 10px; color: var(--fg); }
.related p { margin: 0; line-height: 2; color: var(--fg-2); }
.related a { color: var(--pink-deep); text-decoration: none; margin-right: 4px; }
.related a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .detail-head { grid-template-columns: 1fr; }
  .detail-hero .pp-svg { height: 220px; }
}
