/* 首屏：按确认稿保留标题、平台和出血样张的相对位置。 */
.hero { position: relative; overflow: hidden; overflow-x: clip; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.horizon {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 560px;
  opacity: .08;
  pointer-events: none;
}
.horizon stop { stop-color: var(--text); }
.horizon path { fill: none; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero-copy { position: relative; z-index: 1; text-align: center; padding-top: 56px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 6px 15px 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}
.hero-copy .badge { margin: 1em 0; }
.badge b { color: var(--text); font-weight: var(--weight-label); }
.dot, .ok { display: inline-block; border-radius: var(--r-pill); }
.dot { position: relative; width: 8px; height: 8px; background: var(--accent); color: var(--surface); }
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--pulse);
  color: var(--text);
  animation: badge-breath 2.6s ease-out infinite;
}
@keyframes badge-breath {
  0% { transform: scale(1); opacity: .9; }
  70%,100% { transform: scale(2.6); opacity: 0; }
}
.hero h1 { margin: 24px auto 0; font-size: var(--type-hero); line-height: 1.16; }
.hero .line { display: block; }
.kw { color: var(--accent); }
.cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lede { max-width: 600px; margin: 22px auto 0; font-size: 16px; line-height: 1.72; color: var(--text-muted); }
.lede strong { color: var(--text); font-weight: var(--weight-label); }
.platforms {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 30px;
}
.platforms a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  text-underline-offset: 5px;
  transition: color var(--ease-quick);
}
.platforms a:hover { color: var(--text); text-decoration: underline var(--accent) 1.5px; }
.platforms svg { width: 15px; height: 15px; }

.tiles {
  position: relative;
  z-index: 1;
  width: 118%;
  margin: 52px 0 0 -9%;
  height: 420px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.25fr) minmax(0,1fr);
  gap: 14px;
}
.tile { position: relative; border-radius: var(--r-tile); }
.tile--wine { background: var(--accent); color: var(--bg); }
.tile--sage { background: var(--tile-sage); color: var(--text); }
.tile--sand { background: var(--tile-sand); color: var(--text); }
.tile-page {
  position: absolute;
  top: 44px;
  bottom: 0;
  padding: 28px 26px;
  border-radius: var(--r-page) var(--r-page) 0 0;
}
.tile--wine .tile-page { right: 44px; width: 300px; background: var(--tile-sand); color: var(--text); }
.tile--sage .tile-page {
  left: 50%;
  width: 68%;
  transform: translateX(-50%);
  padding: 28px 34px;
  background: var(--tile-sage-deep);
  color: var(--bg);
}
.tile--sand .tile-page { left: 44px; width: 310px; background: var(--bg); color: var(--text); }
.kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.2;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.tile--sage .kicker { color: var(--bg); }
.page-title {
  margin: 10px 0 20px;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.page-title--wide { font-size: 40px; letter-spacing: -.045em; line-height: 1; }
.opts, .switches { list-style: none; margin: 0; padding: 0; }
.opts li, .switches li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 13px;
  border-top: 1px solid var(--hair-ink);
}
.rd {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--text);
  border-radius: var(--r-pill);
}
.is-on .rd::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--text);
  color: var(--surface);
}
.opt-name { font-size: 15.5px; font-weight: 500; }
.is-on .opt-name { font-weight: 700; }
.opt-name i { margin-left: 4px; font-style: normal; font-weight: 500; font-size: 13px; color: var(--text-muted); }
.opt-key, .sw-state { margin-left: auto; font: 11.5px var(--font-mono); color: var(--text-muted); }
.code {
  padding: 16px 0 0;
  border-top: 1px solid var(--hair-paper);
  border-radius: 0;
  background: var(--clear);
  color: var(--bg);
  font-size: 14px;
  line-height: 1.85;
}
.code .dim { color: var(--bg); }
.code .pol { color: var(--tile-sand); }
.sw-label { display: flex; flex-direction: column; gap: 2px; }
.sw-label b { font-size: 15px; font-weight: var(--weight-label); line-height: 1.35; }
.sw-label span { font: 11px/1.6 var(--font-mono); color: var(--text-muted); }
.sw-state { font-size: 12px; }
.sw {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--border);
  color: var(--text);
}
.sw::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: inherit;
  background: var(--surface);
  color: var(--text);
}
.sw.on { background: var(--text); color: var(--surface); }
.sw.on::after { transform: translateX(16px); }
.page-cat { position: absolute; top: -26px; right: 22px; width: 56px; height: 65px; object-fit: contain; }
.facts { padding-top: 40px; }
.facts-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-muted);
  font: 13px/1.6 var(--font-mono);
}
.facts-bar li { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; }
.facts-bar li + li { border-inline-start: 1px solid var(--border); }
.facts-bar b { font-weight: var(--weight-label); color: var(--text); }
.ok { width: 7px; height: 7px; background: var(--success); color: var(--surface); }

