/* ChuhaiCRM site. Mobile first — every rule below is the 375px layout, and the
   two media queries at the bottom widen it.

   ⛔ 2026-11-09 改版：原来每一行之间都是 1px 灰线，整页看下来就是一张 README
      表格（需求方原话「这线太丑」）。现在分组靠**层次**：留白、字号对比、
      左侧强调条、底色块。全站只剩三处真正的线（顶栏下沿、页脚上沿、步骤的粗线），
      都在"分隔两个区域"而不是"分隔两条数据"。
      加新模块时不要再回到「每行一条 border-bottom」。 */

:root {
  /* 深色是唯一配色（需求方 2026-11-09 定：保留深色但要好看）。
     不再做 light/dark 两套：两套都要维护，而官网只有一屏多内容，
     浅色那套从来没人看过。 */
  --bg: #0b1017;
  /* 比 --bg 亮一档，用来把一组内容"托"起来代替画线 */
  --surface: #121a24;
  --surface-2: #18222e;
  --ink: #e9eef4;
  --muted: #94a3b4;
  --faint: #6b7a8c;
  --accent: #3dd0f5;
  --accent-ink: #0b1017;
  /* 强调色的淡色底，用于 notice / 标签 */
  --accent-soft: rgba(61, 208, 245, 0.1);
  --edge: #22303f;
  --gutter: 16px;
  --measure: 64ch;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  /* Nothing may push the page sideways. */
  overflow-x: hidden;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #7fe2fb; }

/* ── header ─────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--edge);
  position: sticky;
  top: 0;
  /* 半透明 + 模糊：滚动时内容从下面透出来，比实心色块少一道硬边 */
  background: rgba(11, 16, 23, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  z-index: 10;
}
.bar {
  display: flex;
  align-items: center;
  /* 窄屏 gap 收紧，省下来的空间留给登录按钮 */
  gap: 8px;
  min-height: 58px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: -0.2px;
}
.brand img { width: 26px; height: 26px; display: block; flex: none; }
/* ⛔ 360px 以下（iPhone SE 这类）藏掉品牌文字，只留 logo。
   否则「品牌字 + 三个语言键 + 登录」放不下，顶栏撑到 330–347px，
   整页出现横向滚动条。logo 自己已经能认出是谁，且它本身就是回首页的链接。
   2026-11-09 加登录按钮时 ui-check 在 320px 抓到。 */
@media (max-width: 359px) {
  .brand-name { display: none; }
  /* 文字藏了之后链接只剩 logo 的 26px 宽，低于 44px 触控目标。
     给它补足宽度（左对齐，视觉上 logo 仍贴着页面左边）。 */
  .brand { min-width: 44px; justify-content: flex-start; }
}

/* Section links are noise on a phone; the page is short enough to scroll. */
.bar nav { display: none; }

.langs { display: flex; gap: 2px; font-size: 13px; }
.langs a {
  color: var(--muted);
  text-decoration: none;
  /* A two-letter label is nowhere near a 44px touch target on its own, so the
     padding is doing the work here, not the text.

     ⛔ 手机上 min-width 收到 34px：品牌 + 三个 44px 语言键 + 登录按钮
        在 375px 里放不下，会把顶栏撑到 385px，**整页出现横向滚动条**
        （2026-11-09 加登录时 ui-check 抓到，见 admin-ui/pitfalls.md）。
        高度仍是 44px，竖向触控目标不缩水；横向 34px 配上 2px 间距，
        手指点两个字母的键够用。700px 以上恢复 44px。 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 44px;
  border-radius: 6px;
}
.langs a:hover { background: var(--surface-2); color: var(--ink); }
.langs a[aria-current='true'] { color: var(--ink); font-weight: 700; }

/* 顶栏里的按钮。描边样式，不用实心强调色 ——
   一页只能有一个主按钮样式，那个给首屏的主 CTA。
   登录是"已经认识我们的人"才点的，不该比首屏主按钮还抢眼。 */
.bar .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-login {
  border-color: var(--edge);
  background: var(--surface);
  color: var(--ink);
  /* 和语言切换之间留一口气，不然两者糊在一起像一个控件 */
  margin-left: 6px;
  flex: none;
}
.btn-login:hover { border-color: var(--accent); color: var(--accent); }

/* ── hero ───────────────────────────────────────────────── */

.hero {
  padding: 48px 0 44px;
  /* 顶部一团很淡的辉光代替原来的分隔线：给首屏一个焦点，
     又不会像整块底色那样把首屏切成一个"盒子"。 */
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(61, 208, 245, 0.13), transparent 70%),
    radial-gradient(700px 380px at 95% 0%, rgba(99, 132, 255, 0.09), transparent 70%);
}
.hero h1 {
  margin: 0 0 16px;
  font-size: 33px;
  line-height: 1.16;
  letter-spacing: -0.8px;
  font-weight: 700;
  max-width: 18ch;
}
.hero .lead {
  margin: 0 0 22px;
  font-size: 17px;
  color: var(--muted);
  max-width: var(--measure);
}

/* 全站唯一带框的强调块，装的是"这东西还不能用"那句话 ——
   访客最容易跳过、又最需要读到的一句。 */
.notice {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--ink);
  max-width: var(--measure);
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;          /* touch target */
  padding: 0 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
/* 主按钮是整页最重的一块：实心强调色。一页只有一个这种样式。 */
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #7fe2fb; color: var(--accent-ink); }
.btn-secondary { border-color: var(--edge); color: var(--ink); background: var(--surface); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }

/* 首屏下方一行硬事实（代替编造的"客户数"）。
   大数字 + 小标签，是 growth-site-design 说的"信息密集但有层次"。 */
.facts {
  display: grid;
  /* 列数写死：auto-fit 最后一行会空一块 */
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 28px 0 0;
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact { background: var(--bg); padding: 16px 14px; }
.fact b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1.1;
}
.fact span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ── sections ───────────────────────────────────────────── */

section {
  padding: 44px 0;
  /* The header is sticky, so an #anchor jump would park the heading underneath
     it. Offset by a little more than the header's height. */
  scroll-margin-top: 70px;
}
/* 相邻区块靠底色交替区分，不画线 */
section.alt { background: var(--surface); }

section > .wrap > h2 {
  margin: 0 0 6px;
  font-size: 23px;
  letter-spacing: -0.4px;
  font-weight: 700;
}
section > .wrap > .sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  max-width: var(--measure);
}

