/* ============================================================
   XMind 资源站 — 全站样式
   暖纸底色 + 墨色文字 + XMind 品牌红橙点缀
   ============================================================ */

:root {
  --paper: #faf8f4;
  --paper-2: #f3efe8;
  --card: #ffffff;
  --ink: #23201b;
  --ink-2: #4a443c;
  --muted: #7d766b;
  --line: #e6e0d6;
  --line-2: #d9d2c6;
  --brand: #e8412c;
  --brand-2: #ff6b3d;
  --brand-soft: #fdeee9;
  --quark: #4b6bfb;
  --quark-soft: #eef1ff;
  --baidu: #2a5cff;
  --baidu-soft: #eef2ff;
  --ok: #2f8f5b;
  --warn: #c8862a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(35, 32, 27, .04), 0 8px 24px -18px rgba(35, 32, 27, .35);
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.32; font-weight: 700; letter-spacing: -.01em; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.wrap, .doc { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.doc { padding-top: 40px; padding-bottom: 56px; }

/* ---------------- 顶部 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 244, .9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }

.brand img { width: 30px; height: 30px; border-radius: 8px; }

.brand b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }

.brand span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: .06em;
  line-height: 1.2;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }

.nav a {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .18s, color .18s;
}

.nav a:hover { background: var(--paper-2); color: var(--ink); }

.nav a.on { color: var(--brand); background: var(--brand-soft); font-weight: 700; }

.head-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  transition: opacity .18s;
}

.head-cta:hover { opacity: .86; }

/* ---------------- 通用块 ---------------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.sec { padding: 62px 0; }

.sec-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-head { margin-bottom: 30px; }

.sec-head h2 { font-size: 27px; margin-top: 12px; }

.sec-head p { color: var(--muted); margin-top: 9px; max-width: 720px; font-size: 14.5px; }

.num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 首屏 ---------------- */
.hero { padding: 54px 0 46px; }

.hero-grid { display: grid; grid-template-columns: 1fr 1.06fr; gap: 46px; align-items: center; }

.hero h1 { font-size: 40px; letter-spacing: -.03em; margin: 16px 0 0; }

.hero h1 em { font-style: normal; color: var(--brand); }

.hero-sub { margin-top: 16px; color: var(--ink-2); font-size: 15.5px; max-width: 520px; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.tag {
  font-size: 12.5px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  background: #fff;
}

.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 12px 22px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .16s, box-shadow .16s, opacity .16s;
  text-align: left;
}

.btn-sub { font-size: 11.5px; font-weight: 400; opacity: .82; letter-spacing: .02em; }

.btn:hover { transform: translateY(-1px); }

.btn-quark { background: var(--quark); color: #fff; box-shadow: 0 10px 22px -14px rgba(75, 107, 251, .9); }

.btn-baidu { background: var(--baidu); color: #fff; box-shadow: 0 10px 22px -14px rgba(42, 92, 255, .9); }

.btn-dark { background: var(--ink); color: #fff; }

.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }

.hero-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); }

.hero-shot {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-shot img { width: 100%; }

/* ---------------- 速览条 ---------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin-top: 40px;
}

.facts div { padding: 16px 18px; border-right: 1px solid var(--line); }

.facts div:last-child { border-right: 0; }

.facts b { display: block; font-size: 16px; letter-spacing: -.01em; }

.facts span { font-size: 12px; color: var(--muted); }

/* ---------------- 卡片 ---------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
  transition: border-color .18s, transform .18s;
}

.card:hover { border-color: var(--line-2); transform: translateY(-2px); }

.card h3 { font-size: 15.5px; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; }

.card h3 i {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.card p { font-size: 13.4px; color: var(--muted); }

/* ---------------- 图集 ---------------- */
.gallery { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }

.shot {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.shot img { width: 100%; background: var(--paper-2); }

.shot figcaption { padding: 12px 16px 14px; border-top: 1px solid var(--line); }

.shot b { font-size: 14px; display: block; }

.shot span { font-size: 12.5px; color: var(--muted); }

.shot-col { display: grid; gap: 16px; }

/* ---------------- 场景 / 列表 ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }

ul.feat { display: grid; gap: 14px; }

ul.feat li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.2px; color: var(--ink-2); }

ul.feat li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--brand); }

ul.feat li b { color: var(--ink); }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

.table th, .table td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--line); }

.table th { background: var(--paper-2); font-size: 13px; color: var(--ink-2); font-weight: 700; white-space: nowrap; }

.table tr:last-child td { border-bottom: 0; }

.table td code { background: var(--paper-2); padding: 2px 6px; border-radius: 5px; font-size: 12.5px; }

/* ---------------- 下载区 ---------------- */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.dl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 24px 24px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.dl-card .dl-main { flex: 1; min-width: 0; }

.dl-card h3 { font-size: 18px; margin-bottom: 6px; }

.dl-card .dl-desc { font-size: 13.4px; color: var(--muted); margin-bottom: 16px; }

.dl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }

.dl-meta span { font-size: 12px; padding: 3px 9px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); }

.dl-qr { flex: none; width: 168px; text-align: center; }

.dl-qr p { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* 二维码呼吸边框 */
.qr-halo {
  display: inline-block;
  padding: 9px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line-2);
  animation: haloBreath 2.8s ease-in-out infinite;
  will-change: transform, box-shadow;
}

.qr-halo img { width: 100%; height: auto; border-radius: 6px; }

@keyframes haloBreath {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 65, 44, .24), 0 0 14px 0 rgba(232, 65, 44, .08);
  }
  50% {
    transform: scale(1.032);
    box-shadow: 0 0 0 12px rgba(232, 65, 44, 0), 0 0 22px 5px rgba(232, 65, 44, .14);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 65, 44, .24), 0 0 14px 0 rgba(232, 65, 44, .08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .qr-halo { animation: none; }
}

/* ---------------- 步骤 ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: st; }

.step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 20px; }

.step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  margin-bottom: 12px;
}

.step h4 { font-size: 15px; margin-bottom: 6px; }

.step p { font-size: 13.4px; color: var(--muted); }

/* ---------------- 手风琴 ---------------- */
.acc { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }

.acc details { border-bottom: 1px solid var(--line); }

.acc details:last-child { border-bottom: 0; }

.acc summary {
  padding: 15px 20px;
  font-size: 14.8px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc summary::-webkit-details-marker { display: none; }

.acc summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
  font-size: 17px;
  line-height: 1;
}

.acc details[open] summary::after { content: "–"; }

.acc details[open] summary { color: var(--brand); }

.acc .acc-body { padding: 0 20px 18px; font-size: 14px; color: var(--ink-2); }

.acc .acc-body p + p { margin-top: 8px; }

/* ---------------- 版本日志 ---------------- */
.log { border-left: 2px solid var(--line-2); padding-left: 24px; display: grid; gap: 26px; }

.log-item { position: relative; }

.log-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
}

