/* 拱门里的入口卡阵 */
.hero {
  position: relative;
  overflow: clip;
  min-height: calc(100vh - var(--nav-h) - 26px);
  min-height: calc(100svh - var(--nav-h) - 26px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 16px 24px;
}
.hero-stack { position: relative; z-index: 3; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 5px 15px 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--grad-chip);
  color: var(--text-muted);
  box-shadow: var(--shadow-chip), var(--inset-highlight);
  font-size: 13px;
  line-height: 1.25;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: var(--radius-round); background: var(--grad-accent); color: var(--text); box-shadow: 0 0 0 4px var(--accent-halo); }
.hero-title { margin: 0 0 22px; }
.kw { color: var(--accent-dark); white-space: nowrap; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .kw { background-image: var(--grad-accent); -webkit-background-clip: text; background-clip: text; color: var(--clear); -webkit-text-fill-color: var(--clear); }
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 20px; }
.lede { margin: 0 0 14px; max-width: 660px; color: var(--text-muted); }
.lede strong { font-weight: 500; color: var(--text); background-image: linear-gradient(180deg, var(--clear) 64%, var(--bg-panel-2) 64%); padding-inline: 2px; }
.facts, .platforms, .trust { display: flex; flex-wrap: wrap; justify-content: center; padding: 0; list-style: none; }
.facts { gap: 10px; margin: 0 0 14px; }
.fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 14px 4px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--grad-chip);
  color: var(--text);
  box-shadow: var(--shadow-chip), var(--inset-highlight);
  font-size: 13px;
  line-height: 1.2;
}
.fact svg, .platforms svg { width: 15px; height: 15px; }
.platforms { gap: 8px 30px; margin: 0; }
.platforms a { display: inline-flex; align-items: center; gap: 7px; min-height: 22px; font-size: 13.5px; color: var(--text-muted); text-decoration: none; }
.platforms a:hover { color: var(--accent-dark); }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.st-accent { stop-color: var(--accent); }
.st-accent2 { stop-color: var(--accent-2); }
.st-panel { stop-color: var(--bg-panel); stop-opacity: .95; }
.st-panel-mid { stop-color: var(--bg-panel); stop-opacity: .4; }
.st-fade { stop-color: var(--bg); stop-opacity: 0; }
.ico { fill: none; stroke: var(--accent); stroke: url(#g-ico) var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.device-wrap { position: relative; z-index: 2; width: 100%; min-width: 0; display: flex; justify-content: center; margin-top: 26px; }
.device { position: relative; flex: none; width: 704px; height: 414px; }
.glow, .glow-drift { position: absolute; inset: 0; pointer-events: none; }
.glow-drift { animation: glow-drift 20s ease-in-out infinite alternate; }
@keyframes glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-30px, -16px, 0) scale(1.05); }
}
.blob { position: absolute; border-radius: var(--radius-round); }
.blob-violet { left: 250px; top: 108px; width: 470px; height: 380px; background: radial-gradient(closest-side, var(--glow-violet), var(--clear)); color: var(--text); opacity: .9; }
.blob-peri { left: 400px; top: 196px; width: 420px; height: 330px; background: radial-gradient(closest-side, var(--glow-periwinkle), var(--clear)); color: var(--text); opacity: .85; }
.blob-rose { left: -160px; top: 246px; width: 380px; height: 260px; background: radial-gradient(closest-side, var(--glow-rose), var(--clear)); color: var(--text); opacity: .8; }
.arch {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  --arch-mask: linear-gradient(180deg, var(--mask-on) 82%, var(--clear));
  -webkit-mask-image: var(--arch-mask);
  mask-image: var(--arch-mask);
}
.arch-fill { fill: url(#g-arch-fill); }
.arch-line { fill: none; stroke: url(#g-arch); stroke-width: 1.5; opacity: .38; }
.field {
  position: absolute;
  inset: 0;
  z-index: 2;
  --field-mask: linear-gradient(90deg, var(--clear) 0%, var(--mask-half) 4%, var(--mask-on) 17%, var(--mask-on) 83%, var(--mask-half) 96%, var(--clear));
  -webkit-mask-image: var(--field-mask);
  mask-image: var(--field-mask);
}
.field:focus-within { -webkit-mask-image: none; mask-image: none; }
.row { position: absolute; left: 50%; display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; transform: translateX(-50%); }
.row-1 { top: 144px; }
.row-2 { top: 252px; }
.row-3 {
  top: 360px;
  height: 54px;
  overflow: hidden;
  --ghost-mask: linear-gradient(180deg, var(--mask-ghost), var(--clear));
  -webkit-mask-image: var(--ghost-mask);
  mask-image: var(--ghost-mask);
}
.tile, .tile-ghost { width: 96px; height: 96px; border: 1px solid var(--border); border-radius: var(--radius-tile); }
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 7px;
  background: var(--grad-tile);
  color: var(--text-muted);
  box-shadow: var(--shadow-card), var(--inset-highlight);
  text-align: center;
  text-decoration: none;
  transition: transform .25s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-card-hover), var(--inset-highlight); color: var(--text); }
.tile:focus-visible { border-radius: var(--radius-tile); }
.tile svg { width: 28px; height: 28px; }
.tile-name { font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.tile-ghost { background: var(--surface); color: var(--text); }
.trust { position: relative; z-index: 3; margin: 14px 0 0; }
.trust li { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 22px; padding-inline: 22px; font-size: 13.5px; color: var(--text-muted); }
.trust li + li::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 14px; background: var(--border); color: var(--text); transform: translateY(-50%); }
.trust svg { width: 16px; height: 16px; }
.trust strong { font-weight: 500; color: var(--text); }
.preview-hero .glow-drift { animation: none; }
.topbar-preview .topbar-inner { max-width: var(--shell); gap: 32px; }
.topbar-preview .mainnav ul { gap: 30px; }
.topbar-preview .header-tools { margin-inline-start: 4px; }
.preview-language:not([open]) .language-list { display: none; }
.preview-language summary { list-style: none; }
.preview-language summary::-webkit-details-marker { display: none; }

/* 陈列长廊与通用标签 */
.tablist { display: flex; gap: 8px; padding: 5px; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
[role="tab"] {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
[role="tab"]:is(:hover, [aria-selected="true"]) { border-color: var(--border-strong); background: var(--bg-panel-2); color: var(--text); }
[role="tab"][aria-disabled="true"] { cursor: default; }
.feature-panel { min-height: 320px; }
.feature-heading { max-width: 60%; margin: 0 0 28px; }
.feature-gallery { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.7fr); gap: clamp(16px, 3vw, 42px); }
.feature-gallery > * { min-width: 0; }
.feature-gallery .tablist { flex-direction: column; align-items: stretch; align-self: start; }
.feature-gallery [role="tab"] { justify-content: flex-start; text-align: start; border-radius: var(--radius-sm); }
.tab-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--accent-dark); }
.feature-gallery [aria-selected="true"]::before {
  content: "";
  position: absolute;
  inset: 5px auto 5px 0;
  width: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: var(--text);
  transform-origin: top;
}
.feature-gallery.is-cycling [aria-selected="true"]::before { animation: tab-progress var(--tab-duration) linear both; }
@keyframes tab-progress { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.feature-detail { border-radius: var(--radius-detail); background: var(--surface); color: var(--text); }
.settings-demo { margin: 22px 0 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-tile); background: var(--grad-panel); color: var(--text); }
.settings-demo figcaption { font-size: .875rem; color: var(--text-muted); }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 8px; border-bottom: 1px solid var(--border); }
.setting-switch { width: 32px; height: 18px; flex-shrink: 0; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--bg-panel-2); color: var(--text); }
.setting-switch::after { content: ""; display: block; width: 12px; height: 12px; border-radius: var(--radius-round); background: var(--surface); color: var(--text); box-shadow: var(--shadow-chip); }
.setting-switch.is-on { background: var(--grad-accent); color: var(--on-accent); }
.setting-switch.is-on::after { margin-inline-start: auto; }

