/* Modular Wrap landing (choose standard vs customisation) — scoped design tokens */
.mwl-page {
    --mwl-ink: #101820;
    --mwl-muted: #6b7785;
    --mwl-line: #e4eaf0;
    --mwl-line-strong: #cfd9e2;
    --mwl-blue: #25a9e0;
    --mwl-blue-dark: #1b8ec0;
    --mwl-surface: #f6f9fb;
    background: #fff;
    color: var(--mwl-ink);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mwl-page *,
.mwl-page *::before,
.mwl-page *::after {
    box-sizing: border-box;
}

.mwl-page .mwl-shell {
    /* Comfortable page gutter; grid itself caps width below */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Compact page intro ---------- */
.mwl-page .mwl-page-intro {
    margin-bottom: 0.85rem;
}

.mwl-page .mwl-lede {
    margin: 0;
    color: var(--mwl-muted);
    font-size: 15px;
    line-height: 1.45;
    font-weight: 500;
    text-align: center;
}

/* ---------- Choice cards ---------- */
.mwl-page .mwl-choices {
    padding: 0.85rem 0 0.5rem;
}

/* Default: ONE column for phones + typical laptops (≤1535px).
   Two columns only on large desktops — see min-width: 1536px below. */
.mwl-page .mwl-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: stretch;
    width: 100%;
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}

.mwl-page .mwl-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    max-width: 740px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    background: #fff;
    border: 1px solid var(--mwl-line);
    border-radius: 12px;
    padding: 1.1rem 1.15rem 1rem;
    box-shadow: 0 8px 22px rgba(16, 24, 32, 0.05);
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.mwl-page .mwl-card:hover {
    border-color: #cfe4f1;
    box-shadow: 0 16px 34px rgba(16, 24, 32, 0.10);
    transform: translateY(-3px);
}

/* Option 1 — ready-made shop */
.mwl-page .mwl-card-standard {
    --mwl-accent: var(--mwl-blue);
    --mwl-accent-dark: var(--mwl-blue-dark);
}

/* Option 2 — bespoke service */
.mwl-page .mwl-card-custom {
    --mwl-accent: var(--mwl-blue);
    --mwl-accent-dark: var(--mwl-blue-dark);
    background: #f7fbfe;
    border-color: #d7eaf4;
    color: var(--mwl-ink);
}

.mwl-page .mwl-card-custom:hover {
    border-color: #cfe4f1;
}

.mwl-page .mwl-card-head {
    flex: 0 0 auto;
}

.mwl-page .mwl-card-lower {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 0.15rem;
}

.mwl-page .mwl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
    margin-bottom: 0.65rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--mwl-surface);
    border: 1px solid var(--mwl-line);
    color: var(--mwl-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
}

.mwl-page .mwl-card-custom .mwl-badge {
    background: #fff;
    border-color: #d7eaf4;
    color: var(--mwl-blue-dark);
}

.mwl-page .mwl-example {
    margin: 0;
    max-width: 100%;
    min-width: 0;
}

/* Example frame is 2.4:1 at every width so one source image (2400 x 1000) fits everywhere.
   See docs/ModularWrap-Image-Guidelines.md. */
