
.dn-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 13vh 16px 16px;
    background: rgba(8, 10, 12, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.dn-search-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.dn-search-panel {
    width: min(92vw, 580px);
    max-height: 68vh;
    display: flex;
    flex-direction: column;
    background: var(--card, hsl(210, 15%, 9%));
    border: 1px solid var(--border, hsl(210, 20%, 20%));
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    font-family: fkGroteskNeue, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transform: translateY(-8px) scale(0.985);
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.dn-search-overlay.open .dn-search-panel {
    transform: none;
}

/* --- input row --- */
.dn-search-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border, hsl(210, 20%, 18%));
}
.dn-search-head svg {
    flex: none;
    color: var(--muted-foreground, hsl(210, 20%, 65%));
}
.dn-search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.008em;
    color: var(--foreground, hsl(210, 40%, 98%));
}
.dn-search-input::placeholder {
    color: var(--muted-foreground, hsl(210, 20%, 55%));
}
.dn-search-esc {
    flex: none;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted-foreground, hsl(210, 20%, 60%));
    border: 1px solid var(--border, hsl(210, 20%, 24%));
    border-radius: 5px;
    padding: 2px 6px;
    cursor: pointer;
    background: transparent;
}

/* --- results --- */
.dn-search-results {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 8px 8px;
}
.dn-search-group {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-foreground, hsl(210, 20%, 55%));
    padding: 10px 10px 5px;
}
.dn-search-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: 9px 10px;
    cursor: pointer;
    color: var(--foreground, hsl(210, 40%, 98%));
    font: inherit;
}
.dn-search-item.active {
    background: hsl(210, 15%, 14%);
}
.dn-search-item-icon {
    flex: none;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: hsl(210, 15%, 13%);
    color: var(--muted-foreground, hsl(210, 20%, 68%));
}
.dn-search-item.active .dn-search-item-icon {
    color: var(--foreground, hsl(210, 40%, 98%));
}
.dn-search-item-body { min-width: 0; flex: 1; }
.dn-search-item-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dn-search-item-label mark {
    background: transparent;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: hsl(210, 20%, 45%);
    text-underline-offset: 2px;
}
.dn-search-item-sub {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted-foreground, hsl(210, 20%, 60%));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.dn-search-item-kbd {
    flex: none;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted-foreground, hsl(210, 20%, 60%));
    border: 1px solid var(--border, hsl(210, 20%, 24%));
    border-radius: 5px;
    padding: 2px 6px;
    opacity: 0;
}
.dn-search-item.active .dn-search-item-kbd { opacity: 1; }

.dn-search-empty {
    padding: 26px 16px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-foreground, hsl(210, 20%, 60%));
}
.dn-search-loading {
    padding: 10px 16px;
    font-size: 0.75rem;
    color: var(--muted-foreground, hsl(210, 20%, 55%));
}

/* --- footer hints --- */
.dn-search-foot {
    display: flex;
    gap: 14px;
    padding: 9px 16px;
    border-top: 1px solid var(--border, hsl(210, 20%, 18%));
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted-foreground, hsl(210, 20%, 55%));
}
.dn-search-foot kbd {
    font: inherit;
    font-weight: 600;
    border: 1px solid var(--border, hsl(210, 20%, 24%));
    border-radius: 4px;
    padding: 0 4px;
    margin-right: 3px;
}

/* --- sidebar trigger: plain, matches the site's other controls --- */
.search-button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 38px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--muted-foreground, hsl(210, 20%, 62%));
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.search-button:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--foreground, hsl(210, 40%, 98%));
}
.search-button svg { flex: none; }
.search-button .search-label {
    flex: 1;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-button .search-kbd {
    flex: none;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--muted-foreground, hsl(210, 20%, 55%));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 1px 5px;
}

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