.adc-steps {
    /* Values below have no counterpart in colors.css, so they are declared here once. */
    --adc-steps-surface: #eff1f4;
    --adc-steps-dot: #d9dde3;

    padding: 60px 16px;
    background: var(--color-bg-white);
}

.adc-steps__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 1408px;
    margin-inline: auto;
    padding: 80px 61px;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(
        163.692deg,
        color-mix(in srgb, var(--adc-steps-surface) 85%, transparent) 0%,
        color-mix(in srgb, var(--adc-steps-surface) 75%, transparent) 100%
    );
    box-shadow: inset 0 0 0 1px var(--color-border-soft);
}

/* ---------- header ---------- */
.adc-steps__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.adc-steps__heading {
    margin: 0;
    color: var(--color-text-dark);
    font-size: 56px;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.56px;
}

.adc-steps__lead {
    margin: 0;
    color: var(--color-muted-blue-gray);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
}

.adc-steps__br--mobile,
.adc-steps__br--tablet {
    display: none;
}

/* ---------- cards ---------- */
.adc-steps__list {
    display: flex;
    gap: 16px;
    width: min(1296px, calc(100% + 10px)); /* the design row is wider than the box padding allows */
    margin: 0;
    padding: 0;
    list-style: none;
}

.adc-steps__card {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    height: 351px;
    padding: 24px;
    overflow: hidden;
    border-radius: 20px;
    background: color-mix(in srgb, var(--color-bg-white) 50%, transparent);
    box-shadow: inset 0 0 0 1px var(--color-bg-white);
}

.adc-steps__text {
    width: 100%;
}

.adc-steps__card--assign .adc-steps__text,
.adc-steps__card--review .adc-steps__text {
    max-width: 239.61px;
}

.adc-steps__step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 7px;
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.055px;
}

.adc-steps__rule {
    flex: none;
    width: 22px;
    height: 1.5px;
    background: var(--color-border-soft);
}

.adc-steps__title {
    margin: 0 0 6px;
    color: var(--color-dark-graphite);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02px;
}

.adc-steps__copy {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
}

/* ---------- visuals ---------- */
.adc-steps__photo {
    position: relative;
    flex: none;
    width: 264px;
    height: 185px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-bg-white);
}

.adc-steps__photo-img {
    position: absolute;
    top: 0;
    left: -36px;
    display: block;
    width: 351px;
    height: 187px;
    border-radius: 8px;
    object-fit: cover;
    max-width: none;
}

