/* 已确认的静态设置窗口首屏 */
.hero {
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: calc(100vh - var(--nav-h) - var(--band-peek));
  min-height: calc(100svh - var(--nav-h) - var(--band-peek));
  padding-block: 36px 34px;
  background: var(--bg);
  color: var(--text);
}
.contour { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.contour__set { opacity: .06; }
.contour :is(path, ellipse) { fill: none; stroke: var(--accent); stroke-width: 54; stroke-linecap: round; }
.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 72px;
  align-items: end;
}
.hero__top > *, .main > *, .app > * { min-width: 0; }
.hero .eyebrow { color: var(--accent); }
.hero .h1 { font-size: var(--hero-title-size); }
.h1__line { display: block; }
.h1__accent { color: var(--accent); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero .btn--solid { color: var(--on-accent); }
.platforms, .chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.platforms__label {
  margin-right: 6px;
  color: var(--text-faint);
  font: 400 12px/normal var(--font-mono);
  letter-spacing: .04em;
}
.plat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-hair);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--fast), color var(--fast);
}
.plat svg { width: 15px; height: 15px; color: var(--text-muted); }
.plat:hover { border-color: var(--accent); }
.plat:hover svg { color: var(--accent-ink); }
.lede { margin: 0; color: var(--text-muted); font-size: 16.5px; line-height: 1.78; }
.lede strong {
  padding: 0 1px;
  background: linear-gradient(var(--clear) 64%, var(--accent-tint) 64%);
  color: var(--text);
  font-weight: 700;
}
.chips { margin-top: 20px; }
.chips > li { min-width: 0; max-width: 100%; }
.chip, .pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font: 400 11.5px/1.45 var(--font-mono);
  overflow-wrap: anywhere;
}
.chip::before, .pill::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--accent);
  color: var(--text);
  border-radius: var(--radius-dot);
}
.pill {
  gap: 6px;
  padding: 3px 10px;
  border-color: var(--success-line);
  background: var(--success-tint);
  color: var(--success-ink);
  font: 700 12px/normal var(--font-body);
}
.pill::before { background: var(--success); color: var(--text); border-radius: var(--radius-circle); }

.stage { position: relative; isolation: isolate; width: 78%; margin: 68px 0 0 4%; }
.stage::before {
  content: "";
  position: absolute;
  inset: 16px 16px -16px -16px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.window {
  position: relative;
  min-width: 0;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.chrome {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
}
.dots { display: flex; flex: none; gap: 7px; }
.dot { width: 11px; height: 11px; border-radius: var(--radius-circle); }
.dot--r { background: var(--error); color: var(--text); }
.dot--y { background: var(--warn); color: var(--text); }
.dot--g { background: var(--success); color: var(--text); }
.chrome__title {
  flex: 1;
  min-width: 0;
  margin-right: 59px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.app { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 320px; }
.side {
  margin: 0;
  padding: 16px 0;
  list-style: none;
  border-right: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-muted);
}
.side__item { padding: 8px 20px 8px 17px; border-left: 3px solid var(--clear); font-size: 13.5px; }
.side__item--on {
  border-left-color: var(--accent);
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}
.main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  padding: 18px 20px 20px;
  background: var(--bg);
  color: var(--text);
}
.main__col { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
.main__col--lead { justify-content: flex-start; }
.group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-hair);
}
.group__head, .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 14px;
}
.group__head {
  min-height: 38px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-soft);
  color: var(--text);
}
.group__title { font-size: 13px; font-weight: 800; }
.group__key, .row__key { font-family: var(--font-mono); color: var(--text-faint); }
.group__key { font-size: 11.5px; }
.row { min-height: 43px; gap: 12px; border-bottom: 1px solid var(--bg-panel-2); }
.row:last-child { border-bottom: 0; }
.row__label { min-width: 0; font-size: 13px; font-weight: 600; }
.row__key { margin-left: 8px; font-size: 11px; font-weight: 400; overflow-wrap: anywhere; }
.switch {
  position: relative;
  display: inline-block;
  flex: none;
  width: 34px;
  height: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-panel-2);
  color: var(--text);
}
.switch::after {
  content: "";
  position: absolute;
  inset: 2px auto auto 2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-circle);
  background: var(--knob);
  color: var(--text);
  box-shadow: var(--shadow-knob);
}
.switch--on { border-color: var(--accent); background: var(--accent); color: var(--text); }
.switch--on::after { transform: translateX(14px); }
.seg {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-inset);
  background: var(--bg-panel);
  color: var(--text-muted);
}
.seg__opt { padding: 3px 8px; border-radius: var(--radius-sm); font-size: 11.5px; }
.seg__opt--on { background: var(--bg); color: var(--text); font-weight: 700; box-shadow: var(--shadow-hair); }
.field {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font: 400 12px/normal var(--font-mono);
}
.field--input {
  min-width: 70px;
  justify-content: flex-end;
  border-color: var(--border-strong);
  background: var(--bg);
  color: var(--text);
}
.pointer-host { position: relative; display: inline-flex; flex: none; }
.cursor { position: absolute; left: 15px; top: 8px; z-index: 4; width: 22px; height: 24px; }
.cursor path { fill: var(--cursor); stroke: var(--knob); stroke-width: 1.4; stroke-linejoin: round; }
.cursor-tag {
  position: absolute;
  left: 32px;
  top: 22px;
  z-index: 4;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--cursor);
  color: var(--on-accent);
  box-shadow: var(--shadow-tag);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.logpane {
  position: absolute;
  top: -40px;
  right: -112px;
  z-index: 3;
  width: 448px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-float);
}
.logpane__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.logpane__title {
  color: var(--accent);
  font: 700 12.5px/normal var(--font-mono);
  letter-spacing: .08em;
}
.logpane .pill { color: var(--success); }
.logpane__body {
  margin: 0 12px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-inset);
  background: var(--bg-soft);
  color: var(--text);
  overflow: hidden;
}
.logpane__sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-faint);
  font: 400 10.5px/normal var(--font-mono);
  letter-spacing: .06em;
}
.loglist { margin: 0; padding: 0; list-style: none; background: var(--bg); color: var(--text); }
.log {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bg-panel-2);
  font: 400 11.5px/normal var(--font-mono);
  overflow-wrap: anywhere;
}
.log span { min-width: 0; }
.log:last-child { border-bottom: 0; }
.log::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-dot);
  background: var(--accent);
  color: var(--text);
}
.band {
  padding-block: 56px 64px;
  border-top: 1px solid var(--accent);
  background: radial-gradient(circle, var(--accent-dot) 1px, var(--clear) 1.6px) 9px 9px / 18px 18px var(--bg);
  color: var(--text);
}
.band__title { margin: 0; text-align: center; font-size: 20px; font-weight: 800; }
.band__tag { display: block; margin-bottom: 8px; color: var(--accent-ink); font: 700 12.5px/normal var(--font-mono); letter-spacing: .06em; }

