/* 首屏陈列台：纯装饰，禁止把真实链接或表单放进 deck。 */
.deck { display: flex; justify-content: center; align-items: flex-start; gap: var(--card-gap); margin-top: 44px; pointer-events: none; cursor: default; user-select: none; }
.tcard { position: relative; flex: 0 0 var(--card-w); height: var(--card-h); border-radius: var(--r-card); overflow: hidden; }
.tcard--side { margin-top: 24px; }
.tcard--mist { background: var(--d-mist); color: var(--c-text); }
.tcard--tan { background: var(--d-tan); color: var(--c-text); }
.tcard--rust { background: var(--d-rust); color: var(--d-warm-white); }
.tpanel { position: absolute; top: 44px; bottom: 56px; width: 60%; border-radius: var(--r-panel); padding: 26px 28px; }
.tcard--mist .tpanel { right: 7%; background: var(--d-mist-deep); color: var(--d-mist-soft); box-shadow: inset 0 0 0 1px var(--d-hairline-dark); }
.tcard--tan .tpanel { left: 15%; width: 70%; background: var(--d-tan-deep); color: var(--d-warm-white); box-shadow: inset 0 0 0 1px var(--d-hairline-dark); }
.tcard--rust .tpanel { left: 7%; background: var(--d-cream); color: var(--d-rust); box-shadow: inset 0 0 0 1px var(--d-hairline-light); }
.tag { display: inline-flex; align-items: center; max-width: 100%; min-height: 22px; padding: 2px 10px; border: 1px solid var(--d-mist-line); border-radius: var(--r-pill); color: var(--d-mist-soft); font-size: 11.5px; font-weight: var(--weight-button); letter-spacing: .12em; overflow-wrap: anywhere; }
.sub-title { margin: 14px 0 0; font-family: var(--f-display); font-size: 30px; font-weight: var(--weight-heading); line-height: 1.15; letter-spacing: .04em; color: var(--d-warm-white); }
.field-label { display: block; margin-top: 20px; font-size: var(--fs-label); color: var(--d-mist-soft); letter-spacing: .02em; }
.field { display: flex; align-items: center; min-height: 42px; margin-top: 7px; padding: 8px 12px; border: 1px solid var(--d-mist-line); border-radius: var(--r-field); background: var(--d-mist-field); color: var(--d-warm-white); font-family: var(--f-mono); font-size: var(--fs-label); overflow-wrap: anywhere; }
.sub-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.pill-btn, .pill-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 20px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: var(--weight-button); }
.pill-btn { background: var(--d-warm-white); color: var(--d-mist-deep); }
.pill-ghost { padding-inline: 16px; border: 1px solid var(--d-mist-line); color: var(--d-mist-soft); font-size: var(--fs-small); }
.sub-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--d-mist-line); font-size: 12.5px; color: var(--d-mist-soft); }
.file-label { display: flex; justify-content: space-between; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--d-tan-soft); }
.yaml-title { margin: 10px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--d-tan-line); font-family: var(--f-display); font-size: 46px; font-weight: var(--weight-display); line-height: 1; letter-spacing: -.045em; color: var(--d-warm-white); }
.yaml { margin: 16px 0 0; padding: 0; border: 0; border-radius: var(--r-panel); background: var(--d-tan-deep); color: var(--d-warm-white); font-family: var(--f-mono); font-size: 12.5px; line-height: 1.8; white-space: pre; }
.yaml .k { color: var(--d-warm-white); }
.yaml .v { color: var(--d-tan-soft); }
.yaml .p { color: var(--d-tan-soft); }
.mode-title { margin: 0; font-family: var(--f-display); font-size: 26px; font-weight: var(--weight-display); letter-spacing: -.01em; line-height: 1.2; color: var(--d-rust); }
.segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin-top: 16px; padding: 3px; border: 1px solid var(--d-cream-line); border-radius: var(--r-pill); background: var(--c-panel); color: var(--d-rust); }
.segment span { display: flex; align-items: center; justify-content: center; min-height: 30px; border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: var(--weight-medium); color: var(--d-rust); }
.segment .on { background: var(--d-rust); color: var(--d-cream); font-weight: var(--weight-button); }
.switches { margin: 12px 0 0; padding: 0; list-style: none; }
.switches li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; border-bottom: 1px solid var(--d-cream-line); font-size: 14px; font-weight: var(--weight-medium); color: var(--c-text); }
.switches li:last-child { border-bottom: 0; }
.toggle { position: relative; flex-shrink: 0; width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--d-cream-off); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: var(--r-round); background: var(--c-panel); }
.toggle.is-on { background: var(--d-rust); }
.toggle.is-on::after { left: 17px; background: var(--d-cream); }

