.bd-sidebar-primary { --pst-sidebar-primary-width: 15rem; }  /* a narrower sidebar leaves room for the tables */
.bd-page-width, .bd-main .bd-content .bd-article-container { max-width: 100%; }
/* A wide search box in the top bar, which has room since the navigation is in the sidebar. */
.navbar-header-items__end, .navbar-header-items__end .navbar-persistent--container { flex-grow: 1; }
.navbar-header-items__end .search-button-field { width: 100%; max-width: 40rem; }
/* A security boundary's reason wraps onto several lines rather than widening its column. */
.reason { display: inline-block; min-width: 14rem; max-width: 18rem; }
.date { white-space: nowrap; }  /* '2026-10-28' would wrap at its hyphens */

/* Table rows tinted by the repository's kind: insights.py tags each repository cell with kind-<kind>.
   Translucent, so the table stripes and the dark theme show through. The row under the mouse gets a
   stronger tint, so a long row is easy to follow. */
:root {
  --kind-package: 66, 133, 244;
  --kind-application: 156, 102, 255;
  --kind-tooling: 255, 159, 28;
  --kind-deployment: 239, 83, 80;
  --kind-documentation: 76, 175, 80;
  --kind-example: 0, 172, 193;
  --kind-other: 128, 128, 128;
  --kind-alpha: 0.10;
}
tr:hover > td { --kind-alpha: 0.25; }
tr:has(.kind-package) > td, .legend.kind-package { background-color: rgba(var(--kind-package), var(--kind-alpha)); }
tr:has(.kind-application) > td, .legend.kind-application { background-color: rgba(var(--kind-application), var(--kind-alpha)); }
tr:has(.kind-tooling) > td, .legend.kind-tooling { background-color: rgba(var(--kind-tooling), var(--kind-alpha)); }
tr:has(.kind-deployment) > td, .legend.kind-deployment { background-color: rgba(var(--kind-deployment), var(--kind-alpha)); }
tr:has(.kind-documentation) > td, .legend.kind-documentation { background-color: rgba(var(--kind-documentation), var(--kind-alpha)); }
tr:has(.kind-example) > td, .legend.kind-example { background-color: rgba(var(--kind-example), var(--kind-alpha)); }
tr:has(.kind-other) > td, .legend.kind-other { background-color: rgba(var(--kind-other), var(--kind-alpha)); }
.legend { padding: 0.1em 0.45em; border-radius: 0.3em; }

/* Compact tables. The header keeps its horizontal padding, which DataTables sizes around the sort arrows. */
.bd-article table { font-size: 0.875rem; line-height: 1.35; }
.bd-article table.table > :is(thead, tbody) > tr > :is(th, td) { padding-block: 0.25rem; }
.bd-article table.table > tbody > tr > td { padding-inline: 0.5rem; }
.bd-article table a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

/* The organization and owner dropdowns that tables.js adds beside the search box. */
.table-filter { margin-right: 0.75em; }
.bd-article .dt-search input { width: 12rem; }  /* narrower than DataTables', so three dropdowns fit beside it */

/* {download} wraps its text in <code>: show it as the plain link it is. */
a.download code { font: inherit; background: none; border: 0; padding: 0; color: inherit; }
.table-download { margin-left: 1.5em; white-space: nowrap; }  /* after a table's pager, see tables.js */
/* Below a table, one sentence: "Showing 1 to 50 of 227 entries, [50] entries per page". DataTables leaves 1em after
   the count and nothing between the page size and its label. */
div.dt-container div.dt-layout-row div.dt-layout-cell > .dt-info { margin-right: 0.35em; }
div.dt-container .dt-info::after { content: ","; }
div.dt-container .dt-length label { margin-left: 0.35em; }

.status { padding: 0.1em 0.45em; border-radius: 0.3em; white-space: nowrap; }
.status-done { background: rgba(76, 175, 80, 0.25); }
.status-partial { background: rgba(255, 159, 28, 0.25); }
.status-missing { background: rgba(239, 83, 80, 0.25); }
.status-na { background: rgba(128, 128, 128, 0.25); }

/* The progress column of the topic tables: a bar of the done (green) and partial (orange) repos, which
   insights.py sets as --done and --partial, then the percentage done, or a check mark for a finished topic. */
/* A fixed width, so the bars line up in a column that DataTables aligns to the right. In rem, which a font size of 0
   leaves alone. */
.topic-label { display: inline-block; width: 2.5rem; text-align: right; }
.topic-finished { font-size: 0; }  /* hides the "100%" that DataTables sorts by */
.topic-finished::before { content: "✓"; font-size: 1.25rem; line-height: 1; font-weight: bold; color: rgb(56, 142, 60); }
.topic-progress { display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap; }
.bd-article td:has(.topic-progress) { width: 1%; }  /* as narrow as the bar, so the other columns get the room */
.topic-bar {
  width: 8rem;
  height: 0.75rem;
  border-radius: 0.375rem;
  background: linear-gradient(to right,
    rgb(76, 175, 80) 0 var(--done),
    rgb(255, 159, 28) 0 calc(var(--done) + var(--partial)),
    rgba(128, 128, 128, 0.25) 0);
}

/* Every column is aligned to the left, with its sort arrows on the right. DataTables aligns the columns of numbers
   and dates to the right and moves their arrows to the left, which makes a row of headers look ragged. */
.bd-article table.dataTable :is(th, td):is(.dt-type-numeric, .dt-type-date) { text-align: left; }
.bd-article table.dataTable th:is(.dt-type-numeric, .dt-type-date) div.dt-column-header { flex-direction: row; }

/* The theme's h2 and h3 differ by a few pixels, so a subsection like "Software" passed for a section. A rule under
   each section heading and smaller subsection headings make the levels plain. */
.bd-article h2 { padding-bottom: 0.3em; border-bottom: 1px solid var(--pst-color-border); }
.bd-article h3 { font-size: 1.3rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }

/* The theme fills whatever a link jumps to with --pst-color-target, a yellow block that is loud in the dark theme
   and shows on every count's link, which lands on a heading. A faint tint of the primary color instead, in both
   themes; it also marks search terms and footnotes. */
html[data-theme="light"], html[data-theme="dark"] {
  --pst-color-target: color-mix(in srgb, var(--pst-color-primary) 15%, transparent);
}

/* Compact table controls, at the tables' text size, so a heading sits close to its table. */
div.dt-container div.dt-layout-row { margin: 0.5em 0; }
div.dt-container :is(.dt-search input, select).dt-input { font-size: 0.875rem; line-height: 1.35; padding: 0.2em 0.4em; }
/* A table cell's text comes in a paragraph, whose bottom margin made the header row tall. */
.bd-article table :is(th, td) > p:last-child,
.bd-article table .dt-column-title > p:last-child { margin-bottom: 0; }
