/* 首屏装置：抽象设备轮廓、真实规则、策略端点；不是应用界面。 */
.route-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--bg-panel);
  color: var(--text);
  background-image: radial-gradient(circle, var(--border) 1.1px, var(--clear) 1.4px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.route-scroll { overflow: hidden; }
.route-svg { display: block; width: 100%; height: auto; }
.route-tag {
  position: absolute;
  top: 16px;
  left: 18px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.3;
}
.route-foot {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}
.route-foot-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: var(--radius-chip);
  background: var(--bg-panel);
  color: var(--text-muted);
}
.rg-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.rg-dash { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
.rg-phone { fill: var(--bg-panel); stroke: var(--line-3); stroke-width: 1.25; }
.rg-key { fill: none; stroke: var(--line-3); stroke-width: 1.25; stroke-linecap: round; }
.rg-screen { fill: none; stroke: var(--border-strong); stroke-width: 1; }
.rg-grid { fill: none; stroke: var(--border); stroke-width: .75; }
.rg-island { fill: none; stroke: var(--line-2); stroke-width: 1; }
.rg-block { fill: var(--bg-panel-2); stroke: var(--border-strong); stroke-width: 1; }
.rg-row { fill: var(--bg-panel); stroke: var(--border-strong); stroke-width: 1; }
.rg-ico { fill: none; stroke: var(--line-3); stroke-width: 1; }
.rg-code { font-family: var(--font-mono); font-size: 11.5px; }
.rg-k { fill: var(--text); }
.rg-v { fill: var(--text-muted); }
.rg-end { fill: var(--bg-panel); stroke: var(--border-strong); stroke-width: 1; }
.rg-end--hit { stroke: var(--accent); stroke-width: 1.25; }
.rg-end-t {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  fill: var(--text-muted);
  text-anchor: middle;
}
.rg-end-t--hit { fill: var(--accent-dark); }
.rg-node { fill: var(--line-3); }
.rg-bar { fill: var(--accent); opacity: 0; }
.rg-bar--1 { opacity: 1; }
.rg-dot {
  fill: var(--accent);
  stroke: var(--bg-panel);
  stroke-width: 1.5;
  transform: translate(568px, 186px);
}
@media (prefers-reduced-motion: no-preference) {
  .route-card:not(.route-card--static) .rg-dot { animation: rg-travel var(--route-cycle) linear infinite; }
  .route-card:not(.route-card--static) .rg-bar--1 { animation: rg-b1 var(--route-cycle) linear infinite; }
  .route-card:not(.route-card--static) .rg-bar--2 { animation: rg-b2 var(--route-cycle) linear infinite; }
  .route-card:not(.route-card--static) .rg-bar--3 { animation: rg-b3 var(--route-cycle) linear infinite; }
  .route-card:not(.route-card--static) .rg-bar--4 { animation: rg-b4 var(--route-cycle) linear infinite; }
}
@keyframes rg-travel {
  0% { transform: translate(140px, 183px); opacity: 0; }
  5% { transform: translate(140px, 183px); opacity: 1; }
  13% { transform: translate(176px, 183px); opacity: 1; }
  25% { transform: translate(176px, 241px); opacity: 1; }
  37% { transform: translate(176px, 299px); opacity: 1; }
  49% { transform: translate(176px, 357px); opacity: 1; }
  52% { transform: translate(176px, 357px); opacity: 0; }
  53% { transform: translate(476px, 357px); opacity: 0; }
  57% { transform: translate(476px, 357px); opacity: 1; }
  61% { transform: translate(498px, 357px); opacity: 1; }
  70% { transform: translate(498px, 270px); opacity: 1; }
  73% { transform: translate(518.8px, 265.3px); opacity: 1; }
  76% { transform: translate(533px, 228px); opacity: 1; }
  79% { transform: translate(547.2px, 199.1px); opacity: 1; }
  82% { transform: translate(568px, 186px); opacity: 1; }
  90%, 100% { transform: translate(568px, 186px); opacity: 0; }
}
@keyframes rg-b1 {
  0%, 10% { opacity: 0; }
  13%, 19% { opacity: 1; }
  24%, 100% { opacity: 0; }
}
@keyframes rg-b2 {
  0%, 22% { opacity: 0; }
  25%, 31% { opacity: 1; }
  36%, 100% { opacity: 0; }
}
@keyframes rg-b3 {
  0%, 34% { opacity: 0; }
  37%, 43% { opacity: 1; }
  48%, 100% { opacity: 0; }
}
@keyframes rg-b4 {
  0%, 46% { opacity: 0; }
  49%, 86% { opacity: 1; }
  94%, 100% { opacity: 0; }
}

.proof { padding-bottom: 140px; }
.proof-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 24px; padding-bottom: 20px; }
.proof-title { margin: 0; font-size: 15px; font-weight: var(--weight-regular); color: var(--text); }
.proof-note { margin: 0; font-size: 14px; color: var(--text-muted); }
.proof-strip { border-block: 1px solid var(--border); background: var(--bg-panel-2); color: var(--text); }
.proof-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-inline: 1px solid var(--border); }
.proof-cell { min-width: 0; padding: 34px 32px 38px; overflow-wrap: anywhere; }
.proof-cell + .proof-cell { border-left: 1px solid var(--border); }
.proof-key { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; color: var(--text-muted); }
.proof-val { display: block; margin-top: 12px; font-size: 19px; line-height: 1.35; letter-spacing: -.01em; color: var(--text); }
.proof-val--mono { font-family: var(--font-mono); font-size: 18px; letter-spacing: 0; }
.proof-sub { display: block; margin-top: 6px; font-size: 13px; color: var(--text-muted); }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature-card--wide { grid-column: auto; }
.feature-card { display: flex; flex-direction: column; min-width: 0; padding: 28px; }
.feature-heading { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.feature-heading svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px; }
.feature-heading h3 { margin: 0; font-size: 18px; }
.feature-card p { font-size: 14px; line-height: 1.9; }
.feature-diagram { margin-top: auto; padding-top: 24px; min-width: 0; }
.feature-diagram pre { padding: 16px; background: var(--bg-panel); color: var(--text); }
.protocols, .fact-row, .badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.protocols span, .fact-pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.protocols span { font-family: var(--font-mono); }
.fact-pill strong { font-size: inherit; }
.badge--accent { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }
.fact-row { margin-top: 24px; }
.condition-tree { border-left: 1px dashed var(--line-2); padding-left: 14px; font-family: var(--font-mono); font-size: 12px; }
.condition-tree span { display: block; padding-block: 7px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.condition-tree .condition-hit { color: var(--accent-dark); }
.group-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-card); }
.group-list li { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 13px; }
.group-list li + li { border-top: 1px solid var(--border); }
.group-list li::after { content: "›"; margin-left: auto; color: var(--text-muted); }

