/* Sumery Libra 官网。token 与桌面应用 src/style.css 同值（vite-web-scaffold/DESIGN.md）。 */
:root {
  color-scheme: light;
  --bg: #f5f8f6;
  --band: #edf4f0;
  --surface: #fffdfb;
  --line: #dfe7e3;
  --ink: #17263b;
  --ink-2: #44605b;
  --text-2: #5f6e6c;
  --accent: #77bfa5;
  --accent-deep: #4f9077;
  --accent-text: #347762;
  --accent-tint: #e1f1e9;
  --on-accent: #ffffff;
  --warn-text: #7f5426;
  --focus: #67a68d;
  --code-bg: #eef3f0;
  --radius-panel: 19px;
  --radius-control: 13px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #10161a;
    --band: #131b21;
    --surface: #182027;
    --line: #26313a;
    --ink: #e6edf1;
    --ink-2: #c3d2d0;
    --text-2: #a7b5b5;
    --accent: #5fae92;
    --accent-deep: #57a487;
    --accent-text: #7fd0ae;
    --accent-tint: #173029;
    --on-accent: #0d1512;
    --warn-text: #e0aa63;
    --focus: #7fd0ae;
    --code-bg: #0d1317;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
code { font: 0.88em/1.5 var(--mono); background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 10px; }

/* 顶栏：品牌标记按品牌系统第 4 节 */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.mark-text { display: flex; flex-direction: column; line-height: 1.2; }
.kicker { font: 10.5px/1.2 var(--mono); letter-spacing: 0.12em; color: var(--text-2); }
.wordmark { font-size: 13px; font-weight: 600; }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 10px; }
nav a:hover { background: var(--accent-tint); color: var(--ink); }
nav .nav-cta { color: var(--accent-text); font-weight: 600; }
/* 语言切换：顶栏最右，指向另一种语言（lang.js 记住这次选择） */
.top-row nav { margin-left: auto; }
.lang-switch { flex: none; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 13px; line-height: 1.5; text-decoration: none; }
.lang-switch:hover { background: var(--accent-tint); }

/* 首屏 */
.hero { padding: 72px 0 64px; }
.eyebrow { margin: 0 0 8px; color: var(--text-2); font-size: 14px; }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.15; letter-spacing: -0.04em; margin: 0 0 14px; }
.lede { font-size: 19px; color: var(--ink-2); margin: 0 0 28px; max-width: 38em; }
.cost { max-width: 42em; border-left: 3px solid var(--accent); padding: 2px 0 2px 18px; margin-bottom: 30px; }
.cost p { margin: 0 0 10px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: var(--radius-control); font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn.primary { background: var(--accent-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--accent); color: var(--on-accent); } }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: progress; }
.fine { font-size: 13px; color: var(--text-2); margin: 10px 0 0; }

/* 分区 */
.section { padding: 72px 0; }
.band { background: var(--band); border-block: 1px solid var(--line); padding: 72px 0; }
h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.03em; line-height: 1.25; margin: 0 0 10px; }
.sub { color: var(--text-2); margin: 0 0 28px; }
h3 { font-size: 17px; margin: 0 0 6px; }
.subhead { margin-top: 40px; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 32px; display: grid; gap: 16px; 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-panel); padding: 20px; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-text); font-weight: 700; margin-bottom: 10px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* 界面截图：宽的今日页与近方形的一周视图并排，窄屏上下排。 */
.shots { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; align-items: start; margin: 0 0 32px; }
@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-panel); background: var(--surface); box-shadow: 0 12px 32px -18px rgba(23, 38, 59, 0.35); }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.badge { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-text); font-size: 12px; font-weight: 600; white-space: nowrap; }

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

.grid { display: grid; gap: 16px; }
.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-panel); padding: 22px; }
.card p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; }
.card p:last-child { margin-bottom: 0; }

.limits { padding-left: 1.2em; margin: 12px 0 0; max-width: 52em; }
.limits li { margin-bottom: 10px; color: var(--ink-2); }
.limits strong { color: var(--ink); }

.table-wrap { overflow-x: auto; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font-size: 13px; color: var(--text-2); font-weight: 600; }
tbody th { white-space: nowrap; }
td { color: var(--ink-2); }

/* 下载 */
.dl { display: flex; flex-direction: column; }
.meta { display: flex; gap: 24px; margin: 4px 0 16px; }
.meta div { display: flex; flex-direction: column; }
.meta dt { font-size: 12px; color: var(--text-2); }
.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(--accent-text); }
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; }

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

@media (max-width: 640px) {
  .hero { padding: 48px 0 44px; }
  .section, .band { padding: 52px 0; }
  nav a:not(.nav-cta) { display: none; }
}
