/* Turn the title line into a wrapping row: title + badge */
.md-search-result__article h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .4rem;
}

/* The path badge itself */
.md-search-result__path {
    display: inline-block;
    max-width: 100%;

    padding: .12rem .45rem;
    border-radius: .35rem;

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .65rem;
    line-height: 1.2;

    opacity: .85;
    background: color-mix(in srgb, var(--md-default-fg-color) 10%, transparent);
    color: color-mix(in srgb, var(--md-default-fg-color) 70%, transparent);

    /* Long paths: allow them to wrap nicely if needed */
    overflow-wrap: anywhere;
}

/* Optional: when it wraps, keep it aligned with the text nicely */
.md-search-result__path {
    margin-top: .1rem;
}
