/* 静态客户端窗口：不使用交互控件模拟可操作状态。 */
.stage { position: relative; z-index: 1; margin-top: 30px; height: 410px; overflow: hidden; }
.stage::after { content: ""; position: absolute; inset: auto 0 0; height: 96px; z-index: 3; pointer-events: none; background: linear-gradient(180deg,var(--panel2-clear) 0%,var(--panel2-clear) 22%,var(--bg-panel-2) 100%); }
.window { width: min(1180px,calc(100% - 64px)); height: 480px; margin-inline: auto; display: flex; flex-direction: column; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-near),var(--shadow-far); overflow: hidden; }
.win-bar { flex-shrink: 0; height: 46px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: 18px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg,var(--bg-panel),var(--bg)); color: var(--text-muted); }
.win-dots { display: flex; gap: 8px; }
.win-dots i { width: 11px; height: 11px; flex-shrink: 0; border-radius: var(--r-circle); display: block; }
.win-dots i:nth-child(1) { background: var(--dot-close); }
.win-dots i:nth-child(2) { background: var(--dot-min); }
.win-dots i:nth-child(3) { background: var(--dot-max); }
.win-title { font-size: 13px; font-weight: 500; letter-spacing: .01em; }
.win-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 22% minmax(0,1fr); }
.win-side { background: var(--bg-panel-2); color: var(--text-muted); border-right: 1px solid var(--border); padding: 18px 14px; }
.menu { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.menu li { height: 38px; display: flex; align-items: center; padding-inline: 16px; border-radius: var(--r-sm); font-size: 14px; }
.menu li.is-on { background: var(--accent-soft-2); color: var(--accent); font-weight: 500; }
.win-main { display: grid; align-content: start; gap: 12px; padding: 20px 26px; }
.upper { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 14px; }
.lower { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 14px; }
.pane { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); }
.mode { padding: 16px 18px; }
.pane-label { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--text); }
.seg { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 10px; padding: 4px; background: var(--bg-panel-2); color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--r-sm); }
.seg span { height: 32px; display: grid; place-items: center; border-radius: var(--r-xs); font-size: 13.5px; }
.seg .is-on { background: var(--bg-panel); color: var(--accent); font-weight: 500; box-shadow: var(--shadow-near); }
.mode-notes { display: grid; gap: 5px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12px; line-height: 17px; color: var(--text-muted); }
.mode-notes b { font-weight: 500; color: var(--text); margin-right: 6px; }
.switches { padding: 4px 18px; }
.sw-row { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.sw-row:last-child { border-bottom: 0; }
.toggle { position: relative; flex-shrink: 0; width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--toggle-off); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: var(--r-circle); background: var(--bg-panel); box-shadow: var(--shadow-knob); }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(14px); }
.port { font-family: var(--font-mono); font-size: 12.5px; line-height: 18px; padding: 2px 10px; border: 1px solid var(--border); border-radius: var(--r-code); background: var(--bg-panel-2); color: var(--text); }
.rules { background: var(--bg-panel-2); color: var(--text); overflow: hidden; }
.rules-head { height: 32px; display: flex; align-items: center; justify-content: space-between; padding-inline: 16px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.code { margin: 0; padding: 10px 16px 12px; border: 0; border-radius: 0; background: var(--bg-panel-2); color: var(--text); font-family: var(--font-mono); font-size: 13px; line-height: 22px; white-space: pre; }
.code .ln { display: inline-block; width: 24px; color: var(--text-muted); }
.code .k { color: var(--accent); }
.code .p { color: var(--accent-dark); font-weight: 500; }
.sub { padding: 14px 16px; }
.sub-head,.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sub-action { font-size: 12px; line-height: 22px; padding-inline: 10px; border-radius: var(--r-pill); background: var(--accent-soft-2); color: var(--accent); }
.sub-url { margin-top: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--r-input); background: var(--bg-panel-2); color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.sub-row { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }
/* 标签页与勾选式资料浏览器 */
.tabs { min-width: 0; }
.tab-list,[role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
[role="tab"] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: 10px; padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); font: inherit; font-size: 14px; text-align: start; }
[role="tab"]:hover { border-color: var(--border-strong); color: var(--accent); }
[role="tab"][aria-selected="true"] { border-color: var(--accent-ring); background: var(--accent-soft); color: var(--accent); }
[role="tabpanel"] { min-width: 0; }
.feature-browser { display: grid; grid-template-columns: minmax(0,36fr) minmax(0,64fr); gap: 32px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-near),var(--shadow-far); text-align: left; }
.feature-list[role="tablist"] { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.feature-list [role="tab"] { position: relative; width: 100%; justify-content: flex-start; padding: 14px 16px; border-radius: var(--r-sm); overflow: hidden; }
.checkmark { display: inline-grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border: 1px solid var(--border-strong); border-radius: var(--r-circle); color: var(--clear); }
[aria-selected="true"] .checkmark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tab-copy { min-width: 0; }
.tab-copy strong { display: block; font-size: 14px; font-weight: 500; }
.tab-copy small { display: block; margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.feature-list [aria-selected="true"]::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
[data-autoplay].is-playing .feature-list [aria-selected="true"]::after { animation: tab-countdown var(--cycle-time) linear forwards; }
@keyframes tab-countdown { to { transform: scaleX(1); } }
.feature-detail { padding: 8px 4px; }
.feature-detail h3 { margin-top: 0; }
.feature-detail p { color: var(--text-muted); font-size: 15px; line-height: 1.9; }
.feature-example { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel-2); color: var(--text); padding: 20px; margin-top: 24px; }
.feature-example pre { border: 0; padding: 0; margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); margin-bottom: 32px; }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); color: var(--text-muted); text-decoration: none; font-size: 14px; }
.toc a:hover,.toc a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.toc.is-sticky { position: sticky; top: 12px; z-index: 10; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); margin-bottom: 12px; box-shadow: var(--shadow-chip); }
.faq-item summary { cursor: pointer; padding: 20px 52px 20px 22px; position: relative; list-style: none; font-weight: 500; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; top: 20px; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 22px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { padding: 26px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-near); }
.term-card h3 { margin: 8px 0 12px; }
.term-card p { color: var(--text-muted); }
.term-card .term-en { font: 12px var(--font-mono); color: var(--accent); }
.client-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-near); }
.client-card.is-featured { border-color: var(--accent-ring); box-shadow: var(--shadow-near),var(--shadow-far); }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.client-head img { width: 56px; height: 56px; flex-shrink: 0; }
.client-head h3 { margin: 0 0 6px; }
.client-card p { color: var(--text-muted); }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
[data-rev]:empty { display: none; }
[data-rev] { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.tag,.status-badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: var(--r-pill); background: var(--bg-panel-2); color: var(--text-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.status-badge.is-primary,.status-badge.is-recommended { background: var(--accent-soft-2); color: var(--accent); }
.status-badge.is-archived { background: var(--bg-panel-2); color: var(--text-muted); border: 1px solid var(--border-strong); }
.status-dot { width: 7px; height: 7px; border-radius: var(--r-circle); background: var(--success); flex-shrink: 0; }
.status-dot.is-warn { background: var(--warn); }
.status-dot.is-error { background: var(--error); }
.post-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-near); }
.post-card h3 { margin: 0; font-size: 20px; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { margin: 0; color: var(--text-muted); font-size: 14px; }
.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; font-size: 14px; }
.callout { margin: 24px 0; padding: 22px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--bg-panel-2); color: var(--text); }
.callout p { color: var(--text-muted); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }
.table-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); -webkit-overflow-scrolling: touch; }
.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,.prose table th,.article-body table th { background: var(--bg-panel-2); color: var(--text); font-weight: 500; }
.data-table td { color: var(--text-muted); }
.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; }
.prose table code,.article-body table code,.data-table code { overflow-wrap: anywhere; }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg-panel-2); color: var(--text); }
.article-download h2 { margin: 0 0 8px; font-size: 24px; }
.article-download p { margin: 0; color: var(--text-muted); }
.dl-fab { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: inline-flex; align-items: center; justify-content: center; gap: 12px; max-width: calc(100% - 32px); min-height: 56px; padding: 12px 20px; border: 1px solid var(--accent-ring); border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-btn-nav); text-decoration: none; font-size: 14px; }
.dl-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
/* 预览专用陈列，不改变正式组件皮肤。 */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 16px; }
.swatch { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--bg-panel); color: var(--text); }
.swatch i { display: block; height: 64px; border-bottom: 1px solid var(--border); }
.swatch code { display: block; padding: 10px; font-size: 12px; color: var(--text-muted); }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--bg-panel); }
.sw-panel2 { background: var(--bg-panel-2); }
.sw-border { background: var(--border); }
.sw-border-strong { background: var(--border-strong); }
.sw-toggle { background: var(--toggle-off); }
.sw-accent { background: var(--accent); }
.sw-dark { background: var(--accent-dark); }
.sw-soft { background: var(--accent-soft); }
.sw-soft2 { background: var(--accent-soft-2); }
.sw-ring { background: var(--accent-ring); }
.sw-grad1 { background: var(--grad-1); }
.sw-grad2 { background: var(--grad-2); }
.sw-grad3 { background: var(--grad-3); }
.sw-gradient { background: var(--accent-grad); }
.sw-text { background: var(--text); }
.sw-muted { background: var(--text-muted); }
.sw-faint { background: var(--text-faint); }
.sw-on { background: var(--on-accent); }
.sw-success { background: var(--success); }
.sw-warn { background: var(--warn); }
.sw-error { background: var(--error); }
.sw-close { background: var(--dot-close); }
.sw-min { background: var(--dot-min); }
.sw-max { background: var(--dot-max); }
.sw-violet { background: var(--glow-violet); }
.sw-sky { background: var(--glow-sky); }
.sw-indigo { background: var(--glow-indigo); }
.sw-lilac { background: var(--glow-lilac); }
.sw-veil { background: var(--veil); }
.sw-clear { background: var(--clear); }
.sw-panel-clear { background: var(--panel2-clear); }
.preview-stack { display: grid; gap: 24px; }
.preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-fab { position: static; }
.preview-type h1 { margin-top: 0; }
.preview-type .display-sample { font-family: var(--font-display); font-size: 48px; font-weight: 400; line-height: 1.15; }
@media (max-width: 760px) {
  .stage { height: 420px; }
  .window { width: calc(100% - 32px); height: 560px; border-radius: var(--r-lg); }
  .win-body { grid-template-columns: minmax(0,1fr); }
  .win-side { display: none; }
  .win-main { padding: 16px; }
  .upper,.lower { grid-template-columns: minmax(0,1fr); }
  .feature-browser { grid-template-columns: minmax(0,1fr); gap: 24px; padding: 20px; }
  .feature-list[role="tablist"] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .feature-list [role="tab"] { padding: 12px 10px; gap: 8px; }
  .tab-copy small { font-size: 11px; }
  .dl-fab { right: 16px; bottom: 16px; }
  .preview-type .display-sample { font-size: 30px; }
}
@media (max-width: 400px) {
  .feature-list [role="tab"] { align-items: flex-start; }
  .checkmark { width: 18px; height: 18px; margin-top: 3px; }
  .tab-copy strong { font-size: 12px; }
}