/* 首屏沿用确认稿：居中文案、平台行、四张配置批注卡。 */
.lead-screen { overflow: hidden; background: var(--bg); color: var(--text); }
.lead-copy {
  max-width: 1000px; margin: 0 auto; padding: 40px var(--gutter) 0;
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.status-tag {
  display: inline-flex; align-items: center; gap: 10px; height: 30px;
  margin: 0; padding: 0 14px 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text-muted); box-shadow: var(--shadow-xs);
  font-size: var(--fs-small); font-weight: var(--weight-medium);
}
.status-tag b { color: var(--text); font-weight: var(--weight-semibold); }
.breath { position: relative; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--accent); flex-shrink: 0; }
.breath::after { content: ""; position: absolute; inset: -4px; border-radius: var(--r-pill); background: var(--accent); opacity: 0; transform: scale(.5); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe {
  0% { opacity: .38; transform: scale(.5); }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}
.lead-title {
  margin: 18px 0 22px; font-family: var(--font-display);
  font-weight: var(--weight-display); font-size: var(--fs-lead);
  line-height: var(--leading-title); letter-spacing: var(--tracking-display); color: var(--text);
}
.lead-title .dot-sep { color: var(--border-strong); margin: 0 .16em; }
.proof-wave {
  text-decoration-line: underline; text-decoration-style: wavy;
  text-decoration-color: var(--accent); text-decoration-thickness: 2px;
  text-underline-offset: .22em; text-decoration-skip-ink: none;
}
.lead-line { margin: 18px 0 0; max-width: 780px; font-size: var(--fs-body); line-height: 1.6; color: var(--text-muted); }
.lead-line strong { color: var(--text); font-weight: var(--weight-semibold); }
.os-row { margin: 18px 0 0; padding: 0; list-style: none; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.os-row-label { font-size: var(--fs-small); color: var(--text-muted); margin-right: 6px; }
.os-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs);
  font-size: var(--fs-small); font-weight: var(--weight-medium); text-decoration: none;
  transition: border-color var(--speed) ease, color var(--speed) ease;
}
.os-chip svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text); }
.os-chip:hover { border-color: var(--accent-ring); color: var(--text); }
.os-chip:hover svg { color: var(--accent); }
.deck { margin-top: 40px; padding: 4px 0 64px max(var(--gutter), calc((100% - var(--container)) / 2)); }
.deck-track { display: grid; grid-template-columns: repeat(4, clamp(296px, calc((100vw - 140px) / 3.87), 380px)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.set-card { min-width: 0; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; }
.set-card--moss { --tint: var(--tint-moss); --marker: var(--accent); }
.set-card--steel { --tint: var(--tint-steel); --marker: var(--steel); }
.set-card--apricot { --tint: var(--tint-apricot); --marker: var(--apricot); }
.set-card--neutral { --tint: var(--tint-neutral); --marker: var(--text-muted); }
.stage { position: relative; height: 240px; background: var(--tint); color: var(--text); border-bottom: 1px solid var(--border); overflow: hidden; }
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 0; color: var(--mark); pointer-events: none;
  background-image: linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor);
  background-repeat: no-repeat;
  background-size: 9px 1px,1px 9px,9px 1px,1px 9px,9px 1px,1px 9px,9px 1px,1px 9px;
  background-position: left 12px top 14px,left 16px top 10px,right 12px top 14px,right 16px top 10px,left 12px bottom 14px,left 16px bottom 10px,right 12px bottom 14px,right 16px bottom 10px;
}
.stage::after { content: ""; position: absolute; top: 0; bottom: 0; left: 64%; right: 0; z-index: 0; background: var(--veil); pointer-events: none; }
.mini-win { position: absolute; z-index: 1; top: 22px; left: 16px; right: 48px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-win); box-shadow: var(--shadow-win); overflow: hidden; }
.mini-bar { height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px 0 10px; background: var(--bg-panel); color: var(--text); border-bottom: 1px solid var(--border); font-size: var(--fs-mini); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-normal); }
.mini-ctrl { display: inline-flex; align-items: center; gap: 9px; color: var(--text-faint); }
.mini-ctrl svg { width: 8px; height: 8px; display: block; fill: none; stroke: currentColor; stroke-width: 1.2; }
.mini-body { padding: 8px 10px 10px; display: grid; gap: 4px; }
.opt { display: flex; align-items: center; gap: 8px; height: 24px; }
.opt.is-noted { margin: 0 -6px; padding: 0 6px; border-radius: var(--r-field); background: var(--accent-soft); color: var(--text); }
.opt-k { flex: 0 0 56px; font-size: var(--fs-mini); color: var(--text-muted); white-space: nowrap; }
.field {
  flex: 1; min-width: 0; height: 20px; padding: 0 6px;
  border: 1px solid var(--border); border-radius: var(--r-field);
  background: var(--surface); color: var(--text); font-size: var(--fs-mini); line-height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mono { font-family: var(--font-mono); font-size: var(--fs-mono-mini); letter-spacing: var(--tracking-normal); }
.field-select { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.field-select svg { width: 10px; height: 10px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted); }
.ann { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-skip-ink: none; color: var(--text); }
.toggle { position: relative; width: 26px; height: 14px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--border-strong); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-xs); }
.toggle.is-on { background: var(--accent); }
.toggle.is-on::after { left: 14px; }
.toggle-note { font-size: var(--fs-mono-mini); color: var(--text-muted); white-space: nowrap; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-field); background: var(--bg-panel-2); color: var(--text-muted); }
.seg span { height: 16px; padding: 0 6px; border-radius: var(--r-small); font-family: var(--font-mono); font-size: var(--fs-tiny); line-height: 16px; color: var(--text-muted); }
.seg .is-on { background: var(--surface); color: var(--text); font-weight: var(--weight-semibold); box-shadow: var(--shadow-xs); }
.rule-table { border: 1px solid var(--border); border-radius: var(--r-field); overflow: hidden; }
.rule-head { height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; background: var(--bg-panel); color: var(--text-muted); border-bottom: 1px solid var(--border); font-size: var(--fs-tiny); }
.rule-line { height: 26px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; font-family: var(--font-mono); font-size: var(--fs-mono-mini); color: var(--text); }
.rule-line + .rule-line { border-top: 1px solid var(--bg-panel-2); }
.rule-line.is-noted { background: var(--accent-soft); color: var(--text); }
.out-tag { flex-shrink: 0; height: 16px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--r-small); background: var(--bg-panel); color: var(--text-muted); font-family: var(--font-mono); font-size: var(--fs-tiny); line-height: 14px; }
.memo {
  position: absolute; z-index: 2; right: 12px; bottom: 10px;
  width: 190px; padding: 10px 12px 10px 16px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--shadow-float);
}
.memo::before { content: ""; position: absolute; left: 7px; top: 11px; bottom: 11px; width: 2px; border-radius: var(--r-pill); background: var(--marker); }
.memo-text { margin: 0; font-size: var(--fs-memo); line-height: 1.5; color: var(--text); }
.memo-text .ann { font-weight: var(--weight-bold); text-decoration-thickness: 1.5px; }
.memo-link { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; font-size: var(--fs-memo); font-weight: var(--weight-semibold); line-height: 18px; color: var(--accent); text-decoration: none; }
.memo-link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.memo-link:hover { color: var(--accent-dark); text-decoration: underline; }
.card-foot { padding: 18px 20px 20px; }
.card-name { margin: 0 0 4px; font-family: var(--font-display); font-size: var(--fs-brand); font-weight: var(--weight-bold); line-height: 24px; letter-spacing: var(--tracking-tight); color: var(--text); }
.card-gist { margin: 0; font-size: var(--fs-half); line-height: 21px; color: var(--text-muted); }
.next-peek { max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 8px var(--gutter) 64px; }
.next-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-small); font-weight: var(--weight-semibold); color: var(--accent); }
.next-kicker::before { content: ""; width: 18px; height: 2px; border-radius: var(--r-pill); background: var(--accent); }
.next-title { margin: 10px 0 0; font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--weight-display); line-height: 1.25; letter-spacing: var(--tracking-display); color: var(--text); }

