/* ============================================================
   工具子页面 —— 复用首页样式 + 子页面特有样式
   ============================================================ */

/* 子页面顶部导航 */
.subpage-nav {
  width: 100%; max-width: 1280px; margin: 0 auto;
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.subpage-nav .nav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-sans); font-size: 17px; font-weight: 700; color: var(--ink);
}

.subpage-nav .nav-brand img {
  width: 32px; height: 32px; border-radius: 9999px;
  border: 2px solid var(--green); object-fit: cover;
}

.subpage-nav .nav-back {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 18px;
  background: var(--green-soft);
  border: 1px solid rgba(27, 94, 59, 0.18);
  border-radius: 9999px;
  font-family: var(--f-mono); font-size: 13px; color: var(--green);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.subpage-nav .nav-back:hover {
  background: rgba(27, 94, 59, 0.15);
  border-color: rgba(27, 94, 59, 0.3);
  transform: translateX(-2px);
}

/* 子页面主体 */
.subpage {
  width: 100%;
  max-width: 896px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

/* Hero 区 */
.tool-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.tool-hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 18px;
  background: var(--green-soft);
  border: 1px solid rgba(27, 94, 59, 0.15);
  border-radius: 9999px;
  font-family: var(--f-mono); font-size: 13px; color: var(--green);
}

.tool-hero h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: 0.3px;
  color: var(--ink);
}

.tool-hero .tool-tagline {
  font-size: 18px;
  line-height: 30px;
  color: var(--ink-2);
  max-width: 720px;
}

.tool-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 28px;
  background: var(--green); color: #fff; border-radius: 9999px;
  font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow-glow);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px); background: #14512f;
  box-shadow: 0 12px 28px -6px rgba(27, 94, 59, 0.35);
}

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 28px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 15px; color: var(--ink);
  transition: transform .25s ease, border-color .25s ease, color .25s ease;
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--green); color: var(--green);
}

/* 内容卡片 */
.tool-section {
  margin-top: 56px;
}

.tool-section h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 31px;
  color: var(--ink);
  margin-bottom: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}

.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--green-soft);
  border: 1px solid rgba(27, 94, 59, 0.12);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transition: transform .25s ease;
}
.feature-card:hover .feature-icon { transform: scale(1.06); }

.feature-icon svg { width: 22px; height: 22px; color: var(--green); }

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-2);
}

/* 章节列表 */
.spec-list { display: grid; gap: 16px; }
.spec-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.spec-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.spec-icon {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 9999px;
  background: var(--green-soft); color: var(--green);
  border: 1px solid rgba(27, 94, 59, 0.15);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.spec-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.spec-item p {
  font-size: 14px;
  line-height: 22px;
  color: var(--ink-2);
}

/* CTA 块 */
.tool-cta {
  margin-top: 64px; padding: 40px;
  background: var(--accent-soft);
  border: 1px solid rgba(180, 83, 9, 0.15);
  border-radius: var(--radius-lg);
  text-align: center;
}
.tool-cta h2 { margin-bottom: 12px; }
.tool-cta p { color: var(--ink-2); font-size: 15px; line-height: 24px; margin-bottom: 24px; }

/* 微信推文排版工具：演示卡片 */
.demo-card {
  margin-top: 24px; padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-soft);
}

.demo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.demo-pane {
  background: #FAFAFA;
  border-radius: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  min-height: 240px;
}

