/* 批注式配置清单 */
.tabs { min-width: 0; }
.tab-list, [role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin-bottom: 24px; }
.tab, [role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  color: var(--text);
  font: var(--weight-medium) 15px/1.5 var(--font-body);
  text-align: left;
}
.tab[aria-selected="true"] { border-color: var(--line-on-dark-strong); background: var(--veil); color: var(--text); }
.surface-light .tab { border-color: var(--line-light); background: var(--surface-light); color: var(--ink); }
.surface-light .tab[aria-selected="true"] { border-color: var(--accent); background: var(--surface-light-hover); color: var(--ink); }
[role="tabpanel"] { min-width: 0; }
.feature-browser { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 40px; }
.feature-browser [role="tablist"] { display: flex; flex-direction: column; gap: 0; margin: 0; }
.feature-browser .tab {
  position: relative;
  display: block;
  width: 100%;
  padding: 22px 24px;
  border: 0;
  border-bottom: 1px solid var(--line-light);
  border-radius: 0;
  background: var(--surface-light);
  color: var(--ink);
}
.feature-browser .tab[aria-selected="true"] { background: var(--surface-light-hover); color: var(--ink); }
.feature-browser .tab[aria-selected="true"]::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); }
.tab-key { display: block; margin-bottom: 4px; font: 13px/1.6 var(--font-mono); color: var(--ink-muted); overflow-wrap: anywhere; }
.tab-progress { position: absolute; inset: auto 0 0; height: 1px; background: var(--line-light); }
.tab-progress::after { content: ""; display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.tabs.is-rotating .tab[aria-selected="true"] .tab-progress::after { animation: tab-read 9s linear forwards; }
@keyframes tab-read { to { transform: scaleX(1); } }
.feature-panel { border: 1px solid var(--line-light); border-radius: var(--radius); overflow: hidden; background: var(--surface-light); color: var(--ink); }
.feature-panel pre { margin: 0; border: 0; border-bottom: 1px solid var(--line-light); border-radius: 0; background: var(--surface-light-hover); color: var(--ink); }
.config-line { display: block; }
.config-line.is-marked { background: var(--highlight-light); color: var(--ink); }
.feature-description { padding: 28px; line-height: 1.85; }
.feature-description p:last-child { margin-bottom: 0; }
.accordion-tab { display: none; }
.toc { position: sticky; top: 0; z-index: 10; display: flex; gap: 8px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); margin-bottom: 32px; }
.surface-light .toc { border-color: var(--line-light); background: var(--surface-light); color: var(--ink); }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; text-decoration: none; border-radius: var(--radius); }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.toc-target { scroll-margin-top: 100px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 0; }
.surface-light .faq-item { border-color: var(--line-light); }
.faq-item summary { position: relative; cursor: pointer; list-style: none; min-height: 60px; padding: 18px 36px 18px 0; font-weight: var(--weight-semibold); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 6px; top: 18px; font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; color: var(--text-muted); max-width: 70em; }
.surface-light .faq-answer { color: var(--ink-muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--border); }
.term-card dt { font-size: 21px; font-weight: var(--weight-semibold); }
.term-card dd { margin: 14px 0 0; }
.term-key { display: block; margin-bottom: 10px; font: 12px var(--font-mono); color: var(--text-muted); }
.surface-light .term-key { color: var(--ink-muted); }
.client-card { display: flex; flex-direction: column; gap: 20px; }
.client-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.client-card-head h3 { margin: 0; }
.client-card p { margin: 0; }
.client-card .button-row { margin-top: auto; }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-muted); font-size: 13px; }
.surface-light .client-meta { color: var(--ink-muted); }
[data-rev]:empty { display: none; }
.badge, .tag { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 9px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; background: var(--bg-panel); color: var(--text); }
.surface-light .badge, .surface-light .tag { border-color: var(--line-light); background: var(--surface-light-hover); color: var(--ink); }
.badge-first::before, .badge-recommended::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: var(--radius-round); background: var(--success); flex-shrink: 0; }
.badge-archived::before { content: ""; width: 6px; height: 6px; margin-right: 7px; border-radius: var(--radius-round); background: var(--warn); flex-shrink: 0; }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.article-card { display: flex; flex-direction: column; }
.article-card h3 { margin-top: 18px; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.article-card p { color: var(--text-muted); }
.surface-light .article-card p { color: var(--ink-muted); }
.article-card time { margin-top: auto; padding-top: 12px; font: 12px var(--font-mono); color: var(--text-muted); }
.surface-light .article-card time { color: var(--ink-muted); }
.callout { margin: 28px 0; padding: 22px 24px; border: 1px solid var(--border); border-left: 3px solid var(--text-muted); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); }
.surface-light .callout { border-color: var(--line-light); border-left-color: var(--ink-muted); background: var(--surface-light-hover); color: var(--ink); }
.callout > :last-child { margin-bottom: 0; }
.callout-warn { border-left-color: var(--warn); }
.callout-success { border-left-color: var(--success); }
.surface-light .callout-warn { border-left-color: var(--warn); }
.surface-light .callout-success { border-left-color: var(--success); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--border); border-radius: var(--radius); }
.surface-light .table-scroll { border-color: var(--line-light); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td, .article-body table th, .article-body table td { min-width: 7em; padding: 14px 18px; border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal; vertical-align: top; }
.data-table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.surface-light .data-table th { background: var(--surface-light-hover); color: var(--ink); }
.surface-light .data-table th, .surface-light .data-table td, .surface-light .prose table th, .surface-light .prose table td { border-color: var(--line-light); }
.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; }
.download-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 44px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); }
.surface-light .download-note { border-color: var(--line-light); background: var(--surface-light-hover); color: var(--ink); }
.download-note p { margin: 6px 0 0; }
.download-note > div { flex: 1 1 230px; min-width: 0; }
.dl-fab { position: fixed; z-index: 25; right: 24px; bottom: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; max-width: calc(100% - 36px); padding: 14px 20px; border: 1px solid var(--line-light); border-radius: var(--radius); background: var(--surface-light); color: var(--ink); box-shadow: var(--fab-shadow); text-decoration: none; }
.dl-fab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dl-fab strong { display: block; font-size: 14px; }
.dl-fab small { display: block; color: var(--ink-muted); font-size: 12px; }
.dl-fab:hover { border-color: var(--accent); text-decoration: none; }
.steps { list-style: none; padding: 0; counter-reset: setup; }
.steps > li { position: relative; padding-left: 52px; padding-bottom: 28px; counter-increment: setup; }
.steps > li::before { content: counter(setup,decimal-leading-zero); position: absolute; left: 0; top: 2px; color: var(--text-muted); font-family: var(--font-mono); }
.steps > li[aria-current="step"]::before { color: var(--accent); }
.surface-light .steps > li::before { color: var(--ink-muted); }
.surface-light .steps > li[aria-current="step"]::before { color: var(--accent-dark); }

