/* 首屏：透视地面、事实带与规则分拣台 */
.hero { position: relative; isolation: isolate; padding-top: 36px; padding-bottom: 28px; overflow: hidden; }
.atmo {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  color: var(--text);
  --atmo-mask: linear-gradient(to bottom, var(--clear) 44%, var(--mask-solid) 68%);
  -webkit-mask-image: var(--atmo-mask);
  mask-image: var(--atmo-mask);
}
.atmo-floor {
  position: absolute;
  top: 320px;
  left: 50%;
  width: 2576px;
  height: 800px;
  margin-left: -1288px;
  background-image: linear-gradient(to bottom, var(--border) 1px, var(--clear) 1px), linear-gradient(to right, var(--border) 1px, var(--clear) 1px);
  background-size: 56px 56px;
  color: var(--text);
  transform-origin: 50% 0;
  transform: perspective(900px) rotateX(70deg);
  opacity: .85;
}
.atmo > :is(svg, img) { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-copy { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); text-align: center; }
.eyebrow {
  margin: 0 0 18px;
  font: var(--size-label)/16px var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-title {
  margin: 0 0 16px;
  font-size: var(--size-hero);
  line-height: var(--leading-title);
  letter-spacing: var(--tracking-hero);
}
.hero-title-accent { color: var(--accent); white-space: nowrap; }
.hero-desc {
  max-width: 720px;
  margin: 0 auto 26px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
}
.hero-desc strong { color: var(--text); font-weight: 600; }
.code-word { font-family: var(--font-mono); font-size: .88em; color: var(--text); }
.actions, .get-actions, .plat-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}
.actions, .get-actions { justify-content: center; margin-block-end: 12px; }
.hero .btn { line-height: 1; }
.hero .btn-primary { color: var(--on-accent); }
.get-note { margin: 0 0 18px; font: var(--size-small)/20px var(--font-body); color: var(--text-muted); }
.get-note .ver { font: 12.5px/1 var(--font-mono); color: var(--text); }
.get-note .sep { display: inline-block; margin-inline: 8px; color: var(--border); }

.platform-row { display: flex; justify-content: center; align-items: center; gap: 18px; margin-block-end: 24px; }
.platforms { display: flex; align-items: center; gap: 20px; margin: 0; padding: 0; list-style: none; }
.platform { display: inline-flex; align-items: center; gap: 7px; font: 13.5px/20px var(--font-body); color: var(--text-muted); text-decoration: none; }
.platform:is(a):hover { text-decoration: underline; }
.platform svg { width: 16px; height: 16px; color: var(--text); }
.platform-divider { width: 1px; height: 18px; flex-shrink: 0; background: var(--border); color: var(--text); }
.chip, .badge, .price-pill, .fact-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  padding: 3px 12px;
  border: var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font: var(--size-label)/1.4 var(--font-mono);
  overflow-wrap: anywhere;
  text-decoration: none;
}
.price-pill .dot-sep { margin-inline: 7px; color: var(--text-muted); }
.badge .dot { width: 7px; height: 7px; margin-inline-end: 7px; border-radius: var(--r-pill); background: var(--success); color: var(--surface); }

.facts { border-block: var(--line); background: var(--facts-bg); color: var(--text); }
.facts-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  text-align: center;
}
.fact + .fact { border-inline-start: var(--line); }
.fact-main { font-size: 22px; line-height: 26px; font-weight: 500; letter-spacing: -.01em; color: var(--accent); }
.fact-unit, .fact-pre { font-size: var(--size-small); font-weight: 400; letter-spacing: 0; color: var(--text-muted); }
.fact-unit { margin-inline-start: 6px; }
.fact-pre { margin-inline-end: 6px; }
.fact-sub { font-size: 11.5px; line-height: 16px; letter-spacing: .02em; color: var(--text-muted); }

