/* 首屏：平铺色场、窗口对照表和错位底板。 */
.stage { position: relative; isolation: isolate; padding-block-end: 48px; }
.stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: var(--h-field);
  background: var(--c-field);
  color: var(--c-on-field);
}
.hero {
  display: grid;
  grid-template-columns: 530px minmax(0, 1fr);
  grid-template-rows: calc(var(--h-field) - var(--h-nav)) auto;
  column-gap: 56px;
}
.copy { grid-area: 1 / 1; align-self: center; padding-bottom: 6px; color: var(--c-on-field); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 15px 4px 13px;
  border: 1px solid var(--c-on-field-line);
  border-radius: var(--r-pill);
  color: var(--c-on-field-soft);
  font: 12.5px/1.6 var(--f-mono);
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: var(--r-dot);
  background: var(--c-coral);
  color: var(--c-field);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--c-coral-halo);
  color: var(--c-field);
  animation: field-breathe 2.6s var(--ease) infinite;
}
@keyframes field-breathe {
  0% { transform: scale(1); opacity: .9; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
.title { margin: 24px 0 0; line-height: 1.16; letter-spacing: -.025em; }
.title-a { display: block; color: var(--c-on-field); }
.title-b { display: block; color: var(--c-coral); }
.ctas { margin-top: 32px; }
.lede { margin: 26px 0 0; max-width: 29em; line-height: 1.72; color: var(--c-on-field-soft); }
.lede strong { color: var(--c-on-field); font-weight: var(--weight-medium); }
.platforms { display: flex; align-items: center; margin-top: 30px; }
.platforms-label {
  padding-right: 18px;
  color: var(--c-on-field-faint);
  font: var(--fs-micro)/1.6 var(--f-mono);
  letter-spacing: .04em;
  white-space: nowrap;
}
.platforms ul { display: flex; flex-wrap: wrap; align-items: center; row-gap: 10px; margin: 0; padding: 0; list-style: none; }
.platforms li { display: flex; padding-inline: 16px; border-left: 1px solid var(--c-on-field-line); }
.platforms li:last-child { padding-right: 0; }
.platforms a { display: inline-flex; align-items: center; gap: 8px; color: var(--c-on-field-soft); font-size: var(--fs-small); transition: color .2s var(--ease); }
.platforms a:hover { color: var(--c-on-field); }
.os-ico { display: block; width: 16px; height: 16px; }
.os-ico-tux { width: 15px; height: 17px; }

.sheet {
  grid-area: 1 / 2 / span 2;
  position: relative;
  align-self: start;
  min-height: var(--h-card);
  margin-top: calc(var(--h-field) - var(--h-nav) - var(--h-card) * .4);
}
.sheet-back {
  position: absolute;
  inset: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-panel);
  color: var(--c-text);
  transform: translate(var(--sheet-offset), var(--sheet-offset));
  animation: paper-settle .9s .12s var(--ease) both;
}
.sheet-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: inherit;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: 0 1px 0 var(--c-hairline);
  animation: paper-rise .8s var(--ease) both;
}
@keyframes paper-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes paper-settle {
  from { opacity: 0; transform: translate(0, 0); }
  to { opacity: 1; transform: translate(var(--sheet-offset), var(--sheet-offset)); }
}
.chrome { position: relative; flex: none; height: 44px; display: flex; align-items: center; gap: 7px; padding-inline: 18px; border-bottom: 1px solid var(--c-border); }
.chrome-dot { width: 10px; height: 10px; border-radius: var(--r-dot); background: var(--c-chrome-dot); color: var(--c-text); }
.chrome-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--c-muted);
  font: 12.5px/1.6 var(--f-mono);
  white-space: nowrap;
}
.grid-wrap { flex: 1 1 auto; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.grid-wrap:focus-visible { outline-offset: -3px; }
.cmp { width: 100%; min-width: 520px; border-collapse: collapse; table-layout: fixed; }
.col-key { width: 37%; }
.col-def { width: 25%; }
.col-pick { width: 38%; }
.cmp :is(th, td) { min-width: 7em; padding-inline: 20px; text-align: left; overflow-wrap: normal; word-break: normal; }
.cmp thead th {
  height: 50px;
  background: var(--c-panel);
  color: var(--c-muted);
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  letter-spacing: .04em;
}
.cmp thead .pick { background: var(--c-accent); color: var(--c-on-field); letter-spacing: .02em; }
.cmp tbody :is(th, td) {
  height: 53px;
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-small);
  font-weight: var(--weight-book);
}
.cmp tbody tr:nth-child(even) > * { background: var(--c-panel); color: var(--c-text); }
.cmp tbody tr > .pick, .cmp tbody tr:nth-child(even) > .pick { background: var(--c-panel-pink); color: var(--c-text); }
.cell { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.sheet .mono { font-size: 13px; letter-spacing: -.01em; }
.mark { width: 16px; height: 16px; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mark-on { stroke: var(--c-text); }
.mark-off { stroke: var(--c-dash); }
.pick .mark-on, .legend .mark-on { stroke: var(--c-accent); }
.sheet-foot {
  flex: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-inline: 20px;
  border-top: 1px solid var(--c-border);
  color: var(--c-muted);
  font: var(--fs-micro)/1.6 var(--f-mono);
}
.sheet-foot .key { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 12px; height: 12px; border: 1px solid var(--c-border); border-radius: var(--r-chip); background: var(--c-panel-pink); color: var(--c-text); }
.note { grid-area: 2 / 1; max-width: 470px; padding-top: 52px; }
.note-kicker { margin: 0; color: var(--c-accent); font: var(--fs-micro)/1.6 var(--f-mono); letter-spacing: .06em; }
.note-title { margin: 12px 0 0; font-size: 22px; line-height: 1.4; letter-spacing: -.012em; }
.note-body { margin: 12px 0 0; color: var(--c-muted); font-size: 15px; line-height: 1.75; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 20px 0 0; padding: 0; list-style: none; color: var(--c-muted); font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.note-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding-bottom: 3px; border-bottom: 1px solid var(--c-accent); color: var(--c-accent); font-size: 15px; font-weight: var(--weight-medium); }
.note-link .btn-ico { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.note-link:hover .btn-ico { transform: translateX(3px); }

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 40px; }
  .platforms { flex-wrap: wrap; row-gap: 10px; }
  .platforms-label { width: 100%; }
  .platforms li:first-child { padding-left: 0; border-left: 0; }
}
@media (min-width: 961px) and (max-width: 1100px) {
  .sheet .cmp { min-width: 460px; }
  .cmp :is(th, td) { padding-inline: 12px; }
}
@media (max-width: 960px) {
  .stage::before { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .copy {
    padding-block: 40px 190px;
    background: var(--c-field);
    color: var(--c-on-field);
    box-shadow: 0 0 0 var(--gutter) var(--c-field);
    clip-path: inset(0 calc(-1 * var(--gutter)));
  }
  .sheet { grid-area: 2 / 1; min-height: 0; margin-top: -150px; margin-inline-end: var(--sheet-offset); }
  .note { grid-area: 3 / 1; max-width: none; }
}
@media (max-width: 640px) {
  .title { letter-spacing: -.018em; }
  .platforms li { padding-inline: 10px; }
  .btn-row .btn { padding-inline: 18px; }
  .cmp :is(th, td) { padding-inline: 12px; }
  .chrome-title { font-size: 11.5px; }
  .sheet-foot { padding-inline: 12px; }
  .sheet-foot .key { display: none; }
}

/* 分段导航、能力托板及平铺内容。 */
.tabs, [role="tablist"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 20px;
  padding: 5px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-panel);
  background: var(--c-panel);
  color: var(--c-text);
}
[role="tab"] {
  min-height: var(--h-touch);
  max-width: 100%;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-clear);
  color: var(--c-text);
  overflow-wrap: anywhere;
  cursor: pointer;
}
[role="tab"]:hover { background: var(--c-bg); color: var(--c-accent); }
[role="tab"][aria-selected="true"] { background: var(--c-accent); color: var(--c-on-field); }
.feature-title { text-align: center; }
.feature-panel { display: grid; align-items: start; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 48px); }
.feature-panel h3 { margin-block-end: 14px; }
.feature-panel ul { margin-block-end: 0; padding-inline-start: 1.4em; }
.feature-panel li + li { margin-block-start: 5px; }

