/* 官网基础样式（docs/19）："星夜"配色同 docs/10：深夜蓝品牌区、靛蓝按钮，金色只给品牌。
   首页各区块的样式在 home.css。nginx 的 CSP 不许内联样式，页面上的显示隐藏都靠这里按 <html> 的 class 切换：
   is-desktop / is-wechat-pc / is-mobile / is-wechat-mobile（访问来源）、has-invite（代理专属链接）、is-started（下载已开始）。
   字体只用系统字体：国内加载 Google Fonts 不稳定。 */
:root {
  --night: #0b1026;
  --night-2: #141938;
  --night-3: #1c2250;
  --night-line: #262d60;
  --night-line-2: #2e3670;
  --on-night: #e8eaf7;
  --on-night-2: #b4b9db;
  --on-night-3: #8c92bd;
  --bg: #f4f5fa;
  --card: #ffffff;
  --line: #e4e6f0;
  --line-2: #dde0ec;
  --ink: #171a33;
  --ink-2: #2a2f55;
  --muted: #545a7a;
  --muted-2: #6e7392;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --primary-text: #4338ca;
  --gold: #f6c768;
  --gold-soft: #fff8e8;
  --gold-line: #f0d79a;
  --gold-ink: #5c3a00;
  --warn-bg: #fef3e2;
  --warn-ink: #7a3e00;
  --sans: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a {
  color: var(--primary-text);
}

h1, h2, h3, p, ul, ol, dl, dd {
  margin: 0;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--mono); }
.gold { color: var(--gold); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--primary-hover);
}

.btn svg { flex: 0 0 auto; }

.btn-sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  border-radius: 8px;
}

.btn-lg {
  height: 54px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #3a427e;
  color: var(--on-night);
  font-weight: 500;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--night-3);
}

.btn-block {
  width: 100%;
  height: 50px;
  font-size: 16px;
}

.btn.is-done {
  background: #166534;
}

/* 电脑版微信的提示条 */
.banner {
  padding: 12px 24px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-bottom: 1px solid #f5d6a8;
  font-size: 14px;
  text-align: center;
}

/* 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--night);
  border-bottom: 1px solid #161c3f;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-sub {
  padding-left: 10px;
  border-left: 1px solid #3a427e;
  color: var(--on-night-2);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  gap: 32px;
  font-size: 15px;
}

.nav a {
  color: #c9cde8;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: #fff;
}

/* 页脚 */
.site-footer {
  background: #080c1f;
  color: #a9aed3;
  font-size: 14px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 32px;
}

.footer-brand {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--on-night-3);
}

.footer-brand .brand-name {
  font-size: 19px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: #a9aed3;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
}

.footer-title {
  color: #fff;
  font-weight: 600;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 32px;
  border-top: 1px solid var(--night-3);
  font-size: 13px;
  color: var(--on-night-3);
}

.footer-legal a {
  color: var(--on-night-3);
  text-decoration: none;
}

.footer-legal a:hover {
  color: #fff;
}

/* 协议、隐私政策 */
.doc {
  max-width: 800px;
  padding-top: 56px;
  padding-bottom: 80px;
}

.doc h1 {
  font-size: 30px;
  margin-bottom: 20px;
}

.doc p {
  color: var(--muted);
}

/* 手机端吸底条：复制链接到电脑上打开（docs/19 §4） */
.sticky-get {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  align-items: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(11, 16, 38, 0.08);
}

.sticky-text {
  flex: 1;
  min-width: 0;
}

.sticky-title {
  font-size: 14px;
  font-weight: 700;
}

.sticky-link {
  overflow: hidden;
  color: var(--muted-2);
  font: 12px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-get .btn {
  height: 44px;
  padding: 0 18px;
}

/* 复制链接的兜底：execCommand 需要一个可选中的文本框，放到屏幕外 */
.copy-buffer {
  position: fixed;
  top: -1000px;
  left: 0;
  opacity: 0;
}

/* 按来源显示：默认按电脑浏览器显示，手机、微信、专属链接的内容先藏起来 */
.only-mobile,
.only-wechat-mobile,
.only-wechat-pc,
.only-invite,
.started {
  display: none;
}

.has-invite .only-invite,
.is-wechat-pc .only-wechat-pc,
.is-wechat-mobile .only-wechat-mobile,
.is-mobile .only-mobile,
.is-wechat-mobile .only-mobile {
  display: block;
}

.is-mobile .sticky-get,
.is-wechat-mobile .sticky-get {
  display: flex;
}

.is-mobile .js-download,
.is-wechat-mobile .js-download,
.is-mobile .hero-actions,
.is-wechat-mobile .hero-actions {
  display: none;
}

.is-mobile .site-footer,
.is-wechat-mobile .site-footer {
  padding-bottom: 84px;
}

.is-started .home {
  display: none;
}

.is-started .started {
  display: block;
}

@media (max-width: 880px) {
  .nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-sub {
    font-size: 13px;
  }

  .header-row {
    height: 56px;
  }
}
