/* 首页首屏：按确认稿保留居中排版和编辑器装置。 */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - var(--nav-h) - var(--peek));
  display: grid;
  align-content: center;
  padding-top: 28px;
  padding-bottom: 30px;
  overflow-x: clip;
}
.hero-stack { display: flex; flex-direction: column; align-items: center; text-align: center; padding-inline: 24px; }
.badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 5px 15px 5px 11px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text-muted);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.badge-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: var(--r-dot); background: var(--c-success); color: var(--c-text); box-shadow: 0 0 0 3px var(--c-success-tint); }
.hero-title { margin: 18px 0 0; font-size: clamp(26px, 3.4vw, 48px); line-height: 1.16; letter-spacing: -.02em; font-weight: var(--weight-title); }
.lede { margin: 12px 0 0; max-width: 720px; font-size: 16.5px; line-height: 1.6; color: var(--c-text-muted); }
.lede strong { color: var(--c-text); font-weight: var(--weight-title); }
.cta { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chips li, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-text-muted);
  font-size: 12.5px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.chips svg { width: 11px; height: 11px; fill: none; stroke: var(--c-text-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.platforms { margin: 14px 0 0; padding: 0; list-style: none; display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.platforms a { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 22px; color: var(--c-text-muted); transition: color var(--duration-fast); }
.platforms a:hover { color: var(--c-text); }
.platforms svg { width: 15px; height: 15px; flex-shrink: 0; }
.device { position: relative; width: min(var(--device-w), calc(100% - 64px)); margin: 30px auto 0; text-align: left; min-width: 0; }
.device::before, .device::after { content: ""; position: absolute; z-index: 0; pointer-events: none; filter: blur(46px); }
.device::before { left: -14%; top: -10%; width: 46%; height: 92%; background: radial-gradient(closest-side, var(--c-glow-a), var(--c-clear) 74%); color: var(--c-text); opacity: .9; }
.device::after { right: -12%; bottom: -32%; width: 62%; height: 120%; background: radial-gradient(closest-side, var(--c-glow-b), var(--c-clear) 74%); color: var(--c-text); opacity: .95; }
.win { position: relative; z-index: 1; background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-card); box-shadow: var(--shadow-float); overflow: hidden; }
.win-bar { height: 38px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: 16px; background: var(--c-panel); color: var(--c-text); border-bottom: 1px solid var(--c-border); }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: var(--r-dot); display: block; flex-shrink: 0; }
.lights .l-r { background: var(--c-error); color: var(--c-text); }
.lights .l-y { background: var(--c-warn); color: var(--c-text); }
.lights .l-g { background: var(--c-success); color: var(--c-text); }
.win-title { font-family: var(--font-mono); font-size: 12px; color: var(--c-text-muted); }
.win-body { display: grid; grid-template-columns: 188px minmax(0, 1fr) 112px; height: 280px; }
.win-body > * { min-width: 0; }
.outline { background: var(--c-panel); color: var(--c-text); border-right: 1px solid var(--c-border); padding: 14px 10px; }
.outline-label { display: block; padding: 0 10px 8px; font-size: 11px; letter-spacing: .04em; color: var(--c-text-muted); }
.outline ul { list-style: none; margin: 0; padding: 0; }
.outline li { font-family: var(--font-mono); font-size: 12.5px; line-height: 18px; padding: 5px 10px; border-radius: var(--r-item); color: var(--c-text-muted); }
.outline li + li { margin-top: 2px; }
.outline .is-on { background: var(--c-panel-active); color: var(--c-text); font-weight: var(--weight-title); }
.code { padding-block: 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 18px; font-variant-ligatures: none; overflow-x: auto; }
.ln { display: grid; grid-template-columns: 52px 1fr; min-width: max-content; }
.ln-n { text-align: right; padding-right: 18px; color: var(--c-text-muted); }
.ln-c { white-space: pre; color: var(--c-text-muted); padding-right: 20px; }
.ln.is-cur { background: var(--c-panel); color: var(--c-text); }
.k { color: var(--c-accent); }
.v, .r { color: var(--c-text-muted); }
.p { color: var(--c-text-muted); }
.r { font-weight: var(--weight-title); }
.caret { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -3px; background: var(--c-text); color: var(--c-on-ink); border-radius: var(--r-caret); }
.hero-animated .ln, .hero-animated .log-line { opacity: 0; transform: translateY(5px); animation: editor-rise .5s var(--ease) forwards; }
.hero-animated .caret { animation: editor-blink 1.1s steps(1) infinite; }
.hero-animated .ln:nth-child(1) { animation-delay: .10s; }
.hero-animated .ln:nth-child(2) { animation-delay: .14s; }
.hero-animated .ln:nth-child(3) { animation-delay: .18s; }
.hero-animated .ln:nth-child(4) { animation-delay: .22s; }
.hero-animated .ln:nth-child(5) { animation-delay: .26s; }
.hero-animated .ln:nth-child(6) { animation-delay: .30s; }
.hero-animated .ln:nth-child(7) { animation-delay: .34s; }
.hero-animated .ln:nth-child(8) { animation-delay: .38s; }
.hero-animated .ln:nth-child(9) { animation-delay: .42s; }
.hero-animated .ln:nth-child(10) { animation-delay: .46s; }
.hero-animated .ln:nth-child(11) { animation-delay: .50s; }
.hero-animated .ln:nth-child(12) { animation-delay: .54s; }
.hero-animated .ln:nth-child(13) { animation-delay: .58s; }
.hero-animated .ln:nth-child(14) { animation-delay: .62s; }
.hero-animated .log-line:nth-child(1) { animation-delay: .78s; }
.hero-animated .log-line:nth-child(2) { animation-delay: .90s; }
.hero-animated .log-line:nth-child(3) { animation-delay: 1.02s; }
@keyframes editor-rise { to { opacity: 1; transform: none; } }
@keyframes editor-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.minimap { border-left: 1px solid var(--c-border-soft); padding: 16px 14px; }
.mm-bar { display: block; height: 3px; margin-bottom: 4px; border-radius: var(--r-bar); background: var(--c-border); color: var(--c-text); }
.mm-gap { height: 3px; margin-bottom: 4px; }
.mm-i { margin-left: 10%; }
.w30 { width: 30%; }
.w40 { width: 40%; }
.w50 { width: 50%; }
.w60 { width: 60%; }
.w90 { width: 90%; }
.mm-focus { margin: -3px -6px 0; padding: 3px 6px 0; border-radius: var(--r-key); background: var(--c-accent-tint); color: var(--c-text); }
.drawer { border-top: 1px solid var(--c-border); background: var(--c-panel); color: var(--c-text); }
.drawer-head { height: 30px; display: flex; align-items: stretch; gap: 18px; padding-inline: 18px; border-bottom: 1px solid var(--c-border-soft); font-size: 12px; }
.d-tab { display: inline-flex; align-items: center; color: var(--c-text-muted); }
.d-tab.is-on { color: var(--c-text); font-weight: var(--weight-title); box-shadow: inset 0 -2px 0 var(--c-accent); }
.d-state { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11.5px; color: var(--c-text-muted); }
.d-state i { width: 6px; height: 6px; border-radius: var(--r-dot); background: var(--c-success); color: var(--c-text); display: block; flex-shrink: 0; }
.log { padding: 8px 18px 10px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; overflow-x: auto; }
.log-line { display: flex; gap: 14px; white-space: pre; min-width: max-content; color: var(--c-text-muted); }
.lv { color: var(--c-text-muted); width: 36px; flex-shrink: 0; }
.addr { color: var(--c-text); }
.status { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 16px; border-top: 1px solid var(--c-border); background: var(--c-bg); color: var(--c-text-muted); font-family: var(--font-mono); font-size: 11px; }
.status span { display: inline-flex; gap: 18px; flex-wrap: wrap; }
.palette { position: absolute; z-index: 2; top: -26px; right: -44px; width: 244px; background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-pop); box-shadow: var(--shadow-pop); overflow: hidden; }
.pal-head { height: 40px; display: flex; align-items: center; gap: 8px; padding-inline: 12px; border-bottom: 1px solid var(--c-border-soft); font-size: 12.5px; color: var(--c-text-muted); }
.pal-head svg { width: 14px; height: 14px; fill: none; stroke: var(--c-text-muted); stroke-width: 1.8; stroke-linecap: round; flex-shrink: 0; }
.kbd { margin-left: auto; font-family: var(--font-mono); font-size: 11px; line-height: 18px; padding-inline: 6px; border: 1px solid var(--c-border); border-radius: var(--r-key); background: var(--c-panel); color: var(--c-text-muted); }
.pal-label { display: block; padding: 9px 14px 4px; font-size: 11px; color: var(--c-text-muted); }
.pal-list { list-style: none; margin: 0; padding: 0 6px 6px; }
.pal-list li { position: relative; display: flex; align-items: center; justify-content: space-between; height: 30px; padding-inline: 10px; border-radius: var(--r-item); font-size: 12.5px; color: var(--c-text-muted); }
.pal-list .mode { font-family: var(--font-mono); }
.pal-list .hint { font-size: 11.5px; color: var(--c-text-muted); }
.pal-list .is-on { background: var(--c-panel); color: var(--c-text); font-weight: var(--weight-title); }
.pal-list .is-on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: var(--r-bar); background: var(--c-accent); color: var(--c-text); }
.pal-foot { display: flex; gap: 14px; padding: 7px 14px; border-top: 1px solid var(--c-border-soft); background: var(--c-panel); color: var(--c-text-muted); font-size: 11px; }
.pal-foot b { font-family: var(--font-mono); font-weight: var(--weight-title); color: var(--c-text-muted); }
.outline-peek { background: linear-gradient(180deg, var(--c-bg), var(--c-panel-2)); color: var(--c-text); padding: 10px 24px 120px; text-align: center; overflow-x: clip; }
.peek-eyebrow { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; color: var(--c-text-muted); }
.peek-title { margin: 10px 0 0; font-size: 30px; line-height: 1.25; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; padding: 20px var(--gutter); font-family: var(--font-mono); font-size: 12px; color: var(--c-text-muted); }

