/* 分屏首屏：保留确认稿的尺度与静态命中终态。 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(900px - var(--nav-h) - 64px);
  border-bottom: 1px solid var(--border);
}
.hero-copy {
  padding: 72px 56px 72px max(32px, calc(50vw - 600px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 12px 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12.5px;
}
.tag-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag b { font-weight: var(--weight-medium); color: var(--text); }
.h1 { margin: 26px 0 0; font-size: clamp(30px, 3.3vw, 48px); line-height: 1.14; font-weight: var(--weight-regular); }
.h1 .l1, .h1 .l2 { display: block; }
.h1 .l2 { color: var(--accent); }
.lede { margin: 22px 0 0; max-width: 31em; font-size: 16px; line-height: 1.75; color: var(--text-muted); }
.devices {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  color: var(--text-muted);
  font-size: 13px;
}
.dev { display: inline-flex; align-items: center; gap: 7px; line-height: 1; }
.dev svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round; }
a.dev:hover { color: var(--text); }
.dev-sep { width: 1px; height: 14px; flex-shrink: 0; background: var(--border); }
.pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.pill svg { width: 12px; height: 12px; flex-shrink: 0; fill: currentColor; }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
.hero-canvas {
  position: relative;
  background: var(--bg-panel);
  color: var(--text);
  border-left: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: 56px 40px;
}
.stage { position: relative; width: 560px; max-width: 100%; }
.stage::before, .stage::after { content: ""; position: absolute; left: -100vw; right: -100vw; height: 1px; background: var(--border); }
.stage::before { top: 0; }
.stage::after { bottom: 0; }
.guide-v { position: absolute; top: -100vh; bottom: -100vh; width: 1px; background: var(--border); }
.guide-v.l { left: 0; }
.guide-v.r { right: 0; }
.board {
  position: relative;
  z-index: 1;
  background-color: var(--surface);
  color: var(--text);
  background-image: radial-gradient(circle, var(--bg-panel2) 1.15px, var(--clear) 1.5px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-board);
}
.board svg { display: block; width: 100%; height: auto; }
.hero-screenshot { display: block; width: auto; max-width: 100%; height: auto; max-height: 480px; margin-inline: auto; }
.caption { margin: 14px 0 0; max-width: 100%; font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; color: var(--text-muted); overflow-wrap: anywhere; }
.caption em { font-style: normal; color: var(--text); }
.dv text { font-family: var(--font-mono); }
.dv .lbl { font-size: 11px; fill: var(--text-muted); letter-spacing: .04em; }
.dv .hair { stroke: var(--border); stroke-width: 1; }
.dv .dash { fill: none; stroke: var(--line); stroke-width: var(--stroke); stroke-dasharray: 3 4; }
.dv .hit { fill: none; stroke: var(--accent); stroke-width: var(--stroke); }
.dv .cap, .dv .card { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; }
.dv .cap-t { font-size: 12.5px; fill: var(--text); }
.dv .cap-t .m { fill: var(--text-muted); }
.dv .port, .dv .bar, .dv .dot { fill: var(--accent); }
.dv .rule { font-size: 13px; }
.dv .rule .k, .dv .rule .p { fill: var(--text); }
.dv .rule .v { fill: var(--text-muted); }
.dv .rule .p { font-weight: var(--weight-medium); }
.dv .rule .p-on { fill: var(--accent-dark); font-weight: var(--weight-medium); }
.dv .ep { fill: var(--surface); stroke: var(--line); stroke-width: var(--stroke); }
.dv .ep-on { stroke: var(--accent); }
.dv .ep-t { font-size: 12px; letter-spacing: .06em; fill: var(--text-muted); }
.dv .ep-on-t { fill: var(--accent-dark); font-weight: var(--weight-medium); }
.dv .note { font-size: 11px; fill: var(--text-muted); }
.dv .dot { transform: translate(430px, 244px); }
.next { padding-top: 40px; padding-bottom: 120px; }
.next h2 { margin: 12px 0 0; font-size: 26px; line-height: 1.3; }
.next h2 span, .grid-summary span { color: var(--text-muted); }
.next p { margin: 12px 0 0; max-width: 40em; color: var(--text-muted); font-size: 15px; }

/* Capability cards use two readable columns. */
.capability-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--card-gap); }
.capability-card { grid-column: span 6; }
.capability-card.wide { grid-column: span 6; }
.capability-card.narrow { grid-column: span 6; }
.card-icon { width: 18px; height: 18px; margin-right: 8px; vertical-align: -.15em; fill: none; stroke: currentColor; stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round; }
.capability-card h3 { font-size: 18px; }
.capability-card p { font-size: 14px; line-height: 1.85; }
.rule-detail { display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: center; gap: 20px; }
.wire-art { display: block; width: 100%; height: auto; fill: none; stroke: var(--line); stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round; }
.wire-art text { fill: var(--text-muted); stroke: none; font-family: var(--font-mono); font-size: 11px; }
.protocols { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.protocols .pill { font-family: var(--font-mono); font-size: 11px; }
.field-sketch { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 12px; color: var(--text-muted); }
.field-sketch code { display: block; margin-top: 8px; color: var(--text); }
.config-sections { display: grid; gap: 0; margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.config-sections code { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.config-sections code:last-child { border-bottom: 0; }
.grid-summary { margin-block: 28px 0; font-size: clamp(22px, 2.5vw, 30px); letter-spacing: var(--tracking-cjk); }

/* 通栏事实带 */
.fact-band { background: var(--bg-panel); color: var(--text); border-block: 1px solid var(--border); margin-block: var(--section-space); }
.fact-band > .wrap { border-inline: 1px solid var(--border); padding-top: 56px; padding-bottom: 56px; }
.fact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fact-pill { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; max-width: 100%; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.fact-pill .fact-label { color: var(--text-muted); }
.fact-pill code { font-size: 12px; }

/* 商店按钮：不使用图片徽章。 */
.app-store {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  max-width: 100%;
  padding: 9px 18px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--text);
  box-shadow: var(--shadow-btn);
  transition: background-color var(--duration-fast);
}
.app-store:hover, .app-store.is-hover { background: var(--accent-hover); color: var(--text); }
.app-store:active { border-color: var(--text); }
.app-store svg { width: 25px; height: 25px; fill: currentColor; flex-shrink: 0; }
.app-store-copy { display: block; line-height: 1.25; }
.app-store-copy small { display: block; font-size: 11px; }
.app-store-copy strong { display: block; font-size: 16px; color: inherit; }
.store-guide { border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; background: var(--bg-panel); color: var(--text); }
.store-guide h2 { font-size: 24px; margin-top: 0; }
.store-guide p { color: var(--text-muted); }

/* Tabs 仅在脚本成功初始化后隐藏非活动面板。 */
.tabs { min-width: 0; }
[role="tablist"] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; }
[role="tab"] { min-height: 44px; max-width: 100%; padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-muted); text-align: start; }
[role="tab"]:hover { border-color: var(--text-muted); }
[role="tab"][aria-selected="true"] { border-color: var(--text); color: var(--text); background: var(--bg-panel); }
[role="tabpanel"] { min-width: 0; scroll-margin-top: 24px; }

/* 目录默认随文档滚动；只有覆盖全文的直接父级允许启用吸顶。 */
.toc { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 16px 20px; margin-bottom: 36px; border-block: 1px solid var(--border); background: var(--bg); color: var(--text-muted); }
.toc a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.toc a:hover, .toc a[aria-current="location"] { color: var(--text); }
.toc-sticky { position: sticky; top: 0; z-index: 5; }
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); padding-block: 4px; }
.faq-item summary { position: relative; padding: 20px 36px 20px 0; cursor: pointer; list-style: none; color: var(--text); font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 18px; font-family: var(--font-mono); color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { max-width: 65em; padding-bottom: 20px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.term-card h3 { margin-block: 10px 12px; }
.term-card p { color: var(--text-muted); margin-bottom: 0; }
.term-category { font-size: 12px; font-family: var(--font-mono); color: var(--accent-dark); }
.device-card { display: flex; align-items: flex-start; gap: 20px; }
.device-card > svg { width: 40px; height: 48px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: var(--stroke); stroke-linecap: round; stroke-linejoin: round; }
.device-card h3 { margin-bottom: 8px; }
.device-card .text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-size: 14px; }
.article-card { display: flex; flex-direction: column; }
.article-card h3 { margin-block: 16px 12px; font-size: 20px; }
.article-card h3 a::after { content: " →"; color: var(--text-muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--text-muted); font-size: 12px; }
.article-card p { margin-bottom: 0; }
.callout { margin: 28px 0; padding: 20px 24px; border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); }
.callout p { margin-bottom: 0; color: var(--text-muted); }
.callout strong { color: var(--text); }

