/* ==========================================================================
   合羽PDF编辑器 · 官网样式
   单文件、无构建、无外部依赖（字体走系统栈，国内加载零等待）
   ========================================================================== */

/* --------------------------------------------------------------- tokens */
:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f1efe9;
  --ink: #14161a;
  --ink-2: #3b4046;
  --muted: #6b7280;
  --line: #e3e0d7;
  --line-strong: #d3cfc3;
  --accent: #1f6f5c;
  --accent-hover: #185a4a;
  --accent-soft: #e7f1ed;
  --accent-ink: #145043;
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .05);
  --shadow-md: 0 12px 28px -18px rgba(20, 22, 26, .28);
  --shadow-lg: 0 40px 80px -40px rgba(20, 22, 26, .35);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1120px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101214;
    --surface: #17191c;
    --surface-2: #1d2024;
    --ink: #f2f0ea;
    --ink-2: #d3d0c8;
    --muted: #9aa0a6;
    --line: #2a2e33;
    --line-strong: #3a3f45;
    --accent: #5cc4a4;
    --accent-hover: #74d3b6;
    --accent-soft: #16302a;
    --accent-ink: #9fe0c9;
    --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, .7);
  }
}

/* grid / flex 子项默认 min-width:auto，长文本或横向滚动的内部容器会把父级撑破。
   显式归零，让子项可以真正收缩。 */