.log-item h3 { font-size: 17px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.log-item .ver-date { font-size: 12.5px; color: var(--muted); font-weight: 400; }

.log-item ul { margin-top: 10px; display: grid; gap: 6px; }

.log-item ul li { font-size: 14px; color: var(--ink-2); display: flex; gap: 9px; }

.log-item ul li::before { content: "—"; color: var(--line-2); flex: none; }

.log-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-weight: 700; }

.log-tag.fix { background: var(--paper-2); color: var(--ink-2); }

/* ---------------- 侧栏文档布局 ---------------- */
.doc-grid { display: grid; grid-template-columns: 210px 1fr; gap: 42px; align-items: start; }

.toc { position: sticky; top: 84px; font-size: 13.5px; }

.toc b { display: block; font-size: 11.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }

.toc a { display: block; padding: 6px 0 6px 13px; border-left: 2px solid var(--line); color: var(--ink-2); transition: color .16s, border-color .16s; }

.toc a:hover, .toc a.on { color: var(--brand); border-color: var(--brand); }

.doc-body h2 { font-size: 22px; margin-top: 44px; scroll-margin-top: 84px; }

.doc-body h2:first-child { margin-top: 0; }

.doc-body h3 { font-size: 16.5px; margin-top: 26px; }

.doc-body p { margin-top: 12px; color: var(--ink-2); font-size: 14.6px; }

.doc-body .note {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  font-size: 13.8px;
  color: var(--ink-2);
}

.doc-fig { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }

.doc-fig figcaption { padding: 10px 15px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }

.page-head { padding: 40px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }

.page-head h1 { font-size: 31px; margin-top: 14px; }

.page-head p { color: var(--muted); margin-top: 10px; max-width: 760px; font-size: 14.5px; }

