@layer measure;

/* 分寸 · Measure 中文排版基线（dososo/blcaptain-measure-cjk）。
   层声明单独占第一行：页面上不分层的样式都优先于这一层。 */
@layer measure {
  :where(:lang(zh)) {
    line-break: strict;                    /* 广泛可用；写在每个中文元素上，中英混排页面也生效 */
    font-synthesis-style: none;            /* 中文不出假斜体；西文真斜体不受影响 */
    text-emphasis-position: under right;   /* 中文着重号在字下方 */
  }

  :where(:lang(zh)) :where(p, li) {
    line-height: 1.75;
  }

  :where(:lang(zh)) :where(h1, h2, h3) {
    line-height: 1.3;
  }

  /* 行长约束只在显式标记的正文容器里生效，避免挤坏卡片和表格 */
  .measure-prose {
    max-width: 36em;
  }

  /* 实现里的初始值是 no-autospace，必须显式开启；spacing: text 模式下由 init 命令删掉这一段 */
  @supports (text-autospace: normal) {
    :where(:lang(zh)) { text-autospace: normal; }
  }
}


/* Sumery Libra 官网 —— Sumery 工作室品牌体系（工商/sumery-design-output/sumery-design-language.md）。
   纸白底 + 品牌墨；行动色取丁香 primary-600（按钮/链接/焦点环）；
   Libra 绿是产品识别（徽章、编号、强调），不承载正文对比。Jost 只做 display 拉丁。
   阴影统一墨调柔影；不做玻璃拟态，不用 backdrop-filter。 */
@font-face {
  font-family: 'Jost';
  src: url('/assets/fonts/jost-latin-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --surface: #fffefc;
  --line: #e7e4de;
  --line-strong: #d5d1c8;
  --ink: #2a2740;
  --ink-2: #575374;
  --muted: #706c92;
  --action: #9153ab;
  --action-border: #723d89;
  --action-hover: #723d89;
  --on-action: #ffffff;
  --focus: #ae6dca;
  --libra: #347762;        /* Libra 绿 · 深档：浅底文字与图标，白底 6.2:1 */
  --libra-anchor: #77bfa5; /* Libra 绿 · 产品锚点 */
  --libra-tint: #e1f1e9;   /* 徽章、编号底 */
  --libra-grad: linear-gradient(135deg, #3ecf8e 0%, #9be7c4 100%);
  --code-bg: #f1efe9;
  --shadow-xs: rgba(42, 39, 64, 0.06) 0px 1px 2px 0px, rgba(42, 39, 64, 0.05) 0px 2px 8px 0px;
  --shadow-sm: rgba(42, 39, 64, 0.24) 0px 5px 14px -9px;
  --shadow-md: rgba(42, 39, 64, 0.08) 0px 2px 6px -2px, rgba(42, 39, 64, 0.16) 0px 12px 32px -12px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-hover: cubic-bezier(0.22, 1, 0.36, 1);
  /* 分寸 Measure T13：西文在前、中文在后、通用族收尾；中文族每页不超过两个（苹方 / 雅黑）。 */
  --font-display: 'Jost', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', ui-monospace, Menlo, Consolas, 'PingFang SC', monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #201e2d;
    --surface: #2b2840;
    --line: #3d3a56;
    --line-strong: #4a4666;
    --ink: #eae9fb;
    --ink-2: #bcb9dc;
    --muted: #a39fc7;
    --action: #c687e2;
    --action-border: #dba5f4;
    --action-hover: #dba5f4;
    --on-action: #2d1437;
    --focus: #dba5f4;
    --libra: #7fd0ae;
    --libra-anchor: #5fae92;
    --libra-tint: #233831;
    --libra-grad: linear-gradient(135deg, #2f8f68 0%, #77bfa5 100%);
    --code-bg: #191724;
    --shadow-xs: rgba(0, 0, 0, 0.2) 0px 1px 2px 0px, rgba(0, 0, 0, 0.16) 0px 2px 8px 0px;
    --shadow-sm: rgba(0, 0, 0, 0.45) 0px 5px 14px -9px;
    --shadow-md: rgba(0, 0, 0, 0.25) 0px 2px 6px -2px, rgba(0, 0, 0, 0.4) 0px 12px 32px -12px;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--action); text-decoration: none; transition: color 300ms var(--ease); }
a:hover { color: var(--action-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
code { font: 0.84em/1.5 var(--mono); background: var(--code-bg); border: 1px solid var(--line); padding: 0.08em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow-md); }

/* 顶栏：64px 纸底实色，底部 1px 分隔线；不做毛玻璃。 */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.mark:hover { color: var(--ink); text-decoration: none; }
.mark img { width: 24px; height: 24px; }
.mark-text { display: flex; flex-direction: column; line-height: 1.2; }
.kicker { font: 500 10px/1.4 var(--font-display); letter-spacing: 0.18em; color: var(--muted); }
.wordmark { font: 600 15px/1.2 var(--font-display); letter-spacing: 0.01em; }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 10px; transition: color 150ms var(--ease-hover), background-color 150ms var(--ease-hover); }
nav a:hover { background: var(--libra-tint); color: var(--ink); text-decoration: none; }
nav .nav-cta { color: var(--action); font-weight: 600; }
nav .nav-cta:hover { color: var(--action-hover); }
/* 语言切换：顶栏最右，指向另一种语言（lang.js 记住这次选择） */
.top-row nav { margin-left: auto; }
.lang-switch { flex: none; padding: 5px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); color: var(--ink); font-size: 13px; line-height: 1.5; text-decoration: none; }
.lang-switch:hover { background: var(--surface); border-color: var(--muted); color: var(--ink); text-decoration: none; }

/* 首屏：居中门面（Scrintal 骨架），截图拼贴紧贴 hero；产品绿只出现在眉标上。 */
.hero { padding: 88px 0 96px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--libra-tint); color: var(--libra); font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em; }
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--libra-grad); }
/* 分寸 Measure T07：中文标题字距用 0；负字距只属于拉丁展示字体。
   T06：标题行高 1.2，窄屏折行时中文不挤在一起。 */
