:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #302b37;
  background: #f9f8f5;
  font-synthesis: none;
  --purple: #6c46c3;
  --line: #e6e2e9;
  --muted: #817a89;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
a {
  color: inherit;
}
header {
  height: 90px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 44px;
  gap: 34px;
  background: #fff;
}
.wordmark {
  font:
    30px Georgia,
    serif;
  letter-spacing: -1.2px;
  text-decoration: none;
  font-weight: 600;
}
.wordmark span {
  color: var(--purple);
  font: 28px system-ui;
  display: inline-block;
  margin-left: 3px;
  vertical-align: middle;
}
.header-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.connection {
  margin-left: auto;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
}
.dot,
.small-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #bcb7bf;
  display: inline-block;
}
.dot.online {
  background: #5f9679;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px;
  font-size: 11px;
}
.text-button:hover {
  color: var(--purple);
}
main {
  max-width: 1720px;
  margin: auto;
  padding: 45px 44px 0;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}
.eyebrow,
.section-label {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: var(--muted);
  font-weight: 650;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.4px;
  font-weight: 500;
  line-height: 1.15;
  margin: 13px 0 8px;
}
p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
  margin: 0;
}
.index-summary {
  display: flex;
  flex-direction: column;
  text-align: right;
  padding-bottom: 4px;
  gap: 3px;
}
.index-summary strong {
  font-size: 25px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.index-summary span {
  font-size: 11px;
  color: var(--muted);
}
.search-bar {
  display: flex;
  background: white;
  border: 1px solid #d8d1df;
  border-radius: 8px;
  height: 64px;
  box-shadow: 0 3px 9px #302b3704;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.search-bar:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px #6c46c310;
}
.search-input {
  display: flex;
  flex: 1;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  min-width: 0;
}
.search-input svg {
  width: 23px;
  fill: none;
  stroke: var(--purple);
  stroke-width: 1.6;
  flex-shrink: 0;
}
.search-input input {
  border: 0;
  outline: none;
  flex: 1;
  min-width: 0;
  font-size: 16px;
  background: transparent;
}
.search-input input::placeholder {
  color: #a19ba6;
}
.search-input kbd {
  font: 12px system-ui;
  color: #a39ba9;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
}
.market-label {
  display: flex;
  gap: 5px;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
  margin: 12px 0;
  padding: 0 22px;
  min-width: 175px;
}
.market-label span {
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}
select {
  border: 0;
  background: transparent;
  outline: none;
  color: #4b4353;
  font-size: 12px;
  max-width: 100%;
}
.primary-button {
  background: var(--purple);
  color: #fff;
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  padding: 12px 24px;
  font-weight: 500;
  transition: background 0.15s;
}
.primary-button:hover {
  background: #5734a8;
}
.search-bar > .primary-button {
  margin: 7px;
  min-width: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.examples {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 15px 0 35px;
  font-size: 11px;
  flex-wrap: wrap;
}
.examples > span {
  color: #9b93a0;
}
.examples button {
  border: 0;
  border-bottom: 1px solid #d8d1df;
  padding: 0 0 2px;
  background: transparent;
  color: #6f6679;
  font-size: 11px;
}
.examples button:hover {
  color: var(--purple);
  border-color: var(--purple);
}
.results-layout {
  display: grid;
  grid-template-columns: 190px minmax(300px, 1fr) 265px;
  gap: 30px;
  min-height: 510px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 22px;
  margin-bottom: 23px;
}
.filters {
  padding-right: 15px;
  border-right: 1px solid var(--line);
}
.filters > label,
.price-fields label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 11px;
  margin-bottom: 22px;
  font-weight: 550;
}
.filters select,
.filters input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: white;
  font-size: 11px;
}
.price-fields {
  display: flex;
  gap: 10px;
}
.filters > .enriched-toggle {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-height: 32px;
}
.filters .enriched-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  accent-color: var(--purple);
}
.enriched-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 0 0 22px;
}
.price-fields label {
  min-width: 0;
  width: 50%;
}
.engine-note {
  margin-top: 50px;
  font-size: 11px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.engine-note strong {
  font-weight: 500;
  margin-left: 5px;
}
.engine-note p {
  font-size: 10px;
  margin-top: 8px;
  line-height: 1.8;
}
.small-dot {
  background: var(--purple);
  height: 5px;
  width: 5px;
}
.results-toolbar {
  height: 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
}
.results-toolbar strong {
  font-weight: 600;
}
.timing {
  font-size: 10px;
  color: var(--muted);
  margin-left: 9px;
}
.sort-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  color: var(--muted);
}
.sort-label select {
  font-size: 11px;
}
.intent {
  font-size: 10px;
  color: #806f9b;
  background: #eee9f4;
  padding: 9px 11px;
  margin-top: 12px;
  border-radius: 3px;
}
.hit {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 19px;
  padding: 20px 8px 20px 0;
  width: 100%;
  text-align: left;
  align-items: center;
  color: inherit;
  transition:
    background 0.15s,
    transform 0.15s;
}
.hit:hover,
.hit.selected {
  background: #f0edf5;
}
.hit:hover {
  transform: translateX(3px);
}
.product-image {
  height: 76px;
  width: 76px;
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-image img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}
.product-image svg {
  height: 35px;
  width: 35px;
  stroke: #b3a8c4;
  fill: none;
  stroke-width: 1.25;
}
.product-info {
  min-width: 0;
}
.product-info h2 {
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 7px;
  font-weight: 550;
}
.product-info .brand {
  font-size: 9px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #968b9f;
  margin-bottom: 4px;
}
.product-meta {
  font-size: 10px;
  color: #898190;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.type-tag {
  color: #7c6795;
}
.hit-price {
  font-size: 14px;
  font-weight: 550;
  text-align: right;
  white-space: nowrap;
}
.hit-price span {
  display: block;
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 8px;
}
.inspector {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.inspector h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 10px;
}
.inspector p {
  font-size: 11px;
}
.inspect-icon {
  font-size: 30px;
  color: #b5a6c9;
  margin: 40px 0 17px;
}
.inspect-title {
  font-size: 15px !important;
  line-height: 1.6;
}
.inspect-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-top: 24px;
  margin-bottom: 8px;
}
.inspect-value {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.inspector pre {
  font:
    10px/1.7 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f0edf3;
  padding: 12px;
  border-radius: 4px;
  max-height: 400px;
  overflow: auto;
}
.inspector a {
  font-size: 11px;
  color: var(--purple);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 0;
  gap: 12px;
}
.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 12px;
  font-size: 11px;
  border-radius: 4px;
  color: #62586d;
}
.pagination span {
  font-size: 10px;
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 65px 20px;
}
.empty-symbol {
  font-size: 50px;
  color: #b1a0cc;
}
.empty h2 {
  font-size: 19px;
  font-weight: 500;
}
.empty p {
  font-size: 12px;
}
footer {
  display: flex;
  gap: 25px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 21px 0;
  margin-top: 25px;
  color: #a198aa;
  font-size: 9px;
  letter-spacing: 0.6px;
}
footer a {
  margin-left: auto;
  text-decoration: none;
}
.error {
  padding: 14px;
  background: #fff0ed;
  color: #9c493c;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.error[hidden],
[hidden] {
  display: none !important;
}
.results.loading .hits {
  opacity: 0.35;
  transition: opacity 0.12s;
}
.results.loading .results-toolbar:after {
  content: "";
  height: 2px;
  background: var(--purple);
  position: absolute;
  width: 60px;
  animation: loading 1s ease-in-out infinite;
}
.results-toolbar {
  position: relative;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px;
  max-width: 420px;
  box-shadow: 0 20px 100px #22133430;
}
dialog::backdrop {
  background: #20152d45;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 23px;
  font-weight: 500;
}
dialog label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  margin-top: 25px;
}
dialog input {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
@keyframes loading {
  0%,
  100% {
    left: 0;
    opacity: 0.3;
  }
  50% {
    left: 60%;
    opacity: 1;
  }
}
@media (min-width: 1500px) {
  .results-layout {
    grid-template-columns: 210px minmax(400px, 1fr) 310px;
    gap: 40px;
  }
  .hit {
    grid-template-columns: 90px 1fr auto;
    gap: 25px;
  }
  .product-image {
    width: 90px;
    height: 90px;
  }
}
@media (max-width: 1100px) {
  .results-layout {
    grid-template-columns: 160px 1fr;
    gap: 22px;
  }
  .inspector {
    display: none;
  }
  .inspector.open {
    display: block;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 330px;
    padding: 30px;
    background: #f9f8f5;
    box-shadow: -10px 0 50px #20152d20;
    z-index: 5;
    overflow: auto;
  }
  header {
    padding: 0 28px;
  }
  main {
    padding: 30px 28px 0;
  }
}
@media (max-width: 680px) {
  header {
    height: 68px;
    padding: 0 18px;
    gap: 14px;
  }
  .wordmark {
    font-size: 25px;
  }
  .header-label {
    display: none;
  }
  .connection {
    font-size: 10px;
  }
  main {
    padding: 27px 18px 0;
  }
  h1 {
    font-size: 28px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .workspace-heading p {
    font-size: 11px;
  }
  .index-summary strong {
    font-size: 21px;
  }
  .index-summary span {
    font-size: 9px;
  }
  .search-bar {
    height: auto;
    flex-wrap: wrap;
  }
  .search-input {
    height: 55px;
    flex-basis: 100%;
    border-bottom: 1px solid var(--line);
    padding: 0 14px;
  }
  .search-input input {
    font-size: 13px;
  }
  .market-label {
    border: 0;
    flex: 1;
    padding: 0 15px;
    min-width: 0;
  }
  .search-bar > .primary-button {
    height: 37px;
    font-size: 11px;
    min-width: 100px;
  }
  .examples {
    gap: 11px;
    margin-bottom: 25px;
  }
  .examples > span {
    display: none;
  }
  .results-layout {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 0;
    padding: 0;
  }
  .filters .section-label,
  .filters .engine-note,
  .price-fields {
    display: none;
  }
  .filters > label {
    flex: 1;
    min-width: 80px;
    gap: 6px;
    font-size: 10px;
    margin-bottom: 12px;
  }
  .filters select {
    padding: 8px 5px;
  }
  .filters > .enriched-toggle {
    flex-basis: 100%;
    min-height: 44px;
    margin-bottom: 0;
  }
  .enriched-help {
    flex-basis: 100%;
    margin: 0 0 6px;
  }
  .hit {
    grid-template-columns: 57px 1fr auto;
    gap: 11px;
    padding: 17px 0;
  }
  .product-image {
    height: 57px;
    width: 57px;
  }
  .product-info h2 {
    font-size: 12px;
  }
  .hit-price {
    font-size: 12px;
  }
  .sort-label {
    font-size: 9px;
  }
  .sort-label select {
    max-width: 100px;
    font-size: 10px;
  }
  .timing {
    display: none;
  }
  footer {
    flex-wrap: wrap;
    gap: 10px;
  }
  .inspector.open {
    width: min(90vw, 350px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

.sample-notice {
  margin: -15px 0 24px;
  color: #806f9b;
  font-size: 11px;
}

.query-preview {
  margin-bottom: 26px;
  border-top: 2px solid #b8a4dc;
  border-bottom: 1px solid var(--line);
  padding: 16px 0 20px;
  overflow-wrap: anywhere;
}
.preview-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.preview-heading h2,
.catalogue-heading {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.catalogue-heading {
  margin-bottom: 14px;
}
.preview-toggle,
.preview-model {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.preview-toggle {
  margin-left: auto;
}
.preview-toggle input {
  accent-color: var(--purple);
}
.preview-model select {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px;
  background: white;
  font-size: 11px;
}
.preview-help {
  margin: 10px 0;
  font-size: 11px;
}
#preview-status {
  color: #66517f;
  font-size: 12px;
}
#preview-status[data-state="error"],
#preview-status[data-state="uncertain"] {
  color: #9c493c;
}
#preview-status[data-state="pending"] {
  font-style: italic;
}
.preview-query {
  margin-top: 16px;
  color: #302b37;
}
#preview-content h3 {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 600;
}
#preview-content ul {
  margin: 8px 0 12px;
  padding-left: 19px;
  font-size: 12px;
  line-height: 1.7;
}
.preview-detail,
.preview-limitations {
  color: #817a89;
  font-size: 11px;
}
.preview-logic {
  margin: 8px 0;
  font-size: 11px;
}
.preview-unresolved {
  color: #896226;
}
.preview-discovery,
.preview-grounding {
  margin-top: 20px;
}
.preview-discovery summary,
.preview-grounding summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.preview-discovery > p,
.preview-grounding > p {
  font-size: 11px;
  margin-bottom: 8px;
}
.preview-candidates {
  max-height: 380px;
  overflow: auto;
  margin-top: 12px;
}
.preview-candidate {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 12px 7px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.preview-candidate:hover {
  background: #f0edf5;
}
.preview-candidate strong {
  font-size: 12px;
  font-weight: 550;
}
.preview-evidence {
  color: #896226;
}
@media (max-width: 680px) {
  .preview-heading {
    gap: 10px;
  }
  .preview-model {
    width: 100%;
  }
  .preview-candidates {
    max-height: 280px;
  }
}
/* Attribute controls follow the existing narrow refinement column. */
.attribute-filter {
  min-width: 0;
  margin: 16px 0;
  padding: 0;
  border: 0;
}
.attribute-filter legend {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
}
.attribute-filter input,
.attribute-filter select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
}
.attribute-filter button {
  margin: 4px 8px 4px 0;
}
