/* ------------------------------------------------------------------ */
/* Type                                                                */
/* ------------------------------------------------------------------ */

html,
body {
    font-family: var(--aa-font-body);
}

body {
    color: var(--aa-navy);
    background-color: var(--aa-gray-green);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.modal-title,
.font-stag-book,
.font-stag-medium {
    font-family: var(--aa-font-heading);
    font-weight: 700;
}

/* Stag Light marked secondary headings; Merriweather Regular keeps that step down. */
.font-stag-light {
    font-family: var(--aa-font-heading);
    font-weight: 400;
}

.font-open-sans,
.form-control,
input,
select,
textarea,
button {
    font-family: var(--aa-font-body);
}

.btn {
    font-family: var(--aa-font-body) !important;
}

/* The theme names Poppins on these directly rather than inheriting it. */
.tooltip,
.popover,
.swal2-popup {
    font-family: var(--aa-font-body);
}

/* Secondary text. Slate only passes contrast on White; on tints and Gray-Green use Teal. */
.aa-text-secondary {
    color: var(--aa-teal);
}

.aa-text-secondary--on-white {
    color: var(--aa-slate);
}

.aa-caps {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Theme and Bootstrap text utilities, moved onto the palette. */
.text-danger {
    color: var(--aa-action-red) !important;
}

.text-muted,
.text-secondary {
    color: var(--aa-slate) !important;
}

/* ------------------------------------------------------------------ */
/* Links                                                               */
/* ------------------------------------------------------------------ */

a {
    color: var(--aa-royal);
}

    a:hover,
    a:focus {
        color: var(--aa-navy);
    }

/* Inline links inside running text: Royal, bold, underlined. */
.aa-link {
    color: var(--aa-royal);
    font-weight: 700;
    text-decoration: underline;
}

    .aa-link:hover,
    .aa-link:focus {
        color: var(--aa-navy);
    }

/* Theme links (Forgot PIN? and others): Royal, Navy on hover. */
.m-link {
    color: var(--aa-royal);
}

    .m-link:hover,
    .m-link:focus {
        color: var(--aa-navy);
    }

        .m-link:hover:after {
            border-color: var(--aa-navy);
        }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

/* Primary: Royal with White text. */
.btn-primary,
.btn-info,
.btn-dashboard,
.btn-brand {
    background-color: var(--aa-royal);
    border-color: var(--aa-royal);
    color: var(--aa-white);
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary.active,
    .btn-primary:not(:disabled):not(.disabled):active,
    .btn-info:hover,
    .btn-info:focus,
    .btn-info:active,
    .btn-info.active,
    .btn-info:not(:disabled):not(.disabled):active,
    .btn-dashboard:hover,
    .btn-dashboard:focus,
    .btn-dashboard:active,
    .btn-dashboard:not(:disabled):not(.disabled):active,
    .btn-brand:hover,
    .btn-brand:focus,
    .btn-brand:active,
    .btn-brand:not(:disabled):not(.disabled):active {
        background-color: var(--aa-navy) !important;
        border-color: var(--aa-navy) !important;
        color: var(--aa-white) !important;
    }

    .btn-primary.disabled,
    .btn-primary:disabled,
    .btn-info.disabled,
    .btn-info:disabled,
    .btn-dashboard.disabled,
    .btn-dashboard:disabled {
        background-color: var(--aa-royal);
        border-color: var(--aa-royal);
        color: var(--aa-white);
    }

.btn-success {
    background-color: var(--aa-action-green);
    border-color: var(--aa-action-green);
    color: var(--aa-white);
}

    .btn-success:hover,
    .btn-success:focus,
    .btn-success:active,
    .btn-success.active,
    .btn-success:not(:disabled):not(.disabled):active {
        background-color: var(--aa-action-green-dark) !important;
        border-color: var(--aa-action-green-dark) !important;
        color: var(--aa-white) !important;
    }

.btn-danger {
    background-color: var(--aa-action-red);
    border-color: var(--aa-action-red);
    color: var(--aa-white);
}

    .btn-danger:hover,
    .btn-danger:focus,
    .btn-danger:active,
    .btn-danger.active,
    .btn-danger:not(:disabled):not(.disabled):active {
        background-color: var(--aa-action-red-dark) !important;
        border-color: var(--aa-action-red-dark) !important;
        color: var(--aa-white) !important;
    }

.btn-secondary,
.btn-secondary-alt,
.btn-outline-dark:not(.btn-info),
.btn-grey,
.btn-grey-alt {
    background-color: var(--aa-white);
    border: 1px solid var(--aa-button-border);
    color: var(--aa-navy);
}

    .btn-secondary:hover,
    .btn-secondary:focus,
    .btn-secondary:active,
    .btn-secondary.active,
    .btn-secondary:not(:disabled):not(.disabled):active,
    .btn-secondary-alt:hover,
    .btn-secondary-alt:focus,
    .btn-secondary-alt:active,
    .btn-secondary-alt:not(:disabled):not(.disabled):active,
    .btn-outline-dark:not(.btn-info):hover,
    .btn-outline-dark:not(.btn-info):focus,
    .btn-outline-dark:not(.btn-info):active,
    .btn-outline-dark:not(.btn-info):not(:disabled):not(.disabled):active,
    .btn-grey:hover,
    .btn-grey:focus,
    .btn-grey:active,
    .btn-grey.active,
    .btn-grey:not(:disabled):not(.disabled):active {
        background-color: var(--aa-pale-royal) !important;
        border-color: var(--aa-navy) !important;
        color: var(--aa-navy) !important;
    }

/* Outline buttons: Royal outline and label, Royal fill on hover. */
.btn-outline-info {
    background-color: var(--aa-white);
    border-color: var(--aa-royal);
    color: var(--aa-royal);
}

    .btn-outline-info:hover,
    .btn-outline-info:focus,
    .btn-outline-info:active,
    .btn-outline-info:not(:disabled):not(.disabled):active {
        background-color: var(--aa-royal) !important;
        border-color: var(--aa-royal) !important;
        color: var(--aa-white) !important;
    }

    /* btn-grey-alt is a toggle: its on state is the green action on state. */
    .btn-grey-alt:hover,
    .btn-grey-alt:focus,
    .btn-grey-alt:active,
    .btn-grey-alt.active,
    .btn-grey-alt:not(:disabled):not(.disabled):active {
        background-color: var(--aa-mint-tint) !important;
        border-color: var(--aa-action-green) !important;
        color: var(--aa-action-green) !important;
    }

/* Account menu entries. */
.btn-primary-alt {
    background-color: var(--aa-white);
    border-color: var(--aa-white);
    color: var(--aa-navy);
}

    .btn-primary-alt:hover,
    .btn-primary-alt:focus,
    .btn-primary-alt:active,
    .btn-primary-alt.active,
    .btn-primary-alt:not(:disabled):not(.disabled):active {
        background-color: var(--aa-royal);
        border-color: var(--aa-royal);
        color: var(--aa-white);
    }

.btn:focus,
.btn.focus {
    box-shadow: var(--aa-focus-ring) !important;
}

.bg-primary,
.bg-info {
    background-color: var(--aa-royal) !important;
}

.bg-dashboard {
    background-color: var(--aa-navy);
}

.text-info,
.m--font-brand {
    color: var(--aa-royal) !important;
}

/*
    Action buttons (Include, Remove, Edit, Delete, Save and Finish Later): White fill, Button
    border Gray, Navy label and a color-coded icon. The on state fills with the tint and turns
    the border, icon and label the action color. Add .is-on (or aria-pressed="true") for it.
*/
.aa-action-btn {
    align-items: center;
    background-color: var(--aa-white);
    border: 1px solid var(--aa-button-border);
    border-radius: 4px;
    color: var(--aa-navy);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--aa-font-body);
    font-size: 0.9rem;
    font-weight: 700;
    gap: 6px;
    line-height: 1.2;
    padding: 6px 12px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

    .aa-action-btn:hover,
    .aa-action-btn:focus {
        border-color: var(--aa-navy);
        color: var(--aa-navy);
        text-decoration: none;
    }

    .aa-action-btn:focus {
        box-shadow: var(--aa-focus-ring);
        outline: none;
    }

    .aa-action-btn .aa-action-btn__icon,
    .aa-action-btn--green .aa-action-btn__icon {
        color: var(--aa-action-green);
    }

    .aa-action-btn--red .aa-action-btn__icon {
        color: var(--aa-action-red);
    }

    .aa-action-btn--green.is-on,
    .aa-action-btn--green[aria-pressed="true"] {
        background-color: var(--aa-mint-tint);
        border-color: var(--aa-action-green);
        color: var(--aa-action-green);
    }

    .aa-action-btn--red.is-on,
    .aa-action-btn--red[aria-pressed="true"] {
        background-color: var(--aa-red-tint);
        border-color: var(--aa-action-red);
        color: var(--aa-action-red);
    }

/* Floating Help and Chat pill, and the step counter pill: Royal with White text. */
.aa-pill {
    align-items: center;
    background-color: var(--aa-royal);
    border: 0;
    border-radius: 999px;
    color: var(--aa-white);
    display: inline-flex;
    font-family: var(--aa-font-body);
    font-weight: 700;
    gap: 8px;
    line-height: 1;
    padding: 6px 14px;
}

/* ------------------------------------------------------------------ */
/* Forms                                                               */
/* ------------------------------------------------------------------ */

/* Input fields: Pale Royal fill, Input border, Navy text. */
.form-control {
    background-color: var(--aa-pale-royal);
    border: 1px solid var(--aa-input-border);
    color: var(--aa-navy);
}

    .form-control:focus {
        background-color: var(--aa-pale-royal);
        border-color: var(--aa-royal);
        box-shadow: var(--aa-focus-ring);
        color: var(--aa-navy);
    }

    .form-control::placeholder {
        color: var(--aa-teal);
        opacity: 1;
    }

    .form-control[readonly] {
        background-color: var(--aa-pale-royal);
    }

    .form-control:disabled {
        background-color: var(--aa-gray-green);
        color: var(--aa-navy);
        cursor: not-allowed;
    }

label,
.col-form-label {
    color: var(--aa-navy);
}

/* The theme sets portlet and checkbox text in grey; body text is Navy. */
.m-portlet .m-portlet__body,
.m-checkbox,
.m-radio {
    color: var(--aa-navy);
}

/* Selects: the theme and the Title Exam styles hide the native arrow, so draw a Navy chevron
   (site.css does the same for the pages that load it). */
select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23263B61' stroke-width='2' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 12px 8px;
}

    select.form-control:not([multiple]):not([size]) {
        padding-right: 36px;
    }

/* Inputs with the label inside the box (site.css): the box shows focus, not the bare input. */
.label-inner-input:focus-within {
    border-color: var(--aa-royal);
    box-shadow: var(--aa-focus-ring);
}

    .label-inner-input .m-input:focus,
    .label-inner-input .form-control:focus {
        background-color: transparent;
        box-shadow: none;
    }

.form-control::placeholder {
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Status fills from the theme, moved onto the action colors. */
.bg-success {
    background-color: var(--aa-action-green) !important;
}

.bg-danger {
    background-color: var(--aa-action-red) !important;
}

/* Search field: White, Navy border, Teal placeholder. */
.aa-search,
.dataTables_filter input {
    background-color: var(--aa-white);
    border: 1px solid var(--aa-navy);
    color: var(--aa-navy);
}

    .aa-search::placeholder,
    .dataTables_filter input::placeholder {
        color: var(--aa-teal);
        letter-spacing: 0.04em;
        opacity: 1;
        text-transform: uppercase;
    }

/* Theme checkboxes use the brand color; point it at Royal and the input border. */
.m-checkbox.m-checkbox--brand > span,
.m-checkbox.m-checkbox--state-brand > span {
    border-color: var(--aa-input-border);
}

    .m-checkbox.m-checkbox--brand > span:after,
    .m-checkbox.m-checkbox--state-brand > span:after,
    .m-checkbox.m-checkbox--brand > input:disabled ~ span:after {
        border-color: var(--aa-royal);
    }

.m-checkbox.m-checkbox--brand > input:checked ~ span,
.m-checkbox.m-checkbox--state-brand > input:checked ~ span {
    border-color: var(--aa-royal);
}

.m-checkbox.m-checkbox--brand.m-checkbox--solid > span {
    background: var(--aa-pale-royal);
    border: 1px solid var(--aa-input-border) !important;
}

    .m-checkbox.m-checkbox--brand.m-checkbox--solid > span:after {
        border-color: var(--aa-white);
    }

.m-checkbox.m-checkbox--brand.m-checkbox--solid > input:checked ~ span {
    background: var(--aa-royal);
    border-color: var(--aa-royal) !important;
}

/* ------------------------------------------------------------------ */
/* Tables, pagination, dialogs                                         */
/* ------------------------------------------------------------------ */

.table {
    color: var(--aa-navy);
}

    .table thead th {
        color: var(--aa-navy);
        font-weight: 700;
    }

    .table th,
    .table td,
    .table thead th {
        border-color: var(--aa-divider);
    }

.page-link,
.dataTables_wrapper .pagination .page-item > .page-link {
    border-color: var(--aa-divider);
    color: var(--aa-royal);
}

    .page-link:hover,
    .dataTables_wrapper .pagination .page-item:hover > .page-link {
        background: var(--aa-pale-royal);
        border-color: var(--aa-divider);
        color: var(--aa-navy);
    }

.page-item.active .page-link,
.dataTables_wrapper .pagination .page-item.active > .page-link {
    background: var(--aa-royal);
    border-color: var(--aa-royal);
    color: var(--aa-white);
}

.page-item.disabled .page-link,
.dataTables_wrapper .pagination .page-item.disabled > .page-link {
    background: var(--aa-white);
    color: var(--aa-slate);
}

/* SweetAlert: Royal confirm, action-button cancel. Calls that pass confirmButtonColor still
   set their own inline color. */
.swal2-popup .swal2-title {
    color: var(--aa-navy);
    font-family: var(--aa-font-heading);
}

.swal2-popup .swal2-content {
    color: var(--aa-navy);
}

.swal2-popup .swal2-styled.swal2-confirm {
    background-color: var(--aa-royal);
}

.swal2-popup .swal2-styled.swal2-cancel {
    background-color: var(--aa-white);
    border: 1px solid var(--aa-button-border);
    color: var(--aa-navy);
}

.swal2-popup .swal2-styled:focus {
    box-shadow: var(--aa-focus-ring);
}

/* Solid theme alerts put White text on light fills; use the palette tints with dark text
   instead. Outline alerts keep the theme's look. */
.alert-success:not(.m-alert--outline) {
    background-color: var(--aa-mint-tint);
    border-color: var(--aa-action-green);
    color: var(--aa-action-green);
}

.alert-danger:not(.m-alert--outline) {
    background-color: var(--aa-red-tint);
    border-color: var(--aa-action-red);
    color: var(--aa-action-red);
}

.alert-info:not(.m-alert--outline) {
    background-color: var(--aa-royal-tint);
    border-color: var(--aa-royal-tint);
    border-left: 4px solid var(--aa-royal);
    color: var(--aa-navy);
}

.alert-warning:not(.m-alert--outline) {
    background-color: var(--aa-red-tint);
    border-color: var(--aa-red-tint);
    border-left: 4px solid var(--aa-action-red);
    color: var(--aa-navy);
}

    .alert-success:not(.m-alert--outline) .close,
    .alert-danger:not(.m-alert--outline) .close,
    .alert-info:not(.m-alert--outline) .close,
    .alert-warning:not(.m-alert--outline) .close {
        color: inherit;
    }

/* The search icon artwork is black; masking it lets it take Navy. */
i.custom-search-icon {
    background-color: var(--aa-navy) !important;
    background-image: none !important;
    -webkit-mask: url('/images/custom/Magnifying-glass.png') no-repeat left center / 18px auto;
    mask: url('/images/custom/Magnifying-glass.png') no-repeat left center / 18px auto;
}

/* ------------------------------------------------------------------ */
/* Tags, numbered circles, cards                                       */
/* ------------------------------------------------------------------ */

/* Tags (ADDITIONAL): Mint with Navy text, all caps. */
.aa-tag {
    background-color: var(--aa-mint);
    border-radius: 999px;
    color: var(--aa-navy);
    display: inline-block;
    font-family: var(--aa-font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    padding: 4px 9px;
    text-transform: uppercase;
}

/* Numbered item circles: Royal with White numerals. */
.aa-number {
    align-items: center;
    background-color: var(--aa-royal);
    border-radius: 50%;
    color: var(--aa-white);
    display: inline-flex;
    flex: 0 0 auto;
    font-family: var(--aa-font-body);
    font-size: 0.8rem;
    font-weight: 700;
    height: 24px;
    justify-content: center;
    line-height: 1;
    width: 24px;
}

/* Content cards and panels are White on the Gray-Green page. */
.aa-card {
    background-color: var(--aa-white);
    border-radius: var(--aa-radius);
    color: var(--aa-navy);
}

/* Navy panel with the Light Mint to Royal radial gradient in its top-left corner. Light Mint
   holds to 21%, blends to Royal at 84% and reaches Navy at 100%. Set --aa-gradient-radius to
   about 90% of the Welcome card's width, or about a third of the Request for Clearance
   header's width. Keep text off the Light Mint corner. */
.aa-gradient-panel {
    --aa-gradient-radius: 270px;
    background-color: var(--aa-navy);
    background-image: radial-gradient(circle var(--aa-gradient-radius) at 0 0,
        var(--aa-light-mint) 0%,
        var(--aa-light-mint) 21%,
        var(--aa-royal) 84%,
        var(--aa-navy) 100%);
    background-repeat: no-repeat;
    color: var(--aa-white);
}

/* ------------------------------------------------------------------ */
/* Scrollbar: Divider Gray track, Teal thumb                           */
/* ------------------------------------------------------------------ */

html {
    scrollbar-color: var(--aa-teal) var(--aa-divider);
}

::-webkit-scrollbar-track {
    background: var(--aa-divider);
    box-shadow: none;
}

::-webkit-scrollbar-thumb {
    background: var(--aa-teal);
    border: 3px solid var(--aa-divider);
    border-radius: 8px;
    outline: none;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--aa-navy);
    }

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

/*
    One White bar: logo, nav, the signed-in user, social links, User Settings and Notification
    Settings, with the 8.6pt Teal rule underneath. The current destination is omitted;
    links back to the current section use a dark fill with White labels and icons.
*/
.aa-header.m-header {
    background-color: var(--aa-white);
    box-shadow: none;
}

    .aa-header.m-header::after {
        background-color: var(--aa-teal);
        content: "";
        height: var(--aa-header-rule);
        left: 0;
        pointer-events: none;
        position: absolute;
        right: 0;
        top: 100%;
    }

    .aa-header .m-header__top {
        background-color: var(--aa-white);
    }

    .aa-header .m-brand {
        background-color: var(--aa-white);
    }

    .aa-header .m-brand__logo-wrapper {
        align-items: center;
        display: flex;
        height: 52px;
    }

        .aa-header .m-brand__logo-wrapper img {
            display: block;
            height: 100%;
            width: auto;
        }

/* Nav icons are white artwork; masking them lets them take the text color. */
.aa-header i.m-menu__link-icon[class*="custom-"] {
    background-color: currentColor !important;
    background-image: none !important;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.aa-header i.custom-home {
    -webkit-mask-image: url('/images/custom/Home.png');
    mask-image: url('/images/custom/Home.png');
}

.aa-header i.custom-order {
    -webkit-mask-image: url('/images/custom/Order.png');
    mask-image: url('/images/custom/Order.png');
}

.aa-header i.custom-document {
    -webkit-mask-image: url('/images/custom/cloud-document.png');
    mask-image: url('/images/custom/cloud-document.png');
}

.aa-header i.custom-schedule {
    -webkit-mask-image: url('/images/custom/Schedule_Closing.png');
    mask-image: url('/images/custom/Schedule_Closing.png');
}

.aa-header i.custom-clearance-2 {
    -webkit-mask-image: url('/images/custom/clearance-check-white.png');
    mask-image: url('/images/custom/clearance-check-white.png');
}

/* Signed-in user: Navy name, Slate account number (White background only). */
.aa-header__account {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.25;
    text-align: right;
}

.aa-header__username {
    color: var(--aa-navy);
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.aa-header__member {
    color: var(--aa-slate);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Social icons: Teal circle, White mark. */
.aa-header__social {
    align-items: center;
    display: flex;
    gap: 8px;
}

.aa-social-link {
    align-items: center;
    background-color: var(--aa-teal);
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    height: 34px;
    justify-content: center;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    width: 34px;
}

    .aa-social-link:hover,
    .aa-social-link:focus {
        background-color: var(--aa-navy);
    }

    .aa-social-link:focus {
        box-shadow: var(--aa-focus-ring);
        outline: none;
    }

    .aa-social-link i {
        color: var(--aa-white);
        font-size: 16px;
        line-height: 1;
    }

    .aa-social-link img {
        display: block;
        height: 18px;
        width: auto;
    }

/* User Settings: user photo, or a Divider Gray circle with the Navy first initial. */
.aa-avatar {
    align-items: center;
    background-color: var(--aa-divider);
    border-radius: 50%;
    color: var(--aa-navy);
    display: flex;
    font-family: var(--aa-font-body);
    font-size: 1.05rem;
    font-weight: 700;
    height: 41px;
    justify-content: center;
    margin: 0 auto;
    width: 41px;
}

/* Notification Settings: Navy circle, White bell. */
.header-utility__icon {
    background-color: var(--aa-navy);
    color: var(--aa-white);
}

.header-utility__label {
    color: var(--aa-navy);
    font-family: var(--aa-font-body);
}

.header-utility__link:hover,
.header-utility__link:focus,
.header-utility__user-link:hover .header-utility__control,
.header-utility__user-link:focus .header-utility__control {
    background-color: var(--aa-pale-royal);
}

.header-utility__link:focus,
.header-utility__user-link:focus .header-utility__control {
    box-shadow: var(--aa-focus-ring);
}

@media (min-width: 1025px) {
    body.m-header--fixed .m-body {
        padding-top: calc(var(--aa-header-height) + var(--aa-header-rule)) !important;
    }

    .aa-header .m-header__top {
        height: var(--aa-header-height);
    }

        /* The theme lays the header out as table cells; a flex row lets the nav take the
           space between the logo and the user tools. */
        .aa-header .m-header__top > .m-container > .m-stack {
            align-items: stretch;
            display: flex;
            height: 100%;
        }

            .aa-header .m-header__top > .m-container > .m-stack > .m-stack__item {
                align-items: center;
                display: flex;
                height: 100%;
            }

    .aa-header .m-brand {
        flex: 0 0 auto;
        padding: 0 32px 0 0;
        width: auto;
    }

    /* The theme's fluid stack item is width: 100%, which would push the user tools out of the
       bar; let it grow into the free space and shrink no further than its links. */
    #m_header.aa-header .aa-header__nav {
        flex: 1 1 auto;
        width: auto;
    }

    /* The id outranks site.css, which paints the tablet/phone off-canvas panel Navy. */
    #m_header.aa-header .m-header-menu {
        background: transparent !important;
        display: flex;
        height: 100%;
        margin: 0;
        padding-left: 24px;
        width: auto;
    }

        #m_header.aa-header .m-header-menu .m-menu__nav {
            align-items: stretch;
            display: flex;
            height: 100%;
        }

            #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item {
                align-items: center;
                display: flex;
                height: 100%;
                padding: 0 14px;
                position: relative;
            }

                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item:first-child {
                    padding-left: 0;
                }

                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link {
                    align-items: center;
                    background: transparent !important;
                    display: flex;
                    gap: 6px;
                    height: auto;
                    padding: 8px 0;
                }

                    #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link .m-menu__link-icon {
                        color: var(--aa-navy) !important;
                        flex: 0 0 auto;
                        height: 20px !important;
                        width: 20px !important;
                    }

                    /* The theme sizes the label as a full-height table cell, which pins the text
                       to the top of the bar. */
                    #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link .m-menu__link-text {
                        color: var(--aa-navy) !important;
                        display: block;
                        font-family: var(--aa-font-body);
                        font-size: 15px !important;
                        font-weight: 700;
                        height: auto;
                        line-height: 1.2;
                        white-space: nowrap;
                        width: auto;
                    }

                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link:hover .m-menu__link-text,
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link:focus .m-menu__link-text,
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link:hover .m-menu__link-icon,
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link:focus .m-menu__link-icon {
                    color: var(--aa-royal) !important;
                }

                /* A solid dark selection stays clear even while hovered or focused. */
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item.m-menu__item--active > .m-menu__link,
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item.m-menu__item--expanded > .m-menu__link {
                    background: var(--aa-navy) !important;
                    border-radius: 2px;
                    box-shadow: 0 0 0 6px var(--aa-navy);
                    outline: 2px solid var(--aa-navy) !important;
                    outline-offset: 6px;
                }

                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item.m-menu__item--active > .m-menu__link .m-menu__link-text,
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item.m-menu__item--active > .m-menu__link .m-menu__link-icon,
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item.m-menu__item--expanded > .m-menu__link .m-menu__link-text,
                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item.m-menu__item--expanded > .m-menu__link .m-menu__link-icon {
                    color: var(--aa-white) !important;
                }

                #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link:focus {
                    outline: 3px solid var(--aa-navy) !important;
                    outline-offset: 10px;
                }

                #m_header.aa-header .m-header-menu .m-menu__item-here {
                    display: none;
                }

    .aa-header .aa-header__tools {
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* The theme makes the topbar a table and its items inline blocks pinned to the top; the
       id keeps these flex rules ahead of those. */
    #m_header.aa-header #m_header_topbar.m-topbar {
        display: flex;
        float: none;
        height: 100%;
    }

    #m_header.aa-header .m-topbar__nav-wrapper {
        display: flex;
        height: 100%;
    }

    #m_header.aa-header .m-topbar .m-topbar__nav.m-nav {
        align-items: center;
        display: flex;
        gap: 4px;
        height: 100%;
        margin: 0;
    }

        #m_header.aa-header .m-topbar .m-topbar__nav.m-nav > .m-nav__item {
            align-items: center;
            display: flex;
            height: 100%;
            padding: 0 4px;
        }

            #m_header.aa-header .m-topbar .m-topbar__nav.m-nav > .m-nav__item.aa-header__account {
                align-items: flex-end;
                flex-direction: column;
                justify-content: center;
                padding-right: 12px;
            }

            #m_header.aa-header .m-topbar .m-topbar__nav.m-nav > .m-nav__item.aa-header__social {
                padding-right: 10px;
            }
}

