/* 首屏保留已确认稿的上下构图与装置尺寸。 */
.hero { position: relative; overflow: hidden; padding-top: 44px; text-align: center; }
.hero-grid {
  position: absolute;
  left: 50%;
  top: 188px;
  z-index: 0;
  width: 880px;
  height: 320px;
  transform: translateX(-50%);
  background-color: var(--clear);
  color: var(--text);
  background-image: linear-gradient(var(--grid-line) 1px, var(--clear) 1px), linear-gradient(90deg, var(--grid-line) 1px, var(--clear) 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 50% 58% at 50% 56%, var(--mask-solid) 30%, var(--clear) 100%);
  mask-image: radial-gradient(ellipse 50% 58% at 50% 56%, var(--mask-solid) 30%, var(--clear) 100%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 22px; padding: 0; }
.chip, .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chip-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--accent-alt); color: var(--text); }
.hero-title { margin: 0 auto; max-width: 920px; font-size: var(--size-h1); font-weight: 800; line-height: 1.14; letter-spacing: var(--tracking-title); color: var(--text); }
.hero-title .line { display: block; }
.hero-title .hl { color: var(--accent-alt); }
.lede { margin: 18px auto 0; max-width: 700px; font-size: 17px; line-height: 1.7; color: var(--text-muted); text-wrap: balance; }
.lede strong { color: var(--text); font-weight: 600; }
.cta-row { margin-top: 28px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 34px; }
.platforms { margin-top: 22px; display: flex; justify-content: center; align-items: center; gap: 20px; }
.platforms-label { padding-right: 20px; border-right: 1px solid var(--border); font-size: 13px; line-height: 20px; color: var(--text-muted); }
.platform-list { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.platform { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.platform svg { width: 16px; height: 16px; color: var(--text); }
.platform:hover, .platform:hover svg { color: var(--accent); }

.stage {
  position: relative;
  z-index: 1;
  height: 390px;
  margin: 34px auto 0;
  overflow: hidden;
  text-align: left;
  -webkit-mask-image: linear-gradient(to bottom, var(--mask-solid) calc(100% - 26px), var(--clear));
  mask-image: linear-gradient(to bottom, var(--mask-solid) calc(100% - 26px), var(--clear));
}
.board { position: relative; width: 82%; height: 330px; margin: 0 auto; padding: 22px 24px 0; background: var(--bg-panel); color: var(--text); border-radius: var(--radius-board); box-shadow: var(--shadow-board); overflow: hidden; }
.board-top { display: flex; align-items: center; justify-content: space-between; height: 26px; margin-bottom: 16px; }
.mode-pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg); color: var(--text); font-family: var(--font-mono); font-size: 12px; }
.mode-pill i { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--accent-alt); color: var(--text); }
.board-file { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.board-file svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col { position: relative; min-width: 0; padding: 0 16px; }
.col:first-child { padding-left: 0; }
.col:last-child { padding-right: 0; }
.col + .col::before { content: ""; position: absolute; left: 0; top: 2px; height: 400px; border-left: 1px solid var(--border); }
.col-head { display: flex; align-items: center; justify-content: space-between; height: 26px; margin-bottom: 12px; }
.lane { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--border); font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; }
.dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--radius-round); }
.dot-direct { background: var(--success); color: var(--text); }
.dot-proxy { background: var(--accent); color: var(--text); }
.dot-reject { background: var(--error); color: var(--text); }
.col-meta { font-size: 12px; color: var(--text-muted); }
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list > li + li { margin-top: 10px; }
.rule { position: relative; padding: 12px 14px; background: var(--bg); color: var(--text); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.rule-desc { margin: 0; font-size: 14px; font-weight: 500; line-height: 20px; }
.rule-line { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rule-line code { min-width: 0; font-size: 12px; line-height: 18px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rule-line .k { color: var(--text); font-weight: 600; }
.pol { flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-sm); }
.pol svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pol-direct { color: var(--success); background: var(--success-soft); }
.pol-proxy { color: var(--accent); background: var(--accent-soft); }
.pol-reject { color: var(--error); background: var(--error-soft); }
.rule-slot { position: relative; border-radius: var(--radius-card); background: var(--bg-panel-2); color: var(--text); outline: 1.5px dashed var(--slot-line); outline-offset: -1.5px; }
.rule.is-lifted { z-index: 3; transform: translate(-40px, -10px) rotate(-1.6deg); box-shadow: var(--shadow-lift); }
.wide { position: absolute; z-index: 4; padding: 20px 28px; background: var(--bg); color: var(--text); border-radius: var(--radius-lg); box-shadow: var(--shadow-wide); }
.wide-a { left: 5%; top: 296px; width: 50%; }
.wide-b { right: 4%; top: 322px; width: 40%; }
.yaml { margin: 0; padding: 0; border-radius: var(--radius-sm); background: var(--bg); color: var(--text-muted); font-family: var(--font-mono); font-size: 19px; line-height: 30px; white-space: pre; overflow: hidden; }
.yaml .y-key { color: var(--text); font-weight: 600; }
.yaml .y-val { color: var(--accent-dark); }
.wide-note { margin: 10px 0 0; font-size: 14px; color: var(--text-muted); }
.wide-tag { position: absolute; top: 20px; right: 22px; height: 24px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text-muted); font-size: 12px; font-weight: 600; }

.next { padding-top: 112px; padding-bottom: 128px; text-align: center; }
.next-title { margin: 0; font-size: var(--size-h2); font-weight: 800; line-height: 1.2; }
.next-lede { margin: 14px auto 0; max-width: 620px; font-size: 16px; color: var(--text-muted); }
.tabs { min-width: 0; }
.seg, [role="tablist"].tab-list { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; margin-top: 36px; padding: 6px; border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text); }
.seg [role="tab"], .tab-list [role="tab"] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border: 0; border-radius: var(--radius-pill); background: var(--clear); color: var(--text); font-size: 15px; font-weight: 600; }
.seg [role="tab"]:hover, .tab-list [role="tab"]:hover { background: var(--bg-panel-2); color: var(--text); }
.seg [aria-selected="true"], .tab-list [aria-selected="true"] { background: var(--text); color: var(--bg); }
.tab-panel { margin-top: 36px; min-width: 0; }
.tab-panel:focus-visible { outline-offset: 8px; }
.feature-panel { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 56px; align-items: center; text-align: left; }
.feature-panel > * { min-width: 0; }
.feature-eyebrow { font-size: 20px; font-weight: 400; margin: 0 0 24px; }
.feature-eyebrow b { font-weight: 800; }
.feature-copy h3 { font-size: var(--size-h2); font-weight: 800; margin: 0 0 20px; }
.feature-copy p { color: var(--text-muted); line-height: 1.85; }
.cfg-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.cfg-chips li { display: inline-flex; align-items: center; min-height: 28px; max-width: 100%; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--bg); color: var(--text); box-shadow: 0 0 0 1px var(--border); font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.feature-art { position: relative; isolation: isolate; padding: 36px 20px; overflow-x: clip; }
.feature-art::before { content: ""; position: absolute; z-index: -1; inset: 20px 10px 36px; border-radius: var(--radius-card); background: var(--accent); color: var(--on-accent); transform: skewY(-5deg) rotate(-2deg); }
.config-card { position: relative; padding: 28px 24px; border-radius: var(--radius-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-lift); }
.config-card pre { margin: 12px 0; padding: 0; background: var(--bg); color: var(--text); font-size: 13px; }
.config-label { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; }
.annotation { display: block; width: 160px; height: 54px; margin: 8px 0 0 auto; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.toc { position: sticky; top: 16px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; margin-block: 28px; border-radius: var(--radius-lg); background: var(--bg-panel); color: var(--text); }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-pill); color: var(--text); font-size: 14px; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--accent); color: var(--on-accent); }
.faq-item { margin-block: 12px; border-radius: var(--radius-lg); background: var(--bg-panel); color: var(--text); }
.faq-item summary { position: relative; padding: 22px 56px 22px 24px; list-style: none; cursor: pointer; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; top: 20px; right: 24px; color: var(--accent); font-size: 22px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 24px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { min-width: 0; padding: 28px; border-radius: var(--radius-xl); background: var(--bg-panel); color: var(--text); }
.term-card h3 { margin: 0 0 8px; }
.term-name { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.term-card p { margin: 16px 0; color: var(--text-muted); }
.client-card { min-width: 0; padding: 32px; border-radius: var(--radius-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-wide); }
.client-card.is-primary { box-shadow: var(--shadow-lift); }
.client-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.client-head h3 { margin: 0; }
.client-card p { color: var(--text-muted); }
.client-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.client-version { display: inline-block; margin-top: 8px; font-family: var(--font-mono); color: var(--text-muted); font-size: 13px; }
[data-version]:empty { display: none; }
.badge-primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.badge-recommended { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.badge-archived { background: var(--bg-panel-2); color: var(--text-muted); }
.badge-success { background: var(--success-soft); color: var(--text); }
.badge-warning { background: var(--bg-panel-2); color: var(--text); border-left: 3px solid var(--warn); }
.badge-error { background: var(--error-soft); color: var(--text); }
.post-card { min-width: 0; padding: 28px; border-radius: var(--radius-xl); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--text-muted); font-size: 13px; }
.post-card h3 { font-size: 21px; line-height: 1.5; margin: 0 0 14px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { color: var(--text-muted); font-size: 14px; }
.callout { margin-block: 28px; padding: 24px 28px; border: 0; border-left: 4px solid var(--accent); border-radius: var(--radius-card); background: var(--bg-panel); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout.is-warning { border-left-color: var(--warn); }
.callout.is-error { border-left-color: var(--error); }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; border-radius: var(--radius-card); overscroll-behavior-x: contain; }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg); color: var(--text); font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th { background: var(--bg-panel); color: var(--text); font-weight: 600; }
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  overscroll-behavior-x: contain;
}
.prose table code, .data-table code { overflow-wrap: anywhere; }
.article-download { margin-top: 64px; padding: 32px; border-radius: var(--radius-xl); background: var(--bg-panel); color: var(--text); }
.article-download h2 { margin: 0 0 14px; font-size: 24px; }
.article-download p { color: var(--text-muted); }
.dl-fab {
  position: fixed;
  z-index: 25;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: calc(100% - 40px);
  min-height: 56px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
  font-weight: 600;
}
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.dl-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.article-with-fab { padding-bottom: 96px; }

/* 预览页家具，不依赖内联样式。 */
.preview-section { padding-top: 80px; padding-bottom: 80px; }
.preview-section > h2 { margin: 0 0 32px; }
.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { min-width: 0; padding: 12px; background: var(--bg-panel); color: var(--text); border-radius: var(--radius-card); }
.swatch code { font-size: 12px; }
.color-sample { height: 64px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; color: var(--text); }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--bg-panel); }
.sw-panel-2 { background: var(--bg-panel-2); }
.sw-border { background: var(--border); }
.sw-accent { background: var(--accent); color: var(--on-accent); }
.sw-dark { background: var(--accent-dark); color: var(--on-accent); }
.sw-alt { background: var(--accent-alt); color: var(--text); }
.sw-text { background: var(--text); color: var(--bg); }
.sw-muted { background: var(--text-muted); color: var(--bg); }
.sw-success { background: var(--success); color: var(--bg); }
.sw-warn { background: var(--warn); color: var(--text); }
.sw-error { background: var(--error); color: var(--bg); }
.sw-on { background: var(--on-accent); }
.sw-grid { background: var(--grid-line); }
.sw-slot { background: var(--slot-line); }
.sw-success-soft { background: var(--success-soft); }
.sw-accent-soft { background: var(--accent-soft); }
.sw-error-soft { background: var(--error-soft); }
.sw-mask { background: var(--mask-solid); color: var(--bg); }
.sw-clear { background: var(--clear); }
.sw-veil { background: var(--veil); color: var(--text); }
.sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-block: 24px; }
.type-display { font-family: var(--font-display); font-size: var(--size-h1); font-weight: 800; line-height: 1.14; }
.type-section { font-family: var(--font-display); font-size: var(--size-h2); font-weight: 800; }
@media (max-width: 1100px) {
  .board { width: 94%; }
  .wide-a { left: 1%; width: 56%; }
  .wide-b { right: 1%; width: 44%; }
}
@media (max-width: 760px) {
  .hero { padding-top: 28px; }
  .hero-grid { width: 100%; top: 220px; }
  .lede { font-size: 15px; }
  .cta-row { flex-direction: column; gap: 16px; }
  .platforms-label { display: none; }
  .platform-list { flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
  .stage { height: auto; padding-bottom: 26px; }
  .board { width: 100%; height: auto; padding: 18px 16px; border-radius: var(--radius-xl); }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .col { padding: 0; }
  .col + .col::before { display: none; }
  .rule.is-lifted { transform: none; }
  .wide-a { position: relative; left: auto; top: auto; width: 100%; margin-top: 20px; }
  .wide-b { display: none; }
  .yaml { font-size: 15px; line-height: 24px; }
  .seg [role="tab"], .tab-list [role="tab"] { min-height: 38px; padding: 9px 14px; font-size: 14px; }
  .feature-panel { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rule.is-lifted { transform: none; }
  .client-card, .term-card, .post-card, .article-download { padding: 22px; }
  .callout { padding: 20px; }
  .toc { position: static; }
  .dl-fab { min-height: 48px; padding: 10px 18px; font-size: 14px; }
}