/* The same reading scale distinguishes the article title, sections and subsections by colour and weight. */
.gmrtc-article .page-intro h1 { color: var(--text); }
.gmrtc-article .article-body h2 {
    padding-block-end: .24em;
    border-block-end: 1px solid var(--line);
    color: var(--accent-hover);
    font-weight: 670;
}
.gmrtc-article .article-body h3 { color: var(--gold); font-weight: 600; }
.gmrtc-article .article-body :is(h4, h5, h6) {
    color: var(--text);
    font-weight: 540;
    border-inline-start: 2px solid var(--accent);
    padding-inline-start: .42em;
}

.article-body .content-promo, .article-body .article-video {
    clear: both;
    min-inline-size: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    margin-inline: 0;
}
.article-body .content-promo { overflow: hidden; border-radius: .6rem; }
.article-body .content-promo > .promo-body-frame, .article-body .article-video > video {
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    margin: 0;
}

/* Keep the moving picture edge to edge and use the source's intrinsic aspect ratio. */
.content .article-body :is(.article-video,.accordion-media,.content-media):has(> video) {
    display: block;
    float: none;
    inline-size: 100%;
    max-inline-size: 100%;
    block-size: auto;
    min-block-size: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.content .article-body :is(.article-video,.accordion-media,.content-media,.local-video-box) > video {
    display: block;
    inline-size: 100%;
    max-inline-size: 100%;
    block-size: auto;
    min-block-size: 0;
    max-block-size: none;
    aspect-ratio: auto var(--gmrtc-video-ratio, 16 / 9);
    object-fit: contain;
    margin: 0;
    padding: 0;
}
/* Disclosure media was previously given an extra margin inside its player box. */
.content .article-body details :is(.accordion-media,.content-media) > video { margin-block: 0; }
.article-body .local-video-control[data-playing="true"] { opacity: 0; pointer-events: none; }
.article-body .local-video-box[data-control-visible] .local-video-control,
.article-body .local-video-control[data-playing="true"]:focus-visible { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
    .local-video-control { transition: opacity .16s ease-out; }
}

.article-body figure.external-video {
    position: relative;
    inline-size: 100%;
    aspect-ratio: 16 / 9;
    min-block-size: 200px;
    margin: 1.15rem 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .72rem;
    background: #0b1720;
}
.article-body figure.external-video > a, .article-body .article-yt-frame {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    inline-size: 100%;
    block-size: 100%;
    max-inline-size: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: #0b1720;
    text-decoration: none;
}
.article-body figure.external-video > a[hidden] { display: none; }
.article-body figure.external-video > a > img {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    max-block-size: none;
    object-fit: contain;
    border-radius: 0;
}
.article-body figure.external-video a > span {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .58rem 1rem;
    min-block-size: 2.75rem;
    border: 1px solid #b6d7d9;
    border-radius: 2rem;
    background: rgb(7 23 32 / .94);
    color: #fff;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.35;
}
.article-body figure.external-video a > span::before {
    content: "";
    inline-size: .8rem;
    block-size: .9rem;
    background: #b4e9de;
    clip-path: polygon(0 0,100% 50%,0 100%);
}
.article-body figure.external-video a:is(:hover, :focus-visible) > span {
    border-color: #c6fff2;
    background: #193d42;
    box-shadow: 0 0 1rem rgb(109 220 208 / .27);
}
.article-body figure.external-video a:focus-visible { outline-offset: -4px; }

/* This is a replacement for a completed embed, rather than a layer over its controls. */
.article-body figure.external-video.article-yt-ended { display: grid; }
.article-body figure.external-video > .article-yt-end {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: .8rem;
    min-inline-size: 0;
    min-block-size: 12.5rem;
    padding: clamp(1rem, 3vw, 1.6rem);
    color: #eef6fa;
    background: #0b1b27;
    text-align: center;
}
.article-body figure.external-video > .article-yt-end[hidden] { display: none; }
.article-body figure.external-video .article-yt-end-title {
    margin: 0;
    color: #e2eff4;
    font-size: 1rem;
    font-weight: 570;
    line-height: 1.5;
    text-align: center;
    text-align-last: center;
}
.article-body figure.external-video .article-yt-end-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: .5rem;
    min-inline-size: 0;
    max-inline-size: 100%;
}
.article-body figure.external-video .article-yt-end-actions > :is(a,button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 0;
    max-inline-size: 100%;
    min-block-size: 2.75rem;
    margin: 0;
    padding: .55rem .85rem;
    border: 1px solid #81b9c1;
    border-radius: .55rem;
    background: #153541;
    color: #ecf8fa;
    font: 600 .9375rem/1.4 system-ui, sans-serif;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}
