/* 首页：点阵、三张入口、静态事实条 */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  min-height: calc(100svh - var(--nav-h) - var(--peek));
  display: grid;
  grid-template-rows: 1fr auto;
  background: linear-gradient(180deg,var(--bg) 0%,var(--bg) 30%,var(--bg-panel) 100%);
  color: var(--text);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle,var(--border) 1px,var(--mask-off) 1.4px);
  background-size: 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 76%,var(--mask-on) 0%,var(--mask-off) 74%);
  mask-image: radial-gradient(ellipse 62% 60% at 50% 76%,var(--mask-on) 0%,var(--mask-off) 74%);
}
.hero__main { align-self: center; padding-block: 40px 36px; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 30px;
  padding: 3px 14px 3px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
}
.eyebrow b { color: var(--text); font-weight: 600; }
.eyebrow__dot { position: relative; width: 8px; height: 8px; flex-shrink: 0; border-radius: var(--r-dot); background: var(--accent); }
.eyebrow__dot::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-dot); background: var(--accent); animation: badge-breathe 2.4s var(--ease) infinite; }
@keyframes badge-breathe {
  0% { transform: scale(1); opacity: .55; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
.hero__title {
  margin: 22px auto 0;
  font-size: var(--size-hero);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.hero__title > span { display: block; }
.hero__lede { margin: 18px auto 0; max-width: 620px; font-size: 17px; line-height: 1.65; color: var(--text-muted); }
.hero__lede strong { color: var(--text); font-weight: 600; }
.cta { margin-top: 26px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.platforms, .badge-row {
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.platforms { margin: 22px 0 0; }
.platforms__lead { font: 12px var(--font-mono); color: var(--text-muted); letter-spacing: .02em; margin-inline-end: 6px; }
.plat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.plat svg { width: 14px; height: 14px; display: block; }
.plat:hover { color: var(--accent-dark); border-color: var(--border-strong); }
.entries { margin-top: 40px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; text-align: left; }
.entry {
  position: relative;
  display: block;
  min-width: 0;
  height: 228px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: linear-gradient(180deg,var(--bg-panel),var(--bg));
  color: var(--text);
  transition: transform .22s var(--ease),box-shadow .22s var(--ease),border-color .22s var(--ease);
}
.entry:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.entry__copy { position: relative; z-index: 2; width: 44%; height: 100%; display: flex; flex-direction: column; }
.entry__title { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.015em; text-wrap: wrap; }
.entry__desc { margin: 8px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.entry__go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent-dark); }
.entry__go i { font-style: normal; transition: transform .2s var(--ease); }
.entry:hover .entry__go i { transform: translateX(3px); }
.entry__art { position: absolute; right: 18px; top: 26px; bottom: -18px; width: 47%; z-index: 1; }

.win, .code {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-float);
}
.win__bar, .code__bar, .stage-window__bar { display: flex; flex-shrink: 0; align-items: center; gap: 4px; }
.win__bar {
  height: 22px;
  padding-inline: 8px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--bg-panel);
  color: var(--text-muted);
}
.win__bar i, .code__bar i, .stage-window__bar i { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-dot); background: var(--border-strong); }
.win__name { margin-inline-start: 6px; font-size: 8.5px; font-weight: 600; letter-spacing: .01em; }
.win__body { flex: 1; display: grid; grid-template-columns: 46px minmax(0,1fr); min-height: 0; }
.win__side {
  margin: 0;
  padding: 8px 5px;
  list-style: none;
  border-right: 1px solid var(--border);
  border-radius: 0 0 0 var(--r-card);
  background: var(--bg-panel);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.win__side li { padding: 4px 6px; border-radius: var(--r-mini); font-size: 9.5px; line-height: 1.3; }
.win__side .is-on { background: var(--bg-panel-2); color: var(--text); font-weight: 600; }
.win__main { min-width: 0; padding: 10px 8px 0; }
.win__head { margin-bottom: 4px; font-size: 9.5px; font-weight: 700; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 30px; border-bottom: 1px solid var(--bg-panel-2); font-size: 9.5px; line-height: 1.25; }
.toggle { position: relative; width: 20px; height: 11px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--border-strong); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 7px; height: 7px; border-radius: var(--r-dot); background: var(--bg); box-shadow: var(--shadow-xs); }
.toggle.is-on { background: var(--accent); }
.toggle.is-on::after { transform: translateX(9px); }
.floatchip {
  position: absolute;
  right: -12px;
  bottom: 28px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding-inline: 8px 11px;
  border-radius: var(--r-btn);
  background: var(--text);
  color: var(--on-accent);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-chip);
}
.floatchip__box { width: 14px; height: 14px; flex-shrink: 0; border-radius: var(--r-check); background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 9px; line-height: 1; }

