/* ==========================================================================
   tool-standard.css —— 工具页统一版式（2026-11-19 建）
   用法：在任何工具页的 </head> 前加一行
     <link rel="stylesheet" href="/css/tool-standard.css">
   放在页面自有 CSS 之后，作为“最后一层兜底”。只做版式，不改配色主题。
   ========================================================================== */

/* 1. 字号阶梯（用 px，避免各页 rem 基准不同导致“改了反而更小”） */
body, p, li, td, dd, blockquote { font-size: 18px; line-height: 1.7; }
h1 { font-size: 40px; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 30px; line-height: 1.25; margin: 2.5em 0 .7em; }
h3 { font-size: 22px; line-height: 1.3;  margin: 1.6em 0 .5em; }
h4 { font-size: 19px; line-height: 1.35; margin: 1.3em 0 .4em; }
.lead, .section-intro { font-size: 20px; line-height: 1.6; }
small, .meta, .note { font-size: 15px; }

/* 2. 章节与块间距（H2 之前至少 ~40px，避免“章节粘连”） */
h2:first-child, h2:first-of-type { margin-top: 0; }
ul, ol { margin: 1em 0; padding-left: 1.4em; }
ul + h2, ol + h2, p + h2, img + h2, table + h2, pre + h2 { margin-top: 2.5em; }
p:empty { display: none; }
section + section { margin-top: 0; }

