/* =========================================================
   一键排版（Typeset）预设样式
   作用域全部限定在 .fmt / .fmt-xxx，不影响其它内容。
   新增样式：在 typeset.js 的 PRESETS 追加一项，并在本文件增加对应 .fmt-xxx 规则即可。
   ========================================================= */

/* ---------- 基础排版（所有预设共用，保证干净语义） ---------- */
.fmt {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.fmt > :first-child { margin-top: 0; }
.fmt > :last-child { margin-bottom: 0; }
.fmt p { margin: 0 0 1em; }
.fmt h1, .fmt h2, .fmt h3, .fmt h4, .fmt h5, .fmt h6 {
  line-height: 1.4;
  margin: 1.4em 0 .6em;
  font-weight: 600;
  color: #1f2d3d;
}
.fmt h1 { font-size: 22px; }
.fmt h2 { font-size: 19px; }
.fmt h3 { font-size: 17px; }
.fmt h4 { font-size: 15px; }
.fmt h5, .fmt h6 { font-size: 14px; color: #5a6b7b; }
.fmt img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 1em auto;
}
.fmt a {
  color: #2b6cb0;
  text-decoration: none;
  border-bottom: 1px solid rgba(43, 108, 176, .25);
}
.fmt a:hover { border-bottom-color: #2b6cb0; }
.fmt blockquote {
  margin: 1em 0;
  padding: 10px 16px;
  border-left: 4px solid #e2e8f0;
  background: #f7fafc;
  color: #555;
}
.fmt ul, .fmt ol { margin: 0 0 1em; padding-left: 1.6em; }
.fmt li { margin: .3em 0; }
.fmt hr { border: 0; border-top: 1px solid #e2e8f0; margin: 1.4em 0; }
.fmt pre, .fmt code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  max-width: 100%;
  overflow-x: auto;
  background: #f6f8fa;
  border-radius: 6px;
}
.fmt :not(pre) > code { padding: 2px 5px; font-size: .9em; }
.fmt pre { padding: 12px 14px; }
.fmt table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.fmt th, .fmt td { border: 1px solid #e2e8f0; padding: 6px 10px; }
.fmt th { background: #f7fafc; }

/* ---------- 样式一：简约·参考（忠实还原参考页 .wk-rich 风格） ---------- */
.fmt-s1 h2 { border-bottom: 1px solid #eef1f5; padding-bottom: 6px; }
.fmt-s1 h3 { color: #2b6cb0; }
.fmt-s1 img { box-shadow: 0 2px 10px rgba(20, 40, 80, .08); }
.fmt-s1 blockquote { border-left-color: #cbd5e0; }

/* ---------- 样式二：清新·强调（标题/引用/图片暖色强调） ---------- */
.fmt-s2 { color: #2d3340; }
.fmt-s2 h2 { color: #e0532f; border-left: 4px solid #e0532f; padding-left: 10px; }
.fmt-s2 h3 { color: #d6442a; }
.fmt-s2 h4, .fmt-s2 h5, .fmt-s2 h6 { color: #c0563a; }
.fmt-s2 a { color: #e0532f; border-bottom-color: rgba(224, 83, 47, .3); }
.fmt-s2 a:hover { border-bottom-color: #e0532f; }
.fmt-s2 img { border-radius: 10px; box-shadow: 0 6px 18px rgba(224, 83, 47, .12); }
.fmt-s2 blockquote { border-left-color: #e0532f; background: #fff6f3; color: #6b4a3f; }
.fmt-s2 th { background: #fff6f3; }

/* ---------- 后台编辑器内"一键排版"工具条 ---------- */
.wkrt-typeset {
  border-top: 1px solid #eef1f5;
  background: #fafbfc;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #8a94a6;
}
.wkrt-typeset-label { flex: 0 0 auto; }
.wkrt-typeset button {
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  background: #fff;
  color: #45506a;
  cursor: pointer;
}
.wkrt-typeset button:hover { border-color: #2b6cb0; color: #2b6cb0; }
