/* Shared controls sit in the final content row; summary keeps its native toggle behaviour. */
.gmrtc-fold-shell {
    position: relative;
    display: flow-root;
    min-inline-size: 0;
}
.gmrtc-ambient-page main details.gmrtc-has-fold-tools .gmrtc-fold-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    clear: both;
    min-inline-size: 0;
    max-inline-size: none;
}
.gmrtc-ambient-page main details.gmrtc-has-fold-tools .gmrtc-fold-actions > :is(a,button):not([hidden]) {
    flex: 1 1 0;
    min-inline-size: 0;
}
.gmrtc-fold-actions > .gmrtc-fold-tools {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-block-size: 2.5rem;
    gap: .5rem;
    margin: 0;
    margin-inline-start: auto;
    padding: 0;
}
.gmrtc-ambient-page main .gmrtc-fold-actions .gmrtc-disclosure-control {
    position: relative;
    display: inline-grid;
    place-items: center;
    inline-size: 2rem;
    block-size: 2rem;
    min-inline-size: 2rem;
    min-block-size: 2rem;
    padding: .38rem;
    border-radius: .5rem;
    line-height: 1;
    touch-action: manipulation;
}
.gmrtc-ambient-page main .gmrtc-fold-actions .gmrtc-disclosure-control:disabled {
    opacity: .32;
    color: var(--muted);
    border-color: var(--control-line);
    cursor: default;
}
.gmrtc-ambient-page main .gmrtc-fold-actions .gmrtc-disclosure-control:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
.gmrtc-ambient-page main .article-body .gmrtc-fold-shell > details.gmrtc-has-fold-tools > summary {
    padding-inline-end: var(--panel-pad, 1rem);
}
.gmrtc-fold-footer {
    margin-block: .65rem 0;
}
.gmrtc-fold-shell--admin > details > .gmrtc-fold-footer {
    padding: 0 .85rem .65rem;
}
.gmrtc-fold-shell > details.gmrtc-has-fold-tools > summary { list-style: none; }
.gmrtc-fold-shell > details.gmrtc-has-fold-tools > summary::marker { content: ""; }
.gmrtc-fold-shell > details.gmrtc-has-fold-tools > summary::-webkit-details-marker { display: none; }
.content .article-body .gmrtc-fold-shell { margin-block: .65rem; }
.content .article-body .gmrtc-fold-shell > details { margin-block: 0; }
/* Keep the cabinet's direct-child panel layout with the shared outer shell. */
.work-panel > .gmrtc-fold-shell { margin: 0 0 .65rem; }
.work-panel > .gmrtc-fold-shell > details {
    margin: 0;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: var(--glass);
    backdrop-filter: none;
}
.work-panel > .gmrtc-fold-shell > details > summary {
    padding: .68rem .85rem;
    font-size: .98rem;
    font-weight: 660;
    cursor: pointer;
}
.work-panel > .gmrtc-fold-shell > details[open] > summary { border-bottom: 1px solid var(--line); }
.ce-editor > .gmrtc-fold-shell { margin: 0 0 .9rem; }
.ce-editor > .gmrtc-fold-shell > .ce-panel {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--glass);
}
.ce-editor > .gmrtc-fold-shell > .ce-panel > summary {
    padding: 1.05rem 1.25rem;
    font-size: 1.06rem;
    font-weight: 660;
    cursor: pointer;
}
.ce-editor > .gmrtc-fold-shell > .ce-panel[open] > summary { border-bottom: 1px solid var(--line); }
.tree-branches > .gmrtc-fold-shell { margin: .45rem 0; }
.tree-branches > .gmrtc-fold-shell > details { margin: 0; border-block-start: 1px solid var(--line); }

/* These disclosures are part of public editorial content, separate from the navigation menu. */
.content-home > .article-body {
    inline-size: min(62rem, calc(100% - 2rem));
    margin: clamp(1.3rem, 4vw, 3rem) auto clamp(2rem, 5vw, 4rem);
}

.content .article-body details {
    --panel-paper: #0e1d29;
    --panel-pad: clamp(.9rem, 2.4vw, 1.45rem);
    min-inline-size: 0;
    margin-block: .65rem;
    padding: 0 var(--panel-pad);
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: var(--panel-paper);
}

