/* 白底规则文档置于石墨色横屏装置内，不模拟客户端界面。 */
.stage {
  margin-top: 36px;
  height: clamp(320px, calc(100vh - 468px), 540px);
  overflow: hidden;
  padding-top: 2px;
}
.ipad {
  position: relative;
  width: 92%;
  height: 780px;
  margin-inline: auto;
  padding: 22px;
  border-radius: var(--r-bezel);
  background: var(--graphite);
  color: var(--on-accent);
  box-shadow: inset 0 0 0 1px var(--graphite-edge), inset 0 2px 0 var(--graphite-highlight), 0 0 0 1px var(--screen-edge), var(--shadow-device);
  text-align: left;
}
.ipad::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: var(--r-pill);
  background: var(--camera);
  box-shadow: 0 0 0 1.5px var(--camera-ring);
}
.screen {
  position: relative;
  height: 100%;
  border-radius: var(--r-screen);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--screen-edge);
}
.doc-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 44px;
  padding-inline: 18px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-screen) var(--r-screen) 0 0;
  background: var(--bg-panel);
  color: var(--text);
}
.doc-dots { display: flex; gap: 7px; }
.doc-dots i { display: block; width: 10px; height: 10px; flex-shrink: 0; border-radius: var(--r-pill); }
.doc-dots .d1 { background: var(--error); }
.doc-dots .d2 { background: var(--warn); }
.doc-dots .d3 { background: var(--success); }
.doc-title { font-family: var(--font-mono); font-size: var(--text-chip); color: var(--text-muted); letter-spacing: .01em; }
.doc-title b { color: var(--text); font-weight: var(--weight-semibold); }
.doc-meta { justify-self: end; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }
.doc { margin: 0; padding: 22px 0 0; list-style: none; counter-reset: ln; font-family: var(--font-mono); font-size: var(--text-code); color: var(--text); }
.row { position: relative; display: grid; grid-template-columns: 1fr var(--code-col) 1fr; align-items: center; height: var(--row-h); margin: 0; }
.lead, .tail { position: relative; height: 100%; }
.code { display: flex; align-items: center; height: 100%; white-space: pre; }
.code::before { counter-increment: ln; content: counter(ln); flex-shrink: 0; width: 26px; margin-right: 24px; text-align: right; color: var(--text-muted); font-size: var(--text-sm); }
.sec { color: var(--text-muted); }
.kw { color: var(--text); font-weight: var(--weight-bold); }
.p { color: var(--text-muted); }
.val { color: var(--text); }
.pol { color: var(--accent); font-weight: var(--weight-semibold); }
.c-blue { --c: var(--accent); --tint: var(--tint-blue); --ink: var(--accent); --ring: var(--ring-blue); }
.c-pink { --c: var(--error); --tint: var(--tint-pink); --ink: var(--ink-pink); --ring: var(--ring-pink); }
.c-violet { --c: var(--violet); --tint: var(--tint-violet); --ink: var(--ink-violet); --ring: var(--ring-violet); }
.c-yellow { --c: var(--warn); --tint: var(--tint-yellow); --ink: var(--ink-yellow); --ring: var(--ring-yellow); }
.row.is-l .lead::before { content: ""; position: absolute; left: 0; right: 12px; top: 50%; height: 1px; background: var(--c); opacity: .7; }
.row.is-l .lead::after { content: ""; position: absolute; right: 8px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: var(--r-pill); background: var(--c); }
.wire { position: relative; flex: 1; height: 1px; margin-left: 14px; background: var(--c); opacity: .7; }
.wire::before { content: ""; position: absolute; left: -4px; top: -2px; width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--c); }
.row.is-r .tail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--c); opacity: .7; }
.note {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 13px;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ring), var(--shadow-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.note code { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.note svg { width: 10px; height: 10px; flex-shrink: 0; fill: var(--c); stroke: var(--c); stroke-width: 1.2; stroke-linejoin: round; }
.note.l { left: -58px; }
.note.r { right: -58px; }

.capability-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.tablist, [role="tablist"].tablist {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  padding: 28px 32px 10px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.tablist [role="tab"] {
  flex-shrink: 0;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.tablist [role="tab"]:hover { background: var(--bg-panel); color: var(--text); }
.tablist [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tab-panel { padding: 44px 48px 52px; }
.feature-detail { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
.feature-detail h3 { font-family: var(--font-display); font-size: var(--text-h2); }
.feature-detail p { color: var(--text-muted); margin-bottom: 0; line-height: 1.85; }
.snippet-card { position: relative; min-width: 0; padding-top: 20px; }
.snippet-card pre { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); padding-top: 32px; padding-bottom: 32px; }
.snippet-card .note { position: relative; inset: auto; transform: none; margin-left: 18px; margin-bottom: -38px; max-width: calc(100% - 36px); white-space: normal; }
.fact-bar { margin: 0; padding: 22px 32px; background: var(--bg-panel-2); color: var(--on-accent); text-align: center; font-weight: var(--weight-medium); }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); color: var(--text-muted); font-size: var(--text-small); }
.toc a:hover, .toc a[aria-current] { background: var(--bg-panel); color: var(--text); text-decoration: none; }
.toc.is-sticky { position: sticky; top: 16px; z-index: 10; box-shadow: var(--shadow-sm); }
.faq-list { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary { position: relative; list-style: none; cursor: pointer; padding: 24px 58px 24px 28px; font-weight: var(--weight-semibold); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 28px; top: 24px; color: var(--accent); font-size: var(--text-lead); line-height: 1.3; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 28px 28px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; background: var(--bg); color: var(--text); }
.term-card h3 { font-family: var(--font-mono); font-size: var(--text-lead); overflow-wrap: anywhere; }
.term-card p { color: var(--text-muted); }
.term-card .chip { margin-bottom: 20px; }
.app-store-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  max-width: 100%;
  padding: 12px 26px;
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  text-align: left;
  transition: background-color var(--duration-ui) var(--ease-ui);
}
.app-store-button:hover { background: var(--accent-dark); color: var(--on-accent); border-color: var(--accent-dark); text-decoration: none; }
.app-store-button svg { width: 19px; height: 22px; flex-shrink: 0; fill: currentColor; }
.app-store-button .store-copy { display: block; }
.app-store-button small { display: block; font-size: var(--text-xs); font-weight: var(--weight-medium); }
.app-store-button strong { display: block; font-size: var(--text-base); font-weight: var(--weight-semibold); }
.app-store-button.store-two-line { min-height: 64px; }
.fact-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; flex-direction: row; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.fact-row li { margin: 0; min-width: 0; max-width: 100%; }
.fact-pill { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 30px; padding: 5px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--text-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.fact-pill b { color: var(--text); font-weight: var(--weight-semibold); }
.fact-pill svg { flex-shrink: 0; width: 14px; height: 14px; }
.official-shot { width: min(100%, 280px); max-width: 280px; margin: 0 auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.official-shot img, .shot-placeholder { outline: 1px solid var(--border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 14px; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.7; }
.shot-pair { display: flex; justify-content: center; align-items: flex-start; gap: 32px; }
.device-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.device-card > svg { width: 56px; height: 64px; color: var(--text-muted); flex-shrink: 0; }
.device-card h3 { font-family: var(--font-display); font-size: var(--text-card-title); margin-bottom: 12px; }
.device-card p { color: var(--text-muted); font-size: var(--text-small); }
.device-card a { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--weight-semibold); }
.article-card { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 30px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); }
.article-card h3 { font-family: var(--font-display); font-size: var(--text-card-title); margin: 0; }
.article-card h3 a { color: var(--text); }
.article-card p { color: var(--text-muted); margin: 0; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--text-muted); font-size: var(--text-sm); }
.article-card > a { margin-top: auto; min-height: 44px; display: inline-flex; align-items: center; }
.callout { margin: 28px 0; padding: 24px 28px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-warning { border-left-color: var(--warn); background: var(--tint-yellow); color: var(--ink-yellow); }
.callout-question { border-left-color: var(--error); background: var(--tint-pink); color: var(--ink-pink); }
.badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.badge-verified { background: var(--tint-green); color: var(--ink-green); }
.badge::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: var(--r-pill); background: currentColor; }
.grouped-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text); }
.grouped-list li { margin: 0; }
.grouped-list li + li { border-top: 1px solid var(--border); }
.grouped-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 58px; padding: 16px 24px; color: var(--text); }
.grouped-list a::after { content: "›"; color: var(--text-muted); font-size: var(--text-lead); }
.grouped-list a:hover { text-decoration: none; color: var(--accent); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.data-table :where(th, td), .prose table :where(th, td), .manual-body table :where(th, td) { min-width: 7em; padding: 16px 20px; text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; border-bottom: 1px solid var(--border); }
.data-table th, .prose table th, .manual-body table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table td, .prose table td, .manual-body table td { background: var(--bg); color: var(--text); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .manual-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; }
.dl-fab {
  position: fixed;
  right: max(var(--gutter), 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: 12px;
  max-width: calc(100vw - var(--gutter) * 2);
  min-height: 54px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
}
.dl-fab svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.dl-fab:hover { text-decoration: none; color: var(--accent); }
.article-store-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; margin-top: 56px; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-panel); color: var(--text); }
.article-store-card h2 { font-size: var(--text-card-title); margin: 0 0 12px; }
.article-store-card p { color: var(--text-muted); margin: 0; }
.has-article-fab { padding-bottom: 92px; }