/* 大纲浏览器与通用平台标签 */
.tabs { min-width: 0; }
[role="tablist"] { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 4px; border-bottom: 1px solid var(--c-border); }
[role="tab"] { position: relative; flex-shrink: 0; min-height: 44px; padding: 10px 18px; border: 0; border-radius: var(--r-item); background: var(--c-clear); color: var(--c-text-muted); font-weight: var(--weight-normal); }
[role="tab"]:hover { background: var(--c-panel); color: var(--c-text); }
[role="tab"][aria-selected="true"] { color: var(--c-text); font-weight: var(--weight-strong); box-shadow: inset 0 -2px 0 var(--c-accent); }
[role="tabpanel"] { min-width: 0; padding-top: 24px; }
.feature-browser { display: grid; grid-template-columns: 230px minmax(0, 1fr); padding: 0; overflow: hidden; text-align: left; }
.feature-browser [role="tablist"] { flex-direction: column; border: 0; border-right: 1px solid var(--c-border); padding: 24px 16px; background: var(--c-panel); color: var(--c-text); gap: 6px; }
.feature-browser [role="tab"] { text-align: left; width: 100%; padding-inline: 18px; box-shadow: none; }
.feature-browser [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; background: var(--c-accent); color: var(--c-text); border-radius: var(--r-bar); }
.feature-browser [role="tabpanel"] { padding: 36px; }
.feature-browser [role="tabpanel"] h3 { margin: 0 0 16px; }
.tab-progress { position: absolute; left: 18px; right: 18px; bottom: 0; height: 1px; background: var(--c-border); color: var(--c-text); overflow: hidden; }
.tab-progress::after { content: ""; display: block; height: 100%; background: var(--c-accent); color: var(--c-text); transform: scaleX(0); transform-origin: left; }
.tabs[data-autoplay].is-playing [aria-selected="true"] .tab-progress::after { animation: tab-countdown 8s linear forwards; }
@keyframes tab-countdown { to { transform: scaleX(1); } }
.toc { position: sticky; top: 16px; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-bottom: 32px; border: 1px solid var(--c-border); border-radius: var(--r-pop); background: var(--c-bg); color: var(--c-text); box-shadow: var(--shadow-xs); }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); font-size: 14px; }
.toc a:hover { background: var(--c-panel); color: var(--c-text); }
.faq-item { border: 1px solid var(--c-border); border-radius: var(--r-card-small); background: var(--c-bg); color: var(--c-text); margin-bottom: 12px; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; cursor: pointer; min-height: 64px; padding: 20px 24px; font-weight: var(--weight-title); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; color: var(--c-text-muted); font-family: var(--font-mono); font-size: 20px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 24px; color: var(--c-text-muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { border-radius: var(--r-card-small); }
.term-card dt { font-size: 20px; font-weight: var(--weight-title); margin-bottom: 8px; }
.term-card dd { margin: 0; color: var(--c-text-muted); }
.term-en { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }
.client-card { display: flex; flex-direction: column; gap: 20px; }
.client-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.client-head h3 { margin: 0; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-head-text { min-width: 0; flex: 1; }
.client-card .button-row { margin-top: auto; }
.client-card [data-rev]:empty { display: none; }
.client-card [data-rev] { font-family: var(--font-mono); font-size: 12px; color: var(--c-text-muted); }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--c-text-muted); font-size: 13px; }
.badge-primary { background: var(--c-text); color: var(--c-on-ink); border-color: var(--c-text); }
.badge-recommended { background: var(--c-panel-2); color: var(--c-accent-dark); }
.badge-archived { background: var(--c-panel); color: var(--c-text-muted); }
.post-card { display: flex; flex-direction: column; gap: 16px; }
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--c-text-muted); font-size: 12px; }
.post-card h3 { margin: 0; font-size: 21px; }
.post-card h3 a:hover { color: var(--c-accent); }
.post-card p { color: var(--c-text-muted); }
.post-card .text-link { margin-top: auto; align-self: flex-start; }
.callout { margin: 24px 0; padding: 22px 24px; border: 1px solid var(--c-border); border-left: 2px solid var(--c-accent); border-radius: var(--r-pop); background: var(--c-panel); color: var(--c-text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-title); }
.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; border: 1px solid var(--c-border); border-radius: var(--r-pop); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.data-table caption { text-align: left; padding: 16px; font-weight: var(--weight-title); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 14px 18px;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border);
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--c-panel); color: var(--c-text); font-weight: var(--weight-title); }
.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;
  width: 100%;
  border-collapse: collapse;
}
.article-body table th, .article-body table td { min-width: 7em; padding: 14px 18px; overflow-wrap: normal; word-break: normal; border-bottom: 1px solid var(--c-border); }
.data-table code, .prose table code, .article-body table code { overflow-wrap: anywhere; }
.dl-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; max-width: calc(100% - 32px); padding: 12px 20px; border: 1px solid var(--c-text); border-radius: var(--r-pill); background: var(--c-text); color: var(--c-on-ink); box-shadow: var(--shadow-pop); font-size: 14px; }
.dl-fab svg { width: 18px; height: 18px; flex-shrink: 0; }
.dl-fab:hover { background: var(--c-ink-hover); color: var(--c-on-ink); }
.article-download { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 40px; }
.article-download h3 { margin: 0 0 8px; }
.article-download p { margin: 0; color: var(--c-text-muted); }
.article-download > div { min-width: 0; flex: 1 1 240px; }

