/* ==========================================================================
   币安中文教程站 · 全站设计系统
   --------------------------------------------------------------------------
   设计原则：微信公众号式克制阅读 + 币安品牌联想。
   禁止：渐变、阴影、弹窗、跑马灯、浮动客服图标。
   币安黄 #F0B90B 只允许出现在三处：返佣码卡片边框/复制按钮、主 CTA 按钮、
   步骤时间线左侧竖线。徽章"已验证"黄底为品牌联想的例外许可（提示词明确要求）。
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --c-binance-yellow: #F0B90B;   /* 币安黄：仅限三处 + 已验证徽章 */
  --c-binance-yellow-dark: #D9A50A; /* hover 加深一档 */
  --c-binance-yellow-bg: #FFF9E6;   /* 返佣卡浅黄底 */
  --c-dark: #1E2329;             /* 币安深灰：顶栏 / sticky 栏 / 标题 */
  --c-text: #333;
  --c-text-secondary: #999;
  --c-divider: #eee;
  --c-bg-light: #F5F6F8;
  --c-white: #fff;

  /* 排版 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;

  --fs-body: 17px;               /* <768px 正文 17px */
  --lh-body: 1.8;
  --gap-para: 16px;              /* 段间距 */
  --fs-h1: 24px;
  --fs-h2: 20px;
  --fs-h3: 17px;

  /* 结构 */
  --radius: 8px;
  --border-hair: 0.5px;          /* 卡片发丝边 */
  --content-width: 750px;        /* 内容区最大宽度，居中 */
  --tap-min: 44px;               /* 移动端最小点击区域 */
  --sticky-bar-height: 56px;
}

@media (min-width: 768px) {
  :root {
    --fs-body: 18px;             /* ≥768px 正文 18px */
  }
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-white);    /* 全站纯白背景，无彩色大块背景 */
  padding-bottom: var(--sticky-bar-height); /* 给移动端 sticky 栏让位 */
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }    /* 桌面端隐藏 sticky 栏 */
}

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

a { color: var(--c-dark); text-decoration: none; }
a:hover { color: #000; }

ul, ol { padding-left: 1.4em; }

/* ---------- 3. 通用布局 ---------- */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 16px;
}

.content {
  padding-top: 24px;
  padding-bottom: 40px;
}

/* ---------- 4. 顶栏 ---------- */
.topbar {
  background: var(--c-dark);
  color: var(--c-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-white);
  font-weight: 600;
  font-size: 16px;
}
.brand:hover { color: var(--c-white); }

.brand-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--c-binance-yellow);
  color: var(--c-dark);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  color: var(--c-text-secondary);
  font-size: 14px;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
}
.lang-switch:hover { color: var(--c-white); }

/* 桌面端顶栏常驻"立即注册"黄色按钮（移动端隐藏，用底部 sticky 栏） */
.topbar-cta {
  display: none;
}

@media (min-width: 768px) {
  .topbar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 20px;
    background: var(--c-binance-yellow);
    color: var(--c-dark);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
  }
  .topbar-cta:hover { background: var(--c-binance-yellow-dark); color: var(--c-dark); }
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);   /* 移动端点击区域 ≥44px */
  padding: 0 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: var(--border-hair) solid transparent;
  cursor: pointer;
  text-align: center;
}

/* 主 CTA：币安黄（币安黄三处用法之二） */
.btn-primary {
  background: var(--c-binance-yellow);
  color: var(--c-dark);
}
.btn-primary:hover { background: var(--c-binance-yellow-dark); color: var(--c-dark); }

.btn-secondary {
  background: var(--c-white);
  color: var(--c-dark);
  border-color: var(--c-divider);
}
.btn-secondary:hover { background: var(--c-bg-light); }

.btn-block { display: flex; width: 100%; }

/* ---------- 6. 文章页头部 ---------- */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 4px;
}

.badge-verified {
  background: var(--c-binance-yellow);  /* 已验证徽章：币安黄底 */
  color: var(--c-dark);
  font-weight: 600;
}

.badge-meta {
  background: var(--c-bg-light);
  color: var(--c-text-secondary);
}

.article-header { margin-bottom: 24px; }

.article-title {
  font-size: var(--fs-h1);
  line-height: 1.4;
  color: var(--c-dark);
  font-weight: 700;
  margin-bottom: 12px;
}

.author-line {
  font-size: 14px;
  color: var(--c-text-secondary);
  padding-bottom: 16px;
  border-bottom: var(--border-hair) solid var(--c-divider);
}

