/* 已确认的首页构图 */
:root {
  --size-chip: 12.5px;
  --size-platform: 13.5px;
  --size-caption: 12px;
  --size-window-title: 17px;
  --size-window-detail: 11.5px;
  --size-window-meta: 10.5px;
  --size-paw-title: 16px;
  --size-paw-url: 10.5px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: calc(100vh - var(--header-h) - var(--peek));
  min-height: calc(100svh - var(--header-h) - var(--peek));
  display: grid;
  align-content: center;
  padding-block: 32px 120px;
  background: var(--bg);
  color: var(--text);
}
.hero-arc { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }
.arc-0 { stop-color: var(--lav-1); stop-opacity: 0; }
.arc-1 { stop-color: var(--lav-1); stop-opacity: .55; }
.arc-2 { stop-color: var(--lav-1); }
.arc-3 { stop-color: var(--lav-2); stop-opacity: 0; }
.arc-4 { stop-color: var(--lav-2); stop-opacity: .75; }
.hero-grid {
  max-width: min(100%, calc(var(--measure-hero) + 2 * var(--gutter)));
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  gap: 56px;
  align-items: center;
}
.hero .copy { max-width: 560px; }
.chips, .pf-row, .badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips { margin-bottom: 26px; }
.chips li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: var(--size-chip);
  font-weight: var(--weight-semibold);
  letter-spacing: .01em;
}
.chips li:first-child { background: var(--accent-tint); color: var(--accent-dark); box-shadow: none; }
.hero .h1 { margin: 0; font-size: var(--size-hero-h1); letter-spacing: var(--tracking-hero); text-wrap: wrap; }
.h1-line { display: block; }
.h1 em { font-style: normal; color: var(--accent); }
.lede { margin: 20px 0 0; max-width: 520px; font-size: var(--size-lede); line-height: 1.7; color: var(--text-muted); }
.lede strong { color: var(--text); font-weight: var(--weight-bold); }
.platforms { margin-top: 36px; }
.platforms-label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-faint);
  font-size: var(--size-caption);
  font-weight: var(--weight-bold);
  letter-spacing: .14em;
}
.pf-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: var(--size-platform);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transition: box-shadow var(--ease), color var(--ease);
}
.pf-row a:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-dark); }
.pf-ico { width: 16px; height: 16px; display: inline-flex; flex-shrink: 0; color: var(--text-muted); }
.pf-row a:hover .pf-ico { color: var(--accent); }
.pf-ico svg { width: 100%; height: 100%; }

.device { position: relative; justify-self: end; width: min(100%, 680px); transform: rotate(-2deg); transform-origin: 55% 50%; }
.win { position: relative; z-index: 1; border-radius: var(--radius-win); background: var(--bg); color: var(--text); box-shadow: var(--shadow-win); overflow: hidden; }
.win-frame { height: 30px; display: flex; align-items: center; gap: 7px; padding-inline: 14px; background: var(--accent-frame); color: var(--text); }
.win-frame span { width: 10px; height: 10px; border-radius: var(--radius-circle); background: var(--bg); opacity: .78; flex-shrink: 0; }
.win-title { min-height: 44px; display: flex; align-items: center; gap: 14px; padding: 5px 14px; background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border); }
.win-addr { flex: 1; min-height: 28px; display: flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: var(--radius-sm); background: var(--bg); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); font-size: var(--size-chip); font-weight: var(--weight-semibold); }
.win-addr svg { width: 13px; height: 13px; fill: none; stroke: var(--text-faint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.win-core { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--size-window-detail); color: var(--text-muted); }
.dot-ok { display: inline-block; width: 7px; height: 7px; border-radius: var(--radius-circle); background: var(--success); box-shadow: 0 0 0 3px var(--success-tint); }

.win-body { display: grid; grid-template-columns: 172px minmax(0, 1fr); }
.side { background: var(--bg-panel); color: var(--text); border-right: 1px solid var(--border); padding: 14px 10px 120px; }
.side-brand { display: flex; align-items: center; gap: 8px; padding: 2px 8px 14px; font-size: var(--size-platform); font-weight: var(--weight-display); letter-spacing: -.01em; }
.side-brand img { width: 22px; height: 22px; flex-shrink: 0; }
.side-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding-inline: 10px; border-radius: var(--radius-sm); font-size: var(--size-meta); color: var(--text-muted); }
.side-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-item.is-cur { background: var(--accent-tint); color: var(--accent-dark); font-weight: var(--weight-bold); }
.side-item.is-cur::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 var(--radius-bar) var(--radius-bar) 0; background: var(--accent); }

