/* Homepage hero: G2 rating, endpoint search, agent setup and the free-credit note. */
.home-hero .hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--card);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px var(--shadow);
}
.hero-rating:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.hero-rating svg {
  width: 20px;
  height: 20px;
}
.hero-rating-separator {
  width: 1px;
  height: 12px;
  background: var(--border);
}
.hero-rating-count {
  color: var(--muted);
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 640px);
  margin: 32px auto 0;
  padding: 7px 7px 7px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--card) 55%, transparent),
    0 24px 48px -24px #26372d33;
  text-align: left;
  transition:
    border-color var(--motion-fast, 160ms) ease,
    box-shadow var(--motion-fast, 160ms) ease;
}
.hero-search:focus-within {
  border-color: var(--primary);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--primary) 12%, transparent),
    0 24px 48px -24px #26372d33;
}
.hero-search-icon {
  display: flex;
  color: var(--muted);
}
.hero-search input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 17px;
}
.hero-search input::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}
.hero-search-submit {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
}
.hero-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--popover);
  box-shadow: 0 24px 48px -16px #26372d38;
}
.hero-search-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  color: var(--foreground);
  text-decoration: none;
}
.hero-search-option[data-highlighted] {
  background: var(--accent);
}
.hero-search-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}
.hero-search-mark svg,
.hero-search-mark img {
  width: 20px;
  height: 20px;
  color: var(--brand, var(--foreground));
}
.hero-search-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.hero-search-title {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-search-route {
  display: flex;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font: 12px var(--mono);
}
.hero-search-route b {
  color: var(--primary);
  font-weight: 500;
}
.hero-search-route code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-search-all,
.hero-search-empty {
  display: block;
  margin: 4px 0 0;
  padding: 10px;
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.hero-search-empty {
  color: var(--muted);
  font-weight: 400;
}
.hero-search-empty a {
  color: var(--primary);
}

.hero-agent {
  display: inline-flex;
  align-items: stretch;
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.hero-agent-select [data-slot='select-trigger'] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 168px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.hero-agent-select [data-slot='select-trigger'] > svg:last-child {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--muted);
}
.hero-agent-select [data-slot='select-trigger']:focus-visible,
.hero-agent-copy:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.hero-agent-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--primary);
}
.hero-agent-mark img,
.hero-agent-mark svg {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.hero-agent-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.hero-agent-copy:hover,
.hero-agent-select [data-slot='select-trigger']:hover {
  background: var(--secondary);
}
.hero-agent-copy svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
/* The listbox is portalled to <body>, so it is styled by id. */
#hero-agent-content {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 110;
  min-width: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--popover);
  color: var(--foreground);
  box-shadow: 0 16px 40px -16px #26372d38;
  font-size: 14px;
}
#hero-agent-content [data-slot='select-item'] {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
}
#hero-agent-content [data-slot='select-item'][data-highlighted] {
  background: var(--accent);
}
#hero-agent-content [data-slot='select-item-indicator'] {
  display: flex;
  margin-left: auto;
  visibility: hidden;
  color: var(--primary);
}
#hero-agent-content
  [data-slot='select-item'][aria-selected='true']
  [data-slot='select-item-indicator'] {
  visibility: visible;
}
#hero-agent-content [data-slot='select-item-indicator'] svg {
  width: 14px;
  height: 14px;
}

.hero-free {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font-size: 14px;
  text-decoration: none;
}
.hero-free:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}
.hero-free svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

@media (max-width: 600px) {
  .hero-search {
    margin-top: 24px;
    padding-left: 14px;
  }
  .hero-search input {
    font-size: 16px;
  }
  .hero-search-icon {
    display: none;
  }
  .hero-agent {
    width: 100%;
  }
  .hero-agent-select {
    flex: 1;
  }
  .hero-agent-select [data-slot='select-trigger'] {
    width: 100%;
    min-width: 0;
  }
  .hero-agent-copy {
    padding: 0 12px;
  }
}
.hero-search .hero-search-submit {
  padding: 0;
  justify-content: center;
}
.hero-search .hero-search-submit svg {
  width: 18px;
  height: 18px;
}
/* The endpoint results open below the search box, so the hero must not clip them.
   The hero grows with its content on short screens instead of scrolling inside. */
body .site-shell .home-hero {
  height: auto;
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
  overflow: visible;
  position: relative;
  z-index: 2;
}
body .site-shell .home-hero > .container {
  height: auto;
}
body .site-shell .home-hero .hero-copy {
  max-height: none;
  overflow: visible;
  z-index: 2;
}
/* Below 720px the hero copy is laid out as grid rows (see hero-globe/style.css). */
@media (max-width: 720px) {
  body .site-shell .home-hero {
    min-height: 0;
  }
  body .site-shell .home-hero > .container {
    grid-template-rows: repeat(6, auto);
    row-gap: 24px;
  }
  body .site-shell .home-hero .hero-rating {
    grid-row: 1;
    justify-self: center;
  }
  body .site-shell .home-hero .hero-search {
    grid-row: 4;
    margin: 0;
    width: 100%;
  }
  body .site-shell .home-hero .hero-search .hero-search-submit {
    flex: 0 0 44px;
    min-height: 0;
  }
  body .site-shell .home-hero .hero-agent {
    grid-row: 5;
    justify-self: center;
    margin: 0;
  }
  body .site-shell .home-hero .hero-free {
    grid-row: 6;
    justify-self: center;
    margin: 0;
  }
}
.hero-rating .hero-rating-star {
  display: flex;
  margin-right: -4px;
  color: #ff492c;
}
.hero-rating .hero-rating-star svg {
  width: 15px;
  height: 15px;
}
.hero-search-meta {
  color: var(--muted);
  font-size: 12px;
}
