/* Shared layouts for the migrated reference and campaign pages. */

.sl-reference .ri__d dd,
.sl-reference .ri__d li,
.sl-landing .sl-links li {
    overflow-wrap: anywhere;
}

.sl-reference .ri__txt > :where(p, ul, ol, blockquote, figure, table):where(:not(.fig, .qt)) + :where(p, ul, ol) {
    margin-top: 1em;
}

.sl-landing .sl-prose > * + * {
    margin-block-start: 1em;
}

.sl-landing .sl-prose > * + :is(h2, h3, h4) {
    margin-block-start: 1.75em;
}

.sl-landing .sl-prose :is(ol, ul) > li + li {
    margin-block-start: .5em;
}

.sl-reference .ri__txt :where(ul, ol),
.sl-landing .sl-prose :where(ul, ol) {
    padding-inline-start: 1.3em;
}

.sl-reference .sl-case-media {
    max-width: 1040px;
    margin: 0 auto;
}

.sl-reference .sl-case-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: clamp(12px, 2vw, 24px);
}

.sl-reference .sl-case-aside,
.sl-landing .sl-landing-cta {
    background: var(--beige);
}

.sl-reference .sl-case-aside .wrap,
.sl-landing .sl-landing-cta:not(.sec--beige) .wrap {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(24px, 4vw, 72px);
    align-items: center;
}

.sl-reference .sl-case-contact,
.sl-landing .sl-landing-contact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.sl-reference .sl-case-contact img,
.sl-landing .sl-landing-contact img {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.sl-reference .sl-case-contact :where(h3, p),
.sl-landing .sl-landing-contact :where(h3, p) {
    margin: 0;
}

.sl-reference .sl-related > .wrap,
.sl-landing .sl-related > .wrap {
    display: grid;
    gap: clamp(20px, 3vw, 40px);
}

.sl-landing .sl-related > .wrap {
    grid-template-columns: minmax(0, 1fr);
}

.sl-landing :is(.sl-landing-section, .sl-landing-cta, .sl-related) {
    overflow-wrap: anywhere;
}

.sl-links {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    column-gap: clamp(14px, 3vw, 44px);
    list-style: none;
}

.sl-links li {
    min-width: 0;
    border-bottom: var(--lw, 1px) solid var(--line);
}

.sl-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding-block: 10px;
    color: inherit;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
}

.sl-links a:hover,
.sl-links a:focus-visible {
    text-decoration-color: var(--red);
}

.sl-landing .sl-landing-hero .ph__in {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: clamp(28px, 5vw, 92px);
    align-items: center;
    padding-block: clamp(48px, 6vw, 108px);
}

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

.sl-landing .sl-landing-art {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    aspect-ratio: 1 / .9;
    border-radius: 999px 999px 0 0;
    background: var(--beige);
}

.sl-landing .sl-landing-art img {
    display: block;
    width: 60%;
    height: auto;
}

.sl-landing .sl-landing-service {
    background: var(--beige);
}

.sl-landing .sl-landing-service::after {
    display: none;
}

.sl-landing .sl-landing-service .sl-landing-art {
    background: var(--white);
}

.sl-landing .sl-landing-section .wrap {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(24px, 5vw, 90px);
    align-items: start;
}

.sl-landing .sl-prose {
    max-width: 42rem;
    line-height: 1.6;
}

.sl-landing .sl-landing-cta .sl-prose {
    margin-block-start: 1.5em;
}

.sl-landing .sl-landing-reference-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: clamp(20px, 3vw, 40px);
    list-style: none;
    padding: 0;
}

.sl-landing .sl-landing-reference-cards li {
    border-block-start: var(--lw, 1px) solid var(--line);
    padding-block-start: 1em;
}

.sl-landing .sl-landing-reference-cards h3 {
    margin-block-end: .5em;
}

.sl-landing details {
    border-bottom: var(--lw, 1px) solid var(--line);
    padding-block: 14px;
}

.sl-landing details summary {
    cursor: pointer;
    font-weight: 600;
}

.sl-landing details[open] > p {
    margin-top: 8px;
}

@media (max-width: 760px) {
    .sl-reference .sl-case-aside .wrap,
    .sl-landing .sl-landing-cta:not(.sec--beige) .wrap,
    .sl-landing .sl-landing-hero .ph__in,
    .sl-landing .sl-landing-section .wrap {
        grid-template-columns: minmax(0, 1fr);
    }

    .sl-landing .sl-landing-art {
        max-width: 260px;
    }
}

.sl-case-prose {
    max-width: 46rem;
    margin-top: 20px;
    line-height: 1.65;
}

.sl-case-prose > * + *,
.sl-case-grid p {
    margin-top: 14px;
}

.sl-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: clamp(16px, 3vw, 48px);
    margin-top: clamp(20px, 3vw, 48px);
}

.sl-case-grid > div {
    padding-top: 16px;
    border-top: var(--lw, 1px) solid var(--line);
}

.sl-case-section .h2 + .h3 {
    margin-top: 14px;
}

.sl-case-media {
    margin: 0;
}

.sl-case-quote {
    max-width: 50rem;
    margin: 20px 0 0;
    font-size: clamp(19px, 2vw, 27px);
    line-height: 1.55;
}

.sl-case-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 16px;
    font-style: normal;
}

.sl-reference .ph__copy,
.sl-landing .ph__copy {
    min-width: 0;
}

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

.sl-reference-contact-intro {
    margin-block: 12px 24px;
}

.sl-reference--full .sl-phase-number {
    align-self: start;
}

.sl-reference--full :where(.sl-phase-number, .ri__n) {
    user-select: none;
}

.sl-reference--full .lt:not(:where([data-sl-section-layout^="referenssi-"] .lt)) > p:not(.k, .lead) {
    max-width: 42rem;
    line-height: 1.6;
}

.sl-content-missing {
    color: #a02927;
    font-size: .78em;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.sec--dark .sl-content-missing {
    color: #ffaba6;
}
