/* 配置窗：仅用于静态说明，不放交互控件。 */
.device { position: relative; z-index: 2; margin-top: 28px; margin-bottom: calc(var(--device-bleed) * -1); margin-right: 14px; }
.window { background: var(--bg-panel); color: var(--text); border: 3px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-window); overflow: hidden; }
.window__bar { position: relative; display: flex; align-items: center; height: 36px; padding-inline: 14px; background: var(--bg-chrome); color: var(--text-muted); border-bottom: 1px solid var(--line-soft); }
.window__dots { display: flex; gap: 8px; }
.window__dot { width: 12px; height: 12px; border-radius: var(--radius-circle); }
.window__dot--r { background: var(--error); }
.window__dot--y { background: var(--warn); }
.window__dot--g { background: var(--success); }
.window__title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; }
.window__body { display: grid; grid-template-columns: 22% minmax(0, 1fr); }
.side { padding: 18px 14px; border-right: 1px solid var(--line-soft); }
.side__head { display: flex; align-items: center; gap: 10px; padding-inline: 6px; }
.side__mark { width: 28px; height: 28px; flex: none; }
.side__name { display: block; font: var(--weight-display) 15px/1.2 var(--font-display); letter-spacing: -.01em; }
.side__sub { display: block; font: 11px/1.4 var(--font-mono); color: var(--text-muted); }
.side__nav { margin-top: 18px; display: grid; gap: 2px; }
.side__item { display: flex; align-items: center; gap: 10px; height: 36px; padding-inline: 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: var(--weight-medium); line-height: 1; }
.side__item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted); }
.side__item--on { background: var(--bg-panel2); color: var(--text); font-weight: var(--weight-bold); }
.side__item--on svg { color: var(--text); }
.pane { min-width: 0; padding: 18px 24px; }
.field__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--text-muted); line-height: 16px; }
.field__row { display: flex; gap: 10px; max-width: 700px; margin-top: 8px; }
.field__input { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 38px; padding: 7px 12px; background: var(--bg-input); color: var(--text); border: 1.5px solid var(--line-mid); border-radius: var(--radius-sm); font: 13px/1.6 var(--font-mono); overflow-wrap: anywhere; }
.field__input svg { width: 15px; height: 15px; fill: none; stroke: var(--text-muted); stroke-width: 1.6; stroke-linecap: round; }
.field__btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 38px; padding-inline: 18px; background: var(--text); color: var(--on-dark); border-radius: var(--radius-sm); font-size: 13px; font-weight: var(--weight-bold); }
.switches { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 14px; }
.sw-item { display: flex; align-items: center; gap: 10px; min-height: 20px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.sw { position: relative; width: 34px; height: 20px; border-radius: var(--radius-pill); background: var(--line-soft); border: 1.5px solid var(--line-mid); }
.sw__knob { position: absolute; top: 1.5px; left: 1.5px; width: 14px; height: 14px; border-radius: var(--radius-circle); background: var(--bg-panel); border: 1px solid var(--line-mid); }
.sw--on { background: var(--success); border-color: var(--success); }
.sw--on .sw__knob { left: 15.5px; border-color: var(--success); }
.sw-item__state { font: var(--weight-medium) 11px/1 var(--font-mono); color: var(--text-muted); }
.editor { margin-top: 14px; border: 1.5px solid var(--line-soft); border-radius: var(--radius-sm); }
.editor__tabs { display: flex; align-items: center; height: 30px; padding-inline: 10px; background: var(--bg-chrome); color: var(--text); border-bottom: 1px solid var(--line-soft); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.editor__tab { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding-inline: 10px; margin-bottom: -1px; background: var(--bg-panel); color: var(--text); border-inline: 1px solid var(--line-soft); font: var(--weight-medium) 12px/1 var(--font-mono); }
.editor__tab svg { width: 13px; height: 13px; fill: none; stroke: var(--accent-dark); stroke-width: 1.6; stroke-linejoin: round; }
.editor__lang { margin-left: auto; font: 11px/1 var(--font-mono); color: var(--text-muted); }
.editor__body { position: relative; padding-block: 8px; }
.code-scroll { max-width: 100%; overflow-x: auto; }
.code { min-width: 480px; font: 13.5px/22px var(--font-mono); }
.code__ln { display: grid; grid-template-columns: 46px minmax(0, 1fr); height: 22px; white-space: pre; }
.code__no { padding-right: 14px; text-align: right; color: var(--text-muted); user-select: none; }
.code__ln--mark { background: var(--bg); color: var(--text); }
.code__ln--mark .code__no { color: var(--accent-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.k { color: var(--accent-dark); font-weight: var(--weight-medium); }
.p, .pol { color: var(--text-muted); }
.v, .t { color: var(--text); }
.t { font-weight: 700; }
.note { position: absolute; top: 18px; right: 22px; width: 300px; padding: 14px 16px 16px; background: var(--bg-panel); color: var(--text); border: 1px solid var(--line-mid); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
.note::before { content: ""; position: absolute; top: 105px; left: -7px; width: 12px; height: 12px; background: var(--bg-panel); border-left: 1px solid var(--line-mid); border-bottom: 1px solid var(--line-mid); transform: rotate(45deg); }
.note__head { display: flex; align-items: center; gap: 9px; height: 24px; }
.note__avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-circle); background: var(--bg); color: var(--text); border: 1px solid var(--line-mid); }
.note__avatar img { width: 17px; height: 17px; }
.note__title { font-size: 13px; font-weight: var(--weight-bold); line-height: 1; }
.note__ref { margin-left: auto; font: 11px/1 var(--font-mono); color: var(--text-muted); }
.note__text { margin-top: 10px; font-size: 13px; line-height: 1.6; }
.note__text code { font-size: 12px; padding: 1px 4px; background: var(--bg-panel2); color: var(--text); border-radius: var(--radius-xs); }
.note__reply { display: flex; align-items: center; min-height: 30px; margin-top: 12px; padding: 5px 10px; border: 1px solid var(--line-mid); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--text-muted); }

/* 文档页式特性浏览器。 */
.feature-browser { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.feature-browser > * { min-width: 0; }
.tablist { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 4px 6px 10px 0; }
.feature-browser .tablist { flex-direction: column; align-items: stretch; gap: 10px; }
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  background: var(--clear);
  color: var(--text);
  border: 2px solid var(--clear);
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: var(--weight-bold);
  line-height: 1.4;
}
.feature-browser .tab { justify-content: flex-start; font-size: 20px; font-weight: var(--weight-display); }
.tab:hover { background: var(--bg-panel); color: var(--text); }
.tab[aria-selected="true"] { background: var(--bg-panel); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-btn); }
.tabpanel { min-width: 0; }
.doc-panel { padding: 40px; background: var(--bg-panel); color: var(--text); border: 2px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-doc); }
.doc-panel p { color: var(--text-muted); }
.doc-panel .text-link { display: inline-block; margin-top: 20px; }
.code-block { min-width: 0; margin-top: 24px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text); }
.code-block__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); font: 12px/1.5 var(--font-mono); }
.code-block pre { margin: 0; border: 0; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 12px; background: var(--bg-panel); color: var(--text); border: 1px solid var(--line-mid); border-radius: var(--radius-xs); font: var(--weight-medium) 13px/1.4 var(--font-body); }
.copy-button:hover { border-color: var(--border); }

