/* ==========================================================
   QuickQ 官网样式表  (assets/css/style.css)
   适配：移动端优先，桌面端 1160px 容器
   ========================================================== */

:root {
  --brand: #1560ff;
  --brand-2: #35c2ff;
  --brand-dark: #0b2a6b;
  --ink: #101828;
  --ink-2: #344054;
  --ink-3: #667085;
  --line: #e6eaf2;
  --bg: #f5f7fc;
  --white: #fff;
  --ok: #12b76a;
  --warn: #f79009;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.14);
  --container: 1160px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans SC', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #0b46c9; }
ul, ol { padding-left: 1.25em; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; color: var(--ink); font-weight: 700; }
h1 { font-size: 30px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
code { background: #eef2f9; padding: 2px 6px; border-radius: 6px; font-size: 14px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 18px; }
.section { padding: 56px 0; }
.section--tight { padding: 34px 0; }
.section-title { text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--ink-3); margin: 0 auto 34px; max-width: 720px; }

/* ---------------- 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; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: .2px; }
.logo:hover { color: var(--brand); }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
  display: block; object-fit: contain;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--ink-2); font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover, .site-nav a.active { color: var(--brand); background: #eef3ff; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 18px; line-height: 1; cursor: pointer;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), #2f8bff); color: #fff; box-shadow: 0 8px 20px rgba(21, 96, 255, .28); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 26px rgba(21, 96, 255, .34); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.header-inner .btn { margin-left: 6px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 560px at 78% -10%, #2f7bff 0%, transparent 60%),
              linear-gradient(150deg, #0a1c46 0%, #10307c 48%, #0e5bd8 100%);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 78%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.08fr .92fr; gap: 44px; align-items: center; padding: 62px 0 70px; }
.hero h1 { color: #fff; font-size: 38px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: #8fd0ff; }
.hero-lead { color: rgba(255,255,255,.86); font-size: 17px; margin-bottom: 22px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.hero-badges li {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; color: #e9f2ff;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-cta .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: 0 10px 26px rgba(0,0,0,.24); }
.hero-cta .btn-primary:hover { color: var(--brand); }
.hero-cta .btn-ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.34); color: #fff; }
.hero-cta .btn-ghost:hover { color: #fff; background: rgba(255,255,255,.18); }
.hero-note { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.7); }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 18px; box-shadow: var(--shadow-lg); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.hero-stats div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 12px 14px; }
.hero-stats b { display: block; font-size: 22px; color: #fff; }
.hero-stats span { font-size: 13px; color: rgba(255,255,255,.72); }

/* ---------------- 卡片 / 栅格 ---------------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: 0 2px 10px rgba(16, 24, 40, .04); transition: .22s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d5e0f7; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-3); font-size: 15px; margin-bottom: 0; }
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: #eef3ff; color: var(--brand); font-size: 20px; margin-bottom: 12px;
}
.card-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; }

/* ---------------- 下载区块 ---------------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.dl-card { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.dl-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.dl-icon { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 14px; background: linear-gradient(135deg, #eef3ff, #dbe8ff); display: grid; place-items: center; font-size: 24px; }
.dl-card h3 { margin: 0 0 4px; font-size: 17px; }
.dl-card p { margin: 0 0 10px; font-size: 14px; color: var(--ink-3); }
.dl-meta { font-size: 13px; color: var(--ink-3); }

/* ---------------- 步骤 ---------------- */
.steps { counter-reset: s; display: grid; gap: 16px; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 74px; }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 22px; top: 22px; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #f2f6ff; color: var(--ink); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
.td-ok { color: var(--ok); font-weight: 600; }

/* ---------------- FAQ ---------------- */
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 16px 18px; font-size: 16px; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; gap: 12px; align-items: center; font-family: inherit;
}
.faq-q::after { content: '+'; color: var(--brand); font-size: 20px; font-weight: 700; }
.faq-item.is-open .faq-q::after { content: '−'; }
.faq-a { display: none; padding: 0 18px 16px; color: var(--ink-2); font-size: 15px; }
.faq-item.is-open .faq-a { display: block; }

/* ---------------- 文章区 ---------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }
.article-body {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 34px 38px; box-shadow: 0 2px 10px rgba(16,24,40,.04);
}
.article-body h2 { margin-top: 34px; padding-left: 14px; border-left: 4px solid var(--brand); }
.article-body h3 { margin-top: 24px; color: #14325f; }
.article-body p { color: #2b3648; }
.article-body ul, .article-body ol { color: #2b3648; }
.article-body li { margin-bottom: 8px; }
.article-lead { font-size: 17px; color: var(--ink-2); background: #f6f9ff; border: 1px dashed #cfe0ff; border-radius: var(--radius-sm); padding: 16px 18px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-3); margin: 12px 0 20px; }
.article-meta .tag { background: #eef3ff; color: var(--brand); border-radius: 999px; padding: 3px 12px; font-weight: 600; }
.figure { margin: 22px 0; }
.figure img { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.figure figcaption { font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 8px; }
.svg-figure { background: #fbfcff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.toc h3 { font-size: 16px; margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 14px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--brand); }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.side-card h3 { font-size: 16px; margin: 0 0 10px; }
.side-card ul { margin: 0; padding-left: 1.1em; font-size: 14px; }
.side-card li { margin-bottom: 8px; }
.side-card li a { color: var(--ink-2); }
.side-card li a:hover { color: var(--brand); }
.side-card .btn { width: 100%; margin-top: 6px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .22s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d5e0f7; }
.post-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: #e9eefb; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 16px; margin: 0 0 8px; line-height: 1.5; }
.post-card p { font-size: 14px; color: var(--ink-3); margin: 0 0 12px; }
.post-card .foot { margin-top: auto; font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 34px 0 0; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--ink-2);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.list-search { margin: 0 0 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.list-search input {
  flex: 1; min-width: 220px; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 15px; font-family: inherit; outline: none;
}
.list-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(21,96,255,.12); }

/* ---------------- CTA ---------------- */
.cta-band { background: linear-gradient(135deg, #0b2a6b, #1560ff); color: #fff; border-radius: var(--radius); padding: 38px 30px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 640px; margin: 0 auto 20px; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); }

/* ---------------- Footer ---------------- */
.site-footer { background: #0b1220; color: #a9b4c7; margin-top: 40px; padding: 46px 0 26px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; }
.site-footer h4 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.site-footer a { color: #a9b4c7; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 18px; font-size: 13px; color: #7f8ba3; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------------- 其他 ---------------- */
.anchor-kw { border-bottom: 1px dashed #9fc0ff; }
.notice { background: #fff8ec; border: 1px solid #ffe0b2; color: #8a5300; border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; }
.back-top {
  position: fixed; right: 22px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center;
  font-size: 18px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: .25s; z-index: 70;
}
.back-top.is-show { opacity: 1; visibility: visible; }
.read-progress { position: fixed; top: 64px; left: 0; right: 0; height: 3px; background: transparent; z-index: 65; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding: 42px 0 52px; }
  .hero h1 { font-size: 29px; }
  .layout { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 14px 16px; display: none; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; }
  .header-inner .btn { display: none; }
  .header-inner { position: relative; }
  .grid-2, .grid-3, .grid-4, .post-grid, .dl-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  .article-body { padding: 20px 18px 26px; }
  .step { padding: 20px 18px 20px 62px; }
  .step::before { left: 16px; top: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .read-progress { top: 64px; }
}
