/* ACIM Client — consolidated accessibility styles (app-accessibility-*) */

/* Skip to main content (first Tab on page) */
.app-skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    z-index: 1100;
    background: #fff;
    color: #00529c;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    border: 2px solid #00529c;
    border-radius: 0.25rem;
}

.app-skip-link:focus,
.app-skip-link:focus-visible {
    position: fixed;
    left: 0.5rem;
    top: 0.5rem;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.75rem 1rem;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    outline: 3px solid #f37021;
    outline-offset: 2px;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
}

html.high-contrast .app-skip-link:focus,
html.high-contrast .app-skip-link:focus-visible {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

.reekyc-main-content {
    scroll-margin-top: 4.5rem;
}

html {
    scroll-padding-top: 4.5rem;
}

.reekyc-main-content:focus {
    outline: none;
}

/* ----- Reusable accessibility system (app-accessibility-*) ----- */
.app-accessibility-root {
    position: relative;
    z-index: auto;
}

.app-accessibility-launcher {
    position: relative;
    top: auto;
    right: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid #00529c;
    border-radius: 2rem;
    background: #fff;
    color: #00529c;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
}

.app-accessibility-launcher:hover {
    background: #f0f6fc;
}

.app-accessibility-launcher:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
}

.app-accessibility-launcher-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.app-accessibility-panel {
    position: fixed;
    z-index: 1060;
    top: 3.75rem;
    right: 1rem;
    width: min(13.75rem, calc(100vw - 1.5rem));
    max-height: calc(100vh - 5rem);
    overflow: auto;
    background: #fff;
    border: 2px solid #00529c;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
    padding: 0;
}

.app-accessibility-panel[hidden] {
    display: none !important;
}

.app-accessibility-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.app-accessibility-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #00529c;
}

.app-accessibility-panel-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: #333;
    border-radius: 0.25rem;
}

.app-accessibility-panel-close:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
}

.app-accessibility-panel-body {
    padding: 1rem;
}

.app-accessibility-group {
    margin-bottom: 1rem;
}

.app-accessibility-group:last-child {
    margin-bottom: 0;
}

.app-accessibility-group-label {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #212529;
}

.app-accessibility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-accessibility-label {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #212529;
    cursor: pointer;
}

.app-accessibility-switch-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.app-accessibility-switch {
    appearance: none;
    box-sizing: border-box;
    display: block;
    flex-shrink: 0;
    width: 2.875rem;
    height: 1.625rem;
    border-radius: 1rem;
    background: #9e9e9e;
    border: 2px solid #9e9e9e;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.app-accessibility-switch::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.125rem;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
    transform: translateY(-50%);
}

    .app-accessibility-switch:checked {
        background: #21a4ba;
        border-color: #21a4ba;
    }

.app-accessibility-switch:checked::after {
    transform: translate(calc(2.875rem - 1.125rem - 0.25rem), -50%);
}

.app-accessibility-switch:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
}

.app-accessibility-switch:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.app-accessibility-text-size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-accessibility-btn {
    flex: 1 1 auto;
    min-width: 4rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid #00529c;
    border-radius: 0.375rem;
    background: #fff;
    color: #00529c;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.app-accessibility-btn:hover:not(:disabled) {
    background: #e8f1fa;
}

.app-accessibility-btn:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
}

.app-accessibility-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: #adb5bd;
    color: #6c757d;
}

.app-accessibility-hint {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: #6c757d;
}

@media (prefers-reduced-motion: reduce) {
    .app-accessibility-switch,
    .app-accessibility-switch::after {
        transition: none;
    }
}

@media (max-width: 576px) {
    .app-accessibility-launcher-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .app-accessibility-launcher {
        padding: 0.5rem;
        border-radius: 50%;
    }

    .app-accessibility-panel {
        top: 3.5rem;
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
    }
}


/* High contrast theme (enabled via html.high-contrast) */
/*
 * HC border policy (WCAG on #000 body): structure #fff; focus/accent #ff0 only.
 * White surfaces (modals, a11y panel): structure #000; :focus-visible #ff0 global.
 * Normal (no .high-contrast): gray #6c757d structure, brand/focus in site.css.
 */
html.high-contrast body {
    background-color: #000 !important;
    color: #fff !important;
}
html.high-contrast .navbar-toggler {
    filter: invert();
}

html.high-contrast .navbar.bg-light {
    background-color: #000 !important;
    border-bottom: 2px solid #fff !important;
}

/* Company logo on black HC navbar — white backing so dark text in logo.png stays readable */
html.high-contrast .navbar .navbar-brand,
html.high-contrast .app-landing-navbar .navbar-brand.main-logo {
    display: inline-block;
    background-color: #fff !important;
    padding: 0.35rem 0.6rem;
    border-radius: 0.25rem;
    border: 2px solid #fff;
    line-height: 0;
    text-decoration: none !important;
}

html.high-contrast .navbar .navbar-brand:focus-visible,
html.high-contrast .app-landing-navbar .navbar-brand.main-logo:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
}

html.high-contrast .navbar .navbar-brand img,
html.high-contrast .app-landing-navbar .navbar-brand img {
    filter: none !important;
}

html.high-contrast a,
html.high-contrast .navbar a {
    color: #ff0 !important;
    text-decoration: underline !important;
}

html.high-contrast .btn-primary,
html.high-contrast .btn.btn-primary {
    background-color: #ff0 !important;
    border-color: #ff0 !important;
    color: #000 !important;
}

html.high-contrast .btn-warning {
    background-color: #fff !important;
    border-color: #fff !important;
    color: #000 !important;
}

html.high-contrast a.btn,
html.high-contrast a.btn-primary,
html.high-contrast a.btn-warning,
html.high-contrast a.custom-btn {
    text-decoration: none !important;
}

