/* Complements the existing fluid-styled-content-css set. Only standard content
   inside the content columns is affected; navigation and custom blocks are not. */
:is(.pw-content, .pw-article__body) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-image, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads) {
    --pw-ce-gap: clamp(1rem, 2.5vw, 2rem);
    overflow-wrap: anywhere;
    min-width: 0;
}

.pw-content > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-image, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads) {
    width: min(calc(100% - 2rem), var(--pw-content-normal));
}

.pw-content:not(.pw-content--alice) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-image, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads):first-child {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* Legacy normal-column typography; keep the established article and Alice styles. */
.pw-content:not(.pw-content--alice) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads) {
    font-size: clamp(1rem, 1.4vw, 1.421875rem);
    font-weight: 300;
    line-height: 1.42;
}
.pw-content:not(.pw-content--alice) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-image, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads) + :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-image, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads):not([class*="frame-space-before-"]) {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.pw-content:not(.pw-content--alice) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic) p { margin-block: 0 0.75em; }
.pw-content:not(.pw-content--alice) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic) p:last-child { margin-bottom: 0; }
.pw-content > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic) .firstHeadline { font-weight: 600; font-style: normal; text-transform: uppercase; }
.pw-content > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic) .firstWords { font-weight: 200; font-style: italic; }
.pw-content:not(.pw-content--alice) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-header, .frame-type-uploads) h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); }
.pw-content:not(.pw-content--alice) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-header, .frame-type-uploads) h3 { font-size: clamp(1.15rem, 1.7vw, 1.45rem); }

/* The restored Onlineangebote prose originated in one narrow Legacy CE. Core
   splits its inline illustration into FAL-backed records, but they remain one
   continuous reading column with the original responsive type scale. */
.pw-content.pw-content--online > :is(.frame-type-text, .frame-type-image) {
    width: min(calc(100% - 2rem), var(--pw-content-reading));
    color: #1d1d1b;
}
.pw-content.pw-content--online > .frame-type-text {
    font-size: clamp(1rem, calc(1.45 * var(--pw-article-unit)), 1.45rem);
    font-weight: 400;
    line-height: max(1.5em, calc(2.4 * var(--pw-article-unit)));
    letter-spacing: calc(.025 * var(--pw-article-unit));
}
.pw-content.pw-content--online > :is(.frame-type-header, .frame-type-text, .frame-type-image)
    + :is(.frame-type-header, .frame-type-text, .frame-type-image):not([hidden]) {
    margin-top: 0;
}
.pw-content--online .introduction,
.pw-content--online .introduction * {
    font-size: inherit;
    font-weight: 700;
    line-height: inherit;
    letter-spacing: 0;
}
.pw-content--online .introduction { margin: 0 0 calc(2.4 * var(--pw-article-unit)); }
.pw-content--online .normal { position: relative; top: calc(-.3 * var(--pw-article-unit)); }
.pw-content--online :is(.frame-type-text, .frame-type-image) a {
    color: inherit;
    text-underline-offset: .1em;
}
.pw-content.pw-content--online > .frame-type-image img {
    width: auto;
    max-width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .pw-content.pw-content--online > .frame-type-text {
        font-size: 18px;
        line-height: 24px;
        letter-spacing: .025rem;
    }
}

/* Legal texts and the author guidelines used one narrow reading column in the
   original site. The fluid sizes reproduce its viewport-dependent rem scale
   while retaining a readable 16px minimum on current mobile browsers. */
.pw-main--reference-content .pw-content > :is(.frame-type-text, .frame-type-header) {
    width: min(calc(100% - 2rem), 53.358rem, 45.85vw);
    color: #1d1d1b;
    font-size: clamp(1rem, 1.25vw, 1.45rem);
    font-weight: 400;
    line-height: 1.655;
    letter-spacing: 0.025rem;
}

.pw-main--reference-content .pw-content > .frame-type-text:first-child {
    margin-top: clamp(2.1875rem, 6.25vw, 5rem);
}

.pw-main--legal-imprint .pw-content > .frame-type-text:first-child {
    margin-top: calc(clamp(2.1875rem, 6.25vw, 5rem) + clamp(0.875rem, 1.875vw, 1.5rem));
}

.pw-main--authors-guide .pw-content > .frame-type-text:first-child {
    margin-top: 0;
}

.pw-main--reference-content .pw-content > .frame-type-text .normal p {
    margin: 0;
}

.pw-main--reference-content .pw-content > .frame-type-text :is(a, a:visited) {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.1em;
}

.pw-main--reference-content .pw-content > .frame-type-text :is(h2, h3) {
    margin: 0.5rem 0 1rem;
    color: #1d1d1b;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.025rem;
    text-align: left;
}

