/* Public search uses the existing header toolbar and its mobile open control. */
.public-discovery-host .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap; }
.discovery-spelling:not([hidden]) { display: flex; align-items: center; padding: .5rem 1rem; min-height: 44px; text-decoration: underline; }
.discovery-spelling[hidden] { display: none; }
.public-discovery-host .discovery-popup {
    position: absolute;
    top: calc(100% + .4rem);
    inset-inline: 0;
    z-index: 80;
    max-height: min(65dvh, 31rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    color: #193c30;
    border: 1px solid #cbd7ce;
    border-radius: .8rem;
    box-shadow: 0 .65rem 1.8rem #193c302b;
}
.discovery-popup[hidden] { display: none; }
.discovery-popup ul { list-style: none; padding: .3rem; margin: 0; }
.discovery-popup ul:empty { display: none; }
.discovery-popup li { padding: 0; margin: 0; }
.discovery-popup a { text-decoration: none; color: #193c30; }
.discovery-popup .discovery-option {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: .65rem;
    padding: .45rem .7rem;
    border-radius: .4rem;
    text-align: start;
    white-space: normal;
}
.discovery-option:hover, .discovery-option[aria-selected="true"], .discovery-see-all:hover { background: #edf4ef; }
.discovery-option img { flex: none; width: 54px; height: 40px; object-fit: cover; border-radius: .25rem; }
.discovery-option > span { display: grid; min-width: 0; gap: .13rem; }
.discovery-option strong { font-size: .94rem; line-height: 1.25; overflow-wrap: anywhere; }
.discovery-option small { font-size: .77rem; line-height: 1.35; color: #526458; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.discovery-see-all { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: .55rem 1rem; border-top: 1px solid #e0e8e2; font-weight: 650; font-size: .9rem; }
.discovery-popup a:focus-visible, .discovery-results :is(a,input,button):focus-visible { outline: 3px solid #9a7028; outline-offset: -3px; }

.discovery-results {
    color: #183e30;
    width: min(100%, 57rem);
    margin-inline: auto;
    padding: clamp(1rem, 3vw, 2.35rem) clamp(.3rem, 2vw, 1.45rem) 3rem;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}
.discovery-heading { display: block; position: static; background: transparent; color: inherit; border: 0; padding: 0; margin: 0; box-shadow: none; height: auto; min-height: 0; }
.discovery-heading h1 { font-size: clamp(1.9rem, 4vw, 2.85rem); line-height: 1.13; margin: 0 0 .92rem; color: #163e31; letter-spacing: -.025em; }
body.public-premium .public-learning-header[data-public-search-page] .public-discovery-host { display: block !important; }
body.public-premium .public-learning-header[data-public-search-page] .ph-search-toggle { display: none !important; }
.discovery-types { display: flex; flex-wrap: wrap; gap: .3rem .45rem; margin: 1.25rem 0 .7rem; }
.discovery-types a { display: inline-flex; align-items: center; gap: .38rem; min-height: 40px; padding: .25rem .65rem; border: 1px solid #d2dfd5; border-radius: .45rem; color: #234a35; text-decoration: none; font-size: .88rem; }
.discovery-types a span { color: #52645b; font-size: .78rem; font-variant-numeric: tabular-nums; }
.discovery-types a[aria-current] { border-color: #214e3c; background: #214e3c; color: #fff; }
.discovery-types a[aria-current] span { color: #f4faf5; }
.discovery-types a:not([aria-current]):hover, .discovery-pagination a:hover { background: #edf4ef; }
.discovery-count { margin: 1rem 0 .6rem; color: #506158; font-size: .93rem; }
.discovery-count strong { color: #243f30; font-weight: 650; }
.discovery-matches { list-style: none; padding: 0; margin: 0; border-top: 1px solid #d8e2da; }
.discovery-matches li { margin: 0; border-bottom: 1px solid #d8e2da; }
.discovery-matches a { display: block; padding: .85rem .45rem; text-decoration: none; color: #1c4634; }
.discovery-matches a:hover { background: #f1f6f1; }
.discovery-matches a:hover h2 { text-decoration: underline; text-underline-offset: .16em; }
.discovery-matches small { color: #566b5e; font-size: .78rem; }
.discovery-matches h2 { margin: .15rem 0; font-size: clamp(1.06rem, 2.6vw, 1.25rem); line-height: 1.25; color: #173e2e; }
.discovery-matches p { margin: .24rem 0 0; color: #475c50; font-size: .93rem; line-height: 1.45; }
.discovery-empty { margin-block: 1.5rem; }
.discovery-empty h2 { font-size: 1.25rem; color: #233e30; }
.discovery-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .8rem; margin: 1.25rem 0 0; color: #53665a; font-size: .9rem; }
.discovery-pagination a { display: inline-flex; align-items: center; padding: .45rem .8rem; min-height: 44px; border: 1px solid #bdcec1; border-radius: .4rem; color: #264c37; text-decoration: none; }
.discovery-results .discovery-correction a, .discovery-empty a { color: #24523a; text-decoration: underline; text-underline-offset: .14em; }
@media (max-width: 38rem) {
    .public-discovery-host .discovery-popup { max-height: min(59dvh, 29rem); }
    .discovery-option strong { font-size: .87rem; }
    .discovery-results .discovery-types { margin-top: .85rem; }
    .discovery-types a { min-height: 44px; padding-inline: .5rem; }
}