/* 编辑器窗口及通用标签页 */
.feature-stage { padding: 56px; border-radius: var(--r-block); background: var(--c-panel-2); color: var(--c-text); }
.editor-window { border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel); color: var(--c-text); overflow: hidden; }
.window-chrome { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 64px; padding: 16px 24px; border-bottom: 1px solid var(--c-border); }
.window-chrome__brand { font-size: var(--fs-small); font-weight: var(--weight-button); }
.window-chrome__title { font-family: var(--f-mono); font-size: var(--fs-label); letter-spacing: .12em; }
.window-chrome__dots { display: flex; justify-self: end; gap: 8px; }
.window-chrome__dots i { width: 8px; height: 8px; border: 1px solid var(--c-muted); border-radius: var(--r-round); }
.editor-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding: 24px; }
.tab-list, [role="tablist"] { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px; overflow-x: auto; }
.tab-list [role="tab"], .editor-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 22px;
  position: relative;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-clear);
  color: var(--c-text);
  font-size: 14px;
  font-weight: var(--weight-medium);
  line-height: 1.5;
}
[role="tab"][aria-selected="true"] { border-color: var(--c-ink); background: var(--c-ink); color: var(--c-on-ink); }
.editor-tabs { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 0; }
.editor-tabs [role="tab"] { justify-content: flex-start; text-align: left; white-space: normal; }
.editor-tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 4px; height: 2px; border-radius: var(--r-pill); background: var(--c-accent-hl); transform-origin: left; }
[data-autoplay].is-playing .editor-tabs [aria-selected="true"]::after { animation: tab-progress var(--autoplay-duration) linear forwards; }
@keyframes tab-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tab-panel { padding: 28px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-bg); color: var(--c-text); }
.tab-panel h3 { margin-top: 0; }
.tab-panel > :last-child { margin-bottom: 0; }
.tab-panel pre { background: var(--c-panel); color: var(--c-text); }
.toc { display: flex; align-items: center; gap: 8px; padding-block: 12px; overflow-x: auto; max-width: 100%; border-block: 1px solid var(--c-border); background: var(--c-bg); color: var(--c-text); }
.toc a { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 44px; padding: 8px 18px; border-radius: var(--r-pill); color: var(--c-muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--c-panel-2); color: var(--c-accent-dark); }
.toc--sticky { position: sticky; top: 0; z-index: 10; }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding-block: 20px; font-size: 18px; font-weight: var(--weight-button); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; color: var(--c-accent); font-family: var(--f-mono); font-weight: var(--weight-medium); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__answer { max-width: 760px; padding-bottom: 24px; color: var(--c-muted); }
.faq-item__answer p:last-child { margin-bottom: 0; }
.term-card { padding: 28px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel); color: var(--c-text); }
.term-card h3 { margin: 0 0 5px; }
.term-card__alias { display: block; margin-bottom: 18px; color: var(--c-muted); font-family: var(--f-mono); font-size: var(--fs-small); overflow-wrap: anywhere; }
.term-card p { margin-bottom: 0; }
.client-card { padding: 28px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel); color: var(--c-text); }
.client-card--lead { border-color: var(--c-accent); }
.client-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.client-card__icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-card h3 { margin: 0 0 6px; }
.client-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-small); color: var(--c-muted); }
.client-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
[data-rev]:empty { display: none; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; padding: 4px 12px; border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--c-bg); color: var(--c-muted); font-size: var(--fs-label); font-weight: var(--weight-button); line-height: 1.5; overflow-wrap: anywhere; }
.status-badge--lead, .status-badge--recommended { border-color: var(--c-accent-hl); background: var(--c-accent-ring); color: var(--c-accent-dark); }
.status-badge--archived { border-color: var(--c-border-strong); background: var(--c-panel-2); color: var(--c-muted); }
.status-badge--success { color: var(--c-success); }
.status-badge--warn { color: var(--c-accent-dark); }
.status-badge--error { color: var(--c-error); }
.post-card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel); color: var(--c-text); }
.post-card h3 { margin: 0; }
.post-card h3 a { color: var(--c-text); text-decoration: none; }
.post-card h3 a:hover { color: var(--c-accent); }
.post-card p { color: var(--c-muted); margin: 0; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--c-muted); font-size: var(--fs-small); }
.post-card__link { margin-top: auto; }
.callout { margin: 24px 0; padding: 24px 28px; border: 1px solid var(--c-border); border-left: 4px solid var(--c-accent); border-radius: var(--r-panel); background: var(--c-accent-ring); color: var(--c-accent-dark); }
.callout p:last-child { margin-bottom: 0; }
.callout--neutral { border-left-color: var(--c-muted); background: var(--c-panel-2); color: var(--c-text); }
.callout--error { border-left-color: var(--c-error); background: var(--c-panel); color: var(--c-text); }
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-border); border-radius: var(--r-panel); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; background: var(--c-panel); color: var(--c-text); }
.data-table :is(th, td), .prose table :is(th, td), .article-body table :is(th, td) { min-width: 7em; padding: 15px 18px; border-bottom: 1px solid var(--c-border); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th, .article-body table th { background: var(--c-panel-2); color: var(--c-text); font-weight: var(--weight-button); }
.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; word-break: normal; }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding: 32px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-panel-2); color: var(--c-text); }
.article-download h2 { margin: 0 0 10px; font-size: var(--fs-h3); }
.article-download p { margin: 0; color: var(--c-muted); }
.dl-fab { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; justify-content: center; gap: 12px; max-width: calc(100% - 40px); min-height: 56px; padding: 14px 24px; border: 1px solid var(--c-ink); border-radius: var(--r-pill); background: var(--c-ink); color: var(--c-on-ink); font-weight: var(--weight-button); text-decoration: none; }
.dl-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl-fab:hover { background: var(--c-ink-hover); color: var(--c-on-ink); }
.has-dl-fab .site-footer { padding-bottom: 108px; }