html.high-contrast .form-control,
html.high-contrast .form-select,
html.high-contrast input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="button"]):not([type="submit"]),
html.high-contrast select,
html.high-contrast textarea {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.high-contrast select.form-control,
html.high-contrast select.form-select {
    padding-right: 2.25rem !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 1rem 0.75rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ff0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

html.high-contrast input[type="radio"],
html.high-contrast input[type="checkbox"]:not(.app-accessibility-switch) {
    background-color: transparent !important;
    border: none !important;
    accent-color: #ff0;
}

html.high-contrast input[type="radio"]:focus-visible,
html.high-contrast input[type="checkbox"]:not(.app-accessibility-switch):focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 3px !important;
}

/* Bootstrap form-switch (Trading Details): global checkbox rule clears track — restore pill + thumb */
html.high-contrast .form-switch .form-check-input[type="checkbox"] {
    width: 2.5em !important;
    min-width: 2.5em !important;
    height: 1.25em !important;
    min-height: 1.25em !important;
    background-color: #444 !important;
    border: 2px solid #fff !important;
    border-radius: 2em !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
    background-repeat: no-repeat !important;
    background-size: auto 100% !important;
    accent-color: auto;
}

html.high-contrast .form-switch .form-check-input[type="checkbox"]:checked {
    background-color: #00529c !important;
    border-color: #00529c !important;
    background-position: right center !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

html.high-contrast .form-switch .form-check-input[type="checkbox"]:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

html.high-contrast .form-switch .form-check-input[type="checkbox"]:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed;
}

html.high-contrast .nominee-file-upload-wrap:focus-within {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

/* DP Details modify form: Bootstrap radios on black page (not global transparent/accent-only) */
html.high-contrast #dematDetailsForm .form-check-input[type="radio"] {
    width: 1.25em;
    height: 1.25em;
    min-width: 1.25em;
    min-height: 1.25em;
    flex-shrink: 0;
    background-color: #000 !important;
    border: 2px solid #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    border-radius: 50%;
    -webkit-appearance: none;
    appearance: none;
    accent-color: auto;
}

html.high-contrast #dematDetailsForm .form-check-input[type="radio"]:checked {
    background-color: #00529c !important;
    border-color: #00529c !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

html.high-contrast #dematDetailsForm .form-check-input[type="radio"]:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

html.high-contrast .nominee-status-alert .form-check-input:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}

html.high-contrast .custom-box:has(.custom-file-input:focus-visible) {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

html.high-contrast .custom-box .custom-file-input:focus-visible {
    outline: none !important;
}

html.high-contrast .custom-box:focus-within .custom-file-label::after {
    outline: none !important;
}

/* High contrast: placeholder text on page inputs (readable on black fields) */
html.high-contrast input.form-control::placeholder,
html.high-contrast textarea.form-control::placeholder,
html.high-contrast input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]):not([type="reset"])::placeholder,
html.high-contrast textarea::placeholder {
    color: #d9d9d9 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #d9d9d9 !important;
}

html.high-contrast input.form-control::-webkit-input-placeholder,
html.high-contrast textarea.form-control::-webkit-input-placeholder,
html.high-contrast input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]):not([type="reset"])::-webkit-input-placeholder,
html.high-contrast textarea::-webkit-input-placeholder {
    color: #d9d9d9 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #d9d9d9 !important;
}

html.high-contrast input.form-control::-moz-placeholder,
html.high-contrast textarea.form-control::-moz-placeholder,
html.high-contrast input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]):not([type="reset"])::-moz-placeholder,
html.high-contrast textarea::-moz-placeholder {
    color: #d9d9d9 !important;
    opacity: 1 !important;
}

html.high-contrast input.form-control:-ms-input-placeholder,
html.high-contrast textarea.form-control:-ms-input-placeholder,
html.high-contrast input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]):not([type="reset"]):-ms-input-placeholder,
html.high-contrast textarea:-ms-input-placeholder {
    color: #d9d9d9 !important;
    opacity: 1 !important;
}

html.high-contrast .alert-danger {
    background-color: #000 !important;
    color: #ff6 !important;
    border: 2px solid #fff !important;
}