/* 预览页色板：每个色块均通过令牌取色。 */
.palette { display: grid; grid-template-columns: repeat(auto-fit,minmax(165px,1fr)); gap: 14px; }
.swatch { border: 1px solid var(--line-light); border-radius: var(--radius); overflow: hidden; background: var(--surface-light); color: var(--ink); }
.swatch::before { content: ""; display: block; height: 64px; background: var(--swatch-color); }
.swatch code { display: block; padding: 10px; font-size: 11px; }
.sw-bg { --swatch-color: var(--bg); }
.sw-panel { --swatch-color: var(--bg-panel); }
.sw-panel2 { --swatch-color: var(--bg-panel-2); }
.sw-border { --swatch-color: var(--border); }
.sw-accent { --swatch-color: var(--accent); }
.sw-accent-dark { --swatch-color: var(--accent-dark); }
.sw-text { --swatch-color: var(--text); }
.sw-muted { --swatch-color: var(--text-muted); }
.sw-success { --swatch-color: var(--success); }
.sw-warn { --swatch-color: var(--warn); }
.sw-error { --swatch-color: var(--error); }
.sw-light { --swatch-color: var(--surface-light); }
.sw-ink { --swatch-color: var(--ink); }
.sw-ink-muted { --swatch-color: var(--ink-muted); }
.sw-line { --swatch-color: var(--line-light); }
.sw-hover { --swatch-color: var(--surface-light-hover); }
.sw-highlight { --swatch-color: var(--highlight-light); }
.sw-veil { --swatch-color: var(--veil); }
.sw-darkline { --swatch-color: var(--line-on-dark); }
.sw-darkline-strong { --swatch-color: var(--line-on-dark-strong); }
.sw-chip { --swatch-color: var(--chip-fill); }
.sw-chip-hover { --swatch-color: var(--chip-fill-hover); }
.sw-shadow { --swatch-color: var(--shadow-ink); }
.sw-wall { --swatch-color: var(--scene-wall); }
.sw-wall-deep { --swatch-color: var(--scene-wall-deep); }
.sw-shelf { --swatch-color: var(--scene-shelf); }
.sw-shelf-edge { --swatch-color: var(--scene-shelf-edge); }
.sw-book1 { --swatch-color: var(--book-1); }
.sw-book2 { --swatch-color: var(--book-2); }
.sw-book3 { --swatch-color: var(--book-3); }
.sw-book4 { --swatch-color: var(--book-4); }
.sw-book5 { --swatch-color: var(--book-5); }
.sw-box { --swatch-color: var(--scene-box); }
.sw-desk { --swatch-color: var(--scene-desk); }
.sw-desk-edge { --swatch-color: var(--scene-desk-edge); }
.sw-grain { --swatch-color: var(--scene-grain); }
.sw-metal { --swatch-color: var(--lamp-metal); }
.sw-shade { --swatch-color: var(--lamp-shade); }
.sw-glow { --swatch-color: var(--lamp-glow); }
.sw-bulb { --swatch-color: var(--lamp-bulb); }
.sw-bezel { --swatch-color: var(--laptop-bezel); }
.sw-silver { --swatch-color: var(--laptop-silver); }
.sw-silver-dim { --swatch-color: var(--laptop-silver-dim); }
.sw-screen { --swatch-color: var(--screen-bg); }
.sw-gutter { --swatch-color: var(--screen-gutter); }
.sw-bar { --swatch-color: var(--screen-bar); }
.sw-tab { --swatch-color: var(--screen-tab); }
.sw-tabbar { --swatch-color: var(--screen-tabbar); }
.sw-curline { --swatch-color: var(--screen-curline); }
.sw-key { --swatch-color: var(--code-key); }
.sw-val { --swatch-color: var(--code-val); }
.sw-dim { --swatch-color: var(--code-dim); }
.sw-str { --swatch-color: var(--code-str); }
.sw-paper { --swatch-color: var(--paper); }
.sw-paper-ink { --swatch-color: var(--paper-ink); }
.sw-paper-soft { --swatch-color: var(--paper-soft); }
.sw-paper-rule { --swatch-color: var(--paper-rule); }
.sw-phone { --swatch-color: var(--phone-body); }
.sw-phone-screen { --swatch-color: var(--phone-screen); }
.sw-mug { --swatch-color: var(--mug); }
.sw-mug-rim { --swatch-color: var(--mug-rim); }
.sw-mug-inner { --swatch-color: var(--mug-inner); }
.sw-mug-shade { --swatch-color: var(--mug-shade); }
.sw-transparent { --swatch-color: var(--transparent); }
.type-display { font: var(--weight-regular) 40px/1.3 var(--font-display); }
.type-mono { font-family: var(--font-mono); }
.sample-stack > * + * { margin-top: 24px; }
@media (max-width: 768px) {
  .feature-browser { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .feature-browser.is-enhanced [role="tablist"] { display: none; }
  .feature-browser.is-enhanced .feature-panel { display: block !important; margin-bottom: 12px; }
  .feature-browser.is-enhanced .feature-panel[hidden] > :not(.accordion-tab) { display: none; }
  .accordion-tab { display: block; width: 100%; min-height: 52px; text-align: left; padding: 14px 18px; border: 0; background: var(--surface-light); color: var(--ink); font-weight: var(--weight-semibold); }
  .accordion-tab[aria-expanded="true"] { border-left: 3px solid var(--accent); background: var(--surface-light-hover); color: var(--ink); }
  .feature-description { padding: 22px; }
  .toc { position: static; }
  .dl-fab { right: 18px; bottom: 18px; padding: 12px 16px; }
  .type-display { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .tabs.is-rotating .tab[aria-selected="true"] .tab-progress::after { animation: none; }
}