/* 拍板首屏：标题入场，客户端窗口本身完全静止。 */
.mast {
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100svh - var(--topbar-h));
  display: grid; align-content: center;
  padding-top: 28px; padding-bottom: 26px; overflow-x: clip;
}
.mast-grid { display: grid; grid-template-columns: minmax(0,1fr) 380px; column-gap: 48px; row-gap: 20px; align-items: center; }
.mast-title { margin: 0; font-size: clamp(30px,3.34vw,48px); font-weight: 400; line-height: 1.15; letter-spacing: -.01em; }
.tl { display: block; padding-bottom: .08em; margin-bottom: -.08em; }
.tl-run { display: block; animation: tl-rise .6s var(--ease-out) .05s both; }
.tl + .tl .tl-run { animation-delay: .17s; }
.tl-mark { position: relative; display: inline-block; }
.tl-mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: 3px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--bg);
  box-shadow: 0 0 12px var(--glow-60); transform-origin: left center;
  animation: tl-sweep .42s var(--ease-out) .72s both;
}
@keyframes tl-rise { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tl-sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.mast-lede { margin: 0; align-self: end; font-size: 15px; line-height: 1.75; color: var(--text-muted); }
.mast-lede strong { color: var(--text); font-weight: 500; }
.mast-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.mast-facts { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.facts-hi { color: var(--text); }
.facts-lo { color: var(--text-muted); }
.dot { width: 7px; height: 7px; border-radius: var(--r-round); flex-shrink: 0; }
.dot-ok { background: var(--ok); color: var(--bg); }
.dot-accent { background: var(--accent); color: var(--bg); }
.dot-warn { background: var(--warn); color: var(--bg); }
.dot-dim { background: var(--text-muted); color: var(--bg); }
.plat-row { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; }
.plat-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); text-decoration: none; transition: color var(--duration); }
.plat-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.plat-link:hover { color: var(--text); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag-row li, .badge, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  max-width: 100%; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--panel); color: var(--text-soft); font-size: 12.5px; line-height: 1.35;
  white-space: normal; overflow-wrap: anywhere;
}
.badge-first { border-color: var(--accent); color: var(--accent); }
.badge-recommended { border-color: var(--ok); color: var(--ok); }
.badge-archived { border-color: var(--warn); color: var(--warn); }
.rig {
  position: relative; margin: 24px 0 0;
  height: clamp(470px,calc(100vh - 380px),600px);
  height: clamp(470px,calc(100svh - 380px),600px);
  border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden;
  background: radial-gradient(58% 72% at 36% 64%,var(--glow-10),var(--clear) 72%),radial-gradient(40% 50% at 88% 30%,var(--glow-05),var(--clear) 70%),var(--panel);
  color: var(--text); box-shadow: inset 0 1px 0 var(--hairline-hi);
}
.rig-chrome { height: 38px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line-soft); }
.lights { display: flex; gap: 7px; }
.lt { width: 10px; height: 10px; border-radius: var(--r-round); flex-shrink: 0; }
.lt-err { background: var(--err); color: var(--bg); }
.lt-warn { background: var(--warn); color: var(--bg); }
.lt-ok { background: var(--ok); color: var(--bg); }
.rig-title { font-size: 12.5px; color: var(--text-muted); }
.rig-tools { justify-self: end; display: flex; gap: 12px; color: var(--text-muted); }
.rig-tools .ico { width: 16px; height: 16px; }
.rig-body { height: calc(100% - 38px); display: grid; grid-template-columns: minmax(0,1fr) 300px; column-gap: 36px; padding: 20px 28px 0; }
.slate-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.slate-bar {
  height: 34px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 10px;
  border: 1px solid var(--glow-45); border-radius: var(--r-sm); background: var(--glow-10); color: var(--text);
  box-shadow: 0 0 18px var(--glow-18);
}
.slate-grip { width: 14px; height: 14px; fill: var(--accent); flex-shrink: 0; }
.slate-file { font-size: 13px; font-weight: 500; color: var(--accent); }
.slate-kind { font-size: 13px; color: var(--text-muted); }
.slate-add { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--r-control); background: var(--glow-28); color: var(--accent); }
.slate-add .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.slate {
  position: relative; flex: 1; min-height: 0; margin-top: 10px; margin-bottom: -24px;
  border: 2px solid var(--accent); border-radius: var(--r-xs) var(--r-xs) 0 0;
  background: radial-gradient(80% 55% at 50% 0%,var(--glow-10),var(--clear) 70%),linear-gradient(180deg,var(--canvas-ink),var(--canvas-ink-deep));
  color: var(--text-soft);
  box-shadow: 0 0 0 1px var(--glow-28),0 0 18px 1px var(--glow-45),0 0 64px 6px var(--glow-18),inset 0 0 36px var(--glow-18);
}
.yaml { margin: 0; border: 0; border-radius: 0; background: var(--clear); color: var(--text-soft); padding: 22px 24px; font-family: var(--font-mono); font-size: 13.5px; line-height: 22px; white-space: pre; max-height: 100%; overflow: auto; }
.ln { display: block; min-height: 22px; }
.no { display: inline-block; width: 22px; margin-right: 20px; text-align: right; color: var(--text-muted); user-select: none; }
.k { color: var(--text); }
.v { color: var(--text-soft); }
.kw { color: var(--accent); }
.p, .c { color: var(--text-muted); }
.pick { position: relative; display: inline-block; padding: 0 6px; margin: 0 -7px; line-height: 20px; border: 1px solid var(--accent); border-radius: var(--r-micro); background: var(--glow-18); color: var(--text-soft); }
.pick::before, .pick::after { content: ""; position: absolute; width: 5px; height: 5px; background: var(--canvas-ink); color: var(--text); border: 1px solid var(--accent); }
.pick::before { left: -3px; top: -3px; }
.pick::after { right: -3px; bottom: -3px; }
.dock { position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shade-float); }
.dock-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-md); color: var(--text-muted); flex-shrink: 0; }
.dock-btn .ico { width: 18px; height: 18px; }
.dock-btn.is-on { background: var(--panel-2); color: var(--text); }
.dock-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); color: var(--text); }
.dock-zoom { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border-radius: var(--r-md); background: var(--panel-2); color: var(--text); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.dock-zoom .ico { width: 12px; height: 12px; color: var(--text-muted); }
.pane { display: flex; flex-direction: column; min-height: 0; padding-bottom: 22px; }
.pane-tabs { display: flex; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.pane-tab { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r-sm); font-size: 13.5px; color: var(--text-muted); }
.pane-tab.is-on { background: var(--panel-2); color: var(--text); font-weight: 500; }
.pane-pick { display: flex; gap: 8px; margin-top: 14px; }
.pick-field { flex: 1; height: 36px; display: flex; align-items: center; gap: 2px; padding: 0 10px 0 12px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13px; }
.pick-lbl { color: var(--text-muted); }
.pick-val { color: var(--text); font-weight: 500; }
.pick-field .ico { margin-left: auto; width: 13px; height: 13px; color: var(--text-muted); }
.pick-add { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; background: var(--panel-2); color: var(--text-soft); border: 1px solid var(--line); border-radius: var(--r-md); }
.pick-add .ico { width: 15px; height: 15px; }
.pane-label { margin-top: 18px; font-size: 12px; line-height: 16px; color: var(--text-muted); }
.seg { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; margin-top: 8px; padding: 3px; background: var(--panel-2); color: var(--text-muted); border: 1px solid var(--line); border-radius: var(--r-md); }
.seg-item { height: 26px; display: grid; place-items: center; border-radius: var(--r-sm); font-size: 13px; }
.seg-item.is-on { background: var(--accent); color: var(--bg); font-weight: 500; box-shadow: 0 0 14px var(--glow-45); }
.pane-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.pane-rows li { height: 38px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; color: var(--text); }
.sw { position: relative; width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--panel-2); color: var(--text); border: 1px solid var(--line); flex-shrink: 0; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: var(--r-round); background: var(--text-muted); color: var(--bg); }
.sw.is-on { background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: 0 0 12px var(--glow-45); }
.sw.is-on::after { transform: translateX(14px); background: var(--text); color: var(--bg); }
.port { font-family: var(--font-mono); font-size: 12.5px; line-height: 1; padding: 5px 8px; background: var(--panel-2); color: var(--text-soft); border: 1px solid var(--line); border-radius: var(--r-port); }
.drop-box { margin-top: auto; min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; padding: 12px 12px 10px 14px; background: var(--panel-2); color: var(--text-muted); border: 1px solid var(--line); border-radius: var(--r-lg); }
.drop-hint { margin: 0; font-size: 13px; }
.drop-foot { display: flex; align-items: center; justify-content: space-between; }
.drop-fmt { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
.drop-go { width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--panel); color: var(--text-soft); border: 1px solid var(--line); }
.drop-go .ico { width: 14px; height: 14px; }
.facts-strip { margin-top: 14px; min-height: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 30px; padding: 10px 20px; background: var(--panel); color: var(--text-muted); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 12.5px; }
.fs-item { display: inline-flex; align-items: center; gap: 8px; }
.fs-val { font-family: var(--font-mono); color: var(--text-soft); }
.fs-end { margin-left: auto; }

