.site-header {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
    gap: 12px 24px;
    align-items: center;
    height: auto;
    min-height: 74px;
    padding-block: 10px;
}

.site-header .brand-wordmark {
    justify-self: start;
    max-width: 100%;
}

.rushsong-header-logo {
    display: block;
    width: clamp(104px, 13vw, 148px);
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.site-header #service-navigation {
    grid-column: 2;
    justify-content: center;
    gap: clamp(14px, 2vw, 28px);
    font-size: 15px;
}

.site-header #service-navigation > a.active {
    padding-block: 6px;
    box-shadow: inset 0 -1px var(--coral);
}

.market-preferences {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 136px));
    gap: 10px;
    justify-self: end;
}

.market-preferences form,
.market-preferences .rushsong-language-links {
    position: relative;
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

.market-preferences form[hidden] {
    display: none;
}

.market-preferences label,
.market-preferences .preference-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.market-preferences select,
.market-preferences .preference-value {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 0 28px 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-weight: 500;
    line-height: 34px;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-preferences select {
    appearance: none;
    cursor: pointer;
}

.rushsong-language-links summary {
    display: grid;
    gap: 4px;
    padding: 0;
    list-style: none;
    cursor: pointer;
    text-align: start;
}

.rushsong-language-links summary::-webkit-details-marker {
    display: none;
}

.market-preferences .preference-value {
    overflow: hidden;
}

.market-preferences form::after,
.rushsong-language-links summary::after {
    position: absolute;
    inset-inline-end: 12px;
    bottom: 16px;
    width: 6px;
    height: 6px;
    border-inline-end: 1px solid var(--muted);
    border-bottom: 1px solid var(--muted);
    transform: rotate(45deg);
    pointer-events: none;
    content: "";
}

.market-preferences select:focus-visible,
.rushsong-language-links summary:focus-visible {
    outline: 2px solid var(--coral);
    outline-offset: 2px;
}

.rushsong-language-options {
    position: absolute;
    z-index: 30;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    width: min(220px, 82vw);
    max-height: 55vh;
    overflow: auto;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
}

.rushsong-language-options a {
    display: block;
    padding: 7px 10px;
    border-radius: 4px;
    color: inherit;
    font-size: 13px;
    text-decoration: none;
}

.rushsong-language-options a:is(:hover, :focus-visible, [aria-current]) {
    color: var(--coral);
    text-decoration: underline;
}

@media (min-width: 681px) {
    .site-header #service-navigation > a {
        display: block;
    }
}

@media (min-width: 681px) and (max-width: 1020px) {
    .site-header {
        grid-template-columns: 1fr auto;
        row-gap: 8px;
    }

    .site-header #service-navigation {
        grid-area: 2 / 1 / 3 / -1;
        flex-wrap: wrap;
    }
}

@media (max-width: 680px) {
    .site-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
    }

    .site-header #service-navigation {
        top: 100%;
    }

    .market-preferences {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .rushsong-language-options {
        inset-inline-start: 0;
        inset-inline-end: auto;
    }
}
