/* 分段控件；无脚本时正文保持可见，脚本负责设置 hidden。 */
.tabs { min-width:0; }
.tab-scroll { max-width:100%; overflow-x:auto; padding:4px; margin:-4px; }
[role="tablist"] { display:flex; align-items:stretch; width:max-content; min-width:100%; }
[role="tab"] {
  display:inline-flex; align-items:center; justify-content:center; flex:1 0 auto;
  min-height:46px; padding:10px 20px; margin:0 0 0 -1px;
  border:1px solid var(--border); background:var(--panel); color:var(--muted);
  font-size:14px; white-space:nowrap;
}
[role="tab"]:first-child { margin-left:0; border-radius:var(--r-ctl) 0 0 var(--r-ctl); }
[role="tab"]:last-child { border-radius:0 var(--r-ctl) var(--r-ctl) 0; }
[role="tab"]:hover { background:var(--panel-2); color:var(--text); }
[role="tab"][aria-selected="true"] { position:relative; border-color:var(--accent-line); background:var(--accent-soft); color:var(--accent-ink); }
.tab-panel { padding:32px; border:1px solid var(--border); background:var(--panel); color:var(--text); border-radius:0 0 var(--r-card) var(--r-card); }
.feature-detail { display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:40px; }
.feature-detail > * { min-width:0; }
.feature-detail h3 { font-size:26px; font-weight:var(--weight-normal); }
.feature-detail p { color:var(--muted); line-height:1.85; }
.feature-detail pre { margin:0; align-self:stretch; }
.setting-tags,.tag-row { display:flex; flex-wrap:wrap; gap:8px; }
.setting-tag,.tag,.status-badge {
  display:inline-flex; align-items:center; gap:6px; max-width:100%;
  padding:4px 9px; border:1px solid var(--border); border-radius:var(--r-ctl);
  background:var(--panel-2); color:var(--muted);
  font-size:12px; line-height:1.5; overflow-wrap:anywhere;
}
.setting-tag { font-family:var(--font-mono); }
.tag { white-space:normal; }
.status-badge { background:var(--accent-soft); color:var(--accent-ink); border-color:var(--accent-line); }
.status-badge--recommended { background:var(--panel-2); color:var(--bg); border-color:var(--border); }
.status-badge--retired { background:var(--panel-2); color:var(--muted); border-color:var(--border); }
.toc {
  position:sticky; top:0; z-index:10; display:flex; flex-wrap:wrap; gap:8px;
  padding:12px; margin-block:24px; border:1px solid var(--border); border-radius:var(--r-ctl);
  background:var(--panel); color:var(--text);
}
.toc a { display:block; padding:8px 12px; min-height:44px; font-size:14px; border-radius:var(--r-ctl); }
.toc a:hover,.toc a[aria-current="location"] { background:var(--accent-soft); color:var(--accent-ink); }
.faq-item { border-bottom:1px solid var(--border); background:var(--panel); color:var(--text); }
.faq-item:first-child { border-top:1px solid var(--border); }
.faq-item summary { position:relative; padding:22px 40px 22px 0; cursor:pointer; list-style:none; font-weight:var(--weight-medium); }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::after { content:"+"; position:absolute; right:8px; top:20px; color:var(--bg); font-family:var(--font-mono); }
.faq-item[open] summary::after { content:"−"; }
.faq-answer { padding-bottom:22px; color:var(--muted); }
.faq-answer p:last-child { margin-bottom:0; }
.term-card { border-top:3px solid var(--cyan); }
.term-card dt { margin:0 0 8px; font-size:22px; font-weight:var(--weight-medium); }
.term-card dd { margin:0; color:var(--muted); }
.term-card .term-en { display:block; margin-bottom:12px; color:var(--bg); font-size:12px; font-family:var(--font-mono); }
.client-card { position:relative; padding:28px; border:1px solid var(--border); border-radius:var(--r-card); background:var(--panel); color:var(--text); box-shadow:var(--sh-dl); }
.client-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.client-head h3 { margin:0; }
.client-meta { color:var(--muted); font-size:14px; }
.client-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:24px; }
.client-card .minor-downloads { margin-top:14px; font-size:14px; }
.client-card .minor-downloads a { color:var(--bg); text-decoration:underline; }
.article-card { display:flex; flex-direction:column; min-width:0; }
.article-meta { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:18px; color:var(--muted); font-size:12px; }
.article-card h3 { font-size:22px; font-weight:var(--weight-medium); }
.article-card h3 a:hover { color:var(--bg); }
.article-card p { color:var(--muted); }
.article-more { margin-top:auto; padding-top:18px; color:var(--accent-ink); font-size:14px; font-weight:var(--weight-bold); }
.callout {
  padding:22px 24px; margin-block:24px; border-left:3px solid var(--bg);
  border-radius:0 var(--r-ctl) var(--r-ctl) 0;
  background:var(--panel-2); color:var(--text);
}
.callout p:last-child { margin-bottom:0; }
.callout--warning { border-left-color:var(--warn); background:var(--accent-soft); color:var(--text); }
.table-scroll { max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-inline:contain; }
.data-table { width:100%; border-collapse:collapse; text-align:left; background:var(--panel); color:var(--text); font-size:14px; }
.data-table th,.data-table td,.prose table th,.prose table td,.document-body table th,.document-body table td {
  min-width:7em; padding:14px 18px; border:1px solid var(--border);
  overflow-wrap:normal; word-break:normal; vertical-align:top;
}
.data-table th,.prose table th,.document-body table th { background:var(--panel-2); color:var(--text); font-weight:var(--weight-bold); }
.prose table,.document-body table { display:block; max-width:100%; min-width:0; overflow-x:auto; -webkit-overflow-scrolling:touch; border-collapse:collapse; background:var(--panel); color:var(--text); }
.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-top:3px solid var(--bg); border-radius:var(--r-card); background:var(--panel-2); color:var(--text); }
.article-download > div { flex:1 1 240px; min-width:0; }
.article-download h2 { margin:0 0 8px; font-size:24px; }
.article-download p { margin:0; color:var(--muted); }
.dl-fab {
  position:fixed; right:max(20px,env(safe-area-inset-right)); bottom:max(20px,env(safe-area-inset-bottom)); z-index:30;
  display:flex; align-items:center; gap:12px; max-width:calc(100% - 40px); min-height:56px;
  padding:12px 18px; border:1px solid var(--accent-line); border-radius:var(--r-card);
  background:var(--panel); color:var(--text); box-shadow:var(--sh-dl);
}
.dl-fab svg { width:22px; height:22px; color:var(--bg); }
.dl-fab strong { display:block; font-size:14px; }
.dl-fab small { display:block; color:var(--muted); font-size:12px; }
.dl-fab:hover { border-color:var(--accent); }
.has-dl-fab .site-footer { padding-bottom:110px; }

