/* 所有组件皮肤均显式给定文字色。 */
.tabset { min-width: 0; }
.feature-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 48px; align-items: center; }
.tab-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tab-list [role="tab"] {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; padding: 10px 16px; border: 1px solid var(--clear);
  border-radius: var(--r-btn); background: var(--clear); color: var(--muted);
  font-family: var(--font-body); font-size: var(--fs-button); font-weight: 600; text-align: left;
}
.tab-list [role="tab"]:hover { background: var(--bg); color: var(--text); }
.tab-list [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-xs); }
.tab-list [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: var(--r-tiny); background: var(--accent); }
.tab-icon { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: var(--r-icon); background: var(--bg-panel); color: var(--accent-dark); }
.tab-icon svg { width: 17px; height: 17px; }
.tab-panels { min-width: 0; }
.tab-detail { color: var(--muted); margin-top: 20px; line-height: 1.9; }
.tab-detail p { margin-top: 0; }
.tab-list--horizontal { flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
.tab-list--horizontal [role="tab"] { width: auto; flex-shrink: 0; }
.example-card { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-soft); min-width: 0; }
.example-title { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: var(--fs-sm); margin-bottom: 20px; }
.example-dots { display: inline-flex; gap: 5px; flex-shrink: 0; }
.example-dots i { width: 6px; height: 6px; border-radius: var(--r-round); background: var(--border-strong); }
.example-card pre { border: 0; padding: 12px; margin: 0; background: var(--bg-panel2); color: var(--text); }
.example-caption { position: relative; width: fit-content; max-width: 100%; margin: 20px 0 0 auto; padding: 12px 16px; border-radius: var(--r-btn); background: var(--text); color: var(--on-ink); font-size: var(--fs-sm); box-shadow: var(--shadow-note); }
.example-caption::before { content: ""; position: absolute; top: -5px; left: 24px; width: 10px; height: 10px; background: var(--text); transform: rotate(45deg); border-radius: var(--r-tiny); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; margin-bottom: 32px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 12px; border-radius: var(--r-btn); text-decoration: none; color: var(--muted); font-size: var(--fs-nav); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--accent-soft); color: var(--accent-dark); }
.toc--sticky { position: sticky; top: 16px; z-index: 12; }
.faq-list { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary { position: relative; list-style: none; cursor: pointer; padding: 20px 52px 20px 24px; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 20px; color: var(--accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 20px; color: var(--muted); }
.faq-answer > :first-child { margin-top: 0; }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-xs); }
.term-card h3 { font-family: var(--font-mono); font-size: var(--fs-lead); margin: 0 0 8px; }
.term-card p { color: var(--muted); margin: 0; }
.term-category { display: block; color: var(--accent-dark); font-size: var(--fs-xs); margin-bottom: 14px; }

.appstore-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; max-width: 100%; padding: 10px 20px; border: 1px solid var(--text);
  border-radius: var(--r-btn); background: var(--text); color: var(--on-ink);
  font-family: var(--font-body); text-decoration: none; box-shadow: var(--hl-ink), var(--shadow-btn);
  transition: background-color var(--ease);
}
.appstore-btn:hover, .appstore-btn.is-hover { background: var(--text-hover); color: var(--on-ink); }
.appstore-btn svg { width: 25px; height: 28px; flex-shrink: 0; }
.appstore-btn > span { display: block; text-align: left; }
.appstore-btn small { display: block; font-size: var(--fs-micro); line-height: 1.35; font-weight: 500; }
.appstore-btn strong { display: block; font-size: var(--fs-body); line-height: 1.45; font-weight: 600; }
.appstore-btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.appstore-btn.is-active { box-shadow: var(--shadow-xs); }
.appstore-btn[aria-disabled="true"] { background: var(--bg-panel2); color: var(--muted); border-color: var(--border); box-shadow: none; }
.fact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; margin: 20px 0 0; list-style: none; }
.fact-pill, .tag { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg); color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.fact-pill b { font-weight: 600; color: var(--text); }
.fact-pill svg { width: 14px; height: 14px; flex-shrink: 0; }
.tag { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--clear); }
.tag--success { background: var(--bg-panel2); color: var(--success-ink); border-color: var(--border); }
.tag--warn { background: var(--bg-panel2); color: var(--warn-ink); border-color: var(--border); }
.tag--error { background: var(--bg-panel2); color: var(--error-ink); border-color: var(--border); }
.hero-facts { margin-top: 12px; }