html.high-contrast .alert-success,
html.high-contrast .alert-warning,
html.high-contrast .alert-info,
html.high-contrast .alert-primary {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.high-contrast .alert-primary h1,
html.high-contrast .alert-primary h2,
html.high-contrast .alert-primary h3,
html.high-contrast .alert-primary .reekyc-heading-section,
html.high-contrast .alert-primary ul,
html.high-contrast .alert-primary li,
html.high-contrast .alert-primary p {
    color: #fff !important;
}

html.high-contrast .alert-primary .text-danger {
    color: #ff6 !important;
}

html.high-contrast .box,
html.high-contrast .card {
    background-color: #000 !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

html.high-contrast .author-name,
html.high-contrast .author-position,
html.high-contrast h1,
html.high-contrast h2,
html.high-contrast h3,
html.high-contrast h4,
html.high-contrast h5,
html.high-contrast h6,
html.high-contrast p,
html.high-contrast label,
html.high-contrast span {
    color: #fff !important;
}

/* High contrast: Client Index stage cards (whole-card links — not yellow underlined text links) */
html.high-contrast .client-deck a.stage-card-link,
html.high-contrast a.stage-card-link {
    text-decoration: none !important;
    color: inherit !important;
}

html.high-contrast .client-deck .stage-card-shell {
    background-color: #000 !important;
    border: 1px solid #fff !important;
}

    html.high-contrast .client-deck .stage-card-shell.border-success {
        border: 2px solid #229734 !important;
    }

html.high-contrast .client-deck .stage-card-shell.border-danger {
    border: 2px solid #f66 !important;
}

html.high-contrast .client-deck .stage-card-shell .card-title,
html.high-contrast .client-deck .stage-card-shell .card-text,
html.high-contrast .client-deck .stage-card-shell .card-title span,
html.high-contrast .client-deck .stage-card-shell small,
html.high-contrast .client-deck .stage-card-shell .text-muted {
    color: #fff !important;
    text-decoration: none !important;
}

html.high-contrast .client-deck .stage-card-shell:has(.stage-card-link:focus-visible) {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
}

html.high-contrast .client-deck .stage-card-shell .stage-card-link:focus-visible {
    outline: none !important;
}

html.high-contrast .client-deck .stage-card-shell .text-success,
html.high-contrast .client-deck .stage-card-shell .fa-check-circle {
    color: #0f0 !important;
}

html.high-contrast .client-deck .stage-card-shell .text-danger,
html.high-contrast .client-deck .stage-card-shell .fa-times-circle {
    color: #f66 !important;
}

/* High contrast: DDPI / MTF custom toggles (.check-toggle-btn — decorative <a> is knob, not a link) */
html.high-contrast .check-toggle-btn a {
    text-decoration: none !important;
    color: transparent !important;
    background-color: #fff !important;
    border: 2px solid #fff !important;
}

html.high-contrast .check-toggle-btn > span:before {
    background-color: #444 !important;
    border: 2px solid #fff !important;
}

html.high-contrast .check-toggle-btn input:checked ~ span:before {
    background-color: #00529c !important;
    border-color: #ff0 !important;
    box-shadow: inset 0 0 0 30px #00529c !important;
}

html.high-contrast .check-toggle-btn input:checked ~ a {
    background-color: #fff !important;
    border-color: #000 !important;
}

html.high-contrast .client-deck .activation-card:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
}

html.high-contrast .client-deck .activation-card .check-toggle-btn:focus-within {
    outline: none !important;
}

html.high-contrast .check-toggle-btn:focus-within {
    outline: none !important;
}

html.high-contrast .check-toggle-btn input:focus-visible {
    outline: none !important;
}

html.high-contrast .client-deck .activation-card .check-toggle-btn > span span {
    color: transparent !important;
    opacity: 0 !important;
}

/* High contrast: page tables (Profile, Address, Closure, etc.) */
html.high-contrast table {
    color: #fff !important;
    border-color: #fff !important;
}

html.high-contrast table th,
html.high-contrast table td {
    color: #fff !important;
    background-color: #000 !important;
    border-color: #fff !important;
}

html.high-contrast table thead .bg-primary,
html.high-contrast table thead tr.bg-primary th {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

html.high-contrast .text-primary {
    color: #ff0 !important;
}

html.high-contrast .table-bordered {
    border-color: #fff !important;
}

html.high-contrast .mandatory-field {
    color: #ff6 !important;
}

html.high-contrast footer .footer-sec-3 {
    background: #0e0e0f;
    border-top: 1px solid #fff;
}

/* High contrast: pill tabs (Address Digi Locker / Manual Entry, etc.) */
html.high-contrast .nav-custom .nav-link {
    color: #fff !important;
    background-color: #000 !important;
    border: 2px solid #fff !important;
}

html.high-contrast .nav-custom .nav-pills .nav-link.active,
html.high-contrast .nav-custom .nav-link.active {
    background-color: #ff0 !important;
    color: #000 !important;
    border-color: #ff0 !important;
}

html.high-contrast .nav-custom .nav-link:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

html.high-contrast .reekyc-main-content .form-control:focus-visible,
html.high-contrast .reekyc-main-content .form-select:focus-visible,
html.high-contrast .reekyc-main-content select.form-control:focus-visible,
html.high-contrast .reekyc-main-content textarea.form-control:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
    border-color: #000 !important;
}

html.high-contrast .reekyc-main-content .form-control:focus,
html.high-contrast .reekyc-main-content .form-select:focus,
html.high-contrast .reekyc-main-content select.form-control:focus,
html.high-contrast .reekyc-main-content textarea.form-control:focus {
    box-shadow: none !important;
}

html.high-contrast .reekyc-main-content .btn:focus-visible,
html.high-contrast .reekyc-main-content a.btn:focus-visible,
html.high-contrast .reekyc-main-content button.btn:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

html.high-contrast .reekyc-main-content .btn:focus,
html.high-contrast .reekyc-main-content a.btn:focus,
html.high-contrast .reekyc-main-content button.btn:focus {
    box-shadow: none !important;
}

/* Tab panels: do not show focus ring on whole pane (focus moves to fields/tabs) */
[role="tabpanel"]:focus,
[role="tabpanel"]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

html.high-contrast [role="tabpanel"]:focus,
html.high-contrast [role="tabpanel"]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* High contrast: modal dialogs (OTP, profile, contact, etc.) — light card, not page-black fields */
html.high-contrast .modal .modal-content {
    background-color: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    box-shadow: none !important;
}

html.high-contrast .modal .modal-body,
html.high-contrast .modal .modal-footer {
    background-color: #fff !important;
    color: #000 !important;
}

html.high-contrast .modal .modal-body p,
html.high-contrast .modal .modal-body span,
html.high-contrast .modal .modal-body label,
html.high-contrast .modal .modal-body b,
html.high-contrast .modal .modal-body strong,
html.high-contrast .modal .modal-body small,
html.high-contrast .modal .modal-body h1,
html.high-contrast .modal .modal-body h2,
html.high-contrast .modal .modal-body h3,
html.high-contrast .modal .modal-body h4,
html.high-contrast .modal .modal-body h5,
html.high-contrast .modal .modal-body h6,
html.high-contrast .modal .modal-body .reekyc-heading-subsection,
html.high-contrast .modal .modal-body .reekyc-heading-section,
html.high-contrast .modal .modal-footer p,
html.high-contrast .modal .modal-footer span {
    color: #000 !important;
}

html.high-contrast .modal .modal-header,
html.high-contrast .latest-popup .modal-header {
    background-color: #00529c !important;
    color: #fff !important;
    border-bottom: 2px solid #ff0 !important;
}

html.high-contrast .modal .modal-header .modal-title,
html.high-contrast .modal .modal-header h2,
html.high-contrast .modal .modal-header h4,
html.high-contrast .modal .modal-header h5 {
    color: #fff !important;
}

html.high-contrast .modal .close,
html.high-contrast .modal .btn-close,
html.high-contrast .latest-popup .close {
    color: #ff0 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    filter: none !important;
}

html.high-contrast .modal .btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ff0'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat !important;
}

html.high-contrast .modal input.form-control,
html.high-contrast .modal textarea.form-control,
html.high-contrast .modal select.form-control,
html.high-contrast .modal select.form-select,
html.high-contrast .modal input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]):not([type="reset"]),
html.high-contrast .modal textarea,
html.high-contrast .modal select {
    background-color: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
}

html.high-contrast .modal select.form-control,
html.high-contrast .modal select.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

html.high-contrast .modal a:not(.btn) {
    color: #000 !important;
    text-decoration: underline !important;
}

