/* 首屏采用静态 Bento：深色主格、三张配置文本卡、四枚事实格。 */
.hero { padding-top: 72px; }
.slab { position: relative; min-height: 548px; isolation: isolate; }
.slab-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: var(--r-block);
  background: var(--bg-panel-2);
  color: var(--on-dark);
  box-shadow: inset 0 1px 0 rgb(var(--white-rgb) / .06);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 24px));
}
.slab-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--dot-grid) 1px, var(--transparent) 1.3px);
  background-size: 20px 20px;
  mask-image: linear-gradient(100deg, var(--transparent) 34%, var(--text) 78%);
}
.slab-bg::after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -260px;
  width: 760px;
  height: 560px;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / .15), rgb(var(--accent-rgb) / 0));
}
.slab-copy { position: relative; width: 600px; max-width: 52%; padding: 48px 0 54px 56px; color: var(--on-dark); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 13px 3px 11px;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--r-pill);
  background: var(--dark-wash);
  color: var(--on-dark-muted);
  font-size: 12.5px;
}
.eyebrow-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--accent); color: var(--bg-panel-2); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .18), 0 0 10px rgb(var(--accent-rgb) / .5); }
.hero-title { margin: 20px 0 0; font-size: clamp(34px, 3.3vw, 48px); font-weight: var(--weight-display); line-height: 1.1; letter-spacing: var(--tracking-title); color: var(--on-dark); }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-desc { margin: 24px 0 0; max-width: 540px; font-size: 15px; line-height: 1.72; color: var(--on-dark-muted); }
.hero-desc strong { color: var(--on-dark); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips-label { margin-right: 2px; font-size: var(--size-caption); color: var(--on-dark-readable); }
.chip { max-width: 100%; padding: 0 10px; border: 1px solid var(--line-on-dark); border-radius: var(--r-pill); background: var(--dark-wash); color: var(--on-dark-muted); font-family: var(--font-mono); font-size: var(--size-caption); line-height: 24px; overflow-wrap: anywhere; }
.devices { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 22px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line-on-dark); }
.device { display: inline-flex; align-items: center; gap: 8px; min-height: 26px; font-size: var(--size-small); font-weight: var(--weight-medium); color: var(--on-dark); }
.device:hover { text-decoration: underline; text-underline-offset: 4px; }
.device svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.device svg .solid { fill: currentColor; stroke: none; }
.store-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 11px; border: 1px solid var(--line-on-dark-strong); border-radius: var(--r-pill); color: var(--on-dark); font-size: var(--size-caption); font-weight: var(--weight-semibold); }
.rig { position: absolute; top: -48px; right: 44px; width: 500px; height: 540px; margin: 0; perspective: 1600px; pointer-events: none; }
.rig-float { position: absolute; inset: 0; transform-style: preserve-3d; }
.rig-stack { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 40% 40%; transform: rotateY(-14deg) rotateZ(-4deg); }
.cfg { position: absolute; width: 384px; border: 1px solid var(--line-on-dark); border-radius: var(--r-card); background: var(--ink-card); color: var(--on-dark-muted); box-shadow: var(--shadow-cfg); }
.cfg--rule { top: 0; left: 0; transform: translateZ(64px); border-color: rgb(var(--white-rgb) / .16); }
.cfg--rule::before { content: ""; position: absolute; top: -1px; left: 18px; right: 18px; height: 1px; background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0), rgb(var(--accent-rgb) / .85), rgb(var(--accent-rgb) / 0)); }
.cfg--ss { top: 158px; left: 62px; transform: translateZ(32px); }
.cfg--route { top: 316px; left: 124px; transform: translateZ(0); }
.cfg-head { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 16px; border-bottom: 1px solid var(--line-on-dark); }
.cfg-head b { font-family: var(--font-mono); font-size: var(--size-caption); font-weight: var(--weight-semibold); color: var(--on-dark); }
.cfg-head span { font-size: 11.5px; color: var(--on-dark-readable); }
.cfg-body { position: relative; padding: 12px 16px 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 24px; color: var(--on-dark-muted); }
.ln { position: relative; white-space: pre; }
.ln .k { color: var(--accent); }
.ln .p, .ln .c { color: var(--on-dark-readable); }
.ln .c { font-style: italic; }
.ln .f { color: var(--on-dark); }
.hl { position: absolute; left: 8px; right: 8px; top: 36px; height: 24px; border-radius: var(--r-small); background: rgb(var(--accent-rgb) / .13); color: var(--on-dark); box-shadow: inset 2px 0 0 rgb(var(--accent-rgb) / .9); }
.route-row { display: grid; grid-template-columns: 66px 1fr; align-items: baseline; }
.route-row .f { font-size: 12.5px; font-weight: var(--weight-semibold); color: var(--on-dark); }
.route-row .e { font-family: var(--font-body); font-size: 12px; color: var(--on-dark-muted); white-space: nowrap; }
.facts { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.25fr; gap: 12px; margin-top: 16px; }
.fact { display: block; min-width: 0; padding: 15px 18px 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); transition: transform var(--duration-ui) var(--ease-ui), box-shadow var(--duration-ui) var(--ease-ui); }
.fact--panel { background: var(--bg-panel); color: var(--text); }
.fact:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.fact-k { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--accent-dark); }
.fact-t { display: block; margin-top: 3px; font-size: 15px; font-weight: var(--weight-bold); letter-spacing: -.01em; }
.fact-d { display: block; margin-top: 3px; font-size: var(--size-small); line-height: 1.55; color: var(--text-muted); }
.fact-code { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.next { margin-top: 44px; padding-bottom: 64px; }

/* 能力区：文字宽卡与代码窄卡共享同一组 tab 状态。 */
.feature-tabs { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: 20px; }
.feature-tabs > * { min-width: 0; }
.tab-list, [role="tablist"].tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}
.tab-list [role="tab"], .tabs [role="tab"] {
  position: relative;
  flex-shrink: 0;
  min-height: 48px;
  padding: 12px 11px;
  border: 0;
  border-bottom: 2px solid var(--transparent);
  background: var(--transparent);
  color: var(--text-muted);
  font-size: var(--size-small);
  font-weight: var(--weight-medium);
}
.tab-list [role="tab"][aria-selected="true"], .tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); font-weight: var(--weight-bold); }
.tab-list [role="tab"]:hover, .tabs [role="tab"]:hover { color: var(--text); }
.tab-panel { padding: 24px; border-radius: 0 0 var(--r-card) var(--r-card); background: var(--bg-panel); color: var(--text); }
.tab-panel h3 { margin-top: 0; }
.tab-panel p:last-child { margin-bottom: 0; }
.feature-code { display: flex; flex-direction: column; background: var(--bg-panel); color: var(--text); }
.feature-code pre { flex: 1; margin: 0; padding: 24px; border: 0; border-radius: 0 0 var(--r-card) var(--r-card); background: var(--bg-panel); color: var(--text); }
.feature-code .panel-head { font-family: var(--font-mono); font-size: var(--size-small); }
.feature-code .code-note { margin: 0; padding: 0 24px 24px; font-size: var(--size-caption); color: var(--text-muted); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-bottom: 32px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.toc a { display: block; min-height: 44px; padding: 10px 14px; border-radius: var(--r-control); color: var(--text-muted); font-size: var(--size-small); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg-panel); color: var(--text); }
.toc--sticky { position: sticky; top: 12px; z-index: var(--layer-toc); }
.toc--flow { position: static; }
.faq-list { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary { position: relative; min-height: 60px; padding: 18px 52px 18px 24px; cursor: pointer; list-style: none; font-weight: var(--weight-semibold); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 18px; color: var(--accent-dark); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 22px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.term-card h3 { margin: 12px 0; font-family: var(--font-mono); }
.term-card p { margin-bottom: 0; color: var(--text-muted); }
.badge, .tag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); font-size: var(--size-caption); line-height: 1.5; overflow-wrap: anywhere; }
.badge-accent { border-color: var(--accent); background: var(--bg); color: var(--accent-dark); }
.status-dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--accent); color: var(--text); }
.status-dot--success { background: var(--success); color: var(--text); }
.status-dot--warn { background: var(--warn); color: var(--text); }
.status-dot--error { background: var(--error); color: var(--text); }