@media (max-width: 904px) {
    .pw-main--reference-content .pw-content > :is(.frame-type-text, .frame-type-header) {
        width: min(calc(100% - 2rem), 26.679rem);
    }

    .pw-main--reference-content .pw-content > .frame-type-text:first-child {
        margin-top: 2.5rem;
    }

    .pw-main--legal-imprint .pw-content > .frame-type-text:first-child {
        margin-top: 3.5rem;
    }

    .pw-main--authors-guide .pw-content > .frame-type-text:first-child {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .pw-main--reference-content .pw-content > :is(.frame-type-text, .frame-type-header) {
        width: 80%;
    }

    .pw-main--reference-content .pw-content > .frame-type-text:first-child {
        margin-top: 2.1875rem;
    }

    .pw-main--legal-imprint .pw-content > .frame-type-text:first-child {
        margin-top: 3.0625rem;
    }

    .pw-main--authors-guide .pw-content > .frame-type-text:first-child {
        margin-top: 0;
    }
}

/* Preserve Core's float/nowrap semantics, but allow galleries and captions to
   shrink. Its display:table figures otherwise retain a fixed intrinsic width. */
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) :is(.ce-textpic, .ce-image) { display: flow-root; overflow: visible; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) .ce-gallery { width: max-content; max-width: 100%; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) :is(.ce-outer, .ce-inner) { position: static; float: none; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) .ce-center .ce-gallery { float: none; margin-inline: auto; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) .ce-row { display: flex; overflow: visible; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) .ce-column { float: none; min-width: 0; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) figure { display: block; max-width: 100%; margin: 0; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic, .frame-type-image) figcaption { display: block; margin-top: 0.5em; font-size: 0.85em; line-height: 1.4; color: var(--pw-muted); }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic) .ce-intext .ce-gallery { max-width: 47%; margin-bottom: 0.75rem; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic) .ce-intext.ce-left .ce-gallery { margin-right: var(--pw-ce-gap); }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic) .ce-intext.ce-right .ce-gallery { margin-left: var(--pw-ce-gap); }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic) .ce-above .ce-gallery { margin-bottom: 1rem; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic) .ce-below .ce-gallery { margin-top: 1rem; }

:is(.pw-content, .pw-article__body) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-bullets) :is(ul, ol) { padding-inline-start: 1.5em; }
:is(.pw-content, .pw-article__body) > .frame-type-bullets li + li { margin-top: 0.35em; }
:is(.pw-content, .pw-article__body) > .frame-type-table { overflow-x: auto; }
:is(.pw-content, .pw-article__body) > .frame-type-table caption { text-align: start; margin-bottom: 0.5em; font-weight: 600; }
:is(.pw-content, .pw-article__body) > .frame-type-uploads .ce-uploads li { display: flex; align-items: flex-start; gap: 0.75rem; }
:is(.pw-content, .pw-article__body) > .frame-type-uploads .ce-uploads li > :is(a, img) { flex-shrink: 0; max-width: 25%; }
:is(.pw-content, .pw-article__body) > .frame-type-uploads .ce-uploads li > div { min-width: 0; }
:is(.pw-content, .pw-article__body) > .frame-type-uploads .ce-uploads img { float: none; padding: 0; }
:is(.pw-content, .pw-article__body) > .frame-type-uploads .ce-uploads-fileName { font-weight: 600; }
:is(.pw-content, .pw-article__body) > .frame-type-uploads .ce-uploads-filesize { font-size: 0.85em; color: var(--pw-muted); }

/* Explicit editor spacing must win over the existing generic frame margins. */
.frame-space-before-extra-small { --pw-ce-before: 1em; }
.frame-space-before-small { --pw-ce-before: 2em; }
.frame-space-before-medium { --pw-ce-before: 3em; }
.frame-space-before-large { --pw-ce-before: 4em; }
.frame-space-before-extra-large { --pw-ce-before: 5em; }
.frame-space-after-extra-small { --pw-ce-after: 1em; }
.frame-space-after-small { --pw-ce-after: 2em; }
.frame-space-after-medium { --pw-ce-after: 3em; }
.frame-space-after-large { --pw-ce-after: 4em; }
.frame-space-after-extra-large { --pw-ce-after: 5em; }
:is(.pw-content, .pw-article__body) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-image, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads)[class*="frame-space-before-"] { margin-top: var(--pw-ce-before); }
:is(.pw-content, .pw-article__body) > :is(.frame-type-text, .frame-type-textmedia, .frame-type-textpic, .frame-type-image, .frame-type-header, .frame-type-bullets, .frame-type-table, .frame-type-uploads)[class*="frame-space-after-"] { margin-bottom: var(--pw-ce-after); }

@media (max-width: 700px) {
    :is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic) .ce-intext:is(.ce-left, .ce-right) .ce-gallery { float: none; max-width: 100%; margin: 0 0 1rem; }
    :is(.pw-content, .pw-article__body) > :is(.frame-type-textmedia, .frame-type-textpic) .ce-nowrap .ce-bodytext { clear: both; }
}
