.workspace header:has(> .header-search-progress:not(.hidden)) {
    position: sticky; top: 0; z-index: 5;
    background-color: #f4f8f6; box-shadow: 0 3px 12px #1830351a;
}
.header-search-progress {
    position: relative; flex: 0 1 460px; min-width: 220px;
    margin-inline: 18px; padding: 14px 18px;
    color: #215c46; font-size: 15px;
    background: #e9f5ee; border: 1px solid #b2d5c1; border-radius: 12px;
}
.search-progress-caption { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.search-progress-label { font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.search-progress-percent { font-size: 23px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-search-progress progress {
    display: block; width: 100%; height: 18px; margin-top: 10px;
    border: 0; border-radius: 12px; overflow: hidden; accent-color: #08784f;
}
.header-search-progress progress::-webkit-progress-bar { background: #cde3d6; border-radius: 12px; }
.header-search-progress progress::-webkit-progress-value { background: #08784f; border-radius: 12px; }
.header-search-progress progress::-moz-progress-bar { background: #08784f; border-radius: 12px; }
.search-progress-icon:empty { display: none; }
.search-progress-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.search-progress-complete { background: #def3e5; border: 2px solid #168153; }
.search-progress-complete .search-progress-icon { background: #08784f; color: #fff; }
.search-progress-dismiss { position: absolute; top: 4px; right: 6px; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 23px; line-height: 1; padding: 3px 6px; }
.search-progress-complete .search-progress-caption, .search-progress-failed .search-progress-caption, .search-progress-waiting .search-progress-caption { padding-right: 12px; }
.search-progress-failed { background: #fff0eb; color: #8b321d; border-color: #db9985; }
.search-progress-waiting { background: #fff7dc; color: #6c5016; border-color: #d7bb65; }
.search-progress-dismiss:focus-visible { outline: 3px solid #c28c13; outline-offset: 2px; }
@media (max-width: 900px) {
    .workspace header { flex-wrap: wrap; }
    .header-search-progress { order: 3; flex: 1 1 100%; margin: 10px 0 0; min-width: 0; }
}

/* Compact progress and a completion state that stays inside the workspace header. */
.workspace header:has(> .header-search-progress:not(.hidden)) {
    height: auto; min-height: 74px; padding-block: 10px;
    flex-wrap: wrap; gap: 10px; align-items: center;
}
.header-search-progress {
    flex: 0 1 340px; min-width: 0; max-width: 100%;
    margin-inline: 8px; padding: 9px 12px; font-size: 13px;
    box-sizing: border-box;
}
.search-progress-caption { gap: 10px; }
.search-progress-label { line-height: 1.3; }
.search-progress-percent { font-size: 18px; }
.header-search-progress progress { height: 12px; margin-top: 6px; }
.search-progress-icon { position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; margin: 0; font-size: 17px; }
.search-progress-complete .search-progress-caption,
.search-progress-failed .search-progress-caption,
.search-progress-waiting .search-progress-caption { padding-left: 25px; padding-right: 16px; }
.search-progress-dismiss { font-size: 18px; top: 3px; right: 3px; padding: 2px 4px; }
@media(max-width:900px){
    .header-search-progress { flex: 1 1 100%; margin: 0; max-width: 100%; }
}

.workspace > main > header > .search-progress-finished {
    flex: 0 1 calc(340px - 8mm);
    max-width: 100%;
    margin-inline: 0;
}
@media (max-width: 900px) {
    .workspace > main > header > .search-progress-finished {
        flex-basis: min(calc(340px - 8mm), 100%);
        margin-inline: auto;
    }
}
