.tool-dump {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;

    li {
        display: flex;
    }
}

.td-item {
    --td-accent: var(--ncs-primary);
    --td-tile: var(--ncs-container-weak);

    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px 16px 16px;
    border: 1px solid var(--ncs-container-strong);
    border-radius: var(--border-radius-tiny);
    background: var(--background);
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;

    &.ncs-color-consumer {
        --td-accent: var(--ncs-cc-primary);
        --td-tile: var(--ncs-cc-container-weak);
    }

    .landing-section:is(.bg-narwhal, .bg-narwhal-sanguine) & {
        --td-tile: color-mix(in srgb, var(--td-accent) 16%, transparent);
    }

    &:hover {
        transform: translate(-4px, -4px);
        box-shadow: 4px 4px 0 var(--td-accent);
        border-color: var(--td-accent);
        color: var(--text);
    }

    &:hover::after {
        content: "";
        position: absolute;
        inset: -1px -5px -5px -1px;
    }

    &:focus-visible {
        outline: 2px solid var(--td-accent);
        outline-offset: 2px;
    }
}

.td-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--td-tile);
    color: var(--td-accent);

    > svg {
        width: 22px;
        height: 22px;
    }
}

.td-item-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: start;
}

.td-item-title {
    font-size: var(--font-md);
    font-weight: var(--font-weight-bold);
    line-height: 1.35;
}

.td-item-description {
    font-size: var(--font-sm);
    line-height: 1.5;
    color: var(--text-faded);
}

.td-item-arrow {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 12px;
    color: var(--text-faded);
    transition: color 0.2s ease;

    &::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 2px;
        border-radius: 999px;
        background-color: currentColor;
        transform: translateY(-50%);
    }

    &::after {
        content: "";
        position: absolute;
        top: 50%;
        right: 0;
        width: 7px;
        height: 7px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        transform: translateY(-50%) rotate(45deg);
    }

    .td-item:hover & {
        color: var(--td-accent);
        animation: arrow-horizontal 0.35s ease-in-out;
    }

    body.rtl &::after {
        right: auto;
        left: 0;
        border-right: 0;
        border-left: 2px solid currentColor;
        transform: translateY(-50%) rotate(-45deg);
    }

    body.rtl .td-item:hover & {
        animation-name: arrow-horizontal-rtl;
    }
}

.td-cta {
    display: flex;
    justify-content: center;
    margin-top: clamp(32px, 4vw, 48px);
}

.landing-section.td-horizontal > .container {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    column-gap: clamp(28px, 5vw, 72px);
    align-items: center;

    & > .section-header {
        margin-bottom: 0;
        text-align: start;
        align-items: flex-start;

        .section-subtitle {
            margin-inline: 0;
        }
    }

    & > .tool-dump {
        grid-column: 2;
        grid-row: 1;
    }
}

.landing-section.td-horizontal.td-has-cta > .container {
    grid-template-rows: auto auto;

    & > .section-header {
        align-self: end;
    }

    & > .tool-dump {
        grid-row: 1 / span 2;
    }

    & > .td-cta {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
        justify-content: flex-start;
        margin-top: 28px;
    }
}

@media (max-width: 991px) {
    .landing-section.td-horizontal > .container,
    .landing-section.td-horizontal.td-has-cta > .container {
        display: flex;
        flex-direction: column;

        & > .section-header {
            margin-bottom: clamp(36px, 5vw, 56px);
            text-align: center;
            align-items: center;

            .section-subtitle {
                margin-inline: auto;
            }
        }

        & > .td-cta {
            align-self: center;
            justify-content: center;
            margin-top: 32px;
        }
    }
}
