/* ==========================================================================
   聚合收银台官网 · 暗色金融终端

   设计立场（改之前先读这段）：
   - 这个站是深色的，不做浅色模式。深色不是"配色偏好"而是这套设计的身份：
     可见网格 + 电光蓝 + 等宽数字，整体是一台金融数据终端。换成浅色就只剩
     一个普通 SaaS 站了。管理后台是另一套（浅色），两者不共用样式。
   - 电光蓝 --live 只给"活跃数据"用：净额、LIVE 指示、当前叙事步骤。
     用来当装饰色会立刻稀释掉它的信号价值。
   - 数字一律 --mono + tabular-nums。这是支付站，金额和单号差一位就是事故。
   - 圆角只有 --r / --r-lg 两档，且都很小：终端界面不该有圆润感。
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("/site/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  /* 只覆盖西文，中文交给系统字体：中文字体几 MB，而这个站没有构建步骤、
     做不了子集化。 */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/site/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2212, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  --bg: #08090b;
  --panel: #0e1013;
  --panel-2: #131619;
  --line: #1a1d22;
  --line-2: #262a31;

  --ink: #e9ecf1;
  --ink-2: #8b939f;
  --ink-3: #656d7a;

  /* 电光蓝（NickPay 品牌色，2026-09-18 起；此前是磷光绿）。只给活跃数据，不当装饰色。
     --live 在 --bg 上 8.1:1、--live-dim 5.9:1，都在 AA 线上；改色先复算。 */
  --live: #5aa9ff;
  --live-dim: #3d8ee6;
  --live-deep: #041020;
  --live-wash: rgba(90, 169, 255, 0.07);

  --r: 3px;
  --r-lg: 5px;
  /* 窗口框里的图比外框再小一档，看起来才像"嵌进去"而不是"贴上去" */
  --r-inset: 2px;
  --r-pill: 99px;

  --sans: "Geist", system-ui, -apple-system, "PingFang SC",
    "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "PingFang SC", monospace;

  --maxw: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 可见网格是这套设计的骨架，不是装饰：它把页面变成一张"数据台的台面"。
   用 fixed + 遮罩让它在顶部最清晰、往下淡出，避免整页都被格子吵到。
   放在 body::before 且 pointer-events:none，不参与任何命中测试。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(125% 78% at 50% 0%, #000 26%, transparent 76%);
  mask-image: radial-gradient(125% 78% at 50% 0%, #000 26%, transparent 76%);
}

body > * {
  position: relative;
  z-index: 1;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 全站数字等宽等距。这是支付站：金额、费率、单号在任何位置都要能
     竖着对齐，也不能因为字重变化而跳动。 */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv01" 1, "ss01" 1;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.14;
  /* 中文没有连字，关掉可以避免某些系统字体下的异常字距 */
  font-feature-settings: "tnum" 1;
}

/* 大字号需要更紧的字距，小字号需要更松。字距是随字号变的，
   一个 letter-spacing 打天下会让大标题显松、小标签显挤。 */
h1 {
  letter-spacing: -0.032em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

code,
pre,
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* 焦点环：键盘可见、鼠标不打扰。金融站尤其不能省这个。 */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 3px;
  border-radius: var(--r);
}

::selection {
  background: var(--live-wash);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.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;
}

/* --- 焦点可见性：键盘导航必须看得见 ---------------------------------- */
:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 3px;
  border-radius: var(--r);
}

/* ==========================================================================
   导航：单行，高度 64px，滚动后加边框
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* 滚动后显出分隔线。用 CSS 滚动时间线而不是 JS：这是纯装饰，
   不值得为它多挂一个 observer。不支持的浏览器降级为常驻分隔线。 */
.nav {
  border-bottom-color: var(--line);
}

@supports (animation-timeline: scroll()) {
  .nav {
    border-bottom-color: transparent;
    animation: nav-divider linear both;
    animation-timeline: scroll();
    animation-range: 0 72px;
  }

  @keyframes nav-divider {
    to {
      border-bottom-color: var(--line);
    }
  }
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 660;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

/* Logo：方框内两条反向资金流。闪烁的光标是这套终端语言的签名，
   放在右下角当"还在运行"的信号；reduced-motion 下停在常亮。 */
.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--live);
  align-self: center;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 5px;
  height: 5px;
  background: var(--live);
  animation: cursor-blink 1.5s steps(1) infinite;
}

