/* 双端装置：固定比例整体缩放，不压缩屏幕内的真实界面。 */
.rig { width: 1000px; height: 430px; left: 50%; margin: 26px 0 0 -500px; text-align: left; }
.notebook { position: absolute; left: 170px; top: 0; width: 720px; height: 418px; z-index: 1; }
.nb-lid { position: absolute; left: 0; top: 0; width: 720px; height: 404px; border: 1px solid var(--border); border-radius: var(--r-device) var(--r-device) var(--r-small) var(--r-small); background: var(--lid-face); color: var(--text); box-shadow: var(--shadow-soft); }
.nb-lid::before { content: ""; position: absolute; top: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: var(--r-round); background: var(--border); }
.nb-screen { position: absolute; top: 14px; left: 12px; right: 12px; bottom: 12px; border-radius: var(--r-ctl); overflow: hidden; background: var(--wallpaper); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.nb-base { position: absolute; left: -35px; top: 404px; width: 790px; height: 14px; filter: drop-shadow(0 8px 10px var(--ink-shadow)); }
.nb-deck { position: absolute; inset: 0; background: var(--deck-face); color: var(--text); clip-path: polygon(0 0,100% 0,97.6% 100%,2.4% 100%); }
.nb-deck::after { content: ""; position: absolute; top: 0; left: 50%; width: 120px; height: 5px; margin-left: -60px; border-radius: 0 0 var(--r-small) var(--r-small); background: var(--notch); }
.app-win { position: absolute; top: 18px; left: 74px; right: 22px; bottom: 18px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-window); background: var(--bg); color: var(--text); box-shadow: var(--shadow-win); overflow: hidden; font-family: var(--font-body); }
.win-bar { position: relative; flex: none; height: 30px; display: flex; align-items: center; padding: 0 12px; background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border); }
.lights { display: flex; gap: 6px; }
.lights i { width: 9px; height: 9px; border-radius: var(--r-round); display: block; flex-shrink: 0; }
.lights i:nth-child(1) { background: var(--error); }
.lights i:nth-child(2) { background: var(--warn); }
.lights i:nth-child(3) { background: var(--success); }
.win-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: var(--weight-semibold); color: var(--muted-panel-ink); letter-spacing: .01em; }
.win-menu { flex: none; height: 30px; margin: 0; padding: 0 8px; list-style: none; display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.win-menu li { display: flex; align-items: center; justify-content: center; height: 22px; border-radius: var(--r-mini); font-size: 11.5px; color: var(--text); line-height: 1; }
.win-menu li:nth-child(1) { width: 52px; }
.win-menu li:nth-child(2) { width: 64px; }
.win-menu li:nth-child(3) { width: 40px; }
.win-menu li:nth-child(4) { width: 64px; }
.win-menu .is-on { background: var(--accent-wash); color: var(--link-ink); font-weight: var(--weight-semibold); }
.win-body { flex: 1; display: flex; min-height: 0; }
.win-side { flex: none; width: 128px; background: var(--bg-panel); color: var(--text); border-right: 1px solid var(--border); padding: 10px 6px; }
.side-label { margin: 0 0 6px 6px; font-size: 10px; font-weight: var(--weight-semibold); letter-spacing: .04em; color: var(--muted-panel-ink); line-height: 14px; }
.side-item { display: inline-flex; align-items: center; gap: 6px; height: 24px; margin: 0; padding: 0 10px 0 8px; border: 1px solid var(--border); border-radius: var(--r-small); background: var(--bg); color: var(--text); font-size: 11.5px; font-weight: var(--weight-semibold); line-height: 1; }
.side-item::before { content: ""; width: 3px; height: 12px; border-radius: var(--r-mark); background: var(--accent); flex-shrink: 0; }
.win-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.grid-head { flex: none; height: 26px; display: grid; grid-template-columns: 1.7fr .8fr 1.7fr .8fr; background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border); }
.grid-head span { display: flex; align-items: center; padding: 0 10px; font-size: 10.5px; font-weight: var(--weight-semibold); color: var(--muted-panel-ink); border-right: 1px solid var(--border); }
.grid-head span:last-child { border-right: 0; }
.grid-empty { flex: 1; background: repeating-linear-gradient(to bottom, var(--bg) 0 24px, var(--row-tint) 24px 48px); color: var(--text); }
.win-status { flex: none; height: 26px; display: flex; align-items: center; padding: 0 12px; background: var(--bg-panel); color: var(--muted-panel-ink); border-top: 1px solid var(--border); font-size: 10.5px; white-space: nowrap; }
.win-status span { display: flex; align-items: center; gap: 6px; padding: 0 12px; line-height: 12px; }
.win-status span:first-child { padding-left: 0; }
.win-status span + span { border-left: 1px solid var(--border); }
.win-status .dot { width: 6px; height: 6px; border-radius: var(--r-round); background: var(--accent); }
.win-status b { font-family: var(--font-mono); font-weight: var(--weight-medium); color: var(--text); }
.handset { position: absolute; left: 76px; top: 100px; width: 164px; height: 330px; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-phone); background: var(--bg); color: var(--text); box-shadow: var(--shadow-deep); z-index: 3; }
.handset::before { content: ""; position: absolute; right: -3px; top: 72px; width: 3px; height: 34px; border-radius: 0 var(--r-mark) var(--r-mark) 0; background: var(--border); }
.hs-screen { position: relative; height: 100%; border: 1px solid var(--border); border-radius: var(--r-screen); overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); }
.hs-status { position: relative; height: 20px; }
.hs-cam { position: absolute; top: 7px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: var(--r-round); background: var(--text); }
.hs-batt { position: absolute; top: 7px; right: 12px; width: 13px; height: 7px; border: 1px solid var(--text-muted); border-radius: var(--r-mark); }
.hs-batt::after { content: ""; position: absolute; top: 1px; left: 1px; width: 7px; height: 3px; border-radius: var(--r-hair); background: var(--text-muted); }
.hs-appbar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--border); font-size: 12.5px; font-weight: var(--weight-bold); line-height: 1; }
.hs-appbar svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--text); }
.hs-entry { display: flex; align-items: center; justify-content: space-between; height: 34px; margin: 8px 8px 0; padding: 0 8px 0 10px; border: 1px solid var(--accent-line); border-radius: var(--r-ctl); background: var(--accent-wash); color: var(--link-ink); font-size: 10.5px; font-weight: var(--weight-semibold); line-height: 1; }
.hs-entry svg { width: 10px; height: 10px; flex-shrink: 0; }
.hs-group { margin: 12px 12px 2px; font-size: 9.5px; font-weight: var(--weight-semibold); letter-spacing: .04em; color: var(--text-muted); line-height: 14px; }
.hs-list { margin: 0; padding: 0; list-style: none; }
.hs-list li { display: flex; align-items: center; justify-content: space-between; height: 36px; margin: 0 12px; border-bottom: 1px solid var(--border); font-size: 10.5px; line-height: 1; }
.hs-list li:last-child { border-bottom: 0; }
.tog { position: relative; display: block; width: 24px; height: 14px; border-radius: var(--r-toggle); background: var(--bg-panel-2); color: var(--text); border: 1px solid var(--border); flex-shrink: 0; }
.tog::after { content: ""; position: absolute; top: 1px; left: 1px; width: 10px; height: 10px; border-radius: var(--r-round); background: var(--bg); box-shadow: 0 1px 2px var(--ink-shadow); }
.tog.is-on { background: var(--accent); color: var(--text); border-color: var(--accent); }
.tog.is-on::after { left: 11px; }
.hs-home { position: absolute; bottom: 7px; left: 50%; width: 44px; height: 3px; margin-left: -22px; border-radius: var(--r-mark); background: var(--text-muted); }
.relay { position: absolute; left: 0; top: 0; width: 1000px; height: 430px; overflow: visible; pointer-events: none; z-index: 4; }
.relay-path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linecap: round; }
.relay-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }

