/* 首屏：以确认稿的四区 Bento 为基准。 */
.hero {
  position:relative;
  overflow-x:clip;
  min-height:calc(100svh - var(--nav-h) - var(--peek));
  display:grid;
  align-content:center;
  padding-top:24px;
  padding-bottom:24px;
}
.hero-glow { position:absolute; z-index:0; width:880px; height:880px; right:-400px; bottom:-300px; background:radial-gradient(closest-side,var(--accent-glow),var(--accent-glow-mid) 55%,var(--accent-glow-0)); pointer-events:none }
.bento { position:relative; z-index:1; display:grid; grid-template-columns:46fr 54fr; grid-template-rows:minmax(470px,auto) auto; grid-template-areas:"lead term" "plat mini"; gap:14px }
.cell { min-width:0; border-radius:var(--radius-lg); transition:transform var(--motion-base) ease }
.cell:hover { transform:translateY(-3px) }
.cell-lead { grid-area:lead; display:flex; flex-direction:column; padding:clamp(28px,3.3vw,48px); background:var(--bg-panel); color:var(--text); border:1px solid var(--border); box-shadow:var(--shadow-card) }
.lead-tag { align-self:flex-start; display:inline-flex; align-items:center; gap:10px; min-height:30px; padding:4px 14px 4px 12px; font-size:13px; color:var(--text-muted); background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-pill) }
.lead-dot { position:relative; width:8px; height:8px; flex:none; border-radius:var(--radius-round); background:var(--success); box-shadow:0 0 0 4px var(--success-ring) }
.hero-title { margin-top:26px; font-size:clamp(28px,3.05vw,44px); line-height:1.2; font-weight:var(--weight-normal) }
.hero-title > span { display:block }
.cta-row { margin-top:28px; display:flex; flex-wrap:wrap; gap:12px }
.lead-desc { margin-top:24px; max-width:31em; font-size:15.5px; line-height:1.75; color:var(--text-muted) }
.lead-desc strong { color:var(--text); font-weight:var(--weight-medium) }
.proto { margin-top:auto; padding-top:26px; display:flex; align-items:center; gap:12px; flex-wrap:wrap }
.proto-label,.cell-label { font-size:12px; color:var(--text-muted); letter-spacing:.04em }
.chips { display:flex; flex-wrap:wrap; gap:6px; list-style:none }
.chips li,.chip { min-height:26px; display:inline-flex; align-items:center; padding:3px 10px; max-width:100%; overflow-wrap:anywhere; font-family:var(--font-mono); font-size:12px; color:var(--text-muted); background:var(--bg); border:1px solid var(--border); border-radius:var(--radius-pill) }
.cell-term { grid-area:term; display:flex; flex-direction:column; overflow:hidden; background:var(--term-bg); color:var(--term-text); border:1px solid var(--term-line); box-shadow:var(--shadow-term) }
.term-bar { position:relative; min-height:46px; flex:none; display:flex; align-items:center; padding:10px 18px; background:var(--term-bar); color:var(--text-muted); border-bottom:1px solid var(--border) }
.dots { display:flex; gap:8px; flex:none }
.dots i { width:12px; height:12px; border-radius:var(--radius-round); display:block; flex:none }
.d-r { background:var(--dot-r) }
.d-y { background:var(--dot-y) }
.d-g { background:var(--dot-g) }
.term-title { position:absolute; left:50%; transform:translateX(-50%); font-size:13.5px; font-weight:var(--weight-medium); color:var(--text-muted); white-space:nowrap }
.term-body { flex:1; min-width:0; display:flex; flex-direction:column; padding:22px 28px; font-family:var(--font-mono); font-size:13.5px; line-height:2; color:var(--term-text) }
.log { padding-left:16px; list-style:none; border-left:1px dashed var(--term-line) }
.ln { white-space:nowrap; animation:log-enter .5s ease both }
.ln:nth-child(1) { animation-delay:.1s }
.ln:nth-child(2) { animation-delay:.32s }
.ln:nth-child(3) { animation-delay:.54s }
.ln:nth-child(4) { animation-delay:.76s }
.ln:nth-child(5) { animation-delay:.98s }
.ln:nth-child(6) { animation-delay:1.2s }
.pr { color:var(--term-prompt); margin-right:8px }
.flag,.lv { color:var(--term-dim) }
.lv { margin-right:10px }
.kw { color:var(--term-key) }
.addr { color:var(--term-cyan) }
.cfg { position:relative; margin-top:26px; padding:16px 18px 12px; border:1px solid var(--term-line); border-radius:var(--radius-sm) }
.cfg-tag { position:absolute; top:-11px; left:14px; padding:0 8px; font-size:12px; line-height:20px; color:var(--term-key); background:var(--term-bg) }
.cfg-line { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 24px; white-space:nowrap }
.cfg .k { color:var(--term-cyan) }
.cfg .v { color:var(--term-key) }
.cfg .c { color:var(--term-dim) }
.prompt { margin-top:auto; padding-top:14px; border-top:1px dashed var(--term-line); display:flex; align-items:center }
.term-gap { flex:1; min-height:22px }
.caret { display:inline-block; width:9px; height:18px; background:var(--term-text); animation:cursor-blink 1.1s steps(1,end) infinite }
.cell-plat { grid-area:plat; display:flex; flex-direction:column; justify-content:center; gap:14px; padding:20px clamp(24px,2.6vw,36px); background:var(--bg-panel); color:var(--text); border:1px solid var(--border); box-shadow:var(--shadow-card) }
.plat-row { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap }
.plat { display:inline-flex; align-items:center; gap:10px; font-size:14px; color:var(--text); transition:color var(--motion-fast) ease }
.plat-ico { width:32px; height:32px; flex:none; display:grid; place-items:center; color:var(--text); background:var(--bg-panel-2); border:1px solid var(--border); border-radius:var(--radius-xs) }
.plat-ico svg { width:16px; height:16px }
.plat-ico .ico-tux { width:14px; height:16px }
.plat:hover { color:var(--accent) }
.plat:hover .plat-ico { color:var(--accent); border-color:var(--accent-ring); background:var(--accent-soft) }
.mini { grid-area:mini; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px }
.cell-mini { display:flex; flex-direction:column; justify-content:center; gap:6px; padding:18px 20px; background:var(--bg-panel-2); color:var(--text); border:1px solid var(--border) }
.mini-val { font-family:var(--font-mono); font-size:17px; line-height:1.3 }
.mini-sub { font-size:12.5px; line-height:1.5; color:var(--text-muted) }
.pills { display:flex; gap:6px; flex-wrap:wrap; margin-top:2px }
.pill,.badge { display:inline-flex; align-items:center; justify-content:center; max-width:100%; padding:4px 9px; font-size:12px; line-height:1.4; font-weight:var(--weight-medium); overflow-wrap:anywhere; border-radius:var(--radius-pill); background:var(--bg-panel-2); color:var(--text-muted) }
.pill { min-height:22px; padding:3px 8px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.03em }
.pill-direct { color:var(--success-text); background:var(--success-soft) }
.pill-proxy,.badge-first { color:var(--accent-dark); background:var(--accent-soft) }
.pill-reject { color:var(--error-text); background:var(--error-soft) }
.badge-recommended { color:var(--success-text); background:var(--success-soft) }
.badge-archived { color:var(--warn-text); background:var(--warn-soft) }
.next-peek { position:relative; z-index:1; border-top:1px solid var(--border); padding-top:22px; padding-bottom:96px }
.next-peek h2 { margin-top:14px; font-size:28px; line-height:1.3 }
.next-peek .sub { margin-top:10px; max-width:40em; color:var(--text-muted) }