/* 首屏：静态设置面板与跨区光框。 */
.hero { position:relative; background:var(--bg); color:var(--on-field); }
.hero-top { display:grid; grid-template-columns:minmax(0,1fr) 440px; column-gap:56px; padding-top:30px; }
.badge {
  grid-column:1 / -1; justify-self:start; display:inline-flex; flex-wrap:wrap; align-items:center; gap:9px;
  min-height:28px; max-width:100%; margin:0; padding:5px 11px;
  border:1px solid var(--on-field-line); border-radius:var(--r-ctl);
  background:var(--on-field-fill); color:var(--on-field-2); font-size:13px; line-height:1.3; letter-spacing:.01em;
}
.badge-dot { flex-shrink:0; width:6px; height:6px; border-radius:var(--r-round); background:var(--cyan); }
.badge-sep { color:var(--on-field-3); }
.hero h1 { grid-column:1 / -1; margin:18px 0 0; }
.h1-line { display:block; }
.kw { padding-bottom:5px; background:linear-gradient(var(--cyan),var(--cyan)) left bottom / 100% 3px no-repeat; }
.spark { display:inline-block; width:.66em; height:.66em; margin-left:.22em; vertical-align:.02em; }
.spark-a { fill:var(--cyan); }
.spark-b { fill:var(--cyan-soft); }
.hero-main { min-width:0; }
.hero-desc { margin:16px 0 0; max-width:36em; font-size:17px; line-height:1.62; color:var(--on-field-2); }
.hero-desc strong { color:var(--on-field); font-weight:var(--weight-medium); }
.hero-side { align-self:end; display:grid; gap:18px; padding-left:32px; border-left:1px solid var(--on-field-line); }
.side-label { margin:0 0 8px; font-size:12px; line-height:1.5; letter-spacing:.08em; color:var(--on-field-3); }
.proto { display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0; margin:0; }
.proto li {
  display:inline-flex; align-items:center; min-height:28px; padding:4px 10px;
  border:1px solid var(--on-field-line); border-radius:var(--r-ctl);
  background:var(--on-field-fill); color:var(--on-field);
  font-family:var(--font-mono); font-size:12.5px; line-height:1.3;
}
.plat { display:flex; flex-wrap:wrap; gap:8px 26px; list-style:none; padding:0; margin:0; }
.plat a { display:inline-flex; align-items:center; gap:8px; font-size:14px; line-height:22px; color:var(--on-field); text-decoration:underline; text-decoration-color:var(--clear); text-underline-offset:5px; text-decoration-thickness:2px; }
.plat a:hover { text-decoration-color:var(--cyan); }
.plat svg { width:18px; height:18px; }
.bridge { position:relative; z-index:2; margin-top:38px; margin-bottom:calc(var(--dev-h) * -.4); }
.bridge::before {
  content:""; position:absolute; z-index:-1; left:4%; right:4%; bottom:-86px; height:300px;
  background:radial-gradient(closest-side,var(--glow),var(--glow-0)); color:var(--text); pointer-events:none;
}
.device {
  width:min(var(--w-frame),calc(100% - 48px)); height:var(--dev-h); margin-inline:auto; padding:20px;
  border-radius:var(--r-frame);
  background:linear-gradient(180deg,var(--clear) 0%,var(--clear) 50%,var(--peach-wash) 100%),linear-gradient(90deg,var(--frame-a) 0%,var(--cyan) 46%,var(--accent) 100%);
  color:var(--text); box-shadow:var(--sh-device);
}
.win { display:flex; flex-direction:column; height:100%; min-width:0; background:var(--panel); color:var(--text); border-radius:var(--r-ctl); box-shadow:var(--sh-win); }
.win-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:50px; padding-inline:18px; flex-shrink:0; border-bottom:1px solid var(--border); }
.win-title { display:inline-flex; align-items:center; gap:14px; font-size:15px; line-height:1.4; }
.win-title svg { width:18px; height:18px; color:var(--text); }
.win-title span { color:var(--muted); }
.win-actions { display:flex; gap:8px; }
.tb-btn { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:5px 12px; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--panel); color:var(--text); font-size:13px; line-height:1.4; }
.win-filters { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-height:52px; padding:10px 18px; flex-shrink:0; border-bottom:1px solid var(--border); }
.fchip { display:inline-flex; align-items:center; gap:6px; min-height:30px; max-width:100%; padding:5px 10px; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--panel); color:var(--text); font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.fchip i { font-style:normal; color:var(--muted); font-size:11px; }
.fchip .m { font-family:var(--font-mono); font-size:12px; }
.fchip-on { background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent-ink); }
.fchip-on i { color:var(--accent-ink); }
.win-body { flex:1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.18fr); gap:12px; padding:16px; background:var(--panel-2); color:var(--text); }
.pcard { display:flex; flex-direction:column; min-width:0; padding:14px 16px; background:var(--panel); color:var(--text); border:1px solid var(--border); border-radius:var(--r-card); box-shadow:var(--sh-card); }
.pcard-h { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:4px; padding-bottom:10px; border-bottom:1px solid var(--border); }
.pcard-t { font-size:14px; font-weight:var(--weight-bold); line-height:1.4; }
.pcard-k { font-family:var(--font-mono); font-size:11px; color:var(--muted); }
.row { display:flex; align-items:center; gap:10px; padding-block:8px; min-width:0; }
.row + .row { border-top:1px solid var(--border-soft); }
.row-txt { flex:1; min-width:0; display:flex; flex-direction:column; }
.row-l { font-size:13px; line-height:1.4; }
.row-s { font-family:var(--font-mono); font-size:11px; line-height:1.4; color:var(--muted); overflow-wrap:anywhere; }
.row-flat { min-height:38px; padding-block:6px; }
.dot { flex-shrink:0; width:8px; height:8px; border-radius:var(--r-round); }
.dot-ok { background:var(--success); box-shadow:0 0 0 3px var(--success-soft); }
.dot-warn { background:var(--warn); box-shadow:0 0 0 3px var(--warn-soft); }
.dot-err { background:var(--error); box-shadow:0 0 0 3px var(--error-soft); }
.sw { position:relative; flex-shrink:0; width:34px; height:18px; border-radius:var(--r-ctl); background:var(--toggle-off); color:var(--text); }
.sw::after { content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:var(--r-knob); background:var(--panel); box-shadow:var(--sh-knob); }
.sw-on { background:var(--accent); }
.sw-on::after { transform:translateX(16px); }
.field { flex-shrink:0; display:inline-flex; align-items:center; min-width:96px; min-height:26px; padding:3px 9px; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--panel-2); color:var(--text); font-family:var(--font-mono); font-size:12px; }
.radios { display:flex; flex-wrap:wrap; gap:10px 18px; padding-top:10px; padding-bottom:12px; }
.radio { display:inline-flex; align-items:center; gap:7px; font-size:13px; line-height:1.4; color:var(--muted); }
.radio i { position:relative; flex-shrink:0; width:14px; height:14px; border-radius:var(--r-round); border:1.5px solid var(--toggle-off); }
.radio-on { color:var(--text); }
.radio-on i { border-color:var(--accent); }
.radio-on i::after { content:""; position:absolute; inset:2.5px; border-radius:var(--r-round); background:var(--accent); }
.code { margin:0; padding:10px 12px; background:var(--panel-2); color:var(--muted); border:1px solid var(--border); border-radius:var(--r-ctl); font-family:var(--font-mono); font-size:11.5px; line-height:1.58; white-space:pre; overflow-x:auto; }
pre .k { color:var(--code-key); }
pre .s { color:var(--code-str); }
.next { position:relative; z-index:1; background:var(--panel); color:var(--text); padding-top:calc(var(--dev-h) * .4 + 104px); padding-bottom:104px; }
.next h2 { margin:10px 0 0; }
.next-lead { margin:12px 0 0; max-width:40em; font-size:16px; color:var(--muted); }
.dl-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-top:36px; }
.dl-card { display:flex; flex-direction:column; min-width:0; padding:22px; background:var(--panel); color:var(--text); border:1px solid var(--border); border-radius:var(--r-card); box-shadow:var(--sh-dl); }
.dl-card:hover { border-color:var(--accent-line); }
.dl-top { display:flex; align-items:center; gap:14px; }
.dl-ico { display:grid; place-items:center; flex-shrink:0; width:42px; height:42px; border-radius:var(--r-ctl); background:var(--panel-2); color:var(--bg); }
.dl-ico svg { width:20px; height:20px; }
.dl-name { display:block; font-size:17px; font-weight:var(--weight-bold); line-height:1.3; }
.dl-client { display:block; font-family:var(--font-mono); font-size:12px; color:var(--muted); }
.dl-bottom { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:18px; padding-top:14px; border-top:1px solid var(--border-soft); }
.dl-arch { font-family:var(--font-mono); font-size:12px; color:var(--muted); }
.dl-go { font-size:14px; font-weight:var(--weight-bold); color:var(--accent-ink); white-space:nowrap; }

