/* ==========================================================================
   The site shell (TOC Register Redesign v4 desktop, Mobile v1).
   Sidebar and header from 992px; header, bottom tabs and sheets below that.
   Loaded after styles.css. Everything is scoped to body.shell, and the
   elements the page scripts fill (.mainMenuBar, .mainMenuBarAppStyle,
   #syncContainer, #storageEstimate, .maintenance, .beta-label-container)
   keep their names, so the scripts are unchanged.
   ========================================================================== */

:root {
    /* The designs' colours. --main-color is what the existing pages already use for buttons and headings. */
    --main-color: var(--brand-navy);
    --shell-navy: var(--brand-navy);
    --shell-accent: var(--brand-yellow);
    --shell-accent-hover: var(--brand-yellow-hover);
    --shell-page: #121131;
    --shell-sidebar: #1a1946;
    --shell-header: #141337;
    --shell-surface: #1c1b4a;
    --shell-border: #2a2863;
    --shell-border-strong: #3a3880;
    --shell-text: #ffffff;
    --shell-text-muted: #a6a5cf;
    --shell-text-dim: #7c7bab;
    --shell-content: #ffffff;
    --shell-success-bg: #d9f5e6;
    --shell-success-text: #146c43;
    --shell-sidebar-width: 252px;
    --shell-header-height: 76px;
    --shell-tabs-height: 64px;
    --shell-font: "Lato", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body.shell {
    margin: 0;
    min-height: 100vh;
    overflow-y: visible;
    background: var(--shell-page);
    font-family: var(--shell-font) !important;
}

/* ---- Sync message: at the very top, above the navigation; only with Edit Assets -------------------------- */

/* Hidden until shell.js has confirmed the user holds Edit Assets. The page scripts still fill it and show or
   hide it for their own reasons; without the permission it never displays, wherever a script has moved it. */
body.shell:not(.shell-can-sync) #syncContainer,
body.shell:not(.shell-can-sync) #syncStatusContainer,
body.shell:not(.shell-can-sync) #syncStatusProgress {
    display: none !important;
}

body.shell #syncContainer {
    position: relative;
    z-index: auto;
    width: 100%;
    background: #fff;
}

/* 2.0.194: the offline bar and the sync message stay at the top of the window when the page scrolls. Their height is
   --shell-top-offset (connectionStatus.js), so the sticky header and sidebar sit just below them. An opened sync list
   is kept to half the window and scrolls inside. */
body.shell .shell-topbars {
    position: sticky;
    top: 0;
    z-index: 3001;
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
}

body.shell .shell-offline-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--brand-navy);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

    body.shell .shell-offline-bar[hidden] {
        display: none;
    }

body.shell #syncStatusContainer {
    z-index: auto;
}

.shell-frame {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

/* ---- Sidebar (992px and up) ------------------------------------------- */

.shell-sidebar {
    display: none;
    flex: none;
    width: var(--shell-sidebar-width);
    background: var(--shell-sidebar);
    border-right: 1px solid var(--shell-border);
    color: var(--shell-text);
    position: sticky;
    top: var(--shell-top-offset, 0px); /* 0 unless something sits above the shell (the test banner does) */
    align-self: flex-start;
    height: calc(100vh - var(--shell-top-offset, 0px));
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
}

.shell-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--shell-border);
    min-height: var(--shell-header-height);
}

.shell-brand__logo {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

    .shell-brand__logo img {
        max-width: 100%;
        max-height: 100%;
        display: block;
    }

.shell-brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shell-brand__name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    color: var(--shell-text);
}

.shell-brand__strapline {
    font-size: 12px;
    line-height: 1.3;
    color: var(--shell-text-muted);
}

