/* 首屏：横向文案/主题分区，下接共享设备画布。 */
.hero {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  padding-block: 22px 30px;
}
.hero-top { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 48px; }
.hero h1 { margin: 0; font-size: var(--size-hero); line-height: 1.15; text-wrap: initial; }
.h1-key { color: var(--text-muted); }
.lede { margin: 16px 0 0; max-width: 620px; font-size: 17px; line-height: 1.7; color: var(--text-muted); }
.lede strong { font-weight: 500; color: var(--text); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 28px; }
.platforms { display: flex; align-items: center; gap: 20px; margin-top: 22px; min-height: 24px; }
.platforms-label { font: 12px/16px var(--font-mono); color: var(--text-muted); padding-right: 20px; border-right: 1px solid var(--border); flex: none; }
.platforms ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }
.platforms a { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-muted); }
.platforms a:hover { color: var(--accent); }
.platforms svg { width: 14px; height: 14px; display: block; color: var(--text); }
.platforms .tux { width: 13px; height: 15px; }
.topics { max-width: 350px; display: grid; gap: 12px; justify-items: end; padding-bottom: 2px; }
.topics-label { font: 12px var(--font-mono); color: var(--text-muted); }
.topics ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.topics li {
  display: inline-flex; align-items: center; min-height: 28px; max-width: 100%; padding: 2px 11px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--bg-panel); color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere;
}
.topics li a:hover { color: var(--accent); }
.topics li::before { content: "#"; margin-right: 5px; font: 12px var(--font-mono); color: var(--text-muted); }

.stage { position: relative; isolation: isolate; width: 88%; margin-block: 40px 74px; }
.stage::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 820px; height: 600px; right: -230px; bottom: -190px;
  background: radial-gradient(closest-side,var(--glow),var(--glow-soft) 55%,var(--clear) 100%); color: var(--text);
}
.win {
  height: 420px; display: grid; grid-template-rows: 40px minmax(0,1fr);
  background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-window); overflow: hidden;
}
.win-bar { position: relative; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); }
.dots { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; }
.dot { width: 11px; height: 11px; flex: none; border-radius: var(--r-round); }
.dot-r { background: var(--error); color: var(--bg); }
.dot-y { background: var(--warn); color: var(--bg); }
.dot-g { background: var(--success); color: var(--bg); }
.win-title { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); }
.win-title img { width: 15px; height: 15px; }
.win-body { display: grid; grid-template-columns: 196px minmax(0,1fr); min-height: 0; }
.win-side { border-right: 1px solid var(--border); padding: 14px 12px; display: grid; align-content: start; gap: 2px; }
.side-item {
  display: flex; align-items: center; gap: 11px; min-height: 34px; padding: 0 14px;
  border-radius: var(--r-pill); font-size: 13px; color: var(--text-muted);
}
.mock-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.side-item svg { width: 17px; height: 17px; }
.side-item.is-on { background: var(--accent-tint); color: var(--text); }
.side-item.is-on svg { color: var(--accent); }
.win-main { padding: 20px 24px; display: grid; grid-template-rows: auto minmax(0,1fr); gap: 14px; min-height: 0; }
.win-head { font-size: 15px; letter-spacing: -.005em; }
.win-cols { display: grid; grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr); gap: 16px; min-height: 0; }
.col-l { display: grid; grid-template-rows: auto auto minmax(0,1fr); gap: 12px; min-height: 0; }
.mock-card { background: var(--bg-panel-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm); }
.card-pad { padding: 13px 14px; }
.card-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); }
.card-label code { font-size: 11px; }
.seg { margin-top: 10px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); min-height: 32px; padding: 3px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-panel); color: var(--text-muted); }
.seg span { display: flex; align-items: center; justify-content: center; font-size: 12.5px; border-radius: var(--r-inset); }
.seg .is-on { background: var(--accent-tint-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; }
.switch-row + .switch-row { border-top: 1px solid var(--border); }
.switch-row b { display: block; font-weight: 400; font-size: 13px; line-height: 1.4; }
.switch-row small { display: block; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.switch { position: relative; flex: none; width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--border); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: var(--r-round); background: currentColor; }
.switch.is-on { background: var(--accent-grad); color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--hairline-lit); }
.switch.is-on::after { left: 17px; }
.profile { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.profile-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--bg-panel); color: var(--text-muted); border: 1px solid var(--border); }
.profile-ico svg { width: 16px; height: 16px; }
.profile b { display: block; font-weight: 400; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.profile span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.5; }
.yaml { display: grid; grid-template-rows: 34px minmax(0,1fr); min-height: 0; overflow: hidden; }
.yaml-head { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--border); font: 11.5px var(--font-mono); color: var(--text-muted); }
.yaml-head svg { width: 13px; height: 13px; }
.yaml pre { margin: 0; padding: 10px 14px; border: 0; border-radius: 0; background: var(--clear); color: var(--text); font-size: 12px; line-height: 19px; }
.yaml .ln { display: inline-block; width: 26px; color: var(--text-muted); user-select: none; }
pre .syntax-value { color: var(--accent); }

