/* 首屏：光晕位于卡匣两侧，正文与链接不进入遮罩层。 */
.halo {
  position: absolute;
  border-radius: var(--r-round);
  pointer-events: none;
  z-index: 0;
}
.halo--violet {
  width: 1120px;
  height: 1120px;
  left: -580px;
  top: 330px;
  background: radial-gradient(closest-side,var(--glow-violet) 0%,var(--glow-violet) 12%,var(--clear) 100%);
  color: var(--text);
}
.halo--rose {
  width: 1000px;
  height: 1000px;
  right: -540px;
  top: 150px;
  background: radial-gradient(closest-side,var(--glow-rose) 0%,var(--glow-rose) 10%,var(--clear) 100%);
  color: var(--text);
}
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--head-h) - var(--peek-h));
  min-height: calc(100svh - var(--head-h) - var(--peek-h));
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-content: center;
  justify-items: center;
  padding-block: 18px 22px;
  overflow-x: clip;
}
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; padding-inline: 24px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin: 0;
  padding: 6px 15px 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  line-height: 18px;
}
.badge .mono { font-size: 12.5px; color: var(--text); }
.dot { position: relative; width: 8px; height: 8px; border-radius: var(--r-round); background: var(--success); color: var(--text); }
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--success);
  color: var(--text);
  animation: breathe 2.6s ease-out infinite;
}
@keyframes breathe {
  from { transform: scale(1); opacity: .5; }
  to { transform: scale(2.7); opacity: 0; }
}
.hero h1 { margin: 22px 0 0; font-size: var(--size-h1); line-height: 1.17; color: var(--text); }
.hero h1 .line { display: block; }
.grad-text { color: var(--accent); }
@supports (background-clip: text) {
  .grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--clear);
    -webkit-text-fill-color: var(--clear);
  }
}
.lede { margin: 16px 0 0; max-width: 680px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.lede strong { color: var(--text); }
.cta { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }
.cassette {
  justify-self: stretch;
  margin-top: 40px;
  padding-top: 6px;
  --cassette-mask: linear-gradient(90deg,var(--clear) calc(50% - 700px),var(--mask-solid) calc(50% - 468px),var(--mask-solid) calc(50% + 468px),var(--clear) calc(50% + 700px));
  -webkit-mask-image: var(--cassette-mask);
  mask-image: var(--cassette-mask);
  mask-repeat: no-repeat;
}
.cassette > img { display: block; max-height: 310px; width: auto; margin-inline: auto; object-fit: contain; }
.k-row { display: flex; justify-content: center; gap: 16px; }
.k-row + .k-row { margin-top: 16px; }
.k-row--tail {
  height: 58px;
  overflow: hidden;
  --tail-mask: linear-gradient(180deg,var(--mask-solid),var(--clear));
  -webkit-mask-image: var(--tail-mask);
  mask-image: var(--tail-mask);
}
.k-card {
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 6px 0;
}
.k-card--ghost { box-shadow: var(--shadow-soft); }
.k-card--key { justify-content: center; padding: 0 6px; }
.k-ic { width: 28px; height: 28px; display: block; }
.k-ic .a { fill: none; stroke: url(#g-stroke); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.k-ic .b { fill: none; stroke: var(--accent-soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.k-ic .f { fill: var(--surface); }
.k-key {
  margin-top: 9px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: 12px/14px var(--font-mono);
  letter-spacing: -.01em;
}
.k-card--key .k-key { margin-top: 0; }
.k-cn { margin-top: 4px; font-size: 11px; line-height: 14px; color: var(--muted); letter-spacing: .01em; }
.k-val { margin-top: 7px; font: 11.5px/20px var(--font-mono); padding-inline: 8px; border-radius: var(--r-small); color: var(--accent); background: var(--accent-tint); }
.k-card--key .k-cn { margin-top: 8px; }
.platforms { margin-top: 28px; }
.platforms ul { display: flex; align-items: center; justify-content: center; gap: 34px; flex-wrap: wrap; margin: 0; padding: 0 24px; list-style: none; }
.platforms a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 24px; color: var(--muted); transition: color var(--ease); }
.platforms a svg { width: 18px; height: 18px; display: block; }
.platforms a:hover { color: var(--accent); }
.facts-band { margin-top: 22px; width: min(1120px,calc(100% - 48px)); display: flex; align-items: center; justify-content: center; gap: 18px; }
.facts-band::before, .facts-band::after { content: ""; flex: 1 1 0; height: 1px; color: var(--text); }
.facts-band::before { background: linear-gradient(90deg,var(--clear),var(--border)); }
.facts-band::after { background: linear-gradient(270deg,var(--clear),var(--border)); }
.facts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 0; }
.facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  font: 12.5px/18px var(--font-mono);
}
.facts .fk { color: var(--muted); font-family: var(--font-body); }
.next-peek { position: relative; z-index: 1; padding-inline: var(--gutter); }
.peek-panel { max-width: 1240px; margin: 0 auto; min-height: 240px; border-radius: var(--r-panel); background: var(--panel); color: var(--text); border: 1px solid var(--panel-2); padding: 52px 56px; }
.peek-eyebrow { margin: 0; font-size: 13px; color: var(--accent); letter-spacing: .02em; }
.peek-panel h2 { margin: 10px 0 0; font-size: 32px; line-height: 1.25; }
.peek-panel p:not(.peek-eyebrow) { margin: 14px 0 0; color: var(--muted); }

