.language-menu {
    position: relative;
    flex: 0 0 auto;
    font: 600 .9rem/1.3 system-ui, sans-serif;
}
.language-menu summary {
    min-height: 2.75rem;
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .55rem;
    border: 1px solid #81969f;
    border-radius: .45rem;
    color: inherit;
}
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary::after {
    content: '';
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    width: .35rem;
    height: .35rem;
    transform: translateY(-.11rem) rotate(45deg);
    margin-left: .1rem;
}
.language-menu[open] summary::after { transform: translateY(.06rem) rotate(225deg); }
.locale-flag {
    display: block;
    flex: 0 0 auto;
    width: 1.38rem;
    height: 1rem;
    object-fit: contain;
}
.language-options {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .18rem;
    margin: 0;
    position: absolute;
    z-index: 8;
    top: calc(100% + .4rem);
    right: 0;
    width: min(17.75rem, calc(100vw - 2rem));
    max-height: 70vh;
    overflow: auto;
    padding: .46rem;
    border-radius: .55rem;
    border: 1px solid #d9e4e7;
    background: white;
    color: #10202d;
    box-shadow: 0 .55rem 1.8rem #10202d30;
}
.language-menu .language-options a {
    display: flex;
    color: #10202d;
    align-items: center;
    gap: .42rem;
    min-height: 2.75rem;
    text-decoration: none;
    padding: .2rem .4rem;
    border-radius: .35rem;
}
.language-menu .language-options a:hover,
.language-menu .language-options a[aria-current] {
    color: #006e63;
    background: #e5f6f1;
}
.archive-language {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    justify-content: space-between;
    padding: .7rem 1rem;
    background: #eef4f4;
    color: #10202d;
    font: 1rem/1.5 system-ui, sans-serif;
}
.original-note { margin-top: .55rem; color: #455968; }
@media (max-width: 840px) {
    .masthead .language-menu { order: 2; margin-left: auto; }
    .masthead .masthead-contact { margin-left: auto; }
    .archive-language .language-menu { margin-left: auto; }
}

.site-header .webchat-link, .compact-header .webchat-link {
    color: #10202d;
    background: #b8f7e4;
    border-radius: .42rem;
    display: inline-flex;
    align-items: center;
    font-size: .9rem;
    font-weight: 700;
    min-height: 2.75rem;
    padding: .35rem .65rem;
    text-decoration: none;
}
.site-header .webchat-link:hover, .compact-header .webchat-link:hover {
    background: #dcfff6;
    color: #10202d;
}
.thought-original {
    border-top: 1px solid #d9e4e7;
    margin-top: .65rem;
    padding-top: .5rem;
}
.thought-original summary {
    width: fit-content;
    cursor: pointer;
    min-height: 2.3rem;
    color: #006e63;
    font-weight: 650;
    font-size: .9rem;
}
.thought-original p { white-space: pre-wrap; }
.translation-status { color: #455968; font-size: .85rem; }
.webchat-log, .webchat-form, .webchat-status { max-width: 46rem; }
.webchat-log:empty { display: none; }
.webchat-log > div {
    padding: .75rem 1rem;
    margin-block: .65rem;
    background: #eef4f4;
    border-radius: .4rem;
}
.webchat-log .webchat-user { background: #dcf5ee; }
.webchat-log p {
    margin: .25rem 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.webchat-form { display: grid; gap: .6rem; margin-top: 1rem; }
.webchat-form textarea {
    resize: vertical;
    padding: .65rem;
    font: inherit;
    color: #10202d;
    background: white;
    border: 1px solid #81969f;
    border-radius: .4rem;
}
.webchat-form button {
    justify-self: start;
    min-height: 2.75rem;
    font: inherit;
    font-weight: 700;
    color: white;
    background: #006e63;
    border: 0;
    border-radius: .4rem;
    padding: .35rem .9rem;
    cursor: pointer;
}
.webchat-form button:disabled { opacity: .6; cursor: default; }
.webchat-status { color: #455968; }
.search-form { max-width: 46rem; margin-bottom: 1.5rem; }
.search-form label { display: block; margin-bottom: .4rem; }
.search-form > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.search-form input {
    flex: 1 1 14rem;
    min-width: 0;
    padding: .55rem .65rem;
    font: inherit;
    color: #10202d;
    background: white;
    border: 1px solid #81969f;
    border-radius: .4rem;
}
.search-form button {
    min-height: 2.75rem;
    padding: .35rem .9rem;
    font: inherit;
    font-weight: 700;
    color: white;
    background: #006e63;
    border: 0;
    border-radius: .4rem;
    cursor: pointer;
}
.search-results { max-width: 46rem; overflow-wrap: anywhere; }
.search-results ol { padding-left: 1.5rem; }
.search-results li { margin-bottom: .9rem; }
.search-results li a { font-weight: 650; }
.search-results li p { margin: .25rem 0 0; }
@media (max-width: 840px) {
    .masthead .webchat-link { order: 2; }
}
@media (max-width: 520px) {
    .masthead { column-gap: .6rem; }
    .masthead .masthead-contact { display: none; }
}
