/* Placeholder graphics are only for slots without editorial media. */
.kp:has(img, video)::before,
.kp:has(img, video)::after {
    display: none;
}

.kp :is(img, video) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Native Gutenberg videos shrink with the same column as editorial images. */
:where(.wp-block-video) > video:where(:not(.mv__v)) {
    display: block;
    max-width: 100%;
    height: auto;
}

.fig__img :where(.wp-block-video),
.fig__img :where(.wp-block-video) > video:where(:not(.mv__v)) {
    width: 100%;
}

[data-sl-motion-probe] {
    position: fixed;
    inset: 0 auto auto 0;
    width: 0;
    height: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    [data-sl-motion-probe] { width: 1px; }
    video[data-sl-motion-video] { display: none !important; }
}

.art-rel .wc__img,
.sl-related .wc__img {
    aspect-ratio: 4 / 3;
}

:is(.art-rel, .sl-related) .wc__img img {
    object-position: center;
}

:is(.art-rel, .sl-related) .wc__t {
    text-wrap: balance;
}

.art-rel .ctas {
    margin-top: clamp(24px, 4vw, 48px);
}

/* A standalone product pattern paints its own surface instead of the page shell. */
html.liukuma :is([data-sl-section-layout^="product-"][data-bg], [data-sl-section-layout^="product-"] [data-bg]) {
    background-color: var(--bgnow, var(--cream)) !important;
}

.sl-landing .sl-landing-hero .ph__in {
    column-gap: clamp(24px, 4vw, 80px);
    padding-block: clamp(40px, 6vw, 100px) 0;
    align-items: end;
}

.sl-landing .sl-landing-hero .ph__copy {
    grid-column: auto;
    padding-block-end: clamp(40px, 5vw, 80px);
}

.sl-landing .sl-landing-art.ph__arch {
    display: block;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1.04;
    align-self: end;
}

.sl-landing .sl-landing-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* These portrait illustrations have empty canvas above the drawing. */
.sl-landing .sl-landing-art img:is([src$="/investointi.svg"], [src$="/raataloity-kansi.svg"]) {
    object-position: center bottom;
}

@media (min-width: 981px) {
    .sl-landing .sl-landing-art img:is([src$="/investointi.svg"], [src$="/raataloity-kansi.svg"]) {
        transform: scale(1.25);
        transform-origin: center 88%;
    }
}

main :is(h1, h2, h3, h4, .wc__t) {
    -webkit-hyphens: manual;
    hyphens: manual;
    overflow-wrap: normal;
}

/* Extremely narrow screens can still display an unbreakable product name. */
@media (max-width: 350px) {
    main :is(h1, h2, h3, h4, .wc__t) {
        overflow-wrap: break-word;
    }
}

.sl-landing .sl-related .wg--landing-references {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .sl-landing .sl-related .wg--landing-references {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .sl-landing .sl-related .wg--landing-references {
        grid-template-columns: minmax(0, 1fr);
    }
}

.rows--circled a::after {
    display: none;
}

.rows--circled a > .rows__arrow {
    display: grid;
    place-items: center;
    grid-column: 2;
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    color: var(--ink);
    border: var(--lw) solid currentColor;
    border-radius: 50%;
}

.rows__arrow::before {
    content: '';
    width: 18px;
    height: 12px;
    background: currentColor;
    mask: var(--arw) center / contain no-repeat;
    transition: transform .3s var(--ease);
}

.rows--circled a:is(:hover, :focus-visible) > .rows__arrow {
    color: var(--cream);
    background-color: var(--ink);
    border-color: var(--ink);
}

.rows--circled a:is(:hover, :focus-visible) .rows__arrow::before {
    transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
    .rows__arrow::before {
        transition: none;
    }
}

.sl-landing .sl-landing-section.sl-landing-wide > .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(12px, 2vw, 32px);
}

.sl-reference--full #tavoitteet .nl > li {
    display: block;
    position: relative;
    padding-inline-start: 34px;
}

.sl-reference--full #tavoitteet .nl > li::before {
    position: absolute;
    inset-inline-start: 0;
}

.sl-landing .sl-prose li + li {
    margin-block-start: .55em;
}

.sl-landing .sl-prose ul:not(.oa-tiles, .nl, .rows, .steps, .lk, .kx__l) {
    list-style: none;
    padding-inline-start: 0;
}

.sl-landing .sl-prose ul:not(.oa-tiles, .nl, .rows, .steps, .lk, .kx__l) > li {
    position: relative;
    padding-inline-start: 1.2em;
}

.sl-landing .sl-prose ul:not(.oa-tiles, .nl, .rows, .steps, .lk, .kx__l) > li::before {
    content: '';
    position: absolute;
    top: .72em;
    left: 0;
    width: .36em;
    height: .36em;
    border-radius: 50%;
    background: var(--red);
}

