/* ===========================================================
   0成本副业社 · 全站样式
   风格：纸感底 + 墨色 + 单一朱红强调色，细线分隔的编辑排版
   移动端优先，断点 600 / 900 / 1280 / 1600
   =========================================================== */

:root {
  /* 底色：暖纸，不是纯白 */
  --paper: #f4f1ea;
  --paper-2: #eae5da;
  --card: #fffdf8;

  /* 墨色三级 */
  --ink: #17181a;
  --ink-2: #3c4147;
  --ink-3: #5f656d;   /* 小字用，已按 WCAG 4.5:1 调深 */
  --ink-4: #7e848c;   /* 仅装饰用 */

  /* 细线 */
  --line: #e2dbcd;
  --line-2: #d3c9b7;

  /* 唯一强调色：朱红（小字与按钮都满足 4.5:1） */
  --signal: #bd3818;
  --signal-dark: #9b2f14;
  --signal-soft: #fbeee8;
  --ok: #1f6b4a;

  --r: 8px;
  --r-sm: 6px;
  --shell: 640px;
  --measure: 33em;   /* 正文最长阅读宽度 */
}

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

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

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  /* 顶部一点点暖光，避免整页死平 */
  background-image: radial-gradient(125% 70% at 50% -10%, #fdfbf6 0%, var(--paper) 60%);
  background-repeat: no-repeat;
}

::selection { background: rgba(189, 56, 24, .18); }

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 18px;
  counter-reset: sec;
}

main { padding-bottom: 52px; }

code {
  padding: 1px 5px; border-radius: 4px;
  background: var(--paper-2); font-size: .92em;
}

/* 后台可配的正文块：服务端渲染好的 <p> 注进来，这里统一间距 */
[data-cms-html] p { margin: 0 0 12px; }
[data-cms-html] p:last-child { margin-bottom: 0; }

/* ---------- 注册二维码 ---------- */
.qr-block {
  display: flex; gap: 16px; align-items: center;
  margin: 18px 0 0; padding: 16px;
  background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--r);
}
.qr-img {
  flex: 0 0 auto; width: 132px; height: 132px;
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff; object-fit: contain;
}
.qr-text h2 { margin: 0 0 6px; font-size: 16px; line-height: 1.5; }
.qr-text p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-3); }
.gate .qr-block { margin-top: 16px; background: #fff; }

@media (max-width: 420px) {
  .qr-block { flex-direction: column; align-items: flex-start; gap: 12px; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 报头 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink);
}
.topbar .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding-top: 12px; padding-bottom: 12px;
  counter-reset: none;
}
.brand {
  position: relative;
  padding-left: 14px;
  color: #fff; font-size: 16px; font-weight: 800;
  letter-spacing: .01em; text-decoration: none;
}
.brand::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 7px; height: 7px; margin-top: -4px;
  background: var(--signal);
}
.brand-tag {
  font-size: 11.5px; letter-spacing: .06em;
  color: rgba(247, 244, 238, .6); white-space: nowrap;
}

/* ---------- 首屏 ---------- */
.hero { padding: 30px 0 24px; }

.eyebrow {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 16px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--signal);
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--signal); }

h1 {
  margin: 0 0 16px;
  font-size: clamp(23px, 6vw, 40px);
  font-weight: 800; line-height: 1.34; letter-spacing: -.015em;
}
/* 关键短语加一道记号笔底色 */
h1 .mark {
  background-image: linear-gradient(180deg, transparent 64%, rgba(189, 56, 24, .18) 64%);
}

.lede {
  margin: 0; max-width: var(--measure);
  font-size: 17px; color: var(--ink-2);
}