/* 特性：无缝双联面板、资料浏览器、蓝色收尾。 */
.feature-field { overflow-x:clip; background:linear-gradient(to bottom,var(--bg) 0%,var(--bg) 74%,var(--accent) 100%); color:var(--text); padding-top:64px; padding-bottom:88px }
.product-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--border); border-radius:var(--radius-xl); overflow:hidden; box-shadow:var(--shadow-card) }
.product-half { min-width:0; padding:36px; background:var(--bg-panel); color:var(--text) }
.product-half-dark { background:var(--ink-panel); color:var(--term-text) }
.product-half h3 { margin-bottom:24px }
.code-window { min-width:0; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg); color:var(--text); overflow:hidden }
.code-window .window-caption { padding:10px 16px; border-bottom:1px solid var(--border); font-family:var(--font-mono); font-size:12px }
.code-window pre { margin:0; padding:20px; font-size:13px; line-height:1.8 }
.product-half-dark .code-window { background:var(--term-bg); color:var(--term-text); border-color:var(--term-line) }
.product-half-dark .window-caption { border-color:var(--term-line) }
.rule-list { padding:12px 16px; list-style:none; overflow-x:auto; font-family:var(--font-mono); font-size:12px }
.rule-list li { display:flex; align-items:center; justify-content:space-between; gap:16px; min-width:max-content; padding-block:10px; border-bottom:1px solid var(--term-line) }
.rule-list li:last-child { border:0 }