.win-main { padding: 24px 28px 30px; }
.main-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.main-h { font-family: var(--font-display); font-size: var(--size-window-title); font-weight: var(--weight-display); letter-spacing: -.01em; }
.main-link { font-size: var(--size-chip); font-weight: var(--weight-bold); color: var(--accent); }
.main-sub { margin-top: 3px; font-size: var(--size-chip); color: var(--text-muted); }
.field-label { margin: 18px 0 8px; font-size: var(--size-chip); font-weight: var(--weight-bold); }
.mock-input {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--focus-ring);
  background: var(--bg);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: var(--size-chip);
  overflow-wrap: anywhere;
}
.mock-input svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.caret { width: 1.5px; height: 18px; background: var(--accent); flex-shrink: 0; }
.act-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.mock-btn { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 22px; border-radius: var(--radius-sm); background: var(--accent); color: var(--bg); font-size: var(--size-meta); font-weight: var(--weight-bold); box-shadow: var(--shadow-btn-sm); }
.act-note { font-size: var(--size-caption); color: var(--text-muted); }
.act-note code { padding: 0; background: var(--clear); color: var(--text); font-size: var(--size-window-detail); }
.set-list { margin-top: 20px; border-top: 1px solid var(--border); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-name { font-size: var(--size-meta); font-weight: var(--weight-bold); line-height: 1.4; }
.set-desc { margin-top: 1px; color: var(--text-muted); font-size: var(--size-window-detail); line-height: 1.4; }
.tg { position: relative; flex-shrink: 0; width: 34px; height: 20px; border-radius: var(--radius-pill); background: var(--bg-panel-2); box-shadow: inset 0 0 0 1px var(--border); }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: var(--radius-circle); background: var(--bg); box-shadow: var(--shadow-knob); }
.tg.is-on { background: var(--accent); box-shadow: none; }
.tg.is-on::after { left: 17px; }
.port-field { flex-shrink: 0; padding: 3px 12px; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--border); background: var(--bg-panel); color: var(--text); font-family: var(--font-mono); font-size: var(--size-chip); font-weight: var(--weight-semibold); }

.cfg { position: absolute; z-index: 3; right: -28px; bottom: -108px; width: 252px; border-radius: var(--radius-md); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); transform: rotate(2.5deg); overflow: hidden; }
.cfg-head { min-height: 34px; display: flex; align-items: center; gap: 8px; padding-inline: 14px; background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--size-window-detail); font-weight: var(--weight-semibold); }
.cfg-head svg { width: 13px; height: 13px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cfg-head small { margin-left: auto; color: var(--text-faint); font-size: var(--size-window-meta); font-weight: var(--weight-medium); letter-spacing: .08em; }
.cfg-code { margin: 0; padding: 12px 14px 14px; border: 0; border-radius: 0; background: var(--bg); color: var(--text); font-size: var(--size-caption); line-height: 1.75; }
.cfg-code .ln { display: inline-block; width: 18px; color: var(--text-faint); }
.cfg-code .k { color: var(--accent-dark); }
.cfg-code .v-num { color: var(--accent); }

.paw { position: absolute; z-index: 4; left: -112px; bottom: -64px; width: 260px; height: auto; overflow: visible; filter: drop-shadow(0 12px 16px var(--paw-shadow)); pointer-events: none; }
.card-shape { fill: var(--bg); stroke: var(--text); stroke-width: 2.2; stroke-linejoin: round; }
.card-bar { fill: var(--accent); }
.card-title { fill: var(--text); font-family: var(--font-body); font-size: var(--size-paw-title); font-weight: var(--weight-display); }
.card-url { fill: var(--text-muted); font-family: var(--font-mono); font-size: var(--size-paw-url); }
.paw-body { fill: var(--accent); stroke: var(--text); stroke-width: 2.4; stroke-linejoin: round; }
.paw-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.paw-bean { fill: var(--accent-soft); stroke: var(--text); stroke-width: 1.8; }
.spark, .trail { fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; }
.trail { stroke-width: 1.8; stroke-dasharray: 3 6; }

/* 平台入口与线稿长廊 */
.platform-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 32px; }
.platform-card { display: grid; align-content: start; gap: 8px; text-decoration: none; }
.platform-card:hover { color: var(--accent-dark); border-color: var(--accent); }
.feature-gallery { display: grid; gap: var(--feature-space); }
.feature-row { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); align-items: center; gap: clamp(28px, 6vw, 96px); }
.feature-row:nth-of-type(even) { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
.feature-row:nth-of-type(even) .feature-art { order: 1; }
.feature-art { display: block; width: 100%; height: auto; max-height: 340px; }
.feature-blob { fill: var(--lav-2); }
.feature-dash { fill: none; stroke: var(--accent-frame); stroke-width: 2; stroke-dasharray: 5 9; }
.feature-ink { fill: var(--accent); stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.feature-paper { fill: var(--bg); stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.feature-copy h3 { margin: 8px 0 16px; font-size: var(--size-h2); }
.feature-copy p:not(.eyebrow) { color: var(--text-muted); }

/* 查阅、筛选与横滑 */
[role="tablist"], .toc, .toc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  color: var(--text);
}
[role="tab"], .toc a, .toc-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--clear);
  border-radius: var(--radius-sm);
  background: var(--clear);
  color: var(--text-muted);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}