.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--bg-panel-2);
  box-shadow: var(--shadow-primary);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  transition: transform var(--duration-ui) var(--ease-ui), background-color var(--duration-ui) var(--ease-ui);
}
.app-store-button svg { width: 25px; height: 28px; flex-shrink: 0; fill: currentColor; }
.app-store-button small { display: block; font-size: 11px; font-weight: var(--weight-medium); }
.app-store-button strong { display: block; margin-top: 3px; font-size: 16px; font-weight: var(--weight-bold); }
.app-store-button:hover { transform: translateY(-1px); background: var(--accent-hi); color: var(--bg-panel-2); }
.app-store-button--ink { background: var(--bg-panel-2); color: var(--on-dark); border-color: var(--bg-panel-2); box-shadow: var(--shadow-soft); }
.app-store-button--ink:hover { background: var(--ink-card); color: var(--on-dark); }
.fact-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; margin: 20px 0; list-style: none; }
.fact-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text); font-size: var(--size-caption); overflow-wrap: anywhere; }
.fact-pill small { font-size: inherit; color: var(--text-muted); }
.fact-pills--dark .fact-pill { border-color: var(--line-on-dark); background: var(--dark-wash); color: var(--on-dark); }
.fact-pills--dark .fact-pill small { color: var(--on-dark-muted); }

