/* 首屏：文案居中，检查窗口由静态字符场承托。 */
.hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  grid-template-rows: 1fr auto auto;
  grid-template-columns: minmax(0, 1fr);
}
.copy { display: grid; align-content: center; justify-items: center; text-align: center; padding-block: 26px 30px; }
.copy > * { min-width: 0; max-width: 100%; }
.hero h1 { margin: 0; font-size: var(--fs-h1); line-height: 1.12; color: var(--text); }
.h1-line { display: block; }
.lede { margin: 16px 0 0; max-width: min(100%, 720px); font-size: 16.5px; line-height: 1.7; color: var(--muted); }
.lede strong { font-weight: 500; color: var(--text); }
.actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px; }
.os-row {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.os-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  padding-inline: 12px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-6);
  font-size: var(--fs-action);
  text-decoration: none;
  transition: border-color var(--ease-ui);
}
.os-chip svg { width: 14px; height: 14px; color: var(--muted); transition: color var(--ease-ui); }
.os-chip:hover { border-color: var(--accent); }
.os-chip:hover svg { color: var(--accent-dark); }
.facts { border-block: 1px solid var(--border); background: var(--bg); color: var(--text); }
.facts-list {
  min-height: 42px;
  margin-block: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  font: 11.5px/1.6 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.facts-list li { display: inline-flex; gap: 10px; align-items: baseline; }
.fk { color: var(--muted); }
.fv { color: var(--text); }

.glyph-field {
  position: relative;
  height: clamp(340px, 45vh, 520px);
  background: var(--panel-2);
  color: var(--text);
  overflow: hidden;
  user-select: none;
}
.glyphs {
  position: absolute;
  width: max-content;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: var(--clear);
  color: var(--field-2);
  font: 13px/22px var(--font-mono);
  letter-spacing: calc(var(--cell) - 0.6em);
  white-space: pre;
}
.glyphs b { font-weight: 400; color: var(--field-1); }
.g-top { top: 8px; left: calc(50% - 80 * var(--cell)); }
.g-left { top: 74px; right: calc(50% + 39 * var(--cell)); }
.g-right { top: 74px; left: calc(50% + 39 * var(--cell)); }
.inspector, .feature-window {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-8);
  box-shadow: var(--shadow-near), var(--shadow-far);
}
.inspector {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(81 * var(--cell)), calc(100% - 2 * var(--gutter)));
  height: 620px;
  display: grid;
  grid-template-rows: 38px 1fr;
  overflow: hidden;
}
.chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 38px;
  padding-inline: 14px;
  background: var(--chrome);
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  border-start-start-radius: var(--r-8);
  border-start-end-radius: var(--r-8);
}
.chrome-dots { display: inline-flex; gap: 7px; }
.chrome-dots i { width: 10px; height: 10px; flex: none; border-radius: var(--r-round); background: var(--dot); color: var(--text); }
.chrome-title { font-size: var(--fs-meta); letter-spacing: 0.01em; }
.inspector-body { display: grid; grid-template-columns: 196px minmax(0, 1fr) 312px; min-height: 0; }
.rail { padding: 14px 10px; background: var(--chrome); color: var(--muted); border-right: 1px solid var(--border); }
.rail-head, .grp-key { font: 10.5px/1.6 var(--font-mono); color: var(--muted); }
.rail-head { padding: 2px 10px 10px; letter-spacing: var(--tracking-label); text-transform: uppercase; }
.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding-inline: 10px;
  border-radius: var(--r-6);
  font-size: var(--fs-action);
  color: var(--muted);
}
.rail-item svg { width: 15px; height: 15px; }
.rail-item.is-current { background: var(--wash); color: var(--text); }
.checklist { padding: 0 20px 20px; min-width: 0; }
.cl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 50px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.cl-title { font-size: 16px; letter-spacing: -0.01em; }
.cl-sub, .pane-crumb { font: 11px/1.6 var(--font-mono); letter-spacing: 0.06em; color: var(--muted); }
.grp + .grp { margin-top: 10px; }
.grp-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding-inline: 10px;
  background: var(--chrome);
  color: var(--text);
  border-radius: var(--r-6);
  font-size: var(--fs-action);
}
.grp-bar svg { width: 12px; height: 12px; color: var(--muted); }
.grp-key { margin-left: auto; letter-spacing: 0.04em; }
.item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  margin-top: 2px;
  padding-inline: 12px 10px;
  border: 1px solid var(--clear);
  border-radius: var(--r-6);
  font-size: var(--fs-action);
  color: var(--text);
}
.ring { width: 14px; height: 14px; border: 1.5px solid var(--dot); border-radius: var(--r-round); }
.item.is-selected { border-color: var(--accent); background: var(--panel-2); color: var(--text); }
.item.is-selected .ring { border-color: var(--accent); }
.val {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding-inline: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-6);
  background: var(--panel);
  color: var(--text);
  font: 11.5px/1.6 var(--font-mono);
}
.tg { position: relative; width: 28px; height: 16px; border-radius: var(--r-round); background: var(--border-2); color: var(--text); }
.tg::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: var(--r-round);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-near);
}
.tg.on { background: var(--text); color: var(--panel); }
.tg.on::after { left: 14px; }
.pane { display: grid; align-content: start; gap: 12px; min-width: 0; padding: 18px; border-left: 1px solid var(--border); }
.pane-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pane-title { font-size: 20px; letter-spacing: -0.01em; }
.pane-status { display: inline-flex; align-items: center; gap: 6px; font: 10.5px/1.6 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pane-status .status-dot { width: 6px; height: 6px; }
.code { margin: 0; padding: 10px 12px; font-size: 12.5px; line-height: 1.75; }
.code .ck { color: var(--accent-dark); }
.pane-note { margin: 0; font-size: var(--fs-action); line-height: 1.65; color: var(--muted); }
.kv { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); font: 11.5px/1.6 var(--font-mono); }
.kv dt, .kv dd { padding-block: 8px; border-top: 1px solid var(--border); }
.kv dt { color: var(--muted); padding-inline-end: 16px; }
.kv dd { margin: 0; text-align: right; }