/* 3. 正文链接：可读的深蓝，访问前后同色；深色 hero 里换浅黄 */
a { color: #1a5fb4; }
a:visited { color: #1a5fb4; }
a:hover { color: #14487f; }
header.page-hero a, .hero a, .page-hero p a, .hero p a { color: #ffd479; }
header.page-hero a:visited, .hero a:visited { color: #ffd479; }

/* 4. 价格行（.price-note）：与 db-to-db 一致，且不被 .cta/.download 的 a 规则变成按钮 */
.price-note, p.price-note, .container .price-note { margin: 14px auto 18px; font-size: 16px !important; line-height: 1.65; max-width: 820px; text-align: center; font-size: 16px; line-height: 1.7; }
.price-note a { display: inline !important; background: none !important; padding: 0 !important;
  color: inherit; font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; }
.price-note a:visited { color: inherit; }
.cta .price-note, .download-section .price-note, .download .price-note,
.cta .price-note *, .download-section .price-note * { color: #334155; }
.price-note { color: #334155; }
/* 价格行与下载按钮一律上下排，不要左右分列 */
.download-links { display: flex !important; flex-direction: column; align-items: center;
  gap: 10px; flex-wrap: wrap; }

/* 5. 下载区与按钮：统一蓝，成对出现时上下留白 */
.download-section, .download, .cta-section { padding: 48px 0; }
.download-section .os-btn, .download-buttons a, .cta-btn, .btn-primary {
  background: #2563eb; color: #fff; border: none; border-radius: 6px;
  padding: 12px 24px; font-size: 17px; font-weight: 600; text-decoration: none; display: inline-block;
}
.download-section .os-btn:hover, .download-buttons a:hover, .cta-btn:hover, .btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #fff; color: #2563eb; border: 1px solid #2563eb; }

/* 6. 卡片网格：2 列自适应，卡片内文字不缩水 */
.feature-grid, .features-grid, .card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px;
}
.feature-card, .type-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 22px; }
.feature-card h3, .feature-card h4 { margin-top: 0; }
.feature-icon { font-size: 26px; display: block; margin-bottom: 10px; }

/* 7. FAQ：每条独立卡片；同一卡片内多组问答也要有间距 */
/* FAQ 统一样式（2026-11-20 v2）
   各页模板互相打架：有的用 border-bottom 列表、有的用卡片+阴影、有的 800px 居中。
   这里一次性归一：卡片式、白底、8px 圆角、无边框、18/24 内距、与正文同宽。
   页面 CSS 先加载、且常写得更具体（如 `.faq .faq-item`），所以关键几项用 !important。 */
.faq,
.faq-container,
.faq-list,
.faq-wrapper { max-width: none !important; margin: 0 !important; padding: 0 !important; background: none !important; }

.faq-item,
.faq .faq-item,
.faq-container .faq-item {
  background: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 5px rgba(0,0,0,.08) !important;
  padding: 18px 24px !important;
  margin: 0 0 14px !important;
  max-width: none !important;
}

.faq-question,
.faq .faq-question {
  font-size: 19px !important;
  font-weight: 600 !important;
  margin: 0 0 8px !important;
  color: #1f2937 !important;
}

.faq-answer,
.faq .faq-answer,
.faq-item p {
  font-size: 17px !important;
  line-height: 1.75 !important;
  color: #334155 !important;
}
.faq-item h3 { font-size: 19px; margin: 0 0 8px; }
.faq-item h3 + p { margin-top: 0; }

/* 8. 媒体与表格：不溢出容器，图片与下一段留白 */
img, table, pre { max-width: 100%; }
img { height: auto; }
img + p, img + h2, img + h3, table + p { margin-top: 20px; }
pre { overflow-x: auto; padding: 14px 16px; border-radius: 6px; }
/* 9. 下载按钮：只给“下载”这一种按钮统一形态（2026-11-19）
   判据是链接目标/行为，不是 class —— 页面里其它按钮（查看指南、购买、次级操作）不受影响。
   历史上各页 class 不同（btn / btn-primary / download-btn / os-btn / cta-btn / purchase-cta-button），
   这里用属性选择器一并覆盖。 */
a[href*="download"][class*="btn"],
a[href*="download"][class*="cta"],
a[href*="download"][class*="button"],
a[href*="download"].download-btn,
a[href*="download"].os-btn,
a[href*="download"].cta-btn,
a[onclick*="openDownloadModal"],
.download-buttons a,
.download-section .os-btn,
.download .os-btn {
  display: inline-block;
  background: #2563eb !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px;
  padding: 13px 26px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
}
a[href*="download"][class*="btn"]:hover,
a[href*="download"].download-btn:hover,
a[href*="download"].os-btn:hover,
a[href*="download"].cta-btn:hover,
a[onclick*="openDownloadModal"]:hover,
.download-buttons a:hover { background: #1d4ed8 !important; color: #fff !important; }

/* 其它按钮保持各页原样：这里不写 .btn / .btn-primary 的通配规则 */
/* 10. 正文图片：默认居中，避免裸 <p><img> 贴左、与相邻图不一致 */
.container p > img, .container p img, section img {
  display: block; margin: 24px auto; max-width: 100%; height: auto;
}
figure, figure img { margin: 24px auto; }

/* 11. FAQ 折叠：配 /js/faq.js 使用（.faq-item > .faq-question + .faq-answer） */
.faq-question { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: "+"; color: #2563eb; font-size: 22px; font-weight: 700; margin-left: 12px; flex: 0 0 auto; }
.faq-item.active .faq-question::after { content: "\2212"; }
.faq-answer { display: none; }
.faq-item.active .faq-answer { display: block; max-height: none !important;
  overflow: visible !important; padding-top: 10px; }
/* 12. 下载区（页脚上方）统一配色（2026-11-19）
   基准取自 /tools/file-to-file/excel-to-json 的 "Get Started Today"：
   浅蓝底 #e8f4fd + 深色标题 + 蓝按钮白字。页面只要用 .cta-section / .download-section
   （或 <section style="background-color:#e8f4fd">）即可继承。 */
/* 容器名各页不一（.cta-section / .download-section / .download / #download /
   .cta / section[class*="download"]），统一按同一套配色处理 */
.cta-section, .download-section, .download, #download,
.cta, .download-area, section[class*="download"], section[class*="cta"] {
  background: #e8f4fd;
  padding: 48px 0;
  text-align: center;
}
.cta-section h2, .download-section h2, .download h2, #download h2, .cta h2,
section[class*="download"] h2, section[class*="cta"] h2 { color: #1f2937; margin-top: 0; }
.cta-section p, .download-section p, .download p, #download p, .cta p,
section[class*="download"] p, section[class*="cta"] p { color: #334155; }
.cta-section a, .download-section a, .download a, #download a, .cta a { color: #1a5fb4; }
.cta-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
/* 价格行紧跟章节标题时给足上间距（部分老页把 h2 下边距清零） */
.section-title + .price-note, h2 + .price-note { margin-top: 16px; }

/* 下载区：价格行在上、按钮单独一行（老模板 .download-grid 是横排） */
.download-grid { display: flex !important; flex-direction: column; align-items: center; gap: 10px; }
/* 主按钮统一蓝（标准表之前只管 .download-btn；老页还有 .btn 用绿/其它色）。
   次级按钮用 .btn-outline / .btn-online，不受影响。 */
.btn:not(.btn-outline):not(.btn-online), .btn-primary {
  background: #2563eb !important; color: #fff !important; border-color: #2563eb !important;
}
.btn:not(.btn-outline):not(.btn-online):hover, .btn-primary:hover {
  background: #1d4ed8 !important; border-color: #1d4ed8 !important;
}
/* hero 主按钮：bootstrap 的 .btn-lg(10/16, 18px, line-height 1.33) 在页面 CSS 之后加载，
   会把各页 hero 按钮顶得过高；标准表最后加载，这里统一压平。 */
.page-hero .btn,
.page-hero .btn-lg,
.page-hero .cta-btn,
.page-hero .download-btn {
  padding: 9px 20px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  height: auto !important;
  min-height: 0 !important;
}