.phone {
  position: absolute;
  inset-block: 0;
  right: 22px;
  width: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 9px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-phone);
  box-shadow: var(--shadow-float);
}
.phone__island { width: 34px; height: 7px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--text); }
.phone__head { margin-top: 10px; font-size: 9.5px; font-weight: 700; letter-spacing: -.005em; }
.power {
  margin-top: 16px;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--r-dot);
  display: grid;
  place-items: center;
  background: linear-gradient(160deg,var(--accent),var(--accent-dark));
  color: var(--on-accent);
  box-shadow: 0 0 0 6px var(--accent-ring),0 0 0 12px var(--accent-ring-2);
}
.power svg { width: 24px; height: 24px; }
.phone__hint { margin-top: 16px; font-size: 9.5px; color: var(--text-muted); }
.phone__label { margin-top: auto; align-self: flex-start; margin-bottom: 4px; font-size: 9px; color: var(--text-muted); }
.seg { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; padding: 2px; background: var(--bg-panel-2); color: var(--text-muted); border-radius: var(--r-btn); }
.seg span { height: 20px; display: grid; place-items: center; border-radius: var(--r-mini); font-size: 9.5px; }
.seg .is-on { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow-xs); }

.entry--core { background: linear-gradient(180deg,var(--stage-panel),var(--stage)); color: var(--stage-text); border-color: var(--stage-line); }
.entry--core:hover { border-color: var(--stage-line); box-shadow: var(--shadow-stage); }
.entry--core .entry__desc { color: var(--stage-muted); }
.entry--core .entry__go { color: var(--accent-light); }
.code { background: var(--stage-panel); color: var(--stage-text); border-color: var(--stage-line); box-shadow: var(--shadow-stage); }
.code__bar { height: 24px; padding-inline: 9px; border-bottom: 1px solid var(--stage-line); }
.code__bar i, .stage-window__bar i { background: var(--text-muted); }
.code__file { margin-inline-start: 6px; font: 9.5px var(--font-mono); color: var(--stage-muted); }
.yaml {
  margin: 0;
  padding: 10px 6px;
  border: 0;
  background: var(--stage-panel);
  color: var(--stage-text);
  font: 10.5px/1.72 var(--font-mono);
  white-space: pre;
  counter-reset: config-line;
}
.yaml > span { display: block; }
.yaml > span::before {
  counter-increment: config-line;
  content: counter(config-line);
  display: inline-block;
  width: 14px;
  margin-inline-end: 8px;
  text-align: right;
  color: var(--stage-muted);
}
.yaml .k { color: var(--stage-muted); }
.yaml .v { color: var(--stage-text); }
.yaml .c { color: var(--accent-light); }

.factbar { border-top: 1px solid var(--border); background: var(--bg); color: var(--text-muted); }
.factbar ul {
  min-height: 44px;
  margin-block: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font: 12px/1.6 var(--font-mono);
  letter-spacing: .01em;
}
.factbar li { display: inline-flex; align-items: center; }
.factbar li + li::before { content: ""; width: 1px; height: 12px; flex-shrink: 0; background: var(--border-strong); margin-inline: 20px; }
.factbar b { color: var(--text); font-weight: 500; margin-inline-end: 6px; }

/* 通用页签与黑底演示台 */
.tabs { min-width: 0; }
.tablist, .toc-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tab, .toc-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}
.tab:hover, .toc-tabs a:hover { background: var(--bg-panel); color: var(--text); }
.tab[aria-selected="true"] { background: var(--bg-panel-2); color: var(--text); }
.tab[aria-selected="true"]::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-dot); background: var(--accent); }
.tab-panel { margin-top: 18px; }

