.scqb-host {
  --scqb-ink: var(--ink, #172033);
  --scqb-muted: var(--muted, #627086);
  --scqb-line: var(--line, #d8e0e8);
  --scqb-panel: var(--panel, #ffffff);
  --scqb-wash: var(--wash, #f4f7f9);
  --scqb-navy: var(--navy, #142238);
  --scqb-blue: var(--blue, #2865d8);
  --scqb-focus: #2865d8;
  --scqb-green: var(--green, #168764);
  --scqb-red: var(--red, #ca4050);
  display: block;
  min-width: 0;
  color: var(--scqb-ink);
  font-family: Arial, Helvetica, sans-serif;
  container-type: inline-size;
}

.scqb-host *,
.scqb-host *::before,
.scqb-host *::after {
  box-sizing: border-box;
}

.scqb-host button,
.scqb-host input,
.scqb-host select {
  min-width: 0;
  font: inherit;
  letter-spacing: 0;
}

.scqb-host button {
  cursor: pointer;
}

.scqb-host button:disabled,
.scqb-host input:disabled,
.scqb-host select:disabled {
  cursor: not-allowed;
  opacity: .56;
}

.scqb-host button:focus-visible,
.scqb-host input:focus-visible,
.scqb-host select:focus-visible,
.scqb-host summary:focus-visible,
.scqb-host pre:focus-visible {
  outline: 3px solid var(--scqb-focus);
  outline-offset: 2px;
}

.scqb {
  min-width: 0;
  background: var(--scqb-panel);
  border-bottom: 1px solid var(--scqb-line);
}

.scqb__toggle {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  color: var(--scqb-ink);
  background: #fff;
  border: 0;
  border-top: 1px solid var(--scqb-line);
  text-align: left;
}

.scqb__toggle:hover {
  background: #f5f8fc;
}

.scqb__toggle-copy {
  min-width: 0;
}

.scqb__toggle-copy strong,
.scqb__toggle-copy small {
  display: block;
}

.scqb__toggle-copy strong {
  font-size: 13px;
  line-height: 1.25;
}

.scqb__toggle-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--scqb-muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scqb__toggle-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  justify-self: end;
  color: #315a91;
  background: #edf4ff;
  border: 1px solid #c7d9f3;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.scqb__panel[hidden] {
  display: none !important;
}

.scqb__panel {
  min-width: 0;
  background: var(--scqb-wash);
  border-top: 1px solid var(--scqb-line);
}

.scqb__intro {
  padding: 16px 16px 14px;
  color: #fff;
  background: var(--scqb-navy);
}

.scqb__intro h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.scqb__intro p {
  margin: 5px 0 0;
  color: #b9c5d8;
  font-size: 11px;
  line-height: 1.45;
}

.scqb__form {
  min-width: 0;
}

.scqb__section {
  min-width: 0;
  margin: 0;
  padding: 15px 16px 16px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--scqb-line);
}

.scqb__section-title {
  width: 100%;
  float: left;
  margin: 0 0 12px;
  padding: 0;
  color: var(--scqb-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.scqb__section-title + * {
  clear: both;
}

.scqb__area-status {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  color: #43576f;
  background: #f6f8fa;
  border: 1px solid #d4dde6;
  border-radius: 5px;
}

.scqb__area-status--set {
  color: #254c3f;
  background: #f0faf6;
  border-color: #b8ddcf;
}

.scqb__area-dot {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  background: #9aa7b7;
  border-radius: 50%;
}

.scqb__area-status--set .scqb__area-dot {
  background: var(--scqb-green);
}

.scqb__area-status strong,
.scqb__area-status small {
  display: block;
}

.scqb__area-status strong {
  font-size: 12px;
  line-height: 1.3;
}

.scqb__area-status small {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--scqb-muted);
  font-size: 10px;
  line-height: 1.4;
}

.scqb__area-actions,
.scqb__filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.scqb__area-actions .scqb__secondary {
  flex: 1 1 145px;
}

.scqb__secondary,
.scqb__text-button,
.scqb__primary,
.scqb__remove {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.scqb__secondary {
  color: var(--scqb-ink);
  background: #fff;
  border: 1px solid #aebccc;
}

.scqb__secondary:hover,
.scqb__secondary[aria-pressed="true"] {
  color: #1d4f91;
  background: #edf4ff;
  border-color: #7196c8;
}

.scqb__text-button {
  padding-right: 9px;
  padding-left: 9px;
  color: #2d5f99;
  background: transparent;
  border: 1px solid transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.scqb__text-button:hover {
  background: #eef4fb;
}

.scqb__relation {
  margin-top: 12px;
}

.scqb__scope-note {
  margin: 8px 0 0;
  color: var(--scqb-muted);
  font-size: 10px;
  line-height: 1.45;
}

.scqb__label,
.scqb__match-label {
  display: block;
  margin: 0 0 5px;
  color: var(--scqb-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.25;
  text-transform: uppercase;
}

.scqb__field > input,
.scqb__field > select,
.scqb__value-with-unit input,
.scqb__between input {
  width: 100%;
  height: 44px;
  padding: 0 10px;
  color: var(--scqb-ink);
  background: #fff;
  border: 1px solid #aebccc;
  border-radius: 5px;
  font-size: 13px;
}

.scqb__field > select {
  padding-right: 28px;
}

.scqb__match {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  margin: 0 0 11px;
  padding: 0;
  border: 0;
}

.scqb__match-label {
  margin: 0 8px 0 0;
}

.scqb__match-option {
  position: relative;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: #43576f;
  background: #fff;
  border: 1px solid #b8c5d3;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.scqb__match-option:nth-of-type(1) {
  border-radius: 5px 0 0 5px;
}

.scqb__match-option:nth-of-type(2) {
  margin-left: -1px;
  border-radius: 0 5px 5px 0;
}

.scqb__match-option:has(input:checked) {
  z-index: 1;
  color: #164f92;
  background: #e8f1ff;
  border-color: #527eb8;
}

.scqb__match-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.scqb__match-option:has(input:focus-visible) {
  outline: 3px solid var(--scqb-focus);
  outline-offset: 2px;
}

.scqb__rules {
  display: grid;
  gap: 9px;
}

.scqb__empty {
  padding: 12px;
  color: #4e6076;
  background: #f7f9fb;
  border: 1px dashed #bdc9d5;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.45;
}

.scqb__empty strong,
.scqb__empty span {
  display: block;
}

.scqb__empty span {
  margin-top: 2px;
}

.scqb__rule {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(132px, 1.35fr) minmax(112px, 1fr) minmax(128px, 1.1fr) 44px;
  align-items: end;
  gap: 7px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #d4dde6;
  border-radius: 5px;
}

.scqb__rule--error {
  background: #fff6f7;
  border-color: #dfa8af;
}

.scqb__value-field {
  min-width: 0;
}

.scqb__rule--wide-value .scqb__value-field {
  grid-column: 1 / -1;
  grid-row: 2;
}

.scqb__rule--wide-value .scqb__remove {
  grid-column: 4;
  grid-row: 1;
}

.scqb__remove {
  position: relative;
  width: 44px;
  overflow: hidden;
  padding: 0;
  color: transparent;
  background: #fff;
  border: 1px solid #c5cfd9;
  font-size: 0;
}

.scqb__remove::before,
.scqb__remove::after {
  position: absolute;
  width: 15px;
  height: 2px;
  margin: -1px 0 0 -7px;
  background: #657489;
  content: "";
}

.scqb__remove::before {
  transform: rotate(45deg);
}

.scqb__remove::after {
  transform: rotate(-45deg);
}

.scqb__remove:hover {
  background: #fff1f2;
  border-color: #d59ba2;
}

.scqb__remove:hover::before,
.scqb__remove:hover::after {
  background: #a62939;
}

.scqb__rule-error {
  grid-column: 1 / -1;
  margin: 0;
  color: #922b39;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.scqb__value-with-unit {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.scqb__value-with-unit input {
  border-radius: 5px 0 0 5px;
}

.scqb__unit {
  min-width: 38px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  color: #4e6076;
  background: #edf1f5;
  border: 1px solid #aebccc;
  border-left: 0;
  border-radius: 0 5px 5px 0;
  font-size: 11px;
  font-weight: 700;
}

.scqb__between {
  display: grid;
  gap: 5px;
}

.scqb__enum-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  background: #fff;
  border: 1px solid #aebccc;
  border-radius: 5px;
}

.scqb__check-option {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  color: #43576f;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
}

.scqb__check-option:hover {
  background: #edf4ff;
}

.scqb__check-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--scqb-blue);
}

.scqb__group {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f1f5fa;
  border: 1px solid #bdcadd;
  border-left: 4px solid #668fc5;
  border-radius: 5px;
}

.scqb__group-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.scqb__group-heading .scqb__match {
  margin-bottom: 0;
}

.scqb__group > .scqb__secondary {
  justify-self: start;
}

.scqb__filter-actions {
  margin-top: 11px;
}

.scqb__rank-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1.5fr) minmax(125px, 1fr) minmax(90px, .7fr);
  gap: 8px;
}

.scqb__rank-grid--global {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scqb__review {
  padding: 14px 16px 15px;
  background: #eef5ff;
  border-bottom: 1px solid #c8d9ef;
}

.scqb__review h3 {
  margin: 0;
  font-size: 12px;
}

.scqb__sentence {
  margin: 7px 0 0;
  color: #2e4c6d;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.scqb__sql-details {
  margin-top: 10px;
}

.scqb__sql-details summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #25588e;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.scqb__sql-note,
.scqb__parameter-count {
  margin: 4px 0 7px;
  color: #53677e;
  font-size: 10px;
  line-height: 1.45;
}

.scqb__sql {
  max-height: 210px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  color: #d8e6f6;
  background: #18283d;
  border: 1px solid #0c1929;
  border-radius: 5px;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.scqb__footer {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--scqb-line);
}

.scqb__feedback {
  min-width: 0;
  color: var(--scqb-muted);
  font-size: 10px;
  line-height: 1.4;
}

.scqb__feedback span,
.scqb__feedback strong {
  display: block;
}

.scqb__primary {
  min-width: 126px;
  color: #fff;
  background: var(--scqb-blue);
  border: 1px solid var(--scqb-blue);
}

.scqb__primary:hover {
  background: #1f55b8;
  border-color: #1f55b8;
}

.scqb__error {
  margin: 7px 0 0;
  color: #922b39;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.scqb__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@container (max-width: 620px) {
  .scqb__rule,
  .scqb__rank-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .scqb__rule--wide-value .scqb__value-field,
  .scqb__rule--wide-value .scqb__remove {
    grid-column: 1;
    grid-row: auto;
  }

  .scqb__remove {
    width: auto;
    justify-self: stretch;
    color: #8f2e3a;
    font-size: 11px;
  }

  .scqb__remove::before,
  .scqb__remove::after {
    display: none;
  }

  .scqb__enum-grid {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scqb__group-heading {
    display: block;
  }

  .scqb__group-heading .scqb__text-button {
    margin-top: 4px;
  }
}

@container (max-width: 390px) {
  .scqb__section,
  .scqb__review,
  .scqb__footer {
    padding-right: 12px;
    padding-left: 12px;
  }

  .scqb__area-actions,
  .scqb__filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .scqb__area-actions .scqb__secondary,
  .scqb__filter-actions > * {
    width: 100%;
  }

  .scqb__match {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .scqb__match-label {
    grid-column: 1 / -1;
    margin: 0 0 5px;
  }

  .scqb__footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .scqb__primary {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .scqb-host input,
  .scqb-host select {
    font-size: 16px;
  }

  .scqb__toggle {
    min-height: 58px;
  }

  .scqb__secondary,
  .scqb__text-button,
  .scqb__primary,
  .scqb__remove,
  .scqb__match-option,
  .scqb__check-option {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scqb-host *,
  .scqb-host *::before,
  .scqb-host *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .scqb__area-dot,
  .scqb__remove::before,
  .scqb__remove::after {
    background: ButtonText;
  }

  .scqb__match-option:has(input:checked) {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
}
