.algorithms-filters {
  margin: 1.5rem 0 1rem;
  font-size: 0.7rem;
}

.algorithms-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.algorithms-filters-row[hidden] {
  display: none;
}

.algorithms-filters input[type="search"],
.algorithms-filters select,
.algorithms-filters button {
  padding: 0.35rem 0.6rem;
  font-size: inherit;
  color: var(--md-default-fg-color);
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.2rem;
}

.algorithms-filters input[type="search"] {
  flex: 1 1 16rem;
}

.algorithms-filters button {
  cursor: pointer;
}

.algorithms-filters button:hover {
  border-color: var(--md-accent-fg-color);
  color: var(--md-accent-fg-color);
}

.algorithms-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.algorithms-count {
  margin-left: auto;
}

.algorithms-tristates-legend {
  margin: 0 0 0.3rem;
}

.algorithms-tristates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 0.4rem 1.2rem;
  margin-bottom: 0.6rem;
}

.algorithms-tristate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-left: 1.2rem;
}

.algorithms-tristate-options {
  display: inline-flex;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.2rem;
  overflow: hidden;
  white-space: nowrap;
}

.algorithms-tristate-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.algorithms-tristate-options label {
  padding: 0.05rem 0.4rem;
  cursor: pointer;
  line-height: 1.4;
  border-left: 1px solid var(--md-default-fg-color--lighter);
}

.algorithms-tristate-options label:first-of-type {
  border-left: none;
}

.algorithms-tristate-options label:hover {
  color: var(--md-accent-fg-color);
}

.algorithms-tristate-options input:checked + label {
  background: var(--md-accent-fg-color);
  color: var(--md-accent-bg-color);
}

.algorithms-tristate-options input:focus-visible + label {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: -2px;
}

.md-typeset .algorithms-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.md-typeset .algorithms-list > li {
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset .algorithms-item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
}

.md-typeset .algorithms-item-description,
.md-typeset .algorithms-item-footer {
  margin: 0.2rem 0 0;
}

.md-typeset .algorithms-item-description {
  font-size: 0.7rem;
  text-align: left;
}

.md-typeset .algorithms-item-footer {
  font-size: 0.65rem;
}

.md-typeset .algorithms-tag {
  font-size: 0.55rem;
}

.algorithms-warning {
  color: var(--md-typeset-del-color);
}

.algorithms-hidden {
  display: none;
}