/* The page script fills .mainMenuBar with the site's logo, its name and the menu. */
body.shell .mainMenuBar {
    width: auto;
    min-width: 0;
    min-height: 0;
    border-right: none;
    padding: 0;
    text-align: left;
}

    body.shell .mainMenuBar .logoContainer {
        width: auto;
        margin: 14px 12px 4px;
        padding: 10px 12px;
        border-radius: 10px;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.shell .mainMenuBar .logo {
        display: block;
        width: 100%;
        max-height: 56px;
        object-fit: contain;
        padding: 0;
    }

    /* The site's name is on its logo; kept for screen readers. */
    body.shell .mainMenuBar h1.tocName {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

body.shell .shell-sidebar ul.mainMenu,
body.shell .shell-sidebar ul.shell-admin {
    list-style: none;
    margin: 0;
    padding: 6px 12px 0;
}

body.shell .shell-sidebar ul.shell-admin {
    padding-bottom: 18px;
}

    body.shell .shell-sidebar ul.mainMenu > li,
    body.shell .shell-sidebar ul.shell-admin > li {
        width: auto;
        margin: 0 0 2px;
        text-align: left;
        position: relative;
    }

body.shell .shell-group-label {
    padding: 18px 8px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--shell-text-dim);
    line-height: 1.2;
}

body.shell .shell-sidebar a.navButton,
body.shell .shell-sidebar .shell-admin a,
body.shell .shell-sidebar .shell-admin button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #d6d5f0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    box-shadow: none;
    white-space: normal;
}

    body.shell .shell-sidebar a.navButton:hover,
    body.shell .shell-sidebar a.navButton:focus-visible,
    body.shell .shell-sidebar .shell-admin a:hover,
    body.shell .shell-sidebar .shell-admin a:focus-visible,
    body.shell .shell-sidebar .shell-admin button:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
        border-bottom: none;
        outline: none;
    }

    body.shell .shell-sidebar a.navButton.active,
    body.shell .shell-sidebar .shell-admin a.active {
        background: var(--shell-navy);
        color: #fff;
        border-left-color: var(--shell-accent);
        border-radius: 0 8px 8px 0;
    }

    body.shell .shell-sidebar a.navButton .menuIcon,
    body.shell .shell-sidebar .shell-admin i {
        flex: none;
        width: 18px;
        padding: 0;
        font-size: 14px;
        text-align: center;
        color: #8f8ebd;
    }

    body.shell .shell-sidebar a.navButton.active .menuIcon,
    body.shell .shell-sidebar .shell-admin a.active i {
        color: var(--shell-accent);
    }

body.shell .navButton .newbadge,
body.shell .navButton .newbadgeMobile {
    position: static;
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--shell-accent);
    color: var(--shell-navy);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

body.shell .shell-sidebar .mainMenu .dropdownMenu {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 43px;
}

    body.shell .shell-sidebar .mainMenu .dropdownMenu a {
        display: block;
        padding: 4px 0;
        color: var(--shell-text-muted);
        font-size: 13px;
        border-bottom: none;
    }

        body.shell .shell-sidebar .mainMenu .dropdownMenu a:hover {
            color: var(--shell-accent);
        }

/* ---- Main column -------------------------------------------------------- */

.shell-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--shell-content);
}

.shell-header {
    position: sticky;
    top: var(--shell-top-offset, 0px);
    z-index: 3000;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    min-height: var(--shell-header-height);
    padding: 12px 28px !important; /* styles.css sets every <header> to padding: 0 !important */
    background: var(--shell-header);
    border-bottom: 1px solid var(--shell-border);
    color: var(--shell-text);
    font-size: 14px;
    line-height: 1.4;
}

    .shell-header a,
    .shell-header a:link,
    .shell-header a:visited {
        color: var(--shell-text);
        border-bottom: none;
    }

.shell-header__brand {
    display: none;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.shell-header__title {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-width: 0;
    margin-right: auto;
    line-height: 1.4;
}

/* The product name: in the sidebar at 992px and up, so shown here only below that and when signed out. */
.shell-header__crumb {
    display: none;
    line-height: 1.4;
    font-size: 12px;
    color: var(--shell-text-muted);
}

body.shell.shell--guest .shell-header__brand {
    display: flex;
}

body.shell.shell--guest .shell-header__crumb {
    display: block;
}

.shell-header__page {
    font-size: 18px;
    font-weight: 700;
    /* Set here, not inherited: styles.css gives every div a line-height worked out from its own (smaller) text,
       which was shorter than this text and cut it off. */
    line-height: 1.4;
    color: var(--shell-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shell-header__links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    font-weight: 700;
}

.shell-account-button {
    display: none;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--shell-border-strong);
    background: var(--shell-navy);
    color: #fff;
    font-size: 16px;
    align-items: center;
    justify-content: center;
}

.shell-account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-left: auto;
}

    .shell-account form {
        margin: 0;
    }

