/* 首页：斜向中性反光与双窗 */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-height: calc(100svh - var(--nav-h) - var(--peek));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  padding-block: 40px 34px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(118deg,var(--clear) 6%,var(--sheen) 20%,var(--clear) 34%),
    linear-gradient(118deg,var(--clear) 38%,var(--shade) 49%,var(--clear) 60%),
    linear-gradient(118deg,var(--clear) 62%,var(--sheen-soft) 75%,var(--clear) 90%);
  color: var(--text);
}
.hero-grid { display: grid; grid-template-columns: minmax(0,44fr) minmax(0,56fr); gap: 56px; align-items: center; }
.hero-copy { min-width: 0; max-width: 540px; }
.hero-title { letter-spacing: -.028em; text-wrap: wrap; }
.hero-title .title-line { display: block; }
.badge, .chip, .tag, .client-mark {
  max-width: 100%;
  overflow-wrap: anywhere;
  background: var(--bg-panel);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 11px;
  box-shadow: var(--shadow-near);
  font-size: 13px;
}
.badge-dot, .fact-dot, .sig {
  flex: none;
  border-radius: var(--r-round);
  background: var(--accent);
  color: var(--text);
}
.badge-dot { width: 7px; height: 7px; box-shadow: 0 0 0 4px var(--accent-ring); }
.lede { margin-top: 22px; max-width: 31em; font-size: 16px; line-height: 1.75; color: var(--text-muted); }
.lede strong { color: var(--text); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.chip, .tag, .client-mark { display: inline-block; padding: 3px 11px; font-size: 12.5px; line-height: 1.6; }
.platforms { display: flex; align-items: center; gap: 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.platforms-label { font: 11.5px/1.6 var(--font-mono); letter-spacing: .04em; color: var(--text-secondary); flex: none; }
.platforms ul { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; list-style: none; }
.platforms a { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--text-muted); transition: color var(--fast) ease; }
.platforms a:hover { color: var(--text); }
.platforms svg { width: 15px; height: 15px; flex: none; }
.platforms svg.tux { width: 13px; }

.device { position: relative; height: 452px; min-width: 0; }
.dev-col { position: absolute; min-width: 0; }
.dev-col-a { left: 0; top: 18px; width: 50%; z-index: 1; }
.dev-col-b { right: 0; top: 50px; width: 54%; z-index: 2; }
.win { position: relative; min-width: 0; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.dev-col-a .win { box-shadow: var(--shadow-near), var(--shadow-far-back); }
.dev-col-b .win { background: var(--bg-window); color: var(--text); box-shadow: var(--shadow-near), var(--shadow-far); }
.chrome {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--bg-panel);
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}
.dev-col-a .chrome { padding-left: 30px; }
.chrome i { width: 9px; height: 9px; flex: none; border-radius: var(--r-round); background: var(--skeleton-2); color: var(--text); }
.chrome-title { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font: 11.5px/1.6 var(--font-mono); color: var(--text-muted); }
.chrome-skel, .skel { border-radius: var(--r-pill); background: var(--skeleton); color: var(--text); }
.chrome-skel { margin-left: auto; width: 46px; height: 8px; }
.stamp { position: absolute; z-index: 4; display: grid; place-items: center; }
.stamp-yaml {
  left: -18px;
  top: -18px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-stamp);
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-near), var(--shadow-stamp);
}
.stamp-yaml svg { width: 22px; height: 22px; }
.stamp-cat { left: 58%; top: -22px; width: 44px; height: 44px; border-radius: var(--r-logo); box-shadow: var(--shadow-near), var(--shadow-logo); }
.stamp-cat img { display: block; width: 44px; height: 44px; }
.device-code {
  position: relative;
  padding: var(--code-pad) 0;
  font: 12.5px/var(--lh-code) var(--font-mono);
  overflow-x: auto;
}
.ln { position: relative; z-index: 1; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; }
.no { text-align: right; color: var(--text-faint); user-select: none; }
.tx { white-space: pre; color: var(--text-value); }
.k { color: var(--text); font-weight: 500; }
.band {
  position: absolute;
  z-index: 0;
  left: 6px;
  right: 8px;
  top: calc(var(--code-pad) + var(--lh-code));
  height: var(--lh-code);
  border-radius: var(--r-xs);
  background: var(--accent-band);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent);
  animation: band-walk var(--device-cycle) cubic-bezier(.45,0,.25,1) infinite;
}
.app { display: grid; grid-template-columns: 82px minmax(0,1fr); }
.side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 7px;
  background: var(--bg-side);
  color: var(--text);
  border-right: 1px solid var(--border-soft);
}
.side-i {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-muted);
}
.side-i::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-tiny); background: var(--skeleton-2); color: var(--text); flex: none; }
.side-i.is-on, .seg .is-on { background: var(--bg-panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow-near); }
.side-i.is-on::before { background: var(--text); color: var(--bg-panel); }
.side-i .sig { margin-left: auto; }
.app-main { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 16px; min-width: 0; }
.blk { display: flex; flex-direction: column; gap: 6px; }
.lbl { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-faint); }
.seg { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 3px; border-radius: var(--r-seg); background: var(--bg-panel-2); color: var(--text); }
.seg span { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 24px; border-radius: var(--r-seg-item); font-size: 12px; color: var(--text-secondary); }
.opts, .grp { background: var(--bg-panel); color: var(--text); border: 1px solid var(--border-soft); border-radius: var(--r-seg); }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 0 10px; font-size: 12px; }
.opt + .opt { border-top: 1px solid var(--border-soft); }
.sw { position: relative; width: 26px; height: 15px; flex: none; border-radius: var(--r-pill); background: var(--skeleton-2); color: var(--text); }
.sw::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: var(--r-round); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-near); }
.sw.on { background: var(--text); color: var(--bg-panel); }
.sw.on::after { transform: translateX(11px); }
.groups { display: flex; flex-direction: column; gap: 6px; }
.grp { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; }
.grp-name { font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.grp-type { font: 10.5px/1.6 var(--font-mono); color: var(--text-faint); }
.grp-tail { display: flex; align-items: center; gap: 8px; }
.skel { display: block; height: 6px; }
.skel-40 { width: 40px; }
.skel-28 { width: 28px; }
.slot { position: relative; width: 6px; height: 6px; flex: none; border-radius: var(--r-round); background: var(--skeleton-2); color: var(--text); }
.slot .sig { position: absolute; inset: 0; }
.sig { display: inline-block; width: 6px; height: 6px; box-shadow: 0 0 0 3px var(--accent-ring); opacity: 0; }
.sig-a { animation: sig-a var(--device-cycle) linear infinite; }
.sig-b { animation: sig-b var(--device-cycle) linear infinite; }
.sig-c { animation: sig-c var(--device-cycle) linear infinite; }
.device-arrow {
  position: absolute;
  z-index: 3;
  left: 48%;
  top: 268px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  transform: translate(-50%,-50%);
  border-radius: var(--r-round);
  background: var(--bg-panel);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-near);
}
.device-arrow svg { width: 14px; height: 14px; }
.cap { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--text-muted); }
@keyframes band-walk {
  0%,30% { transform: translateY(0); opacity: 1; }
  36%,63% { transform: translateY(calc(var(--lh-code) * 4)); opacity: 1; }
  69%,94% { transform: translateY(calc(var(--lh-code) * 11)); opacity: 1; }
  97% { transform: translateY(calc(var(--lh-code) * 11)); opacity: 0; }
  98% { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes sig-a { 0% { opacity: 0; } 5%,30% { opacity: 1; } 34%,100% { opacity: 0; } }
@keyframes sig-b { 0%,38% { opacity: 0; } 42%,63% { opacity: 1; } 67%,100% { opacity: 0; } }
@keyframes sig-c { 0%,71% { opacity: 0; } 75%,94% { opacity: 1; } 97%,100% { opacity: 0; } }

.facts { display: flex; justify-content: center; margin-top: 40px; }
.facts-bar {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 6px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-near);
  font-size: 12.5px;
}
.fact { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; color: var(--text-muted); }
.fact + .fact { border-left: 1px solid var(--border-soft); }
.fv { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.fact-dot { width: 6px; height: 6px; }
.next { padding-block-end: var(--section-space); }
.next > .panel { min-height: 360px; }
.next > .panel > p { margin-top: 12px; max-width: 40em; color: var(--text-secondary); }

/* 资料浏览器与平台标签 */
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
[role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--tap);
  min-width: 0;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-panel);
  color: var(--text-secondary);
  overflow-wrap: anywhere;
  text-align: center;
}
[role="tab"]:hover, [role="tab"][aria-selected="true"] { background: var(--bg-panel-2); color: var(--text); }
[role="tab"][aria-selected="true"] { font-weight: 700; }
[role="tabpanel"] { min-width: 0; }
.tabs > [role="tabpanel"] { margin-block-start: 18px; }
.feature-browser {
  display: grid;
  grid-template-columns: minmax(0, 215px) minmax(0,1fr);
  gap: clamp(18px, 4vw, 48px);
  margin-block-start: 24px;
}
.feature-rail { min-width: 0; }
.feature-rail [role="tablist"] { flex-direction: column; flex-wrap: nowrap; }
.feature-rail [role="tab"] { position: relative; width: 100%; justify-content: flex-start; text-align: start; }
.feature-rail [aria-selected="true"]::before {
  position: absolute;
  content: "";
  inset: 5px auto 5px 0;
  width: 3px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--text);
}
.feature-rail [role="tab"] svg { width: 16px; height: 16px; flex: none; }
.feature-rail [data-tab-pause] { min-height: var(--tap); margin-block-start: 10px; }
[data-tabs].is-playing .feature-rail [aria-selected="true"]::after {
  position: absolute;
  content: "";
  inset: auto 8px 0;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--text-secondary);
  color: var(--bg-panel);
  transform-origin: left;
  animation: tab-progress var(--tab-cycle) linear both;
}
@keyframes tab-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.feature-panel > p { margin-block: .7rem 1.25rem; max-width: 44em; color: var(--text-secondary); }
.feature-mock { box-shadow: var(--shadow-near), var(--shadow-far-back); }
.feature-mock .opt { min-height: 44px; font-size: var(--size-small); }
.feature-mock .skel { width: min(32%, 92px); flex: none; }
.dark-section { background: var(--section-dark); color: var(--on-dark); }
.dark-section :focus-visible { outline-color: var(--on-dark); }
.dark-section .muted, .step-caption, .step p { color: var(--on-dark-muted); }
.steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(16px,3vw,40px); margin-top: 28px; padding: 0; list-style: none; }
.step { min-width: 0; }
.step-visual { position: relative; margin-block-end: 30px; }
.step-visual .win, .step-visual .chrome { background: var(--dark-panel); color: var(--on-dark); border-color: var(--dark-edge); }
.step-visual .chrome-title { color: var(--on-dark); }
.step-display { display: grid; align-content: center; gap: 10px; min-height: 110px; padding: 16px 18px 25px; }
.step-display .skel { width: min(100%, 13em); background: var(--dark-edge); color: var(--on-dark); }
.step-display .skel:last-child { width: min(70%, 9em); }
.step-stamp {
  position: absolute;
  inset: auto auto -13px 10px;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--dark-edge);
  border-radius: var(--r-stamp);
  background: var(--section-dark);
  color: var(--accent);
  box-shadow: var(--shadow-near);
}
.step-stamp svg { width: 19px; height: 19px; }
.step-caption { display: block; font: 12px/1.6 var(--font-mono); margin-block-end: 6px; }
.step p { margin-block-start: 6px; }

