@charset "utf-8";
/* ==========================================================================
   Notesnook 中文站 · 全站样式
   品牌色取自官方 logo（纯黑 #000000）与官网 primary（#008837）
   浅色主题 / 扁平 / 现代 / 专业
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 品牌 */
  --ink: #0a0a0a;
  --ink-soft: #1c1c1c;
  --brand: #008837;
  --brand-deep: #006b2b;
  --brand-tint: #eaf5ee;
  --brand-tint-2: #f3faf6;

  /* 中性 */
  --body: #4a4f4b;
  /* 对比度已按 WCAG AA 校验：白底 5.12、浅灰底 4.51 */
  --muted: #6a6f6b;
  --line: #e4e7e4;
  --line-strong: #d2d6d2;
  --surface: #ffffff;
  --surface-2: #f6f7f6;
  --surface-3: #eff1ef;
  --white: #ffffff;

  /* 排版 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono",
    monospace;

  /* 尺寸 */
  --wrap: 1160px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow: 0 4px 16px rgba(10, 10, 10, 0.06);
  --shadow-lg: 0 20px 48px rgba(10, 10, 10, 0.12);
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.24;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

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

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--ink);
}

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

svg {
  display: block;
  flex-shrink: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

::selection {
  background: var(--brand);
  color: #fff;
}

/* hidden 属性需强制生效，避免被 display 规则覆盖 */
[hidden] {
  display: none !important;
}

/* 仅供读屏 */
.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;
}

/* ---------- 3. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
}

.section {
  padding: 88px 0;
}

.section-tight {
  padding: 64px 0;
}

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

.section-dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  border: 0;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-head {
  max-width: 720px;
  margin-bottom: 52px;
}

.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--brand-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--brand);
}

.section-dark .eyebrow {
  color: #6fdca4;
}

.section-desc {
  margin-top: 16px;
  color: var(--body);
  font-size: 1.0625rem;
  line-height: 1.78;
}

.section-dark .section-desc {
  color: rgba(255, 255, 255, 0.66);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--body);
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 136, 55, 0.24);
}

.btn-primary:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 136, 55, 0.22);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface-2);
  color: var(--ink);
}

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

.btn-dark:hover {
  background: #262626;
  border-color: #262626;
  color: #fff;
}

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

.btn-light:hover {
  background: var(--brand-tint);
  border-color: var(--brand-tint);
  color: var(--brand-deep);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 700;
}

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

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

.brand-name {
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.brand-suffix {
  padding-left: 11px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav > a {
  position: relative;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

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

.site-nav > a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.site-nav > a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px 2px 0 0;
}

/* 导航内按钮：需覆盖 .site-nav > a 的默认文字色 */
.site-nav .btn {
  margin-left: 12px;
  color: #fff;
}

.site-nav .btn:hover {
  background: var(--brand-deep);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 10px;
  color: #fff;
}

