/* 拍板首屏：文案与静态剖面分处两层。 */
.hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  align-content: center;
  padding-block: 28px 20px;
}
.hero > .wrap { width: 100%; }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.fact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 14px;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: var(--size-note);
  line-height: 1;
  letter-spacing: .01em;
}
.fact-dot { color: var(--text-faint); }
.hero h1 { margin: 0 0 14px; font-size: var(--size-hero); line-height: 1.15; }
.lead { margin: 0 0 26px; max-width: 820px; color: var(--text-muted); }
.lead strong { color: var(--text); }
.platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin: 22px 0 30px;
  padding: 0;
  list-style: none;
}
.platforms a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  color: var(--text-muted);
  font-size: var(--size-small);
  line-height: 1;
  transition: color var(--speed-ui) var(--ease);
}
.platforms a:hover { color: var(--text); }
.platforms svg { width: 16px; height: 16px; }
.device {
  position: relative;
  height: 470px;
  border-radius: var(--r-card);
  overflow: hidden;
  isolation: isolate;
  color: var(--on-accent);
  background:
    radial-gradient(70% 80% at 80% 96%, var(--accent-glow), var(--clear) 72%),
    radial-gradient(50% 60% at 8% 0%, var(--accent-glow), var(--clear) 70%),
    var(--accent);
}
.device-head, .feature-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 48px 0;
}
.device-head > div, .feature-head > div { min-width: 0; }
.device-title {
  margin: 0 0 8px;
  font-size: var(--size-device-title);
  line-height: 1.3;
  letter-spacing: -.01em;
  text-wrap: wrap;
}
.device-desc { margin: 0; max-width: 600px; font-size: var(--size-action); line-height: 1.6; color: var(--on-accent-2); }
.stage { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.stage img { width: 100%; height: 100%; object-fit: cover; }
.plane {
  position: absolute;
  left: calc(50% - 654.5px * var(--s));
  top: calc(150px + 251px * var(--s));
  width: 0;
  height: 0;
  transform-origin: 0 0;
  transform: scale(var(--s)) rotateX(55deg) rotateZ(-35deg);
}
.layer {
  position: absolute;
  width: 220px;
  height: 220px;
  padding-inline: 16px;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-panel);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  font-family: var(--font-mono);
  color: var(--on-accent);
}
.layer-1 { left: 0; top: 0; background: var(--glass-1); color: var(--on-accent); }
.layer-2 { left: 250px; top: 80px; background: var(--glass-2); color: var(--on-accent); }
.layer-3 { left: 500px; top: 160px; background: var(--glass-3); color: var(--on-accent); }
.layer-4 { left: 750px; top: 240px; background: var(--glass-4); color: var(--on-accent); }
.layer-5 { left: 1000px; top: 320px; background: var(--glass-5); color: var(--on-accent); }
.layer-name, .layer-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--glass-rule);
  line-height: 1;
}
.layer-name { height: 46px; font-size: var(--size-small); font-weight: var(--weight-medium); letter-spacing: .1em; }
.layer-row { height: 38px; gap: 6px; white-space: nowrap; font-size: var(--size-note); }
.layer-row:last-child { border-bottom: 0; }
.layer-row .v { color: var(--on-accent-3); }
.layer-row.indent { padding-inline-start: 16px; }
.trace { position: absolute; width: 30px; height: 80px; }
.trace::before, .trace::after { content: ""; position: absolute; border-top: 1px dashed var(--dash); }
.trace::before { left: 0; top: 0; width: 15px; height: 100%; border-right: 1px dashed var(--dash); }
.trace::after { left: 14px; bottom: 0; width: 16px; }
.trace-1 { left: 220px; top: 110px; }
.trace-2 { left: 470px; top: 190px; }
.trace-3 { left: 720px; top: 270px; }
.trace-4 { left: 970px; top: 350px; }
.next { padding-block: 96px 120px; border-top: 1px solid var(--bg); }
.next h2 { margin: 0 0 16px; font-size: var(--size-next-title); }
.next .muted { max-width: 640px; }