/* 长文、下载与文章 */
.toc, .toc-tabs { position: static; }
.toc ul, .toc-tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc a, .toc-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 6px 14px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.toc a:hover, .toc-tabs a:hover { background: var(--bg-panel-2); color: var(--text); }
.faq-item {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.faq-item + .faq-item { margin-block-start: 8px; }
.faq-item summary { padding: 12px 16px; font-weight: 700; }
.faq-item[open] summary { border-bottom: 1px solid var(--border-soft); }
.faq-answer { padding: 12px 16px 16px; }
.term-card dt { font: 800 var(--size-h3)/1.3 var(--font-display); }
.term-card dd { color: var(--text-secondary); }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-mark { color: var(--text-secondary); }
.client-mark--first { background: var(--bg-panel-2); color: var(--text); font-weight: 800; }
.client-mark--recommended { background: var(--bg-window); color: var(--text); font-weight: 700; }
.client-mark--archived { background: var(--bg-panel); color: var(--text-secondary); border-style: dashed; }
[data-version]:empty { display: none; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-secondary); font-size: var(--size-small); }
.post-card h3 a:hover { text-decoration: underline; text-underline-offset: .18em; }
.callout {
  padding: 14px 16px;
  background: var(--bg-window);
  color: var(--text);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--text-secondary);
  border-radius: var(--r);
}
.table-wrap, .data-table, .prose table, .article-body table, .doc-content table {
  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); }