.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin-block: 16px 28px;
  padding: 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-compact);
  background: var(--c-panel);
  color: var(--c-text);
}
.toc a { display: inline-flex; align-items: center; min-height: var(--h-touch); padding-inline: 12px; border-radius: var(--r-pill); color: var(--c-accent); }
.toc a:hover { background: var(--c-bg); color: var(--c-accent); text-decoration: underline; }

.faq-stack { display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-compact);
  background: var(--c-bg);
  color: var(--c-text);
}
.faq-item > summary {
  position: relative;
  display: block;
  min-height: var(--h-touch);
  padding: 14px 48px 14px 18px;
  list-style: none;
  cursor: pointer;
}
.faq-item > summary::-webkit-details-marker, .preview-head summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; position: absolute; inset-inline-end: 18px; color: var(--c-accent); font-family: var(--f-mono); }
.faq-item[open] > summary::after { content: "−"; }
.faq-answer { padding: 12px 18px 18px; border-top: 1px solid var(--c-border); color: var(--c-muted); }
.faq-answer > :last-child { margin-block-end: 0; }

.term-card, .client-card, .article-card { padding: clamp(18px, 3vw, 30px); }
.term-card h3 { font-family: var(--f-mono); color: var(--c-accent); overflow-wrap: anywhere; }
.client-head { display: flex; align-items: center; gap: 14px; margin-block-end: 14px; }
.client-head > div { min-width: 0; }
.client-head h3 { margin: 0; }
.app-icon { display: block; width: 56px; height: 56px; }
.client-version:empty, .file-label:empty { display: none; }
.client-version, .file-label, .article-meta { color: var(--c-muted); font: var(--fs-micro)/1.5 var(--f-mono); overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-block-end: 14px; }
.article-card h3 a:hover { color: var(--c-accent); text-decoration: underline; text-underline-offset: .18em; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag {
  display: inline-block;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-muted);
  font-size: var(--fs-micro);
  font-weight: var(--weight-medium);
  overflow-wrap: anywhere;
}
.tag-first { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-on-field); }
.tag-recommended { border-color: var(--c-accent); background: var(--c-bg); color: var(--c-accent); }
.tag-retired { border-style: dashed; background: var(--c-panel); color: var(--c-muted); }
.callout {
  margin: 20px 0;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--c-accent);
  border-radius: var(--r-chip) var(--r-compact) var(--r-compact) var(--r-chip);
  background: var(--c-panel);
  color: var(--c-text);
}
.callout > :last-child { margin-block-end: 0; }