/* 可复用的标签组，默认可横滑；产品窗在宽屏时使用竖侧栏。 */
.tabs { min-width: 0; }
[role="tablist"] { display: flex; align-items: stretch; gap: 4px; min-width: 0; padding: 6px; overflow-x: auto; overscroll-behavior-inline: contain; }
[role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 10px;
  min-height: var(--touch);
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid var(--clear);
  border-radius: var(--r-6);
  background: var(--clear);
  color: var(--muted);
  white-space: nowrap;
}
[role="tab"] svg { width: 16px; height: 16px; }
[role="tab"]:focus-visible { outline-offset: -3px; }
[role="tab"]:hover:not(:disabled) { background: var(--chrome); color: var(--text); }
[role="tab"][aria-selected="true"] { border-color: var(--accent); background: var(--panel-2); color: var(--accent-dark); }
[role="tabpanel"] { min-width: 0; }
[role="tabpanel"].tab-enter { animation: tab-in var(--ease-ui); }
@keyframes tab-in { from { opacity: 0; } to { opacity: 1; } }

.feature-band { background: var(--panel-2); color: var(--text); }
.feature-grid { display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.feature-grid > [role="tablist"] { flex-direction: column; padding: 14px 10px; border-inline-end: 1px solid var(--border); }
.feature-grid [role="tab"] { justify-content: flex-start; border-bottom: 0; border-inline-start: 2px solid var(--clear); }
.feature-grid [role="tab"][aria-selected="true"] { border-inline-start-color: var(--accent); }
.feature-detail { min-width: 0; min-height: 310px; padding: clamp(18px, 4vw, 46px); }
.feature-detail > p:not(.meta) { max-width: 68ch; }
.code-sample {
  position: relative;
  max-width: 100%;
  background: var(--chrome);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-6);
}
.code-sample pre { margin: 0; padding-block-start: 48px; border: 0; }
.copy-code {
  position: absolute;
  top: 7px;
  right: 7px;
  min-height: 32px;
  padding-inline: 9px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-6);
  background: var(--panel);
  color: var(--text);
  font: var(--fs-meta)/1.5 var(--font-mono);
}
.copy-code:disabled { color: var(--muted); }
.toc-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-width: 0;
  padding: 8px 12px;
  border-block: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.toc-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--touch); }
