/* ==========================================================================
   Generic Content Page Mobile — V4 styles
   Prefix: kpgm-
   Depends on shared.css
   ========================================================================== */

.kpgm-content {
    padding: 24px 24px 40px;
}

.kpgm-content__title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 36px;
    color: var(--color-text);
    margin: 0 0 24px;
    line-height: 1.05;
}

.kpgm-content__body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text);
    line-height: 1.6;
}

.kpgm-content__body h2 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-text);
    line-height: 1.3;
    margin: 28px 0 12px;
}

.kpgm-content__body h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.3;
    margin: 24px 0 10px;
}

.kpgm-content__body p {
    margin: 0 0 14px;
}

.kpgm-content__body p:last-child {
    margin-bottom: 0;
}

.kpgm-content__body ul,
.kpgm-content__body ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

.kpgm-content__body li {
    margin: 0 0 6px;
}

/* Willem #14: collapse genuinely-empty editor paragraphs/list-items so they add no
   blank line. Ported from content-page.css (desktop already had it; mobile did not),
   so both viewports handle empty editor blocks identically. A <p> holding only a <br>
   is NOT targeted (:empty ignores element children), matching the desktop behaviour. */
.kpgm-content__body p:empty,
.kpgm-content__body li:empty {
    display: none;
    margin: 0;
}

/* Willem: fully-bold "heading" paragraphs (the client uses bold text, not Heading
   blocks) should hug the line below — tighten only the bottom margin. Same intent and
   selector as desktop; mixed lines (<strong>…</strong><br>…) excluded by :only-child. */
.kpgm-content__body p:has(> strong:only-child) {
    margin-bottom: 4px;
}

/* Parity with desktop: zero the top margin of the line after a bold-heading
   paragraph. No-op on mobile (base p already has margin-top:0) but keeps the two
   stylesheets identical in intent. */
.kpgm-content__body p:has(> strong:only-child) + p {
    margin-top: 0;
}

.kpgm-content__body a {
    color: var(--color-primary);
    text-decoration: underline;
    word-break: break-word;
}

.kpgm-content__body strong {
    font-weight: 700;
}