/* 横向案例带与客户端剖面 */
.feature-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,2.65fr);
  align-items: start;
  gap: clamp(20px,4vw,56px);
}
.feature-heading { position: sticky; top: 28px; }
.feature-heading p { margin-top: 14px; color: var(--text-muted); }
.rail-controls { display: flex; gap: 8px; }
.rail-controls .btn { width: var(--tap); min-height: var(--tap); padding: 0; }
.feature-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(85%,348px);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  padding-block: 4px 12px;
}
.feature-sheet {
  min-width: 0;
  display: flex;
  padding: clamp(10px,2vw,20px);
  border-radius: var(--r-tile);
  scroll-snap-align: start;
  background: var(--accent);
  color: var(--bg);
}
.feature-sheet:nth-child(3n+2) { background: var(--tile-sage); color: var(--text); }
.feature-sheet:nth-child(3n) { background: var(--tile-sand); color: var(--text); }
.feature-paper {
  min-width: 0;
  width: 100%;
  min-height: 360px;
  padding: clamp(14px,2vw,24px);
  border-radius: var(--r-page);
  background: var(--bg);
  color: var(--text);
}
.feature-paper h3 { font-size: clamp(24px,3vw,38px); }
.feature-paper p { margin: 1em 0; }
.rail-progress { width: 100%; height: 6px; margin-top: 12px; accent-color: var(--text); }
.window-frame {
  padding: clamp(16px,5vw,72px);
  border-radius: var(--r-box);
  background: var(--bg-panel-2);
  color: var(--text);
}
.window-sheet { border-radius: var(--r-card); background: var(--surface); color: var(--text); }
.window-title { padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: var(--weight-display); }
.window-body { display: grid; grid-template-columns: minmax(0,11rem) minmax(0,1fr); }
.window-sidebar { list-style: none; margin: 0; padding: 18px; border-inline-end: 1px solid var(--border); }
.window-sidebar li { padding: 6px 12px; }
.window-sidebar .current { border-radius: var(--r-pill); background: var(--bg-panel-2); color: var(--text); }
.window-settings { padding: clamp(16px,4vw,48px); }
.window-settings p { margin: .6em 0 1em; color: var(--text-muted); }

/* 文档、下载与文章 */
[role="tablist"], .toc-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
[role="tab"], .toc-tabs a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: var(--tap);
  max-width: 100%;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--clear);
  color: var(--text-muted);
  overflow-wrap: anywhere;
  text-decoration: none;
}
[role="tab"]:hover, .toc-tabs a:hover { background: var(--surface); color: var(--text); }
[role="tab"][aria-selected="true"], .toc-tabs a[aria-current="location"] { background: var(--text); color: var(--bg); }
[role="tabpanel"] { min-width: 0; margin-top: 16px; }
.toc { align-self: start; }
.toc--sticky { position: sticky; top: 16px; z-index: 2; }
.toc-tabs a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .23em; }

