/* Site search overlay, backed by the Pagefind index generated at build time.
   Styled after Ghost's sodo-search modal so the port keeps the same feel. */
.gh-search-modal {
    position: fixed;
    inset: 0;
    z-index: 3999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 16px 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.gh-search-modal.is-open { display: flex; }
html.gh-search-open { overflow: hidden; }
.gh-search-box {
    width: 100%;
    max-width: 580px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    color: #15171a;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
.gh-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.gh-search-input-wrap svg { flex: 0 0 auto; width: 20px; height: 20px; color: #7c8b9a; }
.gh-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1.4;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}
.gh-search-input::-webkit-search-cancel-button { display: none; }
.gh-search-input::placeholder { color: #7c8b9a; }
.gh-search-close {
    flex: 0 0 auto;
    padding: 3px 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    background: #f4f5f6;
    color: #626d79;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.gh-search-results { overflow-y: auto; padding: 8px 0; }
.gh-search-results:empty { display: none; }
.gh-search-heading {
    margin: 10px 20px 4px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7c8b9a;
}
.gh-search-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    color: inherit;
    text-decoration: none;
}
.gh-search-result:hover, .gh-search-result:focus { background: #f4f5f6; }
.gh-search-result img {
    flex: 0 0 auto;
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background: #e5e9ed;
}
.gh-search-result-text { display: flex; flex-direction: column; min-width: 0; }
.gh-search-result-title { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.gh-search-result-excerpt {
    margin-top: 2px;
    font-size: 1.3rem;
    line-height: 1.4;
    color: #626d79;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gh-search-result mark { background: transparent; color: var(--ghost-accent-color, #15171a); font-weight: 700; }
.gh-search-empty { margin: 0; padding: 16px 20px; font-size: 1.4rem; color: #626d79; }
@media (max-width: 767px) {
    .gh-search-modal { padding: 16px; }
}
