/* 首次配置装置。窗口内容为静态配置示意，不承担表单交互。 */
.stage { position: relative; margin-top: clamp(64px,10vh,120px); text-align: left; }
.stage::before {
  content: ""; position: absolute; left: 50%; top: 38%; z-index: 0;
  width: 1500px; height: 760px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,var(--halo) 0%,var(--clear) 70%),radial-gradient(ellipse 34% 40% at 72% 46%,var(--halo-blue) 0%,var(--clear) 72%);
}
.window { position: relative; z-index: 1; width: min(1180px,92vw); margin-inline: auto; background: var(--white); color: var(--ink); border: 1px solid var(--line-light); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 44px 100px -24px var(--shadow-deep),0 0 90px 4px var(--glow-accent); }
.chrome { display: flex; align-items: center; gap: 16px; min-height: 46px; padding: 6px 16px; border-bottom: 1px solid var(--line-light); }
.lights { display: flex; flex-shrink: 0; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: var(--radius-round); background: var(--chrome-dot); color: var(--ink); }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; font-size: 13px; color: var(--ink-muted); }
.crumbs .sep { color: var(--ink-muted); }
.crumbs .here { color: var(--ink); }
.os-pill { margin-left: 4px; padding: 2px 8px; font-size: 11px; font-weight: var(--weight-medium); letter-spacing: .02em; background: var(--accent-soft); color: var(--accent-dark); border-radius: var(--radius-sm); }
.chrome-tools { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.tool { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-muted); border: 1px solid var(--line-light); border-radius: var(--radius-sm); background: var(--white); }
.tool svg,.rail-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.win-body { display: grid; grid-template-columns: 56px minmax(0,1fr) 340px; min-height: 480px; }
.win-body > * { min-width: 0; }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 14px; background: var(--surface-soft); color: var(--ink-muted); border-right: 1px solid var(--line-light); }
.rail-item { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-md); color: var(--ink-muted); }
.rail-item.is-current { background: var(--accent-soft); color: var(--accent-dark); }
.wizard { padding: 26px 36px; min-width: 0; }
.wizard-title { margin: 0; font-size: 20px; font-weight: var(--weight-regular); color: var(--ink); letter-spacing: -.005em; }
.wizard-sub { margin: 4px 0 0; font-size: 13px; color: var(--ink-muted); }
.field-label { display: block; margin-top: 18px; font-size: 12px; font-weight: var(--weight-medium); color: var(--ink-muted); letter-spacing: .02em; }
.field { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-top: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--accent); border-radius: var(--radius-md); background: var(--white); color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.field svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: var(--ink-muted); stroke-width: 1.7; stroke-linecap: round; }
.field-value { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.field-action { min-height: 30px; padding: 5px 14px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; font-weight: var(--weight-medium); color: var(--white); background: var(--grad-accent); border-radius: var(--radius-sm); }
.code { margin-top: 16px; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: var(--bg-panel-2); color: var(--ink); min-width: 0; }
.code-head { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 5px 14px; border-bottom: 1px solid var(--line-light); font-size: 12px; color: var(--ink-muted); }
.code-head .file { color: var(--ink); }
.code-tag { font-family: var(--font-mono); font-size: 10px; padding: 1px 6px; border: 1px solid var(--line-light); border-radius: var(--radius-xs); background: var(--white); color: var(--ink-muted); }
.code-head .enc { margin-left: auto; font-family: var(--font-mono); font-size: 11px; }
.code-body { margin: 0; padding: 12px 0; border: 0; border-radius: 0; font-family: var(--font-mono); font-size: 13px; line-height: 22px; counter-reset: ln; overflow-x: auto; }
.ln { display: block; white-space: pre; padding-right: 16px; color: var(--ink-muted); }
.ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 40px; padding-right: 14px; text-align: right; color: var(--ink-muted); }
pre .k { color: var(--accent-dark); }
pre .v { color: var(--ink-muted); }
pre .r,pre .s { color: var(--ink); }
.steps { border-left: 1px solid var(--line-light); padding: 24px 22px; }
.steps-head { margin: 0; font-size: 13px; font-weight: var(--weight-medium); color: var(--ink); letter-spacing: .02em; }
.step-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.step { display: flex; align-items: center; gap: 10px; min-height: 30px; font-size: 13px; color: var(--ink-muted); }
.box { width: 16px; height: 16px; flex-shrink: 0; border-radius: var(--radius-xs); border: 1.5px solid var(--line-light); display: grid; place-items: center; background: var(--white); color: var(--ink); }
.step.is-done .box { border: 0; background: var(--grad-accent-diag); color: var(--white); }
.step.is-current { color: var(--ink); font-weight: var(--weight-medium); }
.step.is-current .box { border-color: var(--magenta); }
.step.is-current .box::after { content: ""; width: 6px; height: 6px; border-radius: var(--radius-xs); background: var(--magenta); color: var(--white); }
.step-mark { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--magenta); color: var(--white); box-shadow: 0 0 0 3px var(--magenta-ring); }
.steps-note { margin: 26px 0 0; padding: 12px 14px; font-size: 12px; line-height: 1.65; color: var(--ink-muted); background: var(--bg-panel-2); border: 1px solid var(--line-light); border-radius: var(--radius-md); }
.orb-card { position: absolute; z-index: 3; top: 70px; right: max(-64px,calc((1180px - 100vw)/2 + 24px)); width: 264px; height: 196px; padding: 22px 16px 18px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; border: 2px solid var(--clear); border-radius: var(--radius-lg); color: var(--white); background: linear-gradient(160deg,var(--bg-panel),var(--bg)) padding-box,var(--grad-accent-diag) border-box; box-shadow: 0 0 0 6px var(--glow-accent-ring),0 26px 60px -12px var(--glow-blue),0 14px 32px var(--shadow-deep); }
.orb { position: relative; width: 108px; height: 108px; border-radius: var(--radius-round); background: conic-gradient(from 210deg,var(--magenta),var(--accent),var(--accent-2),var(--magenta)); color: var(--white); box-shadow: 0 0 34px var(--glow-magenta),0 0 56px var(--glow-blue); }
.orb::after { content: ""; position: absolute; inset: 9px; border-radius: var(--radius-round); background: radial-gradient(circle at 50% 50%,var(--bg) 0 40%,var(--orb-core) 62%,var(--orb-clear) 100%); }
.orb img { position: absolute; z-index: 1; left: 50%; top: 50%; width: 42px; height: 42px; transform: translate(-50%,-50%); }
.orb-label { font-size: 14px; font-weight: var(--weight-medium); color: var(--white); letter-spacing: .01em; }

