/* WeChat ecosystem page. Builds on the tokens and buttons in styles.css. */
:root { --client: #103a2b; --client-accent: #8cc63f; --wx: #07c160; --wx-bg: #ededed; }
html, body.wx-page { height: auto; min-height: 100%; overflow: auto; }
[hidden] { display: none !important; }
body.wx-page { background: var(--midnight); }

.wx-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); background: rgba(8, 7, 19, .94); border-bottom: 1px solid var(--line); }
.wx-top-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wx-main { max-width: 1320px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.wx-intro { margin-bottom: 24px; max-width: 760px; }
.wx-intro h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.05; margin: 0; text-wrap: balance; }
.wx-note { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.wx-note a { color: var(--pink); }

.wx-grid { display: grid; grid-template-columns: 240px 360px minmax(0, 1fr); gap: 28px; align-items: start; }

/* journey */
.journey { display: grid; gap: 14px; position: sticky; top: 92px; }
.j-stage { border-left: 2px solid var(--muted-ink); padding-left: 14px; }
.j-stage.on { border-left-color: var(--pink); }
.j-head { margin: 0 0 6px; display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 14px; }
.j-head span { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--muted-ink); font-size: 11px; flex: none; }
.j-stage.on .j-head span { background: var(--pink); }
.j-head small { font-family: var(--cn); font-weight: 500; color: var(--text-2); font-size: 12px; }
.j-step { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 5px 8px; border-radius: 6px; font-size: 13px; color: var(--text-2); }
.j-step:hover { color: var(--text); background: var(--ink); }
.j-step.on { color: var(--text); background: var(--ink); font-weight: 700; }