.sorter {
  --sorter-pad: 40px;
  position: relative;
  width: min(var(--sorter-w), calc(100% - 48px));
  margin: 30px auto 0;
  padding: 22px var(--sorter-pad) 0;
  background: var(--bg-panel);
  color: var(--text);
  border: var(--line);
  border-radius: var(--r-card);
}
.sorter::before, .feature-card::before { content: ""; width: 10px; height: 10px; background: var(--accent); color: var(--text); }
.sorter::before { position: absolute; top: 24px; left: 24px; }
.sorter-head, .sorter-foot-label {
  font: 11px/14px var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sorter-head { margin: 0 0 18px; text-align: center; }
.sorter-body { display: grid; grid-template-columns: 400px minmax(0, 1fr) 170px; align-items: start; }
.rules, .policies, .proto-list, .fact-pills { margin: 0; padding: 0; list-style: none; }
.rules { display: flex; flex-direction: column; gap: 12px; }
.rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding-inline: 14px;
  background: var(--surface);
  color: var(--text);
  border: var(--line);
  border-radius: var(--r-card);
}
.rule-code { font: var(--size-small)/1 var(--font-mono); color: var(--text); }
.rule-type { font-weight: 500; }
.rule-comma, .rule-value { color: var(--text-muted); }
.rule-policy { font-weight: 600; }
.rule-note { font-size: var(--size-label); color: var(--text-muted); white-space: nowrap; }
.wires { display: block; width: 100%; height: 196px; overflow: visible; }
.wire { fill: none; stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 4 4; stroke-linecap: round; opacity: .75; }
.wire-halo { fill: none; stroke: var(--bg-panel); stroke-width: 6; }
.wire-start { fill: var(--surface); stroke: var(--text-muted); stroke-width: 1; }
.wire-end { fill: var(--text-muted); }
.policies { position: relative; height: 196px; }
.policy {
  position: absolute;
  inset-inline: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 36px;
  padding-inline: 12px;
  border-radius: var(--r-btn);
  font-family: var(--font-mono);
}
.policy-name { font-size: var(--size-small); font-weight: 600; letter-spacing: .06em; }
.policy-desc { font-family: var(--font-body); font-size: var(--size-label); }
.policy-proxy { top: 28px; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.policy-proxy .policy-desc, .policy-reject .policy-desc { opacity: .85; }
.policy-direct { top: 80px; background: var(--surface); color: var(--text); border: var(--line); }
.policy-direct .policy-desc { color: var(--text-muted); }
.policy-reject { top: 132px; background: var(--surface); color: var(--error); border: 1px solid var(--error); }
.sorter-foot, .proto-list, .fact-pills { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.sorter-foot { margin: 22px calc(-1 * var(--sorter-pad)) 0; padding: 14px var(--sorter-pad) 16px; border-top: var(--line); }
.sorter-foot-label { margin-inline-end: 6px; }

/* 能力卡与其他内容卡 */
.feature-grid, .plat-grid, .shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.feature-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: var(--card-pad);
  border: var(--line);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
.feature-card h3, .term-card h3 { font-family: var(--font-serif); font-weight: 400; }
.feature-card :is(h3, p) { margin: 0; }
.feature-field {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-block-start: 6px;
  padding: var(--card-pad);
  border-radius: var(--r-card);
  background: linear-gradient(145deg, var(--field-mist), var(--field-sand));
  color: var(--text);
}
.feature-field > * { min-width: 0; max-width: 100%; }
.feature-sheet {
  padding: 12px;
  border: var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--text);
}
.feature-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--gap);
}
.setting-list { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); }
.setting-list li { padding: 8px 12px; }
.setting-list li + li { border-top: var(--line); }
.term-card, .article-card, .device-card, .plat-card, .store-end {
  padding: var(--card-pad);
  border: var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--text);
}
.term-card :last-child, .article-card :last-child, .device-card :last-child, .plat-card :last-child, .store-end :last-child { margin-block-end: 0; }
.article-card .badge { margin-block-end: 12px; }
.device-card { display: block; text-decoration: none; }
.device-card:hover { background: var(--bg-panel); color: var(--text); border-color: var(--text-muted); }
.device-card svg { display: block; width: 34px; height: 34px; margin-block-end: 12px; }
.plat-card { position: relative; }
html[data-visitor-os="ios"] .plat-card[data-plat="ios"] { order: -1; }
html[data-visitor-os="mac"] .plat-card[data-plat="mac"] { order: -1; }
html[data-visitor-os="windows"] .plat-card[data-plat="windows"] { order: -1; }
html[data-visitor-os="android"] .plat-card[data-plat="android"] { order: -1; }
html[data-visitor-os="linux"] .plat-card[data-plat="linux"] { order: -1; }
:is(
  html[data-visitor-os="ios"] .plat-card[data-plat="ios"],
  html[data-visitor-os="mac"] .plat-card[data-plat="mac"],
  html[data-visitor-os="windows"] .plat-card[data-plat="windows"],
  html[data-visitor-os="android"] .plat-card[data-plat="android"],
  html[data-visitor-os="linux"] .plat-card[data-plat="linux"]
)::before {
  content: attr(data-mine);
  display: inline-block;
  margin-block-end: 10px;
  padding: 3px 10px;
  border: var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--size-label);
}
.store-btn {
  min-height: 48px;
  justify-content: flex-start;
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
  text-align: start;
}
.store-btn:hover, .store-btn:active { background: var(--text-muted); color: var(--surface); border-color: var(--text-muted); }
.store-btn svg { width: 21px; height: 21px; }
.store-btn small { display: block; margin-block-end: 3px; font-size: var(--size-label); }
.store-end { background: var(--bg-panel); color: var(--text); }
.download-hero .get-actions .btn-primary { min-height: 52px; padding-inline: clamp(16px, 3vw, 34px); }
.wx-open-tip {
  position: fixed;
  z-index: var(--z-tip);
  inset-inline: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - var(--gutter) * 2);
  margin-inline: auto;
  padding: 12px 16px;
  border-radius: var(--r-card);
  background: var(--text);
  color: var(--surface);
}
.official-shot {
  width: min(100%, 280px);
  min-width: 0;
  flex-shrink: 0;
  margin: 0 auto;
}
.official-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-shot);
}
.official-shot :is(img, .shot-placeholder) { outline: var(--line); }
.official-shot figcaption { margin-block-start: 8px; text-align: center; color: var(--text-muted); font-size: var(--size-small); }