.phone {
  position: absolute; right: -74px; top: 104px; width: 204px; height: 390px;
  padding: 7px; border-radius: var(--r-phone); background: var(--bg-deep); color: var(--text); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-phone);
}
.screen { height: 100%; border-radius: var(--r-screen); background: var(--bg); color: var(--text); overflow: hidden; display: flex; flex-direction: column; box-shadow: inset 0 0 0 1px var(--hairline-hi); }
.status { height: 28px; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 16px; position: relative; }
.status::before { content: ""; position: absolute; left: calc(50% - 4.5px); top: 9px; width: 9px; height: 9px; border-radius: var(--r-round); background: var(--bg-deep); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.status svg { width: auto; height: 9px; }
.appbar { min-height: 42px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; letter-spacing: -.01em; }
.appbar svg { width: 16px; height: 16px; color: var(--text-muted); }
.launch { flex: none; display: grid; justify-items: center; gap: 10px; padding: 14px 0 18px; }
.launch-btn { width: 80px; height: 80px; border-radius: var(--r-round); display: grid; place-items: center; background: var(--accent-grad); color: var(--on-accent); box-shadow: var(--shadow-launch); }
.launch-btn svg { width: 28px; height: 28px; stroke-width: 2; }
.launch small { font-size: 11px; color: var(--text-muted); }
.m-card { margin: 0 12px; border-radius: var(--r-mobile-panel); }
.m-card .switch-row { padding: 11px 12px; }
.m-card .switch-row b { font-size: 12px; }
.m-card .switch { width: 30px; height: 18px; }
.m-card .switch::after { width: 12px; height: 12px; }
.m-card .switch.is-on::after { left: 15px; }
.spacer { flex: 1; }
.m-nav { flex: none; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 8px 6px 4px; border-top: 1px solid var(--border); background: var(--bg-panel); color: var(--text-muted); }
.m-nav span { display: grid; justify-items: center; gap: 3px; font-size: 9px; line-height: 1.2; }
.m-nav i { display: grid; place-items: center; width: 40px; height: 22px; border-radius: var(--r-pill); }
.m-nav svg { width: 14px; height: 14px; }
.m-nav .is-on { color: var(--text); }
.m-nav .is-on i { background: var(--accent-tint-2); color: var(--accent); }
.gesture { flex: none; height: 14px; display: grid; place-items: center; background: var(--bg-panel); color: var(--text); }
.gesture::before { content: ""; width: 62px; height: 3px; border-radius: var(--r-pill); background: var(--border-strong); color: var(--text); }

.facts { border-block: 1px solid var(--border); }
.facts ul { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.facts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-block: 22px; font: 13px/1.6 var(--font-mono); }
.facts li + li { padding-inline-start: 28px; border-inline-start: 1px solid var(--border); }
.facts li span { color: var(--text-muted); }

/* 标签与检视面板 */
[role="tablist"], .toc-tabs, .badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
[role="tab"], .toc-tabs a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  max-width: 100%; padding: 8px 13px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-panel); color: var(--text-muted); text-align: start; overflow-wrap: anywhere;
}
[role="tab"]:hover, .toc-tabs a:hover { border-color: var(--border-strong); color: var(--text); }
[role="tab"][aria-selected="true"] { background: var(--bg-panel-2); color: var(--text); border-color: var(--accent-line); }
.feature-view { display: grid; grid-template-columns: minmax(0,55fr) minmax(0,45fr); align-items: start; gap: clamp(20px,5vw,72px); }
.feature-view > * { min-width: 0; }
.feature-list[role="tablist"] { display: grid; gap: 0; }
.feature-list [role="tab"] {
  position: relative; display: block; width: 100%; padding: 18px 16px 18px 20px;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  background: var(--clear); color: var(--text-muted);
}
.feature-list [role="tab"][aria-selected="true"] { background: var(--clear); color: var(--on-accent); }
.feature-list [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; inset: 18px auto 18px 0; width: 2px; background: var(--accent-grad); color: var(--on-accent); }
.feature-title { display: block; font: 400 var(--size-h3)/1.25 var(--font-display); }
.feature-note { display: block; margin-top: 5px; color: var(--text-muted); font-size: 14px; }
.inspect-panel { box-shadow: var(--shadow-inspect); }
.feature-view + .split-cards { margin-top: clamp(32px,6vw,80px); }

