/* ============================================================
   采购指南长文页 /squishy-toy-wholesale-buying-guide/
   只补长文排版组件，token 与其他组件沿用 site.css
   ============================================================ */

/* ---------- 紧凑 hero ---------- */
.g-hero { padding: clamp(30px, 5vw, 56px) 0 clamp(26px, 4vw, 42px); }
.g-hero .eyebrow { margin-bottom: 16px; }
.g-hero h1 {
  font-size: clamp(2.05rem, 4.4vw, 3.4rem);
  max-width: 22em;
}
.g-hero h1 em { font-style: normal; color: var(--accent-deep); }
.g-hero .g-lede {
  margin-top: 18px; max-width: 46em;
  font-size: clamp(1.02rem, 1.35vw, 1.16rem); line-height: 1.62; color: var(--ink-2);
}
.g-hero .g-lede b { color: var(--ink); }
.g-facts {
  display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px;
  font-size: .85rem; font-weight: 600; color: var(--ink-2);
}
.g-facts span { display: inline-flex; align-items: center; gap: 7px; }
.g-facts svg { width: 15px; height: 15px; color: var(--accent-deep); flex: none; }

/* ---------- 全文两栏：正文 + 侧栏目录 ---------- */
.g-body {
  display: grid; grid-template-columns: 268px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding-bottom: clamp(40px, 6vw, 76px);
}
.g-body > * { min-width: 0; }

.g-toc {
  position: sticky; top: 92px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); padding: 18px 20px 20px;
  box-shadow: var(--shadow-s);
}
.g-toc h2 {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 800; margin-bottom: 12px;
}
.g-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.g-toc li { counter-increment: toc; }
.g-toc li + li { margin-top: 7px; }
.g-toc a {
  display: grid; grid-template-columns: 20px 1fr; gap: 4px;
  font-size: .84rem; line-height: 1.35; color: var(--ink-2); padding: 3px 0;
  transition: color .16s var(--ease);
}
.g-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: .72rem; font-weight: 800; color: var(--line-strong);
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.g-toc a:hover { color: var(--ink); }
.g-toc a:hover::before { color: var(--accent); }

/* ---------- 正文 ---------- */
.g-art { max-width: 74ch; }
.g-sec { scroll-margin-top: 88px; }
.g-sec + .g-sec { margin-top: clamp(38px, 5vw, 56px); padding-top: clamp(30px, 4vw, 44px); border-top: 1px solid var(--line); }
.g-sec > h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.92rem); line-height: 1.22;
  display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: start;
}
.g-sec > h2 .g-n {
  font-size: .82rem; font-weight: 800; color: var(--accent-deep);
  background: var(--accent-soft); border-radius: 8px;
  padding: 5px 8px; margin-top: 6px; font-variant-numeric: tabular-nums;
}
.g-sec h3 { font-size: 1.06rem; margin-top: 26px; letter-spacing: -.015em; }
.g-sec p { margin-top: 14px; color: var(--ink-2); line-height: 1.68; }
.g-sec p b, .g-sec li b { color: var(--ink); }
.g-sec a {
  color: var(--accent-deep); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.g-sec a:hover { text-decoration-color: var(--accent); }
.g-sec ul, .g-sec ol { margin: 16px 0 0; padding-left: 1.15em; color: var(--ink-2); }
.g-sec li { margin-top: 8px; line-height: 1.6; }
.g-sec li::marker { color: var(--line-strong); }

/* 首段结论条 */
.g-answer {
  margin-top: 22px; padding: 18px 20px;
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--accent-soft); color: var(--ink) !important;
  font-size: 1rem; line-height: 1.62;
}
.g-answer b { font-weight: 750; }