/* 阅读、资源与状态 */
.toc { margin-block: 18px 24px; }
.toc-sticky { position: sticky; top: 0; z-index: 5; }
.toc-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 9px; border: 1px solid var(--border); border-radius: var(--radius-tile); background: var(--surface); color: var(--text); box-shadow: var(--shadow-chip); }
.toc-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--accent-dark); overflow-wrap: anywhere; }
.toc-tabs a:hover { background: var(--bg-panel-2); color: var(--accent-dark); }
.faq-item { margin-block: 10px; border: 1px solid var(--border); border-radius: var(--radius-tile); background: var(--grad-tile); color: var(--text); box-shadow: var(--shadow-chip); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 12px 18px; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; width: 8px; height: 8px; flex-shrink: 0; border-inline-end: 2px solid var(--accent); border-block-end: 2px solid var(--accent); transform: translateY(-2px) rotate(45deg); }
.faq-item[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq-answer { margin: 0 18px; padding-block: 12px 16px; border-top: 1px solid var(--border); color: var(--text-muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { border-block-start: 3px solid var(--border-strong); }
.term-card dl, .term-card dd { margin: 0; }
.term-card dt { font: 400 var(--subhead-size)/1.3 var(--font-display); margin-bottom: 8px; }
.client-card, .post-card { display: flex; flex-direction: column; gap: 12px; }
:is(.client-card, .post-card) :is(h3, p) { margin-bottom: 0; }
.client-card-head, .badge-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.client-actions, .post-path { margin-top: auto; padding-top: 6px; }
.client-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.client-card [data-version] { color: var(--text-muted); font-size: .875rem; }
[data-version]:empty { display: none; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-muted); font-size: .875rem; }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--grad-chip);
  color: var(--text-muted);
  text-align: center;
  font-size: .8125rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.badge-first { border-color: var(--border-strong); background: var(--bg-panel-2); color: var(--accent-dark); }
.badge-recommended { background: var(--bg-panel); color: var(--success-ink); }
.badge-archived { background: var(--bg-panel); color: var(--warn-ink); }
.callout {
  margin: 20px 0;
  padding: 16px clamp(14px, 3vw, 24px);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--grad-panel);
  color: var(--text);
}
.callout > :last-child { margin-bottom: 0; }
.article-download { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-block: 32px; }
.article-download h2 { margin-bottom: 6px; }
.article-download p { margin-bottom: 0; color: var(--text-muted); }
.dl-fab {
  position: fixed;
  z-index: 8;
  inset-inline-end: max(var(--gutter), env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  max-width: calc(100% - var(--gutter) * 2);
}
.has-dl-fab .site-footer { padding-bottom: 90px; }
html.nav-open .dl-fab { visibility: hidden; }

.table-wrap, .prose table, .article-body table, .doc-body table {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-tile); }
.data-table, .prose table, .article-body table, .doc-body table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  color: var(--text);
}
.data-table caption, .prose table caption, .article-body table caption, .doc-body table caption { text-align: start; padding: 10px 14px; color: var(--text-muted); }
:is(.data-table, .prose table, .article-body table, .doc-body table) :is(th, td) {
  min-width: 7em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: normal;
}
:is(.data-table, .prose table, .article-body table, .doc-body table) thead th { background: var(--bg-panel); color: var(--text); }
:is(.prose, .article-body, .doc-body) table:not(.table-wrap table) { display: block; }