/* ---------- 6. 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 76px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcfb 0%, #ffffff 62%);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -180px;
  width: 620px;
  height: 620px;
  background: radial-gradient(
    circle,
    rgba(0, 136, 55, 0.07) 0%,
    rgba(0, 136, 55, 0) 68%
  );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 60px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--body);
  font-size: 0.8125rem;
  font-weight: 500;
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.hero h1 {
  margin: 22px 0 0;
}

/* H1 第二行作为副句，弱化一档保持节奏 */
.h1-sub {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-sub {
  max-width: 520px;
  margin-top: 22px;
  font-size: 1.0625rem;
  line-height: 1.82;
  color: var(--body);
}

.hero .btn-row {
  margin-top: 32px;
}

.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* 信任指标 */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 30px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hero-stats dt,
.hero-stats .k {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-stats .v {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* Hero 截图 */
.hero-visual {
  position: relative;
  margin: 0;
}

.shot-frame {
  position: relative;
  padding: 10px;
  background: linear-gradient(155deg, #262626 0%, #0a0a0a 60%);
  border-radius: 14px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(10, 10, 10, 0.06);
}

.shot-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.shot-frame img {
  border-radius: 7px;
  width: 100%;
}

.hero-visual figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* 平台横条 */
.platform-bar {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.platform-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 34px;
}

.platform-bar .label {
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.platform-bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
}

.platform-bar li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.platform-bar svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

/* ---------- 7. 卡片与网格 ---------- */
.grid {
  display: grid;
  gap: 22px;
}

/* grid 子项默认 min-width:auto，会被 pre/table 等长内容撑破，需显式归零 */
.grid > *,
.feature-row > *,
.hero-grid > * {
  min-width: 0;
}

.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 {
  position: relative;
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
}

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

.card h3 {
  margin-bottom: 9px;
}

.card p {
  font-size: 0.9375rem;
  line-height: 1.76;
  color: var(--body);
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  background: var(--brand-tint);
  border-radius: 10px;
  color: var(--brand-deep);
}

.icon-box svg {
  width: 21px;
  height: 21px;
}

.card-scene {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
}

.card-scene .tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 3px 10px;
  background: var(--surface-3);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-scene h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.card-scene .who {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* 核心优势（列表式，两列） */
.adv-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 56px;
}

.adv-item {
  display: flex;
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.adv-item .icon-box {
  margin-bottom: 0;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
}

.adv-item .icon-box svg {
  width: 19px;
  height: 19px;
}

.adv-item h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.adv-item p {
  font-size: 0.9375rem;
  line-height: 1.74;
}

/* ---------- 8. 加密流程 ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.flow-step {
  padding: 26px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.flow-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-bottom: 16px;
  background: var(--brand);
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.flow-step h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.flow-step p {
  font-size: 0.9rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.62);
}

.flow-code {
  margin-top: 28px;
  padding: 18px 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.5);
  overflow-x: auto;
}

.flow-code .hl {
  color: #6fdca4;
}

/* ---------- 9. 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

caption {
  padding: 0 0 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: left;
}

th,
td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

thead th {
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

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

tbody tr:hover {
  background: var(--brand-tint-2);
}

td .mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--body);
}

.tick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-deep);
  font-weight: 500;
}

.tick svg {
  width: 15px;
  height: 15px;
}

.dash {
  color: var(--muted);
}

/* ---------- 10. 功能区块 ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.feature-row:last-of-type {
  border-bottom: 0;
}

.feature-row.reverse .feature-copy {
  order: 2;
}

.feature-copy h2 {
  margin-bottom: 16px;
}

.feature-copy p {
  font-size: 1rem;
  line-height: 1.8;
}

.feature-points {
  margin-top: 22px;
  display: grid;
  gap: 11px;
}

.feature-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--body);
}

.feature-points svg {
  width: 17px;
  height: 17px;
  margin-top: 5px;
  color: var(--brand);
}

.feature-media {
  margin: 0;
}

.feature-media .shot-frame {
  padding: 8px;
}

.feature-media figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  padding: 5px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--body);
  font-size: 0.8125rem;
}

/* ---------- 11. 下载页 ---------- */
.page-head {
  padding: 56px 0 44px;
  background: linear-gradient(180deg, #fbfcfb 0%, #ffffff 90%);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  margin-bottom: 16px;
}

.page-head .lead {
  max-width: 700px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.breadcrumb a {
  color: var(--muted);
}

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

.breadcrumb .sep {
  color: var(--line-strong);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink);
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dl-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.dl-head .icon-box {
  margin: 0;
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: #fff;
}

.dl-head h2 {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.dl-head .sub {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.dl-card .formats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.dl-card .formats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dl-card .formats span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.dl-card .btn {
  margin-top: auto;
}

/* 卡片底部附加链接（如 GitHub Releases） */
.dl-extra {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
}

.note-box {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: var(--brand-tint-2);
  border: 1px solid #d6ebdf;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.72;
}

.note-box svg {
  width: 19px;
  height: 19px;
  margin-top: 4px;
  color: var(--brand-deep);
}

.note-box strong {
  color: var(--ink);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 0;
  max-width: 760px;
}

.steps li {
  position: relative;
  padding: 0 0 30px 52px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.steps li::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 40px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps li:last-child::after {
  display: none;
}

.steps h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.steps p {
  font-size: 0.9375rem;
  line-height: 1.74;
}

code {
  padding: 2px 6px;
  background: var(--surface-3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--ink-soft);
}

pre {
  margin: 0;
  padding: 16px 18px;
  background: var(--ink);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  max-width: 100%;
}

pre code {
  padding: 0;
  background: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8125rem;
  line-height: 1.8;
  white-space: pre;
}

/* ---------- 12. FAQ ---------- */
.faq {
  max-width: 860px;
  border-top: 1px solid var(--line);
}

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq details[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.faq .answer {
  padding: 0 4px 24px;
  font-size: 0.9375rem;
  line-height: 1.82;
  color: var(--body);
}

.faq .answer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 13. CTA ---------- */
.cta-block {
  padding: 64px 56px;
  background: var(--ink);
  border-radius: var(--radius-lg);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.cta-block h2 {
  color: #fff;
  max-width: 660px;
  margin: 0 auto;
}

.cta-block p {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 1rem;
  line-height: 1.8;
}

.cta-block .btn-row {
  justify-content: center;
  margin-top: 30px;
}

.cta-block .fine {
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.8125rem;
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  padding: 60px 0 32px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 320px;
  font-size: 0.875rem;
  line-height: 1.78;
}

.footer-col h4 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.footer-col ul {
  display: grid;
  gap: 9px;
}

.footer-col a {
  color: var(--body);
  font-size: 0.875rem;
}

.footer-col a:hover {
  color: var(--brand-deep);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px 28px;
  padding-top: 26px;
  font-size: 0.8125rem;
  line-height: 1.7;
}

.footer-bottom .disclaimer {
  max-width: 700px;
  color: var(--muted);
}

.footer-bottom > p {
  color: var(--muted);
}

/* ---------- 15. 下载弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal.is-open {
  display: flex;
  animation: fade-in 0.18s ease;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 32px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  animation: pop-in 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.modal-close:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-dialog h2 {
  padding-right: 40px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.modal-dialog .modal-sub {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}

.modal-target {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 11px;
  background: var(--brand-tint);
  border-radius: 5px;
  color: var(--brand-deep);
  font-size: 0.8125rem;
  font-weight: 500;
}

.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

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

.qr-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* 占位状态仍用虚线区分 */
.qr-box:has(.placeholder) {
  border-style: dashed;
  border-color: var(--line-strong);
}

/* 二维码图片：撑满占位盒，直角显示以保证识别率 */
.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}

/* 保留占位样式（备用，正常情况已由图片替代） */
.qr-box .placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  background: var(--surface-2);
  border-radius: 6px;
  color: #a9aeaa;
}

.qr-box svg {
  width: 58px;
  height: 58px;
  stroke-width: 1.4;
  opacity: 0.5;
}

.qr-box .ph-text {
  color: #8c918d;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.qr-slot .qr-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
}

.qr-slot .qr-label svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

.modal-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.modal-foot a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.modal-open {
  overflow: hidden;
}

/* ---------- 16. 安全页专用 ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-item {
  padding: 26px 26px 28px;
  background: #fff;
}

.spec-item dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec-item dd {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.spec-item dd span {
  display: block;
  margin-top: 6px;
  color: var(--body);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.7;
}

.prose h2 {
  margin-top: 52px;
  margin-bottom: 16px;
}

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

.prose h3 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 1.0625rem;
}

.prose p {
  margin-bottom: 16px;
  line-height: 1.85;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul.bullets {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.prose ul.bullets li {
  position: relative;
  padding-left: 20px;
  line-height: 1.8;
}

.prose ul.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.source-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.source-list li {
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.7;
}

.source-list a {
  font-weight: 600;
}

.source-list .desc {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

.callout {
  display: flex;
  gap: 14px;
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--brand-tint-2);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9375rem;
  line-height: 1.78;
}

.callout svg {
  width: 19px;
  height: 19px;
  margin-top: 4px;
  color: var(--brand-deep);
}

.callout strong {
  color: var(--ink);
}

/* 警示型提示 */
.callout-warn {
  background: #fdf6f2;
  border-left-color: #c2410c;
}

.callout-warn svg {
  color: #c2410c;
}

/* 可点击卡片（教程目录） */
.card-link {
  display: block;
  color: inherit;
}

.card-link:hover {
  color: inherit;
}

.card-link h3 {
  transition: color 0.18s ease;
}

.card-link:hover h3 {
  color: var(--brand-deep);
}

.card-link::after {
  content: "→";
  position: absolute;
  right: 24px;
  bottom: 22px;
  color: var(--line-strong);
  font-size: 1rem;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease;
}

.card-link:hover::after {
  color: var(--brand);
  transform: translateX(3px);
}

/* 教程小节标题 */
.step-h {
  margin-top: 44px;
  margin-bottom: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem;
}

.step-h:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* 表格下方注释 */
.table-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.7;
}

/* 教程页锚点定位偏移（避开吸顶导航） */
[id] {
  scroll-margin-top: 88px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-line svg {
  width: 14px;
  height: 14px;
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1080px) {
  /* 导航项增至 5 个，提前收窄间距避免拥挤 */
  .site-nav > a {
    padding: 8px 9px;
    font-size: 0.875rem;
  }

  .site-nav .btn {
    margin-left: 8px;
    padding: 9px 15px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .hero-sub {
    max-width: none;
  }

  .hero-visual {
    max-width: 720px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row {
    gap: 40px;
    padding: 52px 0;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(10, 10, 10, 0.08);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > a {
    padding: 12px 10px;
    border-radius: 6px;
  }

  .site-nav > a[aria-current="page"]::after {
    display: none;
  }

  .site-nav .btn {
    margin: 10px 0 0;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 38px;
  }

  .adv-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .feature-row.reverse .feature-copy {
    order: 0;
  }

  .dl-grid,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .cta-block {
    padding: 44px 26px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15.5px;
  }

  .container {
    padding: 0 18px;
  }

  .hero {
    padding: 52px 0 56px;
  }

  .hero-stats {
    gap: 20px 28px;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .brand-suffix {
    display: none;
  }

  .qr-grid {
    gap: 12px;
  }

  .modal-dialog {
    padding: 26px 20px;
  }

  /* 标签换行时让对勾对齐首行，而不是居中漂浮 */
  .qr-slot .qr-label {
    align-items: flex-start;
    justify-content: center;
    padding: 0 2px;
    font-size: 0.75rem;
    line-height: 1.55;
    text-align: left;
  }

  .qr-slot .qr-label svg {
    margin-top: 2px;
  }

  .qr-box .ph-text {
    font-size: 0.6875rem;
  }

  /* 指标行改为等宽三列，避免末项单独换行 */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
  }

  .hero-stats dt {
    font-size: 1rem;
  }

  .hero-stats .v {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .table-wrap {
    border-radius: var(--radius-sm);
  }

  th,
  td {
    padding: 12px 14px;
    font-size: 0.875rem;
  }

  .btn-row .btn {
    flex: 1 1 auto;
  }

  .cta-block .btn-row .btn {
    flex: 1 1 100%;
  }
}

/* ---------- 18. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 19. 打印 ---------- */
@media print {
  .site-header,
  .site-nav,
  .modal,
  .cta-block,
  .site-footer {
    display: none !important;
  }

  body {
    color: #000;
    font-size: 11pt;
  }

  .section {
    padding: 20px 0;
  }
}
