:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1d2a3a;
  --muted: #5f6f83;
  --brand: #0f62fe;
  --brand-2: #008f7a;
  --line: #e6ebf2;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.wrap { width: min(1160px, 92%); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  background: rgba(245, 247, 251, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); font-weight: 700; }
.brand img { width: 38px; height: 38px; border-radius: 8px; }
.links { display: flex; gap: 28px; }
.links a { color: #334860; text-decoration: none; }
.actions { display: flex; gap: 10px; }

.solid, .ghost {
  border-radius: 10px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  transition: all .2s ease;
}
.solid { background: linear-gradient(120deg, var(--brand), #3c7dff); color: #fff; }
.ghost { border: 1px solid #c9d4e5; color: #24405c; background: #fff; }
.solid:hover { transform: translateY(-1px); }
.ghost:hover { border-color: #9cb2cc; }
.large { padding: 12px 20px; }

.hero {
  padding: 78px 0 48px;
  background:
    radial-gradient(1200px 500px at 80% -10%, #dff2f8 0%, transparent 68%),
    radial-gradient(800px 420px at 20% 0%, #e8f0ff 0%, transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  align-items: center;
}
.tag {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 13px;
  color: #096f60;
  background: #dbf3ef;
  padding: 6px 12px;
  border-radius: 999px;
}
h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.22; }
.sub { color: var(--muted); font-size: 17px; line-height: 1.75; margin: 18px 0 24px; max-width: 660px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 38px rgba(23, 45, 75, .08);
}
.hero-card h3 { margin: 0 0 10px; }
.hero-card ul { margin: 0; padding-left: 18px; color: #425970; line-height: 1.9; }

.section { padding: 68px 0; }
.section.alt { background: #f0f4fa; }
.section h2 { margin: 0 0 24px; font-size: 32px; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.cards.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cards article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.cards .icon {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 8px;
}
.cards .qrcode {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 4px;
  background: #fff;
}
.cards h3 { margin: 0 0 10px; font-size: 20px; }
.cards p { margin: 0; color: var(--muted); line-height: 1.7; }
.downloads {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.split > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.split h3 { margin: 0 0 8px; }
.split p { margin: 0; color: var(--muted); line-height: 1.7; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stats > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.stats strong {
  display: block;
  font-size: 34px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats span { color: #50657d; }

.guide-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}
.guide-toc {
  position: sticky;
  top: 92px;
  align-self: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.guide-toc h3 {
  margin: 4px 0 10px;
  font-size: 18px;
}
.guide-toc a {
  display: block;
  text-decoration: none;
  color: #2b415a;
  padding: 8px 8px;
  border-radius: 8px;
}
.guide-toc a:hover { background: #f3f7fd; }
.guide-toc a.sub {
  color: #5b7087;
  padding-left: 16px;
  font-size: 14px;
}
.guide-content { min-width: 0; }
.guide-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 14px;
}
.guide-block h3 { margin: 0 0 12px; }
.guide-block h4 { margin: 18px 0 8px; }
.guide-block p, .guide-block li {
  color: #4f657d;
  line-height: 1.8;
}

.footer { border-top: 1px solid var(--line); background: #fff; color: #6b7f95; }
.footer .wrap { height: 74px; display: flex; align-items: center; }

@media (max-width: 980px) {
  .links { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc {
    position: static;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .cards.cards-3 { grid-template-columns: 1fr; }
  .actions { gap: 6px; }
  .solid, .ghost { padding: 9px 12px; font-size: 14px; }
}


.doc-full h2 {
  margin-top: 24px;
  padding-top: 8px;
  border-top: 1px dashed #d8e1ee;
}
.doc-full h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.doc-full h3 {
  margin-top: 18px;
  color: #27425f;
}
.manual-figure {
  margin: 14px 0 18px;
  padding: 10px;
  border: 1px solid #e4ebf5;
  border-radius: 10px;
  background: #fbfdff;
}
.manual-figure img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.manual-table-wrap {
  overflow-x: auto;
  margin: 10px 0 16px;
}
.manual-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #49617a;
}
.manual-table td {
  border: 1px solid #e4ebf5;
  padding: 8px 10px;
  vertical-align: top;
}


/* Desktop manual tuning */
.guide-toc a {
  padding: 4px 8px;
  line-height: 1.35;
  margin: 1px 0;
}
.guide-toc a.sub {
  padding-left: 14px;
  font-size: 13px;
}
.doc-full h2 {
  font-size: 32px;
  line-height: 1.28;
}
.doc-full h3 {
  font-size: 26px;
  line-height: 1.35;
}


/* Home hero sizing + feature cards link style */
.hero h1 {
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.25;
}
.hero .sub {
  font-size: 15px;
  line-height: 1.7;
}
#feature .cards article {
  position: relative;
  padding-bottom: 22px;
}
#feature .cards p {
  font-size: 15px;
}
.card-link {
  position: absolute;
  right: 18px;
  top: 16px;
  font-size: 13px;
  color: #547090;
  text-decoration: none;
}
.card-link:hover {
  color: #1f4f86;
  text-decoration: underline;
}

/* Home card actions + miniapp QR modal */
.card-actions {
  margin-top: 14px;
}
.qr-open {
  cursor: pointer;
}
.qr-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 80;
}
.qr-modal.show {
  display: block;
}
.qr-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(16, 28, 44, .48);
}
.qr-modal-panel {
  position: relative;
  width: min(92vw, 480px);
  margin: 8vh auto 0;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #d9e3f1;
  padding: 18px 18px 16px;
  text-align: center;
  box-shadow: 0 22px 48px rgba(18, 39, 66, .24);
}
.qr-modal-panel h3 {
  margin: 6px 0 14px;
  font-size: 22px;
}
.qr-modal-panel img {
  width: min(100%, 360px);
  border-radius: 12px;
  border: 1px solid #e4ebf5;
}
.qr-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #5f7085;
  cursor: pointer;
}


/* Feature section subtitle + button consistency */
.feature-sub {
  margin: 0;
  color: #6a7d92;
  font-size: 14px;
  line-height: 1.6;
}
.card-actions .solid,
.card-actions .ghost,
.card-actions .qr-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
}
button.solid,
button.ghost {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid transparent;
  font: inherit;
}
button.ghost { border-color: #c9d4e5; }


.feature-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.feature-head h2 {
  margin: 0;
}
.feature-head .feature-sub {
  margin: 0;
}


/* Support footer section */
.support-section {
  padding-top: 42px;
  padding-bottom: 56px;
}
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.support-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.support-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}
.support-card > p {
  margin: 0 0 14px;
  color: #60758c;
}
.support-qr-wrap {
  width: 220px;
  max-width: 100%;
}
.support-qr {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e4ebf5;
}
.support-qr-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  min-height: 220px;
  border-radius: 10px;
  border: 1px dashed #c7d5e8;
  color: #6f8398;
  line-height: 1.6;
}
.support-card details {
  border: 1px solid #e3ebf6;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfdff;
  margin-bottom: 10px;
}
.support-card summary {
  cursor: pointer;
  font-weight: 600;
  color: #2d4662;
}
.support-card details p {
  margin: 8px 0 0;
  color: #60758c;
  line-height: 1.7;
  font-size: 14px;
}
@media (max-width: 980px) {
  .support-grid { grid-template-columns: 1fr; }
}
