/* ==========================================================================
   draw.io Desktop 中文站 (www.draw-io.net.cn) — 全站样式
   品牌色取自 drawio logo 橙 #F08705；扁平现代专业风、浅色主题、无 emoji 图标
   ========================================================================== */

:root {
  /* 品牌色 */
  --brand: #F08705;
  --brand-dark: #D97404;
  --brand-deep: #B45F03;
  --brand-light: #FDF3E3;
  --brand-lighter: #FEF9F0;

  /* 中性色 */
  --ink: #1A1C22;
  --ink-2: #454B56;
  --ink-3: #6B7280;
  --line: #E7E9EE;
  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --bg-soft-2: #F2F4F7;

  /* 功能色 */
  --ok: #0E9F6E;
  --warn: #C2800B;

  /* 圆角与阴影（扁平风：轻阴影、无渐变） */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 3px rgba(26, 28, 34, .06), 0 8px 24px rgba(26, 28, 34, .07);
  --shadow-lg: 0 4px 12px rgba(26, 28, 34, .08), 0 20px 48px rgba(26, 28, 34, .14);

  --maxw: 1160px;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { color: var(--brand-dark); }
ul, ol { padding-left: 1.3em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.brand .t2 { font-weight: 500; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.brand-box { display: flex; flex-direction: column; line-height: 1.25; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 15px;
}
.nav-links a:hover { background: var(--bg-soft-2); color: var(--ink); }
.nav-links a.active { color: var(--brand-deep); font-weight: 600; }

.nav-cta { flex-shrink: 0; }

/* 按钮（扁平） */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer;
  font-size: 15px; font-weight: 600; line-height: 1; padding: 12px 22px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }
.btn-lg { padding: 15px 30px; font-size: 16.5px; border-radius: 12px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle svg { display: block; }

/* ---------------- Hero ---------------- */
.hero { padding: 72px 0 64px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.hero h1 { font-size: 40px; line-height: 1.28; letter-spacing: -.5px; margin: 18px 0 14px; }
.hero h1 .hl { color: var(--brand); }
.hero .lead { font-size: 17.5px; color: var(--ink-2); max-width: 34em; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 30px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-light); color: var(--brand-deep);
  border: 1px solid #F3DFC0; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; padding: 6px 14px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-meta { margin-top: 18px; font-size: 13.5px; color: var(--ink-3); }
.hero-art { position: relative; }
.hero-art img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }

/* 浮动数据小卡（扁平） */
.float-card {
  position: absolute; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow); padding: 12px 18px;
  font-size: 13px; color: var(--ink-2);
}
.float-card b { display: block; font-size: 19px; color: var(--ink); line-height: 1.3; }
.fc-1 { left: -26px; top: 34px; }
.fc-2 { right: -18px; bottom: 42px; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: 30px; letter-spacing: -.3px; margin-bottom: 12px; }
.section-head p { color: var(--ink-3); font-size: 16px; }

.kicker {
  display: inline-block; color: var(--brand-deep); font-weight: 700;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px;
}

/* 卡片网格 */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: #EAD3AE; box-shadow: var(--shadow); }
.card h3 { font-size: 18px; margin: 14px 0 8px; }
.card p { color: var(--ink-3); font-size: 14.5px; }

.icon-chip {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-light); color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center;
}
.icon-chip svg { width: 23px; height: 23px; }

/* 使用场景 */
.scene-card { display: flex; gap: 16px; align-items: flex-start; }
.scene-card .icon-chip { flex-shrink: 0; }

/* 数据条 */
.stats-band { background: var(--ink); color: #fff; padding: 46px 0; }
.stats-band .grid-4 { gap: 16px; }
.stat { text-align: center; padding: 10px 8px; }
.stat b { display: block; font-size: 32px; color: var(--brand); font-weight: 700; line-height: 1.2; }
.stat span { font-size: 13.5px; color: rgba(255,255,255,.72); }

/* 功能表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 620px; }
table.data th, table.data td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
table.data th { background: var(--bg-soft-2); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.yes { color: var(--ok); font-weight: 600; }
table.data .rowtag { font-weight: 600; }

/* 步骤 */
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--ink); color: var(--brand); font-weight: 700; font-size: 15px;
}
.step h3 { font-size: 17px; margin: 16px 0 8px; }
.step p { color: var(--ink-3); font-size: 14.5px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
details.faq {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0; overflow: hidden;
}
details.faq summary {
  list-style: none; cursor: pointer; padding: 17px 22px;
  font-weight: 600; font-size: 15.5px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ""; width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .18s ease; margin-top: -4px;
}
details.faq[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.faq .faq-a { padding: 0 22px 18px; color: var(--ink-2); font-size: 14.5px; }
details.faq[open] { border-color: #EAD3AE; }

/* CTA 横幅 */
.cta-band { background: var(--brand-lighter); border-top: 1px solid #F3E7CF; padding: 60px 0; text-align: center; }
.cta-band h2 { font-size: 28px; margin-bottom: 10px; }
.cta-band p { color: var(--ink-2); margin-bottom: 26px; }

/* ---------------- 下载弹窗 ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 22, 27, .5);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 680px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 18px; }
.modal-close {
  background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--ink-3);
  display: flex;
}
.modal-close:hover { background: var(--bg-soft-2); color: var(--ink); }
.modal-body { padding: 24px; }
.modal-body .dl-tip { text-align: center; color: var(--ink-2); font-size: 14px; margin-bottom: 20px; }
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qr-item {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--bg-soft);
}
.qr-item img.qr { width: 180px; height: 180px; border-radius: 10px; background: #fff; padding: 8px; border: 1px solid var(--line); }
.qr-item .qr-name { font-weight: 700; font-size: 15px; color: var(--ink); text-align: center; }
.qr-item .qr-sub { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.modal-note { margin-top: 18px; font-size: 12.5px; color: var(--ink-3); text-align: center; line-height: 1.8; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding: 52px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 14.5px; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.footer-brand img { width: 30px; height: 30px; }
.footer-desc { color: rgba(255,255,255,.6); font-size: 13.5px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.55); }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--ink-3); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.breadcrumb li+li::before { content: "/"; margin-right: 6px; color: var(--line); }

/* 页头（内页） */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: 32px; letter-spacing: -.3px; }
.page-head .sub { color: var(--ink-3); margin-top: 10px; max-width: 46em; }

/* 平台卡片 */
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.platform-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.platform-card .os { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.platform-card .os svg { width: 30px; height: 30px; color: var(--ink-2); }
.platform-card .os b { font-size: 19px; }
.platform-card .req { color: var(--ink-3); font-size: 13px; margin-bottom: 14px; }
.dl-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.dl-item:first-of-type { border-top: 0; }
.dl-item .fmt { color: var(--ink-2); }
.dl-item .size { color: var(--ink-3); font-size: 13px; }

/* 版本时间线 */
.timeline { max-width: 800px; margin: 0 auto; }
.version-item { display: grid; grid-template-columns: 130px 1fr; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.version-item:last-child { border-bottom: 0; }
.version-item .vdate { color: var(--ink-3); font-size: 13.5px; padding-top: 3px; }
.version-item b { font-size: 15.5px; }
.version-item p { color: var(--ink-3); font-size: 14px; margin-top: 4px; }

/* 关于页 */
.about-lead { font-size: 17px; color: var(--ink-2); max-width: 50em; }
.prose { max-width: 800px; }
.prose h2 { font-size: 24px; margin: 40px 0 14px; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; }
.prose p { color: var(--ink-2); margin-bottom: 12px; }
.prose ul { color: var(--ink-2); }

/* 返回顶部 */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); cursor: pointer; box-shadow: var(--shadow);
  display: none; align-items: center; justify-content: center;
}
.to-top.show { display: flex; }
.to-top:hover { color: var(--brand-deep); border-color: var(--brand); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 33px; }
  .grid-3, .grid-4, .steps, .platform-grid { grid-template-columns: 1fr 1fr; }
  .stats-band .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .float-card { display: none; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .steps, .platform-grid, .qr-row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 28px; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 25px; }

  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px;
    display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn { padding: 10px 16px; font-size: 14px; }

  .version-item { grid-template-columns: 1fr; gap: 4px; }
  .stats-band .grid-4 { gap: 22px; }
}

/* 网格子项允许收缩：防止长命令/长词把轨道撑爆（min-width:auto 陷阱） */
.grid > *, .steps > *, .platform-grid > *, .qr-row > * { min-width: 0; }

/* 代码块：容器内换行，长命令不撑破卡片 */
pre { max-width: 100%; overflow-x: auto; }
pre code { display: block; white-space: pre-wrap; word-break: break-all; }

/* 无障碍：键盘焦点 */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .modal { animation: none; }
}