.table-wrap > table { display: table; overflow: visible; width: 100%; min-width: max-content; max-width: none; }
.data-table, .prose table, .article-body table, .doc-content table {
  border-collapse: collapse;
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--size-small);
  text-align: start;
}
.table-wrap > table { min-width: 100%; }
.data-table :is(th,td), .prose table :is(th,td), .article-body table :is(th,td), .doc-content table :is(th,td) {
  min-width: 7em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
  text-align: start;
}
.data-table th, .prose th, .article-body th, .doc-content th { background: var(--bg-panel-2); color: var(--text); }
.table-wrap caption { padding: 10px 14px; text-align: start; font-weight: 700; }
.download-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.download-end > * { min-width: 0; margin: 0; }
.dl-fab {
  position: fixed;
  z-index: 15;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  max-width: calc(100% - 32px);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-near), var(--shadow-menu);
}
.article-with-fab .site-footer { padding-block-end: 88px; }

/* 静态验收页 */
.preview-stack > * + * { margin-block-start: 20px; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 128px),1fr)); gap: 10px; }
.swatch {
  display: block;
  height: 32px;
  background: var(--swatch, var(--bg));
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.s-bg { --swatch: var(--bg); }
.s-panel { --swatch: var(--bg-panel); }
.s-panel2 { --swatch: var(--bg-panel-2); }
.s-window { --swatch: var(--bg-window); }
.s-side { --swatch: var(--bg-side); }
.s-border { --swatch: var(--border); }
.s-soft { --swatch: var(--border-soft); }
.s-accent { --swatch: var(--accent); }
.s-hover { --swatch: var(--accent-hover); }
.s-accentdark { --swatch: var(--accent-dark); }
.s-band { --swatch: var(--accent-band); }
.s-ring { --swatch: var(--accent-ring); }
.s-edge { --swatch: var(--accent-edge); }
.s-text { --swatch: var(--text); }
.s-muted { --swatch: var(--text-muted); }
.s-secondary { --swatch: var(--text-secondary); }
.s-faint { --swatch: var(--text-faint); }
.s-value { --swatch: var(--text-value); }
.s-skel { --swatch: var(--skeleton); }
.s-skel2 { --swatch: var(--skeleton-2); }
.s-success { --swatch: var(--success); }
.s-warn { --swatch: var(--warn); }
.s-error { --swatch: var(--error); }
.s-dark { --swatch: var(--section-dark); }
.s-on { --swatch: var(--on-dark); }
.s-on-muted { --swatch: var(--on-dark-muted); }
.s-dark-panel { --swatch: var(--dark-panel); }
.s-dark-edge { --swatch: var(--dark-edge); }
.s-sheen { --swatch: var(--sheen); }
.s-sheen-soft { --swatch: var(--sheen-soft); }
.s-shade { --swatch: var(--shade); }
.s-clear { --swatch: var(--clear); }
.s-veil { --swatch: var(--veil); }

@media (max-width: 1200px) {
  .device-code { font-size: 11.5px; }
  .hero-grid { gap: 40px; }
  .dev-col-b .grp-tail .skel { display: none; }
}
@media (max-width: 960px) {
  .hero { min-height: auto; padding-block: 36px 48px; }
  .hero-grid { grid-template-columns: minmax(0,1fr); gap: 44px; }
  .hero-copy { max-width: none; }
  .device { height: auto; display: flex; flex-direction: column; padding-top: 22px; }
  .dev-col { position: relative; inset: auto; width: 100%; }
  .dev-col-a { order: 1; }
  .device-arrow { order: 2; position: relative; inset: auto; margin: 20px auto 34px; transform: rotate(90deg); }
  .dev-col-b { order: 3; }
  .device-code { font-size: 12px; }
  .stamp-yaml { left: -8px; }
}
@media (max-width: 768px) {
  .hero-title { letter-spacing: -.02em; }
  .platforms { flex-direction: column; align-items: flex-start; gap: 10px; }
  .facts-bar { flex-wrap: wrap; justify-content: center; padding: 6px; }
  .fact { padding: 5px 12px; }
  .fact + .fact { border-left: 0; }
  .feature-browser, .steps { grid-template-columns: minmax(0,1fr); }
  .feature-rail [role="tablist"] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 420px) {
  .ln { grid-template-columns: 20px minmax(0,1fr); gap: 7px; }
  .device-code { font-size: 11.5px; }
  .app { grid-template-columns: 71px minmax(0,1fr); }
  .side-i { gap: 4px; padding-inline: 4px; }
  .app-main { padding-inline: 8px; }
  .grp { gap: 5px; padding-inline: 6px; }
  .feature-rail [role="tab"] { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .band, .sig-a, .sig-b, .sig-c, [data-tabs].is-playing .feature-rail [aria-selected="true"]::after { animation: none; }
  .sig-a { opacity: 1; }
  .platforms a { transition: none; }
}