/*
  API GET shared components (direction A): header, buttons, headings, cards, the deep green band,
  the WorkBuddy model-menu sketch, footer, reading typography, bottom bars and sheets.
  Values come from tokens.css; components read only the --c-* aliases. Shared with the reading library.
*/

/* ---------- 字体（全部自托管，离线可用） ---------- */
@font-face {
  font-family: 'Public Sans Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/public-sans.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-2013, U+2015-2017, U+201A-201B, U+201E-2025, U+2027-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Noto Serif SC 600 subset (OFL): only the characters of the large headings, built by services/fde/build_display_serif.py. */
@font-face {
  font-family: 'AG Display Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ag-display-serif.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/cormorant-600.woff2') format('woff2');
}

/* 上面去掉了 — ‘ ’ “ ” …：中文里的破折号、引号、省略号交给中文字体，“——”不再断成两截。 */
/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hd-height) + 16px); }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--c-page);
  color: var(--c-text);
  font: 400 var(--ag-text-body) / var(--ag-leading-body) var(--ag-font-sans);
  font-feature-settings: 'palt' 0;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
p, li, figcaption, blockquote { text-wrap: pretty; }
.nb { white-space: nowrap; }
ul, ol { padding: 0; list-style: none; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i-lg { width: 20px; height: 20px; }
:where(a, button, summary, input, textarea, [tabindex]):focus-visible {
  outline: var(--ag-focus-width) solid var(--ag-focus-color);
  outline-offset: var(--ag-focus-offset);
  border-radius: var(--ag-radius-sm);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 8px 12px; border-radius: var(--ag-radius-sm); background: var(--c-btn); color: var(--c-btn-text); font-size: var(--ag-text-small); font-weight: 600; }
.skip:focus { top: 8px; }
.tabular { font-variant-numeric: lining-nums tabular-nums; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap, var(--ag-content-max)) + 2 * var(--ag-side));
  margin-inline: auto;
  padding-inline: var(--ag-side);
}

/* ---------- 页头：照主站 CustomerSiteHeader 的结构与尺寸 ---------- */
.hd {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--c-header);
  border-bottom: 1px solid var(--c-line);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
}
.hd-inner { display: flex; align-items: center; gap: 20px; min-height: var(--hd-height); }
.lockup { display: flex; align-items: center; gap: 12px; flex: none; border-radius: var(--ag-radius-sm); }
.lockup img { width: 26px; height: 26px; border-radius: 7px; }
.lockup-text { display: grid; gap: 4px; min-width: 0; }
.wordmark {
  font: 600 18px/1 var(--ag-font-wordmark);
  letter-spacing: 0.08em;
  color: var(--c-accent);
  white-space: nowrap;
}
.lockup-sub { font-size: var(--ag-text-caption); line-height: 1; color: var(--c-text-3); white-space: nowrap; }
.lockup-sub b { font-weight: 600; color: var(--c-text-2); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; min-width: 0; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border-radius: var(--ag-radius-sm);
  font-size: var(--ag-text-small); font-weight: 500; color: var(--c-text-2); white-space: nowrap;
  transition: background-color var(--ag-dur) var(--ag-ease-out), color var(--ag-dur) var(--ag-ease-out);
}
.nav a:hover { background: rgb(20 35 29 / 0.05); color: var(--c-text); }
.nav a[aria-current='page'] { background: var(--c-accent-soft); color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent-ring); }
.hd-tools { display: flex; align-items: center; gap: 6px; flex: none; margin-left: 8px; }
.hd-back {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px;
  border-radius: var(--ag-radius-sm); font-size: var(--ag-text-small); font-weight: 500; color: var(--c-text-2); white-space: nowrap;
}
.hd-back:hover { color: var(--c-text); background: rgb(20 35 29 / 0.05); }
.account {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border-radius: var(--ag-radius-sm); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line-strong);
  font-size: var(--ag-text-small); font-weight: 600; white-space: nowrap;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--ag-radius-sm); color: var(--c-text-2);
}
.icon-btn:hover { background: rgb(20 35 29 / 0.05); color: var(--c-text); }
.menu-btn { display: none; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 168px;
  border-radius: var(--ag-radius-sm); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line-strong);
  color: var(--c-text-3); font-size: var(--ag-text-small);
}
.search-btn kbd { margin-left: auto; font: 500 var(--ag-text-caption)/1 var(--ag-font-sans); color: var(--c-text-3); padding: 3px 6px; border-radius: var(--ag-radius-xs); background: var(--c-muted); }

