/* 首页静态设置浮窗。装置只负责示意，不承载可操作表单。 */
.rail { width: min(100%,1440px); margin: 30px auto 0; overflow: hidden; }
.rail-track { display: flex; gap: var(--rail-gap); margin: 0; padding: 0 0 0 var(--gutter); list-style: none; }
.card { flex: none; width: var(--card-w); height: var(--card-h); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); overflow: hidden; }
.stage { position: relative; height: 62%; flex: none; background: var(--sheen),radial-gradient(circle,var(--stage-dot) 1px,var(--clear) 1.5px) 12px 12px / 24px 24px,var(--stage-bg); color: var(--text); z-index: 2; }
.stage::before { content: ""; position: absolute; top: 16px; left: 8%; width: 54%; height: 62%; border-radius: var(--r-logo); background: var(--stage-veil); }
.card--teal { --stage-bg: var(--grad-teal); --stage-dot: var(--dot-on-dark); --stage-veil: var(--veil-dark); }
.card--blue { --stage-bg: var(--tint-blue); --stage-dot: var(--dot-on-light); --stage-veil: var(--veil-light); }
.card--lime { --stage-bg: var(--tint-lime); --stage-dot: var(--dot-on-light); --stage-veil: var(--veil-light); }
.card--rose { --stage-bg: var(--tint-rose); --stage-dot: var(--dot-on-light); --stage-veil: var(--veil-light); }
.sheet { position: absolute; left: 50%; bottom: -12px; width: 72%; transform: translateX(-50%); background: var(--bg); color: var(--text); border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--sheet-edge),var(--shadow-float); overflow: hidden; }
.sheet-bar { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.sheet-bar svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.sheet-title { flex: 1; font-size: 12.5px; font-weight: var(--weight-bold); line-height: 1.2; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; }
.field { position: relative; height: 28px; border: 1px solid var(--border-strong); border-radius: var(--r-ctl); }
.field-label { position: absolute; top: -7px; left: 8px; padding: 0 4px; background: var(--bg); color: var(--text-muted); font-size: 10px; line-height: 12px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 18px; font-size: 11.5px; color: var(--text); line-height: 1.3; }
.opt--lead { justify-content: flex-start; gap: 8px; }
.sheet-label { display: flex; align-items: center; justify-content: space-between; min-height: 14px; font-size: 10.5px; color: var(--text-muted); line-height: 1.3; }
.sheet-key { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); }
.sheet-rule { height: 1px; background: var(--border); }
.switch { position: relative; width: 26px; height: 15px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--bg-panel-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: var(--r-round); background: var(--white); box-shadow: var(--shadow-knob); }
.switch.is-on { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.switch.is-on::after { transform: translateX(11px); }
.check { position: relative; width: 13px; height: 13px; flex-shrink: 0; border-radius: var(--r-small); border: 1.5px solid var(--border-strong); background: var(--bg); }
.check.is-on { background: var(--accent); border-color: var(--accent); }
.check.is-on::after { content: ""; position: absolute; left: 3px; top: 0; width: 4px; height: 7px; border-right: 1.5px solid var(--white); border-bottom: 1.5px solid var(--white); transform: rotate(45deg); }
.radio { width: 13px; height: 13px; flex-shrink: 0; border-radius: var(--r-round); border: 1.5px solid var(--border-strong); background: var(--bg); }
.radio.is-on { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 2.5px var(--white); }
.seg { display: flex; gap: 2px; padding: 2px; border-radius: var(--r-ctl); background: var(--bg-panel-2); color: var(--text-muted); }
.seg span { flex: 1 1 auto; display: grid; place-items: center; height: 22px; padding-inline: 6px; border-radius: var(--r-segment); font: 500 10px/1 var(--font-mono); color: var(--text-muted); white-space: nowrap; }
.seg span.is-on { background: var(--bg); color: var(--accent); font-weight: var(--weight-bold); box-shadow: var(--shadow-seg); }
.mini-btn { align-self: flex-end; display: inline-grid; place-items: center; min-height: 24px; padding-inline: 12px; border-radius: var(--r-ctl); background: var(--accent); color: var(--white); font-size: 11px; font-weight: 650; line-height: 1.2; }
.app { display: flex; align-items: center; gap: 8px; height: 16px; }
.app-ico { width: 16px; height: 16px; border-radius: var(--r-segment); background: var(--bg-panel-2); flex-shrink: 0; }
.app-line { height: 6px; border-radius: var(--r-small); background: var(--bg-panel-2); }
.app-line.w1 { width: 46%; }
.app-line.w2 { width: 62%; }
.app-line.w3 { width: 38%; }
.app .check { margin-left: auto; }
.card-text { flex: 1; padding: 26px 22px 14px; display: flex; flex-direction: column; }
.card-path { font: 500 10.5px/15px var(--font-mono); color: var(--text-muted); margin: 0 0 4px; }
.card-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 16px; font-weight: var(--weight-display); letter-spacing: -.01em; line-height: 21px; }
.card-title a:hover { color: var(--accent); }
.card-desc { margin: 0; font-size: 13.5px; line-height: 19px; color: var(--text-muted); }
.card-desc code { font-size: 12px; color: var(--text); }