/* ---------- 7. 正文排版 ---------- */
.article-body > p { margin-bottom: var(--gap-para); }

.article-body h2 {
  font-size: var(--fs-h2);
  color: var(--c-dark);
  font-weight: 700;
  border-left: 4px solid var(--c-binance-yellow); /* 币安黄三处用法之三 */
  padding-left: 10px;
  margin: 36px 0 16px;
  line-height: 1.5;
}

.article-body h3 {
  font-size: var(--fs-h3);
  color: var(--c-dark);
  font-weight: 700;
  margin: 24px 0 12px;
}

.lead-answer {
  font-weight: 600;
  color: var(--c-text);
}

.article-body ul,
.article-body ol { margin-bottom: var(--gap-para); }

.article-body li { margin-bottom: 8px; }

.note {
  background: var(--c-bg-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  color: #666;
  margin: var(--gap-para) 0;
}

.divider {
  border: none;
  border-top: var(--border-hair) solid var(--c-divider);
  margin: 32px 0;
}

/* ---------- 8. 返佣码复制卡（核心转化组件） ---------- */
.ref-card {
  background: var(--c-binance-yellow-bg);
  border: 1.5px solid var(--c-binance-yellow); /* 币安黄三处用法之一 */
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 28px 0;
  text-align: center;
}

.ref-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 4px;
}

.ref-card-sub {
  font-size: 13px;
  color: var(--c-text-secondary);
  margin-bottom: 14px;
}

.ref-code-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto 12px;
}

.ref-code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--c-dark);
  background: var(--c-white);
  border: var(--border-hair) solid var(--c-divider);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
}

.btn-copy {
  min-height: var(--tap-min);
  min-width: 72px;
  padding: 0 16px;
  background: var(--c-binance-yellow);  /* 复制按钮：币安黄三处用法之一 */
  color: var(--c-dark);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
}
.btn-copy:hover { background: var(--c-binance-yellow-dark); }

.ref-card-note {
  font-size: 13px;
  color: var(--c-text-secondary);
  margin-bottom: 14px;
}

.ref-card .btn-primary { width: 100%; max-width: 360px; margin: 0 auto; }

/* ---------- 9. 步骤时间线 ---------- */
.timeline {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.timeline-item {
  position: relative;
  padding-left: 36px;
  padding-bottom: 32px;
}

/* 左侧币安黄竖线：币安黄三处用法之三 */
.timeline-item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--c-binance-yellow);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-binance-yellow);
  color: var(--c-dark);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 8px;
  padding-top: 1px;
}

.timeline-content p { margin-bottom: 10px; }

/* ---------- 10. 截图占位框（后续替换真实截图） ---------- */
.shot-placeholder {
  border: 1.5px dashed #c9c9c9;
  border-radius: var(--radius);
  background: var(--c-bg-light);
  padding: 32px 16px;
  text-align: center;
  margin: 12px 0;
}

.shot-placeholder .shot-file {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--c-text-secondary);
  display: block;
  margin-bottom: 6px;
}

.shot-placeholder .shot-desc {
  font-size: 14px;
  color: #666;
}

.shot-caption {
  font-size: 13px;
  color: var(--c-text-secondary);
  text-align: center;
  margin-top: 6px;
}

/* 真实截图入库后使用：懒加载 + 显式宽高防 CLS */
.shot {
  width: 100%;
  border: var(--border-hair) solid var(--c-divider);
  border-radius: var(--radius);
  margin: 12px 0;
  height: auto;
}

/* ---------- 11. 省钱对比表 ---------- */
.compare-table-wrap {
  overflow-x: auto;              /* 小屏横向滚动兜底 */
  margin: var(--gap-para) 0;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 480px;
}

.compare-table caption {
  caption-side: top;
  text-align: left;
  font-size: 13px;
  color: var(--c-text-secondary);
  padding-bottom: 8px;
}

.compare-table th,
.compare-table td {
  border: var(--border-hair) solid var(--c-divider);
  padding: 10px 12px;
  text-align: left;
}

.compare-table th {
  background: var(--c-bg-light);
  color: var(--c-dark);
  font-weight: 600;
}

.compare-table .num { font-family: var(--font-mono); white-space: nowrap; }

.compare-table .highlight { color: var(--c-dark); font-weight: 700; }

