/* questionnaire.css — Questionnaire v3 (/form).
 *
 * Ported from Nate's 2026-10 prototype. Every rule is scoped under .qx and
 * every class carries the qx- prefix, so nothing here can leak into the rest
 * of the page (loading view, results view, nav, footer) and generic site
 * classes (.button, .note, .field …) cannot leak in.
 *
 * Colours come from design_system_v2.css tokens. The handful of values that
 * are not tokens (the lavender tints and the soft page wash) are defined once
 * below as --qx-* and nowhere else.
 */

.qx {
  --qx-text: var(--color-gray-900, #0f172a);
  --qx-text-2: #273558;
  --qx-muted: var(--color-gray-600, #475569);
  --qx-faint: var(--color-gray-500, #64748b);
  --qx-border: #d5deec;
  --qx-border-soft: #e5eaf4;
  --qx-input-border: #bdc9dd;
  --qx-blue: var(--color-brand-blue-dark, #2563eb);
  --qx-link: #2553bd;
  --qx-brand-gradient: linear-gradient(112deg, var(--color-brand-blue-dark, #2563eb) 0%, var(--color-brand-indigo-dark, #4f46e5) 63%, var(--color-brand-violet-dark, #7c3aed) 100%);
  --qx-soft: linear-gradient(110deg, #edf5ff, #f2ecff);
  --qx-selected-bg: linear-gradient(110deg, #eef5ff, #f1edff);
  --qx-selected-border: #7b91ef;
  --qx-selected-text: #233f9b;
  --qx-check: #315ddd;
  --qx-lift: 0 1px 2px rgba(32, 53, 88, .07), 0 3px 5px rgba(38, 60, 104, .07), inset 0 1px 0 #fff;
  --qx-danger: #a72d45;
  --qx-footer-h: 78px;

  display: block;
  margin: 0;
  padding: 22px 24px 40px;
  background:
    radial-gradient(ellipse at 13% 0%, #e4efff 0, transparent 50%),
    radial-gradient(ellipse at 87% 100%, #ebe4ff 0, transparent 48%),
    #f8faff;
  color: var(--qx-text);
  font-family: var(--font-family-base, Inter, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.55;
}

/* School branding: the primary action and selected states take the school
   colour; everything else stays neutral. */
.qx.qx-school {
  --qx-brand-gradient: var(--qx-school);
  --qx-blue: var(--qx-school);
  --qx-link: var(--qx-school);
  --qx-check: var(--qx-school);
  --qx-soft: color-mix(in srgb, var(--qx-school) 7%, #fff);
  --qx-selected-bg: color-mix(in srgb, var(--qx-school) 8%, #fff);
  --qx-selected-border: color-mix(in srgb, var(--qx-school) 55%, #fff);
  --qx-selected-text: color-mix(in srgb, var(--qx-school) 80%, #000);
}

/* Element resets use :where() so they carry no extra specificity and every
   qx- component class below can override them without !important. */
.qx :where(*, *::before, *::after) { box-sizing: border-box; }
.qx :where(button, input, textarea, select) { font: inherit; }
.qx :where(button, a) { touch-action: manipulation; }
.qx :where(button) { cursor: pointer; }
.qx :where(button:disabled) { cursor: not-allowed; opacity: .48; }
.qx :where(button, input, textarea, select, summary, a):focus-visible { outline: 3px solid var(--qx-blue); outline-offset: 3px; }
.qx :where(h1, h2, h3, h4, p) { margin: 0; }
.qx :where(h1) { font-size: 29px; line-height: 1.24; font-weight: 750; letter-spacing: -.9px; color: #101737; }
.qx :where(h2) { font-size: 18px; line-height: 1.35; font-weight: 730; letter-spacing: -.25px; }
.qx :where(h3) { font-size: 16px; font-weight: 730; }
.qx :where(p) { overflow-wrap: anywhere; }
.qx :where(svg) { flex-shrink: 0; }
.qx :where(hr) { border: 0; border-top: 1px solid #dce4f4; margin: 18px 0; }
.qx .qx-small { font-size: 12px; line-height: 1.5; color: var(--qx-muted); }
.qx [hidden] { display: none !important; }  /* the one deliberate !important: hidden must always win */
.qx .qx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Shell ───────────────────────────────────────────────────── */
.qx-shell {
  max-width: 1320px; margin: 0 auto; display: flex;
  border: 1px solid #d9e2f3; border-radius: 20px; background: #fff;
  box-shadow: 0 10px 40px rgba(51, 71, 120, .04), 0 2px 6px rgba(51, 71, 120, .03);
  overflow: clip;
}
.qx-sidebar {
  width: 220px; flex: 0 0 220px; border-right: 1px solid var(--qx-border-soft);
  background: linear-gradient(170deg, #fff, #fafbff);
}
.qx-sidebar .qx-nav { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
.qx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: linear-gradient(130deg, #fff 45%, #fdfbff); }
.qx-content { width: 100%; max-width: 1010px; margin: 0 auto; padding: 29px 36px 32px; flex: 1; }
.qx-mobile-context { display: none; }

/* ── Section nav ─────────────────────────────────────────────── */
.qx-nav { padding: 25px 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.qx-nav-label { font-size: 10px; font-weight: 750; letter-spacing: .65px; color: #526080; padding: 0 12px 12px; text-transform: uppercase; }
.qx-nav-link {
  position: relative; display: flex; gap: 11px; align-items: center; width: 100%; min-height: 48px;
  padding: 9px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: var(--qx-text-2); text-align: left; font-size: 12px; line-height: 1.35;
}
.qx-nav-link:hover { background: #f0f5ff; }
.qx-nav-link.qx-current { background: var(--qx-soft); border-color: #d3ddff; color: var(--qx-selected-text); font-weight: 650; }
.qx-step-square {
  width: 27px; height: 27px; min-width: 27px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #bdcae1; border-radius: 4px; background: #fff; color: #5e6d88; font-size: 12px; font-weight: 650;
}
.qx-current .qx-step-square:not(.qx-done) { background: var(--qx-brand-gradient); color: #fff; border-color: transparent; }
.qx-step-square.qx-done, .qx-entry-marker.qx-done { background: #e9f2ff; border-color: #cfdefd; color: var(--qx-blue); }
.qx-nav-state { margin-left: auto; font-size: 9px; color: #748096; }
.qx-nav-divider { height: 1px; background: #dfe6f4; margin: 14px 10px; }
.qx-nav-progress { margin: 28px 12px 0; padding-top: 10px; }
.qx-nav-progress p { font-size: 10px; color: #4f5e79; margin-bottom: 8px; }
.qx-nav-progress > span { display: block; font-size: 10px; color: #788398; line-height: 1.5; margin-top: 8px; }
.qx-progress { height: 5px; background: #e8edf8; border-radius: 99px; overflow: hidden; }
.qx-progress-fill { height: 100%; width: 0; background: var(--qx-brand-gradient); transition: width .25s ease; }
.qx-nav-save { margin: 6px 12px 0; font-size: 11px; }

/* ── Headings / notices ──────────────────────────────────────── */
.qx-heading { margin-bottom: 26px; }
.qx-heading h1:focus { outline: none; }
.qx-eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .65px; color: #315bd1; margin-bottom: 10px; }
.qx-school .qx-eyebrow { color: var(--qx-blue); }
.qx-heading > p:last-child { color: var(--qx-muted); font-size: 13px; margin-top: 8px; line-height: 1.5; }
.qx-notice, .qx-error-summary {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 7px; font-size: 12px; margin-bottom: 20px;
  border: 1px solid #d6e1f4; background: #f0f6ff; color: #365783;
}
.qx-notice > span { flex: 1; }
.qx-notice .qx-text-button { min-height: 28px; padding: 0; }
.qx-notice-close { background: none; border: 0; color: #5f7190; padding: 2px 6px; font-size: 18px; line-height: 1; }
.qx-error-summary { background: #fff3f4; color: #ad3245; border-color: #efc8ce; }

/* ── Fields ──────────────────────────────────────────────────── */
.qx-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 28px; }
.qx-col { min-width: 0; }
.qx-field { margin: 0 0 23px; min-width: 0; border: 0; padding: 0; }
.qx-field > label, .qx-field-label, .qx legend {
  display: block; font-weight: 700; font-size: 13px; line-height: 1.45; margin-bottom: 8px; color: #172344;
}
.qx legend { padding: 0; float: none; width: 100%; }
.qx-opt { font-size: 11px; font-weight: 450; color: #5e6c85; }
.qx-hint { font-size: 11px; color: #5b6a84; line-height: 1.55; margin-top: -3px; margin-bottom: 9px; }
/* .qx .qx-input (0,2,0) on purpose: index.html styles bare input[type="text"]
   (0,1,1) for the results view, and that must not reach these fields. */
.qx .qx-input {
  width: 100%; min-width: 0; border: 1px solid var(--qx-input-border); border-radius: 6px; min-height: 45px;
  padding: 10px 12px; background: #fff; color: #162545; font-size: 13px; line-height: 1.5;
  box-shadow: inset 0 1px 3px rgba(23, 44, 82, .06); transition: border-color .15s, box-shadow .15s;
}
.qx .qx-input::placeholder { color: #8895aa; }
.qx .qx-input:focus { border-color: #456ee3; box-shadow: 0 0 0 3px rgba(59, 130, 246, .1); outline: none; }
.qx .qx-input:disabled { background: #f2f4f8; color: #69768c; }
.qx textarea.qx-input { display: block; resize: vertical; min-height: 95px; max-height: 340px; }
.qx .qx-select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c8da9' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.qx .qx-input[aria-invalid="true"] { border-color: #d64b64; box-shadow: 0 0 0 2px rgba(214, 75, 100, .05); }
.qx-error { font-size: 11px; color: #b02a43; display: flex; gap: 5px; align-items: flex-start; margin: 7px 0 0; }
.qx-error::before { content: "⚠"; font-size: 11px; line-height: 1.4; }

/* Choices (checkbox / radio cards) */
.qx-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.qx-choices-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qx-choice {
  position: relative; min-width: 0; min-height: 49px; display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: linear-gradient(#fff, #fff 65%, #f5f7fc); border: 1px solid var(--qx-border); border-radius: 7px;
  box-shadow: var(--qx-lift); font-size: 12px; color: #263655; font-weight: 480; cursor: pointer; line-height: 1.45;
  transition: background .15s, border-color .15s, box-shadow .15s; overflow-wrap: anywhere;
}
.qx-choice:hover { border-color: #97b1ed; box-shadow: 0 2px 8px rgba(55, 93, 181, .11); }
.qx-choice:has(input:checked) { background: var(--qx-selected-bg); border-color: var(--qx-selected-border); color: var(--qx-selected-text); }
.qx-choice:has(input:focus-visible) { outline: 3px solid var(--qx-blue); outline-offset: 2px; }
.qx-choice > span { min-width: 0; }
.qx-choice small { display: block; font-size: 11px; line-height: 1.5; margin-top: 4px; color: var(--qx-muted); }
.qx-check, .qx-radio {
  appearance: none; -webkit-appearance: none; margin: 0; padding: 0; flex-shrink: 0; display: inline-grid; place-content: center;
  width: 22px; height: 22px; min-width: 22px; min-height: 0; font-size: inherit; border: 1.5px solid #7c8da9; background: #fff;
  box-shadow: inset 0 1px 2px rgba(22, 40, 69, .04); cursor: pointer;
}
.qx-check { border-radius: 4px; }
.qx-check::before { content: ""; width: 12px; height: 12px; transform: scale(0); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); background: #fff; transition: transform .1s; }
.qx-check:checked { background: var(--qx-check); border-color: var(--qx-check); }
.qx-check:checked::before { transform: scale(1); }
.qx-check:focus-visible, .qx-radio:focus-visible { outline: 3px solid var(--qx-blue); outline-offset: 2px; }
.qx-radio { border-radius: 50%; width: 21px; height: 21px; min-width: 21px; border-color: #8b9bbb; }
.qx-radio::before { content: ""; width: 11px; height: 11px; border-radius: 50%; transform: scale(0); background: var(--qx-check); transition: transform .1s; }
.qx-radio:checked { border-color: var(--qx-check); }
.qx-radio:checked::before { transform: scale(1); }
.qx-radio-choices { grid-template-columns: 1fr; gap: 9px; }
.qx-radio-choices.qx-choices-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qx-choice-help { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; margin-bottom: 9px; }
.qx-choice-help .qx-hint { margin: 0; }
.qx-choice-help .qx-help { margin: 0; }

/* Help disclosure, notes, folds */
.qx-help { font-size: 11px; color: #3f568b; margin-top: 7px; }
.qx-help > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; min-height: 28px; padding: 2px 0; }
.qx summary::-webkit-details-marker { display: none; }
.qx details[open] > summary > .qx-chev { transform: rotate(180deg); }
.qx-chev { transition: transform .15s; }
.qx-help-content {
  padding: 12px 14px; border: 1px solid #d9e4ff; border-radius: 6px; background: linear-gradient(100deg, #f1f7ff, #f7f2ff);
  font-size: 12px; line-height: 1.6; margin: 7px 0 10px; color: #3b506d;
}
.qx-note {
  display: flex; align-items: flex-start; gap: 12px; border: 1px solid #dde1fc; border-radius: 7px; background: var(--qx-soft);
  padding: 14px 16px; margin: 18px 0; color: #344572; font-size: 12px; line-height: 1.6;
}
.qx-note > svg { margin-top: 2px; color: #537ae4; }
.qx-note p { margin-top: 4px; }
.qx-note-warning { background: #fff8ed; border-color: #f5d4a1; color: #815314; }
.qx-note-warning > svg { color: #b87813; }
.qx-note-privacy { background: #f2f6fc; color: #495a76; border-color: #dce5f2; }
.qx-fold { margin: 11px 0; background: #fff; border: 1px solid #d9e1ee; border-radius: 7px; box-shadow: var(--qx-lift); }
.qx-fold > summary {
  min-height: 49px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  cursor: pointer; padding: 13px 15px; font-weight: 700; font-size: 12px; background: linear-gradient(#fff, #fff 65%, #f8f9fd); border-radius: 7px;
}
.qx-fold > summary .qx-chev { color: var(--qx-blue); }
.qx-fold-content { padding: 17px 16px 5px; border-top: 1px solid #e7ebf4; }

/* Buttons */
.qx-button {
  min-height: 44px; border: 1px solid #d1dced; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 16px; font-size: 12px; line-height: 1.3; font-weight: 650; text-align: center; color: #1c2e54;
  background: linear-gradient(#fff, #fff 70%, #f5f7fc); box-shadow: var(--qx-lift); text-decoration: none;
  transition: box-shadow .15s, transform .15s;
}
.qx-button:not(:disabled):hover { border-color: #91a7db; box-shadow: 0 3px 9px rgba(51, 77, 146, .14); }
.qx-button:not(:disabled):active { transform: translateY(1px); }
.qx-button.qx-primary { background: var(--qx-brand-gradient); color: #fff; border-color: transparent; box-shadow: 0 3px 8px rgba(81, 76, 227, .15), inset 0 1px 0 rgba(255, 255, 255, .18); }
.qx-button.qx-primary:hover { filter: brightness(1.04); }
.qx-button[aria-pressed="true"] { border-color: #8d9ef5; background: var(--qx-soft); color: #2e45ac; }
.qx-danger { color: var(--qx-danger) !important; }
.qx-button.qx-danger { border-color: #ead5dc; background: #fffafb; }
.qx-text-button {
  display: inline-flex; justify-content: flex-start; align-items: center; gap: 7px; color: var(--qx-link); background: none; border: 0;
  padding: 7px 0; min-height: 36px; font-size: 12px; font-weight: 600; text-align: left; line-height: 1.4; text-decoration: none;
}
.qx-text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.qx-badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 650; line-height: 1.4; padding: 4px 8px; border-radius: 5px; color: #3c50ab; background: #eef0ff; }

/* Experience */
.qx-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.qx-category { text-align: left; justify-content: flex-start; font-size: 11px; color: #35589c; padding: 12px; min-height: 48px; }
.qx-category svg { color: #5d7dd0; }
.qx-experience-entry { border: 1px solid #d7e1f2; border-radius: 8px; margin: 14px 0; background: #fff; overflow: clip; box-shadow: var(--qx-lift); scroll-margin-top: 18px; }
.qx-experience-entry > summary {
  list-style: none; display: flex; gap: 11px; align-items: center; padding: 14px 16px; min-height: 60px; cursor: pointer;
  font-weight: 650; font-size: 13px; background: linear-gradient(100deg, #f7faff, #faf8ff);
}
.qx-entry-title { flex: 1; min-width: 0; }
.qx-entry-title small { display: block; font-size: 10px; font-weight: 450; margin-top: 2px; color: var(--qx-muted); }
.qx-entry-marker { display: flex; align-items: center; justify-content: center; border: 1px solid #cdd7e9; background: #fff; width: 25px; height: 25px; min-width: 25px; border-radius: 4px; font-size: 11px; }
.qx-experience-body { padding: 20px; }
.qx-entry-actions { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin-top: 17px; }
.qx-check-label { display: flex; align-items: center; gap: 11px; font-size: 12px; min-height: 44px; cursor: pointer; }
.qx-check-label span { flex: 1; }
.qx-current-role { margin: -10px 0 20px; padding: 5px 2px; }
.qx-split-actions { display: flex; justify-content: space-between; gap: 15px; align-items: center; flex-wrap: wrap; }

/* Direction: discovery */
.qx-feature-gate { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border: 1px solid #d7def9; border-radius: 9px; padding: 19px; background: var(--qx-soft); margin: 24px 0 12px; }
.qx-feature-gate > div { flex: 1; min-width: 170px; }
.qx-feature-gate h2 { font-size: 15px; margin: 8px 0 5px; }
.qx-feature-gate p { font-size: 11px; color: #475b86; }
.qx-feature-gate .qx-full { flex-basis: 100%; border-top: 1px solid #dce3f5; padding-top: 10px; }
.qx-discovery-results { border-top: 1px solid #e3e7f6; margin-top: 30px; padding-top: 24px; }
.qx-discovery-heading h2 { font-size: 23px; margin-bottom: 7px; }
.qx-discovery-heading p { font-size: 12px; color: #52637e; margin-bottom: 10px; }
.qx-career-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 20px 0; }
.qx-career-card { min-width: 0; border: 1px solid #b5c8f3; border-radius: 12px; padding: 5px; background: #fff; overflow: clip; box-shadow: 0 3px 10px rgba(56, 89, 151, .04); display: flex; flex-direction: column; }
.qx-career-card.qx-picked { border-color: var(--qx-selected-border); box-shadow: 0 0 0 2px var(--qx-selected-border); }
.qx-career-art { min-height: 118px; border-radius: 8px; background: linear-gradient(125deg, #357bfa, #5568ed 62%, #8164f1); display: flex; align-items: center; justify-content: center; font-size: 46px; }
.qx-school .qx-career-art { background: var(--qx-school); }
.qx-career-body { padding: 14px 10px 10px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.qx-career-body h3 { font-size: 17px; line-height: 1.25; letter-spacing: -.2px; }
.qx-career-body h4 { font-size: 10px; color: #315ad2; margin: 4px 0 0; }
.qx-career-body p { font-size: 12px; line-height: 1.6; }
.qx-career-body .qx-button { margin-top: auto; }

/* Life */
.qx-answer-reuse { border: 1px solid #cfdcf6; border-radius: 9px; padding: 16px; background: linear-gradient(135deg, #f2f7ff, #f7f2ff); box-shadow: var(--qx-lift); margin-bottom: 18px; }
.qx-answer-reuse h3 { font-size: 14px; margin: 10px 0 6px; }
.qx-answer-reuse p { font-size: 12px; line-height: 1.55; color: #42577e; }

/* Support / financial */
.qx-age-row { display: flex; align-items: flex-end; gap: 25px; margin-top: 15px; }
.qx-age-row .qx-field { max-width: 235px; margin: 0; flex: 1; }
.qx-age-row .qx-field > label { font-weight: 600; font-size: 12px; }
.qx-age-row .qx-button { min-width: 178px; }
.qx-privacy-line { display: flex; gap: 8px; align-items: flex-start; font-size: 11px; color: #5b6c8b; margin: 20px 0 7px; }
.qx-scholarship-gate { margin: 15px auto 28px; max-width: 530px; padding: 34px 30px; border: 1px solid #dee4f8; border-radius: 13px; background: linear-gradient(130deg, #f4f9ff, #f7f2ff); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 17px; }
.qx-feature-icon { color: #426ce3; background: #e5edff; border-radius: 50%; display: grid; place-items: center; width: 70px; height: 70px; }
.qx-scholarship-gate h2 { font-size: 22px; max-width: 300px; }
.qx-scholarship-gate p { font-size: 13px; max-width: 330px; }
.qx-scholarship-gate .qx-button { width: 100%; max-width: 300px; }

/* Review */
.qx-review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 215px; gap: 20px; }
.qx-review-section { border: 1px solid #dde4f1; border-radius: 7px; margin: 0 0 10px; background: #fff; }
.qx-review-section > summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 12px; font-size: 12px; cursor: pointer; }
.qx-review-section .qx-step-square { width: 23px; min-width: 23px; height: 23px; font-size: 10px; }
.qx-summary-value { font-size: 10px; color: #6d7890; margin-left: auto; max-width: 140px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.qx-review-details { padding: 4px 16px 16px; font-size: 12px; line-height: 1.65; }
.qx-review-details dl { margin: 0; }
.qx-review-details dl > div { margin-bottom: 10px; }
.qx-review-details dt { font-size: 10px; color: #71809a; }
.qx-review-details dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.qx-review-details .qx-text-button { margin: 5px 16px 0 0; }
.qx-review-experience { margin: 8px 0 14px; }
.qx-review-output { align-self: start; border: 1px solid #dfe3f8; border-radius: 8px; padding: 18px; background: linear-gradient(145deg, #f4f8ff, #f7f2ff); }
.qx-review-output h3 { font-size: 12px; margin-bottom: 14px; }
.qx-review-output > p { display: flex; align-items: flex-start; gap: 9px; margin: 11px 0; font-size: 12px; }
.qx-review-output > p > svg { width: 19px; height: 21px; color: #6b77bd; }
.qx-review-output > p.qx-small { font-size: 11px; line-height: 1.6; }
.qx-review-output > p.qx-small > svg { width: 14px; height: 16px; }
.qx-review-output > p.qx-plain { display: block; }
.qx-confirm-row { display: flex; align-items: flex-start; gap: 12px; font-size: 12px; line-height: 1.6; margin: 25px 0 5px; padding: 15px; background: #fafbff; border: 1px solid #e0e6f2; border-radius: 7px; cursor: pointer; }
#qx-turnstile { margin-top: 16px; }

/* Footer bar — sticky to the bottom of the viewport while the form is on
   screen, and it scrolls away with the form instead of covering the site
   footer. Generate exists only on the Review step. */
.qx-footer {
  position: sticky; bottom: 0; z-index: 20;
  background: linear-gradient(110deg, #fff, #fff 55%, #fcfaff); border-top: 1px solid #e2e8f4;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 17px 30px max(17px, env(safe-area-inset-bottom)); box-shadow: 0 -5px 16px rgba(48, 69, 119, .02);
  border-bottom-right-radius: 20px;
}
.qx-save-indicator { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px; color: #34616a; max-width: 260px; }
.qx-footer-buttons { display: flex; gap: 11px; align-items: stretch; margin-left: auto; }
.qx-footer-buttons .qx-back { min-width: 80px; }
.qx-footer-buttons .qx-continue { min-width: 132px; }
.qx-footer-buttons .qx-generate { min-width: 200px; }
.qx-footer-buttons .qx-save-answers { min-width: 140px; }
.qx-edit-note a { font-weight: 600; }

/* Dialogs */
.qx-dialog {
  max-width: 560px; width: calc(100vw - 32px); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 28px;
  color: #18264b; border: 1px solid #d9e2f5; background: #fff; border-radius: 14px; box-shadow: 0 20px 70px rgba(15, 33, 79, .2);
  font-size: 13px; line-height: 1.6;
}
.qx-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.qx-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.qx-dialog-head h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.4px; }
.qx-dialog-close { min-width: 38px; min-height: 38px; padding: 0; border: 0; background: none; font-size: 24px; line-height: 1; color: #5f7190; }
.qx-dialog > p, .qx-dialog .qx-note, .qx-dialog .qx-choice { margin: 12px 0; }
.qx-button-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.qx-button-stack .qx-button { width: 100%; }
.qx-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.qx-help-list { margin: 0; padding-left: 20px; }
.qx-help-list li { padding: 4px 0; }
.qx-sheet { margin: 0 auto 0 0; height: 100dvh; max-height: 100dvh; width: min(88vw, 355px); border-radius: 0 14px 14px 0; padding: 25px 18px 20px; background: linear-gradient(150deg, #fff, #fbf9ff); }
.qx-sheet .qx-nav { padding: 10px 0; }
.qx-sheet .qx-nav-link { min-height: 50px; font-size: 13px; }

/* Limit reached */
.qx-limit { max-width: 620px; margin: 40px auto; padding: 32px; background: #fff; border: 1px solid #d9e2f3; border-radius: 16px; }
.qx-limit h1 { font-size: 24px; margin-bottom: 10px; }
.qx-limit p { margin-top: 10px; }
.qx-limit-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* The AI assistant bubble and the cookie banner are position:fixed site-wide.
   Lift the bubble above the sticky action bar on this page. */
body:has(.qx-footer) #ai-assistant { bottom: calc(env(safe-area-inset-bottom, 0px) + 6.5rem); }
@media (max-width: 800px) {
  /* The phone action bar is two rows (save line + buttons), about 112px. */
  body:has(.qx-footer) #ai-assistant { bottom: calc(env(safe-area-inset-bottom, 0px) + 8.5rem); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .qx-sidebar { width: 194px; flex-basis: 194px; }
  .qx-content { padding: 27px; }
  .qx-nav-link { font-size: 11px; gap: 8px; }
  .qx-footer { padding-left: 22px; padding-right: 22px; }
  .qx-career-grid { grid-template-columns: 1fr; }
  .qx-review-grid { grid-template-columns: 1fr 180px; }
  .qx-choices-compact, .qx-radio-choices.qx-choices-compact { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .qx { padding: 0; background: #fff; }
  .qx-shell { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .qx-sidebar { display: none; }
  .qx-mobile-context {
    position: sticky; top: 0; z-index: 21; height: 44px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #e3e9f5; background: linear-gradient(110deg, #f9fcff, #faf7ff); font-size: 12px; color: var(--qx-link);
  }
  .qx-mobile-context .qx-text-button { min-height: 44px; font-size: 12px; }
  .qx-content { max-width: 650px; padding: 23px 16px 28px; }
  .qx-heading h1 { font-size: 25px; line-height: 1.2; letter-spacing: -.6px; }
  .qx-two-col { grid-template-columns: 1fr; gap: 0; }
  .qx-field { margin-bottom: 25px; }
  .qx-field > label, .qx-field-label, .qx legend { font-size: 14px; margin-bottom: 9px; }
  .qx-hint { font-size: 12px; }
  .qx .qx-input { font-size: 16px; min-height: 49px; padding: 11px 12px; } /* 16px: no iOS zoom on focus */
  .qx .qx-select { padding-right: 36px; }
  .qx-choices, .qx-choices-compact, .qx-radio-choices.qx-choices-compact { grid-template-columns: 1fr; gap: 10px; }
  .qx-choices-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qx-choice { min-height: 56px; font-size: 15px; gap: 13px; }
  .qx-check { width: 28px; height: 28px; min-width: 28px; }
  .qx-check::before { width: 15px; height: 15px; }
  .qx-radio { width: 27px; height: 27px; min-width: 27px; }
  .qx-radio::before { width: 13px; height: 13px; }
  .qx-help { font-size: 12px; }
  .qx-help > summary { min-height: 36px; }
  .qx-help-content, .qx-note { font-size: 13px; }
  .qx-fold > summary { min-height: 56px; font-size: 13px; padding: 14px; }
  .qx-fold-content { padding: 18px 14px 2px; }
  .qx-button { min-height: 47px; font-size: 13px; padding: 11px 13px; }
  .qx-text-button { font-size: 13px; min-height: 42px; }
  .qx-category-grid { grid-template-columns: 1fr 1fr; }
  .qx-category { font-size: 12px; min-height: 56px; gap: 7px; }
  .qx-experience-body { padding: 18px 14px; }
  .qx-entry-actions { flex-direction: column; align-items: flex-start; }
  .qx-check-label { font-size: 13px; min-height: 50px; }
  .qx-split-actions { align-items: flex-start; gap: 5px; flex-direction: column; }
  .qx-age-row { gap: 12px; }
  .qx-age-row .qx-field { max-width: none; }
  .qx-age-row .qx-button { min-width: 0; max-width: 48%; font-size: 12px; min-height: 49px; }
  .qx-footer {
    padding: 10px 16px max(12px, env(safe-area-inset-bottom)); gap: 8px; flex-direction: column; align-items: stretch;
    border-radius: 0; box-shadow: 0 -3px 12px rgba(41, 65, 119, .04);
  }
  .qx-save-indicator { max-width: none; font-size: 11px; }
  .qx-footer-buttons { width: 100%; margin: 0; gap: 10px; }
  .qx-footer-buttons > .qx-button { min-width: 0; flex: 1; }
  .qx-footer-buttons .qx-back { flex: 0 1 85px; }
  .qx-footer-buttons .qx-back svg { display: none; }
  .qx-footer-buttons .qx-continue { flex: 1.4; }
  .qx-footer-buttons .qx-generate { flex: 1.8; min-width: 0; }
  .qx-footer-buttons .qx-generate > svg { display: none; }
  .qx-footer-buttons .qx-save-answers { flex: 1.2; min-width: 0; }
  .qx-review-grid { grid-template-columns: 1fr; gap: 18px; }
  .qx-confirm-row { font-size: 13px; padding: 13px; }
  .qx-feature-gate .qx-button { width: 100%; }
  .qx-scholarship-gate { padding: 25px 20px; }
  .qx-career-grid { grid-template-columns: 1fr; gap: 16px; }
  .qx-dialog { padding: 24px 19px; }
}

@media (max-width: 365px) {
  .qx-content { padding: 20px 14px; }
  .qx-footer-buttons { gap: 7px; }
  .qx-footer-buttons > .qx-button { font-size: 12px; padding: 10px 8px; }
  .qx-category-grid { grid-template-columns: 1fr; }
  .qx-summary-value { max-width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .qx *, .qx *::before, .qx *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .qx-footer, .qx-sidebar, .qx-mobile-context { display: none !important; }
  .qx-shell { border: 0; box-shadow: none; }
}

/* ══ C3 refresh (audit/questionnaire_c3_plan.md, 2026-10-31) ═══════════════
   The approved new-look mockup, round 7 + v2: a focus top bar, a colour and
   icon per section, coloured progress segments, answer cards, Examples pills,
   an amber tip and a short cheer. Questions and behaviour are unchanged. */

/* Focus top bar (index.html block nav; outside .qx, so its own scope) */
.qx-topbar, .qx-topbar * { box-sizing: border-box; }
.qx-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 28px; background: #fff; border-bottom: 1px solid #e5eaf4; position: relative; z-index: 30; }
.qx-topbar-logo { display: inline-flex; align-items: center; }
.qx-topbar-logo img { display: block; height: 34px; width: auto; }
.qx-topbar-exit { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 14px; border: 1px solid #cfdaf0; border-radius: 10px; background: #fff; color: #2553bd; font-size: 13px; font-weight: 650; text-decoration: none; box-shadow: 0 1px 2px rgba(32, 53, 88, .06); }
.qx-topbar-exit:hover { border-color: #91a7db; background: #f6f9ff; }
.qx-topbar-exit:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 800px) { .qx-topbar { padding: 8px 16px; } .qx-topbar-logo img { height: 30px; } .qx-topbar-exit { font-size: 12.5px; padding: 7px 11px; } }
@media (max-width: 359px) { .qx-topbar-exit span { display: none; } }

/* Section colours (one per section; school accounts use the school colour) */
.qx [data-section="about"], .qx [data-nav-section="about"], .qx [data-seg="about"], .qx [data-sec="about"] { --sc: #4f46e5; }
.qx [data-section="school"], .qx [data-nav-section="school"], .qx [data-seg="school"], .qx [data-sec="school"] { --sc: #2563eb; }
.qx [data-section="experience"], .qx [data-nav-section="experience"], .qx [data-seg="experience"], .qx [data-sec="experience"] { --sc: #0d9488; }
.qx [data-section="strengths"], .qx [data-nav-section="strengths"], .qx [data-seg="strengths"], .qx [data-sec="strengths"] { --sc: #d97706; }
.qx [data-section="direction"], .qx [data-nav-section="direction"], .qx [data-seg="direction"], .qx [data-sec="direction"] { --sc: #db2777; }
.qx [data-section="life"], .qx [data-nav-section="life"], .qx [data-seg="life"], .qx [data-sec="life"] { --sc: #16a34a; }
.qx [data-section="support"], .qx [data-nav-section="support"], .qx [data-sec="support"] { --sc: #7c3aed; }
.qx [data-section="financial"], .qx [data-nav-section="financial"], .qx [data-sec="financial"] { --sc: #0891b2; }
.qx [data-section="review"], .qx [data-nav-section="review"], .qx [data-sec="review"] { --sc: #334155; }
.qx.qx-school [data-section], .qx.qx-school [data-nav-section], .qx.qx-school [data-seg], .qx.qx-school [data-sec] { --sc: var(--qx-school); }
/* Answers take the section's colour (not on school accounts: the school colour stays) */
.qx:not(.qx-school) .qx-section[data-section] {
  --qx-check: var(--sc);
  --qx-selected-bg: color-mix(in srgb, var(--sc) 8%, #fff);
  --qx-selected-border: color-mix(in srgb, var(--sc) 55%, #fff);
  --qx-selected-text: color-mix(in srgb, var(--sc) 78%, #0f172a);
}

/* Icon tiles */
.qx-sec-tile {
  position: relative; flex: none; width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--sc);
  background: linear-gradient(150deg, color-mix(in srgb, var(--sc) 9%, #fff), color-mix(in srgb, var(--sc) 22%, #fff));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px color-mix(in srgb, var(--sc) 16%, transparent);
}
.qx-sec-tile > svg { width: 17px; height: 17px; }
.qx-sec-done { position: absolute; inset: 0; display: none; place-items: center; }
.qx-sec-done svg { width: 17px; height: 17px; }
.qx-sec-tile-lg { width: 54px; height: 54px; border-radius: 16px; }
.qx-sec-tile-lg > svg { width: 28px; height: 28px; }
.qx-sec-tile-lg, .qx-current .qx-sec-tile, .qx-is-done .qx-sec-tile, .qx-sec-tile.qx-done {
  color: #fff; background: linear-gradient(155deg, color-mix(in srgb, var(--sc) 62%, #fff) 0%, var(--sc) 58%, color-mix(in srgb, var(--sc) 80%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -6px color-mix(in srgb, var(--sc) 70%, transparent);
}
.qx-sec-tile-lg svg .duo, .qx-current .qx-sec-tile svg .duo, .qx-is-done .qx-sec-tile svg .duo, .qx-sec-tile.qx-done svg .duo { opacity: .35; }
.qx-is-done .qx-sec-tile > svg, .qx-sec-tile.qx-done > svg { visibility: hidden; }
.qx-is-done .qx-sec-done, .qx-sec-tile.qx-done .qx-sec-done { display: grid; }
.qx-is-skipped .qx-sec-tile, .qx-sec-tile.qx-skipped { filter: grayscale(.85); opacity: .7; }

/* Section list: icon then name, left-aligned; the current one tinted */
.qx-nav-link { gap: 11px; font-size: 13px; font-weight: 600; border-radius: 12px; justify-content: flex-start; }
.qx-nav-link .qx-nav-title { flex: 1; min-width: 0; text-align: left; }
.qx-nav-link:hover { background: color-mix(in srgb, var(--sc, #2563eb) 6%, #fff); }
.qx-nav-link.qx-current { background: color-mix(in srgb, var(--sc) 10%, #fff); border-color: color-mix(in srgb, var(--sc) 22%, #fff); color: #0f172a; font-weight: 750; }
.qx-nav-progress .qx-progress-fill { background: var(--qx-brand-gradient); }

/* Progress segments across the top */
.qx-segbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 18px 36px 0; max-width: 1010px; width: 100%; margin: 0 auto; }
.qx-seg { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--sc) 14%, #eef2f8); transition: background .25s ease; }
.qx-seg.qx-now { background: color-mix(in srgb, var(--sc) 42%, #fff); }
.qx-seg.qx-on { background: var(--sc); }

/* Section heading: big solid tile beside the text */
.qx-heading { display: flex; gap: 16px; align-items: flex-start; }
.qx-heading-text { min-width: 0; }
.qx-section[data-section] .qx-eyebrow { color: color-mix(in srgb, var(--sc) 85%, #0f172a); }

/* The cheer after finishing a section */
.qx-cheer { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 11px 14px; border-radius: 12px; background: linear-gradient(100deg, #ecfdf5, #f0f9ff); border: 1px solid #bbf7d0; color: #166534; font-size: 13px; font-weight: 650; animation: qx-pop .35s ease; }
.qx-cheer svg { width: 18px; height: 18px; color: #16a34a; }
@keyframes qx-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Tip: amber, with a solid lightbulb tile */
.qx-note-info { background: #fffbeb; border-color: #fde68a; color: #78350f; border-radius: 12px; align-items: center; }
.qx-note-info strong { color: #713f12; }
.qx-tip-tile { flex: none; width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(155deg, #fcd34d, #f59e0b 58%, #d97706); box-shadow: 0 5px 12px -6px rgba(217, 119, 6, .8); }
.qx-tip-tile svg { width: 17px; height: 17px; }
.qx-tip-tile svg .duo { opacity: .35; }

/* Examples: a coloured pill (same help text inside) */
.qx-help > summary { gap: 6px; min-height: 30px; padding: 4px 11px; border-radius: 99px; font-weight: 650; font-size: 12px;
  color: color-mix(in srgb, var(--sc, #2563eb) 85%, #0f172a); background: color-mix(in srgb, var(--sc, #2563eb) 9%, #fff); }
.qx-help > summary:hover { background: color-mix(in srgb, var(--sc, #2563eb) 15%, #fff); }
.qx-help > summary > svg.dp-ic { width: 15px; height: 15px; }
.qx-help-content { border-radius: 10px; border-color: color-mix(in srgb, var(--sc, #2563eb) 22%, #fff); background: color-mix(in srgb, var(--sc, #2563eb) 5%, #fff); }

/* Answer cards: text first, the tick or dot on the right */
.qx-choice { border-radius: 12px; min-height: 52px; padding: 12px 14px; font-size: 13px; font-weight: 560; background: #fff; }
.qx-choice:hover { border-color: color-mix(in srgb, var(--qx-check) 45%, #fff); box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .35); transform: translateY(-1px); }
.qx-choice:has(input:checked) { font-weight: 700; box-shadow: 0 0 0 1px var(--qx-selected-border), 0 6px 16px -12px color-mix(in srgb, var(--qx-check) 60%, transparent); }
.qx-choice .qx-choice-text { flex: 1; min-width: 0; }
.qx-check { border-radius: 50%; }
.qx-opt-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--qx-check);
  background: color-mix(in srgb, var(--qx-check) 10%, #fff); }
.qx-opt-ic svg { width: 17px; height: 17px; }
.qx-choice:has(input:checked) .qx-opt-ic { color: #fff; background: var(--qx-check); }
.qx-choice:has(input:checked) .qx-opt-ic svg .duo { opacity: .35; }
.qx-cards .qx-radio-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
/* "Who is this kit for": four tiles, icon on top */
.qx-tiles .qx-radio-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qx-tiles .qx-choice { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 96px; padding: 14px 10px; }
.qx-tiles .qx-choice .qx-choice-text { flex: none; }
.qx-tiles .qx-choice .qx-radio { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; min-width: 18px; }
.qx-tiles .qx-choice .qx-radio::before { width: 9px; height: 9px; }
.qx-tiles .qx-opt-ic { width: 36px; height: 36px; border-radius: 11px; }
.qx-tiles .qx-opt-ic svg { width: 20px; height: 20px; }

/* Buttons and footer in the new look */
.qx-button { border-radius: 10px; }
.qx-button.qx-primary { box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .55), inset 0 1px 0 rgba(255, 255, 255, .18); }
.qx-footer-buttons .qx-continue, .qx-footer-buttons .qx-generate { font-size: 13px; }
.qx-save-indicator svg { color: #16a34a; }

/* Review: a coloured tile per section */
.qx-review-section { border-radius: 12px; }
.qx-review-section > summary { gap: 12px; padding: 12px 14px; font-size: 13px; }
.qx-review-section .qx-sec-tile { width: 32px; height: 32px; }

/* Folds and inputs a little rounder to match */
.qx-fold, .qx-fold > summary { border-radius: 12px; }
.qx .qx-input { border-radius: 10px; }

@media (max-width: 1100px) {
  .qx-segbar { padding: 16px 27px 0; }
  .qx-nav-link { font-size: 12px; gap: 9px; }
  .qx-sec-tile { width: 28px; height: 28px; border-radius: 9px; }
  .qx-sec-tile > svg, .qx-sec-done svg { width: 15px; height: 15px; }
  .qx-sec-tile-lg { width: 48px; height: 48px; border-radius: 14px; }
  .qx-sec-tile-lg > svg { width: 25px; height: 25px; }
}
@media (max-width: 800px) {
  .qx-segbar { padding: 12px 16px 0; gap: 5px; }
  .qx-seg { height: 6px; }
  .qx-heading { gap: 12px; }
  .qx-sec-tile-lg { width: 44px; height: 44px; border-radius: 13px; }
  .qx-sec-tile-lg > svg { width: 23px; height: 23px; }
  .qx-cards .qx-radio-choices { grid-template-columns: 1fr; }
  .qx-tiles .qx-radio-choices, .qx-cards-compact .qx-radio-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qx-cards-compact .qx-choice { font-size: 14px; padding: 12px; }
  .qx-choice { font-size: 15px; }
  .qx-tiles .qx-choice { font-size: 14px; min-height: 92px; }
  .qx-sheet .qx-nav-link { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .qx-choice:hover { transform: none; } .qx-cheer { animation: none; } }
@media print { .qx-topbar, .qx-segbar, .qx-cheer { display: none !important; } }

/* C3 follow-up (Nate, 2026-10-31): the guest sign-up note sits on the
   questionnaire's background with room below it, not hugging the card; and
   "Save & resume options" is easier to spot. */
.qx .anon-signup-nudge { max-width: 1320px; margin: 0 auto 18px; border-radius: 12px; }
.qx-nav-save {
  margin: 12px 0 0; padding: 9px 10px; min-height: 40px; border-radius: 10px; font-size: 13px; font-weight: 750; gap: 6px; white-space: nowrap; letter-spacing: -.1px;
  color: var(--qx-link); background: color-mix(in srgb, var(--qx-blue) 8%, #fff); border: 1px solid color-mix(in srgb, var(--qx-blue) 20%, #fff);
}
.qx-nav-save:hover { text-decoration: none; background: color-mix(in srgb, var(--qx-blue) 13%, #fff); }
.qx-nav-save svg { width: 17px; height: 17px; }
@media (max-width: 1100px) { .qx-nav-save { white-space: normal; font-size: 12.5px; line-height: 1.3; } }
@media (max-width: 800px) { .qx .anon-signup-nudge { margin: 12px 16px 10px; } }