@keyframes cursor-blink {
  0%, 56% { opacity: 1; }
  57%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark::after {
    animation: none;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline-start: auto;
  font-size: 14.5px;
  color: var(--ink-2);
}

.nav-links a {
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}

/* 小屏收起次级导航，但主要入口必须留着，否则小屏用户无路可走 */
@media (max-width: 900px) {
  .nav-links {
    gap: 14px;
    font-size: 14px;
  }

  .nav-links a:not([data-keep]):not(.btn) {
    display: none;
  }
}

@media (max-width: 400px) {
  .nav-links a[data-keep] {
    display: none;
  }
}

/* ==========================================================================
   按钮：两档，一档实心一档描边。文字恒定单行。
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding-inline: 22px;
  border-radius: var(--r);
  font-size: 15px;
  font-weight: 540;
  font-family: inherit;
  letter-spacing: -0.008em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.14s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

/* 深色底上的亮绿按钮不能带同色投影：那不是阴影，是霓虹外发光。
   实体感改用内高光 + 黑色投影，hover 时提亮而不是变暗。 */
.btn-primary {
  background: var(--live);
  color: var(--live-deep);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.28),
    0 1px 2px rgb(0 0 0 / 0.6);
}

.btn-primary:hover {
  background: #22f0a0;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.34),
    0 4px 10px rgb(0 0 0 / 0.5);
}

.btn-ghost {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

.btn-ghost:hover {
  background: var(--panel-2);
  border-color: var(--ink-3);
  transform: translateY(-1px);
}

/* 深色下主按钮不能用强调色投影：浅色模式里那是深绿落在白底，
   读作阴影；深色模式里 accent 是亮绿，落在近黑底上就变成霓虹外发光。
   同一段 CSS 在两个模式里是两种观感，所以深色单独给中性投影。 */
/* 按下去要有物理反馈：位移归零 + 轻微缩放，投影同时收紧 */
.btn:active {
  transform: translateY(0) scale(0.985);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.12);
}

.btn-sm {
  height: 36px;
  padding-inline: 14px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn:hover,
  .btn:active {
    transform: none;
  }
}

/* ==========================================================================
   区块骨架
   ========================================================================== */
section {
  padding-block: 84px;
  border-top: 1px solid var(--line);
}

section:first-of-type {
  border-top: 0;
}

@media (max-width: 720px) {
  section {
    padding-block: 64px;
  }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  /* 字距只对西文有意义。中文是方块字，0.14em 那种 tracking 会把
     一行汉字排得七零八落，这里压到刚好能拉开西文的程度。 */
  letter-spacing: 0.05em;
  color: var(--live);
  margin-bottom: 14px;
}

.sec-head {
  max-width: 60ch;
  margin-bottom: 48px;
}

.sec-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.sec-head p {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 17px;
  max-width: 62ch;
}

/* ==========================================================================
   Hero：左文右代码，非居中。桌面 1.05fr / 1fr
   ========================================================================== */
.hero {
  padding-top: 76px;
  padding-bottom: 72px;
  position: relative;
}

/* 一条极淡的强调色渐变压在页面顶端。不是装饰性的光晕，
   而是给首屏一个色温起点，往下滚会自然褪掉。 */
.hero::before {
  content: "";
  position: absolute;
  inset: -80px 0 auto 0;
  height: 420px;
  background: radial-gradient(
    62% 100% at 18% 0%,
    color-mix(in oklab, var(--live) 9%, transparent),
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

/* 非对称分栏：文案栏比资产栏宽，两栏顶部对齐而不是垂直居中。
   居中会让两栏的视觉重心互相牵制，顶对齐读起来更有方向感。 */
.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.92fr;
  gap: 64px;
  align-items: start;
}

/* 字号按最长一行（10 个汉字）反推：留 2 行以内，不靠 <br> 硬凑 */
.hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.034em;
  line-height: 1.12;
}

.hero-sub {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 36ch;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .hero-sub {
    max-width: none;
  }
}

/* ==========================================================================
   代码块
   ========================================================================== */
