/* Shared interaction refinements requested after the initial source handoff. */
/* Compact mobile header, whole citizenship choices, and consistent upload cards. */
@media (max-width: 991.98px) {

  .wz-header .wz-header-action { width: auto; min-height: 36px; font-size: 12px !important; padding: 6px 14px !important; }
}
.wz-residency .wz-control-wrap { padding-right: 0; }
.wz-residency .wz-chip { flex: 0 0 auto; white-space: nowrap; }
.wz-statements-grid { align-items: stretch; grid-auto-rows: 1fr; }
.wz-supporting-grid { align-items: stretch; }
.wz-typed-signature-preview { display: none; }
.wz-residency > .wz-field-status { position: static; float: left; display: inline-flex; margin: 8px 6px 0 0; }
.wz-residency > .wz-field-status[hidden] { display: none; }
.wz-residency > .invalid-feedback { margin-top: 8px; }
@media (max-width: 991.98px) {
  body, body:has(#application-header-action:not([hidden])), body:has(#application-header-action[hidden]) { --wz-header-height: 76px; }
  .wz-header, .wz-header:has(#application-header-action[hidden]) { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr; gap: 12px; height: var(--wz-header-height); padding: 10px 16px; }
  .wz-header .wz-brand { grid-column: 1; grid-row: 1; justify-self: start; }
  .wz-header .wz-header-action { grid-column: 2; grid-row: 1; justify-self: end; white-space: nowrap; }
}
/* Paint the whole left column, including the space beneath the sticky sidebar. */
@media (min-width: 992px) {
  .wz-shell:not(.is-welcome),
  body:not(.wz-flow-active) .wz-footer-application {
    background: linear-gradient(to right, var(--wz-subtle) 0 var(--wz-sidebar-width), white var(--wz-sidebar-width) 100%);
  }
}
html { scroll-padding-top:calc(var(--wz-header-height) + 24px); }
[tabindex='-1'], [data-field], .wz-upload-card { scroll-margin-top:calc(var(--wz-header-height) + 24px); }
.wz-header { position:sticky; top:0; z-index:1030; }
.wz-sidebar { position:sticky; top:var(--wz-header-height); align-self:start; height:calc(100vh - var(--wz-header-height)); height:calc(100dvh - var(--wz-header-height)); overflow-y:auto; overscroll-behavior:contain; }
.wz-step-actions { grid-template-columns:minmax(112px,184px) minmax(70px,1fr) max-content; }
.wz-step-actions > .btn-primary { white-space:nowrap; padding-inline:24px; }
.wz-currency-prefix { position:absolute; left:14px; top:12px; pointer-events:none; color:var(--wz-muted); line-height:24px; z-index:1; }
.form-control.wz-money-input { padding-left:34px; font-variant-numeric:tabular-nums; }
.form-control[data-calendar] { padding-right:48px; }
.wz-calendar-toggle { position:absolute; right:3px; top:2px; width:44px; height:44px; border:0; border-radius:8px; background:transparent; color:var(--wz-muted); }
.wz-field:has(.wz-calendar-toggle) .wz-validation-icon { right:48px; }
.wz-field:has(.wz-calendar-toggle).is-invalid input { padding-right:80px; }
.wz-calendar-dialog { max-width:420px; }
.wz-calendar-dialog .modal-header, .wz-calendar-dialog .modal-body, .wz-calendar-dialog .modal-footer { padding:20px; }
.wz-calendar-dialog .modal-header { padding-bottom:0; }
.wz-calendar-dialog .modal-title { font-size:20px; line-height:28px; }
.wz-calendar-controls { display:grid; grid-template-columns:36px minmax(0,1fr) 92px 36px; align-items:center; gap:8px; margin-bottom:16px; }
.wz-calendar-controls .form-select { min-height:40px; font-size:14px; padding:8px 28px 8px 8px; background-position:right 4px center; }
.wz-calendar-nav { border:0; background:var(--wz-subtle); border-radius:50%; width:36px; height:36px; display:grid; place-items:center; }
.wz-calendar-nav:disabled { opacity:.4; }
.wz-calendar-grid { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:2px; }
.wz-calendar-grid th { font-size:12px; text-align:center; font-weight:500; color:var(--wz-muted); padding-bottom:8px; }
.wz-calendar-grid td { padding:0; text-align:center; }
.wz-calendar-grid button { border:0; background:none; border-radius:10px; width:100%; min-height:40px; color:var(--wz-text); font-size:14px; }
.wz-calendar-grid button:hover:not(:disabled) { background:var(--wz-subtle); }
.wz-calendar-grid [aria-current='date'] { box-shadow:inset 0 0 0 1px var(--wz-primary); }
.wz-calendar-grid [aria-selected='true'] button { background:var(--wz-primary); color:white; }
.wz-calendar-grid button:disabled { color:var(--wz-disabled); }
.wz-searchable-input { padding-right:44px; }
.wz-industry-chevron { position:absolute; top:14px; right:12px; pointer-events:none; }
.wz-field.is-invalid .wz-industry-chevron { display:none; }
.wz-industry-options { position:absolute; z-index:1010; top:calc(100% + 4px); left:0; right:0; max-height:280px; overflow-y:auto; overscroll-behavior:contain; border:1px solid var(--wz-border); border-radius:10px; background:white; box-shadow:0 8px 24px rgb(7 14 41 / 12%); padding:4px; }
.wz-industry-options [role='option'] { font-size:13px; line-height:20px; padding:10px 12px; border-radius:6px; cursor:pointer; overflow-wrap:anywhere; }
.wz-industry-options [role='option']:hover, .wz-industry-options .is-active { background:var(--wz-subtle); }
.wz-industry-options [aria-selected='true'] { color:var(--wz-primary); font-weight:600; }
.wz-industry-empty { padding:12px; font-size:13px; color:var(--wz-muted); }
.form-control[data-calendar] { cursor:pointer; }
@media(min-width:992px) and (max-height:650px) { .wz-sidebar { padding:16px; } .wz-steps { gap:8px; } .wz-step { min-height:44px; padding:6px 10px; font-size:14px; } .wz-security-note { margin-top:12px; } }

@media(max-width:767.98px) { .wz-step-actions { grid-template-columns:112px minmax(0,1fr); } .wz-step-actions > .btn-primary { width:100%; } .wz-calendar-controls { gap:4px; grid-template-columns:32px minmax(0,1fr) 84px 32px; } .wz-calendar-nav { width:32px; height:36px; } }

/* Preserve visible boundaries on unselected funding choices. */
.btn-check:not(:checked):not(:disabled) + .wz-chip:hover {
  background-color: #f3f4f6;
  border-color: var(--wz-border);
  color: var(--wz-muted);
}

.wz-residency > legend.form-label { color: var(--wz-text); opacity: 1; float: none; }
.wz-residency .wz-control-wrap { padding-right: 0; }

/* One compact action bar per active form; original controls keep native submission. */
html { scroll-padding-bottom: calc(var(--wz-action-height, 0px) + 24px); }
.wz-action-slot { min-width: 0; }
.wz-action-slot .wz-step-actions { background: white; border-top: 1px solid var(--wz-border); min-height: 76px; padding: 12px 0; }
.wz-action-slot .wz-step-actions.is-docked { position: fixed; bottom: 0; z-index: 1020; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.has-docked-actions > .wz-footer { padding-bottom: calc(var(--wz-action-height, 0px) + 12px); }
@media (max-width: 991.98px) {
  .wz-action-slot .wz-step-actions { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .wz-action-slot .wz-step-caption { display: none; }
  .wz-action-slot .wz-step-actions > .btn-primary { grid-column: 2; grid-row: 1; padding-inline: 16px; width: 100%; font-size: 14px; }
  .wz-action-slot .wz-step-actions > .btn-wz-back { grid-column: 1; grid-row: 1; }
}

/* Premium welcome and a footer anchored by document flow. */
body[data-page='application'] { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
body[data-page='application'] > .wz-header { flex-shrink:0; }
body[data-page='application'] > .wz-shell, body[data-page='application'] > .wz-flow-shell { flex:1 0 auto; }
body[data-page='application'] > .wz-footer { margin-top:auto; flex-shrink:0; }
.wz-shell.is-welcome { flex:1 0 auto; min-height:0; }
.wz-shell.is-welcome .wz-right-column { display:flex; background:radial-gradient(ellipse at 90% 10%,#e9dcff 0,transparent 55%),linear-gradient(135deg,#fff 10%,#f6f2ff 100%); }
.wz-main.is-welcome { width:100%; display:flex; align-items:center; }
.wz-welcome { width:100%; max-width:none; margin:auto; padding:clamp(32px,5vw,80px); gap:clamp(28px,4vw,64px); align-items:center; }
.wz-welcome-copy { gap:24px; }
.wz-welcome h1 { font-size:clamp(34px,3.8vw,58px); line-height:1.08; letter-spacing:-.035em; max-width:780px; }
.wz-funding-highlight { color:var(--wz-primary); }
.wz-welcome-description { font-size:18px; line-height:1.65; max-width:720px; }
.wz-welcome-actions { display:flex; flex-wrap:wrap; align-items:center; gap:16px 24px; }
.wz-welcome-actions > .btn-primary { min-height:56px; box-shadow:0 8px 24px rgb(103 81 235 / 24%); }
.wz-funding-provider { color:var(--wz-navy); font-weight:700; }
.wz-welcome .wz-requirements { align-self:center; background:linear-gradient(150deg,#070e29,#25165b); border:1px solid rgb(255 255 255 / 14%); box-shadow:0 24px 56px rgb(30 16 70 / 18%); padding:clamp(24px,3vw,40px); }
.wz-requirements li { font-size:16px; line-height:1.5; }
@media(max-width:991.98px) { .wz-welcome { grid-template-columns:1fr; padding:32px 20px; } .wz-welcome .wz-requirements { width:100%; } .wz-welcome-description { font-size:16px; } }

.wz-address-suggestions { position:absolute; z-index:1010; top:calc(100% + 4px); left:0; right:0; border:1px solid var(--wz-border); border-radius:10px; background:white; box-shadow:0 8px 24px rgb(7 14 41 / 12%); padding:4px; }
.wz-address-suggestions [role='listbox'] { max-height:240px; overflow-y:auto; overscroll-behavior:contain; }
.wz-address-suggestions [role='option'] { padding:10px 12px; font-size:13px; line-height:20px; border-radius:6px; cursor:pointer; overflow-wrap:anywhere; }
.wz-address-suggestions [role='option']:hover, .wz-address-suggestions [aria-selected='true'] { background:var(--wz-subtle); }
.wz-address-attribution { padding:6px 12px; text-align:right; color:#5e5e5e; font:500 12px/20px Arial,sans-serif; }

.wz-document-portal { grid-template-columns: minmax(0, 1fr); }
.wz-document-portal .wz-main { max-width: 1100px; width: 100%; margin-inline: auto; }
#skip-documents { justify-self: center; }
.wz-document-portal .wz-step-actions { display: flex; justify-content: flex-end; }
@media (max-width:767.98px) {
  body[data-page='application'] #documents-form .wz-step-actions > .btn-primary { grid-column: 1 / -1; grid-row: 2; }
  #skip-documents { grid-column: 2; grid-row: 1; }
  .wz-document-portal .wz-step-actions > .btn-primary { width: 100%; }
}

/* Keep draft panels out of the first paint until the saved route is restored. */
.wz-application-startup { min-height: 55vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 32px 20px; text-align: center; }
.wz-application-startup .spinner-border { color: var(--wz-primary); }
.wz-application-startup p { max-width: 480px; margin: 0; }
#application-content { display: flex; flex-direction: column; flex: 1 0 auto; }
#application-content > .wz-shell, #application-content > .wz-flow-shell { flex: 1 0 auto; }

body[data-page='error'] { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wz-not-found { flex: 1; }
.wz-not-found .wz-flow-card { max-width: 600px; align-items: center; text-align: center; }
.wz-not-found-code { font-size: clamp(72px, 14vw, 120px); line-height: 1; font-weight: 600; color: var(--wz-primary); margin: 0; }
.wz-not-found h1 { font-size: clamp(28px, 6vw, 40px); margin: 0; }
body[data-page='error'] > .wz-footer { margin-top: auto; }

/* Email recovery shares the application palette and remains usable on narrow screens. */
body[data-page='resume'] { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; background:radial-gradient(ellipse at 50% 10%,var(--wz-subtle),transparent 65%); }
body[data-page='resume'] > .wz-footer { margin-top:auto; }
.wz-resume-layout { flex:1; width:100%; }
.wz-resume-card { gap:12px; max-width:560px; width:100%; margin-inline:auto; box-shadow:0 16px 56px rgb(30 16 70 / 8%); }
.wz-resume-symbol { width:56px; height:56px; display:grid; place-items:center; background:var(--wz-subtle); border-radius:18px; color:var(--wz-primary); }
.wz-resume-card h1 { font-size:clamp(28px,6vw,38px); margin-bottom:12px; }
.wz-resume-card form { width:100%; display:block; }
.wz-resume-card [hidden] { display:none !important; }
.wz-resume-submit { width:100%; margin-top:20px; min-height:48px; }
.wz-otp-fieldset { margin:20px 0 12px; padding:0; border:0; min-width:0; }
.wz-otp-fieldset legend { font-size:14px; font-weight:600; margin-bottom:12px; }
.wz-otp-inputs { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; width:min(100%,292px); }
.wz-otp-inputs .wz-otp-digit { width:100%; min-width:0; height:46px; min-height:46px; padding:6px 0; text-align:center; font-size:20px; line-height:1; font-weight:600; border-radius:8px; caret-color:var(--wz-primary); }
.wz-otp-digit:focus { border-color:var(--wz-primary); box-shadow:0 0 0 3px var(--wz-subtle); }
.wz-otp-digit[aria-invalid='true'] { border-color:#c63241; }
.wz-resume-hint, .wz-resume-delivery { font-size:14px; line-height:1.6; color:var(--wz-muted); }
.wz-resume-code-details { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; font-size:12px; color:var(--wz-muted); margin-top:16px; }
.wz-resume-secondary { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:12px; }
.wz-resume-text-action { appearance:none; border:0; background:transparent; color:var(--wz-primary); font:inherit; font-size:13px; font-weight:500; line-height:20px; padding:8px 0; cursor:pointer; text-align:left; }
.wz-resume-text-action:hover:not(:disabled) { text-decoration:underline; text-underline-offset:3px; }
.wz-resume-text-action:focus-visible { outline:2px solid var(--wz-primary); outline-offset:3px; border-radius:3px; }
.wz-resume-text-action:disabled { color:var(--wz-muted); cursor:default; }
.wz-resume-feedback { margin:16px 0; font-size:14px; line-height:1.5; }
.wz-resume-card .wz-resume-feedback[data-error='true'] { color:#c63241; }
.wz-resume-feedback:empty { display:none; }
.wz-resume-home { text-align:center; font-size:14px; margin-top:20px; }
.wz-resume-card form[aria-busy='true'] .wz-resume-submit::after { content:''; display:inline-block; width:14px; height:14px; margin-left:10px; vertical-align:middle; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:wz-otp-spin .8s linear infinite; }
@keyframes wz-otp-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .wz-resume-card form[aria-busy='true'] .wz-resume-submit::after { animation:none; } }
@media(max-width:400px) { .wz-otp-inputs { gap:6px; width:min(100%,256px); } .wz-otp-inputs .wz-otp-digit { height:42px; min-height:42px; font-size:18px; } }

#loan-records > .wz-loan-record:first-child [data-remove-loan] { display:none !important; }

/* Completed sessions expose confirmation cards only; they never render the editable form. */
.wz-completion-card[data-completion='thank-you'] { display:none; }
html[data-completion-screen='thank-you'] .wz-completion-card[data-completion='thank-you'] { display:flex; }
html[data-completion-screen='thank-you'] .wz-completion-card[data-completion='sorry'] { display:none; }

.wz-flow-card > .wz-confirmation-icon { display:block; width:64px; height:64px; flex:0 0 64px; }
.wz-document-portal { grid-template-columns:minmax(0,1fr); }
.wz-document-portal .wz-main:has(#document-upload-complete:not([hidden])) { padding:0; }