/* ---------- 12. FAQ 折叠区（details/summary 原生实现） ---------- */
.faq { margin: var(--gap-para) 0; }

.faq details {
  border: var(--border-hair) solid var(--c-divider);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--c-white);
}

.faq summary {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-dark);
  cursor: pointer;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::before {
  content: "＋";
  color: var(--c-text-secondary);
  margin-right: 8px;
  font-weight: 400;
}

.faq details[open] summary::before { content: "－"; }

.faq details p {
  padding: 0 16px 14px;
  font-size: 15px;
  color: #555;
}

/* ---------- 13. TG 群卡片 ---------- */
.tg-card {
  background: var(--c-bg-light);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 28px 0;
}

.tg-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 8px;
}

.tg-card p {
  font-size: 15px;
  color: #555;
  margin-bottom: 12px;
}

.tg-card .btn-secondary { display: inline-flex; }

/* ---------- 14. 面包屑 ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--c-text-secondary);
  padding: 14px 0 0;
}

.breadcrumb a { color: var(--c-text-secondary); }
.breadcrumb a:hover { color: var(--c-dark); }

.breadcrumb .sep { margin: 0 6px; }

/* ---------- 15. 移动端底部 sticky 转化栏 ---------- */
.stickybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--sticky-bar-height);
  background: var(--c-dark);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.stickybar-text {
  color: var(--c-white);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.stickybar .btn-primary {
  min-height: 40px;
  padding: 0 20px;
  font-size: 15px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .stickybar { display: none; }  /* 桌面端隐藏，改为顶栏 CTA + 侧边卡 */
}

/* ---------- 16. 桌面端侧边随屏返佣码卡 ---------- */
.side-ref-card {
  display: none;
}

@media (min-width: 1200px) {
  .side-ref-card {
    display: block;
    position: fixed;
    top: 120px;
    right: 24px;
    width: 220px;
    z-index: 90;
  }
  .side-ref-card .ref-card { margin: 0; padding: 16px; }
  .side-ref-card .ref-code { font-size: 18px; }
}

/* ---------- 17. 首页专属 ---------- */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero-title {
  font-size: 26px;
  line-height: 1.4;
  color: var(--c-dark);
  font-weight: 700;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .hero-title { font-size: 30px; }
}

.hero-sub {
  font-size: 16px;
  color: var(--c-text-secondary);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-actions { flex-direction: row; justify-content: center; }
}

.section-title {
  font-size: var(--fs-h2);
  color: var(--c-dark);
  font-weight: 700;
  border-left: 4px solid var(--c-binance-yellow);
  padding-left: 10px;
  margin: 40px 0 16px;
  line-height: 1.5;
}

.path-group { margin-bottom: 24px; }

.path-group-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 10px;
}

.path-list {
  list-style: none;
  padding: 0;
  border: var(--border-hair) solid var(--c-divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.path-list li + li { border-top: var(--border-hair) solid var(--c-divider); }

.path-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap-min);
  padding: 10px 16px;
  font-size: 16px;
  color: var(--c-text);
  background: var(--c-white);
}

@media (min-width: 768px) {
  .path-list a:hover { background: var(--c-bg-light); } /* 桌面 hover 态 */
}

.path-list .arrow { color: var(--c-text-secondary); font-size: 14px; }

.path-list .tag {
  font-size: 12px;
  color: var(--c-text-secondary);
  background: var(--c-bg-light);
  border-radius: 4px;
  padding: 3px 8px;
  margin-left: 10px;
}

.trust-block {
  background: var(--c-bg-light);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 32px 0;
}

.trust-block h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 8px;
}

.trust-block p { font-size: 15px; color: #555; margin-bottom: 8px; }
.trust-block p:last-child { margin-bottom: 0; }

/* ---------- 18. 页脚 ---------- */
.site-footer {
  border-top: var(--border-hair) solid var(--c-divider);
  padding: 28px 0 32px;
  font-size: 13px;
  color: var(--c-text-secondary);
}

.site-footer p { margin-bottom: 8px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.footer-links a { color: var(--c-text-secondary); }
.footer-links a:hover { color: var(--c-dark); }

.footer-disclaimer {
  line-height: 1.7;
  color: var(--c-text-secondary);
}

/* ---------- 19. 无障碍与细节 ---------- */
.btn:focus-visible,
.btn-copy:focus-visible,
.faq summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--c-dark);
  outline-offset: 2px;
}

::selection { background: var(--c-binance-yellow); color: var(--c-dark); }