/* 文档浏览组件 */
[role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-block-end: 12px;
  padding: 4px;
  border-radius: var(--r-card);
  background: var(--bg-panel-2);
  color: var(--text-muted);
}
[role="tab"] {
  min-height: var(--touch);
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--clear);
  border-radius: var(--r-btn);
  background: var(--clear);
  color: var(--text-muted);
}
[role="tab"]:is([aria-selected="true"], :hover) {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
[role="tabpanel"] { min-width: 0; }
.toc {
  padding: 8px 12px;
  border: var(--line);
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
.toc ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.toc a { display: flex; align-items: center; min-height: var(--touch); }
.faq-item {
  border-radius: var(--r-card);
  border: var(--line);
  background: var(--surface);
  color: var(--text);
}
.faq-item + .faq-item { margin-block-start: 8px; }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--touch);
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: 0 0 8px; height: 8px; border-bottom: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.faq-item[open] summary::after { transform: rotate(225deg); }
.faq-answer { padding: 14px 16px; border-top: var(--line); }
.faq-answer > :last-child { margin-block-end: 0; }
.callout {
  margin: 16px 0;
  padding: 14px 16px;
  border-inline-start: 3px solid var(--text-muted);
  border-radius: var(--r-btn);
  background: var(--bg-panel);
  color: var(--text);
}
.callout > :last-child { margin-block-end: 0; }

.table-scroll, :is(.prose, .reading-wrap, .wrap) table {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}
:is(.prose, .reading-wrap, .wrap) table, table.data-table { display: block; border-collapse: collapse; }
.table-scroll table { display: table; }
:is(.data-table, .prose table, .reading-wrap table, .wrap table) :is(th, td) {
  min-width: 7em;
  padding: 10px 12px;
  border: var(--line);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table, .prose table, .reading-wrap table, .wrap table) th { background: var(--bg-panel); color: var(--text); }

.dl-fab {
  position: fixed;
  z-index: var(--z-fab);
  inset-inline-end: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  min-height: var(--fab-size);
}
body.article-with-fab .footer-end { padding-block-end: var(--fab-size); }

/* 仅预览页使用 */
.preview-mark { position: relative; border: var(--line); border-radius: var(--r-card); background: var(--bg-panel-2); color: var(--text-muted); }
.preview-mark::after { content: ""; position: absolute; inset: 8px; border: 1px solid currentColor; border-radius: var(--r-pill); opacity: .45; }
.preview-focus { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.preview-only-nav { display: none; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 116px), 1fr)); gap: 10px; padding: 0; list-style: none; }
.swatch {
  --sample: var(--surface);
  padding: 8px;
  border: var(--line);
  border-radius: var(--r-btn);
  background: var(--surface);
  color: var(--text);
  font: var(--size-label)/1.4 var(--font-mono);
}
.swatch::before { content: ""; display: block; height: 36px; margin-block-end: 8px; border: var(--line); border-radius: var(--r-btn); background: var(--sample); color: var(--text); }
.swatch-bg { --sample: var(--bg); }
.swatch-panel { --sample: var(--bg-panel); }
.swatch-panel-2 { --sample: var(--bg-panel-2); }
.swatch-border { --sample: var(--border); }
.swatch-accent { --sample: var(--accent); }
.swatch-accent-dark { --sample: var(--accent-dark); }
.swatch-text { --sample: var(--text); }
.swatch-muted { --sample: var(--text-muted); }
.swatch-success { --sample: var(--success); }
.swatch-warn { --sample: var(--warn); }
.swatch-error { --sample: var(--error); }
.swatch-mist { --sample: var(--field-mist); }
.swatch-sand { --sample: var(--field-sand); }
.swatch-mask { --sample: var(--mask-solid); }
.swatch-veil { --sample: var(--veil); }
.swatch-facts { --sample: var(--facts-bg); }
.swatch-clear { --sample: var(--clear); }
.shot-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 750 / 1334;
  border-radius: var(--r-shot);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