.tabs { min-width:0 }
.tab-list,[role="tablist"] { display:flex; flex-wrap:wrap; align-items:stretch; gap:8px; list-style:none; margin:0; padding:0 }
[role="tab"] { position:relative; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 18px; max-width:100%; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-panel); color:var(--text-muted); text-align:left }
[role="tab"][aria-selected="true"] { background:var(--accent-soft); color:var(--accent-dark); border-color:var(--accent-ring) }
[role="tabpanel"] { min-width:0; margin-top:20px; scroll-margin-top:24px }
.feature-browser { display:grid; grid-template-columns:260px minmax(0,1fr); gap:24px; margin-top:32px }
.feature-browser [role="tablist"] { flex-direction:column; align-items:stretch; gap:8px }
.feature-browser [role="tab"] { justify-content:flex-start; min-height:58px; border-color:var(--clear); background:var(--bg-panel); color:var(--text-muted); border-radius:var(--radius-md); overflow:hidden }
.feature-browser [role="tab"][aria-selected="true"] { color:var(--accent-dark) }
.feature-browser [role="tab"][aria-selected="true"]::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--accent) }
.feature-browser[data-autoplay].is-playing [role="tab"][aria-selected="true"]::before { transform-origin:top; animation:tab-progress 8s linear }
.feature-browser [role="tabpanel"] { margin-top:0; min-height:322px; padding:36px; border:1px solid var(--border); border-radius:var(--radius-xl); background:var(--bg-panel); color:var(--text); box-shadow:var(--shadow-card) }
.feature-browser [role="tabpanel"] p { margin-top:20px; color:var(--text-muted); line-height:1.85 }

