/* 首页：引言、分屏画布、启动核对窗 */
.lede { background: var(--c-lilac); color: var(--c-ink); }
.lede .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.lede-text { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; line-height: 1.5; color: var(--c-muted); }
.lede-text b { color: var(--c-ink); font-weight: 800; }
.lede-tag {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--c-ink);
  color: var(--c-paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.lede-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: var(--bw) solid var(--c-ink);
  border-radius: var(--r-md);
  background: var(--c-paper);
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform var(--ease-tap);
}
.lede-link:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-btn-press); }
.stage { position: relative; display: flow-root; background: var(--c-peach); color: var(--c-ink); padding-top: 40px; }
.stage-poster { position: absolute; inset: 0 0 auto; height: 440px; overflow: hidden; overflow-x: clip; pointer-events: none; }
.stage-poster-word {
  position: absolute;
  right: -120px;
  top: 178px;
  color: var(--c-peach-shade);
  font: var(--weight-title) 200px/1 var(--font-display);
  letter-spacing: -.05em;
  white-space: nowrap;
}
.stage-poster img { position: absolute; inset: 0 0 0 auto; width: 45%; height: 100%; object-fit: cover; opacity: .45; }
.stage-copy { position: relative; z-index: 1; max-width: 680px; }
.stage-title { margin: 0; font-size: var(--size-stage-title); line-height: 1.08; letter-spacing: -.035em; text-wrap: wrap; }
.stage-title-line { display: block; }
.ink-mark { padding: 0 .06em; background: var(--fill-mark); color: var(--c-ink); }
.stage-lead { margin: 16px 0 0; max-width: 640px; font-size: 17px; line-height: 1.6; color: var(--c-muted); }
.stage-lead strong { color: var(--c-ink); }
.stage-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.stage-actions .btn { line-height: 1; }
.platrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.platrow-label { margin-right: 6px; font-size: 13px; font-weight: 600; color: var(--c-muted); }
.plat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--line-ink);
  border-radius: var(--r-md);
  background: var(--c-paper-veil);
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 600;
}
.plat svg { width: 15px; height: 15px; flex-shrink: 0; }
.plat:hover { border-color: var(--c-ink); background: var(--c-paper); color: var(--c-ink); }

