/* ==========================================================================
   iKuuu 加速器 · 站点样式
   目标：首屏快、无外部字体、无阻塞脚本、移动优先
   ========================================================================== */

:root {
  --ink: #0b1220;
  --ink-2: #1a2333;
  --muted: #5b6779;
  --line: #e3e8ef;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --brand-3: #22d3ee;
  --accent: #f59e0b;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .06), 0 1px 3px rgba(11, 18, 32, .04);
  --shadow-md: 0 10px 30px -12px rgba(11, 18, 32, .18);
  --shadow-lg: 0 30px 70px -30px rgba(11, 18, 32, .45);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

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

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; letter-spacing: -.3px;
  color: var(--ink); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-3) 100%);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 16px -6px rgba(15, 118, 110, .8);
}
.brand small {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: .4px; line-height: 1;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-2); font-size: 15px; font-weight: 600;
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); background: #e6f6f4; }

.nav-cta {
  margin-left: 8px; padding: 9px 16px !important; border-radius: 9px !important;
  background: linear-gradient(135deg, var(--brand), #0d9488); color: #fff !important;
  box-shadow: 0 8px 20px -10px rgba(15, 118, 110, .9);
}
.nav-cta:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--brand), #0d9488) !important; }

.menu-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink);
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 420px at 15% -10%, rgba(34, 211, 238, .28), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(20, 184, 166, .22), transparent 55%),
    linear-gradient(160deg, #071a1c 0%, #0b2b31 45%, #0a1f27 100%);
  color: #eaf6f7;
  padding: 72px 0 64px;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -55% -10%; height: 65%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .16), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px; align-items: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #a7f3ea; background: rgba(34, 211, 238, .12);
  border: 1px solid rgba(34, 211, 238, .28); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 50px); line-height: 1.15; letter-spacing: -1px;
  margin: 0 0 18px; font-weight: 800; color: #fff;
}
.hero h1 em { font-style: normal; color: #5eead4; }
.hero-lead { font-size: 17.5px; color: #d3e7ea; margin: 0 0 26px; max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 11px; font-weight: 700; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #14b8a6, #0ea5a4); color: #04211f;
  box-shadow: 0 14px 30px -14px rgba(20, 184, 166, .95);
}
.btn-ghost { background: rgba(255, 255, 255, .06); color: #eaf6f7; border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }

.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: #9fc4c9; margin: 0; padding: 0; list-style: none; }
.hero-facts li { display: flex; align-items: center; gap: 7px; }
.hero-facts li::before { content: "✓"; color: #5eead4; font-weight: 800; }

.hero-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
.hero-card h2 { font-size: 15px; margin: 0 0 14px; color: #cfeeea; letter-spacing: .5px; font-weight: 700; }

/* 速度表 */
.gauge { position: relative; width: 190px; height: 190px; margin: 4px auto 14px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(255, 255, 255, .13); stroke-width: 12; }
.gauge-bar { fill: none; stroke: url(#gaugeGrad); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 440; stroke-dashoffset: 92; animation: gaugeIn 1.4s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes gaugeIn { from { stroke-dashoffset: 440; } to { stroke-dashoffset: 92; } }
.gauge-num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge-num strong { display: block; font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -1px; }
.gauge-num span { font-size: 12px; color: #93b8bd; letter-spacing: 1px; }
.card-list { list-style: none; margin: 0; padding: 0; font-size: 14px; color: #c6dee1; }
.card-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, .1); }
.card-list li:last-child { border-bottom: 0; }
.card-list b { color: #fff; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- sections */
.section { padding: 58px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; margin: 0 0 10px; letter-spacing: -.4px; }
.section-head p { margin: 0; color: var(--muted); }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #cfe6e3; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: #e6f6f4; color: var(--brand); font-size: 19px; margin-bottom: 14px;
}

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { position: relative; padding: 0 0 0 52px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px;
}
.steps h3 { margin: 4px 0 6px; font-size: 16.5px; }
.steps p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------------------------------------------------------------- article layout */
.page-head {
  background: linear-gradient(180deg, #f0faf9 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line); padding: 34px 0 30px;
}
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.25; margin: 0 0 12px; letter-spacing: -.6px; }
.page-head .lead { color: var(--muted); max-width: 62ch; margin: 0; font-size: 16.5px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row b { color: var(--ink-2); font-weight: 700; }

.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #c3ccd8; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 44px; padding: 40px 0 56px; align-items: start; }
.layout > * { min-width: 0; }

.prose { font-size: 16.5px; color: #202a3a; min-width: 0; overflow-wrap: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-size: 23px; line-height: 1.35; margin: 42px 0 14px; letter-spacing: -.3px;
  padding-left: 12px; border-left: 4px solid var(--brand-2); scroll-margin-top: 84px;
}
.prose h3 { font-size: 18px; margin: 28px 0 10px; scroll-margin-top: 84px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: 22px 0; padding: 14px 18px; border-left: 4px solid var(--brand-2);
  background: #f2fbfa; border-radius: 0 10px 10px 0; color: #17524d; font-size: 15.5px;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code {
  font-family: var(--mono); font-size: .9em; background: #eef2f7;
  padding: 2px 6px; border-radius: 5px; color: #0f4d59;
}
.prose pre {
  background: #0d1726; color: #d6e6f2; padding: 16px 18px; border-radius: 12px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.65; margin: 0 0 18px;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14.5px; }

/* 窄屏下宽表横向滚动，避免单元格被挤成一字一行 */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 0 20px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; max-width: 100%;
}
.table-wrap > table { margin: 0; min-width: 540px; border: 0; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* 移动端：表格改为卡片式堆叠，避免内部滚动破坏整体宽度 */
@media (max-width: 720px) {
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .table-wrap > table,
  .table-wrap > table.dl-table { min-width: 0; width: 100%; border-collapse: separate; border-spacing: 0; }
  .table-wrap > table thead { display: none; }
  .table-wrap > table tbody,
  .table-wrap > table tr,
  .table-wrap > table td { display: block; width: 100%; }
  .table-wrap > table tr {
    border: 1px solid var(--line); border-radius: 12px; background: #fff;
    margin: 0 0 10px; padding: 4px 0; overflow: hidden;
  }
  .table-wrap > table td {
    border: 0; border-bottom: 1px dashed #eef2f7; padding: 9px 14px;
    display: flex; gap: 12px; align-items: baseline; white-space: normal;
    font-size: 14.5px; line-height: 1.55;
  }
  .table-wrap > table td:last-child { border-bottom: 0; }
  .table-wrap > table td::before {
    content: attr(data-label); flex: 0 0 74px; color: var(--muted);
    font-size: 12.5px; letter-spacing: .3px;
  }
  .table-wrap > table.dl-table td { white-space: normal; }
}
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 700; }
.prose tbody tr:nth-child(even) { background: #fafcfe; }
.prose img { border-radius: 10px; margin: 18px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

.toc {
  position: sticky; top: 84px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; font-size: 14px; box-shadow: var(--shadow-sm);
}
.toc h2 { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0 0 16px; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 2px 0; }
.toc a { display: block; padding: 6px 10px 6px 26px; border-radius: 7px; color: var(--ink-2); position: relative; }
.toc a::before { content: counter(toc, decimal-leading-zero); position: absolute; left: 6px; color: #a9b4c4; font-size: 11px; top: 8px; font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--bg-soft); text-decoration: none; }
.toc a.active { background: #e6f6f4; color: var(--brand); font-weight: 700; }

/* ---------------------------------------------------------------- ads */
.ad {
  position: relative; border: 1px solid #dbe4ee; border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfdff, #f2f7fc); padding: 14px;
}
.ad::before {
  content: "广告"; position: absolute; top: -1px; right: -1px;
  font-size: 11px; line-height: 1; padding: 4px 7px; border-radius: 0 14px 0 8px;
  background: #e8eef6; color: #64748b; letter-spacing: .5px;
}
.ad-slot { margin: 26px 0; }
.ad-banner a { display: flex; align-items: center; gap: 16px; color: inherit; }
.ad-banner a:hover { text-decoration: none; }
.ad-banner img { width: 168px; height: 84px; object-fit: cover; border-radius: 9px; flex: 0 0 auto; }
.ad-banner .ad-copy { min-width: 0; }
.ad-banner .ad-copy b { display: block; font-size: 16px; color: var(--ink); }
.ad-banner .ad-copy span { display: block; font-size: 13.5px; color: var(--muted); }
.ad-banner .ad-go {
  margin-left: auto; flex: 0 0 auto; padding: 9px 16px; border-radius: 9px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
}
.ad-side { text-align: center; }
.ad-side img { border-radius: 10px; margin: 0 auto 12px; width: 100%; height: auto; }
.ad-side b { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 6px; }
.ad-side p { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.ad-side .ad-go {
  display: inline-block; padding: 10px 18px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #0ea5a4); color: #fff; font-weight: 700; font-size: 14px;
}
.ad-inline { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.ad-inline img { border-radius: 10px; width: 100%; height: 100px; object-fit: cover; }
.ad-inline b { display: block; color: var(--ink); font-size: 15.5px; }
.ad-inline p { margin: 4px 0 10px; font-size: 13.5px; color: var(--muted); }
.ad-inline .ad-go { display: inline-block; font-size: 13.5px; font-weight: 700; color: var(--brand); }
.ad-note { font-size: 12px; color: #8b97a8; margin-top: 8px; }

/* ---------------------------------------------------------------- popup */
.popup-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(7, 16, 26, .58);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.popup-overlay.is-open { opacity: 1; visibility: visible; }

.popup-content {
  position: relative; width: min(430px, 100%); max-height: min(88vh, 780px); overflow-y: auto;
  background: #fff; border-radius: 18px; padding: 18px 18px 20px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
  transform: translateY(14px) scale(.96); transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  animation: popIn .42s cubic-bezier(.22, 1, .36, 1) both;
}
.popup-overlay.is-open .popup-content { transform: translateY(0) scale(1); }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }

.popup-close {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, .94); color: #475569; font-size: 20px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.popup-close:hover { background: #eef2f7; color: #0f172a; }

.popup-ad-label {
  display: inline-block; font-size: 11px; letter-spacing: .5px; color: #64748b;
  background: #eef2f7; border-radius: 5px; padding: 2px 7px; margin-bottom: 10px;
}

.popup-stack { display: grid; gap: 12px; }
.popup-link { display: block; color: inherit; }
.popup-link:hover { text-decoration: none; }
.popup-title {
  margin: 0 0 10px; font-size: 18px; text-align: center; color: var(--ink); font-weight: 800; letter-spacing: -.2px;
}
.popup-image {
  display: block !important; width: 100%; height: auto; max-height: 46vh; object-fit: contain;
  border-radius: 12px; background: #0b1220;
}
.popup-shop-wrap { text-align: center; }
.popup-shop-btn {
  display: block; padding: 13px 18px; border-radius: 11px; font-weight: 800; font-size: 16px;
  color: #fff; background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 14px 26px -14px rgba(220, 38, 38, .95);
}
.popup-shop-btn:hover { text-decoration: none; filter: brightness(1.06); }
.popup-foot { margin: 10px 0 0; text-align: center; font-size: 12px; color: #94a3b8; }
.popup-foot a { color: #64748b; text-decoration: underline; }

/* ---------------------------------------------------------------- download table */
.dl-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #fff; }
.dl-table th, .dl-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.dl-table th { background: var(--bg-soft); font-size: 13px; letter-spacing: .4px; color: var(--muted); text-transform: uppercase; }
.dl-table tr:hover td { background: #fafcff; }
.dl-table td a, .dl-table td { white-space: nowrap; }

/* 页脚 / 面包屑 / 正文内链：加大点击热区，移动端 ≥ 32px */
.site-footer ul a, .crumbs a, .prose a:not(.btn) { display: inline-block; padding: 3px 0; }
@media (max-width: 720px) {
  .crumbs ol { gap: 2px; }
  .crumbs a { display: inline-block; padding: 8px 2px; }
  .prose a:not(.btn) { padding: 6px 0; }
  .table-wrap > table td a { display: inline-block; padding: 6px 0; }
  .table-wrap > table td { padding: 7px 14px; }
}
.site-footer li { margin: 2px 0; }
.site-footer ul a, .site-footer .footer-bottom a { padding: 7px 0; display: inline-block; }
.ad-inline .ad-go { padding: 10px 0; min-height: 34px; }
.popup-foot a, .popup-foot { line-height: 2; }
.popup-foot a { padding: 8px 4px; display: inline-block; }
.badge { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #e6f6f4; color: var(--brand); font-weight: 700; }
.badge-warn { background: #fff4e5; color: #b45309; }
.badge-gray { background: #eef2f7; color: #64748b; }

/* ---------------------------------------------------------------- faq */
details.faq {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 0; margin: 0 0 10px; box-shadow: var(--shadow-sm);
}
details.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: 16px; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; font-size: 20px; color: var(--brand); font-weight: 400; line-height: 1;
  transition: transform .2s ease;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .faq-body { padding: 0 18px 16px; color: var(--muted); font-size: 15px; }
details.faq .faq-body p { margin: 0 0 10px; }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- CTA band */
.cta-band {
  background: linear-gradient(135deg, #062a2e, #0b3b41 60%, #0a2f37);
  color: #e6f6f5; border-radius: 18px; padding: 32px 34px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px; justify-content: space-between;
  margin: 40px 0;
}
.cta-band h2 { margin: 0 0 6px; font-size: 22px; color: #fff; }
.cta-band p { margin: 0; color: #a7c9cd; font-size: 14.5px; max-width: 46ch; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: #08131f; color: #9fb0c2; padding: 48px 0 28px; margin-top: 20px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h3 { color: #e8eef5; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; }
.site-footer a { color: #a9bccd; }
.site-footer a:hover { color: #5eead4; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 10px; }
.footer-note { color: #7d90a3; font-size: 13px; line-height: 1.7; max-width: 34ch; }
.footer-bottom {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; font-size: 12.5px; color: #6e8298;
}

/* ---------------------------------------------------------------- back to top */
.to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--brand); font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #e6f6f4; }

.popup-foot kbd {
  font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid #dbe3ec; background: #f4f7fa; color: #475569;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .nav a { padding: 8px 9px; font-size: 14.5px; }
  .nav-cta { padding: 9px 12px !important; }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; gap: 30px; }
  .toc { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* 中屏起改用抽屉导航，避免 8 个导航项换行挤压 logo */
  .menu-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 64px; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 12px; font-size: 15.5px; }
  .nav-cta { margin: 6px 0 0; padding: 12px 16px !important; text-align: center; }

  /* 目录在窄屏折成两列，减少首屏前的内容占位 */
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
}

@media (max-width: 760px) {
  .hero { padding: 46px 0 42px; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .ad-banner a { flex-direction: column; text-align: center; }
  .ad-banner img { width: 100%; height: 120px; }
  .ad-banner .ad-go { margin: 4px auto 0; }
  .ad-inline { grid-template-columns: 1fr; }
  .ad-inline img { height: 130px; }
  .cta-band { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .prose { font-size: 16px; }
  .toc ol { grid-template-columns: 1fr; }
  .popup-content { padding: 14px 14px 16px; border-radius: 16px; }
  .popup-image { max-height: 38vh; }
  .popup-title { font-size: 16.5px; }
  .to-top { right: 14px; bottom: 16px; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 14px; }
  .brand { font-size: 17px; }
  .brand small { display: none; }
  .hero h1 { font-size: 27px; }
  .popup-content { padding: 12px 12px 14px; }
  .popup-image { max-height: 34vh; }
}