.mwl-page .mwl-example-media {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    aspect-ratio: 12 / 5;
    border: 1px solid var(--mwl-line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fbfcfd 0%, #f1f5f8 100%);
    overflow: hidden;
}

.mwl-page .mwl-example-image {
    position: absolute;
    inset: 0;
    min-width: 0;
    max-width: 100%;
}

.mwl-page .mwl-example-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

.mwl-page .mwl-card:hover .mwl-example-media img {
    transform: scale(1.02);
}

.mwl-page .mwl-example-label {
    position: absolute;
    left: 0.65rem;
    bottom: 0.6rem;
    max-width: calc(100% - 1.3rem);
    padding: 0.28rem 0.6rem;
    background: rgba(16, 24, 32, 0.78);
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
    z-index: 2;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mwl-page .mwl-card-title {
    margin: 0.75rem 0 0;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--mwl-ink);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mwl-page .mwl-card-tagline {
    margin: 0.2rem 0 0;
    color: var(--mwl-accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mwl-page .mwl-steps-title {
    margin: 0.65rem 0 0.55rem;
    color: var(--mwl-ink);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mwl-page .mwl-steps {
    counter-reset: mwl-step;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mwl-page .mwl-steps li {
    counter-increment: mwl-step;
    position: relative;
    padding: 0 0 0 2.1rem;
    margin-bottom: 0.45rem;
    color: var(--mwl-ink);
    font-size: 14px;
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mwl-page .mwl-steps li::before {
    content: counter(mwl-step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mwl-surface);
    border: 1px solid var(--mwl-line-strong);
    color: var(--mwl-muted);
    font-size: 12px;
    font-weight: 700;
}

.mwl-page .mwl-card-custom .mwl-steps li::before {
    background: #fff;
    border-color: #d7eaf4;
    color: var(--mwl-blue-dark);
}

.mwl-page .mwl-delivery-stack {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.45rem;
    min-height: 4.75rem;
    margin-top: 0.75rem;
}

.mwl-page .mwl-delivery {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--mwl-line);
    border-radius: 8px;
    background: var(--mwl-surface);
    color: var(--mwl-ink);
    font-size: 13px;
    line-height: 1.45;
    min-width: 0;
    max-width: 100%;
}

.mwl-page .mwl-card-custom .mwl-delivery {
    background: #fff;
    border-color: #d7eaf4;
}

.mwl-page .mwl-delivery i {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1.2;
    color: var(--mwl-accent);
}

.mwl-page .mwl-delivery span {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mwl-page .mwl-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--mwl-accent);
    border-radius: 6px;
    background: var(--mwl-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.mwl-page .mwl-cta-wrap {
    margin-top: auto;
    padding-top: 0.75rem;
}

.mwl-page .mwl-cta:hover,
.mwl-page .mwl-cta:focus {
    background: var(--mwl-accent-dark);
    border-color: var(--mwl-accent-dark);
    color: #fff;
    text-decoration: none;
}

.mwl-page .mwl-cta-outline {
    background: transparent;
    color: var(--mwl-accent);
}

.mwl-page .mwl-cta-outline:hover,
.mwl-page .mwl-cta-outline:focus {
    background: var(--mwl-accent);
    border-color: var(--mwl-accent);
    color: #fff;
}

/* ---------- Helper strip ---------- */
.mwl-page .mwl-help {
    padding: 1.25rem 0 2.5rem;
}

.mwl-page .mwl-help-inner {
    padding: 1rem 1.25rem;
    background: var(--mwl-surface);
    border: 1px solid var(--mwl-line);
    border-radius: 12px;
}

.mwl-page .mwl-help-title {
    margin: 0 0 0.4rem;
    font-size: 18px;
    font-weight: 700;
    color: var(--mwl-ink);
}

.mwl-page .mwl-help-text {
    margin: 0;
    color: var(--mwl-muted);
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ---------- Optional examples strip (if rendered) ---------- */
.mwl-page .mwl-examples {
    padding: 2rem 0 0.5rem;
}

.mwl-page .mwl-examples .mwc-examples {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.mwl-page .mwl-examples .mwc-block-title {
    font-size: 22px;
    margin: 0 0 0.35rem;
}

.mwl-page .mwl-examples .mwc-examples-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mwl-page .mwl-examples .mwc-examples-item {
    min-width: 0;
}

.mwl-page .mwl-examples .mwc-examples-item figure {
    margin: 0;
    max-width: 100%;
}

.mwl-page .mwl-examples .mwc-examples-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid #d8e2ea;
    border-radius: 8px;
    background: #fff;
}

.mwl-page .mwl-examples .mwc-examples-item figcaption {
    margin-top: 0.45rem;
    color: #5a6b7d;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ---------- Large desktop only (≥1536): two columns, capped pair ----------
   1280 / 1366 / 1440 laptops stay ONE column (default above). */
@media (min-width: 1536px) {
    .mwl-page .mwl-shell {
        max-width: 1180px;
    }

    .mwl-page .mwl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 1120px;
        gap: 1.25rem;
    }

    .mwl-page .mwl-card {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* ---------- Tablet / mid widths: keep stack, slightly roomier cards ---------- */
@media (max-width: 1099.98px) {
    .mwl-page .mwl-shell {
        padding: 0 20px;
    }

    .mwl-page .mwl-grid {
        gap: 1rem;
    }

    .mwl-page .mwl-card {
        height: auto;
        padding: 1.25rem 1.15rem 1.1rem;
    }

    .mwl-page .mwl-card-title {
        font-size: 20px;
    }

    .mwl-page .mwl-delivery-stack {
        min-height: 0;
    }

    .mwl-page .mwl-examples .mwc-examples-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Short viewport height: compact vertical rhythm (any width) ---------- */
@media (max-height: 860px) and (min-width: 768px) {
    .mwl-page .mwl-choices {
        padding-top: 0.65rem;
    }

    .mwl-page .mwl-page-intro {
        margin-bottom: 0.65rem;
    }

    .mwl-page .mwl-lede {
        font-size: 14px;
    }

    /* Short screens trim the example to 2.6:1 (about 4% off top and bottom of a 2.4:1 image). */
    .mwl-page .mwl-example-media {
        aspect-ratio: 13 / 5;
    }

    .mwl-page .mwl-card-title {
        font-size: 20px;
    }

    .mwl-page .mwl-steps li {
        margin-bottom: 0.35rem;
        font-size: 13px;
    }

    .mwl-page .mwl-delivery-stack {
        min-height: 4.25rem;
        margin-top: 0.55rem;
    }

    .mwl-page .mwl-help {
        padding: 1rem 0 2rem;
    }
}

/* ---------- Phone ---------- */
@media (max-width: 767.98px) {
    .mwl-page .mwl-shell {
        padding: 0 16px;
    }

    .mwl-page .mwl-grid {
        max-width: 100%;
    }

    .mwl-page .mwl-card {
        max-width: 100%;
    }

    .mwl-page .mwl-examples .mwc-examples-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mwl-page .mwl-lede {
        font-size: 14px;
        padding: 0 0.25rem;
    }

    .mwl-page .mwl-choices {
        padding: 0.75rem 0 0.35rem;
    }

    .mwl-page .mwl-card {
        padding: 1.1rem 1rem 1rem;
    }

    .mwl-page .mwl-badge {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .mwl-page .mwl-help {
        padding: 1rem 0 2rem;
    }

    .mwl-page .mwl-help-inner {
        padding: 0.9rem 1rem;
    }

    .mwl-page .mwl-card:hover {
        transform: none;
    }
}

/* ---------- Short cards: 3 icon points + two facts (subscriber chip on the second card) ---------- */
.mwl-page .mwl-grid.is-one {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
}

.mwl-page .mwl-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mwl-page .mwl-sub-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8f5ee;
    color: #1f8a4c;
    font-size: 12px;
    font-weight: 600;
}

.mwl-page .mwl-points {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mwl-page .mwl-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mwl-ink);
    font-size: 14.5px;
}

.mwl-page .mwl-points i {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--mwl-surface);
    color: var(--mwl-blue-dark);
    font-size: 15px;
}

.mwl-page .mwl-card-custom .mwl-points i {
    background: rgba(37, 169, 224, 0.1);
}

.mwl-page .mwl-facts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.mwl-page .mwl-fact {
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 10px 12px;
    border: 1px solid var(--mwl-line);
    border-radius: 10px;
    background: #fff;
}

.mwl-page .mwl-fact i {
    color: var(--mwl-blue-dark);
    font-size: 18px;
}

.mwl-page .mwl-fact b {
    color: var(--mwl-ink);
    font-size: 13.5px;
    font-weight: 600;
}

.mwl-page .mwl-fact span {
    color: var(--mwl-muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.mwl-page .mwl-card-lower .mwl-cta-wrap {
    padding-top: 16px;
}

@media (max-width: 575.98px) {
    .mwl-page .mwl-facts {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Horizontal cards: image on the left (one portrait 2:3 image), text on the right ----------
   Two cards side by side from 1100px, stacked below that, image on top on phones. */
.mwl-page .mwl-shell {
    max-width: 1340px;
}

.mwl-page .mwl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1300px;
}

.mwl-page .mwl-grid.is-one {
    grid-template-columns: minmax(0, 1fr);
    max-width: 680px;
}

.mwl-page .mwl-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas:
        "media badge"
        "media title"
        "media tagline"
        "media lower";
    grid-template-rows: auto auto auto 1fr;
    column-gap: 1.5rem;
    max-width: none;
    height: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 1.15rem 1.35rem 1.15rem 1.15rem;
}

.mwl-page .mwl-card-head {
    display: contents;
}

.mwl-page .mwl-card-head > .mwl-badge,
.mwl-page .mwl-card-head > .mwl-head-row {
    grid-area: badge;
    justify-self: start;
}

.mwl-page .mwl-example {
    grid-area: media;
    align-self: stretch;
}

.mwl-page .mwl-card-title {
    grid-area: title;
    margin-top: 0.1rem;
}

.mwl-page .mwl-card-tagline {
    grid-area: tagline;
    margin-bottom: 0.9rem;
}

.mwl-page .mwl-card-lower {
    grid-area: lower;
    margin-top: 0;
}

.mwl-page .mwl-example-media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 300px;
    background: #fff;
}

.mwl-page .mwl-example-media img {
    object-fit: contain;
    padding: 6px;
}

@media (max-width: 1099.98px) {
    .mwl-page .mwl-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 720px;
    }
}

@media (max-width: 767.98px) {
    .mwl-page .mwl-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "badge" "media" "title" "tagline" "lower";
        grid-template-rows: auto;
        padding: 1.1rem 1rem 1rem;
    }

    /* Same portrait image above the text, shown whole in a frame of limited height */
    .mwl-page .mwl-example-media {
        height: 320px;
        min-height: 0;
    }

    .mwl-page .mwl-card-title {
        margin-top: 0.75rem;
    }
}