/* 通用选项卡：data-tabs 是单个组件边界。 */
.tab-list { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; max-width: 100%; padding: 4px; margin-bottom: 24px; scrollbar-width: thin; }
.tab-list [role="tab"] { flex-shrink: 0; min-height: 44px; padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--bg); color: var(--text-muted); font-weight: 600; }
.tab-list [role="tab"]:hover { border-color: var(--accent); color: var(--accent-dark); }
.tab-list [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--white); border-color: var(--accent); }
.tab-panel { min-width: 0; }
.feature-tabs { display: grid; grid-template-columns: 188px minmax(0,1fr); gap: 40px; align-items: start; }
.feature-tabs .tab-list { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: visible; }
.feature-tabs [role="tab"] { position: relative; border: 0; border-radius: 0; min-height: 56px; padding: 16px 20px; background: var(--bg); color: var(--text-muted); text-align: left; }
.feature-tabs [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--accent-dark); }
.feature-tabs [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--accent); }
.document-panel { position: relative; min-height: 430px; padding: 36px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.document-lines { display: grid; gap: 16px; padding-top: 8px; padding-bottom: 160px; }
.document-lines span { height: 8px; width: 74%; border-radius: var(--r-small); background: var(--border); }
.document-lines span:nth-child(2n) { width: 54%; }
.document-lines span:nth-child(3n) { width: 66%; }
.config-float { position: relative; width: min(100%,560px); margin: -140px 0 0 auto; padding: 24px; border: 1px solid var(--accent); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card),var(--shadow-float); }
.config-float p { font-size: 14px; line-height: 1.85; margin-bottom: 0; }
.config-float pre { margin-top: 0; padding: 14px; font-size: 12px; }

