/* 首屏：蜜桃文案区、三块 Bento 资料卡、跨版心客户端窗口。 */
.hero { padding-top: 36px; position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 48px; align-items: stretch; }
.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 3px 10px;
  background: var(--panel);
  color: var(--text);
  border: var(--bw-thin) solid var(--ink);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}
.badge-dot { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--panel); }
.hero h1 { margin: 14px 0 0; font-size: var(--text-h1); line-height: 1.1; letter-spacing: -0.02em; }
.hero h1 > span { display: block; }
.lead { margin: 18px 0 0; font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.lead strong { color: var(--text); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 10px;
  background: var(--panel);
  color: var(--text);
  border: var(--bw-thin) solid var(--ink);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: var(--weight-semibold);
}
.facts svg { width: 12px; height: 12px; }
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 14px; }
.platforms-label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
.platforms a { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; font-size: var(--text-sm); font-weight: var(--weight-semibold); text-decoration: none; color: var(--text); }
.platforms a svg { width: 15px; height: 15px; flex: none; }
.platforms a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.bento { display: grid; grid-template-rows: 1fr auto; gap: 16px; }
.bento-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cell { display: flex; flex-direction: column; padding: 16px 18px; border: var(--bw) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow-hard); color: var(--text); text-decoration: none; transition: transform 180ms var(--ease); }
.cell:hover { transform: translateY(-3px); }
.cell-a { background: var(--panel); color: var(--text); }
.cell-b { background: var(--panel-2); color: var(--text); }
.cell-c { background: var(--bg); color: var(--text); }
.cell-tag { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); gap: 12px; }
.cell-tag svg { width: 14px; height: 14px; color: var(--text); }
.cell-big { margin-top: 6px; font-family: var(--font-display); font-weight: var(--weight-display); font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; }
.cell-b .cell-big, .cell-c .cell-big { font-size: 22px; }
.cell-txt { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.cell-foot { margin-top: auto; padding-top: 12px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text); }
.device { margin: 36px 0 -72px; position: relative; z-index: 3; }
.win { background: var(--panel); color: var(--text); border: var(--bw) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow-hard-xl); overflow: hidden; }
.win-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 38px; padding: 6px 14px; background: var(--chrome); color: var(--text); border-bottom: var(--bw-thin) solid var(--rule); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: var(--r-pill); display: block; flex-shrink: 0; }
.dots i:nth-child(1) { background: var(--err); color: var(--panel); }
.dots i:nth-child(2) { background: var(--warn); color: var(--ink); }
.dots i:nth-child(3) { background: var(--ok); color: var(--panel); }
.win-title { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.win-body { display: grid; grid-template-columns: 22% minmax(0, 1fr); }
.side { padding: 18px 12px 24px; border-right: var(--bw-thin) solid var(--rule); }
.side-label { display: block; padding: 0 12px 8px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.side ul { margin: 0; padding: 0; list-style: none; }
.side li { padding: 8px 12px; margin-bottom: 2px; border-radius: var(--r-sm); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.side li.on { background: var(--panel-2); color: var(--text); font-weight: var(--weight-bold); }
.main { position: relative; padding: 24px 32px 28px; }
.main-title { margin: 0; font-family: var(--font-display); font-weight: var(--weight-display); font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.main-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; margin-top: 18px; align-items: start; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: var(--bw) solid var(--ink); border-radius: var(--r-sm); overflow: hidden; }
.seg span { padding: 8px 2px; text-align: center; font-size: 13.5px; font-weight: var(--weight-bold); }
.seg span + span { border-left: var(--bw) solid var(--ink); }
.seg em { font-style: normal; font-family: var(--font-mono); font-weight: var(--weight-medium); font-size: 11.5px; color: var(--muted); margin-left: 4px; }
.seg .on { background: var(--ink); color: var(--panel); }
.seg .on em { color: var(--panel); }
.toggles { margin: 18px 0 0; padding: 0; list-style: none; }
.toggles li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 0; border-top: 1px solid var(--rule); }
.toggles li:last-child { border-bottom: 1px solid var(--rule); }
.t-name { display: block; font-size: var(--text-sm); font-weight: var(--weight-bold); }
.t-hint { display: block; font-size: var(--text-xs); color: var(--muted); }
.sw { position: relative; flex: none; width: 40px; height: 22px; border: var(--bw) solid var(--ink); border-radius: var(--r-pill); background: var(--panel); color: var(--text); }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: var(--r-pill); background: var(--ink); }
.sw.on { background: var(--ink); color: var(--panel); }
.sw.on::after { left: auto; right: 3px; background: var(--panel); }
.code { background: var(--code); color: var(--text); border: var(--bw-thin) solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: var(--text-xs); }
.code-head b { font-weight: var(--weight-semibold); }
.code-head span { color: var(--muted); }
.code-body { padding: 8px 0 10px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px; line-height: 21px; }
.ln { display: flex; white-space: pre; width: max-content; min-width: 100%; }
.ln.hl { background: var(--panel-2); color: var(--text); }
.no { flex: none; width: 38px; padding-right: 14px; text-align: right; color: var(--muted); }
.k { color: var(--text); font-weight: var(--weight-semibold); }
.v { color: var(--muted); }
.note { position: absolute; top: 18px; right: 32px; width: 238px; padding: 9px 12px 10px; background: var(--panel); color: var(--text); border: var(--bw-thin) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.note::after { content: ""; position: absolute; right: 44px; bottom: -6px; width: 10px; height: 10px; background: var(--panel); border-right: var(--bw-thin) solid var(--ink); border-bottom: var(--bw-thin) solid var(--ink); transform: rotate(45deg); }
.note-tag { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.note-txt { display: block; margin-top: 2px; font-size: 13px; font-weight: var(--weight-semibold); }
.after { background: var(--panel); color: var(--text); padding-top: 116px; }
.status { border-top: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); background: var(--panel); color: var(--text); }
.status .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.status b { color: var(--text); font-weight: var(--weight-bold); }
.peek { padding-top: 88px; padding-bottom: 112px; }
.peek-tag { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
.peek h2 { margin: 8px 0 0; }
.peek > p { margin: 12px 0 32px; max-width: 640px; font-size: var(--text-base); line-height: 1.7; color: var(--muted); }

/* 通用 tab：每个实例一个 data-tabs 根节点。 */
.tabs { min-width: 0; }
.tab-list, [role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; }
[role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--panel);
  color: var(--text);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
[role="tab"] svg { width: 18px; height: 18px; }
[role="tab"]:hover { background: var(--panel-2); color: var(--text); }
[role="tab"][aria-selected="true"] { background: var(--panel-2); color: var(--text); }
[role="tab"][aria-selected="true"]::after { content: ""; position: absolute; bottom: -2px; height: 3px; left: 12px; right: 12px; background: var(--accent); }
[role="tabpanel"] { min-width: 0; }
.feature-browser { display: grid; grid-template-columns: 260px minmax(0, 1fr); border: var(--bw) solid var(--ink); border-radius: var(--r-md); background: var(--panel); color: var(--text); box-shadow: var(--shadow-hard); overflow: hidden; }
.feature-browser [role="tablist"] { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 4px; padding: 20px 12px; margin: 0; border-right: var(--bw-thin) solid var(--rule); }
.feature-browser [role="tab"] { justify-content: flex-start; text-align: left; border: 0; width: 100%; border-radius: var(--r-sm); padding: 14px 16px; }
.feature-browser [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; inset: 8px auto 8px 0; width: 3px; background: var(--accent); }
.feature-browser [role="tab"][aria-selected="true"]::after { left: 0; right: auto; bottom: 0; width: 100%; height: 2px; transform: scaleX(0); transform-origin: left; }
.feature-browser[data-autoplay-state="running"] [aria-selected="true"]::after { animation: tab-reading var(--tab-cycle) linear forwards; }
.feature-browser [role="tabpanel"] { padding: 40px; }
.feature-browser [role="tabpanel"] p { max-width: 680px; line-height: 1.85; }
.tabs-controls { display: flex; justify-content: flex-end; margin-top: 18px; }
@keyframes tab-reading { to { transform: scaleX(1); } }
.toc { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 18px 20px; margin-bottom: 40px; background: var(--panel); color: var(--text); border: var(--bw) solid var(--ink); border-radius: var(--r-sm); }
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.toc.is-sticky { position: sticky; top: 16px; z-index: 10; }
.faq-item { border: var(--bw) solid var(--ink); border-radius: var(--r-md); margin-bottom: 16px; background: var(--panel); color: var(--text); }
.faq-item summary { padding: 20px 24px; font-weight: var(--weight-bold); cursor: pointer; }
.faq-item summary::marker { color: var(--text); }
.faq-item[open] { box-shadow: var(--shadow-hard); }
.faq-answer { padding: 0 24px 24px; line-height: 1.85; }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { border-top-width: 6px; }
.term-card .term-en { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); margin-bottom: 16px; overflow-wrap: anywhere; }
.client-card { position: relative; }
.client-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.client-heading h3 { margin: 0; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-meta { color: var(--muted); font-size: var(--text-sm); margin-block: 12px; }
[data-ver]:empty { display: none; }
.badge-first { background: var(--ink); color: var(--panel); }
.badge-recommended { background: var(--panel-2); color: var(--text); }
.badge-archived { background: var(--chrome); color: var(--muted); border-style: dashed; }
.post-card { display: flex; flex-direction: column; }
.post-card h3 { margin-top: 18px; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: var(--text-xs); }
.post-card p { color: var(--muted); line-height: 1.8; }
.post-card .post-link { margin-top: auto; align-self: flex-start; font-weight: var(--weight-bold); font-size: var(--text-sm); }
.callout { margin: 24px 0; padding: 22px 24px; border: var(--bw) solid var(--ink); border-left-width: 6px; border-radius: var(--r-sm); background: var(--panel-2); color: var(--text); line-height: 1.8; }
.callout > :last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 8px; }
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; border: var(--bw) solid var(--ink); border-radius: var(--r-sm); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); color: var(--text); text-align: left; font-size: var(--text-sm); }
.data-table caption { text-align: left; padding: 16px; font-weight: var(--weight-bold); }
.data-table :is(th, td), .prose table :is(th, td), .article-body table :is(th, td) { min-width: 7em; padding: 14px 18px; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th, .article-body table th { background: var(--panel-2); color: var(--text); font-weight: var(--weight-bold); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; background: var(--panel); color: var(--text); }
.prose table code, .article-body table code, .data-table code { overflow-wrap: anywhere; }
.quick-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 0; list-style: none; margin-block: 32px 56px; }
.step-number { display: block; font-family: var(--font-display); font-size: 40px; font-weight: var(--weight-display); margin-bottom: 20px; line-height: 1; }
.quick-steps > :nth-child(2) { margin-top: 24px; }
.quick-steps > :nth-child(3) { margin-top: 48px; }
.article-download { padding: 28px; margin-top: 48px; background: var(--bg); color: var(--text); border: var(--bw) solid var(--ink); border-radius: var(--r-md); box-shadow: var(--shadow-hard); }
.article-download h2 { margin-top: 0; }
.dl-fab {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: calc(100% - var(--gutter) * 2);
  min-height: 56px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--panel);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-hard);
  font-weight: var(--weight-bold);
  text-decoration: none;
}
.dl-fab svg { width: 22px; height: 22px; }
.dl-fab:hover { background: var(--accent); color: var(--ink); }
.has-dl-fab .site-footer { padding-bottom: 108px; }