/* 静态设计预览家具 */
.preview-section { border-top: 1px solid var(--c-border); }
.preview-title { margin: 0 0 28px; font-size: 28px; }
.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatch { margin: 0; padding: 10px; border: 1px solid var(--c-border); border-radius: var(--r-pop); min-width: 0; }
.swatch-sample { height: 58px; border: 1px solid var(--c-border); border-radius: var(--r-item); color: var(--c-text); }
.swatch figcaption { padding-top: 10px; font-family: var(--font-mono); font-size: 11px; overflow-wrap: anywhere; }
.sw-bg { background: var(--c-bg); }
.sw-panel { background: var(--c-panel); }
.sw-panel-2 { background: var(--c-panel-2); }
.sw-panel-active { background: var(--c-panel-active); }
.sw-border { background: var(--c-border); }
.sw-border-soft { background: var(--c-border-soft); }
.sw-accent { background: var(--c-accent); }
.sw-accent-dark { background: var(--c-accent-dark); }
.sw-accent-tint { background: var(--c-accent-tint); }
.sw-accent-ring { background: var(--c-accent-ring); }
.sw-text { background: var(--c-text); }
.sw-muted { background: var(--c-text-muted); }
.sw-faint { background: var(--c-text-faint); }
.sw-on-ink { background: var(--c-on-ink); }
.sw-ink-hover { background: var(--c-ink-hover); }
.sw-success { background: var(--c-success); }
.sw-success-tint { background: var(--c-success-tint); }
.sw-warn { background: var(--c-warn); }
.sw-error { background: var(--c-error); }
.sw-glow-a { background: var(--c-glow-a); }
.sw-glow-b { background: var(--c-glow-b); }
.sw-clear { background: var(--c-clear); }
.sw-veil { background: var(--c-veil); }
.preview-mobile { display: none; margin-left: auto; position: relative; }
.preview-mobile summary { display: inline-flex; align-items: center; min-height: 44px; padding: 10px; cursor: pointer; }
.preview-mobile nav { position: absolute; top: 48px; right: 0; width: min(280px, calc(100vw - 32px)); padding: 12px; background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-pop); box-shadow: var(--shadow-pop); max-height: calc(100dvh - 90px); overflow-y: auto; }
.preview-mobile nav a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 12px; }
.preview-language summary { list-style: none; cursor: pointer; }
.preview-language summary::-webkit-details-marker { display: none; }
.preview-fab-sample { position: static; margin-top: 20px; }
@media (max-width: 1279px) { .palette { right: -12px; } }
@media (max-width: 1080px) {
  .win-body { grid-template-columns: 168px minmax(0, 1fr); }
  .minimap { display: none; }
  .preview-mobile { display: block; }
}
@media (max-width: 820px) {
  .win-body { grid-template-columns: minmax(0, 1fr); height: auto; }
  .outline, .palette { display: none; }
  .status span:last-child { display: none; }
  .device { width: calc(100% - 32px); }
  .lede { font-size: 15px; }
  .feature-browser { grid-template-columns: minmax(0, 1fr); }
  .feature-browser [role="tablist"] { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--c-border); padding: 12px; }
  .feature-browser [role="tab"] { width: auto; }
  .feature-browser [role="tabpanel"] { padding: 24px; }
}
@media (max-width: 768px) { .hero-title { font-size: clamp(24px, 4vw, 30px); } }
@media (max-width: 640px) {
  .hero-stack { padding-inline: var(--gutter); }
  .platforms { gap: 10px 18px; }
  .badge { font-size: 11px; }
  .chips { flex-direction: row; flex-wrap: wrap; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-item summary { padding: 18px 20px; }
  .faq-answer { padding-inline: 20px; }
  .toc { position: static; }
  .outline-peek { padding-inline: var(--gutter); padding-bottom: 64px; }
  .peek-title { font-size: 26px; }
  .win-title { font-size: 10px; }
  .lights { gap: 4px; }
  .lights i { width: 8px; height: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-animated .ln, .hero-animated .log-line { opacity: 1; transform: none; }
  .tab-progress { display: none; }
}