/* 首屏：白底居中排版与四张横滑界面卡 */
.hero {
  min-height: calc(100svh - var(--bar-height) - 1px);
  display: grid;
  align-content: center;
  gap: 46px;
  padding-block: 40px 44px;
}
.hero > * { min-width: 0; }
.hero__head { text-align: center; padding-inline: 24px; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 14px 3px 12px;
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text-muted);
  box-shadow: var(--shadow-hair);
  font-size: 13px;
  font-weight: 500;
}
.pill__dot, .sg__dot, .form__mark, .tbar__dot { flex-shrink: 0; border-radius: var(--r-circle); }
.pill__dot { width: 7px; height: 7px; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-10); }
.hero__title { margin: 0; }
.hero__lead { max-width: 44em; margin: 18px auto 0; font-size: var(--size-lead); color: var(--text-muted); }
.hero__lead strong { color: var(--text); font-weight: 600; }
.cta, .badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero .cta { justify-content: center; margin: 28px auto 0; }
.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}
.platforms li { display: flex; align-items: center; }
.platforms li + li::before {
  content: "";
  width: 1px;
  height: 12px;
  margin-inline: 2px;
  background: var(--border-strong);
}
.platforms a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: 13.5px;
  text-decoration: none;
}
.platforms a:hover { background: var(--bg-panel); color: var(--text); }
.platforms svg { width: 14px; height: 14px; }

.deck {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--nav-gutter);
  scrollbar-width: none;
  padding-block: 6px 30px;
  margin-bottom: -30px;
}
.deck::-webkit-scrollbar { display: none; }
.deck:focus-visible { outline-offset: -2px; }
.deck__track { display: flex; gap: 20px; width: max-content; list-style: none; margin: 0; padding: 0 var(--nav-gutter); }
.card {
  --field: var(--field-neutral);
  --tint: var(--tint-neutral);
  width: clamp(300px, 25vw, 380px);
  flex: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.card--jade { --field: var(--field-jade); --tint: var(--tint-jade); }
.card--cobalt { --field: var(--field-cobalt); --tint: var(--tint-cobalt); }
.card--apricot { --field: var(--field-apricot); --tint: var(--tint-apricot); }
.card--neutral { --field: var(--field-neutral); --tint: var(--tint-neutral); }
.card__field {
  position: relative;
  isolation: isolate;
  height: 216px;
  display: grid;
  place-items: center;
  border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0;
  border-bottom: 1px solid var(--border);
  background-color: var(--field);
  color: var(--text);
  background-image: linear-gradient(var(--grid-line) 1px, var(--clear) 1px),
    linear-gradient(90deg, var(--grid-line) 1px, var(--clear) 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  overflow: clip;
}
.card__field::before, .card__field::after { content: ""; position: absolute; z-index: -1; }
.card__field::before { inset: 0 auto 0 0; width: 34%; background: var(--veil); }
.card__field::after { inset: auto 0 0 auto; width: 48%; height: 46%; background: var(--tint); }
.card__foot { padding: 20px 22px 24px; }
.card__title { margin: 0 0 6px; font-weight: 800; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; }
.card__desc { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }
.halo {
  position: relative;
  width: min(286px, calc(100% - 12px));
  padding: 6px;
  border-radius: var(--r-halo);
  background: var(--halo-bg);
  color: var(--text);
  border: 1px solid var(--halo-line);
  box-shadow: var(--shadow-win);
  transform: translateY(-6px);
}
.halo--desk { width: min(296px, calc(100% - 2px)); }
.win { position: relative; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-win); }
.tbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding-inline: 10px;
  background: var(--bg-panel);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-win) var(--r-win) 0 0;
  font-size: 11px;
  font-weight: 600;
}
.tbar__dot { width: 7px; height: 7px; background: var(--border-strong); }
.tbar__title { margin-left: 6px; }
.tbar__title--mono { font-family: var(--font-mono); font-weight: 500; color: var(--text-muted); }
.mbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  padding: 0 6px 0 10px;
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
}
.mbar__app { font-weight: 700; letter-spacing: .01em; }
.mbar__cat {
  display: grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border-radius: var(--r-chip);
  background: var(--accent-16);
  color: var(--accent-dark);
}
.mbar__cat img { width: 14px; height: 14px; }
.desk { position: relative; height: 140px; background: var(--bg-panel); color: var(--text); border-radius: 0 0 var(--r-win) var(--r-win); }
.menu {
  position: absolute;
  top: 3px;
  right: 6px;
  width: 166px;
  padding: 4px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-menu);
  box-shadow: var(--shadow-pop);
  font-size: 11.5px;
}
.menu__row { display: flex; align-items: center; min-height: 23px; padding: 0 8px 0 2px; border-radius: var(--r-chip); }
.menu__row--on { background: var(--accent-10); color: var(--accent-dark); font-weight: 600; }
.menu__row--picked { font-weight: 600; }
.menu__chk { width: 16px; flex: none; text-align: center; font-size: 11px; color: var(--accent-dark); }
.menu__lbl { flex: 1; }
.menu__arr { color: var(--text-muted); }
.menu__sep { height: 1px; margin: 3px 6px; background: var(--border); }
.menu--fly { top: 2px; right: calc(100% - 2px); width: 92px; }