/* ---------- 按钮与链接 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--ag-radius-sm);
  font-size: var(--ag-text-body); font-weight: 600; line-height: 1; white-space: nowrap;
  transition: transform var(--ag-dur) var(--ag-ease-out), box-shadow var(--ag-dur) var(--ag-ease-out), background-color var(--ag-dur) var(--ag-ease-out);
}
.btn-sm { height: 40px; padding: 0 16px; font-size: var(--ag-text-small); }
.btn-lg { height: 52px; padding: 0 26px; }
.btn-primary { background: var(--c-btn); color: var(--c-btn-text); box-shadow: 0 1px 2px rgb(11 61 46 / 0.24), inset 0 1px 0 rgb(255 255 255 / 0.1); }
.btn-primary:hover { background: var(--c-btn-hover); transform: translateY(var(--ag-lift)); box-shadow: var(--ag-shadow-2); }
.btn-ghost { color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-line-strong); background: transparent; }
.btn-ghost:hover { background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-icon-weak), var(--ag-shadow-1); transform: translateY(var(--ag-lift)); }
.btn-quiet { color: var(--c-text-2); }
.btn-quiet:hover { background: rgb(20 35 29 / 0.05); color: var(--c-text); }
.btn[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
.text-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--c-accent); font-weight: 600;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c-accent) 35%, transparent);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px;
}
.text-link:hover { text-decoration-color: currentColor; }
.on-deep .btn-ghost { color: var(--c-on-deep); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28); }
.on-deep .btn-ghost:hover { background: rgb(255 255 255 / 0.06); }
.on-deep .btn-primary { background: var(--c-on-deep); color: #0a3b2c; box-shadow: none; }
.on-deep .btn-primary:hover { background: #ffffff; }
.on-deep :where(a, button):focus-visible { outline-color: var(--ag-focus-on-dark); }

/* ---------- 标题 ---------- */
.overline {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--ag-text-caption); line-height: var(--ag-leading-caption); font-weight: 600; letter-spacing: 0.04em; color: var(--c-text-3);
}
.overline::before { content: ''; width: 24px; height: 1px; background: var(--c-gold-rule); flex: none; }
.overline .idx { order: -1; color: var(--c-gold-text); font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.display { font-family: var(--ag-font-display); font-weight: 600; font-synthesis-weight: none; letter-spacing: 0; text-wrap: balance; color: var(--c-text); }
.display em { font-style: normal; color: var(--c-accent); }
.display-1 { font-size: var(--ag-text-display-1); line-height: var(--ag-leading-display-1); }
.display-2 { font-size: var(--ag-text-display-2); line-height: var(--ag-leading-display-2); }
.page-title { font-size: var(--ag-text-page); line-height: var(--ag-leading-page); }
.t-heading { font-size: var(--ag-text-heading); line-height: var(--ag-leading-heading); font-weight: 650; }
.t-title { font-size: var(--ag-text-title); line-height: var(--ag-leading-title); font-weight: 650; }
.t-lead { font-size: var(--ag-text-lead); line-height: var(--ag-leading-lead); color: var(--c-text-2); }
.t-body { font-size: var(--ag-text-body); line-height: var(--ag-leading-body); }
.t-small { font-size: var(--ag-text-small); line-height: var(--ag-leading-small); }
.t-caption { font-size: var(--ag-text-caption); line-height: var(--ag-leading-caption); }
.muted { color: var(--c-text-3); }
.soft { color: var(--c-text-2); }
.section-head { display: grid; gap: 12px; max-width: 760px; }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }

/* ---------- 卡片、标签、进度 ---------- */
.card { background: var(--c-surface); border-radius: var(--ag-radius-md); box-shadow: var(--c-raised); }
.lift { transition: transform var(--ag-dur) var(--ag-ease-out), box-shadow var(--ag-dur) var(--ag-ease-out); }
.lift:hover { transform: translateY(calc(var(--ag-lift) * 2)); box-shadow: var(--c-floating); }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--ag-radius-xs);
  background: var(--c-muted); color: var(--c-text-2); font-size: var(--ag-text-caption); line-height: 1; font-weight: 600; white-space: nowrap;
}
.chip-accent { background: var(--c-accent-soft); color: var(--c-accent); }
.chip-gold { background: var(--c-gold-chip); color: var(--c-gold-text); border-radius: var(--ag-radius-pill); height: 26px; padding: 0 10px; }
.chip-good { background: var(--c-good-soft); color: var(--c-good); }
.chip-bad { background: var(--c-bad-soft); color: var(--c-bad); }
.progress { height: 6px; border-radius: var(--ag-radius-pill); background: var(--c-track); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--c-accent-bar); }
.figure { font-family: var(--ag-font-sans); font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.figure small { margin-left: 4px; font-size: var(--ag-text-body); font-weight: 600; letter-spacing: 0; }
.divider { height: 1px; background: var(--c-line); border: 0; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--ag-text-small); color: var(--c-text-3); }
.breadcrumb a:hover { color: var(--c-text); text-decoration: underline; text-underline-offset: 4px; }
.breadcrumb .sep { color: var(--c-text-3); }

/* ---------- 深绿面板（实色，不用渐变；每页最多两条，含页脚） ---------- */
.on-deep { background: var(--c-deep); color: var(--c-on-deep); }
.on-deep .overline { color: var(--c-on-deep-2); }
.on-deep .overline::before { background: rgb(243 210 122 / 0.6); }
.on-deep .overline .idx { color: var(--ag-gold-300); }
.on-deep .display { color: var(--c-on-deep); }
.on-deep .display em { color: var(--ag-gold-300); }
.on-deep .soft, .on-deep .muted { color: var(--c-on-deep-2); }
.deep-panel { border-radius: var(--ag-radius-lg); box-shadow: var(--c-overlay); }