/* Tab 契约：容器 data-tabs，按钮 aria-controls，面板 role=tabpanel。 */
.tab-list, [role="tablist"].tab-list { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab-list [role="tab"] {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel); color: var(--text-muted); text-align: center;
}
.tab-list [role="tab"][aria-selected="true"] { border-color: var(--accent); background: var(--panel-2); color: var(--accent); }
[role="tabpanel"] { min-width: 0; }
.feature-deck { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); color: var(--text); }
.feature-layout { display: grid; grid-template-columns: minmax(0,7fr) minmax(220px,3fr); gap: 24px; }
.feature-stage { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel-2); color: var(--text); }
.storyboard { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.story-frame { min-height: 200px; padding: 18px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); color: var(--text-soft); }
.story-frame.is-current { border-color: var(--accent); box-shadow: 0 0 24px var(--glow-18); }
.story-frame h3 { font-size: 14px; }
.story-frame pre { font-size: 11px; border: 0; padding: 0; border-radius: 0; background: var(--clear); color: var(--text-soft); }
.feature-tabs { display: flex; flex-direction: column; gap: 4px; }
.feature-tabs [role="tab"] {
  position: relative; width: 100%; min-height: 54px; padding: 15px 18px;
  border: 1px solid var(--clear); border-radius: var(--r-md); text-align: left;
  background: var(--clear); color: var(--text-muted);
}
.feature-tabs [role="tab"][aria-selected="true"] { border-color: var(--line); background: var(--panel-2); color: var(--accent); }
.tab-progress { position: absolute; left: 18px; right: 18px; bottom: 6px; height: 2px; background: var(--line); color: var(--accent); border-radius: var(--r-pill); }
.tab-progress::after { content: ""; display: block; height: 100%; background: var(--accent); color: var(--bg); transform: scaleX(0); transform-origin: left; }
.is-cycling [aria-selected="true"] .tab-progress::after { animation: tab-count 8s linear both; }
@keyframes tab-count { to { transform: scaleX(1); } }
.feature-caption { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 26px; }
.feature-caption p { margin: 0; color: var(--text-muted); max-width: 680px; }
.feature-caption h3 { margin-bottom: 8px; }
.feature-caption a { flex-shrink: 0; text-decoration: none; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 16px; margin-bottom: 32px; }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--text-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }
.toc-sticky { position: sticky; top: 0; z-index: 10; background: var(--bg); color: var(--text); }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--text); margin-bottom: 12px; }
.faq-item summary { position: relative; cursor: pointer; padding: 20px 52px 20px 22px; list-style: none; font-weight: 500; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; top: 20px; right: 22px; color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 22px 22px; color: var(--text-soft); }
.faq-answer p:last-child { margin: 0; }
.term-card dt { font-size: 21px; font-weight: 500; margin-bottom: 10px; }
.term-card dd { margin: 0; color: var(--text-soft); }
.term-meta { display: block; color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; margin-bottom: 16px; }
.client-card { display: flex; flex-direction: column; gap: 18px; }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-head h3 { margin: 0; }
.client-card p { color: var(--text-soft); margin: 0; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
[data-version]:empty { display: none; }
.client-version { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.post-card { display: flex; flex-direction: column; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--text-muted); }
.post-link { margin-top: auto; padding-top: 20px; text-decoration: none; }
.callout { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-lg); background: var(--panel); color: var(--text-soft); }
.callout p:last-child { margin: 0; }
.callout-warn { border-left-color: var(--warn); }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); color: var(--text-soft); 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: 16px 20px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line); overflow-wrap: normal; word-break: normal;
}
.data-table th { background: var(--panel-2); color: var(--text); font-weight: 500; }
.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 { overflow-wrap: anywhere; }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.article-download p { margin: 0; color: var(--text-muted); }
.dl-fab {
  position: fixed; right: 24px; bottom: max(24px,env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  max-width: calc(100% - 40px); min-height: 56px; padding: 12px 20px;
  border: 1px solid var(--accent); border-radius: var(--r-pill);
  background: var(--panel); color: var(--text); text-decoration: none;
  box-shadow: 0 0 28px var(--glow-18);
}
.dl-fab .ico { width: 22px; height: 22px; color: var(--accent); }
.dl-fab small { display: block; font-size: 11px; color: var(--text-muted); }
.has-dl-fab .site-footer { padding-bottom: 110px; }

/* 预览页色板与组件状态，不使用行内样式。 */
.swatch-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.swatch { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); }
.swatch-color { display: block; height: 64px; border-radius: var(--r-sm); margin-bottom: 10px; border: 1px solid var(--line); }
.swatch figcaption { font: 12px/1.6 var(--font-mono); color: var(--text-soft); overflow-wrap: anywhere; }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-panel { background: var(--panel); color: var(--text); }
.sw-panel-2 { background: var(--panel-2); color: var(--text); }
.sw-line { background: var(--line); color: var(--text); }
.sw-line-soft { background: var(--line-soft); color: var(--text); }
.sw-accent { background: var(--accent); color: var(--bg); }
.sw-deep { background: var(--accent-deep); color: var(--text); }
.sw-text { background: var(--text); color: var(--bg); }
.sw-soft { background: var(--text-soft); color: var(--bg); }
.sw-muted { background: var(--text-muted); color: var(--bg); }
.sw-faint { background: var(--text-faint); color: var(--text); }
.sw-ok { background: var(--ok); color: var(--bg); }
.sw-warn { background: var(--warn); color: var(--bg); }
.sw-err { background: var(--err); color: var(--bg); }
.sw-ink { background: var(--canvas-ink); color: var(--text); }
.sw-ink-deep { background: var(--canvas-ink-deep); color: var(--text); }
.sw-g05 { background: var(--glow-05); color: var(--text); }
.sw-g10 { background: var(--glow-10); color: var(--text); }
.sw-g18 { background: var(--glow-18); color: var(--text); }
.sw-g28 { background: var(--glow-28); color: var(--text); }
.sw-g45 { background: var(--glow-45); color: var(--text); }
.sw-g60 { background: var(--glow-60); color: var(--text); }
.sw-hairline { background: var(--hairline-hi); color: var(--text); }
.sw-veil { background: var(--veil); color: var(--text); }
.sw-clear { background: var(--clear); color: var(--text); }
.preview-stack > * + * { margin-top: 24px; }
.type-display { font: 400 clamp(30px,3.34vw,48px)/1.15 var(--font-display); }
.type-mono { font-family: var(--font-mono); }
.preview-fab { position: static; max-width: 100%; }