/* phone */
.stage { display: grid; justify-items: center; }
.wx-phone { width: 340px; height: 690px; border-radius: 48px; padding: 12px; background: #0b0b0d; box-shadow: 0 0 0 2px #2b2b30, 0 30px 80px rgba(0, 0, 0, .5); display: flex; flex-direction: column; }
.wx-status { display: flex; justify-content: space-between; padding: 6px 22px 8px; font-size: 12px; font-weight: 700; color: #fff; }
.wx-screen { position: relative; flex: 1; border-radius: 36px; overflow: hidden auto; background: var(--wx-bg); color: #111; font-family: var(--cn); font-size: 14px; scrollbar-width: none; }
.wx-screen::-webkit-scrollbar { display: none; }
.wx-screen .tr { display: block; font-family: var(--sans); font-size: 11px; color: #8a8a8a; margin-top: 3px; line-height: 1.4; font-weight: 400; }
.wx-pad { padding: 14px; }
.wx-bar { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; padding: 12px 8px; background: #f7f7f7; border-bottom: 1px solid #ddd; font-weight: 700; font-size: 15px; text-align: center; }
.wx-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-bar em { display: block; font-style: normal; font-size: 11px; color: #c48a17; font-weight: 600; }
.wx-back { border: 0; background: none; font-size: 26px; line-height: 1; color: #111; padding: 0; }
.wx-bar-r { color: #555; font-weight: 700; }
.wx-ava { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid #e3e3e3; display: inline-grid; place-items: center; flex: none; }
.wx-ava img { width: 90%; height: 90%; object-fit: contain; }
.wx-ava-txt { font-weight: 800; color: var(--client); }
.wx-ava-me { background: #95ec69; border: 0; font-weight: 700; font-size: 13px; }
.wx-btn { display: block; width: 100%; min-height: 42px; border: 0; border-radius: 8px; background: var(--wx); color: #fff; font-weight: 700; font-size: 15px; font-family: var(--cn); cursor: pointer; }
.wx-btn-ghost { background: #f2f2f2; color: #111; }
.wx-btn-sm { width: auto; min-height: 30px; padding: 0 12px; font-size: 13px; }
.wx-meta { color: #888; font-size: 12px; margin: 6px 0 12px; }
.wx-sec { margin: 14px 0 8px; font-size: 12px; color: #888; }

.wx-article { background: #fff; min-height: 100%; }
.wx-article h3 { font-size: 20px; line-height: 1.35; margin: 4px 0 0; }
.wx-article p { line-height: 1.75; }
.wx-card-acct { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 14px 0 4px; border-radius: 10px; background: #f6f6f6; cursor: pointer; }
.wx-card-acct div { flex: 1; min-width: 0; display: grid; }
.wx-card-acct span { font-size: 12px; color: #777; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-card-acct em, .wx-video-acct em { font-style: normal; font-size: 13px; font-weight: 700; color: #fff; background: var(--wx); padding: 5px 12px; border-radius: 6px; cursor: pointer; }
.wx-stats { margin-top: 16px; }

.wx-video { position: relative; height: 100%; background: #111 center / cover no-repeat; color: #fff; }
.wx-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .75)); }
.wx-video > * { position: relative; z-index: 1; }
.wx-video-top { padding: 16px; text-align: center; font-weight: 700; }
.wx-play { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .3); color: #fff; font-size: 24px; }
.wx-video-side { position: absolute; right: 12px; bottom: 150px; display: grid; gap: 16px; text-align: center; font-size: 22px; }
.wx-video-side b { display: block; font-size: 12px; font-family: var(--sans); }
.wx-video-cap { position: absolute; left: 14px; right: 60px; bottom: 18px; }
.wx-video-cap p { margin: 8px 0 0; font-weight: 700; }
.wx-video-cap .tr { color: #ccc; }
.wx-video-acct { display: flex; align-items: center; gap: 8px; }
.wx-video-acct .wx-ava { width: 30px; height: 30px; }
.wx-sub { font-size: 12px; font-weight: 400 !important; color: #ddd; }

.wx-searchbar { display: flex; gap: 10px; align-items: center; padding: 12px; background: #f7f7f7; }
.wx-searchbar span { flex: 1; padding: 8px 10px; border-radius: 8px; background: #fff; font-size: 14px; }
.wx-searchbar b { color: #576b95; font-weight: 500; }
.wx-tabs { display: flex; gap: 16px; padding: 10px 14px; background: #f7f7f7; font-size: 13px; color: #666; border-bottom: 1px solid #ddd; }
.wx-tabs b { color: var(--wx); }
.wx-row { display: flex; gap: 10px; align-items: center; padding: 12px; margin-bottom: 8px; border-radius: 10px; background: #fff; cursor: pointer; }
.wx-row div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wx-row b { font-size: 14px; line-height: 1.4; font-weight: 600; }
.wx-row span { font-size: 12px; color: #888; }
.wx-row img, .wx-noimg { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; flex: none; background: var(--client); }
.wx-row-lg img, .wx-row-lg .wx-noimg { width: 72px; height: 72px; }

.wx-scan { height: 100%; display: grid; place-content: center; justify-items: center; gap: 18px; background: #111; color: #fff; text-align: center; padding: 20px; }
.wx-scan p { margin: 0; }
.wx-view { position: relative; width: 190px; height: 190px; padding: 10px; border-radius: 12px; border: 3px solid var(--wx); background: #fff; }
.wx-view img { width: 100%; height: 100%; display: block; }
.wx-view i { position: absolute; left: 6px; right: 6px; height: 3px; background: var(--wx); box-shadow: 0 0 12px var(--wx); animation: scan 1.6s ease-in-out infinite alternate; }
.wx-cap { font-size: 13px; color: #ccc; }

.wx-profile { background: #fff; min-height: calc(100% - 50px); padding: 20px 18px; text-align: center; }
.wx-profile > .wx-ava { width: 84px; height: 84px; border-radius: 50%; }
.wx-profile h3 { margin: 12px 0 8px; font-size: 19px; }
.wx-profile p { margin: 0; font-size: 13px; color: #555; line-height: 1.6; }
.wx-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.wx-list { text-align: left; }
.wx-list .wx-row { background: #f6f6f6; }

.wx-chat { padding: 12px 10px 120px; display: grid; gap: 12px; align-content: start; }
.wx-time { text-align: center; font-size: 11px; color: #999; margin: 4px 0; }
.wx-msg { display: flex; gap: 8px; align-items: flex-start; }
.wx-msg .wx-ava { width: 36px; height: 36px; border-radius: 6px; }
.wx-me { justify-content: flex-end; }
.wx-bubble { max-width: 76%; padding: 10px 12px; border-radius: 8px; background: #fff; line-height: 1.6; font-size: 14px; }
.wx-me .wx-bubble { background: #95ec69; }
.wx-file { display: grid; gap: 4px; min-width: 180px; }
.wx-file span { font-size: 12px; color: #999; }
.wx-menu { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #f7f7f7; border-top: 1px solid #ddd; }
.wx-menu button { border: 0; border-left: 1px solid #ddd; background: none; padding: 14px 4px; font-family: var(--cn); font-size: 13px; color: #111; }
.wx-menu button:first-child { border-left: 0; }
.wx-submenu { position: absolute; bottom: 54px; display: grid; background: #fff; border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); overflow: hidden; }
.wx-submenu button { border: 0; border-top: 1px solid #eee; background: #fff; padding: 10px 6px; font-family: var(--cn); font-size: 13px; display: grid; gap: 2px; color: #111; }
.wx-submenu button:first-child { border-top: 0; }
.wx-submenu small { font-family: var(--sans); font-size: 10px; color: #999; }

.wx-reader { background: #fff; min-height: calc(100% - 50px); padding-bottom: 60px; }
.wx-long { width: 100%; display: block; }
.wx-readbar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: #f7f7f7; border-top: 1px solid #ddd; font-size: 12px; color: #666; }
.wx-readbar .wx-btn { margin-left: auto; }
.wx-qrbox { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: #f6f6f6; }
.wx-qrbox img { width: 80px; height: 80px; }

.wx-form { display: grid; gap: 12px; padding: 14px; background: #fff; min-height: calc(100% - 50px); align-content: start; }
.wx-form-tight { min-height: 0; padding: 12px 0 0; }
.wx-form-head { display: flex; gap: 10px; align-items: center; margin: 0; font-size: 13px; }
.wx-form label, .wx-form legend { display: grid; gap: 5px; font-size: 13px; font-weight: 700; }
.wx-form small { font-family: var(--sans); font-weight: 400; color: #888; }
.wx-form input { min-height: 38px; border: 1px solid #ddd; border-radius: 6px; padding: 0 10px; font-family: var(--cn); font-size: 14px; color: #111; background: #fafafa; }
.wx-form fieldset { border: 0; margin: 0; padding: 0; }
.wx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wx-chips button { flex: 1 1 auto; min-height: 32px; padding: 0 8px; border-radius: 6px; border: 1px solid #ddd; background: #fafafa; font-family: var(--cn); font-size: 12px; color: #111; }
.wx-chips button.on { border-color: var(--wx); background: #e7f8ee; color: #077a3d; }
.wx-done { background: #fff; min-height: calc(100% - 50px); padding: 40px 20px; text-align: center; display: grid; gap: 10px; align-content: start; }
.wx-done h3, .wx-done p { margin: 0; }
.wx-tick { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; background: var(--wx); color: #fff; display: grid; place-items: center; font-size: 34px; font-family: var(--sans); }
.wx-lead { margin: 12px 0; padding: 12px; border-radius: 8px; background: #f3f2fa; text-align: left; font-family: var(--sans); font-size: 12px; color: #333; display: grid; gap: 4px; }
.wx-lead b { color: var(--pink); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.wx-brochure img { width: 100%; border-radius: 8px; display: block; background: #fff; }
.wx-cover { height: 180px; border-radius: 8px; background: var(--client); color: #fff; display: grid; place-content: center; justify-items: center; gap: 6px; }
.wx-wp { position: relative; height: 200px; border-radius: 10px; padding: 18px; background: linear-gradient(135deg, var(--client), #0b2219); color: #fff; display: grid; align-content: end; gap: 4px; margin-bottom: 12px; }
.wx-wp span { font-family: var(--sans); font-size: 10px; letter-spacing: .12em; color: var(--client-accent); }
.wx-wp b { font-size: 22px; }
.wx-wp em { font-style: normal; font-size: 13px; color: #cfe; }
.wx-wp .wx-ava { position: absolute; top: 14px; right: 14px; }
.wx-bar-wecom { background: #f7f7f7; }

/* report */
.report-wrap { width: 100%; max-width: 560px; }
.report { padding: 24px; border-radius: 12px; background: var(--offwhite); color: var(--ink); }
.report h3 { font-family: var(--serif); font-weight: 700; font-size: 28px; margin: 0 0 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 18px; }
.kpis div { padding: 12px; border-radius: 8px; background: #fff; border: 1px solid var(--grey); }
.kpis b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpis span { font-size: 12px; color: var(--slate); }
.charts { display: grid; gap: 18px; }
.charts figure { margin: 0; }
.charts figcaption { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin-bottom: 8px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; height: 140px; align-items: end; }
.col { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; gap: 4px; font-size: 12px; color: var(--slate); }
.col i { align-self: end; display: block; background: var(--client); border-radius: 4px 4px 0 0; position: relative; min-height: 4px; }
.col i em { position: absolute; top: -18px; left: 0; right: 0; font-style: normal; font-weight: 800; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.col:last-child i { background: var(--pink); }
.hbar { display: grid; grid-template-columns: 150px 1fr 40px; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.hbar i { display: block; height: 12px; border-radius: 3px; background: var(--client-accent); min-width: 3px; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.src { font-size: 11px; color: var(--slate); margin: 14px 0 0; }
.report .btn-primary { margin-top: 8px; }

/* explainer */
.explain { min-width: 0; }
.explain h2 { font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.08; margin: 0 0 12px; }
.explain .lead { font-size: 17px; line-height: 1.55; margin: 0 0 16px; }
.explain h3 { margin: 22px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.explain ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 15px; line-height: 1.5; }
.explain ul.silk { list-style: none; padding: 0; }
.explain ul.silk li { padding-left: 24px; position: relative; }
.explain ul.silk li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 11px; height: 6px; border-left: 2px solid var(--pink); border-bottom: 2px solid var(--pink); transform: rotate(-45deg); }
.explain .proof { margin: 22px 0 14px; }
.hint-pill { display: inline-block; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--ink); font-size: 13px; color: var(--text-2); }
.ex-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }

/* CTA */
.cta-card { position: relative; width: min(620px, 100%); padding: 32px; border-radius: 12px; background: var(--midnight); border: 1px solid var(--line); }
.cta-card .icon-btn { position: absolute; top: 14px; right: 14px; }
.cta-card h2 { font-family: var(--serif); font-weight: 700; font-size: 34px; margin: 0 0 10px; line-height: 1.05; }
.cta-card > p { color: var(--text-2); line-height: 1.55; }
.cta-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding: 16px; border-radius: 8px; background: var(--offwhite); color: var(--ink); }
.cta-qr { width: 120px; text-align: center; font-size: 11px; color: var(--slate); display: grid; gap: 4px; }
.cta-qr img { width: 120px; height: 120px; border-radius: 6px; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.cta-row .btn-ghost { background: transparent; color: var(--ink); border-color: rgba(22, 20, 47, .25); }
.cta-phone { font-weight: 700; font-size: 14px; }

@media (max-width: 1100px) {
  .wx-grid { grid-template-columns: 360px minmax(0, 1fr); }
  .journey { grid-column: 1 / -1; position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .j-stage { border-left: 0; padding: 0; display: flex; gap: 4px; align-items: center; flex: none; }
  .j-head { margin: 0 4px 0 0; white-space: nowrap; }
  .j-head small { display: none; }
  .j-step { white-space: nowrap; width: auto; }
}
@media (max-width: 760px) {
  .wx-grid { grid-template-columns: minmax(0, 1fr); }
  .wx-top .brand-sub { display: none; }
  .wx-top-nav .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
  #btn-play { display: none; }
  .wx-phone { width: min(340px, 100%); height: 640px; }
  .hbar { grid-template-columns: 110px 1fr 36px; }
}