h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 1.8rem + 2.2vw, 3.5rem); font-weight: 600; line-height: 1.2; letter-spacing: 0; margin: 0 auto 18px; max-width: 18em; }
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 auto 32px; max-width: 38em; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 20px; border-radius: var(--radius-md); font: 600 14px/1.3 var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color 150ms var(--ease-hover), border-color 150ms var(--ease-hover), box-shadow 150ms var(--ease-hover), transform 150ms var(--ease-hover); }
.btn.primary { background: var(--action); color: var(--on-action); border-color: var(--action-border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--shadow-xs); }
.btn.primary:hover { background: var(--action-hover); color: var(--on-action); text-decoration: none; transform: translateY(-1px); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.btn.ghost:hover { border-color: var(--muted); text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: progress; transform: none; }
/* 分寸 Measure T05：正文 14px 起，行长约 40 字。 */
.fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; max-width: 40em; }

/* 首屏截图拼贴：光晕用 dawn 渐变（品牌只允许横幅与产品卡 hover 用渐变，这里作横幅处理），
   压得很淡；两张真实界面截图一宽一窄并排，窄屏上下排。 */
.collage { position: relative; margin: 40px auto 0; max-width: 980px; }
.collage::before { content: ''; position: absolute; inset: -36px -10% -24px; background: radial-gradient(closest-side, color-mix(in srgb, var(--action) 14%, transparent), transparent 72%); pointer-events: none; }
/* 光晕左右各外扩 10%，在 1180px 以下会顶出视口（960px 时多出 66px 横向滚动）。
   这里把外扩收到「视口到拼贴之间的空白」宽度，渐变本身完整、不会被裁出缺角；
   1180px 以上维持原来的 -10%，视觉不变。1028px = 980px 拼贴 + 48px 栏距，640px 以下栏距变 32px。 */
