:root {
    --bp-primary: #003FAA;
    --bp-info: #35A8E0;
    --bp-accent: #409DC1;
    --bp-background: #F4F7FB;
    --bp-surface: #FFFFFF;
    --bp-border: #E3E9F2;
    --bp-text: #17263B;
    --bp-muted: #5B6B80;
    --bp-font-system: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --bs-primary: #003FAA;
    --bs-primary-rgb: 0, 63, 170;
    --bs-link-color: #003FAA;
    --bs-link-hover-color: #0E4485;
    --bs-body-color: #17263B;
    --bs-body-bg: #F4F7FB;
    --bs-border-color: #E3E9F2;
    --bs-font-sans-serif: var(--bp-font-system);
    --bp-font-display: var(--bp-font-system);
    --font-heading: var(--bp-font-system);
    --font-sans: var(--bp-font-system);
}

html,
body {
    background: var(--bp-background);
    color: var(--bp-text);
    font-family: var(--bp-font-system);
}

body {
    background: var(--bp-background);
    background-image: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-serif {
    color: var(--bp-text);
    font-family: var(--bp-font-system);
}

a,
.btn-link {
    color: var(--bp-primary);
}

.bp-shell {
    background: var(--bp-background);
    min-height: 100vh;
}

.bp-site-header {
    background: var(--bp-surface);
    border-bottom: 1px solid var(--bp-border);
    position: sticky;
    top: 0;
    z-index: 1200;
}

.bp-utility-header {
    align-items: center;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(230px, 1fr) minmax(340px, 680px) minmax(210px, 1fr);
    min-height: 70px;
    padding: 10px clamp(18px, 3vw, 46px);
}

.bp-brand {
    align-items: center;
    display: inline-flex;
    justify-self: start;
}

.bp-brand img {
    display: block;
    height: 40px;
    max-width: 260px;
    object-fit: contain;
    object-position: left center;
    width: auto;
}

.bp-account-area {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-self: end;
}

.bp-header-link,
.bp-header-register {
    border-radius: 7px;
    font-size: .875rem;
    font-weight: 650;
    padding: 9px 14px;
    text-decoration: none;
}

.bp-header-register {
    background: var(--bp-accent);
    color: #fff;
}

.bp-header-register:hover {
    color: #fff;
    filter: brightness(.96);
    text-decoration: none;
}

.bp-header-menu {
    position: relative;
}

.bp-header-menu > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 4px;
    list-style: none;
}

.bp-header-menu > summary::-webkit-details-marker {
    display: none;
}

.bp-account-menu > summary {
    border-left: 1px solid var(--bp-border);
    min-height: 38px;
    padding-left: 12px;
}

.bp-account-copy {
    align-items: flex-end;
    color: var(--bp-text);
    display: flex;
    flex-direction: column;
    font-size: .875rem;
    font-weight: 650;
    line-height: 1.2;
    max-width: 180px;
}

.bp-account-copy > span:first-child {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-membership-badge {
    background: #FFF0DC;
    border-radius: 999px;
    color: #A75A00;
    font-size: .875rem;
    letter-spacing: .05em;
    margin-top: 3px;
    padding: 2px 7px;
    text-transform: uppercase;
}

.bp-primary-nav {
    background: var(--bp-primary);
    color: #fff;
    min-height: 50px;
}

.bp-primary-nav-inner {
    align-items: stretch;
    display: flex;
    margin: 0 auto;
    /* Full-bleed per Alex - no centered container. */
    max-width: none;
    min-height: 50px;
    padding: 0 clamp(14px, 3vw, 46px);
}

.bp-primary-nav a,
.bp-primary-nav summary {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: .875rem;
    font-weight: 600;
    min-height: 50px;
    padding: 0 16px;
    text-decoration: none;
}

.bp-primary-nav a {
    gap: 6px;
}

.bp-primary-nav a:hover,
.bp-primary-nav summary:hover,
.bp-primary-nav .active {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
}

.bp-menu-panel {
    background: #fff;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(23, 38, 59, .16);
    display: grid;
    left: 0;
    max-height: min(68vh, 520px);
    min-width: 230px;
    overflow: auto;
    padding: 7px;
    position: absolute;
    top: calc(100% + 5px);
    z-index: 1400;
}

.bp-menu-panel-right {
    left: auto;
    right: 0;
}

.bp-menu-panel a,
.bp-menu-panel button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--bp-text);
    cursor: pointer;
    display: block;
    font: inherit;
    font-size: .875rem;
    min-height: auto;
    padding: 9px 11px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.bp-menu-panel a:hover,