.toc { position:sticky; top:16px; z-index:4; display:flex; flex-wrap:wrap; gap:8px; padding:12px; margin-bottom:28px; max-width:100%; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-panel); color:var(--text); box-shadow:var(--shadow-card) }
.toc a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 14px; border-radius:var(--radius-xs); color:var(--text-muted) }
.toc a:hover,.toc a[aria-current] { background:var(--accent-soft); color:var(--accent-dark) }
.faq-item { border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-panel); color:var(--text); margin-top:12px }
.faq-item summary { position:relative; padding:20px 52px 20px 22px; cursor:pointer; list-style:none; font-weight:var(--weight-medium) }
.faq-item summary::-webkit-details-marker { display:none }
.faq-item summary::after { content:"+"; position:absolute; right:22px; top:18px; font-size:22px; color:var(--accent) }
.faq-item[open] summary::after { content:"−" }
.faq-answer { padding:0 22px 22px; color:var(--text-muted); line-height:1.85 }
.term-card dt { font-size:22px; font-family:var(--font-display); font-weight:var(--weight-normal) }
.term-card dd { margin:14px 0 0; color:var(--text-muted) }
.term-category { display:block; margin-bottom:10px; font-size:12px; color:var(--text-muted) }
.client-card { display:flex; flex-direction:column; gap:20px }
.client-head { display:flex; align-items:center; gap:16px; flex-wrap:wrap }
.client-icon { width:56px; height:56px; flex:none }
.client-title { min-width:0; flex:1 }
.client-title h3 { margin-bottom:6px }
.client-card p { color:var(--text-muted) }
.client-meta { display:flex; gap:12px; flex-wrap:wrap; font-size:13px; color:var(--text-muted) }
.client-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:auto }
.client-card.is-first { border-color:var(--accent-ring) }
[data-version]:empty { display:none }
.post-card { display:flex; flex-direction:column; gap:16px }
.post-card h3 { font-size:22px; line-height:1.45 }
.post-card h3 a:hover { color:var(--accent-dark) }
.post-card p { color:var(--text-muted) }
.post-meta { display:flex; align-items:center; flex-wrap:wrap; gap:10px; font-size:12px; color:var(--text-muted) }
.post-card .text-link { margin-top:auto; align-self:flex-start }
.callout { padding:22px 24px; border:1px solid var(--border); border-left:3px solid var(--accent); border-radius:var(--radius-md); background:var(--accent-soft); color:var(--text) }
.callout p + p { margin-top:12px }
.callout-warn { background:var(--warn-soft); color:var(--text); border-left-color:var(--warn) }
.callout-error { background:var(--error-soft); color:var(--text); border-left-color:var(--error) }
.table-scroll { overflow-x:auto; max-width:100%; min-width:0; overscroll-behavior-inline:contain; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-panel); color:var(--text) }
.data-table { width:100%; border-collapse:collapse; text-align:left; font-size:14px }
.data-table th,.data-table td,.prose table th,.prose table td,.article-body table th,.article-body table td { min-width:7em; padding:14px 18px; border-bottom:1px solid var(--border); overflow-wrap:normal; word-break:normal; vertical-align:top }
.data-table th { background:var(--bg-panel-2); color:var(--text); font-weight:var(--weight-medium) }
.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; overscroll-behavior-inline:contain }
.article-download { display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-top:40px; padding:28px; border:1px solid var(--border); border-radius:var(--radius-xl); background:var(--bg-panel); color:var(--text); box-shadow:var(--shadow-card) }
.article-download p { margin-top:8px; color:var(--text-muted) }
.dl-fab { position:fixed; right:24px; bottom:24px; z-index:20; display:inline-flex; align-items:center; justify-content:center; gap:12px; min-height:56px; max-width:calc(100% - 40px); padding:12px 18px; border:1px solid var(--accent-dark); border-radius:var(--radius-md); background:var(--accent); color:var(--on-accent); box-shadow:var(--shadow-btn); font-size:14px }
.dl-fab svg { width:22px; height:22px; flex:none }
.dl-fab small { display:block; font-size:12px }
.dl-fab:hover { background:var(--accent-dark); color:var(--on-accent) }

