.ht-mobile-menu,
.ht-brand-short,
.ht-toggle-close { display: none; }
.ht-apps-toggle { color: #fff; }
.ht-toggle-icon { width: 20px; height: 20px; vertical-align: middle; }

/* Match the existing navigation's 1000px collapse breakpoint. */
@media (max-width: 999px) {
    body { padding-top: 68px; }
    .ht-site-nav {
        position: static;
        min-height: 0;
        margin-bottom: 0;
        border: 0;
        background: #f3f5fa;
    }
    .ht-site-nav > .container { width: 100%; padding: 0; }
    .ht-site-nav .ht-nav-header {
        position: fixed;
        z-index: 1030;
        inset: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 68px;
        padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
        border-bottom: 1px solid #e8ecf3;
        background: #fff;
    }
    .ht-site-nav .navbar-brand {
        order: -1;
        height: auto;
        padding: 0;
        margin: 0;
        color: #24324b;
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
        letter-spacing: .3px;
    }
    .ht-site-nav .navbar-brand:hover,
    .ht-site-nav .navbar-brand:focus { color: #355fc6; }
    .ht-brand-full,
    .ht-site-nav .ht-desktop-menu { display: none; }
    .ht-brand-short { display: flex; align-items: center; gap: 10px; }
    .ht-brand-mark {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 11px;
        color: #fff;
        background: #4268d5;
        box-shadow: 0 4px 8px #4268d526;
    }
    .ht-brand-mark svg { width: 24px; height: 24px; }
    .ht-site-nav .ht-apps-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 76px;
        min-height: 44px;
        margin: 0;
        padding: 10px 12px;
        border: 1px solid #e5eaf4;
        border-radius: 14px;
        background: #f7f9fd;
        color: #53617a;
        font-size: 13px;
        font-weight: 500;
    }
    .ht-site-nav .ht-apps-toggle:hover,
    .ht-site-nav .ht-apps-toggle:focus,
    .ht-site-nav .ht-apps-toggle[aria-expanded="true"] {
        border-color: #dbe4fa;
        background: #edf2ff;
        color: #4268d5;
    }
    .ht-apps-toggle[aria-expanded="true"] .ht-toggle-grid { display: none; }
    .ht-apps-toggle[aria-expanded="true"] .ht-toggle-close { display: block; }
    .ht-site-nav #ht-primary-nav {
        width: 100%;
        max-width: 880px;
        max-height: none;
        margin: 0 auto;
        padding: 0 18px;
        border: 0;
        box-shadow: none;
    }
    .ht-site-nav #ht-primary-nav.in { overflow: visible; }
    .ht-mobile-menu { display: block; padding: 26px 0 8px; }
    .ht-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 4px 24px; }
    .ht-menu-eyebrow { color: #7b89a3; font-size: 10px; font-weight: 500; letter-spacing: 1.5px; }
    .ht-mobile-menu-title { margin: 8px 0; color: #24324b; font-size: 26px; line-height: 1.25; font-weight: 600; letter-spacing: .5px; }
    .ht-menu-subtitle { margin: 0; color: #7c899e; font-size: 12px; line-height: 20px; }
    .ht-menu-illustration { flex: 0 0 76px; color: #5277d9; }
    .ht-menu-illustration svg { display: block; width: 76px; height: 76px; }

    .ht-tone-blue { --app-color: #426dd2; --app-tint: #edf3ff; --app-border: #dce7fd; }
    .ht-tone-teal { --app-color: #268c88; --app-tint: #eaf7f4; --app-border: #d7eeea; }
    .ht-tone-violet { --app-color: #8362c4; --app-tint: #f3effb; --app-border: #e8dff8; }
    .ht-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 6px; }
    .ht-app-group {
        margin: 16px 0 0;
        padding: 19px 12px 16px;
        border: 1px solid #e8ecf3;
        border-radius: 22px;
        background: #fff;
        box-shadow: 0 3px 12px #273d6504;
    }
    .ht-app-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 6px 20px; }
    .ht-app-group-title { display: flex; align-items: center; gap: 8px; margin: 0; color: #33415a; font-size: 14px; font-weight: 600; line-height: 22px; }
    .ht-app-group-title::before { content: ""; width: 4px; height: 13px; border-radius: 3px; background: var(--app-color); }
    .ht-app-group-count { color: #8793a6; font-size: 11px; white-space: nowrap; }
    .ht-app-group .ht-app-group { box-shadow: none; border-radius: 16px; }
    .ht-app-tile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        min-width: 0;
        min-height: 94px;
        padding: 4px 2px;
        border-radius: 16px;
        color: #45536c;
        text-align: center;
        text-decoration: none;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: background-color .16s ease, transform .16s ease;
    }
    .ht-app-icon {
        position: relative;
        display: grid;
        place-items: center;
        flex-shrink: 0;
        width: 50px;
        height: 50px;
        border: 1px solid var(--app-border);
        border-radius: 16px;
        background: var(--app-tint);
        color: var(--app-color);
        box-shadow: inset 0 1px 0 #ffffffd9;
    }
    .ht-app-icon svg { width: 26px; height: 26px; }
    .ht-app-label { max-width: 100%; font-size: 12px; font-weight: 500; line-height: 19px; overflow-wrap: anywhere; }
    .ht-app-tile:hover,
    .ht-app-tile:focus { color: var(--app-color); background: var(--app-tint); text-decoration: none; }
    .ht-app-tile:active { transform: scale(.96); }
    .ht-app-tile[aria-current="page"] .ht-app-icon { color: #fff; border-color: var(--app-color); background: var(--app-color); box-shadow: 0 4px 10px #426dd222; }
    .ht-app-tile:focus-visible,
    .ht-site-nav .ht-apps-toggle:focus-visible,
    .ht-site-nav .navbar-brand:focus-visible { outline: 2px solid #426dd2; outline-offset: 3px; }
    .ht-app-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
    .ht-app-shortcuts > .ht-app-tile {
        position: relative;
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        min-height: 78px;
        padding: 14px 10px;
        border: 1px solid #e4eaf5;
        border-radius: 18px;
        background: #fff;
        text-align: left;
    }
    .ht-app-shortcuts .ht-app-icon { width: 40px; height: 40px; border-radius: 13px; }
    .ht-app-shortcuts .ht-app-icon svg { width: 22px; height: 22px; }
    .ht-app-shortcuts .ht-app-label { flex: 1; color: #33415a; font-size: 12px; }
    .ht-shortcut-arrow { width: 12px; height: 12px; flex-shrink: 0; color: #9aa7bc; }
    .ht-app-shortcuts > .ht-app-tile:hover,
    .ht-app-shortcuts > .ht-app-tile:focus { background: var(--app-tint); border-color: var(--app-border); }
    .ht-site-nav #logoutForm { float: none !important; margin: 0; }
    .ht-site-nav #ht-primary-nav > .navbar-nav,
    .ht-site-nav #logoutForm > .navbar-nav {
        float: none !important;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        margin: 0;
        padding: 12px 4px 24px;
    }
    .ht-site-nav #ht-primary-nav > .ht-desktop-menu { display: none; }
    .ht-site-nav #ht-primary-nav > .navbar-nav > li,
    .ht-site-nav #logoutForm > .navbar-nav > li { min-width: 0; }
    .ht-site-nav #logoutForm > .navbar-nav > li:first-child { flex: 1; }
    .ht-site-nav #ht-primary-nav > .navbar-nav > li > a,
    .ht-site-nav #logoutForm > .navbar-nav > li > a { min-height: 44px; padding: 12px 8px; border-radius: 10px; color: #718097; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
    .ht-site-nav #ht-primary-nav > .navbar-nav > li > a:hover,
    .ht-site-nav #ht-primary-nav > .navbar-nav > li > a:focus,
    .ht-site-nav #logoutForm > .navbar-nav > li > a:hover,
    .ht-site-nav #logoutForm > .navbar-nav > li > a:focus { color: #426dd2; background: #e8eefb; }
    .body-content .btn-toolbar { top: 68px; }
}
@media (max-width: 359px) {
    .ht-site-nav #ht-primary-nav { padding: 0 12px; }
    .ht-app-shortcuts > .ht-app-tile { gap: 8px; padding: 12px 8px; }
    .ht-shortcut-arrow { display: none; }
    .ht-app-group { padding-right: 8px; padding-left: 8px; }
}
@media (min-width: 600px) and (max-width: 799px) {
    .ht-app-group > .ht-app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 800px) and (max-width: 999px) {
    .ht-app-group > .ht-app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .ht-app-tile { transition: none; }
}