.hero-copy,
.hero-visual,
.split-copy,
.split-visual,
.card,
.strip-item,
.download-main,
.download-side,
.footer-brand,
.footer-col,
.app-side,
.app-card,
.code-card { min-width: 0; }

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 8px; transition: top .2s;
}
.skip:focus { top: 16px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.container {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: 24px;
}
.container.narrow { max-width: 820px; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 66px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 26px; height: 26px;
  fill: none; stroke: var(--accent); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.brand-name { font-size: 15px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink-2);
  transition: background .18s, color .18s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.menu-btn {
  display: none; width: 40px; height: 40px;
  border-radius: 8px; border: 1px solid var(--line);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.menu-btn span { display: block; width: 16px; height: 1.6px; background: var(--ink); transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid transparent;
  transition: transform .16s var(--ease), background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; }

/* ----------------------------------------------------------------- hero */
.hero { padding: 72px 0 56px; overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.02fr .98fr;
  gap: 56px; align-items: center;
}

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em;
  color: var(--accent);
  text-transform: uppercase;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }

.hero h1 {
  font-size: clamp(34px, 3.9vw, 54px);
  line-height: 1.12;
  letter-spacing: -.035em;
  margin-bottom: 20px;
}
.lede {
  font-size: 16.5px; line-height: 1.75; color: var(--muted);
  max-width: 34em;
}
.lede strong { color: var(--ink); font-weight: 600; }
.lede-sm { font-size: 15.5px; line-height: 1.75; color: var(--muted); max-width: 34em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 24px; font-size: 12.5px; color: var(--muted);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); margin-right: 10px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ------------------------------------------------------------ app window */
.hero-visual { position: relative; }
.window {
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.window-bar {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.window-title { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.window-tag {
  margin-left: auto; font-size: 10.5px; font-weight: 600;
  color: var(--accent-ink); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 999px;
}

.window-body { display: grid; grid-template-columns: 124px 1fr; min-height: 330px; }
.app-side {
  padding: 14px 8px; border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
  display: flex; flex-direction: column; gap: 2px;
}
.side-item {
  font-size: 11.5px; color: var(--muted);
  padding: 7px 10px; border-radius: 7px;
}
.side-item.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.app-main { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.app-search {
  display: flex; align-items: center; justify-content: space-between;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 11.5px; color: var(--muted); background: var(--surface);
}
.app-search kbd {
  font: inherit; font-size: 10px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.app-card {
  display: flex; flex-direction: column; gap: 7px;
  padding: 11px 10px; border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.app-card svg {
  width: 16px; height: 16px; fill: none; stroke: var(--accent);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.app-card span { font-size: 10.5px; color: var(--ink-2); letter-spacing: -.01em; }

.app-progress {
  margin-top: auto; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
}
.app-progress-top { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-2); margin-bottom: 7px; }
.app-bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.app-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.app-note { margin-top: 7px; font-size: 10px; color: var(--muted); }

/* ---------------------------------------------------------------- strip */
.strip { border-block: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 55%, var(--paper)); }
.strip-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; padding-block: 22px;
}
.strip-item { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.strip-item svg {
  width: 18px; height: 18px; flex: none; margin-top: 1px;
  fill: none; stroke: var(--accent); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.strip-item strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }

/* -------------------------------------------------------------- section */
.section { padding: 96px 0; }
.section-alt { background: color-mix(in srgb, var(--surface) 60%, var(--paper)); border-block: 1px solid var(--line); }

.section-head { max-width: 700px; margin-bottom: 44px; }
.section-head h2, .split-copy h2 { font-size: clamp(27px, 3vw, 38px); letter-spacing: -.03em; }
.section-sub { margin-top: 14px; font-size: 15.5px; line-height: 1.75; color: var(--muted); max-width: 40em; }

/* ----------------------------------------------------------------- grid */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card h3 { font-size: 15.5px; margin-bottom: 9px; letter-spacing: -.015em; }
.card p { font-size: 13.5px; line-height: 1.7; color: var(--muted); }

.card-icon {
  width: 38px; height: 38px; margin-bottom: 16px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.card-icon svg {
  width: 19px; height: 19px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------------------------------------------------------------- tools */
.tool-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tool-head .card-icon { margin-bottom: 0; }
.count { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.tool-card h3 { margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-size: 12px; color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ----------------------------------------------------------------- split */
.split { display: grid; grid-template-columns: 1.02fr .98fr; gap: 64px; align-items: center; }
.split-rev .split-copy { order: 2; }
.split-rev .split-visual { order: 1; }
.split-copy .kicker { margin-bottom: 14px; }
.split-copy .lede-sm { margin-top: 14px; }

.checks { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); }
.checks svg {
  width: 17px; height: 17px; flex: none; margin-top: 4px;
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------------ flow */
.flow-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.flow-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.flow-badge { font-size: 11px; font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
.flow { display: flex; align-items: center; column-gap: 6px; row-gap: 12px; flex-wrap: wrap; }
.flow li {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px; padding: 7px 9px;
  font-size: 11.5px; color: var(--ink-2);
  background: var(--surface-2);
  white-space: nowrap;
}
.flow li svg {
  width: 14px; height: 14px; fill: none; stroke: var(--accent);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
/* 箭头放在节点之间的空隙里：绝对定位必须显式给 left/top，
   否则会按「静态位置」落进节点内部（上一版就是这个 bug）。 */
.flow li + li { position: relative; margin-left: 17px; }
.flow li + li::before {
  content: "→";
  position: absolute;
  left: -13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}
.flow-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.flow-run { color: var(--accent-ink); background: var(--accent-soft); border-radius: 7px; padding: 3px 10px; font-weight: 600; }

/* ---------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 13.5px; }
.compare th, .compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 12px; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.compare tbody th { font-weight: 600; color: var(--ink); width: 22%; }
.compare td { color: var(--muted); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .col-us { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); color: var(--accent-ink); font-weight: 500; }
.compare .ok {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px;
  fill: none; stroke: var(--accent); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------------ mcp */
.steps { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--ink-2); }
.step-no {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 700;
}
.fineprint { margin-top: 18px; font-size: 12.5px; color: var(--muted); }

.code-card {
  background: #14161a;
  border: 1px solid #24282d;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid #24282d;
  font-size: 11.5px; color: #8b9298; letter-spacing: .04em;
}
.code-dot { width: 7px; height: 7px; border-radius: 50%; background: #3f4a44; }
.code-card pre { margin: 0; padding: 18px 16px; overflow-x: auto; }
.code-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px; line-height: 1.8; color: #d6dbd3;
}
.code-card .k { color: #8fd3bb; }
.code-card .s { color: #e8c07d; }
.code-foot { padding: 10px 16px; border-top: 1px solid #24282d; font-size: 11.5px; color: #7d858b; }

/* ------------------------------------------------------------- download */
.section-download { padding-top: 24px; }
.download-card {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 40px;
  background: #14161a; color: #f3f1ea;
  border-radius: 22px; padding: 44px;
  box-shadow: var(--shadow-lg);
}
.download-card .kicker { color: #7fd0b5; }
.download-card h2 { font-size: clamp(26px, 2.8vw, 34px); letter-spacing: -.03em; }
.download-card .lede-sm { color: #b6b8b3; margin-top: 12px; }
.download-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 26px; }
.download-card .btn-primary { background: #5cc4a4; color: #0c1a16; }
.download-card .btn-primary:hover { background: #74d3b6; }
.download-card .btn-ghost { border-color: #3a3f39; color: #e7e5de; }
.download-card .btn-ghost:hover { background: rgba(255,255,255,.06); border-color: #5a6058; }
.download-note { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: 12px; color: #8f948d; }
.download-note span + span::before { content: "·"; margin-right: 16px; }

.download-side { border-left: 1px solid #2a2e28; padding-left: 36px; }
.download-side h3 { font-size: 12px; letter-spacing: .1em; color: #8f948d; font-weight: 600; margin-bottom: 10px; }
.download-side ul + h3 { margin-top: 22px; }
.download-side li { font-size: 12.5px; color: #c8cbc3; line-height: 1.7; padding-left: 13px; position: relative; }
.download-side li::before { content: ""; position: absolute; left: 0; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: #5cc4a4; }

/* ------------------------------------------------------------------ faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 4px; font-size: 15px; font-weight: 600;
  transition: color .18s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
/* 用两条居中的渐变线画 + / −，不用文字字形：字形基线天生偏下，旋转后更明显 */
.faq summary::after {
  content: ""; flex: none;
  width: 22px; height: 22px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background:
    linear-gradient(var(--muted), var(--muted)) center / 9px 1.5px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center / 1.5px 9px no-repeat;
  transition: border-color .18s, background .18s;
}
.faq details[open] summary::after {
  border-color: var(--accent);
  background:
    linear-gradient(var(--accent), var(--accent)) center / 9px 1.5px no-repeat;
}
.faq details p { padding: 0 40px 22px 4px; font-size: 14px; line-height: 1.8; color: var(--muted); }

/* --------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding-top: 56px; background: color-mix(in srgb, var(--surface) 45%, var(--paper)); }
.footer-inner { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 44px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-tagline { font-size: 13px; color: var(--muted); }
.footer-company { margin-top: 16px; font-size: 12px; color: var(--muted); }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h4 { font-size: 12px; letter-spacing: .08em; color: var(--ink); margin-bottom: 4px; font-weight: 600; }
.footer-col a { font-size: 13px; color: var(--muted); transition: color .16s; }
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 20px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.footer-bottom a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.footer-bottom a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  transform: translate(-50%, 12px);
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 999px;
  font-size: 13px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------- reveal */
/* 内容默认可见：滚动进场只做轻微位移，JS 失效时也不会出现整段空白 */
.js .reveal { opacity: 1; transform: none; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 620px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split-rev .split-copy, .split-rev .split-visual { order: initial; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
  .download-card { grid-template-columns: 1fr; gap: 28px; padding: 32px; }
  .download-side { border-left: 0; border-top: 1px solid #2a2e28; padding-left: 0; padding-top: 26px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed; inset: 66px 0 auto 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 20px 18px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 15px; }
  .menu-btn { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .header-inner { gap: 12px; }
}

@media (max-width: 620px) {
  .container { padding-inline: 20px; }
  .section { padding: 68px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 38px); }
  .lede { font-size: 15.5px; }
  .hero-meta { gap: 6px 12px; }
  .hero-meta li + li::before { display: none; }
  .window-body { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .side-item { white-space: nowrap; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .download-card { padding: 26px 22px; border-radius: 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .btn { height: 42px; }
  .faq summary { padding: 17px 2px; font-size: 14.5px; }
  .faq details p { padding-right: 20px; }
}

/* ------------------------------------------------ dark mode refinements */
/* 深色页面上，原本的 #14161a 卡片与背景几乎同色。抬高一级亮度并补边框，
   让下载卡片和代码块仍然是「一块独立的深色区域」。 */
@media (prefers-color-scheme: dark) {
  .download-card,
  .code-card {
    background: #1b1e21;
    border: 1px solid #2f353a;
  }
  .download-side { border-left-color: #2f353a; }
  .code-head, .code-foot { border-color: #2f353a; }
  .download-card .lede-sm { color: #b9bcb5; }
  .download-note, .download-side h3 { color: #969b93; }
}

/* --------------------------------------------------------------- legal */
/* 隐私政策 / 服务协议：长文阅读优先，行宽控制在 40em 以内，标题用分隔线切段。 */
.legal { padding: 48px 0 80px; }
.legal .container { max-width: 800px; }
.legal h1 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; margin-bottom: 8px; }
.legal h2 {
  font-size: 17px; margin: 38px 0 12px; padding-top: 20px;
  border-top: 1px solid var(--line); letter-spacing: -.01em;
}
.legal h3 { font-size: 14.5px; margin: 22px 0 8px; color: var(--ink); }
.legal p { margin: 10px 0; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal em { color: var(--muted); }
.legal blockquote {
  margin: 12px 0 26px; padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 8px 8px 0;
  color: var(--muted); font-size: 13px;
}
.legal blockquote p { margin: 0; font-size: 13px; color: var(--muted); }
.legal ul, .legal ol { margin: 10px 0; padding-left: 22px; list-style: revert; }
.legal li { margin: 6px 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 12.5px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.legal td { color: var(--ink-2); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px;
}
@media (max-width: 620px) {
  .legal { padding: 28px 0 56px; }
  .legal p, .legal li { font-size: 13.5px; }
  .legal table { display: block; overflow-x: auto; }
}