.crumb { font-size: 12.5px; color: var(--muted); }

.crumb a:hover { color: var(--brand); }

/* ---------------- 页脚 ---------------- */
.foot { border-top: 1px solid var(--line); background: var(--paper-2); padding: 44px 0 30px; margin-top: 10px; }

.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }

.foot h4 { font-size: 13.5px; margin-bottom: 12px; }

.foot a { display: block; font-size: 13.4px; color: var(--muted); padding: 3px 0; }

.foot a:hover { color: var(--brand); }

.foot .foot-about { font-size: 13.2px; color: var(--muted); max-width: 380px; }

.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.foot-brand img { width: 26px; height: 26px; border-radius: 7px; }

.foot-brand b { font-size: 15px; }

.foot-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* ---------------- 弹窗 / 遮罩 ---------------- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30, 27, 23, .5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.mask.show { opacity: 1; visibility: visible; pointer-events: auto; }

.modal {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(20, 18, 15, .5);
  transform: translateY(10px) scale(.985);
  transition: transform .24s cubic-bezier(.2, .8, .3, 1);
}

.mask.show .modal { transform: translateY(0) scale(1); }

.modal-head { padding: 26px 28px 4px; position: relative; }

.modal-head h3 { font-size: 20px; margin-top: 12px; }

.modal-head p { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

.modal-x {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  transition: background .18s, color .18s;
}

.modal-x:hover { background: var(--paper-2); color: var(--ink); }

.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }

.chip-quark { background: var(--quark-soft); color: var(--quark); }

.chip-baidu { background: var(--baidu-soft); color: var(--baidu); }

.modal-body { display: grid; grid-template-columns: 218px 1fr; gap: 24px; padding: 20px 28px 8px; align-items: start; }

.modal-qr { text-align: center; }

.modal-qr .qr-halo { width: 198px; }

.modal-qr .qr-tip { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.55; }

ul.modal-list { display: grid; gap: 10px; }

ul.modal-list li { display: flex; gap: 10px; font-size: 13.6px; color: var(--ink-2); align-items: flex-start; }

ul.modal-list li i { width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 3px; position: relative; }

ul.modal-list li i.ico-ok { background: #e5f4ec; }

ul.modal-list li i.ico-ok::after { content: ""; position: absolute; left: 5px; top: 4px; width: 5px; height: 8px; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(42deg); }

ul.modal-list li i.ico-warn { background: #fbf1e0; }

ul.modal-list li i.ico-warn::after { content: "!"; position: absolute; inset: 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--warn); font-style: normal; line-height: 16px; }

.modal-foot { padding: 14px 28px 24px; border-top: 1px solid var(--line); margin-top: 16px; }

.modal-foot p { font-size: 13px; font-weight: 700; color: var(--brand); }

.modal-foot p.dim { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 5px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translate(-50%, 14px);
  z-index: 120;
  padding: 11px 20px;
  border-radius: 9px;
  background: rgba(30, 27, 23, .93);
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts div:nth-child(3) { border-right: 0; }
  .facts div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero-grid, .split, .gallery, .dl-grid, .doc-grid { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 31px; }
  .doc { padding-top: 26px; }
  .toc { position: static; }
  .toc a { display: inline-block; margin-right: 12px; border-left: 0; padding-left: 0; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-qr .qr-halo { width: 176px; }
}

@media (max-width: 600px) {
  .nav { flex-wrap: wrap; flex-basis: 100%; width: auto; margin-left: 0; gap: 0; }
  .topbar-in { height: auto; padding: 10px 16px; flex-wrap: wrap; row-gap: 6px; }
  .head-cta { display: none; }
  .wrap, .doc { padding-left: 16px; padding-right: 16px; }
  .cards, .facts { grid-template-columns: 1fr 1fr; }
  .facts div { border-right: 1px solid var(--line) !important; }
  .facts div:nth-child(2n) { border-right: 0 !important; }
  .hero { padding: 32px 0 30px; }
  .hero h1 { font-size: 27px; }
  .sec { padding: 44px 0; }
  .sec-head h2 { font-size: 22px; }
  .page-head h1 { font-size: 24px; }
  .btn { padding: 11px 18px; font-size: 14.5px; }
  .hero-btns { gap: 10px; }
  .hero-btns .btn { flex: 1 1 46%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .dl-card { flex-direction: column; }
  .dl-qr { width: 100%; }
}
