button.cqs-trigger {
  appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: none;
  width: 28px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  background: transparent;
  vertical-align: middle;
  cursor: pointer;
}
button.cqs-trigger::before, .cqs-toolbar .cqs-icon::before {
  content: '';
  box-sizing: border-box;
  position: absolute;
  width: 15px;
  height: 15px;
  top: calc(50% - 9px);
  left: calc(50% - 9px);
  border: 2px solid currentColor;
  border-radius: 50%;
}
button.cqs-trigger::after, .cqs-toolbar .cqs-icon::after {
  content: '';
  position: absolute;
  top: calc(50% + 4px);
  left: calc(50% + 3px);
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}
button.cqs-trigger::before {
  width: 11px;
  height: 11px;
  top: calc(50% - 7px);
  left: calc(50% - 7px);
  border-width: 1.5px;
}
button.cqs-trigger::after {
  top: calc(50% + 2px);
  left: calc(50% + 2px);
  width: 6px;
  height: 1.5px;
}
header.site-header .cqs-trigger { color: #c9d6dc; }
header.site-header .cqs-trigger:hover { color: white; }
/* The trailing icon fits inside the header's existing 32px gap before the CTAs. */
.site-header-bar.gap-x-8 .cqs-nav-item:last-child { width: 0; }
@media (max-width: 1023px) {
  header.site-header .site-header-bar > .cqs-trigger { width: 44px; margin-inline-start: auto; }
  header.site-header .site-header-bar > .cqs-trigger + .site-menu-toggle { margin-inline-start: 0; }
}
button.cqs-trigger:focus-visible, .cqs-dialog button:focus-visible, .cqs-dialog a:focus-visible {
  outline: 3px solid #3c88d8;
  outline-offset: 2px;
}
dialog.cqs-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: clamp(16px, 11vh, 100px) 0 auto;
  width: min(640px, calc(100% - 32px));
  max-width: none;
  max-height: min(76vh, 640px);
  max-height: min(76dvh, 640px);
  margin: 0 auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  color: #18212e;
  background: #fff;
  border: 1px solid #c1cad5;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgb(9 17 32 / 30%);
  font: 400 16px/1.45 system-ui, sans-serif;
  text-align: start;
  color-scheme: light;
}
dialog.cqs-dialog:not([open]) { display: none; }
dialog.cqs-dialog[open] { display: block; }
dialog.cqs-dialog::backdrop { background: rgb(15 23 37 / 55%); }
.cqs-dialog *, .cqs-dialog *::before, .cqs-dialog *::after { box-sizing: border-box; }
.cqs-dialog .cqs-toolbar {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
}
.cqs-dialog .cqs-icon { position: relative; flex: 0 0 24px; height: 24px; color: #526071; }
.cqs-dialog .cqs-query {
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 2px 0;
  color: #18212e;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  font: inherit;
  font-size: 18px;
}
.cqs-dialog .cqs-query:focus-visible { box-shadow: inset 0 -2px #3975b9; }
.cqs-dialog .cqs-query::placeholder { opacity: 1; color: #526071; }
.cqs-dialog .cqs-close {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  height: 40px;
  margin: 0;
  padding: 0;
  color: #3c4959;
  background: #f1f4f7;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font: 600 13px/1 system-ui, sans-serif;
}
.cqs-dialog .cqs-close:hover { background: #e3e9ef; }
.cqs-dialog .cqs-results:not(:empty) { border-top: 1px solid #d9dfe6; padding: 6px; }
.cqs-dialog a.cqs-result {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px 14px;
  scroll-margin-top: 70px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #18212e;
  background: transparent;
  text-align: start;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cqs-dialog a.cqs-result[aria-selected="true"] { background: #edf4fb; border-color: #b5cbe0; }
.cqs-dialog .cqs-source { font-size: 12px; color: #486078; }
.cqs-dialog .cqs-title { font-weight: 650; line-height: 1.35; }
.cqs-dialog .cqs-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #465362;
  font-size: 14px;
  line-height: 1.45;
}
.cqs-dialog .cqs-status { margin: 0; padding: 8px 20px 12px; color: #526071; font-size: 13px; }
.cqs-dialog .cqs-status:empty { padding: 0; }
@media (max-width: 480px) {
  dialog.cqs-dialog { inset-block-start: max(12px, env(safe-area-inset-top)); width: calc(100% - 16px); border-radius: 12px; }
  .cqs-dialog .cqs-toolbar { gap: 8px; padding: 8px 10px; }
  .cqs-dialog a.cqs-result { padding: 9px 10px; }
}
@media (forced-colors: active) {
  .cqs-dialog a.cqs-result[aria-selected="true"] { border-color: Highlight; }
  button.cqs-trigger::after, .cqs-toolbar .cqs-icon::after { background: ButtonText; forced-color-adjust: none; }
}
