/* 资料浏览器：左标题与竖排标签，右侧宽行距详情。 */
.letter { padding-top: 22px; padding-bottom: 120px; }
.letter-grid { display: grid; grid-template-columns: minmax(0,34fr) minmax(0,66fr); gap: 64px; align-items: start; }
.letter-side { position: sticky; top: 32px; }
.letter-side h2 { margin: 0 0 28px; }
.tabs, [role="tablist"].tabs { display: flex; flex-direction: column; gap: 2px; }
.tab {
  display: inline-flex; align-items: center; min-height: 44px;
  text-align: left; font: inherit; font-size: 16px; color: var(--text-muted);
  background: var(--clear); border: 0; border-left: 3px solid var(--clear);
  padding: 8px 0 8px 16px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); font-weight: 700; border-left-color: var(--accent); }
.tabs-horizontal { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tabs-horizontal .tab {
  justify-content: center; padding: 8px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text-muted);
}
.tabs-horizontal .tab[aria-selected="true"] { background: var(--accent-wash); color: var(--accent-dark); border-color: var(--accent); }
[role="tabpanel"] { min-width: 0; }
.detail { padding: 36px 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-window); }
.detail h3 { margin: 0 0 14px; font-size: 22px; }
.detail p { margin: 0 0 16px; font-size: 17px; line-height: 1.88; }
code.inl { font-family: var(--font-mono); font-size: .88em; padding: 1px 5px; border-radius: var(--radius-sm); background: var(--bg-panel-2); color: var(--text); }
.code { margin-top: 24px; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-sunk); color: var(--text); overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 5px 8px 5px 14px; border-bottom: 1px solid var(--border); background: var(--bg-panel-2); color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.copy { flex-shrink: 0; min-height: 28px; padding: 3px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-panel); color: var(--text); font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.copy:hover { border-color: var(--accent); color: var(--accent-dark); }
.code pre { margin: 0; padding: 16px 18px; }
.code .k { color: var(--accent-dark); font-weight: 600; }
.toc-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 14px; }
.toc-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; background: var(--bg-panel); color: var(--accent-dark); border: 1px solid var(--border); border-radius: var(--radius-pill); }
.toc-sticky { position: sticky; top: 0; z-index: 10; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.long-layout { display: grid; grid-template-columns: minmax(0,240px) minmax(0,1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 24px; }
.toc ol, .toc ul { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 8px 12px; border-left: 2px solid var(--border); color: var(--text-muted); text-decoration: none; font-size: 14px; }
.toc a:hover { border-color: var(--accent); color: var(--accent-dark); }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); margin-bottom: 12px; }
.faq-item summary { position: relative; list-style: none; padding: 20px 52px 20px 22px; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; top: 18px; color: var(--accent); font-size: 22px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 20px; line-height: 1.85; color: var(--text-muted); }
.faq-answer p { margin: 0 0 12px; }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); }
.term-card h3 { margin: 12px 0; }
.term-card p { margin: 0; line-height: 1.8; }
.term-en { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.client-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); }
.client-card.is-primary { border-color: var(--accent); box-shadow: var(--shadow-sheet); }
.client-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.client-head h3 { margin: 0; }
.client-body { line-height: 1.8; }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-muted); font-size: 13px; margin-block: 16px; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.client-actions .btn { font-size: 14px; }
[data-rev]:empty { display: none; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge, .chip, .tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 26px; max-width: 100%; padding: 3px 11px;
  border-radius: var(--radius-pill); background: var(--bg-panel-2); color: var(--text-muted);
  font-size: 12.5px; line-height: 1.5; text-decoration: none;
  white-space: normal; overflow-wrap: anywhere;
}
a.chip:hover, a.tag:hover { background: var(--accent-wash); color: var(--accent-dark); }
.badge-primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.badge-recommended { background: var(--accent-wash); color: var(--accent-dark); font-weight: 700; }
.badge-archived { background: var(--bg-panel-2); color: var(--text-muted); border: 1px solid var(--border-strong); }
.post-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); }
.post-card h3 { margin: 16px 0 12px; font-size: 21px; line-height: 1.45; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; }
.post-card p { margin: 0 0 20px; color: var(--text-muted); line-height: 1.8; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); }
.post-card > a:last-child { margin-top: auto; }
.callout { margin-block: 24px; padding: 20px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); line-height: 1.8; box-shadow: var(--shadow-card); }
.callout p { margin: 8px 0 0; }
.callout-warn { border-left-color: var(--warn); }
.callout-error { border-left-color: var(--error); }
.callout-success { border-left-color: var(--success); }
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; background: var(--bg-panel); color: var(--text); }
.data-table :is(th, td), .prose table :is(th, td), .article-body table :is(th, td) { min-width: 7em; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th, .article-body table th { background: var(--bg-panel-2); color: var(--text); font-weight: 700; }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; background: var(--bg-panel); color: var(--text); }
.data-table code, .prose table code, .article-body table code { overflow-wrap: anywhere; }
.article-download { padding: 28px; margin-block: 40px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-sheet); }
.article-download h2 { margin-top: 0; font-size: 24px; }
.dl-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 25;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  max-width: calc(100% - 40px); min-height: 56px; padding: 12px 18px;
  border: 1px solid var(--accent-dark); border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); text-decoration: none; box-shadow: var(--shadow-btn);
}
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.dl-fab b { display: block; font-size: 14px; }
.dl-fab small { display: block; font-size: 12px; }
.has-dl-fab { padding-bottom: 100px; }