/* 预览页只提供静态状态，不启用首屏动画。 */
.design-preview .ln,.design-preview .caret { animation:none }
.preview-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap }
.preview-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:16px }
.swatch { padding:10px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--bg-panel); color:var(--text); font-size:12px; font-family:var(--font-mono) }
.swatch::before { content:""; display:block; height:60px; margin-bottom:10px; border:1px solid var(--border); border-radius:var(--radius-xs); background:var(--swatch) }
.sw-bg { --swatch:var(--bg) }
.sw-bg-panel { --swatch:var(--bg-panel) }
.sw-bg-panel-2 { --swatch:var(--bg-panel-2) }
.sw-border { --swatch:var(--border) }
.sw-border-strong { --swatch:var(--border-strong) }
.sw-accent { --swatch:var(--accent) }
.sw-accent-dark { --swatch:var(--accent-dark) }
.sw-accent-soft { --swatch:var(--accent-soft) }
.sw-accent-ring { --swatch:var(--accent-ring) }
.sw-accent-glow { --swatch:var(--accent-glow) }
.sw-accent-glow-mid { --swatch:var(--accent-glow-mid) }
.sw-accent-glow-0 { --swatch:var(--accent-glow-0) }
.sw-text { --swatch:var(--text) }
.sw-text-muted { --swatch:var(--text-muted) }
.sw-text-faint { --swatch:var(--text-faint) }
.sw-on-accent { --swatch:var(--on-accent) }
.sw-success { --swatch:var(--success) }
.sw-success-text { --swatch:var(--success-text) }
.sw-success-soft { --swatch:var(--success-soft) }
.sw-success-ring { --swatch:var(--success-ring) }
.sw-warn { --swatch:var(--warn) }
.sw-warn-text { --swatch:var(--warn-text) }
.sw-warn-soft { --swatch:var(--warn-soft) }
.sw-error { --swatch:var(--error) }
.sw-error-text { --swatch:var(--error-text) }
.sw-error-soft { --swatch:var(--error-soft) }
.sw-ink-panel { --swatch:var(--ink-panel) }
.sw-term-bg { --swatch:var(--term-bg) }
.sw-term-line { --swatch:var(--term-line) }
.sw-term-bar { --swatch:var(--term-bar) }
.sw-term-text { --swatch:var(--term-text) }
.sw-term-dim { --swatch:var(--term-dim) }
.sw-term-key { --swatch:var(--term-key) }
.sw-term-cyan { --swatch:var(--term-cyan) }
.sw-term-prompt { --swatch:var(--term-prompt) }
.sw-dot-r { --swatch:var(--dot-r) }
.sw-dot-y { --swatch:var(--dot-y) }
.sw-dot-g { --swatch:var(--dot-g) }
.sw-veil { --swatch:var(--veil) }
.sw-clear { --swatch:var(--clear) }
@keyframes log-enter { from { opacity:0; transform:translateY(6px) } to { opacity:1; transform:none } }
@keyframes cursor-blink { 0% { opacity:1 } 50% { opacity:0 } }
@keyframes tab-progress { from { transform:scaleY(0) } to { transform:scaleY(1) } }
@media (max-width:1080px) {
  .bento { grid-template-columns:minmax(0,1fr); grid-template-rows:auto; grid-template-areas:"lead" "term" "plat" "mini" }
  .term-body { font-size:12.5px }
  .ln,.cfg-line { white-space:normal; overflow-wrap:anywhere }
  .feature-browser { grid-template-columns:220px minmax(0,1fr) }
}
@media (max-width:760px) {
  .hero { min-height:0; padding-top:20px; padding-bottom:32px }
  .hero-title { font-size:clamp(24px,7vw,30px) }
  .mini { grid-template-columns:minmax(0,1fr) }
  .plat-row { justify-content:flex-start; gap:14px 18px }
  .term-title { font-size:12px }
  .product-pair,.feature-browser { grid-template-columns:minmax(0,1fr) }
  .product-half { padding:24px }
  .feature-browser [role="tablist"] { flex-direction:row; flex-wrap:wrap }
  .feature-browser [role="tab"] { flex:1 1 140px }
  .feature-browser [role="tabpanel"] { padding:24px }
}
@media (max-width:640px) {
  .cell-lead { padding:24px }
  .cell-plat { padding:20px }
  .term-body { padding:20px 16px; font-size:11.5px }
  .term-bar { padding-inline:12px }
  .term-title { position:static; transform:none; margin-left:auto; padding-left:10px; font-size:10px; white-space:normal; text-align:right }
  .dots { gap:5px }
  .dots i { width:9px; height:9px }
  .cfg { padding-inline:12px }
  .cfg-line { gap:0 }
  .cfg .c { display:none }
  .dl-fab { right:20px; bottom:20px }
  .toc { position:static }
  .pills,.chips { flex-direction:row; flex-wrap:wrap }
}
@media (prefers-reduced-motion:reduce) {
  .ln,.caret,.feature-browser.is-playing [role="tab"][aria-selected="true"]::before { animation:none }
  .cell:hover { transform:none }
}