/* 批注阅览台：文字导航与配置详情共享同一条水平基线。 */
.tab-workbench { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.tab-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 24px; padding: 0; }
.tab-list [role="tab"] {
  min-height: 44px; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: var(--r-pill); background: var(--surface); color: var(--text-muted);
  font-size: var(--fs-meta); font-weight: var(--weight-medium); flex-shrink: 0;
}
.tab-list [role="tab"]:hover { background: var(--bg-panel); color: var(--text); }
.tab-list [role="tab"][aria-selected="true"] { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-ring); font-weight: var(--weight-bold); }
.tab-list--vertical { flex-direction: column; align-items: stretch; gap: 4px; }
.tab-list--vertical [role="tab"] {
  position: relative; width: 100%; text-align: left; padding: 14px 20px;
  border-color: var(--clear); border-radius: var(--r-ctl);
}
.tab-list--vertical [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); }
.tab-list--vertical [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--accent); border-radius: var(--r-pill); }
.tab-panel { min-width: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.config-proof { position: relative; padding-bottom: 86px; overflow-x: clip; }
.config-proof pre { margin: 0; background: var(--surface); color: var(--text); border: 0; padding: 12px 0; }
.config-proof .memo { --marker: var(--accent); right: 0; bottom: 12px; width: min(240px, 100%); }
.config-proof::after { content: ""; position: absolute; right: 30px; bottom: 82px; height: 24px; border-left: 1px dashed var(--accent-ring); }
.tab-explanation { margin: 18px 0 0; line-height: 1.85; color: var(--text-muted); }

.toc {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px; margin-bottom: 32px;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-field); font-size: var(--fs-meta); color: var(--text-muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--accent-soft); color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 16px; z-index: 10; }
.faq-item { border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 60px; padding: 18px 4px; cursor: pointer;
  font-weight: var(--weight-semibold); list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; color: var(--accent); font-size: var(--fs-h3); font-weight: var(--weight-medium); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 4px 20px; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { border-top: 3px solid var(--accent); }
.term-card dt { font-size: var(--fs-h3); font-weight: var(--weight-bold); color: var(--text); }
.term-card dd { margin: 12px 0 0; color: var(--text-muted); }
.term-alias { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: var(--fs-small); color: var(--text-muted); }
.client-card { display: grid; gap: 20px; }
.client-heading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.client-heading > div { min-width: 0; }
.client-heading h3 { margin: 0; }
.client-logo { width: 56px; height: 56px; flex-shrink: 0; }
.client-card .cta-row { justify-content: flex-start; }
.client-detail { margin: 0; color: var(--text-muted); }
.badge-row, .tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge, .tag {
  display: inline-block; max-width: 100%; padding: 4px 9px;
  border: 1px solid var(--border); border-radius: var(--r-field);
  background: var(--bg-panel); color: var(--text-muted);
  font-size: var(--fs-small); line-height: 1.5;
  overflow-wrap: anywhere; white-space: normal; vertical-align: middle;
}
.badge--first { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: var(--weight-bold); }
.badge--recommended { background: var(--tint-moss); color: var(--accent-dark); border-color: var(--accent-ring); }
.badge--retired { background: var(--bg-panel-2); color: var(--text-muted); }
.badge--success { background: var(--surface); color: var(--success); }
.badge--warn { background: var(--surface); color: var(--text); border-color: var(--warn); }
.badge--error { background: var(--surface); color: var(--error); }
.article-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.article-card h3 { margin: 0; font-size: var(--fs-subtitle); line-height: 1.5; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-card p { margin: 0; color: var(--text-muted); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--text-muted); }
.article-card .memo-link { margin-top: auto; padding-top: 8px; font-size: var(--fs-meta); }
.callout {
  margin: 24px 0; padding: 20px 24px;
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--r-ctl); background: var(--bg-panel); color: var(--text);
}
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--warn); }
.callout--error { border-left-color: var(--error); }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-bold); }
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-ctl); }
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); color: var(--text); font-size: var(--fs-meta); }
.data-table th, .data-table td, .prose table th, .prose table td, .article-body table th, .article-body table td {
  min-width: 7em; padding: 14px 18px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal;
}
.data-table th, .prose table th, .article-body table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table, .article-body table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: 100%; min-width: 0; border-collapse: collapse;
  background: var(--surface); color: var(--text); font-size: var(--fs-meta);
}
.article-body { min-width: 0; }
.dl-fab {
  position: fixed; z-index: 30; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 40px);
  min-height: 56px; padding: 12px 18px; border: 1px solid var(--border);
  border-radius: var(--r-card); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-float); text-decoration: none;
}
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; color: var(--accent); }
.dl-fab strong { display: block; font-size: var(--fs-meta); }
.dl-fab small { display: block; color: var(--text-muted); }
.dl-fab:hover { color: var(--accent); border-color: var(--accent-ring); }
.article-download { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; }
.article-download h2 { margin: 0 0 8px; font-size: var(--fs-h3); }
.article-download p { margin: 0; color: var(--text-muted); }