/* ---------- WorkBuddy 模型菜单「界面示意」（照主站 WorkBuddyModelList） ---------- */
.wb { display: grid; gap: 10px; }
.wb-win { background: #ffffff; color: #14231d; border-radius: var(--ag-radius-lg); overflow: hidden; box-shadow: var(--ag-elevation-overlay); font-size: var(--ag-text-small); line-height: 20px; }
.wb-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 16px; background: #fbfaf6; box-shadow: inset 0 -1px 0 #e3e6dc; }
.wb-dots { display: flex; gap: 7px; }
.wb-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e1ded5; }
.wb-title { font-size: var(--ag-text-caption); font-weight: 600; color: #5e6e66; }
.wb-tag { margin-left: auto; height: 20px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 4px; background: rgb(20 35 29 / 0.05); color: #5e6e66; font-size: var(--ag-text-caption); font-weight: 500; }
.wb-body { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 18px; min-height: 360px; }
.wb-bubble { justify-self: end; align-self: flex-end; width: 58%; display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px 14px 4px 14px; background: #eeece4; }
.wb-lines { display: grid; gap: 8px; width: 74%; }
.wb-sk { display: block; height: 8px; border-radius: 4px; background: #eeece4; }
.wb-bubble .wb-sk { background: #cbd5cc; }
.wb-menu { position: absolute; right: 22px; bottom: 74px; width: 252px; padding: 6px; border-radius: 14px; background: #fff; box-shadow: var(--ag-elevation-overlay); z-index: 1; }
.wb-menu p { padding: 8px 10px 4px; font-size: var(--ag-text-caption); font-weight: 500; color: #5e6e66; }
.wb-menu li { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.wb-menu li[aria-current] { font-weight: 600; background: #eef4f0; }
.wb-menu li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px #a9b8b0; }
.wb-menu li[aria-current]::before { box-shadow: inset 0 0 0 4px #0b6048; }
.wb-menu li span { font-size: var(--ag-text-caption); color: #5e6e66; font-weight: 500; }
.wb-composer { margin-top: auto; display: grid; gap: 10px; padding: 12px 14px 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px #e3e6dc; }
.wb-composer .ph { color: #5e6e66; }
.wb-composer .row { display: flex; align-items: center; gap: 8px; }
.wb-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: #eeece4; font-weight: 600; }
.wb-send { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #14231d; color: #fff; }
.wb figcaption { font-size: var(--ag-text-caption); color: var(--c-on-deep-2); }

/* ---------- 页脚（主站深绿页脚，加站内链接列） ---------- */
.ft { padding-block: 56px 32px; }
.ft-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--ag-gutter); align-items: start; }
.ft-about { grid-column: 1 / span 5; display: grid; gap: 14px; }
.ft-brand { font: 600 23px/1 'Cormorant Garamond', var(--ag-font-wordmark); letter-spacing: 0.04em; color: var(--c-on-deep); }
.ft p, .ft li { font-size: var(--ag-text-small); line-height: var(--ag-leading-small); color: var(--c-on-deep-2); }
.ft-col { grid-column: span 2; display: grid; gap: 10px; align-content: start; }
.ft-col.c1 { grid-column: 7 / span 2; }
.ft-col.c2 { grid-column: 9 / span 2; }
.ft-col h2 { font-size: var(--ag-text-caption); line-height: var(--ag-leading-caption); font-weight: 600; letter-spacing: 0.04em; color: var(--c-on-deep); margin-bottom: 2px; }
.ft-col a { font-size: var(--ag-text-small); color: var(--c-on-deep-2); width: fit-content; }
.ft-col a:hover { color: var(--c-on-deep); text-decoration: underline; text-underline-offset: 4px; }
.ft-qr { grid-column: 11 / span 2; justify-self: end; display: grid; gap: 8px; grid-template-columns: 104px; font-size: var(--ag-text-caption); line-height: var(--ag-leading-caption); color: var(--c-on-deep-2); }
.ft-qr img { width: 104px; height: 104px; padding: 6px; border-radius: var(--ag-radius-sm); background: #fff; }
.ft-base { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 6px 16px; padding-top: 20px; margin-top: 8px; border-top: 1px solid var(--c-on-deep-line); }
.ft-base p { font-size: var(--ag-text-caption); line-height: var(--ag-leading-caption); }

/* ---------- 正文排版（两个站共用） ---------- */
.prose { font-size: var(--rd-text); line-height: var(--rd-leading); color: var(--c-text); max-width: var(--rd-measure); }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.2em; font-size: var(--ag-text-heading); line-height: var(--ag-leading-heading); font-weight: 650; scroll-margin-top: calc(var(--hd-height) + 24px); }
.prose h3 { margin-top: 1.8em; font-size: var(--ag-text-title); line-height: var(--ag-leading-title); font-weight: 650; }
.prose h4 { margin-top: 1.6em; font-size: var(--ag-text-body); line-height: var(--ag-leading-body); font-weight: 650; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose strong { font-weight: 650; color: inherit; }
.prose a:not(.btn) { color: var(--c-accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c-accent) 35%, transparent); text-underline-offset: 4px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--c-text-3); }
.prose :not(pre) > code {
  font: 0.86em/1 var(--ag-font-mono); padding: 0.18em 0.4em; border-radius: var(--ag-radius-xs);
  background: var(--c-muted); color: var(--c-text); overflow-wrap: anywhere;
}
.prose figure img, .prose .shot img { width: 100%; border-radius: var(--ag-radius-md); box-shadow: var(--c-img-ring); background: var(--c-surface); }
.prose figcaption { margin-top: 10px; font-size: var(--ag-text-small); line-height: var(--ag-leading-small); color: var(--c-text-3); text-align: center; }
.prose figure, .prose .shot { margin-top: 1.6em; margin-bottom: 0.4em; }
.prose blockquote { padding: 4px 0 4px 18px; box-shadow: inset 3px 0 0 var(--c-line-strong); color: var(--c-text-2); }
/* 表格：不画外框，表头用下沉底；窄屏在自己的盒子里横向滚动 */
.table-wrap { overflow-x: auto; border-radius: var(--ag-radius-md); box-shadow: var(--c-ring); background: var(--c-surface); -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: var(--ag-text-small); line-height: var(--ag-leading-small); min-width: 520px; }
.table-wrap th { text-align: left; font-weight: 600; color: var(--c-text-2); background: var(--c-sunken); padding: 10px 16px; white-space: nowrap; }
.table-wrap td { padding: 12px 16px; vertical-align: top; border-top: 1px solid var(--c-line); }
.table-wrap td:first-child { font-weight: 600; color: var(--c-text); white-space: nowrap; }
/* 代码块：下沉底、等宽字、复制按钮；长行在块内滚动，不撑破页面 */
.code { border-radius: var(--ag-radius-md); background: var(--c-code-bg); box-shadow: var(--c-ring); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; padding: 0 8px 0 16px; font-size: var(--ag-text-caption); color: var(--c-text-3); box-shadow: inset 0 -1px 0 var(--c-line); }
.code-head .copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; font-size: var(--ag-text-caption); font-weight: 600; color: var(--c-text-2); }
.code-head .copy:hover { background: var(--c-muted); color: var(--c-text); }
.code pre { margin: 0; padding: 14px 16px 16px; overflow-x: auto; font: 14px/1.7 var(--ag-font-mono); color: var(--c-text); tab-size: 2; }
.code pre code { font: inherit; white-space: pre; }
/* 提示块：底色分层，不画边框 */
.callout { padding: 18px 20px; border-radius: var(--ag-radius-md); background: var(--c-tint); }
.callout > * + * { margin-top: 0.6em; }
.callout-title { display: flex; align-items: center; gap: 8px; font-size: var(--ag-text-small); line-height: var(--ag-leading-small); font-weight: 650; color: var(--c-accent); }
.callout-quiet { background: var(--c-sunken); }
.callout-quiet .callout-title { color: var(--c-text); }

/* ---------- 抽屉 / 底栏（手机） ---------- */
.scrim { position: fixed; inset: 0; background: var(--c-scrim); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 78svh; overflow: auto;
  background: var(--c-surface); border-radius: var(--ag-radius-lg) var(--ag-radius-lg) 0 0; box-shadow: var(--c-overlay);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
}
.sheet:focus { outline: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--c-line-strong); margin: 4px auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; }
.sheet-head h2 { font-size: var(--ag-text-body); font-weight: 650; }
[hidden] { display: none !important; }
.rbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: none;
  background: var(--c-header); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.rbar-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.rbar-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border-radius: var(--ag-radius-sm); font-size: var(--ag-text-small); font-weight: 600; color: var(--c-text); white-space: nowrap; }
.rbar-btn:hover { background: var(--c-muted); }
.rbar-mid { min-width: 0; display: grid; gap: 4px; text-align: center; }
.rbar-mid span { font-size: var(--ag-text-caption); line-height: 1.3; color: var(--c-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbar-next { background: var(--c-btn); color: var(--c-btn-text); }
.rbar-next:hover { background: var(--c-btn-hover); }

/* 阅读进度细线（页头下沿） */
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.read-progress > i { display: block; height: 100%; width: var(--p, 0%); background: var(--c-accent-bar); }

/* 横幅：把读者带回产品（非深色带的轻量版本） */
.cta-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 24px;
  padding: 24px; border-radius: var(--ag-radius-md); background: var(--c-sunken);
}
.cta-card h2, .cta-card h3 { font-size: var(--ag-text-title); line-height: var(--ag-leading-title); font-weight: 650; }
.cta-card p { margin-top: 6px; font-size: var(--ag-text-small); line-height: var(--ag-leading-small); color: var(--c-text-2); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }


/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .hd-back span { display: none; }
}
@media (max-width: 1023px) {
  .nav, .hd-back, .account, .search-btn span, .search-btn kbd { display: none; }
  .search-btn { min-width: 0; width: 40px; padding: 0; justify-content: center; box-shadow: none; background: none; color: var(--c-text-2); }
  .menu-btn { display: inline-grid; }
  .hd-tools { margin-left: auto; }
  .rbar { display: block; }
  body.has-rbar { padding-bottom: 76px; }
}
@media (max-width: 720px) {
  .hd-inner { gap: 8px; }
  .lockup { gap: 8px; }
  .wordmark { font-size: 16px; }
  .lockup-sub .long { display: none; }
  .hd-cta { height: 36px; padding: 0 12px; font-size: var(--ag-text-small); }
  .hd-cta .long { display: none; }
  .hd-tools { gap: 2px; }
  .ft { padding-block: 40px 28px; }
  .ft-about, .ft-col, .ft-qr { grid-column: 1 / -1; }
  .ft-cols { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .ft-qr { justify-self: start; grid-template-columns: 72px minmax(0, 1fr); align-items: center; }
  .ft-qr img { width: 72px; height: 72px; padding: 4px; }
  .ft-base { flex-direction: column; }
  .cta-card { grid-template-columns: 1fr; padding: 20px; }
  .on-deep .cta-actions .btn, .cta-card .cta-actions .btn { flex: 1 1 100%; }
  .ft-cols .ft-col { grid-column: auto; }
}
@media (min-width: 721px) {
  .ft-cols { display: contents; }
  .hd-cta .short { display: none; }
}
@media (max-width: 359px) {
  .lockup-sub { display: none; }
}

/* ---------- 手机菜单（抽屉） ---------- */
.menu-list, .menu-group { display: grid; gap: 2px; }
.menu-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.menu-group > p { padding: 0 12px 6px; }
.menu-link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--ag-radius-sm); font-size: var(--ag-text-body); font-weight: 500; color: var(--c-text); }
.menu-link svg { color: var(--c-text-3); }
.menu-link:hover { background: var(--c-tint); }
.menu-link[aria-current='page'] { background: var(--c-accent-soft); color: var(--c-accent); font-weight: 650; }
.menu-link[aria-current='page'] svg { color: var(--c-accent); }
.menu-cta { width: 100%; margin-top: 16px; }
.sheet-sub { margin: 16px 0 6px; padding-top: 14px; border-top: 1px solid var(--c-line); }
.sheet-foot { display: flex; gap: 8px; margin-top: 16px; }
.sheet-foot .btn { flex: 1; }
.sheet .outline { box-shadow: none; }
.sheet .outline a { padding: 10px 12px; font-size: var(--ag-text-body); border-radius: var(--ag-radius-sm); }
.sheet .outline a.sub { padding-left: 28px; }
.sheet .outline a[aria-current='true'] { background: var(--c-accent-soft); box-shadow: none; }
.sheet .toc-sec, .sheet .side-nav a { font-size: var(--ag-text-body); line-height: 24px; padding-block: 10px; }
.rbar-outline { display: grid; gap: 6px; justify-items: stretch; padding: 4px 8px; border-radius: var(--ag-radius-sm); }
.rbar-outline span:first-child { display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: var(--c-text-2); font-weight: 600; }
.rbar-outline span:first-child svg { width: 14px; height: 14px; }
.rbar-outline .progress { display: block; }
.prose .shot { margin-top: 1.4em; }

/* ---------- 两站共用的阅读件（从 fde.css 移来） ---------- */
.promo-steps { display: grid; gap: 10px; counter-reset: s; margin: 4px 0 6px; }
.promo-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; font-size: var(--ag-text-small); line-height: var(--ag-leading-small); color: var(--c-on-deep); }
.promo-steps li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--ag-text-caption); font-weight: 700; color: var(--ag-gold-300); box-shadow: inset 0 0 0 1px rgb(243 210 122 / 0.5); }
.promo-steps b { font-weight: 650; }
.gold-num { color: var(--ag-gold-300); font-weight: 700; }
.elide { display: flex; align-items: center; gap: 12px; font-size: var(--ag-text-caption); color: var(--c-text-3); }
.elide::before, .elide::after { content: ''; flex: 1; height: 0; border-top: 1px dashed var(--c-line-strong); }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pager a { display: grid; gap: 4px; padding: 16px 20px; border-radius: var(--ag-radius-md); background: var(--c-surface); box-shadow: var(--c-raised); }
.pager a:hover { box-shadow: var(--c-floating); }
.pager small { display: flex; align-items: center; gap: 6px; font-size: var(--ag-text-caption); color: var(--c-text-3); }
.pager strong { font-size: var(--ag-text-body); line-height: 1.6; font-weight: 650; }
.pager .next { text-align: right; justify-items: end; }
.rail-title { font-size: var(--ag-text-caption); font-weight: 650; letter-spacing: 0.04em; color: var(--c-text-3); padding: 0 0 10px 12px; }
.outline { display: grid; gap: 2px; box-shadow: inset 1px 0 0 var(--c-line); }
.outline a { display: block; padding: 6px 0 6px 12px; font-size: var(--ag-text-small); line-height: 20px; color: var(--c-text-3); }
.outline a.sub { padding-left: 24px; }
.outline a:hover { color: var(--c-text); }
.outline a[aria-current='true'] { color: var(--c-accent); font-weight: 650; box-shadow: inset 2px 0 0 var(--c-accent); }
.rail-card { margin-top: 24px; padding: 16px; border-radius: var(--ag-radius-md); background: var(--c-sunken); display: grid; gap: 8px; }
.rail-card h3 { font-size: var(--ag-text-small); line-height: 20px; font-weight: 650; }
.rail-card p { font-size: var(--ag-text-caption); line-height: var(--ag-leading-caption); color: var(--c-text-2); }
.rail-card .text-link { font-size: var(--ag-text-small); }

@media (max-width: 720px) {
  .wb-body { min-height: 0; padding: 14px; }
  .wb-bubble, .wb-lines { display: none; }
  .wb-menu { position: static; width: auto; box-shadow: var(--ag-ring-hairline); }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; justify-items: start; }
}