.toc { position: sticky; top: 16px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-bottom: 36px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-btn); }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; font-size: 14px; font-weight: 700; border-radius: var(--radius-pill); }
.toc a:hover, .toc a[aria-current] { background: var(--bg-panel2); color: var(--text); }
.faq-item { border-bottom: 1px solid var(--line-mid); background: var(--bg-panel); color: var(--text); }
.faq-item:first-child { border-top: 2px solid var(--border); }
.faq-item summary { position: relative; padding: 22px 48px 22px 16px; cursor: pointer; font-size: 18px; font-weight: var(--weight-bold); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 22px; font-family: var(--font-mono); font-size: 22px; line-height: 1.4; }
.faq-item[open] summary::after { content: "−"; }
.faq-item__answer { padding: 0 48px 24px 16px; color: var(--text-muted); }
.faq-item__answer p + p { margin-top: 16px; }
.term-card { border-top-width: 4px; }
.term-card__name { margin-bottom: 6px; font-size: 23px; }
.term-card__alias { display: block; margin-bottom: 18px; color: var(--text-muted); font: 13px/1.6 var(--font-mono); }
.term-card__category { margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.client-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.client-card__head h3 { margin: 0; }
.client-card__icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-card__meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; color: var(--text-muted); font-size: 14px; }
[data-version]:empty { display: none; }
.client-card__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.client-card--first { background: var(--bg); color: var(--text); }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: 12px; font-weight: var(--weight-bold); line-height: 1.5; overflow-wrap: anywhere; }
.badge--first { background: var(--text); color: var(--on-dark); }
.badge--recommended { background: var(--bg-panel2); color: var(--text); }
.badge--archived { background: var(--bg-chrome); color: var(--text-muted); border-style: dashed; }
.badge--topic { background: var(--bg-panel2); color: var(--text); }
.post-card { display: flex; flex-direction: column; align-items: flex-start; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 13px; color: var(--text-muted); }
.post-card h3 { font-size: 22px; line-height: 1.5; }
.post-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-card p { font-size: 16px; color: var(--text-muted); }
.post-card__link { margin-top: auto; padding-top: 24px; font-size: 14px; font-weight: var(--weight-bold); }
.callout { margin-block: 24px; padding: 24px; background: var(--bg); color: var(--text); border: 1px solid var(--line-mid); border-left: 4px solid var(--accent); border-radius: var(--radius-xs); }
.callout__title { display: block; margin-bottom: 8px; font-weight: var(--weight-bold); }
.callout--note { background: var(--bg-panel2); color: var(--text); border-left-color: var(--border); }
.callout--warning { background: var(--bg); color: var(--text); border-left-color: var(--warn); }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; margin-block: 24px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; background: var(--bg-panel); color: var(--text); }
.data-table th, .data-table td, .prose table th, .prose table td, .doc-panel table th, .doc-panel table td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th, .doc-panel table th { background: var(--bg-chrome); color: var(--text); font-weight: var(--weight-bold); }
.prose table, .doc-panel table {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--bg-panel);
  color: var(--text);
}
.data-table code, .prose table code, .doc-panel table code { overflow-wrap: anywhere; word-break: normal; }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 56px; padding: 28px; background: var(--bg-panel2); color: var(--text); border: 2px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); }
.article-download__body { flex: 1 1 260px; min-width: 0; }
.article-download h2 { margin: 0 0 10px; font-size: 24px; }
.article-download p { font-size: 16px; color: var(--text-muted); }
.dl-fab { position: fixed; right: 24px; bottom: 24px; z-index: 15; display: inline-flex; align-items: center; justify-content: center; gap: 12px; max-width: calc(100% - 32px); min-height: 60px; padding: 12px 20px; background: var(--text); color: var(--on-dark); border: 2px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-btn-accent); font-size: 15px; font-weight: var(--weight-bold); }
.dl-fab svg { width: 22px; height: 22px; }
.dl-fab small { display: block; font-size: 12px; font-weight: var(--weight-body); }
.dl-fab:hover { transform: translate(2px, 2px); box-shadow: var(--shadow-btn-accent-press); }