.shell-account__sheet-title,
.shell-account__close {
    display: none;
}

body.shell #impersonateContainer {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    z-index: auto;
}

body.shell .impersonation-bar,
body.shell .stopImpersonate {
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    text-align: left;
}

body.shell .stopImpersonate {
    padding: 6px 12px;
    background: #dc3545;
}

    body.shell .impersonation-bar select {
        width: auto;
        min-width: 180px;
        max-width: 240px;
        padding: 7px 32px 7px 12px;
        border-radius: 8px;
        border: 1px solid var(--shell-border-strong);
        background-color: transparent;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
    }

        body.shell .impersonation-bar select option {
            color: #212529;
        }

body.shell #storageEstimate {
    max-width: 190px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--shell-text-muted);
}

    body.shell #storageEstimate:empty {
        display: none;
    }

.shell-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shell-user__avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--shell-border-strong);
    background: var(--shell-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.shell-user__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.shell-user__welcome {
    font-weight: 700;
    font-size: 14px;
}

.shell-user__name {
    font-size: 12px;
    color: var(--shell-text-muted);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.shell .shell-user .menulogout {
    display: inline;
    width: auto;
    padding: 0;
    border: none;
    background: none;
    color: var(--shell-accent);
    font-size: 12px;
    font-weight: 700 !important;
    text-align: left;
    cursor: pointer;
}

    body.shell .shell-user .menulogout:hover {
        color: #fdd76f;
        text-decoration: underline;
    }

body.shell #installPWA {
    margin: 0;
    border-radius: 8px;
}

/* Maintenance, BETA and sync messages: the page scripts show, hide and fill these. */
body.shell #stickyTopElements {
    position: static;
    z-index: auto;
    background: transparent;
}

body.shell .beta-label-container {
    background-color: var(--shell-navy);
    z-index: auto;
}

body.shell .beta-label {
    color: var(--shell-accent);
    font-size: 1rem;
    padding: 6px 28px;
}

