#header .portal-relaunch-banner {
    position: absolute;
    z-index: 4;
    top: 7px;
    left: 36%;
    right: 26px;
    display: block;
    max-width: 575px;
    margin-left: auto;
    border-radius: 4px;
}

#header .portal-relaunch-banner img {
    display: block;
    width: 100%;
    height: auto;
    transition: filter .15s ease;
}

#header .portal-relaunch-banner:hover img {
    filter: brightness(1.06);
}

#header .portal-relaunch-banner:focus-visible {
    outline: 2px solid #005870;
    outline-offset: 2px;
}

@media (min-width: 641px) and (max-width: 900px) {
    #header .portal-relaunch-banner {
        left: 44%;
        right: 14px;
    }
}

@media (max-width: 640px) {
    #header .portal-relaunch-banner {
        top: 48px;
        left: 10px;
        right: 10px;
        max-width: 295px;
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    #header .portal-relaunch-banner img {
        transition: none;
    }
}

/* Keep the original poster, cropping its former sunrise along the paper edge. */
#header .portal-relaunch-banner img {
    clip-path: polygon(0 0, 95% 0, 93% 29%, 85.5% 35%, 78.8% 84%, 59% 100%, 0 100%);
}

/* The fjord photo is centered at its natural size on every viewport. */
#header .portal-relaunch-sunrise {
    position: absolute;
    z-index: 3;
    top: 109px;
    left: calc(50% + 83px);
    width: 22px;
    height: 10px;
    transform: translateX(-50%);
    pointer-events: none;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: radial-gradient(ellipse at 46% 78%, #ffe17a, #ffcc49 73%, #ffdf68);
}

#header .portal-relaunch-sunrise::before {
    position: absolute;
    inset: auto -34px 0;
    height: 38px;
    content: '';
    background: conic-gradient(from 290deg at 50% 100%,
        transparent 9deg, #ffcf6b80 12deg 17deg, transparent 20deg 37deg,
        #ffcf6b70 40deg 46deg, transparent 49deg 71deg,
        #ffcf6b70 74deg 81deg, transparent 84deg 109deg,
        #ffcf6b70 112deg 120deg, transparent 123deg);
    mask-image: radial-gradient(ellipse at 50% 100%, #000, transparent 69%);
}

/* The article list moves its actions into the lower pagination bar. */
#article-tab:has(> .portal-bottom-navigation) > .list-footer:not(:has(> *)) {
    display: none;
}

.portal-return-notice .portal-return-dismiss {
    margin: 4px 0 0;
    padding: 2px 8px;
    font: inherit;
    color: #315366;
    background: transparent;
    border: 1px solid #879ca7;
}
.portal-return-dismiss-status {
    margin-inline-start: 6px;
}

.portal-return-notice .portal-return-dismiss {
    display: block;
    grid-column: 1 / -1;
    justify-self: end;
    margin: 4px 8px 4px auto;
}
.portal-return-dismiss-status:empty {
    display: none;
}

/* One compact actions row; wrap only when a narrow viewport needs it. */
.portal-return-notice .portal-return-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.portal-return-notice .portal-return-links a {
    white-space: nowrap;
}
.portal-return-notice .portal-return-links .portal-return-dismiss {
    display: inline-flex;
    grid-column: auto;
    justify-self: auto;
    align-items: center;
    margin: 0 0 0 auto;
    padding: 2px 8px;
    white-space: nowrap;
}
.portal-return-notice .portal-return-links .portal-return-dismiss-status {
    flex-basis: 100%;
    margin: 0;
}

/* Search results use a compact article preview alongside the thumbnail. */
.search-results-widget .conversation-list > .b-post:has(.b-post__article-meta) {
    padding-block: 10px;
}

.search-results-widget .b-post__hide-when-deleted:has(> .list-item-header .b-post__article-meta) {
    display: flow-root;
}

.search-results-widget .b-post__hide-when-deleted:has(> .list-item-header .b-post__article-meta) > .b-post__preview-image {
    float: left;
    width: auto;
    height: auto;
    max-width: min(132px, 27%);
    max-height: 96px;
    object-fit: contain;
    margin: 0 12px 6px 0 !important;
}

.search-results-widget .b-post__hide-when-deleted:has(> .b-post__preview-image):has(> .list-item-header .b-post__article-meta) > .list-item-header {
    width: auto;
    min-width: 0;
}

.search-results-widget .list-item-header:has(.b-post__article-meta) .post-header {
    min-width: 0;
    flex: 1 1 auto;
}

.search-results-widget .list-item-header:has(.b-post__article-meta) .post-action-wrapper h2 {
    overflow-wrap: anywhere;
}

.search-results-widget .b-post__hide-when-deleted:has(> .list-item-header .b-post__article-meta) > .list-item-body-wrapper {
    clear: none !important;
}

.search-results-widget .b-post__hide-when-deleted:has(> .list-item-header .b-post__article-meta) > .list-item-body-wrapper > .conversation-body {
    padding-block: 4px;
}

.search-results-widget .b-post__hide-when-deleted:has(> .list-item-header .b-post__article-meta) .conversation-body > .post-links {
    margin-top: 6px;
}

@media (max-width: 540px) {
    .search-results-widget .list-item-header > .post-header {
        min-width: 0;
    }

    .search-results-widget .b-post__hide-when-deleted:has(> .list-item-header .b-post__article-meta) > .b-post__preview-image {
        max-width: min(84px, 26%);
        margin-right: 8px !important;
    }

    .search-results-widget .list-item-header:has(.b-post__article-meta) .post-action-wrapper h2 {
        line-height: 1.25;
    }

    .search-results-widget .list-item-header .b-post__article-meta {
        margin-block: 2px 4px !important;
    }
}

.search-results-widget .pagenav-container.portal-search-pagination-ready > .js-pagenav {
    display: none;
}

.search-results-widget .portal-search-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 50px;
    background: #f5f4f4;
    border: 1px solid #eceaea;
    font-size: 14px;
    box-sizing: border-box;
}

.search-results-widget .portal-search-pagination .portal-search-page-number {
    width: 48px;
    height: 32px;
    box-sizing: border-box;
    text-align: center;
}