/* 状态 / 技术栈：原来是每行一条灰线的定义列表（那就是"太丑的线"）。
   现在每行是一块独立的面板，靠底色和间距分开。 */
.rows {
  margin: 0;
  display: grid;
  gap: 10px;
}
.row {
  margin: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
/* 在 alt 底色上的区块要反过来，否则两者同色等于没有面板 */
section.alt .row { background: var(--bg); }
.row dt {
  font-weight: 650;
  font-size: 15px;
  margin: 0 0 5px;
  color: var(--ink);
}
.row dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  /* Long sentences wrap; they never force a horizontal scrollbar. */
  overflow-wrap: anywhere;
}
.row code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  color: #cfe8f5;
  padding: 1px 5px;
  border-radius: 4px;
  /* 长命令不准撑出横向滚动条 */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
section.alt .row code { background: var(--surface-2); }

/* 状态标记：✅/⚠️/⬜ 原来混在正文里，现在做成小标签靠右，一眼能扫完 */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: 2px;
  white-space: nowrap;
}
.tag-done { background: rgba(61, 208, 245, 0.14); color: var(--accent); }
.tag-wip  { background: rgba(245, 183, 61, 0.14); color: #f5b73d; }
.tag-todo { background: rgba(148, 163, 180, 0.14); color: var(--muted); }

/* Running prose (the license section). Capped at --measure so lines stay
   readable on a wide screen instead of running the full width. */
.prose {
  margin: 0 0 14px;
  font-size: 15px;
  max-width: var(--measure);
  overflow-wrap: anywhere;
  color: var(--muted);
}
.prose strong { color: var(--ink); font-weight: 650; }
.prose.muted { margin-bottom: 0; }

/* Numbered steps: big numeral, thick rule above.
   这里的线是**区域分隔**（三个步骤之间），不是每条数据一根，所以保留。 */
.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--edge);
  padding: 16px 0 18px 42px;
  position: relative;
  font-size: 15px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 13px;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* 底部转化条：一条细线横条，不是整节（growth-site-design 的要求） */
.cta-band {
  margin: 0;
  padding: 24px 0 40px;
}
.cta-band .inner {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 22px 18px;
}
.cta-band h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.3px; }
.cta-band p { margin: 0 0 18px; color: var(--muted); font-size: 15px; max-width: var(--measure); }

/* ── footer ─────────────────────────────────────────────── */

footer {
  padding: 26px 0 40px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--edge);
}
footer .brandline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--ink);
}
footer .brandline img { width: 20px; height: 20px; }
footer .links { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
footer .links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-right: 10px;
}

/* ── wider screens ──────────────────────────────────────── */

@media (min-width: 700px) {
  :root { --gutter: 24px; }
  .langs a { min-width: 44px; }
  .bar nav { display: flex; gap: 20px; font-size: 14px; }
  .bar nav a { color: var(--muted); text-decoration: none; }
  .bar nav a:hover { color: var(--ink); }
  .hero { padding: 84px 0 68px; }
  .hero h1 { font-size: 46px; }
  .hero .lead { font-size: 18px; }
  section { padding: 64px 0; }
  section > .wrap > h2 { font-size: 27px; }

  /* 列数写死成 4，不用 auto-fit */
  .facts { grid-template-columns: repeat(4, 1fr); }
  .fact { padding: 18px 16px; }
  .fact b { font-size: 27px; }

  /* Two columns only once there is room for both to stay readable. */
  .row {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
    padding: 18px 20px;
  }
  .row dt { margin: 0; }

  .cta-band .inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 26px 28px;
  }
  .cta-band .inner > div { flex: 1; }
  .cta-band p { margin-bottom: 0; }
}

@media (min-width: 1000px) {
  .hero h1 { font-size: 52px; }
}

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