.code {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.5);
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
}

.code-bar .method {
  color: var(--live);
  font-weight: 600;
}

.code pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  tab-size: 2;
}

.code pre::-webkit-scrollbar {
  height: 8px;
}

.code pre::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: var(--r-lg);
}

/* 极轻量高亮：只区分键名、字符串、注释，不做彩虹配色 */
.t-key {
  color: var(--ink-2);
}

.t-str {
  color: var(--live);
}

.t-com {
  color: var(--ink-3);
  font-style: normal;
}

.copy-btn {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 3px 9px;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

/* ==========================================================================
   底线区：非对称 bento，2 大 2 小
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.bento-cell {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 210px;
}

.bento-cell h3 {
  font-size: 20px;
}

.bento-cell p {
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 46ch;
}

/* 两个重点格用强调底纹拉开层级，不靠图标 */
.bento-cell[data-feature] {
  background: linear-gradient(
    150deg,
    var(--live-wash) 0%,
    var(--panel) 62%
  );
}

.bento-figure {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.9;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.bento-figure b {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 860px) {
  .bento {
    grid-template-columns: 1fr;
  }

  .bento-cell {
    padding: 24px;
    min-height: 0;
  }
}

/* ==========================================================================
   接入流程：左侧步骤竖轴，右侧代码
   ========================================================================== */
.flow {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  inset-block: 14px 14px;
  inset-inline-start: 15px;
  width: 1px;
  background: var(--line);
}

.step {
  position: relative;
  padding-inline-start: 52px;
  padding-block-end: 32px;
}

.step:last-child {
  padding-block-end: 0;
}

.step-no {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}

.step[data-active] .step-no {
  border-color: var(--live);
  background: var(--live);
  color: var(--live-deep);
}

.step h3 {
  font-size: 17.5px;
  padding-top: 4px;
}

.step p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 15px;
}

.step-note {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

@media (max-width: 940px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ==========================================================================
   接口速查：标签切换
   ========================================================================== */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 28px;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--r);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.panel[hidden] {
  display: none;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 940px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

.panel-lead {
  margin-bottom: 24px;
  color: var(--ink-2);
  max-width: 68ch;
  font-size: 15.5px;
}

.panel-lead b {
  color: var(--ink);
  font-weight: 600;
}

/* ==========================================================================
   费用规则：大数字演算
   ========================================================================== */
.calc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.calc-cell {
  background: var(--panel);
  padding: 28px 26px;
}

.calc-label {
  font-size: 13.5px;
  color: var(--ink-2);
}

.calc-value {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.calc-cell[data-emph] .calc-value {
  color: var(--live);
}

.calc-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--mono);
}

@media (max-width: 780px) {
  .calc {
    grid-template-columns: 1fr;
  }
}

.rule-list {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
}

.rule-list > div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.rule-list h4 {
  font-size: 15.5px;
}

.rule-list p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 14.5px;
}

@media (max-width: 780px) {
  .rule-list {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   错误码：按语义分三组，组内不画满格横线
   ========================================================================== */
.errs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.err-group {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  background: var(--panel);
}

.err-group h3 {
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 560;
  margin-bottom: 18px;
}

.err-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding-block: 9px;
}

.err-code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--live);
  font-weight: 600;
}

.err-desc {
  font-size: 14.5px;
}

.err-desc span {
  display: block;
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 2px;
}

