/* ============================================================
   Pencil2D 中文站 (www.pencil2d.cn) 共享样式
   品牌色：主蓝 #005CC1 / 铅笔橙 #E68312
   风格：扁平 · 现代 · 专业（无渐变横幅、无阴影堆砌）
   ============================================================ */

:root {
  /* 品牌色（取自 Pencil2D 官方 logo） */
  --brand: #005CC1;
  --brand-dark: #004A9B;
  --brand-ghost: #E8F1FB;
  --accent: #E68312;
  --accent-dark: #C96E08;
  --accent-ghost: #FDF3E5;

  /* 中性色 */
  --ink: #1A2530;
  --ink-2: #3D4B5A;
  --ink-3: #66758A;
  --line: #E3E8EF;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FA;
  --bg-code: #F0F3F8;

  /* 功能色 */
  --ok: #1E8E5A;
  --ok-ghost: #E7F5EE;

  /* 尺寸 */
  --radius: 10px;
  --radius-lg: 14px;
  --maxw: 1160px;

  /* 字体 */
  --sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Consolas, "Courier New", monospace;
}

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

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.75;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.3em; }

/* ---------- 布局容器 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }

.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head .kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 30px; line-height: 1.35; color: var(--ink); margin-bottom: 12px; }
.section-head p { color: var(--ink-3); font-size: 16px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4);
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .brand-mark { width: 30px; height: 30px; flex: none; }
.brand .brand-tail { color: var(--ink-3); font-weight: 500; font-size: 15px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin-left: auto;
}
.nav-links a {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
}
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--brand); font-weight: 700; }

.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: 8px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--brand-dark); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  font-family: inherit;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 3px solid rgba(0, 92, 193, .35); outline-offset: 2px; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }

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

.btn--ghost { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-ghost); }

.btn--lg { padding: 15px 38px; font-size: 17px; }

.btn .ic { width: 18px; height: 18px; flex: none; }

/* ---------- 首页 Hero ---------- */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 48px;
  align-items: center;
  padding: 84px 0 76px;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.28;
  letter-spacing: -.01em;
  margin-bottom: 18px;
}
.hero h1 .hl { color: var(--brand); }
.hero .lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: 14px;
}
.hero .meta-line {
  color: var(--ink-3);
  font-size: 14px;
  margin-bottom: 30px;
}
.hero .meta-line b { color: var(--ink-2); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }

.hero-facts {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.hero-facts .fact b {
  display: block;
  font-size: 24px;
  color: var(--brand);
  font-weight: 700;
  line-height: 1.2;
}
.hero-facts .fact span { font-size: 13px; color: var(--ink-3); }

/* Hero 侧边的软件窗口示意（纯 CSS/内联 SVG，无外链图片） */
.hero-visual { position: relative; }
.mockwin {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mockwin-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.mockwin-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mockwin-bar .t { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
.mockwin-body { display: grid; grid-template-columns: 44px 1fr 132px; min-height: 320px; }
.mockwin-tools {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
}
.mockwin-tools i { width: 18px; height: 18px; border-radius: 4px; background: var(--bg-code); border: 1px solid var(--line); }
.mockwin-tools i.on { background: var(--brand-ghost); border-color: var(--brand); }
.mockwin-canvas { display: flex; align-items: center; justify-content: center; padding: 18px; }
.mockwin-side { border-left: 1px solid var(--line); padding: 12px; }
.mockwin-side .sw {
  height: 20px; border-radius: 5px; margin-bottom: 8px;
  border: 1px solid var(--line);
}
.mock-timeline {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 3px;
  padding: 10px 12px;
  background: var(--bg-soft);
  overflow: hidden;
}
.mock-timeline i {
  flex: 1; height: 18px; border-radius: 3px; background: #fff; border: 1px solid var(--line);
}
.mock-timeline i.on { background: var(--brand); border-color: var(--brand); }
.mock-timeline i.acc { background: var(--accent); border-color: var(--accent); }

/* ---------- 通用卡片网格 ---------- */
.grid { display: grid; gap: 24px; }
.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(--radius);
  padding: 28px 26px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.card p { color: var(--ink-3); font-size: 15px; }

/* 卡片图标（内联 SVG 用） */
.card .icon-box {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-ghost);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .icon-box svg { width: 22px; height: 22px; }
.card .icon-box--accent { background: var(--accent-ghost); }

/* ---------- 使用场景（首页） ---------- */
.scene-card { display: flex; gap: 18px; align-items: flex-start; }
.scene-card .num {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.scene-card h3 { font-size: 17px; margin-bottom: 6px; }
.scene-card p { font-size: 14.5px; color: var(--ink-3); }

/* ---------- 优势/特性列表 ---------- */
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat .ic {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--brand-ghost);
  display: flex; align-items: center; justify-content: center;
}
.feat .ic svg { width: 20px; height: 20px; }
.feat h3 { font-size: 16.5px; margin-bottom: 5px; }
.feat p { font-size: 14.5px; color: var(--ink-3); }

/* ---------- 版本/系统徽章 ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--brand-ghost);
  color: var(--brand);
}
.badge--ok { background: var(--ok-ghost); color: var(--ok); }
.badge--accent { background: var(--accent-ghost); color: var(--accent-dark); }
.badge--gray { background: var(--bg-code); color: var(--ink-3); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--bg-soft); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td .muted { color: var(--ink-3); font-size: 13px; }

/* ---------- 页面内 Hero（子页用） ---------- */
.page-hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
}
.page-hero h1 { font-size: 32px; margin-bottom: 10px; }
.page-hero p { color: var(--ink-2); max-width: 760px; }
.page-hero .crumbs { font-size: 13.5px; color: var(--ink-3); margin-bottom: 14px; }
.page-hero .crumbs a { color: var(--ink-3); }
.page-hero .crumbs a:hover { color: var(--brand); }

/* ---------- 下载卡片（下载中心） ---------- */
.dl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dl-card .os-row { display: flex; align-items: center; gap: 12px; }
.dl-card .os-row svg { width: 30px; height: 30px; }
.dl-card h3 { font-size: 19px; }
.dl-card .req { font-size: 13.5px; color: var(--ink-3); }
.dl-card .btn { width: 100%; }
.dl-card .alt { font-size: 13px; color: var(--ink-3); text-align: center; }
.dl-card .alt a { color: var(--brand); }
.dl-card--hl { border: 2px solid var(--brand); position: relative; }

/* ---------- 步骤条（教程页） ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  display: flex; gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.step .n {
  counter-increment: step;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand-ghost);
  color: var(--brand);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step .n::before { content: counter(step); }
.step h3 { font-size: 16px; margin-bottom: 4px; }
.step p { font-size: 14.5px; color: var(--ink-3); }
.step kbd {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---------- FAQ 手风琴 ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .tg {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--brand-ghost);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform .2s ease;
}
.faq-item[open] summary .tg { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- 提示条 ---------- */
.note {
  background: var(--brand-ghost);
  border: 1px solid #CBDDF3;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.note b { color: var(--brand-dark); }

/* ---------- 官方链接 ---------- */
.offlinks { display: flex; flex-wrap: wrap; gap: 12px; }
.offlinks a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.offlinks a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.offlinks svg { width: 16px; height: 16px; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #101823;
  color: #9DAABB;
  padding: 56px 0 0;
  margin-top: 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.site-footer h4 { color: #E8EDF3; font-size: 14px; margin-bottom: 14px; font-weight: 600; }
.site-footer a { color: #9DAABB; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.footer-brand .brand-mark { width: 26px; height: 26px; }
.footer-desc { max-width: 340px; line-height: 1.8; font-size: 13.5px; }
.footer-desc code { font-family: var(--mono); font-size: 12px; color: #C7D3E0; }
.footer-bottom {
  border-top: 1px solid #253244;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

/* ---------- 下载弹窗 ---------- */
.dl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 35, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}
.dl-overlay.is-open { opacity: 1; visibility: visible;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;}
button { outline: none } 
.dl-dialog {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(10px);
  transition: transform .18s ease;
}
.dl-overlay.is-open .dl-dialog { transform: translateY(0); }

.dl-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 26px 0;
}
.dl-dialog-head h3 { font-size: 19px; }
.dl-dialog-head p { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.dl-close {
  flex: none;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
}
.dl-close:hover { background: var(--bg-soft); }

.dl-dialog-body { padding: 20px 26px 26px; }

.dl-qrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dl-qr {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  background: var(--bg-soft);
}
.dl-qr .qr-box {
  width: 150px;
  height: 150px;
  margin: 0 auto 12px;
  background: #fff;
  border: 1.5px dashed #C4CFDC;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9AA7B6;
  font-size: 12px;
}
.dl-qr .qr-box svg { width: 34px; height: 34px; opacity: .5; }
.dl-qr .qr-t { font-size: 14px; font-weight: 600; color: var(--ink); }
.dl-qr .qr-s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.dl-dialog .note { margin-top: 16px; font-size: 13px; }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(16, 24, 35, .06);
}
.to-top.is-show { display: flex; }
.to-top svg { width: 18px; height: 18px; }

/* ---------- 锚点偏移（sticky 头） ---------- */
[id] { scroll-margin-top: 84px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 52px; }
  .hero h1 { font-size: 34px; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-links a { display: block; padding: 13px 0; }
  .nav-links .nav-cta { text-align: center; margin: 10px 0; }

  .section { padding: 52px 0; }
  .section-head h2 { font-size: 25px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .dl-qrs { grid-template-columns: 1fr; }
  .hero-facts { gap: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}