/* ---------- 内容区块：细线分隔，无卡片外壳 ---------- */
.card {
  counter-increment: sec;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.card h2 {
  margin: 0 0 12px; max-width: var(--measure);
  font-size: 18px; font-weight: 700; line-height: 1.5;
}
.card h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block; margin-bottom: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--signal);
}
.card p { margin: 0 0 12px; max-width: var(--measure); color: var(--ink-2); }
.card p:last-child { margin-bottom: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 15px 26px;
  border: 1px solid var(--ink); border-radius: var(--r-sm);
  font-family: inherit; font-size: 16.5px; font-weight: 700; line-height: 1.4;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .06s ease, box-shadow .06s ease;
}
.btn:focus-visible { outline: 3px solid rgba(189, 56, 24, .35); outline-offset: 2px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--signal); color: #fff; border-color: var(--signal);
  box-shadow: 0 3px 0 var(--signal-dark);
}
.btn-primary:hover { background: #a63013; }
.btn-primary:active { transform: translateY(3px); box-shadow: none; }

.btn-copy {
  min-height: 42px; padding: 9px 18px;
  font-size: 14px; font-weight: 700;
  background: transparent; border: 1px solid var(--ink); color: var(--ink);
}
.btn-copy:hover { background: var(--ink); color: #fff; }
.btn-copy.is-copied {
  background: var(--ok); border-color: var(--ok); color: #fff;
}

/* 次要按钮：描边样式，用于「我已注册，进入教程」这类常驻但非主转化入口 */
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #f7f4ee; }

/* ---------- 行动区 ---------- */
.cta-block { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.hint {
  margin: 12px 0 0; font-size: 13px; line-height: 1.75;
  color: var(--ink-3); text-align: center;
}

/* ---------- 提示块（VPN 等） ---------- */
.notice {
  margin: 16px 0; padding: 12px 14px;
  background: var(--signal-soft);
  border-left: 3px solid var(--signal);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13.5px; line-height: 1.75; color: #8a3a1c;
}
.notice strong { color: #6d2a10; }
.cta-block .notice { margin-bottom: 14px; }

/* ---------- 常驻入口：进入教程（次要 CTA，不跟注册按钮抢） ---------- */
.bridge {
  margin: 26px 0 0; padding: 20px;
  background: var(--card);
  border: 1px solid var(--line-2); border-left: 3px solid var(--signal);
  border-radius: 0 var(--r) var(--r) 0;
}
.bridge-text { margin: 0 0 14px; font-size: 15.5px; color: var(--ink-2); }

/* ---------- 底部合规小字 ---------- */
.footer-note {
  margin: 34px 0 0; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.8; color: var(--ink-3);
}

/* ===========================================================
   教程页
   =========================================================== */

/* 顶部通告条 */
.banner {
  margin: 24px 0 0; padding: 13px 16px;
  background: var(--ink); color: #f7f4ee;
  border-left: 3px solid var(--signal);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14.5px; line-height: 1.7;
}

/* 注册提醒（未注册时显示） */
.gate {
  margin: 24px 0 0; padding: 20px;
  background: var(--card);
  border: 1px solid var(--line-2); border-left: 3px solid var(--signal);
  border-radius: 0 var(--r) var(--r) 0;
  animation: fade-up .25s ease both;
}
.gate[hidden] { display: none; }
.gate h2 { margin: 0 0 8px; font-size: 17px; line-height: 1.5; }
.gate p { margin: 0 0 12px; font-size: 14.5px; color: var(--ink-2); }
.gate .hint { text-align: left; margin-top: 10px; }

/* 生成推广码：3 张竖版截图 */
.shots {
  display: flex; gap: 12px; margin: 16px 0 0;
  overflow-x: auto; padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory;
}
.shots figure { flex: 0 0 auto; width: 164px; margin: 0; scroll-snap-align: start; }
.shots img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff;
}
.shots figcaption { margin-top: 9px; font-size: 12.5px; line-height: 1.65; color: var(--ink-3); }
.shots .step-no {
  display: block; margin-bottom: 2px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--signal);
}

/* 时间线 */
.timeline { list-style: none; margin: 18px 0 0; padding: 0; }
.step { position: relative; padding-left: 34px; padding-bottom: 26px; }
.step::before {
  content: ""; position: absolute; left: 9px; top: 26px; bottom: 0;
  width: 1px; background: var(--line-2);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step-dot {
  position: absolute; left: 0; top: 2px;
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 3px;
  background: var(--ink); color: #fff;
  font-size: 11.5px; font-weight: 700;
}
.step-head h3 { margin: 0 0 10px; font-size: 16.5px; line-height: 1.5; }
.step-when {
  margin-left: 8px; font-size: 12px; font-weight: 500;
  color: var(--ink-3); letter-spacing: .02em;
}

/* 文案卡 */
.quote {
  margin: 0 0 14px; padding: 14px 16px;
  background: var(--paper-2);
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 15.5px; line-height: 1.9; color: var(--ink);
}

/* 朋友圈配图 */
.report-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0;
}
.report-grid a {
  display: block; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: #fff;
}
.report-grid img { display: block; width: 100%; height: auto; }
.report-tip { margin: 10px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-4); }

/* 回复话术 */
.faq {
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font-size: 16.5px; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto;
  font-size: 22px; font-weight: 400; line-height: 1;
  color: var(--signal);
}
.faq[open] summary::after { content: "−"; }

.reply-row {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 10px;
  align-items: center; padding: 15px 0;
  border-top: 1px solid var(--line);
}
.reply-q {
  justify-self: start;
  font-size: 13px; font-weight: 700; color: var(--signal); white-space: nowrap;
}
.reply-copy { justify-self: end; }
.reply-a { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 50;
  max-width: 82vw; padding: 11px 18px;
  background: var(--ink); color: #f7f4ee;
  font-size: 14px; border-radius: var(--r-sm);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ===========================================================
   分辨率适配
   =========================================================== */

/* 大手机 / 小平板 */
@media (min-width: 600px) {
  :root { --shell: 620px; }
  .wrap { padding: 0 24px; }
  .hero { padding-top: 38px; }
  .card { padding: 30px 0; }
  .btn-block { width: auto; min-width: 340px; }
  .hint { text-align: left; }
  .shots figure { width: 178px; }
}

/* 平板 / 小笔记本：内容横向铺开 */
@media (min-width: 900px) {
  :root { --shell: 880px; }
  .wrap { padding: 0 32px; }

  h1 { font-size: clamp(30px, 4vw, 42px); }
  .lede { font-size: 18px; }
  .card h2 { font-size: 20px; }

  /* 两条朋友圈并排 */
  .timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
  .step { padding-left: 30px; padding-bottom: 0; }
  .step::before { display: none; }

  /* 3 步截图直接平铺，不再横向滑动 */
  .shots { overflow: visible; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; }
  .shots figure { width: auto; }

  /* 报告图 4 列 */
  .report-grid { grid-template-columns: repeat(4, 1fr); }

  .bridge, .gate { padding: 24px 26px; }
}

/* 桌面 */
@media (min-width: 1280px) {
  :root { --shell: 1000px; }
  .wrap { padding: 0 40px; }
  .hero { padding: 52px 0 30px; }
  .card { padding: 38px 0; }
  .card p, .lede { font-size: 17.5px; }
  h1 { font-size: clamp(38px, 3.2vw, 46px); }
  .footer-note { margin-top: 44px; }
}

/* 大屏 */
@media (min-width: 1600px) {
  :root { --shell: 1120px; }
  h1 { font-size: 48px; }
  .card { padding: 44px 0; }
}

/* 窄屏兜底 */
@media (max-width: 380px) {
  .brand-tag { display: none; }
  .wrap { padding: 0 15px; }
  .shots figure { width: 148px; }
  .btn { font-size: 16px; padding: 14px 20px; }
}

/* 横屏手机，避免首屏太高 */
@media (max-height: 460px) and (orientation: landscape) {
  .hero { padding: 18px 0 14px; }
  h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
