/* Shared documentation tools */
[data-doc-content] { min-width: 0; }
[data-doc-content] :is(h2, h3) { scroll-margin-top: 100px; }
.heading-link { margin-left: .5em; font-size: .8em; opacity: .45; text-decoration: none; }
.heading-link:hover, .heading-link:focus-visible { opacity: 1; }
.page-contents { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 16px 20px; margin: 24px 0 32px; }
.page-contents summary { cursor: pointer; font-weight: 600; }
.page-contents ul { columns: 2; padding-left: 20px; margin-bottom: 0; }
.page-contents li { break-inside: avoid; font-size: .9em; margin: 7px 0; }
.page-contents .toc-subsection { list-style: none; padding-left: 12px; }
.code-tools { position: relative; min-width: 0; margin: 20px 0; }
.code-tools pre { padding-top: 44px; margin: 0; }
.copy-code { position: absolute; right: 8px; top: 7px; border: 1px solid #777; border-radius: 6px; background: #fff; color: #222; padding: 3px 10px; cursor: pointer; font: inherit; font-size: 12px; z-index: 1; }
.version-label { display: inline-block; font-size: 12px; font-weight: 500; border: 1px solid #b7cabc; background: #eef7ef; color: #245032; border-radius: 20px; padding: 2px 9px; vertical-align: middle; }
.version-label.unreleased { background: #fff6e5; border-color: #dfc58e; color: #704a0a; }
.version-anchor { display: none; }
.search-form { display: flex; gap: 12px; margin: 24px 0; }
.search-form input { min-width: 0; flex: 1; padding: 12px; border: 1px solid #888; border-radius: 8px; font: inherit; }
.search-results { list-style: none; padding: 0; }
.search-results li { border-bottom: 1px solid #ddd; padding: 12px 0; }
.search-results h2 { font-size: 1.25rem; margin: 0 0 8px; }
.search-results p { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .page-contents ul { columns: 1; }
  .search-form { flex-direction: column; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Long paths and reference tables must stay within the reading column. */
[data-doc-content] { overflow-wrap: anywhere; }
[data-doc-content] table { display: block; max-width: 100%; overflow-x: auto; }

/* A scroll wrapper owns table overflow and preserves native column sizing. */
[data-doc-content] .table-scroll table { display: table; max-width: none; }
[data-doc-content] .stat .num { white-space: nowrap; overflow-wrap: normal; }
[data-doc-content] .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  [data-doc-content] .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  [data-doc-content] .stats { grid-template-columns: 1fr; }
}

/* Repository identifiers need a stable column; wrap metric headings instead. */
.doc .repo-metrics th, .doc .repo-metrics td { padding: 12px 16px; }
.doc .repo-metrics th:first-child, .doc .repo-metrics td:first-child {
  min-width: 300px;
  white-space: nowrap;
  overflow-wrap: normal;
}
.doc .repo-metrics th.n {
  min-width: 90px;
  white-space: normal;
  overflow-wrap: normal;
  font-family: var(--font);
}
