/* The Loader sets inline horizontal clipping on body. Once it has finished,
   keep that clipping without making body a non-scrolling sticky container. */
body[data-mobile-services-scroll] {
    overflow-x: clip !important;
}

#services[data-mobile-services] {
    overflow: clip;
}

#services[data-mobile-services] .services-scroll-scene {
    display: none;
}

[data-mobile-services] .services-scroll-track {
    --mobile-chapter-step: clamp(8rem, 28svh, 15rem);
    --mobile-stage-edge: rgba(127, 203, 219, .23);
    position: relative;
    overflow-anchor: none;
}

.services-mobile-stage {
    position: sticky;
    top: var(--mobile-services-top);
    display: grid;
    gap: 0 .75rem;
    padding: .8rem;
    color: #e6f1f3;
    border: 1px solid var(--mobile-stage-edge);
    border-radius: 1.1rem;
    background: linear-gradient(148deg, #142f3a, #0d202b 67%);
    box-shadow: 0 1rem 2rem rgba(3, 13, 20, .24);
}

.services-mobile-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    padding-inline: .15rem;
}

.services-mobile-header h2 {
    color: #e6f1f3;
    font-size: clamp(1rem, 4.2vw, 1.25rem);
    font-weight: 700;
    letter-spacing: -.022em;
}

.services-mobile-count {
    color: #abc6ce;
    font-size: .75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.services-mobile-count span {
    color: #f6846b;
}

.services-mobile-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .3rem;
}

.services-mobile-progress a {
    display: grid;
    align-items: center;
    min-block-size: 2.25rem;
    border-radius: .35rem;
}

.services-mobile-progress a::after {
    content: '';
    height: .23rem;
    border-radius: 1rem;
    background: #3f5d68;
}

.services-mobile-progress a[data-passed]::after {
    background: #64b4c6;
}

.services-mobile-progress a[aria-current='step']::after {
    background: #f6846b;
}

.services-mobile-media,
.services-mobile-copy {
    display: grid;
    overflow: clip;
}

.services-mobile-media {
    height: clamp(6rem, 36svh, 19rem);
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    border-radius: .65rem;
    background: #183541;
    isolation: isolate;
}

.services-mobile-media img,
.services-mobile-copy article {
    grid-area: 1 / 1;
}

.services-mobile-media img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.services-mobile-copy {
    margin: .75rem .15rem .65rem;
}

.services-mobile-copy h3 {
    color: #f0f7f8;
    font-size: clamp(1.06rem, 4.7vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -.022em;
    line-height: 1.18;
    text-wrap: balance;
}

.services-mobile-copy p {
    margin-block-start: .4rem;
    color: #c4d9df;
    font-size: .875rem;
    line-height: 1.42;
}

.services-mobile-view,
.services-mobile-details-header button {
    justify-self: start;
    min-block-size: 2.75rem;
    padding-inline: .85rem;
    border: 1px solid #577f8c;
    border-radius: .5rem;
    background: #1a3b49;
    color: #edf7f9;
    font-size: .875rem;
    font-weight: 700;
}

.services-mobile-view::after {
    content: ' →' / '';
    padding-inline-start: .4rem;
    color: #87d4e6;
}

.services-mobile-progress a:focus-visible,
.services-mobile-view:focus-visible,
.services-mobile-details-header button:focus-visible {
    outline: 2px solid #8ed9ec;
    outline-offset: 2px;
}

.services-mobile-runway {
    height: calc(var(--mobile-chapter-step) * 5.64);
}

.mobile-service-stop {
    position: absolute;
    inset-inline-start: 0;
    scroll-margin-top: var(--mobile-services-top);
    pointer-events: none;
}

.services-mobile-details {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    overscroll-behavior: contain;
    color: #e6f1f3;
    background: #0d222c;
}

.services-mobile-details-inner {
    max-width: 38rem;
    /* Keep overscroll containment active for short descriptions, too. */
    min-height: calc(100dvh + 1px);
    margin-inline: auto;
    padding: 0 1.1rem max(1.5rem, env(safe-area-inset-bottom));
}

.services-mobile-details-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: flex-end;
    padding-block: max(.75rem, env(safe-area-inset-top)) .75rem;
    background: #0d222c;
}

.services-mobile-details h2 {
    margin: .5rem 0 1rem;
    color: #edf7f9;
    font-size: clamp(1.35rem, 6vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
}

#services .services-mobile-details .service-offering-points {
    color: #c4d9df;
}