.tabs { min-width: 0; }
.tablist, [role="tablist"].tablist {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.tablist [role="tab"] {
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
}
.tablist [role="tab"]:hover { border-color: var(--line-2); color: var(--text); }
.tablist [role="tab"][aria-selected="true"] { border-color: var(--text); color: var(--text); }
.code-window { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); }
.window-dots { display: flex; gap: 7px; padding: 18px 20px; }
.window-dots span { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--border); color: var(--text); }
.code-window pre { border: 0; border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); padding-top: 8px; }
.code-comment { color: var(--text-muted); }

.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
  margin-bottom: 40px;
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); text-decoration: none; font-size: 14px; }
.toc a:hover, .toc a[aria-current] { color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 12px; z-index: 10; }
.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; padding: 22px 36px 22px 0; list-style: none; cursor: pointer; font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 21px; color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; color: var(--accent-dark); }
.faq-answer { padding-bottom: 22px; color: var(--text-muted); max-width: 72ch; }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { border-top: 2px solid var(--border-strong); }
.term-card h3 { font-family: var(--font-mono); font-size: 18px; }
.term-card .badge { margin-bottom: 20px; }

.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 18px;
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  font-weight: var(--weight-medium);
  transition: background-color var(--ease-ui), color var(--ease-ui);
}
.app-store-button:hover, .app-store-button.is-hover { background: var(--accent-dark); color: var(--bg-panel); }
.app-store-button:active { transform: translateY(1px); }
.app-store-button svg { width: 21px; height: 23px; flex-shrink: 0; }
.app-store-button__copy { display: block; }
.app-store-button__copy small { display: block; font-size: 11px; font-weight: var(--weight-regular); }
.app-store-button__copy strong { display: block; color: inherit; font-weight: var(--weight-medium); }
.store-guide { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; border-left: 2px solid var(--accent); }
.store-guide h3 { margin-bottom: 10px; }
.store-guide p { margin: 0; max-width: 52ch; }

