/* Hide the readme banner on the Sphinx front page: index.md includes readme.md
 * verbatim, and the banner duplicates the sidebar logo (light_logo/dark_logo in
 * conf.py).
 *
 * Beyond the duplication, the banner cannot agree with the page it sits on. Its
 * <picture> switches on prefers-color-scheme, which reports the OS setting,
 * while Furo's theme is a three-state toggle of its own. Pin Furo to light under
 * a dark OS and the browser serves logo-banner-dark.png onto a white page, where
 * its pale wordmark reads at 1.18:1. GitHub, where the readme has no such
 * toggle to disagree with, is the only surface the <picture> is meant for.
 */
article p[align="center"]:has(img[alt="Meta Package Manager"]) {
  display: none;
}

/* Extend Furo's --icon-* convention with octicons for sidebar toctree entries.
 * SVG paths from sphinx-design's octicons.json (mark-github is also the same
 * icon Furo uses in its own page.html footer).
 * See: https://github.com/pradyunsg/furo/discussions/921
 *
 * Caveat: Furo rewrites the current page's sidebar href to "#", so CSS
 * [href="..."] selectors cannot match the active entry. The icon will be
 * missing from the sidebar entry of the page you are currently viewing.
 * Pages using {octicon} in their title don't have this issue since the icon
 * is inline HTML. A Sphinx extension injecting icons into the <a> content
 * would be needed to fully fix this for CSS-only entries.
 */
:root {
  --icon-github: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z'/%3E%3C/svg%3E");
  --icon-code-review: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 13H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25v-8.5C0 1.784.784 1 1.75 1ZM1.5 2.75v8.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm5.28 1.72a.75.75 0 0 1 0 1.06L5.31 7l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.75.75 0 0 1 1.06 0Zm2.44 0a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L10.69 7 9.22 5.53a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
  --icon-codescan-checkmark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10.28 6.28a.75.75 0 1 0-1.06-1.06L6.25 8.19l-.97-.97a.75.75 0 0 0-1.06 1.06l1.5 1.5a.75.75 0 0 0 1.06 0l3.5-3.5Z'%3E%3C/path%3E%3Cpath d='M7.5 15a7.5 7.5 0 1 1 5.807-2.754l2.473 2.474a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2.474-2.473A7.472 7.472 0 0 1 7.5 15Zm0-13.5a6 6 0 1 0 4.094 10.386.748.748 0 0 1 .293-.292 6.002 6.002 0 0 0 1.117-6.486A6.002 6.002 0 0 0 7.5 1.5Z'%3E%3C/path%3E%3C/svg%3E");
  --icon-list-unordered: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z'/%3E%3C/svg%3E");
  --icon-package: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z'/%3E%3C/svg%3E");
  --icon-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z'/%3E%3C/svg%3E");
}

/* Shared ::before properties for sidebar toctree icons, following Furo's own
 * mask-image pattern (used for admonitions, search, etc.). The icon color
 * follows currentColor so it works in both light and dark mode.
 */
.sidebar-tree a.reference.internal[href="meta_package_manager.html"]::before,
.sidebar-tree a.reference.internal[href="tests.html"]::before,
.sidebar-tree a.reference.internal[href="genindex.html"]::before,
.sidebar-tree a.reference.internal[href="py-modindex.html"]::before,
.sidebar-tree a.reference.external[href="https://github.com/kdeldycke/meta-package-manager"]::before,
.sidebar-tree a.reference.external[href="https://github.com/sponsors/kdeldycke"]::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.25em;
  vertical-align: text-bottom;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Individual icon assignments. */
.sidebar-tree a.reference.internal[href="meta_package_manager.html"]::before {
  -webkit-mask-image: var(--icon-code-review);
  mask-image: var(--icon-code-review);
}
.sidebar-tree a.reference.internal[href="tests.html"]::before {
  -webkit-mask-image: var(--icon-codescan-checkmark);
  mask-image: var(--icon-codescan-checkmark);
}
.sidebar-tree a.reference.internal[href="genindex.html"]::before {
  -webkit-mask-image: var(--icon-list-unordered);
  mask-image: var(--icon-list-unordered);
}
.sidebar-tree a.reference.internal[href="py-modindex.html"]::before {
  -webkit-mask-image: var(--icon-package);
  mask-image: var(--icon-package);
}
.sidebar-tree a.reference.external[href="https://github.com/kdeldycke/meta-package-manager"]::before {
  -webkit-mask-image: var(--icon-github);
  mask-image: var(--icon-github);
}
.sidebar-tree a.reference.external[href="https://github.com/sponsors/kdeldycke"]::before {
  -webkit-mask-image: var(--icon-heart);
  mask-image: var(--icon-heart);
}

/* Hide Furo's default external-link arrow for entries that have a custom icon. */
.sidebar-tree a.reference.external[href="https://github.com/kdeldycke/meta-package-manager"]::after,
.sidebar-tree a.reference.external[href="https://github.com/sponsors/kdeldycke"]::after {
  content: none;
}

/* Brand marks of the per-manager pages and the manager index, inlined as SVG
 * by meta_package_manager._docs.manager_logo. The vendored artwork carries no
 * fill, so it inherits the color set here.
 *
 * Every mark keeps its own brand color on the light theme, WCAG exempting
 * logotypes from contrast requirements. The dark theme falls back to
 * currentColor, which spares each near-black mark (Rust, Steam, Slackware,
 * OpenJDK, GitHub) from disappearing into the background.
 */
.manager-logo svg {
  fill: var(--manager-logo-color, currentColor);
}

/* Manager infobox: the mark over the page's key facts, set beside the intro the
 * way an encyclopaedia sets one. Only the card floats, so the mark inside it
 * just centres itself in the header.
 */
