.discovery-page {
  --discovery-accent: #fdaa03;
  --discovery-ink: rgb(0 0 0 / 90%);
  --discovery-muted: rgb(0 0 0 / 60%);
  --discovery-border: #ddd;
  --discovery-panel: #f7f8fa;
}

.discovery-categories-page .site-page {
  background: radial-gradient(ellipse 120% 660px at 50% -165px, #fff2d7, #fff);
}

.discovery-hot-page .site-page {
  --site-page-background: var(--discovery-panel);
  min-height: 834px;
}

.discovery-hot-page .site-header {
  background: #fff;
}

.discovery-content {
  width: min(100% - 2 * var(--site-gutter, 24px), 1000px);
  margin-inline: auto;
}

.discovery-catalog {
  padding-block: 32px 40px;
}

.discovery-screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.discovery-search {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding-inline: 14px 12px;
  border: 1px solid var(--discovery-border);
  border-radius: 12px;
  background: #fff;
}

.discovery-search:focus-within {
  border-color: var(--discovery-accent);
}

.discovery-search-icon {
  position: relative;
  flex: none;
  width: 13px;
  height: 13px;
  margin: 0 4px 3px 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.discovery-search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  transform: rotate(45deg);
  background: currentColor;
  content: "";
}

.discovery-search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--discovery-ink);
  font: inherit;
}

.discovery-search input:focus {
  outline: none;
}

.discovery-search input::placeholder {
  color: rgb(0 0 0 / 35%);
}

.discovery-search input::-webkit-search-cancel-button {
  filter: brightness(0);
}

.discovery-search button,
.discovery-sectors :is(button, a),
.discovery-categories :is(button, a),
.discovery-hot-choices :is(button, a) {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.discovery-search button {
  flex: none;
  padding: 10px 0 10px 8px;
  color: var(--color-accent);
}

.discovery-sectors {
  display: flex;
  margin-top: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.discovery-sectors :is(button, a) {
  display: flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
}

.discovery-sectors :is(button[aria-pressed="true"], a[aria-current]) {
  background: #fff;
}

.discovery-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  min-height: 108px;
  align-content: start;
  margin: 0;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  color: var(--discovery-muted);
  font-size: 14px;
  line-height: 22px;
}

.discovery-categories :is(button, a) {
  padding: 0;
  white-space: nowrap;
}

.discovery-hot-choices :is(button, a) {
  min-width: 0;
  padding: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.discovery-sectors :is(button[aria-pressed="true"], a[aria-current]),
.discovery-categories :is(button[aria-pressed="true"], a[aria-current]),
.discovery-hot-choices :is(button[aria-pressed="true"], a[aria-current]) {
  font-weight: 700;
}

.discovery-sectors :is(button[aria-pressed="true"], a[aria-current]),
.discovery-categories :is(button[aria-pressed="true"], a[aria-current]),
.discovery-hot-choices :is(button[aria-pressed="true"], a[aria-current]),
.discovery-sectors :is(button, a):hover,
.discovery-categories :is(button, a):hover,
.discovery-hot-choices :is(button, a):hover,
.discovery-hot-keywords a:hover {
  color: var(--discovery-accent);
}

.discovery-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  margin-top: 32px;
  font-size: 14px;
  line-height: 22px;
}

.discovery-tools a {
  color: #2f66b7;
}

.discovery-tools a:hover {
  text-decoration: underline;
}

.discovery-tools select {
  appearance: none;
  width: 132px;
  min-height: 32px;
  padding: 3px 32px 3px 12px;
  border: 1px solid var(--discovery-border);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23191919' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 10px 6px no-repeat;
  color: var(--discovery-ink);
  font: inherit;
}

@media (forced-colors: active) {
  .discovery-tools select {
    appearance: auto;
    padding-right: 12px;
    background-image: none;
  }
}

.discovery-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.discovery-pagination {
  margin-top: 40px;
}

.discovery-pagination[hidden] {
  display: none;
}

.discovery-empty {
  margin: 42px 0 0;
  padding: 56px 20px;
  border-radius: 16px;
  background: var(--discovery-panel);
  color: var(--discovery-muted);
  text-align: center;
}

.discovery-hot {
  padding-block: 24px 80px;
}

.discovery-hot-choices,
.discovery-hot-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  margin: 0;
  padding: 32px 40px 32px 32px;
  overflow-x: auto;
  line-height: 24px;
  white-space: nowrap;
}

.discovery-hot-choices {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 30px rgb(0 0 0 / 5%);
}

.discovery-hot-keywords {
  color: var(--discovery-muted);
  list-style: none;
}

.discovery-hot-choices :is(button, a),
.discovery-hot-keywords li {
  flex: none;
}

.discovery-hot-keywords a {
  display: block;
}

@media (max-width: 900px) {
  .discovery-hot-choices,
  .discovery-hot-keywords {
    column-gap: 14px;
  }
}

@media (max-width: 640px) {
  .discovery-hot-page .site-page {
    min-height: 0;
  }

  .discovery-content {
    width: min(100% - 32px, 1000px);
  }

  .discovery-catalog,
  .discovery-hot {
    padding-top: 20px;
    padding-bottom: 56px;
  }

  .discovery-search {
    gap: 6px;
  }

  .discovery-search input {
    font-size: 14px;
  }

  .discovery-sectors {
    margin-top: 16px;
  }

  .discovery-sectors :is(button, a) {
    padding-inline: 12px;
    font-size: 14px;
  }

  .discovery-categories {
    gap: 10px 16px;
    padding: 14px;
  }

  .discovery-tools {
    gap: 10px;
    margin-top: 18px;
  }

  .discovery-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
  }

  .discovery-pagination {
    margin-top: 24px;
  }

  .discovery-hot-choices,
  .discovery-hot-keywords {
    gap: 14px 8px;
    padding: 18px 12px;
    font-size: 14px;
    line-height: 22px;
  }
}
