/* ==========================================================
   WorkBuddy / QClaw 新手 QA 网站 · 共享样式
   ========================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7faff;
  --bg-soft: #eef4ff;
  --card: #ffffff;
  --text: #0d2137;
  --text-soft: #475569;
  --text-mute: #94a3b8;
  --border: #e2e8f0;
  --border-soft: #eef2f7;

  --wb: #00897b;        /* WorkBuddy 主色：青绿 */
  --wb-deep: #00695c;
  --wb-soft: #e0f2f1;

  --qc: #e8412e;        /* QClaw 主色：橙红 */
  --qc-deep: #c62828;
  --qc-soft: #ffebe6;

  --primary: #1565c0;
  --primary-soft: #e3f2fd;

  --shadow-sm: 0 1px 4px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============== 顶部导航 ============== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}
.nav-logo .badge {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--wb), var(--qc));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: all .18s;
}
.nav-links a:hover { color: var(--text); border-color: var(--primary); }
.nav-links a.active { color: var(--primary); border-color: var(--primary); }
.nav-cta {
  background: var(--text);
  color: #fff !important;
  padding: 8px 16px !important;
  border-radius: 999px;
  border: none !important;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--primary); color: #fff !important; }

/* mobile menu toggle */
.nav-toggle { display: none; }

@media (max-width: 768px) {
  .nav-inner { padding: 12px 16px; gap: 12px; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    border-top: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 0;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--bg-soft);
    border: none;
    cursor: pointer;
    margin-left: auto;
    font-size: 18px;
  }
}

/* ============== 通用容器 ============== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: 64px 0;
}
.section-tight {
  padding: 36px 0;
}

/* ============== Hero ============== */
.hero {
  position: relative;
  padding: 72px 0 88px;
  background:
    radial-gradient(1100px 380px at 12% 0%, rgba(0, 137, 123, 0.14), transparent 60%),
    radial-gradient(900px 320px at 92% 18%, rgba(232, 65, 46, 0.13), transparent 55%),
    linear-gradient(180deg, #f6fbff 0%, #eef4fc 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 101, 192, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 101, 192, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: .04em;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wb), var(--qc));
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 18px;
}
.hero h1 .grad-wb { color: var(--wb); }
.hero h1 .grad-qc { color: var(--qc); }
.hero p.lead {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 720px;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); }
.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-wb { background: var(--wb); color: #fff; }
.btn-wb:hover { background: var(--wb-deep); }
.btn-qc { background: var(--qc); color: #fff; }
.btn-qc:hover { background: var(--qc-deep); }

/* hero stats */
.hero-stats {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 720px;
}
.hero-stat {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
}
.hero-stat .num {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.hero-stat .lbl {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============== 通用区块标题 ============== */
.section-title {
  text-align: center;
  margin-bottom: 36px;
}
.section-title .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-title h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-title p {
  color: var(--text-soft);
  font-size: 15px;
  max-width: 680px;
  margin: 0 auto;
}

/* ============== 双产品对比卡 ============== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } }
.compare-card {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 28px 26px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.compare-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.compare-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--accent, var(--primary));
}
.compare-card.wb { --accent: linear-gradient(90deg, #00c9a7, #0097a7); }
.compare-card.qc { --accent: linear-gradient(90deg, #ff8a65, #e8412e); }

.cc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cc-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 900;
  flex-shrink: 0;
}
.compare-card.wb .cc-icon { background: linear-gradient(135deg, #00c9a7, #0097a7); }
.compare-card.qc .cc-icon { background: linear-gradient(135deg, #ff8a65, #e8412e); }
.cc-name { font-size: 22px; font-weight: 900; }
.cc-team { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.cc-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.compare-card.wb .cc-tag { background: var(--wb-soft); color: var(--wb-deep); }
.compare-card.qc .cc-tag { background: var(--qc-soft); color: var(--qc-deep); }

.cc-desc { color: var(--text-soft); font-size: 14.5px; margin-bottom: 18px; line-height: 1.65; }

.cc-features { list-style: none; margin-bottom: 22px; }
.cc-features li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
}
.cc-features li::before {
  content: "✓";
  color: #fff;
  background: var(--check, var(--primary));
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 3px;
}
.compare-card.wb .cc-features li::before { background: var(--wb); }
.compare-card.qc .cc-features li::before { background: var(--qc); }

.cc-cta { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ============== 分类导航卡 ============== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 20px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.cat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.cat-title { font-size: 17px; font-weight: 800; }
.cat-desc { font-size: 13px; color: var(--text-soft); }
.cat-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
}

/* ============== QA 折叠卡（核心组件） ============== */
.qa-list { display: flex; flex-direction: column; gap: 12px; }

.qa-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.qa-item:hover { border-color: #cbd5e1; }
.qa-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.qa-q {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.qa-q::-webkit-details-marker { display: none; }
.qa-q .marker {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.qa-q .qa-q-text { flex: 1; line-height: 1.5; }
.qa-q .chev {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-mute);
  transition: transform .2s;
  margin-top: 6px;
}
.qa-item[open] .qa-q .chev { transform: rotate(180deg); color: var(--primary); }

.qa-a {
  padding: 4px 22px 22px 64px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.75;
}
.qa-a p { margin-bottom: 10px; }
.qa-a strong { color: var(--text); font-weight: 700; }
.qa-a ul, .qa-a ol { padding-left: 22px; margin: 8px 0 12px; }
.qa-a li { margin-bottom: 4px; }
.qa-a .hl {
  background: linear-gradient(180deg, transparent 60%, rgba(21, 101, 192, 0.18) 60%);
  padding: 0 2px;
  font-weight: 600;
}
.qa-a code, .qa-a .code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: 1px 6px;
  border-radius: 5px;
  color: #b91c1c;
}
.qa-a .source {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-mute);
  font-style: italic;
}

/* QA 标签角标 */
.qa-q .tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-top: 4px;
}
.tag.wb { background: var(--wb-soft); color: var(--wb-deep); }
.tag.qc { background: var(--qc-soft); color: var(--qc-deep); }
.tag.both { background: var(--primary-soft); color: var(--primary); }

@media (max-width: 640px) {
  .qa-q { padding: 16px; gap: 10px; font-size: 15px; }
  .qa-a { padding-left: 50px; padding-right: 16px; padding-bottom: 18px; font-size: 14px; }
}

/* ============== 分类章节 ============== */
.qa-section {
  margin-bottom: 40px;
}
.qa-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-soft);
}
.qa-section-head .num {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--wb), var(--qc));
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qa-section-head h3 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.qa-section-head .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 600;
}