/* 预览家具：颜色仅从令牌取值，色板文字始终放在白底上。 */
.palette-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.swatch { margin: 0; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-ctl); overflow: hidden; background: var(--surface); color: var(--text); }
.swatch-chip { height: 64px; border-bottom: 1px solid var(--border); }
.swatch figcaption { padding: 10px; font-family: var(--font-mono); font-size: var(--fs-memo); overflow-wrap: anywhere; }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--bg-panel); }
.sw-panel2 { background: var(--bg-panel-2); }
.sw-border { background: var(--border); }
.sw-border-strong { background: var(--border-strong); }
.sw-accent { background: var(--accent); }
.sw-accent-dark { background: var(--accent-dark); }
.sw-accent-soft { background: var(--accent-soft); }
.sw-accent-ring { background: var(--accent-ring); }
.sw-text { background: var(--text); }
.sw-muted { background: var(--text-muted); }
.sw-faint { background: var(--text-faint); }
.sw-success { background: var(--success); }
.sw-warn { background: var(--warn); }
.sw-error { background: var(--error); }
.sw-steel { background: var(--steel); }
.sw-apricot { background: var(--apricot); }
.sw-moss { background: var(--tint-moss); }
.sw-steel-tint { background: var(--tint-steel); }
.sw-apricot-tint { background: var(--tint-apricot); }
.sw-neutral { background: var(--tint-neutral); }
.sw-surface { background: var(--surface); }
.sw-on { background: var(--on-accent); }
.sw-veil { background: var(--veil); }
.sw-mark { background: var(--mark); }
.sw-scrim { background: var(--scrim); }
.sw-clear { background: var(--clear); }
.preview-stack { display: grid; gap: 24px; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.type-display { font-family: var(--font-display); font-size: var(--fs-h1); line-height: var(--leading-title); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); }
.subtitle { font-size: var(--fs-subtitle); color: var(--text-muted); }
.preview-fab { position: static; width: fit-content; max-width: 100%; }

@media (max-width: 1180px) {
  .deck { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding-right: var(--gutter); }
  .set-card { scroll-snap-align: start; }
}
@media (max-width: 768px) {
  .tab-workbench { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tab-list--vertical { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; margin-bottom: 0; }
  .tab-list--vertical [role="tab"] { width: auto; white-space: nowrap; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 10px 16px; }
  .tab-list--vertical [role="tab"][aria-selected="true"] { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent-ring); }
  .tab-list--vertical [role="tab"][aria-selected="true"]::before { display: none; }
  .tab-panel { padding: 20px; }
  .article-download { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  .lead-copy { padding-top: 28px; }
  .lead-title { font-size: clamp(24px, 6.4vw, 30px); margin: 14px 0 18px; }
  .lead-line { font-size: var(--fs-meta); }
  .os-row-label { width: 100%; margin: 0 0 2px; }
  .deck { margin-top: 28px; padding-bottom: 40px; }
  .deck-track { grid-template-columns: repeat(4, min(84vw, 340px)); }
}
@media (prefers-reduced-motion: reduce) {
  .breath::after { animation: none; opacity: 0; }
}