/* Docs 只补内容系统需要的形态。纸面、颜色、字体、正文网格、标题标记与页脚
   全部继承 site.css，禁止在这里另起第二套视觉事实源。 */

.docs-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.docs-brand-lockup { display: flex; align-items: center; min-width: 0; flex: 1; }
.docs-brand { color: var(--ink); text-decoration: none; }
.docs-label {
  margin-left: 0.35em;
  color: var(--link-accent);
  font-family: var(--font-display);
  font-size: clamp(11px, 10px + 0.25vw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}
.docs-header-trail {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--mut);
  font-family: var(--font-display);
  font-size: clamp(11px, 10px + 0.25vw, 13.5px);
  line-height: 1;
}
.docs-header-separator {
  flex: none;
  margin-inline: 0.55em;
  color: var(--mut-soft);
}
.docs-header-group,
.docs-header-page {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--body);
  font: inherit;
}
.docs-header-group {
  flex: 0 1 auto;
  text-decoration-thickness: 1px;
}
.docs-header-group:hover {
  color: var(--link-accent);
  text-decoration-thickness: 1px;
}
.docs-header-page { flex: 1 1 auto; }
.docs-utility {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  color: var(--mut);
  font-family: var(--font-doc);
  font-size: 12px;
}
.docs-langs { display: flex; gap: var(--space-3); }
.docs-langs a[aria-current="page"] { color: var(--ink); font-weight: 500; }

.docs-article {
  /* Docs 是参考资料，不与首页章节争同一音量。H1 保留页面身份，
     H2/H3 逐级收窄；正文与首页共用 17px 事实源。 */
  --heading-h1-size: clamp(28px, 24px + 1vw, 36px);
  --heading-h2-size: clamp(25px, 21px + 0.7vw, 30px);
  --heading-h3-size: clamp(20px, 17px + 0.4vw, 22px);
  --lede-size: clamp(18px, 17.5px + 0.125vw, 19px);
  min-height: 60svh;
}

.docs-article > h1 { margin-block-start: var(--flow-cover); }

.docs-source-notice {
  margin-block-start: var(--flow-copy);
  color: var(--mut);
  font-size: 0.9em;
}

.docs-article section > h2 { scroll-margin-block-start: var(--flow-copy); }
.docs-article pre {
  margin: var(--flow-copy) 0 0;
  padding: var(--space-6);
  overflow-x: auto;
  background: var(--wash);
  color: var(--body);
  font-family: var(--font-mono);
  font-size: 0.82em;
  line-height: 1.65;
  tab-size: 2;
}
.docs-article pre code { font-size: inherit; }

.docs-table-wrap { margin-block-start: var(--space-8); overflow-x: auto; }
.docs-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: var(--font-doc);
  font-size: 0.82em;
  line-height: 1.5;
}
.docs-table th,
.docs-table td { padding: var(--space-3) 2.2ch var(--space-3) 0; text-align: left; vertical-align: top; }
.docs-table th { border-bottom: 1px solid var(--mut-soft); color: var(--ink); font-weight: 500; }
.docs-table td { color: var(--body); }

.release { margin-block-start: var(--flow-subsection); }
.release-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-6); }
.release-head h3 { margin-top: 0; text-indent: 0; font-size: 1.15em; font-family: var(--font-mono); }
.release-head h3::before { display: none; }
.release time { color: var(--mut); font-family: var(--font-doc); font-size: 0.75em; }
.release + .release { margin-block-start: var(--flow-section); }

.docs-home-group .refs { margin-block-start: var(--flow-related-item); }

@media (max-width: 599.98px) {
  .docs-head-row { align-items: flex-start; }
  .docs-utility { align-items: flex-end; flex-direction: column; gap: var(--space-2); text-align: right; }
  .docs-header-separator { margin-inline: 0.35em; }
  .docs-table { min-width: 560px; }
  .docs-article pre { padding: var(--space-4); }
}