.shot-row { display: flex; justify-content: center; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.official-shot { width: min(100%, 280px); max-width: 280px; margin: 0; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot { border: 1px solid var(--border); border-radius: var(--r-shot); background: var(--bg); color: var(--text); }
.official-shot figcaption { padding: 12px 14px; color: var(--muted); font-size: var(--fs-sm); }
.shot-placeholder { display: grid; place-items: center; width: 100%; aspect-ratio: 750 / 1334; border-radius: var(--r-shot); background: var(--bg-panel2); color: var(--muted); }
.shot-placeholder span { max-width: 12em; padding-inline: 16px; text-align: center; font-size: var(--fs-sm); }

.device-card { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); min-width: 0; }
.device-card > svg { width: 44px; height: 52px; color: var(--text); margin-bottom: 20px; }
.device-card h3 { margin: 0 0 10px; }
.device-card p { margin: 0 0 24px; color: var(--muted); }
.device-card .btn { margin-top: auto; }
.article-card { display: flex; flex-direction: column; padding: 24px; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-xs); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: var(--fs-xs); color: var(--muted); }
.article-card h3 { font-size: var(--fs-lead); line-height: 1.55; margin: 18px 0 12px; }
.article-card h3 a { text-decoration: none; color: var(--text); }
.article-card h3 a:hover { color: var(--accent-dark); }
.article-card p { margin: 0 0 20px; color: var(--muted); font-size: var(--fs-nav); }
.article-card > a { margin-top: auto; font-size: var(--fs-nav); text-decoration: none; }
.callout { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-btn); background: var(--bg-panel); color: var(--text); }
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }
.callout--warn { border-left-color: var(--warn); background: var(--bg-panel2); color: var(--text); }
.callout-title { display: block; margin-bottom: 8px; font-weight: 700; }

.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-btn); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; background: var(--bg); color: var(--text); font-size: var(--fs-nav); }
.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; border-bottom: 1px solid var(--border);
  vertical-align: top; overflow-wrap: normal; word-break: normal;
}
.data-table th, .prose table th, .article-body table th { background: var(--bg-panel2); color: var(--text); font-weight: 600; }
.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(--bg); color: var(--text); text-align: left;
}
.prose table code, .article-body table code, .data-table code { overflow-wrap: anywhere; }
.dl-fab {
  position: fixed; z-index: 25; right: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  min-height: 56px; padding: 12px 18px; border: 1px solid var(--text);
  border-radius: var(--r-card); background: var(--text); color: var(--on-ink);
  text-decoration: none; box-shadow: var(--shadow-note);
}
.dl-fab:hover { background: var(--text-hover); color: var(--on-ink); }
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.dl-fab strong { display: block; font-size: var(--fs-nav); }
.dl-fab small { display: block; font-size: var(--fs-xs); }
.has-article-fab { padding-bottom: 100px; }
.article-store-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); margin-top: 40px; }
.article-store-card h2 { font-size: var(--fs-h3); margin: 0 0 12px; }
.article-store-card p { color: var(--muted); margin: 0 0 20px; }
.grouped-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.grouped-list li + li { border-top: 1px solid var(--border); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 14px 20px; color: var(--text); text-decoration: none; }
.grouped-list a::after { content: "›"; color: var(--muted); }
.grouped-list a:hover { background: var(--bg-panel); color: var(--accent-dark); }

/* 仅供设计预览使用的令牌色板。 */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg); color: var(--text); min-width: 0; }
.swatch-color { display: block; height: 48px; border-bottom: 1px solid var(--border); border-radius: var(--r-btn) var(--r-btn) 0 0; }
.swatch code { display: block; padding: 10px; color: var(--muted); font-size: var(--fs-xs); }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--bg-panel); }
.sw-panel2 { background: var(--bg-panel2); }
.sw-border { background: var(--border); }
.sw-border-strong { background: var(--border-strong); }
.sw-dot { background: var(--dot); }
.sw-stripe { background: var(--stripe); }
.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-accent-glow { background: var(--accent-glow); }
.sw-text { background: var(--text); }
.sw-text-hover { background: var(--text-hover); }
.sw-muted { background: var(--muted); }
.sw-faint { background: var(--faint); }
.sw-success { background: var(--success); }
.sw-success-ink { background: var(--success-ink); }
.sw-warn { background: var(--warn); }
.sw-warn-ink { background: var(--warn-ink); }
.sw-error { background: var(--error); }
.sw-error-ink { background: var(--error-ink); }
.sw-peach { background: var(--peach); }
.sw-pink { background: var(--pink); }
.sw-peri { background: var(--peri); }
.sw-clear { background: var(--clear); }
.sw-veil { background: var(--veil); }
.preview-states { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-caption { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 12px; }
.preview-type h1, .preview-type h2, .preview-type h3 { margin-top: 0; }
.preview-type .lede { margin-top: 0; }
.preview-footer { margin-top: 0; }

@media (max-width: 960px) {
  .feature-layout { grid-template-columns: 1fr; gap: 28px; }
  .feature-layout .tab-list { flex-direction: row; overflow-x: auto; padding: 4px 4px 12px; }
  .feature-layout .tab-list [role="tab"] { width: auto; flex-shrink: 0; min-height: 44px; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 7px 14px; white-space: nowrap; }
  .feature-layout .tab-list [aria-selected="true"]::before { display: none; }
  .feature-layout .tab-list [role="tab"][aria-selected="true"] { border-color: var(--accent); color: var(--accent-dark); }
}
@media (max-width: 640px) {
  .fact-row { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .fact-pill { padding: 5px 9px; }
  .shot-row { flex-direction: column; align-items: center; gap: 24px; }
  .device-card { padding: 24px; }
  .faq-item summary { padding: 18px 44px 18px 18px; }
  .faq-item summary::after { right: 18px; top: 18px; }
  .faq-answer { padding: 0 18px 18px; }
  .example-card { padding: 18px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
  .toc { flex-wrap: nowrap; overflow-x: auto; }
  .toc a { flex-shrink: 0; }
}