.sl-landing .sl-landing-cta:not(.sec--beige) > .oa-cta {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: start;
    column-gap: clamp(36px, 8vw, 144px);
}

.sl-landing .sl-landing-cta .lead + .lead {
    margin-block-start: .8em;
}

.sl-landing .sl-landing-cta .oa-pe a {
    overflow-wrap: anywhere;
}

.sl-landing .sl-related > .wrap:not(:has(.sh)) {
    gap: clamp(16px, 3vw, 32px);
}

.sl-integration-directory .sp {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(34px, 6vw, 86px) clamp(24px, 6vw, 92px);
}

.sl-integration-directory .h3 {
    margin-bottom: 16px;
}

.sl-integration-directory .rows a {
    padding-block: 13px;
}

@media (max-width: 980px) {
    .sl-landing .sl-landing-hero .ph__in {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 24px;
    }

    .sl-landing .sl-landing-hero .ph__copy {
        padding-block-end: 0;
    }

    .sl-landing .sl-landing-art.ph__arch {
        grid-column: 1;
        max-width: 330px;
        aspect-ratio: 4 / 3;
        justify-self: center;
    }
}

@media (max-width: 760px) {
    .sl-landing .sl-landing-cta:not(.sec--beige) > .oa-cta,
    .sl-integration-directory .sp {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Landing blocks supply the text. Apply the shared design layouts around it. */
.sl-landing [data-sl-pattern="ed"] > .wrap,
.sl-landing [data-sl-pattern="kx"] > .wrap {
    display: block;
}

.sl-landing [data-sl-pattern="ed"] .sh {
    margin-bottom: clamp(28px, 4vw, 64px);
}

.sl-landing [data-sl-pattern="ed"] .ed__img {
    aspect-ratio: auto;
}

.sl-landing [data-sl-pattern="ed"] .ed__c {
    min-width: 0;
    padding-block: 0;
}

@media (min-width: 981px) {
    .sl-landing .ed--reverse > .ed__img {
        grid-area: 1 / 2;
    }

    .sl-landing .ed--reverse > .ed__c {
        grid-area: 1 / 1;
        padding-inline: var(--cr) clamp(48px, 5vw, 96px);
    }
}

@media (max-width: 980px) {
    .sl-landing [data-sl-pattern="ed"] .ed__img {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .sl-landing [data-sl-pattern="ed"] .ed__c {
        padding: clamp(24px, 4vw, 48px) var(--pad) 0;
    }
}

.sl-landing [data-sl-pattern="kx"] .sl-prose,
.sl-landing [data-sl-pattern]:has(.oa-tiles, .nl, .rows, .steps) .sl-prose:not(article > .sl-prose) {
    max-width: none;
}

.sl-landing [data-sl-pattern="kx"] .kh {
    align-items: start;
}

.sl-landing [data-sl-pattern="kx"] .kh > .lead {
    max-width: none;
    grid-column: 8 / -1;
}

.sl-landing [data-sl-pattern="kx"] .kh > .lead p + p {
    margin-block-start: 1em;
}

.sl-landing [data-sl-pattern="kx"] .kx__r > p {
    grid-column: 7 / -1;
}

.sl-landing [data-sl-pattern="kx"] a {
    color: var(--cream);
}

@media (max-width: 760px) {
    .sl-landing [data-sl-pattern="kx"] .kh > .lead,
    .sl-landing [data-sl-pattern="kx"] .kx__r > p {
        grid-column: 1 / -1;
    }
}

.sl-landing [data-sl-pattern="sh"] .sl-prose {
    max-width: 54rem;
}

.sl-landing [data-sl-pattern="steps"] .steps {
    counter-reset: step;
}

.sl-landing [data-sl-pattern="steps"] .step {
    counter-increment: step;
    min-width: 0;
}

.sl-landing [data-sl-pattern="steps"] .step__n::before {
    content: counter(step, decimal-leading-zero);
}

.sl-landing :is(.oa-tiles, .nl, .steps, .lk, .kx__l, .rows) > li + li {
    margin-block-start: 0;
}

.sl-landing .oa-tiles--open > li:not(:has(h3)) {
    padding-block-start: 54px;
}

/* Keep the list's text and any inline links in one column after the number. */
.sl-landing .nl > li {
    display: block;
    position: relative;
    padding-inline-start: 34px;
}

.sl-landing .nl > li::before {
    position: absolute;
    inset-inline-start: 0;
}

/* Keep full-width landing headings readable at the smallest supported width. */
@media (max-width: 350px) {
    .sl-landing [data-sl-pattern] h2.h2 {
        font-size: clamp(24px, 7.6vw, 29px);
    }
}

.sl-landing [data-sl-pattern="ed"] .ed__img--light {
    background: var(--white);
}

.sl-landing [data-sl-pattern="ed"] .ed__img--light img {
    object-fit: contain;
    padding: clamp(24px, 3vw, 56px);
}

/* Service sections are already structured as editable design components. */
.sl-service-section :is(h1, h2, h3, p, summary, li) {
    overflow-wrap: anywhere;
}

/* Keyboard users can reach a link before the scroll reveal completes. */
html.js[data-input="keyboard"] .sl-service-section [data-ilmesty]:focus-within {
    opacity: 1;
    transform: none;
    transition: none;
}

.sl-landing .sl-service-hero .ph__in {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
}

.sl-service-hero .ph__copy .ph__h {
    max-inline-size: 100%;
    overflow-wrap: anywhere;
}

.sl-landing .sl-service-hero .ph__arch {
    grid-row: 1;
    width: clamp(300px, min(34vw, 62vh), 734px);
    max-width: 100%;
    aspect-ratio: 1 / 1.18;
    justify-self: end;
}

.sl-service-cards-head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}

.sl-service-cards-head .lead {
    max-width: 34em;
}

.sl-service-section:has(+ .sec--jatko) {
    padding-bottom: calc(var(--sec) * .6);
}

.sl-landing .sl-service-section .ed__c {
    align-self: center;
    gap: 18px;
}

.sl-service-section .ed__c > p {
    line-height: 1.65;
}

.sl-service-section .ed__ft {
    inline-size: 100%;
}

.sl-service-section .steps {
    margin: 0;
}

.sl-service-section .kx__l {
    margin: 0;
}

.sl-service-section .wg--service-references {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sl-landing .sl-service-section.sl-related > .wrap {
    display: block;
}

.sl-service-section .wg--service-references .wc__img {
    aspect-ratio: 4 / 3;
}

.sl-service-section .sh > .tl {
    justify-self: start;
}

.sl-service-contact-copy .ctas > .btn {
    inline-size: fit-content;
    text-align: center;
}

.sl-service-person {
    min-width: 0;
    max-width: 100%;
}

.sl-service-person > div {
    max-inline-size: 100%;
}

.sl-service-person .sl-service-person-name {
    font-size: clamp(26px, 2.2vw, 34px);
    line-height: 1.15;
    letter-spacing: -.015em;
    font-weight: 600;
}

.sl-service-person .sl-service-person-role {
    color: var(--muted);
    margin-top: 6px;
    font-size: 16px;
}

.sl-service-person .sl-service-person-email {
    margin-top: 6px;
}

.oa-cta .sl-service-person .sl-service-person-email a[href^="mailto:"] {
    font-size: 17px;
    font-weight: 400;
    white-space: normal;
    min-inline-size: 0;
    max-inline-size: 100%;
    overflow-wrap: anywhere;
}

@media (min-width: 1281px) {
    .sl-service-section .sl-service-steps--six {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (min-width: 981px) and (max-width: 1280px) {
    .sl-service-section .sl-service-steps--six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sl-service-section .sl-service-steps--six::before {
        display: none;
    }

    .sl-service-section .oa-tiles--5 > article {
        grid-column: span 2;
    }

    .sl-service-section .oa-tiles--5 > article:nth-child(n+4) {
        grid-column: span 3;
    }
}

@media (max-width: 980px) {
    .sl-landing .sl-service-hero .ph__in {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 24px;
    }

    .sl-landing .sl-service-hero .ph__copy {
        padding-block-end: 0;
    }

    .sl-landing .sl-service-hero .ph__arch {
        grid-row: 2;
        width: min(64vw, 400px);
    }

    .sl-service-cards-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .sl-service-section .wg--service-references {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .sl-landing .sl-service-hero .ph__arch {
        width: min(76vw, 300px);
    }
}

@media (max-width: 600px) {
    .sl-service-section .wg--service-references {
        grid-template-columns: minmax(0, 1fr);
    }

    .sl-service-section .ed__ft::before,
    .sl-service-section .ed__ft::after {
        display: none;
    }
}

@media (max-width: 420px) {
    .sl-service-section[data-sl-pattern="steps"] h2 {
        font-size: clamp(30px, 8vw, 34px);
        text-wrap: balance;
    }
}

/* Keep long Finnish words inside their reference column on narrow screens. */
@media (max-width: 420px) {
    .sl-reference :is(h1, h2, h3, h4, p, dd, li, a, .wc__t) {
        overflow-wrap: anywhere;
    }
}

.sl-article-search__cover {
    display: block;
    margin-top: 8px;
}

.sl-links .sl-site-results__article {
    flex-direction: column;
    align-items: flex-start;
}

.sl-article-search__cover img {
    display: block;
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}