@media (max-width: 940px) {
  .errs {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   常见问题：原生 details
   ========================================================================== */
.faq {
  max-width: 78ch;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding-block: 20px;
  font-size: 17px;
  font-weight: 560;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  transition: color 0.18s var(--ease);
}

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

.faq summary:hover {
  color: var(--live);
}

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 19px;
  color: var(--ink-3);
  line-height: 1.3;
  flex: none;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq-body {
  padding-bottom: 22px;
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 68ch;
}

.faq-body p + p {
  margin-top: 12px;
}

.faq-body code {
  font-size: 13.5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1px 5px;
}

/* ==========================================================================
   收尾行动区 + 页脚
   ========================================================================== */
.closing {
  background: var(--panel);
}

.closing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.closing h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  max-width: 20ch;
}

.closing p {
  margin-top: 14px;
  color: var(--ink-2);
  max-width: 46ch;
}

.footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  font-size: 14px;
  color: var(--ink-3);
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer a {
  text-decoration: none;
  color: var(--ink-2);
}

.footer a:hover {
  color: var(--ink);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ==========================================================================
   入场动画：只做一次，reduced-motion 直接跳过
   ========================================================================== */
/* 入场动画只在 JS 成功接管后启用（<head> 里那行脚本会打上 .js）。
   内容默认可见：若没有这层保护，脚本报错、被 CSP 拦截，或 IntersectionObserver
   因任何原因不投递回调，带 .reveal 的区块会永久停在 opacity 0，整页近乎空白。 */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal[data-shown] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   文档页头（docs.html）
   ========================================================================== */
.docs-head {
  padding-block: 72px 56px;
}

.docs-head h1 {
  font-size: clamp(32px, 4.4vw, 46px);
  letter-spacing: -0.03em;
}

.docs-lead {
  margin-top: 18px;
  font-size: 17.5px;
  color: var(--ink-2);
  max-width: 62ch;
}

.docs-meta {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}

/* ==========================================================================
   首页 Hero 右侧：一笔钱从支付到可提现走完的四段
   ========================================================================== */
/* ==========================================================================
   首屏终端卡：真实下单报文
   ========================================================================== */
.termcard {
  border: 1px solid var(--line-2);
  background: var(--panel);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.55);
}

/* 极淡的扫描线。只在这一块用，给"终端"一点材质，
   不铺到全页——满屏扫描线会让正文难读。 */
.termcard::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgb(255 255 255 / 0.016) 0 1px,
    transparent 1px 3px
  );
}

.termcard-head,
.ledger-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

.tc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  flex: none;
}

.tc-live {
  margin-inline-start: auto;
  color: var(--live);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 呼吸的 LIVE 指示。这是全站唯一的循环动画：
   它说明"系统在跑"，是有信息量的，不是装饰。 */
.tc-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: live-pulse 2.4s var(--ease) infinite;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(0 224 138 / 0.45); }
  60% { box-shadow: 0 0 0 6px rgb(0 224 138 / 0); }
}

.termcard-body {
  margin: 0;
  padding: 15px 16px;
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: 1.85;
  color: var(--ink-2);
  overflow-x: auto;
}

.termcard-body code {
  font-family: inherit;
  letter-spacing: -0.005em;
}

.c-k { color: var(--ink-3); }
.c-s { color: var(--ink); }
.c-ok { color: var(--live); }
.c-c { color: var(--ink-3); opacity: 0.75; }

.termcard-sep {
  padding: 7px 16px;
  border-block: 1px solid var(--line);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--live);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   滚动叙事：左侧解说推进，右侧账目面板钉住并逐行点亮
   ========================================================================== */
.story {
  padding-block: 84px 96px;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.story-lede {
  margin-bottom: 88px;
}

.story-lede h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.03em;
}

.story-sub {
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 16.5px;
  max-width: 40ch;
}

/* 每一段解说占约一屏高，滚动一屏推进一步。
   低于这个高度的话，两步会在同一屏里同时出现，叙事就散了。 */
.beat {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline-start: 26px;
  border-inline-start: 1px solid var(--line-2);
  opacity: 0.34;
  transition: opacity 0.45s var(--ease), border-color 0.45s var(--ease);
}

.beat.is-on {
  opacity: 1;
  border-inline-start-color: var(--live);
}

.beat-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  transition: color 0.45s var(--ease);
}

.beat.is-on .beat-no {
  color: var(--live);
}

.beat h3 {
  font-size: 23px;
  margin-bottom: 12px;
}

.beat p {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 38ch;
}

.story-stage {
  position: sticky;
  /* 64 是导航高度，再留一段呼吸；面板在视口偏上，
     让下方还能看到正在推进的解说。 */
  top: 108px;
}

.ledger {
  border: 1px solid var(--line-2);
  background: var(--panel);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.55);
}

.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  opacity: 0.3;
  transition: opacity 0.5s var(--ease), background-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

/* 已经走过的步骤保持可读，当前步骤高亮：
   资金流转是累积的，走过的不该消失。 */
.ledger-row.is-done {
  opacity: 0.62;
}