.manager-card {
  float: right;
  width: 18rem;
  max-width: 100%;
  margin: 0 0 1.5rem 2rem;
}
.manager-card .manager-logo svg {
  display: block;
  width: 6rem;
  height: 6rem;
  margin: 0 auto;
}
.manager-card dl {
  margin-bottom: 0;
}
/* The tracker label wears the color GitHub paints it with (MANAGER_LABEL_COLOR
 * in labels.py, kept in step by test_manager_label_badge_color), so the badge
 * reads as the label itself rather than as one more link. The pale chip carries
 * dark ink on both themes, the way GitHub renders a label everywhere.
 */
.manager-card a.sd-badge {
  background-color: #bfdadc;
  border-color: #bfdadc;
  color: #1c1c1c;
  text-decoration: none;
  white-space: normal;
}
.manager-card a.sd-badge:hover {
  filter: brightness(1.07);
}

/* Furo's content column is about 46rem, so anything narrower than that leaves
 * the prose beside an 18rem box a useless ribbon: stack them instead.
 */
@media (max-width: 46em) {
  .manager-card {
    float: none;
    width: auto;
    margin-left: 0;
  }
}

/* Keep the floated box from spilling over the next section's heading. */
article h2 {
  clear: right;
}

/* Small variant sitting in the manager index table. */
.manager-logo-inline {
  float: none;
  margin: 0;
}
.manager-logo-inline svg {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
}

body[data-theme="dark"] .manager-logo svg {
  fill: currentColor;
}
@media (prefers-color-scheme: dark) {
  body:not([data-theme="light"]) .manager-logo svg {
    fill: currentColor;
  }
}

/* Vertical tab-set, opted into with `:class: tabs-vertical`.
 *
 * A dozen-plus install channels wrap into an unreadable strip of labels when laid
 * out horizontally. sphinx-design keeps the radio inputs, their labels and the
 * panes as flat siblings of a flex container, so switching that container to a
 * two-column grid is enough: labels stack down the left rail, and the single pane
 * that is not `display: none` claims the right one across every row.
 *
 * Scoped with the child combinator so a tab-set nested inside a pane keeps the
 * default horizontal layout.
 *
 * Upstream has no orientation option: it is requested in
 * https://github.com/executablebooks/sphinx-design/issues/219 and carried on their
 * roadmap at https://github.com/executablebooks/sphinx-design/issues/265. That
 * thread concluded a vertical mode would need sphinx-design to emit a different
 * HTML structure, since its labels and panes alternate as siblings rather than
 * being grouped. Grid placement makes that unnecessary: it decouples visual
 * position from source order, so the same markup lays out either way.
 *
 * This block is proposed upstream, generalised into an `:orientation: vertical`
 * option, in https://github.com/executablebooks/sphinx-design/pull/304. Once that
 * lands and ships in a release, drop everything below and set the option on the
 * tab-set in docs/install.md instead.
 */
.sd-tab-set.tabs-vertical {
  display: grid;
  grid-template-columns: minmax(7rem, max-content) 1fr;
  align-items: start;
}

/* No column-gap: the rail and the pane must share an edge for the active
 * label's marker to sit on the pane's own rule, the way the horizontal tabs
 * merge an underline into an overline. Padding does the spacing instead.
 */
.sd-tab-set.tabs-vertical > label {
  grid-column: 1;
  text-align: left;
  padding-right: 1rem;
  border-bottom: none;
  border-right: 0.125rem solid transparent;
}
.sd-tab-set.tabs-vertical > input:checked + label {
  border-right-color: var(--sd-color-tabs-underline-active);
}
.sd-tab-set.tabs-vertical > .sd-tab-content {
  grid-column: 2;
  /* Span every row rather than sit in the first one, or the pane's full height
   * inflates that single row and shoves the labels below it down the rail.
   * `1 / -1` cannot express it here: `-1` counts back from the last *explicit*
   * row, and this grid declares columns only, so it would collapse to row 1.
   * The span overshoots any real tab count instead; surplus rows are empty, and
   * with no row-gap they take no height.
   */
  grid-row: 1 / span 99;
  /* Stretch across every spanned row, or the rule runs only as deep as the
   * pane's own content instead of the full rail. `align-items: start` on the
   * container would otherwise shrink it to fit.
   */
  align-self: stretch;
  padding: 0 0 0 1.5rem;
  /* sphinx-design rules the pane with a box-shadow, not a border: one hairline
   * above and one below. Rotate that a quarter turn into a single hairline down
   * the left edge, which the active label's marker then merges into. Overriding
   * `border-*` alone left the original shadow boxing the pane.
   */
  box-shadow: -0.0625rem 0 var(--sd-color-tabs-overline);
}

/* Too narrow for two columns: hand every overridden property back to the stock
 * horizontal layout, restating sphinx-design's own values (a shorthand cannot
 * be un-set back to another stylesheet's).
 */
@media (max-width: 50em) {
  .sd-tab-set.tabs-vertical {
    display: flex;
    flex-wrap: wrap;
  }
  .sd-tab-set.tabs-vertical > label {
    padding: 1em 1.25em 0.5em;
    border-right: none;
    border-bottom: 0.125rem solid transparent;
  }
  .sd-tab-set.tabs-vertical > input:checked + label {
    border-bottom-color: var(--sd-color-tabs-underline-active);
  }
  .sd-tab-set.tabs-vertical > .sd-tab-content {
    align-self: auto;
    padding: 0.75rem 0;
    box-shadow:
      0 -0.0625rem var(--sd-color-tabs-overline),
      0 0.0625rem var(--sd-color-tabs-underline);
  }
}