.shot-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 24px; }
.official-shot { width: 100%; max-width: 280px; flex-shrink: 0; margin: 0; padding: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot img { outline: 1px solid var(--border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; font-size: var(--size-small); line-height: 1.6; text-align: center; color: var(--text-muted); }
.shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border: 1px solid var(--border); border-radius: var(--r-shot); background: var(--bg-panel); color: var(--text-muted); font-family: var(--font-mono); font-size: var(--size-small); }

.device-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.device-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 20px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.device-card > svg { width: 44px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.device-card .solid { fill: currentColor; stroke: none; }
.device-card h3 { margin: 0 0 10px; }
.device-card p { color: var(--text-muted); }
.device-card a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.article-card { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); transition: transform var(--duration-ui) var(--ease-ui), box-shadow var(--duration-ui) var(--ease-ui); }
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.article-card h3 { margin: 16px 0 12px; line-height: 1.5; }
.article-card h3 a { display: block; }
.article-card p { color: var(--text-muted); }
.article-card .article-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: auto; color: var(--accent-dark); font-size: var(--size-small); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: var(--size-caption); color: var(--text-muted); }
.callout { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--warn); }
.callout--error { border-left-color: var(--error); }
.grouped-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); }
.grouped-list li + li { border-top: 1px solid var(--border); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 20px; }
.grouped-list a::after { content: "›"; flex-shrink: 0; color: var(--text-muted); }
.grouped-list a:hover { background: var(--bg-panel); color: var(--text); }

