/* ==========================================================================
   实测手记 · 官网模板样式
   零依赖手写 CSS。改主题只改 :root 的设计令牌即可，组件不用动。
   ========================================================================== */

:root {
  --accent: #3b6cff;
  --accent-strong: #2b52d8;
  --accent-soft: rgba(59, 108, 255, 0.1);

  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f2f5fb;
  --border: #e6eaf2;
  --border-strong: #d3dae8;

  --text: #12172a;
  --text-muted: #5a6478;
  --text-soft: #8a93a6;

  /* Hero 里的两团光晕：深色模式下单独调，避免亮色硬编码在暗底上发灰 */
  --glow-1: rgba(120, 190, 255, .14);
}

[data-theme="dark"] {
  --accent: #6b90ff;
  --accent-strong: #8aa6ff;
  --accent-soft: rgba(107, 144, 255, 0.16);

  --bg: #0d1119;
  --bg-soft: #121826;
  --surface: #151b28;
  --surface-2: #1b2233;
  --border: #263043;
  --border-strong: #33405a;

  --text: #e8ecf4;
  --text-muted: #a2adc2;
  --text-soft: #7c879c;

  --glow-1: rgba(107, 144, 255, .18);
}

/* 色彩方案与原生控件着色：暗色下浏览器滚动条 / 表单控件自动跟随主题，
   避免深色页面出现亮色白框（原模板缺失，属暗色模式可见 bug） */
:root { color-scheme: light; accent-color: var(--accent); }
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }

/* 键盘可达性：只在键盘聚焦时显示描边，鼠标点击不显示 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 100;
  transform: translate(-50%, -160%);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}
h1 { font-size: clamp(27px, 3.6vw, 40px); }
h2 { font-size: clamp(21px, 2.6vw, 30px); }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 40px 0; }
.section-sm { padding: 26px 0; }
.section-soft { background: var(--bg-soft); }
section[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
.section-head { max-width: 860px; margin: 0 auto 26px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.section-desc { margin-top: 12px; color: var(--text-muted); font-size: 1.0625rem; }

.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* ---------------------------------- 按钮 ---------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(59, 108, 255, .28);
}
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9375rem;
  cursor: pointer;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------- 头部 ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* 上一行是老浏览器的兜底，支持 color-mix 的才用半透明毛玻璃 */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}
.brand-text { font-size: 1.0625rem; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { color: var(--accent); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; }

.promo-strip {
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
}
.promo-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 40px;
  font-size: 0.875rem;
  text-align: center;
}
.promo-strip .label { color: var(--text); font-weight: 500; }
.promo-strip .btn { height: 28px; padding: 0 12px; font-size: 0.8125rem; }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  padding: 46px 0 36px;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 12% -8%, var(--accent-soft), transparent 62%),
    radial-gradient(700px 380px at 88% 4%, var(--glow-1), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 100%; }
.hero h1 { margin-bottom: 12px; }
.hero-sub { font-size: 1.05rem; color: var(--text-muted); max-width: 640px; }
.hero .btn-row { margin-top: 20px; }
.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.875rem;
}
.hero-bullets span::before { content: "✓"; margin-right: 6px; color: var(--accent); }

