.commands-route .directory {
  --directory-line: rgb(213 188 246 / 15%);
  --directory-text: #f1e9fa;
  --directory-muted: #b7aaca;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding: 88px 28px 80px;
  color: var(--directory-text);
}

.commands-route .directory-head {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 40px;
}

.commands-route .directory h1 {
  display: inline-block;
  margin: 0;
  padding: 0 .08em .1em 0;
  color: #ead8ff;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
}

@supports (background-clip: text) {
  .commands-route .directory h1 {
    background: linear-gradient(135deg, #fff 0%, #caaff0 78%);
    background-clip: text;
    color: transparent;
  }
}

.commands-route #directory-totals {
  margin: 10px 0 0;
  color: var(--directory-muted);
  font-size: .8125rem;
}

.commands-route #directory-totals strong {
  color: #e0c5fe;
  font-weight: 650;
}

.commands-route .directory-search {
  position: relative;
  display: block;
  width: min(240px, 100%);
}

.commands-route .directory-search::before,
.commands-route .directory-search::after {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  color: var(--directory-muted);
  content: "";
  pointer-events: none;
}

.commands-route .directory-search::before {
  width: 12px;
  height: 12px;
  transform: translateY(-64%);
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.commands-route .directory-search::after {
  width: 6px;
  height: 1.5px;
  transform: translate(9px, 3px) rotate(45deg);
  transform-origin: left center;
  border-radius: 1px;
  background: currentColor;
}

.commands-route .directory-search input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--directory-line);
  border-radius: 12px;
  background: rgb(216 196 247 / 5%);
  color: var(--directory-text);
  font-size: .84375rem;
}

.commands-route .directory-search input::placeholder {
  color: var(--directory-muted);
}

.commands-route .directory-search input:focus {
  border-color: rgb(211 170 252 / 39%);
  background: rgb(216 196 247 / 8%);
}

@media (min-width: 720px) {
  .commands-route .directory-search:focus-within {
    width: 300px;
  }
}

.commands-route .directory-filters {
  gap: 10px;
  margin: 0 0 22px;
}

.commands-route .command-filter-rail {
  --filter-fade-before: 0px;
  --filter-fade-after: 0px;
  display: flex;
  min-width: 0;
  gap: 6px;
  margin-inline: -28px;
  padding: 2px 28px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-padding-inline: 28px;
  scrollbar-width: thin;
  scrollbar-color: #4a3a60 transparent;
  mask-image: linear-gradient(to right, transparent, #000 var(--filter-fade-before), #000 calc(100% - var(--filter-fade-after)), transparent);
}

.commands-route .command-filter-rail[data-more-before="true"] {
  --filter-fade-before: 26px;
}

.commands-route .command-filter-rail[data-more-after="true"] {
  --filter-fade-after: 26px;
}

.commands-route .command-filter-rail:focus-within {
  mask-image: none;
}

.commands-route .command-filter-rail :is(.category-buttons, .command-types) {
  display: flex;
  flex: none;
  gap: 6px;
  overflow: visible;
  padding: 0;
}

.commands-route .command-filter-rail button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--directory-line);
  border-radius: 999px;
  background: rgb(207 181 245 / 4%);
  color: var(--directory-muted);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.commands-route .command-filter-rail button[hidden] {
  display: none;
}

.commands-route .command-filter-rail button:hover {
  color: var(--directory-text);
  border-color: rgb(218 182 251 / 26%);
  background: rgb(207 181 245 / 8%);
}

.commands-route .command-filter-rail button[aria-pressed="true"] {
  border-color: rgb(216 177 255 / 33%);
  background: rgb(196 150 253 / 13%);
  color: #f2e6ff;
}

.commands-route .command-filter-rail button span {
  margin: 0;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgb(207 181 245 / 9%);
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
}

.commands-route .command-filter-rail button[aria-pressed="true"] span {
  background: rgb(207 181 245 / 17%);
  color: #e4caff;
}

.commands-route .directory .public-filter {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--directory-muted);
  font-size: .8125rem;
}

.commands-route .directory .public-filter input {
  accent-color: #b892ed;
}

.commands-route .directory #command-count {
  margin: 0 0 12px;
  color: var(--directory-muted);
  font-size: .8125rem;
}

