/* 静态首屏：光带、窗体与叠卡分别占一层。 */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h) - 96px);
  min-height: calc(100svh - var(--header-h) - 96px);
  display: grid;
  align-content: center;
  padding-block: 40px;
  border-bottom: 1px solid var(--border);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); column-gap: 40px; align-items: center; width: 100%; }
.copy { position: relative; z-index: 4; max-width: 520px; }
.hero h1 { font-size: var(--type-hero); line-height: 1.16; letter-spacing: -.022em; text-wrap: wrap; }
.h1-lead { display: block; color: var(--text); }
.h1-rest { color: var(--text-muted); }
.h1-key { color: var(--accent); }
@supports (background-clip: text) {
  .h1-key {
    background: linear-gradient(92deg, var(--accent), var(--ribbon-c));
    background-clip: text;
    color: var(--clear);
  }
}
@media (forced-colors: active) {
  .h1-key { background: none; color: inherit; }
}
.kicker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  padding: 6px 13px 6px 11px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.kicker__dot { width: 7px; height: 7px; border-radius: var(--r-circle); background: var(--success); box-shadow: 0 0 0 4px var(--success-halo); }
.kicker strong, .lede strong { color: var(--text); font-weight: var(--weight-medium); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.lede { margin: 28px 0 0; max-width: 470px; font-size: var(--type-body); line-height: 1.75; color: var(--text-muted); }
.platforms { margin-top: 30px; }
.platforms__label { margin: 0 0 10px; font-size: var(--type-xs); letter-spacing: .1em; color: var(--text-muted); }
.platforms ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.os {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 3px 12px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: color var(--ease-short), border-color var(--ease-short);
}
.os svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-muted); }
.os svg.os__tux { width: 13px; }
.os:hover { color: var(--accent); border-color: var(--accent-line); }
.os:hover svg { color: inherit; }
.device { position: relative; height: 600px; }
.ribbon {
  position: absolute;
  left: -120px;
  top: -700px;
  width: 1300px;
  max-width: none;
  height: 1900px;
  pointer-events: none;
  overflow: visible;
}
.ribbon--back { z-index: 1; }
.ribbon--front { z-index: 3; }
.ribbon-m { display: none; }
.st-a { stop-color: var(--ribbon-a); }
.st-b { stop-color: var(--ribbon-b); }
.st-c { stop-color: var(--ribbon-c); }
.st-w { stop-color: var(--white); }
.st-d { stop-color: var(--accent-dark); }
.so-0 { stop-opacity: 0; }
.so-45 { stop-opacity: .45; }
.so-70 { stop-opacity: .7; }
.silk { fill: none; stroke: var(--silk); }
.silk-faint { fill: none; stroke: var(--silk-faint); }
.shade { fill: none; stroke: var(--ribbon-shade); }