.stage-device { position: relative; z-index: 2; margin-top: 34px; margin-bottom: calc(-1 * var(--win-overlap)); }
.bootwin {
  position: relative;
  border: var(--bw) solid var(--c-ink);
  border-radius: var(--r-lg);
  background: var(--c-paper);
  color: var(--c-ink);
  box-shadow: var(--shadow-win);
}
.bootwin-bar {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  height: 42px;
  padding-inline: 14px;
  background: var(--c-chrome);
  color: var(--c-ink);
  border-bottom: 1px solid var(--line-soft);
  border-radius: calc(var(--r-lg) - var(--bw)) calc(var(--r-lg) - var(--bw)) 0 0;
}
.lights { display: flex; gap: 7px; }
.light { flex-shrink: 0; width: 11px; height: 11px; border-radius: var(--r-round); color: var(--c-ink); }
.light-r { background: var(--c-err); }
.light-y { background: var(--c-warn); }
.light-g { background: var(--c-ok); }
.bootwin-title { font: 12.5px/1.6 var(--font-mono); color: var(--c-muted); letter-spacing: .01em; }
.bootwin-tools { justify-self: end; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tool {
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--c-paper);
  color: var(--c-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.tool-gear { width: 28px; height: 26px; display: grid; place-items: center; color: var(--c-muted); }
.tool-gear svg { width: 17px; height: 17px; }
.bootwin-body { display: grid; grid-template-columns: 26% minmax(0,1fr); min-height: 290px; }
.bootwin-side { min-width: 0; padding: 16px 12px; border-right: 1px solid var(--line-soft); }
.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding-inline: 10px;
  background: var(--c-field);
  color: var(--c-muted);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.side-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.side-list { margin: 10px 0 0; padding: 0; list-style: none; }
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding-inline: 10px;
  border-radius: var(--r-sm);
  font: 13px/1.6 var(--font-mono);
}
.side-item svg { flex: none; width: 16px; height: 16px; color: var(--c-muted); }
.side-item.is-current { background: var(--c-lilac); color: var(--c-ink); font-weight: 700; }
.side-item.is-current svg { color: var(--c-ink); }
.side-item.is-new { font-family: var(--font-body); color: var(--c-muted); }
.bootwin-main { position: relative; min-width: 0; padding: 20px 28px; }
.main-crumb { font: 11.5px/1.6 var(--font-mono); color: var(--c-muted); }
.main-title { margin-top: 2px; font: 800 19px/1.25 var(--font-display); letter-spacing: -.02em; }
.main-sub { margin-top: 3px; font-size: 13px; color: var(--c-muted); }
.checktab { width: 520px; max-width: 100%; margin-top: 12px; }
.ck-row { display: grid; grid-template-columns: 190px 140px 190px; align-items: center; min-height: 32px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.ck-row.is-head { min-height: 26px; border-top: 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; font-weight: 600; color: var(--c-muted); }
.ck-row.is-head + .ck-row { border-top: 0; }
.ck-key { display: flex; align-items: center; gap: 9px; min-width: 0; overflow-wrap: anywhere; font: 12.5px/1.4 var(--font-mono); }
.ck-box {
  flex: none;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--c-ink);
  border-radius: var(--r-xs);
  color: var(--c-paper);
}
.ck-box.is-on { background: var(--c-ink); }
.ck-box svg { width: 9px; height: 9px; }
.ck-val { min-width: 0; }
.ck-val code { padding: 2px 7px; font-size: 12px; }
.ck-note { color: var(--c-muted); }
.hl { padding-inline: 2px; background: var(--fill-note); color: var(--c-ink); }

.logcard {
  position: absolute;
  top: 16px;
  right: -38px;
  width: 292px;
  padding: 14px;
  background: var(--c-paper);
  color: var(--c-text);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
}
.logcard-head { display: flex; align-items: center; gap: 9px; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: var(--r-round); }
.logcard-tag { padding: 2px 8px; border-radius: var(--r-sm); background: var(--c-lilac); color: var(--c-ink); font-size: 12px; font-weight: 700; }
.logcard-meta { margin-left: auto; font: 11.5px/1.6 var(--font-mono); color: var(--c-muted); }
.logcard-body { margin-top: 10px; font: 11.5px/1.6 var(--font-mono); overflow-wrap: anywhere; }
.logline { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; padding-block: 6px; border-top: 1px dashed var(--line-soft); }
.loglevel { font-weight: 700; color: var(--c-ok-ink); }
.logcard-reply {
  display: flex;
  align-items: center;
  height: 32px;
  margin-top: 8px;
  padding-inline: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--c-field);
  color: var(--c-muted);
  font-size: 12px;
}
.modules { position: relative; background: var(--c-paper); color: var(--c-text); padding-top: calc(var(--win-overlap) + 100px); padding-bottom: 110px; }
.modules-title { margin: 10px 0 12px; font-size: 32px; letter-spacing: -.03em; text-wrap: wrap; }
.modules-lead { margin: 0; max-width: 620px; font-size: 17px; color: var(--c-muted); }