.win--suggest { padding: 14px 16px; }
.sg__head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-muted); }
.sg__dot { width: 8px; height: 8px; background: var(--dot-slate); box-shadow: 0 0 0 3px var(--cobalt-12); }
.sg__body { margin: 10px 0 14px; font-size: 14px; line-height: 1.65; font-weight: 500; }
.term { padding: 1px 4px; border-radius: var(--r-chip); background: var(--cobalt-12); color: var(--text); font-weight: 600; }
.sg__foot { display: flex; align-items: center; gap: 14px; }
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding-inline: 12px;
  border-radius: var(--r-mini);
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
}
.mini-ghost { font-size: 12px; color: var(--text-muted); }
.form { padding: 11px 12px 12px; }
.form__label { display: block; margin-bottom: 5px; font-size: 10.5px; color: var(--text-muted); }
.form__input {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: var(--r-input);
  box-shadow: 0 0 0 3px var(--accent-10);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.form__caret { display: inline-block; vertical-align: middle; width: 1px; height: 13px; margin-left: 1px; background: var(--accent); }
.form__row, .form__pick, .form__note { display: flex; align-items: center; gap: 6px; }
.form__row { justify-content: space-between; gap: 8px; margin-top: 10px; }
.form__pick { flex-wrap: wrap; font-size: 11px; color: var(--text-muted); }
.form__select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding-inline: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  background: var(--bg);
  color: var(--text);
}
.form__note { margin-top: 10px; font-size: 10.5px; color: var(--text-muted); }
.form__mark { width: 6px; height: 6px; background: var(--apricot); box-shadow: 0 0 0 3px var(--apricot-30); }
.code { margin: 0; padding: 8px 0 10px; list-style: none; font: 11.5px/20px var(--font-mono); }
.code__ln { display: flex; gap: .65em; padding-inline-end: 8px; }
.code__no { width: 30px; flex: none; padding-right: 3px; text-align: right; color: var(--text-muted); }
.code__v { color: var(--text-muted); }
.code__ln--hl { background: var(--accent-10); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.code__ln--hl .code__v { color: var(--accent-dark); font-weight: 600; }
.tip {
  position: absolute;
  padding: 7px 11px;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--r-btn);
  box-shadow: var(--shadow-pop);
  font-size: 11.5px;
  font-weight: 600;
}
.tip--code { left: min(92px, 28%); right: -4px; bottom: -20px; width: max-content; max-width: 74%; }
.tip__mono { font-family: var(--font-mono); color: var(--accent-dark); }

