/* INPUT: 无。与 site.js 一起被 build-public-site.mjs 打包进 public-site-dist。
 * OUTPUT: 官网（首页 / 计费说明 / 关于）与帮助文档的全部样式，只用下面这套变量。
 * POS:   官网的唯一样式表。品牌取值来自 设计稿/2026-10-12-品牌-叁A/ 与首屏 c-combined.html；
 *        改这里之前先读 relay-console/gateway/DESIGN.md 的「不要做」。
 *        三项品牌说明在桌面端共用靠右的等宽文字栏，栏内左对齐；窄屏恢复单列。
 * [PROTOCOL]: 变更时更新此头部，然后检查 AGENTS.md
 *
 * 纸墨：暖纸白底、墨黑主动作、衬线展示字配无衬线正文，读起来像一份安静的账单。
 * 全部色值只出现在这一节的 :root 里，下面一律引用变量；新增颜色先加角色，再使用。
 */

@font-face { font-family: "DM Sans"; src: url("/site-assets/fonts/dm-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/site-assets/fonts/source-serif-4-latin.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fffdf7;
  --surface: #ffffff;
  --ink: #15140f;
  --muted: #6b675e;
  --line: #ebe6dc;
  --subtle: #f6f3ec;
  --radius: 10px;
  --radius-control: 8px;
  --serif: "Source Serif 4", "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.75; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 3px; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
p, h1, h2, h3, ol, ul, dl, dd, figure { margin-top: 0; }
p { margin-bottom: 18px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.22; letter-spacing: -.015em; }
h1 { font-size: clamp(34px, 4vw, 56px); margin-bottom: 22px; }
h2 { font-size: clamp(25px, 2.4vw, 34px); margin-bottom: 16px; }
h3 { font-size: 19px; margin-bottom: 10px; }
code, pre { font-family: var(--mono); }
code { font-size: .88em; overflow-wrap: anywhere; }
pre { white-space: pre; overflow: auto; line-height: 1.8; }
pre code { font-size: 13px; overflow-wrap: normal; }
strong, b { font-weight: 600; }
svg { display: block; }
/* 页边距按首屏稿的 64px 走（c-combined.html 里顶栏和三个词都收在这条线上），
   页面内容的可读宽度由各自的 max-width 控制，不靠页边距压。 */
.wrap { width: min(1312px, calc(100% - 128px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -70px; background: var(--ink); color: var(--paper); padding: 10px 20px; border-radius: var(--radius-control); z-index: 100; }
.skip-link:focus { top: 12px; }

/* ── 外壳：顶栏与页脚 ───────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--line); position: relative; z-index: 20; background: var(--paper); }
.header-inner { height: 72px; display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 32px; font-size: 15px; }
.site-nav > a { color: var(--muted); }
.site-nav > a:hover, .site-nav > a[aria-current="page"] { color: var(--ink); }
.site-nav .enter { color: var(--ink); font-weight: 500; }
.nav-toggle { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-control); min-width: 44px; min-height: 44px; }
.button { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--surface); font-size: 16px; font-weight: 500; white-space: nowrap; }
.button.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button.secondary { background: transparent; }
.button:hover { transform: translateY(-2px); }
.primary:hover { color: var(--paper); }
.site-nav .button { height: 40px; padding: 0 20px; font-size: 15px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 16px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; }
.eyebrow { font-size: 13px; letter-spacing: .16em; color: var(--muted); margin-bottom: 18px; }
.lead { font-size: 17px; line-height: 1.8; color: var(--muted); max-width: 620px; }
.muted { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); margin-top: 110px; padding-block: 46px 30px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; margin-bottom: 34px; }
.footer-top p { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 24px; font-size: 12px; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* ── 首屏：文字块与放大的三横 A 并置 ───────────────────────────
   这一块与 设计稿/2026-10-12-官网-叁A/首屏/c-combined.html 同源：
   文字块在左、放大标志在右，两者垂直中心同为 440；
   三横 A 的三道梁各引一条细线向右（1 / 1.5 / 2px 递进，不带箭头），
   三条线收在同一个 x，三个词左对齐到共用的左缘。
   视口小于 1080 时改成上下结构——并置在这一宽度以下放不下。 */
.hero { position: relative; overflow: hidden; }
/* 两列都写 minmax(0, …)：`1fr` 的最小尺寸默认取内容宽度，图区那个 636px 的固定宽会把
   列一起撑到 636，窄屏下整块首屏就被裁掉（.hero 是 overflow: hidden，看不出横向滚动条）。 */
.hero-inner { min-height: 828px; display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); align-items: center; }
.hero-copy { position: relative; z-index: 2; padding-block: 80px; }
.hero h1 { font-size: clamp(40px, 4.45vw, 64px); line-height: 1.12; margin-bottom: 30px; }
.hero .sub { font-size: 19px; line-height: 1.72; color: var(--muted); max-width: 640px; margin-bottom: 32px; }
.hero .sub b { color: var(--ink); font-weight: 600; }
/* viewBox 是 636 × 400，按 1:1 画：三道梁和三个词的粗细、字号与首屏稿完全一致。
   靠右贴在内容盒的右缘上，三个词的最右缘就是顶栏的右缘。 */
.hero-figure { justify-self: end; align-self: center; width: 636px; max-width: 100%; }
.hero-figure svg { width: 100%; height: auto; pointer-events: none; }
.hero-figure .leg { fill: var(--ink); transform-box: fill-box; transform-origin: center top; }
.hero-figure .beam { fill: var(--ink); transform-box: fill-box; transform-origin: left center; }
.hero-figure .rule { fill: none; stroke: rgba(21, 20, 15, .55); }
.hero-figure .rule-1 { stroke-width: 1; }
.hero-figure .rule-2 { stroke-width: 1.5; }
.hero-figure .rule-3 { stroke-width: 2; }
.hero-figure .word { font-family: var(--serif); font-size: 26px; font-weight: 600; fill: var(--ink); }

/* 入场：文字先读得见，再落 A 的两条腿、三道梁，再引线，最后给词。一次播完不循环。
   参数与 设计稿/2026-10-12-官网-叁A/首屏/c-combined.html 一致，全程 2660ms。
   整段包在 no-preference 里——系统开了「减少动态」就完全没有动画，元素停在最终状态。 */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .hero .rise { animation: rise .86s var(--ease) both; }
  .hero-figure .fade { animation: fade .94s var(--ease) both; }
  .hero-figure .sweep { animation: sweep .81s var(--ease) both; }
  .hero-figure .draw { animation: draw .75s var(--ease) both; }
}

/* ── 三个词各对一件产品事实 ──────────────────────────────────── */
.claims { border-top: 1px solid var(--line); }
.claim { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: baseline; padding-block: 34px; border-bottom: 1px solid var(--line); }
.claim dt { font-family: var(--serif); font-weight: 700; font-size: 26px; }
.claim dd { margin: 0; font-size: 16px; line-height: 1.8; color: var(--muted); width: 100%; max-width: 640px; justify-self: end; text-align: left; }
.claim dd b { color: var(--ink); font-weight: 600; }

/* ── 分组账册 ────────────────────────────────────────────────── */
.registry { padding-block: 96px; }
.registry-head { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 44px; }
/* 说明文字限宽 34em（约 34 个汉字一行），和表格区拉齐后不再横贯整页。 */
.registry-head p:last-child { margin-bottom: 0; max-width: 34em; }
.registry-head > h2 { margin-bottom: 0; }
.rows { border-top: 1px solid var(--ink); }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 190px; gap: 24px; align-items: baseline; padding-block: 20px; border-bottom: 1px solid var(--line); }
.row .no { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.row .name { font-family: var(--serif); font-weight: 700; font-size: 20px; }
.row .count, .row .mode { font-size: 14px; color: var(--muted); }
.row a.name:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── 计费说明的条目与算式 ────────────────────────────────────── */
.page-intro { padding-block: 84px 12px; max-width: 760px; }
.ledger-notes { border-top: 1px solid var(--ink); }
.ledger-note { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding-block: 30px; border-bottom: 1px solid var(--line); }
.ledger-note h3 { font-size: 18px; margin: 0; }
.ledger-note p { margin: 0; color: var(--muted); font-size: 15px; max-width: 660px; }
.ledger-note p + p { margin-top: 12px; }
.formula { background: var(--subtle); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin-block: 30px; }
.formula pre { margin: 0; font-size: 13px; }
.formula p { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 0 var(--radius) var(--radius) 0; padding: 24px 28px; margin-block: 34px; background: var(--subtle); }
.callout p:last-child { margin-bottom: 0; }
.callout h3 { font-size: 18px; }
/* 单行最长 66 个字符：中文按 2 个字宽算，一行约 33 个汉字——超过这个长度读起来要来回找行首。 */
.callout p { color: var(--muted); font-size: 15px; max-width: 36em; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; margin-block: 40px 0; }
.steps li { border-top: 1px solid var(--ink); padding-top: 22px; }
.steps .no { font-family: var(--mono); font-size: 12px; color: var(--muted); display: block; margin-bottom: 20px; }
.steps h3 { font-size: 18px; }
.steps p { font-size: 14px; color: var(--muted); margin-bottom: 0; }

/* ── 关于 ────────────────────────────────────────────────────── */
.facts { border-top: 1px solid var(--ink); margin-top: 40px; }
.fact { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; padding-block: 26px; border-bottom: 1px solid var(--line); font-size: 15px; }
.fact dt { color: var(--muted); }
.fact dd { margin: 0; }
.fact code { font-size: 14px; }

/* ── 结尾：三笔母题收尾 ──────────────────────────────────────
   品牌规定：三道 1 / 1.5 / 2px、宽 22px、间距 4px 的墨色横线，
   只用在开始、结束和等待处，页面中间不用，不在里面塞文字或图标。
   宽度和间距不能随手放大——放大一倍，三道线就会糊成一块。 */
.strokes { display: flex; flex-direction: column; gap: 4px; width: 22px; margin-bottom: 34px; }
.strokes i { display: block; width: 100%; background: var(--ink); }
.strokes i:nth-child(1) { height: 1px; }
.strokes i:nth-child(2) { height: 1.5px; }
.strokes i:nth-child(3) { height: 2px; }
.closing { padding-block: 96px 0; }
.closing h2 { max-width: 620px; }
.closing .actions { margin-top: 34px; }

/* ── 帮助文档 ────────────────────────────────────────────────── */
.docs-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 72px; padding-block: 46px 90px; }
.docs-sidebar { position: sticky; top: 24px; align-self: start; font-size: 14px; max-height: calc(100vh - 48px); overflow: auto; }
.docs-label { font-family: var(--serif); font-size: 17px; font-weight: 700; display: block; margin-bottom: 18px; }
.docs-search { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); padding: 10px 12px; font-size: 14px; appearance: none; }
.docs-sidebar section { margin-top: 24px; }
.docs-sidebar h2 { font-family: var(--sans); font-size: 12px; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.docs-sidebar nav a { display: block; padding: 7px 11px; margin-left: -11px; border-radius: var(--radius-control); color: var(--muted); }
.docs-sidebar nav a[aria-current="page"] { background: var(--subtle); color: var(--ink); font-weight: 600; }
.docs-sidebar nav a:hover { background: var(--subtle); color: var(--ink); }
.docs-menu-button { display: none; }
.doc-content { min-width: 0; max-width: 800px; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 30px; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-content h1 { font-size: 36px; line-height: 1.3; margin-bottom: 26px; }
.doc-content > .eyebrow { margin-bottom: 12px; }
.doc-toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--subtle); padding: 14px 20px; margin-bottom: 32px; font-size: 14px; }
.doc-toc summary { cursor: pointer; }
.doc-toc nav { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-top: 12px; }
.doc-toc a { color: var(--muted); padding-block: 3px; }
.doc-toc a:hover { color: var(--ink); text-decoration: underline; }
.prose { font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.prose h2 { font-size: 24px; margin-top: 42px; margin-bottom: 18px; scroll-margin-top: 26px; }
.prose h3 { font-size: 18px; margin-top: 28px; margin-bottom: 14px; scroll-margin-top: 26px; }
.prose a { text-decoration: underline; text-underline-offset: 4px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 22px; }
.prose li { margin-bottom: 6px; }
.prose code:not(pre code) { background: var(--subtle); border: 1px solid var(--line); padding: 2px 5px; border-radius: 4px; }
.prose pre { margin: 0; background: var(--subtle); border-radius: var(--radius); padding: 22px 20px; }
.code-block { position: relative; margin-block: 24px; }
.copy-code { display: none; position: absolute; right: 10px; top: 10px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font-size: 12px; }
.js .copy-code { display: block; }
.js .code-block pre { padding-top: 46px; }
.copy-status { position: absolute; left: -10000px; }
.prose blockquote { margin: 22px 0; padding: 16px 22px; border-left: 3px solid var(--ink); background: var(--subtle); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p:last-child { margin: 0; }
.table-scroll { overflow-x: auto; border-block: 1px solid var(--line); margin-block: 26px; }
.table-scroll table, .prose table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
.table-scroll th, .prose th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--subtle); }
.table-scroll td, .table-scroll th, .prose td, .prose th { padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 150px; }
.table-scroll tr:last-child td, .prose tr:last-child td { border-bottom: none; }
.doc-pagination { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 26px; margin-top: 48px; }
.doc-pagination a { padding: 12px 0; font-size: 14px; max-width: 46%; }
.doc-pagination a:hover { text-decoration: underline; text-underline-offset: 4px; }
.doc-pagination span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.doc-next { margin-left: auto; text-align: right; }
.doc-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 42px; }
.doc-cta p { margin: 0; font-size: 15px; font-weight: 600; }
.doc-cta small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.doc-cta .button { height: 40px; padding: 0 20px; font-size: 14px; }
.search-results { margin-bottom: 30px; }
.search-results a { display: block; border-top: 1px solid var(--line); padding: 18px 0; }
.search-results h3 { font-size: 17px; margin-bottom: 6px; }
.search-results p { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.search-results small { color: var(--muted); font-size: 12px; }
.search-status { font-size: 14px; color: var(--muted); }
[hidden] { display: none !important; }
.not-found { padding-block: 110px 140px; max-width: 640px; }
.catalog-fallback { padding-block: 56px; }
.catalog-group { padding: 24px 0; border-top: 1px solid var(--line); }
.catalog-group ul { columns: 2; padding-left: 22px; line-height: 2; font-size: 14px; }
.catalog-fallback .notice { padding: 16px 22px; background: var(--subtle); border-radius: var(--radius); font-size: 14px; }

@media (max-width: 1080px) {
  .hero-inner { min-height: 0; grid-template-columns: minmax(0, 1fr); padding-block: 70px 40px; }
  .hero-copy { padding-block: 0; }
  .hero-figure { margin-top: 40px; width: 100%; justify-self: stretch; }
  .hero-figure svg { width: 100%; height: auto; }
  .registry-head { grid-template-columns: 1fr; gap: 20px; }
  .row { grid-template-columns: 36px minmax(0, 1fr); }
  .row .count, .row .mode { grid-column: 2; }
  .facts, .claim, .ledger-note { grid-template-columns: 1fr; gap: 12px; }
  .claim dd { justify-self: start; text-align: left; }
  .docs-layout { grid-template-columns: 1fr; gap: 32px; }
  .docs-sidebar { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 44px); }
  .header-inner { height: 66px; gap: 16px; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav { position: absolute; left: 0; right: 0; top: 66px; display: none; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; padding: 16px 22px 22px; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .site-nav .button { margin-top: 12px; }
  .hero h1 { font-size: clamp(32px, 8.4vw, 44px); }
  .hero .sub { font-size: 16px; }
  .hero .actions { gap: 20px; }
  .hero-figure { margin-top: 28px; }
  .registry, .closing { padding-block: 60px 0; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .row { grid-template-columns: 30px minmax(0, 1fr); }
  .site-footer { margin-top: 70px; }
  .footer-top { display: block; }
  .footer-links { margin-top: 22px; gap: 6px 22px; }
  .footer-bottom { display: block; font-size: 12px; }
  .footer-bottom p + p { margin-top: 8px; }
  .page-intro { padding-block: 52px 8px; }
  .doc-content h1 { font-size: 29px; }
  .doc-cta { display: block; }
  .doc-cta .button { margin-top: 18px; }
  .catalog-group ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
