/* Namespaced to keep the existing staff shell and applicant portal independent. */
.af-builder { color: #172c43; max-width: 1250px; margin: 0 auto; }
.af-builder *, .af-builder *::before, .af-builder *::after { box-sizing: border-box; }
.af-heading, .af-card-heading, .af-intro, .af-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.af-heading { margin-bottom: 24px; align-items: flex-start; }
.af-heading h1 { color: #0a2545; font-size: 30px; line-height: 1.2; letter-spacing: -.04em; font-weight: 750; margin: 5px 0 10px; }
.af-heading p:not(.af-eyebrow), .af-card-heading p, .af-empty p, .af-footer p { font-size: 14px; color: #576c80; line-height: 1.6; margin: 5px 0 0; }
.af-eyebrow { color: #08755b; font-size: 11px; font-weight: 750; letter-spacing: .14em; margin: 0; }
.af-save-status, .af-pill { display: inline-block; border: 1px solid #dce6ee; border-radius: 20px; padding: 7px 12px; background: #fff; font-size: 12px; font-weight: 650; color: #536679; white-space: nowrap; }
.af-save-status.af-dirty { background: #fff7df; border-color: #e8cb79; color: #705212; }
.af-intro { background: linear-gradient(110deg, #082644, #0b4e52); border-radius: 18px; padding: 24px 26px; color: #fff; }
.af-intro strong { font-size: 18px; font-weight: 650; }
.af-intro p { max-width: 760px; color: #d4e8e8; font-size: 14px; line-height: 1.6; margin: 7px 0 0; }
.af-count { background: #ffffff17; border: 1px solid #ffffff30; border-radius: 12px; padding: 10px 14px; font-size: 13px; white-space: nowrap; }
.af-policy { font-size: 12px; color: #586d7e; line-height: 1.7; margin: 18px 2px 24px; }
.af-policy p { margin: 4px 0; }
.af-policy strong { color: #22475a; }
.af-card { border: 1px solid #dbe5ed; background: #fff; border-radius: 18px; padding: 26px; margin: 20px 0; box-shadow: 0 7px 25px #0a254505; }
.af-card h2 { font-size: 18px; font-weight: 750; color: #112e49; margin: 0; }
.af-card-heading { margin-bottom: 24px; align-items: flex-start; }
.af-section { border: 0; padding: 0; margin: 24px 0 0; min-width: 0; }
.af-section legend { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 750; color: #566f80; margin-bottom: 11px; }
.af-question-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.af-question { border: 1px solid #dce7ed; border-radius: 10px; padding: 13px 14px 10px; background: #fcfefe; min-width: 0; }
.af-hidden-question { background: #f6f8fa; }
.af-hidden-question .af-show span { color: #657582; }
.af-show { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.5; overflow-wrap: anywhere; }
.af-builder input[type="checkbox"] { accent-color: #07805f; height: 16px; width: 16px; margin: 2px 0 0; flex-shrink: 0; }
.af-question-meta { margin: 9px 0 0 25px; min-height: 20px; color: #5d7080; font-size: 11px; }
.af-question-meta label { display: flex; align-items: center; gap: 6px; }
.af-question-meta input[type="checkbox"] { width: 13px; height: 13px; }
.af-core { display: inline-block; color: #11745e; background: #eaf6f1; border-radius: 4px; padding: 2px 6px; }
.af-custom-row { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(125px, 1fr) minmax(120px, 1fr) auto auto; align-items: end; gap: 12px; padding: 17px 0; border-bottom: 1px solid #edf1f5; }
.af-custom-row > label, .af-preview-field > label { color: #455b70; font-size: 12px; font-weight: 650; display: block; min-width: 0; }
.af-builder input:not([type="checkbox"]), .af-builder select, .af-builder textarea { display: block; width: 100%; border: 1px solid #cfdee7; border-radius: 8px; padding: 10px 11px; margin-top: 6px; color: #1c354c; background: #fff; font-family: inherit; font-size: 13px; line-height: 1.5; min-height: 42px; }
.af-builder input::placeholder, .af-builder textarea::placeholder { color: #728392; }
.af-builder input:focus-visible, .af-builder select:focus-visible, .af-builder textarea:focus-visible, .af-builder button:focus-visible { outline: 3px solid #88cdb9; outline-offset: 3px; }
.af-builder input:disabled, .af-builder select:disabled, .af-builder textarea:read-only, .af-preview-field input:read-only { background: #f6f9fb; color: #526b80; }
.af-custom-row > .af-check { display: flex; gap: 7px; align-items: center; min-height: 42px; }
.af-button { border: 1px solid #cbdce6; background: #fff; color: #193c54; border-radius: 9px; padding: 11px 16px; min-height: 43px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.af-button:hover { background: #eff8f4; border-color: #6bb79f; }
.af-primary { background: #087a5c; color: #fff; border-color: #087a5c; box-shadow: 0 4px 12px #087a5c20; }
.af-primary:hover { background: #06664d; color: #fff; }
.af-remove { background: transparent; border: 0; min-height: 42px; font-size: 12px; color: #a43b46; cursor: pointer; padding: 8px; }
.af-builder button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.af-empty { background: #f7fafb; border: 1px dashed #cfdee7; border-radius: 12px; padding: 22px; text-align: center; }
.af-empty strong { font-size: 14px; color: #36576d; }
.af-add { margin-top: 20px; border: 1px dashed #a9c9bd; border-radius: 12px; background: #f8fcfa; padding: 17px; }
.af-add h3 { font-size: 13px; font-weight: 750; color: #245c4d; margin: 0; }
.af-add .af-custom-row { border: 0; padding-bottom: 0; }
.af-footer { position: sticky; bottom: 12px; z-index: 5; padding: 18px 22px; background: #fffffffa; border: 1px solid #d4e3e9; border-radius: 14px; box-shadow: 0 10px 30px #0a254513; margin-top: 24px; }
.af-footer strong { font-size: 13px; }
.af-footer p { font-size: 12px; }
.af-footer-actions { display: flex; gap: 10px; }
.af-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.af-required { color: #a13444; }
.af-error, .af-conflict { background: #fff2ef; border: 1px solid #edb9ae; color: #873f32; border-radius: 10px; font-size: 13px; padding: 14px; line-height: 1.6; margin: 14px 0; }
.af-conflict .af-button { margin: 10px 0 0 10px; }
.af-loading { color: #496c70; padding: 32px; text-align: center; }
@media (max-width: 1180px) {
  .af-question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .af-custom-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .af-custom-label { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .af-heading, .af-intro, .af-card-heading, .af-footer { align-items: flex-start; flex-direction: column; gap: 13px; }
  .af-heading h1 { font-size: 26px; }
  .af-heading { margin-bottom: 18px; }
  .af-intro, .af-card { padding: 19px 16px; border-radius: 14px; }
  .af-question-grid, .af-preview-grid { grid-template-columns: minmax(0, 1fr); }
  .af-footer { bottom: 6px; padding: 14px; }
  .af-footer > div:first-child { display: none; }
  .af-footer-actions { width: 100%; }
  .af-footer-actions button { flex: 1; padding: 11px 9px; }
  .af-add { padding: 13px; }
  .af-custom-row { gap: 12px 9px; }
  .af-count { font-size: 12px; padding: 7px 10px; }
}
.af-builder h1{scroll-margin-top:24px}
@media(max-width:1023px){.af-builder h1{scroll-margin-top:195px}}