@media (max-width: 1180px) { .collage::before { inset-inline: calc((980px - 100vw) / 2); } }
@media (max-width: 1028px) { .collage::before { inset-inline: -24px; } }
@media (max-width: 640px) { .collage::before { inset-inline: -16px; } }
.collage .shot { position: relative; }
.collage { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; align-items: start; text-align: left; }
@media (max-width: 860px) { .collage { grid-template-columns: 1fr; } }

/* 入场：首屏一次性上浮，尊重减弱动效。 */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: arrival 750ms var(--ease) backwards; }
  .hero > *:nth-child(2) { animation-delay: 75ms; }
  .hero > *:nth-child(3) { animation-delay: 150ms; }
  .hero > *:nth-child(4) { animation-delay: 225ms; }
  .hero > *:nth-child(n + 5) { animation-delay: 300ms; }
  @keyframes arrival { from { opacity: 0; transform: translateY(12px); } }
}

/* 分区节奏：桌面 96px，≤768px 64px，≤380px 48px。交错区块用卡纸面反白。 */
.section { padding-block: 96px; }
.band { background: var(--surface); border-block: 1px solid var(--line); padding-block: 96px; }
@media (max-width: 768px) { .hero { padding: 64px 0; } .section, .band { padding-block: 64px; } }
@media (max-width: 380px) { .section, .band { padding-block: 48px; } }
h2 { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; line-height: 1.25; letter-spacing: 0; margin: 0 0 12px; }
/* Scrintal 骨架：分区标题居中，读序从这里开始回到左对齐。
   分寸 Measure T05：导语按 40 字收行长，避免居中段落在宽屏上拉成一行长句。 */
.section-head { text-align: center; max-width: 40em; margin: 0 auto 40px; }
.section-head .sub { margin-bottom: 0; }
.sub { color: var(--ink-2); margin: 0 0 32px; }
h3 { font-size: 1.375rem; font-weight: 500; line-height: 1.35; margin: 0 0 8px; }
.subhead { margin-top: 48px; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 32px 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font: 600 12.5px/1 var(--font-display); letter-spacing: 0.08em; color: var(--libra); background: var(--libra-tint); width: fit-content; padding: 5px 10px; border-radius: var(--radius-pill); margin-bottom: 14px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 36em; }

/* 界面截图：宽的今日页与近方形的一周视图并排，窄屏上下排。 */
.shots { display: grid; grid-template-columns: 1.45fr 1fr; gap: 24px; align-items: start; margin: 0 0 36px; }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.badge { display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--libra-tint); color: var(--libra); font-size: 12.5px; font-weight: 500; white-space: nowrap; }

/* 交替特性块：标题文案 ↔ 证据面板，证据侧随视口换边窄屏上下排。 */
.feature { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; margin-top: 40px; }
.feature-copy h3 { font-size: 1.375rem; }
.feature-copy p { color: var(--ink-2); margin: 0; max-width: 36em; }
.feature-copy strong { color: var(--ink); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 20px; } }

.sample { margin: 0; }
.sample figcaption { color: var(--ink-2); font-size: 15px; margin-bottom: 10px; }
.sample pre { margin: 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; overflow-x: auto; box-shadow: var(--shadow-xs); }
.sample pre code { background: none; border: 0; padding: 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

.grid { display: grid; gap: 24px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px; }
/* 分寸 Measure T05：卡片正文同样按 36 字收行长，宽卡时不至于拉成一行长句。 */
.card p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; text-wrap: pretty; max-width: 36em; }
.card p .no-break { white-space: nowrap; }
.card p:last-child { margin-bottom: 0; }
.card h3 { font-size: 1.125rem; }

