/* Formatting chosen in the CMS: text size, media width and placement, spacing.
   Class names come from build/format.mjs; a default choice adds no class, so
   pages that use none of these look exactly as the theme draws them. */

/* Rich text. The theme separated paragraphs with a blank line (two <br/>), so a
   paragraph's bottom margin is one line of whatever size the text is. */
.cms-text p, .cms-text ul, .cms-text ol, .cms-text blockquote { margin: 0 0 1.85em; margin: 0 0 1lh; }
.cms-text > :last-child { margin-bottom: 0; }
.cms-text h2, .cms-text h3, .cms-text h4 { margin: 0 0 .5em; }
.cms-text ul, .cms-text ol { padding-left: 1.5em; }

/* Lines: About and CV put each line directly under the last, with no gap. */
.cms-lines p { margin: 0; }
.cms-block { margin-bottom: 1.85em; margin-bottom: 1lh; }
.cms-block:last-child { margin-bottom: 0; }

/* Text size. Set in em so the theme's smaller phone text scales them down too. */
.fs-small  { font-size: .85em; line-height: 1.75; }
.fs-large  { font-size: 1.25em; line-height: 1.7; }
.fs-xlarge { font-size: 1.6em; line-height: 1.5; }

/* Spacing above and below a block. */
.space-above-s { margin-top: 20px !important; }
.space-above-m { margin-top: 40px !important; }
.space-above-l { margin-top: 80px !important; }
.space-below-s { margin-bottom: 20px !important; }
.space-below-m { margin-bottom: 40px !important; }
.space-below-l { margin-bottom: 80px !important; }

/* Width and position of images and video within their column. */
.media-w-75 > .mcb-column-inner, img.media-w-75 { width: 75% !important; }
.media-w-50 > .mcb-column-inner, img.media-w-50 { width: 50% !important; }
.media-align-left > .mcb-column-inner { margin-left: 0 !important; margin-right: auto !important; }
.media-align-center > .mcb-column-inner { margin-left: auto !important; margin-right: auto !important; }
.media-align-right > .mcb-column-inner { margin-left: auto !important; margin-right: 0 !important; }
img.media-w-75, img.media-w-50 { height: auto; }

/* On phones a narrowed block would be too small to see; use the full width. */
@media only screen and (max-width: 767px) {
  .media-w-75 > .mcb-column-inner, .media-w-50 > .mcb-column-inner { width: 100% !important; }
}