body.shell .siteContainer {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.shell .mainContentArea {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 24px 28px;
}

body.shell #mainContent {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

body.shell footer.shell-footer {
    display: block;
    margin-top: auto;
    padding: 16px 28px;
    border-top: 1px solid #dee2e6;
    font-size: 0.8rem;
    color: #6c757d;
}

    body.shell footer.shell-footer p {
        margin: 0 0 4px;
    }

/* ---- Mobile: admin fold-out on the dashboard, tabs and sheets ------------- */

.shell-sidebar .shell-admin-heading[hidden] {
    display: none;
}

.shell-admin-mobile,
.shell-tabs,
.shell-sheet,
.shell-scrim {
    display: none;
}

/* ---- 992px and up ------------------------------------------------------ */

@media (min-width: 992px) {
    body.shell:not(.shell--guest) .shell-sidebar {
        display: block;
    }

    /* The menu for small screens is not shown at this size. */
    body.shell .appMenu {
        display: none !important;
    }
}

/* ---- Below 992px ------------------------------------------------------- */

@media (max-width: 991.98px) {
    :root {
        --shell-header-height: 64px;
    }

    body.shell:not(.shell--guest) {
        padding-bottom: calc(var(--shell-tabs-height) + env(safe-area-inset-bottom, 0px));
    }

    .shell-header {
        flex-wrap: nowrap;
        gap: 10px;
        padding: 10px 16px !important;
        background: var(--shell-navy);
    }

    .shell-header__brand {
        display: flex;
    }

        .shell-header__brand .shell-brand__logo {
            width: 36px;
            height: 36px;
        }

    .shell-header__title {
        margin-right: auto;
    }

    .shell-header__crumb {
        display: block;
        font-size: 16px;
        font-weight: 700;
        color: var(--shell-text);
    }

    .shell-header__page {
        font-size: 12px;
        font-weight: 400;
        color: var(--shell-text-muted);
    }

    body.shell:not(.shell--guest) .shell-account-button {
        display: inline-flex;
    }

    /* The account block becomes a sheet from the bottom, opened by the account button. */
    body.shell:not(.shell--guest) .shell-account {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 7600;
        display: none;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 14px;
        margin-left: 0;
        justify-content: flex-start;
        max-height: 80vh;
        overflow-y: auto;
        padding: 22px 16px calc(22px + env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
        background: var(--shell-sidebar);
        box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.4);
    }

    body.shell.shell-account-open .shell-account {
        display: flex;
    }

    /* The account sheet lives inside the header, so the header has to rise above the scrim with it. */
    body.shell.shell-account-open .shell-header {
        z-index: 7600;
    }

    .shell-account__sheet-title {
        display: block;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #c9c8e6;
        padding-right: 48px;
    }

    .shell-account__close {
        display: inline-flex;
        position: absolute;
        top: 12px;
        right: 12px;
    }

    body.shell .impersonation-bar select {
        width: 100%;
        max-width: none;
        min-height: 44px;
    }

    body.shell #storageEstimate {
        max-width: none;
        font-size: 13px;
    }

    body.shell .shell-user .menulogout {
        font-size: 14px;
        min-height: 32px;
    }

    .shell-user__name {
        max-width: none;
        white-space: normal;
        word-break: break-word;
    }

    body.shell .beta-label {
        padding: 6px 16px;
    }

    body.shell .mainContentArea {
        padding: 16px;
    }

    /* Existing pages keep their layout but stack: columns and fixed-width forms take the full width. */
    body.shell #mainContent .row > [class*="col-"],
    body.shell #mainContent .row > .col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    body.shell #mainContent .registerform,
    body.shell #mainContent #resetpassword,
    body.shell #mainContent #loginform,
    body.shell #mainContent #ForgotPasswordForm,
    body.shell #mainContent #registeruserform {
        width: 100%;
        max-width: 100%;
    }

    body.shell #mainContent img,
    body.shell #mainContent table {
        max-width: 100%;
    }

    body.shell footer.shell-footer {
        padding: 14px 16px;
    }

    /* Admin functions: a fold-out under the dashboard (the designs have no Admin tab). */
    .shell-admin-mobile {
        display: block;
        margin: 0 16px 16px;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        background: #f4f4fb;
        color: var(--shell-navy);
    }

        .shell-admin-mobile[hidden] {
            display: none;
        }

        .shell-admin-mobile > summary {
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 56px;
            padding: 8px 16px;
            font-weight: 700;
            font-size: 15px;
            cursor: pointer;
            list-style: none;
        }

            .shell-admin-mobile > summary::-webkit-details-marker {
                display: none;
            }

            .shell-admin-mobile > summary::after {
                content: "\f078";
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                font-size: 12px;
                margin-left: auto;
                transition: transform 0.15s ease;
            }

        .shell-admin-mobile[open] > summary::after {
            transform: rotate(180deg);
        }

    .shell-admin-mobile__icon {
        flex: none;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--shell-navy);
        color: var(--shell-accent);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    .shell-admin-mobile ul.shell-admin {
        list-style: none;
        margin: 0;
        padding: 0 16px 8px;
    }

        .shell-admin-mobile ul.shell-admin li {
            border-top: 1px solid #dee2e6;
        }

        .shell-admin-mobile ul.shell-admin a {
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 48px;
            color: var(--shell-navy);
            font-size: 15px;
            border-bottom: none;
        }

        .shell-admin-mobile ul.shell-admin i {
            width: 18px;
            text-align: center;
        }

    /* Bottom tabs */
    body.shell:not(.shell--guest) .shell-tabs {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 7000;
        display: flex;
        justify-content: space-around;
        align-items: stretch;
        height: calc(var(--shell-tabs-height) + env(safe-area-inset-bottom, 0px));
        padding: 6px 8px env(safe-area-inset-bottom, 0px);
        background: var(--shell-sidebar);
        border-top: 1px solid var(--shell-border);
    }

    .shell-tab {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 48px;
        margin: 0 2px;
        padding: 4px;
        border: none;
        border-radius: 12px;
        background: transparent;
        color: var(--shell-text-muted);
        font-family: inherit;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none;
    }

    a.shell-tab,
    a.shell-tab:link,
    a.shell-tab:visited {
        color: var(--shell-text-muted);
        border-bottom: none;
    }

    .shell-tab i {
        font-size: 17px;
    }

    .shell-tab.is-active,
    a.shell-tab.is-active,
    .shell-tab[aria-expanded="true"] {
        background: rgba(var(--brand-yellow-rgb),  0.12);
        color: var(--shell-accent);
    }

    /* Sheets: the scrim, and the menu sheet holding the menu the page script builds for small screens. */
    body.shell.shell-sheet-open .shell-scrim,
    body.shell.shell-account-open .shell-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 7500;
        background: rgba(10, 9, 30, 0.6);
    }

    body.shell.shell-sheet-open .shell-sheet {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 7600;
        max-height: 80vh;
        overflow-y: auto;
        padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
        background: var(--shell-sidebar);
        color: var(--shell-text);
        box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.4);
    }

    .shell-sheet::before,
    body.shell:not(.shell--guest) .shell-account::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 999px;
        background: var(--shell-border-strong);
    }

    .shell-sheet__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 44px;
        margin-bottom: 6px;
    }

    .shell-sheet__title {
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #c9c8e6;
    }

    .shell-sheet__close {
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: #fff;
        font-size: 18px;
        align-items: center;
        justify-content: center;
    }

    .shell-sheet .shell-sheet__close {
        display: inline-flex;
    }

    /* The small-screen menu: rows in the sheet, only the open tab's group shown. */
    body.shell .appMenu {
        display: block !important;
        margin: 0;
    }

    body.shell .mainMenuBarAppStyle {
        position: static;
        z-index: auto;
        max-width: none;
    }

        body.shell .mainMenuBarAppStyle ul.mainMenu {
            display: block;
            min-width: 0;
            height: auto;
            margin: 0;
            padding: 0;
            list-style: none;
            background: transparent;
        }

            body.shell .mainMenuBarAppStyle ul.mainMenu > li.shell-group-label {
                display: none;
            }

            body.shell .mainMenuBarAppStyle ul.mainMenu > li {
                border-bottom: 1px solid var(--shell-border);
            }

    .shell-sheet[data-group="register"] ul.mainMenu > li:not([data-shell-sheet="register"]),
    .shell-sheet[data-group="changes"] ul.mainMenu > li:not([data-shell-sheet="changes"]),
    .shell-sheet[data-group="data"] ul.mainMenu > li:not([data-shell-sheet="data"]) {
        display: none;
    }

    body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        height: auto;
        min-height: 56px;
        padding: 8px 4px;
        border: none;
        border-radius: 0;
        background: transparent;
        color: #fff;
        font-size: 16px;
        font-weight: 400;
        text-align: left;
        white-space: normal;
        box-shadow: none;
    }

        body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton::after {
            content: "\f054";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            font-size: 12px;
            margin-left: auto;
            color: var(--shell-text-dim);
        }

        body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton .menuIcon {
            flex: none;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: var(--shell-navy);
            color: var(--shell-accent);
            font-size: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }

        body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton .menuPageTitle {
            display: inline;
        }

        body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton.active .menuPageTitle {
            color: var(--shell-accent);
            font-weight: 700;
        }

        /* 2.0.217: the Outstanding Changes count in the phone menu sheet is a round badge with the number centred
           (it was bare yellow text, squeezed by the old menu's fixed width, height and letter-spacing in styles.css).
           One digit makes a circle; more digits widen it into a pill. */
        body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton .newbadge,
        body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton .newbadgeMobile {
            position: static;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: none;
            box-sizing: border-box;
            width: auto;
            min-width: 24px;
            height: 24px;
            margin: 0 0 0 auto;
            padding: 0 7px;
            border-radius: 999px;
            background: var(--shell-accent);
            color: var(--shell-navy);
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            letter-spacing: 0;
            text-align: center;
            font-variant-numeric: tabular-nums;
        }

        /* The row's chevron also has margin-left: auto, so with a badge the two split the free space and the badge sat
           in the middle of the row. With a badge, the badge takes the space and the chevron follows it. */
        body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton:has(.newbadge, .newbadgeMobile)::after {
            margin-left: 10px;
        }

            body.shell .mainMenuBarAppStyle ul.mainMenu li a.navButton .newbadge + .menuPageTitle {
                margin-right: 0;
            }
}