html.high-contrast .modal .btn.disabled,
html.high-contrast .modal .btn:disabled,
html.high-contrast .modal button.disabled,
html.high-contrast .modal button:disabled {
    color: #212529 !important;
    opacity: 1 !important;
    border: 2px solid #000 !important;
}

html.high-contrast .modal .btn-warning.disabled,
html.high-contrast .modal .btn-warning:disabled {
    background-color: #fff !important;
    color: #212529 !important;
}

html.high-contrast .modal .alert-danger {
    background-color: #fff !important;
    color: #c00 !important;
    border: 2px solid #000 !important;
}

html.high-contrast .modal .text-danger {
    color: #c00 !important;
}

html.high-contrast .modal .form-control:focus-visible,
html.high-contrast .modal .form-select:focus-visible,
html.high-contrast .modal select.form-control:focus-visible,
html.high-contrast .modal textarea.form-control:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
    border-color: #000 !important;
}

html.high-contrast .modal .btn:focus-visible,
html.high-contrast .modal .close:focus-visible,
html.high-contrast .modal .btn-close:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

html.high-contrast .heading a.btn-warning:focus-visible,
html.high-contrast a.btn.btn-warning.text-white:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

/* Modal tables: light readable cells (not page black-table HC); strong borders */
html.high-contrast .modal table,
html.high-contrast .modal table th,
html.high-contrast .modal table td {
    color: #000 !important;
    background-color: #fff !important;
    border: 1px solid #000 !important;
}

html.high-contrast .modal table thead .bg-primary,
html.high-contrast .modal table thead tr.bg-primary th {
    background-color: #00529c !important;
    color: #fff !important;
    border: 1px solid #000 !important;
}

html.high-contrast .modal table thead .bg-primary .text-primary,
html.high-contrast .modal table thead tr.bg-primary th.text-primary {
    color: #fff !important;
}

html.high-contrast .modal .text-primary {
    color: #00529c !important;
}

/* Modal: placeholder on light dialog fields */
html.high-contrast .modal input::placeholder,
html.high-contrast .modal textarea::placeholder {
    color: #495057 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #495057 !important;
}

html.high-contrast .modal input::-webkit-input-placeholder,
html.high-contrast .modal textarea::-webkit-input-placeholder {
    color: #495057 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #495057 !important;
}

html.high-contrast .modal input::-moz-placeholder,
html.high-contrast .modal textarea::-moz-placeholder {
    color: #495057 !important;
    opacity: 1 !important;
}

html.high-contrast .modal input:-ms-input-placeholder,
html.high-contrast .modal textarea:-ms-input-placeholder {
    color: #495057 !important;
    opacity: 1 !important;
}

/* High contrast: file upload boxes on main pages */
html.high-contrast .custom-box {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px dashed #fff !important;
}

html.high-contrast .custom-box div,
html.high-contrast .custom-box small {
    color: #fff !important;
}

html.high-contrast .upload-file-section .custom-file-label::after {
    border-color: #fff !important;
}

html.high-contrast .modal .custom-box {
    background-color: #fff !important;
    color: #000 !important;
    border: 2px dashed #000 !important;
}

html.high-contrast .modal .custom-box div,
html.high-contrast .modal .custom-box small {
    color: #000 !important;
}

html.high-contrast .modal .upload-file-section .custom-file-label::after {
    border: 2px dashed #000 !important;
}

html.high-contrast .modal .custom-box:has(.custom-file-input:focus-visible) {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

/* Modals (Profile Father/Spouse, etc.): custom radios on white body — not global yellow accent */
html.high-contrast .modal [role="radiogroup"] input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25em;
    height: 1.25em;
    min-width: 1.25em;
    min-height: 1.25em;
    flex-shrink: 0;
    margin-right: 0.35em;
    vertical-align: middle;
    background-color: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 50%;
    background-image: none !important;
    box-shadow: none !important;
    accent-color: auto;
}

html.high-contrast .modal [role="radiogroup"] input[type="radio"]:checked {
    background-color: #fff !important;
    border-color: #00529c !important;
    border-width: 3px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2.5' fill='%2300529c'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 55%;
}

html.high-contrast .modal [role="radiogroup"] input[type="radio"]:focus-visible {
    outline: 3px solid #00529c !important;
    outline-offset: 2px;
}

html.high-contrast .modal [role="radiogroup"] label {
    color: #000 !important;
    text-decoration: none !important;
}

html.high-contrast .radio-buttons input.btn-check:focus-visible + label.bank-buttons {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

html.high-contrast *:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

html.high-contrast .app-accessibility-launcher {
    background: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}

html.high-contrast .app-accessibility-panel {
    background: #000 !important;
    border-color: #fff !important;
    color: #fff !important;
}

html.high-contrast .app-accessibility-panel-header {
    background: #000 !important;
    border-bottom-color: #fff !important;
}

html.high-contrast .app-accessibility-panel-title,
html.high-contrast .app-accessibility-label,
html.high-contrast .app-accessibility-group-label {
    color: #fff !important;
}

html.high-contrast .app-accessibility-btn {
    background: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}

/* ----- Accessibility UI mockup overrides ----- */
.app-accessibility-launcher {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.5rem;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
}

.app-accessibility-launcher-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-accessibility-launcher-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.app-accessibility-panel {
    border: 2px solid #8bc34a;
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
    min-width: 13.75rem;
}

.app-accessibility-panel-header {
    display: none;
}

.app-accessibility-panel-body {
    padding: 0;
}

.app-accessibility-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.app-accessibility-row-item--last {
    border-bottom: none;
}

.app-accessibility-group {
    margin-bottom: 0;
}

.app-accessibility-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #333;
    margin: 0;
    flex-shrink: 0;
}

.app-accessibility-text-size-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.app-accessibility-btn {
    min-width: 2rem;
    padding: 0.35rem 0.5rem;
    border: none;
    background: transparent;
    color: #333;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.375rem;
    line-height: 1.2;
}

.app-accessibility-btn:hover:not(:disabled) {
    background: #f0f4f8;
}

.app-accessibility-btn--selected {
    background: #00529c !important;
    color: #fff !important;
    border-radius: 0.375rem;
}