.limits-box { max-width: 56em; margin: 48px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 28px 32px; }
.limits-box .subhead { margin-top: 0; }
/* 分寸 Measure T05：列表正文收到 38 字一行，盒子宽度保持不变。 */
.limits { padding-left: 1.2em; margin: 12px 0 0; max-width: 38em; }
.limits li { margin-bottom: 10px; color: var(--ink-2); }
.limits li::marker { color: var(--libra); }
.limits strong { color: var(--ink); }

.table-wrap { overflow-x: auto; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th, td { text-align: left; vertical-align: top; padding: 14px 20px; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
tbody th { white-space: nowrap; color: var(--ink); font-weight: 600; }
td { color: var(--ink-2); }
tbody tr { transition: background-color 150ms var(--ease-hover); }
tbody tr:hover { background: color-mix(in srgb, var(--libra-tint) 45%, transparent); }

/* 定价节：能力清单 →「谁付费」之间留出呼吸，并用一行注脚点明两块的分工。
   表格列的「免费核心 / Pro」是能力分层展示（§7 保留展示但不标价），
   注脚负责说明个人已开放全部能力，避免读者把「—」误读成免费被阉割。 */
#pricing .table-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 40em; }
#pricing .grid.two { margin-top: 40px; }

/* 下载 */
.dl { display: flex; flex-direction: column; }
.meta { display: flex; gap: 28px; margin: 6px 0 18px; }
.meta div { display: flex; flex-direction: column; }
.meta dt { font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.meta dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.dl .btn { align-self: flex-start; }
details { margin-top: 14px; font-size: 14px; }
summary { cursor: pointer; color: var(--action); }
details p { font-size: 14px; margin-top: 8px; }
.hash { font-size: 12px; }
.note { min-height: 1.75em; margin: 16px 0; color: var(--ink-2); }
.note:empty { margin: 0; min-height: 0; }
.later { margin-top: 16px; border-style: dashed; }

/* 收束带：结尾 CTA，dawn 渐变（品牌允许的横幅渐变）。 */
.cta-band { padding: 32px 0 88px; }
.cta-band .wrap { background: linear-gradient(135deg, #ede5f1 0%, #d4eaf4 100%); border-radius: var(--radius-xl); padding: 48px 32px; text-align: center; }
@media (prefers-color-scheme: dark) { .cta-band .wrap { background: linear-gradient(135deg, #3a2a44 0%, #1f3140 100%); } }
.cta-band h2 { margin-bottom: 8px; }
/* 分寸 Measure T05：收束带的正文也收在 40 字以内，居中不变。 */
.cta-band p { color: var(--ink-2); margin: 0 auto 20px; max-width: 40em; }

/* 赞助屏：档位一排胶囊（金额一字不改），渠道区主按钮 + 支付宝说明卡。 */
.tiers { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 28px; }
.tiers span { padding: 10px 20px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.sponsor-channels { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 16px; margin-bottom: 20px; }
.sponsor-channels .btn { align-self: center; }
.sponsor-channels .alipay { max-width: 26em; text-align: left; }
.sponsor-channels .alipay p { margin: 0; }

/* 次级页（政策、支持、发票）：阅读栏，标题回到左对齐；裸表格卡化。
   分寸 Measure T05：原来写 74ch，但 ch 按 "0" 的字宽算，实测折成 47 个汉字一行；
   改成 40em 后中文正好 40 字一行，英文约 80 字符，仍在舒适区间。 */
.prose { text-align: left; }
.prose > * { max-width: 40em; }
.prose > h1 { max-width: none; }
.prose h2 { margin-top: 40px; }
.prose h1 + .fine { margin-bottom: 8px; }
.prose table { min-width: 0; }
.prose table:not([class]) { margin: 16px 0 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.prose thead th { background: color-mix(in srgb, var(--libra-tint) 40%, var(--surface)); }

.foot { border-top: 1px solid var(--line); padding: 24px 0 6px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); }
/* 页面统计说明：紧跟页脚那一行，但不在 footer 里（页脚按品牌规定只有一行） */
.stats-note { margin-block: 0; padding-bottom: 32px; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  nav a:not(.nav-cta) { display: none; }
}
