/* Visual Query Builder v1 — isolated page components. */
:root {
  --q-nav-height: 70px;
  --q-muted: #626a70;
}
.q-hero {
  padding:32px 0 0;
  background: radial-gradient(
    ellipse at 85% 20%,
    #f2f1ff 0,
    #f8fafa 32%,
    #ffffff 68%
  );
}
.q-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap:8px 16px;
  font-size:12px;
  color: var(--q-muted);
  margin-bottom:64px;
}
.q-breadcrumb a {
  color: inherit;
}
.q-hero h1 {
  font-size:clamp(3rem, 5.2vw, 4.5rem);
}
.q-hero-lead {
  font-size:20px;
  line-height: 1.65;
  color: #424a50;
}
.q-hero p:not(.q-hero-lead) {
  font-size:14px;
  line-height: 1.9;
}
.q-label {
  font-size:12px;
  line-height: 1.7;
  letter-spacing: 0.65px;
  color: var(--q-muted);
}
.q-cover {
  border: 1px solid #e1ddff;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 60px #2f1d990d;
}
.q-cover figcaption {
  display: flex;
  justify-content: space-between;
  gap:16px;
  padding:16px 24px;
  font-size:12px;
  color: var(--q-muted);
  background: #f2f1ff;
  border-bottom: 1px solid var(--line);
}
.q-cover figcaption span:last-child {
  text-align: right;
}
.q-cover-title {
  padding:24px 24px 0;
}
.q-cover-title h2 {
  font-size:24px;
  line-height: 1.25;
  margin:16px 0 16px;
}
.q-tags {
  display: flex;
  gap:8px;
  flex-wrap: wrap;
}
.q-tags span {
  font-size:12px;
  color: #1f1266;
  background: #f2f1ff;
  border-radius: 4px;
  padding:4px 8px;
}
.q-visual-plan {
  padding:24px 24px;
}
.q-plan-source {
  display: flex;
  justify-content: space-between;
  gap:16px;
  border: 1px solid #e1ddff;
  padding:16px 16px;
  border-radius: 7px;
  align-items: center;
}
.q-plan-source b {
  font-size:12px;
  color: #1f1266;
}
.q-plan-source > span {
  font-size:12px;
  color: var(--q-muted);
  text-align: right;
}
.q-join {
  display: flex;
  align-items: center;
  gap:16px;
  margin-left:16px;
  padding:8px 0;
  font-size:12px;
  color: #626a70;
}
.q-join > span:first-child {
  font-size:20px;
  color:#4128cc;
}
.q-join b {
  font-weight: 500;
  color: #4128cc;
}
.q-plan-output {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background: #f2f1ff;
  border: 1px solid #e1ddff;
  border-radius: 8px;
  padding:16px 16px;
}
.q-plan-output strong {
  display: block;
  font-size:24px;
  letter-spacing: -0.7px;
  line-height: 1.4;
  color: #1f1266;
}
.q-plan-output small {
  width: 100%;
  margin-top:16px;
  color: #626a70;
  font-size:12px;
}
.q-status {
  font-size:12px;
  letter-spacing: 0.5px;
  border: 1px solid #d9dee0;
  color: #007260;
  background: #f8fafa;
  border-radius: 5px;
  padding:5px 8px;
  white-space: nowrap;
}
.q-cover-footer {
  background: #f8fafa;
  border-top: 1px solid #e1ddff;
  padding:16px 24px;
  color: #1f1266;
  font-size:12px;
}
.q-foundation {
  margin-top:64px;
  padding:24px 0 32px;
  border-top: 1px solid var(--line);
}
.q-foundation > span {
  display: block;
  font-size:12px;
  color: var(--q-muted);
  margin-bottom:16px;
}
.q-foundation > div {
  display: flex;
  flex-wrap: wrap;
  gap:16px 32px;
}
.q-foundation strong {
  font-size:12px;
  font-weight: 500;
}
.q-intro {
  padding:72px 0;
}
.q-intro h2 {
  font-size:32px;
  line-height: 1.2;
}
.q-intro p {
  font-size:14px;
}
.q-intro .lead-copy {
  font-size:20px;
}
.q-adoption {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap:24px;
  margin-top:32px;
  padding:32px 0;
  border-block: 1px solid var(--line);
  align-items: center;
}
.q-adoption strong {
  display: block;
  font-size:16px;
  margin:8px 0;
}
.q-adoption p {
  font-size:12px;
  margin:0;
}
.q-adoption > span {
  font-size:20px;
  color: #4128cc;
}
.q-intro .q-small,
.q-section .q-small {
  font-size:12px;
  color: var(--q-muted);
  line-height: 1.7;
}
.q-capability-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  background: #fffffff5;
  backdrop-filter: blur(12px);
  border-block: 1px solid var(--line);
}
.q-capability-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.q-capability-links a {
  padding:24px 16px;
  border-bottom: 3px solid transparent;
  color: #626a70;
  font-size:12px;
  white-space: nowrap;
}
.q-capability-links a > span {
  font-size:12px;
  margin-right:16px;
}
.q-capability-links a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: linear-gradient(0deg, #f2f1ff, transparent);
}
.q-capability-mobile {
  display: none;
}
.q-section {
  padding:96px 0;
  scroll-margin-top: calc(var(--header-height) + var(--q-nav-height) + 20px);
}
.q-section h2 {
  font-size:clamp(2rem, 3.4vw, 3rem);
}
.q-section p {
  font-size:14px;
  line-height: 1.85;
}
.q-section .lead-copy {
  font-size:20px;
  line-height: 1.65;
}
.q-section code {
  color: #1f1266;
  overflow-wrap: anywhere;
}
.q-wash {
  background: #f8fafa;
}
.section-heading {
  margin-bottom:48px;
}
.q-subsection {
  margin-top:64px;
}
.q-feature-heading {
  font-size:clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.2;
  margin-bottom:24px;
}
.q-section .text-link {
  font-size:12px;
}
.q-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:32px;
  border-top: 1px solid #e1ddff;
  padding-top:32px;
}
.q-three h3 {
  font-size:24px;
  line-height: 1.25;
  margin:16px 0;
}
.q-three p {
  font-size:14px;
}
.q-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #f2f1ff;
  color:#4128cc;
  border: 1px solid #e1ddff;
  border-radius: 8px;
  font-size:12px;
}
.q-contract-table {
  background: #ffffff;
  border: 1px solid #e1ddff;
  border-radius: 12px;
  overflow: hidden;
}
.q-table-heading {
  padding:16px 24px;
  display: flex;
  justify-content: space-between;
  gap:16px;
  background: #f2f1ff;
  font-size:12px;
  color: #4128cc;
}
.q-table-heading strong {
  color: #120a3d;
}
.q-contract-table dl {
  margin:0;
}
.q-contract-table dl > div {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap:24px;
  padding:16px 24px;
  border-top: 1px solid #f2f1ff;
  font-size:12px;
}
.q-contract-table dt {
  font-weight: 500;
  color: #1f1266;
}
.q-contract-table dd {
  margin:0;
  color: #626a70;
  line-height: 1.8;
}
.q-note {
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  gap:48px;
  padding:32px 40px;
  background: #f2f1ff;
  border: 1px solid #e1ddff;
  border-radius: 10px;
  align-items: center;
}
.q-note h3 {
  font-size:24px;
  line-height: 1.3;
  margin:16px 0 0;
}
.q-note p {
  font-size:14px;
  margin:0;
}
#query-explorer {
  scroll-margin-top: calc(var(--header-height) + var(--q-nav-height) + 20px);
}
.q-explorer {
  border: 1px solid #e1ddff;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 16px 40px #1f126608;
}
.q-explorer-heading {
  padding:32px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap:32px;
  background: #f2f1ff;
  border-bottom: 1px solid #f2f1ff;
}
.q-explorer-heading .eyebrow {
  font-size:12px;
  margin-bottom:16px;
}
.q-explorer-heading h3 {
  font-size:24px;
  margin-bottom:16px;
}
.q-explorer-heading p {
  font-size:12px;
  margin:0;
}
.q-scenario-control {
  width: 290px;
  flex-shrink: 0;
}
.q-scenario-control label {
  font-size:12px;
  color: #626a70;
  display: block;
  margin-bottom:8px;
}
.q-scenario-control select {
  font-size:12px;
  min-height: 44px;
  border-color: #e1ddff;
  color: #1f1266;
}
.q-explorer-body {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
}
.q-query-definition {
  padding:32px;
  border-right: 1px solid #f2f1ff;
}
.q-query-definition h4 {
  font-size:20px;
  margin:16px 0 24px;
}
.q-query-definition dl > div {
  border-top: 1px solid #f2f1ff;
  padding:16px 0;
  display: grid;
  grid-template-columns: 95px 1fr;
  gap:16px;
  font-size:12px;
}
.q-query-definition dt {
  font-weight: 500;
  color: #626a70;
}
.q-query-definition dd {
  margin:0;
  color: #424a50;
}
.q-query-note {
  font-size:12px;
  line-height: 1.8;
  padding:16px 16px;
  background: #f8fafa;
  color: #626a70;
  border-radius: 6px;
  margin-top:16px;
}
.q-result {
  padding:32px;
  background: #ffffff;
}
.q-result-top {
  display: flex;
  justify-content: space-between;
  gap:16px;
  align-items: center;
}
.q-result-value {
  font-size:clamp(2rem, 3vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -1px;
  color: #1f1266;
  margin:24px 0 24px;
  font-weight: 500;
}
.q-result h4 {
  font-size:20px;
  margin-bottom:16px;
}
.q-result p {
  font-size:12px;
  min-height: 70px;
}
.q-result-details {
  margin:16px 0 24px;
}
.q-result-details > div {
  padding:16px 0;
  border-top: 1px solid #f2f1ff;
}
.q-result-details dt {
  font-size:12px;
  font-weight: 500;
  color: #626a70;
  margin-bottom:6px;
}
.q-result-details dd {
  font-size:12px;
  line-height: 1.8;
  color: #424a50;
  margin:0;
}
.q-receipt {
  background: #f8fafa;
  border: 1px solid #f2f1ff;
  border-radius: 6px;
  padding:16px 16px;
}
.q-receipt span {
  display: block;
  font-size:12px;
  margin-bottom:6px;
}
.q-receipt code {
  font-size:12px;
  line-height: 1.8;
  display: block;
}
.q-result.is-held .q-status {
  background: #fff9e6;
  border-color: #fff0bf;
  color: #996500;
}
.q-result.is-blocked .q-status {
  background: #ffecee;
  border-color: #ffd2d7;
  color: #701024;
}
.q-result.is-held .q-result-value,
.q-result.is-blocked .q-result-value {
  font-size:32px;
  color: #626a70;
}
.q-explorer-footer {
  padding:24px 32px;
  border-top: 1px solid #f2f1ff;
  background: #f8fafa;
}
.q-explorer-footer strong {
  display: block;
  font-size:12px;
  font-weight: 500;
  line-height: 1.8;
}
.q-explorer-footer > span {
  display: block;
  font-size:12px;
  line-height: 1.8;
  color: var(--q-muted);
  margin-top:8px;
}
.q-workflow {
  border: 1px solid #e1ddff;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}
.q-workflow-heading {
  padding:32px 32px;
  background: #f2f1ff;
  border-bottom: 1px solid #f2f1ff;
}
.q-workflow-heading h3 {
  font-size:24px;
  margin:16px 0;
}
.q-workflow-heading p {
  font-size:12px;
  margin:0;
  color: var(--q-muted);
}
.q-workflow-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding:32px 32px;
  margin:0;
  gap:32px;
}
.q-workflow-steps li {
  display: flex;
  gap:16px;
  align-items: start;
}
.q-workflow-steps li > span {
  font-size:12px;
  color:#4128cc;
  border: 1px solid #e1ddff;
  min-width: 30px;
  text-align: center;
  border-radius: 50%;
  line-height: 28px;
}
.q-workflow-steps h4 {
  font-size:16px;
  line-height: 1.3;
  margin:4px 0 16px;
}
.q-workflow-steps p {
  font-size:12px;
  margin:0;
}
.q-workflow-footer {
  padding:24px 32px;
  background: #f2f1ff;
  display: flex;
  gap:16px;
  justify-content: space-between;
  font-size:12px;
  border-top: 1px solid #f2f1ff;
}
.q-workflow-footer strong {
  font-weight: 500;
}
.q-workflow-footer > span {
  color: #626a70;
}
.q-role-table {
  border: 1px solid #e1ddff;
  border-radius: 10px;
}
.q-role-table table {
  --bs-table-bg: #ffffff;
  min-width: 640px;
}
.q-role-table th,
.q-role-table td {
  padding:16px 24px;
  vertical-align: top;
  font-size:12px;
  line-height: 1.8;
  border-color: #f2f1ff;
}
.q-role-table thead th {
  font-size:12px;
  background: #f2f1ff;
  color: #1f1266;
  font-weight: 500;
}
.q-role-table tbody th {
  font-weight: 500;
  color: #1f1266;
  width: 26%;
}
.q-role-table td {
  color: #626a70;
  width: 37%;
}
.q-evidence {
  display: grid;
  grid-template-columns: 0.65fr 1.4fr;
  gap:40px;
  background: #ffffff;
  border: 1px solid #e1ddff;
  border-radius: 12px;
  padding:32px;
}
.q-evidence-intro h3 {
  font-size:24px;
  margin:16px 0;
}
.q-evidence-intro p {
  font-size:12px;
  margin:0;
}
.q-evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:32px 32px;
}
.q-evidence-grid b {
  display: block;
  font-weight: 500;
  font-size:14px;
  color: #1f1266;
  margin-bottom:8px;
}
.q-evidence-grid span {
  display: block;
  font-size:12px;
  line-height: 1.8;
  color: #626a70;
}
.q-lineage {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap:16px;
  align-items: center;
  margin-top:24px;
}
.q-lineage > span {
  font-size:12px;
  padding:8px 16px;
  background: #f2f1ff;
  color: #4128cc;
  border: 1px solid #e1ddff;
  border-radius: 5px;
}
.q-lineage b {
  font-size:12px;
  font-weight: 400;
  color:#4128cc;
}
.q-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:16px;
}
.q-related > a {
  padding:24px;
  background: #ffffff;
  border: 1px solid #e1ddff;
  border-radius: 9px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.q-related > a:hover {
  border-color: #beb6ff;
  transform: translateY(-3px);
}
.q-related strong {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap:16px;
  font-size:16px;
  line-height: 1.4;
  margin:16px 0;
  color: #120a3d;
}
.q-related p {
  font-size:12px;
  color: #626a70;
  margin-bottom:0;
}
.q-faq .accordion-button {
  font-size:14px;
  padding:24px;
}
.q-faq .accordion-body {
  font-size:14px;
  line-height: 1.9;
  padding:8px 24px 24px;
}
@media (max-width: 1199px) {
  .q-hero h1 {
    font-size:3.5rem;
  }
  .q-hero-lead {
    font-size:20px;
  }
  .q-explorer-heading {
    align-items: start;
  }
  .q-scenario-control {
    width: 260px;
  }
  .q-workflow-steps {
    gap:24px;
  }
  .q-adoption {
    gap:16px;
  }
  .q-result-value {
    font-size:32px;
  }
  .q-cover-title h2 {
    font-size:24px;
  }
}
@media (max-width: 991px) {
  .q-breadcrumb {
    margin-bottom:32px;
  }
  .q-hero h1 {
    font-size:4rem;
    max-width: 650px;
  }
  .q-cover {
    max-width: 650px;
    margin:0 auto;
  }
  .q-foundation {
    margin-top:48px;
  }
  .q-section {
    padding:72px 0;
  }
  .q-intro {
    padding:56px 0;
  }
  .q-three {
    gap:24px;
  }
  .q-three h3 {
    font-size:20px;
  }
  .q-note {
    gap:32px;
    padding:32px;
  }
  .q-capability-links a {
    padding:16px 8px;
    font-size:12px;
  }
  .q-capability-links a > span {
    margin-right:6px;
    font-size:12px;
  }
  .q-explorer-heading {
    flex-direction: column;
    gap:16px;
  }
  .q-scenario-control {
    width: 100%;
    max-width: 420px;
  }
  .q-explorer-body {
    grid-template-columns: 1fr 1.1fr;
  }
  .q-query-definition,
  .q-result {
    padding:24px;
  }
  .q-query-definition dl > div {
    grid-template-columns: 1fr;
    gap:5px;
  }
  .q-query-definition h4 {
    font-size:16px;
  }
  .q-result h4 {
    font-size:20px;
  }
  .q-workflow-steps {
    grid-template-columns: repeat(2, 1fr);
    gap:32px;
  }
  .q-workflow-footer {
    flex-direction: column;
    gap:8px;
  }
  .q-evidence {
    grid-template-columns: 1fr;
    gap:32px;
  }
  .q-evidence-intro p {
    max-width: 540px;
  }
  .q-related {
    gap:16px;
  }
  .q-related > a {
    padding:16px;
  }
  .q-related strong {
    font-size:16px;
  }
}
@media (max-width: 767px) {
  .q-hero {
    padding-top:24px;
  }
  .q-hero h1 {
    font-size:3.5rem;
  }
  .q-hero-lead {
    font-size:20px;
  }
  .q-foundation > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap:16px 24px;
  }
  .q-foundation strong {
    font-size:12px;
    line-height: 1.7;
  }
  .q-intro h2 {
    font-size:32px;
  }
  .q-adoption {
    grid-template-columns: 1fr;
    gap:16px;
  }
  .q-adoption > span {
    transform: rotate(90deg);
    justify-self: start;
    margin-left:8px;
  }
  .q-adoption strong {
    margin:6px 0;
  }
  .q-capability-links {
    display: none;
  }
  .q-capability-mobile {
    display: flex;
    align-items: center;
    gap:16px;
    padding:16px 0;
  }
  .q-capability-mobile label {
    font-size:12px;
    letter-spacing: 0.3px;
    color: #626a70;
    line-height: 1.6;
    width: 85px;
    flex-shrink: 0;
  }
  .q-capability-mobile select {
    font-size:12px;
    min-height: 42px;
    border-color: #e1ddff;
    color: #4128cc;
    background-color: #f2f1ff;
  }
  .q-section {
    padding:64px 0;
  }
  .section-heading {
    margin-bottom:32px;
  }
  .q-section h2 {
    font-size:32px;
  }
  .q-subsection {
    margin-top:48px;
  }
  .q-three {
    grid-template-columns: 1fr;
    gap:24px;
    padding-top:32px;
  }
  .q-three article + article {
    border-top: 1px solid #f2f1ff;
    padding-top:24px;
  }
  .q-three h3 {
    font-size:24px;
    margin:16px 0;
  }
  .q-three p {
    margin-bottom:16px;
  }
  .q-note {
    grid-template-columns: 1fr;
    gap:16px;
    padding:24px;
  }
  .q-note h3 {
    font-size:24px;
  }
  .q-explorer-heading {
    padding:24px;
  }
  .q-explorer-heading h3 {
    font-size:24px;
  }
  .q-explorer-body {
    grid-template-columns: 1fr;
  }
  .q-query-definition {
    border-right: 0;
    border-bottom: 1px solid #f2f1ff;
  }
  .q-query-definition dl > div {
    grid-template-columns: 95px 1fr;
    gap:16px;
  }
  .q-result p {
    min-height: 0;
  }
  .q-result-value {
    font-size:32px;
  }
  .q-result h4 {
    font-size:20px;
  }
  .q-explorer-footer {
    padding:24px 24px;
  }
  .q-workflow-heading {
    padding:24px;
  }
  .q-workflow-heading h3 {
    font-size:24px;
  }
  .q-workflow-steps {
    grid-template-columns: 1fr;
    padding:24px;
    gap:24px;
  }
  .q-workflow-steps h4 {
    font-size:16px;
  }
  .q-workflow-steps p {
    font-size:12px;
  }
  .q-workflow-footer {
    padding:24px 24px;
  }
  .q-evidence {
    padding:24px;
  }
  .q-evidence-grid {
    grid-template-columns: 1fr;
    gap:24px;
  }
  .q-evidence-grid > div {
    border-top: 1px solid #f2f1ff;
    padding-top:16px;
  }
  .q-evidence-grid b {
    font-size:14px;
  }
  .q-lineage {
    justify-content: flex-start;
    gap:8px;
  }
  .q-lineage > span {
    font-size:12px;
    padding:6px 8px;
  }
  .q-related {
    grid-template-columns: 1fr;
    gap:16px;
  }
  .q-related > a {
    padding:24px;
  }
  .q-related strong {
    font-size:20px;
  }
  .q-faq .accordion-button {
    padding:24px 16px;
  }
  .q-faq .accordion-body {
    padding:8px 16px 24px;
  }
}
@media (max-width: 399px) {
  .q-hero h1 {
    font-size:3rem;
  }
  .q-cover-title,
  .q-visual-plan {
    padding-left:16px;
    padding-right:16px;
  }
  .q-cover-title h2 {
    font-size:24px;
  }
  .q-cover figcaption {
    padding:16px 16px;
    font-size:12px;
  }
  .q-plan-source {
    padding:16px;
    font-size:12px;
  }
  .q-plan-source > span {
    font-size:12px;
  }
  .q-join {
    gap:8px;
    font-size:12px;
  }
  .q-plan-output {
    padding:16px;
  }
  .q-plan-output strong {
    font-size:24px;
  }
  .q-cover-footer {
    padding:16px 16px;
    font-size:12px;
  }
  .q-contract-table dl > div {
    grid-template-columns: 1fr;
    gap:5px;
    padding:16px 16px;
  }
  .q-table-heading {
    padding:16px;
    gap:16px;
  }
  .q-query-definition,
  .q-result {
    padding:24px;
  }
  .q-result-top {
    gap:8px;
  }
  .q-result-top .q-label {
    font-size:12px;
  }
  .q-status {
    font-size:12px;
  }
  .q-query-definition dl > div {
    grid-template-columns: 80px 1fr;
    gap:16px;
  }
  .q-query-definition dd {
    overflow-wrap: anywhere;
  }
  .q-capability-mobile {
    gap:16px;
  }
  .q-capability-mobile label {
    width: 75px;
  }
  .q-capability-mobile select {
    font-size:12px;
    padding-left:8px;
  }
  .q-explorer-heading {
    padding:24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .q-related > a {
    transition: none;
  }
  .q-related > a:hover {
    transform: none;
  }
}
@media print {
  .site-header,
  .q-capability-nav,
  .closing-section,
  .site-footer {
    display: none;
  }
  .q-section {
    padding:32px 0;
  }
  .q-hero {
    padding-top:0;
  }
  .q-cover,
  .q-explorer,
  .q-workflow,
  .q-evidence {
    break-inside: avoid;
    box-shadow: none;
  }
  .accordion-collapse {
    display: block !important;
  }
  .accordion-button::after {
    display: none;
  }
}