.table-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-border);
  border-radius: var(--r-compact);
  background: var(--c-bg);
  color: var(--c-text);
}
.table-scroll:focus-visible { outline-offset: 2px; }
:where(.prose, .doc-body, .article-body) table { width: 100%; border-collapse: collapse; }
:is(.prose, .doc-body, .article-body) table:not(.table-scroll table) {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  max-width: 100%;
  min-width: 0;
}
.data-table { width: 100%; border-collapse: collapse; }
:is(.data-table, .prose table, .doc-body table, .article-body table) :is(th, td) {
  min-width: 7em;
  padding: 11px 15px;
  border-bottom: 1px solid var(--c-border);
  text-align: start;
  vertical-align: top;
  font-size: var(--fs-small);
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table, .prose table, .doc-body table, .article-body table) :is(th, td) code {
  display: inline-block;
  max-inline-size: 18em;
  overflow-wrap: anywhere;
}
:is(.data-table, .prose table, .doc-body table, .article-body table) thead th {
  background: var(--c-accent);
  color: var(--c-on-field);
  font-weight: var(--weight-medium);
}
:is(.data-table, .prose table, .doc-body table, .article-body table) tbody tr:nth-child(even) > * { background: var(--c-panel); color: var(--c-text); }
:is(.data-table, .prose table, .doc-body table, .article-body table) tbody tr > .pick { background: var(--c-panel-pink); color: var(--c-text); }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table caption { padding: 10px 15px; text-align: start; color: var(--c-muted); }

.download-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.download-cta p { margin: 8px 0 0; color: var(--c-muted); }
.dl-fab {
  position: fixed;
  z-index: var(--z-fab);
  inset-inline-end: max(var(--gutter), env(safe-area-inset-right));
  inset-block-end: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--h-touch);
  max-width: calc(100% - 2 * var(--gutter));
  padding: 8px 16px;
  border: 1px solid var(--c-on-field-line);
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-on-field);
  font-size: var(--fs-small);
}
.dl-fab:hover { background: var(--c-field); color: var(--c-on-field); }
.has-dl-fab .site-foot { padding-block-end: calc(76px + env(safe-area-inset-bottom)); }

@media (max-width: 820px) {
  .feature-panel, .download-cta { grid-template-columns: minmax(0, 1fr); }
  .download-cta .btn { justify-self: start; }
}
@media (max-width: 640px) {
  .chips { justify-content: center; }
  [role="tab"] { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse::after, .sheet-card, .sheet-back { animation: none; }
  .platforms a, .note-link .btn-ico { transition: none; }
}

/* 根目录预览页的色样。色样与标签分离，标签始终落在白底。 */
.palette {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.palette li { min-width: 0; padding: 8px; border: 1px solid var(--c-border); border-radius: var(--r-compact); }
.palette-sample {
  display: block;
  height: 42px;
  margin-block-end: 6px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--sample);
  color: var(--c-text);
}
.palette .on-dark { background: var(--c-field); color: var(--c-on-field); }
.paint-bg { --sample: var(--c-bg); }
.paint-panel { --sample: var(--c-panel); }
.paint-pink { --sample: var(--c-panel-pink); }
.paint-border { --sample: var(--c-border); }
.paint-accent { --sample: var(--c-accent); }
.paint-field { --sample: var(--c-field); }
.paint-coral { --sample: var(--c-coral); }
.paint-text { --sample: var(--c-text); }
.paint-muted { --sample: var(--c-muted); }
.paint-success { --sample: var(--c-success); }
.paint-warn { --sample: var(--c-warn); }
.paint-error { --sample: var(--c-error); }
.paint-dot { --sample: var(--c-chrome-dot); }
.paint-dash { --sample: var(--c-dash); }
.paint-hairline { --sample: var(--c-hairline); }
.paint-on-field { --sample: var(--c-on-field); }
.paint-soft { --sample: var(--c-on-field-soft); }
.paint-faint { --sample: var(--c-on-field-faint); }
.paint-line { --sample: var(--c-on-field-line); }
.paint-wash { --sample: var(--c-on-field-wash); }
.paint-halo { --sample: var(--c-coral-halo); }
.paint-veil { --sample: var(--c-veil); }
.paint-clear { --sample: var(--c-clear); }
.sample-stack { display: grid; gap: 24px; }
.sample-stack .section-title { margin-block-end: 0; }
.preview-head summary { list-style: none; }