/* 通用 tabs；面板的 hidden 状态由 tabs.js 管理。 */
.tabs { min-width: 0; }
.tab-list, [role="tablist"].tab-list { display: flex; align-items: center; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px 2px 12px; }
.tab-list [role="tab"] {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--muted-panel-ink);
  font-size: var(--size-small);
  font-weight: var(--weight-semibold);
}
.tab-list [role="tab"][aria-selected="true"] { border-color: var(--accent-line); background: var(--accent-wash); color: var(--link-ink); }
.tab-panel { min-width: 0; padding-top: 20px; }
.feature-switch { display: grid; grid-template-columns: minmax(0, .45fr) minmax(0, .55fr); gap: 72px; align-items: center; }
.feature-stage { min-width: 0; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-device); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.feature-tabs { display: flex; flex-direction: column; gap: 8px; }
.feature-tabs [role="tab"] { position: relative; width: 100%; border: 0; padding: 16px 20px; background: var(--clear); color: var(--muted-panel-ink); text-align: left; border-radius: var(--r-ctl); }
.feature-tabs [role="tab"]::before { content: ""; position: absolute; inset: 14px auto 14px 0; width: 3px; border-radius: var(--r-mark); background: var(--clear); }
.feature-tabs [role="tab"][aria-selected="true"] { color: var(--text); }
.feature-tabs [role="tab"][aria-selected="true"]::before { background: var(--accent); }
.feature-tab-title { display: block; font-size: 21px; font-weight: var(--weight-display); }
.feature-tab-note { display: block; margin-top: 5px; font-size: var(--size-small); }
.feature-detail { padding-inline: 20px; font-size: 15px; line-height: 1.9; color: var(--muted-panel-ink); }
.settings-menu { list-style: none; margin: 0; padding: 0; }
.settings-menu li { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: var(--size-small); }
.settings-menu li:last-child { border-bottom: 0; }
.settings-menu .is-on { background: var(--accent-wash); color: var(--link-ink); font-weight: var(--weight-semibold); }
.settings-title { margin: -24px -24px 12px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--bg-panel); color: var(--text); font-size: var(--size-small); font-weight: var(--weight-semibold); border-radius: var(--r-device) var(--r-device) 0 0; }
.platform-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-line { min-width: 0; padding: 28px; border-top: 1px solid var(--border); }
.platform-line + .platform-line { border-left: 1px solid var(--border); }
.platform-line h3 { margin: 0 0 10px; font-size: 20px; }
.platform-line p { color: var(--text-muted); font-size: var(--size-small); }