/* 快速数字表 */
.g-quick {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 26px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.g-quick div { background: var(--surface); padding: 15px 16px; }
.g-quick b { display: block; font-size: 1.16rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.g-quick span { display: block; margin-top: 3px; font-size: .75rem; line-height: 1.3; color: var(--ink-3); }
@media (max-width: 720px) { .g-quick { grid-template-columns: repeat(2, 1fr); } }

/* 例子框 */
.g-ex {
  margin-top: 22px; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); padding: 18px 20px; box-shadow: var(--shadow-s);
}
.g-ex h3, .g-ex h4 { margin: 0 0 10px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.g-ex table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.g-ex th, .g-ex td { padding: 7px 0; text-align: left; border-bottom: 1px dashed var(--line); vertical-align: top; }
.g-ex th { font-weight: 600; color: var(--ink-2); width: 56%; }
.g-ex td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.g-ex tr:last-child th, .g-ex tr:last-child td { border-bottom: 0; }
.g-ex tr.g-sum th, .g-ex tr.g-sum td { color: var(--accent-deep); font-weight: 800; border-top: 1px solid var(--line-strong); border-bottom: 0; padding-top: 10px; }
.g-ex p { margin-top: 10px !important; font-size: .82rem; color: var(--ink-3); line-height: 1.5; }

/* 长表格 */
.g-tbl { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.g-tbl .cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.g-tbl table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 620px; }
.g-tbl caption {
  caption-side: top; text-align: left; padding: 14px 16px 10px;
  font-size: .78rem; line-height: 1.45; color: var(--ink-3);
}
.g-tbl th, .g-tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.g-tbl thead th {
  font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 800; background: var(--paper); white-space: nowrap;
}
.g-tbl tbody th { font-weight: 700; }
.g-tbl td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.g-tbl tbody tr:last-child th, .g-tbl tbody tr:last-child td { border-bottom: 0; }

/* 清单（::before 绝对定位，避免把 <b> 挤成独立列） */
.g-check { list-style: none; padding: 0 !important; margin-top: 18px !important; }
.g-check li { position: relative; padding-left: 32px; margin-top: 11px; }
.g-check li::before {
  content: "✓"; position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: .72rem; font-weight: 900; line-height: 20px; text-align: center;
}

/* 警示 / 编号清单 */
.g-flag { list-style: none; padding: 0 !important; margin-top: 18px !important; counter-reset: fl; }
.g-flag li {
  counter-increment: fl; position: relative; padding-left: 36px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.g-flag li:first-child { border-top: 0; padding-top: 0; }
.g-flag li::before {
  content: counter(fl); position: absolute; left: 0; top: 2px;
  font-size: .74rem; font-weight: 800; color: #fff;
  background: var(--accent-deep); border-radius: 6px;
  width: 22px; height: 22px; line-height: 22px; text-align: center;
}
.g-flag li:not(:first-child)::before { top: 14px; }

/* RFQ 模板 */
.g-rfq {
  margin-top: 22px; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid #2A2620; background: #1A1713; color: #F3EFE7;
}
.g-rfq .rfq-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; background: #24201A; border-bottom: 1px solid #332E26;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #A79E8D;
}
.g-rfq pre {
  margin: 0; padding: 16px 18px 18px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.62; color: #F3EFE7; white-space: pre-wrap; word-break: break-word;
}
.g-rfq pre b { color: #FFB4A2; font-weight: 700; }

/* FAQ 复用 site.css 的 .faq，仅调间距 */
.g-sec .faq { margin-top: 20px; }

/* 结尾 CTA 前的内链卡 */
.g-next {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 26px;
}
.g-next a {
  display: block; padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); text-decoration: none !important;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.g-next a:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-s); }
.g-next b { display: block; font-size: .9rem; color: var(--ink); }
.g-next span { display: block; margin-top: 3px; font-size: .76rem; color: var(--ink-3); }
@media (max-width: 820px) { .g-next { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .g-body { grid-template-columns: minmax(0, 1fr); }
  .g-toc {
    position: static; order: -1;
    padding: 16px 18px;
  }
  .g-toc ol { columns: 2; column-gap: 22px; }
  .g-toc li { break-inside: avoid; }
}
@media (max-width: 620px) {
  .g-toc ol { columns: 1; }
  .g-art { max-width: none; }
  .g-sec > h2 { grid-template-columns: 1fr; gap: 8px; }
  .g-sec > h2 .g-n { justify-self: start; margin-top: 0; }
}

/* ---------- 纯数值表：不允许换行，避免区间被拆行 ---------- */
.g-tbl.g-num td, .g-tbl.g-num tbody th { white-space: nowrap; }
.g-tbl.g-num table { min-width: 720px; }

/* ---------- 窄屏：示例框表格允许换行，避免把页面撑宽 ---------- */
@media (max-width: 640px) {
  .g-ex { padding: 16px 16px 18px; }
  .g-ex table { font-size: .84rem; }
  .g-ex th { width: auto; }
  .g-ex td { white-space: normal; text-align: left; }
  .g-ex tr th, .g-ex tr td { display: block; width: 100%; }
  .g-ex tr th { border-bottom: 0; padding-bottom: 0; }
  .g-ex tr td { padding-top: 2px; }
  .g-ex tr.g-sum th, .g-ex tr.g-sum td { border-top: 1px solid var(--line-strong); }
  .g-ex tr.g-sum th { padding-top: 10px; }
}