/* 完全静态的主窗口，不设置任何动画与假交互状态。 */
.appwin-wrap { position: relative; margin: 0; min-width: 0; }
.appwin-wrap::before {
  content: ""; position: absolute; z-index: 0; left: 32px; right: 32px; bottom: -13px; height: 58%;
  background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sheet);
}
.appwin { position: relative; z-index: 1; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-window); overflow: hidden; }
.appwin-bar { height: 38px; display: flex; align-items: center; gap: 9px; padding-inline: 14px; background: var(--bg-panel-2); color: var(--text-muted); border-bottom: 1px solid var(--border); box-shadow: var(--highlight); }
.appwin-bar .mini { width: 18px; height: 18px; flex-shrink: 0; }
.appwin-name { font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.appwin-ctrl { margin-left: auto; display: flex; gap: 18px; color: var(--text-muted); }
.appwin-ctrl svg { width: 10px; height: 10px; display: block; }
.appwin-body { padding: 22px 24px 24px; }
.appwin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.appwin-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 25px; line-height: 1.2; }
.state { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 3px 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: 12px; color: var(--text-muted); background: var(--bg-panel); }
.dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--success); color: var(--text); box-shadow: 0 0 0 3px var(--bg-panel-2); }
.mods { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 14px; }
.mod { display: flex; flex-direction: column; min-width: 0; }
.mod-label { margin: 0 0 7px; font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.mod-card { flex: 1; min-height: 172px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; line-height: 1.45; }
.hint { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--text-muted); }
.file-row { display: flex; align-items: center; gap: 9px; padding: 8px; background: var(--accent-wash); color: var(--text); border: 1px solid var(--accent); border-radius: var(--radius-sm); }
.file-ico { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--bg-panel); color: var(--accent); }
.file-ico svg { width: 15px; height: 15px; }
.file-meta { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.file-meta b { font-size: 12.5px; }
.file-meta span { font-size: 10.5px; color: var(--text-muted); }
.file-tag { margin-left: auto; flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: var(--accent-dark); }
.import { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ghost { flex: 1; min-height: 28px; display: grid; place-items: center; padding: 4px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-panel); color: var(--text); font-size: 11.5px; font-weight: 600; text-align: center; }
.seg { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; padding: 3px; background: var(--bg-panel-2); color: var(--text-muted); border-radius: var(--radius); }
.seg span { min-height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); font-size: 12.5px; }
.seg .on { background: var(--bg-panel); color: var(--accent-dark); font-weight: 700; box-shadow: var(--shadow-seg); }
.mode-key { align-self: flex-start; padding: 2px 7px; border-radius: var(--radius-sm); background: var(--bg-sunk); color: var(--text); border: 1px solid var(--border); font-size: 11px; }
.mode-key em { font-style: normal; color: var(--accent-dark); font-weight: 600; }
.defs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 11.5px; }
.defs dt { font-weight: 700; }
.defs dd { margin: 0; color: var(--text-muted); }
.toggles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.toggles li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 33px; border-bottom: 1px solid var(--bg-panel-2); font-size: 12.5px; }
.toggles li:last-child { border-bottom: 0; }
.tg { position: relative; width: 28px; height: 16px; flex-shrink: 0; border-radius: var(--radius-pill); background: var(--border-strong); color: var(--text); }
.tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: var(--radius-round); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-toggle); }
.tg.on { background: var(--accent); color: var(--on-accent); }
.tg.on::after { transform: translateX(12px); }
.rules-head { font-size: 10.5px; color: var(--text-muted); }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.rules li { padding: 5px 7px; border-radius: var(--radius-sm); background: var(--bg-sunk); color: var(--text); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.4; overflow-x: auto; white-space: nowrap; }
.rules .t { color: var(--accent-dark); font-weight: 600; }
.mod-card .hint.end { margin-top: auto; }
.radios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.radios li { display: flex; align-items: center; gap: 9px; min-height: 24px; padding-inline: 6px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.radios li.on { background: var(--accent-wash); color: var(--accent-dark); font-weight: 600; }
.rd { width: 12px; height: 12px; flex-shrink: 0; border-radius: var(--radius-round); border: 1.5px solid var(--border-strong); background: var(--bg-panel); color: var(--text); }
.on .rd { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 2.5px var(--bg-panel); }
.def { margin-left: auto; font-family: var(--font-body); font-size: 10.5px; font-weight: 600; color: var(--accent-dark); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-key { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.field-val { min-height: 28px; padding: 5px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-sunk); color: var(--text); font-family: var(--font-mono); font-size: 12.5px; box-shadow: var(--shadow-input); overflow-wrap: anywhere; }
.ext-block { margin-top: 20px; }
.ext { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.ext-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); text-decoration: none; }
.ext-card:hover { border-color: var(--accent); color: var(--text); }
.ext-ico { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: var(--radius); background: var(--accent-wash); color: var(--accent); font-family: var(--font-display); font-weight: 800; font-size: 13px; }
.ext-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ext-txt b { font-size: 13px; }
.ext-txt span { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* 预览页专用的令牌展示，不改变正式页面分区底色。 */
.preview-section { padding-top: 56px; padding-bottom: 56px; }
.preview-section > h2 { margin-top: 0; }
.swatches { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; }
.swatch { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-card); }
.swatch-sample { display: block; min-height: 64px; border-bottom: 1px solid var(--border); }
.swatch code { display: block; padding: 10px; font-size: 12px; }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-panel { background: var(--bg-panel); color: var(--text); }
.sw-panel2 { background: var(--bg-panel-2); color: var(--text); }
.sw-sunk { background: var(--bg-sunk); color: var(--text); }
.sw-border { background: var(--border); color: var(--text); }
.sw-border-strong { background: var(--border-strong); color: var(--text); }
.sw-accent { background: var(--accent); color: var(--on-accent); }
.sw-accent-dark { background: var(--accent-dark); color: var(--on-accent); }
.sw-wash { background: var(--accent-wash); color: var(--text); }
.sw-on-accent { background: var(--on-accent); color: var(--text); }
.sw-text { background: var(--text); color: var(--bg-panel); }
.sw-muted { background: var(--text-muted); color: var(--bg-panel); }
.sw-faint { background: var(--text-faint); color: var(--text); }
.sw-success { background: var(--success); color: var(--text); }
.sw-warn { background: var(--warn); color: var(--text); }
.sw-error { background: var(--error); color: var(--on-accent); }
.sw-mark { background: var(--mark); color: var(--text); }
.sw-clear { background: var(--clear); color: var(--text); }
.sw-veil { background: var(--veil); color: var(--text); }
.type-example { margin-block: 18px; }
.preview-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-block: 20px; }
@media (max-width: 1060px) {
  .letter-grid, .long-layout { grid-template-columns: 1fr; gap: 32px; }
  .letter-side, .toc { position: static; }
  .swatches { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .mods { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ext { grid-template-columns: 1fr; }
  .appwin-body { padding: 18px 16px; }
  .detail { padding: 24px 20px; }
  .detail p { font-size: 16px; }
  .swatches { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .mods { grid-template-columns: 1fr; }
  .appwin-ctrl { display: none; }
  .cta .btn { flex: 1; }
  .client-card { padding: 22px; }
  .client-actions .btn { width: 100%; }
  .dl-fab { right: 20px; bottom: 16px; }
  .letter { padding-bottom: 64px; }
}