/* 首屏：静态配置工作板与终端标题栏共用一个视觉逻辑。 */
.hero {
  min-height: calc(100vh - var(--head-h) - var(--peek-h));
  min-height: calc(100svh - var(--head-h) - var(--peek-h));
  display: grid;
  align-content: center;
  padding-top: 20px;
  padding-bottom: 28px;
  overflow-x: clip;
}
.hero__grid, .fields__grid { display: grid; grid-template-columns: 44fr 56fr; gap: 56px; align-items: center; }
.hero__copy { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 13px;
  border: 1px solid var(--c-border); border-radius: var(--r-pill);
  background: var(--c-panel); color: var(--c-muted); box-shadow: var(--shadow-chip); font-size: 13px; font-weight: 600;
}
.eyebrow__dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--c-accent); color: var(--c-on-accent); }
.hero__title { margin: 22px 0 0; }
.hero__title > span { display: block; }
.hero__lead { margin: 18px 0 0; max-width: 31em; font-size: 16.5px; line-height: 1.78; color: var(--c-muted); }
.hero__lead strong { color: var(--c-text); font-weight: 700; box-shadow: inset 0 -0.46em 0 var(--c-warn); }
.platforms { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.platforms a {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 5px 12px;
  border: 1px solid var(--c-border); border-radius: var(--r-sm);
  background: var(--c-panel); color: var(--c-text); box-shadow: var(--shadow-chip); text-decoration: none; font-size: 13.5px; font-weight: 600;
}
.platforms svg { width: 15px; height: 15px; color: var(--c-muted); }
.platforms a:hover, .platforms a:hover svg { color: var(--c-accent); border-color: var(--c-accent); }
.guide { margin: 28px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--c-border); }
.guide li { font-size: 17px; line-height: 1.6; color: var(--c-text); }
.guide li + li { margin-top: 9px; }
.guide a { color: var(--c-accent); font-weight: 700; text-decoration-thickness: 2px; }
.guide a:hover { color: var(--c-accent-dark); }
.guide__dash { color: var(--c-muted); margin: 0 4px; }
.scribble { position: relative; display: inline-block; isolation: isolate; }
.scribble svg { position: absolute; left: -3px; bottom: -6px; width: calc(100% + 6px); height: 10px; z-index: -1; color: var(--c-warn); }
.device { position: relative; min-width: 0; }
.device::before {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: -11px; height: 80px;
  background: var(--c-panel); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--shadow-sheet);
}
.board { position: relative; z-index: 1; background: var(--c-panel); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--shadow-board); overflow: hidden; }
.board__chrome { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; background: var(--c-panel-2); color: var(--c-muted); border-bottom: 1px solid var(--c-border); }
.dots { display: flex; gap: 7px; flex-shrink: 0; }
.dots i { width: 10px; height: 10px; border-radius: var(--r-circle); background: var(--c-dot-a); color: var(--c-text); }
.dots i:nth-child(2) { background: var(--c-dot-b); }
.dots i:nth-child(3) { background: var(--c-dot-c); }
.board__path { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--c-muted); }
.board__lang { font-family: var(--font-mono); font-size: 11px; color: var(--c-muted); padding: 2px 7px; border: 1px solid var(--c-border); border-radius: var(--r-xs); background: var(--c-panel); }
.board__head { display: flex; align-items: center; gap: 10px; padding: 20px 24px 0; }
.board__title { margin: 0; font-weight: 900; font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; }
.board__star { width: 18px; height: 18px; color: var(--c-border-strong); }
.board__sub { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--c-muted); }
.board__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; padding: 18px 24px 0; }
.mod { display: flex; flex-direction: column; min-width: 0; }
.mod__label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: var(--c-accent-dark); }
.mod__key { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--c-muted); }
.mod__card {
  flex: 1; margin: 0; padding: 11px 12px; background: var(--c-panel); color: var(--c-text);
  border: 1px solid var(--c-border-soft); border-radius: var(--r-sm); box-shadow: var(--shadow-chip);
  font-family: var(--font-mono); font-size: 11px; line-height: 1.85; overflow-x: auto;
}
.ln { display: block; white-space: nowrap; }
.ln--ind { padding-left: 2ch; }
.k { font-weight: 600; color: var(--c-text); }
.v, .c { color: var(--c-muted); }
.n { color: var(--c-accent-dark); font-weight: 600; }
.mark, mark { padding: 0 4px; border-radius: var(--r-xs); background: var(--c-warn); color: var(--c-text); font-weight: 600; }
.mark { display: inline-block; margin-left: -4px; }
.opt { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.box { flex-shrink: 0; width: 13px; height: 13px; border: 1.5px solid var(--c-border-strong); border-radius: var(--r-xs); background: var(--c-panel); color: var(--c-text); display: grid; place-items: center; }
.box--on { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.box svg { width: 9px; height: 9px; }
.opt__hint { margin-left: auto; font-family: var(--font-body); font-size: 11px; color: var(--c-muted); }
.board__foot { padding: 16px 24px 20px; }
.addtile { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px dashed var(--c-border-strong); border-radius: var(--r-sm); color: var(--c-muted); }
.addtile svg { width: 16px; height: 16px; }
.ext__label { margin: 16px 0 9px; font-size: 13.5px; font-weight: 700; color: var(--c-accent-dark); }
.ext { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ext a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-panel); color: var(--c-text); text-decoration: none; }
.ext a:hover { border-color: var(--c-accent); box-shadow: var(--shadow-lift); }
.ext__icon { flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--c-panel-2); color: var(--c-accent); display: grid; place-items: center; }
.ext__icon svg { width: 16px; height: 16px; }
.ext__text { min-width: 0; }
.ext__name { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.ext__href { display: block; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.board__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; min-height: 30px; padding: 7px 24px; background: var(--c-panel-2); color: var(--c-muted); border-top: 1px solid var(--c-border); font-family: var(--font-mono); font-size: 11px; }
.board__status span { padding: 0 14px; border-left: 1px solid var(--c-border-strong); line-height: 1; }
.board__status span:first-child { padding-left: 0; border-left: 0; }
.board__status b { color: var(--c-text); font-weight: 600; margin-left: 5px; }

.fields { padding-top: 12px; padding-bottom: 96px; }
.fields__grid { align-items: start; }
.fields__intro { position: sticky; top: 28px; align-self: start; }
.fields__title { margin: 0; }
.fields__lead { margin: 14px 0 0; max-width: 30em; color: var(--c-muted); line-height: 1.8; }
.tabs [role="tablist"] { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tabs [role="tab"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--c-panel); color: var(--c-muted); font-weight: 600;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }
.tabs [role="tabpanel"] { margin-top: 20px; }
.drawers { border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-panel); color: var(--c-text); overflow: hidden; }
.drawers [role="tablist"] { display: block; }
.drawers [role="tab"] {
  display: flex; align-items: baseline; justify-content: flex-start; gap: 16px; width: 100%; min-height: 52px;
  padding: 14px 20px; border: 0; border-top: 1px solid var(--c-border-soft); border-radius: 0;
  background: var(--c-panel); color: var(--c-muted); font-size: 15px; font-weight: 400; text-align: left;
}
.drawers [role="tab"]:first-child { border-top: 0; }
.drawers [role="tab"][aria-selected="true"] { background: var(--c-panel); color: var(--c-text); box-shadow: inset 3px 0 0 var(--c-accent); }
.drawers [role="tab"] code { min-width: 9.5em; font-size: 13.5px; font-weight: 600; color: var(--c-text); }
.drawers [role="tabpanel"] { margin: 0; padding: 6px 20px 20px; font-size: 15px; line-height: 1.85; }
.drawers pre { margin-bottom: 0; background: var(--c-panel); color: var(--c-text); box-shadow: var(--shadow-chip); }
.toc { position: sticky; top: 16px; align-self: start; padding: 12px; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-panel); color: var(--c-text); }
.toc ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; font-size: 14px; text-decoration: none; color: var(--c-muted); border-radius: var(--r-sm); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--c-panel-2); color: var(--c-accent-dark); }
.faq-item { border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-panel); color: var(--c-text); margin-bottom: 12px; }
.faq-item summary { padding: 18px 20px; font-weight: 700; }
.faq-item[open] summary { border-bottom: 1px solid var(--c-border-soft); color: var(--c-accent-dark); }
.faq-item__body { padding: 18px 20px; }
.faq-item__body p:last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--c-accent); }
.term-card__key { display: block; margin-bottom: 12px; font-family: var(--font-mono); font-size: 13px; color: var(--c-muted); }
.client-card__head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.client-card__head h3 { margin: 0; }
.client-card__version { display: inline-block; color: var(--c-muted); font-family: var(--font-mono); font-size: 12px; margin-bottom: 12px; }
[data-version]:empty { display: none; }
.client-card--primary { border-color: var(--c-accent); box-shadow: var(--shadow-board); }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge, .tag {
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%;
  padding: 4px 9px; border: 1px solid var(--c-border); border-radius: var(--r-sm);
  background: var(--c-panel-2); color: var(--c-muted); font-size: 12px; font-weight: 700;
  overflow-wrap: anywhere; white-space: normal; line-height: 1.5;
}
.badge--first { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.badge--recommended { background: var(--c-panel-2); color: var(--c-accent-dark); border-color: var(--c-border); }
.badge--archived { background: var(--c-panel); color: var(--c-muted); border-style: dashed; }
.post-card { display: flex; flex-direction: column; }
.post-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--c-muted); font-size: 12px; margin-bottom: 16px; }
.post-card h3 a { color: var(--c-text); text-decoration: none; }
.post-card h3 a:hover { color: var(--c-accent); text-decoration: underline; }
.post-card p { color: var(--c-muted); }
.post-card__link { margin-top: auto; font-size: 14px; font-weight: 700; }
.callout {
  margin: 24px 0; padding: 20px 24px; border: 1px solid var(--c-border); border-left: 3px solid var(--c-accent);
  border-radius: var(--r-sm); background: var(--c-panel); color: var(--c-text);
}
.callout p:last-child { margin-bottom: 0; }
.callout--warning { border-left-color: var(--c-warn); }
.callout--error { border-left-color: var(--c-error); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--c-border); border-radius: var(--r-sm); }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-panel); color: var(--c-text); font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em; padding: 14px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--c-border); overflow-wrap: normal; word-break: normal;
}
.data-table th, .prose table th { background: var(--c-panel-2); color: var(--c-text); font-weight: 700; }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table, .document-body table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: 100%; min-width: 0; border-collapse: collapse;
  background: var(--c-panel); color: var(--c-text);
}
.article-body table th, .article-body table td, .document-body table th, .document-body table td { min-width: 7em; padding: 14px 16px; border-bottom: 1px solid var(--c-border); overflow-wrap: normal; word-break: normal; }
.data-table code, .prose table code, .article-body table code, .document-body table code { overflow-wrap: anywhere; white-space: normal; }
.download-note { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: 40px; }
.download-note h2 { font-size: 24px; margin: 0 0 8px; }
.download-note p { color: var(--c-muted); margin: 0; }
.dl-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 7px 18px 7px 8px;
  border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--c-panel); color: var(--c-text);
  box-shadow: var(--shadow-fab); text-decoration: none; font-size: 14.5px; font-weight: 700;
}
.dl-fab__icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--c-accent); color: var(--c-on-accent); display: grid; place-items: center; }
.dl-fab__icon svg { width: 15px; height: 15px; }
.dl-fab:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* 预览色板：数值仍只在 :root 内定义。 */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.swatch { padding: 12px; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: var(--c-panel); color: var(--c-text); }
.swatch__paint { display: block; height: 54px; margin-bottom: 10px; border: 1px solid var(--c-border); border-radius: var(--r-xs); color: var(--c-text); }
.paint-bg { background: var(--c-bg); }
.paint-panel { background: var(--c-panel); }
.paint-panel2 { background: var(--c-panel-2); }
.paint-border { background: var(--c-border); }
.paint-soft { background: var(--c-border-soft); }
.paint-strong { background: var(--c-border-strong); }
.paint-accent { background: var(--c-accent); color: var(--c-on-accent); }
.paint-dark { background: var(--c-accent-dark); color: var(--c-on-accent); }
.paint-text { background: var(--c-text); color: var(--c-panel); }
.paint-muted { background: var(--c-muted); color: var(--c-panel); }
.paint-faint { background: var(--c-faint); }
.paint-success { background: var(--c-success); color: var(--c-panel); }
.paint-warn { background: var(--c-warn); }
.paint-error { background: var(--c-error); color: var(--c-panel); }
.paint-dot-a { background: var(--c-dot-a); }
.paint-dot-b { background: var(--c-dot-b); }
.paint-dot-c { background: var(--c-dot-c); }
.paint-clear { background: var(--c-clear); }
.paint-veil { background: var(--c-veil); }
.preview-type { margin: 0 0 20px; }
.preview-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.preview-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-block: 20px; }
@media (max-width: 1120px) {
  .hero__grid, .fields__grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero { min-height: 0; padding-top: 32px; padding-bottom: 56px; }
  .hero__copy { max-width: 640px; }
  .fields__intro { position: static; }
}
@media (max-width: 760px) {
  .board__grid, .ext { grid-template-columns: minmax(0, 1fr); }
  .board__head { flex-wrap: wrap; }
  .board__sub { margin-left: 0; width: 100%; }
  .guide li { font-size: 16px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .drawers [role="tab"] { flex-wrap: wrap; gap: 3px 12px; }
  .drawers [role="tab"] code { min-width: 0; }
  .dl-fab { right: 16px; bottom: 16px; }
  .board__grid { padding-inline: 18px; }
  .board__head { padding-inline: 18px; }
  .board__foot { padding-inline: 18px; }
  .board__status { padding-inline: 18px; }
  .toc { position: static; }
  .badges { flex-direction: row; flex-wrap: wrap; }
}