.article-body figure.external-video .article-yt-end-actions > a {
    border-color: #506c7c;
    background: #102837;
}
.article-body figure.external-video .article-yt-end-actions > :is(a,button):is(:hover,:focus-visible) {
    border-color: #c5eceb;
    background: #234956;
}
.article-body figure.external-video .article-yt-end-actions > :is(a,button):focus-visible {
    outline: 2px solid #d8fff3;
    outline-offset: 3px;
}
.article-body figure.external-video > .article-yt-status {
    position: absolute;
    inset: 0 auto auto 0;
    inline-size: 1px;
    block-size: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
@media (max-width: 64rem) {
    .article-body figure.external-video .article-yt-end-title { font-size: .96875rem; }
    .article-body figure.external-video .article-yt-end-actions > :is(a,button) { font-size: .90625rem; }
}
@media (max-width: 40rem) {
    .article-body figure.external-video > .article-yt-end { gap: .7rem; padding: 1rem; }
    .article-body figure.external-video .article-yt-end-title { font-size: .9375rem; }
    .article-body figure.external-video .article-yt-end-actions > :is(a,button) { font-size: .875rem; }
}
@media (forced-colors: active) {
    .article-body figure.external-video > .article-yt-end,
    .article-body figure.external-video .article-yt-end-actions > :is(a,button) {
        background: Canvas;
        color: CanvasText;
        border-color: ButtonText;
    }
    .article-body figure.external-video .article-yt-end-title { color: CanvasText; }
    .article-body figure.external-video .article-yt-end-actions > :is(a,button):focus-visible { outline-color: Highlight; }
}

.article-body .article-rail-widget {
    position: relative;
    clear: both;
    min-inline-size: 0;
    max-inline-size: 100%;
    margin-block: 1.3rem;
}
.article-body .article-rail-widget > .rail-track {
    display: flex;
    gap: .8rem;
    min-inline-size: 0;
    max-inline-size: 100%;
    margin: 0;
    padding: .3rem .15rem .5rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.article-body .rail-track::-webkit-scrollbar { display: none; }
.article-body .rail-track.rail-scrollable { cursor: grab; }
.article-body .rail-track.is-dragging { scroll-snap-type: none; }
.article-body .rail-track.is-dragging, .article-body .rail-track.is-dragging * { cursor: grabbing; }
.article-body .rail-track > a {
    display: block;
    flex: 0 0 clamp(10.75rem, 36%, 14.5rem);
    min-inline-size: 0;
    scroll-snap-align: start;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .65rem;
    color: var(--text);
    background: var(--solid);
    text-decoration: none;
    -webkit-user-drag: none;
    user-select: none;
}
.article-body .rail-track > a > img {
    display: block;
    inline-size: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    -webkit-user-drag: none;
}
.article-body :is(.rail-track,.article-related,.related-rail) > a > span {
    position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.article-body :is(.article-related,.related-rail) { scrollbar-width: none; }
.article-body :is(.article-related,.related-rail)::-webkit-scrollbar { display: none; }
.article-body .rail-track > a { position: relative; transition: border-color .2s, box-shadow .2s; }
.article-body .rail-track > a:is(:hover,:focus-visible) { box-shadow: inset 0 0 0 1px #81b7de, 0 0 9px #5499d255; }
.article-body .rail-track > a:is(:hover, :focus-visible) {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
}
.article-body .rail-track > a:focus-visible { outline-offset: -3px; }
@media print {
    .article-body .rail-playback { display: none; }
    .article-body .rail-track { overflow: visible; flex-wrap: wrap; }
}