/* 设计预览专用排布；色值仍只来自令牌。 */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.swatch { min-width: 0; border: 1px solid var(--line-mid); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-panel); color: var(--text); }
.swatch__paint { height: 70px; border-bottom: 1px solid var(--line-mid); }
.swatch code { display: block; padding: 10px 12px; font-size: 12px; }
.paint-bg { background: var(--bg); }
.paint-panel { background: var(--bg-panel); }
.paint-panel2 { background: var(--bg-panel2); }
.paint-chrome { background: var(--bg-chrome); }
.paint-input { background: var(--bg-input); }
.paint-border { background: var(--border); }
.paint-accent { background: var(--accent); }
.paint-accent-dark { background: var(--accent-dark); }
.paint-text { background: var(--text); }
.paint-muted { background: var(--text-muted); }
.paint-faint { background: var(--text-faint); }
.paint-on-dark { background: var(--on-dark); }
.paint-success { background: var(--success); }
.paint-warn { background: var(--warn); }
.paint-error { background: var(--error); }
.paint-soft { background: var(--line-soft); }
.paint-mid { background: var(--line-mid); }
.paint-shadow { background: var(--shadow-hard); }
.paint-veil { background: var(--veil); }
.paint-clear { background: var(--clear); }
.specimen-row { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.specimen-row + .specimen-row { margin-top: 28px; }
.type-display { font: var(--weight-display) 48px/1.2 var(--font-display); letter-spacing: -.02em; }
.type-mono { font-family: var(--font-mono); }
.preview-mobile { display: none; }

@media (max-width: 1180px) {
  .note { width: 270px; }
}
@media (max-width: 980px) {
  .window__body { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .feature-browser { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature-browser .tablist { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 12px; }
  .feature-browser .tab { flex-shrink: 0; font-size: 18px; }
}
@media (max-width: 640px) {
  .device { margin-right: 8px; }
  .window { box-shadow: var(--shadow-window-mobile); }
  .window__title { left: auto; right: 12px; transform: none; font-size: 11px; }
  .pane { padding: 14px; }
  .field__row { gap: 8px; }
  .field__input { padding-inline: 8px; font-size: 11px; }
  .field__btn { padding-inline: 12px; }
  .switches { gap: 12px 20px; }
  .sw-item { gap: 7px; font-size: 12px; }
  .note { position: static; width: auto; margin: 10px 12px 4px; }
  .note::before { display: none; }
  .doc-panel { padding: 22px; margin-right: 10px; }
  .tablist { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; }
  .tab { flex-shrink: 0; font-size: 15px; padding-inline: 16px; }
  .toc { position: static; flex-wrap: nowrap; overflow-x: auto; }
  .toc a { flex-shrink: 0; }
  .faq-item summary { padding-left: 12px; font-size: 16px; }
  .faq-item__answer { padding-left: 12px; padding-right: 16px; font-size: 16px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .type-display { font-size: 30px; }
  .dl-fab { right: 16px; bottom: 16px; padding: 10px 14px; min-height: 52px; }
  .article-download { padding: 22px; }
  .preview-mobile { display: block; }
}