/* ============== 信息盒（提示/警告） ============== */
.box {
  border-radius: 12px;
  padding: 14px 18px;
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.65;
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  color: #0d2a4a;
}
.box.warn { border-left-color: #f59e0b; background: #fffbeb; color: #78350f; }
.box.danger { border-left-color: #ef4444; background: #fef2f2; color: #7f1d1d; }
.box.success { border-left-color: #10b981; background: #ecfdf5; color: #064e3b; }
.box strong { color: inherit; }

/* ============== 表格 ============== */
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 14px;
  font-size: 14px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tbl th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 800;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-soft);
  vertical-align: top;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl .ok { color: #047857; font-weight: 600; }
.tbl .no { color: #b91c1c; }

/* ============== 步骤卡（安装页） ============== */
.steps { display: flex; flex-direction: column; gap: 12px; }
.step {
  display: flex;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.step-n {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-body h4 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.step-body p { font-size: 14px; color: var(--text-soft); }

/* ============== 搜索框 ============== */
.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto 28px;
}
.search-box input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  font-size: 15px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(21,101,192,0.08); }
.search-box::before {
  content: "🔍";
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-mute);
}
.no-result {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-mute);
  font-size: 14px;
  display: none;
}

/* ============== 筛选器 tabs ============== */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}
.filter-tabs button {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  cursor: pointer;
  transition: all .18s;
}
.filter-tabs button:hover { border-color: var(--primary); color: var(--primary); }
.filter-tabs button.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

/* ============== 锚点导航（侧边） ============== */
.toc {
  position: sticky;
  top: 90px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 14px;
  font-size: 13.5px;
}
.toc-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 4px; }
.toc a {
  display: block;
  padding: 7px 10px;
  color: var(--text-soft);
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.toc a:hover, .toc a.active {
  background: var(--bg-soft);
  color: var(--primary);
  border-left-color: var(--primary);
}

.layout-with-toc {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
}
@media (max-width: 960px) {
  .layout-with-toc { grid-template-columns: 1fr; }
  .toc { position: static; margin-bottom: 24px; }
}

/* ============== Footer ============== */
.footer {
  background: #0d1b2a;
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; font-size: 13.5px; }
.footer a:hover { color: #60a5fa; }
.footer .desc { font-size: 13px; color: #94a3b8; line-height: 1.7; }
.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ============== 平滑动画 ============== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }

/* ============== 滚动条美化 ============== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============== 打印 ============== */
@media print {
  .nav, .footer, .search-box, .filter-tabs, .toc { display: none; }
  .qa-item[open] .qa-a, .qa-item .qa-a { display: block !important; }
}