/* 静态预览图例 */
.swatches { grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); }
.swatch { margin: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.swatch::before { content: ""; display: block; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--sample, var(--clear)); color: var(--text); }
.swatch figcaption { margin-top: 6px; font-size: .8125rem; overflow-wrap: anywhere; }
.sw-bg { --sample: var(--bg); }
.sw-panel { --sample: var(--bg-panel); }
.sw-panel2 { --sample: var(--bg-panel-2); }
.sw-surface { --sample: var(--surface); }
.sw-border { --sample: var(--border); }
.sw-border-strong { --sample: var(--border-strong); }
.sw-accent { --sample: var(--accent); }
.sw-accent2 { --sample: var(--accent-2); }
.sw-accent-dark { --sample: var(--accent-dark); }
.sw-text { --sample: var(--text); }
.sw-muted { --sample: var(--text-muted); }
.sw-on { --sample: var(--on-accent); }
.sw-success { --sample: var(--success); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-success-ink { --sample: var(--success-ink); }
.sw-warn-ink { --sample: var(--warn-ink); }
.sw-error-ink { --sample: var(--error-ink); }
.sw-violet { --sample: var(--glow-violet); }
.sw-peri { --sample: var(--glow-periwinkle); }
.sw-rose { --sample: var(--glow-rose); }
.sw-halo { --sample: var(--accent-halo); }
.sw-veil { --sample: var(--veil); }
.sw-mask { --sample: var(--mask-on); }
.sw-mask-half { --sample: var(--mask-half); }
.sw-mask-ghost { --sample: var(--mask-ghost); }
.sw-grad { --sample: var(--grad-accent); }
.sw-grad-hover { --sample: var(--grad-accent-hover); }
.sw-grad-chip { --sample: var(--grad-chip); }
.sw-grad-tile { --sample: var(--grad-tile); }
.sw-grad-panel { --sample: var(--grad-panel); }
.type-display { font: 400 var(--title-size)/1.14 var(--font-display); letter-spacing: -.02em; }

@media (max-width: 1080px) {
  .topbar-preview .mainnav { display: none; }
  .topbar-preview .header-tools { margin-inline-start: auto; }
}
@media (max-width: 768px) {
  .hero { min-height: 0; padding: 28px var(--gutter) 24px; }
  .eyebrow { font-size: 12px; }
  .lede { font-size: 15px; }
  .platforms { gap: 6px 16px; }
  .platforms a { min-height: 32px; }
  .facts { gap: 6px; }
  .fact { padding-inline: 9px; }
  .device-wrap { margin-top: 20px; }
  .device { width: min(100%, 544px); height: auto; padding-top: clamp(46px, 15vw, 104px); }
  .field { position: relative; -webkit-mask-image: none; mask-image: none; }
  .row { position: static; transform: none; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .row > li { display: flex; }
  .row-3 { height: 26px; flex-wrap: nowrap; margin: 0; }
  .tile, .tile-ghost { width: clamp(82px, 15vw, 96px); height: auto; min-height: 70px; }
  .tile { gap: 5px; padding: 6px 4px; }
  .tile svg { width: 20px; height: 20px; }
  .tile-name { font-size: 11.5px; }
  .blob-violet { left: 20%; top: 22%; width: 90%; height: 95%; }
  .blob-peri { left: 42%; top: 49%; width: 75%; height: 72%; }
  .blob-rose { left: -28%; top: 55%; width: 80%; height: 70%; }
  .trust { flex-direction: column; align-items: center; gap: 6px; }
  .trust li + li::before { display: none; }
  .feature-heading { max-width: 100%; }
  .feature-gallery { grid-template-columns: minmax(0, 1fr); }
  .feature-gallery .tablist { flex-direction: row; }
  .feature-gallery [role="tab"] { border-radius: var(--radius-pill); }
  .feature-gallery [aria-selected="true"]::before { inset: auto 18px 0; height: 2px; width: auto; transform-origin: left; }
  .feature-gallery.is-cycling [aria-selected="true"]::before { animation-name: tab-progress-inline; }
  .toc-sticky { position: static; }
  .type-display { font-size: var(--title-mobile); }
}
@keyframes tab-progress-inline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 480px) {
  .article-download { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .glow-drift, .feature-gallery.is-cycling [aria-selected="true"]::before { animation: none; }
  .tile { transition: none; }
  .tile:hover { transform: none; }
}
@media (forced-colors: active) {
  .kw { background-image: none; color: inherit; -webkit-text-fill-color: currentColor; }
}