.mock {
  position: absolute;
  z-index: 2;
  left: 96px;
  top: 44px;
  width: 440px;
  height: 500px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transform: rotate(-4deg);
  transform-origin: 50% 0;
  box-shadow: 0 4px 0 var(--bg-panel-2), 0 4px 0 1px var(--border), 0 2px 4px var(--shadow-near), 0 44px 80px -26px var(--shadow-far), 0 20px 40px -22px var(--shadow-tint);
}
.mock__chrome {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding-inline: 16px;
  background: var(--bg-panel);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.mock__dots { display: flex; gap: 6px; flex-shrink: 0; }
.mock__dots i { width: 10px; height: 10px; border-radius: var(--r-circle); background: var(--dot); }
.mock__title { font-size: 13px; letter-spacing: .01em; }
.mock__title b { color: var(--text); font-weight: var(--weight-medium); }
.mock__body { flex: 1; display: flex; flex-direction: column; padding: 18px 28px 14px 24px; }
.mock__label { margin-bottom: 8px; color: var(--text-muted); font-size: var(--type-xs); line-height: 16px; letter-spacing: .06em; }
.seg {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  gap: 2px;
  padding: 3px;
  background: var(--bg-panel-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.seg span { display: grid; place-items: center; flex: 1 1 72px; width: 72px; min-width: 0; min-height: 28px; font-size: 13px; border-radius: var(--r-xs); }
.seg .is-on { color: var(--accent); font-weight: var(--weight-medium); background: var(--white); box-shadow: 0 0 0 1px var(--accent-line), 0 1px 2px var(--shadow-near); }
.rows { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 51px; border-bottom: 1px solid var(--border); }
.row__name { display: block; font-size: var(--type-sm); line-height: 1.35; color: var(--text); }
.row__hint { display: block; margin-top: 2px; font-size: var(--type-xs); line-height: 1.3; color: var(--text-muted); }
.sw { flex: none; position: relative; width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--bg-panel-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: var(--r-circle); background: var(--white); box-shadow: 0 1px 2px var(--shadow-far); }
.sw.is-on { background: var(--accent); box-shadow: none; }
.sw.is-on::after { left: 16px; }
.field {
  flex: none;
  display: flex;
  align-items: center;
  min-width: 84px;
  min-height: 30px;
  padding-inline: 10px;
  font: 13px var(--font-mono);
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.sub { display: flex; gap: 8px; margin-top: 12px; }
.sub__input, .sub__btn { display: flex; align-items: center; min-height: 34px; font-size: 13px; border-radius: var(--r-sm); }
.sub__input { flex: 1; min-width: 0; padding: 3px 12px; color: var(--text-muted); background: var(--bg-panel); border: 1px dashed var(--border-strong); }
.sub__btn { flex: none; padding-inline: 14px; font-weight: var(--weight-medium); color: var(--accent); background: var(--white); border: 1px solid var(--accent-line); }
.mock__foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 40px;
  padding-inline: 24px;
  font-size: var(--type-xs);
  color: var(--text-muted);
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.mock__foot code { padding: 0; color: var(--text); }
.mock__foot .kw { color: var(--accent); }
.mini {
  position: absolute;
  z-index: 3;
  left: 40px;
  top: 528px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transform: rotate(3deg);
  box-shadow: 0 3px 0 var(--bg-panel-2), 0 3px 0 1px var(--border), 0 2px 4px var(--shadow-near), 0 26px 44px -20px var(--shadow-far);
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  max-width: 100%;
  padding-inline: 11px;
  font: var(--type-xs) var(--font-mono);
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.fact::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: var(--r-circle); background: var(--accent); }
.fact__k { color: var(--text-muted); }
.next { position: relative; padding-top: 40px; padding-bottom: 96px; }
.next h2 { max-width: 820px; }
.next h2 span { color: var(--text-muted); }
.next .section__intro { margin-top: 18px; line-height: 1.75; }

@media (max-width: 1180px) {
  .mock { left: 64px; }
  .mini { left: 16px; }
}
@media (min-width: 861px) and (max-width: 1040px) {
  .mock { left: 14px; width: min(440px, calc(100% - 34px)); }
  .mini { left: 0; }
  .hero h1 { letter-spacing: -.02em; }
}
@media (max-width: 860px) {
  .hero { min-height: 0; padding-block: 132px 56px; overflow: hidden; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); row-gap: 44px; }
  .copy { max-width: none; }
  .hero h1 { font-size: 28px; letter-spacing: -.02em; }
  .ribbon { display: none; }
  .ribbon-m {
    display: block;
    position: absolute;
    z-index: 1;
    top: -70px;
    inset-inline: -12%;
    height: 170px;
    transform: skewY(-8deg);
    transform-origin: 100% 0;
    background: repeating-linear-gradient(100deg, var(--clear) 0 42px, var(--silk-faint) 42px 43px), var(--ribbon-spectrum);
    mask-image: linear-gradient(180deg, var(--white) 58%, var(--clear));
    pointer-events: none;
  }
  .device { height: auto; }
  .mock { position: relative; left: auto; top: auto; width: 100%; height: auto; transform: none; }
  .mock__body { padding-inline: 20px; }
  .mini { position: relative; left: auto; top: auto; width: max-content; max-width: 100%; margin-top: 16px; transform: none; }
}
@media (max-width: 640px) {
  .mini { justify-content: center; }
  .platforms ul { gap: 6px; }
}

/* 跨页拼板：十二轨，八加四／四加四加四。 */
.feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-top: 32px; }
.feature-card {
  position: relative;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  isolation: isolate;
  overflow-x: clip;
  transition: transform var(--ease-short), box-shadow var(--ease-short);
}
.feature-card--wide { grid-column: span 8; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.feature-card h3 { padding-inline-end: 48px; text-wrap: wrap; }
.feature-card p { margin: 0; }
.feature-card__jump {
  position: absolute;
  inset-block-start: var(--card-pad);
  inset-inline-end: var(--card-pad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r-sm);
  text-decoration: none;
}
.feature-card__jump svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.feature-card__art {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  min-width: 0;
  min-height: 138px;
  margin-top: auto;
  padding-top: 24px;
}
.feature-card__art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(0px - var(--card-pad)) calc(0px - var(--card-pad));
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: radial-gradient(ellipse at 98% 72%, var(--ribbon-a), var(--clear) 59%),
              radial-gradient(ellipse at 85% 100%, var(--ribbon-b), var(--clear) 67%),
              radial-gradient(ellipse at 32% 114%, var(--ribbon-c), var(--clear) 72%);
  opacity: .2;
  pointer-events: none;
}
.feature-slip { min-width: 0; padding: 12px; background: var(--white); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-card); }
.feature-slip .rows { margin: 0; border-top: 0; }
.feature-slip .row { min-height: 38px; }
.feature-slip .row:last-child { border-bottom: 0; }
.rules-slip { display: grid; gap: 6px; margin: 0; }
.rules-slip code { display: block; }
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card, .feature-card--wide { grid-column: span 1; }
  .feature-card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-card, .feature-card--wide { grid-column: 1; }
}