/* 模块浏览器与通用标签页 */
.tabset { min-width: 0; }
.module-browser {
  display: grid;
  grid-template-columns: minmax(185px, 26%) minmax(0,1fr);
  gap: 0;
  margin-top: 30px;
  padding: 0;
}
[role="tablist"] { display: flex; align-items: center; gap: 6px; padding: 6px; max-width: 100%; overflow-x: auto; }
[role="tab"] {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line-ink);
  border-radius: var(--r-md);
  background: var(--c-paper);
  color: var(--c-ink);
  font-weight: 700;
  text-align: left;
}
[role="tab"]:hover { background: var(--c-field); color: var(--c-ink); }
[role="tab"][aria-selected="true"] { background: var(--c-lilac); color: var(--c-ink); border-color: var(--c-ink); }
[role="tab"] svg { width: 16px; height: 16px; flex-shrink: 0; }
[role="tabpanel"] { min-width: 0; }
.module-browser [role="tablist"] { flex-direction: column; align-items: stretch; background: var(--c-paper); color: var(--c-ink); border-right: 1px solid var(--line-soft); border-radius: var(--r-md) 0 0 var(--r-md); }
.module-browser [role="tab"] { justify-content: flex-start; border-color: var(--c-clear); border-inline-start: 4px solid var(--c-clear); }
.module-browser [role="tab"][aria-selected="true"] { border-inline-start-color: var(--c-ink); }
.module-page { min-width: 0; }
.module-detail { padding: clamp(16px, 4vw, 40px); }
.module-detail p { max-width: 70ch; }
.module-detail pre { margin-block: 20px; }
.tab-progress { height: 2px; margin-inline: 8px; background: var(--line-soft); color: var(--c-ink); }
.tab-progress::after { content: ""; display: block; height: 100%; background: var(--c-ink); color: var(--c-paper); transform: scaleX(0); transform-origin: left; }
.tab-progress.is-running::after { animation: tab-fill var(--tab-cycle) linear forwards; }
@keyframes tab-fill { to { transform: scaleX(1); } }
.tab-pause { margin: 0 0 16px 16px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line-ink); border-radius: var(--r-sm); background: var(--c-paper); color: var(--c-ink); font-size: 14px; }