.bp-menu-panel button:hover {
    background: #EEF5FD;
    color: var(--bp-primary);
    text-decoration: none;
}

.bp-page-container {
    /* Tight on top per Alex - the header already provides separation. */
    min-width: 0;
    padding: 14px clamp(14px, 1.5vw, 24px) clamp(18px, 2vw, 30px);
}

.portal-shell-grid {
    align-items: start;
    display: grid;
    gap: clamp(12px, 1.2vw, 18px);
    grid-template-areas: "left center right";
    grid-template-columns: 230px minmax(0, 1fr) 250px;
    min-width: 0;
}

.portal-shell-center {
    display: flex;
    flex-direction: column;
    grid-area: center;
    min-width: 0;
}

.portal-module-body {
    min-width: 0;
}

.portal-module-tools-host {
    min-width: 0;
}

.portal-module-tools-host:not(:has([data-module-tools])) {
    display: none;
}

.portal-module-tools-host:has([data-module-tools]) {
    margin-bottom: 16px;
}

.portal-shell-left {
    grid-area: left;
    min-width: 0;
}

.portal-shell-right {
    grid-area: right;
    min-width: 0;
}

.portal-shell-center img,
.portal-shell-left img,
.portal-shell-right img {
    max-width: 100%;
}

.portal-rail {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.portal-rail-card {
    min-width: 0;
    padding: 15px;
}

.portal-module-tools {
    min-width: 0;
    padding: 17px 18px;
}

.portal-module-tools > .portal-rail-heading {
    margin-bottom: 11px;
}

.portal-module-tools-description {
    color: var(--bp-muted);
    font-size: .875rem;
    line-height: 1.45;
    margin: -6px 0 14px;
}

.portal-rail-heading {
    align-items: center;
    color: var(--bp-primary);
    display: flex;
    font-size: .875rem;
    font-weight: 750;
    gap: 7px;
    letter-spacing: .1em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.portal-directory-counts {
    display: grid;
}

.portal-directory-counts a {
    align-items: center;
    border-bottom: 1px solid var(--bp-border);
    color: var(--bp-text);
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 10px 2px;
    text-decoration: none;
}

.portal-directory-counts a:last-child {
    border-bottom: 0;
}

.portal-directory-counts a:hover {
    color: var(--bp-primary);
    text-decoration: none;
}

.portal-directory-counts .bn-icon {
    color: var(--bp-info);
    flex: 0 0 auto;
}

.portal-directory-counts strong {
    display: inline-block;
    margin-right: 4px;
}

.portal-directory-actions {
    display: grid;
}

.portal-directory-actions a {
    align-items: center;
    border-bottom: 1px solid var(--bp-border);
    color: var(--bp-text);
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    padding: 11px 2px;
    text-decoration: none;
}

.portal-directory-actions a:last-child {
    border-bottom: 0;
}

.portal-directory-actions a:hover {
    color: var(--bp-primary);
    text-decoration: none;
}

.portal-directory-actions .bn-icon {
    color: var(--bp-primary);
}

.portal-directory-actions span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.portal-directory-actions strong {
    font-size: .875rem;
}

.portal-directory-actions small {
    color: var(--bp-muted);
    font-size: .875rem;
    line-height: 1.35;
}

.portal-account-list {
    display: grid;
}

.portal-account-list a {
    align-items: center;
    border-bottom: 1px solid var(--bp-border);
    color: var(--bp-text);
    display: grid;
    font-size: .875rem;
    gap: 9px;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 40px;
    padding: 8px 2px;
    text-decoration: none;
}

.portal-account-list a:last-child {
    border-bottom: 0;
}

.portal-account-list a:hover {
    color: var(--bp-primary);
    padding-left: 5px;
    text-decoration: none;
}

.portal-account-list .bn-icon {
    width: 27px;
    height: 27px;
    padding: 5px;
    border-radius: 7px;
    background: #EEF4FC;
    color: var(--bp-primary);
}

.portal-account-signin {
    display: grid;
    gap: 8px;
}

.portal-account-signin strong {
    color: var(--bp-text);
    font-size: .9rem;
    line-height: 1.35;
}

.portal-account-signin p {
    margin: 0 0 3px;
    color: var(--bp-muted);
    font-size: .875rem;
    line-height: 1.5;
}

.portal-account-signin a,
.portal-account-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #C9D8EA;
    border-radius: 8px;
    color: var(--bp-primary);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
}

.portal-account-signin a:first-of-type {
    border-color: var(--bp-primary);
    background: var(--bp-primary);
    color: #fff;
}

.portal-account-admin {
    gap: 7px;
    margin-top: 12px;
    background: #EEF5FD;
}

.portal-rail-text-link,
.portal-signin-link {
    display: inline-block;
    font-size: .875rem;
    font-weight: 650;
    margin-top: 13px;
    text-decoration: none;
}

.portal-insights p,
.portal-help-card p,
.portal-benefits p,
.portal-benefits li {
    color: var(--bp-muted);
    font-size: .875rem;
}

.portal-public-reach {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
}

.portal-public-reach strong {
    color: var(--bp-primary);
    font-size: 1.35rem;
}

.portal-public-reach span {
    color: var(--bp-muted);
    font-size: .875rem;
}

.portal-insight-kicker {
    color: var(--bp-text);
    display: block;
    font-size: .88rem;
    line-height: 1.35;
    margin-bottom: 7px;
}

.portal-rail-link-stack {
    display: grid;
    gap: 8px;
}

.portal-rail-link-stack a {
    font-size: .875rem;
    font-weight: 650;
}

.portal-benefits h2 {
    font-size: 1.18rem;
    margin: 0 0 8px;
}

.portal-explore-heading small {
    color: var(--bp-muted);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-left: auto;
    text-transform: none;
}

.portal-member-promo {
    border-top: 1px solid var(--bp-border);
    margin-top: 15px;
    padding-top: 15px;
}

.portal-member-promo .portal-rail-heading {
    margin-bottom: 11px;
}

.portal-benefits ul {
    margin: 10px 0 18px;
    padding-left: 19px;
}

.portal-benefits li {
    margin: 7px 0;
}

.portal-register-cta {
    background: var(--bp-accent);
    border-radius: 8px;
    color: #fff;
    display: block;
    font-size: .875rem;
    font-weight: 700;
    padding: 11px 16px;
    text-align: center;
    text-decoration: none;
}

.portal-register-cta:hover {
    color: #fff;
    filter: brightness(.96);
    text-decoration: none;
}

.portal-signin-link {
    display: block;
    text-align: center;
}

.portal-tool-list-heading {
    align-items: baseline;
    border-top: 1px solid var(--bp-border);
    color: var(--bp-primary);
    display: flex;
    font-size: .875rem;
    font-weight: 750;
    justify-content: space-between;
    letter-spacing: .08em;
    margin-top: 18px;
    padding-top: 16px;
    text-transform: uppercase;
}

.portal-tool-list-heading small {
    color: var(--bp-muted);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: none;
}

.portal-tool-list {
    display: grid;
}

.portal-tool-list a {
    align-items: center;
    border-bottom: 1px solid var(--bp-border);
    color: var(--bp-text);
    display: grid;
    font-size: .875rem;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: 8px 1px;
    text-decoration: none;
}

.portal-tool-list a:last-child {
    border-bottom: 0;
}

.portal-tool-list a > span {
    overflow-wrap: anywhere;
}

.portal-tool-list .bn-icon {
    color: var(--bp-primary);
}

.portal-tool-list strong {
    background: #FFF0DC;
    border-radius: 999px;
    color: #A75A00;
    font-size: .875rem;
    padding: 3px 8px;
}

.portal-status-card {
    background: var(--bp-surface);
    color: var(--bp-text);
}

.portal-status-card > span,
.portal-status-card > strong,
.portal-status-card > a {
    display: block;
}

.portal-status-card > span {
    color: var(--bp-muted);
    font-size: .875rem;
}

.portal-status-card > strong {
    font-size: 1.2rem;
    margin: 5px 0 10px;
}

.portal-status-card > a {
    color: var(--bp-primary);
    font-size: .875rem;
    font-weight: 600;
}

.portal-admin-card {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.portal-admin-card > .bn-icon {
    color: var(--bp-accent);
}

.portal-admin-card strong,
.portal-admin-card span {
    display: block;
}

.portal-admin-card span {
    color: var(--bp-muted);
    font-size: .875rem;
}

.bn-surface,
.bn-card {
    background-color: var(--bp-surface);
}

.bp-card {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 11px;
    box-shadow: 0 4px 14px rgba(23, 38, 59, .055);
}

.portal-page-header {
    border-bottom: 1px solid var(--bp-border);
    margin-bottom: 18px;
    padding: 0 0 12px;
}

.portal-page-header h1 {
    color: var(--bp-text);
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.2;
    margin: 0;
}

.portal-page-header > p:last-child {
    color: var(--bp-muted);
    margin: 6px 0 0;
}

.portal-section-heading,
.cohesion-section-title {
    color: var(--bp-primary) !important;
    font-size: .875rem !important;
    font-weight: 750 !important;
    letter-spacing: .1em !important;
    line-height: 1.35 !important;
    text-transform: uppercase;
}

.cohesion-card {
    background: var(--bp-surface) !important;
    border: 1px solid var(--bp-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(23, 38, 59, .04) !important;
}

.support-message-card {
    background: var(--bp-surface) !important;
    border-color: var(--bp-border) !important;
    border-radius: 10px !important;
}

.support-message-staff {
    border-left: 3px solid var(--bp-primary) !important;
}

@media (max-width: 959px) {
    .bp-utility-header {
        gap: 16px;
        grid-template-columns: 1fr auto;
        min-height: 64px;
    }

    .bp-primary-nav-inner {
        overflow-x: auto;
        padding: 0 8px;
    }

    .bp-primary-nav a,
    .bp-primary-nav summary {
        padding: 0 12px;
        white-space: nowrap;
    }

    .portal-shell-grid {
        grid-template-areas: "center" "left" "right";
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-member-tools .portal-tool-list {
        gap: 0 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-member-tools .portal-tool-list a:nth-last-child(2) {
        border-bottom: 0;
    }
}

@media (max-width: 599px) {
    .bp-brand img {
        height: 34px;
        max-width: 190px;
    }

    .bp-account-copy {
        display: none;
    }

    .bp-header-link,
    .bp-header-register {
        padding: 8px 9px;
    }

    .bp-page-container {
        padding: 14px;
    }

    .portal-rail-card {
        padding: 17px;
    }
}

@media (min-width: 1440px) {
    .portal-shell-grid {
        grid-template-columns: 250px minmax(0, 1fr) 270px;
    }
}

.home-logo-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E8F1FB;
    color: #003FAA;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
}

/* The persistent shell owns horizontal spacing and available width. */
.public-directory,
.news-public {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    min-width: 0;
    width: 100%;
}

.public-directory {
    padding: 0;
}

.news-public {
    padding-left: 0;
    padding-right: 0;
}

.news-detail {
    max-width: 820px;
}

.news-kicker {
    color: var(--bp-primary) !important;
    font-size: .875rem;
    font-weight: 750;
    letter-spacing: .1em;
    margin: 0 0 6px !important;
    text-transform: uppercase;
}

.news-active-filter,
.news-empty {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    margin-bottom: 18px;
    padding: 18px;
}

.news-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-grid > li {
    min-width: 0;
}

.news-card {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(23, 38, 59, .04);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: box-shadow .15s ease, transform .15s ease;
}

.news-card:hover {
    box-shadow: 0 8px 20px rgba(23, 38, 59, .14);
    transform: translateY(-2px);
}

.news-card-media {
    aspect-ratio: 16 / 9;
    background: #E8F1FB;
    display: block;
    overflow: hidden;
}

.news-card-media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.news-card-placeholder {
    align-items: flex-start;
    background: linear-gradient(135deg, var(--bp-primary), var(--bp-info));
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding: 18px;
}

.news-card-placeholder span {
    font-size: .875rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.news-card-placeholder strong {
    font-size: 1.15rem;
}

.news-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.news-card h2 {
    font-size: 1.08rem;
    line-height: 1.35;
    margin: 0 0 10px;
}

.news-card h2 a {
    color: var(--bp-text);
    text-decoration: none;
}

.news-card h2 a:hover {
    color: var(--bp-primary);
}

.news-card-summary {
    color: var(--bp-muted);
    display: -webkit-box;
    font-size: .88rem;
    line-height: 1.55;
    margin: 0 0 18px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.news-card-meta {
    align-items: center;
    color: var(--bp-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .875rem;
    gap: 5px;
    margin-top: auto;
}

.news-category-chips,
.news-taxonomy {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.news-category-chips a,
.news-taxonomy a {
    background: #E8F1FB;
    border-radius: 999px;
    color: var(--bp-primary);
    font-size: .875rem;
    font-weight: 650;
    padding: 3px 8px;
    text-decoration: none;
}

.news-pagination {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.news-pagination a {
    background: var(--bp-primary);
    border-radius: 8px;
    color: #fff;
    font-size: .875rem;
    font-weight: 650;
    padding: 9px 14px;
    text-decoration: none;
}

.news-pagination span {
    color: var(--bp-muted);
    font-size: .875rem;
}

.news-back {
    display: inline-flex;
    font-size: .875rem;
    font-weight: 650;
    gap: 6px;
    margin-bottom: 18px;
    text-decoration: none;
}

.news-detail-header {
    margin-bottom: 24px;
}

.news-standfirst,
.news-byline {
    color: var(--bp-muted);
}

.news-standfirst {
    font-size: 1.08rem;
    line-height: 1.6;
}

.news-detail figure {
    margin: 0 0 24px;
}

.news-detail figure img {
    border-radius: 10px;
    display: block;
    width: 100%;
}

.news-summary {
    border-left: 3px solid var(--bp-accent);
    color: var(--bp-text);
    font-size: 1.05rem;
    line-height: 1.65;
    padding-left: 18px;
}

.news-body {
    line-height: 1.75;
}

.news-body img {
    border-radius: 10px;
    height: auto;
    max-width: 100%;
}

.news-body .news-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    margin: 24px 0;
}

.news-table-scroll table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
}

.news-table-scroll:focus-visible {
    outline: 2px solid var(--bp-accent);
    outline-offset: 2px;
}

.news-detail .news-taxonomy {
    border-top: 1px solid var(--bp-border);
    margin-top: 24px;
    padding-top: 18px;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Referenced by the header/home search labels but never defined - without it the
   screen-reader labels render as visible flex items and wreck the search rows. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Native portal presentation. */
.bn-main-content {
    padding-top: 0 !important;
}