/* 目录的直接父节点应覆盖全部章节，默认不吸顶。 */
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; margin-bottom: 32px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-ctl); color: var(--text-muted); font-size: 14px; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg-panel); color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 12px; z-index: 10; }
.faq-item { border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 4px; list-style: none; font-weight: 600; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; color: var(--accent); font-family: var(--font-mono); font-size: 22px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 4px 22px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card, .client-card, .article-card { min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.term-card h3, .client-card h3, .article-card h3 { margin: 12px 0; }
.term-card p, .client-card p, .article-card p { color: var(--text-muted); }
.term-card code { color: var(--accent-dark); }
.term-meta, .article-meta, .client-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text-muted); }
.client-card--primary { border-color: var(--accent); }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.client-head h3 { margin: 0; }
.client-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.client-notes { margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.article-card { display: flex; flex-direction: column; }
.article-card h3 a:hover { color: var(--accent); }
.article-card .text-link { align-self: flex-start; margin-top: auto; font-size: 14px; }
.tag, .badge-primary, .badge-recommended, .badge-retired { display: inline-block; max-width: 100%; padding: 4px 9px; border-radius: var(--r-ctl); font: 600 12px/1.5 var(--font-body); overflow-wrap: anywhere; }
.tag { background: var(--bg-panel-2); color: var(--text); }
.tag--blue { background: var(--tint-blue); color: var(--text); }
.tag--lime { background: var(--tint-lime); color: var(--text); }
.tag--rose { background: var(--tint-rose); color: var(--text); }
.badge-primary { background: var(--accent); color: var(--white); }
.badge-recommended { background: var(--bg-panel); color: var(--accent-dark); border: 1px solid var(--accent); }
.badge-retired { background: var(--bg-panel-2); color: var(--text-muted); border: 1px solid var(--border-strong); }
.callout { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-ctl); background: var(--bg-panel); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--warn); }
.callout--error { border-left-color: var(--error); }
.callout--success { border-left-color: var(--success); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-card); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; background: var(--bg); color: var(--text); }
.data-table th, .data-table td, .prose table th, .prose table td { min-width: 7em; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-bold); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; margin-block: 24px; background: var(--bg); color: var(--text); }
.prose table code, .data-table code { overflow-wrap: anywhere; }
.download-guide { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.download-guide h2 { margin-bottom: 8px; font-size: 24px; }
.download-guide p { margin: 0; color: var(--text-muted); }
.dl-fab { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: inline-flex; align-items: center; gap: 12px; max-width: calc(100% - 40px); padding: 14px 18px; border: 1px solid var(--accent-dark); border-radius: var(--r-card); background: var(--accent); color: var(--white); box-shadow: var(--shadow-card),var(--shadow-btn); font-size: 14px; font-weight: 600; }
.dl-fab svg { width: 21px; height: 21px; flex-shrink: 0; }
.dl-fab:hover { background: var(--accent-dark); color: var(--white); }
.dl-fab-note { display: block; font-size: 11px; font-weight: var(--weight-body); }

/* 仅预览页使用的令牌展台。 */
.swatch-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.swatch { padding: 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.swatch::before { content: ""; display: block; height: 64px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--swatch); }
.swatch code { display: block; font-size: 12px; }
.swatch--bg { --swatch: var(--bg); }
.swatch--panel { --swatch: var(--bg-panel); }
.swatch--panel2 { --swatch: var(--bg-panel-2); }
.swatch--border { --swatch: var(--border); }
.swatch--strong { --swatch: var(--border-strong); }
.swatch--accent { --swatch: var(--accent); }
.swatch--dark { --swatch: var(--accent-dark); }
.swatch--text { --swatch: var(--text); }
.swatch--muted { --swatch: var(--text-muted); }
.swatch--success { --swatch: var(--success); }
.swatch--warn { --swatch: var(--warn); }
.swatch--error { --swatch: var(--error); }
.swatch--blue { --swatch: var(--tint-blue); }
.swatch--lime { --swatch: var(--tint-lime); }
.swatch--rose { --swatch: var(--tint-rose); }
.swatch--gradient { --swatch: var(--grad-teal); }
.preview-type-title { font-size: clamp(34px,3.4vw,48px); font-weight: var(--weight-display); line-height: 1.12; }
.preview-menu { display: none; }
.preview-language { position: relative; }
.preview-language summary { list-style: none; cursor: pointer; }
.preview-language summary::-webkit-details-marker { display: none; }
.preview-language .lang-menu { display: block; }
.preview-fab { position: static; }
@media (max-width: 1280px) {
  .preview-menu { display: block; }
  .preview-menu > summary { display: grid; }
  .preview-menu[open] > nav { display: block; }
}
@media (max-width: 1180px) {
  .rail { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-track { padding-right: var(--gutter); }
  .card { scroll-snap-align: start; }
}
@media (max-width: 768px) {
  .feature-tabs { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .feature-tabs .tab-list { flex-direction: row; overflow-x: auto; padding: 4px; gap: 8px; margin-bottom: 0; }
  .feature-tabs [role="tab"] { min-height: 44px; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 10px 16px; text-align: center; }
  .feature-tabs [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--white); border-color: var(--accent); }
  .feature-tabs [role="tab"][aria-selected="true"]::before { display: none; }
  .document-panel { padding: 24px; }
  .config-float { padding: 20px; }
  .swatch-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .download-guide { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .rail-track { flex-direction: column; padding-inline: var(--gutter); }
  .rail-track > .card { width: 100%; }
  .sheet { width: 80%; }
  .term-card, .client-card, .article-card { padding: 22px; }
  .document-panel { padding: 18px; }
  .config-float { padding: 16px; }
  .toc { flex-wrap: nowrap; overflow-x: auto; }
  .toc a { flex-shrink: 0; white-space: nowrap; }
  .dl-fab { right: 20px; bottom: 20px; }
  .preview-fab { right: auto; bottom: auto; }
}