/* 仅预览页使用的色板与演示家具。 */
.palette-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-top:28px; }
.palette-chip { min-width:0; border:1px solid var(--border); border-radius:var(--r-ctl); background:var(--panel); color:var(--text); }
.palette-chip code { display:block; padding:10px; font-size:11px; }
.swatch { display:block; height:54px; border-radius:var(--r-ctl) var(--r-ctl) 0 0; }
.swatch-bg { background:var(--bg); }
.swatch-panel { background:var(--panel); }
.swatch-panel2 { background:var(--panel-2); }
.swatch-border { background:var(--border); }
.swatch-border-soft { background:var(--border-soft); }
.swatch-accent { background:var(--accent); }
.swatch-accent-dark { background:var(--accent-dark); }
.swatch-accent-ink { background:var(--accent-ink); }
.swatch-accent-soft { background:var(--accent-soft); }
.swatch-accent-line { background:var(--accent-line); }
.swatch-cyan { background:var(--cyan); }
.swatch-cyan-soft { background:var(--cyan-soft); }
.swatch-text { background:var(--text); }
.swatch-muted { background:var(--muted); }
.swatch-muted2 { background:var(--muted-2); }
.swatch-success { background:var(--success); }
.swatch-success-soft { background:var(--success-soft); }
.swatch-warn { background:var(--warn); }
.swatch-warn-soft { background:var(--warn-soft); }
.swatch-error { background:var(--error); }
.swatch-error-soft { background:var(--error-soft); }
.swatch-on-field { background:var(--on-field); }
.swatch-on-field2 { background:var(--on-field-2); }
.swatch-on-field3 { background:var(--on-field-3); }
.swatch-field-line { background:var(--on-field-line); }
.swatch-field-fill { background:var(--on-field-fill); }
.swatch-field-hover { background:var(--on-field-hover); }
.swatch-frame { background:var(--frame-a); }
.swatch-peach { background:var(--peach-wash); }
.swatch-clear { background:var(--clear); }
.swatch-toggle { background:var(--toggle-off); }
.swatch-code-key { background:var(--code-key); }
.swatch-code-str { background:var(--code-str); }
.swatch-glow { background:var(--glow); }
.swatch-glow0 { background:var(--glow-0); }
.swatch-veil { background:var(--veil); }
.palette-field { background:var(--bg); color:var(--on-field); }
.type-display { font-size:var(--size-h1); line-height:1.18; font-weight:var(--weight-normal); }
.preview-label { margin-top:32px; color:var(--muted); font-size:13px; }
.preview-fab { position:static; max-width:100%; width:fit-content; margin-top:24px; }
.preview-language summary { list-style:none; cursor:pointer; }
.preview-language summary::-webkit-details-marker { display:none; }
@media (max-width:1100px) {
  .hero-top { grid-template-columns:minmax(0,1fr); }
  .hero-side { align-self:start; margin-top:26px; padding:20px 0 0; border-left:0; border-top:1px solid var(--on-field-line); }
  .dl-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:860px) {
  .device { height:auto; }
  .bridge { margin-bottom:-140px; }
  .win-body { grid-template-columns:minmax(0,1fr); }
  .win-bar { padding-inline:14px; }
  .win-filters { padding-inline:14px; }
  .win-actions .tb-btn:first-child { display:none; }
  .next { padding-top:220px; }
  .feature-detail { grid-template-columns:minmax(0,1fr); gap:24px; }
}
@media (max-width:640px) {
  .hero-top { padding-top:24px; }
  .hero-desc { font-size:16px; }
  .hero .h1-line { text-wrap:balance; }
  .hero .badge { gap:6px; font-size:11px; }
  .hero-side { gap:14px; }
  .proto { gap:6px; }
  .proto li { font-size:11px; padding-inline:8px; }
  .plat { gap:10px 20px; }
  .device { width:calc(100% - 32px); padding:12px; }
  .win-title { gap:8px; font-size:13px; }
  .win-actions { display:none; }
  .win-body { padding:10px; }
  .pcard { padding:12px; }
  .tab-panel { padding:20px; }
  [role="tab"] { padding-inline:14px; }
  .client-card { padding:20px; }
  .toc { position:static; }
  .article-download { padding:20px; }
}
@media (max-width:560px) {
  .dl-grid { grid-template-columns:minmax(0,1fr); }
}