.faq-item {
  margin-block: 10px;
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
.faq-item summary { padding: 16px 20px; font-weight: var(--weight-label); }
.faq-item summary::marker { color: var(--text-muted); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 16px 20px; }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { border-block-start: 4px solid var(--border-strong); }
.client-card { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.client-card header, .post-card header { margin-bottom: 12px; }
.client-card h3, .post-card h3 { margin-top: 10px; }
.client-card .card-actions { margin-top: 16px; }
[data-rev]:empty { display: none; }
.client-rev, .post-meta { font-family: var(--font-mono); font-size: .84rem; color: var(--text-muted); }
.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: .8rem;
  overflow-wrap: anywhere;
}
.tag--first { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag--recommended { background: var(--bg-panel-2); color: var(--text); }
.tag--archived { background: var(--surface); color: var(--text-muted); border-style: dashed; }
.post-card .text-link { font-weight: var(--weight-label); }
.callout {
  margin-inline: 0;
  padding: 16px 20px;
  border-inline-start: 4px solid var(--border-strong);
  border-radius: var(--r-page);
  background: var(--bg-panel);
  color: var(--text);
}
.callout > :last-child { margin-bottom: 0; }
.table-wrap, .prose table, .article-body table, .doc-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  max-width: 100%;
  min-width: 0;
}
.table-wrap table { display: table; }
.data-table, .prose table, .article-body table, .doc-body table {
  width: 100%;
  border-collapse: collapse;
}
:is(.data-table,.prose table,.article-body table,.doc-body table) :is(th,td) {
  min-width: 7em;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table,.prose table,.article-body table,.doc-body table) th { background: var(--bg-panel-2); color: var(--text); }
.data-table caption { padding: .5rem; text-align: start; font-weight: var(--weight-label); }
.download-guide { margin-block: 32px 0; }
.has-dl-fab .site-footer { padding-bottom: 100px; }
.dl-fab {
  position: fixed;
  inset-inline-end: max(16px,env(safe-area-inset-right));
  inset-block-end: max(16px,env(safe-area-inset-bottom));
  z-index: 3;
  max-width: calc(100% - 40px);
}
.dl-fab svg { width: 18px; height: 18px; }

/* 设计预览 */
.preview-block { margin-top: 42px; }
.preview-block > h2 { margin-bottom: 18px; }
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,140px),1fr));
  gap: 12px;
}
.swatch { display: grid; gap: 6px; margin: 0; }
.swatch::before {
  content: "";
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--r-page);
  background: var(--chip);
  color: var(--text);
}
.swatch[data-token="bg"] { --chip: var(--bg); }
.swatch[data-token="bg-panel"] { --chip: var(--bg-panel); }
.swatch[data-token="bg-panel-2"] { --chip: var(--bg-panel-2); }
.swatch[data-token="surface"] { --chip: var(--surface); }
.swatch[data-token="border"] { --chip: var(--border); }
.swatch[data-token="border-strong"] { --chip: var(--border-strong); }
.swatch[data-token="accent"] { --chip: var(--accent); }
.swatch[data-token="accent-dark"] { --chip: var(--accent-dark); }
.swatch[data-token="text"] { --chip: var(--text); }
.swatch[data-token="text-muted"] { --chip: var(--text-muted); }
.swatch[data-token="ink-hover"] { --chip: var(--ink-hover); }
.swatch[data-token="success"] { --chip: var(--success); }
.swatch[data-token="warn"] { --chip: var(--warn); }
.swatch[data-token="error"] { --chip: var(--error); }
.swatch[data-token="tile-sage"] { --chip: var(--tile-sage); }
.swatch[data-token="tile-sage-deep"] { --chip: var(--tile-sage-deep); }
.swatch[data-token="tile-sand"] { --chip: var(--tile-sand); }
.swatch[data-token="hair-ink"] { --chip: var(--hair-ink); }
.swatch[data-token="hair-paper"] { --chip: var(--hair-paper); }
.swatch[data-token="paper-dim"] { --chip: var(--paper-dim); }
.swatch[data-token="pulse"] { --chip: var(--pulse); }
.swatch[data-token="veil"] { --chip: var(--veil); }
.swatch[data-token="clear"] { --chip: var(--clear); }
.display-sample { font: var(--weight-display) var(--type-h1)/1.16 var(--font-display); letter-spacing: -.02em; }
.preview-mobile { display: none; }

@media (max-width:960px) {
  .tiles { width: auto; margin: 44px 16px 0; grid-template-columns: minmax(0,1fr); height: 380px; }
  .tiles :is(.tile--wine,.tile--sand) { display: none; }
  .tile--sage .tile-page { width: calc(100% - 48px); padding: 24px 22px; }
  .facts-bar { border-radius: var(--r-box); }
  .facts-bar li { padding: 12px 18px; }
  .facts-bar li + li { border-inline-start: 0; }
  .preview-mobile { display: block; }
}
@media (max-width:768px) {
  .feature-layout { grid-template-columns: minmax(0,1fr); }
  .feature-heading, .toc--sticky { position: static; }
}
@media (max-width:560px) {
  .hero-copy { padding-top: 40px; }
  .badge { font-size: 12px; }
  .lede { font-size: 15px; }
  .platforms { gap: 10px 18px; }
  .page-title--wide { font-size: 32px; }
  .code { font-size: 12.5px; }
  .facts-bar li { padding: 8px 9px; gap: 5px; }
  .window-body { grid-template-columns: minmax(0,1fr); }
  .window-sidebar { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-inline-end: 0; border-block-end: 1px solid var(--border); }
}
@media (prefers-reduced-motion:reduce) {
  .dot::after { animation: none; opacity: 0; }
}