@media (max-width: 1120px) {
  .mast-grid { grid-template-columns: minmax(0,1fr) 320px; column-gap: 36px; }
  .rig-body { grid-template-columns: minmax(0,1fr) 270px; column-gap: 28px; }
}
@media (max-width: 960px) {
  .mast-grid { grid-template-columns: minmax(0,1fr); row-gap: 18px; }
  .mast-lede { max-width: 560px; grid-row: 3; }
  .mast-cta { grid-row: 2; }
  .rig { height: 460px; }
  .rig-body { grid-template-columns: minmax(0,1fr); }
  .pane { display: none; }
  .feature-layout { grid-template-columns: minmax(0,1fr); }
  .feature-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .feature-caption { align-items: start; flex-direction: column; }
  .swatch-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .mast-title, .type-display { font-size: 28px; }
}
@media (max-width: 640px) {
  .plat-row { gap: 14px 20px; }
  .rig { height: 400px; border-radius: var(--r-mobile); }
  .rig-body { padding: 16px 16px 0; }
  .yaml { padding: 16px 14px; font-size: 12px; }
  .no { width: 16px; margin-right: 12px; }
  .dock { bottom: 38px; }
  .dock-btn { width: 30px; height: 30px; }
  .rig-title { display: none; }
  .facts-strip { gap: 10px 18px; padding: 10px 14px; }
  .fs-end { margin-left: 0; }
  .feature-deck, .feature-stage { padding: 16px; }
  .storyboard { overflow-x: auto; grid-template-columns: repeat(3,minmax(170px,1fr)); padding-bottom: 12px; }
  .feature-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .feature-tabs [role="tab"] { padding-inline: 12px; }
  .swatch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dl-fab { right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-run, .tl-mark::after, .is-cycling [aria-selected="true"] .tab-progress::after { animation: none; }
}