/* 资料浏览器与通用标签组。 */
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
[role="tab"], .feature-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--hit);
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--muted);
  text-align: start;
}
[role="tab"]:is(:hover,[aria-selected="true"]), .feature-trigger:is(:hover,[aria-expanded="true"]) { background: var(--panel); color: var(--accent-dark); }
[role="tabpanel"] { min-width: 0; }
.tab-enter { animation: sample-in .24s ease both; }
@keyframes sample-in { from { opacity: 0; } to { opacity: 1; } }

.feature-browser { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,3fr); gap: clamp(16px,3vw,40px); align-items: start; }
.feature-list[role="tablist"] { display: flex; flex-direction: column; margin: 0; gap: 4px; }
.feature-list [role="tab"], .feature-trigger {
  position: relative;
  justify-content: flex-start;
  width: 100%;
  min-height: 68px;
  border-color: var(--clear);
  border-radius: var(--r-tile);
  padding: 10px 14px;
  color: var(--text);
}
.feature-list [aria-selected="true"]::before, .feature-trigger[aria-expanded="true"]::before {
  position: absolute;
  content: "";
  inset-block: 10px;
  inset-inline-start: 0;
  width: 2px;
  border-radius: var(--r-pill);
  background: var(--grad);
  color: var(--text);
}
.feature-list [aria-selected="true"] .feature-title, .feature-trigger[aria-expanded="true"] .feature-title { color: var(--accent); }
.feature-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--r-tile);
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}
.feature-title { display: block; font-weight: var(--weight-normal); }
.feature-note { display: block; color: var(--muted); font-size: var(--size-small); }
.feature-stage, .feature-drawer {
  min-width: 0;
  border-radius: var(--r-panel);
  padding: clamp(16px,4vw,44px);
  background: var(--panel);
  color: var(--text);
}
.feature-stage { margin-top: 20px; }
.feature-fold > .feature-drawer { margin-block: 6px 12px; }
.feature-drawer > :last-child, .feature-stage [role="tabpanel"] > :last-child { margin-bottom: 0; }
.yaml-window {
  min-width: 0;
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.yaml-chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font: var(--size-micro)/1.5 var(--font-mono);
  color: var(--muted);
}
.window-dots { display: inline-flex; gap: 5px; flex: none; }
.window-dots i { width: 6px; height: 6px; flex: none; border-radius: var(--r-round); background: var(--chrome-dot); color: var(--text); }
.yaml-window pre { margin: 0; background: var(--surface); color: var(--text); border-radius: 0 0 var(--r-card) var(--r-card); }

.toc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 20px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
.toc-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--hit);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  color: var(--accent-dark);
}
.toc-tabs a:hover { background: var(--panel); color: var(--accent-dark); }
.toc-tabs--sticky { position: sticky; top: 8px; z-index: 5; }
:has(> .toc-tabs--sticky) :is(h2,h3,section)[id] { scroll-margin-top: 130px; }

.faq-item { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }
.faq-item + .faq-item { margin-top: 12px; }
.faq-item summary {
  display: list-item;
  min-height: var(--hit);
  padding: 14px 20px;
  cursor: pointer;
}
.faq-item summary::marker { color: var(--accent); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); color: var(--accent-dark); }
.faq-answer { padding: 16px 20px; }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card dt { margin-bottom: 8px; font: var(--weight-normal) var(--size-h3)/1.3 var(--font-display); }
.term-card dd { margin: 0; color: var(--muted); }
.client-head, .post-meta, .tag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.client-head { gap: 16px; margin-bottom: 14px; }
.client-head h3 { margin: 0; }
.app-logo { width: 56px; height: 56px; flex-shrink: 0; }
.client-card .button-row { margin-top: 18px; }
.client-version, .post-meta { font: var(--size-small)/1.5 var(--font-mono); color: var(--muted); }
.client-version:empty { display: none; }
.post-card { display: flex; flex-direction: column; align-items: flex-start; }
.post-card h3 { margin: 14px 0 10px; }
.post-card p { color: var(--muted); }
.post-card > .text-link { margin-top: auto; }
.tag, .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--accent-dark);
  font: var(--size-micro)/1.5 var(--font-body);
  white-space: normal;
  overflow-wrap: anywhere;
}
.status::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: var(--r-round); background: var(--accent); color: var(--text); }
.status--first { background: var(--panel-2); color: var(--accent-dark); }
.status--recommended::before { background: var(--success); color: var(--text); }
.status--archived { background: var(--surface); color: var(--muted); }
.status--archived::before { background: var(--chrome-dot); color: var(--text); }

