/* Public reading layout. The home presentation and administration have their own shells. */
.gmrtc-editorial-page .content {
    --reading-size: 12.5pt;
    --heading-size: 21pt;
    --section-size: 17pt;
    inline-size: min(750px, calc(100% - 2rem));
    min-inline-size: 0;
    margin-inline: auto;
    padding-block: clamp(.875rem, 1.6vw, 1.25rem) clamp(2rem, 5vw, 4rem);
    font-size: var(--reading-size);
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.gmrtc-editorial-page .page-intro {
    max-inline-size: none;
    margin-block: 0 clamp(1rem, 2.4vw, 1.5rem);
}

.gmrtc-editorial-page .content .summary {
    max-inline-size: none;
    margin-block: .55rem 0;
    font-size: var(--reading-size);
    line-height: inherit;
}

.gmrtc-editorial-page .content :where(p, li, dd, figcaption, blockquote) {
    text-align: justify;
    text-align-last: start;
    hyphens: auto;
}

.gmrtc-editorial-page .article-body :is(p, ul, ol) {
    max-inline-size: none;
}

.gmrtc-editorial-page .article-body table {
    font-size: inherit;
}

/* Legacy bodies contain bare tables. Wide comparison columns scroll within the article. */
.gmrtc-editorial-page .article-body > table {
    display: block;
    max-inline-size: 100%;
    overflow-x: auto;
}

.gmrtc-editorial-page .article-body pre {
    max-inline-size: 100%;
    overflow-x: auto;
}

.gmrtc-editorial-page .article-body iframe {
    max-inline-size: 100%;
}

.gmrtc-editorial-page .content :is(h1, h2, h3, h4, h5, h6) {
    min-inline-size: 0;
    max-inline-size: 100%;
    margin-block: 1.15em .42em;
    color: var(--accent-hover);
    font-size: var(--section-size);
    font-weight: 620;
    line-height: 1.22;
    letter-spacing: -.02em;
    text-align: justify;
    text-align-last: start;
    text-wrap: wrap;
}

.gmrtc-editorial-page .content h1 {
    margin-block: 0;
    font-size: var(--heading-size);
    color: var(--text);
    font-weight: 740;
    letter-spacing: -.032em;
}

.gmrtc-editorial-page .content :is(h3, h4, h5, h6) {
    font-size: 15pt;
    font-weight: 560;
    letter-spacing: -.012em;
}

.gmrtc-editorial-page .content :is(.technical-grid, .showcase-copy) h2 {
    margin-block: 0;
}

.gmrtc-editorial-page .content .showcase-copy h2 a {
    color: inherit;
}

/* Unenhanced headings stay readable if scripts are disabled. */
.gmrtc-editorial-page .content .gmrtc-heading {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.gmrtc-editorial-page .gmrtc-heading-text {
    display: block;
    flex: 1 1 auto;
    min-inline-size: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmrtc-editorial-page .gmrtc-heading-toggle {
    flex: 0 0 auto;
    align-self: start;
    display: inline-grid;
    place-items: center;
    min-inline-size: 2.25rem;
    min-block-size: 2.25rem;
    margin: 0;
    padding: .25rem;
    border: 1px solid var(--control-line);
    border-radius: .5rem;
    background: var(--surface);
    color: var(--accent-hover);
    font: 600 1rem/1 system-ui, sans-serif;
    cursor: pointer;
}

.gmrtc-editorial-page .gmrtc-heading-toggle::before {
    content: "";
    inline-size: .55rem;
    block-size: .55rem;
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    transform: translateY(-.12rem) rotate(45deg);
}

.gmrtc-editorial-page .gmrtc-heading-toggle[aria-expanded="true"]::before {
    transform: translateY(.12rem) rotate(225deg);
}

.gmrtc-editorial-page .gmrtc-heading-toggle[hidden] {
    display: none;
}

.gmrtc-editorial-page .gmrtc-heading-toggle:is(:hover, :focus-visible) {
    border-color: var(--accent);
    background: var(--solid);
}

.gmrtc-editorial-page .gmrtc-heading[data-heading-expanded] .gmrtc-heading-text {
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* The original technical card remains one link. Its title toggle is a sibling. */
.gmrtc-editorial-page .gmrtc-heading-card {
    position: relative;
    min-inline-size: 0;
    align-self: start;
}

.gmrtc-editorial-page .gmrtc-heading-card > a {
    display: block;
}

.gmrtc-editorial-page .gmrtc-heading-card > .gmrtc-heading-toggle {
    position: absolute;
    inset-inline-end: .65rem;
    inset-block-end: .875rem;
}

.gmrtc-editorial-page .gmrtc-heading-card h2[data-heading-clipped] {
    padding-inline-end: 3.25rem;
}

.gmrtc-editorial-page .article-body details > summary {
    color: var(--accent-hover);
    font-size: 14pt;
    font-weight: 620;
    line-height: 1.22;
    letter-spacing: -.02em;
    text-align: justify;
    text-align-last: start;
}

/* Inline-block leaves the native disclosure marker and keyboard activation intact. */
.gmrtc-editorial-page .article-body summary > .gmrtc-summary-text {
    display: inline-block;
    vertical-align: top;
    max-inline-size: calc(100% - 1.3em);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmrtc-editorial-page .article-body details[open] > summary > .gmrtc-summary-text {
    overflow: visible;
    white-space: normal;
}

.gmrtc-editorial-page .gmrtc-heading:not([data-heading-expanded]) .gmrtc-heading-text br,
.gmrtc-editorial-page details:not([open]) > summary > .gmrtc-summary-text br {
    display: none;
}

/* Article headings remain fully visible, including wrapped numbered sections in a closed accordion. */
body.gmrtc-article .content {
    --heading-size: 18pt;
    --section-size: 13.5pt;
    padding-block-start: 0;
}
body.gmrtc-article .content :is(h1,h2,h3,h4,h5,h6) {
    display: block;
    overflow: visible;
    max-block-size: none;
    white-space: normal;
    text-overflow: clip;
    text-align: start;
    text-align-last: start;
    overflow-wrap: anywhere;
    line-height: 1.4;
}
body.gmrtc-article .content :is(h2,h3,h4,h5,h6) { font-size: 13.5pt; }
body.gmrtc-article .content h1 {
    font-size: 18pt;
    line-height: 1.3;
    letter-spacing: -.018em;
}
body.gmrtc-article .page-intro h1::after {
    content: "";
    display: block;
    block-size: 1px;
    margin-block-start: .85rem;
    background: linear-gradient(90deg, var(--accent), var(--line) 55%, transparent);
    opacity: .7;
}
body.gmrtc-article .content .article-body details > summary {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    font-size: 13.5pt;
    line-height: 1.4;
    letter-spacing: -.012em;
    text-align: start;
    text-align-last: start;
    overflow-wrap: anywhere;
}
body.gmrtc-article .content .article-body details > summary > .gmrtc-summary-text,
body.gmrtc-article .content .gmrtc-heading > .gmrtc-heading-text {
    display: inline;
    max-inline-size: none;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
}
body.gmrtc-article .content .article-body details > summary .gmrtc-summary-text br,
body.gmrtc-article .content .gmrtc-heading .gmrtc-heading-text br { display: initial; }
body.gmrtc-article .gmrtc-heading-toggle { display: none; }
body.gmrtc-article .gmrtc-article-divider {
    block-size: 1px;
    margin: 1.4rem 0 1.1rem;
    border: 0;
    background: linear-gradient(90deg, var(--line), var(--accent) 50%, var(--line));
    opacity: .6;
}

@media print {
    .gmrtc-editorial-page .content {
        inline-size: 100%;
        padding-block: 0;
    }

    .gmrtc-editorial-page .gmrtc-heading-text,
    .gmrtc-editorial-page .article-body summary > .gmrtc-summary-text {
        overflow: visible;
        white-space: normal;
    }

    .gmrtc-editorial-page .gmrtc-heading-toggle {
        display: none;
    }
}
