/* ============================================================
   青桔错题本 · 统一视觉规范
   ============================================================ */
:root {
  /* 品牌绿 */
  --brand: var(--qj-accent);
  --brand-strong: var(--qj-link);
  --brand-deep: var(--qj-deep);
  --brand-soft: var(--qj-soft);
  --brand-faint: var(--qj-faint);

  /* 墨色 */
  --ink: var(--qj-ink);
  --ink-2: var(--qj-secondary);
  --ink-3: #707477;

  /* 表面与背景 */
  --bg: var(--qj-background);
  --surface: var(--qj-surface);
  --line: var(--qj-line);

  /* 几何 */
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 10px 30px -12px rgba(4, 120, 87, .22);
  --shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, .28);

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

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

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

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .3px;
}
.brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
  transition: color .15s ease;
}
.nav a:hover { color: var(--brand); }

/* ---------- 页面容器 ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 72px 24px 64px;
  background:
    radial-gradient(900px 420px at 50% -8%, var(--brand-soft) 0%, rgba(230, 245, 239, 0) 60%),
    var(--bg);
}
.hero-icon {
  width: 108px;
  height: 108px;
  margin: 0 auto 26px;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}
.hero h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: 1px;
  font-weight: 800;
}
.hero .slogan {
  margin: 16px 0 0;
  font-size: 21px;
  color: var(--brand-strong);
  font-weight: 600;
}
.hero .sub {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-3);
}
.hero .meta {
  margin: 26px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .3px;
}

/* ---------- 下载区 ---------- */
.download {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 34px;
}

/* App Store 徽章 */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 11px 22px 11px 20px;
  background: #0b0b0f;
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.appstore-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.appstore-badge .badge-logo { width: 26px; height: 26px; flex: none; }
.appstore-badge .badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.appstore-badge .badge-top { font-size: 11px; font-weight: 500; opacity: .82; }
.appstore-badge .badge-bottom { font-size: 18px; font-weight: 700; letter-spacing: .2px; }

/* PC 悬停二维码 */
.qr-wrap { position: relative; display: inline-block; }
.qr-pop {
  position: absolute;
  top: 50%;
  left: calc(100% + 24px);
  transform: translateY(-50%) translateX(8px);
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 9999;
}
.qr-wrap:hover .qr-pop,
.qr-wrap:focus-within .qr-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}
.qr-pop::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.qr-pop img {
  display: block;
  width: 210px;
  height: 210px;
  max-width: none;
  border-radius: 6px;
}
.qr-pop .qr-cap {
  margin: 9px 0 0;
  font-size: 11px;
  color: var(--ink-2);
  text-align: center;
}

/* 响应式下载：手机显示直链，PC 显示二维码 */
.download-direct { display: none; }
.download-desktop { display: inline-block; }
@media (max-width: 768px) {
  .download-direct { display: inline-flex; }
  .download-desktop { display: none; }
}

/* ---------- 内容区块 ---------- */
.section { padding: 64px 0 8px; }
.section h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
  text-align: center;
}
.section .lead {
  margin: 0 auto 42px;
  max-width: 520px;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
}

/* 功能卡片 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .feature-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 22px;
  margin-bottom: 16px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; color: var(--brand-deep); }
.feature p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* 使用步骤 */
.steps { max-width: 640px; margin: 0 auto; }
.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 24px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.step .num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step .step-txt { font-size: 15px; color: var(--ink); padding-top: 3px; }
.step .step-txt b { color: var(--brand-deep); }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 24px 40px;
  text-align: center;
}
.footer .footer-links { margin-bottom: 14px; }
.footer .footer-links a {
  margin: 0 12px;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
}
.footer .footer-links a:hover { color: var(--brand); }
.footer .footer-copy { font-size: 13px; color: var(--ink-3); line-height: 1.9; }
.footer .footer-copy a { color: var(--ink-3); }
.footer .footer-copy a:hover { color: var(--brand); }

