/* =====================================================
   CUT — search overlay (glass, centered)
   Loaded on every page, so the search looks the same everywhere.
   ===================================================== */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

/* ---------- Search (glass, centered) ---------- */
.cut-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;          /* vertical centre of the screen */
    justify-content: center;      /* horizontal centre */
    background: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);   /* blurs the page behind, a little */
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.cut-search-overlay.is-open { opacity: 1; visibility: visible; }

.cut-search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    width: min(640px, calc(100% - 32px));
    height: 64px;
    padding: 0 26px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 12px 40px rgba(0, 0, 0, 0.15);
    font-family: var(--sans, "Roboto", Helvetica, Arial, sans-serif);
    color: var(--ink, #000);
}
.cut-search-box > svg { width: 24px; height: 24px; flex: none; }
.cut-search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    font-size: 20px;
    color: var(--ink, #000);
}
.cut-search-box input::placeholder { color: rgba(0, 0, 0, 0.5); }

/* results hang below the bar, so the bar itself stays centred */
.cut-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    max-height: min(50vh, 420px);
    overflow-y: auto;
    padding: 8px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 12px 40px rgba(0, 0, 0, 0.15);
}
.cut-search-results.has-results { display: block; }
.cut-search-results a {
    display: block;
    padding: 12px 18px;
    border-radius: 20px;
    color: var(--ink, #000);
    text-decoration: none;
}
.cut-search-results a:hover { background: rgba(255, 255, 255, 0.5); }
.cut-search-results a:hover strong { color: var(--green, #7CB40C); }
.cut-search-results strong { display: block; font-weight: 500; font-size: 17px; }
.cut-search-results span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 2px;
    font-family: var(--sans, "Roboto", Helvetica, Arial, sans-serif);
    font-size: 16px;
    line-height: 1.25;
    color: rgba(0, 0, 0, 0.7);
}
.cut-search-empty { margin: 0; padding: 12px 18px; font-size: 16px; color: rgba(0, 0, 0, 0.6); }

/* grouped results: Articles / Authors / Tags */
.cut-search-group {
    margin: 10px 18px 2px;
    font-size: 13px;
    color: #7d7d7d;
}
.cut-search-group:first-child { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
    .cut-search-overlay { transition: none; }
}
