/* 文档文章排版 —— 一比一复刻官方 .article_body / .md-container 数值
 * 官方：文章区 min 810 / max 948；h1 38px #252b48；h2 24px 上 58 下 28 + 顶部分隔线；
 * p 15px / 行高 28px；表格 th #f6f9ff 蓝字；提示框 note 蓝边 notice 橙边；pre #292c34 */
.article_body {
  min-width: 0;
  max-width: 948px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 面包屑（官方 .crumbs） */
.crumbs {
  height: 20px;
  margin-bottom: 6px;
  line-height: 20px;
  width: 100%;
  text-align: left;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  color: #252b48;
  font-weight: 400;
  font-size: 14px;
}

.crumbs a { color: #1a66ff; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.crumbs .crumb_sep {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 4px;
  color: #252b48;
}

.crumbs .crumb_sep svg { width: 12px; height: 12px; }

/* 文章标题区（官方 article .title_wrap：38px 标题 + 12px 灰色更新时间） */
.cur_article h1.title_wrap,
article .title_wrap {
  margin: 21px 0 30px;
  display: flex;
  flex-direction: column;
}

.title_wrap .title {
  position: relative;
  color: #252b48;
  font-weight: 600;
  font-size: 38px;
}

.title_wrap .update_time {
  padding-top: 8px;
  color: #aeb7c7;
  font-weight: 400;
  font-size: 12px;
}

/* ---------------- 正文排版（官方 .md-container） ---------------- */
.md-container {
  color: #252b48;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.md-container h1,
.md-container h2 {
  margin: 58px 0 28px !important;
  padding-top: 28px !important;
  border: 0;
  border-top: 1px solid #f1f1f1;
  color: #252b48;
  font-weight: 600;
  font-size: 24px;
  line-height: 30px;
  scroll-margin-top: 84px;
}

.md-container h3,
.md-container h4 {
  margin: 48px 0 20px !important;
  color: #252b48;
  font-size: 19px;
  line-height: 26px;
  font-weight: 600;
  scroll-margin-top: 84px;
}

.md-container p {
  margin: 0 0 14px;
  overflow-x: hidden;
  color: #252b48;
  font-size: 15px;
  line-height: 28px;
  word-break: break-all;
}

.md-container a {
  color: #1a66ff;
  font-weight: 400;
  text-decoration: none;
}

.md-container a:hover { text-decoration: underline; }

.md-container ol,
.md-container ul { margin: 0 0 14px; padding: 0; }

.md-container li {
  margin-left: 1.5em;
  list-style: disc;
  line-height: 2;
}

.md-container li li { list-style: circle; }
.md-container li li li { list-style: square; }
.md-container ol > li { list-style: decimal !important; }

.md-container img { max-width: 100%; }

.md-container .inline-code,
.md-container code,
.md-container p code {
  margin: 0 4px 0 5px;
  padding: 3px 6px;
  border-radius: 3px;
  color: #476582;
  background: #f1f1f1;
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  font-size: 15px;
}

.md-container code {
  white-space: nowrap;
  font-family: Consolas, SFMono-Regular, "Liberation Mono", Courier, monospace;
}

.md-container pre {
  margin: 20px 0;
  padding: 16px;
  overflow: auto;
  border: 0;
  border-radius: 4px;
  background: #292c34;
}

.md-container pre code {
  margin: 0;
  padding: 0;
  color: #f8f8f2;
  background-color: inherit;
  white-space: normal;
  word-break: break-all;
  font-size: 13px;
  line-height: 1.8;
  font-family: Consolas, Menlo, Courier, monospace;
}

.md-container .red { color: #e51c0e; }

/* ---------------- 表格（官方 smart_tb：32px 行高、th #f6f9ff 蓝字） ---------------- */
.table-scroll {
  width: 100%;
  margin: 8px 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.md-container table {
  width: 100%;
  color: #666867;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 14px;
  line-height: 28px;
}

.md-container table th,
.md-container table td {
  padding: 6px 8px;
  border: 1px solid #e1e1e1;
  text-align: left;
  word-break: break-all;
  vertical-align: top;
}

.md-container table th {
  height: 32px;
  padding: 6px 15px;
  background: #f6f9ff;
  color: #1a66ff;
  font-weight: 600;
  line-height: 32px;
  white-space: nowrap;
}

.md-container table td {
  height: 32px;
  padding: 8px 14px;
  color: #252b48;
  line-height: 32px;
}

.md-container table td p { font-size: 14px; color: #252b48; line-height: 28px; margin: 0; }
.md-container table td p + p { margin-top: 6px; }

/* ---------------- 提示框（官方 note-warp：note 蓝边 / notice 橙边） ---------------- */
.md-container .note-warp {
  position: relative;
  margin-bottom: 20px;
  padding: 16px 40px;
  border-radius: 4px;
  color: #252b48;
  font-weight: 400;
  font-size: 14px;
}

.md-container .note-warp .note-title {
  display: block;
  position: relative;
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
}

.md-container .note-warp.note {
  border: 1px solid #1a66ff;
  background-color: #fbfbfb;
}

.md-container .note-warp.note .note-title { color: #1a66ff; }

.md-container .note-warp.notice {
  border: 1px solid #ffa21a;
  background-color: #fffcf7;
}

.md-container .note-warp.notice .note-title { color: #ffa21a; }

/* 官方图标：蓝色问号圆圈 / 橙色感叹号（内联 SVG，非 emoji） */
.md-container .note-warp.note::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 21px;
  width: 17px;
  height: 17px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke='%231a66ff' stroke-width='1.8'/%3E%3Ctext x='12' y='16.4' text-anchor='middle' font-family='Arial,sans-serif' font-size='13' font-weight='700' fill='%231a66ff'%3E?%3C/text%3E%3C/svg%3E") no-repeat center / contain;
}

.md-container .note-warp.notice::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 21px;
  width: 17px;
  height: 17px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke='%23ffa21a' stroke-width='1.8'/%3E%3Crect x='11.05' y='6' width='1.9' height='7.4' rx='0.95' fill='%23ffa21a'/%3E%3Ccircle cx='12' cy='16.6' r='1.35' fill='%23ffa21a'/%3E%3C/svg%3E") no-repeat center / contain;
}

.md-container .note-warp p {
  margin: 4px 0;
}

.md-container .note-warp p:last-child { margin-bottom: 0 !important; }

/* ---------------- 示例运行（官方 restdemo：select + 操作按钮 + JSON 树） ---------------- */
/* 概述页服务选择下拉（官方 .restdemo-select） */
.restdemo-select {
  height: 32px;
  line-height: 32px;
  padding: 0 20px;
  display: block;
  font-size: 14px;
  border-radius: 2px;
  border: 1px solid #e1e1e1;
  margin: 20px 0;
  background: #fff;
}

/* 各文档页示例：32px 蓝色运行按钮 */
.run-button,
.md-container .md-btn.run {
  height: 32px;
  padding: 0 30px;
  border: none;
  border-radius: 3px;
  color: #fff;
  background-color: #1a66ff;
  font-size: 14px;
  line-height: 32px;
  cursor: pointer;
  outline: 0;
}

.run-button:hover,
.md-container .md-btn.run:hover { background-color: #1558d6; }

.run-button:disabled { opacity: .6; cursor: default; }

/* 「获取 API Key」白底蓝边按钮（官方 md-btn-white） */
.md-container .key-get-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1a66ff;
  font-size: 15px;
  line-height: 1;
}

.md-container .key-get-link .key-get-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.md-container .key-get-link:hover .key-get-arrow {
  transform: translateX(4px);
}

.link-button,
.md-container .md-btn-white {
  display: inline-block;
  height: 38px;
  padding: 0 24px;
  border: 1px solid #1a66ff;
  border-radius: 3px;
  background-color: #fff;
  color: #1a66ff;
  font-weight: 400;
  font-size: 14px;
  line-height: 36px;
  text-align: center;
  text-decoration: none;
}

.link-button:hover,
.md-container .md-btn-white:hover {
  background-color: #eff4ff;
  text-decoration: none;
}

.demo-table input,
.demo-table select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-width: 120px;
  height: 34px;
  padding: 6px 12px;
  border: 1px solid #f8f8f8;
  border-radius: 2px;
  background-color: #f8f8f8;
  color: #252b48;
  font-size: 14px;
  line-height: 1.42857143;
}

.demo-table input:focus,
.demo-table select:focus {
  border-color: #1a66ff;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}

.demo-table td:last-child { text-align: center !important; }

.demo-output {
  margin: 10px 0 20px;
  padding: 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #252b48;
  font-family: Consolas, Monaco, "Courier New", Courier, monospace !important;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 500px;
  overflow-y: auto;
}

.demo-output .demo-image {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #e5e8f0;
}

.demo-block { margin: 14px 0; }

/* 概述页 demo 操作按钮（官方 .restdemo-action）：默认只显示「运行」，成功后再显示其余 */
.restdemo-action button {
  display: none;
  color: #fff;
  outline: 0;
  cursor: pointer;
  border: none;
  padding: 0 30px;
  font-size: 14px;
  line-height: 32px;
  border-radius: 3px;
  background-color: #1a66ff;
  margin-right: 10px;
  margin-bottom: 20px;
}

.restdemo-action button:hover { background-color: #1558d6; }

.restdemo-action button:disabled { opacity: .6; cursor: default; }

.restdemo-action .run { display: inline-block; }

/* 示例响应框（官方 .restdemo-result）：顶部 URL 行 + 下方 JSON 树 */
.restdemo-result {
  display: none;
  margin-top: 10px;
  border: 1px solid #ddd;
}

.restdemo-result.success,
.restdemo-result.fail { display: block; }

.restdemo-result .url {
  padding: 10px;
  color: #0a8021;
  font-size: 14px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  word-break: break-all;
  border-bottom: 1px solid #ddd;
}

.restdemo-result .pre {
  padding: 10px;
  font-family: Consolas, Monaco, "Courier New", Courier, monospace !important;
  font-size: 12px;
  word-break: break-all;
  max-height: 500px;
  overflow-y: auto;
}

/* JSON 树查看器（官方 jsontree 组件样式）
 * 注意：md-container 的 ul/li 规则（0,1,1）会压过裸 .jsontree_* 选择器（0,1,0），
 * 导致子节点 35px 缩进与整树 30px 缩进失效、看起来像纯文本；这里统一加 .md-container 前缀抬高优先级 */
.md-container .jsontree_tree {
  margin: 0 0 0 30px;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 14px;
}

.md-container .jsontree_tree li { list-style: none !important; margin-left: 0 !important; }

.md-container .jsontree_child-nodes {
  display: none;
  margin: 0 0 5px 35px;
  padding: 0;
  line-height: 2;
}

.md-container .jsontree_node_expanded > .jsontree_value-wrapper > .jsontree_value > .jsontree_child-nodes { display: block; }

.jsontree_label-wrapper { float: left; margin-right: 8px; }

.jsontree_label {
  font-weight: 400;
  vertical-align: top;
  color: #000;
  position: relative;
}

.jsontree_value-wrapper { display: block; overflow: hidden; }

.jsontree_node_complex > .jsontree_value-wrapper { overflow: inherit; }

.jsontree_value { vertical-align: top; display: inline; }

.jsontree_value_null { color: #777; font-weight: 700; }

.jsontree_value_string { color: #025900; font-weight: 700; }

.jsontree_value_number { color: #000e59; font-weight: 700; }

.jsontree_value_boolean { color: #600100; font-weight: 700; }

.jsontree_expand-button {
  position: absolute;
  top: 5px;
  left: -15px;
  display: block;
  width: 9px;
  height: 9px;
  background: #777;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUBFAsKjLIEkwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAQElEQVQI14WPyw0AMAhCrenOMAJb24OHNvb3ThiFYIsIkrYhyQDECQC+3pYAtzu9OFJImrscSKb4Z3rtvdAe/w3I7C/CeujfAgAAAABJRU5ErkJggg==");
}

.jsontree_node_expanded > .jsontree_label-wrapper > .jsontree_label > .jsontree_expand-button {
  background: #fff;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAIAAABv85FHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gUBFAwe2SlGKQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAARUlEQVQI132PwQ3AMAwCjdWd8QhMbfrIo1Ga5D4IYYEM21UVPyQFSe8gmfOt7dlmnHmGLJOSvmyY7s7MfSeA496S4fLfC/74Ll1MLvV+AAAAAElFTkSuQmCC");
}

.jsontree_show-more { cursor: pointer; }

.jsontree_node_expanded > .jsontree_value-wrapper > .jsontree_value > .jsontree_show-more { display: none; }

.jsontree_node_empty > .jsontree_label-wrapper > .jsontree_label > .jsontree_expand-button,
.jsontree_node_empty > .jsontree_value-wrapper > .jsontree_value > .jsontree_show-more { display: none !important; }

.jsontree_node_complex > .jsontree_label-wrapper > .jsontree_label { cursor: pointer; }

.jsontree_node_empty > .jsontree_label-wrapper > .jsontree_label { cursor: default !important; }

.service-url {
  margin: 8px 0 20px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 2px;
  color: #0a8021;
  background: #fff;
  font-family: consolas, "courier new", monospace;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-all;
  white-space: normal;
}

/* ---------------- 步骤条（入门指南：官方 process.png 三步结构，用 CSS 复刻） ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding-right: 20px;
  margin: 0;
  list-style: none;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 0;
  left: calc(100% - 12px);
  height: 1px;
  background: #d9dce2;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(115deg, #2b99ff 9%, #1a66ff);
  font-weight: 700;
}

.step-title { font-weight: 600; }

/* ---------------- 页脚（官方 global_footer：#f8f9fa 四栏 + 版权行） ---------------- */
.site-footer {
  margin-top: 60px;
  background: #f8f9fa;
  color: #909298;
  font-size: 12px;
  font-weight: 200;
  line-height: 22px;
  text-align: center;
  overflow: hidden;
}

.site-footer .footer_nav {
  width: 100%;
  padding: 32px 0 0;
  background: #f8f9fa;
}

.site-footer .footer_nav ul {
  display: flex;
  justify-content: space-around;
  width: 1200px;
  max-width: calc(100% - 48px);
  padding: 0 0 20px;
  margin: 0 auto;
  border-bottom: 1px solid #d2d2d7;
  list-style: none;
  text-align: center;
}

.site-footer .footer_nav li {
  display: inline-block;
  width: 116px;
  color: #909298;
  font-size: 12px;
  line-height: 28px;
  vertical-align: top;
  text-align: left;
  position: relative;
}

.site-footer .footer_nav li strong {
  display: block;
  margin-bottom: 9px;
  color: #5e5f63;
  font-weight: 600;
  font-size: 12px;
  line-height: 14px;
}

.site-footer .footer_nav li a {
  display: block;
  color: #909298;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 28px;
  text-decoration: none;
  transition: .2s;
}

.site-footer .footer_nav li a:hover {
  color: #3d6eff;
  text-decoration: none;
}

.site-footer .footer_links {
  padding: 16px 0 20px;
  color: #909298;
}
