/*
 * cms-typography.css
 *
 * Static (non-bundled) typography overrides for CMS-rendered headings.
 * Loaded directly from /public/css/ (NOT through Laravel Mix), so it
 * ships immediately on git pull with no npm run prod required.
 *
 * Removes the default bold weight from:
 *   - All headings inside .cms-copy (CMS rich-text content blocks)
 *   - The <h2> in _title.blade.php (which carries .type-3xl / .type-4xl
 *     and lives inside .site-container)
 *
 * Per the user's request that titles read in regular weight rather
 * than the browser-default bold or any inherited font-weight from
 * .type-3xl / .type-4xl utilities. Uses font-weight: 400 explicitly
 * (rather than 'normal') and !important so it wins against any
 * Tailwind utility or rich-text inline style without needing to
 * touch the existing compiled bundle.
 */

.cms-copy h1,
.cms-copy h2,
.cms-copy h3,
.cms-copy h4,
.cms-copy h5,
.cms-copy h6 {
  font-weight: 400 !important;
}

.site-container h2.type-3xl,
.site-container h2.type-4xl {
  font-weight: 400 !important;
}

/*
 * CMS rich-text "title" pattern.
 *
 * Editors often write standalone headings as **All Caps Heading** in the
 * rich-text editor, which produces <p><strong>...</strong></p> in the
 * rendered HTML rather than a real <h*>. The h-tag rule above does not
 * touch those, so this rule catches the "paragraph that contains nothing
 * but a single <strong>" pattern and drops it to regular weight too.
 *
 * The :only-child guard is deliberate: inline emphasis inside prose
 * (e.g. "we pay <strong>£0.01 per card</strong>") is left bold,
 * because that <strong> is NOT the only child of its <p>.
 */
.cms-copy p > strong:only-child {
  font-weight: 400 !important;
}