/* 预览页色板：类名与令牌一一对应，无内联样式。 */
.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatch { display: flex; flex-direction: column; min-height: 120px; border: 1px solid var(--c-border); border-radius: var(--r-panel); overflow: hidden; background: var(--c-panel); color: var(--c-text); }
.swatch i { display: block; min-height: 64px; border-bottom: 1px solid var(--c-border); }
.swatch code { padding: 10px 12px; font-size: var(--fs-label); }
.sw-bg { background: var(--c-bg); }
.sw-panel { background: var(--c-panel); }
.sw-panel-2 { background: var(--c-panel-2); }
.sw-border { background: var(--c-border); }
.sw-border-strong { background: var(--c-border-strong); }
.sw-accent { background: var(--c-accent); }
.sw-accent-dark { background: var(--c-accent-dark); }
.sw-accent-hl { background: var(--c-accent-hl); }
.sw-accent-ring { background: var(--c-accent-ring); }
.sw-text { background: var(--c-text); }
.sw-muted { background: var(--c-muted); }
.sw-ink { background: var(--c-ink); }
.sw-ink-hover { background: var(--c-ink-hover); }
.sw-on-ink { background: var(--c-on-ink); }
.sw-success { background: var(--c-success); }
.sw-warn { background: var(--c-warn); }
.sw-error { background: var(--c-error); }
.sw-clear { background: var(--c-clear); }
.sw-mist { background: var(--d-mist); }
.sw-mist-deep { background: var(--d-mist-deep); }
.sw-mist-field { background: var(--d-mist-field); }
.sw-mist-line { background: var(--d-mist-line); }
.sw-mist-soft { background: var(--d-mist-soft); }
.sw-tan { background: var(--d-tan); }
.sw-tan-deep { background: var(--d-tan-deep); }
.sw-tan-line { background: var(--d-tan-line); }
.sw-tan-soft { background: var(--d-tan-soft); }
.sw-tan-dim { background: var(--d-tan-dim); }
.sw-rust { background: var(--d-rust); }
.sw-rust-soft { background: var(--d-rust-soft); }
.sw-cream { background: var(--d-cream); }
.sw-cream-line { background: var(--d-cream-line); }
.sw-cream-off { background: var(--d-cream-off); }
.sw-warm-white { background: var(--d-warm-white); }
.sw-hairline-dark { background: var(--d-hairline-dark); }
.sw-hairline-light { background: var(--d-hairline-light); }
.demo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-block: 24px; }
.type-sample { margin: 20px 0; }
.type-sample--display { font-family: var(--f-display); font-size: var(--fs-h1); font-weight: var(--weight-display); line-height: 1.16; }
.preview-mobile { display: none; }
@media (max-width: 1000px) {
  .feature-stage { padding: 36px; }
  .editor-body { grid-template-columns: 210px minmax(0, 1fr); gap: 18px; }
  .yaml-title { font-size: 38px; }
}
@media (max-width: 860px) {
  .deck { justify-content: flex-start; padding-left: var(--gutter); margin-top: 28px; --card-w: 70vw; --card-h: 340px; }
  .tcard--side { margin-top: 0; }
  .tcard .tpanel, .tcard--tan .tpanel { left: 7%; right: auto; width: 86%; top: 28px; padding: 20px; }
  .sub-title { font-size: 22px; }
  .yaml-title { font-size: 32px; }
  .yaml { font-size: 10.5px; }
  .mode-title { font-size: 21px; }
  .editor-body { grid-template-columns: minmax(0, 1fr); }
  .editor-tabs { flex-direction: row; align-items: center; padding-bottom: 4px; }
  .editor-tabs [role="tab"] { white-space: nowrap; }
  .feature-stage { padding: 28px; }
  .preview-mobile { display: block; }
  .preview-mobile summary { list-style: none; }
  .preview-mobile summary::-webkit-details-marker { display: none; }
  .preview-mobile[open] .mobile-drawer { display: block; }
}
@media (max-width: 640px) {
  .feature-stage { padding: 22px 16px; }
  .editor-body { padding: 16px; }
  .window-chrome { padding: 16px; grid-template-columns: minmax(0, 1fr) auto; }
  .window-chrome__brand { display: none; }
  .window-chrome__title { font-size: 10px; }
  .tab-panel { padding: 22px; }
  .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-item summary { font-size: 16px; }
  .article-download { padding: 24px; }
  .tpanel { bottom: 28px; }
  .yaml-title { font-size: 27px; }
  .yaml { font-size: 10px; }
}