/* 长文与内容卡 */
.toc-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 8px 5px;
  overflow-x: auto;
  background: var(--c-paper);
  color: var(--c-ink);
  border-block: 1px solid var(--line-soft);
}
.toc-tabs.is-static { position: static; }
.toc-tabs a {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--line-ink);
  border-radius: var(--r-md);
  background: var(--c-field);
  color: var(--c-ink);
}
.toc-tabs a:hover { border-color: var(--c-ink); }
.toc-tabs ~ section[id] { scroll-margin-top: 82px; }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item summary { padding: 14px 8px; min-height: 44px; font-weight: 700; }
.faq-answer { padding: 0 8px 18px; color: var(--c-muted); }
.term-card { border-top-width: 4px; }
.client-card { display: flex; flex-direction: column; gap: 14px; }
.client-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.client-head > * { min-width: 0; }
.client-head h3 { margin: 0; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-card p, .post-card p { color: var(--c-muted); }
.client-actions { margin-top: auto; }
.post-card { display: grid; gap: 12px; align-content: start; }
.post-card > * { min-width: 0; }
.post-card h3, .post-card p { margin: 0; }
.post-card h3 a:hover { text-decoration: underline; text-underline-offset: .16em; }
.post-meta { font-size: 13px; color: var(--c-muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--line-ink);
  border-radius: var(--r-sm);
  background: var(--c-paper);
  color: var(--c-ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.badge--first { background: var(--c-ink); color: var(--c-paper); }
.badge--first .dot { background: var(--c-paper); color: var(--c-ink); }
.badge--recommended { background: var(--c-lilac); color: var(--c-ink); }
.badge--archived { background: var(--c-field); color: var(--c-muted); border-style: dashed; }
.callout {
  margin: 1.25rem 0;
  padding: 14px 18px;
  border-inline-start: 4px solid var(--c-ink);
  border-radius: var(--r-sm);
  background: var(--c-lilac);
  color: var(--c-ink);
}
.article-download { margin-top: 36px; box-shadow: var(--shadow-hard); }
.dl-fab {
  position: fixed;
  z-index: 10;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  gap: 8px;
}
.table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table, .prose table, .doc-body table { border-collapse: collapse; text-align: start; }
.data-table { width: 100%; }
:is(.data-table,.prose table,.doc-body table) :is(th,td) {
  min-width: 7em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table,.prose table,.doc-body table) th { background: var(--c-field); color: var(--c-ink); }
:is(.data-table,.prose table,.doc-body table) caption { padding-block: 8px; color: var(--c-muted); text-align: start; }
.prose table, .doc-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; }

/* 预览稿图例 */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 148px),1fr)); gap: 12px; margin-block: 24px 0; }
.swatch-grid > div { min-width: 0; padding: 8px; border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--c-paper); color: var(--c-ink); }
.swatch-grid dt { margin-bottom: 6px; }
.swatch-grid dd { margin: 0; min-height: 32px; border: 1px solid var(--line-ink); border-radius: var(--r-xs); background: var(--sample); color: var(--c-ink); }
.sw-peach { --sample: var(--c-peach); }
.sw-paper { --sample: var(--c-paper); }
.sw-lilac { --sample: var(--c-lilac); }
.sw-ink { --sample: var(--c-ink); }
.sw-text { --sample: var(--c-text); }
.sw-coral { --sample: var(--c-coral); }
.sw-deep { --sample: var(--c-coral-deep); }
.sw-muted { --sample: var(--c-muted); }
.sw-ok { --sample: var(--c-ok); }
.sw-ok-ink { --sample: var(--c-ok-ink); }
.sw-warn { --sample: var(--c-warn); }
.sw-err { --sample: var(--c-err); }
.sw-line { --sample: var(--line-soft); }
.sw-line-ink { --sample: var(--line-ink); }
.sw-chrome { --sample: var(--c-chrome); }
.sw-field { --sample: var(--c-field); }
.sw-shade { --sample: var(--c-peach-shade); }
.sw-paper-veil { --sample: var(--c-paper-veil); }
.sw-hl { --sample: var(--hl-coral); }
.sw-veil { --sample: var(--c-veil); }
.sw-near { --sample: var(--c-shadow-near); }
.sw-far { --sample: var(--c-shadow-far); }
.sw-clear { --sample: var(--c-clear); }
.sw-mark { --sample: var(--fill-mark); }
.sw-note { --sample: var(--fill-note); }
.type-h1 { font: var(--weight-title) var(--size-h1)/1.15 var(--font-display); letter-spacing: -.02em; }

@media (max-width: 1320px) {
  .stage-poster-word { display: none; }
  .logcard { right: 16px; width: 268px; }
}
@media (max-width: 1160px) {
  .logcard { display: none; }
}
@media (max-width: 900px) {
  :root { --win-overlap: 100px; }
  .lede .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lede-text { flex-wrap: wrap; }
  .bootwin-tools .tool, .bootwin-side, .ck-note { display: none; }
  .bootwin-body { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .checktab { width: 100%; }
  .ck-row { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); column-gap: 6px; }
}
@media (max-width: 768px) {
  .stage-title, .type-h1 { font-size: var(--size-h1-small); }
  .stage-title { line-height: 1.12; letter-spacing: -.02em; }
  .module-browser { grid-template-columns: minmax(0,1fr); }
  .module-browser [role="tablist"] { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line-soft); border-radius: var(--r-md) var(--r-md) 0 0; }
  .module-browser [role="tab"] { justify-content: center; }
}
@media (max-width: 560px) {
  .stage-poster { display: none; }
  .stage-actions { flex-direction: column; }
  .platrow { justify-content: center; }
  .plat { padding-inline: 9px; }
  .bootwin-title { display: none; }
  .bootwin-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bootwin-main { padding-inline: 12px; }
  .ck-key { gap: 5px; }
  .ck-val code { padding-inline: 3px; }
  .modules-title { font-size: 24px; }
  .dl-fab { max-width: calc(100% - 36px); }
}
@media (prefers-reduced-motion: reduce) {
  .btn:not(.is-hover,.is-pressed):is(:hover,:active), .lede-link:hover { transform: none; }
}