.flow { padding-block: var(--section-space); }
.group {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.group--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.group--reverse .group__text { grid-column: 2; grid-row: 1; }
.group--reverse .group__visual { grid-column: 1; grid-row: 1; }
.group__title { margin-bottom: 20px; }
.group__text p { margin-bottom: 22px; color: var(--text-muted); line-height: 1.85; }
.flow__rule { height: 1px; margin: var(--section-space) 0; background: var(--border); border: 0; }
.appwin {
  position: relative;
  margin: 0 28px 40px 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.appwin .tbar { min-height: 34px; padding-inline: 14px; font-size: 12.5px; }
.mode {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}
.mode + .mode { border-top: 1px solid var(--border); }
.mode__radio { width: 16px; height: 16px; border-radius: var(--r-circle); border: 1.5px solid var(--border-strong); }
.mode--on { background: var(--bg-panel); color: var(--text); }
.mode--on .mode__radio { border: 5px solid var(--accent); }
.mode__name { display: block; font-size: 15px; font-weight: 700; }
.mode__desc { display: block; font-size: 13.5px; color: var(--text-muted); }
.tip--rules { right: -28px; bottom: -40px; max-width: 100%; padding: 14px 16px; border-radius: var(--r-card); font-weight: 500; }
.tip__head { display: block; margin-bottom: 8px; font-size: 12px; color: var(--text-muted); }
.tip__pre { margin: 0; font: 12.5px/1.75 var(--font-mono); overflow-wrap: anywhere; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(14px, 2.5vw, 28px);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tab {
  position: relative;
  min-height: 44px;
  padding: 6px 0 12px;
  border: 0;
  background: var(--clear);
  color: var(--text-muted);
  font: 500 15px/1.4 var(--font-body);
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); font-weight: 700; }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--r-pill);
}
[role="tabpanel"] { min-width: 0; }
.feature-tabs > .tabs { margin-left: calc((100% - clamp(28px, 5vw, 72px)) * 5 / 12 + clamp(28px, 5vw, 72px)); }
.toc {
  position: sticky;
  top: calc(var(--bar-height) + 1px);
  z-index: 10;
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-block: 6px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.toc--static { position: static; }
.toc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: var(--r-pill);
  color: var(--accent-dark);
  text-decoration: none;
}
.toc a:hover { background: var(--accent-10); color: var(--accent-dark); }
.faq {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.faq + .faq { margin-top: 10px; }
.faq summary { padding: 14px 18px; font-weight: 700; cursor: pointer; }
.faq[open] summary { border-bottom: 1px solid var(--border); }
.faq__body { padding: 14px 18px; color: var(--text-muted); }
.faq__body > :last-child { margin-bottom: 0; }
.term-card, .download-card, .post-card, .article-download { min-width: 0; overflow-wrap: anywhere; }
.term-card__key, .post-card__meta, .download-card__meta { color: var(--text-muted); font-size: 14px; }
.term-card__key { font-family: var(--font-mono); }
.download-card__head, .article-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.download-card__head > div, .article-download__copy { flex: 1 1 12rem; min-width: 0; }
.download-card__icon { width: 56px; height: 56px; flex-shrink: 0; }
[data-ver]:empty { display: none; }
.article-download { justify-content: space-between; margin-block: 2rem; }
.article-download p { margin-bottom: 0; }
.badge, .mode__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.badge--first, .mode__tag { background: var(--accent-10); color: var(--accent-dark); }
.badge--recommended { background: var(--bg); color: var(--accent-dark); border: 1px solid var(--border-strong); }
.badge--archived { background: var(--bg-panel-2); color: var(--text-muted); }
.callout {
  margin: 1.25em 0;
  padding: 14px 18px;
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--r-chip);
  background: var(--bg-panel);
  color: var(--text);
}
.callout--notice { border-inline-start-color: var(--apricot); }
.callout > :last-child { margin-bottom: 0; }
.table-wrap { max-width: 100%; min-width: 0; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td, .prose table :is(th,td), .wrap table :is(th,td) {
  min-width: 7em;
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose th, .wrap th { background: var(--bg-panel); color: var(--text); }
.prose table, .wrap table, table.data-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}
.table-wrap > table { display: table; }
.dl-fab {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 18px 5px 7px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.dl-fab__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--r-circle);
  background: var(--accent);
  color: var(--bg);
}
.dl-fab__icon svg { width: 14px; height: 14px; }
.dl-fab:hover { border-color: var(--border-strong); }
.nav-open .dl-fab { visibility: hidden; }