.adc-steps__beam,
.adc-steps__ring {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adc-steps__beam > span,
.adc-steps__ring > span {
    position: relative;
    flex: none;
}

.adc-steps__beam {
    top: calc(50% - 15.9px);
    left: calc(50% - 19.25px);
    width: 165.189px;
    height: 135.197px;
    transform: translate(-50%, -50%);
}

.adc-steps__beam > span {
    width: 151px;
    height: 116px;
    transform: rotate(-172.3deg);
}

.adc-steps__beam img {
    position: absolute;
    top: 1.16%;
    left: 2.48%;
    display: block;
    width: 96.77%;
    height: 97.56%;
    max-width: none;
}

.adc-steps__ring {
    top: 30.31px;
    left: -9px;
    width: 122.634px;
    height: 122.634px;
}

.adc-steps__ring > span {
    width: 94px;
    height: 94px;
    transform: rotate(157.7deg);
}

.adc-steps__ring img {
    display: block;
    width: 100%;
    height: 100%;
}

/* product screenshots: exported from the design already cropped to what the card shows */
.adc-steps__shot {
    position: absolute;
    display: block;
    max-width: none;
    pointer-events: none;
}

.adc-steps__card--assign .adc-steps__shot {
    top: 134.3px;
    left: 16.83px;
    width: 276.33px;
    height: auto;
}

.adc-steps__card--detect .adc-steps__shot {
    top: 163px;
    left: 23px;
    width: 288px;
    height: auto;
}

.adc-steps__shot--camera {
    top: 137px;
    left: 20px;
    width: 223px;
    height: auto;
}

.adc-steps__shot--timeline {
    top: 265px;
    left: 163px;
    width: 148px;
    height: auto;
}

/* ---------- dots (mobile carousel only) ---------- */
.adc-steps__dots {
    display: none;
}

/* ---------- tablet: one card per row, text left, visual right ----------
   four columns get too narrow for the 264px visuals below ~1360px, so the stack starts there */
@media (max-width: 1360px) {
    .adc-steps {
        padding: 40px 16px;
    }

    .adc-steps__box {
        padding: 60px;
    }

    .adc-steps__heading {
        font-size: 42px;
        line-height: 1.16;
        letter-spacing: -0.21px;
    }

    .adc-steps__lead {
        font-size: 18px;
        line-height: 1.44;
    }

    .adc-steps__list {
        flex-direction: column;
        width: 100%;
        container-type: inline-size;
    }

    .adc-steps__card {
        flex: none;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        height: 200px;
        padding: 48px 24px 0;
    }

    .adc-steps__step {
        margin-bottom: 16px;
    }

    .adc-steps__title {
        margin-bottom: 8px;
    }

    .adc-steps__br--tablet {
        display: inline;
    }

    .adc-steps__photo {
        position: absolute;
        top: 21.48px;
        right: min(24px, calc(100cqw - 580px));
        height: 158px;
    }

    .adc-steps__ring {
        top: 15.3px;
    }

    .adc-steps__card--assign .adc-steps__shot {
        top: 7.8px;
        right: min(17.84px, calc(100cqw - 580px));
        left: auto;
    }

    .adc-steps__card--detect .adc-steps__shot {
        top: 48.5px;
        right: min(0px, calc(100cqw - 580px));
        left: auto;
        width: 289px;
    }

    .adc-steps__shot--camera {
        --vr: min(19px, calc(100cqw - 619px)); /* 638px card (790 design) keeps the panel fully visible, 19px from the edge */
        top: 16.5px;
        right: var(--vr);
        left: auto;
    }

    .adc-steps__shot--timeline {
        top: 126.5px;
        right: calc(var(--vr, 19px) + 175px);
        left: auto;
    }
}

/* ---------- mobile: a horizontal carousel with dots ----------
   a tablet row needs ~550px to keep text and visual apart, so the carousel starts at 740px */
@media (max-width: 740px) {
    .adc-steps {
        padding: 60px 8px 0;
    }

    .adc-steps__box {
        gap: 24px;
        padding: 32px 0 24px 16px;
        border-radius: 28px;
    }

    .adc-steps__header {
        gap: 8px;
        padding-right: 16px;
    }

    .adc-steps__heading {
        font-size: 32px;
        line-height: 1.18;
        letter-spacing: -0.16px;
    }

    .adc-steps__lead {
        font-size: 14px;
        line-height: 1.5;
    }

    .adc-steps__br--mobile {
        display: inline;
    }

    .adc-steps__br--tablet {
        display: none;
    }

    .adc-steps__list {
        flex-direction: row;
        width: 100%;
        padding-right: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        container-type: normal;
    }

    .adc-steps__list::-webkit-scrollbar {
        display: none;
    }

    .adc-steps__card {
        flex: 0 0 314px;
        height: 338px;
        padding: 24px;
        border-radius: 20px;
        scroll-snap-align: start;
    }

    .adc-steps__step {
        margin-bottom: 7px;
    }

    .adc-steps__title {
        margin-bottom: 4px;
        font-size: 16px;
        line-height: 1.37;
        letter-spacing: 0;
    }

    .adc-steps__copy {
        font-size: 13px;
        line-height: 1.54;
    }

    .adc-steps__photo {
        top: 129px;
        right: auto;
        left: 24px;
        height: 185px;
    }

    .adc-steps__ring {
        top: 30.31px;
    }

    .adc-steps__card--assign .adc-steps__shot {
        top: 123.3px;
        right: auto;
        left: 17.83px;
    }

    .adc-steps__card--detect .adc-steps__shot {
        top: 129px;
        right: auto;
        left: 24px;
    }

    .adc-steps__shot--camera {
        top: 129px;
        right: auto;
        left: 24px;
    }

    .adc-steps__shot--timeline {
        top: 257px;
        right: auto;
        left: 167px;
    }

    .adc-steps__dots {
        display: flex;
        align-items: center;
        gap: 4px;
        height: 12px;
        padding-right: 16px;
    }

    .adc-steps__dots span {
        width: 12px;
        height: 4px;
        border-radius: 2px;
        background: var(--adc-steps-dot);
        transition: width 0.2s ease, background-color 0.2s ease;
    }

    .adc-steps__dots span.is-active {
        width: 28px;
        background: var(--color-text-primary);
    }
}

@media (prefers-reduced-motion: reduce) {
    .adc-steps__dots span {
        transition: none;
    }
}