.official-shot {
  width: 100%;
  max-width: 280px;
  min-width: 0;
  flex-shrink: 0;
  margin: 0 auto;
  padding: 0;
}
.official-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-shot);
}
.official-shot img, .shot-placeholder { outline: 1px solid var(--border); box-shadow: var(--shadow-float); }
.official-shot figcaption { margin-top: 14px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.shot-row { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
.shot-placeholder {
  aspect-ratio: 750 / 1334;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  border-radius: var(--radius-shot);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-size: 13px;
}
.device-card { display: flex; align-items: flex-start; gap: 24px; }
.device-card__icon { width: 44px; height: 60px; flex-shrink: 0; color: var(--text-muted); }
.device-card__body { min-width: 0; }
.device-card h3 { margin-bottom: 12px; }
.device-card p { font-size: 14px; }
.device-card a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.article-card { display: flex; flex-direction: column; }
.article-card .article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.article-card h3 { line-height: 1.5; font-size: 20px; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); }
.article-card p { font-size: 14px; }
.article-card .article-more { margin-top: auto; padding-top: 20px; font-size: 14px; }

.callout {
  margin: 28px 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-btn);
  background: var(--bg-panel-2);
  color: var(--text);
}
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-medium); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--bg-panel-2); color: var(--text); font-weight: var(--weight-medium); }
.data-table td, .prose table td { background: var(--bg-panel); color: var(--text-muted); }
.data-table code, .prose table code { overflow-wrap: anywhere; white-space: normal; }
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  margin-block: 28px;
  font-size: 14px;
}
.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: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - var(--gutter) * 2);
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-float);
  font-size: 14px;
  text-decoration: none;
}
.dl-fab svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-dark); }
.dl-fab:hover { border-color: var(--accent); }
.has-article-fab .site-footer { padding-bottom: 100px; }

.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); }
.swatch-color { height: 64px; border: 1px solid var(--border); border-radius: var(--radius-chip); margin-bottom: 12px; }
.swatch code { font-size: 12px; }
.swatch--bg { background: var(--bg); color: var(--text); }
.swatch--panel { background: var(--bg-panel); color: var(--text); }
.swatch--panel2 { background: var(--bg-panel-2); color: var(--text); }
.swatch--border { background: var(--border); color: var(--text); }
.swatch--strong { background: var(--border-strong); color: var(--text); }
.swatch--line2 { background: var(--line-2); color: var(--text); }
.swatch--line3 { background: var(--line-3); color: var(--text); }
.swatch--accent { background: var(--accent); color: var(--text); }
.swatch--dark { background: var(--accent-dark); color: var(--bg-panel); }
.swatch--soft { background: var(--accent-soft); color: var(--text); }
.swatch--text { background: var(--text); color: var(--bg-panel); }
.swatch--muted { background: var(--text-muted); color: var(--bg-panel); }
.swatch--success { background: var(--success); color: var(--text); }
.swatch--warn { background: var(--warn); color: var(--text); }
.swatch--error { background: var(--error); color: var(--text); }
.swatch--clear { background: var(--clear); color: var(--text); }
.type-sample { padding-block: 24px; border-bottom: 1px solid var(--border); }
.type-sample:first-child { padding-top: 0; }
.type-sample p:last-child { margin-bottom: 0; }
.type-label { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.preview-heading { margin: 0; }
.preview-heading--h1 { font-size: clamp(34px, 3.4vw, 48px); line-height: 1.14; }
.preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-fab { position: static; width: fit-content; max-width: 100%; margin-top: 24px; }

@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .route-card { width: 100%; }
  .route-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .route-svg { min-width: 620px; }
  .proof-rail { grid-template-columns: minmax(0, 1fr); }
  .proof-cell + .proof-cell { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 760px) {
  .route-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-card--wide { grid-column: auto; }
  .feature-card { padding: 24px; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-row { flex-direction: row; justify-content: center; }
  .tablist { gap: 8px; }
  .tablist [role="tab"] { padding-inline: 16px; }
  .official-shot { margin-inline: auto; }
  .shot-row { flex-direction: column; align-items: center; }
  .device-card { gap: 18px; }
  .proof-cell { padding: 28px 22px; }
  .store-guide { align-items: flex-start; }
  .preview-heading--h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-dot { opacity: 1; transform: translate(568px, 186px); }
  .rg-bar--1 { opacity: 1; }
  .rg-bar--2, .rg-bar--3, .rg-bar--4 { opacity: 0; }
}