/* ─── Releases Page Styles ───────────────────────────────────────────────── */
/* Layered on docs.css (shell: .docs-layout/.docs-sidebar/.docs-search/.sr-only)
   and styles.css (:root vars, .legal-content bullet styling).

   PROGRESSIVE ENHANCEMENT: with no JS, none of the .releases-enhanced rules
   apply and the page renders as one stacked column of every release — which is
   exactly the page this redesign replaced, i.e. a working fallback. releases.js
   adds .releases-enhanced (and .docs-enhanced, for the docs.css mobile drawer)
   to #releases-root on load. Never hide a .release outside that class;
   tests/test_website_docs.py::test_releases_css_hides_releases_only_behind_the_enhancement_class
   guards it. */

/* No width override is needed on the content pane: it carries .legal-content
   only for the bullet markers (styles.css:727), and docs.css:114's
   `.docs-content { max-width: 840px }` already beats styles.css:712's
   `.legal-content { max-width: 72ch }` — equal specificity, later link order.
   Re-stating 840px here would be an inert declaration. */

/* The search empty-state ships VISIBLE in the markup, because
   Task 2's generator is barred from emitting inline `display:none` (docs.html
   hides its copy with an inline style; releases.html cannot). Hiding it here is
   UNCONDITIONAL on purpose — a `:not(.releases-enhanced)` scope would still
   flash the text before releases.js initialises. releases.js therefore reveals
   it with an explicit `'block'`, never the `''` idiom (which only works in
   docs.js because it clears an inline style back to a visible cascade). */
.docs-search-empty {
  display: none;
}

.releases-layout .release {
  scroll-margin-top: 16px;
  padding-bottom: 8px;
}

/* Un-enhanced: a hairline between stacked releases keeps them readable. */
.releases-layout .release + .release {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}

/* ─── Enhanced (JS present): one release at a time ───────────────────────── */
.releases-layout.releases-enhanced .release {
  display: none;
}
.releases-layout.releases-enhanced .release.is-current {
  display: block;
}
.releases-layout.releases-enhanced .release + .release {
  border-top: none;
  padding-top: 0;
}

/* ─── Sidebar date chip + match count ────────────────────────────────────── */
/* docs.css:58 makes .sidebar-link a flex container, and `float` has no effect
   on a flex item — so these chips right-align with `margin-left: auto`, the
   flex equivalent of `float: right`. releases.js appends .release-match-count
   AFTER .release-nav-date, so the auto margin on the first chip pushes the pair
   to the right edge and the sibling rule below keeps the 8px between them a
   gap rather than a competing second alignment (two auto margins would split
   the free space and strand the date chip mid-row). */
.release-nav-date {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.sidebar-link.active .release-nav-date {
  color: inherit;
}
/* auto, not 8px, so the count still right-aligns when it is the only chip — an
   undated release in the "Earlier" bucket renders no date chip at all. */
.release-match-count {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--hairline);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.release-nav-date ~ .release-match-count {
  margin-left: 8px;
}

/* ─── Search highlighting ────────────────────────────────────────────────── */
.releases-layout mark {
  background: var(--green);
  color: var(--bg);
  border-radius: 2px;
  padding: 0 2px;
}
