.ql-directory-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.ql-directory-tools label { font-weight: 700; }
.ql-directory-tools input {
  width: min(100%, 340px);
  min-width: 0;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #abb9c8;
  border-radius: 6px;
  background: #fff;
  color: #182d46;
  font: inherit;
}
.ql-directory-tools input:focus-visible { outline: 2px solid #378be0; outline-offset: 1px; }
.ql-empty { padding: 12px 16px 20px; color: var(--ink-3); }
.ql-coverage-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.ql-coverage-table thead th:first-child { width: 25%; }
.ql-coverage-table thead th { color: #43546b; background: #f1f4f8; }
.ql-coverage-table th, .ql-coverage-table td { overflow-wrap: anywhere; text-align: left; white-space: normal; }
.ql-coverage-table tbody :is(th, td) { padding: 9px 12px; border-bottom: 1px solid #dbe2eb; vertical-align: middle; }
.ql-coverage-table .ql-practice-row > :is(th, td) {
  color: #fff;
  background: #243a54;
  border-bottom-color: #163048;
  font-size: 13px;
  font-weight: 650;
}
.ql-coverage-table .ql-practice-row:is(:hover, :focus-within),
.ql-coverage-table .ql-practice-row:is(:hover, :focus-within) > :is(th, td) {
  background-color: #1b3048;
}
.ql-coverage-table tbody + tbody .ql-practice-row > * { border-top: 4px solid #ebeff4; }
.ql-coverage-table .ql-service-row > :is(th, td) { background: #fff; }
.ql-coverage-table .ql-service-row:nth-child(odd) > :is(th, td) { background: #f6f8fb; }
.ql-coverage-table .ql-service-row:focus-within > :is(th, td),
.ql-coverage-table .ql-service-row:hover > :is(th, td) { background: #edf4fb; }
.ql-coverage-table .ql-service-row > th { padding-inline-start: 26px; border-inline-start: 3px solid #bcccdc; }
.ql-service-row[hidden] { display: none; }
.ql-service-link, .ql-practice-toggle {
  padding: 3px 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 650;
  color: inherit;
  text-align: left;
  cursor: pointer;
  max-width: 100%;
}
.ql-service-link:hover .ql-value, .ql-practice-toggle:hover, .ql-practice-row .ql-service-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ql-service-link:focus-visible, .ql-practice-toggle:focus-visible { outline: 2px solid #378be0; outline-offset: 2px; border-radius: 3px; }
.ql-practice-row .ql-service-link { text-decoration: underline; text-decoration-color: #a4b8cc; text-underline-offset: 3px; }
.ql-practice-toggle { position: relative; padding-inline-start: 24px; font-size: 15px; font-weight: 750; }
.ql-practice-toggle::before {
  position: absolute; inset-inline-start: 3px; top: 9px;
  width: 7px; height: 7px;
  content: ''; border-right: 2px solid #c6d8eb; border-bottom: 2px solid #c6d8eb; transform: rotate(-45deg);
}
.ql-practice-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.ql-practice-toggle span { display: block; margin-top: 2px; color: #d5e2f1; font-size: 11px; font-weight: 500; }
.ql-name { color: #182d46; font-size: 14px; font-weight: 730; line-height: 1.4; }
.ql-service-link small { display: block; font-size: 11px; font-weight: 500; line-height: 1.5; color: #52637a; }
.ql-ready .ql-value, .ql-attention .ql-value, .ql-info .ql-value {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid;
  border-radius: 5px;
  font-size: 12px; font-weight: 700; line-height: 1.4;
}
.ql-ready .ql-value { color: #18573f; background: #e6f4ec; border-color: #badbc7; }
.ql-attention .ql-value { color: #78410c; background: #fff2d9; border-color: #e8ca8d; }
.ql-info .ql-value { color: #254e7a; background: #ebf2fa; border-color: #c2d4e7; }
.ql-scope { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 700; }
.ql-scope .sel { min-width: 0; max-width: 100%; }
.ql-coverage-note { padding: 12px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.ql-rule-group h3 { margin: 16px 16px 0; }
@media (min-width: 881px) {
  #v-qualify .card:has(#qlTable) { overflow: visible; }
  #qlTable .ql-coverage-table thead th {
    position: sticky;
    top: var(--topbar-h, 60px);
    z-index: 2;
    box-shadow: inset 0 -1px #bdcad8;
  }
}
@media (max-width: 880px) {
  #qlKpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ql-coverage-table, .ql-coverage-table tbody { display: block; }
  .ql-coverage-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ql-coverage-table tr:not([hidden]) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px;
    padding: 12px 16px; border-bottom: 1px solid #d2dce7;
  }
  .ql-coverage-table .ql-practice-row { background: #243a54; }
  .ql-coverage-table .ql-practice-row:has(.ql-practice-toggle[aria-expanded="false"]) > td { display: none; }
  .ql-coverage-table .ql-service-row { border-inline-start: 3px solid #bcccdc; }
  .ql-coverage-table .ql-service-row:nth-child(odd) { background: #f6f8fb; }
  .ql-coverage-table tbody :is(th, td), .ql-coverage-table tbody + tbody .ql-practice-row > *,
  .ql-coverage-table .ql-service-row > th { padding: 0; border: 0; }
  .ql-coverage-table tbody th { grid-column: 1 / -1; }
  .ql-coverage-table .ql-service-row > :is(th, td), .ql-coverage-table .ql-service-row:nth-child(odd) > :is(th, td),
  .ql-coverage-table .ql-service-row:hover > :is(th, td) { background: transparent; }
  .ql-coverage-table td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; color: #52637a; }
  .ql-coverage-table .ql-practice-row td::before { color: #c4d6e9; }
  .ql-scope { flex-wrap: wrap; }
  .ql-scope .sel { flex: 1 1 165px; }
}
.ql-docs { display: grid; gap: 16px; }
.ql-sign-list { display: grid; gap: 14px; padding: 16px; }
.ql-sign-item, .ql-upload-item { border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); padding: 14px; overflow-wrap: anywhere; }
.ql-sign-head, .ql-doc-actions, .ql-upload-item, .ql-preview-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ql-sign-head, .ql-doc-actions, .ql-upload-item { flex-wrap: wrap; }
.ql-doc-actions { justify-content: flex-start; margin-top: 12px; }
.ql-firm-fees { margin-top: 12px; padding: 10px 12px; background: var(--surface-2); border-inline-start: 3px solid #a8bacb; }
.ql-firm-fees b, .ql-upload-item label { font-size: 12px; }
.ql-firm-fees p, .ql-upload-copy p { margin: 4px 0 0; }
.ql-upload-copy { flex: 1 1 230px; }
.ql-upload-item label, .ql-preview-controls label { display: grid; gap: 5px; font-weight: 650; }
.ql-doc-empty { margin: 0; color: var(--ink-3); }
.ql-cover-letter .hint { margin: 7px 0; }
.ql-preview-dialog { color: var(--ink, #14283c); background: #fff; width: min(810px, calc(100vw - 24px)); height: min(850px, calc(100dvh - 28px)); max-height: 95dvh; max-width: 95vw; box-sizing: border-box; border: 1px solid #c6d2dc; border-radius: 12px; padding: 0; margin: auto; box-shadow: 0 12px 52px #18243148; }
.ql-preview-dialog[open] { display: flex; flex-direction: column; }
.ql-preview-dialog::backdrop { background: #172c44a6; }
.ql-preview-top { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ql-preview-top h3 { margin: 2px 0 0; font-size: clamp(16px, 3vw, 21px); }
.ql-preview-label { text-transform: uppercase; font-size: 11px; font-weight: 700; color: #526579; letter-spacing: .06em; }
.ql-preview-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 18px 0; }
.ql-preview-controls form:not([hidden]) { display: flex; align-items: flex-end; gap: 6px; }
.ql-preview-controls label { font-size: 12px; max-width: 100%; }
.ql-preview-controls input, .ql-preview-controls select { min-width: 0; max-width: 100%; }
.ql-preview-controls [hidden] { display: none; }
.ql-preview-status { margin: 8px 18px; color: #475d72; font-size: 13px; }
.ql-preview-paper { min-height: 95px; flex: 1; overflow: auto; background: #edf1f5; padding: 8px 12px 12px; }
.ql-preview-paper iframe, .ql-preview-summary { display: block; background: #fff; width: 100%; height: 100%; box-sizing: border-box; border: 1px solid var(--line); }
.ql-preview-summary { padding: 12px 20px; height: auto; font: 16px/1.5 Georgia, serif; }
.ql-preview-summary h4 { font: 700 20px Georgia, serif; margin: .5em 0; }
@media (max-width: 550px) {
  .ql-preview-top, .ql-preview-controls { padding-inline: 12px; }
  .ql-preview-status { margin-inline: 12px; }
  .ql-preview-paper { padding: 3px; }
  .ql-sign-list { padding: 10px; }
  .ql-upload-item label { width: 100%; }
}

/* Service configuration inside the Qualify drawer. */
.ql-screen-list, .ql-field-list {
  display: grid;
  padding: 0 16px;
}

.ql-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ql-editor-row:last-child { border-bottom: 0; }
.ql-editor-row > header, .ql-editor-row > details { grid-column: 1 / -1; }
.ql-editor-row strong, .ql-editor-row small { display: block; }
.ql-editor-row strong { overflow-wrap: anywhere; }
.ql-editor-row small { margin: 2px 0; color: var(--ink-3); }
.ql-editor-row summary, .ql-add summary { color: var(--brand); cursor: pointer; font-weight: 650; }
.ql-editor-row > button { justify-self: end; }
.ql-editor-row label, .ql-editor-form label {
  display: grid;
  gap: 4px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

.ql-score-controls, .ql-editor-form, .ql-wording-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.ql-score-controls input { width: 72px; }
.ql-editor-row .sel, .ql-editor-form .sel { max-width: 100%; min-height: 36px; }
.ql-score-controls select { max-width: min(260px, 100%); }
.ql-editor-form, .ql-wording-form { padding: 12px 0 4px; }
.ql-wording-form > label, .ql-editor-form > label { flex: 1 1 100%; }
.ql-wording-form input, .ql-editor-form > label input { width: 100%; }
.ql-editor-status { color: var(--ink-3); font-size: 12px; }
.ql-editor-status:not(:empty) { padding: 4px 0; }
.ql-editor-status.ql-status-error { color: #a62a28; }
.ql-add-body > label, .ql-qual label { min-width: 0; }
.ql-add-body input, .ql-add-body select, .ql-qual label select, .ql-qual label input:not([type=checkbox]) { max-width: 100%; width: 100%; }
.ql-qual-q, .ql-qual-a, .ql-add-body > label > span { min-width: 0; }
.ql-qual-q, .ql-qual-a { overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .ql-screen-list, .ql-field-list { padding: 0 12px; }
  .ql-editor-row, .ql-score-controls { grid-template-columns: minmax(0, 1fr); }
  .ql-editor-row > button { justify-self: start; }
  .ql-field > label { width: max-content; max-width: 100%; }
  .ql-score-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ql-score-controls > label:first-child { grid-column: 1 / -1; }
  .ql-score-controls :is(select, input) { width: 100%; }
}
.ql-add-upload { display: grid; gap: 9px 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px),1fr)); border-top: 1px solid var(--line); padding-top: 12px; }
.ql-add-upload > strong { grid-column: 1/-1; }
.ql-add-upload label { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 650; }
.ql-add-upload input, .ql-add-upload select { min-width: 0; width: 100%; }
.ql-add-upload button { justify-self: start; align-self: end; }

.ql-score-card { margin: 0 0 16px; container-type: inline-size; }
.ql-score-card .card-head { padding: 12px 18px; background: #f7f9fc; }
.ql-rule-filter { display: flex; gap: 4px; max-width: 100%; width: fit-content; margin-bottom: 14px; padding: 3px; background: #e2e8f1; border-radius: 9px; }
.ql-rule-filter button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 11px;
  border: 1px solid transparent; border-radius: 7px; background: transparent; color: #37475c;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
}
.ql-rule-filter button[aria-pressed=true] { color: #152944; background: #fff; border-color: #c6d0df; box-shadow: 0 1px 2px #142e4712; }
.ql-rule-filter button span { font-size: 12px; font-variant-numeric: tabular-nums; }
.ql-score-rule { margin: 0; padding: 18px; border-bottom: 1px solid var(--line); }
.ql-score-rule:last-child { border-bottom: 0; }
.ql-question-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.ql-question { color: #132640; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.ql-origin { color: #53647a; font-weight: 550; font-size: 12px; white-space: nowrap; }
.ql-origin:empty { display: none; }
.ql-answer-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.ql-answer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  min-width: 0; padding: 6px 10px; background: #f6f8fb; border: 1px solid #dbe3ed; border-radius: 8px;
}
.ql-answer-label { color: #233a54; font-size: 13px; font-weight: 700; }
.ql-answer select.sel { width: auto; min-width: 90px; min-height: 36px; font-size: 13px; background-color: white; }
.ql-disqualify {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px;
  min-height: 36px; margin-left: auto; color: #425368; font-size: 13px; cursor: pointer;
}
.ql-disqualify input { width: 16px; height: 16px; margin: 0; accent-color: #a12f26; cursor: inherit; }
.ql-disqualify:has(input:disabled) { cursor: default; }
.ql-stops { border-color: #d99a8f; background: #fff1ed; }
.ql-stops :is(.ql-answer-label,.ql-disqualify) { color: #84281e; }
.ql-stops .ql-disqualify { font-weight: 700; }
.ql-disqualify:focus-within, .ql-rule-filter button:focus-visible, .ql-default:focus-visible { outline: 2px solid #315fd4; outline-offset: 2px; border-radius: 4px; }
.ql-rule-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
.ql-rule-actions:has(button:not([hidden]), [role=status]:not(:empty)) { margin-top: 8px; }
.ql-default { margin-right: auto; padding: 5px 0; color: #375275; font: inherit; font-size: 12px; font-weight: 650; border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ql-rule-actions [role=status] { font-size: 12px; color: #415775; }
.ql-rule-actions .ql-save-error { color: #972820; }
.ql-score-rule [hidden] { display: none !important; }
.ql-prompt { display: grid; gap: 5px; width: 100%; color: #233a54; font-size: 13px; font-weight: 650; }
.ql-prompt input { width: 100%; }
.ql-source-note, .ql-prefills > p, .ql-score-info > p { margin: 12px 16px; color: var(--ink-3); }
.ql-retired > summary { padding: 12px 18px; cursor: pointer; }
.ql-new-question { container-type: inline-size; }
.ql-screen-card { container-type: inline-size; margin-bottom: 16px; }
.ql-screen-card .card-head { padding: 12px 18px; }
.ql-question-source {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: 3px 12px; padding: 10px 18px; color: #4d6076; background: #f3f6fa;
}
.ql-question-source h4 { margin: 0; color: #273e57; font-size: 13px; font-weight: 700; }
.ql-question-source > span { font-size: 12px; }
.ql-questionnaire { margin: 0; padding: 0 18px 0 44px; list-style: decimal outside; }
.ql-questionnaire li { padding-left: 3px; border-bottom: 1px solid var(--line); }
.ql-questionnaire li:last-child { border-bottom: 0; }
.ql-questionnaire li::marker { color: #596e85; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ql-prompt-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 16px; padding: 9px 0; }
.ql-prompt-row > span { color: #192e46; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ql-rule-link {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 36px;
  border: 0; background: transparent; color: #244e9a; font: inherit; font-size: 13px; font-weight: 650;
  padding: 3px 2px; cursor: pointer;
}
.ql-rule-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ql-rule-link:focus-visible { outline: 2px solid #315fd4; outline-offset: 2px; border-radius: 4px; }
.ql-score-rule:has(.ql-question:focus) { box-shadow: inset 3px 0 #315fd4; background: #f7faff; }
.ql-question:focus { outline: none; }
.ql-new-question form { padding: 12px 16px; }
.ql-screen-card .ql-retired li { margin: 6px 16px; color: #52647a; }
@container (max-width: 500px) {
  .ql-questionnaire { padding-left: 33px; padding-right: 12px; }
  .ql-prompt-row { grid-template-columns: minmax(0,1fr); gap: 1px; padding: 9px 0 5px; }
}
@container (max-width: 680px) {
  .ql-answer { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
  .ql-disqualify { grid-column: 1/-1; margin: 0; }
  .ql-stops .ql-disqualify { grid-row: 2; }
  .ql-question-line { flex-wrap: wrap; }
}
@container (max-width: 420px) {
  .ql-answer-pair { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .ql-answer { display: flex; min-height: 44px; gap: 8px; }
  .ql-disqualify { margin-left: auto; }
  .ql-score-rule { padding: 14px 12px; }
  .ql-question-line { gap: 3px; flex-direction: column; }
  .ql-rule-actions { gap: 5px 8px; }
}
