/* ============================================================================
   砺行记账 · 官网样式（极简黑白排版）
   原则：纯白底、黑字、一个克制的蓝做强调；细线分隔、强排版层次；
   纯系统字体（零 webfont、零外部请求、极少流量）；近乎零动画。
   ========================================================================== */

:root {
  --paper: #ffffff;
  --ink: #141414;          /* 主文字 / 强分隔线 */
  --body: #2b2b2b;         /* 正文 */
  --soft: #6a6a6a;         /* 次要文字 */
  --faint: #9a9a9a;        /* 更弱 */
  --line: #e6e6e6;         /* 细分隔线 */
  --line-2: #d0d0d0;       /* 稍强细线 */
  --fill: #f6f6f4;         /* 极浅底（少量使用） */
  --accent: #1d4ed8;       /* 唯一强调色，省着用 */

  --sans: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC",
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Roboto Mono", monospace;

  --wrap: 1000px;
}

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: #141414; color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.accent-link { color: var(--accent); }
.accent-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 区块节奏 ---- */
.section { padding: 76px 0; }
.section--sm { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
main > .section:first-child { border-top: 0; }

.kicker { font-size: 14px; color: var(--soft); margin: 0 0 14px; }
.h-title { font-size: clamp(24px, 3.2vw, 33px); }
.h-lead { margin: 14px 0 0; color: var(--soft); max-width: 60ch; font-size: 16px; }

/* ---- 链接（正文内）---- */
.tlink { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.tlink:hover { border-bottom-color: var(--ink); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; font-size: 15px; font-weight: 600; line-height: 1;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  cursor: pointer; transition: background .15s linear, color .15s linear;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: #000; }
.btn .arw { font-size: 15px; }

/* ---- 导航 ---- */
.nav { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--ink); }
.nav__in { display: flex; align-items: center; height: 60px; gap: 22px; }
.brand { font-weight: 700; color: var(--ink); font-size: 18px; letter-spacing: -0.01em; display: inline-flex; align-items: baseline; gap: 8px; }
.brand b { font-weight: 700; }
.brand .en { font-family: var(--mono); font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: 0; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { font-size: 15px; color: var(--soft); }
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.nav__cta { font-size: 15px; font-weight: 600; color: var(--ink); }
.nav__cta:hover { color: var(--accent); }
.nav__toggle { display: none; }

/* ---- Hero ---- */
.hero { padding: 70px 0 64px; }
.hero__grid { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: start; }
.hero__title { font-size: clamp(34px, 5.2vw, 54px); line-height: 1.12; letter-spacing: -0.022em; }
.hero__title .sub { display: block; color: var(--faint); font-weight: 700; }
.hero__lead { margin: 22px 0 0; font-size: 17px; color: var(--body); max-width: 42ch; }
.hero__lead b { color: var(--ink); font-weight: 600; }
.hero__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { margin-top: 22px; font-size: 13.5px; color: var(--soft); }
.hero__meta .mono { color: var(--faint); }

/* ---- 产品预览（白底黑线，无发光无渐变，静态）---- */
.shot { border: 1px solid var(--ink); background: var(--paper); }
.shot__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--soft); }
.shot__bar .mono { color: var(--faint); font-size: 11px; }
.shot__body { padding: 16px 16px 6px; }
.shot__lbl { font-size: 12px; color: var(--soft); }
.shot__net { font-size: 32px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin: 2px 0 2px; }
.shot__net small { font-size: 18px; color: var(--soft); font-weight: 600; }
.shot__delta { font-size: 12.5px; color: var(--soft); }
.shot__chart { margin: 12px 0 4px; height: 76px; }
.shot__chart svg { width: 100%; height: 100%; overflow: visible; }
.shot__chart .ln { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.shot__chart .base { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 3; }
.shot__rows { border-top: 1px solid var(--line); }
.shot__row { display: flex; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.shot__row:last-child { border-bottom: 0; }
.shot__row .t { font-size: 14px; color: var(--ink); }
.shot__row .t small { display: block; font-size: 11.5px; color: var(--faint); font-weight: 400; }
.shot__row .a { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink); }
.shot__row .a.in { color: var(--accent); }

/* ---- 规格表式网格（功能 / 平台），细线分隔，无卡片 ---- */
.grid { display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.cell { padding: 24px 26px 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell h3 { font-size: 17px; }
.cell h3 .tag { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--soft); border: 1px solid var(--line-2); padding: 1px 5px; margin-left: 8px; vertical-align: 2px; }
.cell p { margin: 9px 0 0; font-size: 14px; color: var(--soft); line-height: 1.66; }

/* ---- 跨平台清单（简单表）---- */
.plats { border-top: 1px solid var(--ink); }
.plat { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.plat .name { font-weight: 600; color: var(--ink); font-size: 16px; }
.plat .desc { color: var(--soft); font-size: 14px; }
.plat .st { font-family: var(--mono); font-size: 12px; color: var(--soft); white-space: nowrap; }
.plat .st.live { color: var(--ink); }

/* ---- 两栏说明（跨平台 / 隐私）---- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.notes { margin: 0; padding: 0; list-style: none; }
.notes li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--body); }
.notes li:first-child { padding-top: 0; }
.notes li b { color: var(--ink); font-weight: 600; }

/* ---- 下载行 ---- */
.dls { border-top: 1px solid var(--ink); }
.dlrow { display: grid; grid-template-columns: 200px 1fr auto; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.dlrow .h h3 { font-size: 18px; }
.dlrow .h .meta { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 4px; }
.dlrow .d { color: var(--soft); font-size: 14px; }
.dlrow .act { display: flex; gap: 10px; justify-content: flex-end; }
.dlrow .soon { font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ---- 步骤 ---- */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 0 0 14px 30px; color: var(--body); font-size: 15px; }
.steps li::before { counter-increment: s; content: counter(s) "."; position: absolute; left: 0; top: 0; font-family: var(--mono); color: var(--soft); }
.steps li b { color: var(--ink); font-weight: 600; }

/* ---- 长文 ---- */
.prose { max-width: 64ch; }
.prose p { margin: 0 0 16px; color: var(--body); }
.prose p b, .prose strong { color: var(--ink); font-weight: 600; }
.prose h3 { font-size: 19px; margin: 34px 0 12px; }
.prose .lead { font-size: 18px; color: var(--ink); }

/* ---- 信息小表（关于）---- */
.facts { border-top: 1px solid var(--line); max-width: 64ch; }
.fact { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.fact .k { color: var(--soft); }
.fact .v { color: var(--ink); }

/* ---- 账号版本表 ---- */
.tier { padding: 22px 0; border-bottom: 1px solid var(--line); }
.tier:first-child { border-top: 1px solid var(--ink); }
.tier h3 { font-size: 18px; }
.tier .meta { font-size: 13px; color: var(--faint); margin: 2px 0 12px; }
.tier ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.tier li { font-size: 14.5px; color: var(--body); padding-left: 20px; position: relative; }
.tier li::before { content: "—"; position: absolute; left: 0; color: var(--faint); }
.tier li.off { color: var(--faint); }
.tier li.off::before { content: "×"; }

/* ---- 致谢 ---- */
.credits { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.credits li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--soft); }
.credits li b { color: var(--ink); font-weight: 600; margin-right: 8px; }

/* ---- 收尾 ---- */
.end h2 { font-size: clamp(24px, 3.4vw, 32px); }
.end p { color: var(--soft); margin: 12px 0 24px; }
.end__act { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- 页脚 ---- */
.foot { border-top: 1px solid var(--ink); padding: 44px 0 40px; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot__brand p { color: var(--soft); font-size: 13.5px; margin: 12px 0 0; max-width: 30ch; }
.foot h4 { font-size: 13px; color: var(--ink); margin: 0 0 12px; }
.foot a { display: block; color: var(--soft); font-size: 14px; padding: 4px 0; }
.foot a:hover { color: var(--ink); }
.foot__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; font-size: 12.5px; color: var(--faint); }
.foot__bottom a { color: var(--soft); display: inline; padding: 0; }
.foot__bottom a:hover { color: var(--ink); }

/* ---- 404 ---- */
.nf { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 8px; }
.nf .code { font-size: 64px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.nf p { color: var(--soft); margin: 6px 0 22px; }

/* ---- 响应式 ---- */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { max-width: 380px; }
  .cols { grid-template-columns: 1fr; gap: 28px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .foot__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; }
  .nav__toggle svg { width: 20px; height: 20px; }
  .nav[data-open="true"] .nav__links { display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: 60px; background: var(--paper); border-bottom: 1px solid var(--ink); padding: 6px 24px 16px; }
  .nav[data-open="true"] .nav__links a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .plat { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .plat .desc { grid-column: 1 / -1; }
  .dlrow { grid-template-columns: 1fr; gap: 12px; }
  .dlrow .act { justify-content: flex-start; }
  .fact { grid-template-columns: 100px 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ============================================================================
   暗色模式（[data-theme="dark"] 由 <head> 内联脚本提前设置，避免闪烁）
   ========================================================================== */
[data-theme="dark"] {
  --paper: #101113;
  --ink: #f1f2f4;
  --body: #c5c7cc;
  --soft: #8b8e96;
  --faint: #65686f;
  --line: #26272b;
  --line-2: #34353b;
  --fill: #17181b;
  --accent: #7aa0ff;
}
::selection { background: var(--ink); color: var(--paper); }

/* 主题切换按钮 */
.nav__theme {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; margin-left: 4px; flex: none;
  background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  transition: border-color .15s linear, color .15s linear;
}
.nav__theme:hover { border-color: var(--ink); }
.nav__theme svg { width: 18px; height: 18px; }
.nav__theme .ico-sun { display: none; }
[data-theme="dark"] .nav__theme .ico-sun { display: block; }
[data-theme="dark"] .nav__theme .ico-moon { display: none; }

/* 返回顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--ink); color: var(--ink); cursor: pointer;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s linear, transform .2s linear, background .15s linear, color .15s linear;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--ink); color: var(--paper); }
.to-top svg { width: 20px; height: 20px; }

@media (max-width: 600px) {
  .nav__theme { margin-left: auto; }
  .nav__toggle { margin-left: 8px; }
  .to-top { right: 16px; bottom: 16px; }
}