@media (max-width: 1024px) {
  .preview-only-nav { display: block; }
  .preview-masthead .masthead-inner { gap: 8px; }
}
@media (max-width: 960px) {
  .platform-row { flex-direction: column; gap: 12px; }
  .platform-divider { display: none; }
  .platforms { flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
  .facts-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fact:nth-child(4) { border-inline-start: 0; }
  .fact:nth-child(n+4) { border-top: var(--line); }
  .sorter { --sorter-pad: 20px; }
  .sorter-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .wires { display: none; }
  .policies { height: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .policy { position: static; }
  .sorter-foot { margin-block-start: 20px; }
}
@media (max-width: 720px) {
  .hero { padding-top: 28px; }
  .hero-desc { font-size: 15.5px; }
  .hero .actions { flex-direction: column; }
  .get-actions > .btn { flex: 1 1 auto; }
  .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(n) { border-inline-start: 0; border-top: var(--line); padding-inline: 8px; }
  .fact:nth-child(-n+2) { border-top: 0; }
  .fact:nth-child(even) { border-inline-start: var(--line); }
  .fact:last-child { grid-column: 1 / -1; }
  .rule { padding: 8px 12px; }
  .rule-code { font-size: var(--size-label); line-height: 1.3; }
  .rule-note { display: none; }
  .policies { grid-template-columns: minmax(0, 1fr); }
  .feature-grid, .feature-wide, .plat-grid, .shots { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sorter::before { left: 12px; }
  .price-pill { display: inline-block; padding-block: 5px; }
  #install table, #install tbody, #install tr, #install :is(th, td) { display: block; min-width: 0; max-width: 100%; }
  #install thead { display: none; }
  #install tr { margin-block-end: 10px; }
  #install td + td { border-top: 0; }
  #install td code { word-break: normal; overflow-wrap: normal; }
  #install td:has(code) { overflow-x: auto; }
  .dl-fab { width: var(--fab-size); height: var(--fab-size); padding: 0; border-radius: var(--r-pill); }
  .dl-fab svg { width: 20px; height: 20px; }
  .dl-fab .fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  body.article-with-fab :is(main, #site-footer) { padding-inline-end: calc(var(--fab-size) + 6px + env(safe-area-inset-right)); }
}