/* ---------------------------------- 统计 ---------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.stat-value {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}
.stat-label { margin-top: 6px; color: var(--text-muted); font-size: 0.875rem; }

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

.card {
  display: block;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--accent-soft);
  font-size: 1.2rem;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.9375rem; }
.card-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 0.875rem; font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* -------------------------------- 客户 logo -------------------------------- */
.logos {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.logo-item {
  padding: 16px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  transition: color .18s ease, border-color .18s ease;
}
.logo-item:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------- 定价 ---------------------------------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.plan {
  position: relative;
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.plan.is-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 26px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}
.plan-name { font-size: 1.125rem; font-weight: 700; }
.plan-desc { margin-top: 6px; color: var(--text-muted); font-size: 0.875rem; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 4px; }
.plan-price b { font-size: 2.375rem; font-weight: 800; letter-spacing: -0.02em; }
.plan-price span { color: var(--text-soft); font-size: 0.875rem; }
.plan-features { margin: 14px 0 18px; padding: 0; list-style: none; }
.plan-features li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

.compare-wrap { overflow-x: auto; }
table.compare {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
table.compare th, table.compare td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.compare thead th { background: var(--surface-2); font-weight: 700; }
table.compare tbody th { font-weight: 500; color: var(--text-muted); }
table.compare td { color: var(--text-muted); }

/* ---------------------------------- 案例 ---------------------------------- */
.case {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.case-meta { color: var(--text-soft); font-size: 0.8125rem; }
.case h3 { margin-top: 2px; }
.case p { color: var(--text-muted); font-size: 0.9375rem; }
.case-metrics { display: flex; flex-wrap: wrap; gap: 24px; padding-top: 6px; }
.metric-value { font-size: 1.375rem; font-weight: 800; color: var(--accent); }
.metric-label { color: var(--text-soft); font-size: 0.8125rem; }
.quote {
  margin-top: 4px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.875rem;
}
.quote-author { display: block; margin-top: 8px; color: var(--text-soft); font-size: 0.8125rem; }

/* ----------------------------------- FAQ ---------------------------------- */
.faq-list { max-width: 100%; margin: 0 auto; display: grid; gap: 12px; }
details.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
details.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; font-weight: 700; }
details.faq[open] summary::after { content: "−"; }
details.faq .faq-body { padding: 0 16px 12px; color: var(--text-muted); font-size: 0.9375rem; }

/* ---------------------------------- 动态 ---------------------------------- */
.post {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.post-meta { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-size: 0.8125rem; }
.post-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}
.post p { color: var(--text-muted); font-size: 0.9375rem; }

/* --------------------------------- CTA 条 --------------------------------- */
.cta-band {
  padding: 36px 0;
  background:
    radial-gradient(680px 260px at 18% -10%, var(--accent-soft), transparent 62%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  color: var(--text);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-band h2 { color: var(--text); }
.cta-band p { margin-top: 12px; color: var(--text-muted); font-size: 1.0625rem; }
.cta-band .btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px var(--accent-soft);
}
.cta-band .btn-primary:hover { background: var(--accent-strong); color: #fff; }
.cta-note { margin-top: 14px; color: var(--text-soft); font-size: 0.8125rem; }

/* ---------------------------------- 联系 ---------------------------------- */
.contact-grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.contact-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.contact-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 0.9375rem; }
.contact-row:last-child { border-bottom: 0; }
.contact-row span:first-child { color: var(--text-soft); }
.contact-row span:last-child { text-align: right; }
.contact-mail { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.copy-btn { white-space: nowrap; height: 26px; padding: 0 10px; font-size: 0.75rem; line-height: 1; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }

.contact-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 100%; align-items: start; }
.contact-wrap .contact-card { padding: 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .05); }
.contact-cta { display: flex; flex-direction: column; gap: 12px; }
.contact-hint { margin: 0; color: var(--text-soft); font-size: 0.875rem; }

.form { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.field textarea { min-height: 110px; resize: vertical; }
.form-note { margin-top: 12px; color: var(--text-soft); font-size: 0.8125rem; }

/* ---------------------------------- 页脚 ---------------------------------- */
.site-footer {
  margin-top: 0;
  padding: 32px 0 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  /* 页脚在首屏之外，跳过初始渲染，滚动到时才布局 */
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; max-width: 280px; }
.footer-col h4 { margin-bottom: 14px; font-size: 0.875rem; color: var(--text); }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a, .footer-col span { color: var(--text-muted); font-size: 0.875rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.8125rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

/* --------------------------------- 空状态 --------------------------------- */
.empty-state {
  max-width: 640px;
  margin: 0 auto;
  padding: 26px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.empty-state h3 { margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); font-size: 0.9375rem; }
.empty-state .btn-row { justify-content: center; margin-top: 24px; }

/* ---------------------------------- 其它 ---------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 99;
  transform: translate(-50%, 16px);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.page-404 { padding: 72px 0; text-align: center; }
.page-404 .code { font-size: 5.5rem; font-weight: 800; color: var(--accent); line-height: 1; }

.noscript {
  padding: 12px 24px;
  background: #fff7e6;
  color: #8a5a00;
  font-size: 0.875rem;
  text-align: center;
}

/* --------------------------------- 响应式 --------------------------------- */
@media (max-width: 980px) {
  .grid-4, .grid-3, .plans, .logos { grid-template-columns: repeat(2, 1fr); }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .plan.is-featured { transform: none; }
}

@media (max-width: 720px) {
  .section { padding: 32px 0; }
  .hero { padding: 34px 0 26px; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 24px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav-link { padding: 12px; }
  .nav-toggle { display: inline-flex; }
  .grid-4, .grid-3, .grid-2, .plans { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  /* 移动端不藏主 CTA：这是全站最主要的转化入口，藏了等于砍掉一半留资 */
  .header-actions .btn-primary { padding: 0 12px; font-size: 0.8125rem; }
  .btn-sm { height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------------- 自营广告位（ad-slots.js 渲染） ------------------------- */
/* 容器未取到广告时彻底不占位，避免出现空白框 */
.ad-slot:empty { display: none; }

.ad-card {
  display: block;
  position: relative;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

.ad-card:hover { border-color: var(--accent); transform: translateY(-1px); }

.ad-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}

.ad-eyebrow {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.ad-image {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin: 8px 0 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.ad-image[data-loaded="1"] { opacity: 1; }

.ad-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 6px; font-size: 1.05rem; font-weight: 700; line-height: 1.4; }
.ad-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 6px; font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.ad-cta { display: block; margin-top: 10px; font-size: 0.86rem; color: var(--accent); }

[data-ad-slot="footer"] { margin-top: 24px; }
[data-ad-slot="inline"] { margin: 4px 0 24px; }

@media (max-width: 640px) {
  .ad-card { padding: 14px; }
}


/* 返回顶部按钮（跨站统一） */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 1000;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-strong, var(--accent)); }
.back-to-top:focus-visible { outline: 2px solid var(--accent-strong, var(--accent)); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

/* ==========================================================================
   运行时拓展：页内目录 / 案例标签筛选 / 阅读进度条
   均为 app.js 运行期注入的 UI 增强，不影响静态内容与 SEO。
   ========================================================================== */

/* 锚点跳转时避开吸顶头部遮挡 */
section[id] { scroll-margin-top: 84px; }

/* 阅读进度条 */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 1000;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* 页内目录 */
.toc {
  margin: 0 auto 28px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.toc-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.toc a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface-2);
  transition: background 0.2s ease, color 0.2s ease;
}
.toc a:hover { color: var(--accent); }
.toc a.is-active {
  color: #fff;
  background: var(--accent);
}

/* 案例标签筛选 chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.filter-chips .chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-chips .chip:hover { color: var(--accent); border-color: var(--accent); }
.filter-chips .chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-chips .chip:focus-visible {
  outline: 2px solid var(--accent-strong, var(--accent));
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress { transition: none; }
}