.toc-tabs.is-sticky { position: sticky; top: 0; z-index: 5; }
.toc-tabs.is-static { position: static; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { list-style: none; position: relative; padding: 14px 30px 14px 0; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; color: var(--accent-dark); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-block: 0 16px; max-width: 70ch; color: var(--muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card dt { font-size: var(--fs-h3); font-family: var(--font-display); }
.term-card dd { margin: 8px 0 0; color: var(--muted); }
.client-card { display: grid; gap: 12px; align-content: start; }
.client-card h3, .client-card p, .post-card p { margin-bottom: 0; }
.client-head, .client-actions, .badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.client-icon { width: 48px; height: 48px; flex-shrink: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: var(--r-6);
  border: 1px solid var(--border);
  background: var(--chrome);
  color: var(--muted);
  font: var(--fs-meta)/1.5 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.badge--lead { background: var(--panel-2); color: var(--accent-dark); }
.badge--archive { background: var(--wash); color: var(--text); }
.badge--recommend::before, .badge--archive::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: var(--r-round);
  background: var(--accent);
  color: var(--text);
}
.badge--archive::before { background: var(--muted); color: var(--panel); }
.post-card { display: grid; align-content: start; gap: 10px; border-top: 2px solid var(--border-2); }
.post-card h3 { margin-bottom: 0; }
.post-card:hover { border-top-color: var(--accent); }
.callout {
  margin: 1.25em 0;
  padding: 16px 20px;
  border-inline-start: 2px solid var(--accent);
  border-radius: var(--r-6);
  background: var(--panel-2);
  color: var(--text);
}
.callout > :last-child { margin-bottom: 0; }
.download-next { margin-block: 36px; }
.download-next h2 { font-size: var(--fs-h3); }
.dl-fab {
  position: fixed;
  z-index: 10;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--touch);
  max-width: calc(100% - 2 * var(--gutter));
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-6);
  background: var(--panel);
  color: var(--text);
  font: var(--fs-action)/1.5 var(--font-mono);
  text-decoration: none;
  box-shadow: var(--shadow-near), var(--shadow-menu);
}
.dl-fab:hover { border-color: var(--accent); color: var(--accent-dark); }
.dl-fab svg { width: 16px; height: 16px; }
.table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.data-table, .prose table, .wrap table, .shell table {
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: start;
}
.table-wrap > .data-table { width: 100%; }
:is(.prose, .wrap, .shell) table:not(.table-wrap > table) {
  display: block;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
:is(.data-table, .prose table, .wrap table, .shell table) :is(th, td) {
  min-width: 7em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: start;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table, .prose table, .wrap table, .shell table) th { background: var(--chrome); color: var(--text); }
:is(.data-table, .prose table, .wrap table, .shell table) caption { padding-block: 8px; text-align: start; color: var(--muted); }

/* 根目录风格样张。 */
.sample-stack { display: grid; gap: 26px; }
.sample-stack > * { min-width: 0; }
.sample-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.sample-display { font: 400 var(--fs-h1)/1.12 var(--font-display); letter-spacing: var(--tracking-title); }
.swatch-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 116px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.swatch-list li { min-width: 0; font: var(--fs-meta)/1.6 var(--font-mono); }
.swatch-list li::before { content: ""; display: block; height: 42px; margin-bottom: 5px; border: 1px solid var(--border); border-radius: var(--r-6); color: var(--text); }
.sw-bg::before { background: var(--bg); }
.sw-panel::before { background: var(--panel); }
.sw-panel2::before { background: var(--panel-2); }
.sw-border::before { background: var(--border); }
.sw-border2::before { background: var(--border-2); }
.sw-accent::before { background: var(--accent); }
.sw-dark::before { background: var(--accent-dark); }
.sw-text::before { background: var(--text); }
.sw-hover::before { background: var(--ink-hover); }
.sw-muted::before { background: var(--muted); }
.sw-faint::before { background: var(--faint); }
.sw-chrome::before { background: var(--chrome); }
.sw-wash::before { background: var(--wash); }
.sw-dot::before { background: var(--dot); }
.sw-field1::before { background: var(--field-1); }
.sw-field2::before { background: var(--field-2); }
.sw-success::before { background: var(--success); }
.sw-warn::before { background: var(--warn); }
.sw-error::before { background: var(--error); }
.sw-clear::before { background: var(--clear); }
.sw-veil::before { background: var(--veil); }
.sw-grad::before { background: var(--grad); }

@media (max-width: 1100px) {
  .inspector-body { grid-template-columns: 172px minmax(0, 1fr) 268px; }
  .facts-list { justify-content: center; padding-block: 6px; }
}
@media (max-width: 860px) {
  .inspector-body, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .rail, .pane { display: none; }
  .feature-grid > [role="tablist"] { flex-direction: row; border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .feature-grid [role="tab"] { border-inline-start: 0; border-bottom: 2px solid var(--clear); }
  .feature-grid [role="tab"][aria-selected="true"] { border-bottom-color: var(--accent); }
}
@media (max-width: 600px) {
  .lede { font-size: var(--fs-body); }
  .actions { flex-direction: column; gap: 16px; }
  .copy .kicker { font-size: 11px; letter-spacing: 0.12em; }
  .glyph-field { height: 360px; }
  .facts-list { letter-spacing: 0.06em; gap: 4px 14px; }
  .checklist { padding-inline: 10px; }
  .item { gap: 6px; padding-inline: 6px; }
  .item .val { padding-inline: 4px; }
}