.callout {
  margin: 20px 0;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-tile);
  background: var(--panel);
  color: var(--text);
}
.callout--warn { border-inline-start-color: var(--warn); }
.callout--warn strong { color: var(--warn-ink); }
.callout--error { border-inline-start-color: var(--error); }
.callout--error strong { color: var(--error-ink); }
.callout > :last-child { margin-bottom: 0; }
.table-wrap, .prose table, .wrap table:not(.table-wrap table) {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-tile); }
.data-table, .prose table, .wrap table { width: 100%; border-collapse: collapse; text-align: start; }
:is(.data-table,.prose table,.wrap table) :is(th,td) {
  min-width: 7em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table,.prose table,.wrap table) th { font-weight: var(--weight-medium); background: var(--panel); color: var(--text); }
:is(.data-table,.prose table,.wrap table) tr:last-child td { border-bottom: 0; }
:is(.data-table,.prose table,.wrap table) caption { padding: 12px 14px; text-align: start; color: var(--muted); }

.article-download { margin-block: 42px; }
.dl-fab {
  position: fixed;
  z-index: 10;
  inset-inline-end: max(var(--gutter),env(safe-area-inset-right));
  bottom: max(16px,env(safe-area-inset-bottom));
  max-width: calc(100% - var(--gutter) * 2);
}
.download-dialog {
  width: min(440px,calc(100% - var(--gutter) * 2));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  padding: 26px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.download-dialog::backdrop { background: var(--veil); color: var(--text); }

.preview-palette {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,160px),1fr));
  gap: 12px;
}
.preview-palette li { border: 1px solid var(--border); border-radius: var(--r-tile); padding: 8px; }
.swatch { display: block; height: 42px; border-radius: var(--r-small); background: var(--sample,var(--panel)); color: var(--text); }
.sw-bg { --sample: var(--bg); }
.sw-surface { --sample: var(--surface); }
.sw-panel { --sample: var(--panel); }
.sw-panel-2 { --sample: var(--panel-2); }
.sw-border { --sample: var(--border); }
.sw-accent { --sample: var(--accent); }
.sw-accent-2 { --sample: var(--accent-2); }
.sw-accent-dark { --sample: var(--accent-dark); }
.sw-reading { --sample: var(--accent-reading-end); }
.sw-text { --sample: var(--text); }
.sw-muted { --sample: var(--muted); }
.sw-success { --sample: var(--success); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-warn-ink { --sample: var(--warn-ink); }
.sw-error-ink { --sample: var(--error-ink); }
.sw-on-accent { --sample: var(--on-accent); }
.sw-chrome { --sample: var(--chrome-dot); }
.sw-mask { --sample: var(--mask-solid); }
.sw-clear { --sample: var(--clear); }
.sw-soft { --sample: var(--accent-soft); }
.sw-tint { --sample: var(--accent-tint); }
.sw-violet { --sample: var(--glow-violet); }
.sw-rose { --sample: var(--glow-rose); }
.sw-focus { --sample: var(--focus-ring); }
.sw-veil { --sample: var(--veil); }
.sw-grad { --sample: var(--grad); }
.sw-grad-hover { --sample: var(--grad-hover); }
.sw-grad-reading { --sample: var(--grad-reading); }
.type-display { font: var(--weight-normal) var(--size-h1)/1.17 var(--font-display); letter-spacing: var(--tracking-display); }

@media (max-width: 860px) {
  .hero { min-height: auto; }
  .cta { flex-direction: column; gap: 12px; }
  .platforms ul { gap: 10px 20px; }
  .facts-band::before, .facts-band::after { display: none; }
  .peek-panel { padding: 36px 24px; }
  .cassette { --cassette-mask: linear-gradient(90deg,var(--clear),var(--mask-solid) 13%,var(--mask-solid) 87%,var(--clear)); }
}
@media (max-width: 768px) {
  .feature-browser { display: block; }
  .toc-tabs--sticky { position: static; }
  .facts-band { width: calc(100% - var(--gutter) * 2); }
  .facts { gap: 6px; }
  .facts li { gap: 6px; padding-inline: 8px; }
}
@media (max-width: 640px) {
  .halo--violet { width: 700px; height: 700px; left: -500px; top: 290px; }
  .halo--rose { width: 640px; height: 640px; right: -470px; top: 170px; }
  .dl-fab.btn { min-height: var(--hit); padding-inline: 16px; }
}
@media (forced-colors: active) {
  .grad-text { background: none; color: CanvasText; -webkit-text-fill-color: CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  .dot::after, .tab-enter { animation: none; }
  .dot::after { opacity: 0; }
  .platforms a { transition: none; }
}