/* The "Download the data" / "Open in canvas" card under a search result
   (#introduction on email, username and phone). Compact: both actions side
   by side on one row next to the heading, instead of a tall stacked column. */
#introduction {
    padding: 14px 18px !important;
    align-items: center;
    row-gap: 12px !important;
    column-gap: 16px;
}

#introduction > .items-end {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

#introduction [data-canvas-link],
#introduction .tf-cl-group {
    margin-top: 0 !important;
}

/* The download menu drops below the row, aligned to its right edge. The
   anchor is taken out of the flow: as a wrapped zero-height flex line it added
   a row gap under the buttons and pushed them off the card's vertical centre. */
#introduction > .items-end {
    position: relative;
}
#introduction .tf-dl-anchor {
    position: absolute;
    top: 100%;
    right: 0;
    width: 0;
    height: 0;
}

/* Phones: the actions stack as full-width buttons of one width each, instead
   of a ragged pair of rows. */
@media (max-width: 520px) {
    #introduction > .items-end {
        justify-content: flex-start;
        width: 100%;
    }
    #introduction > .items-end > .tf-dl-btn,
    #introduction > .items-end > .tf-cl-group {
        flex: 1 1 100%;
        justify-content: center;
    }
    #introduction .tf-cl-group > [data-canvas-link] {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* username.html still carries an unused, hidden menu shell (.w-0.h-0) in this
   row; keep it from taking a gap slot and shifting the buttons off the edge. */
#introduction > .items-end > .w-0.h-0 {
    position: absolute;
}