[role="tablist"], .toc-tabs {
  display: flex;
  gap: 8px 18px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
[role="tablist"] { padding: 4px 4px 0; }
[role="tab"] {
  flex: none;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 2px solid var(--clear);
  color: var(--text-muted);
  background: var(--bg);
  white-space: nowrap;
}
[role="tab"]:focus-visible { outline-offset: -3px; }
[role="tab"]:hover { color: var(--accent-dark); background: var(--accent-soft); }
[role="tab"][aria-selected="true"] { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: var(--weight-medium); }
[role="tabpanel"] { min-width: 0; padding-block: 20px; }
.toc-tabs { flex-wrap: wrap; padding-block: 8px; }
.toc-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 12px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: var(--r-sm);
  text-decoration: none;
}
.toc-tabs a:hover { text-decoration: underline; }

.faq { border-block: 1px solid var(--border); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary {
  position: relative;
  padding: 14px 36px 14px 4px;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  font-weight: var(--weight-medium);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 8px; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item > div { padding: 0 36px 16px 4px; color: var(--text-muted); }
.faq-item p:last-child { margin-bottom: 0; }

.term-card { border-inline-start: 2px solid var(--accent-line); }
.client-card, .post-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.client-card p, .post-card p { margin: 0; }
.client-card__head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-width: 0; }
.client-card__head > div { min-width: 0; }
.client-card__icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-card__actions { margin-top: auto; }
[data-version]:empty { display: none; }
.post-card__meta, [data-version] { color: var(--text-muted); font: var(--type-xs)/1.5 var(--font-mono); }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }

.badge, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--type-xs);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.badge--first, .badge--recommended { color: var(--accent-dark); background: var(--accent-soft); border-color: var(--accent-line); }
.badge--archive { color: var(--text); background: var(--bg-panel-2); }
.badge--first::before, .badge--archive::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: var(--r-circle); background: var(--accent); }
.badge--archive::before { background: var(--warn); }
.callout {
  margin: 20px 0;
  padding: 14px 18px;
  color: var(--text);
  background: var(--bg-panel);
  border-inline-start: 2px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.callout p:last-child { margin-bottom: 0; }

.table-wrap, .prose table, .content table, .article-body table, .data-table {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-md); }
.prose table, .content table, .article-body table, .data-table { display: block; border-collapse: collapse; }
.table-wrap > table { display: table; width: 100%; max-width: none; border-collapse: collapse; }
:is(.table-wrap, .data-table, .prose table, .content table, .article-body table) :is(th, td) {
  min-width: 7em;
  padding: 10px 14px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
}
:is(.table-wrap, .data-table, .prose table, .content table, .article-body table) th { color: var(--text); background: var(--bg-panel); }
:is(.table-wrap, .data-table, .prose table, .content table, .article-body table) caption { text-align: start; padding: 8px 14px; color: var(--text-muted); }

.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-block: 32px; }
.article-download__text { flex: 1 1 240px; min-width: 0; }
.dl-fab {
  position: fixed;
  z-index: 10;
  inset-inline-end: max(var(--gutter), env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  max-width: calc(100% - 2 * var(--gutter));
  border: 1px solid var(--accent-line);
  box-shadow: var(--shadow-lift);
}

/* 预览色块：颜色来源与生产组件相同。 */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 158px), 1fr)); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.swatch { padding: 8px; border: 1px solid var(--border); border-radius: var(--r-md); }
.swatch::before { content: ""; display: block; height: 42px; margin-bottom: 7px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--sample, var(--bg)); }
.swatch--white { --sample: var(--white); }
.swatch--panel { --sample: var(--bg-panel); }
.swatch--panel2 { --sample: var(--bg-panel-2); }
.swatch--border { --sample: var(--border); }
.swatch--strong { --sample: var(--border-strong); }
.swatch--guide { --sample: var(--guide); }
.swatch--accent { --sample: var(--accent); }
.swatch--dark { --sample: var(--accent-dark); }
.swatch--soft { --sample: var(--accent-soft); }
.swatch--line { --sample: var(--accent-line); }
.swatch--text { --sample: var(--text); }
.swatch--muted { --sample: var(--text-muted); }
.swatch--faint { --sample: var(--text-faint); }
.swatch--success { --sample: var(--success); }
.swatch--halo { --sample: var(--success-halo); }
.swatch--warn { --sample: var(--warn); }
.swatch--error { --sample: var(--error); }
.swatch--a { --sample: var(--ribbon-a); }
.swatch--b { --sample: var(--ribbon-b); }
.swatch--c { --sample: var(--ribbon-c); }
.swatch--dot { --sample: var(--dot); }
.swatch--head { --sample: var(--header-line); }
.swatch--near { --sample: var(--shadow-near); }
.swatch--far { --sample: var(--shadow-far); }
.swatch--tint { --sample: var(--shadow-tint); }
.swatch--veil { --sample: var(--veil); }
.swatch--silk { --sample: linear-gradient(var(--silk), var(--silk)), var(--text); }
.swatch--silk-faint { --sample: linear-gradient(var(--silk-faint), var(--silk-faint)), var(--text); }
.swatch--shade { --sample: var(--ribbon-shade); }
.swatch--clear { --sample: var(--clear); }
.swatch--ribbon { --sample: var(--ribbon-spectrum); }