/* ---- Sheets slide up and down (below 992px) -----------------------------
   Opening: the sheet slides up and the scrim fades in as they appear. Closing: shell.js keeps them on screen with
   "shell-sheets-closing" while they slide down and fade, then hides them. */

@keyframes shell-sheet-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes shell-sheet-down {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

@keyframes shell-scrim-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes shell-scrim-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (max-width: 991.98px) {
    body.shell.shell-sheet-open .shell-sheet,
    body.shell.shell-account-open .shell-account {
        animation: shell-sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    body.shell.shell-sheet-open .shell-scrim,
    body.shell.shell-account-open .shell-scrim {
        animation: shell-scrim-in 0.22s ease both;
    }

    body.shell.shell-sheets-closing .shell-sheet,
    body.shell.shell-sheets-closing .shell-account {
        animation: shell-sheet-down 0.22s ease-in both;
    }

    body.shell.shell-sheets-closing .shell-scrim {
        animation: shell-scrim-out 0.22s ease-in both;
        pointer-events: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shell-admin-mobile > summary::after {
        transition: none;
    }

    body.shell .shell-sheet,
    body.shell .shell-account,
    body.shell .shell-scrim {
        animation: none !important;
    }
}

/* ---- Hiding the sidebar (992px and up, Stage 7c) ------------------------
   The « button in the sidebar's brand hides it; the ☰ button at the left of
   the header brings it back. Remembered in this browser (shell.js; the class
   is set on <html> before the page draws, so the menu never flashes). */

.shell-collapse,
.shell-reopen {
    flex: none;
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--shell-border-strong);
    border-radius: 8px;
    background: transparent;
    color: var(--shell-text-muted);
    cursor: pointer;
}

    .shell-collapse:hover,
    .shell-collapse:focus-visible,
    .shell-reopen:hover,
    .shell-reopen:focus-visible {
        color: var(--shell-navy);
        background: var(--shell-accent);
        border-color: var(--shell-accent);
        outline: none;
    }

.shell-collapse {
    margin-left: auto;
}

@media (min-width: 992px) {
    .shell-collapse {
        display: inline-flex;
    }

    html.shell-sidebar-collapsed body.shell:not(.shell--guest) .shell-sidebar {
        display: none;
    }

    html.shell-sidebar-collapsed body.shell:not(.shell--guest) .shell-reopen {
        display: inline-flex;
    }

    /* With the sidebar away, the header carries the logo. */
    html.shell-sidebar-collapsed body.shell:not(.shell--guest) .shell-header__brand {
        display: flex;
    }

        html.shell-sidebar-collapsed body.shell:not(.shell--guest) .shell-header__brand .shell-brand__logo {
            width: 36px;
            height: 36px;
        }
}

/* 2.0.160: the logos and the product name go to the home page. */
.shell-brand__home {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
}

    .shell-brand__home:hover .shell-brand__name {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .shell-brand__home:focus-visible,
    a.shell-brand__home-logo:focus-visible,
    body.shell .mainMenuBar a.logoContainer:focus-visible {
        outline: 2px solid var(--brand-yellow);
        outline-offset: 2px;
    }

a.shell-brand__home-logo {
    text-decoration: none;
}

body.shell .mainMenuBar a.logoContainer {
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow .15s ease;
}

    body.shell .mainMenuBar a.logoContainer:hover {
        box-shadow: 0 0 0 2px var(--brand-yellow);
    }

@media (prefers-reduced-motion: reduce) {
    body.shell .mainMenuBar a.logoContainer {
        transition: none;
    }
}

/* 2.0.215: a menu group heading, or a bottom tab, with no page the user can open is hidden (shell.js). */
body.shell .shell-group-label[hidden],
.shell-tab[hidden] {
    display: none !important;
}

/* ---- 2.0.222: the menu skeleton (Views/Shared/_shellMenuSkeleton.cshtml) ----
   While the page builds the menu (index.js), the sidebar and the small-screen menu sheet show its shape; then shell.js
   shows the whole menu, with the Admin links, at once with a short fade, so pages don't drop in one by one. */
body.shell.shell-menu-loading .shell-sidebar .mainMenuBar,
body.shell.shell-menu-loading .shell-sidebar .shell-admin-heading,
body.shell.shell-menu-loading .shell-sidebar .shell-admin,
body.shell.shell-menu-loading .shell-sheet .mainMenuBarAppStyle {
    display: none !important;
}

body.shell:not(.shell-menu-loading) .shell-menu-skel {
    display: none;
}

body.shell .shell-menu-skel {
    padding: 0 12px 8px;
}

body.shell .shell-menu-skel__label {
    display: block;
    width: 34%;
    height: 9px;
    margin: 22px 8px 12px;
    opacity: 0.7;
}

body.shell .shell-menu-skel__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 36px;
    padding: 0 10px;
}

body.shell .shell-menu-skel__icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    flex: 0 0 auto;
}

body.shell .shell-menu-skel__text {
    height: 11px;
    margin: 0;
}

body.shell .shell-menu-skel__text--a { width: 58%; }
body.shell .shell-menu-skel__text--b { width: 42%; }
body.shell .shell-menu-skel__text--c { width: 70%; }

body.shell.shell-menu-revealed .shell-sidebar .mainMenuBar,
body.shell.shell-menu-revealed .shell-sidebar .shell-admin-heading,
body.shell.shell-menu-revealed .shell-sidebar .shell-admin,
body.shell.shell-menu-revealed .shell-sheet .mainMenuBarAppStyle {
    animation: shell-menu-in 0.22s ease-out both;
}

@keyframes shell-menu-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    body.shell.shell-menu-revealed .shell-sidebar .mainMenuBar,
    body.shell.shell-menu-revealed .shell-sidebar .shell-admin-heading,
    body.shell.shell-menu-revealed .shell-sidebar .shell-admin,
    body.shell.shell-menu-revealed .shell-sheet .mainMenuBarAppStyle {
        animation: none;
    }

    body.shell .shell-menu-skel .skel {
        animation: none;
    }
}