/* 资料浏览器和平台横排。 */
.tabset { min-width: 0; }
.tabs, .toc-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 5px;
}
.tabs > [role="tab"], .toc-tabs a {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font: var(--size-ui)/1.35 var(--font-body);
  cursor: pointer;
}
.tabs > [role="tab"]:hover, .toc-tabs a:hover,
.tabs > [aria-selected="true"], .toc-tabs a[aria-current] {
  background: var(--bg-panel-2);
  color: var(--text);
}
.tabs > [role="tab"]:disabled { cursor: default; }
.tabset [role="tabpanel"] { min-width: 0; }
.tabset:not(.feature-browser) > [role="tabpanel"] { margin-top: 20px; }
.feature-browser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3.4fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: start;
}
.feature-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}
.feature-tabs > [role="tab"] {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 8px;
  text-align: start;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.feature-tabs > [role="tab"]::before {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  border-radius: var(--r-marker);
}
.feature-tabs > [aria-selected="true"]::before { background: var(--accent); color: var(--on-accent); }
.feature-tabs > [role="tab"]:hover, .feature-tabs > [aria-selected="true"] { color: var(--text); }
.feature-tabs > [role="tab"]:disabled { cursor: default; }
.tab-index { font: var(--size-note)/1 var(--font-mono); flex-shrink: 0; }
.feature-panel {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-width: 0;
  min-height: 390px;
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--on-accent);
}
.feature-head p { color: var(--on-accent-2); max-width: 56ch; }
.feature-glass {
  position: relative;
  isolation: isolate;
  width: min(62%, 430px);
  margin: 42px auto 44px;
  transform: rotate(-7deg);
}
.feature-glass::before, .feature-glass::after {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-panel);
  background: var(--glass-2);
  color: var(--on-accent);
}
.feature-glass::before { translate: -22px 12px; }
.feature-glass::after { translate: 18px -12px; background: var(--glass-4); color: var(--on-accent); }
.feature-glass pre {
  margin: 0;
  border-color: var(--glass-line);
  background: var(--glass-1);
  color: var(--on-accent);
}

.toc-tabs { padding: 6px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--bg-panel); color: var(--text); }
.toc-tabs.is-sticky { position: sticky; top: 8px; z-index: 5; }
:has(> .toc-tabs.is-sticky) > [id] { scroll-margin-top: 80px; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding-block: 4px;
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 16px;
  padding-block: 8px;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-item > div { padding-block: 0 16px; color: var(--text-muted); }
.term-card, .download-card, .post-card, .download-guide {
  min-width: 0;
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  background: var(--bg);
  color: var(--text);
}
.term-card { background: var(--bg-panel); color: var(--text); }
.term-card dfn { font-style: normal; }
.download-card, .post-card { display: flex; flex-direction: column; align-items: flex-start; }
.download-card p, .post-card p, .term-card p { color: var(--text-muted); }
.download-card .cluster:last-child, .post-card .text-link:last-child { margin-top: auto; }
.download-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.download-head > div { min-width: 0; }
.app-icon { width: 56px; height: 56px; flex-shrink: 0; }
[data-rev]:empty { display: none; }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--size-note);
  line-height: 1.35;
}
.badge--first { background: var(--text); color: var(--on-accent); border-color: var(--text); }
.badge--recommended::before, .badge--archived::before, .callout::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: var(--r-pill);
  background: var(--success);
  color: var(--text);
}
.badge--archived { background: var(--bg-panel-2); color: var(--text); }
.badge--archived::before { background: var(--warn); color: var(--text); }
.post-meta { margin-bottom: 12px; font-size: var(--size-note); color: var(--text-muted); }
.callout, .prose blockquote {
  position: relative;
  margin: 1.5em 0;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--text);
  border-radius: var(--r-btn);
  background: var(--bg-panel);
  color: var(--text);
}
.callout::before { position: absolute; inset-inline-start: 8px; top: 24px; background: var(--text); color: var(--on-accent); }

.table-wrap, .prose table, .article-body table, .reading-body table, .data-table:not(.table-wrap > *) {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-panel); }
.data-table, .prose table, .article-body table, .reading-body table { width: 100%; border-collapse: collapse; }
:is(.data-table,.prose table,.article-body table,.reading-body table) :is(th,td) {
  min-width: 7em;
  padding: 12px 16px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table,.prose table,.article-body table,.reading-body table) th {
  background: var(--bg-panel);
  color: var(--text);
  font-weight: var(--weight-medium);
}
.data-table tbody tr:last-child td { border-bottom: 0; }