.stage {
  background: var(--stage);
  color: var(--stage-text);
  padding-block: 76px 120px;
}
.stage__title { margin: 0; text-align: center; font-weight: 900; font-size: var(--size-h2); line-height: 1.2; letter-spacing: -.025em; }
.stage__sub { margin: 14px auto 0; max-width: 560px; text-align: center; font-size: 15.5px; color: var(--stage-muted); }
.stage-demo { margin-top: 36px; }
.stage-demo__grid { display: grid; grid-template-columns: minmax(0,38fr) minmax(0,62fr); gap: 32px; }
.stage-demo__grid > * { min-width: 0; }
.stage-tabs { display: flex; flex-direction: column; border-top: 1px solid var(--stage-line); }
.stage-tab {
  position: relative;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid var(--stage-line);
  background: var(--stage);
  color: var(--stage-text);
  text-align: left;
}
.stage-tab strong, .stage-tab small { display: block; }
.stage-tab small { color: var(--stage-muted); font-size: 13px; }
.stage-tab:hover, .stage-tab[aria-selected="true"] { background: var(--stage-panel); color: var(--stage-text); }
.stage-tab[aria-selected="true"]::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--accent); }
.is-cycling .stage-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--accent-light);
  transform-origin: left;
  animation: stage-timer var(--tab-cycle) linear both;
}
@keyframes stage-timer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.stage-cycle { margin-top: 12px; }
.stage-window {
  position: relative;
  min-width: 0;
  min-height: 280px;
  border: 1px solid var(--stage-line);
  border-radius: var(--r-card);
  background: var(--stage-panel);
  color: var(--stage-text);
  box-shadow: var(--shadow-stage);
}
.stage-window__bar { min-height: 42px; padding-inline: 16px; gap: 6px; border-bottom: 1px solid var(--stage-line); font: 13px/1.4 var(--font-mono); }
.stage-window__bar i + span { margin-inline-start: 7px; }
.stage-window pre { margin: 0; padding: 22px 16px 42px; border: 0; background: var(--stage-panel); color: var(--stage-text); }
.stage-window__chip {
  position: absolute;
  right: 12px;
  bottom: -12px;
  max-width: calc(100% - 24px);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-float);
}
.stage-detail { margin: 28px 0 0; color: var(--stage-muted); }

/* 文档、下载卡、资讯 */
.toc-tabs { padding-block: 10px; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.toc-tabs--sticky { position: sticky; top: calc(var(--nav-h) + 1px); z-index: 5; }
.faq-stack, .faq-picks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.faq-item, .faq-picks li { border-bottom: 1px solid var(--border); }
.faq-item summary, .faq-picks a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding-block: 12px;
  list-style: none;
  font-weight: 700;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary::after, .faq-picks a span:last-child { color: var(--accent-dark); flex-shrink: 0; }
.faq-item > :not(summary) { color: var(--text-muted); }
.faq-picks a:hover { color: var(--accent-dark); }
.term-card { border-top: 2px solid var(--border-strong); }
.term-card dt { font: 800 18px/1.35 var(--font-display); }
.term-card dd { margin: 8px 0 0; color: var(--text-muted); }
.client-card { box-shadow: var(--shadow-xs); }
.client-card__head, .client-card__actions, .post-card__meta, .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.client-card__head { margin-bottom: 10px; }
.client-card__head h3 { margin: 0; }
.client-card__icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-card__version:empty { display: none; }
.client-card__version, .post-card time { font: 12px/1.5 var(--font-mono); color: var(--text-muted); }
.post-card { display: flex; flex-direction: column; gap: 10px; }
.post-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-float); }
.post-card h3, .post-card p { margin: 0; }
.post-card h3 a:hover { text-decoration: underline; text-underline-offset: .2em; }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-dot); flex-shrink: 0; background: var(--border-strong); }
.badge--lead, .badge--recommended { color: var(--accent-dark); }
.badge--lead::before, .badge--recommended::before { background: var(--accent); }
.badge--archived::before { background: var(--warn); }
.badge--success::before { background: var(--success); }
.badge--error::before { background: var(--error); }
.callout {
  margin: 20px 0;
  padding: 14px 18px;
  border-inline-start: 2px solid var(--accent);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  background: var(--bg-panel);
  color: var(--text);
}
.callout > :last-child { margin-bottom: 0; }
.article-download { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.article-download__copy { flex: 1 1 260px; min-width: 0; }
.article-download__copy > :last-child { margin-bottom: 0; }
.dl-fab {
  position: fixed;
  z-index: 15;
  right: max(var(--gutter),env(safe-area-inset-right));
  bottom: max(16px,env(safe-area-inset-bottom));
  max-width: calc(100% - var(--gutter) * 2);
  box-shadow: var(--shadow-float);
}
.has-dl-fab .site-footer { padding-bottom: 84px; }

.table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; }
.data-table, .prose table, .article-body table, .doc-body table { border-collapse: collapse; font-size: 14px; }
.data-table { width: 100%; }
.prose table, .article-body table, .doc-body table, .data-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
.table-wrap table { display: table; width: 100%; overflow: visible; }
:is(.data-table,.prose table,.article-body table,.doc-body table) :is(th,td) {
  min-width: 7em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table,.prose table,.article-body table,.doc-body table) th { background: var(--bg-panel); color: var(--text); }