/* 设计预览专用：不写行内颜色。 */
.token-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.token { border: var(--bw) solid var(--ink); border-radius: var(--r-sm); overflow: hidden; background: var(--panel); color: var(--text); }
.token-sample { height: 80px; border-bottom: var(--bw) solid var(--ink); }
.token code { display: block; padding: 12px; font-size: var(--text-xs); }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-panel { background: var(--panel); color: var(--text); }
.sw-panel-2 { background: var(--panel-2); color: var(--text); }
.sw-ink { background: var(--ink); color: var(--panel); }
.sw-accent { background: var(--accent); color: var(--ink); }
.sw-accent-dark { background: var(--accent-dark); color: var(--panel); }
.sw-text { background: var(--text); color: var(--panel); }
.sw-muted { background: var(--muted); color: var(--panel); }
.sw-ok { background: var(--ok); color: var(--panel); }
.sw-warn { background: var(--warn); color: var(--ink); }
.sw-err { background: var(--err); color: var(--panel); }
.sw-chrome { background: var(--chrome); color: var(--text); }
.sw-code { background: var(--code); color: var(--text); }
.sw-rule { background: var(--rule); color: var(--text); }
.sw-faint { background: var(--faint); color: var(--ink); }
.sw-shadow { background: var(--shadow-color); color: var(--panel); }
.preview-stack { display: grid; gap: 32px; }
.preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.type-display { font-family: var(--font-display); font-size: var(--text-h1); font-weight: var(--weight-display); line-height: 1.1; }
.preview-note { margin-top: 28px; font-size: var(--text-sm); color: var(--muted); }
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .bento { grid-template-rows: auto; grid-template-columns: 1.2fr 1fr; }
  .bento-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .bento { grid-template-columns: 1fr; }
  .win-body { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 20px; }
  .main-grid { grid-template-columns: 1fr; }
  .note { position: static; width: auto; margin-top: 14px; transform: none; }
  .note::after { display: none; }
  .device { margin-bottom: -48px; }
  .after { padding-top: 88px; }
  .feature-browser { grid-template-columns: 1fr; }
  .feature-browser [role="tablist"] { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: var(--bw-thin) solid var(--rule); }
  .feature-browser [role="tab"] { width: auto; flex: 1 1 180px; }
  .feature-browser [role="tabpanel"] { padding: 24px; }
  .token-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-steps { grid-template-columns: 1fr; }
  .quick-steps > :nth-child(n) { margin-top: 0; }
}
@media (max-width: 560px) {
  .bento-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(26px, 7vw, 30px); }
  .hero h1 > span { text-wrap: balance; }
  .peek h2 { font-size: 22px; }
  .win-bar { grid-template-columns: auto 1fr; gap: 14px; }
  .win-title { text-align: right; font-size: 11px; }
  .note { padding: 10px 12px; }
  .token-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-item summary { padding: 18px; }
  .faq-answer { padding-inline: 18px; }
  .feature-browser [role="tabpanel"] { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cell:hover { transform: none; }
}