.commands-route .directory #command-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.commands-route .directory #command-list > div {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 18px 18px 16px;
  border: 1px solid var(--directory-line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 20% -10%, rgb(198 158 251 / 8%), transparent 58%),
    linear-gradient(155deg, rgb(202 166 251 / 7%), rgb(115 86 167 / 2%) 50%, rgb(189 148 245 / 4%)),
    rgb(13 10 23 / 74%);
  box-shadow: inset 0 1px rgb(230 207 255 / 7%), 0 4px 16px rgb(0 0 0 / 22%);
}

.commands-route .directory #command-list > div[hidden] {
  display: none;
}

.commands-route .directory #command-list dt {
  align-items: flex-start;
  gap: 8px;
}

.commands-route .directory #command-list dt code {
  padding: 4px 0 0;
  background: none;
  color: var(--directory-text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  user-select: text;
}

.commands-route .directory #command-list .directory-description {
  color: var(--directory-muted);
  font-size: .78125rem;
  line-height: 1.6;
}

.commands-route .directory-alias {
  display: block;
  margin-top: 5px;
  color: var(--directory-muted);
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.commands-route .directory-copy {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 1px solid var(--directory-line);
  border-radius: 8px;
  background: rgb(225 199 255 / 5%);
  color: var(--directory-text);
}

.commands-route .directory-copy img {
  filter: brightness(0) invert(.87);
}

.commands-route .directory-copy:is(:hover, [data-copy-state="copied"]) {
  border-color: rgb(211 170 251 / 42%);
  background: rgb(198 153 250 / 14%);
}

.commands-route .directory-copy[data-copy-state="unavailable"] {
  border-color: rgb(232 173 132 / 49%);
}

.commands-route .directory-copy[data-copy-state]::after {
  position: absolute;
  z-index: 2;
  top: calc(100% + 5px);
  right: 0;
  padding: 4px 7px;
  border: 1px solid var(--directory-line);
  border-radius: 6px;
  background: #231833;
  color: var(--directory-text);
  font-size: .6875rem;
  white-space: nowrap;
  content: attr(title);
  pointer-events: none;
}

.commands-route .directory .directory-meta {
  display: grid;
  gap: 7px;
  margin: 4px 0 0;
  padding-top: 10px;
  border-color: rgb(213 188 246 / 11%);
}

.commands-route .directory-meta > div {
  display: grid;
  grid-template-columns: 65px minmax(0, 1fr);
  justify-items: start;
  align-items: start;
  gap: 8px;
}

.commands-route .directory-meta > div > span:first-child {
  padding: 3px 0 0;
  border: 0;
  background: none;
  color: #ac9dbd;
  font-family: Inter, system-ui, sans-serif;
  font-size: .625rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.commands-route .directory-meta > div > span:last-child {
  padding: 3px 8px;
  border-color: rgb(213 188 246 / 14%);
  background: rgb(216 188 252 / 6%);
  color: #dbcaea;
  font-size: .6875rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.commands-route .directory #command-empty {
  margin: 0;
  padding: 72px 18px 78px;
  text-align: center;
}

.commands-route #command-empty[hidden] {
  display: none;
}

.commands-route #command-empty-message {
  margin: 0 0 15px;
  color: var(--directory-muted);
  overflow-wrap: anywhere;
}

.commands-route #command-reset {
  min-height: 34px;
  padding: 5px 12px;
}

.commands-route .directory :is(button, input):focus-visible {
  outline: 2px solid #ddbbfb;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .commands-route .directory #command-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .commands-route .directory {
    padding-top: 96px;
  }
}

@media (max-width: 540px) {
  .commands-route .directory-head {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .commands-route .directory-search {
    width: 100%;
  }

  .commands-route .directory #command-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .commands-route .directory-search {
    transition: width .23s ease;
  }

  .commands-route .directory #command-list > div {
    transition: translate .2s ease, border-color .2s ease;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .commands-route .directory #command-list > div:hover {
    translate: 0 -2px;
    border-color: rgb(218 182 251 / 28%);
  }
}

@media (forced-colors: active) {
  .commands-route .directory h1 {
    background: none;
    color: CanvasText;
  }
}