/* 长页阅读：toc 必须直接放在覆盖全部章节的 grid 内。 */
.reading-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: 24px; align-self: start; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); padding: 20px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.toc-title { margin: 0 0 12px; font-size: var(--size-small); font-weight: var(--weight-bold); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding-block: 8px; font-size: var(--size-small); text-decoration: none; color: var(--text-muted); }
.toc a:hover, .toc a[aria-current] { color: var(--link-ink); }
.category-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.category-nav a { padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--bg); color: var(--text); text-decoration: none; font-size: var(--size-small); }
.faq-item { border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.faq-item summary { position: relative; list-style: none; padding: 22px 40px 22px 0; font-size: 17px; font-weight: var(--weight-semibold); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 22px; color: var(--link-ink); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; max-width: 760px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--accent); box-shadow: none; }
.term-card dt { font-weight: var(--weight-brand); font-size: 22px; }
.term-card dd { margin: 12px 0 0; color: var(--text-muted); }
.term-category { display: block; font-size: var(--size-note); font-weight: var(--weight-medium); color: var(--text-muted); margin-bottom: 12px; }
.client-card { padding: 32px; }
.client-card-header { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.client-card-header h3 { margin: 0; }
.client-logo { width: 56px; height: 56px; flex-shrink: 0; }
.client-version { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: var(--size-note); color: var(--text-muted); }
.client-card .button-row { margin-top: 24px; }
.badge, .tag { display: inline-block; max-width: 100%; padding: 3px 9px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--muted-panel-ink); font-size: 12px; font-weight: var(--weight-semibold); vertical-align: middle; overflow-wrap: anywhere; }
.badge-primary, .badge-recommended { background: var(--accent-wash); color: var(--link-ink); border-color: var(--accent-line); }
.badge-retired { background: var(--bg-panel-2); color: var(--muted-panel-ink); }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.article-card { display: flex; flex-direction: column; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: var(--size-note); color: var(--text-muted); margin-bottom: 18px; }
.article-card h3 { margin: 0 0 14px; font-size: 21px; line-height: 1.5; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--link-ink); }
.article-card p { color: var(--text-muted); font-size: var(--size-small); }
.article-more { margin-top: auto; padding-top: 12px; font-size: var(--size-small); }
.callout { margin: 28px 0; padding: 20px 24px; border: 1px solid var(--accent-line); border-left: 3px solid var(--accent); border-radius: var(--r-ctl); background: var(--accent-wash); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { margin-bottom: 8px; font-weight: var(--weight-bold); }
.callout-neutral { background: var(--bg-panel); color: var(--text); border-color: var(--border); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-ctl); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; background: var(--bg); color: var(--text); }
.data-table :is(th, td), .prose table :is(th, td), .article-body table :is(th, td) { min-width: 7em; padding: 14px 18px; border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal; vertical-align: top; }
.data-table th, .prose table th, .article-body table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table { display: block; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; text-align: left; background: var(--bg); color: var(--text); }
.prose table code, .article-body table code { overflow-wrap: anywhere; }
.prose :where(div, section, figure), .article-body :where(div, section, figure) { min-width: 0; max-width: 100%; }
.download-endcap { margin-top: 56px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.download-endcap h2 { margin: 0 0 12px; font-size: 24px; }
.download-endcap .btn { margin-top: 8px; }
.dl-fab { position: fixed; right: 24px; bottom: 24px; z-index: 20; display: flex; align-items: center; gap: 12px; max-width: calc(100% - var(--gutter) * 2); padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); text-decoration: none; font-size: var(--size-small); font-weight: var(--weight-semibold); }
.dl-fab svg { width: 22px; height: 22px; color: var(--link-ink); flex-shrink: 0; }
.dl-fab small { display: block; color: var(--text-muted); font-size: 12px; font-weight: var(--weight-normal); }
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.preview-stack { display: grid; gap: 28px; }
.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-ctl); overflow: hidden; background: var(--bg); color: var(--text); }
.swatch-color { height: 72px; border-bottom: 1px solid var(--border); }
.swatch code { display: block; padding: 10px; font-size: 12px; }
.swatch-bg { background: var(--bg); color: var(--text); }
.swatch-panel { background: var(--bg-panel); color: var(--text); }
.swatch-panel2 { background: var(--bg-panel-2); color: var(--text); }
.swatch-border { background: var(--border); color: var(--text); }
.swatch-accent { background: var(--accent); color: var(--text); }
.swatch-dark { background: var(--accent-dark); color: var(--on-accent); }
.swatch-text { background: var(--text); color: var(--bg); }
.swatch-muted { background: var(--text-muted); color: var(--bg); }
.swatch-success { background: var(--success); color: var(--text); }
.swatch-warn { background: var(--warn); color: var(--text); }
.swatch-error { background: var(--error); color: var(--text); }
.swatch-wash { background: var(--accent-wash); color: var(--text); }
.swatch-line { background: var(--accent-line); color: var(--text); }
.swatch-link { background: var(--link-ink); color: var(--on-accent); }
.swatch-row { background: var(--row-tint); color: var(--text); }
.swatch-wallpaper { background: var(--wallpaper); color: var(--text); }
@media (max-width: 1080px) {
  .rig { transform: scale(.78); transform-origin: top center; margin-bottom: -95px; }
  .feature-switch, .split-row { gap: 40px; }
  .reading-layout { gap: 32px; grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .rig { transform: scale(.62); margin-bottom: -163px; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
  .toc ul { display: flex; flex-wrap: wrap; gap: 4px 20px; }
  .feature-switch, .split-row { grid-template-columns: minmax(0, 1fr); }
  .feature-stage { max-width: 520px; width: 100%; margin-inline: auto; }
  .feature-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 12px; }
  .feature-tabs [role="tab"] { width: auto; min-width: max-content; min-height: 44px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 10px 18px; background: var(--bg); color: var(--text-muted); }
  .feature-tabs [role="tab"][aria-selected="true"] { background: var(--accent-wash); color: var(--link-ink); border-color: var(--accent-line); }
  .feature-tabs [role="tab"]::before { display: none; }
  .feature-tab-title { font-size: 15px; }
  .feature-tab-note { display: none; }
  .feature-detail { padding-inline: 0; }
  .platform-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-line:nth-child(3) { border-left: 0; }
}
@media (max-width: 640px) {
  .rig { transform: scale(.36); margin-bottom: -275px; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-card { padding: 22px; }
  .platform-lines { grid-template-columns: minmax(0, 1fr); }
  .platform-line { padding: 24px 0; }
  .platform-line + .platform-line { border-left: 0; }
  .callout { padding: 18px; }
  .dl-fab { right: var(--gutter); bottom: 16px; padding: 12px 16px; }
  .download-endcap { padding: 22px; }
}
@media (max-width: 360px) {
  .rig { transform: scale(.31); margin-bottom: -297px; }
}