/* 数据路径：编号与两侧内容共用同一条轴 */
.path-spine { position: relative; margin: 32px 0 0; padding: 0; list-style: none; }
.path-spine::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 calc(50% - 1px);
  width: 2px;
  background: var(--accent);
  color: var(--text);
}
.path-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: clamp(16px, 4vw, 56px);
  align-items: center;
  padding-block: 24px;
}
.path-step > * { min-width: 0; }
.path-step__copy { grid-column: 1; grid-row: 1; }
.path-step__copy > :last-child { margin-bottom: 0; }
.path-step__sample { grid-column: 3; grid-row: 1; }
.path-step:nth-child(even) .path-step__copy { grid-column: 3; }
.path-step:nth-child(even) .path-step__sample { grid-column: 1; }
.path-step__node {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-circle);
  background: var(--accent);
  color: var(--text);
  font: 700 14px/1 var(--font-mono);
}

/* 页内控件与正文 */
.tab-list, [role="tablist"], .toc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
[role="tablist"][aria-orientation="vertical"] { flex-direction: column; align-items: stretch; }
[role="tab"], .toc-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
[role="tab"]:hover:not(:disabled), .toc-tabs a:hover { border-color: var(--accent-ink); }
[role="tab"][aria-selected="true"] {
  border-color: var(--accent);
  background: var(--bg-soft);
  color: var(--accent-ink);
  box-shadow: inset 0 -2px var(--accent);
}
[role="tab"]:disabled { background: var(--bg-panel); color: var(--text-muted); }
[role="tabpanel"] { margin-top: 12px; min-width: 0; }

.doc-grid { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.doc-grid > * { min-width: 0; }
.toc {
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}
.toc--static { position: static; max-height: none; }
.toc p { margin: 0 0 8px; font-weight: 800; }
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 8px 0; overflow-wrap: anywhere; }
.doc-grid .prose { max-width: none; }
.code-window pre { border-radius: 0 0 var(--radius) var(--radius); }