/* 截图不锁比例、不设固定高度、不加内边距。 */
.official-shot { width: 100%; max-width: 280px; margin: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--radius-shot); }
.official-shot { border: 1px solid var(--border); border-radius: var(--radius-shot); }
.official-shot figcaption { padding: 12px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.6; background: var(--bg); }
.shot-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }

/* 所有正文后代表格均兜底；单元格不按单字压缩。 */
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: start; }
.prose table, .article-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: start;
}
.data-table th, .data-table td,
.prose table th, .prose table td,
.article-body table th, .article-body table td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}
.data-table th, .prose table th, .article-body table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-medium); }
.data-table td, .prose table td, .article-body table td { color: var(--text-muted); }
.data-table code, .prose table code, .article-body table code { overflow-wrap: anywhere; white-space: normal; }

/* 仅博客文章详情页使用。 */
.dl-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: var(--layer-fab);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 40px);
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-btn);
}
.dl-fab svg { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: var(--stroke); }
.dl-fab:hover { background: var(--accent-hover); color: var(--text); }
.has-article-fab { padding-bottom: 88px; }

/* 预览专用家具，正式截图不使用此占位类。 */
.preview-block { margin-top: var(--section-space); padding-bottom: 20px; }
.preview-block > h2 { margin-block: 0 32px; }
.preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.preview-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.swatch { margin: 0; font-size: 12px; }
.swatch-sample { height: 72px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.swatch code { display: block; }
.swatch-bg { background: var(--bg); color: var(--text); }
.swatch-panel { background: var(--bg-panel); color: var(--text); }
.swatch-panel2 { background: var(--bg-panel2); color: var(--text); }
.swatch-surface { background: var(--surface); color: var(--text); }
.swatch-border { background: var(--border); color: var(--text); }
.swatch-border-strong { background: var(--border-strong); color: var(--text); }
.swatch-line { background: var(--line); color: var(--text); }
.swatch-accent { background: var(--accent); color: var(--text); }
.swatch-hover { background: var(--accent-hover); color: var(--text); }
.swatch-dark { background: var(--accent-dark); color: var(--surface); }
.swatch-soft { background: var(--accent-soft); color: var(--text); }
.swatch-text { background: var(--text); color: var(--surface); }
.swatch-muted { background: var(--text-muted); color: var(--surface); }
.swatch-success { background: var(--success); color: var(--text); }
.swatch-warn { background: var(--warn); color: var(--text); }
.swatch-error { background: var(--error); color: var(--text); }
.preview-shot-placeholder {
  width: 100%;
  aspect-ratio: 750 / 1334;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: var(--radius-shot);
  background: var(--bg-panel2);
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
}
.preview-footer { margin-top: var(--section-space); }
.preview-static-tools { margin-left: auto; }
@media (max-width: 1100px) {
  .hero-copy { padding-right: 40px; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: 48px 24px 40px; }
  .hero-canvas { border-left: 0; border-top: 1px solid var(--border); padding: 40px 16px 64px; }
  .next { padding-top: 36px; padding-bottom: 80px; }
  .capability-card, .capability-card.wide, .capability-card.narrow { grid-column: span 6; }
  .capability-card.wide { grid-column: 1 / -1; }
  .preview-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .h1 { font-size: clamp(24px, 4vw, 30px); }
}
@media (max-width: 640px) {
  .lede { font-size: 15px; }
  .caption { white-space: normal; }
  .hero-copy { padding-inline: var(--gutter); }
  .devices { gap: 14px 18px; }
  .dev-sep { display: none; }
  .fact-row { flex-direction: row; justify-content: center; gap: 8px; }
  .fact-pill { padding: 6px 10px; font-size: 11px; }
  .capability-grid { grid-template-columns: minmax(0, 1fr); }
  .capability-card, .capability-card.wide, .capability-card.narrow { grid-column: auto; }
  .rule-detail { grid-template-columns: minmax(0, 1fr); }
  .rule-detail .wire-art { max-width: 160px; }
  .preview-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-row { flex-direction: column; align-items: center; }
  .official-shot { align-self: center; margin-inline: auto; }
  .fact-band > .wrap { padding-top: 36px; padding-bottom: 36px; }
  .toc { padding-inline: 12px; gap: 4px 16px; }
}