.palette-item { overflow-wrap: anywhere; font: 12px/1.45 var(--font-mono); }
.palette-item::before {
  content: "";
  display: block;
  height: 30px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-chip);
  background: var(--sample);
}
.sw-bg { --sample: var(--bg); }
.sw-panel { --sample: var(--bg-panel); }
.sw-panel2 { --sample: var(--bg-panel-2); }
.sw-border { --sample: var(--border); }
.sw-strong { --sample: var(--border-strong); }
.sw-accent { --sample: var(--accent); }
.sw-accent-dark { --sample: var(--accent-dark); }
.sw-text { --sample: var(--text); }
.sw-muted { --sample: var(--text-muted); }
.sw-faint { --sample: var(--text-faint); }
.sw-success { --sample: var(--success); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-cobalt { --sample: var(--cobalt); }
.sw-apricot { --sample: var(--apricot); }
.sw-slate { --sample: var(--dot-slate); }
.sw-accent10 { --sample: var(--accent-10); }
.sw-accent16 { --sample: var(--accent-16); }
.sw-cobalt12 { --sample: var(--cobalt-12); }
.sw-apricot30 { --sample: var(--apricot-30); }
.sw-field-jade { --sample: var(--field-jade); }
.sw-field-cobalt { --sample: var(--field-cobalt); }
.sw-field-apricot { --sample: var(--field-apricot); }
.sw-field-neutral { --sample: var(--field-neutral); }
.sw-tint-jade { --sample: var(--tint-jade); }
.sw-tint-cobalt { --sample: var(--tint-cobalt); }
.sw-tint-apricot { --sample: var(--tint-apricot); }
.sw-tint-neutral { --sample: var(--tint-neutral); }
.sw-grid { --sample: var(--grid-line); }
.sw-veil { --sample: var(--veil); }
.sw-halo { --sample: var(--halo-bg); }
.sw-halo-line { --sample: var(--halo-line); }
.sw-nav-veil { --sample: var(--nav-veil); }
.sw-clear { --sample: var(--clear); }
.sw-veil::before, .sw-halo::before, .sw-halo-line::before, .sw-clear::before {
  background: var(--sample) linear-gradient(90deg, var(--clear) 50%, var(--border-strong) 50%);
  background-blend-mode: overlay;
}
.preview-palette { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.preview-samples > * + * { margin-top: 20px; }
.preview-focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.preview-active { background: var(--accent-dark); color: var(--bg); box-shadow: var(--shadow-hair); }

@media (max-width: 1024px) {
  .group, .group--reverse { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .group--reverse .group__text, .group--reverse .group__visual { grid-area: auto; }
  .feature-tabs > .tabs { margin-left: 0; }
}
@media (max-width: 640px) {
  .hero__head { padding-inline: var(--gutter); }
  .hero .cta { flex-direction: column; align-items: stretch; max-width: 320px; }
  .card { width: 82vw; }
  .appwin { margin-right: 8px; }
  .tip--rules { right: -8px; }
  .mode { gap: 8px; padding-inline: 12px; }
  .badges { justify-content: center; }
}
@media (max-width: 360px) {
  .menu { width: 152px; right: 4px; }
  .menu--fly { right: calc(100% - 2px); width: 80px; }
}