@layer components {
    .steps {
        display: flex;
        flex-direction: column;
        gap: var(--ds-space-4);
    }

    .step-back {
        display: inline-flex;
        align-items: center;
        gap: var(--ds-space-2);
        min-height: var(--ds-layout-tap-target);
        color: var(--ds-color-text);
        font-size: var(--ds-text-body-sm-size);
        line-height: var(--ds-text-body-sm-line-height);
        text-decoration-line: underline;
        text-underline-offset: 0.2em;
    }

    .steps-list {
        display: none;
        gap: var(--ds-space-2);
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .steps-compact {
        margin: 0;
        padding-block-start: var(--ds-space-3);
        border-block-start: var(--ds-border-width-2) solid var(--ds-color-text);
        font-size: var(--ds-text-body-sm-size);
        font-weight: var(--ds-font-weight-semibold);
        line-height: var(--ds-text-body-sm-line-height);
    }

    @media (min-width: 48rem) {
        .steps-list {
            display: flex;
        }

        .steps-compact {
            display: none;
        }
    }

    .step {
        display: flex;
        flex: 1;
        min-width: 0;
        padding-block-start: var(--ds-space-3);
        border-block-start: var(--ds-border-width-2) solid var(--ds-color-border);
        color: var(--ds-color-text-muted);
    }

    .step.is-done,
    .step.is-current {
        border-block-start-color: var(--ds-color-text);
        color: var(--ds-color-text);
    }

    .step-link,
    .step-label {
        display: flex;
        gap: var(--ds-space-2);
        min-width: 0;
        min-height: var(--ds-layout-tap-target);
        color: inherit;
        text-decoration: none;
    }

    .step-number {
        flex: none;
        font-family: var(--ds-text-label-family);
        font-size: var(--ds-text-label-size);
        font-weight: var(--ds-text-label-weight);
        letter-spacing: var(--ds-text-label-tracking);
        line-height: var(--ds-text-body-sm-line-height);
    }

    .step-title {
        min-width: 0;
        font-size: var(--ds-text-body-sm-size);
        line-height: var(--ds-text-body-sm-line-height);
        overflow-wrap: break-word;
    }

    .step.is-current .step-title {
        font-weight: var(--ds-font-weight-semibold);
    }

    .step.is-done .step-title {
        text-decoration-line: underline;
        text-underline-offset: 0.2em;
    }

    .step-back:focus-visible,
    .step-link:focus-visible {
        outline: var(--ds-focus-width) solid var(--ds-color-focus);
        outline-offset: var(--ds-focus-offset);
    }

    .step-back:active,
    .step-link:active .step-title {
        text-decoration-thickness: var(--ds-border-width-2);
    }

    @media (hover: hover) {
        .step-back:hover,
        .step-link:hover .step-title {
            text-decoration-thickness: var(--ds-border-width-2);
        }
    }
}