[role="tab"]:hover, .toc a:hover, .toc-tabs a:hover { background: var(--bg); color: var(--accent-dark); }
[role="tab"][aria-selected="true"], .toc a[aria-current], .toc-tabs a[aria-current] {
  border-color: var(--accent-frame);
  background: var(--accent-tint);
  color: var(--accent-dark);
}
[role="tabpanel"] { min-width: 0; margin-top: 16px; }
.toc, .toc-tabs { margin-bottom: 24px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding-block: 14px;
  list-style: none;
  font-weight: var(--weight-bold);
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; color: var(--accent-dark); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-body { max-width: var(--measure-prose); padding-bottom: 18px; color: var(--text-muted); }
.callout {
  margin-inline: 0;
  padding: 14px 18px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-tint);
  color: var(--text);
}
.table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
.data-table, .prose table, main table { border-collapse: collapse; width: 100%; text-align: start; }
.prose table, main table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
.table-wrap > table { display: table; width: 100%; min-width: max-content; }
:where(.data-table, .prose table, main table) :is(th, td) {
  min-width: 7em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
:where(.data-table, .prose table, main table) th { background: var(--bg-panel); color: var(--text); }
:where(.data-table, .prose table, main table) td code { overflow-wrap: anywhere; }
.table-wrap :is(td, th) code { display: inline-block; max-width: 32ch; }
:where(.data-table, .prose table, main table) caption { padding-block: 8px; color: var(--text-muted); text-align: start; }

/* 客户端、术语与文章 */
.client-card { display: grid; align-content: start; gap: 16px; }
.client-card.is-featured { border-top: 3px solid var(--accent); }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.client-head > div { min-width: 0; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.client-card p, .term-card dd, .post-card p { color: var(--text-muted); }
.version:empty { display: none; }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-size: var(--size-meta);
  font-weight: var(--weight-semibold);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.badge-top { background: var(--accent-tint); color: var(--accent-dark); }
.badge-rec { background: var(--bg-panel); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent-frame); }
.badge-archived { background: var(--bg-panel-2); color: var(--text-muted); }
.term-card { margin: 0; }
.term-card dt { color: var(--accent-dark); font-family: var(--font-mono); font-weight: var(--weight-bold); }
.term-card dd { margin: 10px 0 0; }
.post-card { display: grid; align-content: start; gap: 12px; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: var(--size-meta); }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-block: 40px 16px; background: var(--bg-panel); color: var(--text); }
.article-download p { margin: 6px 0 0; }
.dl-fab {
  position: fixed;
  z-index: 5;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  right: max(16px, env(safe-area-inset-right));
  max-width: calc(100% - 32px);
  border: 1px solid var(--accent-dark);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--bg);
  box-shadow: none;
}
.dl-fab:hover { background: var(--accent-dark); color: var(--bg); }
.has-dl-fab .site-foot { padding-bottom: 90px; }

/* 静态预览册 */
.preview-stack { display: grid; gap: 24px; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.swatch-grid li { display: grid; gap: 8px; font-family: var(--font-mono); font-size: var(--size-meta); }
.swatch-grid li::before { content: ""; display: block; height: 54px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--swatch); }
.sw-bg { --swatch: var(--bg); }
.sw-panel { --swatch: var(--bg-panel); }
.sw-panel2 { --swatch: var(--bg-panel-2); }
.sw-border { --swatch: var(--border); }
.sw-accent { --swatch: var(--accent); }
.sw-dark { --swatch: var(--accent-dark); }
.sw-text { --swatch: var(--text); }
.sw-muted { --swatch: var(--text-muted); }
.sw-faint { --swatch: var(--text-faint); }
.sw-success { --swatch: var(--success); }
.sw-success-tint { --swatch: var(--success-tint); }
.sw-warn { --swatch: var(--warn); }
.sw-error { --swatch: var(--error); }
.sw-tint { --swatch: var(--accent-tint); }
.sw-soft { --swatch: var(--accent-soft); }
.sw-frame { --swatch: var(--accent-frame); }
.sw-lav1 { --swatch: var(--lav-1); }
.sw-lav2 { --swatch: var(--lav-2); }
.sw-veil { --swatch: var(--veil); }
.sw-clear { --swatch: var(--clear); }
.sw-paw { --swatch: var(--paw-shadow); }
.preview-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 72px; }
  .hero .copy { max-width: 640px; }
  .device { justify-self: center; width: min(100%, 640px); }
  .hero { padding-bottom: 160px; }
}
@media (max-width: 960px) {
  .platform-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); }
}
@media (max-width: 768px) {
  .hero .h1 { font-size: var(--size-mobile-h1); letter-spacing: var(--tracking-title); }
  .feature-gallery { gap: 72px; }
  .feature-row, .feature-row:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .feature-row:nth-of-type(even) .feature-art { order: 0; }
}
@media (max-width: 640px) {
  .hero { min-height: auto; padding-bottom: 94px; }
  .hero-grid { gap: 48px; }
  .hero .lede { font-size: var(--size-mobile-lede); }
  .hero .ctas { margin-top: 24px; gap: 8px; }
  .hero .btn { padding-inline: 12px; }
  .platforms { margin-top: 24px; }
  .chips, .pf-row, .badge-row { justify-content: center; }
  .side, .cfg { display: none; }
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .win-main { padding-inline: 16px; }
  .device, .cfg { transform: none; }
  .paw { width: 200px; left: -20px; bottom: -65px; }
}