/**
 * Complete standard-Post singular shell.
 *
 * The zero-spacing Beaver Themer mount supplies placement only. These scoped
 * selectors reproduce the former centered 800px native-module treatment. An
 * optional rail can overflow to the right without changing that centerline.
 */

.mg-post-singular {
    box-sizing: border-box;
    width: 100%;
    padding: 60px 0;
}

.mg-post-singular *,
.mg-post-singular *::before,
.mg-post-singular *::after {
    box-sizing: inherit;
}

.mg-post-singular__header,
.mg-post-singular__feature,
.mg-post-singular__body-shell {
    width: 100%;
    max-width: 800px;
    margin-right: auto;
    margin-left: auto;
}

.mg-post-singular__header,
.mg-post-singular__feature,
.mg-post-singular__body-shell {
    padding-right: 20px;
    padding-left: 20px;
}

.mg-post-singular__header,
.mg-post-singular__feature {
    margin-bottom: 60px;
}

.mg-post-singular__title {
    margin: 0;
    color: #0a0a0a;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 50px;
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1;
    text-align: center;
    overflow-wrap: anywhere;
}

.mg-post-singular__feature {
    display: block;
}

.mg-post-singular__feature-image {
    display: block;
    width: 100%;
    max-width: none;
    aspect-ratio: 2 / 1;
    border-radius: 20px;
    object-fit: cover;
    object-position: center;
}

.mg-post-singular__body {
    min-width: 0;
    margin-bottom: 20px;
}

/* Keep wide media and legacy editor content inside the 760px reading track. */
.mg-post-singular__body img,
.mg-post-singular__body iframe,
.mg-post-singular__body video,
.mg-post-singular__body table {
    max-width: 100%;
}

.mg-post-singular__body::after {
    display: table;
    clear: both;
    content: "";
}

/* Match Beaver's tablet row gutters before its mobile full-width breakpoint. */
@media ( min-width: 769px ) and ( max-width: 839px ) {
    .mg-post-singular__header,
    .mg-post-singular__feature,
    .mg-post-singular__body-shell {
        width: calc(100% - 40px);
    }
}

/*
 * Keep the 760px reading track centered exactly as it is without a callout.
 * The explicit second grid track overflows only to the right. At 1400px the
 * rail starts at 280px, grows with the available half-viewport, and caps at
 * 320px from 1480px onward while retaining a 20px viewport gutter.
 */
@media ( min-width: 1400px ) {
    .mg-post-singular__body-shell.has-sidebar-callout {
        display: grid;
        grid-template-columns: 760px clamp(280px, calc(50vw - 420px), 320px);
        align-items: start;
        column-gap: 20px;
    }
}

@media ( forced-colors: active ) {
    .mg-post-singular__feature-image {
        border: 1px solid CanvasText;
    }
}

/* The former native modules reduced their 60px gaps to 20px on phones. */
@media ( max-width: 480px ) {
    .mg-post-singular__header,
    .mg-post-singular__feature {
        margin-bottom: 20px;
    }
}