/* Tab 的面板归属于最近一层 data-tabs，允许一页使用多组。 */
.tabs { min-width: 0; }
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
[role="tab"] { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid var(--line-light); border-radius: var(--radius-sm); background: var(--white); color: var(--ink-muted); font-size: 14px; text-align: center; }
[role="tab"]:hover { border-color: var(--accent); color: var(--ink); }
[role="tab"][aria-selected="true"] { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
[role="tabpanel"] { min-width: 0; margin-top: 24px; }
.feature-tabs { margin-top: 28px; }
.feature-tabs [role="tablist"] { flex-direction: column; gap: 4px; }
.feature-tabs [role="tab"] { justify-content: flex-start; width: 100%; padding: 13px 18px; border: 0; border-radius: var(--radius-sm); background: var(--clear); color: var(--ink-muted); text-align: left; }
.feature-tabs [role="tab"][aria-selected="true"] { background: var(--white); color: var(--ink); }
.feature-tabs [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; background: var(--grad-accent); }
.tab-progress { position: absolute; bottom: 0; left: 18px; right: 18px; height: 2px; background: var(--line-light); color: var(--ink); }
.tab-progress::after { content: ""; display: block; width: 100%; height: 100%; background: var(--grad-accent); transform: scaleX(0); transform-origin: left; }
[data-autoplay].is-playing [aria-selected="true"] .tab-progress::after { animation: tab-reading 8s linear forwards; }
@keyframes tab-reading { to { transform: scaleX(1); } }
.feature-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin-top: 30px; }
.feature-facts > * { min-width: 0; }
.feature-facts svg { width: 22px; height: 22px; margin-bottom: 12px; fill: none; stroke: var(--ink-muted); stroke-width: 1.6; }
.feature-facts strong { display: block; color: var(--ink); font-size: 14px; }
.feature-facts p { font-size: 13px; margin-top: 7px; }
.feature-demo [role="tabpanel"] { margin: 0; }
.feature-demo pre { margin: 0; border: 0; border-radius: 0; background: var(--white); color: var(--ink); }
.feature-description { padding: 24px; color: var(--ink-muted); border-top: 1px solid var(--line-light); font-size: 14px; line-height: 1.85; }
.feature-description p:last-child { margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: var(--white); color: var(--ink-muted); margin-bottom: 32px; }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-sm); }
.toc a:hover,.toc a[aria-current] { background: var(--accent-soft); color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 12px; z-index: 10; }
.faq-item { border-bottom: 1px solid var(--line-light); color: var(--ink); }
.faq-item summary { position: relative; cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 22px; color: var(--accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; color: var(--ink-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { padding: 28px; border: 1px solid var(--line-light); border-top: 2px solid var(--accent); border-radius: var(--radius-md); background: var(--white); color: var(--ink); }
.term-card h3 { margin: 10px 0; }
.term-card p { margin-bottom: 0; color: var(--ink-muted); }
.term-en { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.badge,.tag { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; padding: 3px 9px; border: 1px solid var(--line-light); border-radius: var(--radius-xs); background: var(--surface-soft); color: var(--ink-muted); font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.badge--first { background: var(--grad-accent); color: var(--white); border-color: var(--clear); }
.badge--recommended { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--line-light); }
.badge--archived { background: var(--bg-panel-2); color: var(--ink-muted); border-style: dashed; }
.client-card { padding: 28px; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: var(--white); color: var(--ink); box-shadow: var(--shadow-panel); min-width: 0; }
.client-card--first { border-color: var(--accent); box-shadow: var(--shadow-panel),0 0 0 3px var(--glow-accent-ring); }
.client-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; min-width: 0; }
.client-head > div { min-width: 0; flex: 1; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-head h3 { margin: 0 0 8px; }
.client-meta { color: var(--ink-muted); font-size: 13px; margin-block: 16px; }
[data-rev]:empty { display: none; }
.client-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.post-card { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: var(--white); color: var(--ink); box-shadow: var(--shadow-panel); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-muted); }
.post-card h3 { margin-block: 20px 12px; }
.post-card h3 a:hover { color: var(--accent-dark); }
.post-card p { color: var(--ink-muted); font-size: 14px; }
.post-card .text-link { margin-top: auto; padding-top: 16px; }
.callout { margin: 28px 0; padding: 20px 24px; border: 1px solid var(--line-light); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-bold); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: var(--white); color: var(--ink); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; background: var(--white); color: var(--ink); }
.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(--line-light); overflow-wrap: normal; word-break: normal; vertical-align: top; }
.data-table th,.prose table th,.article-body table th { font-weight: var(--weight-medium); background: var(--surface-soft); color: var(--ink); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table,.article-body table { display: block; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; background: var(--white); color: var(--ink); }
.prose table code,.article-body table code,.data-table code { overflow-wrap: anywhere; }
.article-body { min-width: 0; }
.article-body > * { min-width: 0; }
.article-download { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-block: 48px; padding: 28px; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: var(--white); color: var(--ink); box-shadow: var(--shadow-panel); }
.article-download > div { min-width: 0; }
.article-download h2 { font-size: 24px; margin: 0 0 10px; }
.article-download p { color: var(--ink-muted); margin: 0; }
.dl-fab { position: fixed; right: max(16px,env(safe-area-inset-right)); bottom: max(20px,env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid var(--accent); border-radius: var(--radius-md); background: var(--bg-panel); color: var(--text); box-shadow: 0 10px 30px var(--shadow-deep),0 0 24px var(--glow-accent); }
.dl-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dl-fab small { display: block; font-size: 12px; color: var(--text-muted); }
.dl-fab:hover { border-color: var(--accent-2); }
.quick-card { padding: 28px; border-top: 2px solid var(--line-light); }
.quick-number { font-family: var(--font-mono); color: var(--accent-dark); font-size: 13px; }
.quick-card h3 { margin-block: 16px 10px; }

/* 静态设计预览的令牌样本。半透明样本铺在浅色面板上。 */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-top: 32px; }
.swatch { padding: 10px; border: 1px solid var(--line-light); border-radius: var(--radius-sm); background: var(--white); color: var(--ink); min-width: 0; }
.swatch i { display: block; height: 48px; margin-bottom: 10px; border: 1px solid var(--line-light); border-radius: var(--radius-xs); background: var(--sample); color: var(--ink); }
.swatch code { font-size: 11px; }
.sw-bg { --sample: var(--bg); }
.sw-panel { --sample: var(--bg-panel); }
.sw-panel2 { --sample: var(--bg-panel-2); }
.sw-border { --sample: var(--border); }
.sw-accent { --sample: var(--accent); }
.sw-dark { --sample: var(--accent-dark); }
.sw-blue { --sample: var(--accent-2); }
.sw-magenta { --sample: var(--magenta); }
.sw-text { --sample: var(--text); }
.sw-muted { --sample: var(--text-muted); }
.sw-dim { --sample: var(--text-dim); }
.sw-success { --sample: var(--success); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-ink { --sample: var(--ink); }
.sw-ink-muted { --sample: var(--ink-muted); }
.sw-faint { --sample: var(--ink-faint); }
.sw-line { --sample: var(--line-light); }
.sw-white { --sample: var(--white); }
.sw-soft { --sample: var(--surface-soft); }
.sw-accent-soft { --sample: var(--accent-soft); }
.sw-dot { --sample: var(--chrome-dot); }
.sw-glass { --sample: var(--panel-glass); }
.sw-glass-soft { --sample: var(--panel-glass-soft); }
.sw-nav { --sample: var(--nav-active); }
.sw-star { --sample: var(--star-strong); }
.sw-star-soft { --sample: var(--star-soft); }
.sw-deep { --sample: var(--shadow-deep); }
.sw-shadow { --sample: var(--shadow-soft); }
.sw-shadow2 { --sample: var(--shadow-soft-2); }
.sw-glow { --sample: var(--glow-accent); }
.sw-ring { --sample: var(--glow-accent-ring); }
.sw-glow-blue { --sample: var(--glow-blue); }
.sw-glow-magenta { --sample: var(--glow-magenta); }
.sw-magenta-ring { --sample: var(--magenta-ring); }
.sw-halo { --sample: var(--halo); }
.sw-halo-blue { --sample: var(--halo-blue); }
.sw-sheen { --sample: var(--btn-sheen); }
.sw-btn-shadow { --sample: var(--btn-shadow); }
.sw-orb-core { --sample: var(--orb-core); }
.sw-orb-clear { --sample: var(--orb-clear); }
.sw-clear { --sample: var(--clear); }
.sw-text-start { --sample: var(--text-gradient-start); }
.sw-text-end { --sample: var(--text-gradient-end); }
.sw-gradient { --sample: var(--grad-accent); }
.sw-gradient-diag { --sample: var(--grad-accent-diag); }
.sw-gradient-text { --sample: var(--grad-text-dark); }
.preview-stack { display: grid; gap: 24px; margin-top: 32px; }
.preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.type-display { font-family: var(--font-display); font-size: var(--size-display); line-height: 1.12; }
.type-mono { font-family: var(--font-mono); }
.preview-fab { position: static; width: fit-content; }
@media (max-width:960px) {
  .win-body { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .rail,.steps,.orb-card { display: none; }
  .wizard { padding: 22px 20px 28px; }
  .crumbs .hide-sm { display: none; }
}
@media (max-width:640px) {
  .window { width: calc(100% - var(--gutter)*2); }
  .chrome { gap: 10px; padding-inline: 12px; }
  .chrome-tools { display: none; }
  .wizard { padding-inline: 16px; }
  .field { flex-wrap: wrap; }
  .field-value { flex-basis: calc(100% - 30px); }
  .field-action { margin-left: auto; }
  .feature-facts { gap: 16px; }
  .article-download { flex-direction: column; align-items: stretch; padding: 20px; }
  .client-card,.post-card,.term-card { padding: 20px; }
  .dl-fab { min-height: 48px; padding: 10px 14px; }
}
@media (max-width:560px) {
  .os-pill { display: none; }
}