/* 长页目录默认留在文档流。 */
.toc-tabs { margin-block: 16px 32px; }
.toc-tabs a { text-decoration: none; }
.faq-item { border-block-end: 1px solid var(--border); }
.faq-item summary { position: relative; min-height: 44px; padding: 14px 32px 14px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 8px; color: var(--text-muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 18px; color: var(--text-muted); }
.term-card { border-block-start-color: var(--border-strong); }
.app-card, .post-card { display: grid; align-content: start; gap: 14px; }
.app-card h3, .post-card h3 { margin: 0; }
.app-head { display: flex; align-items: flex-start; gap: 14px; }
.app-icon { width: 56px; height: 56px; }
.post-card h3 a:hover { color: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-muted); font: var(--size-note)/1.5 var(--font-mono); }
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  max-width: 100%; padding: 3px 9px; border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  background: var(--bg-panel-2); color: var(--text-muted); font-size: var(--size-note); overflow-wrap: anywhere;
}
.badge--first { color: var(--success); }
.badge--recommended { color: var(--text); }
.badge--archived { color: var(--warn); }
.callout {
  margin: 20px 0; padding: 15px 18px; border-inline-start: 2px solid var(--accent-line);
  border-radius: var(--r-sm); background: var(--bg-panel); color: var(--text-muted);
}
.callout strong { color: var(--text); }
.article-download { display: grid; justify-items: start; gap: 12px; margin-top: 42px; box-shadow: var(--shadow-pop); }
.article-download h2 { margin: 0; }
.dl-fab {
  position: fixed; z-index: var(--fab-layer); inset-inline-end: max(var(--gutter),env(safe-area-inset-right));
  inset-block-end: max(16px,env(safe-area-inset-bottom)); max-width: calc(100% - var(--gutter) * 2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--bg-panel-2); color: var(--accent); box-shadow: var(--shadow-pop);
}
.dl-fab:hover { border-color: var(--accent-line); }
.dl-fab svg { width: 16px; height: 16px; }
body:has(.dl-fab) .site-footer { padding-bottom: 68px; }
[data-rev]:empty { display: none; }

.table-wrap, .prose table, .article-body table {
  max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch;
}
.prose table, .article-body table { display: block; }
.data-table, .prose table, .article-body table { width: 100%; border-collapse: collapse; text-align: start; }
:is(.data-table,.prose table,.article-body table) :is(th,td) {
  min-width: 7em; padding: 11px 14px; border-bottom: 1px solid var(--border);
  text-align: start; vertical-align: top; word-break: normal; overflow-wrap: normal;
}
:is(.data-table,.prose table,.article-body table) th { background: var(--bg-panel); color: var(--text); font-weight: 500; }
.table-wrap:has(> table) > table { display: table; }

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr)); gap: 12px; padding: 0; list-style: none; }
.swatch-grid li { min-width: 0; font: var(--size-note)/1.6 var(--font-mono); color: var(--text-muted); overflow-wrap: anywhere; }
.swatch-grid i { display: block; height: 48px; margin-bottom: 5px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--sample,var(--bg)); color: var(--text); }
.sample-bg { --sample: var(--bg); }
.sample-panel { --sample: var(--bg-panel); }
.sample-panel-2 { --sample: var(--bg-panel-2); }
.sample-deep { --sample: var(--bg-deep); }
.sample-border { --sample: var(--border); }
.sample-border-strong { --sample: var(--border-strong); }
.sample-accent { --sample: var(--accent); }
.sample-dark { --sample: var(--accent-dark); }
.sample-grad { --sample: var(--accent-grad); }
.sample-tint { --sample: var(--accent-tint); }
.sample-tint-2 { --sample: var(--accent-tint-2); }
.sample-line { --sample: var(--accent-line); }
.sample-on { --sample: var(--on-accent); }
.sample-text { --sample: var(--text); }
.sample-muted { --sample: var(--text-muted); }
.sample-faint { --sample: var(--text-faint); }
.sample-success { --sample: var(--success); }
.sample-warn { --sample: var(--warn); }
.sample-error { --sample: var(--error); }
.sample-glow { --sample: var(--glow); }
.sample-glow-soft { --sample: var(--glow-soft); }
.sample-hairline { --sample: var(--hairline-hi); }
.sample-lit { --sample: var(--hairline-lit); }
.sample-veil { --sample: var(--veil); }
.sample-clear { --sample: var(--clear); }

@media (max-width: 1180px) {
  .stage { width: 100%; }
  .phone { right: 18px; }
}
@media (max-width: 900px) {
  .hero-top { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .topics { justify-items: start; max-width: none; }
  .topics ul { justify-content: flex-start; }
  .win { height: auto; }
  .win-body, .win-cols { grid-template-columns: minmax(0,1fr); }
  .win-side, .phone { display: none; }
  .stage { margin-bottom: 40px; }
  .facts ul { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .facts li + li { padding-inline-start: 0; border-inline-start: 0; }
  .facts li { padding-block: 12px; }
}
@media (max-width: 640px) {
  .hero { min-height: auto; }
  .feature-view { grid-template-columns: minmax(0,1fr); }
  .win-main { padding: 14px; }
}
@media (max-width: 560px) {
  .lede { font-size: 15.5px; }
  .cta { gap: 8px 16px; }
  .platforms { flex-wrap: wrap; gap: 6px 12px; }
  .platforms-label { border: 0; padding: 0; }
  .platforms ul { gap: 4px 14px; }
  .topics ul { gap: 6px; }
}