:is(.data-table,.prose table,.article-body table,.doc-body table) td code { overflow-wrap: anywhere; }
.data-table caption { padding-bottom: 8px; color: var(--text-muted); text-align: start; }

/* 仅设计预览使用的色票 */
.swatches { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,136px),1fr)); gap: 12px; padding: 0; list-style: none; }
.swatches li { min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-card); font-size: 12px; }
.swatches i { display: block; height: 36px; margin-bottom: 5px; border: 1px solid var(--border); border-radius: var(--r-mini); background: var(--swatch,var(--bg)); }
.swatches [data-tone="bg-panel"] { --swatch: var(--bg-panel); }
.swatches [data-tone="bg-panel-2"] { --swatch: var(--bg-panel-2); }
.swatches [data-tone="border"] { --swatch: var(--border); }
.swatches [data-tone="border-strong"] { --swatch: var(--border-strong); }
.swatches [data-tone="text"] { --swatch: var(--text); }
.swatches [data-tone="text-muted"] { --swatch: var(--text-muted); }
.swatches [data-tone="accent"] { --swatch: var(--accent); }
.swatches [data-tone="accent-dark"] { --swatch: var(--accent-dark); }
.swatches [data-tone="accent-light"] { --swatch: var(--accent-light); }
.swatches [data-tone="on-accent"] { --swatch: var(--on-accent); }
.swatches [data-tone="accent-ring"] { --swatch: var(--accent-ring); }
.swatches [data-tone="accent-ring-2"] { --swatch: var(--accent-ring-2); }
.swatches [data-tone="success"] { --swatch: var(--success); }
.swatches [data-tone="warn"] { --swatch: var(--warn); }
.swatches [data-tone="error"] { --swatch: var(--error); }
.swatches [data-tone="stage"] { --swatch: var(--stage); }
.swatches [data-tone="stage-panel"] { --swatch: var(--stage-panel); }
.swatches [data-tone="stage-line"] { --swatch: var(--stage-line); }
.swatches [data-tone="stage-text"] { --swatch: var(--stage-text); }
.swatches [data-tone="stage-muted"] { --swatch: var(--stage-muted); }
.swatches [data-tone="mask-on"] { --swatch: var(--mask-on); }
.swatches [data-tone="mask-off"] { --swatch: var(--mask-off); }
.swatches [data-tone="veil"] { --swatch: var(--veil); }

@media (max-width: 1080px) {
  .hero { min-height: auto; }
  .entries { grid-template-columns: minmax(0,1fr); max-width: 460px; margin-inline: auto; gap: 36px; }
}
@media (max-width: 768px) {
  .hero__title { font-size: var(--size-display); letter-spacing: -.02em; }
  .stage { padding-block: 52px 64px; }
  .stage-demo__grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .stage-window { min-height: 210px; }
}
@media (max-width: 640px) {
  .hero__lede { font-size: 15.5px; }
  .cta .btn { flex: 1 1 100%; }
  .platforms__lead { flex-basis: 100%; margin: 0 0 2px; }
  .entry { padding: 20px 14px; }
  .entry__copy { width: 43%; }
  .entry__art { right: 12px; width: 49%; }
  .phone { right: 0; max-width: 100%; }
  .floatchip { right: -5px; }
  .win__body { grid-template-columns: 34px minmax(0,1fr); }
  .win__side { padding-inline: 3px; }
  .win__side li { padding-inline: 3px; }
  .win__main { padding-inline: 5px; }
  .yaml { font-size: 9px; }
  .yaml > span::before { width: 8px; margin-inline-end: 4px; }
  .factbar ul { padding-block: 12px; row-gap: 6px; }
  .factbar li + li::before { margin-inline: 10px; }
  .toc-tabs--sticky { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .entry:hover, .entry:hover .entry__go i { transform: none; }
}