/* Laptops: tighten the nav and drop the social links before anything collides. */
@media (min-width: 1025px) and (max-width: 1480px) {
    .aa-header .m-brand {
        padding-right: 20px;
    }

    .aa-header .m-brand__logo-wrapper {
        height: 44px;
    }

    #m_header.aa-header .m-header-menu {
        padding-left: 16px;
    }

    #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item {
        padding: 0 9px;
    }

        #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item > .m-menu__link .m-menu__link-text {
            font-size: 14px !important;
        }

    #m_header.aa-header .m-topbar .m-topbar__nav.m-nav > .m-nav__item.aa-header__social {
        display: none;
    }
}

/* Small laptops: the avatar initial stands in for the name. */
@media (min-width: 1025px) and (max-width: 1200px) {
    #m_header.aa-header .m-topbar .m-topbar__nav.m-nav > .m-nav__item.aa-header__account {
        display: none;
    }

    #m_header.aa-header .m-header-menu .m-menu__nav > .m-menu__item {
        padding: 0 7px;
    }
}

@media (max-width: 1024px) {
    body.m-header--fixed-mobile .m-body {
        padding-top: calc(70px + 6px) !important;
    }

    .aa-header.m-header::after {
        height: 6px;
    }

    /* The topbar slides down under the header on tablet and phone; move the rule below it. */
    .m-topbar--on .aa-header.m-header::after {
        top: calc(100% + 50px);
    }

    .aa-header .m-brand__logo-wrapper {
        height: 44px;
    }

    .aa-header #m_header_topbar,
    .aa-header #m_header_topbar.m-topbar {
        background: var(--aa-white) !important;
    }

    .aa-header .m-topbar .m-topbar__nav.m-nav {
        align-items: center;
        display: flex;
        gap: 4px;
        height: 50px;
        justify-content: flex-end;
        margin: 0;
    }

    .aa-header .header-utility__label {
        color: var(--aa-navy);
    }

    .aa-header .aa-header__account {
        padding-right: 8px;
    }

    .aa-header .aa-avatar {
        font-size: 0.85rem;
        height: 31px;
        width: 31px;
    }

    .aa-header .aa-social-link {
        height: 30px;
        width: 30px;
    }

    /* A dark selected row with a thick White boundary stands out on the Navy panel. */
    .aa-header .m-aside-header-menu-mobile,
    .aa-header .m-aside-header-menu-mobile.m-aside-header-menu-mobile--skin-light {
        background-color: var(--aa-navy) !important;
    }

        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item > .m-menu__link .m-menu__link-text,
        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item > .m-menu__link .m-menu__link-icon {
            color: var(--aa-white) !important;
        }

        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item > .m-menu__link .m-menu__link-text {
            font-family: var(--aa-font-body);
            font-weight: 700;
        }

        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item > .m-menu__link .m-menu__link-icon {
            height: 20px !important;
            margin-right: 10px;
            width: 20px !important;
        }

        .aa-header .m-aside-header-menu-mobile.m-aside-header-menu-mobile--skin-light .m-menu__nav > .m-menu__item:not(.m-menu__item--parent):not(.m-menu__item--open):not(.m-menu__item--expanded):not(.m-menu__item--active):hover > .m-menu__link {
            background-color: var(--aa-teal) !important;
        }

        .aa-header .m-aside-header-menu-mobile.m-aside-header-menu-mobile--skin-light .m-menu__nav > .m-menu__item.m-menu__item--active > .m-menu__link,
        .aa-header .m-aside-header-menu-mobile.m-aside-header-menu-mobile--skin-light .m-menu__nav > .m-menu__item.m-menu__item--expanded > .m-menu__link {
            background-color: var(--aa-black) !important;
            box-shadow: inset 0 0 0 3px var(--aa-white);
        }

        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item.m-menu__item--active > .m-menu__link .m-menu__link-text,
        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item.m-menu__item--active > .m-menu__link .m-menu__link-icon,
        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item.m-menu__item--expanded > .m-menu__link .m-menu__link-text,
        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item.m-menu__item--expanded > .m-menu__link .m-menu__link-icon {
            color: var(--aa-white) !important;
        }

        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item > .m-menu__link:focus {
            outline: 3px solid var(--aa-white) !important;
            outline-offset: -3px;
        }

        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item.m-menu__item--active > .m-menu__link:focus,
        .aa-header .m-aside-header-menu-mobile .m-menu__nav > .m-menu__item.m-menu__item--expanded > .m-menu__link:focus {
            outline-offset: -7px;
        }

        .aa-header .m-aside-header-menu-mobile .m-menu__item-here {
            display: none;
        }
}