/* 仅供根目录设计预览使用。 */
.preview-section-label { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-sm); margin-bottom: 16px; }
.preview-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-stack { display: grid; gap: 28px; }
.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { margin: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--bg); color: var(--text); }
.swatch-color { display: block; height: 64px; background: var(--swatch); color: var(--text); }
.swatch figcaption { padding: 10px 12px; font-family: var(--font-mono); font-size: var(--text-xs); overflow-wrap: anywhere; }
.sw-bg { --swatch: var(--bg); }
.sw-panel { --swatch: var(--bg-panel); }
.sw-panel-2 { --swatch: var(--bg-panel-2); }
.sw-border { --swatch: var(--border); }
.sw-border-strong { --swatch: var(--border-strong); }
.sw-accent { --swatch: var(--accent); }
.sw-accent-dark { --swatch: var(--accent-dark); }
.sw-on-accent { --swatch: var(--on-accent); }
.sw-text { --swatch: var(--text); }
.sw-muted { --swatch: var(--text-muted); }
.sw-faint { --swatch: var(--text-faint); }
.sw-success { --swatch: var(--success); }
.sw-warn { --swatch: var(--warn); }
.sw-error { --swatch: var(--error); }
.sw-violet { --swatch: var(--violet); }
.sw-tint-blue { --swatch: var(--tint-blue); }
.sw-tint-pink { --swatch: var(--tint-pink); }
.sw-tint-yellow { --swatch: var(--tint-yellow); }
.sw-tint-violet { --swatch: var(--tint-violet); }
.sw-tint-green { --swatch: var(--tint-green); }
.sw-ink-pink { --swatch: var(--ink-pink); }
.sw-ink-yellow { --swatch: var(--ink-yellow); }
.sw-ink-violet { --swatch: var(--ink-violet); }
.sw-ink-green { --swatch: var(--ink-green); }
.sw-ring-blue { --swatch: var(--ring-blue); }
.sw-ring-pink { --swatch: var(--ring-pink); }
.sw-ring-yellow { --swatch: var(--ring-yellow); }
.sw-ring-violet { --swatch: var(--ring-violet); }
.sw-graphite { --swatch: var(--graphite); }
.sw-graphite-edge { --swatch: var(--graphite-edge); }
.sw-graphite-highlight { --swatch: var(--graphite-highlight); }
.sw-screen-edge { --swatch: var(--screen-edge); }
.sw-camera { --swatch: var(--camera); }
.sw-camera-ring { --swatch: var(--camera-ring); }
.sw-veil { --swatch: var(--veil); }
.sw-footer-muted { --swatch: var(--footer-muted); }
.sw-footer-border { --swatch: var(--footer-border); }
.sw-clear { --swatch: var(--clear); }
.shot-placeholder { display: grid; align-content: center; justify-items: center; gap: 12px; aspect-ratio: 750 / 1334; border-radius: var(--r-shot); background: var(--bg-panel); color: var(--text-muted); font-size: var(--text-small); text-align: center; }
.shot-placeholder strong { color: var(--text); font-family: var(--font-mono); }
.preview-fab { position: static; width: fit-content; max-width: 100%; }
.preview-heading { font-family: var(--font-display); font-size: var(--text-h1); line-height: var(--leading-title); font-weight: var(--weight-bold); }
@media (max-width: 1180px) {
  .doc { font-size: var(--text-small); }
}
@media (max-width: 1040px) {
  .note { font-size: var(--text-xs); min-height: 28px; padding-inline: 11px; }
  .note.l { left: -40px; }
  .note.r { right: -40px; }
  .feature-detail { gap: 32px; }
  .tab-panel { padding: 32px; }
}
@media (max-width: 820px) {
  .stage { height: auto; max-height: 520px; margin-top: 28px; }
  .ipad { width: 100%; height: auto; padding: 10px; border-radius: var(--r-bezel-mobile); }
  .ipad::before { top: 2px; width: 5px; height: 5px; margin-left: -2.5px; }
  .screen { border-radius: var(--r-xs); padding-bottom: 18px; }
  .doc-bar { height: 36px; padding-inline: 12px; border-radius: var(--r-xs) var(--r-xs) 0 0; }
  .doc-meta { display: none; }
  .doc { padding-top: 14px; font-size: var(--text-xs); }
  .row { display: flex; flex-wrap: wrap; height: auto; min-height: 24px; padding-right: 12px; }
  .lead, .tail, .wire { display: none; }
  .code { height: 24px; max-width: 100%; overflow-x: auto; }
  .code::before { width: 22px; margin-right: 12px; font-size: var(--text-2xs); }
  .note, .note.l, .note.r { position: static; transform: none; margin: 2px 0 8px 34px; min-height: 26px; max-width: calc(100% - 34px); font-size: var(--text-xs); white-space: normal; }
  .feature-detail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tablist { padding: 20px 20px 8px; }
  .tab-panel { padding: 28px 24px; }
  .shot-pair { flex-direction: column; align-items: center; }
  .article-store-card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-card { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 24px; }
  .device-card > svg { width: 36px; height: 48px; }
  .fact-row { flex-direction: row; flex-wrap: wrap; }
  .faq-item summary { padding-left: 20px; }
  .faq-answer { padding-inline: 20px; }
  .term-card, .article-card, .article-store-card { padding: 24px; }
  .callout { padding: 20px; }
}