.app-accessibility-btn:disabled {
    opacity: 0.35;
    background: transparent;
    border: none;
}

.app-accessibility-hint.app-accessibility-tts-unsupported {
    padding: 0 1rem 0.75rem;
    margin: 0;
    font-size: 0.8125rem;
}

html.high-contrast .app-accessibility-btn--selected {
    background: #ff0 !important;
    color: #000 !important;
}

/* ----- Accessibility UI final scoped overrides ----- */
.app-accessibility-root .app-accessibility-launcher {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.5rem;
    border-radius: 50%;
    justify-content: center;
}

.app-accessibility-root .app-accessibility-launcher-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.app-accessibility-root .app-accessibility-panel {
    border: 2px solid #8bc34a;
    border-radius: 0.625rem;
    min-width: 13.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
}

.app-accessibility-root .app-accessibility-panel-body {
    padding: 0;
}

.app-accessibility-root .app-accessibility-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.app-accessibility-root .app-accessibility-row-item--last {
    border-bottom: none;
}

.app-accessibility-root .app-accessibility-btn {
    border: none !important;
    background: transparent;
    user-select: none;
    -webkit-user-select: none;
    caret-color: transparent;
}

.app-accessibility-root .app-accessibility-btn--selected {
    background: #21a4ba !important;
    color: #fff !important;
}

.app-accessibility-root .app-accessibility-btn:disabled {
    border: none !important;
    background: transparent;
}

.app-accessibility-root .app-accessibility-label {
    font-weight: 500;
    color: #333;
}

/* ----- Panel typography isolation + header close ----- */
.app-accessibility-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-accessibility-root {
    font-size: 16px !important;
}

.app-accessibility-panel-header {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    padding: 0.375rem 0.5rem 0;
    min-height: 2rem;
    border-bottom: none;
    background: transparent;
}

.app-accessibility-root .app-accessibility-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 0.25rem;
}

.app-accessibility-root .app-accessibility-panel-close:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
}

.app-accessibility-root .app-accessibility-label {
    font-size: 0.9375rem;
    line-height: 1.3;
}

.app-accessibility-root .app-accessibility-btn {
    font-size: 0.9375rem;
}

