/*
 * Prose styles for plain-content pages.
 *
 * Applied only when a page's content doesn't start with its own <section>
 * wrapper — typically pages typed in the block/classic editor (GDPR,
 * complaints policy, one-off content pages).
 *
 * Wrapper markup emitted by kbs_the_raw_content():
 *   <section class="kbs-prose-section">
 *     <div class="wrap">
 *       <div class="kbs-prose"> ...content... </div>
 *     </div>
 *   </section>
 *
 * .wrap comes from the per-page stylesheet (max-width: 1080px). Inside that,
 * .kbs-prose caps the readable measure at ~760px for comfortable reading.
 */

.kbs-prose-section {
    padding: 72px 0 96px;
    background: var(--offwhite);
}

.kbs-prose {
    max-width: 760px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal);
}

.kbs-prose h1 {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    color: var(--charcoal);
}

.kbs-prose h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.3;
    margin: 40px 0 16px;
    color: var(--charcoal);
}

.kbs-prose h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin: 32px 0 12px;
    color: var(--charcoal);
}

.kbs-prose h4 {
    font-size: 17px;
    font-weight: 700;
    margin: 24px 0 10px;
    color: var(--charcoal);
}

.kbs-prose p {
    margin: 0 0 18px;
    color: var(--greytext);
}

.kbs-prose ul,
.kbs-prose ol {
    margin: 0 0 20px 22px;
    padding: 0;
}

.kbs-prose li {
    margin-bottom: 8px;
    color: var(--greytext);
    line-height: 1.65;
}

.kbs-prose a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color .18s ease;
}

.kbs-prose a:hover {
    color: var(--red);
}

.kbs-prose strong {
    font-weight: 700;
    color: var(--charcoal);
}

.kbs-prose em {
    font-style: italic;
}

.kbs-prose blockquote {
    border-left: 3px solid var(--blue);
    padding-left: 18px;
    margin: 24px 0;
    font-style: italic;
    color: var(--charcoal);
}

.kbs-prose hr {
    border: 0;
    border-top: 1px solid #E4E4E0;
    margin: 40px 0;
}

.kbs-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    display: block;
}

.kbs-prose figure {
    margin: 24px 0;
}

.kbs-prose figcaption {
    font-size: 13.5px;
    color: var(--greytext);
    margin-top: 8px;
    text-align: center;
}

.kbs-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.kbs-prose table td,
.kbs-prose table th {
    border: 1px solid #E4E4E0;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.kbs-prose table th {
    background: var(--cardbg);
    font-weight: 700;
    color: var(--charcoal);
}

.kbs-prose code {
    background: var(--cardbg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: 0.92em;
}

.kbs-prose pre {
    background: var(--charcoal);
    color: #F1F0EC;
    padding: 18px 22px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

.kbs-prose pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Trailing element spacing — avoid the section growing on the last child. */
.kbs-prose > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .kbs-prose-section { padding: 48px 0 64px; }
    .kbs-prose { font-size: 15.5px; }
    .kbs-prose h1 { font-size: 30px; }
    .kbs-prose h2 { font-size: 22px; margin: 32px 0 12px; }
    .kbs-prose h3 { font-size: 18px; margin: 24px 0 10px; }
}