.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; border: 1px solid var(--border); border-radius: var(--r-card); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; background: var(--bg); color: var(--text); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: left;
  background: var(--bg);
  color: var(--text);
}
.data-table code, .prose table code { overflow-wrap: anywhere; }
.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: 10px;
  max-width: calc(100% - var(--gutter) * 2);
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--bg-panel-2);
  box-shadow: var(--shadow-lift);
  font-size: var(--size-small);
  font-weight: var(--weight-bold);
}
.dl-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.article-has-fab { padding-bottom: 100px; }
.article-store-guide { margin-top: 40px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.article-store-guide h2 { margin-top: 0; font-size: var(--size-h3); }
.article-store-guide p { color: var(--text-muted); }

/* 仅供根目录静态预览页使用。 */
.preview-section { padding-top: 56px; padding-bottom: 56px; }
.preview-section > .wrap > h2 { margin-top: 0; }
.preview-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.swatch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.swatch { margin: 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.swatch-color { height: 64px; border-radius: var(--r-card) var(--r-card) 0 0; }
.swatch figcaption { padding: 10px; font-family: var(--font-mono); font-size: 11px; overflow-wrap: anywhere; }
.swatch-bg { background: var(--bg); color: var(--text); }
.swatch-panel { background: var(--bg-panel); color: var(--text); }
.swatch-dark { background: var(--bg-panel-2); color: var(--on-dark); }
.swatch-border { background: var(--border); color: var(--text); }
.swatch-accent { background: var(--accent); color: var(--text); }
.swatch-accent-hi { background: var(--accent-hi); color: var(--text); }
.swatch-accent-dark { background: var(--accent-dark); color: var(--on-dark); }
.swatch-text { background: var(--text); color: var(--on-dark); }
.swatch-muted { background: var(--text-muted); color: var(--on-dark); }
.swatch-success { background: var(--success); color: var(--text); }
.swatch-warn { background: var(--warn); color: var(--text); }
.swatch-error { background: var(--error); color: var(--on-dark); }
.swatch-card { background: var(--ink-card); color: var(--on-dark); }
.swatch-on-dark { background: var(--on-dark); color: var(--text); }
.swatch-on-muted { background: var(--on-dark-muted); color: var(--text); }
.swatch-on-dim { background: var(--on-dark-dim); color: var(--text); }
.swatch-readable { background: var(--on-dark-readable); color: var(--text); }
.type-display { margin: 0 0 20px; font-size: 40px; font-weight: var(--weight-display); line-height: 1.2; letter-spacing: var(--tracking-title); }
.preview-dark { padding: 24px; border-radius: var(--r-card); background: var(--bg-panel-2); color: var(--on-dark); }

@media (max-width: 1240px) {
  .rig { right: 12px; transform: scale(.88); transform-origin: top right; }
  .slab-copy { max-width: 54%; }
}
@media (max-width: 1020px) {
  .hero { padding-top: 64px; }
  .slab { min-height: 0; padding-bottom: 40px; }
  .slab-copy { width: auto; max-width: none; padding: 44px 36px 8px; }
  .rig { position: relative; top: auto; right: auto; width: 500px; height: 500px; margin: 12px auto -40px; transform: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-tabs { grid-template-columns: minmax(0, 1fr); }
  .swatch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .hero-title { font-size: 30px; }
  .device-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .fact-pills { justify-content: center; }
  .shot-row { flex-direction: column; align-items: center; }
  .tab-panel { padding: 20px; }
  .device-card { padding: 22px; gap: 14px; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-display { font-size: 28px; }
}
@media (max-width: 560px) {
  .hero { padding-top: 36px; }
  .slab-copy { padding: 36px 22px 4px; }
  .hero-title { font-size: 28px; }
  .hero-desc { font-size: 14.5px; }
  .slab .btn { min-height: 46px; padding-inline: 18px; }
  .rig { width: 500px; height: 440px; left: 50%; margin-left: -250px; margin-right: 0; margin-bottom: -110px; transform: scale(.68); transform-origin: top center; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .devices { gap: 10px 16px; }
}
@media (max-width: 480px) {
  .rig { transform: scale(.56); height: 390px; margin-bottom: -110px; }
}
@media (max-width: 380px) {
  .rig { transform: scale(.48); height: 350px; }
  .slab-copy { padding-inline: 18px; }
  .hero-title { font-size: 25px; }
  .slab .cta-row { gap: 8px; }
  .slab .btn { padding-inline: 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .fact:hover, .article-card:hover, .app-store-button:hover { transform: none; }
}