/* ---- 2.0.229: the BETA bar (js/betaBar.js; on and off in Display settings) ----
   The GOV.UK "phase banner" pattern in the site's colours: a BETA tag, the notice, and how to report a problem. */
.beta-label-container[hidden] {
    display: none !important;
}

body .beta-label-container,
body.shell .beta-label-container {
    background-color: var(--brand-navy);
    color: #ffffff;
    border-bottom: 3px solid var(--brand-yellow);
}

.beta-bar {
    margin: 0;
    padding: 8px 28px;
    font-size: .9rem;
    line-height: 1.45;
    color: #ffffff;
}

.beta-bar__tag {
    display: inline-block;
    margin-right: 10px;
    padding: 1px 8px 0;
    background-color: var(--brand-yellow);
    color: var(--brand-navy);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    vertical-align: baseline;
}

.beta-bar__text {
    color: #ffffff;
}

.beta-bar__report {
    color: #ffffff;
    font-weight: 600;
}

a.beta-bar__link,
a.beta-bar__link:visited {
    color: var(--brand-yellow);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a.beta-bar__link:hover {
    color: #ffffff;
}

a.beta-bar__link:focus-visible {
    outline: 3px solid var(--brand-yellow);
    outline-offset: 2px;
    color: var(--brand-navy);
    background-color: var(--brand-yellow);
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .beta-bar {
        padding: 8px 16px;
        font-size: .85rem;
    }
}

/* ---- 2.0.230: the Outstanding Changes count in the menus is the site's yellow on dark blue ----
   Bootstrap's bg-warning / text-dark are !important (amber #ffc107), so a badge drawn by an older script still
   carrying them is put right here too. Follows the site style (brand or classic). */
.navButton .newbadge,
.navButton .newbadgeMobile,
.navButton .newbadge.bg-warning,
.navButton .newbadgeMobile.bg-warning {
    background-color: var(--brand-yellow) !important;
    color: var(--brand-navy) !important;
}