.app-accessibility-root .app-accessibility-launcher-img {
    display: block;
    max-width: 100%;
    height: auto;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel {
    background: #fff !important;
    border: 2px solid #000 !important;
    color: #333 !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-label {
    color: #333 !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-btn {
    background: transparent !important;
    color: #333 !important;
    border: none !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-btn--selected {
    background: #21a4ba !important;
    color: #fff !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-launcher {
    background: #fff !important;
    border-color: #fff !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel-close {
    color: #333 !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-switch {
    background: #9e9e9e !important;
    border: 2px solid #000 !important;
}

    html.high-contrast .app-accessibility-root .app-accessibility-switch:checked {
        background: #20a3ba !important;
        border-color: #000 !important;
    }

/* ----- Panel visible title + px isolation (simple) ----- */
.app-accessibility-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 4px;
}

.app-accessibility-panel-visible-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.app-accessibility-root {
    font-size: 16px;
    color: #333;
}

.app-accessibility-root .app-accessibility-panel {
    background: #fff;
    border: 2px solid #8bc34a;
}

.app-accessibility-root .app-accessibility-label,
.app-accessibility-root label.app-accessibility-label {
    font-size: 15px;
    color: #333;
}

.app-accessibility-root .app-accessibility-btn {
    font-size: 15px;
    color: #333;
}

.app-accessibility-root .app-accessibility-panel-close {
    font-size: 24px;
    color: #333;
}

.app-accessibility-root .app-accessibility-hint {
    font-size: 13px;
    color: #666;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel {
    background: #fff !important;
    border-color: #000 !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel-visible-title,
html.high-contrast .app-accessibility-root .app-accessibility-label,
html.high-contrast .app-accessibility-root label,
html.high-contrast .app-accessibility-root .app-accessibility-btn,
html.high-contrast .app-accessibility-root .app-accessibility-panel-close,
html.high-contrast .app-accessibility-root .app-accessibility-panel-close span {
    color: #333 !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-btn--selected {
    background: #21a4ba !important;
    color: #fff !important;
}

/* ----- Fix panel scale bleed: lock html rem only at default text size ----- */
html:not(.app-accessibility-user-text-size) {
    font-size: 16px !important;
}

.app-accessibility-root {
    font-size: 16px !important;
}

.app-accessibility-root .app-accessibility-panel {
    position: fixed !important;
    top: 72px !important;
    right: 80px !important;
    left: auto !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: min(220px, calc(100vw - 24px)) !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}

.app-accessibility-root .app-accessibility-row-item {
    padding: 10px 12px !important;
}

.app-accessibility-root .app-accessibility-launcher {
    width: 44px !important;
    height: 44px !important;
    padding: 7px !important;
    box-sizing: border-box !important;
}

.app-accessibility-root .app-accessibility-launcher-img {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
}

.app-accessibility-root .app-accessibility-panel-visible-title {
    font-size: 14px !important;
}

.app-accessibility-root .app-accessibility-label,
.app-accessibility-root label.app-accessibility-label {
    font-size: 13px !important;
}

.app-accessibility-root .app-accessibility-btn {
    font-size: 13px !important;
}

.app-accessibility-root .app-accessibility-panel-close {
    font-size: 20px !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel-header {
    background: #fff !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel-visible-title,
html.high-contrast .app-accessibility-root h2 {
    color: #333 !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel {
    background: #fff !important;
    border-color: #000 !important;
    color: #333 !important;
}

/* ----- Launcher: image only (40px), no button chrome ----- */
.app-accessibility-root .app-accessibility-launcher {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 0 !important;
    display: block !important;
    line-height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    font-size: 0 !important;
    color: transparent !important;
}

.app-accessibility-launcher:hover {
    background: transparent !important;
}

.app-accessibility-root .app-accessibility-launcher:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
    background: transparent !important;
}

.app-accessibility-root .app-accessibility-launcher-img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: block !important;
}

html.high-contrast .app-accessibility-root .app-accessibility-launcher {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ----- Landing: high contrast (pages without site.css) ----- */
html.high-contrast body {
    background-color: #000 !important;
    color: #fff !important;
}

html.high-contrast .home-registration-form,
html.high-contrast .registration-form {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.high-contrast a {
    color: #ff0 !important;
    text-decoration: underline !important;
}

html.high-contrast .btn-primary {
    background-color: #ff0 !important;
    border-color: #ff0 !important;
    color: #000 !important;
}

html.high-contrast .form-control,
html.high-contrast input:not([type="radio"]):not([type="checkbox"]):not([type="button"]):not([type="submit"]),
html.high-contrast select,
html.high-contrast textarea {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.high-contrast h1,
html.high-contrast h2,
html.high-contrast h3,
html.high-contrast p,
html.high-contrast label,
html.high-contrast small {
    color: #fff !important;
}

html.high-contrast .text-white {
    color: #fff !important;
}

/* .text-white on HC warning buttons overrides .btn-warning — keep black label on white fill */
html.high-contrast .btn-warning,
html.high-contrast .btn-warning.text-white,
html.high-contrast a.btn.btn-warning.text-white,
html.high-contrast a.btn.btn-warning.btn-go-back {
    color: #000 !important;
    background-color: #fff !important;
    border-color: #fff !important;
    text-decoration: none !important;
}

html.high-contrast a.btn.btn-warning.btn-go-back:focus-visible {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #000 !important;
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
    text-decoration: none !important;
}

html.high-contrast .alert-danger {
    background-color: #000 !important;
    color: #ff6 !important;
    border: 2px solid #fff !important;
}

html.high-contrast *:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

/* ----- Landing: launcher placement in header row ----- */
/* Landing header row: launcher in top-right white band beside logo */
.app-accessibility-placement-header {
    flex-shrink: 0;
    margin-left: auto;
}

.landing-header-tools .app-accessibility-placement-header {
    margin-left: 0;
}

.app-accessibility-placement-header .app-accessibility-launcher,
.app-accessibility-placement-header .app-accessibility-root .app-accessibility-launcher {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.2);
}

.app-accessibility-placement-header .app-accessibility-panel {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    left: auto;
    bottom: auto;
    max-height: calc(100vh - 5.5rem);
}

@media (max-width: 576px) {
    .app-accessibility-placement-header .app-accessibility-panel {
        top: 4rem;
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
    }
}

/* ----- Inner app navbar: launcher in header row (not viewport-fixed) ----- */
@media (max-width: 991.98px) {
    .app-navbar-container > .navbar-collapse {
        flex-basis: 100%;
    }
}

.navbar .navbar-end-tools,
.navbar-end-tools,
.landing-header-tools {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto;
    flex-wrap: nowrap !important;
    gap: 0.75rem;
}

.navbar .navbar-end-tools {
    margin-left: auto !important;
}

.navbar-end-tools .navbar-toggler {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.navbar-end-tools .navbar-accessibility-slot,
.navbar-end-tools .app-accessibility-root {
    z-index: 3;
}

.landing-header-tools .navbar-toggler {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.navbar-accessibility-slot {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-accessibility-slot .app-accessibility-root,
.landing-header-tools .app-accessibility-root,
.navbar-end-tools .app-accessibility-root,
.navbar-end-tools .app-accessibility-root--body-fallback {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 1;
    width: auto !important;
    height: auto !important;
}

/* Panel open: escape low stacking context (e.g. landing #hero.section z-index: 1) */
.app-accessibility-root.app-accessibility-root--panel-open {
    z-index: 1060 !important;
}

html.app-accessibility-panel-open .landing-header-tools,
html.app-accessibility-panel-open .app-accessibility-placement-header,
html.app-accessibility-panel-open .navbar-end-tools,
html.app-accessibility-panel-open .navbar-accessibility-slot {
    position: relative;
    z-index: 1060;
}

html.app-accessibility-panel-open .app-accessibility-root .app-accessibility-panel,
html.app-accessibility-panel-open .app-accessibility-panel {
    z-index: 1060 !important;
}

.navbar-accessibility-slot .app-accessibility-launcher,
.navbar-accessibility-slot .app-accessibility-root .app-accessibility-launcher {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    box-shadow: none !important;
}

.navbar-accessibility-slot .app-accessibility-panel {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    left: auto;
    bottom: auto;
    max-height: calc(100vh - 5.5rem);
}

@media (min-width: 992px) {
    .navbar .app-navbar-container {
        flex-wrap: nowrap;
        align-items: center;
    }

    .navbar .navbar-brand {
        order: 1;
        flex-shrink: 0;
    }

    .navbar .navbar-collapse {
        order: 2;
        flex-grow: 1;
    }

    .navbar .navbar-end-tools {
        order: 3;
        margin-left: 0.75rem !important;
        padding-right: 0.25rem;
        flex-shrink: 0;
    }
}

/* 991px → 320px: toggle then a11y (rightmost), no overlap */
@media (max-width: 991.98px) {
    .navbar .app-navbar-container > .navbar-brand {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 6.75rem);
    }

    .navbar .navbar-end-tools {
        order: 2;
        margin-left: auto !important;
    }

    .navbar .navbar-collapse {
        order: 3;
    }

    .navbar .navbar-end-tools,
    .navbar-end-tools,
    .landing-header-tools {
        gap: 0.5rem;
        padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
        flex-shrink: 0;
    }

    .navbar-end-tools .navbar-toggler,
    .navbar-end-tools .navbar-toggler.collapsed,
    .landing-header-tools .navbar-toggler,
    .landing-header-tools .navbar-toggler.collapsed {
        margin-right: 0;
        padding: 0.35rem 0.5rem;
        flex-shrink: 0;
    }

    .navbar-end-tools .navbar-accessibility-slot,
    .landing-header-tools .navbar-accessibility-slot {
        flex-shrink: 0;
        width: 36px;
        min-width: 36px;
    }

    /* Direct-child toggler only (legacy header): reserve a11y width — not used when toggler is inside .navbar-end-tools */
    .navbar .app-navbar-container > .navbar-toggler {
        margin-right: calc(36px + 0.75rem);
        flex-shrink: 0;
    }

    .navbar-accessibility-slot .app-accessibility-root .app-accessibility-launcher,
    .landing-header-tools .app-accessibility-root .app-accessibility-launcher {
        width: 36px !important;
        height: 36px !important;
    }

    .navbar-accessibility-slot .app-accessibility-root .app-accessibility-launcher-img,
    .landing-header-tools .app-accessibility-root .app-accessibility-launcher-img {
        width: 36px !important;
        height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
    }

    .navbar-accessibility-slot .app-accessibility-panel,
    .landing-header-tools .app-accessibility-panel {
        top: 4rem;
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
    }
}

@media (max-width: 375px) {
    .navbar .app-navbar-container > .navbar-brand {
        max-width: calc(100% - 6.25rem);
    }

    .navbar .navbar-end-tools,
    .navbar-end-tools {
        gap: 0.375rem;
    }
}

@media (max-width: 576px) {
    .navbar-accessibility-slot .app-accessibility-panel {
        top: 3.75rem;
    }
}

/* ----- Landing: hero, consent, registration form HC ----- */
/* ----- Landing hero background (replaces inline #hero styles) ----- */
.reekyc-landing-hero {
    background-color: #00529c;
    background-image: url('../images/app-mobile2.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

html.high-contrast .reekyc-landing-hero {
    background-color: #000 !important;
    background-image: none !important;
}

html.high-contrast .reekyc-landing-hero .overlay.bg-gradient-primary {
    opacity: 0 !important;
    background: transparent !important;
}

/* Landing login — keyboard focus rings (normal theme) */
.home-registration-form .form-control:focus-visible,
.registration-form .form-control:focus-visible,
#ClientCode:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
    border-color: #00529c;
    box-shadow: none;
}

.home-registration-form #loginSubmitBtn:focus-visible,
.registration-form input.btn-primary[type="button"]:focus-visible,
.registration-form input.btn-primary[type="submit"]:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
}

.home-registration-form #loginSubmitBtn:focus:not(:focus-visible),
.registration-form input.btn-primary[type="button"]:focus:not(:focus-visible),
.registration-form input.btn-primary[type="submit"]:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Modals — keyboard focus (landing has no site.css; client loads both) */
.modal .form-control:focus-visible,
.modal .form-select:focus-visible,
.modal select.form-control:focus-visible,
.modal textarea.form-control:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
    box-shadow: none !important;
    border-color: #adb5bd;
}

.modal .form-control:focus,
.modal .form-select:focus,
.modal select.form-control:focus,
.modal textarea.form-control:focus {
    box-shadow: none !important;
}

.modal .btn:focus-visible,
.modal .close:focus-visible,
.modal .btn-close:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
    box-shadow: none !important;
}

.modal .btn:focus,
.modal .close:focus {
    box-shadow: none !important;
}

.modal .btn:focus:not(:focus-visible) {
    box-shadow: none !important;
}

.latest-popup .popup-footer-group .btn:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
    box-shadow: none !important;
}

.heading a.btn-warning:focus-visible,
a.btn.btn-warning.text-white:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 2px;
    box-shadow: none !important;
}

/* ----- High contrast: option 1 (yellow/black actions, not brand orange) ----- */
.reekyc-consent-link {
    color: #007bff;
    text-decoration: underline;
}

html.high-contrast .reekyc-consent-link {
    color: #ff0 !important;
    text-decoration: underline !important;
}

html.high-contrast .registration-form .btn-primary,
html.high-contrast .home-registration-form .btn-primary,
html.high-contrast input.btn-primary[type="button"],
html.high-contrast input.btn-primary[type="submit"] {
    background-color: #0c54a0 !important;
    background: #0c54a0 !important;
    border: 0 !important;
    color: #fff !important;
}

html.high-contrast .registration-form .btn-primary:focus-visible,
html.high-contrast .home-registration-form .btn-primary:focus-visible,
html.high-contrast input.btn-primary[type="button"]:focus-visible,
html.high-contrast input.btn-primary[type="submit"]:focus-visible,
html.high-contrast #loginSubmitBtn:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

/* Contact Details — edit icon buttons */
html.high-contrast .contact-edit-btn,
html.high-contrast #mobileEditBtn,
html.high-contrast #emailEditBtn {
    border: 2px solid #fff !important;
}

html.high-contrast .contact-edit-btn:focus-visible,
html.high-contrast #mobileEditBtn:focus-visible,
html.high-contrast #emailEditBtn:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

html.high-contrast .reekyc-contact-modify .form-control:focus,
html.high-contrast .reekyc-contact-modify .form-control:focus-visible,
html.high-contrast .reekyc-contact-modify .form-select:focus,
html.high-contrast .reekyc-contact-modify .form-select:focus-visible,
html.high-contrast .reekyc-contact-modify select.form-control:focus-visible {
    box-shadow: none !important;
    border-color: #fff !important;
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
}

html.high-contrast .reekyc-contact-modify .btn-primary:focus-visible,
html.high-contrast .reekyc-contact-modify #getMobileOtp:focus-visible,
html.high-contrast .reekyc-contact-modify #getEmailOtp:focus-visible,
html.high-contrast .reekyc-contact-modify #verifyMobileotpbtn:focus-visible,
html.high-contrast .reekyc-contact-modify #verifyEmailotpbtn:focus-visible {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

html.high-contrast .home-registration-form .form-control:focus,
html.high-contrast .home-registration-form .form-control:focus-visible,
html.high-contrast .registration-form .form-control:focus,
html.high-contrast .registration-form .form-control:focus-visible {
    box-shadow: none !important;
    border-color: #fff !important;
    outline: 3px solid #ff0 !important;
    outline-offset: 2px;
}

html.high-contrast .nominee-status-alert {
    background-color: #000 !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}

html.high-contrast .nominee-status-alert .nominee-status-note {
    color: #fff !important;
}

/* Nominee only: Bootstrap .form-check-input radios (appearance:none) on black alert */
html.high-contrast .nominee-status-alert .form-check-input[type="radio"] {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    background-color: #000 !important;
    border: 2px solid #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    color: #fff !important;
    border-radius: 50%;
    -webkit-appearance: none;
    appearance: none;
}

html.high-contrast .nominee-status-alert .form-check-input[type="radio"]:checked {
    background-color: #ff0 !important;
    border-color: #ff0 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23000'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

html.high-contrast .app-accessibility-root .app-accessibility-panel-close,
html.high-contrast .app-accessibility-root .app-accessibility-panel-close span {
    color: #000 !important;
}
/* ----- High contrast: single registration card border (no nested box) ----- */
.reekyc-registration-heading {
    color: #002d7e;
    font-weight: 500;
}

html.high-contrast .reekyc-registration-heading {
    color: #fff !important;
}

html.high-contrast .home-registration-form {
    border: 2px solid #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    background-color: #000 !important;
    overflow: hidden;
}

html.high-contrast .registration-form {
    border: none !important;
    background-color: #000 !important;
    color: #fff !important;
}


@media(max-width:375px){
    .form-control.registration-input-box.nospecialchar{
        font-size:12px;
    }
}

/* Header tools: keep launcher in flow (prevents overlap with navbar toggler at 320–992px) */
.navbar-end-tools .app-accessibility-root .app-accessibility-launcher,
.landing-header-tools .app-accessibility-root .app-accessibility-launcher {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Legacy: partial at end of body — pin top-right (rightmost; toggler sits to its left in navbar) */
.app-accessibility-root--body-fallback {
    position: fixed !important;
    top: 0.625rem !important;
    right: 0.5rem !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 1030;
    width: 40px;
    height: 40px;
    pointer-events: none;
}

.app-accessibility-root--body-fallback .app-accessibility-launcher {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    .app-accessibility-root--body-fallback {
        top: 0.5rem !important;
        right: 0.5rem !important;
    }

    .app-accessibility-root--body-fallback .app-accessibility-launcher {
        width: 36px !important;
        height: 36px !important;
    }

    .app-accessibility-root--body-fallback .app-accessibility-launcher-img {
        width: 36px !important;
        height: 36px !important;
    }
}

/*@media(max-width:575px){
    .app-navbar-container{
        padding-top:10px;
        padding-bottom:10px;
    }
}*/

/* Steady accessibility UI: rem follows html text-size — use px inside .app-accessibility-root only */
.app-accessibility-root .app-accessibility-panel-header {
    padding: 8px 12px 4px !important;
    min-height: 32px !important;
}

.app-accessibility-root .app-accessibility-row-item {
    gap: 10px !important;
    padding: 8px 10px !important;
}

.app-accessibility-root .app-accessibility-text-size-buttons {
    gap: 4px !important;
}

.app-accessibility-root .app-accessibility-btn {
    min-width: 32px !important;
    padding: 6px 8px !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
}

.app-accessibility-root .app-accessibility-btn--selected:disabled {
    opacity: 1 !important;
    background: #00529c !important;
    color: #fff !important;
    cursor: default;
}

.app-accessibility-root .app-accessibility-panel-close {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.app-accessibility-root .app-accessibility-switch {
    width: 46px !important;
    height: 26px !important;
    border-radius: 16px !important;
}

.app-accessibility-root .app-accessibility-switch::after {
    width: 18px !important;
    height: 18px !important;
    left: 2px !important;
}

.app-accessibility-root .app-accessibility-switch:checked::after {
    transform: translate(24px, -50%) !important;
}

.app-accessibility-root .app-accessibility-hint.app-accessibility-tts-unsupported {
    padding: 0 16px 12px !important;
    margin: 0 !important;
}

.navbar-accessibility-slot .app-accessibility-root .app-accessibility-panel,
.landing-header-tools .app-accessibility-root .app-accessibility-panel,
.navbar-end-tools .app-accessibility-root .app-accessibility-panel,
.app-accessibility-placement-header .app-accessibility-root .app-accessibility-panel {
    top: 72px !important;
}

@media (max-width: 991.98px) {
    .navbar-accessibility-slot .app-accessibility-root .app-accessibility-panel,
    .landing-header-tools .app-accessibility-root .app-accessibility-panel {
        top: 64px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

@media (max-width: 576px) {
    .app-accessibility-root .app-accessibility-panel {
        top: 64px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .navbar-accessibility-slot .app-accessibility-root .app-accessibility-panel {
        top: 64px !important;
    }
}

/* When open: anchor panel under launcher (JS sets --app-accessibility-panel-*; overrides fixed 72px/64px above) */
html.app-accessibility-panel-open .app-accessibility-root .app-accessibility-panel,
html.app-accessibility-panel-open .navbar-accessibility-slot .app-accessibility-root .app-accessibility-panel,
html.app-accessibility-panel-open .navbar-end-tools .app-accessibility-root .app-accessibility-panel,
html.app-accessibility-panel-open .landing-header-tools .app-accessibility-root .app-accessibility-panel,
html.app-accessibility-panel-open .app-accessibility-placement-header .app-accessibility-root .app-accessibility-panel {
    top: var(--app-accessibility-panel-top) !important;
    right: var(--app-accessibility-panel-right, 80px) !important;
    left: auto !important;
    bottom: auto !important;
    max-height: var(--app-accessibility-panel-max-height, calc(100vh - 5rem)) !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: min(220px, calc(100vw - 16px)) !important;
    box-sizing: border-box !important;
}

@media (max-width: 575.98px) {
    html.app-accessibility-panel-open .app-accessibility-root .app-accessibility-panel,
    html.app-accessibility-panel-open .navbar-accessibility-slot .app-accessibility-root .app-accessibility-panel,
    html.app-accessibility-panel-open .navbar-end-tools .app-accessibility-root .app-accessibility-panel,
    html.app-accessibility-panel-open .landing-header-tools .app-accessibility-root .app-accessibility-panel,
    html.app-accessibility-panel-open .app-accessibility-placement-header .app-accessibility-root .app-accessibility-panel {
        width: 200px !important;
        min-width: 200px !important;
        max-width: min(200px, calc(100vw - 16px)) !important;
    }
}

.app-landing-navbar.sticky-sm-top {
    z-index: 1030;
}

/* Landing (pre-login): no user menu — hide empty collapse toggler if present */
.app-landing-navbar .navbar-end-tools .navbar-toggler {
    display: none !important;
}

@media (max-width: 991.98px) {
    .app-landing-navbar .app-navbar-container > .navbar-brand {
        max-width: calc(100% - 3rem);
    }
}