.demo-pane h4 {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.demo-markdown {
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 22px;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.demo-output h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 8px 0;
}

.demo-output p {
  font-size: 15px;
  line-height: 26px;
  color: var(--ink-2);
  margin: 6px 0;
}

.demo-output blockquote {
  border-left: 3px solid var(--green);
  padding-left: 12px;
  color: var(--ink-2);
  font-style: italic;
}

/* 章节大纲（绿皮书用） */
.toc {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.toc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 14px; color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
}
.toc-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.toc-num {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 9999px;
  background: var(--green-soft); color: var(--green);
  border: 1px solid rgba(27, 94, 59, 0.15);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 12px; font-weight: 700;
}

/* 响应式 */
@media (max-width: 768px) {
  .tool-hero h1 { font-size: 32px; line-height: 42px; }
  .tool-hero .tool-tagline { font-size: 15px; line-height: 26px; }
  .feature-grid, .demo-row, .toc { grid-template-columns: 1fr; }
  .tool-cta { padding: 28px 20px; }
  .demo-card { padding: 20px; }
  .subpage-nav { padding: 16px 20px; }
  .subpage { padding: 24px 20px 64px; }
}

/* ── Skills 大合集 ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  cursor: pointer;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
}

.skill-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  transition: transform .25s ease;
}
.skill-card:hover .skill-icon { transform: scale(1.06); }
.skill-icon svg { width: 24px; height: 24px; }

.skill-icon--wechat { background: #E8F5EE; color: #07C160; }
.skill-icon--ppt    { background: #FDF3E7; color: #C2410C; }
.skill-icon--gh     { background: #EEF1F5; color: #24292F; }
.skill-icon--niu    { background: #EDEAF8; color: #6D28D9; }

.skill-body { flex: 1; }
.skill-body h3 {
  font-size: 19px; font-weight: 600; color: var(--ink);
  margin-bottom: 8px; letter-spacing: 0.2px;
}
.skill-desc {
  font-size: 14px; line-height: 23px; color: var(--ink-2);
}

.skill-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
}
.skill-tag {
  height: 26px; padding: 0 12px;
  display: inline-flex; align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
}

.skill-link {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  height: 38px; padding: 0 16px;
  background: var(--green-soft);
  border: 1px solid rgba(27, 94, 59, 0.18);
  border-radius: 999px;
  font-family: var(--f-mono); font-size: 13px; color: var(--green);
  transition: background .25s ease, transform .25s ease, border-color .25s ease;
}
.skill-link svg { width: 16px; height: 16px; }
.skill-link:hover {
  background: rgba(27, 94, 59, 0.15);
  border-color: rgba(27, 94, 59, 0.3);
  transform: translateX(2px);
}

@media (max-width: 768px) {
  .skills-grid { grid-template-columns: 1fr; gap: 16px; }
  .skill-card { padding: 22px; }
}

/* ── AtomGit 指南页专用 ── */

/* 平台数据小条 */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mini-stat {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.mini-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mini-stat-num {
  font-family: var(--f-mono);
  font-size: 26px; font-weight: 700; color: var(--green);
  line-height: 1.1;
}
.mini-stat-label {
  margin-top: 6px;
  font-size: 12px; color: var(--muted);
  font-family: var(--f-mono);
  letter-spacing: .3px;
}

/* 代码块 */
.code-block {
  margin-top: 18px;
  background: #1F2937;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.2);
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #111827;
  color: #9CA3AF;
  font-family: var(--f-mono); font-size: 12px;
  letter-spacing: .3px;
}
.code-head .dot {
  width: 10px; height: 10px; border-radius: 9999px; display: inline-block;
}
.code-head .dot--r { background: #F87171; }
.code-head .dot--y { background: #FBBF24; }
.code-head .dot--g { background: #34D399; }
.code-head .code-lang { margin-left: auto; color: #93C5FD; }
.code-block pre {
  margin: 0; padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--f-mono); font-size: 13px;
  line-height: 22px;
  color: #E5E7EB;
}
/* 代码块内的 code 不套用行内代码样式 */
.code-block pre code {
  color: inherit; background: transparent;
  border: none; padding: 0; font-size: inherit;
}

/* 行内代码 */
.subpage code {
  font-family: var(--f-mono); font-size: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 6px;
  color: var(--green);
}

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.faq-item:hover { border-color: var(--line); box-shadow: var(--shadow-md); }
.faq-q {
  font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; align-items: flex-start; gap: 10px;
}
.faq-q::before {
  content: "Q";
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--green-soft); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 12px; font-weight: 700;
}
.faq-a {
  margin-top: 8px; padding-left: 34px;
  font-size: 14px; line-height: 24px; color: var(--ink-2);
}

/* 步骤里的数字小方块（与 spec-icon 一致即可，这里再定义一份便于独立使用） */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--green-soft); color: var(--green);
  border: 1px solid rgba(27, 94, 59, .15);
  font-family: var(--f-mono); font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .mini-stats { grid-template-columns: 1fr; }
}