.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-hair);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent-ink); font-family: var(--font-mono); }
.faq[open] summary { border-bottom: 1px solid var(--border); }
.faq[open] summary::after { content: "−"; }
.faq__body { padding: 12px 16px 16px; color: var(--text-muted); line-height: 1.65; }
.faq__body > :first-child { margin-top: 0; }
.faq__body > :last-child { margin-bottom: 0; }
.term-card { border-top: 2px solid var(--accent); }
.term-card h3 code { font-size: .9em; }
.client-card__head, .post-card__meta, .tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.client-card__head h3 { margin: 0; }
.client-card__actions { margin-top: 18px; }
.client-version { color: var(--text-muted); font: 400 .8125rem/1.5 var(--font-mono); overflow-wrap: anywhere; }
.client-version:empty { display: none; }
.badge { font-weight: 700; }
.badge--first { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-ink); }
.badge--recommended { border-color: var(--border-strong); background: var(--bg-soft); color: var(--text); }
.badge--archived { background: var(--bg-panel-2); color: var(--text-muted); }
.post-card__meta { margin-bottom: 12px; color: var(--text-muted); font: 400 .8125rem/1.45 var(--font-mono); }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--accent-ink); }
.callout, .prose blockquote {
  margin: 1em 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text);
  line-height: 1.65;
}
.callout p, .prose blockquote p { margin: .4em 0; }
.download-outro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-block: 28px;
  border-left: 3px solid var(--accent);
}
.download-outro > * { min-width: 0; }
.download-outro h2 { margin: 0; font-size: var(--subhead-size); }
.download-outro p { margin: 6px 0 0; }
.dl-fab {
  position: fixed;
  z-index: 8;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: calc(100% - var(--gutter) * 2);
  min-height: 44px;
}
body:has(.dl-fab) .footer-copy { padding-bottom: 76px; }

.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
:where(.data-table, .prose table, .doc-grid table) {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  text-align: start;
}
:is(.data-table, .prose table, .doc-grid table) :is(th, td) {
  min-width: 7em;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
:is(.data-table, .prose table, .doc-grid table) th {
  background: var(--bg-panel);
  color: var(--text);
  font-weight: 700;
}
:is(.data-table, .prose table, .doc-grid table) tbody tr:last-child td { border-bottom: 0; }
.prose table, .doc-grid table, .data-table {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { display: table; min-width: 0; max-width: none; }
:is(.data-table, .prose table, .doc-grid table) :is(th, td) code { overflow-wrap: anywhere; }

/* 色板取样：色块与名称分开，不把文字压在取样色上 */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.swatches li { min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); }
.swatches li::before { content: ""; display: block; height: 38px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--sample, var(--bg)); color: var(--text); }
.sample-bg { --sample: var(--bg); }
.sample-panel { --sample: var(--bg-panel); }
.sample-panel-2 { --sample: var(--bg-panel-2); }
.sample-soft { --sample: var(--bg-soft); }
.sample-border { --sample: var(--border); }
.sample-border-strong { --sample: var(--border-strong); }
.sample-accent { --sample: var(--accent); }
.sample-accent-dark { --sample: var(--accent-dark); }
.sample-accent-ink { --sample: var(--accent-ink); }
.sample-accent-tint { --sample: var(--accent-tint); }
.sample-accent-dot { --sample: var(--accent-dot); }
.sample-text { --sample: var(--text); }
.sample-muted { --sample: var(--text-muted); }
.sample-faint { --sample: var(--text-faint); }
.sample-success { --sample: var(--success); }
.sample-success-ink { --sample: var(--success-ink); }
.sample-success-tint { --sample: var(--success-tint); }
.sample-success-line { --sample: var(--success-line); }
.sample-warn { --sample: var(--warn); }
.sample-error { --sample: var(--error); }
.sample-cursor { --sample: var(--cursor); }
.sample-on-accent { --sample: var(--on-accent); }
.sample-knob { --sample: var(--knob); }
.sample-clear { --sample: var(--clear); }
.sample-veil { --sample: var(--veil); }
.preview-menu summary, .topbar--proof .lang { list-style: none; }
.preview-menu summary::-webkit-details-marker, .topbar--proof .lang::-webkit-details-marker { display: none; }

@media (max-width: 1180px) {
  .stage { width: 84%; margin-left: 0; }
  .logpane { right: -80px; width: 420px; }
}
@media (max-width: 980px) {
  .hero { min-height: 0; padding-bottom: 48px; }
  .hero__inner { width: 100%; }
  .hero__top { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .stage { width: 100%; margin-top: 40px; }
  .logpane { position: relative; inset: auto; width: min(100%, 448px); margin: 14px 0 0 auto; }
  .main { grid-template-columns: minmax(0, 1fr); }
  .main__col { justify-content: flex-start; }
  .app { min-height: 0; }
}
@media (max-width: 768px) {
  .stage { margin-top: 32px; }
  .stage::before, .side { display: none; }
  .app, .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
  .logpane { width: 100%; }
  .cursor-tag { left: auto; right: 12px; top: 21px; }
  .row__key { display: none; }
  .path-spine::before { left: 19px; }
  .path-step { grid-template-columns: 40px minmax(0, 1fr); gap: 12px 16px; align-items: start; }
  .path-step__node { grid-column: 1; width: 40px; height: 40px; }
  .path-spine .path-step .path-step__copy { grid-column: 2; grid-row: 1; }
  .path-spine .path-step .path-step__sample { grid-column: 2; grid-row: 2; }
}
@media (max-width: 640px) {
  .platforms__label { flex-basis: 100%; }
  .chips, .tag-row { justify-content: center; }
  .main { padding-inline: 12px; }
  .chrome__title { margin-right: 0; }
}