.download-guide {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 20px;
  background: var(--bg-panel);
  color: var(--text);
}
.dl-fab {
  position: fixed;
  z-index: 12;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  max-width: calc(100% - 40px);
  padding: 8px 18px;
  border: 1px solid var(--text);
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--on-accent);
  font: var(--weight-medium) var(--size-small)/1.25 var(--font-body);
}
.dl-fab:hover { background: var(--text-hover); color: var(--on-accent); }
.dl-fab svg { width: 18px; height: 18px; }
.has-dl-fab { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

@media (max-width: 1060px) {
  .device { height: 430px; }
  .plane { top: calc(170px + 251px * var(--s)); }
  .feature-head { padding: 32px 28px 0; }
}
@media (max-width: 820px) {
  .hero { min-height: auto; padding-block: 36px 24px; }
  .device-head, .feature-head { flex-direction: column; gap: 20px; padding: 28px 24px 0; }
  .device-title { font-size: var(--size-device-mobile); }
  .device { height: 480px; }
  .plane { top: calc(250px + 251px * var(--s)); }
  .platforms { column-gap: 18px; row-gap: 8px; }
  .feature-browser { grid-template-columns: minmax(0,1fr); }
  .feature-tabs {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 5px;
    max-width: 100%;
  }
  .feature-tabs > [role="tab"] {
    flex: none;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
  }
}
@media (max-width: 768px) {
  .hero h1 { font-size: var(--size-hero-mobile); }
}
@media (max-width: 640px) {
  .feature-glass { transform: none; width: calc(100% - 80px); }
  .download-guide { grid-template-columns: minmax(0,1fr); justify-items: start; }
}
@media (max-width: 520px) {
  .device { height: 430px; }
  .plane { top: calc(270px + 251px * var(--s)); }
  .next { padding-block: 64px 72px; }
}
@media (max-width: 370px) {
  .device .plane { transform: scale(calc(var(--s) * .8)) rotateX(55deg) rotateZ(-35deg); left: calc(50% - 523.6px * var(--s)); }
}

/* 预览页试样不参与正式页面布局。 */
.preview-palette { margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit,minmax(min(100%, 10rem),1fr)); }
.preview-palette li { font: var(--size-note)/1.5 var(--font-mono); overflow-wrap: anywhere; }
.preview-palette li::before {
  content: "";
  display: block;
  height: 48px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--sample);
  color: var(--text);
}
.preview-palette .over-accent::before { background: linear-gradient(var(--sample),var(--sample)), var(--accent); color: var(--on-accent); }
.sw-bg { --sample: var(--bg); }
.sw-panel { --sample: var(--bg-panel); }
.sw-panel-2 { --sample: var(--bg-panel-2); }
.sw-border { --sample: var(--border); }
.sw-accent { --sample: var(--accent); }
.sw-accent-dark { --sample: var(--accent-dark); }
.sw-text { --sample: var(--text); }
.sw-text-hover { --sample: var(--text-hover); }
.sw-muted { --sample: var(--text-muted); }
.sw-faint { --sample: var(--text-faint); }
.sw-link { --sample: var(--link); }
.sw-success { --sample: var(--success); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-on { --sample: var(--on-accent); }
.sw-on-2 { --sample: var(--on-accent-2); }
.sw-on-3 { --sample: var(--on-accent-3); }
.sw-glow { --sample: var(--accent-glow); }
.sw-g1 { --sample: var(--glass-1); }
.sw-g2 { --sample: var(--glass-2); }
.sw-g3 { --sample: var(--glass-3); }
.sw-g4 { --sample: var(--glass-4); }
.sw-g5 { --sample: var(--glass-5); }
.sw-line { --sample: var(--glass-line); }
.sw-rule { --sample: var(--glass-rule); }
.sw-hi { --sample: var(--glass-hi); }
.sw-dash { --sample: var(--dash); }
.sw-veil { --sample: var(--veil); }
.sw-clear { --sample: var(--clear); }
.preview-display { font: var(--weight-normal) var(--size-h1)/1.15 var(--font-display); letter-spacing: var(--tracking-title); }
.preview-fab { position: static; max-width: 100%; margin-top: 18px; }