.ledger-row.is-on {
  opacity: 1;
  background: linear-gradient(90deg, var(--live-wash), transparent 74%);
  box-shadow: inset 2px 0 0 var(--live);
}

.lr-k {
  font-size: 14px;
  color: var(--ink-2);
}

.lr-k b {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
  margin-bottom: 3px;
}

.lr-v {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
}

.lr-v i {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  margin-inline-start: 6px;
}

.ledger-row.is-on .lr-v {
  color: var(--live);
}

.ledger-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}

.lf-ok {
  color: var(--live-dim);
}

@media (max-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* 窄屏没有并排空间，面板改为吸顶，解说在下面推进 */
  .story-stage {
    order: -1;
    position: sticky;
    top: 72px;
    z-index: 2;
  }

  .story-lede {
    margin-bottom: 40px;
  }

  .beat {
    min-height: 50vh;
  }
}

/* ==========================================================================
   首页能力区：文字主导，靠顶线分组，不堆卡片
   ========================================================================== */
.caps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 52px 64px;
}

/* 四个能力块靠上边线分隔而不是卡片（Section 4.4：能用间距和线就别用卡）。
   原来是 2px 纯文字色，四条并排读起来像四根横杠；改成发丝线打底、
   起笔处一小段强调色，既分了组又给了方向。 */
.cap {
  border-top: 1px solid var(--line-2);
  padding-top: 22px;
  position: relative;
}

.cap h3 {
  font-size: 21px;
  margin-bottom: 12px;
}

.cap p {
  color: var(--ink-2);
  font-size: 16px;
  max-width: 44ch;
}

.cap-tag {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--live);
  border: 1px solid color-mix(in srgb, var(--live) 34%, transparent);
  border-radius: var(--r);
  padding: 3px 10px;
}

.cap::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--live);
}

/* ==========================================================================
   首页数字带
   ========================================================================== */
.trust {
  background: var(--panel);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.trust-label {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 570;
}

.trust-note {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-2);
  max-width: 30ch;
}


/* 窄屏塌陷。这几条在改版时随旧区块一起被切掉过，
   表现是 390px 下四个数字仍挤成一行——每个多列布局都必须显式声明塌陷。 */
@media (max-width: 820px) {
  .caps {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 860px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 520px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   首页接入三步
   ========================================================================== */
.onboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.onboard-cell {
  background: var(--panel);
  padding: 32px 28px;
}

.onboard-cell h3 {
  font-size: 17.5px;
  margin-block: 14px 10px;
}

.onboard-cell p {
  color: var(--ink-2);
  font-size: 15px;
}

.onboard-no {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--live);
  letter-spacing: 0.08em;
}

@media (max-width: 820px) {
  .onboard {
    grid-template-columns: 1fr;
  }
}

/* 标题里不能被拆散的语义块（例如「一个后台管完」整体换行） */
.nb {
  white-space: nowrap;
}

/* 数字用等宽保持对齐，中文单位回到正文字体，避免 mono 把汉字撑开 */
.trust-value {
  font-family: var(--mono);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--live);
  font-variant-numeric: tabular-nums;
}

.trust-value .unit {
  font-family: var(--sans);
  font-size: 0.55em;
  font-weight: 560;
  letter-spacing: 0;
  margin-inline-start: 6px;
  color: var(--ink);
}


/* 窄屏下金额换行到说明文字下方，两边都留得住完整一行 */
@media (max-width: 560px) {
  .fstep {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .fstep-amount {
    font-size: 18px;
  }

  .flowcard-body,
  .flowcard-head,
  .flowcard-foot {
    padding-inline: 18px;
  }
}

/* 代付银行代码表（docs 代付 tab，可折叠） */
.banks { margin: 4px 0 16px; }
.banks summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.banks[open] summary { margin-bottom: 8px; }
.bank-list { columns: 2; column-gap: 32px; }
@media (max-width: 720px) { .bank-list { columns: 1; } }
.bank-row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding-block: 5px; break-inside: avoid; font-size: 13px; }
.bank-code { font-family: var(--mono); color: var(--live); font-weight: 600; }
.bank-name span { display: block; font-size: 12px; color: var(--muted); }