[data-theme="light"] .content .article-body details { --panel-paper: #f9fbfc; }

.content .article-body details[open] {
    padding-block-end: var(--panel-pad);
    border-color: color-mix(in srgb, var(--accent) 48%, var(--panel-paper));
}

/* The summary keeps the native button and keyboard behaviour. When open, its whole title is visible. */
.content .article-body details > summary {
    position: relative;
    display: block;
    min-block-size: 3.5rem;
    margin-inline: calc(-1 * var(--panel-pad));
    padding: .78rem calc(var(--panel-pad) + 2rem) .78rem var(--panel-pad);
    overflow: hidden;
    list-style: none;
    color: var(--text);
    font-size: 14pt;
    font-weight: 620;
    line-height: 1.22;
    letter-spacing: -.023em;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.content .article-body details > summary::-webkit-details-marker { display: none; }
.content .article-body details > summary::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: calc(var(--panel-pad) + .18rem);
    inline-size: .62rem;
    block-size: .62rem;
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    color: var(--accent-hover);
    transform: translateY(-68%) rotate(45deg);
}

/* The framed footer pair supplies the icons; summary remains the native toggle. */
.gmrtc-fold-shell > details.gmrtc-has-fold-tools > summary::after {
    content: none;
    display: none;
}

.content .article-body details[open] > summary {
    margin-block-end: var(--panel-pad);
    border-block-end: 1px solid var(--line);
    color: var(--accent-hover);
    white-space: normal;
}

.content .article-body details[open] > summary::after { transform: translateY(-32%) rotate(225deg); }
.content .article-body details > summary:focus-visible { outline-offset: -4px; border-radius: .7rem; }
.content .article-body details > summary:hover { color: var(--accent-hover); }

/* The editorial heading script wraps existing summaries after load. Its marker space is unnecessary here. */
.content .article-body details > summary > .gmrtc-summary-text {
    display: inline;
    vertical-align: baseline;
    white-space: inherit;
}

.content .article-body details > div { display: flow-root; }
.content .article-body details :is(.accordion-media, .service-copy, .accordion-actions) { font-size: .95rem; }
.content .article-body details :where(p,ul,ol) { margin-block: .55em .85em; }
.content .article-body details :where(p,ul,ol):first-child { margin-block-start: 0; }
.content .article-body details :where(p,ul,ol):last-child { margin-block-end: 0; }
.content .article-body details > :where(p,ul,ol):last-child { margin-block-end: 0; }
.content .article-body details .page-actions,
.content .article-body details .accordion-actions { clear: both; gap: .5rem; margin-block: .9rem 0; }

.content .article-body details :is(.content-media,.accordion-media) { min-inline-size: 0; clear: both; }
.content .article-body details :is(.content-media,.accordion-media) > :is(img,video) {
    display: block;
    max-inline-size: 100%;
    margin-inline: auto;
    border-radius: .45rem;
}

.content .article-body details :is(.content-media,.accordion-media) > video {
    inline-size: 100%;
    block-size: auto;
    margin-block-end: 1rem;
    background: #07121a;
}
.content .article-body details .related-rail,
.content .article-body details .article-related { clear: both; }

/* On reading pages the first lines sit on the shaded edge of the photo.
   Longer text resumes the full reading width below it. Video controls stay full width. */
@media (min-width: 45rem) {
    .content .article-body details :is(.content-media,.accordion-media):has(> img:only-child) {
        float: left;
        inline-size: 47%;
        margin: .12rem -14% .65rem 0;
    }
    .content .article-body details :is(.content-media,.accordion-media) > img:only-child {
        inline-size: 100%;
        block-size: clamp(8.5rem, 15vw, 10.75rem);
        object-fit: cover;
        object-position: 42% center;
        mask-image: linear-gradient(to right, #000 28%, rgb(0 0 0 / .86) 42%, rgb(0 0 0 / .13) 70%, transparent);
    }
}

@media (max-width: 44.999rem) {
    .content .article-body details :is(.content-media,.accordion-media) > img:only-child {
        inline-size: 100%;
        block-size: auto;
        max-block-size: 16rem;
        object-fit: contain;
        margin-block: .3rem .85rem;
    }
}

/* Home photographs are links. Overlapping grid columns retain the full click target
   on the visible left portion while independently aligning the copy to the right. */
.content-home .article-body .service-accordion > div:has(> a:first-child > img:only-child) {
    display: grid;
    isolation: isolate;
    grid-template-columns: minmax(0, .34fr) minmax(0, .16fr) minmax(0, .50fr);
    align-items: stretch;
}
.content-home .service-accordion > div > a:first-child:has(> img:only-child) {
    position: relative;
    grid-area: 1 / 1 / 2 / 3;
    display: block;
    min-block-size: 13rem;
    border-radius: .45rem;
}
.content-home .service-accordion > div > a:first-child > img:only-child {
    position: absolute;
    inset: 0;
    display: block;
    inline-size: 100%;
    block-size: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: 36% center;
    mask-image: linear-gradient(to right, #000 30%, rgb(0 0 0 / .76) 50%, rgb(0 0 0 / .12) 69%, transparent);
}
.content-home .service-accordion > div > a:first-child + .service-copy {
    position: relative;
    grid-area: 1 / 2 / 2 / -1;
    align-self: center;
    min-inline-size: 0;
    padding-block: .55rem;
    font-size: .95rem;
    line-height: 1.54;
}
.content-home .service-copy > p:first-child > em { color: var(--accent-hover); font-weight: 650; font-style: normal; }

@media (max-width: 44.999rem) {
    .content-home .article-body .service-accordion > div:has(> a:first-child > img:only-child) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 7.5rem 2rem auto;
    }
    .content-home .service-accordion > div > a:first-child:has(> img:only-child) {
        grid-area: 1 / 1 / 3 / 2;
        min-block-size: 0;
    }
    .content-home .service-accordion > div > a:first-child > img:only-child {
        object-position: center 43%;
        mask-image: linear-gradient(to bottom, #000 42%, rgb(0 0 0 / .14) 80%, transparent);
    }
    .content-home .service-accordion > div > a:first-child + .service-copy {
        grid-area: 2 / 1 / 4 / 2;
        padding: 0;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .content .article-body details > summary { transition: color .16s ease-out; }
    .content .article-body details > summary::after { transition: transform .16s ease-out; }
}
@media (max-width: 64rem), (any-pointer: coarse) {
    .gmrtc-fold-actions > .gmrtc-fold-tools .gmrtc-disclosure-control::before {
        content: "";
        position: absolute;
        inset: -.25rem;
    }
}
@media (max-width: 64rem) {
    .work-cabinet main .gmrtc-fold-shell > details.gmrtc-has-fold-tools > summary {
        min-block-size: 2.5rem;
        padding-block: .5rem;
        padding-inline-start: .7rem;
        font-size: .96875rem;
        line-height: 1.28;
    }
    .work-cabinet main .gmrtc-fold-shell > details.gmrtc-has-fold-tools:not(.admin-accordion) > summary {
        padding-inline-end: .7rem;
    }
}
@media (max-width: 40rem) {
    .work-cabinet main .gmrtc-fold-shell > details.gmrtc-has-fold-tools > summary {
        min-block-size: 2.75rem;
        padding-block: .4375rem;
        font-size: .90625rem;
    }
}
/* Centre the existing title flow inside public disclosure frames at every screen width.
   Preserve inline text, native hit areas and the independently positioned markers. */
@media screen {
    body.gmrtc-ambient-page main.content .article-body details:not(:where(
        .content-promo *, [data-gmrtc-p101-ad] *, .gmrtc-creative-shell *, [data-canvas] *, [contenteditable] *)) > summary {
        align-content: center;
    }
}
/* Keep the established phone frame height and the cabinet's mobile alignment. */
@media screen and (max-width: 40rem) {
    body.gmrtc-ambient-page main.content .article-body details:not(:where(
        .content-promo *, [data-gmrtc-p101-ad] *, .gmrtc-creative-shell *, [data-canvas] *, [contenteditable] *)) > summary,
    .work-cabinet main details:not(:where(.content-promo *, [data-gmrtc-p101-ad] *,
        .gmrtc-creative-shell *, [data-canvas] *, [contenteditable] *)) > summary {
        --gmrtc-summary-height: 2.75rem;
        --about-heading-height: 2.75rem;
        min-block-size: 2.75rem;
        align-content: center;
    }
}
@media (forced-colors: active), print {
    .content .article-body details { border-color: currentColor; }
    .content .article-body details :is(.content-media,.accordion-media):has(> img:only-child) { float: none; margin: 0 0 1rem; }
    .content .article-body details :is(.content-media,.accordion-media) > img:only-child { mask-image: none; height: auto; }
    .content-home .article-body .service-accordion > div:has(> a:first-child > img:only-child) { display: block; }
    .content-home .service-accordion > div > a:first-child:has(> img:only-child) { min-block-size: 0; }
    .content-home .service-accordion > div > a:first-child > img:only-child {
        position: static;
        inline-size: auto;
        max-block-size: 12rem;
        mask-image: none;
    }
}
@media print {
    .gmrtc-fold-footer { display: none !important; }
    .content .article-body details > summary { white-space: normal; overflow: visible; }
    .content .article-body details > summary::after { display: none; }
}