@media (max-width: 768px) {
    .aa-header .aa-header__social {
        display: none;
    }
}

@media (max-width: 600px) {
    .aa-header .aa-header__account {
        display: none;
    }
}

/* ------------------------------------------------------------------ */
/* Help (guided tour launcher): Royal pill in the header               */
/* ------------------------------------------------------------------ */

/* On desktop the guided-tour script moves its launcher into #guided-tour-header-slot, just
   before the social links; guided-tour.css draws the Royal pill. Keep the slot out of the
   row while it is empty. */
#m_header.aa-header .m-topbar .m-topbar__nav.m-nav > #guided-tour-header-slot:empty {
    display: none;
}

/* Below wide screens show only the "?" circle (main and Title Exam headers); the button's
   aria-label still names the tour. */
@media (min-width: 1025px) and (max-width: 1599px) {
    #guided-tour-header-slot .guided-tour-launcher {
        padding: 7px;
    }

        #guided-tour-header-slot .guided-tour-launcher > span:not(.guided-tour-launcher__icon) {
            display: none;
        }
}

/* Sign-in, registration and account pages: the stacked AdvocusArrow logo, sized by height
   because the wordmark is much wider than the old square logo. */
img.signin-screen-logo {
    height: 64px;
    margin: 2rem 0;
    max-width: 100%;
    width: auto;
}

/* ------------------------------------------------------------------ */
/* Footer: White, Black text                                           */
/* ------------------------------------------------------------------ */

#footer {
    background-color: var(--aa-white);
    color: var(--aa-black);
    font-family: var(--aa-font-body);
    font-size: 13px;
}