/* ---------- 法务/支持页面 ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 48px 24px 32px; }
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 40px 44px;
  box-shadow: var(--shadow-sm);
}
.doc h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: .5px; }
.doc .doc-meta { margin: 0 0 28px; font-size: 13px; color: var(--ink-3); }
.doc h2 {
  margin: 30px 0 10px;
  font-size: 17px;
  color: var(--brand-deep);
  font-weight: 700;
}
.doc h2:first-of-type { margin-top: 0; }
.doc p { margin: 8px 0; font-size: 15px; color: var(--ink-2); }
.doc ul { margin: 8px 0; padding-left: 20px; }
.doc li { font-size: 15px; color: var(--ink-2); margin: 6px 0; }
.doc strong { color: var(--ink); }

/* ---------- 通用小屏适配 ---------- */
@media (max-width: 640px) {
  .hero { padding: 54px 20px 48px; }
  .hero h1 { font-size: 32px; }
  .hero .slogan { font-size: 18px; }
  .hero-icon { width: 92px; height: 92px; border-radius: 22px; }
  .nav { gap: 14px; }
  .section { padding: 48px 0 4px; }
  .doc-card { padding: 28px 22px 32px; }
}

/* Product pages share the app palette and accessible navigation. */
a:focus-visible { outline:3px solid var(--brand-strong); outline-offset:4px; }
.topbar-inner { max-width:1180px; }
.nav a[aria-current="page"] { color:var(--brand-strong); background:var(--brand-soft); padding:6px 10px; border-radius:10px; }
.doc-card { border-top:4px solid var(--brand); }
.doc h2 { color:var(--brand-strong); }
.doc a { text-decoration:underline; text-underline-offset:3px; }
@media(max-width:640px) {
  .topbar-inner { flex-wrap:wrap; gap:14px; padding:14px 20px; }
  .nav { width:100%; justify-content:space-between; gap:8px; }
  .nav a { font-size:12px; white-space:nowrap; }
  .footer .footer-links a { margin:0 8px; font-size:12px; }
}
/* Reading and help refinements; legal wording remains unchanged. */
html{scroll-behavior:smooth;scroll-padding-top:100px}
.skip-link{position:fixed;left:12px;top:8px;z-index:100;background:white;color:var(--brand-strong);padding:10px 16px;transform:translateY(-160%)}
.skip-link:focus{transform:none}
.nav a{min-height:44px;display:inline-flex;align-items:center}
.doc{max-width:800px;padding-top:36px}
.doc h1{font-weight:700;font-size:32px;letter-spacing:-.02em}
.doc p,.doc li{font-size:16px;line-height:1.95}
.doc .doc-meta{font-size:13px;line-height:1.8}
.doc h2{font-size:19px;margin-top:36px;scroll-margin-top:110px}
.doc-toc{display:block;background:var(--brand-faint);border:1px solid var(--line);padding:18px 20px;border-radius:14px;margin:24px 0 28px}
.doc-toc strong{font-size:13px}
.doc-toc>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px;margin-top:8px}
.doc-toc a{font-size:13px;display:flex;align-items:center;min-height:40px;line-height:1.5;text-decoration:none}
.doc-toc a:hover{text-decoration:underline}
.back-to-top{display:inline-flex;align-items:center;min-height:44px;margin-top:24px;font-size:14px}
.faq-list details{border-bottom:1px solid var(--line);padding-block:8px}
.faq-list summary{padding:13px 0;font-size:16px;font-weight:600;cursor:pointer;line-height:1.6}
.faq-list details[open] summary{color:var(--brand-strong)}
.faq-list p{padding:0 0 12px;margin:0}
.support-contact{margin-top:32px;border-radius:16px;background:var(--brand-faint);padding:24px}
.support-contact h2{margin-top:0!important}
.support-contact .contact-button{display:inline-flex;align-items:center;min-height:48px;border-radius:12px;background:var(--brand-deep);color:white;text-decoration:none;padding:10px 18px;margin-top:8px;font-size:15px;font-weight:600}
.support-kicker{color:var(--brand-strong)!important;font-size:13px!important;margin-bottom:12px!important}
.support-contact .support-email{font-size:13px;overflow-wrap:anywhere}
.footer .footer-links a{display:inline-flex;align-items:center;min-height:44px}
.footer .footer-copy a{display:inline-block;padding-block:5px}
@media(max-width:640px){
 html{scroll-padding-top:140px}
 .doc{padding:24px 16px}
 .doc-card{padding:26px 22px}
 .doc h1{font-size:28px}
 .doc h2{scroll-margin-top:150px}
 .doc-toc{padding:14px 16px}
 .doc-toc>div{grid-template-columns:1fr}
 .support-contact{padding:20px;margin-inline:-6px}
 .nav a{font-size:12px;min-height:40px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
